(self.webpackChunk=self.webpackChunk||[]).push([[4496],{66543:function(){"use strict"},59598:function(){"use strict"},21697:function(Rt,It){"use strict";It.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Rt={},It="5.0",de={},le=null,ot=!1,Pe=!1,We=null,me=!1,ge=null,Re=null,Ve=0;Ve4?parseFloat(xe):5};Rt.setHTML5Codebase=function(xe,Ge){Re=xe,_e(xe,Ge)},Rt.setJavaCodebase=Rt.setJavaCodebaseVersion=Rt.isCompiledInstalled=Rt.setPreCompiledScriptPath=Rt.setPreCompiledResourcePath=function(){},Rt.setHTML5CodebaseVersion=function(xe,Ge){var ze=parseFloat(xe);if(ze!==NaN&&ze<5){console.log("The GeoGebra HTML5 codebase version "+ze+" is deprecated. Using version latest instead.");return}ge=xe,ce(xe,Ge)},Rt.getHTML5CodebaseVersion=function(){return He},Rt.getParameters=function(){return de},Rt.setFontsCSSURL=function(xe){ht=xe},Rt.setGiacJSURL=function(xe){},Rt.setJNLPFile=function(xe){fe=xe},Rt.setJNLPBaseDir=function(xe){},Rt.inject=function(){function xe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Ge="auto",ze=de.id,St,Ye=!1,gt=0;gt=5)return!0;var xe=Rt.getAppletObject();return xe&&typeof xe.recalculateEnvironments=="function"?(xe.recalculateEnvironments(),!0):!1},Rt.startAnimation=function(){var xe=Rt.getAppletObject();return xe&&typeof xe.startAnimation=="function"?(xe.startAnimation(),!0):!1},Rt.stopAnimation=function(){var xe=Rt.getAppletObject();return xe&&typeof xe.stopAnimation=="function"?(xe.stopAnimation(),!0):!1},Rt.getAppletObject=function(){var xe=de.id!==void 0?de.id:"ggbApplet";return window[xe]},Rt.resize=function(){};var Xe=function(xe,Ge,ze){var St=document.createElement("param");St.setAttribute("name",Ge),St.setAttribute("value",ze),xe.appendChild(St)},Le=function(xe){return xe&&xe!=="false"},Oe=function(xe,Ge,ze){qe(He)<=4.2&&(ze=!0);var St=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==He||ggbHTML5LoadedCodebaseIsWebSimple&&!Ae)&&(St=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Ye=document.createElement("div");Ye.classList.add("appletParameters","notranslate");var gt=Ge.width,Ee=Ge.height;if(Ge.disableAutoScale=Ge.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Ge.disableAutoScale,Ge.width!==void 0)if(qe(He)<=4.4)Le(Ge.showToolBar)&&(Ge.height-=7),Le(Ge.showAlgebraInput)&&(Ge.height-=37),Ge.width<605&&Le(Ge.showToolBar)&&(Ge.width=605,gt=605);else{var lt=100;(Le(Ge.showToolBar)||Le(Ge.showMenuBar))&&(Ge.hasOwnProperty("customToolBar")&&(Ge.customToolbar=Ge.customToolBar),lt=Le(Ge.showMenuBar)?245:155),gt=5?(Ge.appletOnLoad=function(Ht){var Mt=xe.querySelector(".ggb_preview");Mt&&Mt.parentNode.removeChild(Mt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(te),window.GGBT_wsf_view&&$(window).trigger("resize"),oe(Ht)},z||te.appendChild(re)):Ye.appendChild(re),te.appendChild(Ye),z||xe.appendChild(te),setTimeout(function(){Rt.resize()},1)}else{var se=document.createElement("div");se.className="applet_scaler",se.style.position="relative",se.style.display="block",se.appendChild(Ye),xe.appendChild(se),Ge.appletOnLoad=function(Ht){Rt.resize(),oe(Ht)}}function ne(Ht,Mt){Mt&&typeof Mt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Ht,Mt.appletOnLoad):renderGGBElement(Ht),vt("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Mt)}function ye(Ht,Mt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Ht,params:Mt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Yt){ne(Yt.article,Yt.params)}),html5AppletsToProcess=null)},qe(He)<5&&(Ht.className+=" geogebraweb")):ne(Ht,Mt)}if(St){scriptLoadStarted=!0;for(var Ze=0;Ze0?(pt.remove(),te.attr("id","fullscreencontent").show(),jQuery(oe).append(te),window.dispatchEvent(new Event("resize"))):Oe(pt,Ge,!1),window.GGBT_wsf_view.launchFullScreen(oe)}else st=St,Oe(xe,Ge,!1);if(!window.GGBT_wsf_view)for(Ee=0;Eexe/4*3&&(pt=xe/4*3),oe=pt/5.8,lt.setAttribute("src",$e),lt.setAttribute("width",pt),lt.setAttribute("height",oe);var te=(xe-pt)/2,z=(Ge-oe)/2;lt.style.left=te+"px",lt.style.top=z+"px",Ye.appendChild(lt)}}return Ye.appendChild(Ee),Ye},ft=function(xe){return xe=xe.toLowerCase(),xe==="html5"||xe==="screenshot"?xe:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ce=function(xe,Ge){if(He=xe,Ge){_e(He,!0);return}var ze=!ot;if(ze){var St=qe(He);!isNaN(St)&&St<4.4&&(ze=!1)}var Ye,gt;window.location.protocol.substr(0,4)==="http"?Ye=window.location.protocol:Ye="http:";var Ee=He.indexOf("//");Ee>0?gt=He:Ee===0?gt=Ye+He:gt="https://www.geogebra.org/apps/5.2.814.0/";for(var lt in pe)if(He.slice(pe[lt].length*-1)===pe[lt]||He.slice((pe[lt].length+1)*-1)===pe[lt]+"/"){_e(gt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ze&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!Le(de.showToolBar)&&!Le(de.showMenuBar)&&!Le(de.showAlgebraInput)&&!Le(de.enableRightClick)&&(!de.appName||de.appName=="classic")?gt+="webSimple/":gt+="web3d/",_e(gt,!1)},_e=function(xe,Ge){if(xe.requirejs){Qe=xe;return}xe.slice(-1)!=="/"&&(xe+="/"),Qe=xe,Ge===null&&(Ge=xe.indexOf("http")===-1),ve=Ge,Te="web.nocache.js",Ae=!1;var ze=Qe.split("/");ze.length>1&&(!Ge&&ze[ze.length-2]==="webSimple"?(Te="webSimple.nocache.js",Ae=!0):pe.indexOf(ze[ze.length-2])>=0&&(Te=ze[ze.length-2]+".nocache.js")),ze=xe.split("/"),He=ze[ze.length-3],He.substr(0,4)==="test"?He=He.substr(4,1)+"."+He.substr(5,1):(He.substr(0,3)==="war"||He.substr(0,4)==="beta")&&(He="5.0");var St=parseFloat(He);St!==NaN&&St<5&&xe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+St+" is deprecated. Using version latest instead."),ce("5.0",Ge))},vt=function(xe,Ge){window.console&&window.console.log&&(!Ge||typeof Ge.showLogging=="undefined"||Ge.showLogging&&Ge.showLogging!=="false")&&console.log(xe)};de.material_id!==void 0?Zt(it):it();function it(){var xe=It;ge!==null?xe=ge:parseFloat(xe)<5&&(xe="5.0"),ce(xe,!1),Re!==null&&_e(Re,ve),me=!0}return Rt},GGBAppletUtils=function(){"use strict";function Rt(){return window.GGBT_wsf_edit!==void 0}function It(me,ge){ge!=1?(me.style.transformOrigin="0% 0% 0px",me.style.webkitTransformOrigin="0% 0% 0px",me.style.transform="scale("+ge+","+ge+")",me.style.webkitTransform="scale("+ge+","+ge+")",me.style.maxWidth="initial",me.querySelector(".ggb_preview")!==null&&(me.querySelector(".ggb_preview").style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[0]!==void 0&&(me.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),me.querySelectorAll(".ggb_preview img")[1]!==void 0&&(me.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(me.style.transform="none",me.style.webkitTransform="none")}function de(me,ge,Re,Ve,Ce,fe){var Qe=null;if(fe!=null&&fe!="")for(var ve=me.parentNode;ve!=null;)if((" "+ve.className+" ").indexOf(" "+fe+" ")>-1){Qe=ve;break}else ve=ve.parentNode;var st=0,He=0,Te=0,Ae=0,De=0,$e=0,at=0;if(Qe)st=Qe.offsetWidth,He=Math.max(Ve?Qe.offsetWidth:0,Qe.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(st=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),Te=st):(st=window.innerWidth,He=window.innerHeight,Te=window.innerWidth),me){var ht=me.getBoundingClientRect();ht.left>0&&ht.left<=st&&(Ce===void 0||!Ce)&&(document.dir==="rtl"?(De=st-ht.width-ht.left,$e=Te<=480?10:30):($e=ht.left,De=Te<=480?10:30),Ae=$e+De)}if(me&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var ut=me.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ae=40,at=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Ae=0,at=40)}}return me&&((Re===void 0||!Re)&&ge>0&&ge+Ae1&&(fe=!0)),ge&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(fe=!0),!(me.hasOwnProperty("disableAutoScale")&&me.disableAutoScale))Ce=le(me,ge,fe,Re,me.scaleContainerClass);else return Ve;return fe&&(!me.hasOwnProperty("scale")||Ve===1)?Ce:Math.min(Ve,Ce)}function Pe(me){var ge=Math.min(window.innerWidth,document.documentElement.clientWidth),Re=Math.min(window.innerHeight,document.documentElement.clientHeight),Ve=me.getBoundingClientRect(),Ce=(ge-Ve.width)/2,fe=(Re-Ve.height)/2;fe<0&&(fe=0),me.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(Ce<40?me.style.left="40px":me.style.left=Ce+"px",me.style.top=fe+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(fe<40?me.style.top="40px":me.style.top=fe+"px",me.style.left=Ce+"px")}function We(me,ge){var Re=me.querySelector(".appletParameters");if(Re){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(ge.id!==Re.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(me)}if(Re.parentElement&&/fullscreen/.test(Re.parentElement.className))return;var Ve=ot(ge,me);Rt()&&Re.setAttribute("data-param-scale",Ve);for(var Ce=null,fe=0;fe=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(Rt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Rt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Rt){var It=c[Rt];return It==null?null:It},r=d,webModule.__errFn=e}function B(){function Rt(me){var ge=me.lastIndexOf(rb);ge==-1&&(ge=me.length);var Re=me.indexOf(sb);Re==-1&&(Re=me.length);var Ve=me.lastIndexOf(tb,Math.min(Re,ge));return Ve>=O?me.substring(O,Ve+P):W}function It(me){if(!me.match(/^\w+:\/\//)){var ge=o.createElement(ub);ge.src=me+vb,me=Rt(ge.src)}return me}function de(){var me=__gwt_getMetaProperty(wb);return me!=null?me:W}function le(){for(var me=o.getElementsByTagName(_),ge=O;geO?me[me.length-P].href:W}function Pe(){var me=o.location;return me.href==me.protocol+zb+me.host+me.pathname+me.search+me.hash}var We=de();return We==W&&(We=le()),We==W&&(We=ot()),We==W&&Pe()&&(We=Rt(o.location.href)),We=It(We),We}function C(Rt){return Rt.match(/^\//)||Rt.match(/^[a-zA-Z]+:\/\//)?Rt:webModule.__moduleBase+Rt}function D(){var Rt=[],It=O,de=[],le=[];function ot(me){var ge=le[me](),Re=de[me];if(ge in Re)return ge;var Ve=[];for(var Ce in Re)Ve[Re[Ce]]=Ce;throw r&&r(me,Ve,ge),null}if(__gwt_isKnownPropertyValue=function(me,ge){return ge in de[me]},webModule.__getPropMap=function(){var me={};for(var ge in de)de.hasOwnProperty(ge)&&(me[ge]=ot(ge));return me},webModule.__computePropValue=ot,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Pe;try{Pe=Cb;var We=Pe.indexOf(Db);We!=-1&&(It=parseInt(Pe.substring(We+P),$),Pe=Pe.substring(O,We))}catch(me){}return webModule.__softPermutationId=It,C(Pe+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(Rt,It,de){"use strict";de.d(It,{Ax:function(){return We},Ds:function(){return me},KI:function(){return Re},SI:function(){return Pe},f1:function(){return ot}});var le=de(90524);function ot(Ve){let Ce=!0;if(Ve.length>0){for(let fe=0;fenew Promise((Te,Ae)=>{var De=ht=>{try{at(He.next(ht))}catch(ut){Ae(ut)}},$e=ht=>{try{at(He.throw(ht))}catch(ut){Ae(ut)}},at=ht=>ht.done?Te(ht.value):Promise.resolve(ht.value).then(De,$e);at((He=He.apply(ve,st)).next())}),Qe=({data:ve,className:st,fullWidth:He,style:Te={},onClose:Ae,onOk:De,showFullTools:$e,noAssociationId:at})=>{const ht=(0,le.useRef)(null),ut=(0,le.useRef)(null),qe=(0,le.useRef)(null),tt=(0,le.useRef)(null),[ct,Zt]=(0,le.useState)(!1),[Be,Ne]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(qe.current||(qe.current=document.createElement("style"),document.head.appendChild(qe.current)),ve!=null&&ve.visible?(document.body.setAttribute("data-custom","y-hidden"),qe.current.innerHTML=" html { overflow-y: hidden; }",ve!=null&&ve.src&&Xe()):(document.body.removeAttribute("data-custom"),qe.current&&(document.head.removeChild(qe.current),qe.current=null)),()=>{document.body.removeAttribute("data-custom"),qe.current&&(document.head.removeChild(qe.current),qe.current=null)}),[ve==null?void 0:ve.visible]);const Xe=()=>Ce(void 0,null,function*(){Zt(!0),Ne("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Fe=yield(0,Ve.ZJ)(ve==null?void 0:ve.src);ht.current.src="",ht.current.src=Fe,ht.current.onload=function(){we()},Zt(!1),Ne("")}),Le=Fe=>Ce(void 0,null,function*(){Zt(!0),Ne("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Et=yield(0,Re.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ve.title,file:Fe.dataUrl}});Et!=null&&Et.id&&!at?(yield(0,Re.ZP)(`/api/attachments/${ve.id}/add_subitem.json`,{method:"post",body:{subitem_id:Et==null?void 0:Et.id,settings:JSON.stringify(Fe.state)}})).status===0&&De():Et!=null&&Et.id&&De(Et),Zt(!1),Ne("")}),Oe=()=>{const Fe=document.querySelector('a[href="https://markerjs.com/"]');Fe&&Fe.parentNode&&(Fe.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(Je=>{const mt=document.querySelector(Je.name);mt&&mt.setAttribute("title",Je.title)})},we=()=>{ut.current=new ge.hP(ht.current),ut.current.targetRoot=tt.current,ut.current.addEventListener("render",Le),ut.current.addEventListener("beforeclose",Ae),$e&&(ut.current.availableMarkerTypes=ut.current.ALL_MARKER_TYPES,ut.current.uiStyleSettings.redoButtonVisible=!0,ut.current.uiStyleSettings.notesButtonVisible=!0,ut.current.uiStyleSettings.zoomButtonVisible=!0,ut.current.uiStyleSettings.zoomOutButtonVisible=!0,ut.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=ut.current.uiStyleSettings,ut.current.show(),ve!=null&&ve.snapshotData&&ut.current.restoreState(ve.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Oe()},300)};return le.createElement(le.Fragment,null,(ve==null?void 0:ve.visible)&&le.createElement(me.Z,{spinning:ct,tip:Be,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:tt,className:We()(ot.imageDimensions,st,He?ot.fullWidth:""),style:Te},le.createElement("img",{className:ot.img,ref:ht}))))}},88615:function(Rt,It,de){"use strict";var le=de(59301),ot=de(77019),Pe=de(5269),We=de(20554),me=de(99571),ge=de(38394),Re=de(21697),Ve=de(48136),Ce=de(59301);const fe=(0,le.forwardRef)(({callback:Qe,showSaveButton:ve,value:st=""},He)=>{const Te=(0,le.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 "}]}]}],De=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r x=a + r\\text{cos}\\theta \\ \r y=b + r\\text{sin}\\theta \r \\end{matrix}\\right. `},{value:`\\begin{array}{l} \r \\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r \\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\left\\{\\begin{matrix} \r \\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r \\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r \\end{matrix}\\right. \r \\end{array} `},{value:`\\begin{array}{l} \r a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r \\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r a \\perp \\alpha \\ \r b \\perp \\alpha \r \\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r \\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r a \\parallel \\partial ,b \\parallel \\partial \r \\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r a \\perp m,a \\perp n \r \\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r \\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r a^{2}+b^{2}=c^{2} \r \\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r \\end{array}`},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:`\\begin{array}{c} \r a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r \\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r \\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r a,b \\in R^{+} \\ \r \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r a,b \\in R \\ \r \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r \\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r \\end{array}`},{value:`\\begin{array}{c} \r H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r \\end{array}`}]}]},{name:"\u79EF\u5206",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"\u7EDF\u8BA1",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:`\\begin{array}{c} \r \\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r \\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r \\end{array}`},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:`\\begin{array}{c} \r P \\left( \\emptyset \\right) =0 \\\\ \r P \\left( S \\right) =1 \r \\end{array}`},{value:`\\begin{array}{c} \r \\forall A \\in S \\\\ \r P \\left( A \\right) \\ge 0 \r \\end{array}`},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:`\\begin{array}{c} \r S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r \\end{array}`},{value:`\\begin{array}{c} \r P_{n}=n! \\\\ \r A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r \\end{array}`}]}]}],$e=ut=>{Te.current.setValue(Te.current.getValue()+" "+ut.value+" ")},at=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:Ce.createElement(ot.Z,{className:Re.Z.lists,gutter:[10,10]},Ae.map((ut,qe)=>Ce.createElement(Pe.Z,{flex:"110px",className:Re.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:`$$${ut.value}$$`}),ut.name),Ce.createElement("div",{className:Re.Z.children},ut.children.map((tt,ct)=>Ce.createElement("div",{key:ct},Ce.createElement("h1",null,tt.name),Ce.createElement(ot.Z,{gutter:[10,10]},tt.data.map((Zt,Be)=>Ce.createElement(Pe.Z,{key:Be,onClick:()=>$e(Zt),className:Re.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:Ce.createElement(ot.Z,{className:Re.Z.lists,gutter:[10,10]},De.map((ut,qe)=>Ce.createElement(Pe.Z,{flex:"110px",className:Re.Z.item},Ce.createElement("div",null,Ce.createElement(ge.Z,{value:"`$$"+ut.value+"$$`"}),ut.name),Ce.createElement("div",{className:Re.Z.children},ut.children.map((tt,ct)=>Ce.createElement("div",{key:ct},tt.name&&Ce.createElement("h1",null,tt.name),Ce.createElement(ot.Z,{gutter:[10,10]},tt.data.map((Zt,Be)=>Ce.createElement(Pe.Z,{key:Be,onClick:()=>$e(Zt),className:Re.Z.diamond},Ce.createElement(ge.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],ht=()=>{var ut=document.createElement("div");ut.innerHTML=Te.current.getValue();var qe=ut.innerText;return Qe&&Qe(qe),qe};return(0,le.useImperativeHandle)(He,()=>({getData:ht})),Ce.createElement("div",{className:Re.Z.mathWrap},Ce.createElement(We.default,{defaultActiveKey:"1",items:at}),Ce.createElement("math-field",{locale:"zh_cn",className:Re.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:Te,style:{width:800,marginTop:30,fontSize:18}},st||""),ve&&Ce.createElement("div",{className:Re.Z.button},Ce.createElement(me.ZP,{size:"large",onClick:ht,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});It.Z=fe},57884:function(Rt,It,de){"use strict";var le=de(59301),ot=de(93314),Pe=de(99571),We=Object.defineProperty,me=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,fe=(He,Te,Ae)=>Te in He?We(He,Te,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):He[Te]=Ae,Qe=(He,Te)=>{for(var Ae in Te||(Te={}))Ve.call(Te,Ae)&&fe(He,Ae,Te[Ae]);if(Re)for(var Ae of Re(Te))Ce.call(Te,Ae)&&fe(He,Ae,Te[Ae]);return He},ve=(He,Te)=>me(He,ge(Te));const st=({img:He,buttonProps:Te={},styles:Ae={},customText:De,ButtonText:$e,ButtonClick:at,Buttonclass:ht,ButtonTwo:ut,imgStyles:qe,loading:tt=!1,className:ct=""})=>le.createElement("section",{className:`tc animated fadeIn ${ct}`,style:Qe({color:"#999",margin:"100px auto",visibility:tt?"hidden":"visible"},Ae)},le.createElement("img",{src:He||ot,style:ve(Qe({},qe),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},De||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),$e&&le.createElement(Pe.ZP,Qe({className:ht,onClick:at},Te),$e),ut&&ut);It.Z=st},41550:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return ht}});var le=de(59301),ot={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Pe=de(99571),We=de(70557),me=de(51124),ge=de(25399),Re=de(49661),Ve=de(72664),Ce=de(57884),fe=de(90524),Qe=de(14794),ve=de(59301),st=Object.defineProperty,He=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,De=(ut,qe,tt)=>qe in ut?st(ut,qe,{enumerable:!0,configurable:!0,writable:!0,value:tt}):ut[qe]=tt,$e=(ut,qe)=>{for(var tt in qe||(qe={}))Te.call(qe,tt)&&De(ut,tt,qe[tt]);if(He)for(var tt of He(qe))Ae.call(qe,tt)&&De(ut,tt,qe[tt]);return ut},at=(ut,qe,tt)=>new Promise((ct,Zt)=>{var Be=Le=>{try{Xe(tt.next(Le))}catch(Oe){Zt(Oe)}},Ne=Le=>{try{Xe(tt.throw(Le))}catch(Oe){Zt(Oe)}},Xe=Le=>Le.done?ct(Le.value):Promise.resolve(Le.value).then(Be,Ne);Xe((tt=tt.apply(ut,qe)).next())}),ht=({editOffice:ut="view",data:qe,issaver:tt,onSaver:ct,theme:Zt,type:Be,filename:Ne,monacoEditor:Xe,className:Le,style:Oe,close:we,onClose:Fe,hasMask:Et,disabledDownload:Je,onImgDimensions:mt,showNodata:ft,recordInfo:pe})=>{const[ce,_e]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[vt,it]=(0,le.useState)(""),[xe,Ge]=(0,le.useState)(),ze=window.ENV==="build"?"/react/build":"",St=location.host.startsWith("localhost")?fe.Z.PROXY_SERVER:fe.Z.API_SERVER,gt=10*(1024*1024),Ee=(0,le.useRef)();qe!=null&&qe.startsWith("/api")&&Be!=="txt"&&(qe=fe.Z.API_SERVER+qe);const lt=re=>re.substring(re.lastIndexOf("/")+1).split(".").pop();Ne&&Xe&&(Xe.filename=Ne),(0,le.useEffect)(()=>{var re,se;const ne=(se=(re=document.cookie)==null?void 0:re.replace(/\s/g,""))==null?void 0:se.split(";");ne==null||ne.map(ye=>{let Ze=ye.split("=");Ze[0]==="_educoder_session"&&it(Ze[1])})},[]),(0,le.useEffect)(()=>{Be==="office"&&(qe.indexOf("bigfilescdn.")>-1||qe.indexOf("bigfiles1")>-1?Ge({url:qe,fileType:lt(qe),model:qe.indexOf("model=edit")?"edit":"view"}):oe())},[Be,qe]);function pt(re){return at(this,null,function*(){re.data.type==="pdfdata"&&(ct(re.data.data),window.removeEventListener("message",pt,!1)),console.log("mess---:",re.data)})}const oe=()=>at(void 0,null,function*(){console.log("data:",qe);let re=qe;qe.startsWith("http")||(re=location.origin+re);let se=new URL(re).pathname.split("/").pop();const ne=yield(0,Ve.gJ)({attachment_id:se});ne.url=St+ne.url,Ge(ne)}),te=()=>{if(qe.startsWith("http")||qe.startsWith("blob:")){z();return}(0,Re.Sv)(Ne||"educoder",qe,Ne)},z=()=>{pe&&(0,Qe.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,Re.Nd)(Ne||"educoder",decodeURIComponent(qe))};return ve.createElement("div",{style:$e({},Oe||{}),className:`${Et&&ot.bgBlack} ${Be?ot.wrp:"hide"}`},we&&ve.createElement("div",{className:ot.close,ref:Ee},!!mt&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Ee.current},ve.createElement("span",{onClick:()=>{Fe(),mt()}},ve.createElement("i",{className:"icon-yulanpizhu"}))),!Je&&ve.createElement(ge.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Ee.current},ve.createElement("span",{onClick:z},ve.createElement("i",{className:"icon-quxiaozhiding"}))),tt&&ve.createElement(ge.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Ee.current},ve.createElement("span",{className:"",onClick:()=>{const re=document.getElementById("pdfiframe");window.addEventListener("message",pt,!1),setTimeout(()=>{re.contentWindow.postMessage("getData","*")},300)}},ve.createElement("i",{className:"icon-baocun"}))),ve.createElement(ge.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Ee.current},ve.createElement("span",{className:"",onClick:()=>{Fe()}},ve.createElement("i",{className:"icon-guanbi1"})))),ve.createElement("div",{className:`${ot[Le]} ${Le} ${ot.monaco} ${Be==="txt"?"show":"hide"}`},Be==="txt"&&ve.createElement(ve.Fragment,null,ve.createElement(me.ZP,$e({},Xe)))),Be==="audio"&&ve.createElement("audio",{src:`${(qe==null?void 0:qe.indexOf("http://"))>-1||(qe==null?void 0:qe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${qe}`,autoPlay:!0}),Be==="video"&&ve.createElement(ve.Fragment,null,(qe==null?void 0:qe.indexOf("http"))>-1?ve.createElement("video",{controls:!0,src:`${qe}`,autoPlay:!0}):ve.createElement("video",{controls:!0,src:`data:video/mp4;base64,${qe}`,autoPlay:!0})),Be==="office"&&xe&&ve.createElement("iframe",{src:`${ze}/office.html?key=${xe.key}&url=${btoa(xe.url)}&callbackUrl=${St+(xe.callbackUrl||"")}&fileType=${xe.fileType}&title=${xe.title||""}&model=${ut}&officeServer=${fe.Z.ONLYOFFICE}&disabledDownload=${!!Je}`}),Be==="html"&&ve.createElement("iframe",{src:qe+"&disposition=inline"}),Be==="pdf"&&ve.createElement("iframe",{id:"pdfiframe",src:`${ze}/js/pdfview/index.html?filename=${Ne||"educoder.pdf"}&url=${encodeURIComponent(qe)}&disabledDownload=${!!Je}&model=${ut}`}),Be==="image"&&ve.createElement("img",{src:`${(qe==null?void 0:qe.indexOf("http://"))>-1||(qe==null?void 0:qe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${qe}`}),(Be==="other"||Be==="download")&&ve.createElement(ve.Fragment,null,ft?ve.createElement(Ce.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:ve.createElement(Pe.ZP,{icon:ve.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:Je},"\u4E0B\u8F7D")}):ve.createElement(Pe.ZP,{type:"primary",size:"middle",onClick:te,disabled:Je},ve.createElement(We.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Be==="flowChart"&&ve.createElement("div",{className:"embed"},ve.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${qe||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(Rt,It,de){"use strict";de.d(It,{z:function(){return Xe},Z:function(){return Le}});var le=de(59301),ot=de(88831),Pe=de(90290),We=de(64018),me=de(39394),ge=de(90524),Re=de(49661),Ve=de(15342),Ce=de(77736),fe=de(99571),Qe=de(1012),ve=de(41550),st=de(59301),Te=({html:Oe})=>{const we=(0,le.useRef)(null),Fe=(0,le.useRef)(null),Et=`.markdown-body p { margin: 0 0 16px 0 !important; line-height: 28px; white-space: pre-wrap; } ol, ul, li { list-style-type: none } ol, ul, dl { margin-bottom: 0px; } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; color: #333; overflow: hidden; font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif; word-break: break-word; font-size: 16px; line-height: 1.6; white-space: normal; word-wrap: break-word; position: relative; } .markdown-body ul>li { list-style-type: disc; } .markdown-body ol>li { list-style-type: decimal; } .markdown-body a { background: transparent; } .markdown-body a:active, .markdown-body a:hover { outline: 0; } .markdown-body strong { font-weight: bold; } .markdown-body h1 { font-size: 2em; margin: 0.67em 0; } .markdown-body img { border: 0; } .markdown-body hr { -moz-box-sizing: content-box; box-sizing: content-box; height: 0; } .markdown-body pre { overflow: auto; } .markdown-body code, .markdown-body kbd, .markdown-body pre { font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace; font-size: 1em; } .markdown-body input { color: inherit; font: inherit; margin: 0; } .markdown-body html input[disabled] { cursor: default; } .markdown-body input { line-height: normal; } .markdown-body input[type="checkbox"] { -moz-box-sizing: border-box; box-sizing: border-box; padding: 0; } .markdown-body table { border-collapse: collapse; border-spacing: 0; } .markdown-body td, .markdown-body th { padding: 0; } .markdown-body * { -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body input { font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol"; } .markdown-body a { color: #4183c4; text-decoration: none; } .markdown-body a:hover, .markdown-body a:active { text-decoration: underline; } .markdown-body hr { height: 0; margin: 15px 0; overflow: hidden; background: transparent; border: 0; border-bottom: 1px solid #ddd; } .markdown-body hr:before { display: table; content: ""; } .markdown-body hr:after { display: table; clear: both; content: ""; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { margin-top: 15px; margin-bottom: 15px; line-height: 1.1; } .markdown-body h1 { font-size: 30px; } .markdown-body h2 { font-size: 21px; } .markdown-body h3 { font-size: 16px; } .markdown-body h4 { font-size: 14px; } .markdown-body h5 { font-size: 12px; } .markdown-body h6 { font-size: 11px; } .markdown-body blockquote { margin: 0; } .markdown-body ul, .markdown-body ol { padding: 0; margin-top: 0; margin-bottom: 0; } ul.linenums, ol.linenums { padding: 16px 0 0 56px !important; } .markdown-body ul, .markdown-body ol { padding-left: 2em; } .markdown-body ol ol, .markdown-body ul ol { list-style-type: lower-roman; } .markdown-body ul ul ol, .markdown-body ul ol ol, .markdown-body ol ul ol, .markdown-body ol ol ol { list-style-type: lower-alpha; } .markdown-body dd { margin-left: 0; } .markdown-body code { font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace; font-size: 12px; } .markdown-body pre { margin-top: 0; margin-bottom: 0; font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace; } .markdown-body .octicon { font: normal normal 16px octicons-anchor; line-height: 1; display: inline-block; text-decoration: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body .octicon-link:before { content: '\f05c'; } .markdown-body>*:first-child { margin-top: 0 !important; } .markdown-body>*:last-child { margin-bottom: 0 !important; } .markdown-body .anchor { position: absolute; top: 0; left: 0; display: block; padding-right: 6px; padding-left: 30px; margin-left: -30px; } .markdown-body .anchor:focus { outline: none; } .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { position: relative; margin-top: 1em; margin-bottom: 16px; font-weight: bold; line-height: 1.4; } .markdown-body h1 .octicon-link, .markdown-body h2 .octicon-link, .markdown-body h3 .octicon-link, .markdown-body h4 .octicon-link, .markdown-body h5 .octicon-link, .markdown-body h6 .octicon-link { display: none; color: #000; vertical-align: middle; } .markdown-body h1:hover .anchor, .markdown-body h2:hover .anchor, .markdown-body h3:hover .anchor, .markdown-body h4:hover .anchor, .markdown-body h5:hover .anchor, .markdown-body h6:hover .anchor { padding-left: 8px; margin-left: -30px; text-decoration: none; } .markdown-body h1:hover .anchor .octicon-link, .markdown-body h2:hover .anchor .octicon-link, .markdown-body h3:hover .anchor .octicon-link, .markdown-body h4:hover .anchor .octicon-link, .markdown-body h5:hover .anchor .octicon-link, .markdown-body h6:hover .anchor .octicon-link { display: inline-block; } .markdown-body h1 { padding-bottom: 0.3em; font-size: 2.25em; line-height: 1.2; border-bottom: 1px solid #eee; } .markdown-body h1 .anchor { line-height: 1; } .markdown-body h2 { padding-bottom: 0.3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; } .markdown-body h2 .anchor { line-height: 1; } .markdown-body h3 { font-size: 1.5em; line-height: 1.43; } .markdown-body h3 .anchor { line-height: 1.2; } .markdown-body h4 { font-size: 1.25em; } .markdown-body h4 .anchor { line-height: 1.2; } .markdown-body h5 { font-size: 1em; } .markdown-body h5 .anchor { line-height: 1.1; } .markdown-body h6 { font-size: 1em; color: #777; } .markdown-body h6 .anchor { line-height: 1.1; } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; } .markdown-body ul ul, .markdown-body ul ol, .markdown-body ol ol, .markdown-body ol ul { margin-top: 0; margin-bottom: 0; } .markdown-body li>p { margin-top: 16px; } .markdown-body dl { padding: 0; } .markdown-body dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: bold; } .markdown-body dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-body blockquote { padding: 0 15px; color: #777; border-left: 4px solid #ddd; } .markdown-body blockquote> :first-child { margin-top: 0; } .markdown-body blockquote> :last-child { margin-bottom: 0; } .markdown-body table { display: block; width: 100%; overflow: auto; word-break: normal; word-break: keep-all; } .markdown-body table th { font-weight: bold; text-align: revert; } .markdown-body table th, .markdown-body table td { padding: 6px 13px; border: 1px solid #ddd; } .markdown-body table tr { background-color: #fff; border-top: 1px solid #ccc; } .markdown-body table tr:nth-child(2n) { background-color: #f8f8f8; } .markdown-body img { max-width: 100%; -moz-box-sizing: border-box; box-sizing: border-box; } .markdown-body code { padding: 0; padding-top: 0.2em; padding-bottom: 0.2em; margin: 0; font-size: 85%; background-color: rgba(0, 0, 0, 0.04); border-radius: 3px; } .markdown-body code:has(.katex) { background-color: transparent; } .markdown-body code:before, .markdown-body code:after { letter-spacing: -0.2em; content: "\\00a0"; } .markdown-body pre>code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body .highlight { margin-bottom: 16px; } .markdown-body .highlight pre, .markdown-body pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f7f7f7; border-radius: 3px; } .markdown-body .highlight pre { margin-bottom: 0; word-break: normal; } .markdown-body pre { word-wrap: normal; } .markdown-body pre code { display: inline; max-width: initial; padding: 0; margin: 0; overflow: initial; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-body pre code:before, .markdown-body pre code:after { content: normal; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font-size: 11px; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .pl-c { color: #969896; } .markdown-body .pl-c1, .markdown-body .pl-mdh, .markdown-body .pl-mm, .markdown-body .pl-mp, .markdown-body .pl-mr, .markdown-body .pl-s1 .pl-v, .markdown-body .pl-s3, .markdown-body .pl-sc, .markdown-body .pl-sv { color: #0086b3; } .markdown-body .pl-e, .markdown-body .pl-en { color: #795da3; } .markdown-body .pl-s1 .pl-s2, .markdown-body .pl-smi, .markdown-body .pl-smp, .markdown-body .pl-stj, .markdown-body .pl-vo, .markdown-body .pl-vpf { color: #333; } .markdown-body .pl-ent { color: #63a35c; } .markdown-body .pl-k, .markdown-body .pl-s, .markdown-body .pl-st { color: #a71d5d; } .markdown-body .pl-pds, .markdown-body .pl-s1, .markdown-body .pl-s1 .pl-pse .pl-s2, .markdown-body .pl-sr, .markdown-body .pl-sr .pl-cce, .markdown-body .pl-sr .pl-sra, .markdown-body .pl-sr .pl-sre, .markdown-body .pl-src { color: #df5000; } .markdown-body .pl-mo, .markdown-body .pl-v { color: #1d3e81; } .markdown-body .pl-id { color: #b52a1d; } .markdown-body .pl-ii { background-color: #b52a1d; color: #f8f8f8; } .markdown-body .pl-sr .pl-cce { color: #63a35c; font-weight: bold; } .markdown-body .pl-ml { color: #693a17; } .markdown-body .pl-mh, .markdown-body .pl-mh .pl-en, .markdown-body .pl-ms { color: #1d3e81; font-weight: bold; } .markdown-body .pl-mq { color: #008080; } .markdown-body .pl-mi { color: #333; font-style: italic; } .markdown-body .pl-mb { color: #333; font-weight: bold; } .markdown-body .pl-md, .markdown-body .pl-mdhf { background-color: #ffecec; color: #bd2c00; } .markdown-body .pl-mdht, .markdown-body .pl-mi1 { background-color: #eaffea; color: #55a532; } .markdown-body .pl-mdr { color: #795da3; font-weight: bold; } .markdown-body kbd { display: inline-block; padding: 3px 5px; font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace; line-height: 10px; color: #555; vertical-align: middle; background-color: #fcfcfc; border: solid 1px #ccc; border-bottom-color: #bbb; border-radius: 3px; box-shadow: inset 0 -1px 0 #bbb; } .markdown-body .task-list-item { list-style-type: none; } .markdown-body .task-list-item+.task-list-item { margin-top: 3px; } .markdown-body .task-list-item input { float: left; margin: 0.3em 0 0.25em -1.6em; vertical-align: middle; } .markdown-body :checked+.radio-label { z-index: 1; position: relative; border-color: #4183c4; } /*! Pretty printing styles. Used with prettify.js. */ /* SPAN elements with the classes below are added by prettyprint. */ .pln { color: #000 } /* plain text */ @media screen { .str { color: #080 } /* string content */ .kwd { color: #008 } /* a keyword */ .com { color: #800 } /* a comment */ .typ { color: #606 } /* a type name */ .lit { color: #066 } /* a literal value */ /* punctuation, lisp open bracket, lisp close bracket */ .pun, .opn, .clo { color: #660 } .tag { color: #008 } /* a markup tag name */ .atn { color: #606 } /* a markup attribute name */ .atv { color: #080 } /* a markup attribute value */ .dec, .var { color: #606 } /* a declaration; a variable name */ .fun { color: red } /* a function name */ } /* Use higher contrast and text-weight for printable form. */ @media print, projection { .str { color: #060 } .kwd { color: #006; font-weight: bold } .com { color: #600; font-style: italic } .typ { color: #404; font-weight: bold } .lit { color: #044 } .pun, .opn, .clo { color: #440 } .tag { color: #006; font-weight: bold } .atn { color: #404 } .atv { color: #060 } } /* Put a border around prettyprinted code snippets. */ pre.prettyprint { padding: 2px; /* border: 1px solid #888 */ } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ li.L0, li.L1, li.L2, li.L3, li.L5, li.L6, li.L7, li.L8 { list-style-type: none } /* Alternate shading for lines */ li.L1, li.L3, li.L5, li.L7, li.L9 { background: #eee } .markdown-body p, .markdown-body blockquote, .markdown-body ul, .markdown-body ol, .markdown-body dl, .markdown-body table, .markdown-body pre { margin-top: 0; margin-bottom: 16px; }`;return(0,le.useEffect)(()=>{const Je=we.current.attachShadow({mode:"open"});Fe.current=document.createElement("div"),Fe.current.className="markdown-body",Fe.current.innerHTML=Oe,Je.appendChild(Fe.current);const mt=document.createElement("style");return mt.textContent=Et,Je.appendChild(mt),()=>{Je.innerHTML=""}},[]),(0,le.useEffect)(()=>{Fe.current&&(Fe.current.innerHTML=Oe)},[Oe]),st.createElement("div",{ref:we})};function Ae(Oe){const we=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Fe=new RegExp(`\\b(${we.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Oe.replace(Fe,"").trim()}var De={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},$e=Object.defineProperty,at=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,qe=(Oe,we,Fe)=>we in Oe?$e(Oe,we,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):Oe[we]=Fe,tt=(Oe,we)=>{for(var Fe in we||(we={}))ht.call(we,Fe)&&qe(Oe,Fe,we[Fe]);if(at)for(var Fe of at(we))ut.call(we,Fe)&&qe(Oe,Fe,we[Fe]);return Oe};const ct="@\u2581\u2581@",Zt="@\u2581@",Be=/]*>/g;function Ne(Oe){let we=document.createElement("div");return we.innerHTML=Oe,we.childNodes.length===0?"":we.childNodes[0].nodeValue}const Xe=(Oe,we)=>{Oe=Oe||"";const Fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Je=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,mt=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return we?Oe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Fe,(ft,pe,ce,_e,vt,it,xe)=>{const Ge=pe||_e||it,ze=ce||vt||xe||"?";return ge.Z.API_SERVER+"/api/attachments/"+Ge+ze+"&t="+(0,Re.Jn)(Ge,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Oe=Oe.replace(mt,(ft,pe,ce,_e,vt,it,xe)=>{const Ge=pe||_e||it,ze=ce||vt||xe||"?";return ge.Z.API_SERVER+"/attachments/download/"+Ge+ze+"&t="+(0,Re.Jn)(Ge,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replace(Fe,(ft,pe,ce,_e,vt,it,xe)=>{const Ge=pe||_e||it,ze=ce||vt||xe||"?";return ge.Z.API_SERVER+"/api/attachments/"+Ge+ze+"&t="+(0,Re.Jn)(Ge,Date.now())+(ft.indexOf(")")>-1?")":"&")}).replace(Et,(ft,pe,ce,_e,vt)=>{const it=pe||_e,xe=ce||vt||"";return'"'+ge.Z.API_SERVER+"/api/attachments/"+it+xe+it+xe+"&t="+(0,Re.Jn)(it,Date.now())}).replace(Je,(ft,pe,ce,_e,vt)=>{const it=pe||_e,xe=ce||vt||"";return"("+ge.Z.API_SERVER+"/files/uploads/"+it+xe+it+xe+"&t="+(0,Re.Jn)(it,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),Oe)};var Le=({value:Oe="",edit:we=!1,className:Fe,showTextOnly:Et,showLines:Je,style:mt={},stylesPrev:ft={},highlightKeywords:pe,showProgramFill:ce,isProgramFill:_e,disabledFill:vt=!1,programFillValue:it,openEditor:xe=()=>{},onFillChange:Ge=Ye=>{},onFillBlur:ze=()=>{},onFillFocus:St=()=>{}})=>{let Ye=Ae(String(Oe||""));const gt=(0,le.useRef)(),Ee=(0,le.useRef)(),[lt,pt]=(0,le.useState)(""),[oe,te]=(0,le.useState)("office"),[z,re]=(0,le.useState)([]),se=(0,le.useRef)("a"+(0,Qe.Z)()),ne={},ye=nt=>//i.test(nt||""),Ze=(nt,ln,_t)=>{const Xt=document.createElement(nt===Zt?"input":"textarea");Xt.style.width="100%",Xt.style.height=nt===Zt?"40px":"151px",Xt.rows=5,Xt.spellcheck=!1,Xt.name="edu-program-fill",Xt.placeholder="\u8BF7\u8F93\u5165",Xt.dataset.id=ln;const on=Object.keys(ne).length;return ne[on]=Xt,`${Xt.outerHTML}`};function Dt(nt){return nt=nt.replace(/!\[.*?\]\(.*?\)/g,""),nt=nt.replace(/\[.*?\]\(.*?\)/g,""),nt=nt.replace(new RegExp("","gs"),""),nt=nt.replace(//g,""),nt=nt.replace(//g,""),nt=nt.replace(new RegExp(".*?<\\/video>","gs"),""),nt=nt.replace(new RegExp(".*?<\\/audio>","gs"),""),nt=nt.replace(new RegExp(".*?<\\/style>","gs"),""),nt=nt.replace(new RegExp(".*?<\\/script>","gs"),""),nt}const Lt=nt=>!Et&&ye(Ye)?nt:nt.replace(/([\s\S]+?)<\/style>/gim,function(ln,_t){let Xt=_t.replace(/(\n|\r)/g,"").split("}"),on=[];return Xt.map(En=>{En!=""&&on.push(`.${se.current} ${En}`)}),``}),dt=(0,le.useMemo)(()=>{try{const Xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,on=/\"\/api\/attachments\/|\"\/attachments\/download\//g,En=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,cn=/\(\/attachments\/download\//g;Ye=Ye.replace(cn,"("+ge.Z.API_SERVER+"/attachments/download/").replace(Xt,"("+ge.Z.API_SERVER+"/api/attachments/").replace(on,'"'+ge.Z.API_SERVER+"/api/attachments/").replace(En,'"'+ge.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,` `),gt.current.style.display="none"}catch(Xt){}if(ce){let Xt=-1;return Ye=Ye.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(on,En,cn){var vn;return++Xt,Ze(on,Xt,(vn=it==null?void 0:it[Xt])==null?void 0:vn.value.replaceAll("<","<").replaceAll(">",">"))}),`
${Lt(Ye||"")}
`}let nt=Lt(Ye);nt=(0,Pe.ZP)(nt);const ln=(0,Pe.ez)();Ye.match(/\[TOC\]/)&&(nt=nt.replace("

[TOC]

",(0,Pe.Qv)()),(0,Pe.Iy)()),nt=nt.replace(/(__special_katext_id_\d+__)/g,(Xt,on)=>{const{type:En,expression:cn}=ln[on];return(0,Ve.renderToString)(Ne(cn)||"",{displayMode:En==="block",throwOnError:!1,output:"html"})}),nt=nt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Pe.AL)();const _t=document.createElement("div");if(_t.innerHTML=nt,Et)return _t.innerText;if(pe){const Xt=pe.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Yt(_t,Xt),_t.innerHTML}return setTimeout(()=>tn(),500),_t.innerHTML},[Ye,pe]);(0,le.useEffect)(()=>{jt.current&&jt.current.querySelectorAll(["input","textarea"]).forEach(ln=>{ln.oninput=yt,ln.onblur=Ht,ln.onfocus=Mt})},[z]),(0,le.useEffect)(()=>{var nt,ln,_t,Xt,on;if(it!=null&&it.length)try{const En=jt.current.querySelectorAll(".edu-program-fill-score"),cn=jt.current.querySelectorAll('[name="edu-program-fill"]');for(const[vn,Jn]of cn.entries())Jn.value=((nt=it==null?void 0:it[vn])==null?void 0:nt.value)||"",((ln=it==null?void 0:it[vn])==null?void 0:ln.type)==="warning"?Jn.className="program-fill-warning":((_t=it==null?void 0:it[vn])==null?void 0:_t.type)==="success"?Jn.className="program-fill-success":Jn.className="";for(const[vn,Jn]of En.entries())Jn.innerHTML=(Xt=it==null?void 0:it[vn])!=null&&Xt.score?`${(on=it==null?void 0:it[vn])==null?void 0:on.score}\u5206`:"";re(it)}catch(En){console.log(En,"error")}},[it]);const yt=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),Ge(z,nt.target.dataset.id)},Ht=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),ze(z,nt.target.dataset.id)},Mt=nt=>{z[nt.target.dataset.id]=z[nt.target.dataset.id]||{},z[nt.target.dataset.id].value=nt.target.value,re([...z]),St(z,nt.target.dataset.id)};function Yt(nt,ln){return nt.childNodes.forEach(_t=>{var Xt;if(_t.childNodes.length>0)Yt(_t,ln);else if(_t.nodeName!=="IMG")if(_t.innerHTML)_t.innerHTML=(Xt=_t.innerHTML)==null?void 0:Xt.replace(new RegExp(ln,"gi"),'$&');else{const on=document.createElement("span");on.innerHTML=_t.textContent.replace(new RegExp(ln,"gi"),'$&'),_t.replaceWith(on)}})}const jt=(0,le.useRef)();Pe.jb.WebkitLineClamp=Je,Je&&(mt=tt(tt({},mt),Pe.jb));function Tt(nt){let ln=nt.target;if(ln.tagName.toUpperCase()==="A"){let _t=ln.getAttribute("href");if(_t.indexOf("office")>-1)nt.preventDefault(),pt(_t),te("office");else if(_t.indexOf("application/pdf")>-1)nt.preventDefault(),pt(_t),te("pdf");else if(_t.indexOf("text/html")>-1)nt.preventDefault(),pt(_t),te("html");else if(_t.startsWith("#")){nt.preventDefault();let Xt=document.getElementById(_t.replace("#",""));Xt&&Xt.scrollIntoView(!0)}}}const tn=()=>{var nt;const ln=(nt=jt.current)==null?void 0:nt.querySelectorAll("video");ln==null||ln.forEach(_t=>{if(_t.oncontextmenu=()=>!1,_t.src.indexOf(".m3u8")>-1&&!_t.canPlayType("application/vnd.apple.mpegurl")){if(me.ZP.isSupported()){var Xt=new me.ZP;Xt.loadSource(_t.src),Xt.attachMedia(_t)}}})};(0,le.useEffect)(()=>{if(jt.current&&dt&&dt.match(Be)&&window.PR.prettyPrint(),jt.current)return jt.current.addEventListener("click",Tt),()=>{var nt;(nt=jt.current)==null||nt.removeEventListener("click",Tt),(0,Pe.AL)(),(0,Pe.Iy)()}},[dt,jt.current,Tt]);const Gt=nt=>{nt.target.nodeName==="IMG"&&nt.target.className.indexOf("draw-flowchart")>-1?(gt.current.style.zIndex=1,gt.current.style.display="flex",gt.current.style.width=nt.target.clientWidth+"px",gt.current.style.height=nt.target.clientHeight+"px",gt.current.style.top=nt.target.offsetTop+"px",gt.current.style.left=nt.target.offsetLeft+"px",nt.target.id&&(Ee.current=nt.target.id)):gt.current.style.display="none"},nn=()=>{gt.current.style.display="none"};return(0,le.useEffect)(()=>{var nt;const ln=_t=>{_t.preventDefault(),_t.clipboardData.setData("text",window.getSelection().toString())};return(nt=jt.current)==null||nt.addEventListener("copy",ln),()=>{var _t;(_t=jt.current)==null||_t.removeEventListener("copy",ln)}},[jt.current]),le.createElement("div",{style:{position:"relative"},onMouseLeave:nn},Et&&le.createElement("div",{ref:jt,className:`${De.mdBody} `},dt),!Et&&!ye(dt)&&le.createElement("div",{ref:jt,style:tt({},mt),onMouseOver:Gt,className:`${Fe||""} ${vt?"disabled-fill":""} markdown-body ${De.mdBody} ${se.current}`,dangerouslySetInnerHTML:{__html:dt}}),!Et&&ye(dt)&&le.createElement(Te,{html:dt}),le.createElement("div",{ref:gt,className:`${De.button} ${we?"":De.previewFlowChart}`},le.createElement(Ce.Z,null,le.createElement(fe.ZP,{onClick:()=>{we?xe(Ee.current):(pt(Ee.current),te("flowChart"))}},we?"\u7F16\u8F91":"\u9884\u89C8"))),le.createElement(ve.Z,{close:!0,data:lt,type:lt!=null&<.length?oe:"",style:tt({},ft),onClose:()=>pt("")}))}},44905:function(Rt,It,de){"use strict";de.d(It,{h:function(){return ut}});var le=de(59301),ot=de(82326),Pe=de(28284),We=de(99571),me=de(89780),ge=de.n(me),Re=de(66543),Ve=de(59598),Ce=Object.defineProperty,fe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,st=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,Te=(qe,tt,ct)=>tt in qe?Ce(qe,tt,{enumerable:!0,configurable:!0,writable:!0,value:ct}):qe[tt]=ct,Ae=(qe,tt)=>{for(var ct in tt||(tt={}))st.call(tt,ct)&&Te(qe,ct,tt[ct]);if(ve)for(var ct of ve(tt))He.call(tt,ct)&&Te(qe,ct,tt[ct]);return qe},De=(qe,tt)=>fe(qe,Qe(tt));const $e=ot.default.Option,at={labelCol:{span:4},wrapperCol:{span:20}},ht={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};It.Z=({callback:qe,onCancel:tt})=>{const[ct,Zt]=(0,le.useState)("python");function Be(Xe){Zt(ht[Xe][1])}function Ne(Xe){qe(Xe)}return le.createElement(Pe.default,De(Ae({},at),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ne,style:{width:500}}),le.createElement(Pe.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(ot.default,{getPopupContainer:Xe=>Xe.parentNode,onChange:Be},Object.keys(ht).map(Xe=>le.createElement($e,{key:Xe,value:Xe},ht[Xe][0])))),le.createElement(Pe.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(ut,{mode:ct})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(We.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(We.ZP,{type:"ghost",onClick:tt},"\u53D6\u6D88")))};function ut({value:qe,onChange:tt,mode:ct,options:Zt={}}){const Be=(0,le.useRef)(),[Ne,Xe]=(0,le.useState)();return(0,le.useEffect)(()=>{if(Ne){let Le=function(Oe){const we=Oe.getValue();tt&&tt(we)};return Ne.on("change",Le),()=>{Ne.off("change",Le)}}},[Ne,tt]),(0,le.useEffect)(()=>{Ne&&Ne.setOption("mode",ct)},[Ne,ct]),(0,le.useEffect)(()=>{Ne&&(qe!==Ne.getValue()||qe==="")&&setTimeout(()=>{Ne.setValue(qe||"")},300)},[Ne,qe]),(0,le.useEffect)(()=>{if(Be.current&&!Ne){const Le=ge().fromTextArea(Be.current,Ae({mode:ct,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));Xe(Le)}},[Be.current,Ne]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:Be}))}},2978:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return qn}});var le=de(59301),ot=de(89780),Pe=de.n(ot),We=de(76374),me=de(66543),ge=de(6313),Re=de(25717),Ve=de(99498),Ce=de(25419),fe=de(67549),Qe=de(38394),ve=({value:$t="",className:sn,showTextOnly:hn,showLines:Ln,style:Fr={}})=>{const Un=(0,le.useMemo)(()=>"",[$t]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:Un}}))},st=Object.defineProperty,He=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable,at=($t,sn,hn)=>sn in $t?st($t,sn,{enumerable:!0,configurable:!0,writable:!0,value:hn}):$t[sn]=hn,ht=($t,sn)=>{for(var hn in sn||(sn={}))De.call(sn,hn)&&at($t,hn,sn[hn]);if(Ae)for(var hn of Ae(sn))$e.call(sn,hn)&&at($t,hn,sn[hn]);return $t},ut=($t,sn)=>He($t,Te(sn));let qe=[{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 tt({onActionCallback:$t,title:sn,icon:hn,actionName:Ln,className:Fr="",children:Un}){function $n(){$t(Ln)}return le.createElement("a",{title:sn,className:Fr,onClick:$n},le.createElement("i",{className:`${hn}`}),Un)}var ct=({watch:$t,showNullButton:sn,showNullProgramButton:hn,onActionCallback:Ln,fullScreen:Fr,insertTemp:Un,hidetoolBar:$n,extraUse:Pr})=>{const lr=[...qe,{title:`${$t?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${$t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!$n&&lr.map((Bn,Zn)=>le.createElement("li",{key:Zn},Bn.actionName?le.createElement(tt,ut(ht({},Bn),{onActionCallback:Ln})):le.createElement("span",{className:"v-line"}))),sn?le.createElement("li",null,le.createElement(tt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Ln},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,hn?le.createElement(le.Fragment,null,le.createElement("li",null,le.createElement(tt,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Ln},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),le.createElement("li",null,le.createElement(tt,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Ln},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Un&&le.createElement("li",null,le.createElement(tt,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Un}`,onActionCallback:Ln},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Pr&&le.createElement("li",null,Pr),le.createElement("li",{className:"btn-full-screen"},le.createElement(tt,{icon:`${Fr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Fr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Ln})))},Zt=de(75790),Be=de(28284),Ne=de(37568),Xe=de(99571),Le=Object.defineProperty,Oe=Object.defineProperties,we=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,mt=($t,sn,hn)=>sn in $t?Le($t,sn,{enumerable:!0,configurable:!0,writable:!0,value:hn}):$t[sn]=hn,ft=($t,sn)=>{for(var hn in sn||(sn={}))Et.call(sn,hn)&&mt($t,hn,sn[hn]);if(Fe)for(var hn of Fe(sn))Je.call(sn,hn)&&mt($t,hn,sn[hn]);return $t},pe=($t,sn)=>Oe($t,we(sn));const ce={labelCol:{span:4},wrapperCol:{span:20}};var _e=({callback:$t,onCancel:sn})=>{function hn(Ln){$t(Ln)}return le.createElement(Be.default,pe(ft({},ce),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:hn,style:{width:500}}),le.createElement(Be.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(Ne.default,null)),le.createElement(Be.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(Ne.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Xe.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},vt=de(44905),it=de(45596),xe=de(62957),Ge=de(77019),ze=de(6077),St=de(59301),Ye=({callback:$t,onCancel:sn})=>{const hn=document.createElement("canvas"),Ln=hn.getContext("2d");hn.width=1e3,hn.height=800,Ln.fillStyle="#ffffff",Ln.fillRect(0,0,hn.width,hn.height);const Fr=hn.toDataURL("image/png");return St.createElement(xe.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},St.createElement(Ge.Z,{style:{height:"100vh"}},St.createElement(ze.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Fr,visible:!0,title:String(Date.now())},onOk:Un=>{$t({src:Un.url})},onClose:sn})))},gt=de(30641),Ee=de(5269),lt=de(6767),pt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},oe=de(59301),z=(0,le.forwardRef)(({onCancel:$t,editImgId:sn,callback:hn},Ln)=>{let Fr=(0,le.useRef)(),Un=(0,le.useRef)(),$n=(0,le.useRef)(),Pr=(0,le.useRef)(!1);const lr=(0,le.useRef)(!1);console.log("ref:",Ln);const[Bn,Zn]=(0,le.useState)(0),[Or,Ot]=(0,le.useState)("100vh");return(0,le.useEffect)(()=>{Zn(1)},[]),(0,le.useImperativeHandle)(Ln,()=>({setHeight:Ot})),oe.createElement("div",{ref:lr,className:"body-overflow-initial"},oe.createElement(gt.Z,{width:"100vw",height:Or,footer:null,closable:!0,placement:"bottom",open:!!Bn,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${pt.drawerWrap}`,onClose:()=>{window.saveDrawData(et=>{hn({src:`/api/attachments/${et}`,id:et})})},title:oe.createElement(Ge.Z,{align:"middle"},oe.createElement(Ee.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),oe.createElement(Ee.Z,{onClick:()=>{Ot(Or==="60px"?"100vh":"60px")}},oe.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),oe.createElement(Ee.Z,{onClick:()=>{window.saveDrawData(et=>{if(et===null){lt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}lt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),hn({src:`/api/attachments/${et}`,id:et,disabledClose:!0})})}},oe.createElement(Xe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},oe.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${sn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Un})))}),re=de(90524),se=de(47889),ne=de(71051);const ye=se.ZP.Group,Ze={margin:"0 8px"};var Dt=({callback:$t,onCancel:sn})=>{function hn(Ln){$t(Ln)}return le.createElement(Be.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:hn},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:Ze},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:Ze},"\u884C\u6570"),le.createElement(Be.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(ne.Z,null)),le.createElement("span",{style:Ze},"\u5217\u6570"),le.createElement(Be.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(ne.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:Ze},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(Be.default.Item,{name:"align"},le.createElement(ye,null,le.createElement(se.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(se.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(se.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(se.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(Xe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(Xe.ZP,{type:"ghost",onClick:sn},"\u53D6\u6D88")))},Lt=de(71411),dt=de(11081),yt=de.n(dt),Mt=(0,le.forwardRef)(({use3d:$t,width:sn,height:hn,callback:Ln,showSaveButton:Fr},Un)=>{const $n=(0,le.useRef)(),Pr=(0,le.useRef)(),[lr,Bn]=(0,le.useState)(!1),Zn=(0,le.useRef)({id:$n,appName:"graphing",width:sn||1e3,height:hn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{Pr.current=new(yt())(Zn.current,!0),window.onload=function(){Pr.current.inject("applet_container")}},[]);const Or=()=>{var Ot=window.ggbApplet.getPNGBase64(1,!0,72);return Ln&&Ln(Ot),Ot};return(0,le.useEffect)(()=>{Zn.current.appName=lr?"3D":"graphing",Pr.current.inject("applet_container")},[lr]),(0,le.useEffect)(()=>{Bn($t)},[$t]),(0,le.useImperativeHandle)(Un,()=>({getImgData:Or})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:$n}),le.createElement(Ge.Z,{align:"middle"},le.createElement(Ee.Z,{flex:1},le.createElement(Lt.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:lr,onChange:Ot=>Bn(Ot)})),le.createElement(Ee.Z,null,le.createElement(Xe.ZP,{size:"large",onClick:Or,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Yt=de(88615);const jt="link",Tt="upload-image",tn="add-flowchart",Gt="draw-image",nn="add-flowchart",nt="code-block",ln="add-table",_t="------------",Xt={default:_t,left:`:${_t}`,center:`:${_t}:`,right:`${_t}:`};var on=de(17904);function En(){}let cn=0;const vn=1e4,Jn="\u2581",jn="@\u2581\u2581@",Wr="@\u2581@",zr=` **\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`,yr=["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 sr($t){return/^\d+$/.test($t)?`${$t}px`:$t}const ir=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Er={[ir+"-B"]:"bold",[ir+"-I"]:"italic"},Pn={[jt]:"\u6DFB\u52A0\u94FE\u63A5",[nt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Tt]:"\u6DFB\u52A0\u56FE\u7247",[Gt]:"\u6DFB\u52A0\u753B\u56FE",[tn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ln]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var qn=({defaultValue:$t="",onChange:sn,width:hn="100%",height:Ln=400,miniToolbar:Fr=!1,isFocus:Un=!1,watch:$n,insertTemp:Pr,mode:lr="markdown",id:Bn="markdown-editor-id",showResizeBar:Zn=!1,noStorage:Or=!1,showNullButton:Ot=!1,showNullProgramButton:et=!1,hidetoolBar:en=!1,fullScreen:An=!1,onBlur:In,onCMBeforeChange:ke,onFullScreen:Me,className:Ft="",disablePaste:bt=!1,disabled:Ie=!1,disabledFill:xt=!1,placeholder:Vt="",values:Jt="",extraUse:rn})=>{const[Ue,Kt]=(0,le.useState)(null),[kt,mn]=(0,le.useState)($t),[Ut,fn]=(0,le.useState)($n),[un,xn]=(0,le.useState)(An),[yn,Wn]=(0,le.useState)(""),[Kn,On]=(0,le.useState)(0),[ar,Dn]=(0,le.useState)(Ln),[mr,Ar]=(0,le.useState)(!1),[Qn,ur]=(0,le.useState)(0),[wr,cr]=(0,le.useState)(0),Gn=(0,le.useRef)(),Cr=(0,le.useRef)(),er=(0,le.useRef)(),tr=(0,le.useRef)(),hr=(0,le.useRef)(),Lr=(0,le.useRef)();(0,le.useEffect)(()=>{const wt=window.scrollY||window.pageYOffset;mn(Jt),Ue==null||Ue.setValue(Jt),window.scrollTo(0,wt)},[Jt]),(0,le.useEffect)(()=>{Me==null||Me(un)},[un]),(0,le.useEffect)(()=>{if(Gn.current){let wt=function(Pt,Nt){var pn;if(bt){Nt.preventDefault();return}const bn=Nt.clipboardData;if(bn){const Fn=bn.types.toString(),Vn=bn.items;if(Fn==="Files"||bn.types.indexOf("Files")>-1){if(Nt.preventDefault(),lr=="stex")return;try{let _n=Vn[1];((pn=Vn[0])==null?void 0:pn.kind)==="file"&&(_n=Vn[0]);const fr=_n.getAsFile(),rr=fr.name.split(".").pop();(0,it.I)(fr,Rr=>{var Li,ii,Gr;Rr.id?((Li=fr==null?void 0:fr.type)==null?void 0:Li.indexOf("image"))>-1?rt.replaceSelection(``):((ii=fr==null?void 0:fr.type)==null?void 0:ii.indexOf("video"))>-1?rt.replaceSelection(``):((Gr=fr==null?void 0:fr.type)==null?void 0:Gr.indexOf("pdf"))>-1?rt.replaceSelection(`${fr.name}`):yr.includes(rr)?rt.replaceSelection(`${fr.name}`):rt.replaceSelection(`[${fr.name}](/api/attachments/${Rr.id}?type=${Rr.content_type})`):(Rr==null?void 0:Rr.status)===401&&(document.location.href="/user/login")})}catch(_n){lt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const rt=Pe().fromTextArea(Gn.current,{mode:lr,lineNumbers:!Fr,lineWrapping:!0,value:$t,autoCloseTags:!0,autoCloseBrackets:!0});return rt.on("keyup",function(Pt,Nt){Nt.keyCode===8&&(Pt.getValue()==""?rt.setOption("placeholder",Vt):rt.setOption("placeholder",null))}),rt.on("keydown",function(Pt,Nt){if(Nt.keyCode===8){var pn=Yn(Pt);pn&&Nt.preventDefault()}}),Un&&rt.focus(),rt.on("paste",wt),Ie&&rt.on("beforeChange",function(Pt,Nt){(Nt.origin==="paste"||Nt.origin==="+input")&&Nt.cancel()}),Kt(rt),()=>{rt.off("paste",wt)}}},[]);const dr=(0,le.useCallback)(()=>{if(Cr.current)try{}catch(wt){console.log(wt,"---- to set md editor body height")}},[ar,Cr,un]);(0,le.useEffect)(()=>{function wt(){let rt=new We.Z(Pt=>{for(let Nt of Pt)(Nt.target.offsetHeight>0||Nt.target.offsetWidth>0)&&(dr(),Ue.setSize("100%","100%"),Ue.refresh())});return rt.observe(Gn.current.parentElement),rt}if(Ue){const rt=wt();return()=>{var Pt,Nt;(Pt=Gn.current)!=null&&Pt.parentElement&&rt.unobserve((Nt=Gn.current)==null?void 0:Nt.parentElement)}}},[Ue,dr]),(0,le.useEffect)(()=>{if(Ue){let wt=[];for(const[rt,Pt]of Object.entries(Er)){let Nt={[rt]:()=>{Hn(Pt)}};wt.push(Nt),Ue.addKeyMap(Nt)}return()=>{for(let rt of wt)Ue.removeKeyMap(rt)}}},[Ue]),(0,le.useEffect)(()=>{An!==un&&xn(An)},[An]),(0,on.Z)(()=>{if(!Or&&Kn>0){let wt=new Date().getTime(),rt=window.sessionStorage.getItem(Bn);wt>=Kn+vn&&(!rt||rt!==kt)&&(window.sessionStorage.setItem(Bn,kt),Ar(!0))}},vn),(0,le.useEffect)(()=>{fn($n)},[Ue,$n]),(0,le.useEffect)(()=>{Ue&&Un&&Ue.focus()},[Ue,Un]),(0,le.useEffect)(()=>{if(Ut&&Ue){let wt=function(Pt){let Nt=Pt.target;if(tr.current){let pn=Nt.scrollTop/Nt.scrollHeight;tr.current.scrollTop=tr.current.scrollHeight*pn}};const rt=Ue.getScrollerElement();return rt.addEventListener("scroll",wt),()=>{rt.removeEventListener("scroll",wt)}}},[Ue,Ut]),(0,le.useEffect)(()=>{if(Ue&&ke){let wt=function(rt,Pt){ke(rt,Pt)};return Ue.on("beforeChange",wt),()=>{Ue.off("beforeChange",wt)}}},[Ue,ke]),(0,le.useEffect)(()=>{if(Ue&&In){let wt=function(){In(Ue.getValue())};return Ue.on("blur",wt),()=>{Ue.off("blur",wt)}}},[Ue,In]);function Yn(wt,rt){var Pt=wt.getDoc(),Nt=Pt.getCursor(),pn=Pt.getLine(Nt.line),bn=pn.charAt(Nt.ch-1),Fn=pn.lastIndexOf("@\u2581@",Nt.ch),Vn=pn.lastIndexOf("@\u2581\u2581@",Nt.ch),_n=Fn>Vn?Fn:Vn,fr=Fn>Vn?3:4;if(jn.indexOf(bn)===-1)return null;if(console.log("change1:",rt,wt,pn,Nt,_n,Fn,Vn,bn),_n>=0&&Nt.ch-_n<5){var rr=_n+fr;return Pt.replaceRange("",{line:Nt.line,ch:_n},{line:Nt.line,ch:rr}),{line:Nt.line,ch:rr}}return null}(0,le.useEffect)(()=>{if(Ue){let wt=function(rt,Pt){const Nt=rt.getValue();mn(Nt),On(new Date().getTime()),rt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),sn&&(et?sn(Nt,qr(Nt)):sn(Nt))};return Ue.on("change",wt),()=>{Ue.off("change",wt)}}},[Ue,sn]),(0,le.useEffect)(()=>{if(Ue)if($t==null)Ue.setValue(""),mn("");else{const wt=window.scrollY||window.pageYOffset;$t!==Ue.getValue()&&(Ue.setValue($t),mn($t),Ue.setCursor(Ie?1:Ue.lineCount(),0),window.scrollTo(0,wt))}},[Ue,$t]);const Hn=(0,le.useCallback)(wt=>{const rt=Ue.getCursor(),Pt=Ue.getSelection();let Nt=Pt.split(` `);switch(wt){case"bold":return Ue.replaceSelection("**"+Pt+"**"),Pt===""&&Ue.setCursor(rt.line,rt.ch+2),Ue.focus();case"italic":return Ue.replaceSelection("*"+Pt+"*"),Pt===""&&Ue.setCursor(rt.line,rt.ch+1),Ue.focus();case"code":return Ue.replaceSelection("`"+Pt+"`"),Pt===""&&Ue.setCursor(rt.line,rt.ch+1),Ue.focus();case"inline-latex":return Wn("inline-latex"),Ue.focus();case"latex":return Ue.replaceSelection("```latex\n"+Pt+"\n```"),Ue.setCursor(rt.line+1,Pt.length+1),Ue.focus();case"line-break":return Ue.replaceSelection(`
`),Ue.focus();case"list-ul":return Pt===""?Ue.replaceSelection("- "+Pt):Ue.replaceSelection(Nt.map(pn=>pn===""?"":`- ${pn}`).join(` `)),Ue.focus();case"list-ol":return Pt===""?Ue.replaceSelection("1. "+Pt):Ue.replaceSelection(Nt.map((pn,bn)=>pn===""?"":`${bn+1}. ${pn}`).join(` `)),Ue.focus();case"add-null-ch":return Pt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(Jn),Ue.focus();case"add-signal":return Pt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(Wr),Ue.focus();case"add-multiple":return Pt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(jn),Ue.focus();case"inster-template-1":return Pt===""&&Ue.setCursor(rt.line,rt.ch),Ue.replaceSelection(zr),Ue.focus();case"eraser":return Ue.setValue(""),Ue.focus();case"trigger-watch":return fn(!Ut),Ue.focus();case"trigger-full-screen":return xn(!un),Ue.focus();case jt:Wn(jt);return;case nt:Wn(nt);return;case Tt:Wn(Tt);return;case Gt:Wn(Gt);return;case"maths-latex":Wn("maths-latex");return;case tn:hr.current="",sessionStorage.removeItem("file_id"),Wn(tn);return;case ln:Wn(ln);return;default:throw new Error}},[Ue,Ut,un]),nr=(0,le.useCallback)((wt,rt)=>{var Pt,Nt,pn,bn,Fn,Vn;switch(wt!=null&&wt.disabledClose||Wn(""),yn){case jt:const{title:Li,link:ii}=wt;return Ue.replaceSelection(`[${Li}](${ii})`),Ue.focus();case nt:const{language:Gr,content:ui}=wt;return Ue.replaceSelection(["```"+Gr,ui,"```"].join(` `)),Ue.focus();case"maths-latex":for(var _n=atob(wt),fr=new Uint8Array(_n.length),rr=0;rr<_n.length;rr++)fr[rr]=_n.charCodeAt(rr);var Rr=new Blob([fr],{type:"image/png"});(0,it.I)(Rr,kr=>{kr.id?Ue.replaceSelection(`![,](/api/attachments/${kr.id}?type=${kr.content_type})`):(kr==null?void 0:kr.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Ue.replaceSelection("`$$"+wt+"$$`");break;case nn:const{src:gr,alt:fi,id:Bi}=wt;if(!Bi)return;Ue.getValue().indexOf(gr)===-1?Ue.replaceSelection(`
${fi||
`):document.getElementById(Bi).src=re.Z.API_SERVER+gr+"?t="+Date.now();break;case Tt:case Gt:const pr=rt,yi=(pn=(Nt=(Pt=pr==null?void 0:pr.name)==null?void 0:Pt.split("."))==null?void 0:Nt.pop)==null?void 0:pn.call(Nt);return((bn=pr==null?void 0:pr.type)==null?void 0:bn.indexOf("image"))>-1||!(pr!=null&&pr.type)?pr!=null&&pr.align||pr!=null&&pr.width?Ue.replaceSelection(`

${fi||

`):Ue.replaceSelection(`${fi||`):((Fn=pr==null?void 0:pr.type)==null?void 0:Fn.indexOf("video"))>-1?Ue.replaceSelection(``):((Vn=pr==null?void 0:pr.type)==null?void 0:Vn.indexOf("pdf"))>-1?Ue.replaceSelection(`${pr.name}`):yr.includes(yi)?Ue.replaceSelection(`${pr.name}`):Ue.replaceSelection(`[${pr.name}](${gr})`),Ue.focus();case ln:const{row:pi,col:Hi,align:bi}=wt;let _i=` `;for(let kr=0;kr{switch(yn){case jt:return le.createElement(_e,{callback:nr,onCancel:Dr});case nt:return le.createElement(vt.Z,{callback:nr,onCancel:Dr});case Tt:return le.createElement(it.Z,{callback:nr,onCancel:Dr});case tn:return le.createElement(z,{editImgId:hr.current,callback:nr,onCancel:Dr});case ln:return le.createElement(Dt,{callback:nr,onCancel:Dr});case"maths-latex":return le.createElement(Mt,{showSaveButton:!0,callback:nr});case"inline-latex":return le.createElement(Yt.Z,{showSaveButton:!0,callback:nr});default:return null}},[yn]);function Dr(){Wn("")}(0,le.useEffect)(()=>{if(er.current){let wt=function(Fn){pn=!0,bn=Fn.pageY},rt=function(){pn=!1},Pt=function(Fn){if(pn){let Vn=Fn.pageY-bn;Vn<0&&(Vn=0),Vn>300&&(Vn=300);let _n=Ln+Vn+"px";Dn(_n)}},Nt=er.current,pn=!1,bn=0;return Nt.addEventListener("mousedown",wt),document.addEventListener("mousemove",Pt),document.addEventListener("mouseup",rt),()=>{Nt.removeEventListener("mousedown",wt),document.removeEventListener("mousemove",Pt),document.removeEventListener("mouseup",rt)}}},[Ue,er]),(0,le.useEffect)(()=>{Dn(Ln)},[Ln]);const br=sr(hn),ri=sr(ar),Sr={width:br,height:ri},li=(0,le.useMemo)(()=>{if(Kn){let wt=new Date(Kn),rt=wt.getHours(),Pt=wt.getMinutes(),Nt=wt.getSeconds();return rt=rt<10?"0"+rt:rt,Pt=Pt<10?"0"+Pt:Pt,Nt=Nt<10?"0"+Nt:Nt,`${rt}:${Pt}:${Nt}`}return 0},[Kn]),qr=wt=>{const rt=[];if(et){let Pt=-1;wt=wt.replace(/(@▁▁@|@▁@)/g,function(Nt,pn,bn){rt.push({multiLine:Nt!==Wr})})}return rt};function Br(){window.sessionStorage.removeItem(Bn),Ar(!1),On(0)}function Mn(){Ar(!1),On(0),Ue.setValue(window.sessionStorage.getItem(Bn))}(0,le.useEffect)(()=>{Pn[yn]&&yn!==Gt&&yn!==tn&&setTimeout(()=>{const wt=document.getElementsByClassName("markdown-popup-form")[0],rt=window.innerWidth/2-wt.offsetWidth/2,Pt=window.innerHeight/2-wt.offsetHeight/2;ur(rt),cr(Pt)},0)},[yn]);const Bt=wt=>{wt.preventDefault();const rt=wt.clientX-Qn,Pt=wt.clientY-wr;document.body.onmousemove=Nt=>{let pn=Nt.clientX-rt,bn=Nt.clientY-Pt;const Fn=document.getElementsByClassName("markdown-popup-form")[0],Vn=window.innerWidth-Fn.offsetWidth,_n=window.innerHeight-Fn.offsetHeight;pn=Math.max(0,Math.min(pn,Vn)),bn=Math.max(0,Math.min(bn,_n)),Wt(Nt.clientX,Nt.clientY,rt,Pt)&&(ur(pn),cr(bn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Wt=(wt,rt,Pt,Nt)=>{const pn=document.body.clientHeight,bn=document.body.clientWidth;return wt<20&&Pt>wt||wt>bn-20&&Ptrt||rt>pn-20&&Nt{var rt;hr.current=wt,(rt=Lr.current)==null||rt.setHeight("100vh"),setTimeout(()=>{Wn("add-flowchart")},150)}})):null))),Zn?le.createElement("a",{ref:er,className:"editor-resize"}):null,yn===Gt&&le.createElement(Ye,{callback:nr,onCancel:Dr}),yn===tn&&le.createElement(z,{ref:Lr,editImgId:hr.current,callback:nr,onCancel:Dr}),le.createElement(Zt.Z,null,Pn[yn]&&yn!==Gt&&yn!==tn?le.createElement(xe.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Qn,top:wr},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:Bt},Pn[yn]),open:!0,onCancel:Dr,footer:null,destroyOnClose:!0,width:yn===tn?"1200px":null,height:yn===tn?"80vh":null,className:"markdown-popup-form"},Zr):null))}},45596:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return tt},I:function(){return Zt}});var le=de(28284),ot=de(6767),Pe=de(37568),We=de(77736),me=de(71051),ge=de(47889),Re=de(99571),Ve=de(67303),Ce=de(59301),fe=de(59301),Qe=Object.defineProperty,ve=Object.defineProperties,st=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,De=(Be,Ne,Xe)=>Ne in Be?Qe(Be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Be[Ne]=Xe,$e=(Be,Ne)=>{for(var Xe in Ne||(Ne={}))Te.call(Ne,Xe)&&De(Be,Xe,Ne[Xe]);if(He)for(var Xe of He(Ne))Ae.call(Ne,Xe)&&De(Be,Xe,Ne[Xe]);return Be},at=(Be,Ne)=>ve(Be,st(Ne));const{useForm:ht}=le.default,ut={width:280,marginRight:10},qe={labelCol:{span:5},wrapperCol:{span:19}};var tt=({callback:Be,onCancel:Ne})=>{const[Xe]=ht();let Le=(0,Ce.useRef)();function Oe(Et){Le.current.width=Xe.getFieldValue("width"),Le.current.align=Xe.getFieldValue("align"),Be(Et,Le.current)}function we(Et,Je){if(Et.status===-1){ot.ZP.error(Et.message);return}Xe.setFieldsValue({src:`/api/attachments/${Et.id}`,type:Je.type})}function Fe(Et){let Je=Et.target.files[0];Le.current=Je,Zt(Je,we)}return fe.createElement(le.default,at($e({form:Xe},qe),{className:"upload-image-panel",onFinish:Oe,style:{width:470,overflow:"hidden"}}),fe.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},fe.createElement("div",{className:"flex-container"},fe.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},fe.createElement(Pe.default,{style:ut})),fe.createElement(ct,{onFileChange:Fe}))),fe.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},fe.createElement(Pe.default,{style:{width:264}})),fe.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},fe.createElement(We.Z,null,fe.createElement(le.default.Item,{name:"width",style:{margin:0}},fe.createElement(me.Z,{style:{width:264}})),fe.createElement("span",{className:"ml8"},"%"))),fe.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},fe.createElement(ge.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),fe.createElement("aside",null,fe.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},fe.createElement(Re.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(Re.ZP,{type:"default",onClick:Ne},"\u53D6\u6D88"))))};function ct({onFileChange:Be}){return fe.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",fe.createElement("input",{type:"file",onChange:Be}))}function Zt(Be,Ne){if(!Be)throw new String("\u6CA1\u6709\u6587\u4EF6");let Xe=new FormData;Xe.append("editormd-image-file",Be),Xe.append("file_param_name","editormd-image-file"),Xe.append("byxhr","true");var Le=new window.XMLHttpRequest;Le.withCredentials=!0,Le.addEventListener("load",function(Oe){Ne(JSON.parse(Oe.target.responseText),Be)},!1),Le.addEventListener("error",function(Oe){console.error(Oe)},!1),Le.open("POST",`${Ve.KI}/api/attachments.json`),Le.send(Xe)}},75790:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return Pe}});var le=de(59301),ot=de(4676);class Pe extends le.Component{constructor(me){super(me);const ge=window.document;this.node=ge.createElement("div"),ge.body.appendChild(this.node)}render(){const{children:me}=this.props;return(0,ot.createPortal)(me,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(Rt,It,de){"use strict";de.d(It,{SV:function(){return gt},ZP:function(){return Ye}});var le=de(59301),ot=de(76374);const Pe={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},We={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(` `)},{label:"System.out.println",content:["System.out.println($0)"].join(` `)},{label:"System.out.print",content:["System.out.print($0)"].join(` `)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},me={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(` `)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(` `)},{label:"if",content:["if () {"," $0","}"].join(` `)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(` `)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(` `)},{label:"using namespace std;",content:["using namespace std;"].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)},{label:"include ",content:["#include "].join(` `)}]},ge={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(` `)}]},Re={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(` `)}]};var Ve=de(53184),Ce=de.n(Ve),fe=(Ee,lt,pt)=>new Promise((oe,te)=>{var z=ne=>{try{se(pt.next(ne))}catch(ye){te(ye)}},re=ne=>{try{se(pt.throw(ne))}catch(ye){te(ye)}},se=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);se((pt=pt.apply(Ee,lt)).next())});const Qe={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},ve=(Ee,lt,pt,oe)=>{const te=lt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:pt.lineNumber,endColumn:pt.column});return Array.from(new Set(te.match(/\b\w{2,}\b/g)||[])).map(re=>({label:re,kind:Ee.languages.CompletionItemKind.Text,insertText:re,range:oe}))},st=(Ee,lt,pt,oe)=>{Ee.languages.registerCompletionItemProvider(lt,{provideCompletionItems(te,z){const re=te.getWordUntilPosition(z),se={startLineNumber:z.lineNumber,endLineNumber:z.lineNumber,startColumn:re.startColumn,endColumn:re.endColumn},ne=te.getLineContent(z.lineNumber).substring(re.startColumn-2,re.endColumn);return{suggestions:[...ve(Ee,te,z,se),...pt.map(Ze=>({label:Ze,kind:Ee.languages.CompletionItemKind.Keyword,documentation:Ze,insertText:Ze,insertTextRules:Ee.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se})),...oe.map(Ze=>({label:Ze.label,kind:Ee.languages.CompletionItemKind.Snippet,documentation:Ze.content,insertText:ne.startsWith("#")?Ze.content.replace(/#/,""):Ze.content,insertTextRules:Ee.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:se}))]}}})};var He=Ee=>{Qe.languages.forEach(lt=>{Ee.languages.registerDocumentFormattingEditProvider(lt,{provideDocumentFormattingEdits(pt){return fe(this,null,function*(){const oe=Ce()(pt.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:pt.getFullModelRange(),text:oe}]})}})}),st(Ee,"java",We.keywords,We.quickKey),st(Ee,"cpp",me.keywords,me.quickKey),st(Ee,"c",Pe.keywords,[]),st(Ee,"python",ge.keywords,ge.quickKey),st(Ee,"scala",Re.keywords,Re.quickKey)};const Te="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ae=Object.defineProperty,De=(Ee,lt,pt)=>lt in Ee?Ae(Ee,lt,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Ee[lt]=pt,$e=(Ee,lt,pt)=>De(Ee,typeof lt!="symbol"?lt+"":lt,pt);const at=class Wl{constructor(lt,pt,oe){this.placeholder=lt,this.editor=pt,this.monaco=oe,pt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Wl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};$e(at,"ID","editor.widget.placeholderHint");var ut=at,qe=de(96236),tt=de(6767),ct=de(25399),Zt=de(89392),Be=de(33796),Ne=de(56102),Xe=Object.defineProperty,Le=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,we=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,Et=Object.prototype.propertyIsEnumerable,Je=(Ee,lt,pt)=>lt in Ee?Xe(Ee,lt,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Ee[lt]=pt,mt=(Ee,lt)=>{for(var pt in lt||(lt={}))Fe.call(lt,pt)&&Je(Ee,pt,lt[pt]);if(we)for(var pt of we(lt))Et.call(lt,pt)&&Je(Ee,pt,lt[pt]);return Ee},ft=(Ee,lt)=>Le(Ee,Oe(lt)),pe=(Ee,lt)=>{var pt={};for(var oe in Ee)Fe.call(Ee,oe)&<.indexOf(oe)<0&&(pt[oe]=Ee[oe]);if(Ee!=null&&we)for(var oe of we(Ee))lt.indexOf(oe)<0&&Et.call(Ee,oe)&&(pt[oe]=Ee[oe]);return pt},ce=(Ee,lt,pt)=>new Promise((oe,te)=>{var z=ne=>{try{se(pt.next(ne))}catch(ye){te(ye)}},re=ne=>{try{se(pt.throw(ne))}catch(ye){te(ye)}},se=ne=>ne.done?oe(ne.value):Promise.resolve(ne.value).then(z,re);se((pt=pt.apply(Ee,lt)).next())});function _e(Ee){return/^\d+$/.test(Ee)?`${Ee}px`:Ee}function vt(){}let it=!1;const xe={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Ge(Ee=[]){let lt=Ee;if(Array.isArray(Ee)){for(let pt=0;ptce(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Ee){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Ee)}});var Ye=Ee=>{var lt=Ee,{width:pt="100%",height:oe="100%",value:te,language:z="javascript",style:re={},options:se={},overrideServices:ne={},theme:ye="vs-dark",onEditBlur:Ze,isCopy:Dt=!1,onSave:Lt,autoHeight:dt=!1,forbidCopy:yt=!1,onChange:Ht=vt,editorDidMount:Mt=vt,onFocus:Yt=vt,onBreakPoint:jt=vt,breakPointValue:Tt=[],filename:tn="educoder.txt",errorLine:Gt,errorContent:nn="",highlightLine:nt,openBreakPoint:ln=!1,placeholder:_t="",showMiniMap:Xt=!0}=lt,on=pe(lt,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const En=(0,le.useRef)(),cn=(0,le.useRef)({}),vn=(0,le.useRef)(),Jn=(0,le.useRef)(),jn=(0,le.useRef)([]),Wr=(0,le.useRef)(!1),zr=(0,le.useRef)(),yr=(0,le.useRef)(),sr=(0,le.useRef)(!1),[Nn,ir]=(0,le.useState)(!1);function Er(){let Ot;return En.current&&(Ot=new ot.Z(et=>{for(let en of et)(en.target.offsetHeight>0||en.target.offsetWidth>0)&&cn.current.instance.layout()}),Ot.observe(En.current)),Ot}function Pn(){tt.ZP.warning({content:decodeURIComponent(Te),key:"monaco-editor-tip"})}const qn=()=>{let Ot=cn.current.instance;if(te!=null&&Ot&&Nn){const et=Ot.getModel();et&&te!==et.getValue()&&(it=!0,et.setValue(te),Ot.layout(),it=!1)}};(0,le.useEffect)(()=>{const Ot=Be.Z.subscribe("formatDocument",et=>{var en;let An=cn.current.instance;(en=An==null?void 0:An.getAction)==null||en.call(An,"editor.action.formatDocument").run()});return window.updateMonacoValue=et=>{Ht(et)},Ot},[]),(0,le.useEffect)(()=>{var Ot;let et=cn.current.instance;Jn.current&&clearTimeout(Jn.current),Jn.current=setTimeout(()=>{qn()},500),te&&(te!=null&&te.length)&&((Ot=et==null?void 0:et.updateOptions)==null||Ot.call(et,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(te.split(/\r\n|\r|\n/g).length))+3,5)}))},[te,Nn,cn.current]),(0,le.useEffect)(()=>{if(Gt&&cn.current&&cn.current.instance){let et=cn.current.instance;et.changeViewZones(function(en){var An=document.createElement("div");An.style.padding="10px 20px",An.style.width="calc(100% - 20px)",An.className="my-error-line-wrp",An.innerHTML=nn,en.addZone({afterLineNumber:Gt||11,heightInLines:3,domNode:An})});var Ot={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};et.addOverlayWidget(Ot),et.revealPositionInCenter({lineNumber:20,column:1})}},[Gt,cn.current,Nn]);const $t=(Ot="",et)=>{if(!Ot||Ot.trim()==="")return!0;const An=cn.current.instance.getModel().getLineTokens(et);let In=!1;for(let ke=0;ke<2;ke++)An.getStandardTokenType(ke)===1&&(In=!0);return In};(0,le.useEffect)(()=>{var Ot;const et=(Ot=cn.current)==null?void 0:Ot.instance;if(et&&Nn&&yt){const en=et.onDidBlurEditorWidget(()=>{sr.current=!1}),An=et.onDidFocusEditorText(()=>{sr.current=!0});return()=>{en.dispose(),An.dispose()}}},[cn.current,Nn,yt]),(0,le.useEffect)(()=>{var Ot;if((Ot=cn.current)!=null&&Ot.instance&&Nn&&ln){let et=cn.current.instance,en=et.getModel();if(!en)return;(()=>{var Ue;let Kt=[],kt=[];const mn=en.getAllDecorations();for(let fn of mn)fn.options.className==="highlighted-line"&&(Kt.push((Ue=fn==null?void 0:fn.range)==null?void 0:Ue.startLineNumber),kt.push(fn==null?void 0:fn.id));if(nt===Kt[0])return;en.deltaDecorations(kt,[]);const Ut=en.getLineCount();nt&&nt<=Ut&&(et.deltaDecorations([],[{range:new ze.Range(nt,1,nt,en.getLineMaxColumn(nt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),et.revealLineInCenter(nt))})();const In=(Ue=!1)=>{var Kt;let kt=[],mn=[];const Ut=en.getAllDecorations();for(let fn of Ut)fn.options.linesDecorationsClassName==="breakpoints-select"&&(kt.push((Kt=fn==null?void 0:fn.range)==null?void 0:Kt.startLineNumber),mn.push(fn==null?void 0:fn.id));if(Ue)return{lines:kt,ids:mn};jt(kt)},ke=Ue=>ce(void 0,null,function*(){let Kt={range:new ze.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield en.deltaDecorations([],[Kt]),In()}),Me=Ue=>ce(void 0,null,function*(){let Kt=[];const kt=et.getLineDecorations(Ue);for(let mn of kt)mn.options.linesDecorationsClassName==="breakpoints-select"&&Kt.push(mn.id);yield en.deltaDecorations(Kt,[]),In()}),Ft=Ue=>{let Kt=et.getLineDecorations(Ue);for(let kt of Kt)if(kt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Zt.isEqual)(Tt,In(!0).lines)){en.deltaDecorations(In(!0).ids,[]);const Ue=Tt.map(Kt=>({range:new ze.Range(Kt,1,Kt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));en.deltaDecorations([],Ue)}const bt=et.onDidChangeModelContent(Ue=>{let Kt=et.getPosition();if(Kt){let kt=Kt.lineNumber;clearTimeout(yr.current),yr.current=setTimeout(()=>{$t(en.getLineContent(kt),kt)?Me(kt):Ft(kt)?(Me(kt),ke(kt)):In()},100)}}),Ie=et.onMouseDown(Ue=>{var Kt,kt,mn;if(Ue.target.detail&&((mn=(kt=(Kt=Ue.target)==null?void 0:Kt.element)==null?void 0:kt.className)!=null&&mn.includes("line-numbers"))){let Ut=Ue.target.position.lineNumber;if($t(en.getLineContent(Ut),Ut))return;Ft(Ut)?Me(Ut):ke(Ut)}}),xt=Ue=>{let Kt={range:new ze.Range(Ue,1,Ue,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};jn.current=et.deltaDecorations(jn.current,[Kt])},Vt=()=>{jn.current=et.deltaDecorations(jn.current,[])},Jt=et.onMouseMove(Ue=>{var Kt,kt,mn;if(Vt(),Ue.target.detail&&((mn=(kt=(Kt=Ue.target)==null?void 0:Kt.element)==null?void 0:kt.className)!=null&&mn.includes("line-numbers"))){let Ut=Ue.target.position.lineNumber;if($t(en.getLineContent(Ut),Ut))return;xt(Ut)}}),rn=et.onMouseLeave(()=>{Vt()});return()=>{bt.dispose(),Ie.dispose(),Jt.dispose(),rn.dispose()}}},[cn.current,Nn,Tt,nt,ln,z]),(0,le.useEffect)(()=>{var Ot;(Ot=cn.current)!=null&&Ot.instance&&ln&&cn.current.instance.setPosition({lineNumber:0,column:0})},[nt]);function sn(){let Ot=cn.current.instance;if(Ot){const et=Ot.getSelection(),en=cn.current.pastePos||{},An=new ze.Range(en.startLineNumber||et.endLineNumber,en.startColumn||et.endColumn,en.endLineNumber||et.endLineNumber,en.endColumn||et.endColumn);setTimeout(()=>{Ot.executeEdits("",[{range:An,text:""}])},300)}}function hn(Ot){(window.navigator.platform.match("Mac")?Ot.metaKey:Ot.ctrlKey)&&Ot.keyCode==83&&(Ot.preventDefault(),Lt())}const Ln=()=>{if(dt&&cn.current.instance){const Ot=cn.current.instance.getContentHeight();Zn(Ot{if(!sr.current)return;const{keyCode:et,ctrlKey:en,metaKey:An,target:In,type:ke}=Ot;return(ke==="paste"||(et===67||et===86)&&(An||en))&&In.nodeName==="TEXTAREA"&&(Pn(),Ot.preventDefault()),!1};function $n(Ot,et){var en=window.URL||window.webkitURL||window,An=new Blob([et]),In=document.createElementNS("http://www.w3.org/1999/xhtml","a");In.href=en.createObjectURL(An),In.download=Ot,Fr(In)}(0,le.useEffect)(()=>{Ln()},[Ln]),(0,le.useEffect)(()=>{En.current&&!Nn&&Promise.all([de.e(8909),de.e(5028)]).then(de.bind(de,71448)).then(Ot=>{try{ze=Ot,cn.current.instance=ze.editor.create(En.current,{value:te,language:Ge(z),theme:ye,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Xt||!1}},ne);const et=cn.current.instance;let In=[...qe.BH._menuItems].find(bt=>bt[0]._debugName=="EditorContext")[1],ke=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Me=(bt,Ie)=>{var xt,Vt;let Jt=bt._first;do Ie.includes((Vt=(xt=Jt.element)==null?void 0:xt.command)==null?void 0:Vt.id)&&bt._remove(Jt);while(Jt=Jt.next)};if(Mt(et,ze),setTimeout(()=>{Ln(),cn.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{$n(tn||"educoder.txt",et.getValue())}})},500),cn.current.subscription=et.onDidChangeModelContent(bt=>{Wr.current?clearTimeout(zr.current):(Ln(),Ht(et.getValue(),bt)),zr.current=setTimeout(()=>{Wr.current=!1},500)}),window.Monaco||He(ze,Ge(z)),yt&&(Me(In,ke),En.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Un),window.removeEventListener("paste",Un),window.addEventListener("keydown",Un),window.addEventListener("paste",Un)),window.Monaco=ze,Ze&&et.onDidBlurEditorWidget(()=>{Ze(et.getValue())}),Yt&&et.onDidFocusEditorText(()=>{yt&&St(),Yt(et.getValue())}),yt){St();try{et.onDidPaste(bt=>{const Ie=et.getSelection(),xt=cn.current.pastePos||{},Vt=new ze.Range(xt.startLineNumber||Ie.endLineNumber,xt.startColumn||Ie.endColumn,xt.endLineNumber||Ie.endLineNumber,xt.endColumn||Ie.endColumn);et.executeEdits("",[{range:bt.range,text:""}])})}catch(bt){}}let Ft=Er();return _t&&typeof _t=="string"&&new ut(_t,et,ze),ir(!0),()=>{const bt=cn.current.instance;bt.dispose();const Ie=bt.getModel();Ie&&Ie.dispose(),cn.current.subscription&&cn.current.subscription.dispose(),Ft.unobserve(En.current)}}catch(et){}})},[]),(0,le.useEffect)(()=>{if(cn.current.instance&&Nn)return document.addEventListener("keydown",hn,!1),()=>{document.removeEventListener("keydown",hn)}},[Lt,Nn]),(0,le.useEffect)(()=>{let Ot=cn.current.instance;if(Ot&&Nn){let et=Ge(z);ze.editor.setModelLanguage(Ot.getModel(),et)}},[z,Nn]),(0,le.useEffect)(()=>{cn.current.instance&&Nn&&ze.editor.setTheme(ye)},[ye,Nn]),(0,le.useEffect)(()=>{let Ot=cn.current.instance;vn.current=se,Ot&&Nn&&(Ot.updateOptions(mt({},se)),setTimeout(()=>{Ot.getModel().updateOptions(mt({},se))},200))},[JSON.stringify(se),Nn]),(0,le.useEffect)(()=>{let Ot=cn.current.instance;Ot&&Nn&&Ot.layout()},[pt,oe,Nn]);const[Pr,lr]=(0,le.useState)(_e(pt)),[Bn,Zn]=(0,le.useState)(_e(oe)),Or=ft(mt({},re),{width:Pr,height:Bn,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:En,style:Or},Dt&&le.createElement(Ne.CopyToClipboard,{text:te,onCopy:()=>tt.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(ct.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function gt({width:Ee="100%",height:lt="100%",original:pt,modified:oe,language:te,options:z={}}){const re=(0,le.useRef)(),[se,ne]=(0,le.useState)(null);function ye(dt){let yt;return re.current&&(yt=new ot.Z(Ht=>{for(let Mt of Ht)(Mt.target.offsetHeight>0||Mt.target.offsetWidth>0)&&dt.layout()}),yt.observe(re.current)),yt}(0,le.useEffect)(()=>(re.current&&Promise.all([de.e(8909),de.e(9404)]).then(de.bind(de,2550)).then(dt=>{ze=dt;const yt=ze.editor.createDiffEditor(re.current,ft(mt({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},z),{wordWrap:!0}));ne(yt);let Ht=ye(yt);return()=>{yt.dispose();const Mt=yt.getModel();Mt&&Mt.dispose(),Ht.unobserve(re.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{se&&se.setModel({original:ze.editor.createModel(pt,te),modified:ze.editor.createModel(oe,te)})},[pt,oe,te,se]);const Ze=_e(Ee),Dt=_e(lt),Lt={width:Ze,height:Dt};return le.createElement("div",{className:"my-diff-editor",ref:re,style:Lt})}},17904:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return ot}});var le=de(59301);function ot(Pe,We){const me=(0,le.useRef)();(0,le.useEffect)(()=>{me.current=Pe}),(0,le.useEffect)(()=>{function ge(){me.current()}if(We!==null){let Re=setInterval(ge,We);return()=>clearInterval(Re)}},[We])}},63276:function(Rt,It,de){"use strict";de.r(It),de.d(It,{default:function(){return Zt}});var le=de(59301),ot=de(2978),Pe=de(6767),We=de(37568),me=de(99571),ge=de(82093),Re=(Be,Ne,Xe)=>new Promise((Le,Oe)=>{var we=Je=>{try{Et(Xe.next(Je))}catch(mt){Oe(mt)}},Fe=Je=>{try{Et(Xe.throw(Je))}catch(mt){Oe(mt)}},Et=Je=>Je.done?Le(Je.value):Promise.resolve(Je.value).then(we,Fe);Et((Xe=Xe.apply(Be,Ne)).next())});function Ve({setIscreate:Be,init:Ne,UpdateItem:Xe}){const[Le,Oe]=(0,le.useState)(""),[we,Fe]=(0,le.useState)("");(0,le.useEffect)(()=>{Xe&&(Oe(Xe&&Xe.name),Fe(Xe&&Xe.description))},[Xe]);function Et(){return Re(this,null,function*(){if(!Le){Pe.ZP.info("\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}if(!we){Pe.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A");return}if(Xe){Je();return}(yield(0,ge.ZP)("/api/hpc_courses.json",{method:"post",body:{name:Le,description:we,container_type:window.location.pathname.split("/")[1]}}))&&(Pe.ZP.info("\u521B\u5EFA\u6210\u529F"),Be(!1),Ne("add"))})}function Je(){return Re(this,null,function*(){(yield(0,ge.ZP)(`/api/hpc_courses/${Xe.id}.json`,{method:"put",body:{name:Le,description:we,container_type:window.location.pathname.split("/")[1]}}))&&(Pe.ZP.info("\u7F16\u8F91\u6210\u529F"),Be(!1),Ne(""))})}return le.createElement("div",null,le.createElement(We.default,{style:{marginBottom:"20px"},placeholder:"\u8BF7\u8F93\u5165\u6807\u9898",value:Le,maxLength:60,addonAfter:String(Le.length)+"/60",onChange:mt=>Oe(mt.target.value)}),le.createElement(ot.Z,{id:"courseContentMD",defaultValue:we,onChange:mt=>Fe(mt)}),le.createElement("div",{className:"clearfix mt30 mb30"},le.createElement(me.ZP,{type:"primary",onClick:()=>Et(),className:"defalutSubmitbtn fl mr20"},"\u63D0\u4EA4"),le.createElement("a",{className:"defalutCancelbtn fl",onClick:()=>Be(!1)},"\u53D6\u6D88")))}var Ce=Ve,fe=de(38394),Qe=(Be,Ne,Xe)=>new Promise((Le,Oe)=>{var we=Je=>{try{Et(Xe.next(Je))}catch(mt){Oe(mt)}},Fe=Je=>{try{Et(Xe.throw(Je))}catch(mt){Oe(mt)}},Et=Je=>Je.done?Le(Je.value):Promise.resolve(Je.value).then(we,Fe);Et((Xe=Xe.apply(Be,Ne)).next())});function ve({CourseItem:Be,userId:Ne,init:Xe,ItemUpdate:Le,setSee:Oe,UserInfo:we}){function Fe(){return Qe(this,null,function*(){(yield(0,ge.ZP)(`/api/hpc_courses/${Be.id}.json`,{method:"delete"}))&&(Pe.ZP.info("\u5220\u9664\u6210\u529F"),Xe("delete"),Oe(!1))})}function Et(){Le(Be)}return le.createElement("div",null,Ne===299635||Ne===301458||we!=null&&we.admin||we!=null&&we.business?le.createElement("div",{style:{textAlign:"right"}},le.createElement(me.ZP,{onClick:()=>Et()},"\u7F16\u8F91"),le.createElement(me.ZP,{onClick:()=>Fe(),style:{marginLeft:"30px"}},"\u5220\u9664")):null,le.createElement("h1",null,Be==null?void 0:Be.name),le.createElement(fe.Z,{value:Be==null?void 0:Be.description}))}var st=ve,He=de(14566),Te=de(90524),Ae=de(76560),De=Object.defineProperty,$e=Object.getOwnPropertySymbols,at=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,ut=(Be,Ne,Xe)=>Ne in Be?De(Be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Xe}):Be[Ne]=Xe,qe=(Be,Ne)=>{for(var Xe in Ne||(Ne={}))at.call(Ne,Xe)&&ut(Be,Xe,Ne[Xe]);if($e)for(var Xe of $e(Ne))ht.call(Ne,Xe)&&ut(Be,Xe,Ne[Xe]);return Be},tt=(Be,Ne,Xe)=>new Promise((Le,Oe)=>{var we=Je=>{try{Et(Xe.next(Je))}catch(mt){Oe(mt)}},Fe=Je=>{try{Et(Xe.throw(Je))}catch(mt){Oe(mt)}},Et=Je=>Je.done?Le(Je.value):Promise.resolve(Je.value).then(we,Fe);Et((Xe=Xe.apply(Be,Ne)).next())});function ct({user:Be,dispatch:Ne}){var Xe,Le,Oe,we,Fe,Et,Je,mt,ft;const[pe,ce]=(0,le.useState)(1),[_e,vt]=(0,le.useState)(100),[it,xe]=(0,le.useState)([]),[Ge,ze]=(0,le.useState)(!1),[St,Ye]=(0,le.useState)(!1),[gt,Ee]=(0,le.useState)(""),[lt,pt]=(0,le.useState)(""),[oe,te]=(0,le.useState)("");let{itemname:z}=(0,Ae.useParams)();const[re,se]=(0,le.useState)("");(0,le.useEffect)(()=>{Ne({type:"globalSetting/headerToggle",payload:!1}),pe&&ne("")},[pe]);function ne(dt){return tt(this,null,function*(){var yt,Ht;const Mt=yield(0,ge.ZP)("/api/hpc_courses.json",{method:"get",params:{page:pe,per_page:_e,container_type:window.location.pathname.split("/")[1]}});if(Mt){let Yt=Mt.data.hpc_courses.length;if(xe(Mt.data.hpc_courses),te(Mt.data.file_url),pt(""),!Yt)return;if(re)if(dt==="delete"){if(Yt===0){Ye(!1);return}Ee(Mt.data.hpc_courses[0]),Ye(!0),se(Mt.data.hpc_courses[0].id)}else dt==="add"?(Ee(Mt.data.hpc_courses[Yt-1]),Ye(!0),se(Mt.data.hpc_courses[Yt-1].id)):(Ee(Mt.data.hpc_courses.filter(jt=>jt.id===re)[0]),Ye(!0),se(re));else if(z){let jt=0;(Ht=(yt=Mt==null?void 0:Mt.data)==null?void 0:yt.hpc_courses)==null||Ht.map((Tt,tn)=>{var Gt;(z==null?void 0:z.toLocaleLowerCase())===((Gt=Tt==null?void 0:Tt.name)==null?void 0:Gt.toLocaleLowerCase())&&(jt=tn)}),Ee(Mt.data.hpc_courses[jt]),Ye(!0),se(Mt.data.hpc_courses[jt].id),(z==null?void 0:z.toLocaleLowerCase())==="resources"&&(Ee(Mt.data.hpc_courses.filter(Tt=>Tt.id===15)[0]),Ye(!0),se(15))}else Ee(Mt.data.hpc_courses[0]),Ye(!0),se(Mt.data.hpc_courses[0].id)}})}function ye(dt){ze(!1),Ye(!0),Ee(dt),se(dt.id)}function Ze(dt){pt(dt),ze(!0),Ye(!1)}function Dt(){pt(""),ze(!0),Ye(!1)}const Lt={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange(dt){const{status:yt}=dt.file;yt==="done"?(Pe.ZP.success(`${dt.file.name} \u6587\u4EF6\u4E0A\u4F20\u6210\u529F`),ne("")):yt==="error"&&Pe.ZP.error(`${dt.file.name} \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25`)},beforeUpload:dt=>{const yt=dt.size/1024/1024<150;return yt||Pe.ZP.info("\u6587\u4EF6\u5927\u5C0F\u5FC5\u987B\u5C0F\u4E8E150MB"),yt}};return le.createElement("div",{style:{marginBottom:"40px"}},le.createElement("div",{className:"bannterdiv",style:{background:`url(${Te.Z.IMG_SERVER+`/${oe}`})`}}),le.createElement("img",{style:{width:"100%"},src:Te.Z.IMG_SERVER+`/${oe}`}),le.createElement("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"}},le.createElement("div",{style:{flex:"1",marginTop:"17px"}},it&&it.map((dt,yt)=>le.createElement("p",{key:yt,onClick:()=>ye(dt),className:re===dt.id?"menuitemselect":"menuitem task-hide"},dt.name)),((Xe=Be==null?void 0:Be.userInfo)==null?void 0:Xe.user_id)===299635||((Le=Be==null?void 0:Be.userInfo)==null?void 0:Le.user_id)===301458||(Oe=Be==null?void 0:Be.userInfo)!=null&&Oe.admin||(we=Be==null?void 0:Be.userInfo)!=null&&we.business?le.createElement("p",{onClick:()=>Dt(),className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"}},le.createElement("span",{style:{fontSize:"16px",marginLeft:"5px"}},"Last updated")):null),le.createElement("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"}},Ge?le.createElement(Ce,{UpdateItem:lt,setIscreate:ze,init:ne}):null,St?le.createElement(st,{UserInfo:Be==null?void 0:Be.userInfo,setSee:Ye,userId:(Fe=Be==null?void 0:Be.userInfo)==null?void 0:Fe.user_id,ItemUpdate:Ze,CourseItem:gt,init:ne}):null)),((Et=Be==null?void 0:Be.userInfo)==null?void 0:Et.user_id)===299635||((Je=Be==null?void 0:Be.userInfo)==null?void 0:Je.user_id)===301458||(mt=Be==null?void 0:Be.userInfo)!=null&&mt.admin||(ft=Be==null?void 0:Be.userInfo)!=null&&ft.business?le.createElement(He.default,qe({},Lt),le.createElement(me.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"}},"\u4E0A\u4F20\u9996\u9875\u56FE\u7247")):null)}var Zt=(0,Ae.connect)(({user:Be})=>({user:Be}))(ct)},90290:function(Rt,It,de){"use strict";de.d(It,{AL:function(){return ut},Iy:function(){return Qe},Qv:function(){return He},ez:function(){return ht},jb:function(){return ve}});var le=de(32834),ot=de.n(le),Pe=de(11690),We=de.n(Pe);let me=1;function ge(Be,Ne){const Xe=Be.match(/^(\s+)(?:```)/);if(Xe===null)return Ne;const Le=Xe[1];return Ne.split(` `).map(Oe=>{const we=Oe.match(/^\s+/);if(we===null)return Oe;const[Fe]=we;return Fe.length>=Le.length?Oe.slice(Le.length):Oe}).join(` `)}let Re=[],Ve=["
    "];const Ce=new(ot()).Renderer,fe=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Qe(){Re.length=0,Ve=["
      "]}const ve={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function st(Be,Ne,Xe,Le){if(Ne>=Be.length||Be[Ne].level<=Xe)return Ne;var Oe=Be[Ne];Le.push("
    • "+Oe.text+""),Ne++;var we=[];return Ne=st(Be,Ne,Oe.level,we),we.length>0&&(Le.push("
        "),we.forEach(function(Fe){Le.push(Fe)}),Le.push("
      ")),Le.push("
    • "),Ne=st(Be,Ne,Xe,Le),Ne}function He(){return st(Re,0,0,Ve),Ve.push("
    "),Ve.join("")}const Te={heading(Be){const Ne=fe.exec(Be);if(me+=1,Ne)return{type:"heading",raw:Ne[0],depth:Ne[1].length,text:Ne[2]}},fences(Be){const Ne=this.rules.block.fences.exec(Be);if(Ne){const Xe=Ne[0];let Le=ge(Xe,Ne[3]||"");const Oe=Ne[2]?Ne[2].trim():Ne[2];if(["latex","katex","math"].indexOf(Oe)>=0){const we=$e(),Fe=Le;Le=we,at[we]={type:"block",expression:Fe}}return{type:"code",raw:Xe,lang:Oe,text:Le}}}},Ae=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let De=0;const $e=()=>`__special_katext_id_${De++}__`;let at={};function ht(){return at}function ut(){De=0,at={}}function qe(Be){return Be=Be.replace(Ae,(Ne,Xe)=>{const Le=$e();return at[Le]={type:"inline",expression:Xe},Le}),Be}const tt=Ce.listitem;Ce.listitem=function(Be){return tt(qe(Be))};const ct=Ce.paragraph;Ce.paragraph=function(Be){return ct(qe(Be))};const Zt=Ce.tablecell;Ce.tablecell=function(Be,Ne){return Zt(qe(Be),Ne)},Ce.code=function(Be,Ne,Xe){const Le=(Ne||"").match(/\S*/)[0];return Le?["latex","katex","math"].indexOf(Le)>=0?`

    ${Be}

    `:`
    ${Xe?Be:(0,Pe.escape)(Be,!0)}
    `:'
    '+(Xe?Be:(0,Pe.escape)(Be,!0))+"
    "},Ce.heading=function(Be,Ne,Xe){let Le=this.options.headerPrefix+Xe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Re.push({anchor:Le,level:Ne,text:Be}),"'+Be+""},ot().setOptions({silent:!0,gfm:!0,pedantic:!1}),ot().use({tokenizer:Te,renderer:Ce}),It.ZP=ot()},99498:function(Rt,It,de){(function(le){le(de(89780))})(function(le){le.defineOption("placeholder","",function(Ve,Ce,fe){var Qe=fe&&fe!=le.Init;if(Ce&&!Qe)Ve.on("blur",me),Ve.on("change",ge),Ve.on("swapDoc",ge),le.on(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose=function(){We(Ve)}),ge(Ve);else if(!Ce&&Qe){Ve.off("blur",me),Ve.off("change",ge),Ve.off("swapDoc",ge),le.off(Ve.getInputField(),"compositionupdate",Ve.state.placeholderCompose),ot(Ve);var ve=Ve.getWrapperElement();ve.className=ve.className.replace(" CodeMirror-empty","")}Ce&&!Ve.hasFocus()&&me(Ve)});function ot(Ve){Ve.state.placeholder&&(Ve.state.placeholder.parentNode.removeChild(Ve.state.placeholder),Ve.state.placeholder=null)}function Pe(Ve){ot(Ve);var Ce=Ve.state.placeholder=document.createElement("pre");Ce.style.cssText="height: 0; overflow: visible",Ce.style.direction=Ve.getOption("direction"),Ce.className="CodeMirror-placeholder CodeMirror-line-like";var fe=Ve.getOption("placeholder");typeof fe=="string"&&(fe=document.createTextNode(fe)),Ce.appendChild(fe),Ve.display.lineSpace.insertBefore(Ce,Ve.display.lineSpace.firstChild)}function We(Ve){setTimeout(function(){var Ce=!1,fe=Ve.getInputField();fe.nodeName=="TEXTAREA"?Ce=!fe.value:Ve.lineCount()==1&&(Ce=!/[^\u200b]/.test(fe.querySelector(".CodeMirror-line").textContent)),Ce?Pe(Ve):ot(Ve)},20)}function me(Ve){Re(Ve)&&Pe(Ve)}function ge(Ve){var Ce=Ve.getWrapperElement(),fe=Re(Ve);Ce.className=Ce.className.replace(" CodeMirror-empty","")+(fe?" CodeMirror-empty":""),fe?Pe(Ve):ot(Ve)}function Re(Ve){return Ve.lineCount()===1&&Ve.getLine(0)===""}})},25717:function(Rt,It,de){(function(le){le(de(89780))})(function(le){var ot={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Pe=le.Pos;le.defineOption("autoCloseBrackets",!1,function(Te,Ae,De){De&&De!=le.Init&&(Te.removeKeyMap(me),Te.state.closeBrackets=null),Ae&&(ge(We(Ae,"pairs")),Te.state.closeBrackets=Ae,Te.addKeyMap(me))});function We(Te,Ae){return Ae=="pairs"&&typeof Te=="string"?Te:typeof Te=="object"&&Te[Ae]!=null?Te[Ae]:ot[Ae]}var me={Backspace:Ce,Enter:fe};function ge(Te){for(var Ae=0;Ae=0;at--){var ut=$e[at].head;Te.replaceRange("",Pe(ut.line,ut.ch-1),Pe(ut.line,ut.ch+1),"+delete")}}function fe(Te){var Ae=Ve(Te),De=Ae&&We(Ae,"explode");if(!De||Te.getOption("disableInput"))return le.Pass;for(var $e=Te.listSelections(),at=0;at<$e.length;at++){if(!$e[at].empty())return le.Pass;var ht=st(Te,$e[at].head);if(!ht||De.indexOf(ht)%2!=0)return le.Pass}Te.operation(function(){var ut=Te.lineSeparator()||` `;Te.replaceSelection(ut+ut,null),Te.execCommand("goCharLeft"),$e=Te.listSelections();for(var qe=0;qe<$e.length;qe++){var tt=$e[qe].head.line;Te.indentLine(tt,null,!0),Te.indentLine(tt+1,null,!0)}})}function Qe(Te){var Ae=le.cmpPos(Te.anchor,Te.head)>0;return{anchor:new Pe(Te.anchor.line,Te.anchor.ch+(Ae?-1:1)),head:new Pe(Te.head.line,Te.head.ch+(Ae?1:-1))}}function ve(Te,Ae){var De=Ve(Te);if(!De||Te.getOption("disableInput"))return le.Pass;var $e=We(De,"pairs"),at=$e.indexOf(Ae);if(at==-1)return le.Pass;for(var ht=We(De,"closeBefore"),ut=We(De,"triples"),qe=$e.charAt(at+1)==Ae,tt=Te.listSelections(),ct=at%2==0,Zt,Be=0;Be=0&&Te.getRange(Xe,Pe(Xe.line,Xe.ch+3))==Ae+Ae+Ae?Le="skipThree":Le="skip";else if(qe&&Xe.ch>1&&ut.indexOf(Ae)>=0&&Te.getRange(Pe(Xe.line,Xe.ch-2),Xe)==Ae+Ae){if(Xe.ch>2&&/\bstring/.test(Te.getTokenTypeAt(Pe(Xe.line,Xe.ch-2))))return le.Pass;Le="addFour"}else if(qe){var we=Xe.ch==0?" ":Te.getRange(Pe(Xe.line,Xe.ch-1),Xe);if(!le.isWordChar(Oe)&&we!=Ae&&!le.isWordChar(we))Le="both";else return le.Pass}else if(ct&&(Oe.length===0||/\s/.test(Oe)||ht.indexOf(Oe)>-1))Le="both";else return le.Pass;if(!Zt)Zt=Le;else if(Zt!=Le)return le.Pass}var Fe=at%2?$e.charAt(at-1):Ae,Et=at%2?Ae:$e.charAt(at+1);Te.operation(function(){if(Zt=="skip")Te.execCommand("goCharRight");else if(Zt=="skipThree")for(var Je=0;Je<3;Je++)Te.execCommand("goCharRight");else if(Zt=="surround"){for(var mt=Te.getSelections(),Je=0;Je'"]=function(st){return We(st)}),Ce.addKeyMap(ve)}});var ot=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Pe=["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 We(Ce){if(Ce.getOption("disableInput"))return le.Pass;for(var fe=Ce.listSelections(),Qe=[],ve=Ce.getOption("autoCloseTags"),st=0;stHe.ch&&(at=at.slice(0,at.length-Te.end+He.ch));var tt=at.toLowerCase();if(!at||Te.type=="string"&&(Te.end!=He.ch||!/[\"\']/.test(Te.string.charAt(Te.string.length-1))||Te.string.length==1)||Te.type=="tag"&&$e.close||Te.string.indexOf("/")==He.ch-Te.start-1||ut&&Re(ut,tt)>-1||Ve(Ce,Ae.mode.xmlCurrentContext&&Ae.mode.xmlCurrentContext(De)||[],at,He,!0))return le.Pass;var ct=typeof ve=="object"&&ve.emptyTags;if(ct&&Re(ct,at)>-1){Qe[st]={text:"/>",newPos:le.Pos(He.line,He.ch+2)};continue}var Zt=qe&&Re(qe,tt)>-1;Qe[st]={indent:Zt,text:">"+(Zt?` `:"")+"",newPos:Zt?le.Pos(He.line+1,0):le.Pos(He.line,He.ch+1)}}for(var Be=typeof ve=="object"&&ve.dontIndentOnAutoClose,st=fe.length-1;st>=0;st--){var Ne=Qe[st];Ce.replaceRange(Ne.text,fe[st].head,fe[st].anchor,"+insert");var Xe=Ce.listSelections().slice(0);Xe[st]={head:Ne.newPos,anchor:Ne.newPos},Ce.setSelections(Xe),!Be&&Ne.indent&&(Ce.indentLine(Ne.newPos.line,null,!0),Ce.indentLine(Ne.newPos.line+1,null,!0))}}function me(Ce,fe){for(var Qe=Ce.listSelections(),ve=[],st=fe?"/":""&&(ut+=">"),ve[Ae]=ut}if(Ce.replaceSelections(ve),Qe=Ce.listSelections(),!Te)for(var Ae=0;Ae=0&&fe[De]==Qe;De--)++Ae;ve=Te.to;for(var De=1;De=De.max))return De.ch=0,De.text=De.cm.getLine(++De.line),!0}function fe(De){if(!(De.line<=De.min))return De.text=De.cm.getLine(--De.line),De.ch=De.text.length,!0}function Qe(De){for(;;){var $e=De.text.indexOf(">",De.ch);if($e==-1){if(Ce(De))continue;return}if(!Ve(De,$e+1)){De.ch=$e+1;continue}var at=De.text.lastIndexOf("/",$e),ht=at>-1&&!/\S/.test(De.text.slice(at+1,$e));return De.ch=$e+1,ht?"selfClose":"regular"}}function ve(De){for(;;){var $e=De.ch?De.text.lastIndexOf("<",De.ch-1):-1;if($e==-1){if(fe(De))continue;return}if(!Ve(De,$e+1)){De.ch=$e;continue}ge.lastIndex=$e,De.ch=$e;var at=ge.exec(De.text);if(at&&at.index==$e)return at}}function st(De){for(;;){ge.lastIndex=De.ch;var $e=ge.exec(De.text);if(!$e){if(Ce(De))continue;return}if(!Ve(De,$e.index+1)){De.ch=$e.index+1;continue}return De.ch=$e.index+$e[0].length,$e}}function He(De){for(;;){var $e=De.ch?De.text.lastIndexOf(">",De.ch-1):-1;if($e==-1){if(fe(De))continue;return}if(!Ve(De,$e+1)){De.ch=$e;continue}var at=De.text.lastIndexOf("/",$e),ht=at>-1&&!/\S/.test(De.text.slice(at+1,$e));return De.ch=$e+1,ht?"selfClose":"regular"}}function Te(De,$e){for(var at=[];;){var ht=st(De),ut,qe=De.line,tt=De.ch-(ht?ht[0].length:0);if(!ht||!(ut=Qe(De)))return;if(ut!="selfClose")if(ht[1]){for(var ct=at.length-1;ct>=0;--ct)if(at[ct]==ht[2]){at.length=ct;break}if(ct<0&&(!$e||$e==ht[2]))return{tag:ht[2],from:ot(qe,tt),to:ot(De.line,De.ch)}}else at.push(ht[2])}}function Ae(De,$e){for(var at=[];;){var ht=He(De);if(!ht)return;if(ht=="selfClose"){ve(De);continue}var ut=De.line,qe=De.ch,tt=ve(De);if(!tt)return;if(tt[1])at.push(tt[2]);else{for(var ct=at.length-1;ct>=0;--ct)if(at[ct]==tt[2]){at.length=ct;break}if(ct<0&&(!$e||$e==tt[2]))return{tag:tt[2],from:ot(De.line,De.ch),to:ot(ut,qe)}}}}le.registerHelper("fold","xml",function(De,$e){for(var at=new Re(De,$e.line,0);;){var ht=st(at);if(!ht||at.line!=$e.line)return;var ut=Qe(at);if(!ut)return;if(!ht[1]&&ut!="selfClose"){var qe=ot(at.line,at.ch),tt=Te(at,ht[2]);return tt&&Pe(tt.from,qe)>0?{from:qe,to:tt.from}:null}}}),le.findMatchingTag=function(De,$e,at){var ht=new Re(De,$e.line,$e.ch,at);if(!(ht.text.indexOf(">")==-1&&ht.text.indexOf("<")==-1)){var ut=Qe(ht),qe=ut&&ot(ht.line,ht.ch),tt=ut&&ve(ht);if(!(!ut||!tt||Pe(ht,$e)>0)){var ct={from:ot(ht.line,ht.ch),to:qe,tag:tt[2]};return ut=="selfClose"?{open:ct,close:null,at:"open"}:tt[1]?{open:Ae(ht,tt[2]),close:ct,at:"close"}:(ht=new Re(De,qe.line,qe.ch,at),{open:ct,close:Te(ht,tt[2]),at:"open"})}}},le.findEnclosingTag=function(De,$e,at,ht){for(var ut=new Re(De,$e.line,$e.ch,at);;){var qe=Ae(ut,ht);if(!qe)break;var tt=new Re(De,$e.line,$e.ch,at),ct=Te(tt,qe.tag);if(ct)return{open:qe,close:ct}}},le.scanForClosingTag=function(De,$e,at,ht){var ut=new Re(De,$e.line,$e.ch,ht?{from:0,to:ht}:null);return Te(ut,at)}})},89780:function(Rt){(function(It,de){Rt.exports=de()})(this,function(){"use strict";var It=navigator.userAgent,de=navigator.platform,le=/gecko\/\d/i.test(It),ot=/MSIE \d/.test(It),Pe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(It),We=/Edge\/(\d+)/.exec(It),me=ot||Pe||We,ge=me&&(ot?document.documentMode||6:+(We||Pe)[1]),Re=!We&&/WebKit\//.test(It),Ve=Re&&/Qt\/\d+\.\d+/.test(It),Ce=!We&&/Chrome\//.test(It),fe=/Opera\//.test(It),Qe=/Apple Computer/.test(navigator.vendor),ve=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(It),st=/PhantomJS/.test(It),He=!We&&/AppleWebKit/.test(It)&&/Mobile\/\w+/.test(It),Te=/Android/.test(It),Ae=He||Te||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(It),De=He||/Mac/.test(de),$e=/\bCrOS\b/.test(It),at=/win/i.test(de),ht=fe&&It.match(/Version\/(\d*\.\d*)/);ht&&(ht=Number(ht[1])),ht&&ht>=15&&(fe=!1,Re=!0);var ut=De&&(Ve||fe&&(ht==null||ht<12.11)),qe=le||me&&ge>=9;function tt(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ct=function(a,y){var x=a.className,b=tt(y).exec(x);if(b){var E=x.slice(b.index+b[0].length);a.className=x.slice(0,b.index)+(E?b[1]+E:"")}};function Zt(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Be(a,y){return Zt(a).appendChild(y)}function Ne(a,y,x,b){var E=document.createElement(a);if(x&&(E.className=x),b&&(E.style.cssText=b),typeof y=="string")E.appendChild(document.createTextNode(y));else if(y)for(var ee=0;ee=y)return ie+(y-ee);ie+=ae-ee,ie+=x-ie%x,ee=ae+1}}var ce=function(){this.id=null,this.f=null,this.time=0,this.handler=mt(this.onTimeout,this)};ce.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ce.prototype.set=function(a,y){this.f=y;var x=+new Date+a;(!this.id||x=y)return b+Math.min(ie,y-E);if(E+=ee-b,E+=x-E%x,b=ee+1,E>=y)return b}}var Ye=[""];function gt(a){for(;Ye.length<=a;)Ye.push(Ee(Ye)+" ");return Ye[a]}function Ee(a){return a[a.length-1]}function lt(a,y){for(var x=[],b=0;b"\x80"&&(a.toUpperCase()!=a.toLowerCase()||z.test(a))}function se(a,y){return y?y.source.indexOf("\\w")>-1&&re(a)?!0:y.test(a):re(a)}function ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var ye=/[\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 Ze(a){return a.charCodeAt(0)>=768&&ye.test(a)}function Dt(a,y,x){for(;(x<0?y>0:yx?-1:1;;){if(y==x)return y;var E=(y+x)/2,ee=b<0?Math.ceil(E):Math.floor(E);if(ee==y)return a(ee)?y:x;a(ee)?x=ee:y=ee+b}}function dt(a,y,x,b){if(!a)return b(y,x,"ltr",0);for(var E=!1,ee=0;eey||y==x&&ie.to==y)&&(b(Math.max(ie.from,y),Math.min(ie.to,x),ie.level==1?"rtl":"ltr",ee),E=!0)}E||b(y,x,"ltr")}var yt=null;function Ht(a,y,x){var b;yt=null;for(var E=0;Ey)return E;ee.to==y&&(ee.from!=ee.to&&x=="before"?b=E:yt=E),ee.from==y&&(ee.from!=ee.to&&x!="before"?b=E:yt=E)}return b!=null?b:yt}var Mt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function x(he){return he<=247?a.charAt(he):1424<=he&&he<=1524?"R":1536<=he&&he<=1785?y.charAt(he-1536):1774<=he&&he<=2220?"r":8192<=he&&he<=8203?"w":he==8204?"b":"L"}var b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,E=/[stwN]/,ee=/[LRr]/,ie=/[Lb1n]/,ae=/[1n]/;function ue(he,be,Se){this.level=he,this.from=be,this.to=Se}return function(he,be){var Se=be=="ltr"?"L":"R";if(he.length==0||be=="ltr"&&!b.test(he))return!1;for(var Ke=he.length,je=[],Ct=0;Ct-1&&(b[y]=E.slice(0,ee).concat(E.slice(ee+1)))}}}function nn(a,y){var x=tn(a,y);if(x.length)for(var b=Array.prototype.slice.call(arguments,2),E=0;E0}function Xt(a){a.prototype.on=function(y,x){Tt(this,y,x)},a.prototype.off=function(y,x){Gt(this,y,x)}}function on(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function En(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function cn(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function vn(a){on(a),En(a)}function Jn(a){return a.target||a.srcElement}function jn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),De&&a.ctrlKey&&y==1&&(y=3),y}var Wr=function(){if(me&&ge<9)return!1;var a=Ne("div");return"draggable"in a||"dragDrop"in a}(),zr;function yr(a){if(zr==null){var y=Ne("span","\u200B");Be(a,Ne("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(zr=y.offsetWidth<=1&&y.offsetHeight>2&&!(me&&ge<8))}var x=zr?Ne("span","\u200B"):Ne("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return x.setAttribute("cm-text",""),x}var sr;function Nn(a){if(sr!=null)return sr;var y=Be(a,document.createTextNode("A\u062EA")),x=Le(y,0,1).getBoundingClientRect(),b=Le(y,1,2).getBoundingClientRect();return Zt(a),!x||x.left==x.right?!1:sr=b.right-x.right<3}var ir=` b`.split(/\n/).length!=3?function(a){for(var y=0,x=[],b=a.length;y<=b;){var E=a.indexOf(` `,y);E==-1&&(E=a.length);var ee=a.slice(y,a.charAt(E-1)=="\r"?E-1:E),ie=ee.indexOf("\r");ie!=-1?(x.push(ee.slice(0,ie)),y+=ie+1):(x.push(ee),y=E+1)}return x}:function(a){return a.split(/\r\n?|\n/)},Er=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(x){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Pn=function(){var a=Ne("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),qn=null;function $t(a){if(qn!=null)return qn;var y=Be(a,Ne("span","x")),x=y.getBoundingClientRect(),b=Le(y,0,1).getBoundingClientRect();return qn=Math.abs(x.left-b.left)>1}var sn={},hn={};function Ln(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),sn[a]=y}function Fr(a,y){hn[a]=y}function Un(a){if(typeof a=="string"&&hn.hasOwnProperty(a))a=hn[a];else if(a&&typeof a.name=="string"&&hn.hasOwnProperty(a.name)){var y=hn[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 Un("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Un("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function $n(a,y){y=Un(y);var x=sn[y.name];if(!x)return $n(a,"text/plain");var b=x(a,y);if(Pr.hasOwnProperty(y.name)){var E=Pr[y.name];for(var ee in E)E.hasOwnProperty(ee)&&(b.hasOwnProperty(ee)&&(b["_"+ee]=b[ee]),b[ee]=E[ee])}if(b.name=y.name,y.helperType&&(b.helperType=y.helperType),y.modeProps)for(var ie in y.modeProps)b[ie]=y.modeProps[ie];return b}var Pr={};function lr(a,y){var x=Pr.hasOwnProperty(a)?Pr[a]:Pr[a]={};ft(y,x)}function Bn(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var x={};for(var b in y){var E=y[b];E instanceof Array&&(E=E.concat([])),x[b]=E}return x}function Zn(a,y){for(var x;a.innerMode&&(x=a.innerMode(y),!(!x||x.mode==a));)y=x.state,a=x.mode;return x||{mode:a,state:y}}function Or(a,y,x){return a.startState?a.startState(y,x):!0}var Ot=function(a,y,x){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=x};Ot.prototype.eol=function(){return this.pos>=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.posy},Ot.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},Ot.prototype.backUp=function(a){this.pos-=a},Ot.prototype.column=function(){return this.lastColumnPos0?null:(ee&&y!==!1&&(this.pos+=ee[0].length),ee)}},Ot.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ot.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},Ot.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},Ot.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function et(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var x=a;!x.lines;)for(var b=0;;++b){var E=x.children[b],ee=E.chunkSize();if(y=a.first&&yx?Ie(x,et(a,x).text.length):mn(y,et(a,y.line).text.length)}function mn(a,y){var x=a.ch;return x==null||x>y?Ie(a.line,y):x<0?Ie(a.line,0):a}function Ut(a,y){for(var x=[],b=0;bthis.maxLookAhead&&(this.maxLookAhead=a),y},un.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}},un.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},un.fromSaved=function(a,y,x){return y instanceof fn?new un(a,Bn(a.mode,y.state),x,y.lookAhead):new un(a,Bn(a.mode,y),x)},un.prototype.save=function(a){var y=a!==!1?Bn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new fn(y,this.maxLookAhead):y};function xn(a,y,x,b){var E=[a.state.modeGen],ee={};Qn(a,y.text,a.doc.mode,x,function(he,be){return E.push(he,be)},ee,b);for(var ie=x.state,ae=function(he){x.baseTokens=E;var be=a.state.overlays[he],Se=1,Ke=0;x.state=!0,Qn(a,y.text,be.mode,x,function(je,Ct){for(var At=Se;Keje&&E.splice(Se,1,je,E[Se+1],zt),Se+=2,Ke=Math.min(je,zt)}if(Ct)if(be.opaque)E.splice(At,Se-At,je,"overlay "+Ct),Se=At+2;else for(;Ata.options.maxHighlightLength&&Bn(a.doc.mode,b.state),ee=xn(a,y,b);E&&(b.state=E),y.stateAfter=b.save(!E),y.styles=ee.styles,ee.classes?y.styleClasses=ee.classes:y.styleClasses&&(y.styleClasses=null),x===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Wn(a,y,x){var b=a.doc,E=a.display;if(!b.mode.startState)return new un(b,!0,y);var ee=ur(a,y,x),ie=ee>b.first&&et(b,ee-1).stateAfter,ae=ie?un.fromSaved(b,ie,ee):new un(b,Or(b.mode),ee);return b.iter(ee,y,function(ue){Kn(a,ue.text,ae);var he=ae.line;ue.stateAfter=he==y-1||he%5==0||he>=E.viewFrom&&hey.start)return ee}throw new Error("Mode "+a.name+" failed to advance stream.")}var Dn=function(a,y,x){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=x};function mr(a,y,x,b){var E=a.doc,ee=E.mode,ie;y=kt(E,y);var ae=et(E,y.line),ue=Wn(a,y.line,x),he=new Ot(ae.text,a.options.tabSize,ue),be;for(b&&(be=[]);(b||he.posa.options.maxHighlightLength?(ae=!1,ie&&Kn(a,y,b,be.pos),be.pos=y.length,Se=null):Se=Ar(ar(x,be,b.state,Ke),ee),Ke){var je=Ke[0].name;je&&(Se="m-"+(Se?je+" "+Se:je))}if(!ae||he!=Se){for(;ueie;--ae){if(ae<=ee.first)return ee.first;var ue=et(ee,ae-1),he=ue.stateAfter;if(he&&(!x||ae+(he instanceof fn?he.lookAhead:0)<=ee.modeFrontier))return ae;var be=pe(ue.text,null,a.options.tabSize);(E==null||b>be)&&(E=ae-1,b=be)}return E}function wr(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontierx;b--){var E=et(a,b).stateAfter;if(E&&(!(E instanceof fn)||b+E.lookAhead=y:ee.to>y);(b||(b=[])).push(new tr(ie,ee.from,ue?null:ee.to))}}return b}function Hn(a,y,x){var b;if(a)for(var E=0;E=y:ee.to>y);if(ae||ee.from==y&&ie.type=="bookmark"&&(!x||ee.marker.insertLeft)){var ue=ee.from==null||(ie.inclusiveLeft?ee.from<=y:ee.from0&&ae)for(var dn=0;dn0)){var be=[ue,1],Se=xt(he.from,ae.from),Ke=xt(he.to,ae.to);(Se<0||!ie.inclusiveLeft&&!Se)&&be.push({from:he.from,to:ae.from}),(Ke>0||!ie.inclusiveRight&&!Ke)&&be.push({from:ae.to,to:he.to}),E.splice.apply(E,be),ue+=be.length-3}}return E}function br(a){var y=a.markedSpans;if(y){for(var x=0;xy)&&(!b||qr(b,ee.marker)<0)&&(b=ee.marker)}return b}function wt(a,y,x,b,E){var ee=et(a,y),ie=Gn&&ee.markedSpans;if(ie)for(var ae=0;ae=0&&Se<=0||be<=0&&Se>=0)&&(be<=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?xt(he.to,x)>=0:xt(he.to,x)>0)||be>=0&&(ue.marker.inclusiveRight&&E.inclusiveLeft?xt(he.from,b)<=0:xt(he.from,b)<0)))return!0}}}function rt(a){for(var y;y=Mn(a);)a=y.find(-1,!0).line;return a}function Pt(a){for(var y;y=Bt(a);)a=y.find(1,!0).line;return a}function Nt(a){for(var y,x;y=Bt(a);)a=y.find(1,!0).line,(x||(x=[])).push(a);return x}function pn(a,y){var x=et(a,y),b=rt(x);return x==b?y:ke(b)}function bn(a,y){if(y>a.lastLine())return y;var x=et(a,y),b;if(!Fn(a,x))return y;for(;b=Bt(x);)x=b.find(1,!0).line;return ke(x)+1}function Fn(a,y){var x=Gn&&y.markedSpans;if(x){for(var b=void 0,E=0;Ey.maxLineLength&&(y.maxLineLength=E,y.maxLine=b)})}var Rr=function(a,y,x){this.text=a,ri(this,y),this.height=x?x(this):1};Rr.prototype.lineNo=function(){return ke(this)},Xt(Rr);function Li(a,y,x,b){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),br(a),ri(a,x);var E=b?b(a):1;E!=a.height&&In(a,E)}function ii(a){a.parent=null,br(a)}var Gr={},ui={};function gr(a,y){if(!a||/^\s*$/.test(a))return null;var x=y.addModeClass?ui:Gr;return x[a]||(x[a]=a.replace(/\S+/g,"cm-$&"))}function fi(a,y){var x=Xe("span",null,null,Re?"padding-right: .1px":null),b={pre:Xe("pre",[x],"CodeMirror-line"),content:x,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var E=0;E<=(y.rest?y.rest.length:0);E++){var ee=E?y.rest[E-1]:y.line,ie=void 0;b.pos=0,b.addToken=pr,Nn(a.display.measure)&&(ie=Yt(ee,a.doc.direction))&&(b.addToken=pi(b.addToken,ie)),b.map=[];var ae=y!=a.display.externalMeasured&&ke(ee);bi(ee,b,yn(a,ee,ae)),ee.styleClasses&&(ee.styleClasses.bgClass&&(b.bgClass=Et(ee.styleClasses.bgClass,b.bgClass||"")),ee.styleClasses.textClass&&(b.textClass=Et(ee.styleClasses.textClass,b.textClass||""))),b.map.length==0&&b.map.push(0,0,b.content.appendChild(yr(a.display.measure))),E==0?(y.measure.map=b.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(b.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(Re){var ue=b.content.lastChild;(/\bcm-tab\b/.test(ue.className)||ue.querySelector&&ue.querySelector(".cm-tab"))&&(b.content.className="cm-tab-wrap-hack")}return nn(a,"renderLine",a,y.line,b.pre),b.pre.className&&(b.textClass=Et(b.pre.className,b.textClass||"")),b}function Bi(a){var y=Ne("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function pr(a,y,x,b,E,ee,ie){if(y){var ae=a.splitSpaces?yi(y,a.trailingSpace):y,ue=a.cm.state.specialChars,he=!1,be;if(!ue.test(y))a.col+=y.length,be=document.createTextNode(ae),a.map.push(a.pos,a.pos+y.length,be),me&&ge<9&&(he=!0),a.pos+=y.length;else{be=document.createDocumentFragment();for(var Se=0;;){ue.lastIndex=Se;var Ke=ue.exec(y),je=Ke?Ke.index-Se:y.length-Se;if(je){var Ct=document.createTextNode(ae.slice(Se,Se+je));me&&ge<9?be.appendChild(Ne("span",[Ct])):be.appendChild(Ct),a.map.push(a.pos,a.pos+je,Ct),a.col+=je,a.pos+=je}if(!Ke)break;Se+=je+1;var At=void 0;if(Ke[0]==" "){var zt=a.cm.options.tabSize,Qt=zt-a.col%zt;At=be.appendChild(Ne("span",gt(Qt),"cm-tab")),At.setAttribute("role","presentation"),At.setAttribute("cm-text"," "),a.col+=Qt}else Ke[0]=="\r"||Ke[0]==` `?(At=be.appendChild(Ne("span",Ke[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),At.setAttribute("cm-text",Ke[0]),a.col+=1):(At=a.cm.options.specialCharPlaceholder(Ke[0]),At.setAttribute("cm-text",Ke[0]),me&&ge<9?be.appendChild(Ne("span",[At])):be.appendChild(At),a.col+=1);a.map.push(a.pos,a.pos+1,At),a.pos++}}if(a.trailingSpace=ae.charCodeAt(y.length-1)==32,x||b||E||he||ee||ie){var an=x||"";b&&(an+=b),E&&(an+=E);var qt=Ne("span",[be],an,ee);if(ie)for(var dn in ie)ie.hasOwnProperty(dn)&&dn!="style"&&dn!="class"&&qt.setAttribute(dn,ie[dn]);return a.content.appendChild(qt)}a.content.appendChild(be)}}function yi(a,y){if(a.length>1&&!/ /.test(a))return a;for(var x=y,b="",E=0;Ehe&&Se.from<=he));Ke++);if(Se.to>=be)return a(x,b,E,ee,ie,ae,ue);a(x,b.slice(0,Se.to-he),E,ee,null,ae,ue),ee=null,b=b.slice(Se.to-he),he=Se.to}}}function Hi(a,y,x,b){var E=!b&&x.widgetNode;E&&a.map.push(a.pos,a.pos+y,E),!b&&a.cm.display.input.needsContentAttribute&&(E||(E=a.content.appendChild(document.createElement("span"))),E.setAttribute("cm-marker",x.id)),E&&(a.cm.display.input.setUneditable(E),a.content.appendChild(E)),a.pos+=y,a.trailingSpace=!1}function bi(a,y,x){var b=a.markedSpans,E=a.text,ee=0;if(!b){for(var ie=1;ieue||zn.collapsed&&gn.to==ue&&gn.from==ue)){if(gn.to!=null&&gn.to!=ue&&je>gn.to&&(je=gn.to,At=""),zn.className&&(Ct+=" "+zn.className),zn.css&&(Ke=(Ke?Ke+";":"")+zn.css),zn.startStyle&&gn.from==ue&&(zt+=" "+zn.startStyle),zn.endStyle&&gn.to==je&&(dn||(dn=[])).push(zn.endStyle,gn.to),zn.title&&((an||(an={})).title=zn.title),zn.attributes)for(var Tr in zn.attributes)(an||(an={}))[Tr]=zn.attributes[Tr];zn.collapsed&&(!Qt||qr(Qt.marker,zn)<0)&&(Qt=gn)}else gn.from>ue&&je>gn.from&&(je=gn.from)}if(dn)for(var ti=0;ti=ae)break;for(var Ai=Math.min(ae,je);;){if(be){var Si=ue+be.length;if(!Qt){var Yr=Si>Ai?be.slice(0,Ai-ue):be;y.addToken(y,Yr,Se?Se+Ct:Ct,zt,ue+Yr.length==je?At:"",Ke,an)}if(Si>=Ai){be=be.slice(Ai-ue),ue=Ai;break}ue=Si,zt=""}be=E.slice(ee,ee=x[he++]),Se=gr(x[he++],y.cm.options)}}}function _i(a,y,x){this.line=y,this.rest=Nt(y),this.size=this.rest?ke(Ee(this.rest))-x+1:1,this.node=this.text=null,this.hidden=Fn(a,y)}function kr(a,y,x){for(var b=[],E,ee=y;ee2&&ee.push((ue.bottom+he.top)/2-x.top)}}ee.push(x.bottom-x.top)}}function To(a,y,x){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var b=0;bx)return{map:a.measure.maps[E],cache:a.measure.caches[E],before:!0}}function ja(a,y){y=rt(y);var x=ke(y),b=a.display.externalMeasured=new _i(a.doc,y,x);b.lineN=x;var E=b.built=fi(a,b);return b.text=E.pre,Be(a.display.lineMeasure,E.pre),b}function ya(a,y,x,b){return Ni(a,lo(a,y),x,b)}function Qi(a,y){if(y>=a.display.viewFrom&&y=x.lineN&&yy)&&(ee=ue-ae,E=ee-1,y>=ue&&(ie="right")),E!=null){if(b=a[he+2],ae==ue&&x==(b.insertLeft?"left":"right")&&(ie=x),x=="left"&&E==0)for(;he&&a[he-2]==a[he-3]&&a[he-1].insertLeft;)b=a[(he-=3)+2],ie="left";if(x=="right"&&E==ue-ae)for(;he=0&&(x=a[E]).left==x.right;E--);return x}function wa(a,y,x,b){var E=xa(y.map,x,b),ee=E.node,ie=E.start,ae=E.end,ue=E.collapse,he;if(ee.nodeType==3){for(var be=0;be<4;be++){for(;ie&&Ze(y.line.text.charAt(E.coverStart+ie));)--ie;for(;E.coverStart+ae0&&(ue=b="right");var Se;a.options.lineWrapping&&(Se=ee.getClientRects()).length>1?he=Se[b=="right"?Se.length-1:0]:he=ee.getBoundingClientRect()}if(me&&ge<9&&!ie&&(!he||!he.left&&!he.right)){var Ke=ee.parentNode.getClientRects()[0];Ke?he={left:Ke.left,right:Ke.left+Ui(a.display),top:Ke.top,bottom:Ke.bottom}:he=ba}for(var je=he.top-y.rect.top,Ct=he.bottom-y.rect.top,At=(je+Ct)/2,zt=y.view.measure.heights,Qt=0;Qt=b.text.length?(ue=b.text.length,he="before"):ue<=0&&(ue=0,he="after"),!ae)return ie(he=="before"?ue-1:ue,he=="before");function be(Ct,At,zt){var Qt=ae[At],an=Qt.level==1;return ie(zt?Ct-1:Ct,an!=zt)}var Se=Ht(ae,ue,he),Ke=yt,je=be(ue,Se,he=="before");return Ke!=null&&(je.other=be(ue,Ke,he!="before")),je}function Xn(a,y){var x=0;y=kt(a.doc,y),a.options.lineWrapping||(x=Ui(a.display)*y.ch);var b=et(a.doc,y.line),E=_n(b)+jr(a.display);return{left:x,right:x,top:E,bottom:E+b.height}}function Rn(a,y,x,b,E){var ee=Ie(a,y,x);return ee.xRel=E,b&&(ee.outside=b),ee}function ai(a,y,x){var b=a.doc;if(x+=a.display.viewOffset,x<0)return Rn(b.first,0,null,-1,-1);var E=Me(b,x),ee=b.first+b.size-1;if(E>ee)return Rn(b.first+b.size-1,et(b,ee).text.length,null,1,1);y<0&&(y=0);for(var ie=et(b,E);;){var ae=ji(a,ie,E,y,x),ue=Wt(ie,ae.ch+(ae.xRel>0||ae.outside>0?1:0));if(!ue)return ae;var he=ue.find(1);if(he.line==E)return he;ie=et(b,E=he.line)}}function ci(a,y,x,b){b-=Jo(y);var E=y.text.length,ee=Lt(function(ie){return Ni(a,x,ie-1).bottom<=b},E,0);return E=Lt(function(ie){return Ni(a,x,ie).top>b},ee,E),{begin:ee,end:E}}function Ur(a,y,x,b){x||(x=lo(a,y));var E=Po(a,y,Ni(a,x,b),"line").top;return ci(a,y,x,E)}function Jr(a,y,x,b){return a.bottom<=x?!1:a.top>x?!0:(b?a.left:a.right)>y}function ji(a,y,x,b,E){E-=_n(y);var ee=lo(a,y),ie=Jo(y),ae=0,ue=y.text.length,he=!0,be=Yt(y,a.doc.direction);if(be){var Se=(a.options.lineWrapping?ro:Wi)(a,y,x,ee,be,b,E);he=Se.level!=1,ae=he?Se.from:Se.to-1,ue=he?Se.to:Se.from-1}var Ke=null,je=null,Ct=Lt(function(Cn){var gn=Ni(a,ee,Cn);return gn.top+=ie,gn.bottom+=ie,Jr(gn,b,E,!1)?(gn.top<=E&&gn.left<=b&&(Ke=Cn,je=gn),!0):!1},ae,ue),At,zt,Qt=!1;if(je){var an=b-je.left=dn.bottom?1:0}return Ct=Dt(y.text,Ct,1),Rn(x,Ct,zt,Qt,b-At)}function Wi(a,y,x,b,E,ee,ie){var ae=Lt(function(Se){var Ke=E[Se],je=Ke.level!=1;return Jr(xi(a,Ie(x,je?Ke.to:Ke.from,je?"before":"after"),"line",y,b),ee,ie,!0)},0,E.length-1),ue=E[ae];if(ae>0){var he=ue.level!=1,be=xi(a,Ie(x,he?ue.from:ue.to,he?"after":"before"),"line",y,b);Jr(be,ee,ie,!0)&&be.top>ie&&(ue=E[ae-1])}return ue}function ro(a,y,x,b,E,ee,ie){var ae=ci(a,y,b,ie),ue=ae.begin,he=ae.end;/\s/.test(y.text.charAt(he-1))&&he--;for(var be=null,Se=null,Ke=0;Ke=he||je.to<=ue)){var Ct=je.level!=1,At=Ni(a,b,Ct?Math.min(he,je.to)-1:Math.max(ue,je.from)).right,zt=Atzt)&&(be=je,Se=zt)}}return be||(be=E[E.length-1]),be.fromhe&&(be={from:be.from,to:he,level:be.level}),be}var Mi;function Ti(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Mi==null){Mi=Ne("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Mi.appendChild(document.createTextNode("x")),Mi.appendChild(Ne("br"));Mi.appendChild(document.createTextNode("x"))}Be(a.measure,Mi);var x=Mi.offsetHeight/50;return x>3&&(a.cachedTextHeight=x),Zt(a.measure),x||1}function Ui(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Ne("span","xxxxxxxxxx"),x=Ne("pre",[y],"CodeMirror-line-like");Be(a.measure,x);var b=y.getBoundingClientRect(),E=(b.right-b.left)/10;return E>2&&(a.cachedCharWidth=E),E||10}function uo(a){for(var y=a.display,x={},b={},E=y.gutters.clientLeft,ee=y.gutters.firstChild,ie=0;ee;ee=ee.nextSibling,++ie){var ae=a.display.gutterSpecs[ie].className;x[ae]=ee.offsetLeft+ee.clientLeft+E,b[ae]=ee.clientWidth}return{fixedPos:Ka(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:x,gutterWidth:b,wrapperWidth:y.wrapper.clientWidth}}function Ka(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ws(a){var y=Ti(a.display),x=a.options.lineWrapping,b=x&&Math.max(5,a.display.scroller.clientWidth/Ui(a.display)-3);return function(E){if(Fn(a.doc,E))return 0;var ee=0;if(E.widgets)for(var ie=0;ie0&&(he=et(a.doc,ue.line).text).length==ue.ch){var be=pe(he,he.length,a.options.tabSize)-he.length;ue=Ie(ue.line,Math.max(0,Math.round((ee-Xi(a.display).left)/Ui(a.display))-be))}return ue}function Co(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var x=a.display.view,b=0;by)&&(E.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=E.viewTo)Gn&&pn(a.doc,y)E.viewFrom?ho(a):(E.viewFrom+=b,E.viewTo+=b);else if(y<=E.viewFrom&&x>=E.viewTo)ho(a);else if(y<=E.viewFrom){var ee=ka(a,x,x+b,1);ee?(E.view=E.view.slice(ee.index),E.viewFrom=ee.lineN,E.viewTo+=b):ho(a)}else if(x>=E.viewTo){var ie=ka(a,y,y,-1);ie?(E.view=E.view.slice(0,ie.index),E.viewTo=ie.lineN):ho(a)}else{var ae=ka(a,y,y,-1),ue=ka(a,x,x+b,1);ae&&ue?(E.view=E.view.slice(0,ae.index).concat(kr(a,ae.lineN,ue.lineN)).concat(E.view.slice(ue.index)),E.viewTo+=b):ho(a)}var he=E.externalMeasured;he&&(x=E.lineN&&y=b.viewTo)){var ee=b.view[Co(a,y)];if(ee.node!=null){var ie=ee.changes||(ee.changes=[]);_e(ie,x)==-1&&ie.push(x)}}}function ho(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function ka(a,y,x,b){var E=Co(a,y),ee,ie=a.display.view;if(!Gn||x==a.doc.first+a.doc.size)return{index:E,lineN:x};for(var ae=a.display.viewFrom,ue=0;ue0){if(E==ie.length-1)return null;ee=ae+ie[E].size-y,E++}else ee=ae-y;y+=ee,x+=ee}for(;pn(a.doc,x)!=x;){if(E==(b<0?0:ie.length-1))return null;x+=b*ie[E-(b<0?1:0)].size,E+=b}return{index:E,lineN:x}}function Hl(a,y,x){var b=a.display,E=b.view;E.length==0||y>=b.viewTo||x<=b.viewFrom?(b.view=kr(a,y,x),b.viewFrom=y):(b.viewFrom>y?b.view=kr(a,y,b.viewFrom).concat(b.view):b.viewFromx&&(b.view=b.view.slice(0,Co(a,x)))),b.viewTo=x}function Cs(a){for(var y=a.display.view,x=0,b=0;b=a.display.viewTo||ae.to().line0?y.blinker=setInterval(function(){a.hasFocus()||Bo(a),y.cursorDiv.style.visibility=(x=!x)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function Es(a){a.state.focused||(a.display.input.focus(),Ja(a))}function Ls(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Bo(a))},100)}function Ja(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(nn(a,"focus",a,y),a.state.focused=!0,Fe(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),Re&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xa(a))}function Bo(a,y){a.state.delayingBlurEvent||(a.state.focused&&(nn(a,"blur",a,y),a.state.focused=!1,ct(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function La(a){for(var y=a.display,x=y.lineDiv.offsetTop,b=0;b.005||be<-.005)&&(In(E.line,ie),Ds(E.line),E.rest))for(var Se=0;Sea.display.sizerWidth){var Ke=Math.ceil(ae/Ui(a.display));Ke>a.display.maxLineLength&&(a.display.maxLineLength=Ke,a.display.maxLine=E.line,a.display.maxLineChanged=!0)}}}}function Ds(a){if(a.widgets)for(var y=0;y=ie&&(ee=Me(y,_n(et(y,ue))-a.wrapper.clientHeight),ie=ue)}return{from:ee,to:Math.max(ie,ee+1)}}function zl(a,y){if(!nt(a,"scrollCursorIntoView")){var x=a.display,b=x.sizer.getBoundingClientRect(),E=null;if(y.top+b.top<0?E=!0:y.bottom+b.top>(window.innerHeight||document.documentElement.clientHeight)&&(E=!1),E!=null&&!st){var ee=Ne("div","\u200B",null,`position: absolute; top: `+(y.top-x.viewOffset-jr(a.display))+`px; height: `+(y.bottom-y.top+Di(a)+x.barHeight)+`px; left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(ee),ee.scrollIntoView(E),a.display.lineSpace.removeChild(ee)}}}function Zl(a,y,x,b){b==null&&(b=0);var E;!a.options.lineWrapping&&y==x&&(y=y.ch?Ie(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,x=y.sticky=="before"?Ie(y.line,y.ch+1,"before"):y);for(var ee=0;ee<5;ee++){var ie=!1,ae=xi(a,y),ue=!x||x==y?ae:xi(a,x);E={left:Math.min(ae.left,ue.left),top:Math.min(ae.top,ue.top)-b,right:Math.max(ae.left,ue.left),bottom:Math.max(ae.bottom,ue.bottom)+b};var he=Qa(a,E),be=a.doc.scrollTop,Se=a.doc.scrollLeft;if(he.scrollTop!=null&&($o(a,he.scrollTop),Math.abs(a.doc.scrollTop-be)>1&&(ie=!0)),he.scrollLeft!=null&&(So(a,he.scrollLeft),Math.abs(a.doc.scrollLeft-Se)>1&&(ie=!0)),!ie)break}return E}function Gl(a,y){var x=Qa(a,y);x.scrollTop!=null&&$o(a,x.scrollTop),x.scrollLeft!=null&&So(a,x.scrollLeft)}function Qa(a,y){var x=a.display,b=Ti(a.display);y.top<0&&(y.top=0);var E=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:x.scroller.scrollTop,ee=no(a),ie={};y.bottom-y.top>ee&&(y.bottom=y.top+ee);var ae=a.doc.height+Oi(x),ue=y.topae-b;if(y.topE+ee){var be=Math.min(y.top,(he?ae:y.bottom)-ee);be!=E&&(ie.scrollTop=be)}var Se=a.options.fixedGutter?0:x.gutters.offsetWidth,Ke=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:x.scroller.scrollLeft-Se,je=Ji(a)-x.gutters.offsetWidth,Ct=y.right-y.left>je;return Ct&&(y.right=y.left+je),y.left<10?ie.scrollLeft=0:y.leftje+Ke-3&&(ie.scrollLeft=y.right+(Ct?0:10)-je),ie}function qa(a,y){y!=null&&(Ma(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function Ro(a){Ma(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function qo(a,y,x){(y!=null||x!=null)&&Ma(a),y!=null&&(a.curOp.scrollLeft=y),x!=null&&(a.curOp.scrollTop=x)}function jl(a,y){Ma(a),a.curOp.scrollToPos=y}function Ma(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var x=Xn(a,y.from),b=Xn(a,y.to);Ms(a,x,b,y.margin)}}function Ms(a,y,x,b){var E=Qa(a,{left:Math.min(y.left,x.left),top:Math.min(y.top,x.top)-b,right:Math.max(y.right,x.right),bottom:Math.max(y.bottom,x.bottom)+b});qo(a,E.scrollLeft,E.scrollTop)}function $o(a,y){Math.abs(a.doc.scrollTop-y)<2||(le||es(a,{top:y}),Ts(a,y,!0),le&&es(a),na(a,100))}function Ts(a,y,x){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!x)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function So(a,y,x,b){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((x?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!b)&&(a.doc.scrollLeft=y,Fs(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function ea(a){var y=a.display,x=y.gutters.offsetWidth,b=Math.round(a.doc.height+Oi(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?x:0,docHeight:b,scrollHeight:b+Di(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:x}}var ko=function(a,y,x){this.cm=x;var b=this.vert=Ne("div",[Ne("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),E=this.horiz=Ne("div",[Ne("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");b.tabIndex=E.tabIndex=-1,a(b),a(E),Tt(b,"scroll",function(){b.clientHeight&&y(b.scrollTop,"vertical")}),Tt(E,"scroll",function(){E.clientWidth&&y(E.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,me&&ge<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};ko.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,x=a.scrollHeight>a.clientHeight+1,b=a.nativeBarWidth;if(x){this.vert.style.display="block",this.vert.style.bottom=y?b+"px":"0";var E=a.viewHeight-(y?b:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+E)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=x?b+"px":"0",this.horiz.style.left=a.barLeft+"px";var ee=a.viewWidth-a.barLeft-(x?b:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+ee)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(b==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:x?b:0,bottom:y?b:0}},ko.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},ko.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},ko.prototype.zeroWidthHack=function(){var a=De&&!ve?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ce,this.disableVert=new ce},ko.prototype.enableZeroWidthBar=function(a,y,x){a.style.pointerEvents="auto";function b(){var E=a.getBoundingClientRect(),ee=x=="vert"?document.elementFromPoint(E.right-1,(E.top+E.bottom)/2):document.elementFromPoint((E.right+E.left)/2,E.bottom-1);ee!=a?a.style.pointerEvents="none":y.set(1e3,b)}y.set(1e3,b)},ko.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var ta=function(){};ta.prototype.update=function(){return{bottom:0,right:0}},ta.prototype.setScrollLeft=function(){},ta.prototype.setScrollTop=function(){},ta.prototype.clear=function(){};function Fo(a,y){y||(y=ea(a));var x=a.display.barWidth,b=a.display.barHeight;Ps(a,y);for(var E=0;E<4&&x!=a.display.barWidth||b!=a.display.barHeight;E++)x!=a.display.barWidth&&a.options.lineWrapping&&La(a),Ps(a,ea(a)),x=a.display.barWidth,b=a.display.barHeight}function Ps(a,y){var x=a.display,b=x.scrollbars.update(y);x.sizer.style.paddingRight=(x.barWidth=b.right)+"px",x.sizer.style.paddingBottom=(x.barHeight=b.bottom)+"px",x.heightForcer.style.borderBottom=b.bottom+"px solid transparent",b.right&&b.bottom?(x.scrollbarFiller.style.display="block",x.scrollbarFiller.style.height=b.bottom+"px",x.scrollbarFiller.style.width=b.right+"px"):x.scrollbarFiller.style.display="",b.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(x.gutterFiller.style.display="block",x.gutterFiller.style.height=b.bottom+"px",x.gutterFiller.style.width=y.gutterWidth+"px"):x.gutterFiller.style.display=""}var As={native:ko,null:ta};function Bs(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ct(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new As[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),Tt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,x){x=="horizontal"?So(a,y):$o(a,y)},a),a.display.scrollbars.addClass&&Fe(a.display.wrapper,a.display.scrollbars.addClass)}var Ul=0;function Eo(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ul},$i(a.curOp)}function Lo(a){var y=a.curOp;y&&Vo(y,function(x){for(var b=0;b=x.viewTo)||x.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Ta(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function Yl(a){a.updatedDisplay=a.mustUpdate&&$a(a.cm,a.update)}function Xl(a){var y=a.cm,x=y.display;a.updatedDisplay&&La(y),a.barMeasure=ea(y),x.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=ya(y,x.maxLine,x.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(x.scroller.clientWidth,x.sizer.offsetLeft+a.adjustWidthTo+Di(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,x.sizer.offsetLeft+a.adjustWidthTo-Ji(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=x.input.prepareSelection())}function Jl(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft=a.display.viewTo)){var x=+new Date+a.options.workTime,b=Wn(a,y.highlightFrontier),E=[];y.iter(b.line,Math.min(y.first+y.size,a.display.viewTo+500),function(ee){if(b.line>=a.display.viewFrom){var ie=ee.styles,ae=ee.text.length>a.options.maxHighlightLength?Bn(y.mode,b.state):null,ue=xn(a,ee,b,!0);ae&&(b.state=ae),ee.styles=ue.styles;var he=ee.styleClasses,be=ue.classes;be?ee.styleClasses=be:he&&(ee.styleClasses=null);for(var Se=!ie||ie.length!=ee.styles.length||he!=be&&(!he||!be||he.bgClass!=be.bgClass||he.textClass!=be.textClass),Ke=0;!Se&&Kex)return na(a,a.options.workDelay),!0}),y.highlightFrontier=b.line,y.modeFrontier=Math.max(y.modeFrontier,b.line),E.length&&Pi(a,function(){for(var ee=0;ee=x.viewFrom&&y.visible.to<=x.viewTo&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo)&&x.renderedView==x.view&&Cs(a)==0)return!1;Is(a)&&(ho(a),y.dims=uo(a));var E=b.first+b.size,ee=Math.max(y.visible.from-a.options.viewportMargin,b.first),ie=Math.min(E,y.visible.to+a.options.viewportMargin);x.viewFromie&&x.viewTo-ie<20&&(ie=Math.min(E,x.viewTo)),Gn&&(ee=pn(a.doc,ee),ie=bn(a.doc,ie));var ae=ee!=x.viewFrom||ie!=x.viewTo||x.lastWrapHeight!=y.wrapperHeight||x.lastWrapWidth!=y.wrapperWidth;Hl(a,ee,ie),x.viewOffset=_n(et(a.doc,x.viewFrom)),a.display.mover.style.top=x.viewOffset+"px";var ue=Cs(a);if(!ae&&ue==0&&!y.force&&x.renderedView==x.view&&(x.updateLineNumbers==null||x.updateLineNumbers>=x.viewTo))return!1;var he=eu(a);return ue>4&&(x.lineDiv.style.display="none"),nu(a,x.updateLineNumbers,y.dims),ue>4&&(x.lineDiv.style.display=""),x.renderedView=x.view,tu(he),Zt(x.cursorDiv),Zt(x.selectionDiv),x.gutters.style.height=x.sizer.style.minHeight=0,ae&&(x.lastWrapHeight=y.wrapperHeight,x.lastWrapWidth=y.wrapperWidth,na(a,400)),x.updateLineNumbers=null,!0}function Rs(a,y){for(var x=y.viewport,b=!0;;b=!1){if(!b||!a.options.lineWrapping||y.oldDisplayWidth==Ji(a)){if(x&&x.top!=null&&(x={top:Math.min(a.doc.height+Oi(a.display)-no(a),x.top)}),y.visible=Da(a.display,a.doc,x),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else b&&(y.visible=Da(a.display,a.doc,x));if(!$a(a,y))break;La(a);var E=ea(a);Qo(a),Fo(a,E),ns(a,E),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function es(a,y){var x=new Ta(a,y);if($a(a,x)){La(a),Rs(a,x);var b=ea(a);Qo(a),Fo(a,b),ns(a,b),x.finish()}}function nu(a,y,x){var b=a.display,E=a.options.lineNumbers,ee=b.lineDiv,ie=ee.firstChild;function ae(Ct){var At=Ct.nextSibling;return Re&&De&&a.display.currentWheelTarget==Ct?Ct.style.display="none":Ct.parentNode.removeChild(Ct),At}for(var ue=b.view,he=b.viewFrom,be=0;be-1&&(je=!1),ao(a,Se,he,x)),je&&(Zt(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(bt(a.options,he)))),ie=Se.node.nextSibling}he+=Se.size}for(;ie;)ie=ae(ie)}function ts(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ns(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Di(a)+"px"}function Fs(a){var y=a.display,x=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var b=Ka(y)-y.scroller.scrollLeft+a.doc.scrollLeft,E=y.gutters.offsetWidth,ee=b+"px",ie=0;ieie.clientWidth,ue=ie.scrollHeight>ie.clientHeight;if(b&&ae||E&&ue){if(E&&De&&Re){e:for(var he=y.target,be=ee.view;he!=ie;he=he.parentNode)for(var Se=0;Se=0&&xt(a,b.to())<=0)return x}return-1};var vr=function(a,y){this.anchor=a,this.head=y};vr.prototype.from=function(){return Ue(this.anchor,this.head)},vr.prototype.to=function(){return rn(this.anchor,this.head)},vr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Vi(a,y,x){var b=a&&a.options.selectionsMayTouch,E=y[x];y.sort(function(Ke,je){return xt(Ke.from(),je.from())}),x=_e(y,E);for(var ee=1;ee0:ue>=0){var he=Ue(ae.from(),ie.from()),be=rn(ae.to(),ie.to()),Se=ae.empty()?ie.from()==ie.head:ae.from()==ae.head;ee<=x&&--x,y.splice(--ee,2,new vr(Se?be:he,Se?he:be))}}return new Ii(y,x)}function fo(a,y){return new Ii([new vr(a,y||a)],0)}function po(a){return a.text?Ie(a.from.line+a.text.length-1,Ee(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function Hs(a,y){if(xt(a,y.from)<0)return a;if(xt(a,y.to)<=0)return po(y);var x=a.line+y.text.length-(y.to.line-y.from.line)-1,b=a.ch;return a.line==y.to.line&&(b+=po(y).ch-y.to.ch),Ie(x,b)}function is(a,y){for(var x=[],b=0;b1&&a.remove(ae.line+1,Ct-1),a.insert(ae.line+1,Qt)}Hr(a,"change",a,y)}function vo(a,y,x){function b(E,ee,ie){if(E.linked)for(var ae=0;ae1&&!a.done[a.done.length-2].ranges)return a.done.pop(),Ee(a.done)}function Us(a,y,x,b){var E=a.history;E.undone.length=0;var ee=+new Date,ie,ae;if((E.lastOp==b||E.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&E.lastModTime>ee-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(ie=su(E,E.lastOp==b)))ae=Ee(ie.changes),xt(y.from,y.to)==0&&xt(y.from,ae.to)==0?ae.to=po(y):ie.changes.push(ss(a,y));else{var ue=Ee(E.done);for((!ue||!ue.ranges)&&Ba(a.sel,E.done),ie={changes:[ss(a,y)],generation:E.generation},E.done.push(ie);E.done.length>E.undoDepth;)E.done.shift(),E.done[0].ranges||E.done.shift()}E.done.push(x),E.generation=++E.maxGeneration,E.lastModTime=E.lastSelTime=ee,E.lastOp=E.lastSelOp=b,E.lastOrigin=E.lastSelOrigin=y.origin,ae||nn(a,"historyAdded")}function lu(a,y,x,b){var E=y.charAt(0);return E=="*"||E=="+"&&x.ranges.length==b.ranges.length&&x.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function uu(a,y,x,b){var E=a.history,ee=b&&b.origin;x==E.lastSelOp||ee&&E.lastSelOrigin==ee&&(E.lastModTime==E.lastSelTime&&E.lastOrigin==ee||lu(a,ee,Ee(E.done),y))?E.done[E.done.length-1]=y:Ba(y,E.done),E.lastSelTime=+new Date,E.lastSelOrigin=ee,E.lastSelOp=x,b&&b.clearRedo!==!1&&js(E.undone)}function Ba(a,y){var x=Ee(y);x&&x.ranges&&x.equals(a)||y.push(a)}function Vs(a,y,x,b){var E=y["spans_"+a.id],ee=0;a.iter(Math.max(a.first,x),Math.min(a.first+a.size,b),function(ie){ie.markedSpans&&((E||(E=y["spans_"+a.id]={}))[ee]=ie.markedSpans),++ee})}function cu(a){if(!a)return null;for(var y,x=0;x-1&&(Ee(ae)[Se]=he[Se],delete he[Se])}}return b}function ls(a,y,x,b){if(b){var E=a.anchor;if(x){var ee=xt(y,E)<0;ee!=xt(x,E)<0?(E=y,y=x):ee!=xt(y,x)<0&&(y=x)}return new vr(E,y)}else return new vr(x||y,y)}function Ra(a,y,x,b,E){E==null&&(E=a.cm&&(a.cm.display.shift||a.extend)),hi(a,new Ii([ls(a.sel.primary(),y,x,E)],0),b)}function Ys(a,y,x){for(var b=[],E=a.cm&&(a.cm.display.shift||a.extend),ee=0;ee=y.ch:ae.to>y.ch))){if(E&&(nn(ue,"beforeCursorEnter"),ue.explicitlyCleared))if(ee.markedSpans){--ie;continue}else break;if(!ue.atomic)continue;if(x){var Se=ue.find(b<0?1:-1),Ke=void 0;if((b<0?be:he)&&(Se=el(a,Se,-b,Se&&Se.line==y.line?ee:null)),Se&&Se.line==y.line&&(Ke=xt(Se,x))&&(b<0?Ke<0:Ke>0))return Oo(a,Se,y,b,E)}var je=ue.find(b<0?-1:1);return(b<0?he:be)&&(je=el(a,je,b,je.line==y.line?ee:null)),je?Oo(a,je,y,b,E):null}}return y}function Ia(a,y,x,b,E){var ee=b||1,ie=Oo(a,y,x,ee,E)||!E&&Oo(a,y,x,ee,!0)||Oo(a,y,x,-ee,E)||!E&&Oo(a,y,x,-ee,!0);return ie||(a.cantEdit=!0,Ie(a.first,0))}function el(a,y,x,b){return x<0&&y.ch==0?y.line>a.first?kt(a,Ie(y.line-1)):null:x>0&&y.ch==(b||et(a,y.line)).text.length?y.line=0;--E)rl(a,{from:b[E].from,to:b[E].to,text:E?[""]:y.text,origin:y.origin});else rl(a,y)}}function rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&xt(y.from,y.to)==0)){var x=is(a,y);Us(a,y,x,a.cm?a.cm.curOp.id:NaN),oa(a,y,x,nr(a,y));var b=[];vo(a,function(E,ee){!ee&&_e(b,E.history)==-1&&(sl(E.history,y),b.push(E.history)),oa(E,y,null,nr(E,y))})}}function Oa(a,y,x){var b=a.cm&&a.cm.state.suppressEdits;if(!(b&&!x)){for(var E=a.history,ee,ie=a.sel,ae=y=="undo"?E.done:E.undone,ue=y=="undo"?E.undone:E.done,he=0;he=0;--je){var Ct=Ke(je);if(Ct)return Ct.v}}}}function il(a,y){if(y!=0&&(a.first+=y,a.sel=new Ii(lt(a.sel.ranges,function(E){return new vr(Ie(E.anchor.line+y,E.anchor.ch),Ie(E.head.line+y,E.head.ch))}),a.sel.primIndex),a.cm)){wi(a.cm,a.first,a.first-y,y);for(var x=a.cm.display,b=x.viewFrom;ba.lastLine())){if(y.from.lineee&&(y={from:y.from,to:Ie(ee,et(a,ee).text.length),text:[y.text[0]],origin:y.origin}),y.removed=en(a,y.from,y.to),x||(x=is(a,y)),a.cm?fu(a.cm,y,b):as(a,y,b),Fa(a,x,xe),a.cantEdit&&Ia(a,Ie(a.firstLine(),0))&&(a.cantEdit=!1)}}function fu(a,y,x){var b=a.doc,E=a.display,ee=y.from,ie=y.to,ae=!1,ue=ee.line;a.options.lineWrapping||(ue=ke(rt(et(b,ee.line))),b.iter(ue,ie.line+1,function(je){if(je==E.maxLine)return ae=!0,!0})),b.sel.contains(y.from,y.to)>-1&&ln(a),as(b,y,x,ws(a)),a.options.lineWrapping||(b.iter(ue,ee.line+y.text.length,function(je){var Ct=fr(je);Ct>E.maxLineLength&&(E.maxLine=je,E.maxLineLength=Ct,E.maxLineChanged=!0,ae=!1)}),ae&&(a.curOp.updateMaxLine=!0)),wr(b,ee.line),na(a,400);var he=y.text.length-(ie.line-ee.line)-1;y.full?wi(a):ee.line==ie.line&&y.text.length==1&&!zs(a.doc,y)?co(a,ee.line,"text"):wi(a,ee.line,ie.line+1,he);var be=_t(a,"changes"),Se=_t(a,"change");if(Se||be){var Ke={from:ee,to:ie,text:y.text,removed:y.removed,origin:y.origin};Se&&Hr(a,"change",a,Ke),be&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(Ke)}a.display.selForContextMenu=null}function Wo(a,y,x,b,E){var ee;b||(b=x),xt(b,x)<0&&(ee=[b,x],x=ee[0],b=ee[1]),typeof y=="string"&&(y=a.splitLines(y)),No(a,{from:x,to:b,text:y,origin:E})}function ol(a,y,x,b){x1||!(this.children[0]instanceof sa))){var ae=[];this.collapse(ae),this.children=[new sa(ae)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y50){for(var ie=E.lines.length%25+25,ae=ie;ae10);a.parent.maybeSpill()}},iterN:function(a,y,x){for(var b=0;ba.display.maxLineLength&&(a.display.maxLine=he,a.display.maxLineLength=be,a.display.maxLineChanged=!0)}b!=null&&a&&this.collapsed&&wi(a,b,E+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&qs(a.doc)),a&&Hr(a,"markerCleared",a,this,b,E),y&&Lo(a),this.parent&&this.parent.clear()}},mo.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var x,b,E=0;E0||ie==0&&ee.clearWhenEmpty!==!1)return ee;if(ee.replacedWith&&(ee.collapsed=!0,ee.widgetNode=Xe("span",[ee.replacedWith],"CodeMirror-widget"),b.handleMouseEvents||ee.widgetNode.setAttribute("cm-ignore-events","true"),b.insertLeft&&(ee.widgetNode.insertLeft=!0)),ee.collapsed){if(wt(a,y.line,y,x,ee)||y.line!=x.line&&wt(a,x.line,y,x,ee))throw new Error("Inserting collapsed marker partially overlapping an existing one");er()}ee.addToHistory&&Us(a,{from:y,to:x,origin:"markText"},a.sel,NaN);var ae=y.line,ue=a.cm,he;if(a.iter(ae,x.line+1,function(Se){ue&&ee.collapsed&&!ue.options.lineWrapping&&rt(Se)==ue.display.maxLine&&(he=!0),ee.collapsed&&ae!=y.line&&In(Se,0),dr(Se,new tr(ee,ae==y.line?y.ch:null,ae==x.line?x.ch:null)),++ae}),ee.collapsed&&a.iter(y.line,x.line+1,function(Se){Fn(a,Se)&&In(Se,0)}),ee.clearOnEnter&&Tt(ee,"beforeCursorEnter",function(){return ee.clear()}),ee.readOnly&&(Cr(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),ee.collapsed&&(ee.id=++ul,ee.atomic=!0),ue){if(he&&(ue.curOp.updateMaxLine=!0),ee.collapsed)wi(ue,y.line,x.line+1);else if(ee.className||ee.startStyle||ee.endStyle||ee.css||ee.attributes||ee.title)for(var be=y.line;be<=x.line;be++)co(ue,be,"text");ee.atomic&&qs(ue.doc),Hr(ue,"markerAdded",ue,ee)}return ee}var ca=function(a,y){this.markers=a,this.primary=y;for(var x=0;x=0;ue--)No(this,b[ue]);ae?Js(this,ae):this.cm&&Ro(this.cm)}),undo:ei(function(){Oa(this,"undo")}),redo:ei(function(){Oa(this,"redo")}),undoSelection:ei(function(){Oa(this,"undo",!0)}),redoSelection:ei(function(){Oa(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,x=0,b=0;b=a.ch)&&y.push(E.marker.parent||E.marker)}return y},findMarks:function(a,y,x){a=kt(this,a),y=kt(this,y);var b=[],E=a.line;return this.iter(a.line,y.line+1,function(ee){var ie=ee.markedSpans;if(ie)for(var ae=0;ae=ue.to||ue.from==null&&E!=a.line||ue.from!=null&&E==y.line&&ue.from>=y.ch)&&(!x||x(ue.marker))&&b.push(ue.marker.parent||ue.marker)}++E}),b},getAllMarks:function(){var a=[];return this.iter(function(y){var x=y.markedSpans;if(x)for(var b=0;ba)return y=a,!0;a-=ee,++x}),kt(this,Ie(x,y))},indexFromPos:function(a){a=kt(this,a);var y=a.ch;if(a.liney&&(y=a.from),a.to!=null&&a.to-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var be=a.dataTransfer.getData("Text");if(be){var Se;if(y.state.draggingText&&!y.state.draggingText.copy&&(Se=y.listSelections()),Fa(y.doc,fo(x,x)),Se)for(var Ke=0;Ke=0;ae--)Wo(a.doc,"",b[ae].from,b[ae].to,"+delete");Ro(a)})}function cs(a,y,x){var b=Dt(a.text,y+x,x);return b<0||b>a.text.length?null:b}function hs(a,y,x){var b=cs(a,y.ch,x);return b==null?null:new Ie(y.line,b,x<0?"after":"before")}function ds(a,y,x,b,E){if(a){y.doc.direction=="rtl"&&(E=-E);var ee=Yt(x,y.doc.direction);if(ee){var ie=E<0?Ee(ee):ee[0],ae=E<0==(ie.level==1),ue=ae?"after":"before",he;if(ie.level>0||y.doc.direction=="rtl"){var be=lo(y,x);he=E<0?x.text.length-1:0;var Se=Ni(y,be,he).top;he=Lt(function(Ke){return Ni(y,be,Ke).top==Se},E<0==(ie.level==1)?ie.from:ie.to-1,he),ue=="before"&&(he=cs(x,he,1))}else he=E<0?ie.to:ie.from;return new Ie(b,he,ue)}}return new Ie(b,E<0?x.text.length:0,E<0?"before":"after")}function Du(a,y,x,b){var E=Yt(y,a.doc.direction);if(!E)return hs(y,x,b);x.ch>=y.text.length?(x.ch=y.text.length,x.sticky="before"):x.ch<=0&&(x.ch=0,x.sticky="after");var ee=Ht(E,x.ch,x.sticky),ie=E[ee];if(a.doc.direction=="ltr"&&ie.level%2==0&&(b>0?ie.to>x.ch:ie.from=ie.from&&Ke>=be.begin)){var je=Se?"before":"after";return new Ie(x.line,Ke,je)}}var Ct=function(Qt,an,qt){for(var dn=function(Tr,ti){return ti?new Ie(x.line,ae(Tr,1),"before"):new Ie(x.line,Tr,"after")};Qt>=0&&Qt0==(Cn.level!=1),zn=gn?qt.begin:ae(qt.end,-1);if(Cn.from<=zn&&zn0?be.end:ae(be.begin,-1);return zt!=null&&!(b>0&&zt==y.text.length)&&(At=Ct(b>0?0:E.length-1,b,he(zt)),At)?At:null}var fa={selectAll:tl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),xe)},killLine:function(a){return zo(a,function(y){if(y.empty()){var x=et(a.doc,y.head.line).text.length;return y.head.ch==x&&y.head.line0)E=new Ie(E.line,E.ch+1),a.replaceRange(ee.charAt(E.ch-1)+ee.charAt(E.ch-2),Ie(E.line,E.ch-2),E,"+transpose");else if(E.line>a.doc.first){var ie=et(a.doc,E.line-1).text;ie&&(E=new Ie(E.line,1),a.replaceRange(ee.charAt(0)+a.doc.lineSeparator()+ie.charAt(ie.length-1),Ie(E.line-1,ie.length-1),E,"+transpose"))}}x.push(new vr(E,E))}a.setSelections(x)})},newlineAndIndent:function(a){return Pi(a,function(){for(var y=a.listSelections(),x=y.length-1;x>=0;x--)a.replaceRange(a.doc.lineSeparator(),y[x].anchor,y[x].head,"+input");y=a.listSelections();for(var b=0;ba&&xt(y,this.pos)==0&&x==this.button};var va,ma;function Fu(a,y){var x=+new Date;return ma&&ma.compare(x,a,y)?(va=ma=null,"triple"):va&&va.compare(x,a,y)?(ma=new ps(x,a,y),va=null,"double"):(va=new ps(x,a,y),ma=null,"single")}function El(a){var y=this,x=y.display;if(!(nt(y,a)||x.activeTouch&&x.input.supportsTouch())){if(x.input.ensurePolled(),x.shift=a.shiftKey,oi(x,a)){Re||(x.scroller.draggable=!1,setTimeout(function(){return x.scroller.draggable=!0},100));return}if(!vs(y,a)){var b=wo(y,a),E=jn(a),ee=b?Fu(b,E):"single";window.focus(),E==1&&y.state.selectingText&&y.state.selectingText(a),!(b&&Iu(y,E,b,ee,a))&&(E==1?b?Nu(y,b,ee,a):Jn(a)==x.scroller&&on(a):E==2?(b&&Ra(y.doc,b),setTimeout(function(){return x.input.focus()},20)):E==3&&(qe?y.display.input.onContextMenu(a):Ls(y)))}}}function Iu(a,y,x,b,E){var ee="Click";return b=="double"?ee="Double"+ee:b=="triple"&&(ee="Triple"+ee),ee=(y==1?"Left":y==2?"Middle":"Right")+ee,pa(a,ml(ee,E),E,function(ie){if(typeof ie=="string"&&(ie=fa[ie]),!ie)return!1;var ae=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),ae=ie(a,x)!=it}finally{a.state.suppressEdits=!1}return ae})}function Ou(a,y,x){var b=a.getOption("configureMouse"),E=b?b(a,y,x):{};if(E.unit==null){var ee=$e?x.shiftKey&&x.metaKey:x.altKey;E.unit=ee?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(E.extend==null||a.doc.extend)&&(E.extend=a.doc.extend||x.shiftKey),E.addNew==null&&(E.addNew=De?x.metaKey:x.ctrlKey),E.moveOnDrag==null&&(E.moveOnDrag=!(De?x.altKey:x.ctrlKey)),E}function Nu(a,y,x,b){me?setTimeout(mt(Es,a),0):a.curOp.focus=we();var E=Ou(a,x,b),ee=a.doc.sel,ie;a.options.dragDrop&&Wr&&!a.isReadOnly()&&x=="single"&&(ie=ee.contains(y))>-1&&(xt((ie=ee.ranges[ie]).from(),y)<0||y.xRel>0)&&(xt(ie.to(),y)>0||y.xRel<0)?Wu(a,b,y,E):Hu(a,b,y,E)}function Wu(a,y,x,b){var E=a.display,ee=!1,ie=$r(a,function(he){Re&&(E.scroller.draggable=!1),a.state.draggingText=!1,Gt(E.wrapper.ownerDocument,"mouseup",ie),Gt(E.wrapper.ownerDocument,"mousemove",ae),Gt(E.scroller,"dragstart",ue),Gt(E.scroller,"drop",ie),ee||(on(he),b.addNew||Ra(a.doc,x,null,null,b.extend),Re&&!Qe||me&&ge==9?setTimeout(function(){E.wrapper.ownerDocument.body.focus({preventScroll:!0}),E.input.focus()},20):E.input.focus())}),ae=function(he){ee=ee||Math.abs(y.clientX-he.clientX)+Math.abs(y.clientY-he.clientY)>=10},ue=function(){return ee=!0};Re&&(E.scroller.draggable=!0),a.state.draggingText=ie,ie.copy=!b.moveOnDrag,E.scroller.dragDrop&&E.scroller.dragDrop(),Tt(E.wrapper.ownerDocument,"mouseup",ie),Tt(E.wrapper.ownerDocument,"mousemove",ae),Tt(E.scroller,"dragstart",ue),Tt(E.scroller,"drop",ie),Ls(a),setTimeout(function(){return E.input.focus()},20)}function Ll(a,y,x){if(x=="char")return new vr(y,y);if(x=="word")return a.findWordAt(y);if(x=="line")return new vr(Ie(y.line,0),kt(a.doc,Ie(y.line+1,0)));var b=x(a,y);return new vr(b.from,b.to)}function Hu(a,y,x,b){var E=a.display,ee=a.doc;on(y);var ie,ae,ue=ee.sel,he=ue.ranges;if(b.addNew&&!b.extend?(ae=ee.sel.contains(x),ae>-1?ie=he[ae]:ie=new vr(x,x)):(ie=ee.sel.primary(),ae=ee.sel.primIndex),b.unit=="rectangle")b.addNew||(ie=new vr(x,x)),x=wo(a,y,!0,!0),ae=-1;else{var be=Ll(a,x,b.unit);b.extend?ie=ls(ie,be.anchor,be.head,b.extend):ie=be}b.addNew?ae==-1?(ae=he.length,hi(ee,Vi(a,he.concat([ie]),ae),{scroll:!1,origin:"*mouse"})):he.length>1&&he[ae].empty()&&b.unit=="char"&&!b.extend?(hi(ee,Vi(a,he.slice(0,ae).concat(he.slice(ae+1)),0),{scroll:!1,origin:"*mouse"}),ue=ee.sel):us(ee,ae,ie,Ge):(ae=0,hi(ee,new Ii([ie],0),Ge),ue=ee.sel);var Se=x;function Ke(qt){if(xt(Se,qt)!=0)if(Se=qt,b.unit=="rectangle"){for(var dn=[],Cn=a.options.tabSize,gn=pe(et(ee,x.line).text,x.ch,Cn),zn=pe(et(ee,qt.line).text,qt.ch,Cn),Tr=Math.min(gn,zn),ti=Math.max(gn,zn),Nr=Math.min(x.line,qt.line),Ai=Math.min(a.lastLine(),Math.max(x.line,qt.line));Nr<=Ai;Nr++){var Si=et(ee,Nr).text,Yr=St(Si,Tr,Cn);Tr==ti?dn.push(new vr(Ie(Nr,Yr),Ie(Nr,Yr))):Si.length>Yr&&dn.push(new vr(Ie(Nr,Yr),Ie(Nr,St(Si,ti,Cn))))}dn.length||dn.push(new vr(x,x)),hi(ee,Vi(a,ue.ranges.slice(0,ae).concat(dn),ae),{origin:"*mouse",scroll:!1}),a.scrollIntoView(qt)}else{var ki=ie,si=Ll(a,qt,b.unit),Qr=ki.anchor,Xr;xt(si.anchor,Qr)>0?(Xr=si.head,Qr=Ue(ki.from(),si.anchor)):(Xr=si.anchor,Qr=rn(ki.to(),si.head));var _r=ue.ranges.slice(0);_r[ae]=_u(a,new vr(kt(ee,Qr),Xr)),hi(ee,Vi(a,_r,ae),Ge)}}var je=E.wrapper.getBoundingClientRect(),Ct=0;function At(qt){var dn=++Ct,Cn=wo(a,qt,!0,b.unit=="rectangle");if(Cn)if(xt(Cn,Se)!=0){a.curOp.focus=we(),Ke(Cn);var gn=Da(E,ee);(Cn.line>=gn.to||Cn.lineje.bottom?20:0;zn&&setTimeout($r(a,function(){Ct==dn&&(E.scroller.scrollTop+=zn,At(qt))}),50)}}function zt(qt){a.state.selectingText=!1,Ct=1/0,qt&&(on(qt),E.input.focus()),Gt(E.wrapper.ownerDocument,"mousemove",Qt),Gt(E.wrapper.ownerDocument,"mouseup",an),ee.history.lastSelOrigin=null}var Qt=$r(a,function(qt){qt.buttons===0||!jn(qt)?zt(qt):At(qt)}),an=$r(a,zt);a.state.selectingText=an,Tt(E.wrapper.ownerDocument,"mousemove",Qt),Tt(E.wrapper.ownerDocument,"mouseup",an)}function _u(a,y){var x=y.anchor,b=y.head,E=et(a.doc,x.line);if(xt(x,b)==0&&x.sticky==b.sticky)return y;var ee=Yt(E);if(!ee)return y;var ie=Ht(ee,x.ch,x.sticky),ae=ee[ie];if(ae.from!=x.ch&&ae.to!=x.ch)return y;var ue=ie+(ae.from==x.ch==(ae.level!=1)?0:1);if(ue==0||ue==ee.length)return y;var he;if(b.line!=x.line)he=(b.line-x.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var be=Ht(ee,b.ch,b.sticky),Se=be-ie||(b.ch-x.ch)*(ae.level==1?-1:1);be==ue-1||be==ue?he=Se<0:he=Se>0}var Ke=ee[ue+(he?-1:0)],je=he==(Ke.level==1),Ct=je?Ke.from:Ke.to,At=je?"after":"before";return x.ch==Ct&&x.sticky==At?y:new vr(new Ie(x.line,Ct,At),b)}function Dl(a,y,x,b){var E,ee;if(y.touches)E=y.touches[0].clientX,ee=y.touches[0].clientY;else try{E=y.clientX,ee=y.clientY}catch(Ke){return!1}if(E>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;b&&on(y);var ie=a.display,ae=ie.lineDiv.getBoundingClientRect();if(ee>ae.bottom||!_t(a,x))return cn(y);ee-=ae.top-ie.viewOffset;for(var ue=0;ue=E){var be=Me(a.doc,ee),Se=a.display.gutterSpecs[ue];return nn(a,x,a,be,Se.className,y),cn(y)}}}function vs(a,y){return Dl(a,y,"gutterClick",!0)}function Ml(a,y){oi(a.display,y)||zu(a,y)||nt(a,y,"contextmenu")||qe||a.display.input.onContextMenu(y)}function zu(a,y){return _t(a,"gutterContextMenu")?Dl(a,y,"gutterContextMenu",!1):!1}function Tl(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),xo(a)}var Zo={toString:function(){return"CodeMirror.Init"}},Pl={},_a={};function Zu(a){var y=a.optionHandlers;function x(b,E,ee,ie){a.defaults[b]=E,ee&&(y[b]=ie?function(ae,ue,he){he!=Zo&&ee(ae,ue,he)}:ee)}a.defineOption=x,a.Init=Zo,x("value","",function(b,E){return b.setValue(E)},!0),x("mode",null,function(b,E){b.doc.modeOption=E,os(b)},!0),x("indentUnit",2,os,!0),x("indentWithTabs",!1),x("smartIndent",!0),x("tabSize",4,function(b){ia(b),xo(b),wi(b)},!0),x("lineSeparator",null,function(b,E){if(b.doc.lineSep=E,!!E){var ee=[],ie=b.doc.first;b.doc.iter(function(ue){for(var he=0;;){var be=ue.text.indexOf(E,he);if(be==-1)break;he=be+E.length,ee.push(Ie(ie,be))}ie++});for(var ae=ee.length-1;ae>=0;ae--)Wo(b.doc,E,ee[ae],Ie(ee[ae].line,ee[ae].ch+E.length))}}),x("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(b,E,ee){b.state.specialChars=new RegExp(E.source+(E.test(" ")?"":"| "),"g"),ee!=Zo&&b.refresh()}),x("specialCharPlaceholder",Bi,function(b){return b.refresh()},!0),x("electricChars",!0),x("inputStyle",Ae?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),x("spellcheck",!1,function(b,E){return b.getInputField().spellcheck=E},!0),x("autocorrect",!1,function(b,E){return b.getInputField().autocorrect=E},!0),x("autocapitalize",!1,function(b,E){return b.getInputField().autocapitalize=E},!0),x("rtlMoveVisually",!at),x("wholeLineUpdateBefore",!0),x("theme","default",function(b){Tl(b),ra(b)},!0),x("keyMap","default",function(b,E,ee){var ie=Wa(E),ae=ee!=Zo&&Wa(ee);ae&&ae.detach&&ae.detach(b,ie),ie.attach&&ie.attach(b,ae||null)}),x("extraKeys",null),x("configureMouse",null),x("lineWrapping",!1,ju,!0),x("gutters",[],function(b,E){b.display.gutterSpecs=rs(E,b.options.lineNumbers),ra(b)},!0),x("fixedGutter",!0,function(b,E){b.display.gutters.style.left=E?Ka(b.display)+"px":"0",b.refresh()},!0),x("coverGutterNextToScrollbar",!1,function(b){return Fo(b)},!0),x("scrollbarStyle","native",function(b){Bs(b),Fo(b),b.display.scrollbars.setScrollTop(b.doc.scrollTop),b.display.scrollbars.setScrollLeft(b.doc.scrollLeft)},!0),x("lineNumbers",!1,function(b,E){b.display.gutterSpecs=rs(b.options.gutters,E),ra(b)},!0),x("firstLineNumber",1,ra,!0),x("lineNumberFormatter",function(b){return b},ra,!0),x("showCursorWhenSelecting",!1,Qo,!0),x("resetSelectionOnContextMenu",!0),x("lineWiseCopyCut",!0),x("pasteLinesPerSelection",!0),x("selectionsMayTouch",!1),x("readOnly",!1,function(b,E){E=="nocursor"&&(Bo(b),b.display.input.blur()),b.display.input.readOnlyChanged(E)}),x("screenReaderLabel",null,function(b,E){E=E===""?null:E,b.display.input.screenReaderLabelChanged(E)}),x("disableInput",!1,function(b,E){E||b.display.input.reset()},!0),x("dragDrop",!0,Gu),x("allowDropFileTypes",null),x("cursorBlinkRate",530),x("cursorScrollMargin",0),x("cursorHeight",1,Qo,!0),x("singleCursorHeightPerLine",!0,Qo,!0),x("workTime",100),x("workDelay",100),x("flattenSpans",!0,ia,!0),x("addModeClass",!1,ia,!0),x("pollInterval",100),x("undoDepth",200,function(b,E){return b.doc.history.undoDepth=E}),x("historyEventDelay",1250),x("viewportMargin",10,function(b){return b.refresh()},!0),x("maxHighlightLength",1e4,ia,!0),x("moveInputWithCursor",!0,function(b,E){E||b.display.input.resetPosition()}),x("tabindex",null,function(b,E){return b.display.input.getField().tabIndex=E||""}),x("autofocus",null),x("direction","ltr",function(b,E){return b.doc.setDirection(E)},!0),x("phrases",null)}function Gu(a,y,x){var b=x&&x!=Zo;if(!y!=!b){var E=a.display.dragFunctions,ee=y?Tt:Gt;ee(a.display.scroller,"dragstart",E.start),ee(a.display.scroller,"dragenter",E.enter),ee(a.display.scroller,"dragover",E.over),ee(a.display.scroller,"dragleave",E.leave),ee(a.display.scroller,"drop",E.drop)}}function ju(a){a.options.lineWrapping?(Fe(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ct(a.display.wrapper,"CodeMirror-wrap"),rr(a)),Ya(a),wi(a),xo(a),setTimeout(function(){return Fo(a)},100)}function Ir(a,y){var x=this;if(!(this instanceof Ir))return new Ir(a,y);this.options=y=y?ft(y):{},ft(Pl,y,!1);var b=y.value;typeof b=="string"?b=new Ci(b,y.mode,null,y.lineSeparator,y.direction):y.mode&&(b.modeOption=y.mode),this.doc=b;var E=new Ir.inputStyles[y.inputStyle](this),ee=this.display=new ru(a,b,E,y);ee.wrapper.CodeMirror=this,Tl(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Bs(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new ce,keySeq:null,specialChars:null},y.autofocus&&!Ae&&ee.input.focus(),me&&ge<11&&setTimeout(function(){return x.display.input.reset(!0)},20),Uu(this),Cu(),Eo(this),this.curOp.forceUpdate=!0,Zs(this,b),y.autofocus&&!Ae||this.hasFocus()?setTimeout(function(){x.hasFocus()&&!x.state.focused&&Ja(x)},20):Bo(this);for(var ie in _a)_a.hasOwnProperty(ie)&&_a[ie](this,y[ie],Zo);Is(this),y.finishInit&&y.finishInit(this);for(var ae=0;ae20*20}Tt(y.scroller,"touchstart",function(ue){if(!nt(a,ue)&&!ee(ue)&&!vs(a,ue)){y.input.ensurePolled(),clearTimeout(x);var he=+new Date;y.activeTouch={start:he,moved:!1,prev:he-b.end<=300?b:null},ue.touches.length==1&&(y.activeTouch.left=ue.touches[0].pageX,y.activeTouch.top=ue.touches[0].pageY)}}),Tt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),Tt(y.scroller,"touchend",function(ue){var he=y.activeTouch;if(he&&!oi(y,ue)&&he.left!=null&&!he.moved&&new Date-he.start<300){var be=a.coordsChar(y.activeTouch,"page"),Se;!he.prev||ie(he,he.prev)?Se=new vr(be,be):!he.prev.prev||ie(he,he.prev.prev)?Se=a.findWordAt(be):Se=new vr(Ie(be.line,0),kt(a.doc,Ie(be.line+1,0))),a.setSelection(Se.anchor,Se.head),a.focus(),on(ue)}E()}),Tt(y.scroller,"touchcancel",E),Tt(y.scroller,"scroll",function(){y.scroller.clientHeight&&($o(a,y.scroller.scrollTop),So(a,y.scroller.scrollLeft,!0),nn(a,"scroll",a))}),Tt(y.scroller,"mousewheel",function(ue){return Ws(a,ue)}),Tt(y.scroller,"DOMMouseScroll",function(ue){return Ws(a,ue)}),Tt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(ue){nt(a,ue)||vn(ue)},over:function(ue){nt(a,ue)||(wu(a,ue),vn(ue))},start:function(ue){return xu(a,ue)},drop:$r(a,bu),leave:function(ue){nt(a,ue)||dl(a)}};var ae=y.input.getField();Tt(ae,"keyup",function(ue){return Sl.call(a,ue)}),Tt(ae,"keydown",$r(a,Cl)),Tt(ae,"keypress",$r(a,kl)),Tt(ae,"focus",function(ue){return Ja(a,ue)}),Tt(ae,"blur",function(ue){return Bo(a,ue)})}var ms=[];Ir.defineInitHook=function(a){return ms.push(a)};function ga(a,y,x,b){var E=a.doc,ee;x==null&&(x="add"),x=="smart"&&(E.mode.indent?ee=Wn(a,y).state:x="prev");var ie=a.options.tabSize,ae=et(E,y),ue=pe(ae.text,null,ie);ae.stateAfter&&(ae.stateAfter=null);var he=ae.text.match(/^\s*/)[0],be;if(!b&&!/\S/.test(ae.text))be=0,x="not";else if(x=="smart"&&(be=E.mode.indent(ee,ae.text.slice(he.length),ae.text),be==it||be>150)){if(!b)return;x="prev"}x=="prev"?y>E.first?be=pe(et(E,y-1).text,null,ie):be=0:x=="add"?be=ue+a.options.indentUnit:x=="subtract"?be=ue-a.options.indentUnit:typeof x=="number"&&(be=ue+x),be=Math.max(0,be);var Se="",Ke=0;if(a.options.indentWithTabs)for(var je=Math.floor(be/ie);je;--je)Ke+=ie,Se+=" ";if(Keie,ue=ir(y),he=null;if(ae&&b.ranges.length>1)if(Ki&&Ki.text.join(` `)==y){if(b.ranges.length%Ki.text.length==0){he=[];for(var be=0;be=0;Ke--){var je=b.ranges[Ke],Ct=je.from(),At=je.to();je.empty()&&(x&&x>0?Ct=Ie(Ct.line,Ct.ch-x):a.state.overwrite&&!ae?At=Ie(At.line,Math.min(et(ee,At.line).text.length,At.ch+Ee(ue).length)):ae&&Ki&&Ki.lineWise&&Ki.text.join(` `)==ue.join(` `)&&(Ct=At=Ie(Ct.line,0)));var zt={from:Ct,to:At,text:he?he[Ke%he.length]:ue,origin:E||(ae?"paste":a.state.cutIncoming>ie?"cut":"+input")};No(a.doc,zt),Hr(a,"inputRead",a,zt)}y&&!ae&&Bl(a,y),Ro(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Se),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function Al(a,y){var x=a.clipboardData&&a.clipboardData.getData("Text");if(x)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&Pi(y,function(){return gs(y,x,0,null,"paste")}),!0}function Bl(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var x=a.doc.sel,b=x.ranges.length-1;b>=0;b--){var E=x.ranges[b];if(!(E.head.ch>100||b&&x.ranges[b-1].head.line==E.head.line)){var ee=a.getModeAt(E.head),ie=!1;if(ee.electricChars){for(var ae=0;ae-1){ie=ga(a,E.head.line,"smart");break}}else ee.electricInput&&ee.electricInput.test(et(a.doc,E.head.line).text.slice(0,E.head.ch))&&(ie=ga(a,E.head.line,"smart"));ie&&Hr(a,"electricInput",a,E.head.line)}}}function Rl(a){for(var y=[],x=[],b=0;bee&&(ga(this,ae.head.line,b,!0),ee=ae.head.line,ie==this.doc.sel.primIndex&&Ro(this));else{var ue=ae.from(),he=ae.to(),be=Math.max(ee,ue.line);ee=Math.min(this.lastLine(),he.line-(he.ch?0:1))+1;for(var Se=be;Se0&&us(this.doc,ie,new vr(ue,Ke[ie].to()),xe)}}}),getTokenAt:function(b,E){return mr(this,b,E)},getLineTokens:function(b,E){return mr(this,Ie(b),E,!0)},getTokenTypeAt:function(b){b=kt(this.doc,b);var E=yn(this,et(this.doc,b.line)),ee=0,ie=(E.length-1)/2,ae=b.ch,ue;if(ae==0)ue=E[2];else for(;;){var he=ee+ie>>1;if((he?E[he*2-1]:0)>=ae)ie=he;else if(E[he*2+1]ue&&(b=ue,ie=!0),ae=et(this.doc,b)}else ae=b;return Po(this,ae,{top:0,left:0},E||"page",ee||ie).top+(ie?this.doc.height-_n(ae):0)},defaultTextHeight:function(){return Ti(this.display)},defaultCharWidth:function(){return Ui(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(b,E,ee,ie,ae){var ue=this.display;b=xi(this,kt(this.doc,b));var he=b.bottom,be=b.left;if(E.style.position="absolute",E.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(E),ue.sizer.appendChild(E),ie=="over")he=b.top;else if(ie=="above"||ie=="near"){var Se=Math.max(ue.wrapper.clientHeight,this.doc.height),Ke=Math.max(ue.sizer.clientWidth,ue.lineSpace.clientWidth);(ie=="above"||b.bottom+E.offsetHeight>Se)&&b.top>E.offsetHeight?he=b.top-E.offsetHeight:b.bottom+E.offsetHeight<=Se&&(he=b.bottom),be+E.offsetWidth>Ke&&(be=Ke-E.offsetWidth)}E.style.top=he+"px",E.style.left=E.style.right="",ae=="right"?(be=ue.sizer.clientWidth-E.offsetWidth,E.style.right="0px"):(ae=="left"?be=0:ae=="middle"&&(be=(ue.sizer.clientWidth-E.offsetWidth)/2),E.style.left=be+"px"),ee&&Gl(this,{left:be,top:he,right:be+E.offsetWidth,bottom:he+E.offsetHeight})},triggerOnKeyDown:mi(Cl),triggerOnKeyPress:mi(kl),triggerOnKeyUp:Sl,triggerOnMouseDown:mi(El),execCommand:function(b){if(fa.hasOwnProperty(b))return fa[b].call(null,this)},triggerElectric:mi(function(b){Bl(this,b)}),findPosH:function(b,E,ee,ie){var ae=1;E<0&&(ae=-1,E=-E);for(var ue=kt(this.doc,b),he=0;he0&&be(ee.charAt(ie-1));)--ie;for(;ae.5||this.options.lineWrapping)&&Ya(this),nn(this,"refresh",this)}),swapDoc:mi(function(b){var E=this.doc;return E.cm=null,this.state.selectingText&&this.state.selectingText(),Zs(this,b),xo(this),this.display.input.reset(),qo(this,b.scrollLeft,b.scrollTop),this.curOp.forceScroll=!0,Hr(this,"swapDoc",this,E),E}),phrase:function(b){var E=this.options.phrases;return E&&Object.prototype.hasOwnProperty.call(E,b)?E[b]:b},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Xt(a),a.registerHelper=function(b,E,ee){x.hasOwnProperty(b)||(x[b]=a[b]={_global:[]}),x[b][E]=ee},a.registerGlobalHelper=function(b,E,ee,ie){a.registerHelper(b,E,ie),x[b]._global.push({pred:ee,val:ie})}}function ys(a,y,x,b,E){var ee=y,ie=x,ae=et(a,y.line),ue=E&&a.direction=="rtl"?-x:x;function he(){var an=y.line+ue;return an=a.first+a.size?!1:(y=new Ie(an,y.ch,y.sticky),ae=et(a,an))}function be(an){var qt;if(b=="codepoint"){var dn=ae.text.charCodeAt(y.ch+(b>0?0:-1));isNaN(dn)?qt=null:qt=new Ie(y.line,Math.max(0,Math.min(ae.text.length,y.ch+x*(dn>=55296&&dn<56320?2:1))),-x)}else E?qt=Du(a.cm,ae,y,x):qt=hs(ae,y,x);if(qt==null)if(!an&&he())y=ds(E,a.cm,ae,y.line,ue);else return!1;else y=qt;return!0}if(b=="char"||b=="codepoint")be();else if(b=="column")be(!0);else if(b=="word"||b=="group")for(var Se=null,Ke=b=="group",je=a.cm&&a.cm.getHelper(y,"wordChars"),Ct=!0;!(x<0&&!be(!Ct));Ct=!1){var At=ae.text.charAt(y.ch)||` `,zt=se(At,je)?"w":Ke&&At==` `?"n":!Ke||/\s/.test(At)?null:"p";if(Ke&&!Ct&&!zt&&(zt="s"),Se&&Se!=zt){x<0&&(x=1,be(),y.sticky="after");break}if(zt&&(Se=zt),x>0&&!be(!Ct))break}var Qt=Ia(a,y,ee,ie,!0);return Vt(ee,Qt)&&(Qt.hitSide=!0),Qt}function Ol(a,y,x,b){var E=a.doc,ee=y.left,ie;if(b=="page"){var ae=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),ue=Math.max(ae-.5*Ti(a.display),3);ie=(x>0?y.bottom:y.top)+x*ue}else b=="line"&&(ie=x>0?y.bottom+3:y.top-3);for(var he;he=ai(a,ee,ie),!!he.outside;){if(x<0?ie<=0:ie>=E.height){he.hitSide=!0;break}ie+=x*5}return he}var xr=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ce,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};xr.prototype.init=function(a){var y=this,x=this,b=x.cm,E=x.div=a.lineDiv;Fl(E,b.options.spellcheck,b.options.autocorrect,b.options.autocapitalize);function ee(ae){for(var ue=ae.target;ue;ue=ue.parentNode){if(ue==E)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(ue.className))break}return!1}Tt(E,"paste",function(ae){!ee(ae)||nt(b,ae)||Al(ae,b)||ge<=11&&setTimeout($r(b,function(){return y.updateFromDOM()}),20)}),Tt(E,"compositionstart",function(ae){y.composing={data:ae.data,done:!1}}),Tt(E,"compositionupdate",function(ae){y.composing||(y.composing={data:ae.data,done:!1})}),Tt(E,"compositionend",function(ae){y.composing&&(ae.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),Tt(E,"touchstart",function(){return x.forceCompositionEnd()}),Tt(E,"input",function(){y.composing||y.readFromDOMSoon()});function ie(ae){if(!(!ee(ae)||nt(b,ae))){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()}),ae.type=="cut"&&b.replaceSelection("",null,"cut");else if(b.options.lineWiseCopyCut){var ue=Rl(b);za({lineWise:!0,text:ue.text}),ae.type=="cut"&&b.operation(function(){b.setSelections(ue.ranges,0,xe),b.replaceSelection("",null,"cut")})}else return;if(ae.clipboardData){ae.clipboardData.clearData();var he=Ki.text.join(` `);if(ae.clipboardData.setData("Text",he),ae.clipboardData.getData("Text")==he){ae.preventDefault();return}}var be=Il(),Se=be.firstChild;b.display.lineSpace.insertBefore(be,b.display.lineSpace.firstChild),Se.value=Ki.text.join(` `);var Ke=document.activeElement;Je(Se),setTimeout(function(){b.display.lineSpace.removeChild(be),Ke.focus(),Ke==E&&x.showPrimarySelection()},50)}}Tt(E,"copy",ie),Tt(E,"cut",ie)},xr.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},xr.prototype.prepareSelection=function(){var a=Ss(this.cm,!1);return a.focus=document.activeElement==this.div,a},xr.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},xr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},xr.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,x=y.doc.sel.primary(),b=x.from(),E=x.to();if(y.display.viewTo==y.display.viewFrom||b.line>=y.display.viewTo||E.line=y.display.viewFrom&&Nl(y,b)||{node:ae[0].measure.map[2],offset:0},he=E.linea.firstLine()&&(b=Ie(b.line-1,et(a.doc,b.line-1).length)),E.ch==et(a.doc,E.line).text.length&&E.liney.viewTo-1)return!1;var ee,ie,ae;b.line==y.viewFrom||(ee=Co(a,b.line))==0?(ie=ke(y.view[0].line),ae=y.view[0].node):(ie=ke(y.view[ee].line),ae=y.view[ee-1].node.nextSibling);var ue=Co(a,E.line),he,be;if(ue==y.view.length-1?(he=y.viewTo-1,be=y.lineDiv.lastChild):(he=ke(y.view[ue+1].line)-1,be=y.view[ue+1].node.previousSibling),!ae)return!1;for(var Se=a.doc.splitLines(Yu(a,ae,be,ie,he)),Ke=en(a.doc,Ie(ie,0),Ie(he,et(a.doc,he).text.length));Se.length>1&&Ke.length>1;)if(Ee(Se)==Ee(Ke))Se.pop(),Ke.pop(),he--;else if(Se[0]==Ke[0])Se.shift(),Ke.shift(),ie++;else break;for(var je=0,Ct=0,At=Se[0],zt=Ke[0],Qt=Math.min(At.length,zt.length);jeb.ch&&an.charCodeAt(an.length-Ct-1)==qt.charCodeAt(qt.length-Ct-1);)je--,Ct++;Se[Se.length-1]=an.slice(0,an.length-Ct).replace(/^\u200b+/,""),Se[0]=Se[0].slice(je).replace(/\u200b+$/,"");var Cn=Ie(ie,je),gn=Ie(he,Ke.length?Ee(Ke).length-Ct:0);if(Se.length>1||Se[0]||xt(Cn,gn))return Wo(a.doc,Se,Cn,gn,"+input"),!0},xr.prototype.ensurePolled=function(){this.forceCompositionEnd()},xr.prototype.reset=function(){this.forceCompositionEnd()},xr.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},xr.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))},xr.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&Pi(this.cm,function(){return wi(a.cm)})},xr.prototype.setUneditable=function(a){a.contentEditable="false"},xr.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||$r(this.cm,gs)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},xr.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},xr.prototype.onContextMenu=function(){},xr.prototype.resetPosition=function(){},xr.prototype.needsContentAttribute=!0;function Nl(a,y){var x=Qi(a,y.line);if(!x||x.hidden)return null;var b=et(a.doc,y.line),E=To(x,b,y.line),ee=Yt(b,a.doc.direction),ie="left";if(ee){var ae=Ht(ee,y.ch);ie=ae%2?"right":"left"}var ue=xa(E.map,y.ch,ie);return ue.offset=ue.collapse=="right"?ue.end:ue.start,ue}function Ku(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Go(a,y){return y&&(a.bad=!0),a}function Yu(a,y,x,b,E){var ee="",ie=!1,ae=a.doc.lineSeparator(),ue=!1;function he(je){return function(Ct){return Ct.id==je}}function be(){ie&&(ee+=ae,ue&&(ee+=ae),ie=ue=!1)}function Se(je){je&&(be(),ee+=je)}function Ke(je){if(je.nodeType==1){var Ct=je.getAttribute("cm-text");if(Ct){Se(Ct);return}var At=je.getAttribute("cm-marker"),zt;if(At){var Qt=a.findMarks(Ie(b,0),Ie(E+1,0),he(+At));Qt.length&&(zt=Qt[0].find(0))&&Se(en(a.doc,zt.from,zt.to).join(ae));return}if(je.getAttribute("contenteditable")=="false")return;var an=/^(pre|div|p|li|table|br)$/i.test(je.nodeName);if(!/^br$/i.test(je.nodeName)&&je.textContent.length==0)return;an&&be();for(var qt=0;qt=9&&y.hasSelection&&(y.hasSelection=null),x.poll()}),Tt(E,"paste",function(ie){nt(b,ie)||Al(ie,b)||(b.state.pasteIncoming=+new Date,x.fastPoll())});function ee(ie){if(!nt(b,ie)){if(b.somethingSelected())za({lineWise:!1,text:b.getSelections()});else if(b.options.lineWiseCopyCut){var ae=Rl(b);za({lineWise:!0,text:ae.text}),ie.type=="cut"?b.setSelections(ae.ranges,null,xe):(x.prevInput="",E.value=ae.text.join(` `),Je(E))}else return;ie.type=="cut"&&(b.state.cutIncoming=+new Date)}}Tt(E,"cut",ee),Tt(E,"copy",ee),Tt(a.scroller,"paste",function(ie){if(!(oi(a,ie)||nt(b,ie))){if(!E.dispatchEvent){b.state.pasteIncoming=+new Date,x.focus();return}var ae=new Event("paste");ae.clipboardData=ie.clipboardData,E.dispatchEvent(ae)}}),Tt(a.lineSpace,"selectstart",function(ie){oi(a,ie)||on(ie)}),Tt(E,"compositionstart",function(){var ie=b.getCursor("from");x.composing&&x.composing.range.clear(),x.composing={start:ie,range:b.markText(ie,b.getCursor("to"),{className:"CodeMirror-composing"})}}),Tt(E,"compositionend",function(){x.composing&&(x.poll(),x.composing.range.clear(),x.composing=null)})},Vr.prototype.createField=function(a){this.wrapper=Il(),this.textarea=this.wrapper.firstChild},Vr.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},Vr.prototype.prepareSelection=function(){var a=this.cm,y=a.display,x=a.doc,b=Ss(a);if(a.options.moveInputWithCursor){var E=xi(a,x.sel.primary().head,"div"),ee=y.wrapper.getBoundingClientRect(),ie=y.lineDiv.getBoundingClientRect();b.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,E.top+ie.top-ee.top)),b.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,E.left+ie.left-ee.left))}return b},Vr.prototype.showSelection=function(a){var y=this.cm,x=y.display;Be(x.cursorDiv,a.cursors),Be(x.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},Vr.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var x=y.getSelection();this.textarea.value=x,y.state.focused&&Je(this.textarea),me&&ge>=9&&(this.hasSelection=x)}else a||(this.prevInput=this.textarea.value="",me&&ge>=9&&(this.hasSelection=null))}},Vr.prototype.getField=function(){return this.textarea},Vr.prototype.supportsTouch=function(){return!1},Vr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Ae||we()!=this.textarea))try{this.textarea.focus()}catch(a){}},Vr.prototype.blur=function(){this.textarea.blur()},Vr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Vr.prototype.receivedFocus=function(){this.slowPoll()},Vr.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},Vr.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function x(){var b=y.poll();!b&&!a?(a=!0,y.polling.set(60,x)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,x)},Vr.prototype.poll=function(){var a=this,y=this.cm,x=this.textarea,b=this.prevInput;if(this.contextMenuPending||!y.state.focused||Er(x)&&!b&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var E=x.value;if(E==b&&!y.somethingSelected())return!1;if(me&&ge>=9&&this.hasSelection===E||De&&/[\uf700-\uf7ff]/.test(E))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var ee=E.charCodeAt(0);if(ee==8203&&!b&&(b="\u200B"),ee==8666)return this.reset(),this.cm.execCommand("undo")}for(var ie=0,ae=Math.min(b.length,E.length);ie1e3||E.indexOf(` `)>-1?x.value=a.prevInput="":a.prevInput=E,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Vr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Vr.prototype.onKeyPress=function(){me&&ge>=9&&(this.hasSelection=null),this.fastPoll()},Vr.prototype.onContextMenu=function(a){var y=this,x=y.cm,b=x.display,E=y.textarea;y.contextMenuPending&&y.contextMenuPending();var ee=wo(x,a),ie=b.scroller.scrollTop;if(!ee||fe)return;var ae=x.options.resetSelectionOnContextMenu;ae&&x.doc.sel.contains(ee)==-1&&$r(x,hi)(x.doc,fo(ee),xe);var ue=E.style.cssText,he=y.wrapper.style.cssText,be=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",E.style.cssText=`position: absolute; width: 30px; height: 30px; top: `+(a.clientY-be.top-5)+"px; left: "+(a.clientX-be.left-5)+`px; z-index: 1000; background: `+(me?"rgba(255, 255, 255, .05)":"transparent")+`; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;Re&&(Se=window.scrollY),b.input.focus(),Re&&window.scrollTo(null,Se),b.input.reset(),x.somethingSelected()||(E.value=y.prevInput=" "),y.contextMenuPending=je,b.selForContextMenu=x.doc.sel,clearTimeout(b.detectingSelectAll);function Ke(){if(E.selectionStart!=null){var At=x.somethingSelected(),zt="\u200B"+(At?E.value:"");E.value="\u21DA",E.value=zt,y.prevInput=At?"":"\u200B",E.selectionStart=1,E.selectionEnd=zt.length,b.selForContextMenu=x.doc.sel}}function je(){if(y.contextMenuPending==je&&(y.contextMenuPending=!1,y.wrapper.style.cssText=he,E.style.cssText=ue,me&&ge<9&&b.scrollbars.setScrollTop(b.scroller.scrollTop=ie),E.selectionStart!=null)){(!me||me&&ge<9)&&Ke();var At=0,zt=function(){b.selForContextMenu==x.doc.sel&&E.selectionStart==0&&E.selectionEnd>0&&y.prevInput=="\u200B"?$r(x,tl)(x):At++<10?b.detectingSelectAll=setTimeout(zt,500):(b.selForContextMenu=null,b.input.reset())};b.detectingSelectAll=setTimeout(zt,200)}}if(me&&ge>=9&&Ke(),qe){vn(a);var Ct=function(){Gt(window,"mouseup",Ct),setTimeout(je,20)};Tt(window,"mouseup",Ct)}else setTimeout(je,50)},Vr.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},Vr.prototype.setUneditable=function(){},Vr.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?ft(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var x=we();y.autofocus=x==a||a.getAttribute("autofocus")!=null&&x==document.body}function b(){a.value=ae.getValue()}var E;if(a.form&&(Tt(a.form,"submit",b),!y.leaveSubmitMethodAlone)){var ee=a.form;E=ee.submit;try{var ie=ee.submit=function(){b(),ee.submit=E,ee.submit(),ee.submit=ie}}catch(ue){}}y.finishInit=function(ue){ue.save=b,ue.getTextArea=function(){return a},ue.toTextArea=function(){ue.toTextArea=isNaN,b(),a.parentNode.removeChild(ue.getWrapperElement()),a.style.display="",a.form&&(Gt(a.form,"submit",b),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=E))}},a.style.display="none";var ae=Ir(function(ue){return a.parentNode.insertBefore(ue,a.nextSibling)},y);return ae}function Qu(a){a.off=Gt,a.on=Tt,a.wheelEventPixels=iu,a.Doc=Ci,a.splitLines=ir,a.countColumn=pe,a.findColumn=St,a.isWordChar=re,a.Pass=it,a.signal=nn,a.Line=Rr,a.changeEnd=po,a.scrollbarModel=As,a.Pos=Ie,a.cmpPos=xt,a.modes=sn,a.mimeModes=hn,a.resolveMode=Un,a.getMode=$n,a.modeExtensions=Pr,a.extendMode=lr,a.copyState=Bn,a.startState=Or,a.innerMode=Zn,a.commands=fa,a.keyMap=io,a.keyName=gl,a.isModifierKey=vl,a.lookupKey=_o,a.normalizeKeyMap=Lu,a.StringStream=Ot,a.SharedTextMarker=ca,a.TextMarker=mo,a.LineWidget=ua,a.e_preventDefault=on,a.e_stopPropagation=En,a.e_stop=vn,a.addClass=Fe,a.contains=Oe,a.rmClass=ct,a.keyNames=go}Zu(Ir),Vu(Ir);var qu="iter insert remove copy getEditor constructor".split(" ");for(var Ga in Ci.prototype)Ci.prototype.hasOwnProperty(Ga)&&_e(qu,Ga)<0&&(Ir.prototype[Ga]=function(a){return function(){return a.apply(this.doc,arguments)}}(Ci.prototype[Ga]));return Xt(Ci),Ir.inputStyles={textarea:Vr,contenteditable:xr},Ir.defineMode=function(a){!Ir.defaults.mode&&a!="null"&&(Ir.defaults.mode=a),Ln.apply(this,arguments)},Ir.defineMIME=Fr,Ir.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),Ir.defineMIME("text/plain","null"),Ir.defineExtension=function(a,y){Ir.prototype[a]=y},Ir.defineDocExtension=function(a,y){Ci.prototype[a]=y},Ir.fromTextArea=Ju,Qu(Ir),Ir.version="5.58.2",Ir})},25419:function(Rt,It,de){(function(le){le(de(89780),de(15525),de(98101))})(function(le){"use strict";le.defineMode("markdown",function(ot,Pe){var We=le.getMode(ot,"text/html"),me=We.name=="null";function ge(pe){if(le.findModeByName){var ce=le.findModeByName(pe);ce&&(pe=ce.mime||ce.mimes[0])}var _e=le.getMode(ot,pe);return _e.name=="null"?null:_e}Pe.highlightFormatting===void 0&&(Pe.highlightFormatting=!1),Pe.maxBlockquoteDepth===void 0&&(Pe.maxBlockquoteDepth=0),Pe.taskLists===void 0&&(Pe.taskLists=!1),Pe.strikethrough===void 0&&(Pe.strikethrough=!1),Pe.emoji===void 0&&(Pe.emoji=!1),Pe.fencedCodeBlockHighlighting===void 0&&(Pe.fencedCodeBlockHighlighting=!0),Pe.fencedCodeBlockDefaultMode===void 0&&(Pe.fencedCodeBlockDefaultMode="text/plain"),Pe.xml===void 0&&(Pe.xml=!0),Pe.tokenTypeOverrides===void 0&&(Pe.tokenTypeOverrides={});var Re={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Ve in Re)Re.hasOwnProperty(Ve)&&Pe.tokenTypeOverrides[Ve]&&(Re[Ve]=Pe.tokenTypeOverrides[Ve]);var Ce=/^([*\-_])(?:\s*\1){2,}\s*$/,fe=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Qe=/^\[(x| )\](?=\s)/i,ve=Pe.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,st=/^ {0,3}(?:\={1,}|-{2,})\s*$/,He=/^[^#!\[\]*_\\<>` "'(~:]+/,Te=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Ae=/^\s*\[[^\]]+?\]:.*$/,De=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,$e=" ";function at(pe,ce,_e){return ce.f=ce.inline=_e,_e(pe,ce)}function ht(pe,ce,_e){return ce.f=ce.block=_e,_e(pe,ce)}function ut(pe){return!pe||!/\S/.test(pe.string)}function qe(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==ct){var ce=me;if(!ce){var _e=le.innerMode(We,pe.htmlState);ce=_e.mode.name=="xml"&&_e.state.tagStart===null&&!_e.state.context&&_e.state.tokenize.isInText}ce&&(pe.f=Xe,pe.block=tt,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function tt(pe,ce){var _e=pe.column()===ce.indentation,vt=ut(ce.prevLine.stream),it=ce.indentedCode,xe=ce.prevLine.hr,Ge=ce.list!==!1,ze=(ce.listStack[ce.listStack.length-1]||0)+3;ce.indentedCode=!1;var St=ce.indentation;if(ce.indentationDiff===null&&(ce.indentationDiff=ce.indentation,Ge)){for(ce.list=null;St=4&&(it||ce.prevLine.fencedCodeEnd||ce.prevLine.header||vt))return pe.skipToEnd(),ce.indentedCode=!0,Re.code;if(pe.eatSpace())return null;if(_e&&ce.indentation<=ze&&(Ee=pe.match(ve))&&Ee[1].length<=6)return ce.quote=0,ce.header=Ee[1].length,ce.thisLine.header=!0,Pe.highlightFormatting&&(ce.formatting="header"),ce.f=ce.inline,Be(ce);if(ce.indentation<=ze&&pe.eat(">"))return ce.quote=_e?1:ce.quote+1,Pe.highlightFormatting&&(ce.formatting="quote"),pe.eatSpace(),Be(ce);if(!gt&&!ce.setext&&_e&&ce.indentation<=ze&&(Ee=pe.match(fe))){var lt=Ee[1]?"ol":"ul";return ce.indentation=St+pe.current().length,ce.list=!0,ce.quote=0,ce.listStack.push(ce.indentation),ce.em=!1,ce.strong=!1,ce.code=!1,ce.strikethrough=!1,Pe.taskLists&&pe.match(Qe,!1)&&(ce.taskList=!0),ce.f=ce.inline,Pe.highlightFormatting&&(ce.formatting=["list","list-"+lt]),Be(ce)}else{if(_e&&ce.indentation<=ze&&(Ee=pe.match(Te,!0)))return ce.quote=0,ce.fencedEndRE=new RegExp(Ee[1]+"+ *$"),ce.localMode=Pe.fencedCodeBlockHighlighting&&ge(Ee[2]||Pe.fencedCodeBlockDefaultMode),ce.localMode&&(ce.localState=le.startState(ce.localMode)),ce.f=ce.block=Zt,Pe.highlightFormatting&&(ce.formatting="code-block"),ce.code=-1,Be(ce);if(ce.setext||(!Ye||!Ge)&&!ce.quote&&ce.list===!1&&!ce.code&&!gt&&!Ae.test(pe.string)&&(Ee=pe.lookAhead(1))&&(Ee=Ee.match(st)))return ce.setext?(ce.header=ce.setext,ce.setext=0,pe.skipToEnd(),Pe.highlightFormatting&&(ce.formatting="header")):(ce.header=Ee[0].charAt(0)=="="?1:2,ce.setext=ce.header),ce.thisLine.header=!0,ce.f=ce.inline,Be(ce);if(gt)return pe.skipToEnd(),ce.hr=!0,ce.thisLine.hr=!0,Re.hr;if(pe.peek()==="[")return at(pe,ce,Et)}return at(pe,ce,ce.inline)}function ct(pe,ce){var _e=We.token(pe,ce.htmlState);if(!me){var vt=le.innerMode(We,ce.htmlState);(vt.mode.name=="xml"&&vt.state.tagStart===null&&!vt.state.context&&vt.state.tokenize.isInText||ce.md_inside&&pe.current().indexOf(">")>-1)&&(ce.f=Xe,ce.block=tt,ce.htmlState=null)}return _e}function Zt(pe,ce){var _e=ce.listStack[ce.listStack.length-1]||0,vt=ce.indentation<_e,it=_e+3;if(ce.fencedEndRE&&ce.indentation<=it&&(vt||pe.match(ce.fencedEndRE))){Pe.highlightFormatting&&(ce.formatting="code-block");var xe;return vt||(xe=Be(ce)),ce.localMode=ce.localState=null,ce.block=tt,ce.f=Xe,ce.fencedEndRE=null,ce.code=0,ce.thisLine.fencedCodeEnd=!0,vt?ht(pe,ce,ce.block):xe}else return ce.localMode?ce.localMode.token(pe,ce.localState):(pe.skipToEnd(),Re.code)}function Be(pe){var ce=[];if(pe.formatting){ce.push(Re.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var _e=0;_e=pe.quote?ce.push(Re.formatting+"-"+pe.formatting[_e]+"-"+pe.quote):ce.push("error"))}if(pe.taskOpen)return ce.push("meta"),ce.length?ce.join(" "):null;if(pe.taskClosed)return ce.push("property"),ce.length?ce.join(" "):null;if(pe.linkHref?ce.push(Re.linkHref,"url"):(pe.strong&&ce.push(Re.strong),pe.em&&ce.push(Re.em),pe.strikethrough&&ce.push(Re.strikethrough),pe.emoji&&ce.push(Re.emoji),pe.linkText&&ce.push(Re.linkText),pe.code&&ce.push(Re.code),pe.image&&ce.push(Re.image),pe.imageAltText&&ce.push(Re.imageAltText,"link"),pe.imageMarker&&ce.push(Re.imageMarker)),pe.header&&ce.push(Re.header,Re.header+"-"+pe.header),pe.quote&&(ce.push(Re.quote),!Pe.maxBlockquoteDepth||Pe.maxBlockquoteDepth>=pe.quote?ce.push(Re.quote+"-"+pe.quote):ce.push(Re.quote+"-"+Pe.maxBlockquoteDepth)),pe.list!==!1){var vt=(pe.listStack.length-1)%3;vt?vt===1?ce.push(Re.list2):ce.push(Re.list3):ce.push(Re.list1)}return pe.trailingSpaceNewLine?ce.push("trailing-space-new-line"):pe.trailingSpace&&ce.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ce.length?ce.join(" "):null}function Ne(pe,ce){if(pe.match(He,!0))return Be(ce)}function Xe(pe,ce){var _e=ce.text(pe,ce);if(typeof _e!="undefined")return _e;if(ce.list)return ce.list=null,Be(ce);if(ce.taskList){var vt=pe.match(Qe,!0)[1]===" ";return vt?ce.taskOpen=!0:ce.taskClosed=!0,Pe.highlightFormatting&&(ce.formatting="task"),ce.taskList=!1,Be(ce)}if(ce.taskOpen=!1,ce.taskClosed=!1,ce.header&&pe.match(/^#+$/,!0))return Pe.highlightFormatting&&(ce.formatting="header"),Be(ce);var it=pe.next();if(ce.linkTitle){ce.linkTitle=!1;var xe=it;it==="("&&(xe=")"),xe=(xe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Ge="^\\s*(?:[^"+xe+"\\\\]+|\\\\\\\\|\\\\.)"+xe;if(pe.match(new RegExp(Ge),!0))return Re.linkHref}if(it==="`"){var ze=ce.formatting;Pe.highlightFormatting&&(ce.formatting="code"),pe.eatWhile("`");var St=pe.current().length;if(ce.code==0&&(!ce.quote||St==1))return ce.code=St,Be(ce);if(St==ce.code){var Ye=Be(ce);return ce.code=0,Ye}else return ce.formatting=ze,Be(ce)}else if(ce.code)return Be(ce);if(it==="\\"&&(pe.next(),Pe.highlightFormatting)){var gt=Be(ce),Ee=Re.formatting+"-escape";return gt?gt+" "+Ee:Ee}if(it==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ce.imageMarker=!0,ce.image=!0,Pe.highlightFormatting&&(ce.formatting="image"),Be(ce);if(it==="["&&ce.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ce.imageMarker=!1,ce.imageAltText=!0,Pe.highlightFormatting&&(ce.formatting="image"),Be(ce);if(it==="]"&&ce.imageAltText){Pe.highlightFormatting&&(ce.formatting="image");var gt=Be(ce);return ce.imageAltText=!1,ce.image=!1,ce.inline=ce.f=Oe,gt}if(it==="["&&!ce.image)return ce.linkText&&pe.match(/^.*?\]/)||(ce.linkText=!0,Pe.highlightFormatting&&(ce.formatting="link")),Be(ce);if(it==="]"&&ce.linkText){Pe.highlightFormatting&&(ce.formatting="link");var gt=Be(ce);return ce.linkText=!1,ce.inline=ce.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Oe:Xe,gt}if(it==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Le,Pe.highlightFormatting&&(ce.formatting="link");var gt=Be(ce);return gt?gt+=" ":gt="",gt+Re.linkInline}if(it==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ce.f=ce.inline=Le,Pe.highlightFormatting&&(ce.formatting="link");var gt=Be(ce);return gt?gt+=" ":gt="",gt+Re.linkEmail}if(Pe.xml&&it==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var lt=pe.string.indexOf(">",pe.pos);if(lt!=-1){var pt=pe.string.substring(pe.start,lt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(pt)&&(ce.md_inside=!0)}return pe.backUp(1),ce.htmlState=le.startState(We),ht(pe,ce,ct)}if(Pe.xml&&it==="<"&&pe.match(/^\/\w*?>/))return ce.md_inside=!1,"tag";if(it==="*"||it==="_"){for(var oe=1,te=pe.pos==1?" ":pe.string.charAt(pe.pos-2);oe<3&&pe.eat(it);)oe++;var z=pe.peek()||" ",re=!/\s/.test(z)&&(!De.test(z)||/\s/.test(te)||De.test(te)),se=!/\s/.test(te)&&(!De.test(te)||/\s/.test(z)||De.test(z)),ne=null,ye=null;if(oe%2&&(!ce.em&&re&&(it==="*"||!se||De.test(te))?ne=!0:ce.em==it&&se&&(it==="*"||!re||De.test(z))&&(ne=!1)),oe>1&&(!ce.strong&&re&&(it==="*"||!se||De.test(te))?ye=!0:ce.strong==it&&se&&(it==="*"||!re||De.test(z))&&(ye=!1)),ye!=null||ne!=null){Pe.highlightFormatting&&(ce.formatting=ne==null?"strong":ye==null?"em":"strong em"),ne===!0&&(ce.em=it),ye===!0&&(ce.strong=it);var Ye=Be(ce);return ne===!1&&(ce.em=!1),ye===!1&&(ce.strong=!1),Ye}}else if(it===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Be(ce);pe.backUp(1)}if(Pe.strikethrough){if(it==="~"&&pe.eatWhile(it)){if(ce.strikethrough){Pe.highlightFormatting&&(ce.formatting="strikethrough");var Ye=Be(ce);return ce.strikethrough=!1,Ye}else if(pe.match(/^[^\s]/,!1))return ce.strikethrough=!0,Pe.highlightFormatting&&(ce.formatting="strikethrough"),Be(ce)}else if(it===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Be(ce);pe.backUp(2)}}if(Pe.emoji&&it===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ce.emoji=!0,Pe.highlightFormatting&&(ce.formatting="emoji");var Ze=Be(ce);return ce.emoji=!1,Ze}return it===" "&&(pe.match(/^ +$/,!1)?ce.trailingSpace++:ce.trailingSpace&&(ce.trailingSpaceNewLine=!0)),Be(ce)}function Le(pe,ce){var _e=pe.next();if(_e===">"){ce.f=ce.inline=Xe,Pe.highlightFormatting&&(ce.formatting="link");var vt=Be(ce);return vt?vt+=" ":vt="",vt+Re.linkInline}return pe.match(/^[^>]+/,!0),Re.linkInline}function Oe(pe,ce){if(pe.eatSpace())return null;var _e=pe.next();return _e==="("||_e==="["?(ce.f=ce.inline=Fe(_e==="("?")":"]"),Pe.highlightFormatting&&(ce.formatting="link-string"),ce.linkHref=!0,Be(ce)):"error"}var we={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Fe(pe){return function(ce,_e){var vt=ce.next();if(vt===pe){_e.f=_e.inline=Xe,Pe.highlightFormatting&&(_e.formatting="link-string");var it=Be(_e);return _e.linkHref=!1,it}return ce.match(we[pe]),_e.linkHref=!0,Be(_e)}}function Et(pe,ce){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ce.f=Je,pe.next(),Pe.highlightFormatting&&(ce.formatting="link"),ce.linkText=!0,Be(ce)):at(pe,ce,Xe)}function Je(pe,ce){if(pe.match(/^\]:/,!0)){ce.f=ce.inline=mt,Pe.highlightFormatting&&(ce.formatting="link");var _e=Be(ce);return ce.linkText=!1,_e}return pe.match(/^([^\]\\]|\\.)+/,!0),Re.linkText}function mt(pe,ce){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ce.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ce.f=ce.inline=Xe,Re.linkHref+" url")}var ft={startState:function(){return{f:tt,prevLine:{stream:null},thisLine:{stream:null},block:tt,htmlState:null,indentation:0,inline:Xe,text:Ne,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&le.copyState(We,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?le.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ce){if(ce.formatting=!1,pe!=ce.thisLine.stream){if(ce.header=0,ce.hr=!1,pe.match(/^\s*$/,!0))return qe(ce),null;if(ce.prevLine=ce.thisLine,ce.thisLine={stream:pe},ce.taskList=!1,ce.trailingSpace=0,ce.trailingSpaceNewLine=!1,!ce.localState&&(ce.f=ce.block,ce.f!=ct)){var _e=pe.match(/^\s*/,!0)[0].replace(/\t/g,$e).length;if(ce.indentation=_e,ce.indentationDiff=null,_e>0)return null}}return ce.f(pe,ce)},innerMode:function(pe){return pe.block==ct?{state:pe.htmlState,mode:We}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:ft}},indent:function(pe,ce,_e){return pe.block==ct&&We.indent?We.indent(pe.htmlState,ce,_e):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ce,_e):le.Pass},blankLine:qe,getType:Be,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ft},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},98101:function(Rt,It,de){(function(le){le(de(89780))})(function(le){"use strict";le.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var ot=0;ot-1&&We.substring(Re+1,We.length);if(Ve)return le.findModeByExtension(Ve)},le.findModeByName=function(We){We=We.toLowerCase();for(var me=0;me0?He.cmdState[He.cmdState.length-1]:null}function ge(He){var Te=He.cmdState.pop();Te&&Te.closeBracket()}function Re(He){for(var Te=He.cmdState,Ae=Te.length-1;Ae>=0;Ae--){var De=Te[Ae];if(De.name!="DEFAULT")return De}return{styleIdentifier:function(){return null}}}function Ve(He,Te,Ae){return function(){this.name=He,this.bracketNo=0,this.style=Te,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 Ce={};Ce.importmodule=Ve("importmodule","tag",["string","builtin"]),Ce.documentclass=Ve("documentclass","tag",["","atom"]),Ce.usepackage=Ve("usepackage","tag",["atom"]),Ce.begin=Ve("begin","tag",["atom"]),Ce.end=Ve("end","tag",["atom"]),Ce.label=Ve("label","tag",["atom"]),Ce.ref=Ve("ref","tag",["atom"]),Ce.eqref=Ve("eqref","tag",["atom"]),Ce.cite=Ve("cite","tag",["atom"]),Ce.bibitem=Ve("bibitem","tag",["atom"]),Ce.Bibitem=Ve("Bibitem","tag",["atom"]),Ce.RBibitem=Ve("RBibitem","tag",["atom"]),Ce.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function fe(He,Te){He.f=Te}function Qe(He,Te){var Ae;if(He.match(/^\\[a-zA-Z@]+/)){var De=He.current().slice(1);return Ae=Ce.hasOwnProperty(De)?Ce[De]:Ce.DEFAULT,Ae=new Ae,We(Te,Ae),fe(Te,st),Ae.style}if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/\\]/))return"tag";if(He.match("\\["))return fe(Te,function(at,ht){return ve(at,ht,"\\]")}),"keyword";if(He.match("\\("))return fe(Te,function(at,ht){return ve(at,ht,"\\)")}),"keyword";if(He.match("$$"))return fe(Te,function(at,ht){return ve(at,ht,"$$")}),"keyword";if(He.match("$"))return fe(Te,function(at,ht){return ve(at,ht,"$")}),"keyword";var $e=He.next();if($e=="%")return He.skipToEnd(),"comment";if($e=="}"||$e=="]"){if(Ae=me(Te),Ae)Ae.closeBracket($e),fe(Te,st);else return"error";return"bracket"}else return $e=="{"||$e=="["?(Ae=Ce.DEFAULT,Ae=new Ae,We(Te,Ae),"bracket"):/\d/.test($e)?(He.eatWhile(/[\w.%]/),"atom"):(He.eatWhile(/[\w\-_]/),Ae=Re(Te),Ae.name=="begin"&&(Ae.argument=He.current()),Ae.styleIdentifier())}function ve(He,Te,Ae){if(He.eatSpace())return null;if(Ae&&He.match(Ae))return fe(Te,Qe),"keyword";if(He.match(/^\\[a-zA-Z@]+/))return"tag";if(He.match(/^[a-zA-Z]+/))return"variable-2";if(He.match(/^\\[$&%#{}_]/)||He.match(/^\\[,;!\/]/)||He.match(/^[\^_&]/))return"tag";if(He.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(He.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var De=He.next();return De=="{"||De=="}"||De=="["||De=="]"||De=="("||De==")"?"bracket":De=="%"?(He.skipToEnd(),"comment"):"error"}function st(He,Te){var Ae=He.peek(),De;return Ae=="{"||Ae=="["?(De=me(Te),De.openBracket(Ae),He.eat(Ae),fe(Te,Qe),"bracket"):/[ \t\r]/.test(Ae)?(He.eat(Ae),null):(fe(Te,Qe),ge(Te),Qe(He,Te))}return{startState:function(){var He=Pe.inMathMode?function(Te,Ae){return ve(Te,Ae)}:Qe;return{cmdState:[],f:He}},copyState:function(He){return{cmdState:He.cmdState.slice(),f:He.f}},token:function(He,Te){return Te.f(He,Te)},blankLine:function(He){He.f=Qe,He.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},15525:function(Rt,It,de){(function(le){le(de(89780))})(function(le){"use strict";var ot={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Pe={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(We,me){var ge=We.indentUnit,Re={},Ve=me.htmlMode?ot:Pe;for(var Ce in Ve)Re[Ce]=Ve[Ce];for(var Ce in me)Re[Ce]=me[Ce];var fe,Qe;function ve(Le,Oe){function we(Je){return Oe.tokenize=Je,Je(Le,Oe)}var Fe=Le.next();if(Fe=="<")return Le.eat("!")?Le.eat("[")?Le.match("CDATA[")?we(Te("atom","]]>")):null:Le.match("--")?we(Te("comment","-->")):Le.match("DOCTYPE",!0,!0)?(Le.eatWhile(/[\w\._\-]/),we(Ae(1))):null:Le.eat("?")?(Le.eatWhile(/[\w\._\-]/),Oe.tokenize=Te("meta","?>"),"meta"):(fe=Le.eat("/")?"closeTag":"openTag",Oe.tokenize=st,"tag bracket");if(Fe=="&"){var Et;return Le.eat("#")?Le.eat("x")?Et=Le.eatWhile(/[a-fA-F\d]/)&&Le.eat(";"):Et=Le.eatWhile(/[\d]/)&&Le.eat(";"):Et=Le.eatWhile(/[\w\.\-:]/)&&Le.eat(";"),Et?"atom":"error"}else return Le.eatWhile(/[^&<]/),null}ve.isInText=!0;function st(Le,Oe){var we=Le.next();if(we==">"||we=="/"&&Le.eat(">"))return Oe.tokenize=ve,fe=we==">"?"endTag":"selfcloseTag","tag bracket";if(we=="=")return fe="equals",null;if(we=="<"){Oe.tokenize=ve,Oe.state=ht,Oe.tagName=Oe.tagStart=null;var Fe=Oe.tokenize(Le,Oe);return Fe?Fe+" tag error":"tag error"}else return/[\'\"]/.test(we)?(Oe.tokenize=He(we),Oe.stringStartCol=Le.column(),Oe.tokenize(Le,Oe)):(Le.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function He(Le){var Oe=function(we,Fe){for(;!we.eol();)if(we.next()==Le){Fe.tokenize=st;break}return"string"};return Oe.isInAttribute=!0,Oe}function Te(Le,Oe){return function(we,Fe){for(;!we.eol();){if(we.match(Oe)){Fe.tokenize=ve;break}we.next()}return Le}}function Ae(Le){return function(Oe,we){for(var Fe;(Fe=Oe.next())!=null;){if(Fe=="<")return we.tokenize=Ae(Le+1),we.tokenize(Oe,we);if(Fe==">")if(Le==1){we.tokenize=ve;break}else return we.tokenize=Ae(Le-1),we.tokenize(Oe,we)}return"meta"}}function De(Le,Oe,we){this.prev=Le.context,this.tagName=Oe,this.indent=Le.indented,this.startOfLine=we,(Re.doNotIndent.hasOwnProperty(Oe)||Le.context&&Le.context.noIndent)&&(this.noIndent=!0)}function $e(Le){Le.context&&(Le.context=Le.context.prev)}function at(Le,Oe){for(var we;;){if(!Le.context||(we=Le.context.tagName,!Re.contextGrabbers.hasOwnProperty(we)||!Re.contextGrabbers[we].hasOwnProperty(Oe)))return;$e(Le)}}function ht(Le,Oe,we){return Le=="openTag"?(we.tagStart=Oe.column(),ut):Le=="closeTag"?qe:ht}function ut(Le,Oe,we){return Le=="word"?(we.tagName=Oe.current(),Qe="tag",Zt):Re.allowMissingTagName&&Le=="endTag"?(Qe="tag bracket",Zt(Le,Oe,we)):(Qe="error",ut)}function qe(Le,Oe,we){if(Le=="word"){var Fe=Oe.current();return we.context&&we.context.tagName!=Fe&&Re.implicitlyClosed.hasOwnProperty(we.context.tagName)&&$e(we),we.context&&we.context.tagName==Fe||Re.matchClosing===!1?(Qe="tag",tt):(Qe="tag error",ct)}else return Re.allowMissingTagName&&Le=="endTag"?(Qe="tag bracket",tt(Le,Oe,we)):(Qe="error",ct)}function tt(Le,Oe,we){return Le!="endTag"?(Qe="error",tt):($e(we),ht)}function ct(Le,Oe,we){return Qe="error",tt(Le,Oe,we)}function Zt(Le,Oe,we){if(Le=="word")return Qe="attribute",Be;if(Le=="endTag"||Le=="selfcloseTag"){var Fe=we.tagName,Et=we.tagStart;return we.tagName=we.tagStart=null,Le=="selfcloseTag"||Re.autoSelfClosers.hasOwnProperty(Fe)?at(we,Fe):(at(we,Fe),we.context=new De(we,Fe,Et==we.indented)),ht}return Qe="error",Zt}function Be(Le,Oe,we){return Le=="equals"?Ne:(Re.allowMissing||(Qe="error"),Zt(Le,Oe,we))}function Ne(Le,Oe,we){return Le=="string"?Xe:Le=="word"&&Re.allowUnquoted?(Qe="string",Zt):(Qe="error",Zt(Le,Oe,we))}function Xe(Le,Oe,we){return Le=="string"?Xe:Zt(Le,Oe,we)}return{startState:function(Le){var Oe={tokenize:ve,state:ht,indented:Le||0,tagName:null,tagStart:null,context:null};return Le!=null&&(Oe.baseIndent=Le),Oe},token:function(Le,Oe){if(!Oe.tagName&&Le.sol()&&(Oe.indented=Le.indentation()),Le.eatSpace())return null;fe=null;var we=Oe.tokenize(Le,Oe);return(we||fe)&&we!="comment"&&(Qe=null,Oe.state=Oe.state(fe||we,Le,Oe),Qe&&(we=Qe=="error"?we+" error":Qe)),we},indent:function(Le,Oe,we){var Fe=Le.context;if(Le.tokenize.isInAttribute)return Le.tagStart==Le.indented?Le.stringStartCol+1:Le.indented+ge;if(Fe&&Fe.noIndent)return le.Pass;if(Le.tokenize!=st&&Le.tokenize!=ve)return we?we.match(/^(\s*)/)[0].length:0;if(Le.tagName)return Re.multilineTagIndentPastTag!==!1?Le.tagStart+Le.tagName.length+2:Le.tagStart+ge*(Re.multilineTagIndentFactor||1);if(Re.alignCDATA&&/$/,blockCommentStart:"",configuration:Re.htmlMode?"html":"xml",helperType:Re.htmlMode?"html":"xml",skipAttribute:function(Le){Le.state==Ne&&(Le.state=Zt)},xmlCurrentTag:function(Le){return Le.tagName?{name:Le.tagName,close:Le.type=="closeTag"}:null},xmlCurrentContext:function(Le){for(var Oe=[],we=Le.context;we;we=we.prev)we.tagName&&Oe.push(we.tagName);return Oe.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},2859:function(Rt,It,de){"use strict";de.d(It,{hP:function(){return pt}});var le=function(oe,te){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(z,re){z.__proto__=re}||function(z,re){for(var se in re)Object.prototype.hasOwnProperty.call(re,se)&&(z[se]=re[se])})(oe,te)};function ot(oe,te){function z(){this.constructor=oe}le(oe,te),oe.prototype=te===null?Object.create(te):(z.prototype=te.prototype,new z)}function Pe(oe,te,z,re){return new(z||(z=Promise))(function(se,ne){function ye(Lt){try{Dt(re.next(Lt))}catch(dt){ne(dt)}}function Ze(Lt){try{Dt(re.throw(Lt))}catch(dt){ne(dt)}}function Dt(Lt){var dt;Lt.done?se(Lt.value):(dt=Lt.value,dt instanceof z?dt:new z(function(yt){yt(dt)})).then(ye,Ze)}Dt((re=re.apply(oe,te||[])).next())})}function We(oe,te){var z,re,se,ne,ye={label:0,sent:function(){if(1&se[0])throw se[1];return se[1]},trys:[],ops:[]};return ne={next:Ze(0),throw:Ze(1),return:Ze(2)},typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function Ze(Dt){return function(Lt){return function(dt){if(z)throw new TypeError("Generator is already executing.");for(;ye;)try{if(z=1,re&&(se=2&dt[0]?re.return:dt[0]?re.throw||((se=re.return)&&se.call(re),0):re.next)&&!(se=se.call(re,dt[1])).done)return se;switch(re=0,se&&(dt=[2&dt[0],se.value]),dt[0]){case 0:case 1:se=dt;break;case 4:return ye.label++,{value:dt[1],done:!1};case 5:ye.label++,re=dt[1],dt=[0];continue;case 7:dt=ye.ops.pop(),ye.trys.pop();continue;default:if(se=ye.trys,!((se=se.length>0&&se[se.length-1])||dt[0]!==6&&dt[0]!==2)){ye=0;continue}if(dt[0]===3&&(!se||dt[1]>se[0]&&dt[1]',"select"),this.addActionButton(re,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(re,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(re,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(re,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(re,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(re,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(re,'',"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 ye=document.createElement("div");ye.className=""+z.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",ne.typeName),ye.innerHTML=ne.icon,ye.addEventListener("click",function(){z.markerToolbarButtonClicked(ye,ne)}),z.buttons.push(ye),z.markerButtons.push(ye)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var se=document.createElement("div");se.className=this.toolbarBlockStyleClass.name,se.style.whiteSpace="nowrap",se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(se),this.addActionButton(se,'',"render"),this.addActionButton(se,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},oe.prototype.addButtonClickListener=function(te){this.buttonClickListeners.push(te)},oe.prototype.removeButtonClickListener=function(te){this.buttonClickListeners.indexOf(te)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(te),1)},oe.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},oe.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var te=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var z=0;z0&&this.buttonClickListeners.forEach(function(re){return re("marker",z)}),this.markerButtonOverflowBlock.style.display="none"},oe.prototype.actionToolbarButtonClicked=function(te,z){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(re){return re("action",z)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},oe.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)},oe.prototype.setActiveMarkerButton=function(te){var z=this.markerButtons.find(function(re){return re.getAttribute("data-type-name")===te});z&&this.setActiveButton(z)},oe.prototype.setCurrentMarker=function(te){var z=this;this.currentMarker=te,this.buttons.filter(function(re){return/delete|notes/.test(re.getAttribute("data-action"))}).forEach(function(re){z.currentMarker===void 0?(re.style.fillOpacity="0.4",re.style.pointerEvents="none"):(re.style.fillOpacity="1",re.style.pointerEvents="all")})},oe}(),He=function(){function oe(te,z,re,se){this.panels=[],this.panelButtons=[],this.markerjsContainer=te,this.displayMode=z,this.uiStyleSettings=re,this.styles=se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return oe.prototype.addStyles=function(){var te;this.toolboxStyleClass=this.styles.addClass(new ve("toolbox",` width: 100%; flex-shrink: 0; display: flex; flex-direction: column; font-family: sans-serif; `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+` box-sizing: content-box; `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+` `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+` overflow: hidden; `)),this.toolboxStyleColorsClass=this.styles.addClass(new ve("toolbox_colors",` color: `+this.uiStyleSettings.toolboxColor+`; `));var z=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ve("toolbox-button-row",` display: flex; cursor: default; box-sizing: content-box; `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ve("toolbox-button-row_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`; `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ve("toolbox-panel-row",` display: flex; `+(this.displayMode==="inline"?"position: absolute;":"")+` `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+` cursor: default; height: `+1.5*this.uiStyleSettings.toolbarHeight+`px; `+(this.displayMode==="inline"?"width: 100%;":"")+` box-sizing: content-box; `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ve("toolbox-panel-row_colors",` background-color: `+((te=this.uiStyleSettings.toolboxBackgroundColor)!==null&&te!==void 0?te:this.uiStyleSettings.toolbarBackgroundHoverColor)+`; `)),this.toolboxButtonStyleClass=this.styles.addClass(new ve("toolbox_button",` display: inline-block; width: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px; height: `+(this.uiStyleSettings.toolbarHeight-2*z)+`px; padding: `+z+`px; box-sizing: content-box; `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-button_colors",` fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ve("toolbox-active-button_colors",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`; fill: `+this.uiStyleSettings.toolbarColor+`; `)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleColorsClass.name+":hover",` background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+` `)),this.styles.addRule(new Qe("."+this.toolboxButtonStyleClass.name+" svg",` height: `+this.uiStyleSettings.toolbarHeight/2+`px; `))},oe.prototype.show=function(te){var z;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=te,this.uiContainer.className=this.toolboxStyleClass.name+" "+((z=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},oe.prototype.setPanelButtons=function(te){var z,re,se=this;this.panels=te,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((z=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&z!==void 0?z:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((re=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&re!==void 0?re:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(ne){var ye;ne.uiStyleSettings=se.uiStyleSettings;var Ze=document.createElement("div");Ze.className=se.toolboxButtonStyleClass.name+" "+((ye=se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:se.toolboxButtonStyleColorsClass.name),Ze.innerHTML=ne.icon,Ze.title=ne.title,Ze.addEventListener("click",function(){se.panelButtonClick(ne)}),se.panelButtons.push(Ze),se.buttonRow.appendChild(Ze)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},oe.prototype.panelButtonClick=function(te){var z=this,re=-1;if(te!==this.activePanel){re=this.panels.indexOf(te),this.panelRow.innerHTML="";var se=te.getUi();se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(se),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=te}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){z.displayMode==="inline"?z.panelRow.style.display="none":z.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(ne,ye){var Ze,Dt;ne.className=z.toolboxButtonStyleClass.name+" "+(ye===re?""+((Ze=z.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:z.toolboxActiveButtonStyleColorsClass.name):""+((Dt=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Dt!==void 0?Dt:z.toolboxButtonStyleColorsClass.name))})},oe}(),Te=function(oe,te){this.title=oe,this.icon=te},Ae=function(oe){function te(z,re,se,ne){var ye=oe.call(this,z,ne||'')||this;return ye.colors=[],ye.addTransparent=!1,ye.colorBoxes=[],ye.colors=re,ye.currentColor=se,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.whiteSpace="nowrap",this.colors.forEach(function(se){var ne=z.getColorBox(se);re.appendChild(ne),z.colorBoxes.push(ne)}),re},te.prototype.getColorBox=function(z){var re=this,se=this.uiStyleSettings.toolbarHeight/4,ne=this.uiStyleSettings.toolbarHeight-se,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=ne-2+"px",ye.style.height=ne-2+"px",ye.style.padding="1px",ye.style.marginRight="2px",ye.style.marginBottom="2px",ye.style.borderWidth="2px",ye.style.borderStyle="solid",ye.style.borderRadius=(ne+2)/2+"px",ye.style.borderColor=z===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){re.setCurrentColor(z,ye)});var Ze=document.createElement("div");return Ze.style.display="inline-block",Ze.style.width=ne-2+"px",Ze.style.height=ne-2+"px",Ze.style.backgroundColor=z,Ze.style.borderRadius=ne/2+"px",z==="transparent"&&(Ze.style.fill=this.uiStyleSettings.toolboxAccentColor,Ze.innerHTML=` `),ye.appendChild(Ze),ye},te.prototype.setCurrentColor=function(z,re){var se=this;this.currentColor=z,this.colorBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(z)},te}(Te),De=function(){function oe(te,z,re){this._state="new",this._isSelected=!1,this._container=te,this._overlayContainer=z,this.globalSettings=re,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(oe.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),oe.prototype.ownsTarget=function(te){return!1},Object.defineProperty(oe.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),oe.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},oe.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},oe.prototype.pointerDown=function(te,z){},oe.prototype.dblClick=function(te,z){},oe.prototype.manipulate=function(te){},oe.prototype.pointerUp=function(te){this.stateChanged()},oe.prototype.dispose=function(){},oe.prototype.addMarkerVisualToContainer=function(te){this.container.childNodes.length>0?this.container.insertBefore(te,this.container.childNodes[0]):this.container.appendChild(te)},oe.prototype.getState=function(){return{typeName:oe.typeName,state:this.state,notes:this.notes}},oe.prototype.restoreState=function(te){this._state=te.state,this.notes=te.notes},oe.prototype.scale=function(te,z){},oe.prototype.colorChanged=function(te){this.onColorChanged&&this.onColorChanged(te),this.stateChanged()},oe.prototype.fillColorChanged=function(te){this.onFillColorChanged&&this.onFillColorChanged(te),this.stateChanged()},oe.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)}},oe.typeName="MarkerBase",oe}(),$e=function(){function oe(){this.findGripByVisual=this.findGripByVisual.bind(this)}return oe.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},oe}(),at=function(){function oe(){this.GRIP_SIZE=10,this.visual=ge.createGroup(),this.visual.appendChild(ge.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ge.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return oe.prototype.ownsTarget=function(te){return te===this.visual||te===this.visual.childNodes[0]||te===this.visual.childNodes[1]},oe}(),ht=function(){function oe(){}return oe.toITransformMatrix=function(te){return{a:te.a,b:te.b,c:te.c,d:te.d,e:te.e,f:te.f}},oe.toSVGMatrix=function(te,z){return te.a=z.a,te.b=z.b,te.c=z.c,te.d=z.d,te.e=z.e,te.f=z.f,te},oe}(),ut=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.left=0,ne.top=0,ne.width=0,ne.height=0,ne.defaultSize={x:50,y:20},ne.offsetX=0,ne.offsetY=0,ne.rotationAngle=0,ne.CB_DISTANCE=10,ne._suppressMarkerCreateEvent=!1,ne.container.transform.baseVal.appendItem(ge.createTransform()),ne.setupControlBox(),ne}return ot(te,oe),Object.defineProperty(te.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"visual",{get:function(){return this._visual},set:function(z){this._visual=z;var re=ge.createTransform();this._visual.transform.baseVal.appendItem(re)},enumerable:!1,configurable:!0}),te.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!!(this.controlGrips.findGripByVisual(z)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(z))},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.left=z.x,this.top=z.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var se=this.unrotatePoint(z);if(this.manipulationStartX=se.x,this.manipulationStartY=se.y,this.offsetX=se.x-this.left,this.offsetY=se.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(re),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(re)){this.activeGrip=this.rotatorGrip;var ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=ne.x-this.width/2,this.top=ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ye=this.container.transform.baseVal.getItem(0);ye.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ye,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},te.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},te.prototype.moveVisual=function(z){this.visual.style.transform="translate("+z.x+"px, "+z.y+"px)"},te.prototype.manipulate=function(z){var re=this.unrotatePoint(z);this.state==="creating"?this.resize(z):this.state==="move"?(this.left=this.manipulationStartLeft+(re.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(re.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(re):this.state==="rotate"&&this.rotate(z)},te.prototype.resize=function(z){var re=this.manipulationStartLeft,se=this.manipulationStartWidth,ne=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:re=this.manipulationStartLeft+z.x-this.manipulationStartX,se=this.manipulationStartWidth+this.manipulationStartLeft-re;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:se=this.manipulationStartWidth+z.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:ne=this.manipulationStartTop+z.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+z.y-this.manipulationStartY}se>=0?(this.left=re,this.width=se):(this.left=re+se,this.width=-se),ye>=0?(this.top=ne,this.height=ye):(this.top=ne+ye,this.height=-ye),this.setSize()},te.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},te.prototype.rotate=function(z){if(Math.abs(z.x-this.centerX)>.1){var re=Math.sign(z.x-this.centerX);this.rotationAngle=180*Math.atan((z.y-this.centerY)/(z.x-this.centerX))/Math.PI+90*re,this.applyRotation()}},te.prototype.applyRotation=function(){var z=this.container.transform.baseVal.getItem(0);z.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(z,0)},te.prototype.rotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM(),se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(re)).x,y:se.y}},te.prototype.unrotatePoint=function(z){if(this.rotationAngle===0)return z;var re=this.container.getCTM();re=re.inverse();var se=ge.createPoint(z.x,z.y);return{x:(se=se.matrixTransform(re)).x,y:se.y}},te.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup();var z=ge.createTransform();z.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(z),this.container.appendChild(this.controlBox),this.controlRect=ge.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=ge.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new $e,this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){var z=this.controlBox.transform.baseVal.getItem(0);z.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(z,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},te.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},te.prototype.createGrip=function(){var z=new at;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.controlGrips.topLeft.GRIP_SIZE,re=-z/2,se=re,ne=(this.width+this.CB_DISTANCE)/2-z/2,ye=(this.height+this.CB_DISTANCE)/2-z/2,Ze=this.height+this.CB_DISTANCE-z/2,Dt=this.width+this.CB_DISTANCE-z/2;this.positionGrip(this.controlGrips.topLeft.visual,re,se),this.positionGrip(this.controlGrips.topCenter.visual,ne,se),this.positionGrip(this.controlGrips.topRight.visual,Dt,se),this.positionGrip(this.controlGrips.centerLeft.visual,re,ye),this.positionGrip(this.controlGrips.centerRight.visual,Dt,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,re,Ze),this.positionGrip(this.controlGrips.bottomCenter.visual,ne,Ze),this.positionGrip(this.controlGrips.bottomRight.visual,Dt,Ze),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,ne,se-3*this.CB_DISTANCE)},te.prototype.positionGrip=function(z,re,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,se),z.transform.baseVal.replaceItem(ne,0)},te.prototype.hideControlBox=function(){this.controlBox.style.display="none"},te.prototype.showControlBox=function(){this.controlBox.style.display=""},te.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ht.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ht.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.left=re.left,this.top=re.top,this.width=re.width,this.height=re.height,this.rotationAngle=re.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,re.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ht.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,re.containerTransformMatrix))},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re);var se=this.rotatePoint({x:this.left,y:this.top}),ne=this.unrotatePoint({x:se.x*z,y:se.y*re});this.left=ne.x,this.top=ne.y,this.width=this.width*z,this.height=this.height*re,this.adjustControlBox()},te}(De),qe=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.fillColor="transparent",ne.strokeColor="transparent",ne.strokeWidth=0,ne.strokeDasharray="",ne.opacity=1,ne.setStrokeColor=ne.setStrokeColor.bind(ne),ne.setFillColor=ne.setFillColor.bind(ne),ne.setStrokeWidth=ne.setStrokeWidth.bind(ne),ne.setStrokeDasharray=ne.setStrokeDasharray.bind(ne),ne.createVisual=ne.createVisual.bind(ne),ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual)},te.prototype.createVisual=function(){this.visual=ge.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.visual&&ge.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.visual&&ge.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.visual&&ge.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.visual&&ge.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},te.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.opacity=re.opacity,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},te.title="Rectangle marker",te}(ut),tt=function(oe){function te(z,re,se,ne){var ye=oe.call(this,z,ne||'')||this;return ye.widths=[],ye.widthBoxes=[],ye.widths=re,ye.currentWidth=se,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.widths.forEach(function(se){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=se===z.currentWidth?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentWidth(se,ne)}),re.appendChild(ne);var ye=document.createElement("div");ye.innerText=se.toString(),ye.style.marginRight="5px",ne.appendChild(ye);var Ze=document.createElement("div");Ze.style.minHeight="20px",Ze.style.flexGrow="2",Ze.style.display="flex",Ze.style.alignItems="center";var Dt=document.createElement("hr");Dt.style.minWidth="20px",Dt.style.border="0px",Dt.style.borderTop=se+"px solid "+z.uiStyleSettings.toolboxColor,Dt.style.flexGrow="2",Ze.appendChild(Dt),ne.appendChild(Ze),z.widthBoxes.push(ne)}),re},te.prototype.setCurrentWidth=function(z,re){var se=this;this.currentWidth=z,this.widthBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},te}(Te),ct=function(oe){function te(z,re,se,ne){var ye=oe.call(this,z,ne||'')||this;return ye.styles=[],ye.styleBoxes=[],ye.styles=re,ye.currentStyle=se,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",this.styles.forEach(function(se){var ne=document.createElement("div");ne.style.display="flex",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.styles.length-5+"%",ne.style.borderColor=se===z.currentStyle?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentStyle(se,ne)}),re.appendChild(ne);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var Ze=` `;ye.innerHTML=Ze,ne.appendChild(ye),z.styleBoxes.push(ne)}),re},te.prototype.setCurrentStyle=function(z,re){var se=this;this.currentStyle=z,this.styleBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},te}(Te),Zt=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.strokeColor=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ct("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="FrameMarker",te.title="Frame marker",te.icon='',te}(qe),Be=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"},Ne=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.x1=0,ne.y1=0,ne.x2=0,ne.y2=0,ne.defaultLength=50,ne.manipulationStartX=0,ne.manipulationStartY=0,ne.manipulationStartX1=0,ne.manipulationStartY1=0,ne.manipulationStartX2=0,ne.manipulationStartY2=0,ne.setupControlBox(),ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!!oe.prototype.ownsTarget.call(this,z)||!(!this.grip1.ownsTarget(z)&&!this.grip2.ownsTarget(z))},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.state==="new"&&(this.x1=z.x,this.y1=z.y,this.x2=z.x,this.y2=z.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(re)?this.activeGrip=this.grip1:this.grip2.ownsTarget(re)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},te.prototype.pointerUp=function(z){var re=this.state;oe.prototype.pointerUp.call(this,z),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(z),this._state="select",re==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},te.prototype.adjustVisual=function(){},te.prototype.manipulate=function(z){this.state==="creating"?this.resize(z):this.state==="move"?(this.x1=this.manipulationStartX1+z.x-this.manipulationStartX,this.y1=this.manipulationStartY1+z.y-this.manipulationStartY,this.x2=this.manipulationStartX2+z.x-this.manipulationStartX,this.y2=this.manipulationStartY2+z.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(z)},te.prototype.resize=function(z){switch(this.activeGrip){case this.grip1:this.x1=z.x,this.y1=z.y;break;case this.grip2:case void 0:this.x2=z.x,this.y2=z.y}this.adjustVisual(),this.adjustControlBox()},te.prototype.select=function(){oe.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},te.prototype.deselect=function(){oe.prototype.deselect.call(this),this.controlBox.style.display="none"},te.prototype.setupControlBox=function(){this.controlBox=ge.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},te.prototype.adjustControlBox=function(){this.positionGrips()},te.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},te.prototype.createGrip=function(){var z=new at;return z.visual.transform.baseVal.appendItem(ge.createTransform()),this.controlBox.appendChild(z.visual),z},te.prototype.positionGrips=function(){var z=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-z/2,this.y1-z/2),this.positionGrip(this.grip2.visual,this.x2-z/2,this.y2-z/2)},te.prototype.positionGrip=function(z,re,se){var ne=z.transform.baseVal.getItem(0);ne.setTranslate(re,se),z.transform.baseVal.replaceItem(ne,0)},te.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},oe.prototype.getState.call(this))},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.x1=re.x1,this.y1=re.y1,this.x2=re.x2,this.y2=re.y2},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.x1=this.x1*z,this.y1=this.y1*re,this.x2=this.x2*z,this.y2=this.y2*re,this.adjustVisual(),this.adjustControlBox()},te}(De),Xe=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ct("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorLine&&z!==this.visibleLine)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ge.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},te.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),ge.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.createVisual(),this.adjustVisual()},te.typeName="LineMarker",te.title="Line marker",te.icon='',te}(Ne),Le=function(oe){function te(z,re,se,ne){var ye=oe.call(this,z,ne||'')||this;return ye.fonts=[],ye.fontBoxes=[],ye.fonts=re,ye.currentFont=se,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.overflow="hidden",re.style.flexGrow="2",this.fonts.forEach(function(se){var ne=document.createElement("div");ne.style.display="inline-block",ne.style.alignItems="center",ne.style.justifyContent="space-between",ne.style.padding="5px",ne.style.borderWidth="2px",ne.style.borderStyle="solid",ne.style.overflow="hidden",ne.style.maxWidth=100/z.fonts.length-5+"%",ne.style.borderColor=se===z.currentFont?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentFont(se,ne)}),re.appendChild(ne);var ye=document.createElement("div");ye.style.display="flex",ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.fontFamily=se,ye.style.overflow="hidden";var Ze=document.createElement("div");Ze.style.whiteSpace="nowrap",Ze.style.overflow="hidden",Ze.style.textOverflow="ellipsis",Ze.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(Ze),ne.appendChild(ye),z.fontBoxes.push(ne)}),re},te.prototype.setCurrentFont=function(z,re){var se=this;this.currentFont=z,this.fontBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},te}(Te),Oe=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||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=se.defaultColor,ne.fontFamily=se.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",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){if(oe.prototype.ownsTarget.call(this,z)||z===this.visual||z===this.textElement||z===this.bgRectangle)return!0;var re=!1;return this.textElement.childNodes.forEach(function(se){se===z&&(re=!0)}),re},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.bgRectangle=ge.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ge.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.textElement.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.renderText=function(){var z=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(re){z.textElement.appendChild(ge.createTSpan(re.trim()===""?" ":re.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},te.prototype.getTextScale=function(){var z=this.textElement.getBBox(),re=1;if(z.width>0&&z.height>0){var se=(1*this.width-this.width*this.padding*2/100)/z.width,ne=(1*this.height-this.height*this.padding*2/100)/z.height;re=Math.min(se,ne)}return re},te.prototype.getTextPosition=function(z){var re=this.textElement.getBBox(),se=0,ne=0;return re.width>0&&re.height>0&&(se=(this.width-re.width*z)/2,ne=this.height/2-re.height*z/2),{x:se,y:ne}},te.prototype.sizeText=function(){var z=this.textElement.getBBox(),re=this.getTextScale(),se=this.getTextPosition(re);se.y-=z.y*re,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+se.x+"px, "+se.y+"px) scale("+re+", "+re+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(se.x,se.y),this.textElement.transform.baseVal.getItem(1).setScale(re,re))},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.isMoved=!0,this.setSize(),this.sizeText()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},te.prototype.pointerUp=function(z){var re=this.state;re==="creating"&&(this._suppressMarkerCreateEvent=!0),oe.prototype.pointerUp.call(this,z),this.setSize(),(re==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var re=Number.parseFloat(z.textEditor.style.fontSize);z.textEditor.clientWidth>=Number.parseInt(z.textEditor.style.maxWidth)&&re>.9;)re-=.1,z.textEditor.style.fontSize=Math.max(re,.9)+"em"}),this.textEditor.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(re){if(re.clipboardData){var se=re.clipboardData.getData("text"),ne=window.getSelection();if(!ne.rangeCount)return!1;ne.deleteFromDocument(),ne.getRangeAt(0).insertNode(document.createTextNode(se)),re.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){z.textEditDivClicked(z.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},te.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var z=this.getTextScale(),re=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),se=this.textElement.getBBox(),ne={x:se.width*z,y:se.height*z};re.x-=ne.x/2,re.y-=ne.y/2,this.textEditor.style.top=re.y+"px",this.textEditor.style.left=re.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-re.x+"px",this.textEditor.style.fontSize=Math.max(16*z,12)+"px",this.textElement.style.display="none"}},te.prototype.textEditDivClicked=function(z){this.text=z.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},te.prototype.select=function(){oe.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},te.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),oe.prototype.deselect.call(this)},te.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setColor=function(z){this.textElement&&ge.setAttributes(this.textElement,[["fill",z]]),this.color=z,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(z)},te.prototype.setFont=function(z){this.textElement&&ge.setAttributes(this.textElement,[["font-family",z]]),this.fontFamily=z,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},te.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},te.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){var re=z;this.color=re.color,this.fontFamily=re.fontFamily,this.padding=re.padding,this.text=re.text,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize(),this.sizeText(),this.positionTextEditor()},te.typeName="TextMarker",te.title="Text marker",te.icon='',te}(ut),we=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.color="transparent",ne.lineWidth=3,ne.drawing=!1,ne.pixelRatio=1,ne.color=se.defaultColor,ne.lineWidth=se.defaultStrokeWidth,ne.pixelRatio=se.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",se.defaultColorSet,se.defaultColor),ne.colorPanel.onColorChanged=ne.setColor,ne.lineWidthPanel=new tt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.lineWidthPanel.onWidthChanged=ne.setLineWidth,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.drawingImage)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.drawingImage=ge.createImage(),this.visual.appendChild(this.drawingImage);var z=ge.createTransform();this.visual.transform.baseVal.appendItem(z),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(z.x,z.y),this.drawing=!0):oe.prototype.pointerDown.call(this,z,re)},te.prototype.manipulate=function(z){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(z.x,z.y),this.canvasContext.stroke()):oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),ge.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},te.prototype.pointerUp=function(z){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):oe.prototype.pointerUp.call(this,z)},te.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},te.prototype.select=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.select.call(this)},te.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),oe.prototype.deselect.call(this)},te.prototype.finishCreation=function(){for(var z=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),re=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],se=re[0],ne=re[1],ye=re[2],Ze=re[3],Dt=!1,Lt=0;Lt0&&(Dt=!0,LtZe&&(Ze=Lt),dt>ye&&(ye=dt));if(Dt){this.left=se/this.pixelRatio,this.top=ne/this.pixelRatio,this.width=(ye-se)/this.pixelRatio,this.height=(Ze-ne)/this.pixelRatio;var yt=document.createElement("canvas");yt.width=ye-se,yt.height=Ze-ne,yt.getContext("2d").putImageData(this.canvasContext.getImageData(se,ne,ye-se,Ze-ne),0,0),this.drawingImgUrl=yt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},te.prototype.setDrawingImage=function(){ge.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ge.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},te.prototype.setColor=function(z){this.color=z,this.colorChanged(z)},te.prototype.setLineWidth=function(z){this.lineWidth=z},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({drawingImgUrl:this.drawingImgUrl},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){this.createVisual(),oe.prototype.restoreState.call(this,z),this.drawingImgUrl=z.drawingImgUrl,this.setDrawingImage()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setDrawingImage()},te.typeName="FreehandMarker",te.title="Freehand marker",te.icon='',te}(ut),Fe=function(oe){function te(z,re,se){var ne=oe.call(this,z,se||'')||this;return ne.typeBoxes=[],ne.currentType=re,ne.setCurrentType=ne.setCurrentType.bind(ne),ne}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2";for(var se=function(Ze){var Dt="both";switch(Ze){case 0:Dt="both";break;case 1:Dt="start";break;case 2:Dt="end";break;case 3:Dt="none"}var Lt=document.createElement("div");if(Lt.style.display="flex",Lt.style.flexGrow="2",Lt.style.alignItems="center",Lt.style.justifyContent="space-between",Lt.style.padding="5px",Lt.style.borderWidth="2px",Lt.style.borderStyle="solid",Lt.style.borderColor=Dt===ne.currentType?ne.uiStyleSettings.toolboxAccentColor:"transparent",Lt.addEventListener("click",function(){z.setCurrentType(Dt,Lt)}),re.appendChild(Lt),Dt==="both"||Dt==="start"){var dt=document.createElement("div");dt.style.display="flex",dt.style.alignItems="center",dt.style.minHeight="20px",dt.innerHTML=` `,dt.style.marginLeft="5px",Lt.appendChild(dt)}var yt=document.createElement("div");yt.style.display="flex",yt.style.alignItems="center",yt.style.minHeight="20px",yt.style.flexGrow="2";var Ht=document.createElement("hr");if(Ht.style.minWidth="20px",Ht.style.border="0px",Ht.style.borderTop="3px solid "+(ne.uiStyleSettings!==void 0?ne.uiStyleSettings.toolboxColor:"#eeeeee"),Ht.style.flexGrow="2",yt.appendChild(Ht),Lt.appendChild(yt),Dt==="both"||Dt==="end"){var Mt=document.createElement("div");Mt.style.display="flex",Mt.style.alignItems="center",Mt.style.minHeight="20px",Mt.innerHTML=` `,Mt.style.marginRight="5px",Lt.appendChild(Mt)}ne.typeBoxes.push(Lt)},ne=this,ye=0;ye<4;ye++)se(ye);return re},te.prototype.setCurrentType=function(z,re){var se=this;this.currentType=z,this.typeBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings!==void 0?se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},te}(Te),Et=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.arrowType="end",ne.arrowBaseHeight=10,ne.arrowBaseWidth=10,ne.getArrowPoints=ne.getArrowPoints.bind(ne),ne.setArrowType=ne.setArrowType.bind(ne),ne.arrowTypePanel=new Fe("Arrow type","end"),ne.arrowTypePanel.onArrowTypeChanged=ne.setArrowType,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.arrow1&&z!==this.arrow2)},te.prototype.getArrowPoints=function(z,re){var se=this.arrowBaseWidth+2*this.strokeWidth,ne=this.arrowBaseHeight+2*this.strokeWidth;return z-se/2+","+(re+ne/2)+" "+z+","+(re-ne/2)+" "+(z+se/2)+","+(re+ne/2)},te.prototype.createTips=function(){this.arrow1=ge.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ge.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ge.createTransform()),this.visual.appendChild(this.arrow2)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.state==="creating"&&this.createTips()},te.prototype.adjustVisual=function(){if(oe.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",ge.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ge.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var z=0;Math.abs(this.x1-this.x2)>.1&&(z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var re=this.arrow1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(re,0);var se=this.arrow2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(se,0)}},te.prototype.setArrowType=function(z){this.arrowType=z,this.adjustVisual(),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({arrowType:this.arrowType},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.arrowType=re.arrowType,this.createTips(),this.adjustVisual()},te.typeName="ArrowMarker",te.title="Arrow marker",te.icon='',te}(Xe),Je=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.fillColor=se.defaultFillColor,ne.strokeWidth=0,ne.fillPanel=new Ae("Color",se.defaultColorSet,se.defaultFillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne}return ot(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="CoverMarker",te.title="Cover marker",te.icon='',te}(qe),mt=function(oe){function te(z,re,se,ne){var ye=oe.call(this,z,ne||'')||this;return ye.opacities=[],ye.opacityBoxes=[],ye.opacities=re,ye.currentOpacity=se,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return ot(te,oe),te.prototype.getUi=function(){var z=this,re=document.createElement("div");return re.style.display="flex",re.style.overflow="hidden",re.style.flexGrow="2",re.style.justifyContent="space-between",this.opacities.forEach(function(se){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=se===z.currentOpacity?z.uiStyleSettings.toolboxAccentColor:"transparent",ne.addEventListener("click",function(){z.setCurrentOpacity(se,ne)}),re.appendChild(ne);var ye=document.createElement("div");ye.innerText=100*se+"%",ne.appendChild(ye),z.opacityBoxes.push(ne)}),re},te.prototype.setCurrentOpacity=function(z,re){var se=this;this.currentOpacity=z,this.opacityBoxes.forEach(function(ne){ne.style.borderColor=ne===re?se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},te}(Te),ft=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.setOpacity=ne.setOpacity.bind(ne),ne.fillColor=se.defaultHighlightColor,ne.strokeWidth=0,ne.opacity=se.defaultHighlightOpacity,ne.fillPanel=new Ae("Color",se.defaultColorSet,ne.fillColor),ne.fillPanel.onColorChanged=ne.setFillColor,ne.opacityPanel=new mt("Opacity",se.defaultOpacitySteps,ne.opacity),ne.opacityPanel.onOpacityChanged=ne.setOpacity,ne}return ot(te,oe),te.prototype.setOpacity=function(z){this.opacity=z,this.visual&&ge.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="HighlightMarker",te.title="Highlight marker",te.icon='',te}(Je),pe='',ce='',_e=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||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=se.defaultStrokeColor,ne.bgColor=se.defaultFillColor,ne.fontFamily=se.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",se.defaultColorSet,ne.color,pe),ne.colorPanel.onColorChanged=ne.setColor,ne.bgColorPanel=new Ae("Fill color",se.defaultColorSet,ne.bgColor,ce),ne.bgColorPanel.onColorChanged=ne.setBgColor,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.tipGrip=new at,ne.tipGrip.visual.transform.baseVal.appendItem(ge.createTransform()),ne.controlBox.appendChild(ne.tipGrip.visual),ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return oe.prototype.ownsTarget.call(this,z)||this.tipGrip.ownsTarget(z)||this.tip===z},te.prototype.createTip=function(){ge.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ge.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},te.prototype.pointerDown=function(z,re){this.state==="new"&&oe.prototype.pointerDown.call(this,z,re),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(re)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):oe.prototype.pointerDown.call(this,z,re)},te.prototype.pointerUp=function(z){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,oe.prototype.pointerUp.call(this,z);else{var re=this.state==="creating";oe.prototype.pointerUp.call(this,z),this.setTipPoints(re),this.positionTip()}},te.prototype.manipulate=function(z){if(this.tipMoving){var re=this.unrotatePoint(z);this.tipPosition={x:re.x-this.manipulationStartLeft,y:re.y-this.manipulationStartTop},this.positionTip()}else oe.prototype.manipulate.call(this,z)},te.prototype.setBgColor=function(z){this.bgRectangle&&this.tip&&(ge.setAttributes(this.bgRectangle,[["fill",z]]),ge.setAttributes(this.tip,[["fill",z]])),this.bgColor=z,this.fillColorChanged(z)},te.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},te.prototype.setTipPoints=function(z){z===void 0&&(z=!1);var re=Math.min(this.height/2,15),se=this.height/5;z&&(this.tipPosition={x:re+se/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.width/2&&this.tipPosition.y>=this.height/2?ne.1)){var z=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),re=this.tip1.transform.baseVal.getItem(0);re.setRotate(z,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(re,0);var se=this.tip2.transform.baseVal.getItem(0);se.setRotate(z+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(se,0)}},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z),this.createTips(),this.adjustVisual()},te.typeName="MeasurementMarker",te.title="Measurement marker",te.icon='',te}(Xe),xe=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||this;return ne.strokePanel.colors=se.defaultColorSet,ne.fillColor="transparent",ne}return ot(te,oe),Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=oe.prototype.getState.call(this);return z.typeName=te.typeName,z},te.typeName="EllipseFrameMarker",te.title="Ellipse frame marker",te.icon='',te}(vt),Ge=function(){function oe(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),oe.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))},oe.prototype.replaceLastUndoStep=function(te){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=te)},oe.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},oe.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}},oe.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},oe}(),ze=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.strokePanel=new Ae("Line color",se.defaultColorSet,se.defaultColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.strokeWidthPanel=new tt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ct("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.selectorCurve&&z!==this.visibleCurve&&!this.curveGrip.ownsTarget(z))},te.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.selectorCurve=ge.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ge.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=z.x,this.curveY=z.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(re)&&(this.activeGrip=this.curveGrip,this._state="resize")},te.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ge.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ge.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ge.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},te.prototype.setupControlBox=function(){oe.prototype.setupControlBox.call(this),this.curveControlLine1=ge.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ge.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},te.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,oe.prototype.addControlGrips.call(this)},te.prototype.positionGrips=function(){oe.prototype.positionGrips.call(this);var z=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-z/2,this.curveY-z/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},te.prototype.manipulate=function(z){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+z.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+z.y-this.manipulationStartY),oe.prototype.manipulate.call(this,z)},te.prototype.resize=function(z){this.activeGrip===this.curveGrip&&(this.curveX=z.x,this.curveY=z.y),oe.prototype.resize.call(this,z),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.adjustVisual(),this.colorChanged(z)},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.adjustVisual()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.adjustVisual()},te.prototype.scale=function(z,re){this.curveX=this.curveX*z,this.curveY=this.curveY*re,oe.prototype.scale.call(this,z,re)},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},oe.prototype.getState.call(this));return z.typeName=te.typeName,z},te.prototype.restoreState=function(z){oe.prototype.restoreState.call(this,z);var re=z;this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.curveX=re.curveX,this.curveY=re.curveY,this.createVisual(),this.adjustVisual()},te.typeName="CurveMarker",te.title="Curve marker",te.icon='',te}(Ne),St=function(oe){function te(z,re,se){var ne=oe.call(this,z,re,se)||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=se.defaultColor,ne.strokeWidth=se.defaultStrokeWidth,ne.strokeDasharray=se.defaultStrokeDasharray,ne.fillColor=se.defaultFillColor,ne.textColor=se.defaultStrokeColor,ne.fontFamily=se.defaultFontFamily,ne.fontSize=se.defaultCaptionFontSize,ne.captionText=se.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",me(se.defaultColorSet,["transparent"]),ne.strokeColor),ne.strokePanel.onColorChanged=ne.setStrokeColor,ne.fillPanel=new Ae("Fill color",me(se.defaultColorSet,["transparent"]),ne.fillColor,ce),ne.fillPanel.onColorChanged=ne.setFillColor,ne.strokeWidthPanel=new tt("Line width",se.defaultStrokeWidths,se.defaultStrokeWidth),ne.strokeWidthPanel.onWidthChanged=ne.setStrokeWidth,ne.strokeStylePanel=new ct("Line style",se.defaultStrokeDasharrays,se.defaultStrokeDasharray),ne.strokeStylePanel.onStyleChanged=ne.setStrokeDasharray,ne.fontFamilyPanel=new Le("Font",se.defaultFontFamilies,se.defaultFontFamily),ne.fontFamilyPanel.onFontChanged=ne.setFont,ne.textColorPanel=new Ae("Text color",se.defaultColorSet,ne.textColor,pe),ne.textColorPanel.onColorChanged=ne.setTextColor,ne}return ot(te,oe),te.prototype.ownsTarget=function(z){return!(!oe.prototype.ownsTarget.call(this,z)&&z!==this.visual&&z!==this.frame&&z!==this.captionBg&&z!==this.captionElement)},te.prototype.createVisual=function(){this.visual=ge.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=ge.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=ge.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=ge.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},te.prototype.setCaptionText=function(z){this.captionText=z,this.captionElement.textContent=this.captionText,this.sizeCaption()},te.prototype.pointerDown=function(z,re){oe.prototype.pointerDown.call(this,z,re),this.isMoved=!1,this.pointerDownPoint=z,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(z),this._state="creating")},te.prototype.manipulate=function(z){oe.prototype.manipulate.call(this,z),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(z.x-this.pointerDownPoint.x)>5||Math.abs(z.y-this.pointerDownPoint.y)>5)},te.prototype.resize=function(z){oe.prototype.resize.call(this,z),this.setSize()},te.prototype.sizeCaption=function(){var z=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=z.width+2*this.PADDING,this.captionBoxHeight=z.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),ge.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),ge.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},te.prototype.showTextEditor=function(){var z=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",function(re){re.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(re){re.key==="Enter"&&z.finishTextEditing(z.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(re){re.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){z.finishTextEditing(z.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){z.finishTextEditing(z.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},te.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},te.prototype.finishTextEditing=function(z){this.setCaptionText(z.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},te.prototype.setFont=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["font-family",z]]),this.fontFamily=z,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},te.prototype.setTextColor=function(z){this.captionElement&&ge.setAttributes(this.captionElement,[["fill",z]]),this.textColor=z,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},te.prototype.setSize=function(){oe.prototype.setSize.call(this),ge.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},te.prototype.pointerUp=function(z){oe.prototype.pointerUp.call(this,z),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},te.prototype.dblClick=function(z,re){oe.prototype.dblClick.call(this,z,re),this.showTextEditor()},te.prototype.setStrokeColor=function(z){this.strokeColor=z,this.frame&&ge.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(z),this.stateChanged()},te.prototype.setFillColor=function(z){this.fillColor=z,this.captionBg&&ge.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(z),this.stateChanged()},te.prototype.setStrokeWidth=function(z){this.strokeWidth=z,this.frame&&ge.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},te.prototype.setStrokeDasharray=function(z){this.strokeDasharray=z,this.frame&&ge.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(te.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),te.prototype.getState=function(){var z=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},oe.prototype.getState.call(this));return z.typeName=this.typeName,z},te.prototype.restoreState=function(z){var re=z;this.fillColor=re.fillColor,this.strokeColor=re.strokeColor,this.strokeWidth=re.strokeWidth,this.strokeDasharray=re.strokeDasharray,this.textColor=re.textColor,this.fontFamily=re.fontFamily,this.captionText=re.captionText,this.fontSize=re.fontSize,this.createVisual(),oe.prototype.restoreState.call(this,z),this.setSize()},te.prototype.scale=function(z,re){oe.prototype.scale.call(this,z,re),this.setSize()},te.typeName="CaptionFrameMarker",te.title="Caption frame marker",te.icon='',te}(ut),Ye=function(){function oe(te,z){z===void 0&&(z=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=te,this.cancelable=z}return Object.defineProperty(oe.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),oe.prototype.preventDefault=function(){this._defaultPrevented=!0},oe}(),gt=function(oe){function te(z,re,se){var ne=oe.call(this,z,!1)||this;return ne.dataUrl=re,ne.state=se,ne}return ot(te,oe),te}(Ye),Ee=function(oe){function te(z,re,se){se===void 0&&(se=!1);var ne=oe.call(this,z,se)||this;return ne.marker=re,ne}return ot(te,oe),te}(Ye),lt=function(){function oe(){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 oe.prototype.addEventListener=function(te,z){this[te].push(z)},oe.prototype.removeEventListener=function(te,z){var re=this[te].indexOf(z);re>-1&&this[te].splice(re,1)},oe}(),pt=function(){function oe(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 Be,this._isOpen=!1,this.undoRedoManager=new Ge,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 lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=oe.instanceCounter++,this.styles=new fe(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(oe.prototype,"ALL_MARKER_TYPES",{get:function(){return[Zt,we,Et,Oe,xe,vt,ft,_e,it,Je,Xe,ze,St]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,we,Et,Oe,vt,ft,_e]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,we,Et,Oe,ft]},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(te){var z=this;this._availableMarkerTypes.splice(0),te.forEach(function(re){if(typeof re=="string"){var se=z.ALL_MARKER_TYPES.find(function(ne){return ne.typeName===re});se!==void 0&&z._availableMarkerTypes.push(se)}else z._availableMarkerTypes.push(re)})},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(oe.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(oe.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),oe.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},oe.prototype.show=function(){var te=this;this.styles.styleSheetRoot===void 0&&Ce.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ce.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(z){return z(new Ye(te))})},oe.prototype.render=function(){return Pe(this,void 0,void 0,function(){var te;return We(this,function(z){switch(z.label){case 0:return this.setCurrentMarker(),(te=new Ve).naturalSize=this.renderAtNaturalSize,te.imageType=this.renderImageType,te.imageQuality=this.renderImageQuality,te.markersOnly=this.renderMarkersOnly,te.width=this.renderWidth,te.height=this.renderHeight,[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return z.sent(),[4,te.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,z.sent()]}})})},oe.prototype.close=function(te){var z=this;if(te===void 0&&(te=!1),this.isOpen){var re=!1;te||this.eventListeners.beforeclose.forEach(function(se){var ne=new Ye(z,!0);se(ne),ne.defaultPrevented&&(re=!0)}),re||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(se){return se(new Ye(z))}),this.detachEvents(),this._isOpen=!1)}},oe.prototype.addMarkersToToolbar=function(){for(var te,z=[],re=0;rethis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*te:this.editorCanvas.clientWidth,re=z',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()},oe.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")},oe.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"},oe.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},oe.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 st(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-1&&this.markers.splice(this.markers.indexOf(te),1),te.dispose()},oe.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())},oe.prototype.toolbarButtonClicked=function(te,z){if(te==="marker"&&z!==void 0)this.createNewMarker(z);else if(te==="action")switch(z){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},oe.prototype.deleteSelectedMarker=function(){var te=this;if(this._currentMarker!==void 0){var z=!1;if(this.eventListeners.markerbeforedelete.forEach(function(se){var ne=new Ee(te,te._currentMarker,!0);se(ne),ne.defaultPrevented&&(z=!0)}),!z){var re=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(se){return se(new Ee(te,re))})}}},oe.prototype.clear=function(){var te=this,z=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var Ze=new Ee(te,void 0,!0);ye(Ze),Ze.defaultPrevented&&(z=!0)}),!z)){this.setCurrentMarker();for(var re=function(ye){var Ze=se.markers[ye];se.setCurrentMarker(se.markers[ye]),se._currentMarker.dispose(),se.markerImage.removeChild(se._currentMarker.container),se.markers.splice(se.markers.indexOf(se._currentMarker),1),se.eventListeners.markerdelete.forEach(function(Dt){return Dt(new Ee(te,Ze))})},se=this,ne=this.markers.length-1;ne>=0;ne--)re(ne);this.addUndoStep()}},Object.defineProperty(oe.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),oe.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))},oe.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)},oe.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},oe.prototype.addUndoStep=function(){var te=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var z=this.getState(),re=this.undoRedoManager.getLastUndoStep();if(!re||re.width===z.width&&re.height===z.height){var se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(z),se1&&this.panTo({x:te.clientX,y:te.clientY}))},oe.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()},oe.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},oe.prototype.onKeyUp=function(te){this._currentMarker===void 0||this.notesArea!==void 0||te.key!=="Delete"&&te.key!=="Backspace"||this.deleteSelectedMarker()},oe.prototype.clientToLocalCoordinates=function(te,z){var re=this.markerImage.getBoundingClientRect();return{x:(te-re.left)/this.zoomLevel,y:(z-re.top)/this.zoomLevel}},oe.prototype.onWindowResize=function(){this.positionUI()},oe.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()},oe.prototype.addLicenseKey=function(te){Re.addKey(te)},oe.prototype.addEventListener=function(te,z){this.eventListeners.addEventListener(te,z)},oe.prototype.removeEventListener=function(te,z){this.eventListeners.removeEventListener(te,z)},oe.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(oe.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),oe.prototype.focus=function(){var te=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(z){return z(new Ye(te))}))},oe.prototype.blur=function(){var te=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(z){return z(new Ye(te))}))},oe.instanceCounter=0,oe}()},66042:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return Oe}});var le=de(98506),ot=de(16886),Pe=de(43403),We=de(34280),me=de(59301),ge=me.createContext(null),Re=me.createContext({}),Ve=ge,Ce=de(52873),fe=de(67711),Qe=de(92310),ve=de.n(Qe),st=de(77900),He=de(10228),Te=de(26112),Ae=de(33346),De=de(8654),$e=["prefixCls","className","containerRef"],at=function(Fe){var Et=Fe.prefixCls,Je=Fe.className,mt=Fe.containerRef,ft=(0,Ae.Z)(Fe,$e),pe=me.useContext(Re),ce=pe.panel,_e=(0,De.x1)(ce,mt);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(Et,"-content"),Je),role:"dialog",ref:_e},(0,Te.Z)(Fe,{aria:!0}),{"aria-modal":"true"},ft))},ht=at,ut=de(48736);function qe(we){return typeof we=="string"&&String(Number(we))===we?((0,ut.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(we)):we}function tt(we){warning(!("wrapperClassName"in we),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!we.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ct={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Zt(we,Fe){var Et,Je,mt,ft=we.prefixCls,pe=we.open,ce=we.placement,_e=we.inline,vt=we.push,it=we.forceRender,xe=we.autoFocus,Ge=we.keyboard,ze=we.classNames,St=we.rootClassName,Ye=we.rootStyle,gt=we.zIndex,Ee=we.className,lt=we.id,pt=we.style,oe=we.motion,te=we.width,z=we.height,re=we.children,se=we.mask,ne=we.maskClosable,ye=we.maskMotion,Ze=we.maskClassName,Dt=we.maskStyle,Lt=we.afterOpenChange,dt=we.onClose,yt=we.onMouseEnter,Ht=we.onMouseOver,Mt=we.onMouseLeave,Yt=we.onClick,jt=we.onKeyDown,Tt=we.onKeyUp,tn=we.styles,Gt=we.drawerRender,nn=me.useRef(),nt=me.useRef(),ln=me.useRef();me.useImperativeHandle(Fe,function(){return nn.current});var _t=function(qn){var $t=qn.keyCode,sn=qn.shiftKey;switch($t){case He.Z.TAB:{if($t===He.Z.TAB){if(!sn&&document.activeElement===ln.current){var hn;(hn=nt.current)===null||hn===void 0||hn.focus({preventScroll:!0})}else if(sn&&document.activeElement===nt.current){var Ln;(Ln=ln.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}}break}case He.Z.ESC:{dt&&Ge&&(qn.stopPropagation(),dt(qn));break}}};me.useEffect(function(){if(pe&&xe){var Pn;(Pn=nn.current)===null||Pn===void 0||Pn.focus({preventScroll:!0})}},[pe]);var Xt=me.useState(!1),on=(0,ot.Z)(Xt,2),En=on[0],cn=on[1],vn=me.useContext(Ve),Jn;typeof vt=="boolean"?Jn=vt?{}:{distance:0}:Jn=vt||{};var jn=(Et=(Je=(mt=Jn)===null||mt===void 0?void 0:mt.distance)!==null&&Je!==void 0?Je:vn==null?void 0:vn.pushDistance)!==null&&Et!==void 0?Et:180,Wr=me.useMemo(function(){return{pushDistance:jn,push:function(){cn(!0)},pull:function(){cn(!1)}}},[jn]);me.useEffect(function(){if(pe){var Pn;vn==null||(Pn=vn.push)===null||Pn===void 0||Pn.call(vn)}else{var qn;vn==null||(qn=vn.pull)===null||qn===void 0||qn.call(vn)}},[pe]),me.useEffect(function(){return function(){var Pn;vn==null||(Pn=vn.pull)===null||Pn===void 0||Pn.call(vn)}},[]);var zr=se&&me.createElement(st.default,(0,fe.Z)({key:"mask"},ye,{visible:pe}),function(Pn,qn){var $t=Pn.className,sn=Pn.style;return me.createElement("div",{className:ve()("".concat(ft,"-mask"),$t,ze==null?void 0:ze.mask,Ze),style:(0,le.Z)((0,le.Z)((0,le.Z)({},sn),Dt),tn==null?void 0:tn.mask),onClick:ne&&pe?dt:void 0,ref:qn})}),yr=typeof oe=="function"?oe(ce):oe,sr={};if(En&&jn)switch(ce){case"top":sr.transform="translateY(".concat(jn,"px)");break;case"bottom":sr.transform="translateY(".concat(-jn,"px)");break;case"left":sr.transform="translateX(".concat(jn,"px)");break;default:sr.transform="translateX(".concat(-jn,"px)");break}ce==="left"||ce==="right"?sr.width=qe(te):sr.height=qe(z);var Nn={onMouseEnter:yt,onMouseOver:Ht,onMouseLeave:Mt,onClick:Yt,onKeyDown:jt,onKeyUp:Tt},ir=me.createElement(st.default,(0,fe.Z)({key:"panel"},yr,{visible:pe,forceRender:it,onVisibleChanged:function(qn){Lt==null||Lt(qn)},removeOnLeave:!1,leavedClassName:"".concat(ft,"-content-wrapper-hidden")}),function(Pn,qn){var $t=Pn.className,sn=Pn.style,hn=me.createElement(ht,(0,fe.Z)({id:lt,containerRef:qn,prefixCls:ft,className:ve()(Ee,ze==null?void 0:ze.content),style:(0,le.Z)((0,le.Z)({},pt),tn==null?void 0:tn.content)},(0,Te.Z)(we,{aria:!0}),Nn),re);return me.createElement("div",(0,fe.Z)({className:ve()("".concat(ft,"-content-wrapper"),ze==null?void 0:ze.wrapper,$t),style:(0,le.Z)((0,le.Z)((0,le.Z)({},sr),sn),tn==null?void 0:tn.wrapper)},(0,Te.Z)(we,{data:!0})),Gt?Gt(hn):hn)}),Er=(0,le.Z)({},Ye);return gt&&(Er.zIndex=gt),me.createElement(Ve.Provider,{value:Wr},me.createElement("div",{className:ve()(ft,"".concat(ft,"-").concat(ce),St,(0,Ce.Z)((0,Ce.Z)({},"".concat(ft,"-open"),pe),"".concat(ft,"-inline"),_e)),style:Er,tabIndex:-1,ref:nn,onKeyDown:_t},zr,me.createElement("div",{tabIndex:0,ref:nt,style:ct,"aria-hidden":"true","data-sentinel":"start"}),ir,me.createElement("div",{tabIndex:0,ref:ln,style:ct,"aria-hidden":"true","data-sentinel":"end"})))}var Be=me.forwardRef(Zt),Ne=Be,Xe=function(Fe){var Et=Fe.open,Je=Et===void 0?!1:Et,mt=Fe.prefixCls,ft=mt===void 0?"rc-drawer":mt,pe=Fe.placement,ce=pe===void 0?"right":pe,_e=Fe.autoFocus,vt=_e===void 0?!0:_e,it=Fe.keyboard,xe=it===void 0?!0:it,Ge=Fe.width,ze=Ge===void 0?378:Ge,St=Fe.mask,Ye=St===void 0?!0:St,gt=Fe.maskClosable,Ee=gt===void 0?!0:gt,lt=Fe.getContainer,pt=Fe.forceRender,oe=Fe.afterOpenChange,te=Fe.destroyOnClose,z=Fe.onMouseEnter,re=Fe.onMouseOver,se=Fe.onMouseLeave,ne=Fe.onClick,ye=Fe.onKeyDown,Ze=Fe.onKeyUp,Dt=Fe.panelRef,Lt=me.useState(!1),dt=(0,ot.Z)(Lt,2),yt=dt[0],Ht=dt[1],Mt=me.useState(!1),Yt=(0,ot.Z)(Mt,2),jt=Yt[0],Tt=Yt[1];(0,We.Z)(function(){Tt(!0)},[]);var tn=jt?Je:!1,Gt=me.useRef(),nn=me.useRef();(0,We.Z)(function(){tn&&(nn.current=document.activeElement)},[tn]);var nt=function(En){var cn;if(Ht(En),oe==null||oe(En),!En&&nn.current&&!((cn=Gt.current)!==null&&cn!==void 0&&cn.contains(nn.current))){var vn;(vn=nn.current)===null||vn===void 0||vn.focus({preventScroll:!0})}},ln=me.useMemo(function(){return{panel:Dt}},[Dt]);if(!pt&&!yt&&!tn&&te)return null;var _t={onMouseEnter:z,onMouseOver:re,onMouseLeave:se,onClick:ne,onKeyDown:ye,onKeyUp:Ze},Xt=(0,le.Z)((0,le.Z)({},Fe),{},{open:tn,prefixCls:ft,placement:ce,autoFocus:vt,keyboard:xe,width:ze,mask:Ye,maskClosable:Ee,inline:lt===!1,afterOpenChange:nt,ref:Gt},_t);return me.createElement(Re.Provider,{value:ln},me.createElement(Pe.Z,{open:tn||pt||yt,autoDestroy:!1,getContainer:lt,autoLock:Ye&&(tn||yt)},me.createElement(Ne,Xt)))},Le=Xe,Oe=Le},25930:function(Rt,It,de){"use strict";de.d(It,{Cd:function(){return Xe}});var le=de(67711),ot=de(98506),Pe=de(33346),We=de(59301),me=de(92310),ge=de.n(me),Re={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},Ve=function(){var we=(0,We.useRef)([]),Fe=(0,We.useRef)(null);return(0,We.useEffect)(function(){var Et=Date.now(),Je=!1;we.current.forEach(function(mt){if(mt){Je=!0;var ft=mt.style;ft.transitionDuration=".3s, .3s, .3s, .06s",Fe.current&&Et-Fe.current<100&&(ft.transitionDuration="0s, 0s")}}),Je&&(Fe.current=Date.now())}),we.current},Ce=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],fe=function(we){var Fe=(0,ot.Z)((0,ot.Z)({},Re),we),Et=Fe.className,Je=Fe.percent,mt=Fe.prefixCls,ft=Fe.strokeColor,pe=Fe.strokeLinecap,ce=Fe.strokeWidth,_e=Fe.style,vt=Fe.trailColor,it=Fe.trailWidth,xe=Fe.transition,Ge=(0,Pe.Z)(Fe,Ce);delete Ge.gapPosition;var ze=Array.isArray(Je)?Je:[Je],St=Array.isArray(ft)?ft:[ft],Ye=Ve(),gt=ce/2,Ee=100-ce/2,lt="M ".concat(pe==="round"?gt:0,",").concat(gt,` L `).concat(pe==="round"?Ee:100,",").concat(gt),pt="0 0 100 ".concat(ce),oe=0;return We.createElement("svg",(0,le.Z)({className:ge()("".concat(mt,"-line"),Et),viewBox:pt,preserveAspectRatio:"none",style:_e},Ge),We.createElement("path",{className:"".concat(mt,"-line-trail"),d:lt,strokeLinecap:pe,stroke:vt,strokeWidth:it||ce,fillOpacity:"0"}),ze.map(function(te,z){var re=1;switch(pe){case"round":re=1-ce/100;break;case"square":re=1-ce/2/100;break;default:re=1;break}var se={strokeDasharray:"".concat(te*re,"px, 100px"),strokeDashoffset:"-".concat(oe,"px"),transition:xe||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},ne=St[z]||St[St.length-1];return oe+=te,We.createElement("path",{key:z,className:"".concat(mt,"-line-path"),d:lt,strokeLinecap:pe,stroke:ne,strokeWidth:ce,fillOpacity:"0",ref:function(Ze){Ye[z]=Ze},style:se})}))},Qe=fe,ve=de(26420),st=de(16886),He=de(47273),Te=0,Ae=(0,He.Z)();function De(){var Oe;return Ae?(Oe=Te,Te+=1):Oe="TEST_OR_SSR",Oe}var $e=function(Oe){var we=We.useState(),Fe=(0,st.Z)(we,2),Et=Fe[0],Je=Fe[1];return We.useEffect(function(){Je("rc_progress_".concat(De()))},[]),Oe||Et},at=function(we){var Fe=we.bg,Et=we.children;return We.createElement("div",{style:{width:"100%",height:"100%",background:Fe}},Et)};function ht(Oe,we){return Object.keys(Oe).map(function(Fe){var Et=parseFloat(Fe),Je="".concat(Math.floor(Et*we),"%");return"".concat(Oe[Fe]," ").concat(Je)})}var ut=We.forwardRef(function(Oe,we){var Fe=Oe.prefixCls,Et=Oe.color,Je=Oe.gradientId,mt=Oe.radius,ft=Oe.style,pe=Oe.ptg,ce=Oe.strokeLinecap,_e=Oe.strokeWidth,vt=Oe.size,it=Oe.gapDegree,xe=Et&&(0,ve.Z)(Et)==="object",Ge=xe?"#FFF":void 0,ze=vt/2,St=We.createElement("circle",{className:"".concat(Fe,"-circle-path"),r:mt,cx:ze,cy:ze,stroke:Ge,strokeLinecap:ce,strokeWidth:_e,opacity:pe===0?0:1,style:ft,ref:we});if(!xe)return St;var Ye="".concat(Je,"-conic"),gt=it?"".concat(180+it/2,"deg"):"0deg",Ee=ht(Et,(360-it)/360),lt=ht(Et,1),pt="conic-gradient(from ".concat(gt,", ").concat(Ee.join(", "),")"),oe="linear-gradient(to ".concat(it?"bottom":"top",", ").concat(lt.join(", "),")");return We.createElement(We.Fragment,null,We.createElement("mask",{id:Ye},St),We.createElement("foreignObject",{x:0,y:0,width:vt,height:vt,mask:"url(#".concat(Ye,")")},We.createElement(at,{bg:oe},We.createElement(at,{bg:pt}))))}),qe=ut,tt=100,ct=function(we,Fe,Et,Je,mt,ft,pe,ce,_e,vt){var it=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,xe=Et/100*360*((360-ft)/360),Ge=ft===0?0:{bottom:0,top:180,left:90,right:-90}[pe],ze=(100-Je)/100*Fe;_e==="round"&&Je!==100&&(ze+=vt/2,ze>=Fe&&(ze=Fe-.01));var St=tt/2;return{stroke:typeof ce=="string"?ce:void 0,strokeDasharray:"".concat(Fe,"px ").concat(we),strokeDashoffset:ze+it,transform:"rotate(".concat(mt+xe+Ge,"deg)"),transformOrigin:"".concat(St,"px ").concat(St,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Zt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Be(Oe){var we=Oe!=null?Oe:[];return Array.isArray(we)?we:[we]}var Ne=function(we){var Fe=(0,ot.Z)((0,ot.Z)({},Re),we),Et=Fe.id,Je=Fe.prefixCls,mt=Fe.steps,ft=Fe.strokeWidth,pe=Fe.trailWidth,ce=Fe.gapDegree,_e=ce===void 0?0:ce,vt=Fe.gapPosition,it=Fe.trailColor,xe=Fe.strokeLinecap,Ge=Fe.style,ze=Fe.className,St=Fe.strokeColor,Ye=Fe.percent,gt=(0,Pe.Z)(Fe,Zt),Ee=tt/2,lt=$e(Et),pt="".concat(lt,"-gradient"),oe=Ee-ft/2,te=Math.PI*2*oe,z=_e>0?90+_e/2:-90,re=te*((360-_e)/360),se=(0,ve.Z)(mt)==="object"?mt:{count:mt,gap:2},ne=se.count,ye=se.gap,Ze=Be(Ye),Dt=Be(St),Lt=Dt.find(function(Tt){return Tt&&(0,ve.Z)(Tt)==="object"}),dt=Lt&&(0,ve.Z)(Lt)==="object",yt=dt?"butt":xe,Ht=ct(te,re,0,100,z,_e,vt,it,yt,ft),Mt=Ve(),Yt=function(){var tn=0;return Ze.map(function(Gt,nn){var nt=Dt[nn]||Dt[Dt.length-1],ln=ct(te,re,tn,Gt,z,_e,vt,nt,yt,ft);return tn+=Gt,We.createElement(qe,{key:nn,color:nt,ptg:Gt,radius:oe,prefixCls:Je,gradientId:pt,style:ln,strokeLinecap:yt,strokeWidth:ft,gapDegree:_e,ref:function(Xt){Mt[nn]=Xt},size:tt})}).reverse()},jt=function(){var tn=Math.round(ne*(Ze[0]/100)),Gt=100/ne,nn=0;return new Array(ne).fill(null).map(function(nt,ln){var _t=ln<=tn-1?Dt[0]:it,Xt=_t&&(0,ve.Z)(_t)==="object"?"url(#".concat(pt,")"):void 0,on=ct(te,re,nn,Gt,z,_e,vt,_t,"butt",ft,ye);return nn+=(re-on.strokeDashoffset+ye)*100/re,We.createElement("circle",{key:ln,className:"".concat(Je,"-circle-path"),r:oe,cx:Ee,cy:Ee,stroke:Xt,strokeWidth:ft,opacity:1,style:on,ref:function(cn){Mt[ln]=cn}})})};return We.createElement("svg",(0,le.Z)({className:ge()("".concat(Je,"-circle"),ze),viewBox:"0 0 ".concat(tt," ").concat(tt),style:Ge,id:Et,role:"presentation"},gt),!ne&&We.createElement("circle",{className:"".concat(Je,"-circle-trail"),r:oe,cx:Ee,cy:Ee,stroke:it,strokeLinecap:yt,strokeWidth:pe||ft,style:Ht}),ne?jt():Yt())},Xe=Ne,Le={Line:Qe,Circle:Xe}},6551:function(Rt,It,de){"use strict";de.d(It,{ZP:function(){return Re}});var le=de(16886),ot=de(59301),Pe=de(47273),We=0,me=(0,Pe.Z)();function ge(){var Ve;return me?(Ve=We,We+=1):Ve="TEST_OR_SSR",Ve}function Re(Ve){var Ce=ot.useState(),fe=(0,le.Z)(Ce,2),Qe=fe[0],ve=fe[1];return ot.useEffect(function(){ve("rc_select_".concat(ge()))},[]),Ve||Qe}},37463:function(Rt,It,de){"use strict";de.d(It,{Ac:function(){return nt},Xo:function(){return _t},Wx:function(){return on},ZP:function(){return In},lk:function(){return ht}});var le=de(67711),ot=de(15142),Pe=de(52873),We=de(98506),me=de(16886),ge=de(33346),Re=de(26420),Ve=de(18929),Ce=de(48736),fe=de(59301),Qe=de(92310),ve=de.n(Qe),st=de(34280),He=de(49658),Te=de(8654),Ae=function(Me){var Ft=Me.className,bt=Me.customizeIcon,Ie=Me.customizeIconProps,xt=Me.children,Vt=Me.onMouseDown,Jt=Me.onClick,rn=typeof bt=="function"?bt(Ie):bt;return fe.createElement("span",{className:Ft,onMouseDown:function(Kt){Kt.preventDefault(),Vt==null||Vt(Kt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Jt,"aria-hidden":!0},rn!==void 0?rn:fe.createElement("span",{className:ve()(Ft.split(/\s+/).map(function(Ue){return"".concat(Ue,"-icon")}))},xt))},De=Ae,$e=function(Me,Ft,bt,Ie,xt){var Vt=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Jt=arguments.length>6?arguments[6]:void 0,rn=arguments.length>7?arguments[7]:void 0,Ue=fe.useMemo(function(){if((0,Re.Z)(Ie)==="object")return Ie.clearIcon;if(xt)return xt},[Ie,xt]),Kt=fe.useMemo(function(){return!!(!Vt&&Ie&&(bt.length||Jt)&&!(rn==="combobox"&&Jt===""))},[Ie,Vt,bt.length,Jt,rn]);return{allowClear:Kt,clearIcon:fe.createElement(De,{className:"".concat(Me,"-clear"),onMouseDown:Ft,customizeIcon:Ue},"\xD7")}},at=fe.createContext(null);function ht(){return fe.useContext(at)}function ut(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Me=fe.useState(!1),Ft=(0,me.Z)(Me,2),bt=Ft[0],Ie=Ft[1],xt=fe.useRef(null),Vt=function(){window.clearTimeout(xt.current)};fe.useEffect(function(){return Vt},[]);var Jt=function(Ue,Kt){Vt(),xt.current=window.setTimeout(function(){Ie(Ue),Kt&&Kt()},ke)};return[bt,Jt,Vt]}function qe(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Me=fe.useRef(null),Ft=fe.useRef(null);fe.useEffect(function(){return function(){window.clearTimeout(Ft.current)}},[]);function bt(Ie){(Ie||Me.current===null)&&(Me.current=Ie),window.clearTimeout(Ft.current),Ft.current=window.setTimeout(function(){Me.current=null},ke)}return[function(){return Me.current},bt]}function tt(ke,Me,Ft,bt){var Ie=fe.useRef(null);Ie.current={open:Me,triggerOpen:Ft,customizedTrigger:bt},fe.useEffect(function(){function xt(Vt){var Jt;if(!((Jt=Ie.current)!==null&&Jt!==void 0&&Jt.customizedTrigger)){var rn=Vt.target;rn.shadowRoot&&Vt.composed&&(rn=Vt.composedPath()[0]||rn),Ie.current.open&&ke().filter(function(Ue){return Ue}).every(function(Ue){return!Ue.contains(rn)&&Ue!==rn})&&Ie.current.triggerOpen(!1)}}return window.addEventListener("mousedown",xt),function(){return window.removeEventListener("mousedown",xt)}},[])}var ct=de(10228);function Zt(ke){return ke&&![ct.Z.ESC,ct.Z.SHIFT,ct.Z.BACKSPACE,ct.Z.TAB,ct.Z.WIN_KEY,ct.Z.ALT,ct.Z.META,ct.Z.WIN_KEY_RIGHT,ct.Z.CTRL,ct.Z.SEMICOLON,ct.Z.EQUALS,ct.Z.CAPS_LOCK,ct.Z.CONTEXT_MENU,ct.Z.F1,ct.Z.F2,ct.Z.F3,ct.Z.F4,ct.Z.F5,ct.Z.F6,ct.Z.F7,ct.Z.F8,ct.Z.F9,ct.Z.F10,ct.Z.F11,ct.Z.F12].includes(ke)}var Be=de(26112),Ne=de(11780);function Xe(ke,Me,Ft){var bt=(0,We.Z)((0,We.Z)({},ke),Ft?Me:{});return Object.keys(Me).forEach(function(Ie){var xt=Me[Ie];typeof xt=="function"&&(bt[Ie]=function(){for(var Vt,Jt=arguments.length,rn=new Array(Jt),Ue=0;UeKn&&(Fn="".concat(Vn.slice(0,Kn),"..."))}var _n=function(rr){rr&&rr.stopPropagation(),Ar(rt)};return typeof Dn=="function"?qr(pn,Fn,Pt,bn,_n):li(rt,Fn,Pt,bn,_n)},Mn=function(rt){if(!Ie.length)return null;var Pt=typeof ar=="function"?ar(rt):ar;return typeof Dn=="function"?qr(void 0,Pt,!1,!1,void 0,!0):li({title:Pt},Pt,!1)},Bt=fe.createElement("div",{className:"".concat(br,"-search"),style:{width:dr},onFocus:function(){Dr(!0)},onBlur:function(){Dr(!1)}},fe.createElement(Et,{ref:rn,open:xt,prefixCls:bt,id:Ft,inputElement:null,disabled:Kt,autoFocus:Ut,autoComplete:fn,editable:Sr,activeDescendantId:un,value:ri,onKeyDown:wr,onMouseDown:cr,onChange:Qn,onPaste:ur,onCompositionStart:Gn,onCompositionEnd:Cr,onBlur:er,tabIndex:xn,attrs:(0,Be.Z)(Me,!0)}),fe.createElement("span",{ref:tr,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},ri,"\xA0")),Wt=fe.createElement(Ne.Z,{prefixCls:"".concat(br,"-overflow"),data:Ie,renderItem:Br,renderRest:Mn,suffix:Bt,itemKey:xe,maxCount:Wn});return fe.createElement("span",{className:"".concat(br,"-wrap")},Wt,!Ie.length&&!ri&&fe.createElement("span",{className:"".concat(br,"-placeholder")},Ue))},St=ze,Ye=function(Me){var Ft=Me.inputElement,bt=Me.prefixCls,Ie=Me.id,xt=Me.inputRef,Vt=Me.disabled,Jt=Me.autoFocus,rn=Me.autoComplete,Ue=Me.activeDescendantId,Kt=Me.mode,kt=Me.open,mn=Me.values,Ut=Me.placeholder,fn=Me.tabIndex,un=Me.showSearch,xn=Me.searchValue,yn=Me.activeValue,Wn=Me.maxLength,Kn=Me.onInputKeyDown,On=Me.onInputMouseDown,ar=Me.onInputChange,Dn=Me.onInputPaste,mr=Me.onInputCompositionStart,Ar=Me.onInputCompositionEnd,Qn=Me.onInputBlur,ur=Me.title,wr=fe.useState(!1),cr=(0,me.Z)(wr,2),Gn=cr[0],Cr=cr[1],er=Kt==="combobox",tr=er||un,hr=mn[0],Lr=xn||"";er&&yn&&!Gn&&(Lr=yn),fe.useEffect(function(){er&&Cr(!1)},[er,yn]);var dr=Kt!=="combobox"&&!kt&&!un?!1:!!Lr,Yn=ur===void 0?vt(hr):ur,Hn=fe.useMemo(function(){return hr?null:fe.createElement("span",{className:"".concat(bt,"-selection-placeholder"),style:dr?{visibility:"hidden"}:void 0},Ut)},[hr,dr,Ut,bt]);return fe.createElement("span",{className:"".concat(bt,"-selection-wrap")},fe.createElement("span",{className:"".concat(bt,"-selection-search")},fe.createElement(Et,{ref:xt,prefixCls:bt,id:Ie,open:kt,inputElement:Ft,disabled:Vt,autoFocus:Jt,autoComplete:rn,editable:tr,activeDescendantId:Ue,value:Lr,onKeyDown:Kn,onMouseDown:On,onChange:function(Zr){Cr(!0),ar(Zr)},onPaste:Dn,onCompositionStart:mr,onCompositionEnd:Ar,onBlur:Qn,tabIndex:fn,attrs:(0,Be.Z)(Me,!0),maxLength:er?Wn:void 0})),!er&&hr?fe.createElement("span",{className:"".concat(bt,"-selection-item"),title:Yn,style:dr?{visibility:"hidden"}:void 0},hr.label):null,Hn)},gt=Ye,Ee=function(Me,Ft){var bt=(0,fe.useRef)(null),Ie=(0,fe.useRef)(!1),xt=Me.prefixCls,Vt=Me.open,Jt=Me.mode,rn=Me.showSearch,Ue=Me.tokenWithEnter,Kt=Me.disabled,kt=Me.prefix,mn=Me.autoClearSearchValue,Ut=Me.onSearch,fn=Me.onSearchSubmit,un=Me.onToggleOpen,xn=Me.onInputKeyDown,yn=Me.onInputBlur,Wn=Me.domRef;fe.useImperativeHandle(Ft,function(){return{focus:function(Yn){bt.current.focus(Yn)},blur:function(){bt.current.blur()}}});var Kn=qe(0),On=(0,me.Z)(Kn,2),ar=On[0],Dn=On[1],mr=function(Yn){var Hn=Yn.which,nr=bt.current instanceof HTMLTextAreaElement;!nr&&Vt&&(Hn===ct.Z.UP||Hn===ct.Z.DOWN)&&Yn.preventDefault(),xn&&xn(Yn),Hn===ct.Z.ENTER&&Jt==="tags"&&!Ie.current&&!Vt&&(fn==null||fn(Yn.target.value)),!(nr&&!Vt&&~[ct.Z.UP,ct.Z.DOWN,ct.Z.LEFT,ct.Z.RIGHT].indexOf(Hn))&&Zt(Hn)&&un(!0)},Ar=function(){Dn(!0)},Qn=(0,fe.useRef)(null),ur=function(Yn){Ut(Yn,!0,Ie.current)!==!1&&un(!0)},wr=function(){Ie.current=!0},cr=function(Yn){Ie.current=!1,Jt!=="combobox"&&ur(Yn.target.value)},Gn=function(Yn){var Hn=Yn.target.value;if(Ue&&Qn.current&&/[\r\n]/.test(Qn.current)){var nr=Qn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Hn=Hn.replace(nr,Qn.current)}Qn.current=null,ur(Hn)},Cr=function(Yn){var Hn=Yn.clipboardData,nr=Hn==null?void 0:Hn.getData("text");Qn.current=nr||""},er=function(Yn){var Hn=Yn.target;if(Hn!==bt.current){var nr=document.body.style.msTouchAction!==void 0;nr?setTimeout(function(){bt.current.focus()}):bt.current.focus()}},tr=function(Yn){var Hn=ar();Yn.target!==bt.current&&!Hn&&!(Jt==="combobox"&&Kt)&&Yn.preventDefault(),(Jt!=="combobox"&&(!rn||!Hn)||!Vt)&&(Vt&&mn!==!1&&Ut("",!0,!1),un())},hr={inputRef:bt,onInputKeyDown:mr,onInputMouseDown:Ar,onInputChange:Gn,onInputPaste:Cr,onInputCompositionStart:wr,onInputCompositionEnd:cr,onInputBlur:yn},Lr=Jt==="multiple"||Jt==="tags"?fe.createElement(St,(0,le.Z)({},Me,hr)):fe.createElement(gt,(0,le.Z)({},Me,hr));return fe.createElement("div",{ref:Wn,className:"".concat(xt,"-selector"),onClick:er,onMouseDown:tr},kt&&fe.createElement("div",{className:"".concat(xt,"-prefix")},kt),Lr)},lt=fe.forwardRef(Ee),pt=lt,oe=de(65030),te=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(Me){var Ft=Me===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Ft,adjustY:1},htmlRegion:"scroll"}}},re=function(Me,Ft){var bt=Me.prefixCls,Ie=Me.disabled,xt=Me.visible,Vt=Me.children,Jt=Me.popupElement,rn=Me.animation,Ue=Me.transitionName,Kt=Me.dropdownStyle,kt=Me.dropdownClassName,mn=Me.direction,Ut=mn===void 0?"ltr":mn,fn=Me.placement,un=Me.builtinPlacements,xn=Me.dropdownMatchSelectWidth,yn=Me.dropdownRender,Wn=Me.dropdownAlign,Kn=Me.getPopupContainer,On=Me.empty,ar=Me.getTriggerDOMNode,Dn=Me.onPopupVisibleChange,mr=Me.onPopupMouseEnter,Ar=(0,ge.Z)(Me,te),Qn="".concat(bt,"-dropdown"),ur=Jt;yn&&(ur=yn(Jt));var wr=fe.useMemo(function(){return un||z(xn)},[un,xn]),cr=rn?"".concat(Qn,"-").concat(rn):Ue,Gn=typeof xn=="number",Cr=fe.useMemo(function(){return Gn?null:xn===!1?"minWidth":"width"},[xn,Gn]),er=Kt;Gn&&(er=(0,We.Z)((0,We.Z)({},er),{},{width:xn}));var tr=fe.useRef(null);return fe.useImperativeHandle(Ft,function(){return{getPopupElement:function(){var Lr;return(Lr=tr.current)===null||Lr===void 0?void 0:Lr.popupElement}}}),fe.createElement(oe.Z,(0,le.Z)({},Ar,{showAction:Dn?["click"]:[],hideAction:Dn?["click"]:[],popupPlacement:fn||(Ut==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:wr,prefixCls:Qn,popupTransitionName:cr,popup:fe.createElement("div",{onMouseEnter:mr},ur),ref:tr,stretch:Cr,popupAlign:Wn,popupVisible:xt,getPopupContainer:Kn,popupClassName:ve()(kt,(0,Pe.Z)({},"".concat(Qn,"-empty"),On)),popupStyle:er,getTriggerDOMNode:ar,onPopupVisibleChange:Dn}),Vt)},se=fe.forwardRef(re),ne=se,ye=de(57879);function Ze(ke,Me){var Ft=ke.key,bt;return"value"in ke&&(bt=ke.value),Ft!=null?Ft:bt!==void 0?bt:"rc-index-key-".concat(Me)}function Dt(ke){return typeof ke!="undefined"&&!Number.isNaN(ke)}function Lt(ke,Me){var Ft=ke||{},bt=Ft.label,Ie=Ft.value,xt=Ft.options,Vt=Ft.groupLabel,Jt=bt||(Me?"children":"label");return{label:Jt,value:Ie||"value",options:xt||"options",groupLabel:Vt||Jt}}function dt(ke){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ft=Me.fieldNames,bt=Me.childrenAsData,Ie=[],xt=Lt(Ft,!1),Vt=xt.label,Jt=xt.value,rn=xt.options,Ue=xt.groupLabel;function Kt(kt,mn){Array.isArray(kt)&&kt.forEach(function(Ut){if(mn||!(rn in Ut)){var fn=Ut[Jt];Ie.push({key:Ze(Ut,Ie.length),groupOption:mn,data:Ut,label:Ut[Vt],value:fn})}else{var un=Ut[Ue];un===void 0&&bt&&(un=Ut.label),Ie.push({key:Ze(Ut,Ie.length),group:!0,data:Ut,label:un}),Kt(Ut[rn],!0)}})}return Kt(ke,!1),Ie}function yt(ke){var Me=(0,We.Z)({},ke);return"props"in Me||Object.defineProperty(Me,"props",{get:function(){return(0,Ce.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Me}}),Me}var Ht=function(Me,Ft,bt){if(!Ft||!Ft.length)return null;var Ie=!1,xt=function Jt(rn,Ue){var Kt=(0,ye.Z)(Ue),kt=Kt[0],mn=Kt.slice(1);if(!kt)return[rn];var Ut=rn.split(kt);return Ie=Ie||Ut.length>1,Ut.reduce(function(fn,un){return[].concat((0,ot.Z)(fn),(0,ot.Z)(Jt(un,mn)))},[]).filter(Boolean)},Vt=xt(Me,Ft);return Ie?typeof bt!="undefined"?Vt.slice(0,bt):Vt:null},Mt=fe.createContext(null),Yt=Mt;function jt(ke){var Me=ke.visible,Ft=ke.values;if(!Me)return null;var bt=50;return fe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Ft.slice(0,bt).map(function(Ie){var xt=Ie.label,Vt=Ie.value;return["number","string"].includes((0,Re.Z)(xt))?xt:Vt}).join(", ")),Ft.length>bt?", ...":null)}var Tt=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],tn=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Gt=function(Me){return Me==="tags"||Me==="multiple"},nn=fe.forwardRef(function(ke,Me){var Ft,bt=ke.id,Ie=ke.prefixCls,xt=ke.className,Vt=ke.showSearch,Jt=ke.tagRender,rn=ke.direction,Ue=ke.omitDomProps,Kt=ke.displayValues,kt=ke.onDisplayValuesChange,mn=ke.emptyOptions,Ut=ke.notFoundContent,fn=Ut===void 0?"Not Found":Ut,un=ke.onClear,xn=ke.mode,yn=ke.disabled,Wn=ke.loading,Kn=ke.getInputElement,On=ke.getRawInputElement,ar=ke.open,Dn=ke.defaultOpen,mr=ke.onDropdownVisibleChange,Ar=ke.activeValue,Qn=ke.onActiveValueChange,ur=ke.activeDescendantId,wr=ke.searchValue,cr=ke.autoClearSearchValue,Gn=ke.onSearch,Cr=ke.onSearchSplit,er=ke.tokenSeparators,tr=ke.allowClear,hr=ke.prefix,Lr=ke.suffixIcon,dr=ke.clearIcon,Yn=ke.OptionList,Hn=ke.animation,nr=ke.transitionName,Zr=ke.dropdownStyle,Dr=ke.dropdownClassName,br=ke.dropdownMatchSelectWidth,ri=ke.dropdownRender,Sr=ke.dropdownAlign,li=ke.placement,qr=ke.builtinPlacements,Br=ke.getPopupContainer,Mn=ke.showAction,Bt=Mn===void 0?[]:Mn,Wt=ke.onFocus,wt=ke.onBlur,rt=ke.onKeyUp,Pt=ke.onKeyDown,Nt=ke.onMouseDown,pn=(0,ge.Z)(ke,Tt),bn=Gt(xn),Fn=(Vt!==void 0?Vt:bn)||xn==="combobox",Vn=(0,We.Z)({},pn);tn.forEach(function(Xn){delete Vn[Xn]}),Ue==null||Ue.forEach(function(Xn){delete Vn[Xn]});var _n=fe.useState(!1),fr=(0,me.Z)(_n,2),rr=fr[0],Rr=fr[1];fe.useEffect(function(){Rr((0,He.Z)())},[]);var Li=fe.useRef(null),ii=fe.useRef(null),Gr=fe.useRef(null),ui=fe.useRef(null),gr=fe.useRef(null),fi=fe.useRef(!1),Bi=ut(),pr=(0,me.Z)(Bi,3),yi=pr[0],pi=pr[1],Hi=pr[2];fe.useImperativeHandle(Me,function(){var Xn,Rn;return{focus:(Xn=ui.current)===null||Xn===void 0?void 0:Xn.focus,blur:(Rn=ui.current)===null||Rn===void 0?void 0:Rn.blur,scrollTo:function(ci){var Ur;return(Ur=gr.current)===null||Ur===void 0?void 0:Ur.scrollTo(ci)},nativeElement:Li.current||ii.current}});var bi=fe.useMemo(function(){var Xn;if(xn!=="combobox")return wr;var Rn=(Xn=Kt[0])===null||Xn===void 0?void 0:Xn.value;return typeof Rn=="string"||typeof Rn=="number"?String(Rn):""},[wr,xn,Kt]),_i=xn==="combobox"&&typeof Kn=="function"&&Kn()||null,kr=typeof On=="function"&&On(),Ri=(0,Te.x1)(ii,kr==null||(Ft=kr.props)===null||Ft===void 0?void 0:Ft.ref),$i=fe.useState(!1),eo=(0,me.Z)($i,2),Vo=eo[0],Yi=eo[1];(0,st.Z)(function(){Yi(!0)},[]);var Hr=(0,Ve.Z)(!1,{defaultValue:Dn,value:ar}),to=(0,me.Z)(Hr,2),ao=to[0],zi=to[1],Kr=Vo?ao:!1,bo=!fn&&mn;(yn||bo&&Kr&&xn==="combobox")&&(Kr=!1);var so=bo?!1:Kr,wn=fe.useCallback(function(Xn){var Rn=Xn!==void 0?Xn:!Kr;yn||(zi(Rn),Kr!==Rn&&(mr==null||mr(Rn)))},[yn,Kr,zi,mr]),Tn=fe.useMemo(function(){return(er||[]).some(function(Xn){return[` `,`\r `].includes(Xn)})},[er]),Sn=fe.useContext(Yt)||{},kn=Sn.maxCount,or=Sn.rawValues,Mr=function(Rn,ai,ci){if(!(bn&&Dt(kn)&&(or==null?void 0:or.size)>=kn)){var Ur=!0,Jr=Rn;Qn==null||Qn(null);var ji=Ht(Rn,er,Dt(kn)?kn-or.size:void 0),Wi=ci?null:ji;return xn!=="combobox"&&Wi&&(Jr="",Cr==null||Cr(Wi),wn(!1),Ur=!1),Gn&&bi!==Jr&&Gn(Jr,{source:ai?"typing":"effect"}),Ur}},Zi=function(Rn){!Rn||!Rn.trim()||Gn(Rn,{source:"submit"})};fe.useEffect(function(){!Kr&&!bn&&xn!=="combobox"&&Mr("",!1,!1)},[Kr]),fe.useEffect(function(){ao&&yn&&zi(!1),yn&&!fi.current&&pi(!1)},[yn]);var vi=qe(),oi=(0,me.Z)(vi,2),jr=oi[0],Oi=oi[1],Xi=fe.useRef(!1),Di=function(Rn){var ai=jr(),ci=Rn.key,Ur=ci==="Enter";if(Ur&&(xn!=="combobox"&&Rn.preventDefault(),Kr||wn(!0)),Oi(!!bi),ci==="Backspace"&&!ai&&bn&&!bi&&Kt.length){for(var Jr=(0,ot.Z)(Kt),ji=null,Wi=Jr.length-1;Wi>=0;Wi-=1){var ro=Jr[Wi];if(!ro.disabled){Jr.splice(Wi,1),ji=ro;break}}ji&&kt(Jr,{type:"remove",values:[ji]})}for(var Mi=arguments.length,Ti=new Array(Mi>1?Mi-1:0),Ui=1;Ui1?ai-1:0),Ur=1;Ur1?ji-1:0),ro=1;ro=fn},[Jt,fn,On==null?void 0:On.size]),er=function(Bt){Bt.preventDefault()},tr=function(Bt){var Wt;(Wt=Gn.current)===null||Wt===void 0||Wt.scrollTo(typeof Bt=="number"?{index:Bt}:Bt)},hr=fe.useCallback(function(Mn){return rn==="combobox"?!1:On.has(Mn)},[rn,(0,ot.Z)(On).toString(),On.size]),Lr=function(Bt){for(var Wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,wt=cr.length,rt=0;rt1&&arguments[1]!==void 0?arguments[1]:!1;nr(Bt);var wt={source:Wt?"keyboard":"mouse"},rt=cr[Bt];if(!rt){xn(null,-1,wt);return}xn(rt.value,Bt,wt)};(0,fe.useEffect)(function(){Zr(yn!==!1?Lr(0):-1)},[cr.length,Ue]);var Dr=fe.useCallback(function(Mn){return rn==="combobox"?String(Mn).toLowerCase()===Ue.toLowerCase():On.has(Mn)},[rn,Ue,(0,ot.Z)(On).toString(),On.size]);(0,fe.useEffect)(function(){var Mn=setTimeout(function(){if(!Jt&&Vt&&On.size===1){var Wt=Array.from(On)[0],wt=cr.findIndex(function(rt){var Pt=rt.data;return Ue?String(Pt.value).startsWith(Ue):Pt.value===Wt});wt!==-1&&(Zr(wt),tr(wt))}});if(Vt){var Bt;(Bt=Gn.current)===null||Bt===void 0||Bt.scrollTo(void 0)}return function(){return clearTimeout(Mn)}},[Vt,Ue]);var br=function(Bt){Bt!==void 0&&Wn(Bt,{selected:!On.has(Bt)}),Jt||Kt(!1)};if(fe.useImperativeHandle(Ft,function(){return{onKeyDown:function(Bt){var Wt=Bt.which,wt=Bt.ctrlKey;switch(Wt){case ct.Z.N:case ct.Z.P:case ct.Z.UP:case ct.Z.DOWN:{var rt=0;if(Wt===ct.Z.UP?rt=-1:Wt===ct.Z.DOWN?rt=1:Jn()&&wt&&(Wt===ct.Z.N?rt=1:Wt===ct.Z.P&&(rt=-1)),rt!==0){var Pt=Lr(Hn+rt,rt);tr(Pt),Zr(Pt,!0)}break}case ct.Z.TAB:case ct.Z.ENTER:{var Nt,pn=cr[Hn];pn&&!(pn!=null&&(Nt=pn.data)!==null&&Nt!==void 0&&Nt.disabled)&&!Cr?br(pn.value):br(void 0),Vt&&Bt.preventDefault();break}case ct.Z.ESC:Kt(!1),Vt&&Bt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Bt){tr(Bt)}}}),cr.length===0)return fe.createElement("div",{role:"listbox",id:"".concat(xt,"_list"),className:"".concat(wr,"-empty"),onMouseDown:er},kt);var ri=Object.keys(ar).map(function(Mn){return ar[Mn]}),Sr=function(Bt){return Bt.label};function li(Mn,Bt){var Wt=Mn.group;return{role:Wt?"presentation":"option",id:"".concat(xt,"_list_").concat(Bt)}}var qr=function(Bt){var Wt=cr[Bt];if(!Wt)return null;var wt=Wt.data||{},rt=wt.value,Pt=Wt.group,Nt=(0,Be.Z)(wt,!0),pn=Sr(Wt);return Wt?fe.createElement("div",(0,le.Z)({"aria-label":typeof pn=="string"&&!Pt?pn:null},Nt,{key:Bt},li(Wt,Bt),{"aria-selected":Dr(rt)}),rt):null},Br={role:"listbox",id:"".concat(xt,"_list")};return fe.createElement(fe.Fragment,null,Dn&&fe.createElement("div",(0,le.Z)({},Br,{style:{height:0,width:0,overflow:"hidden"}}),qr(Hn-1),qr(Hn),qr(Hn+1)),fe.createElement(vn.Z,{itemKey:"key",ref:Gn,data:cr,height:Ar,itemHeight:Qn,fullHeight:!1,onMouseDown:er,onScroll:mn,virtual:Dn,direction:mr,innerProps:Dn?null:Br},function(Mn,Bt){var Wt=Mn.group,wt=Mn.groupOption,rt=Mn.data,Pt=Mn.label,Nt=Mn.value,pn=rt.key;if(Wt){var bn,Fn=(bn=rt.title)!==null&&bn!==void 0?bn:Wr(Pt)?Pt.toString():void 0;return fe.createElement("div",{className:ve()(wr,"".concat(wr,"-group"),rt.className),title:Fn},Pt!==void 0?Pt:pn)}var Vn=rt.disabled,_n=rt.title,fr=rt.children,rr=rt.style,Rr=rt.className,Li=(0,ge.Z)(rt,jn),ii=(0,cn.Z)(Li,ri),Gr=hr(Nt),ui=Vn||!Gr&&Cr,gr="".concat(wr,"-option"),fi=ve()(wr,gr,Rr,(0,Pe.Z)((0,Pe.Z)((0,Pe.Z)((0,Pe.Z)({},"".concat(gr,"-grouped"),wt),"".concat(gr,"-active"),Hn===Bt&&!ui),"".concat(gr,"-disabled"),ui),"".concat(gr,"-selected"),Gr)),Bi=Sr(Mn),pr=!Kn||typeof Kn=="function"||Gr,yi=typeof Bi=="number"?Bi:Bi||Nt,pi=Wr(yi)?yi.toString():void 0;return _n!==void 0&&(pi=_n),fe.createElement("div",(0,le.Z)({},(0,Be.Z)(ii),Dn?{}:li(Mn,Bt),{"aria-selected":Dr(Nt),className:fi,title:pi,onMouseMove:function(){Hn===Bt||ui||Zr(Bt)},onClick:function(){ui||br(Nt)},style:rr}),fe.createElement("div",{className:"".concat(gr,"-content")},typeof ur=="function"?ur(Mn,{index:Bt}):yi),fe.isValidElement(Kn)||Gr,pr&&fe.createElement(De,{className:"".concat(wr,"-option-state"),customizeIcon:Kn,customizeIconProps:{value:Nt,disabled:ui,isSelected:Gr}},Gr?"\u2713":null))}))},yr=fe.forwardRef(zr),sr=yr,Nn=function(ke,Me){var Ft=fe.useRef({values:new Map,options:new Map}),bt=fe.useMemo(function(){var xt=Ft.current,Vt=xt.values,Jt=xt.options,rn=ke.map(function(kt){if(kt.label===void 0){var mn;return(0,We.Z)((0,We.Z)({},kt),{},{label:(mn=Vt.get(kt.value))===null||mn===void 0?void 0:mn.label})}return kt}),Ue=new Map,Kt=new Map;return rn.forEach(function(kt){Ue.set(kt.value,kt),Kt.set(kt.value,Me.get(kt.value)||Jt.get(kt.value))}),Ft.current.values=Ue,Ft.current.options=Kt,rn},[ke,Me]),Ie=fe.useCallback(function(xt){return Me.get(xt)||Ft.current.options.get(xt)},[Me]);return[bt,Ie]};function ir(ke,Me){return Je(ke).join("").toUpperCase().includes(Me)}var Er=function(ke,Me,Ft,bt,Ie){return fe.useMemo(function(){if(!Ft||bt===!1)return ke;var xt=Me.options,Vt=Me.label,Jt=Me.value,rn=[],Ue=typeof bt=="function",Kt=Ft.toUpperCase(),kt=Ue?bt:function(Ut,fn){return Ie?ir(fn[Ie],Kt):fn[xt]?ir(fn[Vt!=="children"?Vt:"label"],Kt):ir(fn[Jt],Kt)},mn=Ue?function(Ut){return yt(Ut)}:function(Ut){return Ut};return ke.forEach(function(Ut){if(Ut[xt]){var fn=kt(Ft,mn(Ut));if(fn)rn.push(Ut);else{var un=Ut[xt].filter(function(xn){return kt(Ft,mn(xn))});un.length&&rn.push((0,We.Z)((0,We.Z)({},Ut),{},(0,Pe.Z)({},xt,un)))}return}kt(Ft,mn(Ut))&&rn.push(Ut)}),rn},[ke,bt,Ie,Ft,Me])},Pn=de(6551),qn=de(11592),$t=["children","value"],sn=["children"];function hn(ke){var Me=ke,Ft=Me.key,bt=Me.props,Ie=bt.children,xt=bt.value,Vt=(0,ge.Z)(bt,$t);return(0,We.Z)({key:Ft,value:xt!==void 0?xt:Ft,children:Ie},Vt)}function Ln(ke){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,qn.Z)(ke).map(function(Ft,bt){if(!fe.isValidElement(Ft)||!Ft.type)return null;var Ie=Ft,xt=Ie.type.isSelectOptGroup,Vt=Ie.key,Jt=Ie.props,rn=Jt.children,Ue=(0,ge.Z)(Jt,sn);return Me||!xt?hn(Ft):(0,We.Z)((0,We.Z)({key:"__RC_SELECT_GRP__".concat(Vt===null?bt:Vt,"__"),label:Vt},Ue),{},{options:Ln(rn)})}).filter(function(Ft){return Ft})}var Fr=function(Me,Ft,bt,Ie,xt){return fe.useMemo(function(){var Vt=Me,Jt=!Me;Jt&&(Vt=Ln(Ft));var rn=new Map,Ue=new Map,Kt=function(Ut,fn,un){un&&typeof un=="string"&&Ut.set(fn[un],fn)},kt=function mn(Ut){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,un=0;un1&&arguments[1]!==void 0?arguments[1]:!1,Vt=0;Vt0?wn(kn.options):kn.options}):kn})},pr=fe.useMemo(function(){return Wn?Bi(fi):fi},[fi,Wn,Br]),yi=fe.useMemo(function(){return dt(pr,{fieldNames:Sr,childrenAsData:br})},[pr,Sr,br]),pi=function(Tn){var Sn=Pt(Tn);if(Fn(Sn),Yn&&(Sn.length!==rr.length||Sn.some(function(Mr,Zi){var vi;return((vi=rr[Zi])===null||vi===void 0?void 0:vi.value)!==(Mr==null?void 0:Mr.value)}))){var kn=dr?Sn:Sn.map(function(Mr){return Mr.value}),or=Sn.map(function(Mr){return yt(Rr(Mr.value))});Yn(Dr?kn:kn[0],Dr?or:or[0])}},Hi=fe.useState(null),bi=(0,me.Z)(Hi,2),_i=bi[0],kr=bi[1],Ri=fe.useState(0),$i=(0,me.Z)(Ri,2),eo=$i[0],Vo=$i[1],Yi=Ar!==void 0?Ar:bt!=="combobox",Hr=fe.useCallback(function(wn,Tn){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},kn=Sn.source,or=kn===void 0?"keyboard":kn;Vo(Tn),Vt&&bt==="combobox"&&wn!==null&&or==="keyboard"&&kr(String(wn))},[Vt,bt]),to=function(Tn,Sn,kn){var or=function(){var no,Gi=Rr(Tn);return[dr?{label:Gi==null?void 0:Gi[Sr.label],value:Tn,key:(no=Gi==null?void 0:Gi.key)!==null&&no!==void 0?no:Tn}:Tn,yt(Gi)]};if(Sn&&Ut){var Mr=or(),Zi=(0,me.Z)(Mr,2),vi=Zi[0],oi=Zi[1];Ut(vi,oi)}else if(!Sn&&fn&&kn!=="clear"){var jr=or(),Oi=(0,me.Z)(jr,2),Xi=Oi[0],Di=Oi[1];fn(Xi,Di)}},ao=$n(function(wn,Tn){var Sn,kn=Dr?Tn.selected:!0;kn?Sn=Dr?[].concat((0,ot.Z)(rr),[wn]):[wn]:Sn=rr.filter(function(or){return or.value!==wn}),pi(Sn),to(wn,kn),bt==="combobox"?kr(""):(!Gt||mn)&&(Mn(""),kr(""))}),zi=function(Tn,Sn){pi(Tn);var kn=Sn.type,or=Sn.values;(kn==="remove"||kn==="clear")&&or.forEach(function(Mr){to(Mr.value,!1,kn)})},Kr=function(Tn,Sn){if(Mn(Tn),kr(null),Sn.source==="submit"){var kn=(Tn||"").trim();if(kn){var or=Array.from(new Set([].concat((0,ot.Z)(ii),[kn])));pi(or),to(kn,!0),Mn("")}return}Sn.source!=="blur"&&(bt==="combobox"&&pi(Tn),Kt==null||Kt(Tn))},bo=function(Tn){var Sn=Tn;bt!=="tags"&&(Sn=Tn.map(function(or){var Mr=wt.get(or);return Mr==null?void 0:Mr.value}).filter(function(or){return or!==void 0}));var kn=Array.from(new Set([].concat((0,ot.Z)(ii),(0,ot.Z)(Sn))));pi(kn),kn.forEach(function(or){to(or,!0)})},so=fe.useMemo(function(){var wn=ur!==!1&&xn!==!1;return(0,We.Z)((0,We.Z)({},Bt),{},{flattenOptions:yi,onActiveValue:Hr,defaultActiveFirstOption:Yi,onSelect:ao,menuItemSelectedIcon:Qn,rawValues:ii,fieldNames:Sr,virtual:wn,direction:wr,listHeight:Gn,listItemHeight:er,childrenAsData:br,maxCount:Hn,optionRender:Dn})},[Hn,Bt,yi,Hr,Yi,ao,Qn,ii,Sr,ur,xn,wr,Gn,er,br,Dn]);return fe.createElement(Yt.Provider,{value:so},fe.createElement(nt,(0,le.Z)({},nr,{id:Zr,prefixCls:xt,ref:Me,omitDomProps:Or,mode:bt,displayValues:Li,onDisplayValuesChange:zi,direction:wr,searchValue:Br,onSearch:Kr,autoClearSearchValue:mn,onSearchSplit:bo,dropdownMatchSelectWidth:xn,OptionList:sr,emptyOptions:!yi.length,activeValue:_i,activeDescendantId:"".concat(Zr,"_list_").concat(eo)})))}),en=et;en.Option=on,en.OptGroup=_t;var An=en,In=An},63158:function(Rt,It,de){"use strict";var le=de(67711),ot=de(52873),Pe=de(16886),We=de(33346),me=de(59301),ge=de(92310),Re=de.n(ge),Ve=de(18929),Ce=de(10228),fe=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Qe=me.forwardRef(function(ve,st){var He,Te=ve.prefixCls,Ae=Te===void 0?"rc-switch":Te,De=ve.className,$e=ve.checked,at=ve.defaultChecked,ht=ve.disabled,ut=ve.loadingIcon,qe=ve.checkedChildren,tt=ve.unCheckedChildren,ct=ve.onClick,Zt=ve.onChange,Be=ve.onKeyDown,Ne=(0,We.Z)(ve,fe),Xe=(0,Ve.Z)(!1,{value:$e,defaultValue:at}),Le=(0,Pe.Z)(Xe,2),Oe=Le[0],we=Le[1];function Fe(ft,pe){var ce=Oe;return ht||(ce=ft,we(ce),Zt==null||Zt(ce,pe)),ce}function Et(ft){ft.which===Ce.Z.LEFT?Fe(!1,ft):ft.which===Ce.Z.RIGHT&&Fe(!0,ft),Be==null||Be(ft)}function Je(ft){var pe=Fe(!Oe,ft);ct==null||ct(pe,ft)}var mt=Re()(Ae,De,(He={},(0,ot.Z)(He,"".concat(Ae,"-checked"),Oe),(0,ot.Z)(He,"".concat(Ae,"-disabled"),ht),He));return me.createElement("button",(0,le.Z)({},Ne,{type:"button",role:"switch","aria-checked":Oe,disabled:ht,className:mt,ref:st,onKeyDown:Et,onClick:Je}),ut,me.createElement("span",{className:"".concat(Ae,"-inner")},me.createElement("span",{className:"".concat(Ae,"-inner-checked")},qe),me.createElement("span",{className:"".concat(Ae,"-inner-unchecked")},tt)))});Qe.displayName="Switch",It.Z=Qe},22711:function(Rt,It,de){"use strict";de.r(It),de.d(It,{ResizableTextArea:function(){return Le},default:function(){return Et}});var le=de(67711),ot=de(52873),Pe=de(98506),We=de(15142),me=de(16886),ge=de(33346),Re=de(92310),Ve=de.n(Re),Ce=de(36901),fe=de(66003),Qe=de(30292),ve=de(18929),st=de(59301),He=de(26420),Te=de(29301),Ae=de(34280),De=de(16089),$e=` min-height:0 !important; max-height:none !important; height:0 !important; visibility:hidden !important; overflow:hidden !important; position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; pointer-events: none !important; `,at=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],ht={},ut;function qe(Je){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft=Je.getAttribute("id")||Je.getAttribute("data-reactid")||Je.getAttribute("name");if(mt&&ht[ft])return ht[ft];var pe=window.getComputedStyle(Je),ce=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),_e=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),vt=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),it=at.map(function(Ge){return"".concat(Ge,":").concat(pe.getPropertyValue(Ge))}).join(";"),xe={sizingStyle:it,paddingSize:_e,borderSize:vt,boxSizing:ce};return mt&&ft&&(ht[ft]=xe),xe}function tt(Je){var mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ut||(ut=document.createElement("textarea"),ut.setAttribute("tab-index","-1"),ut.setAttribute("aria-hidden","true"),ut.setAttribute("name","hiddenTextarea"),document.body.appendChild(ut)),Je.getAttribute("wrap")?ut.setAttribute("wrap",Je.getAttribute("wrap")):ut.removeAttribute("wrap");var ce=qe(Je,mt),_e=ce.paddingSize,vt=ce.borderSize,it=ce.boxSizing,xe=ce.sizingStyle;ut.setAttribute("style","".concat(xe,";").concat($e)),ut.value=Je.value||Je.placeholder||"";var Ge=void 0,ze=void 0,St,Ye=ut.scrollHeight;if(it==="border-box"?Ye+=vt:it==="content-box"&&(Ye-=_e),ft!==null||pe!==null){ut.value=" ";var gt=ut.scrollHeight-_e;ft!==null&&(Ge=gt*ft,it==="border-box"&&(Ge=Ge+_e+vt),Ye=Math.max(Ge,Ye)),pe!==null&&(ze=gt*pe,it==="border-box"&&(ze=ze+_e+vt),St=Ye>ze?"":"hidden",Ye=Math.min(ze,Ye))}var Ee={height:Ye,overflowY:St,resize:"none"};return Ge&&(Ee.minHeight=Ge),ze&&(Ee.maxHeight=ze),Ee}var ct=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Be=1,Ne=2,Xe=st.forwardRef(function(Je,mt){var ft=Je,pe=ft.prefixCls,ce=ft.defaultValue,_e=ft.value,vt=ft.autoSize,it=ft.onResize,xe=ft.className,Ge=ft.style,ze=ft.disabled,St=ft.onChange,Ye=ft.onInternalAutoSize,gt=(0,ge.Z)(ft,ct),Ee=(0,ve.Z)(ce,{value:_e,postState:function(on){return on!=null?on:""}}),lt=(0,me.Z)(Ee,2),pt=lt[0],oe=lt[1],te=function(on){oe(on.target.value),St==null||St(on)},z=st.useRef();st.useImperativeHandle(mt,function(){return{textArea:z.current}});var re=st.useMemo(function(){return vt&&(0,He.Z)(vt)==="object"?[vt.minRows,vt.maxRows]:[]},[vt]),se=(0,me.Z)(re,2),ne=se[0],ye=se[1],Ze=!!vt,Dt=function(){try{if(document.activeElement===z.current){var on=z.current,En=on.selectionStart,cn=on.selectionEnd,vn=on.scrollTop;z.current.setSelectionRange(En,cn),z.current.scrollTop=vn}}catch(Jn){}},Lt=st.useState(Ne),dt=(0,me.Z)(Lt,2),yt=dt[0],Ht=dt[1],Mt=st.useState(),Yt=(0,me.Z)(Mt,2),jt=Yt[0],Tt=Yt[1],tn=function(){Ht(Zt)};(0,Ae.Z)(function(){Ze&&tn()},[_e,ne,ye,Ze]),(0,Ae.Z)(function(){if(yt===Zt)Ht(Be);else if(yt===Be){var Xt=tt(z.current,!1,ne,ye);Ht(Ne),Tt(Xt)}else Dt()},[yt]);var Gt=st.useRef(),nn=function(){De.Z.cancel(Gt.current)},nt=function(on){yt===Ne&&(it==null||it(on),vt&&(nn(),Gt.current=(0,De.Z)(function(){tn()})))};st.useEffect(function(){return nn},[]);var ln=Ze?jt:null,_t=(0,Pe.Z)((0,Pe.Z)({},Ge),ln);return(yt===Zt||yt===Be)&&(_t.overflowY="hidden",_t.overflowX="hidden"),st.createElement(Te.Z,{onResize:nt,disabled:!(vt||it)},st.createElement("textarea",(0,le.Z)({},gt,{ref:z,style:_t,className:Ve()(pe,xe,(0,ot.Z)({},"".concat(pe,"-disabled"),ze)),disabled:ze,value:pt,onChange:te})))}),Le=Xe,Oe=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],we=st.forwardRef(function(Je,mt){var ft,pe=Je.defaultValue,ce=Je.value,_e=Je.onFocus,vt=Je.onBlur,it=Je.onChange,xe=Je.allowClear,Ge=Je.maxLength,ze=Je.onCompositionStart,St=Je.onCompositionEnd,Ye=Je.suffix,gt=Je.prefixCls,Ee=gt===void 0?"rc-textarea":gt,lt=Je.showCount,pt=Je.count,oe=Je.className,te=Je.style,z=Je.disabled,re=Je.hidden,se=Je.classNames,ne=Je.styles,ye=Je.onResize,Ze=Je.onClear,Dt=Je.onPressEnter,Lt=Je.readOnly,dt=Je.autoSize,yt=Je.onKeyDown,Ht=(0,ge.Z)(Je,Oe),Mt=(0,ve.Z)(pe,{value:ce,defaultValue:pe}),Yt=(0,me.Z)(Mt,2),jt=Yt[0],Tt=Yt[1],tn=jt==null?"":String(jt),Gt=st.useState(!1),nn=(0,me.Z)(Gt,2),nt=nn[0],ln=nn[1],_t=st.useRef(!1),Xt=st.useState(null),on=(0,me.Z)(Xt,2),En=on[0],cn=on[1],vn=(0,st.useRef)(null),Jn=(0,st.useRef)(null),jn=function(){var en;return(en=Jn.current)===null||en===void 0?void 0:en.textArea},Wr=function(){jn().focus()};(0,st.useImperativeHandle)(mt,function(){var et;return{resizableTextArea:Jn.current,focus:Wr,blur:function(){jn().blur()},nativeElement:((et=vn.current)===null||et===void 0?void 0:et.nativeElement)||jn()}}),(0,st.useEffect)(function(){ln(function(et){return!z&&et})},[z]);var zr=st.useState(null),yr=(0,me.Z)(zr,2),sr=yr[0],Nn=yr[1];st.useEffect(function(){if(sr){var et;(et=jn()).setSelectionRange.apply(et,(0,We.Z)(sr))}},[sr]);var ir=(0,fe.Z)(pt,lt),Er=(ft=ir.max)!==null&&ft!==void 0?ft:Ge,Pn=Number(Er)>0,qn=ir.strategy(tn),$t=!!Er&&qn>Er,sn=function(en,An){var In=An;!_t.current&&ir.exceedFormatter&&ir.max&&ir.strategy(An)>ir.max&&(In=ir.exceedFormatter(An,{max:ir.max}),An!==In&&Nn([jn().selectionStart||0,jn().selectionEnd||0])),Tt(In),(0,Qe.rJ)(en.currentTarget,en,it,In)},hn=function(en){_t.current=!0,ze==null||ze(en)},Ln=function(en){_t.current=!1,sn(en,en.currentTarget.value),St==null||St(en)},Fr=function(en){sn(en,en.target.value)},Un=function(en){en.key==="Enter"&&Dt&&Dt(en),yt==null||yt(en)},$n=function(en){ln(!0),_e==null||_e(en)},Pr=function(en){ln(!1),vt==null||vt(en)},lr=function(en){Tt(""),Wr(),(0,Qe.rJ)(jn(),en,it)},Bn=Ye,Zn;ir.show&&(ir.showFormatter?Zn=ir.showFormatter({value:tn,count:qn,maxLength:Er}):Zn="".concat(qn).concat(Pn?" / ".concat(Er):""),Bn=st.createElement(st.Fragment,null,Bn,st.createElement("span",{className:Ve()("".concat(Ee,"-data-count"),se==null?void 0:se.count),style:ne==null?void 0:ne.count},Zn)));var Or=function(en){var An;ye==null||ye(en),(An=jn())!==null&&An!==void 0&&An.style.height&&cn(!0)},Ot=!dt&&!lt&&!xe;return st.createElement(Ce.BaseInput,{ref:vn,value:tn,allowClear:xe,handleReset:lr,suffix:Bn,prefixCls:Ee,classNames:(0,Pe.Z)((0,Pe.Z)({},se),{},{affixWrapper:Ve()(se==null?void 0:se.affixWrapper,(0,ot.Z)((0,ot.Z)({},"".concat(Ee,"-show-count"),lt),"".concat(Ee,"-textarea-allow-clear"),xe))}),disabled:z,focused:nt,className:Ve()(oe,$t&&"".concat(Ee,"-out-of-range")),style:(0,Pe.Z)((0,Pe.Z)({},te),En&&!Ot?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Zn=="string"?Zn:void 0}},hidden:re,readOnly:Lt,onClear:Ze},st.createElement(Le,(0,le.Z)({},Ht,{autoSize:dt,maxLength:Ge,onKeyDown:Un,onChange:Fr,onFocus:$n,onBlur:Pr,onCompositionStart:hn,onCompositionEnd:Ln,className:Ve()(se==null?void 0:se.textarea),style:(0,Pe.Z)((0,Pe.Z)({},ne==null?void 0:ne.textarea),{},{resize:te==null?void 0:te.resize}),disabled:z,prefixCls:Ee,onResize:Or,ref:Jn,readOnly:Lt})))}),Fe=we,Et=Fe},90472:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return Je}});var le=de(67711),ot=de(42573),Pe=de(58698),We=de(62437),me=de(74700),ge=de(45080),Re=de(52873),Ve=de(59301),Ce=de(98506),fe=de(33346),Qe=de(26420),ve=de(77910),st=de(51343),He=de(15142),Te=de(92310),Ae=de.n(Te),De=de(26112),$e=de(48736),at=function(mt,ft){if(mt&&ft){var pe=Array.isArray(ft)?ft:ft.split(","),ce=mt.name||"",_e=mt.type||"",vt=_e.replace(/\/.*$/,"");return pe.some(function(it){var xe=it.trim();if(/^\*(\/\*)?$/.test(it))return!0;if(xe.charAt(0)==="."){var Ge=ce.toLowerCase(),ze=xe.toLowerCase(),St=[ze];return(ze===".jpg"||ze===".jpeg")&&(St=[".jpg",".jpeg"]),St.some(function(Ye){return Ge.endsWith(Ye)})}return/\/\*$/.test(xe)?vt===xe.replace(/\/.*$/,""):_e===xe?!0:/^\w+$/.test(xe)?((0,$e.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(xe,"'.Skip for check.")),!0):!1})}return!0};function ht(mt,ft){var pe="cannot ".concat(mt.method," ").concat(mt.action," ").concat(ft.status,"'"),ce=new Error(pe);return ce.status=ft.status,ce.method=mt.method,ce.url=mt.action,ce}function ut(mt){var ft=mt.responseText||mt.response;if(!ft)return ft;try{return JSON.parse(ft)}catch(pe){return ft}}function qe(mt){var ft=new XMLHttpRequest;mt.onProgress&&ft.upload&&(ft.upload.onprogress=function(vt){vt.total>0&&(vt.percent=vt.loaded/vt.total*100),mt.onProgress(vt)});var pe=new FormData;mt.data&&Object.keys(mt.data).forEach(function(_e){var vt=mt.data[_e];if(Array.isArray(vt)){vt.forEach(function(it){pe.append("".concat(_e,"[]"),it)});return}pe.append(_e,vt)}),mt.file instanceof Blob?pe.append(mt.filename,mt.file,mt.file.name):pe.append(mt.filename,mt.file),ft.onerror=function(vt){mt.onError(vt)},ft.onload=function(){return ft.status<200||ft.status>=300?mt.onError(ht(mt,ft),ut(ft)):mt.onSuccess(ut(ft),ft)},ft.open(mt.method,mt.action,!0),mt.withCredentials&&"withCredentials"in ft&&(ft.withCredentials=!0);var ce=mt.headers||{};return ce["X-Requested-With"]!==null&&ft.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(ce).forEach(function(_e){ce[_e]!==null&&ft.setRequestHeader(_e,ce[_e])}),ft.send(pe),{abort:function(){ft.abort()}}}var tt=function(){var mt=(0,st.Z)((0,ve.Z)().mark(function ft(pe,ce){var _e,vt,it,xe,Ge,ze,St,Ye;return(0,ve.Z)().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:ze=function(){return ze=(0,st.Z)((0,ve.Z)().mark(function pt(oe){return(0,ve.Z)().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.abrupt("return",new Promise(function(re){oe.file(function(se){ce(se)?(oe.fullPath&&!se.webkitRelativePath&&(Object.defineProperties(se,{webkitRelativePath:{writable:!0}}),se.webkitRelativePath=oe.fullPath.replace(/^\//,""),Object.defineProperties(se,{webkitRelativePath:{writable:!1}})),re(se)):re(null)})}));case 1:case"end":return z.stop()}},pt)})),ze.apply(this,arguments)},Ge=function(pt){return ze.apply(this,arguments)},xe=function(){return xe=(0,st.Z)((0,ve.Z)().mark(function pt(oe){var te,z,re,se,ne;return(0,ve.Z)().wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:te=oe.createReader(),z=[];case 2:return Ze.next=5,new Promise(function(Dt){te.readEntries(Dt,function(){return Dt([])})});case 5:if(re=Ze.sent,se=re.length,se){Ze.next=9;break}return Ze.abrupt("break",12);case 9:for(ne=0;nene?z-(re-ne):z+(re-se)}function at(oe,te,z){var re=oe.length,se=te.length,ne,ye;if(re===0&&se===0)return null;re2&&arguments[2]!==void 0?arguments[2]:!1,yt=Dt?Lt<0&&Ze.current.left||Lt>0&&Ze.current.right:Lt<0&&Ze.current.top||Lt>0&&Ze.current.bottom;return dt&&yt?(clearTimeout(ne.current),se.current=!1):(!yt||se.current)&&ye(),!se.current&&yt}};function Zt(oe,te,z,re,se,ne,ye){var Ze=(0,ve.useRef)(0),Dt=(0,ve.useRef)(null),Lt=(0,ve.useRef)(null),dt=(0,ve.useRef)(!1),yt=ct(te,z,re,se);function Ht(Gt,nn){if(ut.Z.cancel(Dt.current),!yt(!1,nn)){var nt=Gt;if(!nt._virtualHandled)nt._virtualHandled=!0;else return;Ze.current+=nn,Lt.current=nn,tt||nt.preventDefault(),Dt.current=(0,ut.Z)(function(){var ln=dt.current?10:1;ye(Ze.current*ln,!1),Ze.current=0})}}function Mt(Gt,nn){ye(nn,!0),tt||Gt.preventDefault()}var Yt=(0,ve.useRef)(null),jt=(0,ve.useRef)(null);function Tt(Gt){if(oe){ut.Z.cancel(jt.current),jt.current=(0,ut.Z)(function(){Yt.current=null},2);var nn=Gt.deltaX,nt=Gt.deltaY,ln=Gt.shiftKey,_t=nn,Xt=nt;(Yt.current==="sx"||!Yt.current&&ln&&nt&&!nn)&&(_t=nt,Xt=0,Yt.current="sx");var on=Math.abs(_t),En=Math.abs(Xt);Yt.current===null&&(Yt.current=ne&&on>En?"x":"y"),Yt.current==="y"?Ht(Gt,Xt):Mt(Gt,_t)}}function tn(Gt){oe&&(dt.current=Gt.detail===Lt.current)}return[Tt,tn]}function Be(oe,te,z,re){var se=ve.useMemo(function(){return[new Map,[]]},[oe,z.id,re]),ne=(0,me.Z)(se,2),ye=ne[0],Ze=ne[1],Dt=function(dt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dt,Ht=ye.get(dt),Mt=ye.get(yt);if(Ht===void 0||Mt===void 0)for(var Yt=oe.length,jt=Ze.length;jt0&&arguments[0]!==void 0?arguments[0]:!1;dt();var Yt=function(){var tn=!1;Ze.current.forEach(function(Gt,nn){if(Gt&&Gt.offsetParent){var nt=Gt.offsetHeight,ln=getComputedStyle(Gt),_t=ln.marginTop,Xt=ln.marginBottom,on=we(_t),En=we(Xt),cn=nt+on+En;Dt.current.get(nn)!==cn&&(Dt.current.set(nn,cn),tn=!0)}}),tn&&ye(function(Gt){return Gt+1})};if(Mt)Yt();else{Lt.current+=1;var jt=Lt.current;Promise.resolve().then(function(){jt===Lt.current&&Yt()})}}function Ht(Mt,Yt){var jt=oe(Mt),Tt=Ze.current.get(jt);Yt?(Ze.current.set(jt,Yt),yt()):Ze.current.delete(jt),!Tt!=!Yt&&(Yt?te==null||te(Mt):z==null||z(Mt))}return(0,ve.useEffect)(function(){return dt},[]),[Ht,yt,Dt.current,ne]}var Et=14/15;function Je(oe,te,z){var re=(0,ve.useRef)(!1),se=(0,ve.useRef)(0),ne=(0,ve.useRef)(0),ye=(0,ve.useRef)(null),Ze=(0,ve.useRef)(null),Dt,Lt=function(Mt){if(re.current){var Yt=Math.ceil(Mt.touches[0].pageX),jt=Math.ceil(Mt.touches[0].pageY),Tt=se.current-Yt,tn=ne.current-jt,Gt=Math.abs(Tt)>Math.abs(tn);Gt?se.current=Yt:ne.current=jt;var nn=z(Gt,Gt?Tt:tn,!1,Mt);nn&&Mt.preventDefault(),clearInterval(Ze.current),nn&&(Ze.current=setInterval(function(){Gt?Tt*=Et:tn*=Et;var nt=Math.floor(Gt?Tt:tn);(!z(Gt,nt,!0)||Math.abs(nt)<=.1)&&clearInterval(Ze.current)},16))}},dt=function(){re.current=!1,Dt()},yt=function(Mt){Dt(),Mt.touches.length===1&&!re.current&&(re.current=!0,se.current=Math.ceil(Mt.touches[0].pageX),ne.current=Math.ceil(Mt.touches[0].pageY),ye.current=Mt.target,ye.current.addEventListener("touchmove",Lt,{passive:!1}),ye.current.addEventListener("touchend",dt,{passive:!0}))};Dt=function(){ye.current&&(ye.current.removeEventListener("touchmove",Lt),ye.current.removeEventListener("touchend",dt))},(0,Qe.Z)(function(){return oe&&te.current.addEventListener("touchstart",yt,{passive:!0}),function(){var Ht;(Ht=te.current)===null||Ht===void 0||Ht.removeEventListener("touchstart",yt),Dt(),clearInterval(Ze.current)}},[oe])}function mt(oe){return Math.floor(Math.pow(oe,.5))}function ft(oe,te){var z="touches"in oe?oe.touches[0]:oe;return z[te?"pageX":"pageY"]-window[te?"scrollX":"scrollY"]}function pe(oe,te,z){ve.useEffect(function(){var re=te.current;if(oe&&re){var se=!1,ne,ye,Ze=function(){ut.Z.cancel(ne)},Dt=function Ht(){Ze(),ne=(0,ut.Z)(function(){z(ye),Ht()})},Lt=function(Mt){if(!(Mt.target.draggable||Mt.button!==0)){var Yt=Mt;Yt._virtualHandled||(Yt._virtualHandled=!0,se=!0)}},dt=function(){se=!1,Ze()},yt=function(Mt){if(se){var Yt=ft(Mt,!1),jt=re.getBoundingClientRect(),Tt=jt.top,tn=jt.bottom;if(Yt<=Tt){var Gt=Tt-Yt;ye=-mt(Gt),Dt()}else if(Yt>=tn){var nn=Yt-tn;ye=mt(nn),Dt()}else Ze()}};return re.addEventListener("mousedown",Lt),re.ownerDocument.addEventListener("mouseup",dt),re.ownerDocument.addEventListener("mousemove",yt),function(){re.removeEventListener("mousedown",Lt),re.ownerDocument.removeEventListener("mouseup",dt),re.ownerDocument.removeEventListener("mousemove",yt),Ze()}}},[oe])}var ce=10;function _e(oe,te,z,re,se,ne,ye,Ze){var Dt=ve.useRef(),Lt=ve.useState(null),dt=(0,me.Z)(Lt,2),yt=dt[0],Ht=dt[1];return(0,Qe.Z)(function(){if(yt&&yt.times=0;Wr-=1){var zr=se(te[Wr]),yr=z.get(zr);if(yr===void 0){Gt=!0;break}if(jn-=yr,jn<=0)break}switch(ln){case"top":nt=Xt-Tt;break;case"bottom":nt=on-tn+Tt;break;default:{var sr=oe.current.scrollTop,Nn=sr+tn;XtNn&&(nn="bottom")}}nt!==null&&ye(nt),nt!==yt.lastTop&&(Gt=!0)}Gt&&Ht((0,Pe.Z)((0,Pe.Z)({},yt),{},{times:yt.times+1,targetAlign:nn,lastTop:nt}))}},[yt,oe.current]),function(Mt){if(Mt==null){Ze();return}if(ut.Z.cancel(Dt.current),typeof Mt=="number")ye(Mt);else if(Mt&&(0,ot.Z)(Mt)==="object"){var Yt,jt=Mt.align;"index"in Mt?Yt=Mt.index:Yt=te.findIndex(function(Gt){return se(Gt)===Mt.key});var Tt=Mt.offset,tn=Tt===void 0?0:Tt;Ht({times:0,index:Yt,offset:tn,originAlign:jt})}}}var vt=ve.forwardRef(function(oe,te){var z=oe.prefixCls,re=oe.rtl,se=oe.scrollOffset,ne=oe.scrollRange,ye=oe.onStartMove,Ze=oe.onStopMove,Dt=oe.onScroll,Lt=oe.horizontal,dt=oe.spinSize,yt=oe.containerSize,Ht=oe.style,Mt=oe.thumbStyle,Yt=oe.showScrollBar,jt=ve.useState(!1),Tt=(0,me.Z)(jt,2),tn=Tt[0],Gt=Tt[1],nn=ve.useState(null),nt=(0,me.Z)(nn,2),ln=nt[0],_t=nt[1],Xt=ve.useState(null),on=(0,me.Z)(Xt,2),En=on[0],cn=on[1],vn=!re,Jn=ve.useRef(),jn=ve.useRef(),Wr=ve.useState(Yt),zr=(0,me.Z)(Wr,2),yr=zr[0],sr=zr[1],Nn=ve.useRef(),ir=function(){Yt===!0||Yt===!1||(clearTimeout(Nn.current),sr(!0),Nn.current=setTimeout(function(){sr(!1)},3e3))},Er=ne-yt||0,Pn=yt-dt||0,qn=ve.useMemo(function(){if(se===0||Er===0)return 0;var lr=se/Er;return lr*Pn},[se,Er,Pn]),$t=function(Bn){Bn.stopPropagation(),Bn.preventDefault()},sn=ve.useRef({top:qn,dragging:tn,pageY:ln,startTop:En});sn.current={top:qn,dragging:tn,pageY:ln,startTop:En};var hn=function(Bn){Gt(!0),_t(ft(Bn,Lt)),cn(sn.current.top),ye(),Bn.stopPropagation(),Bn.preventDefault()};ve.useEffect(function(){var lr=function(Ot){Ot.preventDefault()},Bn=Jn.current,Zn=jn.current;return Bn.addEventListener("touchstart",lr,{passive:!1}),Zn.addEventListener("touchstart",hn,{passive:!1}),function(){Bn.removeEventListener("touchstart",lr),Zn.removeEventListener("touchstart",hn)}},[]);var Ln=ve.useRef();Ln.current=Er;var Fr=ve.useRef();Fr.current=Pn,ve.useEffect(function(){if(tn){var lr,Bn=function(Ot){var et=sn.current,en=et.dragging,An=et.pageY,In=et.startTop;ut.Z.cancel(lr);var ke=Jn.current.getBoundingClientRect(),Me=yt/(Lt?ke.width:ke.height);if(en){var Ft=(ft(Ot,Lt)-An)*Me,bt=In;!vn&&Lt?bt-=Ft:bt+=Ft;var Ie=Ln.current,xt=Fr.current,Vt=xt?bt/xt:0,Jt=Math.ceil(Vt*Ie);Jt=Math.max(Jt,0),Jt=Math.min(Jt,Ie),lr=(0,ut.Z)(function(){Dt(Jt,Lt)})}},Zn=function(){Gt(!1),Ze()};return window.addEventListener("mousemove",Bn,{passive:!0}),window.addEventListener("touchmove",Bn,{passive:!0}),window.addEventListener("mouseup",Zn,{passive:!0}),window.addEventListener("touchend",Zn,{passive:!0}),function(){window.removeEventListener("mousemove",Bn),window.removeEventListener("touchmove",Bn),window.removeEventListener("mouseup",Zn),window.removeEventListener("touchend",Zn),ut.Z.cancel(lr)}}},[tn]),ve.useEffect(function(){return ir(),function(){clearTimeout(Nn.current)}},[se]),ve.useImperativeHandle(te,function(){return{delayHidden:ir}});var Un="".concat(z,"-scrollbar"),$n={position:"absolute",visibility:yr?null:"hidden"},Pr={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Lt?(Object.assign($n,{height:8,left:0,right:0,bottom:0}),Object.assign(Pr,(0,We.Z)({height:"100%",width:dt},vn?"left":"right",qn))):(Object.assign($n,(0,We.Z)({width:8,top:0,bottom:0},vn?"right":"left",0)),Object.assign(Pr,{width:"100%",height:dt,top:qn})),ve.createElement("div",{ref:Jn,className:Ve()(Un,(0,We.Z)((0,We.Z)((0,We.Z)({},"".concat(Un,"-horizontal"),Lt),"".concat(Un,"-vertical"),!Lt),"".concat(Un,"-visible"),yr)),style:(0,Pe.Z)((0,Pe.Z)({},$n),Ht),onMouseDown:$t,onMouseMove:ir},ve.createElement("div",{ref:jn,className:Ve()("".concat(Un,"-thumb"),(0,We.Z)({},"".concat(Un,"-thumb-moving"),tn)),style:(0,Pe.Z)((0,Pe.Z)({},Pr),Mt),onMouseDown:hn}))}),it=vt,xe=20;function Ge(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,z=oe/te*oe;return isNaN(z)&&(z=0),z=Math.max(z,xe),Math.floor(z)}var ze=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],St=[],Ye={overflowY:"auto",overflowAnchor:"none"};function gt(oe,te){var z=oe.prefixCls,re=z===void 0?"rc-virtual-list":z,se=oe.className,ne=oe.height,ye=oe.itemHeight,Ze=oe.fullHeight,Dt=Ze===void 0?!0:Ze,Lt=oe.style,dt=oe.data,yt=oe.children,Ht=oe.itemKey,Mt=oe.virtual,Yt=oe.direction,jt=oe.scrollWidth,Tt=oe.component,tn=Tt===void 0?"div":Tt,Gt=oe.onScroll,nn=oe.onVirtualScroll,nt=oe.onVisibleChange,ln=oe.innerProps,_t=oe.extraRender,Xt=oe.styles,on=oe.showScrollBar,En=on===void 0?"optional":on,cn=(0,ge.Z)(oe,ze),vn=ve.useCallback(function(Bt){return typeof Ht=="function"?Ht(Bt):Bt==null?void 0:Bt[Ht]},[Ht]),Jn=Fe(vn,null,null),jn=(0,me.Z)(Jn,4),Wr=jn[0],zr=jn[1],yr=jn[2],sr=jn[3],Nn=!!(Mt!==!1&&ne&&ye),ir=ve.useMemo(function(){return Object.values(yr.maps).reduce(function(Bt,Wt){return Bt+Wt},0)},[yr.id,yr.maps]),Er=Nn&&dt&&(Math.max(ye*dt.length,ir)>ne||!!jt),Pn=Yt==="rtl",qn=Ve()(re,(0,We.Z)({},"".concat(re,"-rtl"),Pn),se),$t=dt||St,sn=(0,ve.useRef)(),hn=(0,ve.useRef)(),Ln=(0,ve.useRef)(),Fr=(0,ve.useState)(0),Un=(0,me.Z)(Fr,2),$n=Un[0],Pr=Un[1],lr=(0,ve.useState)(0),Bn=(0,me.Z)(lr,2),Zn=Bn[0],Or=Bn[1],Ot=(0,ve.useState)(!1),et=(0,me.Z)(Ot,2),en=et[0],An=et[1],In=function(){An(!0)},ke=function(){An(!1)},Me={getKey:vn};function Ft(Bt){Pr(function(Wt){var wt;typeof Bt=="function"?wt=Bt(Wt):wt=Bt;var rt=Ar(wt);return sn.current.scrollTop=rt,rt})}var bt=(0,ve.useRef)({start:0,end:$t.length}),Ie=(0,ve.useRef)(),xt=ht($t,vn),Vt=(0,me.Z)(xt,1),Jt=Vt[0];Ie.current=Jt;var rn=ve.useMemo(function(){if(!Nn)return{scrollHeight:void 0,start:0,end:$t.length-1,offset:void 0};if(!Er){var Bt;return{scrollHeight:((Bt=hn.current)===null||Bt===void 0?void 0:Bt.offsetHeight)||0,start:0,end:$t.length-1,offset:void 0}}for(var Wt=0,wt,rt,Pt,Nt=$t.length,pn=0;pn=$n&&wt===void 0&&(wt=pn,rt=Wt),_n>$n+ne&&Pt===void 0&&(Pt=pn),Wt=_n}return wt===void 0&&(wt=0,rt=0,Pt=Math.ceil(ne/ye)),Pt===void 0&&(Pt=$t.length-1),Pt=Math.min(Pt+1,$t.length-1),{scrollHeight:Wt,start:wt,end:Pt,offset:rt}},[Er,Nn,$n,$t,sr,ne]),Ue=rn.scrollHeight,Kt=rn.start,kt=rn.end,mn=rn.offset;bt.current.start=Kt,bt.current.end=kt,ve.useLayoutEffect(function(){var Bt=yr.getRecord();if(Bt.size===1){var Wt=Array.from(Bt.keys())[0],wt=Bt.get(Wt),rt=$t[Kt];if(rt&&wt===void 0){var Pt=vn(rt);if(Pt===Wt){var Nt=yr.get(Wt),pn=Nt-ye;Ft(function(bn){return bn+pn})}}}yr.resetRecord()},[Ue]);var Ut=ve.useState({width:0,height:ne}),fn=(0,me.Z)(Ut,2),un=fn[0],xn=fn[1],yn=function(Wt){xn({width:Wt.offsetWidth,height:Wt.offsetHeight})},Wn=(0,ve.useRef)(),Kn=(0,ve.useRef)(),On=ve.useMemo(function(){return Ge(un.width,jt)},[un.width,jt]),ar=ve.useMemo(function(){return Ge(un.height,Ue)},[un.height,Ue]),Dn=Ue-ne,mr=(0,ve.useRef)(Dn);mr.current=Dn;function Ar(Bt){var Wt=Bt;return Number.isNaN(mr.current)||(Wt=Math.min(Wt,mr.current)),Wt=Math.max(Wt,0),Wt}var Qn=$n<=0,ur=$n>=Dn,wr=Zn<=0,cr=Zn>=jt,Gn=ct(Qn,ur,wr,cr),Cr=function(){return{x:Pn?-Zn:Zn,y:$n}},er=(0,ve.useRef)(Cr()),tr=(0,fe.zX)(function(Bt){if(nn){var Wt=(0,Pe.Z)((0,Pe.Z)({},Cr()),Bt);(er.current.x!==Wt.x||er.current.y!==Wt.y)&&(nn(Wt),er.current=Wt)}});function hr(Bt,Wt){var wt=Bt;Wt?((0,st.flushSync)(function(){Or(wt)}),tr()):Ft(wt)}function Lr(Bt){var Wt=Bt.currentTarget.scrollTop;Wt!==$n&&Ft(Wt),Gt==null||Gt(Bt),tr()}var dr=function(Wt){var wt=Wt,rt=jt?jt-un.width:0;return wt=Math.max(wt,0),wt=Math.min(wt,rt),wt},Yn=(0,fe.zX)(function(Bt,Wt){Wt?((0,st.flushSync)(function(){Or(function(wt){var rt=wt+(Pn?-Bt:Bt);return dr(rt)})}),tr()):Ft(function(wt){var rt=wt+Bt;return rt})}),Hn=Zt(Nn,Qn,ur,wr,cr,!!jt,Yn),nr=(0,me.Z)(Hn,2),Zr=nr[0],Dr=nr[1];Je(Nn,sn,function(Bt,Wt,wt,rt){var Pt=rt;return Gn(Bt,Wt,wt)?!1:!Pt||!Pt._virtualHandled?(Pt&&(Pt._virtualHandled=!0),Zr({preventDefault:function(){},deltaX:Bt?Wt:0,deltaY:Bt?0:Wt}),!0):!1}),pe(Er,sn,function(Bt){Ft(function(Wt){return Wt+Bt})}),(0,Qe.Z)(function(){function Bt(wt){var rt=Qn&&wt.detail<0,Pt=ur&&wt.detail>0;Nn&&!rt&&!Pt&&wt.preventDefault()}var Wt=sn.current;return Wt.addEventListener("wheel",Zr,{passive:!1}),Wt.addEventListener("DOMMouseScroll",Dr,{passive:!0}),Wt.addEventListener("MozMousePixelScroll",Bt,{passive:!1}),function(){Wt.removeEventListener("wheel",Zr),Wt.removeEventListener("DOMMouseScroll",Dr),Wt.removeEventListener("MozMousePixelScroll",Bt)}},[Nn,Qn,ur]),(0,Qe.Z)(function(){if(jt){var Bt=dr(Zn);Or(Bt),tr({x:Bt})}},[un.width,jt]);var br=function(){var Wt,wt;(Wt=Wn.current)===null||Wt===void 0||Wt.delayHidden(),(wt=Kn.current)===null||wt===void 0||wt.delayHidden()},ri=_e(sn,$t,yr,ye,vn,function(){return zr(!0)},Ft,br);ve.useImperativeHandle(te,function(){return{nativeElement:Ln.current,getScrollInfo:Cr,scrollTo:function(Wt){function wt(rt){return rt&&(0,ot.Z)(rt)==="object"&&("left"in rt||"top"in rt)}wt(Wt)?(Wt.left!==void 0&&Or(dr(Wt.left)),ri(Wt.top)):ri(Wt)}}}),(0,Qe.Z)(function(){if(nt){var Bt=$t.slice(Kt,kt+1);nt(Bt,$t)}},[Kt,kt,$t]);var Sr=Be($t,vn,yr,ye),li=_t==null?void 0:_t({start:Kt,end:kt,virtual:Er,offsetX:Zn,offsetY:mn,rtl:Pn,getSize:Sr}),qr=De($t,Kt,kt,jt,Zn,Wr,yt,Me),Br=null;ne&&(Br=(0,Pe.Z)((0,We.Z)({},Dt?"height":"maxHeight",ne),Ye),Nn&&(Br.overflowY="hidden",jt&&(Br.overflowX="hidden"),en&&(Br.pointerEvents="none")));var Mn={};return Pn&&(Mn.dir="rtl"),ve.createElement("div",(0,le.Z)({ref:Ln,style:(0,Pe.Z)((0,Pe.Z)({},Lt),{},{position:"relative"}),className:qn},Mn,cn),ve.createElement(Ce.Z,{onResize:yn},ve.createElement(tn,{className:"".concat(re,"-holder"),style:Br,ref:sn,onScroll:Lr,onMouseEnter:br},ve.createElement(Te,{prefixCls:re,height:Ue,offsetX:Zn,offsetY:mn,scrollWidth:jt,onInnerResize:zr,ref:hn,innerProps:ln,rtl:Pn,extra:li},qr))),Er&&Ue>ne&&ve.createElement(it,{ref:Wn,prefixCls:re,scrollOffset:$n,scrollRange:Ue,rtl:Pn,onScroll:hr,onStartMove:In,onStopMove:ke,spinSize:ar,containerSize:un.height,style:Xt==null?void 0:Xt.verticalScrollBar,thumbStyle:Xt==null?void 0:Xt.verticalScrollBarThumb,showScrollBar:En}),Er&&jt>un.width&&ve.createElement(it,{ref:Kn,prefixCls:re,scrollOffset:Zn,scrollRange:jt,rtl:Pn,onScroll:hr,onStartMove:In,onStopMove:ke,spinSize:On,containerSize:un.width,horizontal:!0,style:Xt==null?void 0:Xt.horizontalScrollBar,thumbStyle:Xt==null?void 0:Xt.horizontalScrollBarThumb,showScrollBar:En}))}var Ee=ve.forwardRef(gt);Ee.displayName="List";var lt=Ee,pt=lt},93314:function(Rt){"use strict";Rt.exports="data:image/png;base64,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"},16722:function(Rt,It,de){"use strict";de.d(It,{Z:function(){return Ve}});const le=Ce=>typeof Ce=="object"&&Ce!=null&&Ce.nodeType===1,ot=(Ce,fe)=>(!fe||Ce!=="hidden")&&Ce!=="visible"&&Ce!=="clip",Pe=(Ce,fe)=>{if(Ce.clientHeight{const st=(He=>{if(!He.ownerDocument||!He.ownerDocument.defaultView)return null;try{return He.ownerDocument.defaultView.frameElement}catch(Te){return null}})(ve);return!!st&&(st.clientHeightHefe||He>Ce&&Te=fe&&Ae>=Qe?He-Ce-ve:Te>fe&&AeQe?Te-fe+st:0,me=Ce=>{const fe=Ce.parentElement;return fe==null?Ce.getRootNode().host||null:fe},ge=(Ce,fe)=>{var Qe,ve,st,He;if(typeof document=="undefined")return[];const{scrollMode:Te,block:Ae,inline:De,boundary:$e,skipOverflowHiddenElements:at}=fe,ht=typeof $e=="function"?$e:it=>it!==$e;if(!le(Ce))throw new TypeError("Invalid target");const ut=document.scrollingElement||document.documentElement,qe=[];let tt=Ce;for(;le(tt)&&ht(tt);){if(tt=me(tt),tt===ut){qe.push(tt);break}tt!=null&&tt===document.body&&Pe(tt)&&!Pe(document.documentElement)||tt!=null&&Pe(tt,at)&&qe.push(tt)}const ct=(ve=(Qe=window.visualViewport)==null?void 0:Qe.width)!=null?ve:innerWidth,Zt=(He=(st=window.visualViewport)==null?void 0:st.height)!=null?He:innerHeight,{scrollX:Be,scrollY:Ne}=window,{height:Xe,width:Le,top:Oe,right:we,bottom:Fe,left:Et}=Ce.getBoundingClientRect(),{top:Je,right:mt,bottom:ft,left:pe}=(it=>{const xe=window.getComputedStyle(it);return{top:parseFloat(xe.scrollMarginTop)||0,right:parseFloat(xe.scrollMarginRight)||0,bottom:parseFloat(xe.scrollMarginBottom)||0,left:parseFloat(xe.scrollMarginLeft)||0}})(Ce);let ce=Ae==="start"||Ae==="nearest"?Oe-Je:Ae==="end"?Fe+ft:Oe+Xe/2-Je+ft,_e=De==="center"?Et+Le/2-pe+mt:De==="end"?we+mt:Et-pe;const vt=[];for(let it=0;it=0&&Et>=0&&Fe<=Zt&&we<=ct&&(xe===ut&&!Pe(xe)||Oe>=St&&Fe<=gt&&Et>=Ee&&we<=Ye))return vt;const lt=getComputedStyle(xe),pt=parseInt(lt.borderLeftWidth,10),oe=parseInt(lt.borderTopWidth,10),te=parseInt(lt.borderRightWidth,10),z=parseInt(lt.borderBottomWidth,10);let re=0,se=0;const ne="offsetWidth"in xe?xe.offsetWidth-xe.clientWidth-pt-te:0,ye="offsetHeight"in xe?xe.offsetHeight-xe.clientHeight-oe-z:0,Ze="offsetWidth"in xe?xe.offsetWidth===0?0:ze/xe.offsetWidth:0,Dt="offsetHeight"in xe?xe.offsetHeight===0?0:Ge/xe.offsetHeight:0;if(ut===xe)re=Ae==="start"?ce:Ae==="end"?ce-Zt:Ae==="nearest"?We(Ne,Ne+Zt,Zt,oe,z,Ne+ce,Ne+ce+Xe,Xe):ce-Zt/2,se=De==="start"?_e:De==="center"?_e-ct/2:De==="end"?_e-ct:We(Be,Be+ct,ct,pt,te,Be+_e,Be+_e+Le,Le),re=Math.max(0,re+Ne),se=Math.max(0,se+Be);else{re=Ae==="start"?ce-St-oe:Ae==="end"?ce-gt+z+ye:Ae==="nearest"?We(St,gt,Ge,oe,z+ye,ce,ce+Xe,Xe):ce-(St+Ge/2)+ye/2,se=De==="start"?_e-Ee-pt:De==="center"?_e-(Ee+ze/2)+ne/2:De==="end"?_e-Ye+te+ne:We(Ee,Ye,ze,pt,te+ne,_e,_e+Le,Le);const{scrollLeft:Lt,scrollTop:dt}=xe;re=Dt===0?0:Math.max(0,Math.min(dt+re/Dt,xe.scrollHeight-Ge/Dt+ye)),se=Ze===0?0:Math.max(0,Math.min(Lt+se/Ze,xe.scrollWidth-ze/Ze+ne)),ce+=dt-re,_e+=Lt-se}vt.push({el:xe,top:re,left:se})}return vt},Re=Ce=>Ce===!1?{block:"end",inline:"nearest"}:(fe=>fe===Object(fe)&&Object.keys(fe).length!==0)(Ce)?Ce:{block:"start",inline:"nearest"};function Ve(Ce,fe){if(!Ce.isConnected||!(st=>{let He=st;for(;He&&He.parentNode;){if(He.parentNode===document)return!0;He=He.parentNode instanceof ShadowRoot?He.parentNode.host:He.parentNode}return!1})(Ce))return;const Qe=(st=>{const He=window.getComputedStyle(st);return{top:parseFloat(He.scrollMarginTop)||0,right:parseFloat(He.scrollMarginRight)||0,bottom:parseFloat(He.scrollMarginBottom)||0,left:parseFloat(He.scrollMarginLeft)||0}})(Ce);if((st=>typeof st=="object"&&typeof st.behavior=="function")(fe))return fe.behavior(ge(Ce,fe));const ve=typeof fe=="boolean"||fe==null?void 0:fe.behavior;for(const{el:st,top:He,left:Te}of ge(Ce,Re(fe))){const Ae=He-Qe.top+Qe.bottom,De=Te-Qe.left+Qe.right;st.scroll({top:Ae,left:De,behavior:ve})}}}}]);