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

1155 lines
1.8 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ee}});var de=we(54476),ie=we(59301),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},ce=Ee,se=we(7657),re=function(E,y){return ie.createElement(se.Z,(0,de.Z)({},E,{ref:y,icon:ce}))},ue=ie.forwardRef(re),ee=ue},76618:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ee}});var de=we(54476),ie=we(59301),Ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},ce=Ee,se=we(7657),re=function(E,y){return ie.createElement(se.Z,(0,de.Z)({},E,{ref:y,icon:ce}))},ue=ie.forwardRef(re),ee=ue},45559:function(){"use strict"},96408:function(Jt,Ot){"use strict";Ot.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},93373:function(Jt,Ot){"use strict";Ot.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},829:function(){"use strict"},81747:function(Jt,Ot,we){"use strict";var de=we(59301),ie=Object.defineProperty,Ee=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,re=(te,E,y)=>E in te?ie(te,E,{enumerable:!0,configurable:!0,writable:!0,value:y}):te[E]=y,ue=(te,E)=>{for(var y in E||(E={}))ce.call(E,y)&&re(te,y,E[y]);if(Ee)for(var y of Ee(E))se.call(E,y)&&re(te,y,E[y]);return te};const ee=te=>React.createElement("svg",ue({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},te),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));Ot.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},51976:function(Jt,Ot,we){"use strict";var de=we(59301),ie=Object.defineProperty,Ee=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,re=(te,E,y)=>E in te?ie(te,E,{enumerable:!0,configurable:!0,writable:!0,value:y}):te[E]=y,ue=(te,E)=>{for(var y in E||(E={}))ce.call(E,y)&&re(te,y,E[y]);if(Ee)for(var y of Ee(E))se.call(E,y)&&re(te,y,E[y]);return te};const ee=te=>React.createElement("svg",ue({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},te),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));Ot.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},93510:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Jt={},Ot="5.0",we={},de=null,ie=!1,Ee=!1,ce=null,se=!1,re=null,ue=null,ee=0;ee<arguments.length;ee++){var te=arguments[ee];if(te!==null)switch(typeof te){case"number":Ot=te.toFixed(1);break;case"string":te.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ot=te:ce=te;break;case"object":typeof te.is3D!="undefined"?de=te:we=te;break;case"boolean":ie=te,Ee=!0;break}}de===null&&(de={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},we.material_id!==void 0&&!Ee&&(ie=!0)),ce!==null&&we.id===void 0&&(we.id=ce);var E="",y="",z=!1,x=null,ne=null,ae=null,oe=!1,ge=null,Se=null,ve=null,be=null,xe=null;we.height!==void 0&&(we.height=Math.round(we.height)),we.width!==void 0&&(we.width=Math.round(we.width));var pe=function(Qe){return parseFloat(Qe)>4?parseFloat(Qe):5};Jt.setHTML5Codebase=function(Qe,pt){ue=Qe,Ze(Qe,pt)},Jt.setJavaCodebase=Jt.setJavaCodebaseVersion=Jt.isCompiledInstalled=Jt.setPreCompiledScriptPath=Jt.setPreCompiledResourcePath=function(){},Jt.setHTML5CodebaseVersion=function(Qe,pt){var ht=parseFloat(Qe);if(ht!==NaN&&ht<5){console.log("The GeoGebra HTML5 codebase version "+ht+" is deprecated. Using version latest instead.");return}re=Qe,Ue(Qe,pt)},Jt.getHTML5CodebaseVersion=function(){return ne},Jt.getParameters=function(){return we},Jt.setFontsCSSURL=function(Qe){be=Qe},Jt.setGiacJSURL=function(Qe){},Jt.setJNLPFile=function(Qe){E=Qe},Jt.setJNLPBaseDir=function(Qe){},Jt.inject=function(){function Qe(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pt="auto",ht=we.id,Pt,gt=!1,bt=0;bt<arguments.length;bt++){var St=arguments[bt];typeof St=="string"?(St=St.toLowerCase(),St.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pt=St:ht=arguments[bt]):typeof St=="boolean"?gt=St:St instanceof HTMLElement&&(Pt=St)}lt();function lt(){if(!se){setTimeout(lt,200);return}pt=ct(pt);var _t=Pt||document.getElementById(ht);if(!_t){console.log("possibly bug on ajax loading? ");return}if(Jt.removeExistingApplet(_t,!1),we.width===void 0&&_t.clientWidth&&(we.width=_t.clientWidth),we.height===void 0&&_t.clientHeight&&(we.height=_t.clientHeight),!(we.width&&we.height)&&pt==="html5"&&(delete we.width,delete we.height),x=pt,pt==="screenshot")Ke(_t,we);else{var dt=!1;we.hasOwnProperty("playButton")&&we.playButton||we.hasOwnProperty("clickToLoad")&&we.clickToLoad?dt=!0:we.hasOwnProperty("playButtonAutoDecide")&&we.playButtonAutoDecide&&(dt=(!me()||Qe())&&Ae()),dt?(x="screenshot",He(_t,we,gt,pt)):qe(_t,we,gt)}}};function me(){try{return window.self!==window.top}catch(Qe){return!0}}function Ae(){return we.hasOwnProperty("screenshotGenerator")&&we.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Jt.getViews=function(){return de},Jt.isJavaInstalled=function(){return!1};var De=function(Qe){var pt=function(bt){var St=JSON.parse(bt),lt=function(nt){return nt.type=="G"||nt.type=="E"},_t=St.elements?St.elements.filter(lt)[0]:St;if(!_t||!_t.url){ht();return}we.fileName=_t.url,ke(_t.settings||{}),de.is3D=!0;var dt="https://www.geogebra.org/images/";Jt.setPreviewImage(ge||_t.previewUrl,dt+"GeoGebra_loading.png",dt+"applet_play.png"),Qe()},ht=function(){we.onError&&we.onError(),Je("Error: Fetching material (id "+we.material_id+") failed.",we)},Pt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",gt="/materials/"+we.material_id+"?scope=basic";Ie("https://"+Pt+"/api/proxy.php?path="+encodeURIComponent(gt),pt,ht)};function ke(Qe){var pt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ht){Qe[ht]=!!Qe[ht]}),pt.forEach(function(ht){we[ht]===void 0&&Qe[ht]!==void 0&&(we[ht]=Qe[ht])}),we.showToolBarHelp===void 0&&(we.showToolBarHelp=we.showToolBar)}function Ie(Qe,pt,ht){var Pt=new XMLHttpRequest;Pt.open("GET",Qe),Pt.onload=function(){pt(Pt.responseText)},Pt.onerror=ht,Pt.send()}Jt.isHTML5Installed=function(){return!0},Jt.getLoadedAppletType=function(){return x},Jt.setPreviewImage=function(Qe,pt,ht){ge=Qe,Se=pt,ve=ht},Jt.removeExistingApplet=function(Qe,pt){var ht;typeof Qe=="string"&&(Qe=document.getElementById(Qe)),x=null;var Pt=null;for(ht=0;ht<Qe.childNodes.length;ht++){var gt=Qe.childNodes[ht],bt=gt.className;bt==="applet_screenshot"?pt?(gt.style.display="block",x="screenshot"):gt.style.display="none":bt!=="applet_scaler prerender"&&(Qe.removeChild(gt),Pt=bt&&bt.indexOf("appletParameters")!=-1?gt.id:null,ht--)}var St=we.id!==void 0?we.id:Pt,lt=window[St];lt&&typeof lt.getBase64=="function"&&(lt.remove(),window[St]=null)},Jt.refreshHitPoints=function(){if(pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var Qe=Jt.getAppletObject();return Qe&&typeof Qe.recalculateEnvironments=="function"?(Qe.recalculateEnvironments(),!0):!1},Jt.startAnimation=function(){var Qe=Jt.getAppletObject();return Qe&&typeof Qe.startAnimation=="function"?(Qe.startAnimation(),!0):!1},Jt.stopAnimation=function(){var Qe=Jt.getAppletObject();return Qe&&typeof Qe.stopAnimation=="function"?(Qe.stopAnimation(),!0):!1},Jt.getAppletObject=function(){var Qe=we.id!==void 0?we.id:"ggbApplet";return window[Qe]},Jt.resize=function(){};var Fe=function(Qe,pt,ht){var Pt=document.createElement("param");Pt.setAttribute("name",pt),Pt.setAttribute("value",ht),Qe.appendChild(Pt)},Pe=function(Qe){return Qe&&Qe!=="false"},qe=function(Qe,pt,ht){pe(ne)<=4.2&&(ht=!0);var Pt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==ne||ggbHTML5LoadedCodebaseIsWebSimple&&!oe)&&(Pt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var gt=document.createElement("div");gt.classList.add("appletParameters","notranslate");var bt=pt.width,St=pt.height;if(pt.disableAutoScale=pt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pt.disableAutoScale,pt.width!==void 0)if(pe(ne)<=4.4)Pe(pt.showToolBar)&&(pt.height-=7),Pe(pt.showAlgebraInput)&&(pt.height-=37),pt.width<605&&Pe(pt.showToolBar)&&(pt.width=605,bt=605);else{var lt=100;(Pe(pt.showToolBar)||Pe(pt.showMenuBar))&&(pt.hasOwnProperty("customToolBar")&&(pt.customToolbar=pt.customToolBar),lt=Pe(pt.showMenuBar)?245:155),bt<lt&&(pt.width=lt,bt=lt)}gt.style.border="none",gt.style.display="inline-block";for(var _t in pt)pt.hasOwnProperty(_t)&&_t!=="appletOnLoad"&&gt.setAttribute("data-param-"+_t,pt[_t]);be&&gt.setAttribute("data-param-fontscssurl",be),Jt.resize=function(){GGBAppletUtils.responsiveResize(Qe,pt)},window.addEventListener("resize",function(_e){Jt.resize()});var dt=typeof pt.appletOnLoad=="function"?pt.appletOnLoad:function(){};if(!ht&&pt.width!==void 0){pt.hasOwnProperty("showSplash")||gt.setAttribute("data-param-showSplash","false");var nt=Qe.querySelector(".applet_scaler.prerender"),et=nt!==null;if(et)var ft=nt.querySelector(".ggb_preview");else{var ft=Ge(bt,St,pt.borderColor,!1);nt=document.createElement("div"),nt.className="applet_scaler",nt.style.position="relative",nt.style.display="block",nt.style.width=bt+"px",nt.style.height=St+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(nt,"66%"),pe(ne)>=5?(pt.appletOnLoad=function(_e){var Ne=Qe.querySelector(".ggb_preview");Ne&&Ne.parentNode.removeChild(Ne),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(nt),window.GGBT_wsf_view&&$(window).trigger("resize"),dt(_e)},et||nt.appendChild(ft)):gt.appendChild(ft),nt.appendChild(gt),et||Qe.appendChild(nt),setTimeout(function(){Jt.resize()},1)}else{var wt=document.createElement("div");wt.className="applet_scaler",wt.style.position="relative",wt.style.display="block",wt.appendChild(gt),Qe.appendChild(wt),pt.appletOnLoad=function(_e){Jt.resize(),dt(_e)}}function Tt(_e,Ne){Ne&&typeof Ne.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(_e,Ne.appletOnLoad):renderGGBElement(_e),Je("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",Ne)}function Re(_e,Ne){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:_e,params:Ne}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Ye){Tt(Ye.article,Ye.params)}),html5AppletsToProcess=null)},pe(ne)<5&&(_e.className+=" geogebraweb")):Tt(_e,Ne)}if(Pt){scriptLoadStarted=!0;for(var Le=0;Le<gt.childNodes.length;Le++){var Te=gt.childNodes[Le].tagName;Te==="TABLE"&&(gt.removeChild(gt.childNodes[Le]),Le--)}if(ggbHTML5LoadedScript!==null){var je=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');je!=null&&je.parentNode.removeChild(je)}var ye=document.createElement("script"),le=function(){Re(gt,pt)};ye.src=y+ae,ggbHTML5LoadedCodebaseIsWebSimple=oe,ggbHTML5LoadedCodebaseVersion=ne,ggbHTML5LoadedScript=ye.src,Je("GeoGebra HTML5 codebase loaded: '"+y+"'.",pt),!ue&&(!re||re=="5.0")?(oe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),le()):y.requirejs?__webpack_require__.e(3861).then(function(){var _e=[__webpack_require__(40341)];le.apply(null,_e)}.bind(this)).catch(__webpack_require__.oe):(ye.onload=le,Qe.appendChild(ye))}else Re(gt,pt);pt.height=St,pt.width=bt},Ke=function(Qe,pt,ht){var Pt=Ge(pt.width,pt.height,pt.borderColor,ht),gt=document.createElement("div");gt.style.position="relative",gt.style.display="block",gt.style.width=pt.width+"px",gt.style.height=pt.height+"px",gt.className="applet_screenshot applet_scaler"+(ht?" applet_screenshot_play":""),gt.appendChild(Pt);var bt=GGBAppletUtils.getScale(pt,Qe,ht);ht?(Qe.appendChild(rt()),window.GGBT_wsf_view||(Qe.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(gt,"66%"),Qe.appendChild(gt),bt!==1&&!isNaN(bt)&&(GGBAppletUtils.scaleElement(gt,bt),gt.style.width=pt.width+"px",gt.style.height=pt.height+"px",gt.parentNode.style.width=pt.width*bt+"px",gt.parentNode.style.height=pt.height*bt+"px"),Jt.resize=function(){ot(Qe,Pt,gt,ht)},window.addEventListener("resize",function(St){Jt.resize()}),Jt.resize()};function ot(Qe,pt,ht,Pt){if(Qe.contains(pt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Qe.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(Qe)}var gt=GGBAppletUtils.getScale(we,Qe,Pt);ht.parentNode!==null&&(!isNaN(gt)&&gt!==1?(GGBAppletUtils.scaleElement(ht,gt),ht.parentNode.style.width=we.width*gt+"px",ht.parentNode.style.height=we.height*gt+"px"):(GGBAppletUtils.scaleElement(ht,1),ht.parentNode.style.width=we.width+"px",ht.parentNode.style.height=we.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(Qe),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Jt.onExitFullscreen=function(Qe,pt){pt.appendChild(Qe)};var He=function(Qe,pt,ht,Pt){Ke(Qe,pt,!0);for(var gt=function(){var lt=[];for(St=0;St<Qe.childNodes.length;St++)lt.push(Qe.childNodes[St]);if(window.GGBT_wsf_view){var _t=window.GGBT_wsf_view.renderFullScreen(Qe,pt.id),dt=document.getElementById("fullscreencontainer"),nt=jQuery(Qe).find(".fullscreencontent");nt.length>0?(_t.remove(),nt.attr("id","fullscreencontent").show(),jQuery(dt).append(nt),window.dispatchEvent(new Event("resize"))):qe(_t,pt,!1),window.GGBT_wsf_view.launchFullScreen(dt)}else x=Pt,qe(Qe,pt,!1);if(!window.GGBT_wsf_view)for(St=0;St<lt.length;St++)Qe.removeChild(lt[St])},bt=Qe.getElementsByClassName("ggb_preview_play"),St=0;St<bt.length;St++)bt[St].addEventListener("click",gt,!1),bt[St].addEventListener("ontouchstart",gt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(Qe),Ae()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},rt=function(){var Qe=document.createElement("div");if(Qe.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pt='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ht=document.createElement("style");ht.styleSheet?ht.styleSheet.cssText=pt:ht.appendChild(document.createTextNode(pt)),document.getElementsByTagName("head")[0].appendChild(ht)}return Qe},Ge=function(Qe,pt,ht,Pt){var gt=document.createElement("div");gt.className="ggb_preview",gt.style.position="absolute",gt.style.zIndex="90",gt.style.width=Qe-2+"px",gt.style.height=pt-2+"px",gt.style.top="0px",gt.style.left="0px",gt.style.overflow="hidden",gt.style.backgroundColor="white";var bt="lightgrey";ht!==void 0&&(ht==="none"?bt="transparent":bt=ht),gt.style.border="1px solid "+bt;var St=document.createElement("img");if(St.style.position="relative",St.style.zIndex="1000",St.style.top="-1px",St.style.left="-1px",ge!==null&&St.setAttribute("src",ge),St.style.opacity=.7,Se!==null){var lt,_t,dt;if(!Pt){lt=document.createElement("img"),lt.style.position="absolute",lt.style.zIndex="1001",lt.style.opacity=1,St.style.opacity=.3,_t=360,_t>Qe/4*3&&(_t=Qe/4*3),dt=_t/5.8,lt.setAttribute("src",Se),lt.setAttribute("width",_t),lt.setAttribute("height",dt);var nt=(Qe-_t)/2,et=(pt-dt)/2;lt.style.left=nt+"px",lt.style.top=et+"px",gt.appendChild(lt)}}return gt.appendChild(St),gt},ct=function(Qe){return Qe=Qe.toLowerCase(),Qe==="html5"||Qe==="screenshot"?Qe:"html5"},We=["web","webSimple","web3d","tablet","tablet3d","phone"],Ue=function(Qe,pt){if(ne=Qe,pt){Ze(ne,!0);return}var ht=!ie;if(ht){var Pt=pe(ne);!isNaN(Pt)&&Pt<4.4&&(ht=!1)}var gt,bt;window.location.protocol.substr(0,4)==="http"?gt=window.location.protocol:gt="http:";var St=ne.indexOf("//");St>0?bt=ne:St===0?bt=gt+ne:bt="https://www.geogebra.org/apps/5.2.814.0/";for(var lt in We)if(ne.slice(We[lt].length*-1)===We[lt]||ne.slice((We[lt].length+1)*-1)===We[lt]+"/"){Ze(bt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ht&&!de.is3D&&!de.AV&&!de.SV&&!de.CV&&!de.EV2&&!de.CP&&!de.PC&&!de.DA&&!de.FI&&!de.PV&&!Pe(we.showToolBar)&&!Pe(we.showMenuBar)&&!Pe(we.showAlgebraInput)&&!Pe(we.enableRightClick)&&(!we.appName||we.appName=="classic")?bt+="webSimple/":bt+="web3d/",Ze(bt,!1)},Ze=function(Qe,pt){if(Qe.requirejs){y=Qe;return}Qe.slice(-1)!=="/"&&(Qe+="/"),y=Qe,pt===null&&(pt=Qe.indexOf("http")===-1),z=pt,ae="web.nocache.js",oe=!1;var ht=y.split("/");ht.length>1&&(!pt&&ht[ht.length-2]==="webSimple"?(ae="webSimple.nocache.js",oe=!0):We.indexOf(ht[ht.length-2])>=0&&(ae=ht[ht.length-2]+".nocache.js")),ht=Qe.split("/"),ne=ht[ht.length-3],ne.substr(0,4)==="test"?ne=ne.substr(4,1)+"."+ne.substr(5,1):(ne.substr(0,3)==="war"||ne.substr(0,4)==="beta")&&(ne="5.0");var Pt=parseFloat(ne);Pt!==NaN&&Pt<5&&Qe.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Pt+" is deprecated. Using version latest instead."),Ue("5.0",pt))},Je=function(Qe,pt){window.console&&window.console.log&&(!pt||typeof pt.showLogging=="undefined"||pt.showLogging&&pt.showLogging!=="false")&&console.log(Qe)};we.material_id!==void 0?De($e):$e();function $e(){var Qe=Ot;re!==null?Qe=re:parseFloat(Qe)<5&&(Qe="5.0"),Ue(Qe,!1),ue!==null&&Ze(ue,z),se=!0}return Jt},GGBAppletUtils=function(){"use strict";function Jt(){return window.GGBT_wsf_edit!==void 0}function Ot(se,re){re!=1?(se.style.transformOrigin="0% 0% 0px",se.style.webkitTransformOrigin="0% 0% 0px",se.style.transform="scale("+re+","+re+")",se.style.webkitTransform="scale("+re+","+re+")",se.style.maxWidth="initial",se.querySelector(".ggb_preview")!==null&&(se.querySelector(".ggb_preview").style.maxWidth="initial"),se.querySelectorAll(".ggb_preview img")[0]!==void 0&&(se.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),se.querySelectorAll(".ggb_preview img")[1]!==void 0&&(se.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(se.style.transform="none",se.style.webkitTransform="none")}function we(se,re,ue,ee,te,E){var y=null;if(E!=null&&E!="")for(var z=se.parentNode;z!=null;)if((" "+z.className+" ").indexOf(" "+E+" ")>-1){y=z;break}else z=z.parentNode;var x=0,ne=0,ae=0,oe=0,ge=0,Se=0,ve=0;if(y)x=y.offsetWidth,ne=Math.max(ee?y.offsetWidth:0,y.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(x=Math.min(window.innerWidth,document.documentElement.clientWidth),ne=Math.min(window.innerHeight,document.documentElement.clientHeight),ae=x):(x=window.innerWidth,ne=window.innerHeight,ae=window.innerWidth),se){var be=se.getBoundingClientRect();be.left>0&&be.left<=x&&(te===void 0||!te)&&(document.dir==="rtl"?(ge=x-be.width-be.left,Se=ae<=480?10:30):(Se=be.left,ge=ae<=480?10:30),oe=Se+ge)}if(se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xe=se.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(oe=40,ve=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(oe=0,ve=40)}}return se&&((ue===void 0||!ue)&&re>0&&re+oe<x?x=re:x-=oe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ue===void 0||!ue)&&(ne-=ve)),{width:x,height:ne}}function de(se,re,ue,ee,te){if(se.isScreenshoGenerator)return 1;var E=ee!==void 0&&ee,y=se.noScaleMargin!=null&&se.noScaleMargin,z=function(xe){return xe&&xe!=="false"},x=z(se.autoHeight),ne=we(re,se.width,ue,x,E&&window.GGBT_wsf_view||y,te),ae=parseInt(ne.width),oe=se.width,ge=se.height;if(oe===void 0){var Se=re.querySelector(".appletParameters");Se&&(oe=Se.offsetWidth,ge=Se.offsetHeight)}var ve=ae/oe,be=E?1:ne.height/ge;return ue!==void 0&&!ue&&(ve=Math.min(1,ve),be=Math.min(1,be)),Math.min(ve,be)}function ie(se,re,ue){var ee=1,te,E=!1;if(se.hasOwnProperty("allowUpscale")&&(E=se.allowUpscale),se.hasOwnProperty("scale")&&(ee=parseFloat(se.scale),(isNaN(ee)||ee===null||ee===0)&&(ee=1),ee>1&&(E=!0)),re&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(E=!0),!(se.hasOwnProperty("disableAutoScale")&&se.disableAutoScale))te=de(se,re,E,ue,se.scaleContainerClass);else return ee;return E&&(!se.hasOwnProperty("scale")||ee===1)?te:Math.min(ee,te)}function Ee(se){var re=Math.min(window.innerWidth,document.documentElement.clientWidth),ue=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=se.getBoundingClientRect(),te=(re-ee.width)/2,E=(ue-ee.height)/2;E<0&&(E=0),se.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te<40?se.style.left="40px":se.style.left=te+"px",se.style.top=E+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(E<40?se.style.top="40px":se.style.top=E+"px",se.style.left=te+"px")}function ce(se,re){var ue=se.querySelector(".appletParameters");if(ue){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(re.id!==ue.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(se)}if(ue.parentElement&&/fullscreen/.test(ue.parentElement.className))return;var ee=ie(re,se);Jt()&&ue.setAttribute("data-param-scale",ee);for(var te=null,E=0;E<se.childNodes.length;E++)if(se.childNodes[E].className!==void 0&&se.childNodes[E].className.match(/^applet_scaler/)){te=se.childNodes[E];break}if(te!==null&&te.querySelector(".noscale")!==null)return;var y=re.id!==void 0?re.id:"ggbApplet",z=window[y];(z==null||!z.recalculateEnvironments)&&te!==null&&!te.className.match(/fullscreen/)&&(te.parentNode.style.transform="",!isNaN(ee)&&ee!==1?(te.parentNode.style.width=re.width*ee+"px",te.parentNode.style.height=re.height*ee+"px",Ot(te,ee)):(Ot(te,1),te.parentNode.style.width=re.width+"px",te.parentNode.style.height=re.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ee(se),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ue).parents(".content-added-content"))}}return{responsiveResize:ce,isFlexibleWorksheetEditor:Jt,positionCenter:Ee,getScale:ie,scaleElement:Ot}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var Jt=n.location.search;return Jt.indexOf(J)!=-1||Jt.indexOf(K)!=-1}function q(Jt,Ot){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(Jt){var Ot=s[L].bindings;s[L].bindings=function(){for(var we=Ot?Ot():{},de=Jt[webModule.__softPermutationId],ie=O;ie<de.length;ie++){var Ee=de[ie];we[Ee[O]]=Ee[P]}return we}};var t;function u(){return v(),t}function v(){if(!t){var Jt=o.createElement(Q);if(Jt.id=L,Jt.style.cssText=R+S,Jt.tabIndex=-1,o.body.appendChild(Jt),t=Jt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ot=document.compatMode==U?V:W;t.write(Ot+X),t.close()}}}function w(Jt){function Ot(de){function ie(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ee=ie();if(Ee){de();return}function ce(){if(!Ee){if(!ie())return;Ee=!0,de(),o.removeEventListener&&o.removeEventListener(Z,ce,!1),se&&clearInterval(se)}}o.addEventListener&&o.addEventListener(Z,ce,!1);var se=setInterval(function(){ce()},$)}function we(de){var ie=u(),Ee=ie.body,ce=ie.createElement(_);ce.language=ab,ce.crossOrigin=W,ce.src=de,webModule.__errFn&&(ce.onerror=function(){webModule.__errFn(L,new Error(bb+de))}),Ee.appendChild(ce)}Ot(function(){we(Jt)})}webModule.__startLoadingFragment=function(Jt){return C(Jt)},webModule.__installRunAsyncCode=function(Jt){var Ot=u(),we=Ot.body,de=Ot.createElement(_);de.language=ab,de.text=Jt,we.appendChild(de),we.removeChild(de)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(Jt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Jt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Jt){var Ot=c[Jt];return Ot==null?null:Ot},r=d,webModule.__errFn=e}function B(){function Jt(se){var re=se.lastIndexOf(rb);re==-1&&(re=se.length);var ue=se.indexOf(sb);ue==-1&&(ue=se.length);var ee=se.lastIndexOf(tb,Math.min(ue,re));return ee>=O?se.substring(O,ee+P):W}function Ot(se){if(!se.match(/^\w+:\/\//)){var re=o.createElement(ub);re.src=se+vb,se=Jt(re.src)}return se}function we(){var se=__gwt_getMetaProperty(wb);return se!=null?se:W}function de(){for(var se=o.getElementsByTagName(_),re=O;re<se.length;++re)if(se[re].src.indexOf(xb)!=-1)return Jt(se[re].src);return W}function ie(){var se=o.getElementsByTagName(yb);return se.length>O?se[se.length-P].href:W}function Ee(){var se=o.location;return se.href==se.protocol+zb+se.host+se.pathname+se.search+se.hash}var ce=we();return ce==W&&(ce=de()),ce==W&&(ce=ie()),ce==W&&Ee()&&(ce=Jt(o.location.href)),ce=Ot(ce),ce}function C(Jt){return Jt.match(/^\//)||Jt.match(/^[a-zA-Z]+:\/\//)?Jt:webModule.__moduleBase+Jt}function D(){var Jt=[],Ot=O,we=[],de=[];function ie(se){var re=de[se](),ue=we[se];if(re in ue)return re;var ee=[];for(var te in ue)ee[ue[te]]=te;throw r&&r(se,ee,re),null}if(__gwt_isKnownPropertyValue=function(se,re){return re in we[se]},webModule.__getPropMap=function(){var se={};for(var re in we)we.hasOwnProperty(re)&&(se[re]=ie(re));return se},webModule.__computePropValue=ie,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ee;try{Ee=Cb;var ce=Ee.indexOf(Db);ce!=-1&&(Ot=parseInt(Ee.substring(ce+P),$),Ee=Ee.substring(O,ce))}catch(se){}return webModule.__softPermutationId=Ot,C(Ee+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},28735:function(Jt,Ot,we){"use strict";we.d(Ot,{Ax:function(){return ce},Ds:function(){return se},KI:function(){return ue},SI:function(){return Ee},f1:function(){return ie}});var de=we(74128);function ie(ee){let te=!0;if(ee.length>0){for(let E=0;E<ee.length;E++)if(ee[E].compile_success==0||!ee[E].compile_success){te=!1;break}}else te=!1;return te}function Ee(ee,te=""){let E=[];for(let y=0;y<ee.length;y++){let z=ee[y],x=te?`${te}/${z.name}`:`${z.name}`;E.push({title:z.name,type:z.type,isLeaf:z.type!=="tree",key:x})}return E}function ce(ee,te,E){for(let y=0;y<ee.length;y++){let z=ee[y];if(z.key===te){z.children=E;break}z.children&&ce(z.children,te,E)}return ee}function se(ee,te,E){let y;return function(){let z=this,x=arguments,ne=function(){y=null,E||ee.apply(z,x)},ae=E&&!y;clearTimeout(y),y=setTimeout(ne,te),ae&&ee.apply(z,x)}}const re=!0,ue=de.Z.API_SERVER},53464:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return je}});var de=we(59301),ie={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ee=we(92310),ce=we.n(Ee),se=we(29787);var re=function(ye,le){return(re=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_e,Ne){_e.__proto__=Ne}||function(_e,Ne){for(var Ye in Ne)Object.prototype.hasOwnProperty.call(Ne,Ye)&&(_e[Ye]=Ne[Ye])})(ye,le)};function ue(ye,le){function _e(){this.constructor=ye}re(ye,le),ye.prototype=le===null?Object.create(le):(_e.prototype=le.prototype,new _e)}function ee(ye,le,_e,Ne){return new(_e||(_e=Promise))(function(Ye,Oe){function tt(Dt){try{Nt(Ne.next(Dt))}catch(ut){Oe(ut)}}function Ct(Dt){try{Nt(Ne.throw(Dt))}catch(ut){Oe(ut)}}function Nt(Dt){var ut;Dt.done?Ye(Dt.value):(ut=Dt.value,ut instanceof _e?ut:new _e(function(Ht){Ht(ut)})).then(tt,Ct)}Nt((Ne=Ne.apply(ye,le||[])).next())})}function te(ye,le){var _e,Ne,Ye,Oe,tt={label:0,sent:function(){if(1&Ye[0])throw Ye[1];return Ye[1]},trys:[],ops:[]};return Oe={next:Ct(0),throw:Ct(1),return:Ct(2)},typeof Symbol=="function"&&(Oe[Symbol.iterator]=function(){return this}),Oe;function Ct(Nt){return function(Dt){return function(ut){if(_e)throw new TypeError("Generator is already executing.");for(;tt;)try{if(_e=1,Ne&&(Ye=2&ut[0]?Ne.return:ut[0]?Ne.throw||((Ye=Ne.return)&&Ye.call(Ne),0):Ne.next)&&!(Ye=Ye.call(Ne,ut[1])).done)return Ye;switch(Ne=0,Ye&&(ut=[2&ut[0],Ye.value]),ut[0]){case 0:case 1:Ye=ut;break;case 4:return tt.label++,{value:ut[1],done:!1};case 5:tt.label++,Ne=ut[1],ut=[0];continue;case 7:ut=tt.ops.pop(),tt.trys.pop();continue;default:if(Ye=tt.trys,!((Ye=Ye.length>0&&Ye[Ye.length-1])||ut[0]!==6&&ut[0]!==2)){tt=0;continue}if(ut[0]===3&&(!Ye||ut[1]>Ye[0]&&ut[1]<Ye[3])){tt.label=ut[1];break}if(ut[0]===6&&tt.label<Ye[1]){tt.label=Ye[1],Ye=ut;break}if(Ye&&tt.label<Ye[2]){tt.label=Ye[2],tt.ops.push(ut);break}Ye[2]&&tt.ops.pop(),tt.trys.pop();continue}ut=le.call(ye,tt)}catch(Ht){ut=[6,Ht],Ne=0}finally{_e=Ye=0}if(5&ut[0])throw ut[1];return{value:ut[0]?ut[1]:void 0,done:!0}}([Nt,Dt])}}}function E(){for(var ye=0,le=0,_e=arguments.length;le<_e;le++)ye+=arguments[le].length;var Ne=Array(ye),Ye=0;for(le=0;le<_e;le++)for(var Oe=arguments[le],tt=0,Ct=Oe.length;tt<Ct;tt++,Ye++)Ne[Ye]=Oe[tt];return Ne}var y=function(){function ye(){}return ye.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ye.setAttributes=function(le,_e){for(var Ne=0,Ye=_e;Ne<Ye.length;Ne++){var Oe=Ye[Ne],tt=Oe[0],Ct=Oe[1];le.setAttribute(tt,Ct)}},ye.createRect=function(le,_e,Ne){var Ye=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ye.setAttribute("width",le.toString()),Ye.setAttribute("height",_e.toString()),Ne&&ye.setAttributes(Ye,Ne),Ye},ye.createLine=function(le,_e,Ne,Ye,Oe){var tt=document.createElementNS("http://www.w3.org/2000/svg","line");return tt.setAttribute("x1",le.toString()),tt.setAttribute("y1",_e.toString()),tt.setAttribute("x2",Ne.toString()),tt.setAttribute("y2",Ye.toString()),Oe&&ye.setAttributes(tt,Oe),tt},ye.createPolygon=function(le,_e){var Ne=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Ne.setAttribute("points",le),_e&&ye.setAttributes(Ne,_e),Ne},ye.createCircle=function(le,_e){var Ne=document.createElementNS("http://www.w3.org/2000/svg","circle");return Ne.setAttribute("cx",(le/2).toString()),Ne.setAttribute("cy",(le/2).toString()),Ne.setAttribute("r",le.toString()),_e&&ye.setAttributes(Ne,_e),Ne},ye.createEllipse=function(le,_e,Ne){var Ye=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ye.setAttribute("cx",(le/2).toString()),Ye.setAttribute("cy",(_e/2).toString()),Ye.setAttribute("rx",(le/2).toString()),Ye.setAttribute("ry",(_e/2).toString()),Ne&&ye.setAttributes(Ye,Ne),Ye},ye.createGroup=function(le){var _e=document.createElementNS("http://www.w3.org/2000/svg","g");return le&&ye.setAttributes(_e,le),_e},ye.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ye.createMarker=function(le,_e,Ne,Ye,Oe,tt,Ct){var Nt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ye.setAttributes(Nt,[["id",le],["orient",_e],["markerWidth",Ne.toString()],["markerHeight",Ye.toString()],["refX",Oe.toString()],["refY",tt.toString()]]),Nt.appendChild(Ct),Nt},ye.createText=function(le){var _e=document.createElementNS("http://www.w3.org/2000/svg","text");return _e.setAttribute("x","0"),_e.setAttribute("y","0"),le&&ye.setAttributes(_e,le),_e},ye.createTSpan=function(le,_e){var Ne=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Ne.textContent=le,_e&&ye.setAttributes(Ne,_e),Ne},ye.createImage=function(le){var _e=document.createElementNS("http://www.w3.org/2000/svg","image");return le&&ye.setAttributes(_e,le),_e},ye.createPoint=function(le,_e){var Ne=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Ne.x=le,Ne.y=_e,Ne},ye.createPath=function(le,_e){var Ne=document.createElementNS("http://www.w3.org/2000/svg","path");return Ne.setAttribute("d",le),_e&&ye.setAttributes(Ne,_e),Ne},ye}(),z=function(){function ye(){}return ye.addKey=function(le){ye.key=le},Object.defineProperty(ye,"isLicensed",{get:function(){return!!ye.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ye.key)},enumerable:!1,configurable:!0}),ye}(),x=function(){function ye(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ye.prototype.rasterize=function(le,_e,Ne){var Ye=this;return new Promise(function(Oe){var tt=Ne!==void 0?Ne:document.createElement("canvas");le===null&&(Ye.markersOnly=!0,Ye.naturalSize=!1);var Ct=document.createElementNS("http://www.w3.org/2000/svg","svg");Ct.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ct.setAttribute("width",_e.width.baseVal.valueAsString),Ct.setAttribute("height",_e.height.baseVal.valueAsString),Ct.setAttribute("viewBox","0 0 "+_e.viewBox.baseVal.width.toString()+" "+_e.viewBox.baseVal.height.toString()),Ct.innerHTML=_e.innerHTML,Ye.naturalSize===!0?(Ct.width.baseVal.value=le.naturalWidth,Ct.height.baseVal.value=le.naturalHeight):Ye.width!==void 0&&Ye.height!==void 0&&(Ct.width.baseVal.value=Ye.width,Ct.height.baseVal.value=Ye.height),tt.width=Ct.width.baseVal.value,tt.height=Ct.height.baseVal.value;var Nt=Ct.outerHTML,Dt=tt.getContext("2d");Ye.markersOnly!==!0&&Dt.drawImage(le,0,0,tt.width,tt.height);var ut=window.URL,Ht=new Image(tt.width,tt.height);Ht.setAttribute("crossOrigin","anonymous");var At=new Blob([Nt],{type:"image/svg+xml"}),Wt=ut.createObjectURL(At);Ht.onload=function(){Dt.drawImage(Ht,0,0),ut.revokeObjectURL(Wt);var on=tt.toDataURL(Ye.imageType,Ye.imageQuality);Oe(on)},Ht.src=Wt})},ye}(),ne=function(){},ae=function(){function ye(le){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+le+"_"}return Object.defineProperty(ye.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ye.prototype.addClass=function(le){return this.styleSheet===void 0&&this.addStyleSheet(),le.name=""+this.classNamePrefix+le.localName,this.classes.push(le),this.styleSheet.sheet.insertRule("."+le.name+" {"+le.style+"}",this.styleSheet.sheet.cssRules.length),le},ye.prototype.addRule=function(le){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(le),this.styleSheet.sheet.insertRule(le.selector+" {"+le.style+"}",this.styleSheet.sheet.cssRules.length)},ye.prototype.addStyleSheet=function(){var le;this.styleSheet=document.createElement("style"),((le=this.styleSheetRoot)!==null&&le!==void 0?le:document.head).appendChild(this.styleSheet),this.addRule(new oe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new oe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new oe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new ge("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new ge("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},ye.prototype.removeStyleSheet=function(){var le;this.styleSheet&&(((le=this.styleSheetRoot)!==null&&le!==void 0?le:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ye}(),oe=function(ye,le){this.selector=ye,this.style=le},ge=function(ye,le){this.localName=ye,this.style=le},Se=function(){function ye(le,_e,Ne,Ye,Oe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=le,this.displayMode=_e,this.markerItems=Ne,this.uiStyleSettings=Ye,this.styles=Oe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ye.prototype.show=function(le){var _e=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=le,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Ne=document.createElement("div");Ne.className=this.toolbarBlockStyleClass.name,Ne.style.whiteSpace="nowrap",this.uiContainer.appendChild(Ne),this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Ne,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Oe){var tt=document.createElement("div");tt.className=""+_e.toolbarButtonStyleClass.name,tt.setAttribute("data-type-name",Oe.typeName),tt.innerHTML=Oe.icon,tt.addEventListener("click",function(){_e.markerToolbarButtonClicked(tt,Oe)}),_e.buttons.push(tt),_e.markerButtons.push(tt)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Ye=document.createElement("div");Ye.className=this.toolbarBlockStyleClass.name,Ye.style.whiteSpace="nowrap",Ye.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ye),this.addActionButton(Ye,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Ye,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},ye.prototype.addButtonClickListener=function(le){this.buttonClickListeners.push(le)},ye.prototype.removeButtonClickListener=function(le){this.buttonClickListeners.indexOf(le)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(le),1)},ye.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ye.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var le=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var _e=0;_e<this.markerButtons.length;_e++)_e<le||_e===le&&this.markerButtons.length-1===le?this.markerButtonBlock.appendChild(this.markerButtons[_e]):(_e===le&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[_e]))}},ye.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ye.prototype.resetButtonStyles=function(){var le=this;this.buttons.forEach(function(_e){_e.className=_e.className.replace(le.uiStyleSettings.toolbarButtonStyleColorsClassName?le.uiStyleSettings.toolbarButtonStyleColorsClassName:le.toolbarButtonStyleColorsClass.name,"").trim(),_e.className=_e.className.replace(le.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?le.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:le.toolbarActiveButtonStyleColorsClass.name,"").trim(),_e.className+=" "+(le.uiStyleSettings.toolbarButtonStyleColorsClassName?le.uiStyleSettings.toolbarButtonStyleColorsClassName:le.toolbarButtonStyleColorsClass.name)})},ye.prototype.addActionButton=function(le,_e,Ne){var Ye=this,Oe=document.createElement("div");switch(Oe.className=""+this.toolbarButtonStyleClass.name,Oe.innerHTML=_e,Oe.setAttribute("data-action",Ne),Oe.addEventListener("click",function(){Ye.actionToolbarButtonClicked(Oe,Ne)}),Ne){case"select":Oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Oe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Oe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Oe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Oe.style.fill=this.uiStyleSettings.closeButtonColor}le.appendChild(Oe),this.buttons.push(Oe)},ye.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ge("toolbar",`
width: 100%;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.uiStyleSettings.toolbarHeight+`px;
box-sizing: content-box;
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
overflow: hidden;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ge("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ge("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ge("toolbar-overflow-block",`
position: absolute;
top: `+this.uiStyleSettings.toolbarHeight+`px;
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
z-index: 10;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ge("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var le=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ge("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*le)+`px;
padding: `+le+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new oe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new oe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},ye.prototype.markerToolbarButtonClicked=function(le,_e){this.setActiveButton(le),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("marker",_e)}),this.markerButtonOverflowBlock.style.display="none"},ye.prototype.actionToolbarButtonClicked=function(le,_e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Ne){return Ne("action",_e)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ye.prototype.setActiveButton=function(le){this.resetButtonStyles(),le.className=le.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),le.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ye.prototype.setActiveMarkerButton=function(le){var _e=this.markerButtons.find(function(Ne){return Ne.getAttribute("data-type-name")===le});_e&&this.setActiveButton(_e)},ye.prototype.setCurrentMarker=function(le){var _e=this;this.currentMarker=le,this.buttons.filter(function(Ne){return/delete|notes/.test(Ne.getAttribute("data-action"))}).forEach(function(Ne){_e.currentMarker===void 0?(Ne.style.fillOpacity="0.4",Ne.style.pointerEvents="none"):(Ne.style.fillOpacity="1",Ne.style.pointerEvents="all")})},ye}(),ve=function(){function ye(le,_e,Ne,Ye){this.panels=[],this.panelButtons=[],this.markerjsContainer=le,this.displayMode=_e,this.uiStyleSettings=Ne,this.styles=Ye,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ye.prototype.addStyles=function(){var le;this.toolboxStyleClass=this.styles.addClass(new ge("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 ge("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var _e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ge("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ge("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ge("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 ge("toolbox-panel-row_colors",`
background-color: `+((le=this.uiStyleSettings.toolboxBackgroundColor)!==null&&le!==void 0?le:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ge("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*_e)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*_e)+`px;
padding: `+_e+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ge("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new oe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new oe("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},ye.prototype.show=function(le){var _e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=le,this.uiContainer.className=this.toolboxStyleClass.name+" "+((_e=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&_e!==void 0?_e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ye.prototype.setPanelButtons=function(le){var _e,Ne,Ye=this;this.panels=le,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((_e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&_e!==void 0?_e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Ne=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Ne!==void 0?Ne:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Oe){var tt;Oe.uiStyleSettings=Ye.uiStyleSettings;var Ct=document.createElement("div");Ct.className=Ye.toolboxButtonStyleClass.name+" "+((tt=Ye.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&tt!==void 0?tt:Ye.toolboxButtonStyleColorsClass.name),Ct.innerHTML=Oe.icon,Ct.title=Oe.title,Ct.addEventListener("click",function(){Ye.panelButtonClick(Oe)}),Ye.panelButtons.push(Ct),Ye.buttonRow.appendChild(Ct)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ye.prototype.panelButtonClick=function(le){var _e=this,Ne=-1;if(le!==this.activePanel){Ne=this.panels.indexOf(le),this.panelRow.innerHTML="";var Ye=le.getUi();Ye.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ye),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=le}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){_e.displayMode==="inline"?_e.panelRow.style.display="none":_e.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Oe,tt){var Ct,Nt;Oe.className=_e.toolboxButtonStyleClass.name+" "+(tt===Ne?""+((Ct=_e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ct!==void 0?Ct:_e.toolboxActiveButtonStyleColorsClass.name):""+((Nt=_e.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Nt!==void 0?Nt:_e.toolboxButtonStyleColorsClass.name))})},ye}(),be=function(ye,le){this.title=ye,this.icon=le},xe=function(ye){function le(_e,Ne,Ye,Oe){var tt=ye.call(this,_e,Oe||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return tt.colors=[],tt.addTransparent=!1,tt.colorBoxes=[],tt.colors=Ne,tt.currentColor=Ye,tt.setCurrentColor=tt.setCurrentColor.bind(tt),tt.getColorBox=tt.getColorBox.bind(tt),tt}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.whiteSpace="nowrap",this.colors.forEach(function(Ye){var Oe=_e.getColorBox(Ye);Ne.appendChild(Oe),_e.colorBoxes.push(Oe)}),Ne},le.prototype.getColorBox=function(_e){var Ne=this,Ye=this.uiStyleSettings.toolbarHeight/4,Oe=this.uiStyleSettings.toolbarHeight-Ye,tt=document.createElement("div");tt.style.display="inline-block",tt.style.boxSizing="content-box",tt.style.width=Oe-2+"px",tt.style.height=Oe-2+"px",tt.style.padding="1px",tt.style.marginRight="2px",tt.style.marginBottom="2px",tt.style.borderWidth="2px",tt.style.borderStyle="solid",tt.style.borderRadius=(Oe+2)/2+"px",tt.style.borderColor=_e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",tt.addEventListener("click",function(){Ne.setCurrentColor(_e,tt)});var Ct=document.createElement("div");return Ct.style.display="inline-block",Ct.style.width=Oe-2+"px",Ct.style.height=Oe-2+"px",Ct.style.backgroundColor=_e,Ct.style.borderRadius=Oe/2+"px",_e==="transparent"&&(Ct.style.fill=this.uiStyleSettings.toolboxAccentColor,Ct.innerHTML=`<svg viewBox="0 0 24 24">
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
</svg>`),tt.appendChild(Ct),tt},le.prototype.setCurrentColor=function(_e,Ne){var Ye=this;this.currentColor=_e,this.colorBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(_e)},le}(be),pe=function(){function ye(le,_e,Ne){this._state="new",this._isSelected=!1,this._container=le,this._overlayContainer=_e,this.globalSettings=Ne,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ye.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ye.prototype.ownsTarget=function(le){return!1},Object.defineProperty(ye.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ye.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ye.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ye.prototype.pointerDown=function(le,_e){},ye.prototype.dblClick=function(le,_e){},ye.prototype.manipulate=function(le){},ye.prototype.pointerUp=function(le){this.stateChanged()},ye.prototype.dispose=function(){},ye.prototype.addMarkerVisualToContainer=function(le){this.container.childNodes.length>0?this.container.insertBefore(le,this.container.childNodes[0]):this.container.appendChild(le)},ye.prototype.getState=function(){return{typeName:ye.typeName,state:this.state,notes:this.notes}},ye.prototype.restoreState=function(le){this._state=le.state,this.notes=le.notes},ye.prototype.scale=function(le,_e){},ye.prototype.colorChanged=function(le){this.onColorChanged&&this.onColorChanged(le),this.stateChanged()},ye.prototype.fillColorChanged=function(le){this.onFillColorChanged&&this.onFillColorChanged(le),this.stateChanged()},ye.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var le=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),le.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(le)&&this.onStateChanged(this)}},ye.typeName="MarkerBase",ye}(),me=function(){function ye(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ye.prototype.findGripByVisual=function(le){return this.topLeft.ownsTarget(le)?this.topLeft:this.topCenter.ownsTarget(le)?this.topCenter:this.topRight.ownsTarget(le)?this.topRight:this.centerLeft.ownsTarget(le)?this.centerLeft:this.centerRight.ownsTarget(le)?this.centerRight:this.bottomLeft.ownsTarget(le)?this.bottomLeft:this.bottomCenter.ownsTarget(le)?this.bottomCenter:this.bottomRight.ownsTarget(le)?this.bottomRight:void 0},ye}(),Ae=function(){function ye(){this.GRIP_SIZE=10,this.visual=y.createGroup(),this.visual.appendChild(y.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(y.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ye.prototype.ownsTarget=function(le){return le===this.visual||le===this.visual.childNodes[0]||le===this.visual.childNodes[1]},ye}(),De=function(){function ye(){}return ye.toITransformMatrix=function(le){return{a:le.a,b:le.b,c:le.c,d:le.d,e:le.e,f:le.f}},ye.toSVGMatrix=function(le,_e){return le.a=_e.a,le.b=_e.b,le.c=_e.c,le.d=_e.d,le.e=_e.e,le.f=_e.f,le},ye}(),ke=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.left=0,Oe.top=0,Oe.width=0,Oe.height=0,Oe.defaultSize={x:50,y:20},Oe.offsetX=0,Oe.offsetY=0,Oe.rotationAngle=0,Oe.CB_DISTANCE=10,Oe._suppressMarkerCreateEvent=!1,Oe.container.transform.baseVal.appendItem(y.createTransform()),Oe.setupControlBox(),Oe}return ue(le,ye),Object.defineProperty(le.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"visual",{get:function(){return this._visual},set:function(_e){this._visual=_e;var Ne=y.createTransform();this._visual.transform.baseVal.appendItem(Ne)},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(_e){return!!ye.prototype.ownsTarget.call(this,_e)||!!(this.controlGrips.findGripByVisual(_e)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(_e))},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="new"&&(this.left=_e.x,this.top=_e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ye=this.unrotatePoint(_e);if(this.manipulationStartX=Ye.x,this.manipulationStartY=Ye.y,this.offsetX=Ye.x-this.left,this.offsetY=Ye.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Ne),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ne)){this.activeGrip=this.rotatorGrip;var Oe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Oe.x-this.width/2,this.top=Oe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var tt=this.container.transform.baseVal.getItem(0);tt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(tt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},le.prototype.pointerUp=function(_e){var Ne=this.state;ye.prototype.pointerUp.call(this,_e),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(_e),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},le.prototype.moveVisual=function(_e){this.visual.style.transform="translate("+_e.x+"px, "+_e.y+"px)"},le.prototype.manipulate=function(_e){var Ne=this.unrotatePoint(_e);this.state==="creating"?this.resize(_e):this.state==="move"?(this.left=this.manipulationStartLeft+(Ne.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Ne.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Ne):this.state==="rotate"&&this.rotate(_e)},le.prototype.resize=function(_e){var Ne=this.manipulationStartLeft,Ye=this.manipulationStartWidth,Oe=this.manipulationStartTop,tt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Ne=this.manipulationStartLeft+_e.x-this.manipulationStartX,Ye=this.manipulationStartWidth+this.manipulationStartLeft-Ne;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ye=this.manipulationStartWidth+_e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Oe=this.manipulationStartTop+_e.y-this.manipulationStartY,tt=this.manipulationStartHeight+this.manipulationStartTop-Oe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:tt=this.manipulationStartHeight+_e.y-this.manipulationStartY}Ye>=0?(this.left=Ne,this.width=Ye):(this.left=Ne+Ye,this.width=-Ye),tt>=0?(this.top=Oe,this.height=tt):(this.top=Oe+tt,this.height=-tt),this.setSize()},le.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},le.prototype.rotate=function(_e){if(Math.abs(_e.x-this.centerX)>.1){var Ne=Math.sign(_e.x-this.centerX);this.rotationAngle=180*Math.atan((_e.y-this.centerY)/(_e.x-this.centerX))/Math.PI+90*Ne,this.applyRotation()}},le.prototype.applyRotation=function(){var _e=this.container.transform.baseVal.getItem(0);_e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_e,0)},le.prototype.rotatePoint=function(_e){if(this.rotationAngle===0)return _e;var Ne=this.container.getCTM(),Ye=y.createPoint(_e.x,_e.y);return{x:(Ye=Ye.matrixTransform(Ne)).x,y:Ye.y}},le.prototype.unrotatePoint=function(_e){if(this.rotationAngle===0)return _e;var Ne=this.container.getCTM();Ne=Ne.inverse();var Ye=y.createPoint(_e.x,_e.y);return{x:(Ye=Ye.matrixTransform(Ne)).x,y:Ye.y}},le.prototype.select=function(){ye.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},le.prototype.deselect=function(){ye.prototype.deselect.call(this),this.controlBox.style.display="none"},le.prototype.setupControlBox=function(){this.controlBox=y.createGroup();var _e=y.createTransform();_e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(_e),this.container.appendChild(this.controlBox),this.controlRect=y.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=y.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 me,this.addControlGrips(),this.controlBox.style.display="none"},le.prototype.adjustControlBox=function(){var _e=this.controlBox.transform.baseVal.getItem(0);_e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(_e,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()},le.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()},le.prototype.createGrip=function(){var _e=new Ae;return _e.visual.transform.baseVal.appendItem(y.createTransform()),this.controlBox.appendChild(_e.visual),_e},le.prototype.positionGrips=function(){var _e=this.controlGrips.topLeft.GRIP_SIZE,Ne=-_e/2,Ye=Ne,Oe=(this.width+this.CB_DISTANCE)/2-_e/2,tt=(this.height+this.CB_DISTANCE)/2-_e/2,Ct=this.height+this.CB_DISTANCE-_e/2,Nt=this.width+this.CB_DISTANCE-_e/2;this.positionGrip(this.controlGrips.topLeft.visual,Ne,Ye),this.positionGrip(this.controlGrips.topCenter.visual,Oe,Ye),this.positionGrip(this.controlGrips.topRight.visual,Nt,Ye),this.positionGrip(this.controlGrips.centerLeft.visual,Ne,tt),this.positionGrip(this.controlGrips.centerRight.visual,Nt,tt),this.positionGrip(this.controlGrips.bottomLeft.visual,Ne,Ct),this.positionGrip(this.controlGrips.bottomCenter.visual,Oe,Ct),this.positionGrip(this.controlGrips.bottomRight.visual,Nt,Ct),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Oe,Ye-3*this.CB_DISTANCE)},le.prototype.positionGrip=function(_e,Ne,Ye){var Oe=_e.transform.baseVal.getItem(0);Oe.setTranslate(Ne,Ye),_e.transform.baseVal.replaceItem(Oe,0)},le.prototype.hideControlBox=function(){this.controlBox.style.display="none"},le.prototype.showControlBox=function(){this.controlBox.style.display=""},le.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:De.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:De.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ye.prototype.getState.call(this))},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e);var Ne=_e;this.left=Ne.left,this.top=Ne.top,this.width=Ne.width,this.height=Ne.height,this.rotationAngle=Ne.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Ne.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Ne.containerTransformMatrix))},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne);var Ye=this.rotatePoint({x:this.left,y:this.top}),Oe=this.unrotatePoint({x:Ye.x*_e,y:Ye.y*Ne});this.left=Oe.x,this.top=Oe.y,this.width=this.width*_e,this.height=this.height*Ne,this.adjustControlBox()},le}(pe),Ie=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.fillColor="transparent",Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.opacity=1,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setFillColor=Oe.setFillColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.createVisual=Oe.createVisual.bind(Oe),Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual)},le.prototype.createVisual=function(){this.visual=y.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)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},le.prototype.manipulate=function(_e){ye.prototype.manipulate.call(this,_e)},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),this.setSize()},le.prototype.setSize=function(){ye.prototype.setSize.call(this),y.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},le.prototype.pointerUp=function(_e){ye.prototype.pointerUp.call(this,_e),this.setSize()},le.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.visual&&y.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},le.prototype.setFillColor=function(_e){this.fillColor=_e,this.visual&&y.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},le.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.visual&&y.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},le.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.visual&&y.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},le.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ye.prototype.getState.call(this))},le.prototype.restoreState=function(_e){var Ne=_e;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),ye.prototype.restoreState.call(this,_e),this.setSize()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.setSize()},le.title="Rectangle marker",le}(ke),Fe=function(ye){function le(_e,Ne,Ye,Oe){var tt=ye.call(this,_e,Oe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return tt.widths=[],tt.widthBoxes=[],tt.widths=Ne,tt.currentWidth=Ye,tt.setCurrentWidth=tt.setCurrentWidth.bind(tt),tt}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.widths.forEach(function(Ye){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.flexGrow="2",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.borderColor=Ye===_e.currentWidth?_e.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){_e.setCurrentWidth(Ye,Oe)}),Ne.appendChild(Oe);var tt=document.createElement("div");tt.innerText=Ye.toString(),tt.style.marginRight="5px",Oe.appendChild(tt);var Ct=document.createElement("div");Ct.style.minHeight="20px",Ct.style.flexGrow="2",Ct.style.display="flex",Ct.style.alignItems="center";var Nt=document.createElement("hr");Nt.style.minWidth="20px",Nt.style.border="0px",Nt.style.borderTop=Ye+"px solid "+_e.uiStyleSettings.toolboxColor,Nt.style.flexGrow="2",Ct.appendChild(Nt),Oe.appendChild(Ct),_e.widthBoxes.push(Oe)}),Ne},le.prototype.setCurrentWidth=function(_e,Ne){var Ye=this;this.currentWidth=_e,this.widthBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},le}(be),Pe=function(ye){function le(_e,Ne,Ye,Oe){var tt=ye.call(this,_e,Oe||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return tt.styles=[],tt.styleBoxes=[],tt.styles=Ne,tt.currentStyle=Ye,tt.setCurrentStyle=tt.setCurrentStyle.bind(tt),tt}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.styles.forEach(function(Ye){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.overflow="hidden",Oe.style.maxWidth=100/_e.styles.length-5+"%",Oe.style.borderColor=Ye===_e.currentStyle?_e.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){_e.setCurrentStyle(Ye,Oe)}),Ne.appendChild(Oe);var tt=document.createElement("div");tt.style.minHeight="20px",tt.style.flexGrow="2",tt.style.overflow="hidden";var Ct=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+_e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ye!==""?'stroke-dasharray="'+Ye+'"':"")+` />
</svg>`;tt.innerHTML=Ct,Oe.appendChild(tt),_e.styleBoxes.push(Oe)}),Ne},le.prototype.setCurrentStyle=function(_e,Ne){var Ye=this;this.currentStyle=_e,this.styleBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},le}(be),qe=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.strokeColor=Ye.defaultColor,Oe.strokeWidth=Ye.defaultStrokeWidth,Oe.strokeDasharray=Ye.defaultStrokeDasharray,Oe.strokePanel=new xe("Line color",Ye.defaultColorSet,Ye.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new Pe("Line style",Ye.defaultStrokeDasharrays,Ye.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ue(le,ye),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=ye.prototype.getState.call(this);return _e.typeName=le.typeName,_e},le.typeName="FrameMarker",le.title="Frame marker",le.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',le}(Ie),Ke=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"},ot=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.x1=0,Oe.y1=0,Oe.x2=0,Oe.y2=0,Oe.defaultLength=50,Oe.manipulationStartX=0,Oe.manipulationStartY=0,Oe.manipulationStartX1=0,Oe.manipulationStartY1=0,Oe.manipulationStartX2=0,Oe.manipulationStartY2=0,Oe.setupControlBox(),Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!!ye.prototype.ownsTarget.call(this,_e)||!(!this.grip1.ownsTarget(_e)&&!this.grip2.ownsTarget(_e))},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.manipulationStartX=_e.x,this.manipulationStartY=_e.y,this.state==="new"&&(this.x1=_e.x,this.y1=_e.y,this.x2=_e.x,this.y2=_e.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(Ne)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Ne)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},le.prototype.pointerUp=function(_e){var Ne=this.state;ye.prototype.pointerUp.call(this,_e),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(_e),this._state="select",Ne==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},le.prototype.adjustVisual=function(){},le.prototype.manipulate=function(_e){this.state==="creating"?this.resize(_e):this.state==="move"?(this.x1=this.manipulationStartX1+_e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+_e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+_e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+_e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(_e)},le.prototype.resize=function(_e){switch(this.activeGrip){case this.grip1:this.x1=_e.x,this.y1=_e.y;break;case this.grip2:case void 0:this.x2=_e.x,this.y2=_e.y}this.adjustVisual(),this.adjustControlBox()},le.prototype.select=function(){ye.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},le.prototype.deselect=function(){ye.prototype.deselect.call(this),this.controlBox.style.display="none"},le.prototype.setupControlBox=function(){this.controlBox=y.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},le.prototype.adjustControlBox=function(){this.positionGrips()},le.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},le.prototype.createGrip=function(){var _e=new Ae;return _e.visual.transform.baseVal.appendItem(y.createTransform()),this.controlBox.appendChild(_e.visual),_e},le.prototype.positionGrips=function(){var _e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-_e/2,this.y1-_e/2),this.positionGrip(this.grip2.visual,this.x2-_e/2,this.y2-_e/2)},le.prototype.positionGrip=function(_e,Ne,Ye){var Oe=_e.transform.baseVal.getItem(0);Oe.setTranslate(Ne,Ye),_e.transform.baseVal.replaceItem(Oe,0)},le.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ye.prototype.getState.call(this))},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e);var Ne=_e;this.x1=Ne.x1,this.y1=Ne.y1,this.x2=Ne.x2,this.y2=Ne.y2},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.x1=this.x1*_e,this.y1=this.y1*Ne,this.x2=this.x2*_e,this.y2=this.y2*Ne,this.adjustVisual(),this.adjustControlBox()},le}(pe),He=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.strokeColor=Ye.defaultColor,Oe.strokeWidth=Ye.defaultStrokeWidth,Oe.strokeDasharray=Ye.defaultStrokeDasharray,Oe.strokePanel=new xe("Line color",Ye.defaultColorSet,Ye.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new Pe("Line style",Ye.defaultStrokeDasharrays,Ye.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.selectorLine&&_e!==this.visibleLine)},le.prototype.createVisual=function(){this.visual=y.createGroup(),this.selectorLine=y.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=y.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)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},le.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()),y.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),y.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),y.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},le.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.adjustVisual(),this.colorChanged(_e)},le.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.adjustVisual()},le.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e);var Ne=_e;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.createVisual(),this.adjustVisual()},le.typeName="LineMarker",le.title="Line marker",le.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',le}(ot),rt=function(ye){function le(_e,Ne,Ye,Oe){var tt=ye.call(this,_e,Oe||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return tt.fonts=[],tt.fontBoxes=[],tt.fonts=Ne,tt.currentFont=Ye,tt.setCurrentFont=tt.setCurrentFont.bind(tt),tt}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");return Ne.style.overflow="hidden",Ne.style.flexGrow="2",this.fonts.forEach(function(Ye){var Oe=document.createElement("div");Oe.style.display="inline-block",Oe.style.alignItems="center",Oe.style.justifyContent="space-between",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.overflow="hidden",Oe.style.maxWidth=100/_e.fonts.length-5+"%",Oe.style.borderColor=Ye===_e.currentFont?_e.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){_e.setCurrentFont(Ye,Oe)}),Ne.appendChild(Oe);var tt=document.createElement("div");tt.style.display="flex",tt.style.minHeight="20px",tt.style.flexGrow="2",tt.style.fontFamily=Ye,tt.style.overflow="hidden";var Ct=document.createElement("div");Ct.style.whiteSpace="nowrap",Ct.style.overflow="hidden",Ct.style.textOverflow="ellipsis",Ct.innerHTML="The quick brown fox jumps over the lazy dog",tt.appendChild(Ct),Oe.appendChild(tt),_e.fontBoxes.push(Oe)}),Ne},le.prototype.setCurrentFont=function(_e,Ne){var Ye=this;this.currentFont=_e,this.fontBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},le}(be),Ge=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.color="transparent",Oe.padding=5,Oe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Oe.text=Oe.DEFAULT_TEXT,Oe.isMoved=!1,Oe.color=Ye.defaultColor,Oe.fontFamily=Ye.defaultFontFamily,Oe.defaultSize={x:100,y:30},Oe.setColor=Oe.setColor.bind(Oe),Oe.setFont=Oe.setFont.bind(Oe),Oe.renderText=Oe.renderText.bind(Oe),Oe.sizeText=Oe.sizeText.bind(Oe),Oe.textEditDivClicked=Oe.textEditDivClicked.bind(Oe),Oe.showTextEditor=Oe.showTextEditor.bind(Oe),Oe.setSize=Oe.setSize.bind(Oe),Oe.positionTextEditor=Oe.positionTextEditor.bind(Oe),Oe.colorPanel=new xe("Color",Ye.defaultColorSet,Ye.defaultColor),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.fontFamilyPanel=new rt("Font",Ye.defaultFontFamilies,Ye.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){if(ye.prototype.ownsTarget.call(this,_e)||_e===this.visual||_e===this.textElement||_e===this.bgRectangle)return!0;var Ne=!1;return this.textElement.childNodes.forEach(function(Ye){Ye===_e&&(Ne=!0)}),Ne},le.prototype.createVisual=function(){this.visual=y.createGroup(),this.bgRectangle=y.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=y.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(y.createTransform()),this.textElement.transform.baseVal.appendItem(y.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.isMoved=!1,this.pointerDownPoint=_e,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},le.prototype.renderText=function(){var _e=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(Ne){_e.textElement.appendChild(y.createTSpan(Ne.trim()===""?" ":Ne.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},le.prototype.getTextScale=function(){var _e=this.textElement.getBBox(),Ne=1;if(_e.width>0&&_e.height>0){var Ye=(1*this.width-this.width*this.padding*2/100)/_e.width,Oe=(1*this.height-this.height*this.padding*2/100)/_e.height;Ne=Math.min(Ye,Oe)}return Ne},le.prototype.getTextPosition=function(_e){var Ne=this.textElement.getBBox(),Ye=0,Oe=0;return Ne.width>0&&Ne.height>0&&(Ye=(this.width-Ne.width*_e)/2,Oe=this.height/2-Ne.height*_e/2),{x:Ye,y:Oe}},le.prototype.sizeText=function(){var _e=this.textElement.getBBox(),Ne=this.getTextScale(),Ye=this.getTextPosition(Ne);Ye.y-=_e.y*Ne,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ye.x+"px, "+Ye.y+"px) scale("+Ne+", "+Ne+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ye.x,Ye.y),this.textElement.transform.baseVal.getItem(1).setScale(Ne,Ne))},le.prototype.manipulate=function(_e){ye.prototype.manipulate.call(this,_e),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(_e.x-this.pointerDownPoint.x)>5||Math.abs(_e.y-this.pointerDownPoint.y)>5)},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),this.isMoved=!0,this.setSize(),this.sizeText()},le.prototype.setSize=function(){ye.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(y.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),y.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},le.prototype.pointerUp=function(_e){var Ne=this.state;Ne==="creating"&&(this._suppressMarkerCreateEvent=!0),ye.prototype.pointerUp.call(this,_e),this.setSize(),(Ne==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},le.prototype.showTextEditor=function(){var _e=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(Ne){Ne.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Ne=Number.parseFloat(_e.textEditor.style.fontSize);_e.textEditor.clientWidth>=Number.parseInt(_e.textEditor.style.maxWidth)&&Ne>.9;)Ne-=.1,_e.textEditor.style.fontSize=Math.max(Ne,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Ne){if(Ne.clipboardData){var Ye=Ne.clipboardData.getData("text"),Oe=window.getSelection();if(!Oe.rangeCount)return!1;Oe.deleteFromDocument(),Oe.getRangeAt(0).insertNode(document.createTextNode(Ye)),Ne.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){_e.textEditDivClicked(_e.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},le.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var _e=this.getTextScale(),Ne=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ye=this.textElement.getBBox(),Oe={x:Ye.width*_e,y:Ye.height*_e};Ne.x-=Oe.x/2,Ne.y-=Oe.y/2,this.textEditor.style.top=Ne.y+"px",this.textEditor.style.left=Ne.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Ne.x+"px",this.textEditor.style.fontSize=Math.max(16*_e,12)+"px",this.textElement.style.display="none"}},le.prototype.textEditDivClicked=function(_e){this.text=_e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},le.prototype.select=function(){ye.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},le.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ye.prototype.deselect.call(this)},le.prototype.dblClick=function(_e,Ne){ye.prototype.dblClick.call(this,_e,Ne),this.showTextEditor()},le.prototype.setColor=function(_e){this.textElement&&y.setAttributes(this.textElement,[["fill",_e]]),this.color=_e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(_e)},le.prototype.setFont=function(_e){this.textElement&&y.setAttributes(this.textElement,[["font-family",_e]]),this.fontFamily=_e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},le.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},le.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){var Ne=_e;this.color=Ne.color,this.fontFamily=Ne.fontFamily,this.padding=Ne.padding,this.text=Ne.text,this.createVisual(),ye.prototype.restoreState.call(this,_e),this.setSize()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.setSize(),this.sizeText(),this.positionTextEditor()},le.typeName="TextMarker",le.title="Text marker",le.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',le}(ke),ct=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.color="transparent",Oe.lineWidth=3,Oe.drawing=!1,Oe.pixelRatio=1,Oe.color=Ye.defaultColor,Oe.lineWidth=Ye.defaultStrokeWidth,Oe.pixelRatio=Ye.freehandPixelRatio,Oe.setColor=Oe.setColor.bind(Oe),Oe.addCanvas=Oe.addCanvas.bind(Oe),Oe.finishCreation=Oe.finishCreation.bind(Oe),Oe.setLineWidth=Oe.setLineWidth.bind(Oe),Oe.colorPanel=new xe("Color",Ye.defaultColorSet,Ye.defaultColor),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.lineWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.lineWidthPanel.onWidthChanged=Oe.setLineWidth,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.drawingImage)},le.prototype.createVisual=function(){this.visual=y.createGroup(),this.drawingImage=y.createImage(),this.visual.appendChild(this.drawingImage);var _e=y.createTransform();this.visual.transform.baseVal.appendItem(_e),this.addMarkerVisualToContainer(this.visual)},le.prototype.pointerDown=function(_e,Ne){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(_e.x,_e.y),this.drawing=!0):ye.prototype.pointerDown.call(this,_e,Ne)},le.prototype.manipulate=function(_e){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(_e.x,_e.y),this.canvasContext.stroke()):ye.prototype.manipulate.call(this,_e)},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),y.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),y.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},le.prototype.pointerUp=function(_e){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ye.prototype.pointerUp.call(this,_e)},le.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)},le.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ye.prototype.select.call(this)},le.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ye.prototype.deselect.call(this)},le.prototype.finishCreation=function(){for(var _e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Ne=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ye=Ne[0],Oe=Ne[1],tt=Ne[2],Ct=Ne[3],Nt=!1,Dt=0;Dt<this.canvasElement.height;Dt++)for(var ut=0;ut<this.canvasElement.width;ut++)_e.data[Dt*this.canvasElement.width*4+4*ut+3]>0&&(Nt=!0,Dt<Oe&&(Oe=Dt),ut<Ye&&(Ye=ut),Dt>Ct&&(Ct=Dt),ut>tt&&(tt=ut));if(Nt){this.left=Ye/this.pixelRatio,this.top=Oe/this.pixelRatio,this.width=(tt-Ye)/this.pixelRatio,this.height=(Ct-Oe)/this.pixelRatio;var Ht=document.createElement("canvas");Ht.width=tt-Ye,Ht.height=Ct-Oe,Ht.getContext("2d").putImageData(this.canvasContext.getImageData(Ye,Oe,tt-Ye,Ct-Oe),0,0),this.drawingImgUrl=Ht.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},le.prototype.setDrawingImage=function(){y.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),y.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},le.prototype.setColor=function(_e){this.color=_e,this.colorChanged(_e)},le.prototype.setLineWidth=function(_e){this.lineWidth=_e},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({drawingImgUrl:this.drawingImgUrl},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){this.createVisual(),ye.prototype.restoreState.call(this,_e),this.drawingImgUrl=_e.drawingImgUrl,this.setDrawingImage()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.setDrawingImage()},le.typeName="FreehandMarker",le.title="Freehand marker",le.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',le}(ke),We=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ye||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Oe.typeBoxes=[],Oe.currentType=Ne,Oe.setCurrentType=Oe.setCurrentType.bind(Oe),Oe}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2";for(var Ye=function(Ct){var Nt="both";switch(Ct){case 0:Nt="both";break;case 1:Nt="start";break;case 2:Nt="end";break;case 3:Nt="none"}var Dt=document.createElement("div");if(Dt.style.display="flex",Dt.style.flexGrow="2",Dt.style.alignItems="center",Dt.style.justifyContent="space-between",Dt.style.padding="5px",Dt.style.borderWidth="2px",Dt.style.borderStyle="solid",Dt.style.borderColor=Nt===Oe.currentType?Oe.uiStyleSettings.toolboxAccentColor:"transparent",Dt.addEventListener("click",function(){_e.setCurrentType(Nt,Dt)}),Ne.appendChild(Dt),Nt==="both"||Nt==="start"){var ut=document.createElement("div");ut.style.display="flex",ut.style.alignItems="center",ut.style.minHeight="20px",ut.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Oe.uiStyleSettings!==void 0?Oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ut.style.marginLeft="5px",Dt.appendChild(ut)}var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.style.flexGrow="2";var At=document.createElement("hr");if(At.style.minWidth="20px",At.style.border="0px",At.style.borderTop="3px solid "+(Oe.uiStyleSettings!==void 0?Oe.uiStyleSettings.toolboxColor:"#eeeeee"),At.style.flexGrow="2",Ht.appendChild(At),Dt.appendChild(Ht),Nt==="both"||Nt==="end"){var Wt=document.createElement("div");Wt.style.display="flex",Wt.style.alignItems="center",Wt.style.minHeight="20px",Wt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Oe.uiStyleSettings!==void 0?Oe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Wt.style.marginRight="5px",Dt.appendChild(Wt)}Oe.typeBoxes.push(Dt)},Oe=this,tt=0;tt<4;tt++)Ye(tt);return Ne},le.prototype.setCurrentType=function(_e,Ne){var Ye=this;this.currentType=_e,this.typeBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings!==void 0?Ye.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},le}(be),Ue=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.arrowType="end",Oe.arrowBaseHeight=10,Oe.arrowBaseWidth=10,Oe.getArrowPoints=Oe.getArrowPoints.bind(Oe),Oe.setArrowType=Oe.setArrowType.bind(Oe),Oe.arrowTypePanel=new We("Arrow type","end"),Oe.arrowTypePanel.onArrowTypeChanged=Oe.setArrowType,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.arrow1&&_e!==this.arrow2)},le.prototype.getArrowPoints=function(_e,Ne){var Ye=this.arrowBaseWidth+2*this.strokeWidth,Oe=this.arrowBaseHeight+2*this.strokeWidth;return _e-Ye/2+","+(Ne+Oe/2)+" "+_e+","+(Ne-Oe/2)+" "+(_e+Ye/2)+","+(Ne+Oe/2)},le.prototype.createTips=function(){this.arrow1=y.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(y.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=y.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(y.createTransform()),this.visual.appendChild(this.arrow2)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="creating"&&this.createTips()},le.prototype.adjustVisual=function(){if(ye.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",y.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),y.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var _e=0;Math.abs(this.x1-this.x2)>.1&&(_e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Ne=this.arrow1.transform.baseVal.getItem(0);Ne.setRotate(_e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Ne,0);var Ye=this.arrow2.transform.baseVal.getItem(0);Ye.setRotate(_e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ye,0)}},le.prototype.setArrowType=function(_e){this.arrowType=_e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({arrowType:this.arrowType},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e);var Ne=_e;this.arrowType=Ne.arrowType,this.createTips(),this.adjustVisual()},le.typeName="ArrowMarker",le.title="Arrow marker",le.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',le}(He),Ze=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.fillColor=Ye.defaultFillColor,Oe.strokeWidth=0,Oe.fillPanel=new xe("Color",Ye.defaultColorSet,Ye.defaultFillColor),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe}return ue(le,ye),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=ye.prototype.getState.call(this);return _e.typeName=le.typeName,_e},le.typeName="CoverMarker",le.title="Cover marker",le.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',le}(Ie),Je=function(ye){function le(_e,Ne,Ye,Oe){var tt=ye.call(this,_e,Oe||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return tt.opacities=[],tt.opacityBoxes=[],tt.opacities=Ne,tt.currentOpacity=Ye,tt.setCurrentOpacity=tt.setCurrentOpacity.bind(tt),tt}return ue(le,ye),le.prototype.getUi=function(){var _e=this,Ne=document.createElement("div");return Ne.style.display="flex",Ne.style.overflow="hidden",Ne.style.flexGrow="2",Ne.style.justifyContent="space-between",this.opacities.forEach(function(Ye){var Oe=document.createElement("div");Oe.style.display="flex",Oe.style.alignItems="center",Oe.style.justifyContent="center",Oe.style.padding="5px",Oe.style.borderWidth="2px",Oe.style.borderStyle="solid",Oe.style.borderColor=Ye===_e.currentOpacity?_e.uiStyleSettings.toolboxAccentColor:"transparent",Oe.addEventListener("click",function(){_e.setCurrentOpacity(Ye,Oe)}),Ne.appendChild(Oe);var tt=document.createElement("div");tt.innerText=100*Ye+"%",Oe.appendChild(tt),_e.opacityBoxes.push(Oe)}),Ne},le.prototype.setCurrentOpacity=function(_e,Ne){var Ye=this;this.currentOpacity=_e,this.opacityBoxes.forEach(function(Oe){Oe.style.borderColor=Oe===Ne?Ye.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},le}(be),$e=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.setOpacity=Oe.setOpacity.bind(Oe),Oe.fillColor=Ye.defaultHighlightColor,Oe.strokeWidth=0,Oe.opacity=Ye.defaultHighlightOpacity,Oe.fillPanel=new xe("Color",Ye.defaultColorSet,Oe.fillColor),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe.opacityPanel=new Je("Opacity",Ye.defaultOpacitySteps,Oe.opacity),Oe.opacityPanel.onOpacityChanged=Oe.setOpacity,Oe}return ue(le,ye),le.prototype.setOpacity=function(_e){this.opacity=_e,this.visual&&y.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=ye.prototype.getState.call(this);return _e.typeName=le.typeName,_e},le.typeName="HighlightMarker",le.title="Highlight marker",le.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',le}(Ze),Qe='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',pt='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',ht=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.bgColor="transparent",Oe.tipPosition={x:0,y:0},Oe.tipBase1Position={x:0,y:0},Oe.tipBase2Position={x:0,y:0},Oe.tipMoving=!1,Oe.color=Ye.defaultStrokeColor,Oe.bgColor=Ye.defaultFillColor,Oe.fontFamily=Ye.defaultFontFamily,Oe.defaultSize={x:100,y:30},Oe.setBgColor=Oe.setBgColor.bind(Oe),Oe.getTipPoints=Oe.getTipPoints.bind(Oe),Oe.positionTip=Oe.positionTip.bind(Oe),Oe.setTipPoints=Oe.setTipPoints.bind(Oe),Oe.colorPanel=new xe("Text color",Ye.defaultColorSet,Oe.color,Qe),Oe.colorPanel.onColorChanged=Oe.setColor,Oe.bgColorPanel=new xe("Fill color",Ye.defaultColorSet,Oe.bgColor,pt),Oe.bgColorPanel.onColorChanged=Oe.setBgColor,Oe.fontFamilyPanel=new rt("Font",Ye.defaultFontFamilies,Ye.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe.tipGrip=new Ae,Oe.tipGrip.visual.transform.baseVal.appendItem(y.createTransform()),Oe.controlBox.appendChild(Oe.tipGrip.visual),Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return ye.prototype.ownsTarget.call(this,_e)||this.tipGrip.ownsTarget(_e)||this.tip===_e},le.prototype.createTip=function(){y.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=y.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},le.prototype.pointerDown=function(_e,Ne){this.state==="new"&&ye.prototype.pointerDown.call(this,_e,Ne),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Ne)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ye.prototype.pointerDown.call(this,_e,Ne)},le.prototype.pointerUp=function(_e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ye.prototype.pointerUp.call(this,_e);else{var Ne=this.state==="creating";ye.prototype.pointerUp.call(this,_e),this.setTipPoints(Ne),this.positionTip()}},le.prototype.manipulate=function(_e){if(this.tipMoving){var Ne=this.unrotatePoint(_e);this.tipPosition={x:Ne.x-this.manipulationStartLeft,y:Ne.y-this.manipulationStartTop},this.positionTip()}else ye.prototype.manipulate.call(this,_e)},le.prototype.setBgColor=function(_e){this.bgRectangle&&this.tip&&(y.setAttributes(this.bgRectangle,[["fill",_e]]),y.setAttributes(this.tip,[["fill",_e]])),this.bgColor=_e,this.fillColorChanged(_e)},le.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},le.prototype.setTipPoints=function(_e){_e===void 0&&(_e=!1);var Ne=Math.min(this.height/2,15),Ye=this.height/5;_e&&(this.tipPosition={x:Ne+Ye/2,y:this.height+20});var Oe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Oe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ye=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:0},this.tipBase2Position={x:Ne+Ye,y:0}):(this.tipBase1Position={x:0,y:Ne},this.tipBase2Position={x:0,y:Ne+Ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Oe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ye=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-Ye,y:0},this.tipBase2Position={x:this.width-Ne,y:0}):(this.tipBase1Position={x:this.width,y:Ne},this.tipBase2Position={x:this.width,y:Ne+Ye}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Oe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ye=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Ne-Ye,y:this.height},this.tipBase2Position={x:this.width-Ne,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Ne-Ye},this.tipBase2Position={x:this.width,y:this.height-Ne}):Oe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ye=this.width/5,Ne=Math.min(this.width/2,15),this.tipBase1Position={x:Ne,y:this.height},this.tipBase2Position={x:Ne+Ye,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Ne},this.tipBase2Position={x:0,y:this.height-Ne-Ye})},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),this.positionTip()},le.prototype.positionTip=function(){y.setAttributes(this.tip,[["points",this.getTipPoints()]]);var _e=this.tipGrip.visual.transform.baseVal.getItem(0);_e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(_e,0)},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),le.prototype.select=function(){this.positionTip(),ye.prototype.select.call(this)},le.prototype.getState=function(){var _e=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){var Ne=_e;this.bgColor=Ne.bgColor,this.tipPosition=Ne.tipPosition,ye.prototype.restoreState.call(this,_e),this.createTip(),this.setTipPoints()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.tipPosition={x:this.tipPosition.x*_e,y:this.tipPosition.y*Ne},this.positionTip()},le.typeName="CalloutMarker",le.title="Callout marker",le.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',le}(Ge),Pt=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.fillColor="transparent",Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.opacity=1,Oe.strokeColor=Ye.defaultColor,Oe.strokeWidth=Ye.defaultStrokeWidth,Oe.strokeDasharray=Ye.defaultStrokeDasharray,Oe.fillColor=Ye.defaultFillColor,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setFillColor=Oe.setFillColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.setOpacity=Oe.setOpacity.bind(Oe),Oe.createVisual=Oe.createVisual.bind(Oe),Oe.strokePanel=new xe("Line color",E(Ye.defaultColorSet,["transparent"]),Ye.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.fillPanel=new xe("Fill color",E(Ye.defaultColorSet,["transparent"]),Oe.fillColor,pt),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe.strokeWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new Pe("Line style",Ye.defaultStrokeDasharrays,Ye.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe.opacityPanel=new Je("Opacity",Ye.defaultOpacitySteps,Oe.opacity),Oe.opacityPanel.onOpacityChanged=Oe.setOpacity,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual)},le.prototype.createVisual=function(){this.visual=y.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},le.prototype.manipulate=function(_e){ye.prototype.manipulate.call(this,_e)},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),this.setSize()},le.prototype.setSize=function(){ye.prototype.setSize.call(this),y.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},le.prototype.pointerUp=function(_e){ye.prototype.pointerUp.call(this,_e),this.setSize()},le.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.visual&&y.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},le.prototype.setFillColor=function(_e){this.fillColor=_e,this.visual&&y.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(_e),this.stateChanged()},le.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.visual&&y.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},le.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.visual&&y.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},le.prototype.setOpacity=function(_e){this.opacity=_e,this.visual&&y.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){var Ne=_e;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.opacity=Ne.opacity,this.createVisual(),ye.prototype.restoreState.call(this,_e),this.setSize()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.setSize()},le.typeName="EllipseMarker",le.title="Ellipse marker",le.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',le}(ke),gt=function(ye){function le(_e,Ne,Ye){return ye.call(this,_e,Ne,Ye)||this}return ue(le,ye),Object.defineProperty(le.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.tip1&&_e!==this.tip2)},le.prototype.createTips=function(){this.tip1=y.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(y.createTransform()),this.visual.appendChild(this.tip1),this.tip2=y.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(y.createTransform()),this.visual.appendChild(this.tip2)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.state==="creating"&&this.createTips()},le.prototype.adjustVisual=function(){if(ye.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(y.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),y.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var _e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Ne=this.tip1.transform.baseVal.getItem(0);Ne.setRotate(_e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Ne,0);var Ye=this.tip2.transform.baseVal.getItem(0);Ye.setRotate(_e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ye,0)}},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=ye.prototype.getState.call(this);return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e),this.createTips(),this.adjustVisual()},le.typeName="MeasurementMarker",le.title="Measurement marker",le.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',le}(He),bt=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.strokePanel.colors=Ye.defaultColorSet,Oe.fillColor="transparent",Oe}return ue(le,ye),Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=ye.prototype.getState.call(this);return _e.typeName=le.typeName,_e},le.typeName="EllipseFrameMarker",le.title="Ellipse frame marker",le.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',le}(Pt),St=function(){function ye(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ye.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ye.prototype.addUndoStep=function(le){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(le)||(this.undoStack.push(le),JSON.stringify(this.lastRedoStep)!==JSON.stringify(le)&&this.redoStack.splice(0,this.redoStack.length))},ye.prototype.replaceLastUndoStep=function(le){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=le)},ye.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ye.prototype.undo=function(){if(this.undoStack.length>1){var le=this.undoStack.pop();return le!==void 0&&this.redoStack.push(le),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ye.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ye}(),lt=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.curveX=0,Oe.curveY=0,Oe.manipulationStartCurveX=0,Oe.manipulationStartCurveY=0,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.positionGrips=Oe.positionGrips.bind(Oe),Oe.addControlGrips=Oe.addControlGrips.bind(Oe),Oe.adjustVisual=Oe.adjustVisual.bind(Oe),Oe.setupControlBox=Oe.setupControlBox.bind(Oe),Oe.resize=Oe.resize.bind(Oe),Oe.strokeColor=Ye.defaultColor,Oe.strokeWidth=Ye.defaultStrokeWidth,Oe.strokeDasharray=Ye.defaultStrokeDasharray,Oe.strokePanel=new xe("Line color",Ye.defaultColorSet,Ye.defaultColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.strokeWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new Pe("Line style",Ye.defaultStrokeDasharrays,Ye.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.selectorCurve&&_e!==this.visibleCurve&&!this.curveGrip.ownsTarget(_e))},le.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},le.prototype.createVisual=function(){this.visual=y.createGroup(),this.selectorCurve=y.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=y.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)},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=_e.x,this.curveY=_e.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Ne)&&(this.activeGrip=this.curveGrip,this._state="resize")},le.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),y.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),y.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),y.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},le.prototype.setupControlBox=function(){ye.prototype.setupControlBox.call(this),this.curveControlLine1=y.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=y.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)},le.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ye.prototype.addControlGrips.call(this)},le.prototype.positionGrips=function(){ye.prototype.positionGrips.call(this);var _e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-_e/2,this.curveY-_e/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()))},le.prototype.manipulate=function(_e){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+_e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+_e.y-this.manipulationStartY),ye.prototype.manipulate.call(this,_e)},le.prototype.resize=function(_e){this.activeGrip===this.curveGrip&&(this.curveX=_e.x,this.curveY=_e.y),ye.prototype.resize.call(this,_e),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},le.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.adjustVisual(),this.colorChanged(_e)},le.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.adjustVisual()},le.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.adjustVisual()},le.prototype.scale=function(_e,Ne){this.curveX=this.curveX*_e,this.curveY=this.curveY*Ne,ye.prototype.scale.call(this,_e,Ne)},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ye.prototype.getState.call(this));return _e.typeName=le.typeName,_e},le.prototype.restoreState=function(_e){ye.prototype.restoreState.call(this,_e);var Ne=_e;this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.curveX=Ne.curveX,this.curveY=Ne.curveY,this.createVisual(),this.adjustVisual()},le.typeName="CurveMarker",le.title="Curve marker",le.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',le}(ot),_t=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,Ne,Ye)||this;return Oe.fillColor="transparent",Oe.strokeColor="transparent",Oe.strokeWidth=0,Oe.strokeDasharray="",Oe.textColor="transparent",Oe.fontSize="1rem",Oe.isMoved=!1,Oe.captionText="Caption",Oe.PADDING=5,Oe.captionBoxWidth=0,Oe.captionBoxHeight=0,Oe.strokeColor=Ye.defaultColor,Oe.strokeWidth=Ye.defaultStrokeWidth,Oe.strokeDasharray=Ye.defaultStrokeDasharray,Oe.fillColor=Ye.defaultFillColor,Oe.textColor=Ye.defaultStrokeColor,Oe.fontFamily=Ye.defaultFontFamily,Oe.fontSize=Ye.defaultCaptionFontSize,Oe.captionText=Ye.defaultCaptionText,Oe.setStrokeColor=Oe.setStrokeColor.bind(Oe),Oe.setFillColor=Oe.setFillColor.bind(Oe),Oe.setStrokeWidth=Oe.setStrokeWidth.bind(Oe),Oe.setStrokeDasharray=Oe.setStrokeDasharray.bind(Oe),Oe.createVisual=Oe.createVisual.bind(Oe),Oe.sizeCaption=Oe.sizeCaption.bind(Oe),Oe.setCaptionText=Oe.setCaptionText.bind(Oe),Oe.showTextEditor=Oe.showTextEditor.bind(Oe),Oe.positionTextEditor=Oe.positionTextEditor.bind(Oe),Oe.finishTextEditing=Oe.finishTextEditing.bind(Oe),Oe.setFont=Oe.setFont.bind(Oe),Oe.setTextColor=Oe.setTextColor.bind(Oe),Oe.strokePanel=new xe("Line color",E(Ye.defaultColorSet,["transparent"]),Oe.strokeColor),Oe.strokePanel.onColorChanged=Oe.setStrokeColor,Oe.fillPanel=new xe("Fill color",E(Ye.defaultColorSet,["transparent"]),Oe.fillColor,pt),Oe.fillPanel.onColorChanged=Oe.setFillColor,Oe.strokeWidthPanel=new Fe("Line width",Ye.defaultStrokeWidths,Ye.defaultStrokeWidth),Oe.strokeWidthPanel.onWidthChanged=Oe.setStrokeWidth,Oe.strokeStylePanel=new Pe("Line style",Ye.defaultStrokeDasharrays,Ye.defaultStrokeDasharray),Oe.strokeStylePanel.onStyleChanged=Oe.setStrokeDasharray,Oe.fontFamilyPanel=new rt("Font",Ye.defaultFontFamilies,Ye.defaultFontFamily),Oe.fontFamilyPanel.onFontChanged=Oe.setFont,Oe.textColorPanel=new xe("Text color",Ye.defaultColorSet,Oe.textColor,Qe),Oe.textColorPanel.onColorChanged=Oe.setTextColor,Oe}return ue(le,ye),le.prototype.ownsTarget=function(_e){return!(!ye.prototype.ownsTarget.call(this,_e)&&_e!==this.visual&&_e!==this.frame&&_e!==this.captionBg&&_e!==this.captionElement)},le.prototype.createVisual=function(){this.visual=y.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=y.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=y.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=y.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()},le.prototype.setCaptionText=function(_e){this.captionText=_e,this.captionElement.textContent=this.captionText,this.sizeCaption()},le.prototype.pointerDown=function(_e,Ne){ye.prototype.pointerDown.call(this,_e,Ne),this.isMoved=!1,this.pointerDownPoint=_e,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(_e),this._state="creating")},le.prototype.manipulate=function(_e){ye.prototype.manipulate.call(this,_e),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(_e.x-this.pointerDownPoint.x)>5||Math.abs(_e.y-this.pointerDownPoint.y)>5)},le.prototype.resize=function(_e){ye.prototype.resize.call(this,_e),this.setSize()},le.prototype.sizeCaption=function(){var _e=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=_e.width+2*this.PADDING,this.captionBoxHeight=_e.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),y.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')"]]),y.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')"]])},le.prototype.showTextEditor=function(){var _e=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(Ne){Ne.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Ne){Ne.key==="Enter"&&_e.finishTextEditing(_e.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Ne){Ne.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){_e.finishTextEditing(_e.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){_e.finishTextEditing(_e.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},le.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"))},le.prototype.finishTextEditing=function(_e){this.setCaptionText(_e.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},le.prototype.setFont=function(_e){this.captionElement&&y.setAttributes(this.captionElement,[["font-family",_e]]),this.fontFamily=_e,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},le.prototype.setTextColor=function(_e){this.captionElement&&y.setAttributes(this.captionElement,[["fill",_e]]),this.textColor=_e,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},le.prototype.setSize=function(){ye.prototype.setSize.call(this),y.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},le.prototype.pointerUp=function(_e){ye.prototype.pointerUp.call(this,_e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},le.prototype.dblClick=function(_e,Ne){ye.prototype.dblClick.call(this,_e,Ne),this.showTextEditor()},le.prototype.setStrokeColor=function(_e){this.strokeColor=_e,this.frame&&y.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(_e),this.stateChanged()},le.prototype.setFillColor=function(_e){this.fillColor=_e,this.captionBg&&y.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(_e),this.stateChanged()},le.prototype.setStrokeWidth=function(_e){this.strokeWidth=_e,this.frame&&y.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},le.prototype.setStrokeDasharray=function(_e){this.strokeDasharray=_e,this.frame&&y.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(le.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),le.prototype.getState=function(){var _e=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},ye.prototype.getState.call(this));return _e.typeName=this.typeName,_e},le.prototype.restoreState=function(_e){var Ne=_e;this.fillColor=Ne.fillColor,this.strokeColor=Ne.strokeColor,this.strokeWidth=Ne.strokeWidth,this.strokeDasharray=Ne.strokeDasharray,this.textColor=Ne.textColor,this.fontFamily=Ne.fontFamily,this.captionText=Ne.captionText,this.fontSize=Ne.fontSize,this.createVisual(),ye.prototype.restoreState.call(this,_e),this.setSize()},le.prototype.scale=function(_e,Ne){ye.prototype.scale.call(this,_e,Ne),this.setSize()},le.typeName="CaptionFrameMarker",le.title="Caption frame marker",le.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',le}(ke),dt=function(){function ye(le,_e){_e===void 0&&(_e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=le,this.cancelable=_e}return Object.defineProperty(ye.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ye.prototype.preventDefault=function(){this._defaultPrevented=!0},ye}(),nt=function(ye){function le(_e,Ne,Ye){var Oe=ye.call(this,_e,!1)||this;return Oe.dataUrl=Ne,Oe.state=Ye,Oe}return ue(le,ye),le}(dt),et=function(ye){function le(_e,Ne,Ye){Ye===void 0&&(Ye=!1);var Oe=ye.call(this,_e,Ye)||this;return Oe.marker=Ne,Oe}return ue(le,ye),le}(dt),ft=function(){function ye(){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 ye.prototype.addEventListener=function(le,_e){this[le].push(_e)},ye.prototype.removeEventListener=function(le,_e){var Ne=this[le].indexOf(_e);Ne>-1&&this[le].splice(Ne,1)},ye}(),wt=function(){function ye(le){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ke,this._isOpen=!1,this.undoRedoManager=new St,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 ft,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ye.instanceCounter++,this.styles=new ae(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=le,this.targetRoot=document.body,this.width=le.clientWidth,this.height=le.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(ye.prototype,"ALL_MARKER_TYPES",{get:function(){return[qe,ct,Ue,Ge,bt,Pt,$e,ht,gt,Ze,He,lt,_t]},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[qe,ct,Ue,Ge,Pt,$e,ht]},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"BASIC_MARKER_TYPES",{get:function(){return[qe,ct,Ue,Ge,$e]},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(le){var _e=this;this._availableMarkerTypes.splice(0),le.forEach(function(Ne){if(typeof Ne=="string"){var Ye=_e.ALL_MARKER_TYPES.find(function(Oe){return Oe.typeName===Ne});Ye!==void 0&&_e._availableMarkerTypes.push(Ye)}else _e._availableMarkerTypes.push(Ne)})},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ye.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(le){this._zoomLevel=le,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(ye.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ye.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),z.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ye.prototype.show=function(){var le=this;this.styles.styleSheetRoot===void 0&&ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(_e){return _e(new dt(le))})},ye.prototype.render=function(){return ee(this,void 0,void 0,function(){var le;return te(this,function(_e){switch(_e.label){case 0:return this.setCurrentMarker(),(le=new x).naturalSize=this.renderAtNaturalSize,le.imageType=this.renderImageType,le.imageQuality=this.renderImageQuality,le.markersOnly=this.renderMarkersOnly,le.width=this.renderWidth,le.height=this.renderHeight,[4,le.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return _e.sent(),[4,le.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,_e.sent()]}})})},ye.prototype.close=function(le){var _e=this;if(le===void 0&&(le=!1),this.isOpen){var Ne=!1;le||this.eventListeners.beforeclose.forEach(function(Ye){var Oe=new dt(_e,!0);Ye(Oe),Oe.defaultPrevented&&(Ne=!0)}),Ne||(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(Ye){return Ye(new dt(_e))}),this.detachEvents(),this._isOpen=!1)}},ye.prototype.addMarkersToToolbar=function(){for(var le,_e=[],Ne=0;Ne<arguments.length;Ne++)_e[Ne]=arguments[Ne];(le=this._availableMarkerTypes).push.apply(le,_e)},ye.prototype.addRenderEventListener=function(le){this.addEventListener("render",function(_e){le(_e.dataUrl,_e.state)})},ye.prototype.removeRenderEventListener=function(le){},ye.prototype.addCloseEventListener=function(le){this.addEventListener("close",function(){le()})},ye.prototype.removeCloseEventListener=function(le){},ye.prototype.setupResizeObserver=function(){var le=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){le.resize(le.target.clientWidth,le.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return le.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ye.prototype.onPopupTargetResize=function(){var le=1*this.target.clientWidth/this.target.clientHeight,_e=this.editorCanvas.clientWidth/le>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*le:this.editorCanvas.clientWidth,Ne=_e<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/le;this.resize(_e,Ne)},ye.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ye.prototype.resize=function(le,_e){this._isResizing=!0;var Ne=le/this.imageWidth,Ye=_e/this.imageHeight;this.imageWidth=Math.round(le),this.imageHeight=Math.round(_e),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Ne,Ye),this._isResizing=!1},ye.prototype.scaleMarkers=function(le,_e){var Ne,Ye=this;this._currentMarker&&this._currentMarker instanceof Ge?this._currentMarker.scale(le,_e):(Ne=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Oe){Oe!==Ye._currentMarker&&Oe.scale(le,_e)}),Ne!==void 0&&this.setCurrentMarker(Ne)},ye.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},ye.prototype.setTopLeft=function(){var le=this.editingTarget.getBoundingClientRect(),_e=this.editorCanvas.getBoundingClientRect();this.left=le.left-_e.left,this.top=le.top-_e.top},ye.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},ye.prototype.addDefs=function(){for(var le,_e=[],Ne=0;Ne<arguments.length;Ne++)_e[Ne]=arguments[Ne];this.defs=y.createDefs(),this.addDefsToImage(),(le=this.defs).append.apply(le,_e)},ye.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ye.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},ye.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ye.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ye.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},ye.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ye.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},ye.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var le=document.createElement("a");le.href="https://markerjs.com/",le.target="_blank",le.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',le.title="Powered by marker.js",le.style.display="grid",le.style.alignItems="center",le.style.justifyItems="center",le.style.padding="3px",le.style.width="20px",le.style.height="20px",this.logoUI.appendChild(le),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ye.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")},ye.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"},ye.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ye.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 le=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=le+"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 Se(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new ve(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ye.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ye.prototype.removeMarker=function(le){this.markerImage.removeChild(le.container),this.markers.indexOf(le)>-1&&this.markers.splice(this.markers.indexOf(le),1),le.dispose()},ye.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())},ye.prototype.toolbarButtonClicked=function(le,_e){if(le==="marker"&&_e!==void 0)this.createNewMarker(_e);else if(le==="action")switch(_e){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()}},ye.prototype.deleteSelectedMarker=function(){var le=this;if(this._currentMarker!==void 0){var _e=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ye){var Oe=new et(le,le._currentMarker,!0);Ye(Oe),Oe.defaultPrevented&&(_e=!0)}),!_e){var Ne=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(Ye){return Ye(new et(le,Ne))})}}},ye.prototype.clear=function(){var le=this,_e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(tt){var Ct=new et(le,void 0,!0);tt(Ct),Ct.defaultPrevented&&(_e=!0)}),!_e)){this.setCurrentMarker();for(var Ne=function(tt){var Ct=Ye.markers[tt];Ye.setCurrentMarker(Ye.markers[tt]),Ye._currentMarker.dispose(),Ye.markerImage.removeChild(Ye._currentMarker.container),Ye.markers.splice(Ye.markers.indexOf(Ye._currentMarker),1),Ye.eventListeners.markerdelete.forEach(function(Nt){return Nt(new et(le,Ct))})},Ye=this,Oe=this.markers.length-1;Oe>=0;Oe--)Ne(Oe);this.addUndoStep()}},Object.defineProperty(ye.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ye.prototype.showNotesEditor=function(){var le;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=(le=this._currentMarker.notes)!==null&&le!==void 0?le:"",this.overlayContainer.appendChild(this.notesArea))},ye.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)},ye.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ye.prototype.addUndoStep=function(){var le=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var _e=this.getState(),Ne=this.undoRedoManager.getLastUndoStep();if(!Ne||Ne.width===_e.width&&Ne.height===_e.height){var Ye=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(_e),Ye<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Oe){return Oe(new dt(le))})}else this.undoRedoManager.replaceLastUndoStep(_e),this.eventListeners.statechange.forEach(function(Oe){return Oe(new dt(le))})}},ye.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ye.prototype.undoStep=function(){var le=this,_e=this.undoRedoManager.undo();_e!==void 0&&(this.restoreState(_e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(le))}))},ye.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ye.prototype.redoStep=function(){var le=this,_e=this.undoRedoManager.redo();_e!==void 0&&(this.restoreState(_e),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(le))}))},ye.prototype.stepZoom=function(){var le=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=le<this.zoomSteps.length-1?this.zoomSteps[le+1]:this.zoomSteps[0]},ye.prototype.panTo=function(le){this.contentDiv.scrollBy({left:this.prevPanPoint.x-le.x,top:this.prevPanPoint.y-le.y}),this.prevPanPoint=le},ye.prototype.startRenderAndClose=function(){return ee(this,void 0,void 0,function(){var le,_e,Ne=this;return te(this,function(Ye){switch(Ye.label){case 0:return[4,this.render()];case 1:return le=Ye.sent(),_e=this.getState(),this.eventListeners.render.forEach(function(Oe){return Oe(new nt(Ne,le,_e))}),this.close(!0),[2]}})})},ye.prototype.getState=function(le){le===!0&&this.setCurrentMarker();var _e={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Ne){return _e.markers.push(Ne.getState())}),_e},ye.prototype.restoreState=function(le){var _e=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);le.markers.forEach(function(Ne){var Ye=_e._availableMarkerTypes.find(function(tt){return tt.typeName===Ne.typeName});if(Ye!==void 0){var Oe=_e.addNewMarker(Ye);Oe.restoreState(Ne),_e.markers.push(Oe)}}),le.width&&le.height&&(le.width!==this.imageWidth||le.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/le.width,this.imageHeight/le.height),this.eventListeners.restorestate.forEach(function(Ne){return Ne(new dt(_e))})},ye.prototype.addNewMarker=function(le){var _e=y.createGroup();return this.markerImage.appendChild(_e),new le(_e,this.overlayContainer,this.settings)},ye.prototype.createNewMarker=function(le){var _e,Ne=this;(_e=typeof le=="string"?this._availableMarkerTypes.find(function(Ye){return Ye.typeName===le}):le)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(_e),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(_e.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ye){return Ye(new et(Ne,Ne._currentMarker))}))},ye.prototype.markerCreated=function(le){var _e=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(le),this.setCurrentMarker(le),le instanceof ct&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(ct):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Ne){return Ne(new et(_e,_e._currentMarker))})},ye.prototype.colorChanged=function(le){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=le,this.settings.defaultStrokeColor=le)},ye.prototype.fillColorChanged=function(le){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=le)},ye.prototype.markerStateChanged=function(le){var _e=this;this.eventListeners.markerchange.forEach(function(Ne){return Ne(new et(_e,le))})},ye.prototype.setCurrentMarker=function(le){var _e=this;this._currentMarker!==le&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Ne){return Ne(new et(_e,_e._currentMarker))})),this._currentMarker=le,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Ne){return Ne(new et(_e,_e._currentMarker))}))},ye.prototype.onPointerDown=function(le){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||le.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var _e=this.markers.find(function(Ne){return Ne.ownsTarget(le.target)});_e!==void 0?(this.setCurrentMarker(_e),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(le.clientX,le.clientY),le.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:le.clientX,y:le.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(le.clientX,le.clientY))},ye.prototype.onDblClick=function(le){if(this._isFocused||this.focus(),this.mode==="select"){var _e=this.markers.find(function(Ne){return Ne.ownsTarget(le.target)});_e!==void 0&&_e!==this._currentMarker&&this.setCurrentMarker(_e),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(le.clientX,le.clientY),le.target):this.setCurrentMarker()}},ye.prototype.onPointerMove=function(le){this.touchPoints!==1&&le.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||le.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(le.clientX,le.clientY)):this.zoomLevel>1&&this.panTo({x:le.clientX,y:le.clientY}))},ye.prototype.onPointerUp=function(le){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(le.clientX,le.clientY)),this.isDragging=!1,this.addUndoStep()},ye.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ye.prototype.onKeyUp=function(le){this._currentMarker===void 0||this.notesArea!==void 0||le.key!=="Delete"&&le.key!=="Backspace"||this.deleteSelectedMarker()},ye.prototype.clientToLocalCoordinates=function(le,_e){var Ne=this.markerImage.getBoundingClientRect();return{x:(le-Ne.left)/this.zoomLevel,y:(_e-Ne.top)/this.zoomLevel}},ye.prototype.onWindowResize=function(){this.positionUI()},ye.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var le=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=le+"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()},ye.prototype.addLicenseKey=function(le){z.addKey(le)},ye.prototype.addEventListener=function(le,_e){this.eventListeners.addEventListener(le,_e)},ye.prototype.removeEventListener=function(le,_e){this.eventListeners.removeEventListener(le,_e)},ye.prototype.renderState=function(le){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(le),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ye.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ye.prototype.focus=function(){var le=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(_e){return _e(new dt(le))}))},ye.prototype.blur=function(){var le=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(_e){return _e(new dt(le))}))},ye.instanceCounter=0,ye}(),Tt=we(38147),Re=we(65862),Le=(ye,le,_e)=>new Promise((Ne,Ye)=>{var Oe=Nt=>{try{Ct(_e.next(Nt))}catch(Dt){Ye(Dt)}},tt=Nt=>{try{Ct(_e.throw(Nt))}catch(Dt){Ye(Dt)}},Ct=Nt=>Nt.done?Ne(Nt.value):Promise.resolve(Nt.value).then(Oe,tt);Ct((_e=_e.apply(ye,le)).next())}),je=({data:ye,className:le,fullWidth:_e,style:Ne={},onClose:Ye,onOk:Oe,showFullTools:tt,noAssociationId:Ct})=>{const Nt=(0,de.useRef)(null),Dt=(0,de.useRef)(null),ut=(0,de.useRef)(null),Ht=(0,de.useRef)(null),[At,Wt]=(0,de.useState)(!1),[on,bn]=(0,de.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,de.useEffect)(()=>(ut.current||(ut.current=document.createElement("style"),document.head.appendChild(ut.current)),ye!=null&&ye.visible?(document.body.setAttribute("data-custom","y-hidden"),ut.current.innerHTML=" html { overflow-y: hidden; }",ye!=null&&ye.src&&Yt()):(document.body.removeAttribute("data-custom"),ut.current&&(document.head.removeChild(ut.current),ut.current=null)),()=>{document.body.removeAttribute("data-custom"),ut.current&&(document.head.removeChild(ut.current),ut.current=null)}),[ye==null?void 0:ye.visible]);const Yt=()=>Le(void 0,null,function*(){Wt(!0),bn("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Jn=yield(0,Re.ZJ)(ye==null?void 0:ye.src);Nt.current.src="",Nt.current.src=Jn,Nt.current.onload=function(){Vn()},Wt(!1),bn("")}),Mn=Jn=>Le(void 0,null,function*(){Wt(!0),bn("\u6B63\u5728\u4FDD\u5B58\u4E2D");const ar=yield(0,Tt.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:ye.title,file:Jn.dataUrl}});ar!=null&&ar.id&&!Ct?(yield(0,Tt.ZP)(`/api/attachments/${ye.id}/add_subitem.json`,{method:"post",body:{subitem_id:ar==null?void 0:ar.id,settings:JSON.stringify(Jn.state)}})).status===0&&Oe():ar!=null&&ar.id&&Oe(ar),Wt(!1),bn("")}),Yn=()=>{const Jn=document.querySelector('a[href="https://markerjs.com/"]');Jn&&Jn.parentNode&&(Jn.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(ur=>{const jn=document.querySelector(ur.name);jn&&jn.setAttribute("title",ur.title)})},Vn=()=>{Dt.current=new wt(Nt.current),Dt.current.targetRoot=Ht.current,Dt.current.addEventListener("render",Mn),Dt.current.addEventListener("beforeclose",Ye),tt&&(Dt.current.availableMarkerTypes=Dt.current.ALL_MARKER_TYPES,Dt.current.uiStyleSettings.redoButtonVisible=!0,Dt.current.uiStyleSettings.notesButtonVisible=!0,Dt.current.uiStyleSettings.zoomButtonVisible=!0,Dt.current.uiStyleSettings.zoomOutButtonVisible=!0,Dt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Dt.current.uiStyleSettings,Dt.current.show(),ye!=null&&ye.snapshotData&&Dt.current.restoreState(ye.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Yn()},300)};return de.createElement(de.Fragment,null,(ye==null?void 0:ye.visible)&&de.createElement(se.Z,{spinning:At,tip:on,style:{position:"absolute",width:"100vw"}},de.createElement("div",{ref:Ht,className:ce()(ie.imageDimensions,le,_e?ie.fullWidth:""),style:Ne},de.createElement("img",{className:ie.img,ref:Nt}))))}},99298:function(Jt,Ot,we){"use strict";var de=we(59301),ie=we(77019),Ee=we(5269),ce=we(20554),se=we(7939),re=we(95097),ue=we(96408),ee=we(48136),te=we(59301);const E=(0,de.forwardRef)(({callback:y,showSaveButton:z,value:x=""},ne)=>{const ae=(0,de.useRef)(),oe=[{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 "}]}]}],ge=[{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}`}]}]}],Se=xe=>{ae.current.setValue(ae.current.getValue()+" "+xe.value+" ")},ve=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:te.createElement(ie.Z,{className:ue.Z.lists,gutter:[10,10]},oe.map((xe,pe)=>te.createElement(Ee.Z,{flex:"110px",className:ue.Z.item},te.createElement("div",null,te.createElement(re.Z,{value:`$$${xe.value}$$`}),xe.name),te.createElement("div",{className:ue.Z.children},xe.children.map((me,Ae)=>te.createElement("div",{key:Ae},te.createElement("h1",null,me.name),te.createElement(ie.Z,{gutter:[10,10]},me.data.map((De,ke)=>te.createElement(Ee.Z,{key:ke,onClick:()=>Se(De),className:ue.Z.diamond},te.createElement(re.Z,{value:"`$$"+De.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:te.createElement(ie.Z,{className:ue.Z.lists,gutter:[10,10]},ge.map((xe,pe)=>te.createElement(Ee.Z,{flex:"110px",className:ue.Z.item},te.createElement("div",null,te.createElement(re.Z,{value:"`$$"+xe.value+"$$`"}),xe.name),te.createElement("div",{className:ue.Z.children},xe.children.map((me,Ae)=>te.createElement("div",{key:Ae},me.name&&te.createElement("h1",null,me.name),te.createElement(ie.Z,{gutter:[10,10]},me.data.map((De,ke)=>te.createElement(Ee.Z,{key:ke,onClick:()=>Se(De),className:ue.Z.diamond},te.createElement(re.Z,{value:"`$$"+De.value+"$$`"}))))))))))}],be=()=>{var xe=document.createElement("div");xe.innerHTML=ae.current.getValue();var pe=xe.innerText;return y&&y(pe),pe};return(0,de.useImperativeHandle)(ne,()=>({getData:be})),te.createElement("div",{className:ue.Z.mathWrap},te.createElement(ce.default,{defaultActiveKey:"1",items:ve}),te.createElement("math-field",{locale:"zh_cn",className:ue.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ae,style:{width:800,marginTop:30,fontSize:18}},x||""),z&&te.createElement("div",{className:ue.Z.button},te.createElement(se.ZP,{size:"large",onClick:be,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ot.Z=E},2524:function(Jt,Ot,we){"use strict";var de=we(59301),ie=we(93314),Ee=we(7939),ce=Object.defineProperty,se=Object.defineProperties,re=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,E=(ne,ae,oe)=>ae in ne?ce(ne,ae,{enumerable:!0,configurable:!0,writable:!0,value:oe}):ne[ae]=oe,y=(ne,ae)=>{for(var oe in ae||(ae={}))ee.call(ae,oe)&&E(ne,oe,ae[oe]);if(ue)for(var oe of ue(ae))te.call(ae,oe)&&E(ne,oe,ae[oe]);return ne},z=(ne,ae)=>se(ne,re(ae));const x=({img:ne,buttonProps:ae={},styles:oe={},customText:ge,ButtonText:Se,ButtonClick:ve,Buttonclass:be,ButtonTwo:xe,imgStyles:pe,loading:me=!1,className:Ae=""})=>de.createElement("section",{className:`tc animated fadeIn ${Ae}`,style:y({color:"#999",margin:"100px auto",visibility:me?"hidden":"visible"},oe)},de.createElement("img",{src:ne||ie,style:z(y({},pe),{pointerEvents:"none",userSelect:"none"})}),de.createElement("p",{className:"mt20 font14"},ge||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Se&&de.createElement(Ee.ZP,y({className:be,onClick:ve},ae),Se),xe&&xe);Ot.Z=x},52918:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return be}});var de=we(59301),ie={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ee=we(7939),ce=we(70557),se=we(50258),re=we(25399),ue=we(65862),ee=we(87513),te=we(2524),E=we(74128),y=we(7310),z=we(59301),x=Object.defineProperty,ne=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ge=(xe,pe,me)=>pe in xe?x(xe,pe,{enumerable:!0,configurable:!0,writable:!0,value:me}):xe[pe]=me,Se=(xe,pe)=>{for(var me in pe||(pe={}))ae.call(pe,me)&&ge(xe,me,pe[me]);if(ne)for(var me of ne(pe))oe.call(pe,me)&&ge(xe,me,pe[me]);return xe},ve=(xe,pe,me)=>new Promise((Ae,De)=>{var ke=Pe=>{try{Fe(me.next(Pe))}catch(qe){De(qe)}},Ie=Pe=>{try{Fe(me.throw(Pe))}catch(qe){De(qe)}},Fe=Pe=>Pe.done?Ae(Pe.value):Promise.resolve(Pe.value).then(ke,Ie);Fe((me=me.apply(xe,pe)).next())}),be=({editOffice:xe="view",data:pe,issaver:me,onSaver:Ae,theme:De,type:ke,filename:Ie,monacoEditor:Fe,className:Pe,style:qe,close:Ke,onClose:ot,hasMask:He,disabledDownload:rt,onImgDimensions:Ge,showNodata:ct,recordInfo:We})=>{const[Ue,Ze]=(0,de.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Je,$e]=(0,de.useState)(""),[Qe,pt]=(0,de.useState)(),ht=window.ENV==="build"?"/react/build":"",Pt=location.host.startsWith("localhost")?E.Z.PROXY_SERVER:E.Z.API_SERVER,bt=10*(1024*1024),St=(0,de.useRef)();pe!=null&&pe.startsWith("/api")&&ke!=="txt"&&(pe=E.Z.API_SERVER+pe);const lt=ft=>ft.substring(ft.lastIndexOf("/")+1).split(".").pop();Ie&&Fe&&(Fe.filename=Ie),(0,de.useEffect)(()=>{var ft,wt;const Tt=(wt=(ft=document.cookie)==null?void 0:ft.replace(/\s/g,""))==null?void 0:wt.split(";");Tt==null||Tt.map(Re=>{let Le=Re.split("=");Le[0]==="_educoder_session"&&$e(Le[1])})},[]),(0,de.useEffect)(()=>{ke==="office"&&(pe.indexOf("bigfilescdn.")>-1||pe.indexOf("bigfiles1")>-1?pt({url:pe,fileType:lt(pe),model:pe.indexOf("model=edit")?"edit":"view"}):dt())},[ke,pe]);function _t(ft){return ve(this,null,function*(){ft.data.type==="pdfdata"&&(Ae(ft.data.data),window.removeEventListener("message",_t,!1)),console.log("mess---:",ft.data)})}const dt=()=>ve(void 0,null,function*(){console.log("data:",pe);let ft=pe;pe.startsWith("http")||(ft=location.origin+ft);let wt=new URL(ft).pathname.split("/").pop();const Tt=yield(0,ee.gJ)({attachment_id:wt});Tt.url=Pt+Tt.url,pt(Tt)}),nt=()=>{if(pe.startsWith("http")||pe.startsWith("blob:")){et();return}(0,ue.Sv)(Ie||"educoder",pe,Ie)},et=()=>{We&&(0,y.fc)({id:We==null?void 0:We.id,watch_type:1,course_id:We==null?void 0:We.course_id}),(0,ue.Nd)(Ie||"educoder",decodeURIComponent(pe))};return z.createElement("div",{style:Se({},qe||{}),className:`${He&&ie.bgBlack} ${ke?ie.wrp:"hide"}`},Ke&&z.createElement("div",{className:ie.close,ref:St},!!Ge&&z.createElement(re.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>St.current},z.createElement("span",{onClick:()=>{ot(),Ge()}},z.createElement("i",{className:"icon-yulanpizhu"}))),!rt&&z.createElement(re.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>St.current},z.createElement("span",{onClick:et},z.createElement("i",{className:"icon-quxiaozhiding"}))),me&&z.createElement(re.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>St.current},z.createElement("span",{className:"",onClick:()=>{const ft=document.getElementById("pdfiframe");window.addEventListener("message",_t,!1),setTimeout(()=>{ft.contentWindow.postMessage("getData","*")},300)}},z.createElement("i",{className:"icon-baocun"}))),z.createElement(re.Z,{title:"\u5173\u95ED",getPopupContainer:()=>St.current},z.createElement("span",{className:"",onClick:()=>{ot()}},z.createElement("i",{className:"icon-guanbi1"})))),z.createElement("div",{className:`${ie[Pe]} ${Pe} ${ie.monaco} ${ke==="txt"?"show":"hide"}`},ke==="txt"&&z.createElement(z.Fragment,null,z.createElement(se.ZP,Se({},Fe)))),ke==="audio"&&z.createElement("audio",{src:`${(pe==null?void 0:pe.indexOf("http://"))>-1||(pe==null?void 0:pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${pe}`,autoPlay:!0}),ke==="video"&&z.createElement(z.Fragment,null,(pe==null?void 0:pe.indexOf("http"))>-1?z.createElement("video",{controls:!0,src:`${pe}`,autoPlay:!0}):z.createElement("video",{controls:!0,src:`data:video/mp4;base64,${pe}`,autoPlay:!0})),ke==="office"&&Qe&&z.createElement("iframe",{src:`${ht}/office.html?key=${Qe.key}&url=${btoa(Qe.url)}&callbackUrl=${Pt+(Qe.callbackUrl||"")}&fileType=${Qe.fileType}&title=${Qe.title||""}&model=${xe}&officeServer=${E.Z.ONLYOFFICE}&disabledDownload=${!!rt}`}),ke==="html"&&z.createElement("iframe",{src:pe+"&disposition=inline"}),ke==="pdf"&&z.createElement("iframe",{id:"pdfiframe",src:`${ht}/js/pdf/index.html?filename=${Ie||"educoder.pdf"}&url=${encodeURIComponent(pe)}&disabledDownload=${!!rt}&model=${xe}`}),ke==="image"&&z.createElement("img",{src:`${(pe==null?void 0:pe.indexOf("http://"))>-1||(pe==null?void 0:pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${pe}`}),(ke==="other"||ke==="download")&&z.createElement(z.Fragment,null,ct?z.createElement(te.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:z.createElement(Ee.ZP,{icon:z.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:nt,disabled:rt},"\u4E0B\u8F7D")}):z.createElement(Ee.ZP,{type:"primary",size:"middle",onClick:nt,disabled:rt},z.createElement(ce.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),ke==="flowChart"&&z.createElement("div",{className:"embed"},z.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${pe||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},95097:function(Jt,Ot,we){"use strict";we.d(Ot,{z:function(){return Fe},Z:function(){return Pe}});var de=we(59301),ie=we(48850),Ee=we(49142),ce=we(64018),se=we(80360),re=we(74128),ue=we(65862),ee=we(15342),te=we(44104),E=we(7939),y=we(1012),z=we(52918),x=we(59301),ae=({html:qe})=>{const Ke=(0,de.useRef)(null),ot=(0,de.useRef)(null),He=`.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,de.useEffect)(()=>{const rt=Ke.current.attachShadow({mode:"open"});ot.current=document.createElement("div"),ot.current.className="markdown-body",ot.current.innerHTML=qe,rt.appendChild(ot.current);const Ge=document.createElement("style");return Ge.textContent=He,rt.appendChild(Ge),()=>{rt.innerHTML=""}},[]),(0,de.useEffect)(()=>{ot.current&&(ot.current.innerHTML=qe)},[qe]),x.createElement("div",{ref:Ke})};function oe(qe){const Ke=["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"],ot=new RegExp(`\\b(${Ke.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return qe.replace(ot,"").trim()}var ge={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},Se=Object.defineProperty,ve=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,pe=(qe,Ke,ot)=>Ke in qe?Se(qe,Ke,{enumerable:!0,configurable:!0,writable:!0,value:ot}):qe[Ke]=ot,me=(qe,Ke)=>{for(var ot in Ke||(Ke={}))be.call(Ke,ot)&&pe(qe,ot,Ke[ot]);if(ve)for(var ot of ve(Ke))xe.call(Ke,ot)&&pe(qe,ot,Ke[ot]);return qe};const Ae="@\u2581\u2581@",De="@\u2581@",ke=/<pre[^>]*>/g;function Ie(qe){let Ke=document.createElement("div");return Ke.innerHTML=qe,Ke.childNodes.length===0?"":Ke.childNodes[0].nodeValue}const Fe=(qe,Ke)=>{qe=qe||"";const ot=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ge=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ke?qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ot,(ct,We,Ue,Ze,Je,$e,Qe)=>{const pt=We||Ze||$e,ht=Ue||Je||Qe||"?";return re.Z.API_SERVER+"/api/attachments/"+pt+ht+"&t="+(0,ue.Jn)(pt,Date.now())+(ct.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(qe=qe.replace(Ge,(ct,We,Ue,Ze,Je,$e,Qe)=>{const pt=We||Ze||$e,ht=Ue||Je||Qe||"?";return re.Z.API_SERVER+"/attachments/download/"+pt+ht+"&t="+(0,ue.Jn)(pt,Date.now())+(ct.indexOf(")")>-1?")":"&")}).replace(ot,(ct,We,Ue,Ze,Je,$e,Qe)=>{const pt=We||Ze||$e,ht=Ue||Je||Qe||"?";return re.Z.API_SERVER+"/api/attachments/"+pt+ht+"&t="+(0,ue.Jn)(pt,Date.now())+(ct.indexOf(")")>-1?")":"&")}).replace(He,(ct,We,Ue,Ze,Je)=>{const $e=We||Ze,Qe=Ue||Je||"";return'"'+re.Z.API_SERVER+"/api/attachments/"+$e+Qe+$e+Qe+"&t="+(0,ue.Jn)($e,Date.now())}).replace(rt,(ct,We,Ue,Ze,Je)=>{const $e=We||Ze,Qe=Ue||Je||"";return"("+re.Z.API_SERVER+"/files/uploads/"+$e+Qe+$e+Qe+"&t="+(0,ue.Jn)($e,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,`
`),qe)};var Pe=({value:qe="",edit:Ke=!1,className:ot,showTextOnly:He,showLines:rt,style:Ge={},stylesPrev:ct={},highlightKeywords:We,showProgramFill:Ue,isProgramFill:Ze,disabledFill:Je=!1,programFillValue:$e,openEditor:Qe=()=>{},onFillChange:pt=gt=>{},onFillBlur:ht=()=>{},onFillFocus:Pt=()=>{}})=>{let gt=oe(String(qe||""));const bt=(0,de.useRef)(),St=(0,de.useRef)(),[lt,_t]=(0,de.useState)(""),[dt,nt]=(0,de.useState)("office"),[et,ft]=(0,de.useState)([]),wt=(0,de.useRef)("a"+(0,y.Z)()),Tt={},Re=ut=>/<style[\s\S]*?>/i.test(ut||""),Le=(ut,Ht,At)=>{const Wt=document.createElement(ut===De?"input":"textarea");Wt.style.width="100%",Wt.style.height=ut===De?"40px":"151px",Wt.rows=5,Wt.spellcheck=!1,Wt.name="edu-program-fill",Wt.placeholder="\u8BF7\u8F93\u5165",Wt.dataset.id=Ht;const on=Object.keys(Tt).length;return Tt[on]=Wt,`<span class="edu-program-fill-wrap ${ut===De?"":"show"}" style="width:${ut===De?"600px":"100%"}" title=${At||""}><span>${Wt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Te(ut){return ut=ut.replace(/!\[.*?\]\(.*?\)/g,""),ut=ut.replace(/\[.*?\]\(.*?\)/g,""),ut=ut.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ut=ut.replace(/<embed.*?>/g,""),ut=ut.replace(/<img.*?>/g,""),ut=ut.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ut=ut.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ut=ut.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ut=ut.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ut}const je=ut=>!He&&Re(gt)?ut:ut.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ht,At){let Wt=At.replace(/(\n|\r)/g,"").split("}"),on=[];return Wt.map(bn=>{bn!=""&&on.push(`.${wt.current} ${bn}`)}),`<style>${on.join("}")}</style>`}),ye=(0,de.useMemo)(()=>{try{const Wt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,on=/\"\/api\/attachments\/|\"\/attachments\/download\//g,bn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Yt=/\(\/attachments\/download\//g;gt=gt.replace(Yt,"("+re.Z.API_SERVER+"/attachments/download/").replace(Wt,"("+re.Z.API_SERVER+"/api/attachments/").replace(on,'"'+re.Z.API_SERVER+"/api/attachments/").replace(bn,'"'+re.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,`
`),bt.current.style.display="none"}catch(Wt){}if(Ue){let Wt=-1;return gt=gt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(on,bn,Yt){var Mn;return++Wt,Le(on,Wt,(Mn=$e==null?void 0:$e[Wt])==null?void 0:Mn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${je(gt||"")}</pre>`}let ut=je(gt);ut=(0,Ee.ZP)(ut);const Ht=(0,Ee.ez)();gt.match(/\[TOC\]/)&&(ut=ut.replace("<p>[TOC]</p>",(0,Ee.Qv)()),(0,Ee.Iy)()),ut=ut.replace(/(__special_katext_id_\d+__)/g,(Wt,on)=>{const{type:bn,expression:Yt}=Ht[on];return(0,ee.renderToString)(Ie(Yt)||"",{displayMode:bn==="block",throwOnError:!1,output:"html"})}),ut=ut.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ee.AL)();const At=document.createElement("div");if(At.innerHTML=ut,He)return At.innerText;if(We){const Wt=We.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ye(At,Wt),At.innerHTML}return setTimeout(()=>Ct(),500),At.innerHTML},[gt,We]);(0,de.useEffect)(()=>{Oe.current&&Oe.current.querySelectorAll(["input","textarea"]).forEach(Ht=>{Ht.oninput=le,Ht.onblur=_e,Ht.onfocus=Ne})},[et]),(0,de.useEffect)(()=>{var ut,Ht,At,Wt,on;if($e!=null&&$e.length)try{const bn=Oe.current.querySelectorAll(".edu-program-fill-score"),Yt=Oe.current.querySelectorAll('[name="edu-program-fill"]');for(const[Mn,Yn]of Yt.entries())Yn.value=((ut=$e==null?void 0:$e[Mn])==null?void 0:ut.value)||"",((Ht=$e==null?void 0:$e[Mn])==null?void 0:Ht.type)==="warning"?Yn.className="program-fill-warning":((At=$e==null?void 0:$e[Mn])==null?void 0:At.type)==="success"?Yn.className="program-fill-success":Yn.className="";for(const[Mn,Yn]of bn.entries())Yn.innerHTML=(Wt=$e==null?void 0:$e[Mn])!=null&&Wt.score?`${(on=$e==null?void 0:$e[Mn])==null?void 0:on.score}\u5206`:"";ft($e)}catch(bn){console.log(bn,"error")}},[$e]);const le=ut=>{et[ut.target.dataset.id]=et[ut.target.dataset.id]||{},et[ut.target.dataset.id].value=ut.target.value,ft([...et]),pt(et,ut.target.dataset.id)},_e=ut=>{et[ut.target.dataset.id]=et[ut.target.dataset.id]||{},et[ut.target.dataset.id].value=ut.target.value,ft([...et]),ht(et,ut.target.dataset.id)},Ne=ut=>{et[ut.target.dataset.id]=et[ut.target.dataset.id]||{},et[ut.target.dataset.id].value=ut.target.value,ft([...et]),Pt(et,ut.target.dataset.id)};function Ye(ut,Ht){return ut.childNodes.forEach(At=>{var Wt;if(At.childNodes.length>0)Ye(At,Ht);else if(At.nodeName!=="IMG")if(At.innerHTML)At.innerHTML=(Wt=At.innerHTML)==null?void 0:Wt.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const on=document.createElement("span");on.innerHTML=At.textContent.replace(new RegExp(Ht,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),At.replaceWith(on)}})}const Oe=(0,de.useRef)();Ee.jb.WebkitLineClamp=rt,rt&&(Ge=me(me({},Ge),Ee.jb));function tt(ut){let Ht=ut.target;if(Ht.tagName.toUpperCase()==="A"){let At=Ht.getAttribute("href");if(At.indexOf("office")>-1)ut.preventDefault(),_t(At),nt("office");else if(At.indexOf("application/pdf")>-1)ut.preventDefault(),_t(At),nt("pdf");else if(At.indexOf("text/html")>-1)ut.preventDefault(),_t(At),nt("html");else if(At.startsWith("#")){ut.preventDefault();let Wt=document.getElementById(At.replace("#",""));Wt&&Wt.scrollIntoView(!0)}}}const Ct=()=>{var ut;const Ht=(ut=Oe.current)==null?void 0:ut.querySelectorAll("video");Ht==null||Ht.forEach(At=>{if(At.oncontextmenu=()=>!1,At.src.indexOf(".m3u8")>-1&&!At.canPlayType("application/vnd.apple.mpegurl")){if(se.ZP.isSupported()){var Wt=new se.ZP;Wt.loadSource(At.src),Wt.attachMedia(At)}}})};(0,de.useEffect)(()=>{if(Oe.current&&ye&&ye.match(ke)&&window.PR.prettyPrint(),Oe.current)return Oe.current.addEventListener("click",tt),()=>{var ut;(ut=Oe.current)==null||ut.removeEventListener("click",tt),(0,Ee.AL)(),(0,Ee.Iy)()}},[ye,Oe.current,tt]);const Nt=ut=>{ut.target.nodeName==="IMG"&&ut.target.className.indexOf("draw-flowchart")>-1?(bt.current.style.zIndex=1,bt.current.style.display="flex",bt.current.style.width=ut.target.clientWidth+"px",bt.current.style.height=ut.target.clientHeight+"px",bt.current.style.top=ut.target.offsetTop+"px",bt.current.style.left=ut.target.offsetLeft+"px",ut.target.id&&(St.current=ut.target.id)):bt.current.style.display="none"},Dt=()=>{bt.current.style.display="none"};return(0,de.useEffect)(()=>{var ut;const Ht=At=>{At.preventDefault(),At.clipboardData.setData("text",window.getSelection().toString())};return(ut=Oe.current)==null||ut.addEventListener("copy",Ht),()=>{var At;(At=Oe.current)==null||At.removeEventListener("copy",Ht)}},[Oe.current]),de.createElement("div",{style:{position:"relative"},onMouseLeave:Dt},He&&de.createElement("div",{ref:Oe,className:`${ge.mdBody} `},ye),!He&&!Re(ye)&&de.createElement("div",{ref:Oe,style:me({},Ge),onMouseOver:Nt,className:`${ot||""} ${Je?"disabled-fill":""} markdown-body ${ge.mdBody} ${wt.current}`,dangerouslySetInnerHTML:{__html:ye}}),!He&&Re(ye)&&de.createElement(ae,{html:ye}),de.createElement("div",{ref:bt,className:`${ge.button} ${Ke?"":ge.previewFlowChart}`},de.createElement(te.Z,null,de.createElement(E.ZP,{onClick:()=>{Ke?Qe(St.current):(_t(St.current),nt("flowChart"))}},Ke?"\u7F16\u8F91":"\u9884\u89C8"))),de.createElement(z.Z,{close:!0,data:lt,type:lt!=null&&lt.length?dt:"",style:me({},ct),onClose:()=>_t("")}))}},42678:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ce}});var de=we(65582),ie={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Ee=we(59301),ce=({message:se,className:re,children:ue,style:ee={}})=>Ee.createElement("div",{className:`custom-spinner ${ie.idsRingWrapper} ${re}`},Ee.createElement("div",{className:ie.ldsRing},Ee.createElement("div",null),Ee.createElement("div",null),Ee.createElement("div",null),Ee.createElement("div",null)),se?Ee.createElement("p",{style:ee},se):null,ue,Ee.createElement(de.Outlet,null))},29584:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ce}});var de=we(59301),ie=we(77254),Ee=we(59301),ce=({defaultX:se="40%",leftChild:re,rightChild:ue,className:ee,hideResize:te=!1})=>{const[E,y]=(0,de.useState)(se),z=(0,de.useRef)();function x(){z.current=!0}(0,de.useEffect)(()=>{function oe(Se){z.current&&(ie.Z.publish("resize-move-bar",Se),y(Se.pageX))}function ge(){z.current=!1}return window.addEventListener("mousemove",oe),window.addEventListener("mouseup",ge),()=>{window.removeEventListener("mousemove",oe),window.removeEventListener("mouseup",ge)}},[]);const ne=typeof E=="number"&&E!==.01?`${E}px`:se,ae=`calc(100% - ${te?"0px":"4px"} - ${ne})`;return Ee.createElement("div",{className:`split-panel-container ${ee}`},Ee.createElement("section",{style:{width:ne,display:E===.01?"none":""}},re),Ee.createElement("section",{className:"resize-x-bar",onMouseDown:x},Ee.createElement("a",{className:"btn-resize"},Ee.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Ee.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),Ee.createElement("section",{style:{width:ae}},ue))}},51908:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return re}});var de=we(59301),ie={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Ee=we(92310),ce=we.n(Ee),re=({className:ue,style:ee={},leftNode:te,leftTitle:E="\u81EA\u6D4B\u8F93\u5165",rightNode:y,rightTitle:z="\u8FD0\u884C\u7ED3\u679C"})=>de.createElement("div",{className:ce()(ie.result,ue),style:ee},de.createElement("div",{className:ie.left},de.createElement("div",{className:ie.title},de.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),de.createElement("span",null,E)),de.createElement("div",{className:ie.leftNode},te)),de.createElement("div",{className:ie.right},de.createElement("div",{className:ie.title},de.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),de.createElement("span",null,z)),de.createElement("div",{className:ie.rightNode},y)))},22744:function(Jt,Ot,we){"use strict";var de=we(59301);const ie=ce=>String(ce).length===1?`0${ce}`:ce,Ee=({className:ce="",onChange:se,defaultValue:re=0})=>{const[ue,ee]=(0,de.useState)(re);(0,de.useEffect)(()=>{const z=setTimeout(()=>{ee(ue+1e3)},1e3);return se(ue+1e3),()=>{clearInterval(z)}},[ue]);const te=parseInt(ue/(60*6e4))||"00",E=parseInt(ue%(60*6e4)/6e4)||"00",y=parseInt(ue%6e4/1e3)||"00";return de.createElement("div",{className:ce},ie(te),":",ie(E),":",ie(y))};Ot.Z=Ee},44080:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ae}});var de=we(59301),ie=we(6767),Ee=we(75727),ce=we(73217),se=we(80360),re=we(41867),ue=we(56102),ee=we(84056),te={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},E=(oe,ge,Se)=>new Promise((ve,be)=>{var xe=Ae=>{try{me(Se.next(Ae))}catch(De){be(De)}},pe=Ae=>{try{me(Se.throw(Ae))}catch(De){be(De)}},me=Ae=>Ae.done?ve(Ae.value):Promise.resolve(Ae.value).then(xe,pe);me((Se=Se.apply(oe,ge)).next())});function y(oe){if(isNaN(oe))return{minutes:"00",seconds:"00"};const ge=new Date(oe*1e3).toISOString().substr(11,8);return{hour:ge.substr(0,2),minutes:ge.substr(3,2),seconds:ge.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function z(oe,ge){return oe-ge}function x(oe){oe.sort(z);let ge=0;for(let Se=0;Se<oe.length-1;Se++){let ve=Math.abs(oe[Se+1]-oe[Se]);ve<21&&(ge+=ve)}return ge}const ne=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ae=(0,de.forwardRef)(({allow_skip:oe,src:ge,toLog:Se,videoId:ve,logWatchHistory:be,courseId:xe=null,startTime:pe,handlePause:me=()=>{},handlePlay:Ae=()=>{},handlePlayEnded:De=()=>{},autoPlay:ke=!1,onPlayEnded:Ie=()=>{},isShowWaterMark:Fe=!0},Pe)=>{var qe;ge=ge==null?void 0:ge.replace("http://","https://");const ot=((qe=ge==null?void 0:ge.split("."))==null?void 0:qe.pop())==="flv",He=(0,de.useRef)(),rt=(0,de.useRef)(),Ge=(0,de.useRef)(),ct=(0,de.useRef)(),We=(0,de.useRef)(),Ue=(0,de.useRef)(),Ze=(0,de.useRef)(),Je=(0,de.useRef)(),$e=(0,de.useRef)(),Qe=(0,de.useRef)(),pt=(0,de.useRef)(),ht=(0,de.useRef)(),Pt=(0,de.useRef)(),gt=(0,de.useRef)(),bt=navigator.userAgent.toLowerCase().match(ne),St=bt?bt[0]:"pc",lt=(0,de.useRef)(!1),_t=(0,re.eY)();let dt=0,nt=0,et=0,ft=null,wt=!1,Tt=20,Re=1,Le=!1,Te=!1,je=[];(0,de.useImperativeHandle)(Pe,()=>({getLastUpdatedTime:()=>He.current.currentTime,getDuration:()=>He.current.duration})),ie.ZP.config({maxCount:1,getContainer:()=>Ge.current});const ye=(0,de.useCallback)((Ct,Nt=!1)=>{let Dt={point:He.current.currentTime};ft?(Dt.log_id=ft,Dt.watch_duration=x(je),Dt.total_duration=nt):(xe?(Dt.video_id=parseInt(ve,10),Dt.course_id=xe):Dt.video_id=ve,Dt.duration=dt,Dt.device=St),Nt&&(Dt.ed="1");function ut(){return E(this,null,function*(){Le=!0,ft=yield be==null?void 0:be(Dt),Le=!1,Ct&&Ct()})}ut()},[ve,xe]);(0,de.useEffect)(()=>{He.current&&(ct.current.style.display="none",We.current.style.display="block"),ie.ZP.destroy();let Ct=null;return ce.Z.isSupported&&ot&&ge&&(ge==null?void 0:ge.indexOf(".m3u8"))<0?(Ct=ce.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:ge,muted:!1}),He.current&&(Ct.attachMediaElement(He.current),Ct.load())):He.current.setAttribute("src",ge),_e(),()=>{Ct&&(Ct.unload(),Ct.pause(),Ct.destroy(),Ct=null)}},[He,ot,ge]);function le(){He.current.paused?(ct.current.style.display="none",We.current.style.display="block"):(ct.current.style.display="block",We.current.style.display="none")}function _e(){pt.current.style.display="none",Pt.current.style.display="none",ht.current.style.display="none",He.current.muted||He.current.volume===0?pt.current.style.display="block":He.current.volume>0&&He.current.volume<=.5?Pt.current.style.display="block":ht.current.style.display="block"}(0,de.useEffect)(()=>{const Ct=document.getElementById("play"),Nt=document.querySelectorAll(".playback-icons use");function Dt(){Ae(),pe&&!lt.current&&(He.current.currentTime=pe),lt.current=!0,je.push(He.current.currentTime),wt||(wt=!0,Se&&ye())}function ut(){return E(this,null,function*(){le(),je.push(He.current.currentTime),Se&&ye(()=>{ft=null,et=0,wt=!1,Le=!1,Te=!1,je=[],nt=0,Re=1},!0),Ie()})}function Ht(){Ue.current.value=Math.round(He.current.currentTime),Ze.current.value=Math.round(He.current.currentTime)}function At(){const jn=y(Math.round(He.current.currentTime));$e.current.innerText=`${jn.hour>0?jn.hour+":":""}${jn.minutes}:${jn.seconds}`,$e.current.setAttribute("datetime",`${jn.hour>0?" "+jn.hour+" ":""}${jn.minutes}m ${jn.seconds}s`)}function Wt(){var jn,Bn,sr,Hn,In,gn,Wn;const fr=Math.round((jn=He.current)==null?void 0:jn.duration);(sr=(Bn=Ue.current)==null?void 0:Bn.setAttribute)==null||sr.call(Bn,"max",fr),(In=(Hn=Ze.current)==null?void 0:Hn.setAttribute)==null||In.call(Hn,"max",fr);const mn=y(fr);Je.current&&(Je.current.innerText=`${mn.hour>0?mn.hour+":":""}${mn.minutes}:${mn.seconds}`,(Wn=(gn=Je.current).setAttribute)==null||Wn.call(gn,"datetime",`${mn.hour>0?" "+mn.hour+" ":""}${mn.minutes}m ${mn.seconds}s`))}function on(){try{const jn=Math.round(He.current.duration);Ue.current.setAttribute("max",jn),Ze.current.setAttribute("max",jn);const Bn=y(jn);Je.current.innerText=`${Bn.hour>0?Bn.hour+":":""}${Bn.minutes}:${Bn.seconds}`,Je.current.setAttribute("datetime",`${Bn.hour>0?" "+Bn.hour+" ":""}${Bn.minutes}m ${Bn.seconds}s`),Ht(),At();const{width:sr,height:Hn,x:In,y:gn}=rt.current.getBoundingClientRect();if(In<0||gn<0,!Te){let Wn=He.current.currentTime,fr=Wn-et;Math.abs(fr)<10?(nt+=Math.abs(fr),et=Wn,Le||nt-Re*Tt>=0&&(Re++,je.push(et),Se&&ye())):(et=Wn,Se&&ye())}}catch(jn){console.log("videoplaying:",jn)}}function bn(){Te=!0}function Yt(){He.current.playing&&je.push(He.current.currentTime,et),et=He.current.currentTime,Te=!1}function Mn(){dt=He.current.duration,dt<=20&&(Tt=dt/3),He.current.addEventListener("play",Dt)}function Yn(jn){jn.preventDefault(),(0,ee.vp)()?(He.current.style.width="100%",He.current.style.height="100%"):He.current.style.cssText=""}function Vn(){me()}function Jn(jn){if(!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Bn=jn.target.dataset.seek?jn.target.dataset.seek:jn.target.value;He.current.currentTime=Bn,Ze.current.value=Bn,Ue.current.value=Bn}function ar(jn){const Bn=Math.round(jn.offsetX/jn.target.clientWidth*parseInt(jn.target.getAttribute("max"),10));Ue.current.setAttribute("data-seek",Bn);const sr=y(Bn);Qe.current.textContent=`${sr.hour>0?sr.hour+":":""}${sr.minutes}:${sr.seconds}`;const Hn=He.current.getBoundingClientRect();Qe.current.style.left=`${jn.pageX-Hn.left}px`}function ur(jn){switch(jn.code){case"Space":jn.preventDefault(),Oe();break;case"ArrowRight":if(jn.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(He.current.currentTime>=He.current.duration)break;He.current.currentTime=parseInt(He.current.currentTime)+5,Ht();break;case"ArrowLeft":if(jn.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(He.current.currentTime===0)break;He.current.currentTime=parseInt(He.current.currentTime)-5,Ht();break;case"ArrowUp":jn.preventDefault(),He.current.volume<1&&(He.current.volume=(parseInt(He.current.volume*10)+1)/10);break;case"ArrowDown":jn.preventDefault(),He.current.volume>0&&(He.current.volume=(parseInt(He.current.volume*10)-1)/10);break}}return Ge.current.addEventListener((0,ee.gH)(),Yn),He.current.addEventListener("canplay",Mn),He.current.addEventListener("ended",ut),He.current.addEventListener("seeking",bn),He.current.addEventListener("seeked",Yt),He.current.addEventListener("loadedmetadata",Wt),Ue.current.addEventListener("mousemove",ar),Ue.current.addEventListener("input",Jn),He.current.addEventListener("timeupdate",on),He.current.addEventListener("pause",Vn),He.current.addEventListener("volumechange",_e),document.addEventListener("keydown",ur),()=>{var jn,Bn,sr,Hn,In,gn,Wn,fr,mn,En,rr,Qt;(jn=He.current)==null||jn.removeEventListener("canplay",Mn),(Bn=He.current)==null||Bn.removeEventListener("play",Dt),(sr=He.current)==null||sr.removeEventListener("ended",ut),(Hn=He.current)==null||Hn.removeEventListener("seeking",bn),(In=He.current)==null||In.removeEventListener("seeked",Yt),(gn=Ue.current)==null||gn.removeEventListener("mousemove",ar),(Wn=Ue.current)==null||Wn.removeEventListener("input",Jn),(fr=He.current)==null||fr.removeEventListener("timeupdate",on),(mn=He.current)==null||mn.removeEventListener("pause",Vn),(En=He.current)==null||En.removeEventListener("loadedmetadata",Wt),(rr=He.current)==null||rr.removeEventListener("volumechange",_e),document.removeEventListener("keydown",ur),(Qt=He.current)!=null&&Qt.playing&&(je.push(et,He.current.currentTime),Se&&ye())}},[He,ge]),(0,de.useEffect)(()=>{if(He.current.onended=()=>{De(He)},He.current.oncontextmenu=()=>!1,(ge==null?void 0:ge.indexOf(".m3u8"))>-1){if(He.current.canPlayType("application/vnd.apple.mpegurl"))He.current.src=ge;else if(se.ZP.isSupported()){var Ct=new se.ZP;Ct.loadSource(ge),Ct.attachMedia(He.current)}}},[ge]);const[Ne,Ye]=(0,de.useState)(1),Oe=()=>{He.current.paused||He.current.ended?He.current.play():He.current.pause(),le()};function tt(){He.current.muted=!He.current.muted,He.current.muted?(gt.current.setAttribute("data-volume",volume.value),gt.current.value=0):gt.current.value=gt.current.dataset.volume}return de.createElement("div",{style:{position:"relative"},ref:Ge},de.createElement("div",{ref:rt,className:`${te.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${te.animate__loop}`},Fe&&_t?_t.login:" "),de.createElement("div",{className:te.container},de.createElement("div",{className:te["video-container"],id:"video-container"},de.createElement("div",{className:te["playback-animation"],id:"playback-animation"},de.createElement("svg",{className:te["playback-icons"]},de.createElement("use",{className:"hidden",href:"#play-icon"}),de.createElement("use",{href:"#pause"}))),de.createElement("video",{className:te.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:He,autoPlay:ke}),de.createElement("div",{className:`${te["video-controls"]} `,id:"video-controls"},de.createElement("div",{className:te["bottom-controls"]},de.createElement("div",{className:te["left-controls"]},de.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Oe},de.createElement("svg",{className:te["playback-icons"]},de.createElement("use",{ref:We,href:"#play-icon"}),de.createElement("use",{ref:ct,style:{display:"none"},href:"#pause"}))),de.createElement("div",{className:te.time},de.createElement("time",{id:"time-elapsed",ref:$e},"00:00"),de.createElement("span",null," / "),de.createElement("time",{id:"duration",ref:Je},"00:00"))),de.createElement("div",{className:te["right-controls"]},oe&&de.createElement(Ee.Z,{placement:"top",overlayClassName:te.rateOverlay,getPopupContainer:Ct=>Ct.parentNode,menu:{items:[{key:"1",label:de.createElement("span",{onClick:()=>{Ye(1),He.current.playbackRate=1}},"1.0x")},{key:"2",label:de.createElement("span",{onClick:()=>{Ye(1.5),He.current.playbackRate=1.5}},"1.5x")},{key:"3",label:de.createElement("span",{onClick:()=>{Ye(2),He.current.playbackRate=2}},"2.0x")}]}},de.createElement("div",{className:`${te.controlText} mr5`},"\u500D\u901F")),de.createElement(ue.CopyToClipboard,{text:ge,onCopy:()=>ie.ZP.success("\u590D\u5236\u6210\u529F")},de.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},de.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),de.createElement("div",{className:te["volume-controls"]},de.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:te["volume-button"],id:"volume-button",onClick:tt},de.createElement("i",{ref:pt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),de.createElement("i",{ref:Pt,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),de.createElement("i",{ref:ht,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),de.createElement("input",{className:te.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:gt,style:{display:"none"},onClick:_e})),de.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:te["fullscreen-button"],onClick:()=>{(0,ee.vp)()?(0,ee.BU)():(0,ee.Dj)(Ge.current)}},de.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),de.createElement("div",{className:te["video-progress"]},de.createElement("progress",{ref:Ze,value:"0",min:"0"}),de.createElement("input",{className:te.seek,ref:Ue,value:"0",min:"0",type:"range",step:"1"}),de.createElement("div",{className:te["seek-tooltip"],ref:Qe,id:"seek-tooltip"},"00:00"))))),de.createElement("svg",{style:{display:"none"}},de.createElement("defs",null,de.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},de.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),de.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},de.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),de.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},de.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),de.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},de.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),de.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},de.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),de.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},de.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),de.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},de.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),de.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},de.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},30214:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ce}});var de=we(59301),ie=we(77254),Ee=we(90083),ce=()=>{const[se,re]=(0,de.useState)(""),[ue,ee]=(0,de.useState)(0);let[te,E]=(0,de.useState)(),[y,z]=(0,de.useState)();const[x,ne]=(0,de.useState)(!1),ae=(0,de.useRef)("");(0,de.useEffect)(()=>ie.Z.subscribe("preview-image",ke=>{re(ke),console.log(me.current)}),[]),(0,de.useEffect)(()=>(document.addEventListener("keydown",oe),()=>{document.removeEventListener("keydown",oe)}),[]),(0,de.useEffect)(()=>{ae.current=se},[se]);function oe(De){console.log("e====",De),De.keyCode==27&&ae.current&&ge()}function ge(){document.body.style.overflow="auto",E(void 0),z(void 0),ee(0),re("")}function Se(){ee(ue+90)}function ve(){te=me.current.width*1.1,y=me.current.height*1.1,z(y),E(te)}function be(){te=me.current.width/1.1,y=me.current.height/1.1,z(y),E(te)}const xe=(0,de.useRef)(),pe=(0,de.useRef)(),me=(0,de.useRef)(),Ae=De=>{(De.nativeEvent.target===xe.current||De.nativeEvent.target===pe.current)&&ge()};return de.createElement(de.Fragment,null,se?de.createElement("div",null,de.createElement("div",{className:"preview-wrp-group",ref:pe},de.createElement(Ee.Z,{className:"image-preview",src:se,style:{display:"none"},preview:{visible:!0,src:se,onVisibleChange:De=>{re("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},60537:function(Jt,Ot,we){"use strict";we.d(Ot,{h:function(){return xe},Z:function(){return be}});var de=we(59301),ie=we(82326),Ee=we(28284),ce=we(7939),se=we(89780),re=we.n(se),ue=we(45559),ee=Object.defineProperty,te=Object.defineProperties,E=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,ne=(pe,me,Ae)=>me in pe?ee(pe,me,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):pe[me]=Ae,ae=(pe,me)=>{for(var Ae in me||(me={}))z.call(me,Ae)&&ne(pe,Ae,me[Ae]);if(y)for(var Ae of y(me))x.call(me,Ae)&&ne(pe,Ae,me[Ae]);return pe},oe=(pe,me)=>te(pe,E(me));const ge=ie.default.Option,Se={labelCol:{span:4},wrapperCol:{span:20}},ve={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};var be=({callback:pe,onCancel:me})=>{const[Ae,De]=(0,de.useState)("python");function ke(Fe){De(ve[Fe][1])}function Ie(Fe){pe(Fe)}return de.createElement(Ee.default,oe(ae({},Se),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Ie,style:{width:500}}),de.createElement(Ee.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},de.createElement(ie.default,{getPopupContainer:Fe=>Fe.parentNode,onChange:ke},Object.keys(ve).map(Fe=>de.createElement(ge,{key:Fe,value:Fe},ve[Fe][0])))),de.createElement(Ee.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},de.createElement(xe,{mode:Ae})),de.createElement("div",{className:"flex-container flex-end"},de.createElement(ce.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(ce.ZP,{type:"ghost",onClick:me},"\u53D6\u6D88")))};function xe({value:pe,onChange:me,mode:Ae,options:De={}}){const ke=(0,de.useRef)(),[Ie,Fe]=(0,de.useState)();return(0,de.useEffect)(()=>{if(Ie){let Pe=function(qe){const Ke=qe.getValue();me&&me(Ke)};return Ie.on("change",Pe),()=>{Ie.off("change",Pe)}}},[Ie,me]),(0,de.useEffect)(()=>{Ie&&Ie.setOption("mode",Ae)},[Ie,Ae]),(0,de.useEffect)(()=>{Ie&&(pe!==Ie.getValue()||pe==="")&&setTimeout(()=>{Ie.setValue(pe||"")},300)},[Ie,pe]),(0,de.useEffect)(()=>{if(ke.current&&!Ie){const Pe=re().fromTextArea(ke.current,ae({mode:Ae,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},De));Fe(Pe)}},[ke.current,Ie]),de.createElement("div",{className:"my-codemirror-container"},de.createElement("textarea",{ref:ke}))}},25374:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return fr}});var de=we(59301),ie=we(65582),Ee=we(89780),ce=we.n(Ee),se=we(76374),re=we(45559),ue=we(6313),ee=we(25717),te=we(99498),E=we(25419),y=we(67549),z=we(95097),x=({value:mn="",className:En,showTextOnly:rr,showLines:Qt,style:Me={}})=>{const ze=(0,de.useMemo)(()=>"",[mn]);return de.createElement(de.Fragment,null,de.createElement("div",{dangerouslySetInnerHTML:{__html:ze}}))},ne=Object.defineProperty,ae=Object.defineProperties,oe=Object.getOwnPropertyDescriptors,ge=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,be=(mn,En,rr)=>En in mn?ne(mn,En,{enumerable:!0,configurable:!0,writable:!0,value:rr}):mn[En]=rr,xe=(mn,En)=>{for(var rr in En||(En={}))Se.call(En,rr)&&be(mn,rr,En[rr]);if(ge)for(var rr of ge(En))ve.call(En,rr)&&be(mn,rr,En[rr]);return mn},pe=(mn,En)=>ae(mn,oe(En));let me=[{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 Ae({onActionCallback:mn,title:En,icon:rr,actionName:Qt,className:Me="",children:ze}){function Ve(){mn(Qt)}return de.createElement("a",{title:En,className:Me,onClick:Ve},de.createElement("i",{className:`${rr}`}),ze)}var De=({watch:mn,showNullButton:En,showNullProgramButton:rr,onActionCallback:Qt,fullScreen:Me,insertTemp:ze,hidetoolBar:Ve,extraUse:st})=>{const yt=[...me,{title:`${mn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${mn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return de.createElement("ul",{className:"markdown-toolbar-container"},!Ve&&yt.map((Ft,Mt)=>de.createElement("li",{key:Mt},Ft.actionName?de.createElement(Ae,pe(xe({},Ft),{onActionCallback:Qt})):de.createElement("span",{className:"v-line"}))),En?de.createElement("li",null,de.createElement(Ae,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Qt},de.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,rr?de.createElement(de.Fragment,null,de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Qt},de.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Qt},de.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,ze&&de.createElement("li",null,de.createElement(Ae,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${ze}`,onActionCallback:Qt},de.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),st&&de.createElement("li",null,st),de.createElement("li",{className:"btn-full-screen"},de.createElement(Ae,{icon:`${Me?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Me?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Qt})))},ke=we(57261),Ie=we(28284),Fe=we(37568),Pe=we(7939),qe=Object.defineProperty,Ke=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,ct=(mn,En,rr)=>En in mn?qe(mn,En,{enumerable:!0,configurable:!0,writable:!0,value:rr}):mn[En]=rr,We=(mn,En)=>{for(var rr in En||(En={}))rt.call(En,rr)&&ct(mn,rr,En[rr]);if(He)for(var rr of He(En))Ge.call(En,rr)&&ct(mn,rr,En[rr]);return mn},Ue=(mn,En)=>Ke(mn,ot(En));const Ze={labelCol:{span:4},wrapperCol:{span:20}};var Je=({callback:mn,onCancel:En})=>{function rr(Qt){mn(Qt)}return de.createElement(Ie.default,Ue(We({},Ze),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:rr,style:{width:500}}),de.createElement(Ie.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},de.createElement(Fe.default,null)),de.createElement(Ie.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},de.createElement(Fe.default,null)),de.createElement("div",{className:"flex-container flex-end"},de.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Pe.ZP,{type:"ghost",onClick:En},"\u53D6\u6D88")))},$e=we(60537),Qe=we(45053),pt=we(62957),ht=we(77019),Pt=we(53464),gt=we(59301),bt=({callback:mn,onCancel:En})=>{const rr=document.createElement("canvas"),Qt=rr.getContext("2d");rr.width=1e3,rr.height=800,Qt.fillStyle="#ffffff",Qt.fillRect(0,0,rr.width,rr.height);const Me=rr.toDataURL("image/png");return gt.createElement(pt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},gt.createElement(ht.Z,{style:{height:"100vh"}},gt.createElement(Pt.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Me,visible:!0,title:String(Date.now())},onOk:ze=>{mn({src:ze.url})},onClose:En})))},St=we(30641),lt=we(5269),_t=we(6767),dt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},nt=we(59301),ft=(0,de.forwardRef)(({onCancel:mn,editImgId:En,callback:rr},Qt)=>{let Me=(0,de.useRef)(),ze=(0,de.useRef)(),Ve=(0,de.useRef)(),st=(0,de.useRef)(!1);const yt=(0,de.useRef)(!1);console.log("ref:",Qt);const[Ft,Mt]=(0,de.useState)(0),[jt,qt]=(0,de.useState)("100vh");return(0,de.useEffect)(()=>{Mt(1)},[]),(0,de.useImperativeHandle)(Qt,()=>({setHeight:qt})),nt.createElement("div",{ref:yt,className:"body-overflow-initial"},nt.createElement(St.Z,{width:"100vw",height:jt,footer:null,closable:!0,placement:"bottom",open:!!Ft,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${dt.drawerWrap}`,onClose:()=>{window.saveDrawData(wn=>{rr({src:`/api/attachments/${wn}`,id:wn})})},title:nt.createElement(ht.Z,{align:"middle"},nt.createElement(lt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),nt.createElement(lt.Z,{onClick:()=>{qt(jt==="60px"?"100vh":"60px")}},nt.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),nt.createElement(lt.Z,{onClick:()=>{window.saveDrawData(wn=>{if(wn===null){_t.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}_t.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),rr({src:`/api/attachments/${wn}`,id:wn,disabledClose:!0})})}},nt.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},nt.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${En||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:ze})))}),wt=we(74128),Tt=we(47889),Re=we(71051);const Le=Tt.ZP.Group,Te={margin:"0 8px"};var je=({callback:mn,onCancel:En})=>{function rr(Qt){mn(Qt)}return de.createElement(Ie.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:rr},de.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},de.createElement("span",{style:Te},"\u5355\u5143\u683C\u6570\uFF1A"),de.createElement("span",{style:Te},"\u884C\u6570"),de.createElement(Ie.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},de.createElement(Re.Z,null)),de.createElement("span",{style:Te},"\u5217\u6570"),de.createElement(Ie.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},de.createElement(Re.Z,null))),de.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},de.createElement("span",{style:Te},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),de.createElement(Ie.default.Item,{name:"align"},de.createElement(Le,null,de.createElement(Tt.ZP,{value:"default"},de.createElement("i",{className:"fa fa-align-justify"})),de.createElement(Tt.ZP,{value:"left"},de.createElement("i",{className:"fa fa-align-left"})),de.createElement(Tt.ZP,{value:"center"},de.createElement("i",{className:"fa fa-align-center"})),de.createElement(Tt.ZP,{value:"right"},de.createElement("i",{className:"fa fa-align-right"}))))),de.createElement("div",{className:"flex-container flex-end"},de.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),de.createElement(Pe.ZP,{type:"ghost",onClick:En},"\u53D6\u6D88")))},ye=we(71411),le=we(93510),_e=we.n(le),Ye=(0,de.forwardRef)(({use3d:mn,width:En,height:rr,callback:Qt,showSaveButton:Me},ze)=>{const Ve=(0,de.useRef)(),st=(0,de.useRef)(),[yt,Ft]=(0,de.useState)(!1),Mt=(0,de.useRef)({id:Ve,appName:"graphing",width:En||1e3,height:rr||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,de.useEffect)(()=>{st.current=new(_e())(Mt.current,!0),window.onload=function(){st.current.inject("applet_container")}},[]);const jt=()=>{var qt=window.ggbApplet.getPNGBase64(1,!0,72);return Qt&&Qt(qt),qt};return(0,de.useEffect)(()=>{Mt.current.appName=yt?"3D":"graphing",st.current.inject("applet_container")},[yt]),(0,de.useEffect)(()=>{Ft(mn)},[mn]),(0,de.useImperativeHandle)(ze,()=>({getImgData:jt})),de.createElement(de.Fragment,null,de.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Ve}),de.createElement(ht.Z,{align:"middle"},de.createElement(lt.Z,{flex:1},de.createElement(ye.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:yt,onChange:qt=>Ft(qt)})),de.createElement(lt.Z,null,de.createElement(Pe.ZP,{size:"large",onClick:jt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Oe=we(99298);const tt="link",Ct="upload-image",Nt="add-flowchart",Dt="draw-image",ut="add-flowchart",Ht="code-block",At="add-table",Wt="------------",on={default:Wt,left:`:${Wt}`,center:`:${Wt}:`,right:`${Wt}:`};var bn=we(31103),Yt=we(65862);function Mn(){}let Yn=0;const Vn=1e4,Jn="\u2581",ar="@\u2581\u2581@",ur="@\u2581@",jn=`
**\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`,Bn=["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(mn){return/^\d+$/.test(mn)?`${mn}px`:mn}const In=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",gn={[In+"-B"]:"bold",[In+"-I"]:"italic"},Wn={[tt]:"\u6DFB\u52A0\u94FE\u63A5",[Ht]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ct]:"\u6DFB\u52A0\u56FE\u7247",[Dt]:"\u6DFB\u52A0\u753B\u56FE",[Nt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[At]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var fr=({defaultValue:mn="",onChange:En,width:rr="100%",height:Qt=400,miniToolbar:Me=!1,isFocus:ze=!1,watch:Ve,insertTemp:st,mode:yt="markdown",id:Ft="markdown-editor-id",showResizeBar:Mt=!1,noStorage:jt=!1,showNullButton:qt=!1,showNullProgramButton:wn=!1,hidetoolBar:Qn=!1,fullScreen:Rt=!1,onBlur:Et,onCMBeforeChange:sn,onFullScreen:Zt,className:Lt="",disablePaste:zt=!1,disabled:nn=!1,disabledFill:rn=!1,placeholder:_n="",values:xn="",extraUse:Ln,onAddBlank:Kt})=>{const[Xt,Cn]=(0,de.useState)(null),[Un,Zn]=(0,de.useState)(mn),[er,Lr]=(0,de.useState)(Ve),[wr,tr]=(0,de.useState)(Rt),[zn,cr]=(0,de.useState)(""),[Xn,yr]=(0,de.useState)(0),[Nr,Yr]=(0,de.useState)(Qt),[pi,_i]=(0,de.useState)(!1),[Si,oi]=(0,de.useState)(0),[Mi,Li]=(0,de.useState)(0),lr=(0,de.useRef)(),Ar=(0,de.useRef)(),Mr=(0,de.useRef)(),$r=(0,de.useRef)(),Jr=(0,de.useRef)(),wi=(0,de.useRef)(),Hi=(0,ie.useDispatch)();(0,de.useEffect)(()=>{const yn=window.scrollY||window.pageYOffset;Zn(xn),Xt==null||Xt.setValue(xn),window.scrollTo(0,yn)},[xn]),(0,de.useEffect)(()=>{Zt==null||Zt(wr)},[wr]),(0,de.useEffect)(()=>{if(lr.current){let yn=function(Rn,On){var qn;if(zt){On.preventDefault();return}const gr=On.clipboardData;if(gr){const dr=gr.types.toString(),Pr=gr.items;if(dr==="Files"||gr.types.indexOf("Files")>-1){if(On.preventDefault(),yt=="stex")return;try{let Er=Pr[1];((qn=Pr[0])==null?void 0:qn.kind)==="file"&&(Er=Pr[0]);const Ir=Er.getAsFile(),Zr=Ir.name.split(".").pop();(0,Qe.I)(Ir,Fr=>{var li,Wr,qr;Fr.id?((li=Ir==null?void 0:Ir.type)==null?void 0:li.indexOf("image"))>-1?fn.replaceSelection(`<img width="100%" src="/api/attachments/${Fr.id}?type=${Fr.content_type})" alt="" />`):((Wr=Ir==null?void 0:Ir.type)==null?void 0:Wr.indexOf("video"))>-1?fn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Fr.id}"></video>`):((qr=Ir==null?void 0:Ir.type)==null?void 0:qr.indexOf("pdf"))>-1?fn.replaceSelection(`<a href="/api/attachments/${Fr.id}?type=${Ir.type}&disposition=inline" target="_blank">${Ir.name}</a>`):Bn.includes(Zr)?fn.replaceSelection(`<a href="/api/attachments/${Fr.id}?type=office&disposition=inline" target="_blank">${Ir.name}</a>`):fn.replaceSelection(`[${Ir.name}](/api/attachments/${Fr.id}?type=${Fr.content_type})`):(Fr==null?void 0:Fr.status)===401&&(document.location.href="/user/login")})}catch(Er){_t.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const fn=ce().fromTextArea(lr.current,{mode:yt,lineNumbers:!Me,lineWrapping:!0,value:mn,autoCloseTags:!0,autoCloseBrackets:!0});return fn.on("keyup",function(Rn,On){On.keyCode===8&&(Rn.getValue()==""?fn.setOption("placeholder",_n):fn.setOption("placeholder",null))}),fn.on("keydown",function(Rn,On){if(On.keyCode===8){var qn=tn(Rn);qn&&On.preventDefault()}}),ze&&fn.focus(),fn.on("paste",yn),nn&&fn.on("beforeChange",function(Rn,On){(On.origin==="paste"||On.origin==="+input")&&On.cancel()}),Cn(fn),()=>{fn.off("paste",yn)}}},[]);const It=(0,de.useCallback)(()=>{if(Ar.current)try{}catch(yn){console.log(yn,"---- to set md editor body height")}},[Nr,Ar,wr]);(0,de.useEffect)(()=>{function yn(){let fn=new se.Z(Rn=>{for(let On of Rn)(On.target.offsetHeight>0||On.target.offsetWidth>0)&&(It(),Xt.setSize("100%","100%"),Xt.refresh())});return fn.observe(lr.current.parentElement),fn}if(Xt){const fn=yn();return()=>{var Rn,On;(Rn=lr.current)!=null&&Rn.parentElement&&fn.unobserve((On=lr.current)==null?void 0:On.parentElement)}}},[Xt,It]),(0,de.useEffect)(()=>{if(Xt){let yn=[];for(const[fn,Rn]of Object.entries(gn)){let On={[fn]:()=>{Vt(Rn)}};yn.push(On),Xt.addKeyMap(On)}return()=>{for(let fn of yn)Xt.removeKeyMap(fn)}}},[Xt]),(0,de.useEffect)(()=>{Rt!==wr&&tr(Rt)},[Rt]),(0,bn.Z)(()=>{if(!jt&&Xn>0){let yn=new Date().getTime(),fn=window.sessionStorage.getItem(Ft);yn>=Xn+Vn&&(!fn||fn!==Un)&&(window.sessionStorage.setItem(Ft,Un),_i(!0))}},Vn),(0,de.useEffect)(()=>{Lr(Ve)},[Xt,Ve]),(0,de.useEffect)(()=>{Xt&&ze&&Xt.focus()},[Xt,ze]),(0,de.useEffect)(()=>{if(er&&Xt){let yn=function(Rn){let On=Rn.target;if($r.current){let qn=On.scrollTop/On.scrollHeight;$r.current.scrollTop=$r.current.scrollHeight*qn}};const fn=Xt.getScrollerElement();return fn.addEventListener("scroll",yn),()=>{fn.removeEventListener("scroll",yn)}}},[Xt,er]),(0,de.useEffect)(()=>{if(Xt&&sn){let yn=function(fn,Rn){sn(fn,Rn)};return Xt.on("beforeChange",yn),()=>{Xt.off("beforeChange",yn)}}},[Xt,sn]),(0,de.useEffect)(()=>{if(Xt&&Et){let yn=function(){Et(Xt.getValue())};return Xt.on("blur",yn),()=>{Xt.off("blur",yn)}}},[Xt,Et]);function tn(yn,fn){var Rn=yn.getDoc(),On=Rn.getCursor(),qn=Rn.getLine(On.line),gr=qn.charAt(On.ch-1),dr=qn.lastIndexOf("@\u2581@",On.ch),Pr=qn.lastIndexOf("@\u2581\u2581@",On.ch),Er=dr>Pr?dr:Pr,Ir=dr>Pr?3:4;if(ar.indexOf(gr)===-1)return null;if(console.log("change1:",fn,yn,qn,On,Er,dr,Pr,gr),Er>=0&&On.ch-Er<5){var Zr=Er+Ir;return Rn.replaceRange("",{line:On.line,ch:Er},{line:On.line,ch:Zr}),{line:On.line,ch:Zr}}return null}(0,de.useEffect)(()=>{if(Xt){let yn=function(fn,Rn){const On=fn.getValue();Zn(On),yr(new Date().getTime()),fn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),En&&(wn?En(On,ln(On)):En(On))};return Xt.on("change",yn),()=>{Xt.off("change",yn)}}},[Xt,En]),(0,de.useEffect)(()=>{if(Xt)if(mn==null)Xt.setValue(""),Zn("");else{const yn=window.scrollY||window.pageYOffset;mn!==Xt.getValue()&&(Xt.setValue(mn),Zn(mn),Xt.setCursor(nn?1:Xt.lineCount(),0),window.scrollTo(0,yn))}},[Xt,mn]);const Vt=(0,de.useCallback)(yn=>{const fn=Xt.getCursor(),Rn=Xt.getSelection();let On=Rn.split(`
`);switch(yn){case"bold":return Xt.replaceSelection("**"+Rn+"**"),Rn===""&&Xt.setCursor(fn.line,fn.ch+2),Xt.focus();case"italic":return Xt.replaceSelection("*"+Rn+"*"),Rn===""&&Xt.setCursor(fn.line,fn.ch+1),Xt.focus();case"code":return Xt.replaceSelection("`"+Rn+"`"),Rn===""&&Xt.setCursor(fn.line,fn.ch+1),Xt.focus();case"inline-latex":return(0,Yt.Ye)(Hi)?void 0:(cr("inline-latex"),Xt.focus());case"latex":return Xt.replaceSelection("```latex\n"+Rn+"\n```"),Xt.setCursor(fn.line+1,Rn.length+1),Xt.focus();case"line-break":return Xt.replaceSelection(`<br/>
`),Xt.focus();case"list-ul":return Rn===""?Xt.replaceSelection("- "+Rn):Xt.replaceSelection(On.map(qn=>qn===""?"":`- ${qn}`).join(`
`)),Xt.focus();case"list-ol":return Rn===""?Xt.replaceSelection("1. "+Rn):Xt.replaceSelection(On.map((qn,gr)=>qn===""?"":`${gr+1}. ${qn}`).join(`
`)),Xt.focus();case"add-null-ch":Kt==null||Kt();return;case"add-signal":return Rn===""&&Xt.setCursor(fn.line,fn.ch),Xt.replaceSelection(ur),Xt.focus();case"add-multiple":return Rn===""&&Xt.setCursor(fn.line,fn.ch),Xt.replaceSelection(ar),Xt.focus();case"inster-template-1":return Rn===""&&Xt.setCursor(fn.line,fn.ch),Xt.replaceSelection(jn),Xt.focus();case"eraser":return Xt.setValue(""),Xt.focus();case"trigger-watch":return Lr(!er),Xt.focus();case"trigger-full-screen":return tr(!wr),Xt.focus();case tt:cr(tt);return;case Ht:cr(Ht);return;case Ct:cr(Ct);return;case Dt:cr(Dt);return;case"maths-latex":if((0,Yt.Ye)(Hi))return;cr("maths-latex");return;case Nt:Jr.current="",sessionStorage.removeItem("file_id"),cr(Nt);return;case At:cr(At);return;default:throw new Error}},[Xt,er,wr]),$t=(0,de.useCallback)((yn,fn)=>{var Rn,On,qn,gr,dr,Pr;yn!=null&&yn.disabledClose||cr("");const{src:Er,alt:Ir,id:Zr}=yn||{};switch(zn){case tt:const{title:Rr,link:hr}=yn;return Xt.replaceSelection(`[${Rr}](${hr})`),Xt.focus();case Ht:const{language:vr,content:jr}=yn;return Xt.replaceSelection(["```"+vr,jr,"```"].join(`
`)),Xt.focus();case"maths-latex":for(var Fr=atob(yn),li=new Uint8Array(Fr.length),Wr=0;Wr<Fr.length;Wr++)li[Wr]=Fr.charCodeAt(Wr);var qr=new Blob([li],{type:"image/png"});(0,Qe.I)(qr,to=>{to.id?Xt.replaceSelection(`![,](/api/attachments/${to.id}?type=${to.content_type})`):(to==null?void 0:to.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Yt.Ye)(Hi))return;Xt.replaceSelection("`$$"+yn+"$$`");break;case ut:if(!Zr)return;Xt.getValue().indexOf(Er)===-1?Xt.replaceSelection(`<center><img id="${Zr}" width="80%" src="${Er}" class="draw-flowchart" alt="${Ir||""}" /></center>`):document.getElementById(Zr).src=wt.Z.API_SERVER+Er+"?t="+Date.now();break;case Ct:case Dt:const _r=fn,Qr=(qn=(On=(Rn=_r==null?void 0:_r.name)==null?void 0:Rn.split("."))==null?void 0:On.pop)==null?void 0:qn.call(On);return((gr=_r==null?void 0:_r.type)==null?void 0:gr.indexOf("image"))>-1||!(_r!=null&&_r.type)?_r!=null&&_r.align||_r!=null&&_r.width?Xt.replaceSelection(`<p style="text-align:${_r.align||"initial"}"><img width="${_r.width?_r.width+"%":"initial"}" src="${Er}" alt="${Ir||""}" /></p>`):Xt.replaceSelection(`<img width="100%" src="${Er}" alt="${Ir||""}" />`):((dr=_r==null?void 0:_r.type)==null?void 0:dr.indexOf("video"))>-1?Xt.replaceSelection(`<video width="100%" controls src="${Er}"></video>`):((Pr=_r==null?void 0:_r.type)==null?void 0:Pr.indexOf("pdf"))>-1?Xt.replaceSelection(`<a href="${Er}?type=${_r.type}&disposition=inline" target="_blank">${_r.name}</a>`):Bn.includes(Qr)?Xt.replaceSelection(`<a href="${Er}?type=office&disposition=inline" target="_blank">${_r.name}</a>`):Xt.replaceSelection(`[${_r.name}](${Er})`),Xt.focus();case At:const{row:ti,col:di,align:po}=yn;let ao=`
`;for(let to=0;to<ti;to++){let mo=[],Ii=[];for(let Ti=0;Ti<di;Ti++)to===1&&Ii.push(on[po]),mo.push(" ");to===1&&(ao+=`| ${Ii.join(" | ")} |
`),ao+=`| ${mo.join(di===1?"":" | ")} |
`}return Xt.replaceSelection(ao+`
`),Xt.focus();default:throw new Error}},[Xt,zn]),cn=(0,de.useMemo)(()=>{switch(zn){case tt:return de.createElement(Je,{callback:$t,onCancel:hn});case Ht:return de.createElement($e.Z,{callback:$t,onCancel:hn});case Ct:return de.createElement(Qe.Z,{callback:$t,onCancel:hn});case Nt:return de.createElement(ft,{editImgId:Jr.current,callback:$t,onCancel:hn});case At:return de.createElement(je,{callback:$t,onCancel:hn});case"maths-latex":return de.createElement(Ye,{showSaveButton:!0,callback:$t});case"inline-latex":return de.createElement(Oe.Z,{showSaveButton:!0,callback:$t});default:return null}},[zn]);function hn(){cr("")}(0,de.useEffect)(()=>{if(Mr.current){let yn=function(dr){qn=!0,gr=dr.pageY},fn=function(){qn=!1},Rn=function(dr){if(qn){let Pr=dr.pageY-gr;Pr<0&&(Pr=0),Pr>300&&(Pr=300);let Er=Qt+Pr+"px";Yr(Er)}},On=Mr.current,qn=!1,gr=0;return On.addEventListener("mousedown",yn),document.addEventListener("mousemove",Rn),document.addEventListener("mouseup",fn),()=>{On.removeEventListener("mousedown",yn),document.removeEventListener("mousemove",Rn),document.removeEventListener("mouseup",fn)}}},[Xt,Mr]),(0,de.useEffect)(()=>{Yr(Qt)},[Qt]);const Fn=sr(rr),An=sr(Nr),Sn={width:Fn,height:An},Gt=(0,de.useMemo)(()=>{if(Xn){let yn=new Date(Xn),fn=yn.getHours(),Rn=yn.getMinutes(),On=yn.getSeconds();return fn=fn<10?"0"+fn:fn,Rn=Rn<10?"0"+Rn:Rn,On=On<10?"0"+On:On,`${fn}:${Rn}:${On}`}return 0},[Xn]),ln=yn=>{const fn=[];if(wn){let Rn=-1;yn=yn.replace(/(@▁▁@|@▁@)/g,function(On,qn,gr){fn.push({multiLine:On!==ur})})}return fn};function dn(){window.sessionStorage.removeItem(Ft),_i(!1),yr(0)}function un(){_i(!1),yr(0),Xt.setValue(window.sessionStorage.getItem(Ft))}(0,de.useEffect)(()=>{Wn[zn]&&zn!==Dt&&zn!==Nt&&setTimeout(()=>{const yn=document.getElementsByClassName("markdown-popup-form")[0],fn=window.innerWidth/2-yn.offsetWidth/2,Rn=window.innerHeight/2-yn.offsetHeight/2;oi(fn),Li(Rn)},0)},[zn]);const vn=yn=>{yn.preventDefault();const fn=yn.clientX-Si,Rn=yn.clientY-Mi;document.body.onmousemove=On=>{let qn=On.clientX-fn,gr=On.clientY-Rn;const dr=document.getElementsByClassName("markdown-popup-form")[0],Pr=window.innerWidth-dr.offsetWidth,Er=window.innerHeight-dr.offsetHeight;qn=Math.max(0,Math.min(qn,Pr)),gr=Math.max(0,Math.min(gr,Er)),Gn(On.clientX,On.clientY,fn,Rn)&&(oi(qn),Li(gr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Gn=(yn,fn,Rn,On)=>{const qn=document.body.clientHeight,gr=document.body.clientWidth;return yn<20&&Rn>yn||yn>gr-20&&Rn<yn||fn<20&&On>fn||fn>qn-20&&On<fn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return de.createElement(de.Fragment,null,de.createElement("div",{className:"markdown-editor-wrapper",ref:Ar},de.createElement("div",{className:`markdown-editor-container ${Lt} ${er?"on-preview":""} ${Me?"mini":""} ${wr?"full-screen":""}`,style:Sn},de.createElement(De,{insertTemp:st,watch:er,fullScreen:wr,showNullButton:qt,showNullProgramButton:wn,onActionCallback:Vt,hidetoolBar:Qn,extraUse:Ln}),de.createElement("div",{className:"markdown-editor-body"},de.createElement("div",{className:"codemirror-container"},de.createElement("textarea",{ref:lr,placeholder:_n})),er?de.createElement("div",{ref:$r,className:"preview-container"},yt==="stex"&&de.createElement(x,{value:Un}),yt!=="stex"&&de.createElement(z.Z,{edit:!0,disabledFill:rn,showProgramFill:wn,value:Un,openEditor:yn=>{var fn;Jr.current=yn,(fn=wi.current)==null||fn.setHeight("100vh"),setTimeout(()=>{cr("add-flowchart")},150)}})):null))),Mt?de.createElement("a",{ref:Mr,className:"editor-resize"}):null,zn===Dt&&de.createElement(bt,{callback:$t,onCancel:hn}),zn===Nt&&de.createElement(ft,{ref:wi,editImgId:Jr.current,callback:$t,onCancel:hn}),de.createElement(ke.Z,null,Wn[zn]&&zn!==Dt&&zn!==Nt?de.createElement(pt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Si,top:Mi},title:de.createElement("div",{style:{cursor:"move"},onMouseDown:vn},Wn[zn]),open:!0,onCancel:hn,footer:null,destroyOnClose:!0,width:zn===Nt?"1200px":null,height:zn===Nt?"80vh":null,className:"markdown-popup-form"},cn):null))}},45053:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return me},I:function(){return De}});var de=we(28284),ie=we(6767),Ee=we(37568),ce=we(44104),se=we(71051),re=we(47889),ue=we(7939),ee=we(28735),te=we(59301),E=we(59301),y=Object.defineProperty,z=Object.defineProperties,x=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ge=(ke,Ie,Fe)=>Ie in ke?y(ke,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):ke[Ie]=Fe,Se=(ke,Ie)=>{for(var Fe in Ie||(Ie={}))ae.call(Ie,Fe)&&ge(ke,Fe,Ie[Fe]);if(ne)for(var Fe of ne(Ie))oe.call(Ie,Fe)&&ge(ke,Fe,Ie[Fe]);return ke},ve=(ke,Ie)=>z(ke,x(Ie));const{useForm:be}=de.default,xe={width:280,marginRight:10},pe={labelCol:{span:5},wrapperCol:{span:19}};var me=({callback:ke,onCancel:Ie})=>{const[Fe]=be();let Pe=(0,te.useRef)();function qe(He){Pe.current.width=Fe.getFieldValue("width"),Pe.current.align=Fe.getFieldValue("align"),ke(He,Pe.current)}function Ke(He,rt){if(He.status===-1){ie.ZP.error(He.message);return}Fe.setFieldsValue({src:`/api/attachments/${He.id}`,type:rt.type})}function ot(He){let rt=He.target.files[0];Pe.current=rt,De(rt,Ke)}return E.createElement(de.default,ve(Se({form:Fe},pe),{className:"upload-image-panel",onFinish:qe,style:{width:470,overflow:"hidden"}}),E.createElement(de.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},E.createElement("div",{className:"flex-container"},E.createElement(de.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},E.createElement(Ee.default,{style:xe})),E.createElement(Ae,{onFileChange:ot}))),E.createElement(de.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},E.createElement(Ee.default,{style:{width:264}})),E.createElement(de.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},E.createElement(ce.Z,null,E.createElement(de.default.Item,{name:"width",style:{margin:0}},E.createElement(se.Z,{style:{width:264}})),E.createElement("span",{className:"ml8"},"%"))),E.createElement(de.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},E.createElement(re.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"}]})),E.createElement("aside",null,E.createElement(de.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},E.createElement(ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(ue.ZP,{type:"default",onClick:Ie},"\u53D6\u6D88"))))};function Ae({onFileChange:ke}){return E.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",E.createElement("input",{type:"file",onChange:ke}))}function De(ke,Ie){if(!ke)throw new String("\u6CA1\u6709\u6587\u4EF6");let Fe=new FormData;Fe.append("editormd-image-file",ke),Fe.append("file_param_name","editormd-image-file"),Fe.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(qe){Ie(JSON.parse(qe.target.responseText),ke)},!1),Pe.addEventListener("error",function(qe){console.error(qe)},!1),Pe.open("POST",`${ee.KI}/api/attachments.json`),Pe.send(Fe)}},57261:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return Ee}});var de=we(59301),ie=we(4676);class Ee extends de.Component{constructor(se){super(se);const re=window.document;this.node=re.createElement("div"),re.body.appendChild(this.node)}render(){const{children:se}=this.props;return(0,ie.createPortal)(se,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},50258:function(Jt,Ot,we){"use strict";we.d(Ot,{SV:function(){return bt},ZP:function(){return gt}});var de=we(59301),ie=we(76374);const Ee={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"]},ce={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"]},se={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"if",content:["if () {"," $0","}"].join(`
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
`)},{label:"using namespace std",content:["using namespace std"].join(`
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
`)},{label:"include <vector>",content:["#include <vector>"].join(`
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
`)},{label:"include <map>",content:["#include <map>"].join(`
`)},{label:"include <string>",content:["#include <string>"].join(`
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
`)}]},re={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(`
`)}]},ue={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 ee=we(53184),te=we.n(ee),E=(St,lt,_t)=>new Promise((dt,nt)=>{var et=Tt=>{try{wt(_t.next(Tt))}catch(Re){nt(Re)}},ft=Tt=>{try{wt(_t.throw(Tt))}catch(Re){nt(Re)}},wt=Tt=>Tt.done?dt(Tt.value):Promise.resolve(Tt.value).then(et,ft);wt((_t=_t.apply(St,lt)).next())});const y={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"]}},z=(St,lt,_t,dt)=>{const nt=lt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:_t.lineNumber,endColumn:_t.column});return Array.from(new Set(nt.match(/\b\w{2,}\b/g)||[])).map(ft=>({label:ft,kind:St.languages.CompletionItemKind.Text,insertText:ft,range:dt}))},x=(St,lt,_t,dt)=>{St.languages.registerCompletionItemProvider(lt,{provideCompletionItems(nt,et){const ft=nt.getWordUntilPosition(et),wt={startLineNumber:et.lineNumber,endLineNumber:et.lineNumber,startColumn:ft.startColumn,endColumn:ft.endColumn},Tt=nt.getLineContent(et.lineNumber).substring(ft.startColumn-2,ft.endColumn);return{suggestions:[...z(St,nt,et,wt),..._t.map(Le=>({label:Le,kind:St.languages.CompletionItemKind.Keyword,documentation:Le,insertText:Le,insertTextRules:St.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wt})),...dt.map(Le=>({label:Le.label,kind:St.languages.CompletionItemKind.Snippet,documentation:Le.content,insertText:Tt.startsWith("#")?Le.content.replace(/#/,""):Le.content,insertTextRules:St.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:wt}))]}}})};var ne=St=>{y.languages.forEach(lt=>{St.languages.registerDocumentFormattingEditProvider(lt,{provideDocumentFormattingEdits(_t){return E(this,null,function*(){const dt=te()(_t.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:_t.getFullModelRange(),text:dt}]})}})}),x(St,"java",ce.keywords,ce.quickKey),x(St,"cpp",se.keywords,se.quickKey),x(St,"c",Ee.keywords,[]),x(St,"python",re.keywords,re.quickKey),x(St,"scala",ue.keywords,ue.quickKey)};const ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var oe=Object.defineProperty,ge=(St,lt,_t)=>lt in St?oe(St,lt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):St[lt]=_t,Se=(St,lt,_t)=>ge(St,typeof lt!="symbol"?lt+"":lt,_t);const ve=class hu{constructor(lt,_t,dt){this.placeholder=lt,this.editor=_t,this.monaco=dt,_t.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return hu.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)}};Se(ve,"ID","editor.widget.placeholderHint");var xe=ve,pe=we(96236),me=we(6767),Ae=we(25399),De=we(89392),ke=we(77254),Ie=we(56102),Fe=Object.defineProperty,Pe=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,rt=(St,lt,_t)=>lt in St?Fe(St,lt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):St[lt]=_t,Ge=(St,lt)=>{for(var _t in lt||(lt={}))ot.call(lt,_t)&&rt(St,_t,lt[_t]);if(Ke)for(var _t of Ke(lt))He.call(lt,_t)&&rt(St,_t,lt[_t]);return St},ct=(St,lt)=>Pe(St,qe(lt)),We=(St,lt)=>{var _t={};for(var dt in St)ot.call(St,dt)&&lt.indexOf(dt)<0&&(_t[dt]=St[dt]);if(St!=null&&Ke)for(var dt of Ke(St))lt.indexOf(dt)<0&&He.call(St,dt)&&(_t[dt]=St[dt]);return _t},Ue=(St,lt,_t)=>new Promise((dt,nt)=>{var et=Tt=>{try{wt(_t.next(Tt))}catch(Re){nt(Re)}},ft=Tt=>{try{wt(_t.throw(Tt))}catch(Re){nt(Re)}},wt=Tt=>Tt.done?dt(Tt.value):Promise.resolve(Tt.value).then(et,ft);wt((_t=_t.apply(St,lt)).next())});function Ze(St){return/^\d+$/.test(St)?`${St}px`:St}function Je(){}let $e=!1;const Qe={"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 pt(St=[]){let lt=St;if(Array.isArray(St)){for(let _t=0;_t<St.length;_t++){let dt=Qe[St[_t]];if(dt)return dt}return lt[0]}return Qe[lt]||lt}let ht=null;const Pt=()=>Ue(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(St){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",St)}});var gt=St=>{var lt=St,{width:_t="100%",height:dt="100%",value:nt,language:et="javascript",style:ft={},options:wt={},overrideServices:Tt={},theme:Re="vs-dark",onEditBlur:Le,isCopy:Te=!1,onSave:je,autoHeight:ye=!1,forbidCopy:le=!1,onChange:_e=Je,editorDidMount:Ne=Je,onFocus:Ye=Je,onBreakPoint:Oe=Je,breakPointValue:tt=[],filename:Ct="educoder.txt",errorLine:Nt,errorContent:Dt="",highlightLine:ut,openBreakPoint:Ht=!1,placeholder:At="",showMiniMap:Wt=!0}=lt,on=We(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 bn=(0,de.useRef)(),Yt=(0,de.useRef)({}),Mn=(0,de.useRef)(),Yn=(0,de.useRef)(),Vn=(0,de.useRef)([]),Jn=(0,de.useRef)(!1),ar=(0,de.useRef)(),ur=(0,de.useRef)(),jn=(0,de.useRef)(!1),[Bn,sr]=(0,de.useState)(!1);function Hn(){let Mt;return bn.current&&(Mt=new ie.Z(jt=>{for(let qt of jt)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&Yt.current.instance.layout()}),Mt.observe(bn.current)),Mt}function In(){me.ZP.warning({content:decodeURIComponent(ae),key:"monaco-editor-tip"})}const gn=()=>{let Mt=Yt.current.instance;if(nt!=null&&Mt&&Bn){const jt=Mt.getModel();jt&&nt!==jt.getValue()&&($e=!0,jt.setValue(nt),Mt.layout(),$e=!1)}};(0,de.useEffect)(()=>{const Mt=ke.Z.subscribe("formatDocument",jt=>{var qt;let wn=Yt.current.instance;(qt=wn==null?void 0:wn.getAction)==null||qt.call(wn,"editor.action.formatDocument").run()});return window.updateMonacoValue=jt=>{_e(jt)},Mt},[]),(0,de.useEffect)(()=>{var Mt;let jt=Yt.current.instance;Yn.current&&clearTimeout(Yn.current),Yn.current=setTimeout(()=>{gn()},500),nt&&(nt!=null&&nt.length)&&((Mt=jt==null?void 0:jt.updateOptions)==null||Mt.call(jt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(nt.split(/\r\n|\r|\n/g).length))+3,5)}))},[nt,Bn,Yt.current]),(0,de.useEffect)(()=>{if(Nt&&Yt.current&&Yt.current.instance){let jt=Yt.current.instance;jt.changeViewZones(function(qt){var wn=document.createElement("div");wn.style.padding="10px 20px",wn.style.width="calc(100% - 20px)",wn.className="my-error-line-wrp",wn.innerHTML=Dt,qt.addZone({afterLineNumber:Nt||11,heightInLines:3,domNode:wn})});var Mt={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}};jt.addOverlayWidget(Mt),jt.revealPositionInCenter({lineNumber:20,column:1})}},[Nt,Yt.current,Bn]);const Wn=(Mt="",jt)=>{if(!Mt||Mt.trim()==="")return!0;const wn=Yt.current.instance.getModel().getLineTokens(jt);let Qn=!1;for(let Rt=0;Rt<2;Rt++)wn.getStandardTokenType(Rt)===1&&(Qn=!0);return Qn};(0,de.useEffect)(()=>{var Mt;const jt=(Mt=Yt.current)==null?void 0:Mt.instance;if(jt&&Bn&&le){const qt=jt.onDidBlurEditorWidget(()=>{jn.current=!1}),wn=jt.onDidFocusEditorText(()=>{jn.current=!0});return()=>{qt.dispose(),wn.dispose()}}},[Yt.current,Bn,le]),(0,de.useEffect)(()=>{var Mt;if((Mt=Yt.current)!=null&&Mt.instance&&Bn&&Ht){let jt=Yt.current.instance,qt=jt.getModel();if(!qt)return;(()=>{var xn;let Ln=[],Kt=[];const Xt=qt.getAllDecorations();for(let Un of Xt)Un.options.className==="highlighted-line"&&(Ln.push((xn=Un==null?void 0:Un.range)==null?void 0:xn.startLineNumber),Kt.push(Un==null?void 0:Un.id));if(ut===Ln[0])return;qt.deltaDecorations(Kt,[]);const Cn=qt.getLineCount();ut&&ut<=Cn&&(jt.deltaDecorations([],[{range:new ht.Range(ut,1,ut,qt.getLineMaxColumn(ut)),options:{isWholeLine:!0,className:"highlighted-line"}}]),jt.revealLineInCenter(ut))})();const Qn=(xn=!1)=>{var Ln;let Kt=[],Xt=[];const Cn=qt.getAllDecorations();for(let Un of Cn)Un.options.linesDecorationsClassName==="breakpoints-select"&&(Kt.push((Ln=Un==null?void 0:Un.range)==null?void 0:Ln.startLineNumber),Xt.push(Un==null?void 0:Un.id));if(xn)return{lines:Kt,ids:Xt};Oe(Kt)},Rt=xn=>Ue(void 0,null,function*(){let Ln={range:new ht.Range(xn,1,xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[Ln]),Qn()}),Et=xn=>Ue(void 0,null,function*(){let Ln=[];const Kt=jt.getLineDecorations(xn);for(let Xt of Kt)Xt.options.linesDecorationsClassName==="breakpoints-select"&&Ln.push(Xt.id);yield qt.deltaDecorations(Ln,[]),Qn()}),sn=xn=>{let Ln=jt.getLineDecorations(xn);for(let Kt of Ln)if(Kt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,De.isEqual)(tt,Qn(!0).lines)){qt.deltaDecorations(Qn(!0).ids,[]);const xn=tt.map(Ln=>({range:new ht.Range(Ln,1,Ln,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],xn)}const Zt=jt.onDidChangeModelContent(xn=>{let Ln=jt.getPosition();if(Ln){let Kt=Ln.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{Wn(qt.getLineContent(Kt),Kt)?Et(Kt):sn(Kt)?(Et(Kt),Rt(Kt)):Qn()},100)}}),Lt=jt.onMouseDown(xn=>{var Ln,Kt,Xt;if(xn.target.detail&&((Xt=(Kt=(Ln=xn.target)==null?void 0:Ln.element)==null?void 0:Kt.className)!=null&&Xt.includes("line-numbers"))){let Cn=xn.target.position.lineNumber;if(Wn(qt.getLineContent(Cn),Cn))return;sn(Cn)?Et(Cn):Rt(Cn)}}),zt=xn=>{let Ln={range:new ht.Range(xn,1,xn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Vn.current=jt.deltaDecorations(Vn.current,[Ln])},nn=()=>{Vn.current=jt.deltaDecorations(Vn.current,[])},rn=jt.onMouseMove(xn=>{var Ln,Kt,Xt;if(nn(),xn.target.detail&&((Xt=(Kt=(Ln=xn.target)==null?void 0:Ln.element)==null?void 0:Kt.className)!=null&&Xt.includes("line-numbers"))){let Cn=xn.target.position.lineNumber;if(Wn(qt.getLineContent(Cn),Cn))return;zt(Cn)}}),_n=jt.onMouseLeave(()=>{nn()});return()=>{Zt.dispose(),Lt.dispose(),rn.dispose(),_n.dispose()}}},[Yt.current,Bn,tt,ut,Ht,et]),(0,de.useEffect)(()=>{var Mt;(Mt=Yt.current)!=null&&Mt.instance&&Ht&&Yt.current.instance.setPosition({lineNumber:0,column:0})},[ut]);function fr(){let Mt=Yt.current.instance;if(Mt){const jt=Mt.getSelection(),qt=Yt.current.pastePos||{},wn=new ht.Range(qt.startLineNumber||jt.endLineNumber,qt.startColumn||jt.endColumn,qt.endLineNumber||jt.endLineNumber,qt.endColumn||jt.endColumn);setTimeout(()=>{Mt.executeEdits("",[{range:wn,text:""}])},300)}}function mn(Mt){(window.navigator.platform.match("Mac")?Mt.metaKey:Mt.ctrlKey)&&Mt.keyCode==83&&(Mt.preventDefault(),je())}const En=()=>{if(ye&&Yt.current.instance){const Mt=Yt.current.instance.getContentHeight();yt(Mt<dt?dt:Mt)}else yt(dt)};function rr(Mt){var jt=document.createEvent("MouseEvents");jt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Mt.dispatchEvent(jt)}const Qt=Mt=>{if(!jn.current)return;const{keyCode:jt,ctrlKey:qt,metaKey:wn,target:Qn,type:Rt}=Mt;return(Rt==="paste"||(jt===67||jt===86)&&(wn||qt))&&Qn.nodeName==="TEXTAREA"&&(In(),Mt.preventDefault()),!1};function Me(Mt,jt){var qt=window.URL||window.webkitURL||window,wn=new Blob([jt]),Qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Qn.href=qt.createObjectURL(wn),Qn.download=Mt,rr(Qn)}(0,de.useEffect)(()=>{En()},[En]),(0,de.useEffect)(()=>{bn.current&&!Bn&&Promise.all([we.e(8909),we.e(2460)]).then(we.bind(we,71448)).then(Mt=>{try{ht=Mt,Yt.current.instance=ht.editor.create(bn.current,{value:nt,language:pt(et),theme:Re,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Wt||!1}},Tt);const jt=Yt.current.instance;let Qn=[...pe.BH._menuItems].find(Zt=>Zt[0]._debugName=="EditorContext")[1],Rt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Et=(Zt,Lt)=>{var zt,nn;let rn=Zt._first;do Lt.includes((nn=(zt=rn.element)==null?void 0:zt.command)==null?void 0:nn.id)&&Zt._remove(rn);while(rn=rn.next)};if(Ne(jt,ht),setTimeout(()=>{En(),Yt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Me(Ct||"educoder.txt",jt.getValue())}})},500),Yt.current.subscription=jt.onDidChangeModelContent(Zt=>{Jn.current?clearTimeout(ar.current):(En(),_e(jt.getValue(),Zt)),ar.current=setTimeout(()=>{Jn.current=!1},500)}),window.Monaco||ne(ht,pt(et)),le&&(Et(Qn,Rt),bn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Qt),window.removeEventListener("paste",Qt),window.addEventListener("keydown",Qt),window.addEventListener("paste",Qt)),window.Monaco=ht,Le&&jt.onDidBlurEditorWidget(()=>{Le(jt.getValue())}),Ye&&jt.onDidFocusEditorText(()=>{le&&Pt(),Ye(jt.getValue())}),le){Pt();try{jt.onDidPaste(Zt=>{const Lt=jt.getSelection(),zt=Yt.current.pastePos||{},nn=new ht.Range(zt.startLineNumber||Lt.endLineNumber,zt.startColumn||Lt.endColumn,zt.endLineNumber||Lt.endLineNumber,zt.endColumn||Lt.endColumn);jt.executeEdits("",[{range:Zt.range,text:""}])})}catch(Zt){}}let sn=Hn();return At&&typeof At=="string"&&new xe(At,jt,ht),sr(!0),()=>{const Zt=Yt.current.instance;Zt.dispose();const Lt=Zt.getModel();Lt&&Lt.dispose(),Yt.current.subscription&&Yt.current.subscription.dispose(),sn.unobserve(bn.current)}}catch(jt){}})},[]),(0,de.useEffect)(()=>{if(Yt.current.instance&&Bn)return document.addEventListener("keydown",mn,!1),()=>{document.removeEventListener("keydown",mn)}},[je,Bn]),(0,de.useEffect)(()=>{let Mt=Yt.current.instance;if(Mt&&Bn){let jt=pt(et);ht.editor.setModelLanguage(Mt.getModel(),jt)}},[et,Bn]),(0,de.useEffect)(()=>{Yt.current.instance&&Bn&&ht.editor.setTheme(Re)},[Re,Bn]),(0,de.useEffect)(()=>{let Mt=Yt.current.instance;Mn.current=wt,Mt&&Bn&&(Mt.updateOptions(Ge({},wt)),setTimeout(()=>{Mt.getModel().updateOptions(Ge({},wt))},200))},[JSON.stringify(wt),Bn]),(0,de.useEffect)(()=>{let Mt=Yt.current.instance;Mt&&Bn&&Mt.layout()},[_t,dt,Bn]);const[ze,Ve]=(0,de.useState)(Ze(_t)),[st,yt]=(0,de.useState)(Ze(dt)),Ft=ct(Ge({},ft),{width:ze,height:st,position:"relative"});return de.createElement("div",{className:"my-monaco-editor",ref:bn,style:Ft,onFocus:()=>{le&&Pt()}},Te&&de.createElement(Ie.CopyToClipboard,{text:nt,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},de.createElement(Ae.Z,{title:"\u590D\u5236\u4EE3\u7801"},de.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},de.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function bt({width:St="100%",height:lt="100%",original:_t,modified:dt,language:nt,options:et={}}){const ft=(0,de.useRef)(),[wt,Tt]=(0,de.useState)(null);function Re(ye){let le;return ft.current&&(le=new ie.Z(_e=>{for(let Ne of _e)(Ne.target.offsetHeight>0||Ne.target.offsetWidth>0)&&ye.layout()}),le.observe(ft.current)),le}(0,de.useEffect)(()=>(ft.current&&Promise.all([we.e(8909),we.e(9404)]).then(we.bind(we,2550)).then(ye=>{ht=ye;const le=ht.editor.createDiffEditor(ft.current,ct(Ge({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},et),{wordWrap:!0}));Tt(le);let _e=Re(le);return()=>{le.dispose();const Ne=le.getModel();Ne&&Ne.dispose(),_e.unobserve(ft.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,de.useEffect)(()=>{wt&&wt.setModel({original:ht.editor.createModel(_t,nt),modified:ht.editor.createModel(dt,nt)})},[_t,dt,nt,wt]);const Le=Ze(St),Te=Ze(lt),je={width:Le,height:Te};return de.createElement("div",{className:"my-diff-editor",ref:ft,style:je})}},77825:function(Jt,Ot,we){"use strict";var de=we(829),ie=we(82326),Ee=we(71411),ce=we(59301);const se=ie.default.Option;Ot.Z=({isTheoretical:re,onFontSizeChange:ue,cmFontSize:ee,cmCodeMode:te,autoFormat:E,onCodeModeChange:y,onTabToSpace:z,onAutoFormat:x,formatDocument:ne,className:ae="",tabToSpace:oe,children:ge,code_editor:Se,challenge:ve,shixun_environment_id:be,shixun_environments:xe})=>{var pe;const me={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},Ae=(pe=xe==null?void 0:xe.find(De=>De.shixun_environment_id===be))==null?void 0:pe.program_language;return console.log("----",Ae,xe,be,Se),ce.createElement("div",{className:`tpi-code-setting ${ae}`},ce.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ce.createElement("section",null,ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ce.createElement(ie.default,{bordered:!1,size:"small",value:te,onChange:y},ce.createElement(se,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ce.createElement(se,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!re&&ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ce.createElement(ie.default,{bordered:!1,size:"small",value:ee,onChange:ue},ce.createElement(se,{value:12},"12px"),ce.createElement(se,{value:14},"14px"),ce.createElement(se,{value:16},"16px"),ce.createElement(se,{value:18},"18px"),ce.createElement(se,{value:20},"20px"),ce.createElement(se,{value:22},"22px"))),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"Tab\u8F6C\u6362"),ce.createElement(Ee.Z,{checked:oe,onChange:z})),ce.createElement("div",{className:"file-item",onClick:ne},ce.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!re&&ce.createElement(ce.Fragment,null,ce.createElement("h3",null,"\u5FEB\u6377\u952E"),ce.createElement("section",null,ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ce.createElement("span",null,"Ctrl + S")),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ce.createElement("span",null,"F1 / Alt + F1")),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ce.createElement("span",null,"Ctrl + ]/[")),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ce.createElement("span",null,"Ctrl + Shift + \\")),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ce.createElement("span",null,"Home")),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ce.createElement("span",null,"End"))),ge),!re&&ce.createElement(ce.Fragment,null,ce.createElement("h3",null,"\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F"),ce.createElement("section",null,Ae&&ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),ce.createElement("span",null,Ae)),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ce.createElement("span",null,me[ve==null?void 0:ve.difficulty])),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ce.createElement("span",null,Se==null?void 0:Se.name)),ce.createElement("div",{className:"file-item"},ce.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ce.createElement("span",null,Se!=null&&Se.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},31103:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ie}});var de=we(59301);function ie(Ee,ce){const se=(0,de.useRef)();(0,de.useEffect)(()=>{se.current=Ee}),(0,de.useEffect)(()=>{function re(){se.current()}if(ce!==null){let ue=setInterval(re,ce);return()=>clearInterval(ue)}},[ce])}},80443:function(Jt,Ot,we){"use strict";we.d(Ot,{Im:function(){return Ie},ZP:function(){return He},gZ:function(){return Ke}});var de=we(59301),ie=we(37568),Ee=we(7939),ce=we(84105),se=we(87395),re=we(17124),ue=we(24334),ee=we(42678),te=we(95097),E=we(65862),y=we(51908),z=we(34376),x=we(92310),ne=we.n(x),ae=we(59301),oe=Object.defineProperty,ge=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,pe=(rt,Ge,ct)=>Ge in rt?oe(rt,Ge,{enumerable:!0,configurable:!0,writable:!0,value:ct}):rt[Ge]=ct,me=(rt,Ge)=>{for(var ct in Ge||(Ge={}))be.call(Ge,ct)&&pe(rt,ct,Ge[ct]);if(ve)for(var ct of ve(Ge))xe.call(Ge,ct)&&pe(rt,ct,Ge[ct]);return rt},Ae=(rt,Ge)=>ge(rt,Se(Ge));const{TextArea:De}=ie.default,ke={visible:!1,tabIndex:"0"},Ie={[re.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[re.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[re.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var Fe=(rt=>(rt[rt.SET_VISIBLE=0]="SET_VISIBLE",rt[rt.SET_TABINDEX=1]="SET_TABINDEX",rt))(Fe||{});function Pe(rt,Ge){switch(Ge.type){case 0:return Ae(me({},rt),{visible:Ge.payload});case 1:return Ae(me({},rt),{tabIndex:Ge.payload});default:throw new Error}}function qe({value:rt,className:Ge}){const[ct,We]=(0,de.useState)(!1),Ue=(0,de.useRef)(),Ze=(0,de.useRef)();return(0,de.useEffect)(()=>{ct&&(Ze.current.reset(),Ze.current.write((0,E.pp)(rt||"")))},[rt,ct]),(0,de.useEffect)(()=>{var Je,$e,Qe,pt;if(Ue.current){Ze.current=new z.Terminal({fontSize:14,disableStdin:!0}),Ze.current.open(Ue.current);const ht=Ue.current.offsetWidth-14,Pt=((pt=(Qe=($e=(Je=Ze.current)==null?void 0:Je._core)==null?void 0:$e._renderService)==null?void 0:Qe.dimensions)==null?void 0:pt.actualCellWidth)||9.5,gt=Math.ceil(ht/Pt);Ze.current.resize(gt,8),We(!0)}},[]),ae.createElement("div",{ref:Ue,className:ne()("XtermText-valueRef",Ge)})}function Ke(rt){const{status:Ge,error_msg:ct,output:We,input:Ue,expected_output:Ze,is_file:Je,input_file_url:$e,output_file_url:Qe,expected_output_file_url:pt}=rt;let ht=null;const Pt={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(Ge){case re.h.NOMATCH:ht=ae.createElement(ae.Fragment,null,ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!Je&&ae.createElement(qe,{className:"mb10",value:Ue}),Je&&ae.createElement("div",{style:Pt},ae.createElement("a",{onClick:()=>(0,E.LR)($e,Ue)},Ue)),ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!Je&&ae.createElement(qe,{className:"mb10",value:We&&ue.Base64.decode(We)||""}),Je&&ae.createElement("div",{style:Pt},ae.createElement("a",{onClick:()=>(0,E.LR)(Qe,We)},We)),ae.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!Je&&ae.createElement(qe,{className:"mb10",value:Ze&&ue.Base64.decode(Ze)||""}),Je&&ae.createElement("div",{style:Pt},ae.createElement("a",{onClick:()=>(0,E.LR)(pt,Ze)},Ze)));break;case re.h.EXECUTEFAILURE:ht=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Je&&ae.createElement(te.Z,{value:Ue,style:Pt}),Je&&ae.createElement("div",{style:Pt},ae.createElement("a",{onClick:()=>(0,E.LR)($e,Ue)},Ue)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},ue.Base64.decode(ct)));break;case re.h.COMPILEFAILURE:ht=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!Je&&ae.createElement(te.Z,{value:Ue,style:Pt}),Je&&ae.createElement("div",{style:Pt},ae.createElement("a",{onClick:()=>(0,E.LR)($e,Ue)},Ue)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},ue.Base64.decode(ct)));break;case re.h.PODFAILURE:ht=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case re.h.TIMEOUT:ht=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",ht," ")}function ot(rt){const{status:Ge,error_msg:ct,execute_time:We,output:Ue,input:Ze,expected_output:Je,is_file:$e,input_file_url:Qe,output_file_url:pt,expected_output_file_url:ht}=rt;let Pt=null;switch(Ge){case re.h.OK:Pt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",We,"\u79D2"),ae.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ae.createElement("pre",null,ue.Base64.decode(Ue)));break;case re.h.NOMATCH:Pt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ze)),ae.createElement("p",null,"\u8F93\u51FA\uFF1A",Ue&&ue.Base64.decode(Ue)),ae.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",Je&&ue.Base64.decode(Je)));break;case re.h.EXECUTEFAILURE:Pt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},ue.Base64.decode(ct)));break;case re.h.COMPILEFAILURE:Pt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},ue.Base64.decode(ct)));break;case re.h.PODFAILURE:Pt=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case re.h.TIMEOUT:Pt=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",Pt," ")}var He=({id:rt,is_file:Ge,input:ct,debuging:We,submitting:Ue,executingMessage:Ze,debugResult:Je,onChangeInput:$e,onDebugCode:Qe,onSubmitCode:pt})=>{const[ht,Pt]=(0,de.useReducer)(Pe,ke),{visible:gt,tabIndex:bt}=ht;(0,de.useEffect)(()=>{Pt({type:0,payload:!1})},[rt]);function St(nt){let et=nt.target.id;Pt({type:1,payload:et})}function lt(){Pt({type:0,payload:!gt})}const _t=(0,de.useMemo)(()=>{if(Je){const{status:nt}=Je;return ae.createElement(ae.Fragment,null,ot(Je))}return null},[Je]);function dt(){Pt({type:0,payload:!0}),Pt({type:1,payload:"1"}),Qe()}return ae.createElement("div",{className:"test-case-panel"},ae.createElement("div",{className:`test-case-panel-body ${gt?"active":""}`},ae.createElement("ul",{className:"s-navs"},ae.createElement("li",null,ae.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ae.createElement(y.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ae.createElement(De,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:Ge?"":ct,onChange:$e}),rightNode:We?ae.createElement(ee.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):Je?_t:ae.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),ae.createElement("a",{className:`btn-collapse ${gt?"up":""}`,onClick:lt},gt?ae.createElement(ce.Z,null):ae.createElement(se.Z,null)),ae.createElement("footer",{className:"footer"},ae.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ae.createElement("div",{className:"flex-container"},ae.createElement(Ee.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ae.createElement(Ee.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ae.createElement(Ee.ZP,{className:"btn-green",type:"ghost",loading:We,onClick:dt},"\u8C03\u8BD5\u4EE3\u7801"),ae.createElement(Ee.ZP,{type:"primary",className:"custom-ant-disabled",loading:Ue,disabled:Ue,onClick:()=>{Pt({type:0,payload:!1}),pt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},20620:function(Jt,Ot,we){"use strict";we.r(Ot),we.d(Ot,{default:function(){return ll}});var de=we(59301),ie=we(10906),Ee=we(76618),ce=we(65582),se=we(11938),re=we(6767),ue=we(62957),ee=we(29787),te=we(82326),E=we(47887),y=we(29584),z=we(74128),x=we(87169),ne=we(30641),ae=we(50258),oe=we(57261),ge=we(42926),Se=we(77825),ve=we(59301),be=Object.defineProperty,xe=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,De=Object.prototype.propertyIsEnumerable,ke=(mt,xt,kt)=>xt in mt?be(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Ie=(mt,xt)=>{for(var kt in xt||(xt={}))Ae.call(xt,kt)&&ke(mt,kt,xt[kt]);if(me)for(var kt of me(xt))De.call(xt,kt)&&ke(mt,kt,xt[kt]);return mt},Fe=(mt,xt)=>xe(mt,pe(xt));const Pe={theme:(0,ge.G)("cmCodeMode","vs-dark"),fontSize:(0,ge.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ge.G)("cmTabToSpace",!0)};var qe=(mt=>(mt[mt.set_font_size=0]="set_font_size",mt[mt.set_theme=1]="set_theme",mt[mt.on_tab_to_space=2]="on_tab_to_space",mt[mt.set_show_editor_setting=3]="set_show_editor_setting",mt))(qe||{});function Ke(mt,xt){switch(xt.type){case 3:return Fe(Ie({},mt),{showEditorSetting:xt.payload});case 1:return Fe(Ie({},mt),{theme:xt.payload});case 0:return Fe(Ie({},mt),{fontSize:xt.payload});case 2:return Fe(Ie({},mt),{tabToSpace:xt.payload});default:throw new Error}}var ot=({isLoading:mt,value:xt,onChange:kt,language:$n,onUpdateCode:Nn,ActionBarRender:pn=Tn=>ve.createElement(He,{onShowCodeSetting:Tn})})=>{const[Tn,kn]=(0,de.useReducer)(Ke,Pe),{theme:Pn,fontSize:nr,showEditorSetting:ci,tabToSpace:Br}=Tn,gi=(0,de.useRef)(),Dr=(0,de.useRef)(),yi={onFontSizeChange:Ei=>{kn({type:0,payload:Ei}),(0,ge.t)("cmFontSize",Ei)},tabToSpace:Br,cmFontSize:nr,className:"oj",cmCodeMode:Pn,onTabToSpace:Ei=>{kn({type:2,payload:Ei}),(0,ge.t)("cmTabToSpace",Ei)},onCodeModeChange:Ei=>{kn({type:1,payload:Ei}),(0,ge.t)("cmCodeMode",Ei)}};function zr(){kn({type:3,payload:!1})}function zi(){kn({type:3,payload:!0})}const ni={value:xt,language:$n,theme:Pn,height:"calc(100% - 56px)",options:{fontSize:nr,insertSpaces:Br},onChange:Ei=>{kt(Ei),Dr.current=Ei,clearTimeout(gi.current),gi.current=setTimeout(()=>{Nn(Dr.current)},1e4)},onEditBlur:Ei=>{Dr.current&&Nn(Dr.current)}};return ve.createElement(de.Fragment,null,ve.createElement("div",{className:"code-panel-container"},pn(zi),!mt&&ve.createElement(ae.ZP,Ie({},ni))),ve.createElement(oe.Z,null,ve.createElement(ne.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ci,onClose:zr},ve.createElement(Se.Z,Ie({},yi)))))};function He({onShowCodeSetting:mt}){return ve.createElement("div",{className:"action-bar"},ve.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),ve.createElement("a",{onClick:mt},ve.createElement("i",{className:"iconfont icon-shezhi"})))}var rt=we(24334),Ge=we(93373),ct=we(80443),We=we(37568),Ue=we(28284),Ze=we(7939);const{TextArea:Je}=We.default,$e=5e3;var Qe=({callback:mt,onCancel:xt,notes:kt})=>{function $n(Nn){mt(Nn)}return de.createElement(Ue.default,{className:"note-form-panel",onFinish:$n,initialValues:{notes:kt}},de.createElement(Ue.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:$e,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${$e}`}]},de.createElement(Je,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),de.createElement(Ue.default.Item,{style:{textAlign:"right"}},de.createElement(Ze.ZP,{type:"ghost",onClick:xt,style:{marginRight:10}}," \u53D6\u6D88 "),de.createElement(Ze.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},pt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},ht={pagination:"pagination___npPu7",info:"info___aRH6C"},Pt=we(54172),gt=we(13747),bt=we(58617),St=we(81953),lt=we(17124),_t=we(65862),dt=we(56656),nt=we.n(dt);const{Column:et}=Pt.default;var ft=({submitResult:mt,submitting:xt,submitRecords:kt,page:$n,onPageChange:Nn,topicId:pn})=>{const{status:Tn,id:kn,input:Pn,output:nr,expected_output:ci,is_file:Br,input_file_url:gi,output_file_url:Dr,expected_output_file_url:yi,error_msg:zr}=mt||{},{records:zi,records_count:ni}=kt||{},Ei=(0,ce.useParams)();function Wi(){Br?navigator.clipboard.writeText(rt.Base64.decode(zr)).then(()=>{re.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(rt.Base64.decode(nr)).then(()=>{re.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return de.createElement(ee.Z,{spinning:xt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:de.createElement(bt.Z,{style:{fontSize:24},spin:!0})},kn?de.createElement(de.Fragment,null,de.createElement("ul",{className:ht.info},de.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",de.createElement("span",{className:Tn===lt.h.OK?"c-green":"c-red"},ct.Im[Tn])),de.createElement("li",{className:ht.error},de.createElement("a",{onClick:Wi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",de.createElement(St.Z,null)," ")),de.createElement("li",null,de.createElement(ce.Link,{to:`/problems/${pn}/record-detail/${kn}?backId=${Ei==null?void 0:Ei.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Tn!==lt.h.OK?de.createElement(de.Fragment,null,de.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),de.createElement("pre",null,!Br&&Pn,Br&&de.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(gi,Pn)},Pn)),de.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),de.createElement("pre",null,(Tn===4||Tn===5)&&rt.Base64.decode(zr),Tn!=4&&Tn!=5&&(Br?de.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(Dr,nr)},nr):rt.Base64.decode(nr))),de.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),de.createElement("pre",null,!Br&&rt.Base64.decode(ci),Br&&de.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(yi,ci)},ci))):null):null,(zi==null?void 0:zi.length)>0?de.createElement(Pt.default,{dataSource:zi,rowKey:"id",pagination:!1},de.createElement(et,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(ri,Di)=>de.createElement("span",null," ",nt()(ri).format("YYYY-MM-DD HH:mm:ss"))}),de.createElement(et,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(ri,Di)=>{var or;return de.createElement(ce.Link,{className:ri===0?"c-green":"c-red",to:`/problems/${pn}/record-detail/${Di.id}?backId=${Ei==null?void 0:Ei.save_identifier}`},(or=ct.Im[ri])==null?void 0:or.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),de.createElement(et,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),de.createElement(et,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),de.createElement(et,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ni>15?de.createElement(gt.Z,{className:ht.pagination,current:$n,pageSize:15,total:ni,onChange:Nn}):null)},wt=we(2524),Tt=we(96599),Re=we(44104),Le={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Te=we(95097),je=we(59301);const ye={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var le=({hack:mt,onTriggerPraise:xt,toDiscuss:kt})=>{const{language:$n,difficulty:Nn,time_limit:pn,username:Tn,user_path:kn,user_praise:Pn,comments_count:nr,praises_count:ci,description:Br,pass_count:gi,submit_count:Dr}=mt,yi=(0,ce.useLocation)();console.log(mt.language,"language");const zr=ye[Nn];return je.createElement(je.Fragment,null,je.createElement("ul",{className:Le.info},je.createElement("li",null,"\u96BE\u5EA6\uFF1A",je.createElement(Tt.default,{color:zr==null?void 0:zr.color},zr==null?void 0:zr.name)),je.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",je.createElement("b",null,pn,"\u79D2"))),je.createElement(Te.Z,{value:Br,className:Le.desc}),je.createElement("ul",{className:Le["commit-info"]},je.createElement("li",null,je.createElement(Re.Z,{size:4},je.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",je.createElement("b",null,gi))),je.createElement("li",null,je.createElement(Re.Z,{size:4},je.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",je.createElement("b",null,Dr))," "),je.createElement("li",{style:{flex:"1 0 0"}}),je.createElement("li",null,je.createElement(Re.Z,{size:4},je.createElement("i",{className:"iconfont icon-huifu1",onClick:kt})," ",je.createElement("b",null,nr))," ")))},_e=we(77254),Ne=Object.defineProperty,Ye=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,Ct=(mt,xt,kt)=>xt in mt?Ne(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Nt=(mt,xt)=>{for(var kt in xt||(xt={}))Oe.call(xt,kt)&&Ct(mt,kt,xt[kt]);if(Ye)for(var kt of Ye(xt))tt.call(xt,kt)&&Ct(mt,kt,xt[kt]);return mt};const Dt=mt=>React.createElement("svg",Nt({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var ut="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Ht=we(38147);function At(mt){return(0,Ht.U2)("comments.json",mt)}function Wt(mt){return(0,Ht.v_)(`/discusses/${mt}/plus.json`,{container_type:"Discuss",type:1})}function on(mt){return(0,Ht.v_)("comments/reply.json",mt)}function bn(mt){return(0,Ht.v_)("comments.json",mt)}function Yt(mt){return(0,Ht.v_)(`comments/${mt==null?void 0:mt.id}/hidden.json`,mt)}function Mn(mt){return(0,Ht.IV)(`comments/${mt==null?void 0:mt.id}.json`)}var Yn=we(83554),Vn=we(41867);function Jn({author:mt}){return de.createElement("a",{href:`/users/${mt.login}`,target:"_blank"},de.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${z.Z.IMG_SERVER}/images/${mt.image_url}`,width:"50"}))}function ar({data:mt,index:xt,parentDiscussIndex:kt,user:$n,onSetActionType:Nn}){const{author:pn,can_delete:Tn,content:kn,id:Pn,time:nr}=mt;function ci(){Nn({id:Pn,index:xt,type:"delete-discuss",parentDiscussIndex:kt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Br=$n.admin||Tn||pn.user_id===$n.user_id;return de.createElement("div",{className:"discuss-item-container second-discuss "},de.createElement(Jn,{author:pn}),de.createElement("section",null,de.createElement("div",{className:"discuss-info"},de.createElement("a",{href:`/users/${pn.login}`,target:"_blank"},pn.name),de.createElement("span",{className:"grey"},nr),de.createElement("div",{className:"btn-group",style:{marginBottom:0}},Br?de.createElement("a",{onClick:ci,title:"\u5220\u9664"},de.createElement("i",{className:"iconfont icon-shanchu"})):null)),de.createElement(Te.Z,{className:"discuss-content",value:kn})))}var ur=({user:mt,data:xt,index:kt,onPlusDiscuss:$n,onSetActionType:Nn,activeDiscussIndex:pn,onReplyDiscuss:Tn,onSetActiveDiscussIndex:kn})=>{const{content:Pn,children:nr,hidden:ci,id:Br,praise_count:gi,time:Dr,user_praise:yi,can_delete:zr,author:zi}=xt;console.log(zr&&(!nr||nr.length==0),"children22");function ni(){kn(Br)}function Ei(){$n(Br,!yi,kt)}function Wi(){Nn({id:Br,index:kt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function ri(){Nn({id:Br,index:kt,params:{hidden:ci?"0":"1"},type:"hidden-discuss",message:ci?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Di=mt.admin||mt.user_id===zi.user_id;return de.createElement("div",{className:"discuss-item-container",key:Br},de.createElement(Jn,{author:zi}),de.createElement("section",null,de.createElement("div",{className:"discuss-info"},de.createElement("a",{href:`/users/${zi.login}`,target:"_blank"}," ",zi.name," "),de.createElement("span",{className:"grey"},Dr)),de.createElement(Te.Z,{className:"discuss-content",value:Pn}),nr&&nr.length>0?de.createElement("div",{className:"reply-discuss-container"},nr.map((or,Bi)=>de.createElement(ar,{key:or.id,data:or,index:Bi,user:mt,onSetActionType:Nn,parentDiscussIndex:kt}))):null,de.createElement("div",{className:"btn-group"},(0,Vn.Ny)()?de.createElement("a",{onClick:ri,title:ci?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},de.createElement("i",{className:ci?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,zr&&(!nr||nr.length==0)?de.createElement("a",{onClick:Wi,title:"\u5220\u9664"},de.createElement("i",{className:"iconfont icon-shanchu"})):null,de.createElement("a",{onClick:ni,title:"\u56DE\u590D"}," ",de.createElement("i",{className:"iconfont icon-huifu1"})," "),de.createElement("a",{onClick:Ei,className:yi?"c-orange":""},de.createElement("i",{className:yi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),de.createElement("span",null,gi||""))),de.createElement(Yn.Z,{id:Br,activeDiscussIndex:pn,onReplyDiscuss:Tn})))},jn=we(30214),Bn=we(25374),sr=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())}),Hn=({user_praise:mt,praise_count:xt,praisePlus:kt,onCreateDiscuss:$n,discuss_count:Nn})=>{const[pn,Tn]=(0,de.useState)(!1),[kn,Pn]=(0,de.useState)("");function nr(Dr){Pn(Dr)}function ci(){Tn(!0)}function Br(){Tn(!1)}function gi(){return sr(this,null,function*(){$n(kn),Pn(""),Tn(!1)})}return de.createElement("div",{className:`dis-input-editor-container ${pn?"active":""} `},de.createElement("div",{className:pn?"text-area hide":"text-area"},de.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ci}),de.createElement("a",{style:{alignItems:"center"}}," ",de.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Nn," "),de.createElement("a",{className:"c-light-black",onClick:kt,style:{alignItems:"center"},title:mt?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},de.createElement("i",{className:`mr3 ${mt?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),xt?de.createElement("span",null,xt):"")),pn?de.createElement("div",{className:"input-mask",onClick:Br}):null,de.createElement("div",{className:pn?"md-container":"md-container hide"},de.createElement(Bn.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:kn,height:240,onChange:nr}),de.createElement("div",{className:"tip-container",onClick:Br},de.createElement("a",{className:"btn-send",onClick:gi}," \u53D1\u9001 "))))},In=Object.defineProperty,gn=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,fr=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,En=Object.prototype.propertyIsEnumerable,rr=(mt,xt,kt)=>xt in mt?In(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Qt=(mt,xt)=>{for(var kt in xt||(xt={}))mn.call(xt,kt)&&rr(mt,kt,xt[kt]);if(fr)for(var kt of fr(xt))En.call(xt,kt)&&rr(mt,kt,xt[kt]);return mt},Me=(mt,xt)=>gn(mt,Wn(xt)),ze=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())});const Ve={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var st=(mt=>(mt[mt.GET_DISCUSSES=0]="GET_DISCUSSES",mt[mt.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",mt[mt.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",mt[mt.PLUS_DISCUSS=3]="PLUS_DISCUSS",mt[mt.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",mt[mt.SET_PAGE=5]="SET_PAGE",mt[mt.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",mt))(st||{});function yt(mt,xt){switch(xt.type){case 6:return Me(Qt({},mt),{loading:!0});case 0:return Qt(Qt({},mt),xt.payload);case 1:return Qt(Qt({},mt),xt.payload);case 4:return Qt(Qt({},mt),xt.payload);case 3:return Qt(Qt({},mt),xt.payload);case 5:return Qt(Qt({},mt),xt.payload);case 2:return Qt(Qt({},mt),xt.payload);default:throw new Error}}var Ft=({user:mt,identifier:xt,hack:kt,onTriggerPraise:$n,setDiscussTotal:Nn})=>{const[pn,Tn]=(0,de.useReducer)(yt,Ve),{loading:kn,page:Pn,data:nr,count:ci,actionType:Br,activeDiscussIndex:gi}=pn;console.log("---",pn);const Dr=(0,de.useCallback)(()=>ze(void 0,null,function*(){Tn({type:6});const or=yield At({container_type:"Practice",container_identifier:xt,limit:10,page:Pn}),{comments:Bi,disscuss_count:bi}=or;Tn({type:0,payload:{data:Bi,count:bi,loading:!1}}),Nn(bi)}),[Pn,xt]);(0,de.useEffect)(()=>{Dr()},[xt,Pn]);function yi(or){Tn({type:5,payload:{page:or}})}function zr(or){Tn({type:4,payload:{actionType:or}})}function zi(or){Tn(gi===or?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:or}})}function ni(or,Bi,bi){return ze(this,null,function*(){try{const Ri=yield Wt(or);nr[bi].user_praise=Bi,nr[bi].praise_count=Ri.praise_count,Tn({type:3,payload:{data:[...nr]}})}catch(Ri){console.log(Ri)}})}function Ei(){return ze(this,null,function*(){const{id:or,params:Bi,type:bi,index:Ri,parentDiscussIndex:Po}=Br;bi==="hidden-discuss"&&(console.log(Bi,"params"),yield Yt(Qt({id:or,container_type:"Practice",container_identifier:xt},Bi)),Po?nr[Po].children[Ri].hidden=Bi.hidden==1:nr[Ri].hidden=Bi.hidden==1,Tn({type:4,payload:{actionType:null,data:[...nr]}})),bi==="delete-discuss"&&(yield Mn({id:or,container_type:"Practice",container_identifier:xt}),Tn({type:4,payload:{actionType:null}}),yield Dr())})}function Wi(){Tn({type:4,payload:{actionType:null}})}function ri(or,Bi){return ze(this,null,function*(){try{yield on({container_type:"Practice",container_identifier:xt,comments:{content:Bi,parent_id:or}}),Dr()}catch(bi){console.log(bi)}})}function Di(or){return ze(this,null,function*(){Tn({type:6}),yield bn({comments:{content:or},container_type:"Practice",container_identifier:xt}),Dr()})}return de.createElement(de.Fragment,null,de.createElement("div",{className:"discuss-panel"},nr.length===0?de.createElement(wt.Z,null):de.createElement(ee.Z,{spinning:kn},nr.map((or,Bi)=>de.createElement(ur,{onReplyDiscuss:ri,onPlusDiscuss:ni,onSetActiveDiscussIndex:zi,onSetActionType:zr,data:or,index:Bi,user:mt,activeDiscussIndex:gi}))),ci>10?de.createElement("div",{className:"pagination-container mt10 mb10"},de.createElement(gt.Z,{showQuickJumper:!0,onChange:yi,current:Pn,total:ci,showTotal:or=>de.createElement("span",{style:{color:"#656F87"}},"\u5171",de.createElement("span",{className:"c-light-primary"},or),"\u6761\u6570\u636E")})):null),de.createElement(Hn,{user_praise:kt.user_praise,praise_count:kt.praises_count,praisePlus:$n,discuss_count:kt.comments_count,onCreateDiscuss:Di}),de.createElement(oe.Z,null,de.createElement(ue.default,{centered:!0,title:"\u63D0\u793A",open:!!Br,onOk:Ei,onCancel:Wi},de.createElement("p",null,Br?Br.message:"")),de.createElement(jn.Z,null)))},Mt={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},jt={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},qt=Object.defineProperty,wn=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable,Et=(mt,xt,kt)=>xt in mt?qt(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,sn=(mt,xt)=>{for(var kt in xt||(xt={}))Qn.call(xt,kt)&&Et(mt,kt,xt[kt]);if(wn)for(var kt of wn(xt))Rt.call(xt,kt)&&Et(mt,kt,xt[kt]);return mt};const Zt=mt=>React.createElement("svg",sn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",zt=Object.defineProperty,nn=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,xn=(mt,xt,kt)=>xt in mt?zt(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Ln=(mt,xt)=>{for(var kt in xt||(xt={}))rn.call(xt,kt)&&xn(mt,kt,xt[kt]);if(nn)for(var kt of nn(xt))_n.call(xt,kt)&&xn(mt,kt,xt[kt]);return mt};const Kt=mt=>React.createElement("svg",Ln({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var Xt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",Cn=Object.defineProperty,Un=Object.getOwnPropertySymbols,Zn=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,Lr=(mt,xt,kt)=>xt in mt?Cn(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,wr=(mt,xt)=>{for(var kt in xt||(xt={}))Zn.call(xt,kt)&&Lr(mt,kt,xt[kt]);if(Un)for(var kt of Un(xt))er.call(xt,kt)&&Lr(mt,kt,xt[kt]);return mt};const tr=mt=>React.createElement("svg",wr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var zn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",cr=Object.defineProperty,Xn=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,Yr=(mt,xt,kt)=>xt in mt?cr(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,pi=(mt,xt)=>{for(var kt in xt||(xt={}))yr.call(xt,kt)&&Yr(mt,kt,xt[kt]);if(Xn)for(var kt of Xn(xt))Nr.call(xt,kt)&&Yr(mt,kt,xt[kt]);return mt};const _i=mt=>React.createElement("svg",pi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Si="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",oi=Object.defineProperty,Mi=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,lr=Object.prototype.propertyIsEnumerable,Ar=(mt,xt,kt)=>xt in mt?oi(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Mr=(mt,xt)=>{for(var kt in xt||(xt={}))Li.call(xt,kt)&&Ar(mt,kt,xt[kt]);if(Mi)for(var kt of Mi(xt))lr.call(xt,kt)&&Ar(mt,kt,xt[kt]);return mt};const $r=mt=>React.createElement("svg",Mr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var Jr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Hi=({style:mt={},onClick:xt,onAssist:kt,onHide:$n,data:Nn,active:pn,showLine:Tn})=>de.createElement(de.Fragment,null,de.createElement("div",{className:pn===(Nn==null?void 0:Nn.id)?`${jt.list} ${jt.active}`:jt.list,style:mt,onClick:()=>xt(Nn)},(Nn==null?void 0:Nn.video)&&de.createElement("div",{className:jt.left},de.createElement("img",{src:Nn==null?void 0:Nn.video_cover}),de.createElement("div",null,de.createElement("img",{src:Lt}),de.createElement("span",null,Nn==null?void 0:Nn.video_duration)),de.createElement("div",{className:jt.mask})),de.createElement("div",{className:jt.right},de.createElement("div",{className:jt.name},de.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(Nn==null?void 0:Nn.image_url),width:30,height:30}),de.createElement("div",{title:Nn==null?void 0:Nn.name,className:jt.title},Nn==null?void 0:Nn.name),(Nn==null?void 0:Nn.is_authority)&&de.createElement("div",{className:jt.b},"\u5B98\u65B9"),(Nn==null?void 0:Nn.is_excellent)&&de.createElement("div",{className:jt.a},"\u7CBE\u9009")),de.createElement("div",{className:jt.des},de.createElement(Te.Z,{showLines:2,showTextOnly:!0,value:(Nn==null?void 0:Nn.content)||"\u6682\u65E0\u5185\u5BB9"})),de.createElement("div",{className:jt.tag},de.createElement("span",{className:"current",onClick:kn=>{kn.stopPropagation(),kt(Nn)}},de.createElement("img",{src:Nn!=null&&Nn.user_liker?zn:Xt}),de.createElement("span",{style:{color:Nn!=null&&Nn.user_liker?"#0152d9":"#656f87"}},Nn==null?void 0:Nn.praises_count)),de.createElement("span",null,de.createElement("img",{src:Si}),de.createElement("span",null,Nn==null?void 0:Nn.discusses_count)),de.createElement("span",null,de.createElement("img",{src:Jr}),de.createElement("span",null,Nn==null?void 0:Nn.viewed_count)),(0,Vn.Ny)()&&de.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:kn=>{kn.stopPropagation(),$n(Nn)}},Nn!=null&&Nn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Tn&&de.createElement("div",{className:jt.line})),It={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},tn=we(25399),Vt=we(19941),$t=Object.defineProperty,cn=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,Fn=Object.prototype.propertyIsEnumerable,An=(mt,xt,kt)=>xt in mt?$t(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Sn=(mt,xt)=>{for(var kt in xt||(xt={}))hn.call(xt,kt)&&An(mt,kt,xt[kt]);if(cn)for(var kt of cn(xt))Fn.call(xt,kt)&&An(mt,kt,xt[kt]);return mt};const Gt=mt=>React.createElement("svg",Sn({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var ln="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",dn=Object.defineProperty,un=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,yn=(mt,xt,kt)=>xt in mt?dn(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,fn=(mt,xt)=>{for(var kt in xt||(xt={}))vn.call(xt,kt)&&yn(mt,kt,xt[kt]);if(un)for(var kt of un(xt))Gn.call(xt,kt)&&yn(mt,kt,xt[kt]);return mt};const Rn=mt=>React.createElement("svg",fn({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var On="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",qn=Object.defineProperty,gr=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Er=(mt,xt,kt)=>xt in mt?qn(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Ir=(mt,xt)=>{for(var kt in xt||(xt={}))dr.call(xt,kt)&&Er(mt,kt,xt[kt]);if(gr)for(var kt of gr(xt))Pr.call(xt,kt)&&Er(mt,kt,xt[kt]);return mt};const Zr=mt=>React.createElement("svg",Ir({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},mt),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var Fr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",li=Object.defineProperty,Wr=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,hr=(mt,xt,kt)=>xt in mt?li(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,vr=(mt,xt)=>{for(var kt in xt||(xt={}))qr.call(xt,kt)&&hr(mt,kt,xt[kt]);if(Wr)for(var kt of Wr(xt))Rr.call(xt,kt)&&hr(mt,kt,xt[kt]);return mt},jr=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())});const _r=(mt,xt)=>{var kt,$n,Nn;const{uploadInfo:pn={}}=xt.payload;switch(xt.type){case"addVideo":return{videoList:[...mt.videoList,{name:pn.file.name,size:pn.file.size,type:pn.file.type,fileHash:pn.fileHash,state:pn.state,video_id:pn.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:mt.videoList.filter(Tn=>Tn.name!==xt.payload.name)};case"replaceVideo":return{videoList:xt.payload};case"removeAll":return[];case"updateProgress":return{videoList:mt.videoList.map(Tn=>Tn.name===xt.payload.uploadInfo.file.name?vr(vr({},Tn),{loaded:xt.payload.progressPercent,video_id:pn.videoId,fileHash:pn.fileHash}):Tn)};case"updateTitle":return{videoList:(kt=mt.videoList)==null?void 0:kt.map(Tn=>Tn.name===xt.payload.item.name?vr(vr({},Tn),{title:xt.payload.title}):Tn)};case"updateImg":return{videoList:($n=mt.videoList)==null?void 0:$n.map(Tn=>Tn.name===xt.payload.item.name?vr(vr({},Tn),{attachment_id:xt.payload.attachment_id}):Tn)};case"updateImg":return{videoList:(Nn=mt.videoList)==null?void 0:Nn.map(Tn=>Tn.name===xt.payload.item.name?vr(vr({},Tn),{attachment_id:xt.payload.attachment_id}):Tn)};default:return[]}};var ti=({onClose:mt,onOk:xt,identifier:kt,active:$n})=>{var Nn,pn;const[Tn]=Ue.default.useForm(),[kn,Pn]=(0,de.useState)({}),[nr,ci]=(0,de.useState)(!1),[Br,gi]=(0,de.useState)(!1),[Dr,yi]=(0,de.useReducer)(_r,{videoList:[]}),zr=(0,Vn.eY)(),zi=(0,ce.useParams)(),ni=(0,de.useRef)();(0,de.useEffect)(()=>{$n&&Ei()},[$n]);const Ei=()=>jr(void 0,null,function*(){var Hr,mi,Or,qo,so,oa,os,aa,ga,ii;const Ai=yield(0,E.M3)(kt,{active:$n});if((Ai==null?void 0:Ai.status)===0){const oo={name:(Hr=Ai==null?void 0:Ai.data)==null?void 0:Hr.name,content:(mi=Ai==null?void 0:Ai.data)==null?void 0:mi.content};Tn.setFieldsValue(oo),Pn(oo),(qo=(Or=Ai==null?void 0:Ai.data)==null?void 0:Or.videos)!=null&&qo[0]&&yi({type:"replaceVideo",payload:[{video_id:(os=(oa=(so=Ai==null?void 0:Ai.data)==null?void 0:so.videos)==null?void 0:oa[0])==null?void 0:os.video_id,name:(ii=(ga=(aa=Ai==null?void 0:Ai.data)==null?void 0:aa.videos)==null?void 0:ga[0])==null?void 0:ii.title,loaded:100}]})}}),Wi=(Hr,mi)=>{Pn(vr({},mi))},ri=Hr=>jr(void 0,null,function*(){const mi={videos:Dr.videoList,articles:Hr};gi(!0);let Or;$n?(mi.active=$n,Or=yield(0,E.gu)(kt,mi)):Or=yield(0,E.bx)(kt,mi),(Or==null?void 0:Or.status)===0&&(console.log($n||(Or==null?void 0:Or.id),44),xt($n||(Or==null?void 0:Or.id))),gi(!1)}),Di=()=>{const Hr=document.getElementById("fileUpload");Hr.value=""},or=Hr=>{var mi='{"Vod":{}}';if(ci(!0),ni.current){ni.current.addFile(Hr,null,null,null,mi);return}(0,Vt.o)(zr==null?void 0:zr.login,"",{create:!ni,addFileSuccess:Or=>{yi({type:"addVideo",payload:{uploadInfo:Or}})},onUploadProgress:(Or,qo,so)=>{const oa=Math.ceil(so*100);yi({type:"updateProgress",payload:{uploadInfo:Or,progressPercent:oa}}),Di()},onUploadFailed:Or=>{re.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Or=>{ci(!1)},onUploadSucceed:Or=>{ci(!1)},onUploadError:Or=>{ci(!1)},gotUploader:Or=>{Or.addFile(Hr,null,null,null,mi),ni.current=Or}})},Bi=Hr=>{var mi;const qo=Hr.target.files[0];if(!qo){Di();return}let so=qo.name.toLowerCase();if(so&&so.indexOf(".avi")==-1&&so.indexOf(".flv")==-1&&so.indexOf(".f4v")==-1&&so.indexOf(".m4v")==-1&&so.indexOf(".mov")==-1&&so.indexOf(".mp4")==-1&&so.indexOf(".rmvb")==-1&&so.indexOf(".swf")==-1&&so.indexOf(".webm")==-1&&so.indexOf(".wmv")==-1){re.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Di();return}if(qo.size>1024*1024*1024){re.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Di();return}if((mi=Dr.videoList)!=null&&mi.find(oa=>oa.name===qo.name)){re.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Di();return}or(qo)},bi=(Hr,mi)=>{ue.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:de.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",mi?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Di(),yi({type:"removeVideo",payload:{name:Hr}})}})},Ri=()=>de.createElement("label",{htmlFor:"fileUpload",className:It.main},de.createElement("img",{src:ln,alt:""}),de.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Po=Hr=>de.createElement("div",{className:It.mainLoading},de.createElement("div",{className:It.proWarp},de.createElement("div",{className:It.pro},de.createElement("div",{style:{width:Hr}})),de.createElement("span",null,Hr||0,"%")),de.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),de.createElement("div",{className:It.tip},de.createElement(tn.Z,{getPopupContainer:mi=>mi.parentNode,title:de.createElement("div",null,de.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",de.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),de.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),de.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},de.createElement("img",{src:Fr,alt:""})))),br=Hr=>de.createElement("div",{className:It.mainSucceed},de.createElement("img",{src:On,alt:""}),de.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),de.createElement("div",{className:It.tip},de.createElement(tn.Z,{getPopupContainer:mi=>mi.parentNode,title:de.createElement("div",null,de.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",de.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),de.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),de.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},de.createElement("img",{src:Fr,alt:""}))),de.createElement("div",{className:It.del,onClick:()=>bi(Hr.name,Hr.loaded==100)},de.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Zi=()=>{var Hr;return de.createElement(de.Fragment,null,(Hr=Dr.videoList)==null?void 0:Hr.map((mi,Or)=>de.createElement(de.Fragment,{key:Or},mi.loaded==100?br(mi):Po(mi.loaded))))},si=()=>{ue.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:mt})},kr=(Nn=Dr.videoList)==null?void 0:Nn.length;return de.createElement("div",{className:It.listForm},de.createElement("header",null,$n?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),de.createElement("section",{className:It.scroll,id:"sss"},de.createElement("div",{className:It.formWrap}," ",de.createElement(Ue.default,{form:Tn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Wi,onFinish:ri},de.createElement(Ue.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},de.createElement(We.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((pn=kn.name)==null?void 0:pn.length)||0}/60`})),de.createElement(Ue.default.Item,{name:"content",label:"\u5185\u5BB9:"},de.createElement(Bn.Z,{defaultValue:kn.content||"",watch:!0})))),de.createElement("div",{className:It.upload},kr?Zi():Ri(),de.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Bi,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),de.createElement("div",{className:It.btns},de.createElement(Ze.ZP,{onClick:si,type:"primary",ghost:!0},"\u5173\u95ED"),de.createElement(Ze.ZP,{loading:Br,disabled:nr,onClick:()=>Tn.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},di={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},po=we(458),ao=Object.defineProperty,to=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,Ii=Object.prototype.propertyIsEnumerable,Ti=(mt,xt,kt)=>xt in mt?ao(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Ni=(mt,xt)=>{for(var kt in xt||(xt={}))mo.call(xt,kt)&&Ti(mt,kt,xt[kt]);if(to)for(var kt of to(xt))Ii.call(xt,kt)&&Ti(mt,kt,xt[kt]);return mt};const vo=mt=>React.createElement("svg",Ni({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var Fi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Gi=Object.defineProperty,ji=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable,Gr=(mt,xt,kt)=>xt in mt?Gi(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Xr=(mt,xt)=>{for(var kt in xt||(xt={}))xr.call(xt,kt)&&Gr(mt,kt,xt[kt]);if(ji)for(var kt of ji(xt))Kr.call(xt,kt)&&Gr(mt,kt,xt[kt]);return mt};const xi=mt=>React.createElement("svg",Xr({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var Oi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",Ao=Object.defineProperty,Yi=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,no=(mt,xt,kt)=>xt in mt?Ao(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Io=(mt,xt)=>{for(var kt in xt||(xt={}))Xi.call(xt,kt)&&no(mt,kt,xt[kt]);if(Yi)for(var kt of Yi(xt))ui.call(xt,kt)&&no(mt,kt,xt[kt]);return mt};const Ui=mt=>React.createElement("svg",Io({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},mt),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Ho="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Co={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},Oo=we(77019),Ki=we(5269),Wo={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},za=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())});const Yo=({id:mt,cb:xt})=>{const[kt,$n]=(0,de.useState)("");return de.createElement("aside",{className:"mt10"},de.createElement(Bn.Z,{defaultValue:kt,id:"writeForumsReviewId",onChange:Nn=>{$n(Nn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),de.createElement(Oo.Z,null,de.createElement(Ki.Z,{flex:"1"}),de.createElement(Ki.Z,null,de.createElement(Ze.ZP,{type:"primary",size:"middle",onClick:()=>za(void 0,null,function*(){kt===""?re.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):xt(mt,kt)})},"\u53D1\u9001"))))},la=({data:mt})=>{var xt;return de.createElement("div",{className:Wo.thirdlyLevelDiscuss},de.createElement("span",{className:"c-grey-333"},de.createElement("span",{className:"font 14 c-light-primary"},(xt=mt==null?void 0:mt.author)==null?void 0:xt.name),"@",de.createElement("span",{className:"font 14 c-light-primary"},mt==null?void 0:mt.parent_name),":"),de.createElement(Te.Z,{value:mt==null?void 0:mt.content}))},Zo=({data:mt,onReplyDiscuss:xt,thirdlyReply:kt,setThirdlyReply:$n})=>{var Nn,pn,Tn,kn;const Pn=(0,Vn.eY)();return console.log(Pn,"user"),de.createElement("div",{className:Wo.list},de.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((Nn=mt==null?void 0:mt.author)==null?void 0:Nn.image_url)}),de.createElement("div",{className:Wo.wrap},de.createElement("div",{className:"font14",style:{marginBottom:6}},de.createElement("span",{className:"c-grey-333"},(pn=mt==null?void 0:mt.author)==null?void 0:pn.name),(Pn==null?void 0:Pn.login)!==((Tn=mt==null?void 0:mt.author)==null?void 0:Tn.login)&&de.createElement("span",{onClick:()=>$n(mt==null?void 0:mt.id),className:"c-grey-999 current",style:{float:"right"}},de.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),de.createElement("span",null,"\u56DE\u590D"))),de.createElement(Te.Z,{value:mt==null?void 0:mt.content}),(kn=mt==null?void 0:mt.children)==null?void 0:kn.map(nr=>de.createElement(la,{key:nr.id,data:nr})),kt===(mt==null?void 0:mt.id)&&de.createElement("div",null,de.createElement(Yo,{id:mt==null?void 0:mt.id,cb:xt}),de.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>$n(null),className:"c-light-primary current"},de.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),de.createElement("div",{className:Wo.line})))};var qa=({data:mt,onReplyDiscuss:xt,secondReply:kt,setSecondReply:$n,thirdlyReply:Nn,setThirdlyReply:pn,onPlusDiscuss:Tn})=>{var kn,Pn,nr,ci;const[Br,gi]=(0,de.useState)(!1);return console.log(mt,"data"),de.createElement("div",{className:Wo.discussItem},de.createElement("div",{className:Wo.list},de.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((kn=mt==null?void 0:mt.author)==null?void 0:kn.image_url)}),de.createElement("div",{className:Wo.wrap},de.createElement("div",{className:"font14",style:{marginBottom:6}},de.createElement("span",{className:"c-grey-333 mr30"},(Pn=mt==null?void 0:mt.author)==null?void 0:Pn.name),de.createElement("span",{className:"c-grey-999"},mt==null?void 0:mt.time)),de.createElement(Te.Z,{value:mt==null?void 0:mt.content}),de.createElement("div",{className:Wo.btns},de.createElement("div",{onClick:()=>Tn(mt==null?void 0:mt.id),className:mt!=null&&mt.user_praise?"c-light-primary":"c-grey-999"},de.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),de.createElement("span",null,mt==null?void 0:mt.praise_count)),de.createElement("div",{onClick:()=>{var Dr;((Dr=mt==null?void 0:mt.children)==null?void 0:Dr.length)!==0&&($n(null),gi(!Br))},style:{color:Br?"#0152d9":"#999999"}},de.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),de.createElement("span",null,Br?"\u6536\u8D77\u8BC4\u8BBA":(nr=mt==null?void 0:mt.children)==null?void 0:nr.length)),de.createElement("div",{onClick:()=>{gi(!1),$n(kt===(mt==null?void 0:mt.id)?null:mt==null?void 0:mt.id)},style:{color:kt===(mt==null?void 0:mt.id)?"#0152d9":"#999999"}},de.createElement("i",{className:"iconfont icon-huifu3 mr3"}),de.createElement("span",null,kt===(mt==null?void 0:mt.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),kt===(mt==null?void 0:mt.id)&&de.createElement(Yo,{id:mt==null?void 0:mt.id,cb:(Dr,yi)=>{xt(Dr,yi),gi(!0)}}),Br&&de.createElement("div",{className:Wo.secondLevelDiscuss},(ci=mt==null?void 0:mt.children)==null?void 0:ci.map(Dr=>de.createElement(Zo,{thirdlyReply:Nn,setThirdlyReply:pn,key:Dr.id,data:Dr,onReplyDiscuss:xt}))))))},ba=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())}),Ma=({identifier:mt,active:xt,onOk:kt})=>{const[$n,Nn]=(0,de.useState)(""),[pn,Tn]=(0,de.useState)(1),[kn,Pn]=(0,de.useState)([]),[nr,ci]=(0,de.useState)(0),[Br,gi]=(0,de.useState)(null),[Dr,yi]=(0,de.useState)(null);(0,de.useEffect)(()=>{zr(1),Tn(1)},[xt]);const zr=ri=>ba(void 0,null,function*(){const Di=yield At({container_type:"QuestionSolutionArticle",container_identifier:xt,limit:5,page:ri});Di!=null&&Di.comments&&(Pn((Di==null?void 0:Di.comments)||[]),Tn(ri),ci(Di==null?void 0:Di.disscuss_count))}),zi=()=>ba(void 0,null,function*(){if($n===""){re.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const ri=yield bn({comments:{content:$n},container_type:"QuestionSolutionArticle",container_identifier:xt});ri!=null&&ri.discuss&&(Nn(""),zr(pn),kt())}),ni=(ri,Di,or)=>ba(void 0,null,function*(){const Bi=yield on({container_type:"QuestionSolutionArticle",container_identifier:xt,comments:{content:Di,parent_id:ri}});gi(null),yi(null),zr(pn)}),Ei=ri=>ba(void 0,null,function*(){const Di=yield Wt(ri);zr(pn)}),Wi=ri=>{Tn(ri),zr(ri)};return de.createElement("div",{className:Co.discuss},de.createElement("aside",{className:Co.reply,style:{borderWidth:nr?1:0}},de.createElement(Bn.Z,{defaultValue:$n,id:"writeForumsReviewId",onChange:ri=>{Nn(ri)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),de.createElement(Oo.Z,null,de.createElement(Ki.Z,{flex:"1"}),de.createElement(Ki.Z,null,de.createElement(Ze.ZP,{type:"primary",size:"middle",onClick:()=>zi()},"\u53D1\u9001")))),kn==null?void 0:kn.map(ri=>de.createElement(qa,{secondReply:Br,setSecondReply:gi,thirdlyReply:Dr,setThirdlyReply:yi,key:ri.id,data:ri,onReplyDiscuss:ni,onPlusDiscuss:Ei})),de.createElement(gt.Z,{className:Co.pagination,showTotal:ri=>de.createElement("span",{style:{color:"#656F87"}},"\u5171",de.createElement("span",{className:"c-light-primary"},ri),"\u6761\u6570\u636E"),current:pn,onChange:Wi,total:nr,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Ha=we(44080),Ra=Object.defineProperty,pa=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Ja=Object.prototype.propertyIsEnumerable,Sa=(mt,xt,kt)=>xt in mt?Ra(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,wa=(mt,xt)=>{for(var kt in xt||(xt={}))Wa.call(xt,kt)&&Sa(mt,kt,xt[kt]);if(pa)for(var kt of pa(xt))Ja.call(xt,kt)&&Sa(mt,kt,xt[kt]);return mt},ua=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())}),qi=({active:mt,identifier:xt,onAssist:kt,onEdit:$n,onArticlesSkip:Nn,onClose:pn,onOk:Tn,onDelete:kn,detailsIndex:Pn,btnShowStatus:nr})=>{var ci,Br,gi,Dr,yi,zr,zi,ni,Ei,Wi;const[ri,Di]=(0,de.useState)(!0),[or,Bi]=(0,de.useState)({});(0,de.useEffect)(()=>{mt&&bi()},[mt,Pn]);const bi=(si=!0)=>ua(void 0,null,function*(){si&&Di(!0);const kr=yield(0,E.wO)(xt,{active:mt});(kr==null?void 0:kr.status)===0&&Bi((kr==null?void 0:kr.data)||{}),Di(!1)}),Ri=si=>ua(void 0,null,function*(){const kr=yield(0,E.qe)(xt,wa({active:mt},si));(kr==null?void 0:kr.status)===0&&(bi(!1),Tn())}),Po=si=>ua(void 0,null,function*(){(yield(0,E.Rg)(xt,{active:si==null?void 0:si.id})).status===0&&(bi(!1),Tn())}),br=si=>{ue.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>kn(si)})},Zi=()=>{bi(!1),Tn()};return de.createElement("div",{className:di.listDetails},de.createElement(po.Z,{className:"pt20 pl20 pr20",loading:ri,active:!0,paragraph:{rows:5}},de.createElement("div",{className:di.head},de.createElement("div",{className:di.name},de.createElement("div",{title:or==null?void 0:or.name,className:di.title},or==null?void 0:or.name),(or==null?void 0:or.is_authority)&&de.createElement("div",{className:di.b},"\u5B98\u65B9"),(or==null?void 0:or.is_excellent)&&de.createElement("div",{className:di.a},"\u7CBE\u9009")),de.createElement("div",{className:di.tag},de.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(or==null?void 0:or.image_url)}),de.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},or==null?void 0:or.username),de.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",nt()(or==null?void 0:or.created_at).format("YYYY-MM-DD")),de.createElement("span",null,de.createElement("img",{src:Xt}),de.createElement("span",null,or==null?void 0:or.praises_count)),de.createElement("span",null,de.createElement("img",{src:Si}),de.createElement("span",null,or==null?void 0:or.discusses_count)),de.createElement("span",null,de.createElement("img",{src:Jr}),de.createElement("span",null,or==null?void 0:or.viewed_count)),de.createElement("div",{className:di.btn},((0,Vn.Ny)()||(or==null?void 0:or.is_self))&&de.createElement(de.Fragment,null,de.createElement(Ze.ZP,{onClick:()=>br(or),type:"primary",ghost:!0},"\u5220\u9664"),de.createElement(Ze.ZP,{onClick:()=>$n(or),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Vn.Ny)()&&de.createElement(Ze.ZP,{onClick:()=>Ri({is_authority:!(or!=null&&or.is_authority)}),type:"primary"},de.createElement("img",{src:Oi}),or!=null&&or.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Vn.Ny)()&&de.createElement(Ze.ZP,{onClick:()=>Ri({is_excellent:!(or!=null&&or.is_excellent)}),type:"primary"},de.createElement("img",{src:Fi}),or!=null&&or.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),de.createElement("div",{className:di.scroll},((Br=(ci=or==null?void 0:or.videos)==null?void 0:ci[0])==null?void 0:Br.id)&&de.createElement("div",{className:di.video},de.createElement(ee.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Dr=(gi=or==null?void 0:or.videos)==null?void 0:gi[0])!=null&&Dr.transcoded)},de.createElement(Ha.Z,{poster:(zr=(yi=or==null?void 0:or.videos)==null?void 0:yi[0])==null?void 0:zr.cover_url,src:((ni=(zi=or==null?void 0:or.videos)==null?void 0:zi[0])==null?void 0:ni.play_url)||"",videoId:(Wi=(Ei=or==null?void 0:or.videos)==null?void 0:Ei[0])==null?void 0:Wi.id,logWatchHistory:()=>{}}))),de.createElement(Te.Z,{className:di.html,value:(or==null?void 0:or.content)||""}),de.createElement("div",{onClick:()=>Po(or),className:di.g},de.createElement("img",{className:"mr10",src:(or!=null&&or.user_liker,Ho)}),de.createElement("span",null,or==null?void 0:or.praises_count)),de.createElement(Ma,{onOk:Zi,active:mt,identifier:xt})),de.createElement("div",{className:di.btns},de.createElement(Ze.ZP,{onClick:()=>pn(),type:"primary",ghost:!0},"\u5173\u95ED"),nr[0]&&de.createElement(Ze.ZP,{onClick:si=>Nn(si,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),nr[1]&&de.createElement(Ze.ZP,{onClick:si=>Nn(si,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},vi=Object.defineProperty,ai=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,Ji=Object.prototype.propertyIsEnumerable,io=(mt,xt,kt)=>xt in mt?vi(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,co=(mt,xt)=>{for(var kt in xt||(xt={}))ro.call(xt,kt)&&io(mt,kt,xt[kt]);if(ai)for(var kt of ai(xt))Ji.call(xt,kt)&&io(mt,kt,xt[kt]);return mt};const na=mt=>React.createElement("svg",co({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},mt),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var Go="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",ca=we(59477),Qi=we(89489),yo=Object.defineProperty,Fo=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,Ia=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,da=(mt,xt,kt)=>xt in mt?yo(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,_o=(mt,xt)=>{for(var kt in xt||(xt={}))ds.call(xt,kt)&&da(mt,kt,xt[kt]);if(Ia)for(var kt of Ia(xt))fs.call(xt,kt)&&da(mt,kt,xt[kt]);return mt},Eo=(mt,xt)=>Fo(mt,Xo(xt)),ko=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())}),Qa=({identifier:mt,tabStatus:xt,setFilterListTotal:kt,setListStatus:$n})=>{const Nn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[pn,Tn]=(0,de.useState)(_o({},Nn));const[kn,Pn]=(0,de.useState)(!1),[nr,ci]=(0,de.useState)(0),[Br,gi]=(0,de.useState)(1),[Dr,yi]=(0,de.useState)(null),[zr,zi]=(0,de.useState)([]),[ni,Ei]=(0,de.useState)([!0,!0]),[Wi,ri]=(0,de.useState)(0),Di=(0,de.useRef)(null);(0,de.useEffect)(()=>{Hr()},[xt]),(0,de.useEffect)(()=>{or()},[Dr]),(0,de.useEffect)(()=>{bi(_o({},Nn)),Hr()},[mt]),(0,de.useEffect)(()=>(window.addEventListener("resize",Bi),$n(Wi),()=>{window.removeEventListener("resize",Bi)}),[Wi]);const or=()=>ko(void 0,null,function*(){if(!Dr){Ei([!0,!0]);return}const ii=[!0,!0],Ai=zr==null?void 0:zr.findIndex(oo=>oo.id===Dr);Ai===0&&pn.page===1&&(ii[0]=!1),(pn.page-1)*pn.limit+(Ai+1)===pn.total&&(ii[1]=!1),Ei(ii)}),Bi=()=>{var ii;if(Wi){const Ai=window.innerWidth-((ii=Di.current)==null?void 0:ii.clientWidth);ci(Ai)}},bi=ii=>ko(void 0,null,function*(){var Ai,oo,Ba;Pn(!0);const jo=yield(0,E.WH)(mt,ii);return(jo==null?void 0:jo.status)===0&&(zi(((Ai=jo==null?void 0:jo.data)==null?void 0:Ai.articles)||[]),Tn(Eo(_o({},ii),{total:(oo=jo==null?void 0:jo.data)==null?void 0:oo.articles_count})),kt((Ba=jo==null?void 0:jo.data)==null?void 0:Ba.articles_count)),Pn(!1),jo}),Ri=()=>{(pn==null?void 0:pn.sort_direction)===null?pn.sort_direction="asc":(pn==null?void 0:pn.sort_direction)==="asc"?pn.sort_direction="desc":(pn==null?void 0:pn.sort_direction)==="desc"&&(pn.sort_direction=null),pn.page=1,Hr(),Tn(_o({},pn)),bi(pn)},Po=()=>{pn.page=1,pn.search=pn==null?void 0:pn.save_search,Hr(),Tn(_o({},pn)),bi(pn)},br=()=>{var ii;const Ai=document.getElementsByClassName("btn-resize");Ai[0].style.visibility="hidden";const oo=window.innerWidth-((ii=Di.current)==null?void 0:ii.clientWidth);ci(oo)},Zi=()=>{br(),ri(1)},si=ii=>{br(),yi(ii==null?void 0:ii.id),ri(3)},kr=ii=>{br(),yi(ii==null?void 0:ii.id),ri(2)},Hr=()=>{const ii=document.getElementsByClassName("btn-resize");ii[0].style.visibility="visible",ci(0),ri(0),yi(null)},mi=ii=>{ri(3),yi(ii),pn.page=1,Tn(_o({},pn)),bi(pn)},Or=ii=>{ri(3),yi(ii),Tn(_o({},pn)),bi(pn)},qo=ii=>{Tn(_o({},pn)),bi(pn)},so=ii=>ko(void 0,null,function*(){(yield(0,E.Rg)(mt,{active:ii==null?void 0:ii.id})).status===0&&(bi(pn),gi(Br+1))}),oa=ii=>ko(void 0,null,function*(){(yield(0,E.rL)(mt,{active:ii==null?void 0:ii.id})).status===0&&(bi(pn),gi(Br+1))}),os=ii=>ko(void 0,null,function*(){(yield(0,E.de)(mt,{active:ii==null?void 0:ii.id})).status===0&&(Hr(),bi(pn))}),aa=ii=>{pn.page=ii,Tn(_o({},pn)),bi(pn)},ga=(ii,Ai)=>ko(void 0,null,function*(){var oo,Ba,jo,Cs;const Jo=zr==null?void 0:zr.findIndex(lo=>lo.id===Dr);if(console.log(Jo,Ai,22),Ai==="prev"){if(Jo===void 0){re.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo===0){if(pn.page===1){re.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(pn.page!==1){pn.page=pn.page-1,Tn(_o({},pn));const lo=yield bi(pn);if((lo==null?void 0:lo.status)===0){const Fa=(jo=lo==null?void 0:lo.data)==null?void 0:jo.articles[((Ba=(oo=lo==null?void 0:lo.data)==null?void 0:oo.articles)==null?void 0:Ba.length)-1];yi(Fa==null?void 0:Fa.id),console.log(ii.target,555)}}}else{const lo=zr[Jo-1];yi(lo==null?void 0:lo.id)}}if(Ai==="next"){if(Jo===void 0){re.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((pn.page-1)*pn.limit+(Jo+1)===pn.total){re.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo+1===pn.limit){pn.page=pn.page+1,Tn(_o({},pn));const lo=yield bi(pn);if((lo==null?void 0:lo.status)===0){const Fa=(Cs=lo==null?void 0:lo.data)==null?void 0:Cs.articles[0];yi(Fa==null?void 0:Fa.id)}}else{const lo=zr[Jo+1];yi(lo==null?void 0:lo.id)}}});return de.createElement("div",{className:Mt.wrap,ref:Di},de.createElement("div",{className:Mt.head},de.createElement("div",{className:Mt.sort,onClick:Ri},de.createElement("span",null,"\u6700\u65B0"),de.createElement("aside",null,de.createElement(ca.Z,{style:{color:(pn==null?void 0:pn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),de.createElement(Qi.Z,{style:{color:(pn==null?void 0:pn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),de.createElement(We.default.Search,{value:pn.save_search,className:Mt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:ii=>{pn.save_search=ii.target.value,Tn(_o({},pn))},onSearch:Po}),de.createElement("div",{onClick:Zi,className:Mt.btn},de.createElement("img",{src:Go}),"\u5199\u9898\u89E3")),de.createElement("div",{className:Mt.listWarp},de.createElement(ee.Z,{spinning:kn,className:"mt20"},zr==null?void 0:zr.map((ii,Ai)=>{let oo=!0;return Ai+1===zr.length&&Ai!==0&&(oo=!1),de.createElement(Hi,{active:Dr,key:ii.id,data:ii,showLine:oo,onClick:si,onAssist:so,onHide:oa})}),(zr==null?void 0:zr.length)===0&&de.createElement(wt.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),de.createElement(gt.Z,{className:Mt.pagination,showTotal:ii=>de.createElement("span",{style:{color:"#656F87"}},"\u5171",de.createElement("span",{className:"c-light-primary"},ii),"\u6761\u6570\u636E"),total:pn.total,showSizeChanger:!1,current:pn==null?void 0:pn.page,onChange:aa,hideOnSinglePage:!0,showQuickJumper:!0}),Wi>0&&de.createElement("div",{className:Mt.fixedRight,style:{width:nr}},Wi===1&&de.createElement(ti,{identifier:mt,onClose:Hr,onOk:mi}),Wi===2&&de.createElement(ti,{active:Dr,identifier:mt,onClose:Hr,onOk:Or}),Wi===3&&de.createElement(qi,{btnShowStatus:ni,onArticlesSkip:ga,detailsIndex:Br,active:Dr,identifier:mt,onClose:Hr,onOk:qo,onEdit:kr,onAssist:so,onDelete:os})))},xa={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},_s=Object.defineProperty,Oa=Object.defineProperties,bs=Object.getOwnPropertyDescriptors,$a=Object.getOwnPropertySymbols,Ca=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable,es=(mt,xt,kt)=>xt in mt?_s(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,ra=(mt,xt)=>{for(var kt in xt||(xt={}))Ca.call(xt,kt)&&es(mt,kt,xt[kt]);if($a)for(var kt of $a(xt))Ss.call(xt,kt)&&es(mt,kt,xt[kt]);return mt},Za=(mt,xt)=>Oa(mt,bs(xt)),Ea=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())}),ts=({visible:mt,onVisible:xt,value:kt,onChange:$n,setIndex:Nn})=>{var pn;const Tn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[kn,Pn]=(0,de.useState)(Tn);const[nr,ci]=(0,de.useState)([]),[Br,gi]=(0,de.useState)([]),[Dr,yi]=(0,de.useState)(!1),zr=(0,de.useRef)([]),zi=(0,de.useRef)(null),ni=(0,ce.useParams)();(0,de.useEffect)(()=>(ni!=null&&ni.id&&(zi.current=setInterval(()=>{Ei(30)},3e4)),()=>{clearInterval(zi.current)}),[]);const Ei=br=>Ea(void 0,null,function*(){const Zi=yield(0,E.uc)(ni==null?void 0:ni.id,{practice_time:br})});(0,de.useEffect)(()=>{bi(kn),or()},[]),(0,de.useEffect)(()=>(window.addEventListener("click",ri),()=>{window.removeEventListener("click",ri)}),[ni==null?void 0:ni.save_identifier,mt]),(0,de.useEffect)(()=>{const br=zr.current.findIndex(mi=>mi.identifier===(ni==null?void 0:ni.save_identifier)),Zi=zr.current[br-1],si=zr.current[br+1],kr=document.getElementById("oj-prev"),Hr=document.getElementById("oj-next");Zi?kr.style.display="block":kr.style.display="none",si?Hr.style.display="block":Hr.style.display="none"},[ni==null?void 0:ni.save_identifier,zr.current]);const Wi=(br,Zi)=>{if(br.id===Zi)return br;for(let si=0,kr=br;kr=kr.parentNode;si++){if(kr.id===Zi)return kr;if(kr==document.documentElement)return!1}},ri=br=>Ea(void 0,null,function*(){!Wi(br.target,"oj-drawer")&&mt&&xt(!1);const Zi=zr.current.findIndex(Hr=>Hr.identifier===(ni==null?void 0:ni.save_identifier)),si=zr.current[Zi-1],kr=zr.current[Zi+1];if(br.target.id==="oj-prev"){if(!si||Zi===-1){re.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}br.target.style.pointerEvents="none",br.target.style.cursor="not-allowed",yield Ri(si==null?void 0:si.identifier),Nn("0"),setTimeout(()=>{br.target.style.pointerEvents="auto",br.target.style.cursor="pointer"},400)}if(br.target.id==="oj-next"||br.target.id==="oj-modal-next"){if(!kr||Zi===-1){re.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}br.target.style.pointerEvents="none",br.target.style.cursor="not-allowed",yield Ri(kr==null?void 0:kr.identifier),Nn("0"),setTimeout(()=>{br.target.style.pointerEvents="auto",br.target.style.cursor="pointer"},400)}});(0,de.useEffect)(()=>{$n(ni==null?void 0:ni.save_identifier);const br=Br.findIndex(Zi=>Zi.some(si=>si.identifier===(ni==null?void 0:ni.save_identifier)));Pn(br===-1?Za(ra({},kn),{page:1}):Za(ra({},kn),{page:br+1}))},[ni==null?void 0:ni.save_identifier,Br]);const Di=br=>{kn.page=1,kn.tag_discipline_id=br,Pn(ra({},kn)),bi(kn)},or=()=>Ea(void 0,null,function*(){const br=yield(0,Ht.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ci(br.tag_disciplines||[])}),Bi=br=>{kn.page=1,kn.difficulty=typeof br=="number"?br:null,Pn(ra({},kn)),bi(kn)},bi=br=>Ea(void 0,null,function*(){var Zi,si;yi(!0);const kr=yield(0,E.KC)(br);if(kr!=null&&kr.practices_list){for(var Hr=(Zi=kr==null?void 0:kr.practices_list)==null?void 0:Zi.length,mi=[],Or=0;Or<Hr;Or+=kn==null?void 0:kn.per_page)mi.push((si=kr==null?void 0:kr.practices_list)==null?void 0:si.slice(Or,Or+(kn==null?void 0:kn.per_page)));Pn(Za(ra({},kn),{total:kr==null?void 0:kr.practices_count})),zr.current=(kr==null?void 0:kr.practices_list)||[],gi(mi)}yi(!1)}),Ri=(br,Zi)=>Ea(void 0,null,function*(){const si=yield(0,Ht.ZP)(`/api/practices/${br}/start`,{method:"get"});(si==null?void 0:si.status)===0&&ce.history.push(`/problems/${si==null?void 0:si.identifier}/oj/${br}`)}),Po=br=>{kn.page=br,Pn(ra({},kn))};return de.createElement("div",{className:xa.wrap,id:"oj-drawer",style:{left:mt?0:-700}},de.createElement("div",{className:xa.head},de.createElement("div",{className:xa.title},"\u9898\u76EE\u5217\u8868"),de.createElement(We.default.Search,{value:kn==null?void 0:kn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:br=>{kn.save_search=br.target.value,Pn(ra({},kn))},onSearch:()=>{kn.page=1,kn.search=kn.save_search,Pn(ra({},kn)),bi(kn)}}),de.createElement(te.default,{value:kn==null?void 0:kn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:br=>br.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Di},nr.map(br=>de.createElement(te.default.Option,{key:br.id,value:br.id},br.name))),de.createElement(te.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:br=>br.parentNode,value:kn==null?void 0:kn.difficulty,onChange:Bi},de.createElement(te.default.Option,{value:1},"\u7B80\u5355"),de.createElement(te.default.Option,{value:2},"\u9002\u4E2D"),de.createElement(te.default.Option,{value:3},"\u56F0\u96BE"))),de.createElement("div",{className:xa.content},de.createElement(ee.Z,{spinning:Dr},(pn=Br==null?void 0:Br[kn.page-1])==null?void 0:pn.map(br=>de.createElement("div",{key:br.identifier,className:xa.list,onClick:Zi=>Ri(br.identifier,Zi)},de.createElement("i",{style:{visibility:kt===br.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),de.createElement("span",{style:{fontWeight:kt===br.identifier?"bold":400,color:kt===br.identifier?"#ffffff":"#bac4cd"},title:br==null?void 0:br.name},br.name),(br==null?void 0:br.difficulty)===1&&de.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(br==null?void 0:br.difficulty)===2&&de.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(br==null?void 0:br.difficulty)===3&&de.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),de.createElement("div",{className:xa.footer},de.createElement(gt.Z,{showTotal:br=>de.createElement("span",{style:{color:"#656F87"}},"\u5171",de.createElement("span",{className:"c-light-primary"},br),"\u6761\u6570\u636E"),total:kn.total,pageSize:kn==null?void 0:kn.per_page,current:kn==null?void 0:kn.page,showSizeChanger:!1,onChange:Po,showQuickJumper:!0,hideOnSinglePage:!0})))},hs=({hack:mt,onTriggerPraise:xt,topicId:kt,page:$n,onPageChange:Nn,user:pn,submitRecords:Tn,submitting:kn,submitResult:Pn})=>{const[nr]=(0,ce.useSearchParams)(),ci=(0,ce.useLocation)(),[Br,gi]=(0,de.useState)(nr.get("tab")||"0"),[Dr,yi]=(0,de.useState)(0),[zr,zi]=(0,de.useState)(0),[ni,Ei]=(0,de.useState)(0),[Wi,ri]=(0,de.useState)(),[Di,or]=(0,de.useState)(!1);function Bi(Ri){const Po=Ri.target.id;if(Br==="3"&&Po!==Br&&(zr===1||zr===2)){ue.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{gi(Po)}});return}gi(Po)}(0,de.useEffect)(()=>_e.Z.subscribe("to-commit-info",()=>{gi("1")}),[]);function bi(){gi("2")}return de.createElement("div",{className:pt["left-panel"]},de.createElement("ul",{className:`${pt["s-navs"]} ${pt["bg-white"]} ${pt.b1}`},de.createElement("li",{className:"mr40 current"},de.createElement("img",{onClick:()=>or(!0),src:ut})),de.createElement("li",{className:pt["oj-mr"]},de.createElement("a",{className:Br==="0"?pt.active:"",id:"0",onClick:Bi},"\u4EFB\u52A1\u63CF\u8FF0")),de.createElement("li",{className:pt["oj-mr"]},de.createElement("a",{className:Br==="3"?pt.active:"",id:"3",onClick:Bi},"\u9898\u89E3",ni?`(${ni})`:"")),de.createElement("li",{className:pt["oj-mr"]},de.createElement("a",{className:Br==="2"?pt.active:"",id:"2",onClick:Bi},"\u8BC4\u8BBA",Dr?`(${Dr})`:"")),de.createElement("li",null,de.createElement("a",{className:Br==="1"?pt.active:"",id:"1",onClick:Bi},"\u63D0\u4EA4\u8BB0\u5F55"))),de.createElement("div",{className:`${pt["tab-panel-body"]} ${Br==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},de.createElement(le,{hack:mt,onTriggerPraise:xt,toDiscuss:bi})),de.createElement("div",{className:`${pt["tab-panel-body"]} ${Br==="1"?"":"hide"}`},Tn!=null&&Tn.records_count?de.createElement(ft,{page:$n,onPageChange:Nn,topicId:kt,submitting:kn,submitRecords:Tn,submitResult:Pn}):de.createElement(wt.Z,null)),de.createElement("div",{className:`${pt["tab-panel-body"]} ${Br==="2"?"":"hide"}`,style:{padding:0}},de.createElement(Ft,{setDiscussTotal:yi,user:pn,identifier:mt.identifier,hack:mt,onTriggerPraise:xt})),de.createElement("div",{className:`${pt["tab-panel-body"]} ${Br==="3"?"":"hide"}`,style:{padding:0}},de.createElement(Qa,{setListStatus:zi,setFilterListTotal:Ei,tabStatus:Br,identifier:mt.identifier})),de.createElement(ts,{visible:Di,setIndex:gi,onVisible:Ri=>or(Ri),value:Wi,onChange:Ri=>ri(Ri)}))},ka=we(22744),ps=we(62522),ms=we(81747),ws=we(51976),ns=we(89392),rs=we.n(ns),La=we(56102),Ur=we(59301),xs=Object.defineProperty,Na=Object.defineProperties,vs=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,hi=(mt,xt,kt)=>xt in mt?xs(mt,xt,{enumerable:!0,configurable:!0,writable:!0,value:kt}):mt[xt]=kt,Cr=(mt,xt)=>{for(var kt in xt||(xt={}))is.call(xt,kt)&&hi(mt,kt,xt[kt]);if(ia)for(var kt of ia(xt))ma.call(xt,kt)&&hi(mt,kt,xt[kt]);return mt},Ci=(mt,xt)=>Na(mt,vs(xt)),So=(mt,xt)=>{var kt={};for(var $n in mt)is.call(mt,$n)&&xt.indexOf($n)<0&&(kt[$n]=mt[$n]);if(mt!=null&&ia)for(var $n of ia(mt))xt.indexOf($n)<0&&ma.call(mt,$n)&&(kt[$n]=mt[$n]);return kt},Pi=(mt,xt,kt)=>new Promise(($n,Nn)=>{var pn=Pn=>{try{kn(kt.next(Pn))}catch(nr){Nn(nr)}},Tn=Pn=>{try{kn(kt.throw(Pn))}catch(nr){Nn(nr)}},kn=Pn=>Pn.done?$n(Pn.value):Promise.resolve(Pn.value).then(pn,Tn);kn((kt=kt.apply(mt,xt)).next())});const{Countdown:Pa}=se.default,va={Java:"java",C:"c",Python:"py","C++":"c"};var Aa=(mt=>(mt[mt.SET_LOADING=0]="SET_LOADING",mt[mt.GET_DATA=1]="GET_DATA",mt[mt.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",mt[mt.SET_DATA=3]="SET_DATA",mt[mt.SET_DEBUGING=4]="SET_DEBUGING",mt[mt.SET_SUBMITING=5]="SET_SUBMITING",mt[mt.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",mt[mt.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",mt[mt.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",mt[mt.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",mt[mt.SET_PAGE=10]="SET_PAGE",mt[mt.GET_LANGUAGE=11]="GET_LANGUAGE",mt[mt.GET_DRAWER=12]="GET_DRAWER",mt))(Aa||{});function No(){return new Date().getTime()}const fa={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function sl(mt,xt){switch(xt.type){case 1:return Cr(Cr({},mt),xt.payload);case 3:return Ci(Cr({},mt),{data:xt.payload});case 0:return Ci(Cr({},mt),{loading:xt.payload});case 11:return Ci(Cr({},mt),{languageList:xt.payload});case 12:return Ci(Cr({},mt),{drawerData:xt.payload});case 9:return Ci(Cr({},mt),{showNote:xt.payload});case 4:return Ci(Cr({},mt),{debuging:xt.payload});case 5:return Ci(Cr({},mt),{submitting:xt.payload});case 2:return Ci(Cr({},mt),{submitRecords:xt.payload});case 10:return Ci(Cr({},mt),{submitRecordPage:xt.payload});case 6:return Ci(Cr({},mt),{executingMessage:xt.payload});case 7:return Cr(Cr({},mt),xt.payload);case 8:return Cr(Cr({},mt),xt.payload);default:throw new Error}}var ll=({children:mt})=>{var xt,kt,$n,Nn;const[pn,Tn]=(0,de.useReducer)(sl,fa),{id:kn}=(0,ce.useParams)(),Pn=(0,ce.useLocation)(),[nr]=(0,ce.useSearchParams)(),{languageValue:ci,languageList:Br,loading:gi,data:Dr,debugResult:yi,submitResult:zr,submitRecords:zi,submitRecordPage:ni,showNote:Ei,debuging:Wi,submitting:ri,executingMessage:Di}=pn,[or,Bi]=(0,de.useState)("#FFF"),[bi,Ri]=(0,de.useState)(null),[Po,br]=(0,de.useState)({}),[Zi,si]=(0,de.useState)(!1),kr=(0,de.useRef)(null),Hr=(0,de.useRef)(null),mi=Dr==null?void 0:Dr.user,Or=Dr==null?void 0:Dr.hack;(0,de.useEffect)(()=>((0,ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,ce.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,ce.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,de.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,de.useEffect)(()=>{var fi;if(Zi){const $i=document.getElementById("oj-next"),Do=document.getElementById("oj-modal-next");((fi=$i==null?void 0:$i.style)==null?void 0:fi.display)==="none"?Do.style.display="none":Do.style.display="block"}},[Zi]),(0,de.useEffect)(()=>{function fi(){return Pi(this,null,function*(){var $i,Do,ya;const fo=yield(0,E.fu)(kn);if(fo.status===401)document.location.href="/user/login";else{fo.hack=fo.practice,fo.hack.code=rt.Base64.decode(($i=fo==null?void 0:fo.hack)==null?void 0:$i.code);const _a=`${mi==null?void 0:mi.login}-language`;localStorage.getItem(_a)&&(fo.hack.language=localStorage.getItem(_a)),Hr.current=rs().cloneDeep(fo),Hr.current.language=(Do=fo==null?void 0:fo.hack)==null?void 0:Do.language,Tn({type:1,payload:{loading:!1,data:fo}}),Tn({type:8,payload:{languageValue:(ya=fo==null?void 0:fo.hack)==null?void 0:ya.language}})}})}kn&&fi()},[kn]),(0,de.useEffect)(()=>{Tn({type:8,payload:{debugResult:void 0}}),oa(),si(!1)},[kn]),(0,de.useEffect)(()=>{clearTimeout(kr.current)},[kn]),(0,de.useEffect)(()=>{so()},[kn,ni]);const qo=()=>{window.parent.postMessage("backExercise","*")};function so(){return Pi(this,null,function*(){try{const fi=yield(0,E.zO)(kn,{limit:15,page:ni});Tn({type:2,payload:fi})}catch(fi){console.log(fi)}})}function oa(){return Pi(this,null,function*(){try{const fi=yield(0,E.dd)(kn);Tn({type:11,payload:fi==null?void 0:fi.data})}catch(fi){console.log(fi)}})}function os(fi){Tn({type:10,payload:fi})}function aa(fi){return Pi(this,null,function*(){var $i,Do,ya;const fo=((ya=(Do=($i=window==null?void 0:window.location)==null?void 0:$i.pathname)==null?void 0:Do.split("/"))==null?void 0:ya[2])||kn;return yield(0,E.n4)(fo,fi||{code:rt.Base64.encode(Or.code),language:ci})})}function ga(){return Pi(this,null,function*(){var fi;if(!Or.code||((fi=Or.code)==null?void 0:fi.trim())===""){re.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!ri){Tn({type:5,payload:!0});try{if(_e.Z.publish("to-commit-info"),(yield aa()).status===0){let Ka=function(){return Pi(this,null,function*(){const{status:Va,data:ja}=yield(0,E.rX)(kn,"submit"),as=No()-ha>(fo*_a+3)*1e3;if(Va!==0&&!as&&setTimeout(Ka,1e3),as){ue.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Tn({type:5,payload:!1});return}if(Va===0){ja.status===2&&ue.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const hl=yield(0,E.zO)(kn,{limit:15,page:ni});Tn({type:8,payload:Ci(Cr({},pn),{submitResult:ja,submitting:!1,submitRecords:hl})}),(ja==null?void 0:ja.status)===0&&si(!0)}})},Do={};if((yield(0,E.bM)(kn,Do)).status===-1&&nr.get("exercisesId")){window.parent.location.href=`/classrooms/${nr.get("coursesId")}/exercise/${nr.get("exercisesId")}/detail`;return}const{time_limit:fo,test_case_size:_a}=Or,ha=No();Ka()}}catch($i){Tn({type:5,payload:!1})}}})}function ii(){return Pi(this,null,function*(){var fi;if(!Or.code||((fi=Or.code)==null?void 0:fi.trim())===""){re.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}pn.debuging=!0,Tn({type:4,payload:!0});try{if((yield aa()).status===0){let ha=function(){return Pi(this,null,function*(){const{status:Ka,message:Va,data:ja}=yield(0,E.rX)(kn,"debug"),as=No()-_a>(Do+3)*1e3;if(Ka!==0&&!as&&(Tn({type:6,payload:Va}),setTimeout(ha,1e3)),as){ue.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Tn({type:4,payload:!1});return}Ka===0&&(Tn({type:4,payload:!1}),ja.status===2&&ue.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Tn({type:7,payload:Ci(Cr({},pn),{debugResult:ja,debuging:!1})}))})};const{time_limit:Do}=Or;let ya={input:encodeURIComponent(Dr.test_case.input)};if((yield(0,E.MU)(kn,ya)).status===-1&&nr.get("exercisesId")){window.parent.location.href=`/classrooms/${nr.get("coursesId")}/exercise/${nr.get("exercisesId")}/detail`;return}const _a=No();ha()}else Tn({type:4,payload:!1})}catch($i){console.log($i)}finally{}})}function Ai(fi){var $i;clearTimeout(kr.current),kr.current=setTimeout(()=>{var Do;aa({code:rt.Base64.encode(fi),language:(Do=Hr==null?void 0:Hr.current)==null?void 0:Do.language})},2e3),Tn({type:3,payload:Ci(Cr({},Hr==null?void 0:Hr.current),{hack:Ci(Cr({},($i=Hr==null?void 0:Hr.current)==null?void 0:$i.hack),{code:fi})})})}function oo(fi){let $i=fi.target.value;Tn({type:3,payload:Ci(Cr({},Dr),{test_case:{input:$i}})})}const Ba=fi=>Pi(void 0,null,function*(){var $i;if(Tn({type:0,payload:!0}),(yield aa()).status===0){Tn({type:8,payload:{languageValue:fi}}),Hr.current.language=fi;const ya=`${mi==null?void 0:mi.login}-language`;localStorage.setItem(ya,fi);const fo=yield(0,E.dd)(kn);if(fo.status===0){const _a=($i=fo==null?void 0:fo.data)==null?void 0:$i.find(ha=>ha.language===fi);Ai(rt.Base64.decode(_a.code))}}setTimeout(()=>{Tn({type:0,payload:!1})},300)});function jo(){return Pi(this,null,function*(){try{const fi=yield(0,E.H7)(kn,{language:ci});fi.status===401?ce.history.replace("/login",{from:Pn.pathname}):(Ai(rt.Base64.decode(fi.code)),oa())}catch(fi){console.log(fi)}})}function Cs(){ue.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Ur.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Ur.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return Pi(this,null,function*(){const fi=yield(0,E.fi)(kn,{language:ci});fi.status===401?ce.history.replace("/login",{from:Pn.pathname}):Ai(rt.Base64.decode(fi.code))})}})}function Jo(){Tn({type:9,payload:!0})}function lo(){Tn({type:9,payload:!1})}function Fa(fi){return Pi(this,null,function*(){yield(0,E.MK)(kn,fi),Tn({type:1,payload:{showNote:!1,data:Ci(Cr({},Dr),{hack:Ci(Cr({},Or),{notes:fi.notes})})}})})}const dl={input:(xt=Dr==null?void 0:Dr.test_case)==null?void 0:xt.input,is_file:(kt=Dr==null?void 0:Dr.test_case)==null?void 0:kt.is_file,language:(($n=Hr.current)==null?void 0:$n.language)||(Or==null?void 0:Or.language),code:Or==null?void 0:Or.code,title:"main."+va[Or==null?void 0:Or.language],modify_code:Or==null?void 0:Or.modify_code,notes:Or==null?void 0:Or.notes,debugResult:yi,debuging:Wi,submitting:ri,executingMessage:Di,id:kn,languageValue:ci,languageList:Br,onChangeLanguage:Ba,onCancelNote:lo,onAddNote:Fa,showNote:Ei,onShowNote:Jo,onSubmitCode:ga,onChangeCode:Ai,onChangeInput:oo,onDebugCode:ii,onResetCode:jo,onSyncCode:Cs,onUpdateCode:aa};function Xs(){return Pi(this,null,function*(){const{praise_count:fi}=yield(0,E.vl)(Or.id,{container_type:"Hack",type:1});let $i=Ci(Cr({},Dr),{hack:Ci(Cr({},Or),{praises_count:fi,user_praise:!Or.user_praise})});Tn({type:3,payload:$i})})}const fl={topicId:kn,submitResult:zr,submitRecords:zi,submitting:ri,page:ni,onPageChange:os,hack:Or,user:Dr==null?void 0:Dr.user,onTriggerPraise:Xs};return console.log(Dr,Hr==null?void 0:Hr.current,"data--------"),Ur.createElement(Ur.Fragment,null,Ur.createElement(ee.Z,{className:"oj-custom-large-spin",size:"large",spinning:gi},Dr?Ur.createElement("div",{className:"oj-custom-warp"},Ur.createElement("header",{className:Ge.Z.header,style:{minWidth:1200}},Ur.createElement("div",null,Ur.createElement("img",{src:`${z.Z.IMG_SERVER}/images/${mi.image_url}`,alt:"user",width:30}),Ur.createElement("span",null,mi.name)),Ur.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Ur.createElement("div",null,Or.name),Ur.createElement(ka.Z,{onChange:fi=>{},className:"font12 c-grey-999"})),Ur.createElement(La.CopyToClipboard,{text:`${(Nn=window.location)==null?void 0:Nn.origin}/problems/${Or.identifier}/share`,onCopy:()=>re.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Ur.createElement("span",{className:Ge.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Ur.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Or.edit_privilege?Ur.createElement(ce.Link,{className:Ge.Z.btn_back,to:`/problems/${Or.identifier}/ojedit`,style:{marginRight:10}}," ",Ur.createElement(ie.Z,null)," \u7F16\u8F91"):null,Ur.createElement(ce.Link,{className:Ge.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Ur.createElement(Ee.Z,null),"\u9000\u51FA")),Ur.createElement(y.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Ur.createElement(hs,Cr({},fl)),rightChild:Ur.createElement(cl,Cr({},dl))})):null),Ur.createElement(ue.default,{centered:!0,closable:!1,width:680,footer:null,open:Zi,className:"oj-modal"},Ur.createElement("section",{className:"oj-modal-content"},Ur.createElement("div",{className:"oj-modal-head"},Ur.createElement("img",{src:ps,alt:""}),Ur.createElement("i",{onClick:()=>si(!1),className:"iconfont icon-guanbi1"})),Ur.createElement("aside",null,Ur.createElement("img",{className:"mr30",src:ws.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Ur.createElement("span",{style:{color:"#75d6ba",marginRight:100}},zr==null?void 0:zr.execute_time,"s"),"\u4F18\u4E8E",Ur.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(zr==null?void 0:zr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Ur.createElement("aside",{className:"mb50"},Ur.createElement("img",{src:ms.Z,className:"mr30"}),Ur.createElement("span",{className:"oj-modal-tt"},Ur.createElement("span",null,Ur.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Ur.createElement("span",{className:"c-light-primary"},zr==null?void 0:zr.execute_memory,"mb")),Ur.createElement("span",null,Ur.createElement("span",null))),"\u4F18\u4E8E",Ur.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(zr==null?void 0:zr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Ur.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function ul({languageValue:mt,languageList:xt,onChangeLanguage:kt,title:$n,modify_code:Nn,onSyncCode:pn,onShowCodeSetting:Tn,onResetCode:kn}){const Pn=(0,ce.useLocation)(),nr=()=>{ue.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Ur.createElement(x.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:kn})};return Ur.createElement("div",{className:"action-bar"},Ur.createElement(te.default,{className:"oj-select",value:mt,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:kt},xt==null?void 0:xt.map(ci=>Ur.createElement(te.default.Option,{key:ci.language,value:ci.language},ci.language))),Ur.createElement("span",null),Ur.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:nr},Ur.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Ur.createElement("a",{onClick:Tn},Ur.createElement("i",{className:"iconfont icon-shezhi"})))}function cl(mt){var xt=mt,{id:kt,input:$n,is_file:Nn,showNote:pn,onShowNote:Tn,notes:kn,onCancelNote:Pn,onAddNote:nr,debugResult:ci,language:Br,debuging:gi,submitting:Dr,executingMessage:yi,code:zr,onSubmitCode:zi,onDebugCode:ni,onChangeCode:Ei,onChangeInput:Wi,onUpdateCode:ri}=xt,Di=So(xt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function or(bi){return Ur.createElement(ul,Ci(Cr({},Di),{onShowCodeSetting:bi}))}const Bi={id:kt,input:$n,debugResult:ci,debuging:gi,is_file:Nn,submitting:Dr,executingMessage:yi,onDebugCode:ni,onChangeCode:Ei,onSubmitCode:zi,onChangeInput:Wi};return Ur.createElement("div",{className:"right-panel"},Ur.createElement(ot,{onUpdateCode:()=>{},language:Br,value:zr,onChange:Ei,ActionBarRender:or}),Ur.createElement("div",{className:`note-form-area ${pn?"active":""}`},Ur.createElement(Qe,{onCancel:Pn,notes:kn,callback:nr})),Ur.createElement(ct.ZP,Cr({},Bi)))}},17124:function(Jt,Ot,we){"use strict";we.d(Ot,{h:function(){return de}});var de=(ie=>(ie[ie.NOMATCH=-1]="NOMATCH",ie[ie.OK=0]="OK",ie[ie.TIMEOUT=2]="TIMEOUT",ie[ie.PODFAILURE=3]="PODFAILURE",ie[ie.COMPILEFAILURE=4]="COMPILEFAILURE",ie[ie.EXECUTEFAILURE=5]="EXECUTEFAILURE",ie[ie.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",ie))(de||{})},47887:function(Jt,Ot,we){"use strict";we.d(Ot,{H7:function(){return te},KC:function(){return ne},M3:function(){return Se},MK:function(){return ee},MU:function(){return ce},Rg:function(){return xe},WH:function(){return ae},X6:function(){return re},bM:function(){return Ee},bx:function(){return oe},dd:function(){return z},de:function(){return me},fi:function(){return E},fu:function(){return ie},gu:function(){return ge},n4:function(){return y},qe:function(){return be},rL:function(){return pe},rX:function(){return ue},uc:function(){return Ae},vl:function(){return x},wO:function(){return ve},zO:function(){return se}});var de=we(38147);function ie(De){return(0,de.U2)(`mypractices/${De}.json`,{hidePopLogin:!0})}function Ee(De,ke){return(0,de.v_)(`mypractices/${De}/code_submit.json`,ke)}function ce(De,ke){return(0,de.v_)(`mypractices/${De}/code_debug.json`,ke)}function se(De,ke){return ke.language&&(ke.language=encodeURIComponent(ke.language)),(0,de.U2)(`mypractices/${De}/submit_records.json`,ke)}function re(De){return(0,de.U2)("mypractices/record_detail.json",{id:De})}function ue(De,ke){return(0,de.U2)(`mypractices/${De}/result.json`,{mode:ke})}function ee(De,ke){return(0,de.v_)(`mypractices/${De}/add_notes.json`,ke)}function te(De,ke){return(0,de.v_)(`mypractices/${De}/restore_initial_code.json`,ke)}function E(De,ke){return(0,de.v_)(`mypractices/${De}/sync_code.json`,ke)}function y(De,ke){return(0,de.v_)(`mypractices/${De}/update_code.json`,ke)}function z(De){return(0,de.v_)(`mypractices/${De}/initial_codes.json`)}function x(De,ke){return(0,de.v_)(`discusses/${De}/plus.json`,ke)}function ne(De){return(0,de.U2)("practices/practices_list.json",De)}function ae(De,ke){return(0,de.U2)(`practices/${De}/question_solution_articles`,ke)}function oe(De,ke){return(0,de.v_)(`practices/${De}/question_solution_articles`,ke)}function ge(De,ke){return(0,de.gz)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}`,ke)}function Se(De,ke){return(0,de.U2)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}/edit`,ke)}function ve(De,ke){return(0,de.U2)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}`,ke)}function be(De,ke){return(0,de.v_)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}/set_authority_or_excellent`,ke)}function xe(De,ke){return(0,de.v_)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}/praise_or_treads`,ke)}function pe(De,ke){return(0,de.v_)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}/hide`)}function me(De,ke){return(0,de.IV)(`practices/${De}/question_solution_articles/${ke==null?void 0:ke.active}`,ke)}function Ae(De,ke){return(0,de.v_)(`mypractices/${De}/update_practice_time_sum`,ke)}},83554:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return x}});var de=we(59301),ie=we(6767),Ee=we(25399),ce=we(29787),se=we(77019),re=we(5269),ue=we(13747),ee=we(7939),te=we(25374),E=we(38147),y=we(95097),z=(ae,oe,ge)=>new Promise((Se,ve)=>{var be=me=>{try{pe(ge.next(me))}catch(Ae){ve(Ae)}},xe=me=>{try{pe(ge.throw(me))}catch(Ae){ve(Ae)}},pe=me=>me.done?Se(me.value):Promise.resolve(me.value).then(be,xe);pe((ge=ge.apply(ae,oe)).next())}),x=({id:ae,activeDiscussIndex:oe,onReplyDiscuss:ge,adminOrOperator:Se})=>{const[ve,be]=(0,de.useState)(""),[xe,pe]=(0,de.useState)(!1);function me(De){be(De)}function Ae(){if(!ve){ie.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}ge(ae,ve),be("")}return(0,de.useEffect)(()=>{oe!=ae&&pe(!1)},[oe]),de.createElement("div",{key:ae,className:"discuss-item-editor",style:{display:oe===ae?"block":"none",width:"100%"}},de.createElement(te.Z,{miniToolbar:!0,startInit:oe===ae,defaultValue:ve,id:ae,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:me,extraUse:Se&&de.createElement(Ee.Z,{color:"#fff",open:xe,destroyTooltipOnHide:!0,title:ne({id:ae,isOpen:xe,activeDiscussIndex:oe,onChange:me,setIsOpen:pe}),overlayStyle:{maxWidth:600}},de.createElement("a",{title:xe?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>pe(!xe)},de.createElement("i",{className:"iconfont icon-dianzan11"})))}),de.createElement("a",{onClick:Ae,className:"btn-send"},"\u53D1\u9001"))};const ne=ae=>{const[oe,ge]=(0,de.useState)(!1),[Se,ve]=(0,de.useState)([]),[be,xe]=(0,de.useState)(1);(0,de.useEffect)(()=>{ae!=null&&ae.isOpen?pe():(xe(1),ve([]))},[ae==null?void 0:ae.isOpen]);const pe=()=>z(void 0,null,function*(){ge(!0);const me=yield(0,E.ZP)(`/api/discusses/${ae==null?void 0:ae.id}/recommend_answer.json`,{method:"get"});(me==null?void 0:me.status)==0&&ve(me==null?void 0:me.answer),ge(!1)});return de.createElement(ce.Z,{spinning:oe},de.createElement("div",{style:{color:"#000"}},de.createElement(y.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(Se==null?void 0:Se[be-1])||""}),de.createElement(se.Z,{justify:"end",align:"middle"},de.createElement(re.Z,null,de.createElement(ue.Z,{simple:!0,current:be,pageSize:1,total:(Se==null?void 0:Se.length)||0,onChange:me=>{xe(me)}})),de.createElement(re.Z,null,de.createElement(ee.ZP,{onClick:()=>z(void 0,null,function*(){ae==null||ae.onChange(Se==null?void 0:Se[be-1]),ae==null||ae.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},19941:function(Jt,Ot,we){"use strict";we.d(Ot,{o:function(){return te}});var de=we(38147),ie=we(93125),Ee=we.n(ie);let ce="",se,re="";function ue(E){ee(E)}function ee(E){se=new(Ee()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(y){console.log("addFileSuccess: "+y.file.name),E.addFileSuccess&&E.addFileSuccess(y),se.startUpload()},onUploadstarted:function(y){const z=y.file.name;if(y.videoId){var ne=`/api/users/${ce}/video_auths.json`;(0,de.ZP)(ne,{method:"put",body:{video_id:y.videoId,title:z,file_name:z,virtual_classroom_id:re}}).then(ae=>{if(ae.status==-1){E.onUploadError&&E.onUploadError(y);return}const oe=ae.data;var ge=oe.UploadAuth,Se=oe.UploadAddress,ve=oe.VideoId;se.setUploadAuthAndAddress(y,ge,Se)}).catch(ae=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(ae)})}else{var x=`/api/users/${ce}/video_auths.json`;const ae="";(0,de.ZP)(x,{method:"Post",body:{title:ae+z,file_name:ae+z,virtual_classroom_id:re}}).then(oe=>{if(oe){const be=oe.data;var ge=be.UploadAuth,Se=be.UploadAddress,ve=be.VideoId;se.setUploadAuthAndAddress(y,ge,Se,ve)}}).catch(oe=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(oe)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(y){E.onUploadSucceed&&E.onUploadSucceed(y),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(y,z,x){E.onUploadFailed&&E.onUploadFailed(y),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(y,z,x){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(y,z,x){E.onUploadProgress&&E.onUploadProgress(y,z,x);var ne=Math.ceil(x*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(y){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var z=`/api/users/${ce}/video_auths.json`;(0,de.ZP)(z,{method:"put",body:{video_id:y.videoId}}).then(x=>{var ae=x.data.UploadAuth;se.resumeUploadWithAuth(ae)}).catch(x=>{console.log(x)})},onUploadEnd:function(y){E.onUploadEnd&&E.onUploadEnd(y),console.log("onUploadEnd: uploaded all the files")}}),E.gotUploader&&E.gotUploader(se)}function te(E,y,z){E&&(ce=E),y&&(re=y),ue(z)}},84056:function(Jt,Ot,we){"use strict";we.d(Ot,{BU:function(){return ie},Dj:function(){return de},gH:function(){return Ee},vp:function(){return ce}});function de(se){try{se.mozRequestFullScreen?se.mozRequestFullScreen():se.webkitRequestFullScreen&&se.webkitRequestFullScreen()}catch(re){console.log(re,":e")}}function ie(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Ee=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function ce(){var se=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,re=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",se),window.isFullScreen?window.isFullScreen:se!=null}},49142:function(Jt,Ot,we){"use strict";we.d(Ot,{AL:function(){return xe},Iy:function(){return y},Qv:function(){return ne},ez:function(){return be},jb:function(){return z}});var de=we(32834),ie=we.n(de),Ee=we(11690),ce=we.n(Ee);let se=1;function re(ke,Ie){const Fe=ke.match(/^(\s+)(?:```)/);if(Fe===null)return Ie;const Pe=Fe[1];return Ie.split(`
`).map(qe=>{const Ke=qe.match(/^\s+/);if(Ke===null)return qe;const[ot]=Ke;return ot.length>=Pe.length?qe.slice(Pe.length):qe}).join(`
`)}let ue=[],ee=["<ul>"];const te=new(ie()).Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function y(){ue.length=0,ee=["<ul>"]}const z={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(ke,Ie,Fe,Pe){if(Ie>=ke.length||ke[Ie].level<=Fe)return Ie;var qe=ke[Ie];Pe.push("<li><a href='#"+se+qe.anchor+"'>"+qe.text+"</a>"),Ie++;var Ke=[];return Ie=x(ke,Ie,qe.level,Ke),Ke.length>0&&(Pe.push("<ul>"),Ke.forEach(function(ot){Pe.push(ot)}),Pe.push("</ul>")),Pe.push("</li>"),Ie=x(ke,Ie,Fe,Pe),Ie}function ne(){return x(ue,0,0,ee),ee.push("</ul>"),ee.join("")}const ae={heading(ke){const Ie=E.exec(ke);if(se+=1,Ie)return{type:"heading",raw:Ie[0],depth:Ie[1].length,text:Ie[2]}},fences(ke){const Ie=this.rules.block.fences.exec(ke);if(Ie){const Fe=Ie[0];let Pe=re(Fe,Ie[3]||"");const qe=Ie[2]?Ie[2].trim():Ie[2];if(["latex","katex","math"].indexOf(qe)>=0){const Ke=Se(),ot=Pe;Pe=Ke,ve[Ke]={type:"block",expression:ot}}return{type:"code",raw:Fe,lang:qe,text:Pe}}}},oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ge=0;const Se=()=>`__special_katext_id_${ge++}__`;let ve={};function be(){return ve}function xe(){ge=0,ve={}}function pe(ke){return ke=ke.replace(oe,(Ie,Fe)=>{const Pe=Se();return ve[Pe]={type:"inline",expression:Fe},Pe}),ke}const me=te.listitem;te.listitem=function(ke){return me(pe(ke))};const Ae=te.paragraph;te.paragraph=function(ke){return Ae(pe(ke))};const De=te.tablecell;te.tablecell=function(ke,Ie){return De(pe(ke),Ie)},te.code=function(ke,Ie,Fe){const Pe=(Ie||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${ke}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ie}">${Fe?ke:(0,Ee.escape)(ke,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Fe?ke:(0,Ee.escape)(ke,!0))+"</code></pre>"},te.heading=function(ke,Ie,Fe){let Pe=this.options.headerPrefix+Fe.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ue.push({anchor:Pe,level:Ie,text:ke}),"<h"+Ie+' id="'+se+Pe+'">'+ke+"</h"+Ie+">"},ie().setOptions({silent:!0,gfm:!0,pedantic:!1}),ie().use({tokenizer:ae,renderer:te}),Ot.ZP=ie()},42926:function(Jt,Ot,we){"use strict";we.d(Ot,{G:function(){return se},t:function(){return ce}});var de=we(7062),ie=we.n(de);const Ee=null;function ce(re,ue){let ee=ie().get("__ec");ee||(ee={}),ee[re]=ue,ie().set("__ec",ee)}function se(re,ue){let ee=ie().get("__ec");return ee?ee[re]===void 0?ue:ee[re]:ue}},73217:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return rr}});class de{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Me,ze){return Me.__proto__=ze,Me},Object.assign=Object.assign||function(Me){if(Me==null)throw new TypeError("Cannot convert undefined or null to object");let ze=Object(Me);for(let Ve=1;Ve<arguments.length;Ve++){let st=arguments[Ve];if(st!=null)for(let yt in st)st.hasOwnProperty(yt)&&(ze[yt]=st[yt])}return ze},typeof self.Promise!="function"&&we(3867).polyfill()}}de.install();var ie=de,Ee=we(86204),ce=we.n(Ee);class se{static e(Me,ze){(!Me||se.FORCE_GLOBAL_TAG)&&(Me=se.GLOBAL_TAG);let Ve=`[${Me}] > ${ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","error",Ve),se.ENABLE_ERROR&&(console.error?console.error(Ve):console.warn?console.warn(Ve):console.log(Ve))}static i(Me,ze){(!Me||se.FORCE_GLOBAL_TAG)&&(Me=se.GLOBAL_TAG);let Ve=`[${Me}] > ${ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","info",Ve),se.ENABLE_INFO&&(console.info?console.info(Ve):console.log(Ve))}static w(Me,ze){(!Me||se.FORCE_GLOBAL_TAG)&&(Me=se.GLOBAL_TAG);let Ve=`[${Me}] > ${ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","warn",Ve),se.ENABLE_WARN&&(console.warn?console.warn(Ve):console.log(Ve))}static d(Me,ze){(!Me||se.FORCE_GLOBAL_TAG)&&(Me=se.GLOBAL_TAG);let Ve=`[${Me}] > ${ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","debug",Ve),se.ENABLE_DEBUG&&(console.debug?console.debug(Ve):console.log(Ve))}static v(Me,ze){(!Me||se.FORCE_GLOBAL_TAG)&&(Me=se.GLOBAL_TAG);let Ve=`[${Me}] > ${ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","verbose",Ve),se.ENABLE_VERBOSE&&console.log(Ve)}}se.GLOBAL_TAG="flv.js",se.FORCE_GLOBAL_TAG=!1,se.ENABLE_ERROR=!0,se.ENABLE_INFO=!0,se.ENABLE_WARN=!0,se.ENABLE_DEBUG=!0,se.ENABLE_VERBOSE=!0,se.ENABLE_CALLBACK=!1,se.emitter=new(ce());var re=se;class ue{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(Me){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Me,this._totalBytes+=Me):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Me,this._totalBytes+=Me):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Me,this._totalBytes+=Me,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Me=(this._now()-this._lastCheckpoint)/1e3;return Me==0&&(Me=1),this._intervalBytes/Me/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Me=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Me/1024}}var ee=ue;class te{constructor(Me){this._message=Me}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class E extends te{constructor(Me){super(Me)}get name(){return"IllegalStateException"}}class y extends te{constructor(Me){super(Me)}get name(){return"InvalidArgumentException"}}class z extends te{constructor(Me){super(Me)}get name(){return"NotImplementedException"}}const x={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},ne={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ae{constructor(Me){this._type=Me||"undefined",this._status=x.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=x.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===x.kConnecting||this._status===x.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Me){this._onContentLengthKnown=Me}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Me){this._onURLRedirect=Me}get onDataArrival(){return this._onDataArrival}set onDataArrival(Me){this._onDataArrival=Me}get onError(){return this._onError}set onError(Me){this._onError=Me}get onComplete(){return this._onComplete}set onComplete(Me){this._onComplete=Me}open(Me,ze){throw new z("Unimplemented abstract function!")}abort(){throw new z("Unimplemented abstract function!")}}let oe={};function ge(){let Qt=self.navigator.userAgent.toLowerCase(),Me=/(edge)\/([\w.]+)/.exec(Qt)||/(opr)[\/]([\w.]+)/.exec(Qt)||/(chrome)[ \/]([\w.]+)/.exec(Qt)||/(iemobile)[\/]([\w.]+)/.exec(Qt)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Qt)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(Qt)||/(webkit)[ \/]([\w.]+)/.exec(Qt)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(Qt)||/(msie) ([\w.]+)/.exec(Qt)||Qt.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(Qt)||Qt.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(Qt)||[],ze=/(ipad)/.exec(Qt)||/(ipod)/.exec(Qt)||/(windows phone)/.exec(Qt)||/(iphone)/.exec(Qt)||/(kindle)/.exec(Qt)||/(android)/.exec(Qt)||/(windows)/.exec(Qt)||/(mac)/.exec(Qt)||/(linux)/.exec(Qt)||/(cros)/.exec(Qt)||[],Ve={browser:Me[5]||Me[3]||Me[1]||"",version:Me[2]||Me[4]||"0",majorVersion:Me[4]||Me[2]||"0",platform:ze[0]||""},st={};if(Ve.browser){st[Ve.browser]=!0;let yt=Ve.majorVersion.split(".");st.version={major:parseInt(Ve.majorVersion,10),string:Ve.version},yt.length>1&&(st.version.minor=parseInt(yt[1],10)),yt.length>2&&(st.version.build=parseInt(yt[2],10))}if(Ve.platform&&(st[Ve.platform]=!0),(st.chrome||st.opr||st.safari)&&(st.webkit=!0),st.rv||st.iemobile){st.rv&&delete st.rv;let yt="msie";Ve.browser=yt,st[yt]=!0}if(st.edge){delete st.edge;let yt="msedge";Ve.browser=yt,st[yt]=!0}if(st.opr){let yt="opera";Ve.browser=yt,st[yt]=!0}if(st.safari&&st.android){let yt="android";Ve.browser=yt,st[yt]=!0}st.name=Ve.browser,st.platform=Ve.platform;for(let yt in oe)oe.hasOwnProperty(yt)&&delete oe[yt];Object.assign(oe,st)}ge();var Se=oe;class ve extends ae{static isSupported(){try{let Me=Se.msedge&&Se.version.minor>=15048,ze=Se.msedge?Me:!0;return self.fetch&&self.ReadableStream&&ze}catch(Me){return!1}}constructor(Me,ze){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Me,this._config=ze,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Me,ze){this._dataSource=Me,this._range=ze;let Ve=Me.url;this._config.reuseRedirectedURL&&Me.redirectedURL!=null&&(Ve=Me.redirectedURL);let st=this._seekHandler.getConfig(Ve,ze),yt=new self.Headers;if(typeof st.headers=="object"){let Mt=st.headers;for(let jt in Mt)Mt.hasOwnProperty(jt)&&yt.append(jt,Mt[jt])}let Ft={method:"GET",headers:yt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let Mt in this._config.headers)yt.append(Mt,this._config.headers[Mt]);Me.cors===!1&&(Ft.mode="same-origin"),Me.withCredentials&&(Ft.credentials="include"),Me.referrerPolicy&&(Ft.referrerPolicy=Me.referrerPolicy),this._status=x.kConnecting,self.fetch(st.url,Ft).then(Mt=>{if(this._requestAbort){this._requestAbort=!1,this._status=x.kIdle;return}if(Mt.ok&&Mt.status>=200&&Mt.status<=299){if(Mt.url!==st.url&&this._onURLRedirect){let qt=this._seekHandler.removeURLParameters(Mt.url);this._onURLRedirect(qt)}let jt=Mt.headers.get("Content-Length");return jt!=null&&(this._contentLength=parseInt(jt),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,Mt.body.getReader())}else if(this._status=x.kError,this._onError)this._onError(ne.HTTP_STATUS_CODE_INVALID,{code:Mt.status,msg:Mt.statusText});else throw new te("FetchStreamLoader: Http code invalid, "+Mt.status+" "+Mt.statusText)}).catch(Mt=>{if(this._status=x.kError,this._onError)this._onError(ne.EXCEPTION,{code:-1,msg:Mt.message});else throw Mt})}abort(){this._requestAbort=!0}_pump(Me){return Me.read().then(ze=>{if(ze.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=x.kError;let Ve=ne.EARLY_EOF,st={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(Ve,st);else throw new te(st.msg)}else this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=x.kComplete,Me.cancel();this._status=x.kBuffering;let Ve=ze.value.buffer,st=this._range.from+this._receivedLength;this._receivedLength+=Ve.byteLength,this._onDataArrival&&this._onDataArrival(Ve,st,this._receivedLength),this._pump(Me)}}).catch(ze=>{if(ze.code===11&&Se.msedge)return;this._status=x.kError;let Ve=0,st=null;if((ze.code===19||ze.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(Ve=ne.EARLY_EOF,st={code:ze.code,msg:"Fetch stream meet Early-EOF"}):(Ve=ne.EXCEPTION,st={code:ze.code,msg:ze.message}),this._onError)this._onError(Ve,st);else throw new te(st.msg)})}}var be=ve;class xe extends ae{static isSupported(){try{let Me=new XMLHttpRequest;return Me.open("GET","https://example.com",!0),Me.responseType="moz-chunked-arraybuffer",Me.responseType==="moz-chunked-arraybuffer"}catch(Me){return re.w("MozChunkedLoader",Me.message),!1}}constructor(Me,ze){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Me,this._config=ze,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(Me,ze){this._dataSource=Me,this._range=ze;let Ve=Me.url;this._config.reuseRedirectedURL&&Me.redirectedURL!=null&&(Ve=Me.redirectedURL);let st=this._seekHandler.getConfig(Ve,ze);this._requestURL=st.url;let yt=this._xhr=new XMLHttpRequest;if(yt.open("GET",st.url,!0),yt.responseType="moz-chunked-arraybuffer",yt.onreadystatechange=this._onReadyStateChange.bind(this),yt.onprogress=this._onProgress.bind(this),yt.onloadend=this._onLoadEnd.bind(this),yt.onerror=this._onXhrError.bind(this),Me.withCredentials&&(yt.withCredentials=!0),typeof st.headers=="object"){let Ft=st.headers;for(let Mt in Ft)Ft.hasOwnProperty(Mt)&&yt.setRequestHeader(Mt,Ft[Mt])}if(typeof this._config.headers=="object"){let Ft=this._config.headers;for(let Mt in Ft)Ft.hasOwnProperty(Mt)&&yt.setRequestHeader(Mt,Ft[Mt])}this._status=x.kConnecting,yt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=x.kComplete}_onReadyStateChange(Me){let ze=Me.target;if(ze.readyState===2){if(ze.responseURL!=null&&ze.responseURL!==this._requestURL&&this._onURLRedirect){let Ve=this._seekHandler.removeURLParameters(ze.responseURL);this._onURLRedirect(Ve)}if(ze.status!==0&&(ze.status<200||ze.status>299))if(this._status=x.kError,this._onError)this._onError(ne.HTTP_STATUS_CODE_INVALID,{code:ze.status,msg:ze.statusText});else throw new te("MozChunkedLoader: Http code invalid, "+ze.status+" "+ze.statusText);else this._status=x.kBuffering}}_onProgress(Me){if(this._status===x.kError)return;this._contentLength===null&&Me.total!==null&&Me.total!==0&&(this._contentLength=Me.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let ze=Me.target.response,Ve=this._range.from+this._receivedLength;this._receivedLength+=ze.byteLength,this._onDataArrival&&this._onDataArrival(ze,Ve,this._receivedLength)}_onLoadEnd(Me){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===x.kError)return;this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Me){this._status=x.kError;let ze=0,Ve=null;if(this._contentLength&&Me.loaded<this._contentLength?(ze=ne.EARLY_EOF,Ve={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(ze=ne.EXCEPTION,Ve={code:-1,msg:Me.constructor.name+" "+Me.type}),this._onError)this._onError(ze,Ve);else throw new te(Ve.msg)}}var pe=xe;class me extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Me=new XMLHttpRequest;return Me.open("GET","https://example.com",!0),Me.responseType="ms-stream",Me.responseType==="ms-stream"}catch(Me){return Log.w("MSStreamLoader",Me.message),!1}}constructor(Me,ze){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Me,this._config=ze,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(Me,ze){this._internalOpen(Me,ze,!1)}_internalOpen(Me,ze,Ve){this._dataSource=Me,Ve?this._currentRange=ze:this._totalRange=ze;let st=Me.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?st=this._currentRedirectedURL:Me.redirectedURL!=null&&(st=Me.redirectedURL));let yt=this._seekHandler.getConfig(st,ze);this._currentRequestURL=yt.url;let Ft=this._reader=new self.MSStreamReader;Ft.onprogress=this._msrOnProgress.bind(this),Ft.onload=this._msrOnLoad.bind(this),Ft.onerror=this._msrOnError.bind(this);let Mt=this._xhr=new XMLHttpRequest;if(Mt.open("GET",yt.url,!0),Mt.responseType="ms-stream",Mt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),Mt.onerror=this._xhrOnError.bind(this),Me.withCredentials&&(Mt.withCredentials=!0),typeof yt.headers=="object"){let jt=yt.headers;for(let qt in jt)jt.hasOwnProperty(qt)&&Mt.setRequestHeader(qt,jt[qt])}if(typeof this._config.headers=="object"){let jt=this._config.headers;for(let qt in jt)jt.hasOwnProperty(qt)&&Mt.setRequestHeader(qt,jt[qt])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,Mt.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(Me){let ze=Me.target;if(ze.readyState===2)if(ze.status>=200&&ze.status<=299){if(this._status=LoaderStatus.kBuffering,ze.responseURL!=null){let st=this._seekHandler.removeURLParameters(ze.responseURL);ze.responseURL!==this._currentRequestURL&&st!==this._currentRedirectedURL&&(this._currentRedirectedURL=st,this._onURLRedirect&&this._onURLRedirect(st))}let Ve=ze.getResponseHeader("Content-Length");if(Ve!=null&&this._contentLength==null){let st=parseInt(Ve);st>0&&(this._contentLength=st,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:ze.status,msg:ze.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+ze.status+" "+ze.statusText);else if(ze.readyState===3&&ze.status>=200&&ze.status<=299){this._status=LoaderStatus.kBuffering;let Ve=ze.response;this._reader.readAsArrayBuffer(Ve)}}_xhrOnError(Me){this._status=LoaderStatus.kError;let ze=LoaderErrors.EXCEPTION,Ve={code:-1,msg:Me.constructor.name+" "+Me.type};if(this._onError)this._onError(ze,Ve);else throw new RuntimeException(Ve.msg)}_msrOnProgress(Me){let Ve=Me.target.result;if(Ve==null){this._doReconnectIfNeeded();return}let st=Ve.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=Ve.byteLength;let yt=this._totalRange.from+this._receivedLength;this._receivedLength+=st.byteLength,this._onDataArrival&&this._onDataArrival(st,yt,this._receivedLength),Ve.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${yt+st.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Me={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Me,!0)}}_msrOnLoad(Me){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Me){this._status=LoaderStatus.kError;let ze=0,Ve=null;if(this._contentLength&&this._receivedLength<this._contentLength?(ze=LoaderErrors.EARLY_EOF,Ve={code:-1,msg:"MSStream meet Early-Eof"}):(ze=LoaderErrors.EARLY_EOF,Ve={code:-1,msg:Me.constructor.name+" "+Me.type}),this._onError)this._onError(ze,Ve);else throw new RuntimeException(Ve.msg)}}var Ae=null;class De extends ae{static isSupported(){try{let Me=new XMLHttpRequest;return Me.open("GET","https://example.com",!0),Me.responseType="arraybuffer",Me.responseType==="arraybuffer"}catch(Me){return re.w("RangeLoader",Me.message),!1}}constructor(Me,ze){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Me,this._config=ze,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ee,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(Me,ze){this._dataSource=Me,this._range=ze,this._status=x.kConnecting;let Ve=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(Ve=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!Ve?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Me=this._currentChunkSizeKB*1024,ze=this._range.from+this._receivedLength,Ve=ze+Me;this._contentLength!=null&&Ve-this._range.from>=this._contentLength&&(Ve=this._range.from+this._contentLength-1),this._currentRequestRange={from:ze,to:Ve},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Me,ze){this._lastTimeLoaded=0;let Ve=Me.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?Ve=this._currentRedirectedURL:Me.redirectedURL!=null&&(Ve=Me.redirectedURL));let st=this._seekHandler.getConfig(Ve,ze);this._currentRequestURL=st.url;let yt=this._xhr=new XMLHttpRequest;if(yt.open("GET",st.url,!0),yt.responseType="arraybuffer",yt.onreadystatechange=this._onReadyStateChange.bind(this),yt.onprogress=this._onProgress.bind(this),yt.onload=this._onLoad.bind(this),yt.onerror=this._onXhrError.bind(this),Me.withCredentials&&(yt.withCredentials=!0),typeof st.headers=="object"){let Ft=st.headers;for(let Mt in Ft)Ft.hasOwnProperty(Mt)&&yt.setRequestHeader(Mt,Ft[Mt])}if(typeof this._config.headers=="object"){let Ft=this._config.headers;for(let Mt in Ft)Ft.hasOwnProperty(Mt)&&yt.setRequestHeader(Mt,Ft[Mt])}yt.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=x.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(Me){let ze=Me.target;if(ze.readyState===2){if(ze.responseURL!=null){let Ve=this._seekHandler.removeURLParameters(ze.responseURL);ze.responseURL!==this._currentRequestURL&&Ve!==this._currentRedirectedURL&&(this._currentRedirectedURL=Ve,this._onURLRedirect&&this._onURLRedirect(Ve))}if(ze.status>=200&&ze.status<=299){if(this._waitForTotalLength)return;this._status=x.kBuffering}else if(this._status=x.kError,this._onError)this._onError(ne.HTTP_STATUS_CODE_INVALID,{code:ze.status,msg:ze.statusText});else throw new te("RangeLoader: Http code invalid, "+ze.status+" "+ze.statusText)}}_onProgress(Me){if(this._status===x.kError)return;if(this._contentLength===null){let Ve=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,Ve=!0;let st=Me.total;this._internalAbort(),st!=null&st!==0&&(this._totalLength=st)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,Ve){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let ze=Me.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Me.loaded,this._speedSampler.addBytes(ze)}_normalizeSpeed(Me){let ze=this._chunkSizeKBList,Ve=ze.length-1,st=0,yt=0,Ft=Ve;if(Me<ze[0])return ze[0];for(;yt<=Ft;){if(st=yt+Math.floor((Ft-yt)/2),st===Ve||Me>=ze[st]&&Me<ze[st+1])return ze[st];ze[st]<Me?yt=st+1:Ft=st-1}}_onLoad(Me){if(this._status===x.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let ze=this._speedSampler.lastSecondKBps;if(ze===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(ze=this._speedSampler.currentKBps)),ze!==0){let Ft=this._normalizeSpeed(ze);this._currentSpeedNormalized!==Ft&&(this._currentSpeedNormalized=Ft,this._currentChunkSizeKB=Ft)}let Ve=Me.target.response,st=this._range.from+this._receivedLength;this._receivedLength+=Ve.byteLength;let yt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():yt=!0,this._onDataArrival&&this._onDataArrival(Ve,st,this._receivedLength),yt&&(this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Me){this._status=x.kError;let ze=0,Ve=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(ze=ne.EARLY_EOF,Ve={code:-1,msg:"RangeLoader meet Early-Eof"}):(ze=ne.EXCEPTION,Ve={code:-1,msg:Me.constructor.name+" "+Me.type}),this._onError)this._onError(ze,Ve);else throw new te(Ve.msg)}}var ke=De;class Ie extends ae{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Me){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(Me){try{let ze=this._ws=new self.WebSocket(Me.url);ze.binaryType="arraybuffer",ze.onopen=this._onWebSocketOpen.bind(this),ze.onclose=this._onWebSocketClose.bind(this),ze.onmessage=this._onWebSocketMessage.bind(this),ze.onerror=this._onWebSocketError.bind(this),this._status=x.kConnecting}catch(ze){this._status=x.kError;let Ve={code:ze.code,msg:ze.message};if(this._onError)this._onError(ne.EXCEPTION,Ve);else throw new te(Ve.msg)}}abort(){let Me=this._ws;Me&&(Me.readyState===0||Me.readyState===1)&&(this._requestAbort=!0,Me.close()),this._ws=null,this._status=x.kComplete}_onWebSocketOpen(Me){this._status=x.kBuffering}_onWebSocketClose(Me){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=x.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Me){if(Me.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Me.data);else if(Me.data instanceof Blob){let ze=new FileReader;ze.onload=()=>{this._dispatchArrayBuffer(ze.result)},ze.readAsArrayBuffer(Me.data)}else{this._status=x.kError;let ze={code:-1,msg:"Unsupported WebSocket message type: "+Me.data.constructor.name};if(this._onError)this._onError(ne.EXCEPTION,ze);else throw new te(ze.msg)}}_dispatchArrayBuffer(Me){let ze=Me,Ve=this._receivedLength;this._receivedLength+=ze.byteLength,this._onDataArrival&&this._onDataArrival(ze,Ve,this._receivedLength)}_onWebSocketError(Me){this._status=x.kError;let ze={code:Me.code,msg:Me.message};if(this._onError)this._onError(ne.EXCEPTION,ze);else throw new te(ze.msg)}}var Fe=Ie;class Pe{constructor(Me){this._zeroStart=Me||!1}getConfig(Me,ze){let Ve={};if(ze.from!==0||ze.to!==-1){let st;ze.to!==-1?st=`bytes=${ze.from.toString()}-${ze.to.toString()}`:st=`bytes=${ze.from.toString()}-`,Ve.Range=st}else this._zeroStart&&(Ve.Range="bytes=0-");return{url:Me,headers:Ve}}removeURLParameters(Me){return Me}}var qe=Pe;class Ke{constructor(Me,ze){this._startName=Me,this._endName=ze}getConfig(Me,ze){let Ve=Me;if(ze.from!==0||ze.to!==-1){let st=!0;Ve.indexOf("?")===-1&&(Ve+="?",st=!1),st&&(Ve+="&"),Ve+=`${this._startName}=${ze.from.toString()}`,ze.to!==-1&&(Ve+=`&${this._endName}=${ze.to.toString()}`)}return{url:Ve,headers:{}}}removeURLParameters(Me){let ze=Me.split("?")[0],Ve,st=Me.indexOf("?");st!==-1&&(Ve=Me.substring(st+1));let yt="";if(Ve!=null&&Ve.length>0){let Ft=Ve.split("&");for(let Mt=0;Mt<Ft.length;Mt++){let jt=Ft[Mt].split("="),qt=Mt>0;jt[0]!==this._startName&&jt[0]!==this._endName&&(qt&&(yt+="&"),yt+=Ft[Mt])}}return yt.length===0?ze:ze+"?"+yt}}var ot=Ke;class He{constructor(Me,ze,Ve){this.TAG="IOController",this._config=ze,this._extraData=Ve,this._stashInitialSize=1024*384,ze.stashInitialSize!=null&&ze.stashInitialSize>0&&(this._stashInitialSize=ze.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,ze.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Me,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Me.url),this._refTotalLength=Me.filesize?Me.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ee,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(Me){this._extraData=Me}get onDataArrival(){return this._onDataArrival}set onDataArrival(Me){this._onDataArrival=Me}get onSeeked(){return this._onSeeked}set onSeeked(Me){this._onSeeked=Me}get onError(){return this._onError}set onError(Me){this._onError=Me}get onComplete(){return this._onComplete}set onComplete(Me){this._onComplete=Me}get onRedirect(){return this._onRedirect}set onRedirect(Me){this._onRedirect=Me}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Me){this._onRecoveredEarlyEof=Me}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===ke?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Me=this._config;if(Me.seekType==="range")this._seekHandler=new qe(this._config.rangeLoadZeroStart);else if(Me.seekType==="param"){let ze=Me.seekParamStart||"bstart",Ve=Me.seekParamEnd||"bend";this._seekHandler=new ot(ze,Ve)}else if(Me.seekType==="custom"){if(typeof Me.customSeekHandler!="function")throw new y("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Me.customSeekHandler}else throw new y(`Invalid seekType in config: ${Me.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Fe;else if(be.isSupported())this._loaderClass=be;else if(pe.isSupported())this._loaderClass=pe;else if(ke.isSupported())this._loaderClass=ke;else throw new te("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(Me){this._currentRange={from:0,to:-1},Me&&(this._currentRange.from=Me),this._speedSampler.reset(),Me||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let Me=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Me,!0)}}seek(Me){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Me,!0)}_internalSeek(Me,ze){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(ze),this._loader.destroy(),this._loader=null;let Ve={from:Me,to:-1};this._currentRange={from:Ve.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,Ve),this._onSeeked&&this._onSeeked()}updateUrl(Me){if(!Me||typeof Me!="string"||Me.length===0)throw new y("Url must be a non-empty string!");this._dataSource.url=Me}_expandBuffer(Me){let ze=this._stashSize;for(;ze+1024*1024*1<Me;)ze*=2;if(ze+=1024*1024*1,ze===this._bufferSize)return;let Ve=new ArrayBuffer(ze);if(this._stashUsed>0){let st=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(Ve,0,ze).set(st,0)}this._stashBuffer=Ve,this._bufferSize=ze}_normalizeSpeed(Me){let ze=this._speedNormalizeList,Ve=ze.length-1,st=0,yt=0,Ft=Ve;if(Me<ze[0])return ze[0];for(;yt<=Ft;){if(st=yt+Math.floor((Ft-yt)/2),st===Ve||Me>=ze[st]&&Me<ze[st+1])return ze[st];ze[st]<Me?yt=st+1:Ft=st-1}}_adjustStashSize(Me){let ze=0;this._config.isLive||Me<512?ze=Me:Me>=512&&Me<=1024?ze=Math.floor(Me*1.5):ze=Me*2,ze>8192&&(ze=8192);let Ve=ze*1024+1024*1024*1;this._bufferSize<Ve&&this._expandBuffer(Ve),this._stashSize=ze*1024}_dispatchChunks(Me,ze){return this._currentRange.to=ze+Me.byteLength-1,this._onDataArrival(Me,ze)}_onURLRedirect(Me){this._redirectedURL=Me,this._onRedirect&&this._onRedirect(Me)}_onContentLengthKnown(Me){Me&&this._fullRequestFlag&&(this._totalLength=Me,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Me,ze,Ve){if(!this._onDataArrival)throw new E("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Me.byteLength);let st=this._speedSampler.lastSecondKBps;if(st!==0){let yt=this._normalizeSpeed(st);this._speedNormalized!==yt&&(this._speedNormalized=yt,this._adjustStashSize(yt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=ze),this._stashUsed+Me.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Me),this._stashUsed),this._stashUsed+=Me.byteLength;else{let yt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Ft=this._stashBuffer.slice(0,this._stashUsed),Mt=this._dispatchChunks(Ft,this._stashByteStart);if(Mt<Ft.byteLength){if(Mt>0){let jt=new Uint8Array(Ft,Mt);yt.set(jt,0),this._stashUsed=jt.byteLength,this._stashByteStart+=Mt}}else this._stashUsed=0,this._stashByteStart+=Mt;this._stashUsed+Me.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Me.byteLength),yt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),yt.set(new Uint8Array(Me),this._stashUsed),this._stashUsed+=Me.byteLength}else{let Ft=this._dispatchChunks(Me,ze);if(Ft<Me.byteLength){let Mt=Me.byteLength-Ft;Mt>this._bufferSize&&(this._expandBuffer(Mt),yt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),yt.set(new Uint8Array(Me,Ft),0),this._stashUsed+=Mt,this._stashByteStart=ze+Ft}}}else if(this._stashUsed===0){let yt=this._dispatchChunks(Me,ze);if(yt<Me.byteLength){let Ft=Me.byteLength-yt;Ft>this._bufferSize&&this._expandBuffer(Ft),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Me,yt),0),this._stashUsed+=Ft,this._stashByteStart=ze+yt}}else{this._stashUsed+Me.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Me.byteLength);let yt=new Uint8Array(this._stashBuffer,0,this._bufferSize);yt.set(new Uint8Array(Me),this._stashUsed),this._stashUsed+=Me.byteLength;let Ft=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Ft<this._stashUsed&&Ft>0){let Mt=new Uint8Array(this._stashBuffer,Ft);yt.set(Mt,0)}this._stashUsed-=Ft,this._stashByteStart+=Ft}}_flushStashBuffer(Me){if(this._stashUsed>0){let ze=this._stashBuffer.slice(0,this._stashUsed),Ve=this._dispatchChunks(ze,this._stashByteStart),st=ze.byteLength-Ve;if(Ve<ze.byteLength)if(Me)re.w(this.TAG,`${st} bytes unconsumed data remain when flush buffer, dropped`);else{if(Ve>0){let yt=new Uint8Array(this._stashBuffer,0,this._bufferSize),Ft=new Uint8Array(ze,Ve);yt.set(Ft,0),this._stashUsed=Ft.byteLength,this._stashByteStart+=Ve}return 0}return this._stashUsed=0,this._stashByteStart=0,st}return 0}_onLoaderComplete(Me,ze){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Me,ze){switch(re.e(this.TAG,`Loader error, code = ${ze.code}, msg = ${ze.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Me=ne.UNRECOVERABLE_EARLY_EOF),Me){case ne.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let Ve=this._currentRange.to+1;Ve<this._totalLength&&(re.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(Ve,!1));return}Me=ne.UNRECOVERABLE_EARLY_EOF;break}case ne.UNRECOVERABLE_EARLY_EOF:case ne.CONNECTING_TIMEOUT:case ne.HTTP_STATUS_CODE_INVALID:case ne.EXCEPTION:break}if(this._onError)this._onError(Me,ze);else throw new te("IOException: "+ze.msg)}}var rt=He;const Ge={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function ct(){return Object.assign({},Ge)}class We{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Me=new rt({},ct()),ze=Me.loaderType;return Me.destroy(),ze=="fetch-stream-loader"||ze=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Me=new rt({},ct()),ze=Me.loaderType;return Me.destroy(),ze}static supportNativeMediaPlayback(Me){We.videoElement==null&&(We.videoElement=window.document.createElement("video"));let ze=We.videoElement.canPlayType(Me);return ze==="probably"||ze=="maybe"}static getFeatureList(){let Me={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Me.mseFlvPlayback=We.supportMSEH264Playback(),Me.networkStreamIO=We.supportNetworkStreamIO(),Me.networkLoaderName=We.getNetworkLoaderTypeName(),Me.mseLiveFlvPlayback=Me.mseFlvPlayback&&Me.networkStreamIO,Me.nativeMP4H264Playback=We.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Me.nativeWebmVP8Playback=We.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Me.nativeWebmVP9Playback=We.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Me}}var Ue=We,Je={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class $e{static get forceGlobalTag(){return re.FORCE_GLOBAL_TAG}static set forceGlobalTag(Me){re.FORCE_GLOBAL_TAG=Me,$e._notifyChange()}static get globalTag(){return re.GLOBAL_TAG}static set globalTag(Me){re.GLOBAL_TAG=Me,$e._notifyChange()}static get enableAll(){return re.ENABLE_VERBOSE&&re.ENABLE_DEBUG&&re.ENABLE_INFO&&re.ENABLE_WARN&&re.ENABLE_ERROR}static set enableAll(Me){re.ENABLE_VERBOSE=Me,re.ENABLE_DEBUG=Me,re.ENABLE_INFO=Me,re.ENABLE_WARN=Me,re.ENABLE_ERROR=Me,$e._notifyChange()}static get enableDebug(){return re.ENABLE_DEBUG}static set enableDebug(Me){re.ENABLE_DEBUG=Me,$e._notifyChange()}static get enableVerbose(){return re.ENABLE_VERBOSE}static set enableVerbose(Me){re.ENABLE_VERBOSE=Me,$e._notifyChange()}static get enableInfo(){return re.ENABLE_INFO}static set enableInfo(Me){re.ENABLE_INFO=Me,$e._notifyChange()}static get enableWarn(){return re.ENABLE_WARN}static set enableWarn(Me){re.ENABLE_WARN=Me,$e._notifyChange()}static get enableError(){return re.ENABLE_ERROR}static set enableError(Me){re.ENABLE_ERROR=Me,$e._notifyChange()}static getConfig(){return{globalTag:re.GLOBAL_TAG,forceGlobalTag:re.FORCE_GLOBAL_TAG,enableVerbose:re.ENABLE_VERBOSE,enableDebug:re.ENABLE_DEBUG,enableInfo:re.ENABLE_INFO,enableWarn:re.ENABLE_WARN,enableError:re.ENABLE_ERROR,enableCallback:re.ENABLE_CALLBACK}}static applyConfig(Me){re.GLOBAL_TAG=Me.globalTag,re.FORCE_GLOBAL_TAG=Me.forceGlobalTag,re.ENABLE_VERBOSE=Me.enableVerbose,re.ENABLE_DEBUG=Me.enableDebug,re.ENABLE_INFO=Me.enableInfo,re.ENABLE_WARN=Me.enableWarn,re.ENABLE_ERROR=Me.enableError,re.ENABLE_CALLBACK=Me.enableCallback}static _notifyChange(){let Me=$e.emitter;if(Me.listenerCount("change")>0){let ze=$e.getConfig();Me.emit("change",ze)}}static registerListener(Me){$e.emitter.addListener("change",Me)}static removeListener(Me){$e.emitter.removeListener("change",Me)}static addLogListener(Me){re.emitter.addListener("log",Me),re.emitter.listenerCount("log")>0&&(re.ENABLE_CALLBACK=!0,$e._notifyChange())}static removeLogListener(Me){re.emitter.removeListener("log",Me),re.emitter.listenerCount("log")===0&&(re.ENABLE_CALLBACK=!1,$e._notifyChange())}}$e.emitter=new(ce());var Qe=$e;class pt{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let Me=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,ze=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Me&&ze}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Me){if(this.keyframesIndex==null)return null;let ze=this.keyframesIndex,Ve=this._search(ze.times,Me);return{index:Ve,milliseconds:ze.times[Ve],fileposition:ze.filepositions[Ve]}}_search(Me,ze){let Ve=0,st=Me.length-1,yt=0,Ft=0,Mt=st;for(ze<Me[0]&&(Ve=0,Ft=Mt+1);Ft<=Mt;)if(yt=Ft+Math.floor((Mt-Ft)/2),yt===st||ze>=Me[yt]&&ze<Me[yt+1]){Ve=yt;break}else Me[yt]<ze?Ft=yt+1:Mt=yt-1;return Ve}}var ht=pt;function Pt(Qt,Me,ze){let Ve=Qt;if(Me+ze<Ve.length){for(;ze--;)if((Ve[++Me]&192)!==128)return!1;return!0}else return!1}function gt(Qt){let Me=[],ze=Qt,Ve=0,st=Qt.length;for(;Ve<st;){if(ze[Ve]<128){Me.push(String.fromCharCode(ze[Ve])),++Ve;continue}else if(!(ze[Ve]<192)){if(ze[Ve]<224){if(Pt(ze,Ve,1)){let yt=(ze[Ve]&31)<<6|ze[Ve+1]&63;if(yt>=128){Me.push(String.fromCharCode(yt&65535)),Ve+=2;continue}}}else if(ze[Ve]<240){if(Pt(ze,Ve,2)){let yt=(ze[Ve]&15)<<12|(ze[Ve+1]&63)<<6|ze[Ve+2]&63;if(yt>=2048&&(yt&63488)!==55296){Me.push(String.fromCharCode(yt&65535)),Ve+=3;continue}}}else if(ze[Ve]<248&&Pt(ze,Ve,3)){let yt=(ze[Ve]&7)<<18|(ze[Ve+1]&63)<<12|(ze[Ve+2]&63)<<6|ze[Ve+3]&63;if(yt>65536&&yt<1114112){yt-=65536,Me.push(String.fromCharCode(yt>>>10|55296)),Me.push(String.fromCharCode(yt&1023|56320)),Ve+=4;continue}}}Me.push("\uFFFD"),++Ve}return Me.join("")}var bt=gt;let St=function(){let Qt=new ArrayBuffer(2);return new DataView(Qt).setInt16(0,256,!0),new Int16Array(Qt)[0]===256}();class lt{static parseScriptData(Me,ze,Ve){let st={};try{let yt=lt.parseValue(Me,ze,Ve),Ft=lt.parseValue(Me,ze+yt.size,Ve-yt.size);st[yt.data]=Ft.data}catch(yt){re.e("AMF",yt.toString())}return st}static parseObject(Me,ze,Ve){if(Ve<3)throw new E("Data not enough when parse ScriptDataObject");let st=lt.parseString(Me,ze,Ve),yt=lt.parseValue(Me,ze+st.size,Ve-st.size),Ft=yt.objectEnd;return{data:{name:st.data,value:yt.data},size:st.size+yt.size,objectEnd:Ft}}static parseVariable(Me,ze,Ve){return lt.parseObject(Me,ze,Ve)}static parseString(Me,ze,Ve){if(Ve<2)throw new E("Data not enough when parse String");let yt=new DataView(Me,ze,Ve).getUint16(0,!St),Ft;return yt>0?Ft=bt(new Uint8Array(Me,ze+2,yt)):Ft="",{data:Ft,size:2+yt}}static parseLongString(Me,ze,Ve){if(Ve<4)throw new E("Data not enough when parse LongString");let yt=new DataView(Me,ze,Ve).getUint32(0,!St),Ft;return yt>0?Ft=bt(new Uint8Array(Me,ze+4,yt)):Ft="",{data:Ft,size:4+yt}}static parseDate(Me,ze,Ve){if(Ve<10)throw new E("Data size invalid when parse Date");let st=new DataView(Me,ze,Ve),yt=st.getFloat64(0,!St),Ft=st.getInt16(8,!St);return yt+=Ft*60*1e3,{data:new Date(yt),size:10}}static parseValue(Me,ze,Ve){if(Ve<1)throw new E("Data not enough when parse Value");let st=new DataView(Me,ze,Ve),yt=1,Ft=st.getUint8(0),Mt,jt=!1;try{switch(Ft){case 0:Mt=st.getFloat64(1,!St),yt+=8;break;case 1:{Mt=!!st.getUint8(1),yt+=1;break}case 2:{let qt=lt.parseString(Me,ze+1,Ve-1);Mt=qt.data,yt+=qt.size;break}case 3:{Mt={};let qt=0;for((st.getUint32(Ve-4,!St)&16777215)===9&&(qt=3);yt<Ve-4;){let wn=lt.parseObject(Me,ze+yt,Ve-yt-qt);if(wn.objectEnd)break;Mt[wn.data.name]=wn.data.value,yt+=wn.size}yt<=Ve-3&&(st.getUint32(yt-1,!St)&16777215)===9&&(yt+=3);break}case 8:{Mt={},yt+=4;let qt=0;for((st.getUint32(Ve-4,!St)&16777215)===9&&(qt=3);yt<Ve-8;){let wn=lt.parseVariable(Me,ze+yt,Ve-yt-qt);if(wn.objectEnd)break;Mt[wn.data.name]=wn.data.value,yt+=wn.size}yt<=Ve-3&&(st.getUint32(yt-1,!St)&16777215)===9&&(yt+=3);break}case 9:Mt=void 0,yt=1,jt=!0;break;case 10:{Mt=[];let qt=st.getUint32(1,!St);yt+=4;for(let wn=0;wn<qt;wn++){let Qn=lt.parseValue(Me,ze+yt,Ve-yt);Mt.push(Qn.data),yt+=Qn.size}break}case 11:{let qt=lt.parseDate(Me,ze+1,Ve-1);Mt=qt.data,yt+=qt.size;break}case 12:{let qt=lt.parseString(Me,ze+1,Ve-1);Mt=qt.data,yt+=qt.size;break}default:yt=Ve,re.w("AMF","Unsupported AMF value type "+Ft)}}catch(qt){re.e("AMF",qt.toString())}return{data:Mt,size:yt,objectEnd:jt}}}var _t=lt;class dt{constructor(Me){this.TAG="ExpGolomb",this._buffer=Me,this._buffer_index=0,this._total_bytes=Me.byteLength,this._total_bits=Me.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Me=this._total_bytes-this._buffer_index;if(Me<=0)throw new E("ExpGolomb: _fillCurrentWord() but no bytes available");let ze=Math.min(4,Me),Ve=new Uint8Array(4);Ve.set(this._buffer.subarray(this._buffer_index,this._buffer_index+ze)),this._current_word=new DataView(Ve.buffer).getUint32(0,!1),this._buffer_index+=ze,this._current_word_bits_left=ze*8}readBits(Me){if(Me>32)throw new y("ExpGolomb: readBits() bits exceeded max 32bits!");if(Me<=this._current_word_bits_left){let Ft=this._current_word>>>32-Me;return this._current_word<<=Me,this._current_word_bits_left-=Me,Ft}let ze=this._current_word_bits_left?this._current_word:0;ze=ze>>>32-this._current_word_bits_left;let Ve=Me-this._current_word_bits_left;this._fillCurrentWord();let st=Math.min(Ve,this._current_word_bits_left),yt=this._current_word>>>32-st;return this._current_word<<=st,this._current_word_bits_left-=st,ze=ze<<st|yt,ze}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Me;for(Me=0;Me<this._current_word_bits_left;Me++)if(this._current_word&2147483648>>>Me)return this._current_word<<=Me,this._current_word_bits_left-=Me,Me;return this._fillCurrentWord(),Me+this._skipLeadingZero()}readUEG(){let Me=this._skipLeadingZero();return this.readBits(Me+1)-1}readSEG(){let Me=this.readUEG();return Me&1?Me+1>>>1:-1*(Me>>>1)}}var nt=dt;class et{static _ebsp2rbsp(Me){let ze=Me,Ve=ze.byteLength,st=new Uint8Array(Ve),yt=0;for(let Ft=0;Ft<Ve;Ft++)Ft>=2&&ze[Ft]===3&&ze[Ft-1]===0&&ze[Ft-2]===0||(st[yt]=ze[Ft],yt++);return new Uint8Array(st.buffer,0,yt)}static parseSPS(Me){let ze=et._ebsp2rbsp(Me),Ve=new nt(ze);Ve.readByte();let st=Ve.readByte();Ve.readByte();let yt=Ve.readByte();Ve.readUEG();let Ft=et.getProfileString(st),Mt=et.getLevelString(yt),jt=1,qt=420,wn=[0,420,422,444],Qn=8;if((st===100||st===110||st===122||st===244||st===44||st===83||st===86||st===118||st===128||st===138||st===144)&&(jt=Ve.readUEG(),jt===3&&Ve.readBits(1),jt<=3&&(qt=wn[jt]),Qn=Ve.readUEG()+8,Ve.readUEG(),Ve.readBits(1),Ve.readBool())){let yr=jt!==3?8:12;for(let Nr=0;Nr<yr;Nr++)Ve.readBool()&&(Nr<6?et._skipScalingList(Ve,16):et._skipScalingList(Ve,64))}Ve.readUEG();let Rt=Ve.readUEG();if(Rt===0)Ve.readUEG();else if(Rt===1){Ve.readBits(1),Ve.readSEG(),Ve.readSEG();let yr=Ve.readUEG();for(let Nr=0;Nr<yr;Nr++)Ve.readSEG()}let Et=Ve.readUEG();Ve.readBits(1);let sn=Ve.readUEG(),Zt=Ve.readUEG(),Lt=Ve.readBits(1);Lt===0&&Ve.readBits(1),Ve.readBits(1);let zt=0,nn=0,rn=0,_n=0;Ve.readBool()&&(zt=Ve.readUEG(),nn=Ve.readUEG(),rn=Ve.readUEG(),_n=Ve.readUEG());let Ln=1,Kt=1,Xt=0,Cn=!0,Un=0,Zn=0;if(Ve.readBool()){if(Ve.readBool()){let yr=Ve.readByte(),Nr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Yr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];yr>0&&yr<16?(Ln=Nr[yr-1],Kt=Yr[yr-1]):yr===255&&(Ln=Ve.readByte()<<8|Ve.readByte(),Kt=Ve.readByte()<<8|Ve.readByte())}if(Ve.readBool()&&Ve.readBool(),Ve.readBool()&&(Ve.readBits(4),Ve.readBool()&&Ve.readBits(24)),Ve.readBool()&&(Ve.readUEG(),Ve.readUEG()),Ve.readBool()){let yr=Ve.readBits(32),Nr=Ve.readBits(32);Cn=Ve.readBool(),Un=Nr,Zn=yr*2,Xt=Un/Zn}}let Lr=1;(Ln!==1||Kt!==1)&&(Lr=Ln/Kt);let wr=0,tr=0;if(jt===0)wr=1,tr=2-Lt;else{let yr=jt===3?1:2,Nr=jt===1?2:1;wr=yr,tr=Nr*(2-Lt)}let zn=(sn+1)*16,cr=(2-Lt)*((Zt+1)*16);zn-=(zt+nn)*wr,cr-=(rn+_n)*tr;let Xn=Math.ceil(zn*Lr);return Ve.destroy(),Ve=null,{profile_string:Ft,level_string:Mt,bit_depth:Qn,ref_frames:Et,chroma_format:qt,chroma_format_string:et.getChromaFormatString(qt),frame_rate:{fixed:Cn,fps:Xt,fps_den:Zn,fps_num:Un},sar_ratio:{width:Ln,height:Kt},codec_size:{width:zn,height:cr},present_size:{width:Xn,height:cr}}}static _skipScalingList(Me,ze){let Ve=8,st=8,yt=0;for(let Ft=0;Ft<ze;Ft++)st!==0&&(yt=Me.readSEG(),st=(Ve+yt+256)%256),Ve=st===0?Ve:st}static getProfileString(Me){switch(Me){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(Me){return(Me/10).toFixed(1)}static getChromaFormatString(Me){switch(Me){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var ft=et,Tt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Re(Qt){return Qt>>>8&255|(Qt&255)<<8}function Le(Qt){return(Qt&4278190080)>>>24|(Qt&16711680)>>>8|(Qt&65280)<<8|(Qt&255)<<24}function Te(Qt,Me){return Qt[Me]<<24|Qt[Me+1]<<16|Qt[Me+2]<<8|Qt[Me+3]}class je{constructor(Me,ze){this.TAG="FLVDemuxer",this._config=ze,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Me.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Me.hasAudioTrack,this._hasVideo=Me.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new ht,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let Ve=new ArrayBuffer(2);return new DataView(Ve).setInt16(0,256,!0),new Int16Array(Ve)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(Me){let ze=new Uint8Array(Me),Ve={match:!1};if(ze[0]!==70||ze[1]!==76||ze[2]!==86||ze[3]!==1)return Ve;let st=(ze[4]&4)>>>2!==0,yt=(ze[4]&1)!==0,Ft=Te(ze,5);return Ft<9?Ve:{match:!0,consumed:Ft,dataOffset:Ft,hasAudioTrack:st,hasVideoTrack:yt}}bindDataSource(Me){return Me.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Me){this._onTrackMetadata=Me}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Me){this._onMediaInfo=Me}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Me){this._onMetaDataArrived=Me}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Me){this._onScriptDataArrived=Me}get onError(){return this._onError}set onError(Me){this._onError=Me}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Me){this._onDataAvailable=Me}get timestampBase(){return this._timestampBase}set timestampBase(Me){this._timestampBase=Me}get overridedDuration(){return this._duration}set overridedDuration(Me){this._durationOverrided=!0,this._duration=Me,this._mediaInfo.duration=Me}set overridedHasAudio(Me){this._hasAudioFlagOverrided=!0,this._hasAudio=Me,this._mediaInfo.hasAudio=Me}set overridedHasVideo(Me){this._hasVideoFlagOverrided=!0,this._hasVideo=Me,this._mediaInfo.hasVideo=Me}resetMediaInfo(){this._mediaInfo=new ht}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Me,ze){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new E("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let Ve=0,st=this._littleEndian;if(ze===0)if(Me.byteLength>13)Ve=je.probe(Me).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,ze+Ve!==this._dataOffset&&re.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Me,Ve).getUint32(0,!st)!==0&&re.w(this.TAG,"PrevTagSize0 !== 0 !!!"),Ve+=4);Ve<Me.byteLength;){this._dispatch=!0;let yt=new DataView(Me,Ve);if(Ve+11+4>Me.byteLength)break;let Ft=yt.getUint8(0),Mt=yt.getUint32(0,!st)&16777215;if(Ve+11+Mt+4>Me.byteLength)break;if(Ft!==8&&Ft!==9&&Ft!==18){re.w(this.TAG,`Unsupported tag type ${Ft}, skipped`),Ve+=11+Mt+4;continue}let jt=yt.getUint8(4),qt=yt.getUint8(5),wn=yt.getUint8(6),Qn=yt.getUint8(7),Rt=wn|qt<<8|jt<<16|Qn<<24;(yt.getUint32(7,!st)&16777215)!==0&&re.w(this.TAG,"Meet tag which has StreamID != 0!");let sn=Ve+11;switch(Ft){case 8:this._parseAudioData(Me,sn,Mt,Rt);break;case 9:this._parseVideoData(Me,sn,Mt,Rt,ze+Ve);break;case 18:this._parseScriptData(Me,sn,Mt);break}let Zt=yt.getUint32(11+Mt,!st);Zt!==11+Mt&&re.w(this.TAG,`Invalid PrevTagSize ${Zt}`),Ve+=11+Mt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),Ve}_parseScriptData(Me,ze,Ve){let st=_t.parseScriptData(Me,ze,Ve);if(st.hasOwnProperty("onMetaData")){if(st.onMetaData==null||typeof st.onMetaData!="object"){re.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&re.w(this.TAG,"Found another onMetaData tag!"),this._metadata=st;let yt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},yt)),typeof yt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=yt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof yt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=yt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof yt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=yt.audiodatarate),typeof yt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=yt.videodatarate),typeof yt.width=="number"&&(this._mediaInfo.width=yt.width),typeof yt.height=="number"&&(this._mediaInfo.height=yt.height),typeof yt.duration=="number"){if(!this._durationOverrided){let Ft=Math.floor(yt.duration*this._timescale);this._duration=Ft,this._mediaInfo.duration=Ft}}else this._mediaInfo.duration=0;if(typeof yt.framerate=="number"){let Ft=Math.floor(yt.framerate*1e3);if(Ft>0){let Mt=Ft/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=Mt,this._referenceFrameRate.fps_num=Ft,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=Mt}}if(typeof yt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Ft=yt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Ft),yt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=yt,re.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(st).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},st))}_parseKeyframesIndex(Me){let ze=[],Ve=[];for(let st=1;st<Me.times.length;st++){let yt=this._timestampBase+Math.floor(Me.times[st]*1e3);ze.push(yt),Ve.push(Me.filepositions[st])}return{times:ze,filepositions:Ve}}_parseAudioData(Me,ze,Ve,st){if(Ve<=1){re.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let yt=this._littleEndian,Mt=new DataView(Me,ze,Ve).getUint8(0),jt=Mt>>>4;if(jt!==2&&jt!==10){this._onError(Tt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+jt);return}let qt=0,wn=(Mt&12)>>>2;if(wn>=0&&wn<=4)qt=this._flvSoundRateTable[wn];else{this._onError(Tt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+wn);return}let Qn=(Mt&2)>>>1,Rt=Mt&1,Et=this._audioMetadata,sn=this._audioTrack;if(Et||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Et=this._audioMetadata={},Et.type="audio",Et.id=sn.id,Et.timescale=this._timescale,Et.duration=this._duration,Et.audioSampleRate=qt,Et.channelCount=Rt===0?1:2),jt===10){let Zt=this._parseAACAudioData(Me,ze+1,Ve-1);if(Zt==null)return;if(Zt.packetType===0){Et.config&&re.w(this.TAG,"Found another AudioSpecificConfig!");let Lt=Zt.data;Et.audioSampleRate=Lt.samplingRate,Et.channelCount=Lt.channelCount,Et.codec=Lt.codec,Et.originalCodec=Lt.originalCodec,Et.config=Lt.config,Et.refSampleDuration=1024/Et.audioSampleRate*Et.timescale,re.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Et);let zt=this._mediaInfo;zt.audioCodec=Et.originalCodec,zt.audioSampleRate=Et.audioSampleRate,zt.audioChannelCount=Et.channelCount,zt.hasVideo?zt.videoCodec!=null&&(zt.mimeType='video/x-flv; codecs="'+zt.videoCodec+","+zt.audioCodec+'"'):zt.mimeType='video/x-flv; codecs="'+zt.audioCodec+'"',zt.isComplete()&&this._onMediaInfo(zt)}else if(Zt.packetType===1){let Lt=this._timestampBase+st,zt={unit:Zt.data,length:Zt.data.byteLength,dts:Lt,pts:Lt};sn.samples.push(zt),sn.length+=Zt.data.length}else re.e(this.TAG,`Flv: Unsupported AAC data type ${Zt.packetType}`)}else if(jt===2){if(!Et.codec){let nn=this._parseMP3AudioData(Me,ze+1,Ve-1,!0);if(nn==null)return;Et.audioSampleRate=nn.samplingRate,Et.channelCount=nn.channelCount,Et.codec=nn.codec,Et.originalCodec=nn.originalCodec,Et.refSampleDuration=1152/Et.audioSampleRate*Et.timescale,re.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Et);let rn=this._mediaInfo;rn.audioCodec=Et.codec,rn.audioSampleRate=Et.audioSampleRate,rn.audioChannelCount=Et.channelCount,rn.audioDataRate=nn.bitRate,rn.hasVideo?rn.videoCodec!=null&&(rn.mimeType='video/x-flv; codecs="'+rn.videoCodec+","+rn.audioCodec+'"'):rn.mimeType='video/x-flv; codecs="'+rn.audioCodec+'"',rn.isComplete()&&this._onMediaInfo(rn)}let Zt=this._parseMP3AudioData(Me,ze+1,Ve-1,!1);if(Zt==null)return;let Lt=this._timestampBase+st,zt={unit:Zt,length:Zt.byteLength,dts:Lt,pts:Lt};sn.samples.push(zt),sn.length+=Zt.length}}_parseAACAudioData(Me,ze,Ve){if(Ve<=1){re.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let st={},yt=new Uint8Array(Me,ze,Ve);return st.packetType=yt[0],yt[0]===0?st.data=this._parseAACAudioSpecificConfig(Me,ze+1,Ve-1):st.data=yt.subarray(1),st}_parseAACAudioSpecificConfig(Me,ze,Ve){let st=new Uint8Array(Me,ze,Ve),yt=null,Ft=0,Mt=0,jt=null,qt=0,wn=null;if(Ft=Mt=st[0]>>>3,qt=(st[0]&7)<<1|st[1]>>>7,qt<0||qt>=this._mpegSamplingRates.length){this._onError(Tt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Qn=this._mpegSamplingRates[qt],Rt=(st[1]&120)>>>3;if(Rt<0||Rt>=8){this._onError(Tt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Ft===5&&(wn=(st[1]&7)<<1|st[2]>>>7,jt=(st[2]&124)>>>2);let Et=self.navigator.userAgent.toLowerCase();return Et.indexOf("firefox")!==-1?qt>=6?(Ft=5,yt=new Array(4),wn=qt-3):(Ft=2,yt=new Array(2),wn=qt):Et.indexOf("android")!==-1?(Ft=2,yt=new Array(2),wn=qt):(Ft=5,wn=qt,yt=new Array(4),qt>=6?wn=qt-3:Rt===1&&(Ft=2,yt=new Array(2),wn=qt)),yt[0]=Ft<<3,yt[0]|=(qt&15)>>>1,yt[1]=(qt&15)<<7,yt[1]|=(Rt&15)<<3,Ft===5&&(yt[1]|=(wn&15)>>>1,yt[2]=(wn&1)<<7,yt[2]|=8,yt[3]=0),{config:yt,samplingRate:Qn,channelCount:Rt,codec:"mp4a.40."+Ft,originalCodec:"mp4a.40."+Mt}}_parseMP3AudioData(Me,ze,Ve,st){if(Ve<4){re.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let yt=this._littleEndian,Ft=new Uint8Array(Me,ze,Ve),Mt=null;if(st){if(Ft[0]!==255)return;let jt=Ft[1]>>>3&3,qt=(Ft[1]&6)>>1,wn=(Ft[2]&240)>>>4,Qn=(Ft[2]&12)>>>2,Et=(Ft[3]>>>6&3)!==3?2:1,sn=0,Zt=0,Lt=34,zt="mp3";switch(jt){case 0:sn=this._mpegAudioV25SampleRateTable[Qn];break;case 2:sn=this._mpegAudioV20SampleRateTable[Qn];break;case 3:sn=this._mpegAudioV10SampleRateTable[Qn];break}switch(qt){case 1:Lt=34,wn<this._mpegAudioL3BitRateTable.length&&(Zt=this._mpegAudioL3BitRateTable[wn]);break;case 2:Lt=33,wn<this._mpegAudioL2BitRateTable.length&&(Zt=this._mpegAudioL2BitRateTable[wn]);break;case 3:Lt=32,wn<this._mpegAudioL1BitRateTable.length&&(Zt=this._mpegAudioL1BitRateTable[wn]);break}Mt={bitRate:Zt,samplingRate:sn,channelCount:Et,codec:zt,originalCodec:zt}}else Mt=Ft;return Mt}_parseVideoData(Me,ze,Ve,st,yt){if(Ve<=1){re.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Ft=new Uint8Array(Me,ze,Ve)[0],Mt=(Ft&240)>>>4,jt=Ft&15;if(jt!==7){this._onError(Tt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${jt}`);return}this._parseAVCVideoPacket(Me,ze+1,Ve-1,st,yt,Mt)}_parseAVCVideoPacket(Me,ze,Ve,st,yt,Ft){if(Ve<4){re.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let Mt=this._littleEndian,jt=new DataView(Me,ze,Ve),qt=jt.getUint8(0),Qn=(jt.getUint32(0,!Mt)&16777215)<<8>>8;if(qt===0)this._parseAVCDecoderConfigurationRecord(Me,ze+4,Ve-4);else if(qt===1)this._parseAVCVideoData(Me,ze+4,Ve-4,st,yt,Ft,Qn);else if(qt!==2){this._onError(Tt.FORMAT_ERROR,`Flv: Invalid video packet type ${qt}`);return}}_parseAVCDecoderConfigurationRecord(Me,ze,Ve){if(Ve<7){re.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let st=this._videoMetadata,yt=this._videoTrack,Ft=this._littleEndian,Mt=new DataView(Me,ze,Ve);st?typeof st.avcc!="undefined"&&re.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),st=this._videoMetadata={},st.type="video",st.id=yt.id,st.timescale=this._timescale,st.duration=this._duration);let jt=Mt.getUint8(0),qt=Mt.getUint8(1),wn=Mt.getUint8(2),Qn=Mt.getUint8(3);if(jt!==1||qt===0){this._onError(Tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(Mt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Tt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let Rt=Mt.getUint8(5)&31;if(Rt===0){this._onError(Tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else Rt>1&&re.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${Rt}`);let Et=6;for(let Zt=0;Zt<Rt;Zt++){let Lt=Mt.getUint16(Et,!Ft);if(Et+=2,Lt===0)continue;let zt=new Uint8Array(Me,ze+Et,Lt);Et+=Lt;let nn=ft.parseSPS(zt);if(Zt!==0)continue;st.codecWidth=nn.codec_size.width,st.codecHeight=nn.codec_size.height,st.presentWidth=nn.present_size.width,st.presentHeight=nn.present_size.height,st.profile=nn.profile_string,st.level=nn.level_string,st.bitDepth=nn.bit_depth,st.chromaFormat=nn.chroma_format,st.sarRatio=nn.sar_ratio,st.frameRate=nn.frame_rate,(nn.frame_rate.fixed===!1||nn.frame_rate.fps_num===0||nn.frame_rate.fps_den===0)&&(st.frameRate=this._referenceFrameRate);let rn=st.frameRate.fps_den,_n=st.frameRate.fps_num;st.refSampleDuration=st.timescale*(rn/_n);let xn=zt.subarray(1,4),Ln="avc1.";for(let Xt=0;Xt<3;Xt++){let Cn=xn[Xt].toString(16);Cn.length<2&&(Cn="0"+Cn),Ln+=Cn}st.codec=Ln;let Kt=this._mediaInfo;Kt.width=st.codecWidth,Kt.height=st.codecHeight,Kt.fps=st.frameRate.fps,Kt.profile=st.profile,Kt.level=st.level,Kt.refFrames=nn.ref_frames,Kt.chromaFormat=nn.chroma_format_string,Kt.sarNum=st.sarRatio.width,Kt.sarDen=st.sarRatio.height,Kt.videoCodec=Ln,Kt.hasAudio?Kt.audioCodec!=null&&(Kt.mimeType='video/x-flv; codecs="'+Kt.videoCodec+","+Kt.audioCodec+'"'):Kt.mimeType='video/x-flv; codecs="'+Kt.videoCodec+'"',Kt.isComplete()&&this._onMediaInfo(Kt)}let sn=Mt.getUint8(Et);if(sn===0){this._onError(Tt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else sn>1&&re.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${sn}`);Et++;for(let Zt=0;Zt<sn;Zt++){let Lt=Mt.getUint16(Et,!Ft);Et+=2,Lt!==0&&(Et+=Lt)}st.avcc=new Uint8Array(Ve),st.avcc.set(new Uint8Array(Me,ze,Ve),0),re.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",st)}_parseAVCVideoData(Me,ze,Ve,st,yt,Ft,Mt){let jt=this._littleEndian,qt=new DataView(Me,ze,Ve),wn=[],Qn=0,Rt=0;const Et=this._naluLengthSize;let sn=this._timestampBase+st,Zt=Ft===1;for(;Rt<Ve;){if(Rt+4>=Ve){re.w(this.TAG,`Malformed Nalu near timestamp ${sn}, offset = ${Rt}, dataSize = ${Ve}`);break}let Lt=qt.getUint32(Rt,!jt);if(Et===3&&(Lt>>>=8),Lt>Ve-Et){re.w(this.TAG,`Malformed Nalus near timestamp ${sn}, NaluSize > DataSize!`);return}let zt=qt.getUint8(Rt+Et)&31;zt===5&&(Zt=!0);let nn=new Uint8Array(Me,ze+Rt,Et+Lt),rn={type:zt,data:nn};wn.push(rn),Qn+=nn.byteLength,Rt+=Et+Lt}if(wn.length){let Lt=this._videoTrack,zt={units:wn,length:Qn,isKeyframe:Zt,dts:sn,cts:Mt,pts:sn+Mt};Zt&&(zt.fileposition=yt),Lt.samples.push(zt),Lt.length+=Qn}}}var ye=je;class le{static init(){le.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let ze in le.types)le.types.hasOwnProperty(ze)&&(le.types[ze]=[ze.charCodeAt(0),ze.charCodeAt(1),ze.charCodeAt(2),ze.charCodeAt(3)]);let Me=le.constants={};Me.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Me.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Me.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Me.STSC=Me.STCO=Me.STTS,Me.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Me.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Me.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Me.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Me.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Me.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Me){let ze=8,Ve=null,st=Array.prototype.slice.call(arguments,1),yt=st.length;for(let Mt=0;Mt<yt;Mt++)ze+=st[Mt].byteLength;Ve=new Uint8Array(ze),Ve[0]=ze>>>24&255,Ve[1]=ze>>>16&255,Ve[2]=ze>>>8&255,Ve[3]=ze&255,Ve.set(Me,4);let Ft=8;for(let Mt=0;Mt<yt;Mt++)Ve.set(st[Mt],Ft),Ft+=st[Mt].byteLength;return Ve}static generateInitSegment(Me){let ze=le.box(le.types.ftyp,le.constants.FTYP),Ve=le.moov(Me),st=new Uint8Array(ze.byteLength+Ve.byteLength);return st.set(ze,0),st.set(Ve,ze.byteLength),st}static moov(Me){let ze=le.mvhd(Me.timescale,Me.duration),Ve=le.trak(Me),st=le.mvex(Me);return le.box(le.types.moov,ze,Ve,st)}static mvhd(Me,ze){return le.box(le.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Me>>>24&255,Me>>>16&255,Me>>>8&255,Me&255,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(Me){return le.box(le.types.trak,le.tkhd(Me),le.mdia(Me))}static tkhd(Me){let ze=Me.id,Ve=Me.duration,st=Me.presentWidth,yt=Me.presentHeight;return le.box(le.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255,0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,st>>>8&255,st&255,0,0,yt>>>8&255,yt&255,0,0]))}static mdia(Me){return le.box(le.types.mdia,le.mdhd(Me),le.hdlr(Me),le.minf(Me))}static mdhd(Me){let ze=Me.timescale,Ve=Me.duration;return le.box(le.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255,85,196,0,0]))}static hdlr(Me){let ze=null;return Me.type==="audio"?ze=le.constants.HDLR_AUDIO:ze=le.constants.HDLR_VIDEO,le.box(le.types.hdlr,ze)}static minf(Me){let ze=null;return Me.type==="audio"?ze=le.box(le.types.smhd,le.constants.SMHD):ze=le.box(le.types.vmhd,le.constants.VMHD),le.box(le.types.minf,ze,le.dinf(),le.stbl(Me))}static dinf(){return le.box(le.types.dinf,le.box(le.types.dref,le.constants.DREF))}static stbl(Me){return le.box(le.types.stbl,le.stsd(Me),le.box(le.types.stts,le.constants.STTS),le.box(le.types.stsc,le.constants.STSC),le.box(le.types.stsz,le.constants.STSZ),le.box(le.types.stco,le.constants.STCO))}static stsd(Me){return Me.type==="audio"?Me.codec==="mp3"?le.box(le.types.stsd,le.constants.STSD_PREFIX,le.mp3(Me)):le.box(le.types.stsd,le.constants.STSD_PREFIX,le.mp4a(Me)):le.box(le.types.stsd,le.constants.STSD_PREFIX,le.avc1(Me))}static mp3(Me){let ze=Me.channelCount,Ve=Me.audioSampleRate,st=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,ze,0,16,0,0,0,0,Ve>>>8&255,Ve&255,0,0]);return le.box(le.types[".mp3"],st)}static mp4a(Me){let ze=Me.channelCount,Ve=Me.audioSampleRate,st=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,ze,0,16,0,0,0,0,Ve>>>8&255,Ve&255,0,0]);return le.box(le.types.mp4a,st,le.esds(Me))}static esds(Me){let ze=Me.config||[],Ve=ze.length,st=new Uint8Array([0,0,0,0,3,23+Ve,0,1,0,4,15+Ve,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([Ve]).concat(ze).concat([6,1,2]));return le.box(le.types.esds,st)}static avc1(Me){let ze=Me.avcc,Ve=Me.codecWidth,st=Me.codecHeight,yt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,Ve>>>8&255,Ve&255,st>>>8&255,st&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return le.box(le.types.avc1,yt,le.box(le.types.avcC,ze))}static mvex(Me){return le.box(le.types.mvex,le.trex(Me))}static trex(Me){let ze=Me.id,Ve=new Uint8Array([0,0,0,0,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return le.box(le.types.trex,Ve)}static moof(Me,ze){return le.box(le.types.moof,le.mfhd(Me.sequenceNumber),le.traf(Me,ze))}static mfhd(Me){let ze=new Uint8Array([0,0,0,0,Me>>>24&255,Me>>>16&255,Me>>>8&255,Me&255]);return le.box(le.types.mfhd,ze)}static traf(Me,ze){let Ve=Me.id,st=le.box(le.types.tfhd,new Uint8Array([0,0,0,0,Ve>>>24&255,Ve>>>16&255,Ve>>>8&255,Ve&255])),yt=le.box(le.types.tfdt,new Uint8Array([0,0,0,0,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255])),Ft=le.sdtp(Me),Mt=le.trun(Me,Ft.byteLength+16+16+8+16+8+8);return le.box(le.types.traf,st,yt,Mt,Ft)}static sdtp(Me){let ze=Me.samples||[],Ve=ze.length,st=new Uint8Array(4+Ve);for(let yt=0;yt<Ve;yt++){let Ft=ze[yt].flags;st[yt+4]=Ft.isLeading<<6|Ft.dependsOn<<4|Ft.isDependedOn<<2|Ft.hasRedundancy}return le.box(le.types.sdtp,st)}static trun(Me,ze){let Ve=Me.samples||[],st=Ve.length,yt=12+16*st,Ft=new Uint8Array(yt);ze+=8+yt,Ft.set([0,0,15,1,st>>>24&255,st>>>16&255,st>>>8&255,st&255,ze>>>24&255,ze>>>16&255,ze>>>8&255,ze&255],0);for(let Mt=0;Mt<st;Mt++){let jt=Ve[Mt].duration,qt=Ve[Mt].size,wn=Ve[Mt].flags,Qn=Ve[Mt].cts;Ft.set([jt>>>24&255,jt>>>16&255,jt>>>8&255,jt&255,qt>>>24&255,qt>>>16&255,qt>>>8&255,qt&255,wn.isLeading<<2|wn.dependsOn,wn.isDependedOn<<6|wn.hasRedundancy<<4|wn.isNonSync,0,0,Qn>>>24&255,Qn>>>16&255,Qn>>>8&255,Qn&255],12+16*Mt)}return le.box(le.types.trun,Ft)}static mdat(Me){return le.box(le.types.mdat,Me)}}le.init();var _e=le;class Ne{static getSilentFrame(Me,ze){if(Me==="mp4a.40.2"){if(ze===1)return new Uint8Array([0,200,0,128,35,128]);if(ze===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(ze===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(ze===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(ze===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(ze===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(ze===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(ze===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(ze===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var Ye=Ne;class Oe{constructor(Me,ze,Ve,st,yt){this.dts=Me,this.pts=ze,this.duration=Ve,this.originalDts=st,this.isSyncPoint=yt,this.fileposition=null}}class tt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(Me){Me.isSyncPoint=!0,this.syncPoints.push(Me)}}class Ct{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Me){let ze=this._list;Me.length!==0&&(ze.length>0&&Me[0].originalDts<ze[ze.length-1].originalDts&&this.clear(),Array.prototype.push.apply(ze,Me))}getLastSyncPointBeforeDts(Me){if(this._list.length==0)return null;let ze=this._list,Ve=0,st=ze.length-1,yt=0,Ft=0,Mt=st;for(Me<ze[0].dts&&(Ve=0,Ft=Mt+1);Ft<=Mt;)if(yt=Ft+Math.floor((Mt-Ft)/2),yt===st||Me>=ze[yt].dts&&Me<ze[yt+1].dts){Ve=yt;break}else ze[yt].dts<Me?Ft=yt+1:Mt=yt-1;return this._list[Ve]}}class Nt{constructor(Me){this._type=Me,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(Me){let ze=this._list;if(ze.length===0)return-2;let Ve=ze.length-1,st=0,yt=0,Ft=Ve,Mt=0;if(Me<ze[0].originalBeginDts)return Mt=-1,Mt;for(;yt<=Ft;)if(st=yt+Math.floor((Ft-yt)/2),st===Ve||Me>ze[st].lastSample.originalDts&&Me<ze[st+1].originalBeginDts){Mt=st;break}else ze[st].originalBeginDts<Me?yt=st+1:Ft=st-1;return Mt}_searchNearestSegmentAfter(Me){return this._searchNearestSegmentBefore(Me)+1}append(Me){let ze=this._list,Ve=Me,st=this._lastAppendLocation,yt=0;st!==-1&&st<ze.length&&Ve.originalBeginDts>=ze[st].lastSample.originalDts&&(st===ze.length-1||st<ze.length-1&&Ve.originalBeginDts<ze[st+1].originalBeginDts)?yt=st+1:ze.length>0&&(yt=this._searchNearestSegmentBefore(Ve.originalBeginDts)+1),this._lastAppendLocation=yt,this._list.splice(yt,0,Ve)}getLastSegmentBefore(Me){let ze=this._searchNearestSegmentBefore(Me);return ze>=0?this._list[ze]:null}getLastSampleBefore(Me){let ze=this.getLastSegmentBefore(Me);return ze!=null?ze.lastSample:null}getLastSyncPointBefore(Me){let ze=this._searchNearestSegmentBefore(Me),Ve=this._list[ze].syncPoints;for(;Ve.length===0&&ze>0;)ze--,Ve=this._list[ze].syncPoints;return Ve.length>0?Ve[Ve.length-1]:null}}class Dt{constructor(Me){this.TAG="MP4Remuxer",this._config=Me,this._isLive=Me.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Nt("audio"),this._videoSegmentInfoList=new Nt("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(Se.chrome&&(Se.version.major<50||Se.version.major===50&&Se.version.build<2661)),this._fillSilentAfterSeek=Se.msedge||Se.msie,this._mp3UseMpegAudio=!Se.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(Me){return Me.onDataAvailable=this.remux.bind(this),Me.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Me){this._onInitSegment=Me}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Me){this._onMediaSegment=Me}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Me){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Me,ze){if(!this._onMediaSegment)throw new E("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Me,ze),this._remuxVideo(ze),this._remuxAudio(Me)}_onTrackMetadataReceived(Me,ze){let Ve=null,st="mp4",yt=ze.codec;if(Me==="audio")this._audioMeta=ze,ze.codec==="mp3"&&this._mp3UseMpegAudio?(st="mpeg",yt="",Ve=new Uint8Array):Ve=_e.generateInitSegment(ze);else if(Me==="video")this._videoMeta=ze,Ve=_e.generateInitSegment(ze);else return;if(!this._onInitSegment)throw new E("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Me,{type:Me,data:Ve.buffer,codec:yt,container:`${Me}/${st}`,mediaDuration:ze.duration})}_calculateDtsBase(Me,ze){this._dtsBaseInited||(Me.samples&&Me.samples.length&&(this._audioDtsBase=Me.samples[0].dts),ze.samples&&ze.samples.length&&(this._videoDtsBase=ze.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Me=this._videoStashedLastSample,ze=this._audioStashedLastSample,Ve={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Me!=null&&(Ve.samples.push(Me),Ve.length=Me.length);let st={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};ze!=null&&(st.samples.push(ze),st.length=ze.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(Ve,!0),this._remuxAudio(st,!0)}_remuxAudio(Me,ze){if(this._audioMeta==null)return;let Ve=Me,st=Ve.samples,yt,Ft=-1,Mt=-1,jt=-1,qt=this._audioMeta.refSampleDuration,wn=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Qn=this._dtsBaseInited&&this._audioNextDts===void 0,Rt=!1;if(!st||st.length===0||st.length===1&&!ze)return;let Et=0,sn=null,Zt=0;wn?(Et=0,Zt=Ve.length):(Et=8,Zt=8+Ve.length);let Lt=null;if(st.length>1&&(Lt=st.pop(),Zt-=Lt.length),this._audioStashedLastSample!=null){let Kt=this._audioStashedLastSample;this._audioStashedLastSample=null,st.unshift(Kt),Zt+=Kt.length}Lt!=null&&(this._audioStashedLastSample=Lt);let zt=st[0].dts-this._dtsBase;if(this._audioNextDts)yt=zt-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())yt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(Rt=!0);else{let Kt=this._audioSegmentInfoList.getLastSampleBefore(zt);if(Kt!=null){let Xt=zt-(Kt.originalDts+Kt.duration);Xt<=3&&(Xt=0);let Cn=Kt.dts+Kt.duration+Xt;yt=zt-Cn}else yt=0}if(Rt){let Kt=zt-yt,Xt=this._videoSegmentInfoList.getLastSegmentBefore(zt);if(Xt!=null&&Xt.beginDts<Kt){let Cn=Ye.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Cn){let Un=Xt.beginDts,Zn=Kt-Xt.beginDts;re.v(this.TAG,`InsertPrefixSilentAudio: dts: ${Un}, duration: ${Zn}`),st.unshift({unit:Cn,dts:Un,pts:Un}),Zt+=Cn.byteLength}}else Rt=!1}let nn=[];for(let Kt=0;Kt<st.length;Kt++){let Xt=st[Kt],Cn=Xt.unit,Un=Xt.dts-this._dtsBase,Zn=Un-yt;Ft===-1&&(Ft=Zn);let er=0;Kt!==st.length-1?er=st[Kt+1].dts-this._dtsBase-yt-Zn:Lt!=null?er=Lt.dts-this._dtsBase-yt-Zn:nn.length>=1?er=nn[nn.length-1].duration:er=Math.floor(qt);let Lr=!1,wr=null;if(er>qt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!Se.safari){Lr=!0;let tr=Math.abs(er-qt),zn=Math.ceil(tr/qt),cr=Zn+qt;re.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
dts: ${Zn+er} ms, expected: ${Zn+Math.round(qt)} ms, delta: ${Math.round(tr)} ms, generate: ${zn} frames`);let Xn=Ye.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);Xn==null&&(re.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),Xn=Cn),wr=[];for(let Nr=0;Nr<zn;Nr++){let Yr=Math.round(cr);if(wr.length>0){let _i=wr[wr.length-1];_i.duration=Yr-_i.dts}let pi={dts:Yr,pts:Yr,cts:0,unit:Xn,size:Xn.byteLength,duration:0,originalDts:Un,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};wr.push(pi),Zt+=pi.size,cr+=qt}let yr=wr[wr.length-1];yr.duration=Zn+er-yr.dts,er=Math.round(qt)}nn.push({dts:Zn,pts:Zn,cts:0,unit:Xt.unit,size:Xt.unit.byteLength,duration:er,originalDts:Un,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Lr&&nn.push.apply(nn,wr)}wn?sn=new Uint8Array(Zt):(sn=new Uint8Array(Zt),sn[0]=Zt>>>24&255,sn[1]=Zt>>>16&255,sn[2]=Zt>>>8&255,sn[3]=Zt&255,sn.set(_e.types.mdat,4));for(let Kt=0;Kt<nn.length;Kt++){let Xt=nn[Kt].unit;sn.set(Xt,Et),Et+=Xt.byteLength}let rn=nn[nn.length-1];Mt=rn.dts+rn.duration,this._audioNextDts=Mt;let _n=new tt;_n.beginDts=Ft,_n.endDts=Mt,_n.beginPts=Ft,_n.endPts=Mt,_n.originalBeginDts=nn[0].originalDts,_n.originalEndDts=rn.originalDts+rn.duration,_n.firstSample=new Oe(nn[0].dts,nn[0].pts,nn[0].duration,nn[0].originalDts,!1),_n.lastSample=new Oe(rn.dts,rn.pts,rn.duration,rn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(_n),Ve.samples=nn,Ve.sequenceNumber++;let xn=null;wn?xn=new Uint8Array:xn=_e.moof(Ve,Ft),Ve.samples=[],Ve.length=0;let Ln={type:"audio",data:this._mergeBoxes(xn,sn).buffer,sampleCount:nn.length,info:_n};wn&&Qn&&(Ln.timestampOffset=Ft),this._onMediaSegment("audio",Ln)}_remuxVideo(Me,ze){if(this._videoMeta==null)return;let Ve=Me,st=Ve.samples,yt,Ft=-1,Mt=-1,jt=-1,qt=-1;if(!st||st.length===0||st.length===1&&!ze)return;let wn=8,Qn=null,Rt=8+Me.length,Et=null;if(st.length>1&&(Et=st.pop(),Rt-=Et.length),this._videoStashedLastSample!=null){let rn=this._videoStashedLastSample;this._videoStashedLastSample=null,st.unshift(rn),Rt+=rn.length}Et!=null&&(this._videoStashedLastSample=Et);let sn=st[0].dts-this._dtsBase;if(this._videoNextDts)yt=sn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())yt=0;else{let rn=this._videoSegmentInfoList.getLastSampleBefore(sn);if(rn!=null){let _n=sn-(rn.originalDts+rn.duration);_n<=3&&(_n=0);let xn=rn.dts+rn.duration+_n;yt=sn-xn}else yt=0}let Zt=new tt,Lt=[];for(let rn=0;rn<st.length;rn++){let _n=st[rn],xn=_n.dts-this._dtsBase,Ln=_n.isKeyframe,Kt=xn-yt,Xt=_n.cts,Cn=Kt+Xt;Ft===-1&&(Ft=Kt,jt=Cn);let Un=0;if(rn!==st.length-1?Un=st[rn+1].dts-this._dtsBase-yt-Kt:Et!=null?Un=Et.dts-this._dtsBase-yt-Kt:Lt.length>=1?Un=Lt[Lt.length-1].duration:Un=Math.floor(this._videoMeta.refSampleDuration),Ln){let Zn=new Oe(Kt,Cn,Un,_n.dts,!0);Zn.fileposition=_n.fileposition,Zt.appendSyncPoint(Zn)}Lt.push({dts:Kt,pts:Cn,cts:Xt,units:_n.units,size:_n.length,isKeyframe:Ln,duration:Un,originalDts:xn,flags:{isLeading:0,dependsOn:Ln?2:1,isDependedOn:Ln?1:0,hasRedundancy:0,isNonSync:Ln?0:1}})}Qn=new Uint8Array(Rt),Qn[0]=Rt>>>24&255,Qn[1]=Rt>>>16&255,Qn[2]=Rt>>>8&255,Qn[3]=Rt&255,Qn.set(_e.types.mdat,4);for(let rn=0;rn<Lt.length;rn++){let _n=Lt[rn].units;for(;_n.length;){let Ln=_n.shift().data;Qn.set(Ln,wn),wn+=Ln.byteLength}}let zt=Lt[Lt.length-1];if(Mt=zt.dts+zt.duration,qt=zt.pts+zt.duration,this._videoNextDts=Mt,Zt.beginDts=Ft,Zt.endDts=Mt,Zt.beginPts=jt,Zt.endPts=qt,Zt.originalBeginDts=Lt[0].originalDts,Zt.originalEndDts=zt.originalDts+zt.duration,Zt.firstSample=new Oe(Lt[0].dts,Lt[0].pts,Lt[0].duration,Lt[0].originalDts,Lt[0].isKeyframe),Zt.lastSample=new Oe(zt.dts,zt.pts,zt.duration,zt.originalDts,zt.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Zt),Ve.samples=Lt,Ve.sequenceNumber++,this._forceFirstIDR){let rn=Lt[0].flags;rn.dependsOn=2,rn.isNonSync=0}let nn=_e.moof(Ve,Ft);Ve.samples=[],Ve.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(nn,Qn).buffer,sampleCount:Lt.length,info:Zt})}_mergeBoxes(Me,ze){let Ve=new Uint8Array(Me.byteLength+ze.byteLength);return Ve.set(Me,0),Ve.set(ze,Me.byteLength),Ve}}var ut=Dt,At={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Wt{constructor(Me,ze){this.TAG="TransmuxingController",this._emitter=new(ce()),this._config=ze,Me.segments||(Me.segments=[{duration:Me.duration,filesize:Me.filesize,url:Me.url}]),typeof Me.cors!="boolean"&&(Me.cors=!0),typeof Me.withCredentials!="boolean"&&(Me.withCredentials=!1),this._mediaDataSource=Me,this._currentSegmentIndex=0;let Ve=0;this._mediaDataSource.segments.forEach(st=>{st.timestampBase=Ve,Ve+=st.duration,st.cors=Me.cors,st.withCredentials=Me.withCredentials,ze.referrerPolicy&&(st.referrerPolicy=ze.referrerPolicy)}),!isNaN(Ve)&&this._mediaDataSource.duration!==Ve&&(this._mediaDataSource.duration=Ve),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(Me,ze){this._emitter.addListener(Me,ze)}off(Me,ze){this._emitter.removeListener(Me,ze)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Me,ze){this._currentSegmentIndex=Me;let Ve=this._mediaDataSource.segments[Me],st=this._ioctl=new rt(Ve,this._config,Me);st.onError=this._onIOException.bind(this),st.onSeeked=this._onIOSeeked.bind(this),st.onComplete=this._onIOComplete.bind(this),st.onRedirect=this._onIORedirect.bind(this),st.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),ze?this._demuxer.bindDataSource(this._ioctl):st.onDataArrival=this._onInitChunkArrival.bind(this),st.open(ze)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(Me){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let ze=this._searchSegmentIndexContains(Me);if(ze===this._currentSegmentIndex){let Ve=this._mediaInfo.segments[ze];if(Ve==null)this._pendingSeekTime=Me;else{let st=Ve.getNearestKeyframe(Me);this._remuxer.seek(st.milliseconds),this._ioctl.seek(st.fileposition),this._pendingResolveSeekPoint=st.milliseconds}}else{let Ve=this._mediaInfo.segments[ze];if(Ve==null)this._pendingSeekTime=Me,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(ze);else{let st=Ve.getNearestKeyframe(Me);this._internalAbort(),this._remuxer.seek(Me),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[ze].timestampBase,this._loadSegment(ze,st.fileposition),this._pendingResolveSeekPoint=st.milliseconds,this._reportSegmentMediaInfo(ze)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Me){let ze=this._mediaDataSource.segments,Ve=ze.length-1;for(let st=0;st<ze.length;st++)if(Me<ze[st].timestampBase){Ve=st-1;break}return Ve}_onInitChunkArrival(Me,ze){let Ve=null,st=0;if(ze>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,st=this._demuxer.parseChunks(Me,ze);else if((Ve=ye.probe(Me)).match){this._demuxer=new ye(Ve,this._config),this._remuxer||(this._remuxer=new ut(this._config));let yt=this._mediaDataSource;yt.duration!=null&&!isNaN(yt.duration)&&(this._demuxer.overridedDuration=yt.duration),typeof yt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=yt.hasAudio),typeof yt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=yt.hasVideo),this._demuxer.timestampBase=yt.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),st=this._demuxer.parseChunks(Me,ze)}else Ve=null,re.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(At.DEMUX_ERROR,Tt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),st=0;return st}_onMediaInfo(Me){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Me),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,ht.prototype));let ze=Object.assign({},Me);Object.setPrototypeOf(ze,ht.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=ze,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let Ve=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(Ve)})}_onMetaDataArrived(Me){this._emitter.emit(At.METADATA_ARRIVED,Me)}_onScriptDataArrived(Me){this._emitter.emit(At.SCRIPTDATA_ARRIVED,Me)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Me){let Ve=Me+1;Ve<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(Ve)):(this._remuxer.flushStashedSamples(),this._emitter.emit(At.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Me){let ze=this._ioctl.extraData;this._mediaDataSource.segments[ze].redirectedURL=Me}_onIORecoveredEarlyEof(){this._emitter.emit(At.RECOVERED_EARLY_EOF)}_onIOException(Me,ze){re.e(this.TAG,`IOException: type = ${Me}, code = ${ze.code}, msg = ${ze.msg}`),this._emitter.emit(At.IO_ERROR,Me,ze),this._disableStatisticsReporter()}_onDemuxException(Me,ze){re.e(this.TAG,`DemuxException: type = ${Me}, info = ${ze}`),this._emitter.emit(At.DEMUX_ERROR,Me,ze)}_onRemuxerInitSegmentArrival(Me,ze){this._emitter.emit(At.INIT_SEGMENT,Me,ze)}_onRemuxerMediaSegmentArrival(Me,ze){if(this._pendingSeekTime==null&&(this._emitter.emit(At.MEDIA_SEGMENT,Me,ze),this._pendingResolveSeekPoint!=null&&Me==="video")){let Ve=ze.info.syncPoints,st=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,Se.safari&&Ve.length>0&&Ve[0].originalDts===st&&(st=Ve[0].pts),this._emitter.emit(At.RECOMMEND_SEEKPOINT,st)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(Me){let ze=this._mediaInfo.segments[Me],Ve=Object.assign({},ze);Ve.duration=this._mediaInfo.duration,Ve.segmentCount=this._mediaInfo.segmentCount,delete Ve.segments,delete Ve.keyframesIndex,this._emitter.emit(At.MEDIA_INFO,Ve)}_reportStatisticsInfo(){let Me={};Me.url=this._ioctl.currentURL,Me.hasRedirect=this._ioctl.hasRedirect,Me.hasRedirect&&(Me.redirectedURL=this._ioctl.currentRedirectedURL),Me.speed=this._ioctl.currentSpeed,Me.loaderType=this._ioctl.loaderType,Me.currentSegmentIndex=this._currentSegmentIndex,Me.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(At.STATISTICS_INFO,Me)}}var on=Wt,Yt=function(Qt){let Me="TransmuxingWorker",ze=null,Ve=Zt.bind(this);ie.install(),Qt.addEventListener("message",function(Lt){switch(Lt.data.cmd){case"init":ze=new on(Lt.data.param[0],Lt.data.param[1]),ze.on(At.IO_ERROR,Rt.bind(this)),ze.on(At.DEMUX_ERROR,Et.bind(this)),ze.on(At.INIT_SEGMENT,st.bind(this)),ze.on(At.MEDIA_SEGMENT,yt.bind(this)),ze.on(At.LOADING_COMPLETE,Ft.bind(this)),ze.on(At.RECOVERED_EARLY_EOF,Mt.bind(this)),ze.on(At.MEDIA_INFO,jt.bind(this)),ze.on(At.METADATA_ARRIVED,qt.bind(this)),ze.on(At.SCRIPTDATA_ARRIVED,wn.bind(this)),ze.on(At.STATISTICS_INFO,Qn.bind(this)),ze.on(At.RECOMMEND_SEEKPOINT,sn.bind(this));break;case"destroy":ze&&(ze.destroy(),ze=null),Qt.postMessage({msg:"destroyed"});break;case"start":ze.start();break;case"stop":ze.stop();break;case"seek":ze.seek(Lt.data.param);break;case"pause":ze.pause();break;case"resume":ze.resume();break;case"logging_config":{let zt=Lt.data.param;Qe.applyConfig(zt),zt.enableCallback===!0?Qe.addLogListener(Ve):Qe.removeLogListener(Ve);break}}});function st(Lt,zt){let nn={msg:At.INIT_SEGMENT,data:{type:Lt,data:zt}};Qt.postMessage(nn,[zt.data])}function yt(Lt,zt){let nn={msg:At.MEDIA_SEGMENT,data:{type:Lt,data:zt}};Qt.postMessage(nn,[zt.data])}function Ft(){let Lt={msg:At.LOADING_COMPLETE};Qt.postMessage(Lt)}function Mt(){let Lt={msg:At.RECOVERED_EARLY_EOF};Qt.postMessage(Lt)}function jt(Lt){let zt={msg:At.MEDIA_INFO,data:Lt};Qt.postMessage(zt)}function qt(Lt){let zt={msg:At.METADATA_ARRIVED,data:Lt};Qt.postMessage(zt)}function wn(Lt){let zt={msg:At.SCRIPTDATA_ARRIVED,data:Lt};Qt.postMessage(zt)}function Qn(Lt){let zt={msg:At.STATISTICS_INFO,data:Lt};Qt.postMessage(zt)}function Rt(Lt,zt){Qt.postMessage({msg:At.IO_ERROR,data:{type:Lt,info:zt}})}function Et(Lt,zt){Qt.postMessage({msg:At.DEMUX_ERROR,data:{type:Lt,info:zt}})}function sn(Lt){Qt.postMessage({msg:At.RECOMMEND_SEEKPOINT,data:Lt})}function Zt(Lt,zt){Qt.postMessage({msg:"logcat_callback",data:{type:Lt,logcat:zt}})}};class Mn{constructor(Me,ze){if(this.TAG="Transmuxer",this._emitter=new(ce()),ze.enableWorker&&typeof Worker!="undefined")try{let Ve=we(82059);this._worker=Ve(Yt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Me,ze]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},Qe.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:Qe.getConfig()})}catch(Ve){re.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new on(Me,ze)}else this._controller=new on(Me,ze);if(this._controller){let Ve=this._controller;Ve.on(At.IO_ERROR,this._onIOError.bind(this)),Ve.on(At.DEMUX_ERROR,this._onDemuxError.bind(this)),Ve.on(At.INIT_SEGMENT,this._onInitSegment.bind(this)),Ve.on(At.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),Ve.on(At.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),Ve.on(At.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),Ve.on(At.MEDIA_INFO,this._onMediaInfo.bind(this)),Ve.on(At.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),Ve.on(At.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),Ve.on(At.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),Ve.on(At.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),Qe.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Me,ze){this._emitter.addListener(Me,ze)}off(Me,ze){this._emitter.removeListener(Me,ze)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(Me){this._worker?this._worker.postMessage({cmd:"seek",param:Me}):this._controller.seek(Me)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Me,ze){Promise.resolve().then(()=>{this._emitter.emit(At.INIT_SEGMENT,Me,ze)})}_onMediaSegment(Me,ze){Promise.resolve().then(()=>{this._emitter.emit(At.MEDIA_SEGMENT,Me,ze)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(At.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(At.RECOVERED_EARLY_EOF)})}_onMediaInfo(Me){Promise.resolve().then(()=>{this._emitter.emit(At.MEDIA_INFO,Me)})}_onMetaDataArrived(Me){Promise.resolve().then(()=>{this._emitter.emit(At.METADATA_ARRIVED,Me)})}_onScriptDataArrived(Me){Promise.resolve().then(()=>{this._emitter.emit(At.SCRIPTDATA_ARRIVED,Me)})}_onStatisticsInfo(Me){Promise.resolve().then(()=>{this._emitter.emit(At.STATISTICS_INFO,Me)})}_onIOError(Me,ze){Promise.resolve().then(()=>{this._emitter.emit(At.IO_ERROR,Me,ze)})}_onDemuxError(Me,ze){Promise.resolve().then(()=>{this._emitter.emit(At.DEMUX_ERROR,Me,ze)})}_onRecommendSeekpoint(Me){Promise.resolve().then(()=>{this._emitter.emit(At.RECOMMEND_SEEKPOINT,Me)})}_onLoggingConfigChanged(Me){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Me})}_onWorkerMessage(Me){let ze=Me.data,Ve=ze.data;if(ze.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(ze.msg){case At.INIT_SEGMENT:case At.MEDIA_SEGMENT:this._emitter.emit(ze.msg,Ve.type,Ve.data);break;case At.LOADING_COMPLETE:case At.RECOVERED_EARLY_EOF:this._emitter.emit(ze.msg);break;case At.MEDIA_INFO:Object.setPrototypeOf(Ve,ht.prototype),this._emitter.emit(ze.msg,Ve);break;case At.METADATA_ARRIVED:case At.SCRIPTDATA_ARRIVED:case At.STATISTICS_INFO:this._emitter.emit(ze.msg,Ve);break;case At.IO_ERROR:case At.DEMUX_ERROR:this._emitter.emit(ze.msg,Ve.type,Ve.info);break;case At.RECOMMEND_SEEKPOINT:this._emitter.emit(ze.msg,Ve);break;case"logcat_callback":re.emitter.emit("log",Ve.type,Ve.logcat);break;default:break}}}var Yn=Mn,Jn={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class ar{constructor(Me){this.TAG="MSEController",this._config=Me,this._emitter=new(ce()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ct}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Me,ze){this._emitter.addListener(Me,ze)}off(Me,ze){this._emitter.removeListener(Me,ze)}attachMediaElement(Me){if(this._mediaSource)throw new E("MediaSource has been attached to an HTMLMediaElement!");let ze=this._mediaSource=new window.MediaSource;ze.addEventListener("sourceopen",this.e.onSourceOpen),ze.addEventListener("sourceended",this.e.onSourceEnded),ze.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Me,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Me.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Me=this._mediaSource;for(let ze in this._sourceBuffers){let Ve=this._pendingSegments[ze];Ve.splice(0,Ve.length),this._pendingSegments[ze]=null,this._pendingRemoveRanges[ze]=null,this._lastInitSegments[ze]=null;let st=this._sourceBuffers[ze];if(st){if(Me.readyState!=="closed"){try{Me.removeSourceBuffer(st)}catch(yt){re.e(this.TAG,yt.message)}st.removeEventListener("error",this.e.onSourceBufferError),st.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[ze]=null,this._sourceBuffers[ze]=null}}if(Me.readyState==="open")try{Me.endOfStream()}catch(ze){re.e(this.TAG,ze.message)}Me.removeEventListener("sourceopen",this.e.onSourceOpen),Me.removeEventListener("sourceended",this.e.onSourceEnded),Me.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(Me,ze){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Me),this._pendingSegments[Me.type].push(Me);return}let Ve=Me,st=`${Ve.container}`;Ve.codec&&Ve.codec.length>0&&(st+=`;codecs=${Ve.codec}`);let yt=!1;if(re.v(this.TAG,"Received Initialization Segment, mimeType: "+st),this._lastInitSegments[Ve.type]=Ve,st!==this._mimeTypes[Ve.type]){if(this._mimeTypes[Ve.type])re.v(this.TAG,`Notice: ${Ve.type} mimeType changed, origin: ${this._mimeTypes[Ve.type]}, target: ${st}`);else{yt=!0;try{let Ft=this._sourceBuffers[Ve.type]=this._mediaSource.addSourceBuffer(st);Ft.addEventListener("error",this.e.onSourceBufferError),Ft.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Ft){re.e(this.TAG,Ft.message),this._emitter.emit(Jn.ERROR,{code:Ft.code,msg:Ft.message});return}}this._mimeTypes[Ve.type]=st}ze||this._pendingSegments[Ve.type].push(Ve),yt||this._sourceBuffers[Ve.type]&&!this._sourceBuffers[Ve.type].updating&&this._doAppendSegments(),Se.safari&&Ve.container==="audio/mpeg"&&Ve.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=Ve.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Me){let ze=Me;this._pendingSegments[ze.type].push(ze),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let Ve=this._sourceBuffers[ze.type];Ve&&!Ve.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Me){for(let ze in this._sourceBuffers){if(!this._sourceBuffers[ze])continue;let Ve=this._sourceBuffers[ze];if(this._mediaSource.readyState==="open")try{Ve.abort()}catch(yt){re.e(this.TAG,yt.message)}this._idrList.clear();let st=this._pendingSegments[ze];if(st.splice(0,st.length),this._mediaSource.readyState!=="closed"){for(let yt=0;yt<Ve.buffered.length;yt++){let Ft=Ve.buffered.start(yt),Mt=Ve.buffered.end(yt);this._pendingRemoveRanges[ze].push({start:Ft,end:Mt})}if(Ve.updating||this._doRemoveRanges(),Se.safari){let yt=this._lastInitSegments[ze];yt&&(this._pendingSegments[ze].push(yt),Ve.updating||this._doAppendSegments())}}}}endOfStream(){let Me=this._mediaSource,ze=this._sourceBuffers;if(!Me||Me.readyState!=="open"){Me&&Me.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}ze.video&&ze.video.updating||ze.audio&&ze.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Me.endOfStream())}getNearestKeyframe(Me){return this._idrList.getLastSyncPointBeforeDts(Me)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Me=this._mediaElement.currentTime;for(let ze in this._sourceBuffers){let Ve=this._sourceBuffers[ze];if(Ve){let st=Ve.buffered;if(st.length>=1&&Me-st.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Me=this._mediaElement.currentTime;for(let ze in this._sourceBuffers){let Ve=this._sourceBuffers[ze];if(Ve){let st=Ve.buffered,yt=!1;for(let Ft=0;Ft<st.length;Ft++){let Mt=st.start(Ft),jt=st.end(Ft);if(Mt<=Me&&Me<jt+3){if(Me-Mt>=this._config.autoCleanupMaxBackwardDuration){yt=!0;let qt=Me-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[ze].push({start:Mt,end:qt})}}else jt<Me&&(yt=!0,this._pendingRemoveRanges[ze].push({start:Mt,end:jt}))}yt&&!Ve.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Me=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Me.video&&Me.video.updating||Me.audio&&Me.audio.updating)return;let ze=this._mediaSource.duration,Ve=this._pendingMediaDuration;Ve>0&&(isNaN(ze)||Ve>ze)&&(re.v(this.TAG,`Update MediaSource duration from ${ze} to ${Ve}`),this._mediaSource.duration=Ve),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Me in this._pendingRemoveRanges){if(!this._sourceBuffers[Me]||this._sourceBuffers[Me].updating)continue;let ze=this._sourceBuffers[Me],Ve=this._pendingRemoveRanges[Me];for(;Ve.length&&!ze.updating;){let st=Ve.shift();ze.remove(st.start,st.end)}}}_doAppendSegments(){let Me=this._pendingSegments;for(let ze in Me)if(!(!this._sourceBuffers[ze]||this._sourceBuffers[ze].updating)&&Me[ze].length>0){let Ve=Me[ze].shift();if(Ve.timestampOffset){let st=this._sourceBuffers[ze].timestampOffset,yt=Ve.timestampOffset/1e3;Math.abs(st-yt)>.1&&(re.v(this.TAG,`Update MPEG audio timestampOffset from ${st} to ${yt}`),this._sourceBuffers[ze].timestampOffset=yt),delete Ve.timestampOffset}if(!Ve.data||Ve.data.byteLength===0)continue;try{this._sourceBuffers[ze].appendBuffer(Ve.data),this._isBufferFull=!1,ze==="video"&&Ve.hasOwnProperty("info")&&this._idrList.appendArray(Ve.info.syncPoints)}catch(st){this._pendingSegments[ze].unshift(Ve),st.code===22?(this._isBufferFull||this._emitter.emit(Jn.BUFFER_FULL),this._isBufferFull=!0):(re.e(this.TAG,st.message),this._emitter.emit(Jn.ERROR,{code:st.code,msg:st.message}))}}}_onSourceOpen(){if(re.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Me=this._pendingSourceBufferInit;for(;Me.length;){let ze=Me.shift();this.appendInitSegment(ze,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Jn.SOURCE_OPEN)}_onSourceEnded(){re.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){re.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let Me=this._pendingSegments;return Me.video.length>0||Me.audio.length>0}_hasPendingRemoveRanges(){let Me=this._pendingRemoveRanges;return Me.video.length>0||Me.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Jn.UPDATE_END)}_onSourceBufferError(Me){re.e(this.TAG,`SourceBuffer Error: ${Me}`)}}var ur=ar;const jn={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Bn={NETWORK_EXCEPTION:ne.EXCEPTION,NETWORK_STATUS_CODE_INVALID:ne.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:ne.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:ne.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Tt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Tt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Tt.CODEC_UNSUPPORTED};class sr{constructor(Me,ze){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ce()),this._config=ct(),typeof ze=="object"&&Object.assign(this._config,ze),Me.type.toLowerCase()!=="flv")throw new y("FlvPlayer requires an flv MediaDataSource input!");Me.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Me,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let Ve=Se.chrome&&(Se.version.major<50||Se.version.major===50&&Se.version.build<2661);this._alwaysSeekKeyframe=!!(Ve||Se.msedge||Se.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Me,ze){Me===Je.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Je.MEDIA_INFO,this.mediaInfo)}):Me===Je.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(Je.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Me,ze)}off(Me,ze){this._emitter.removeListener(Me,ze)}attachMediaElement(Me){if(this._mediaElement=Me,Me.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Me.addEventListener("seeking",this.e.onvSeeking),Me.addEventListener("canplay",this.e.onvCanPlay),Me.addEventListener("stalled",this.e.onvStalled),Me.addEventListener("progress",this.e.onvProgress),this._msectl=new ur(this._config),this._msectl.on(Jn.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Jn.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Jn.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Jn.ERROR,ze=>{this._emitter.emit(Je.ERROR,jn.MEDIA_ERROR,Bn.MEDIA_MSE_ERROR,ze)}),this._msectl.attachMediaElement(Me),this._pendingSeekTime!=null)try{Me.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ze){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new E("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Yn(this._mediaDataSource,this._config),this._transmuxer.on(At.INIT_SEGMENT,(Me,ze)=>{this._msectl.appendInitSegment(ze)}),this._transmuxer.on(At.MEDIA_SEGMENT,(Me,ze)=>{if(this._msectl.appendMediaSegment(ze),this._config.lazyLoad&&!this._config.isLive){let Ve=this._mediaElement.currentTime;ze.info.endDts>=(Ve+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(re.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(At.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(Je.LOADING_COMPLETE)}),this._transmuxer.on(At.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(Je.RECOVERED_EARLY_EOF)}),this._transmuxer.on(At.IO_ERROR,(Me,ze)=>{this._emitter.emit(Je.ERROR,jn.NETWORK_ERROR,Me,ze)}),this._transmuxer.on(At.DEMUX_ERROR,(Me,ze)=>{this._emitter.emit(Je.ERROR,jn.MEDIA_ERROR,Me,{code:-1,msg:ze})}),this._transmuxer.on(At.MEDIA_INFO,Me=>{this._mediaInfo=Me,this._emitter.emit(Je.MEDIA_INFO,Object.assign({},Me))}),this._transmuxer.on(At.METADATA_ARRIVED,Me=>{this._emitter.emit(Je.METADATA_ARRIVED,Me)}),this._transmuxer.on(At.SCRIPTDATA_ARRIVED,Me=>{this._emitter.emit(Je.SCRIPTDATA_ARRIVED,Me)}),this._transmuxer.on(At.STATISTICS_INFO,Me=>{this._statisticsInfo=this._fillStatisticsInfo(Me),this._emitter.emit(Je.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(At.RECOMMEND_SEEKPOINT,Me=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Me/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Me){this._mediaElement.volume=Me}get muted(){return this._mediaElement.muted}set muted(Me){this._mediaElement.muted=Me}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Me){this._mediaElement?this._internalSeek(Me):this._pendingSeekTime=Me}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(Me){if(Me.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Me;let ze=!0,Ve=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let yt=this._mediaElement.getVideoPlaybackQuality();Ve=yt.totalVideoFrames,st=yt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ve=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):ze=!1;return ze&&(Me.decodedFrames=Ve,Me.droppedFrames=st),Me}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Me=this._mediaElement.buffered,ze=this._mediaElement.currentTime,Ve=0,st=0;for(let yt=0;yt<Me.length;yt++){let Ft=Me.start(yt),Mt=Me.end(yt);if(Ft<=ze&&ze<Mt){Ve=Ft,st=Mt;break}}st>=ze+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(re.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){re.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let Me=this._mediaElement.currentTime,ze=this._mediaElement.buffered,Ve=!1;for(let st=0;st<ze.length;st++){let yt=ze.start(st),Ft=ze.end(st);if(Me>=yt&&Me<Ft){Me>=Ft-this._config.lazyLoadRecoverDuration&&(Ve=!0);break}}Ve&&(window.clearInterval(this._progressChecker),this._progressChecker=null,Ve&&(re.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Me){let ze=this._mediaElement.buffered;for(let Ve=0;Ve<ze.length;Ve++){let st=ze.start(Ve),yt=ze.end(Ve);if(Me>=st&&Me<yt)return!0}return!1}_internalSeek(Me){let ze=this._isTimepointBuffered(Me),Ve=!1,st=0;if(Me<1&&this._mediaElement.buffered.length>0){let yt=this._mediaElement.buffered.start(0);(yt<1&&Me<yt||Se.safari)&&(Ve=!0,st=Se.safari?.1:yt)}if(Ve)this._requestSetTime=!0,this._mediaElement.currentTime=st;else if(ze){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Me;else{let yt=this._msectl.getNearestKeyframe(Math.floor(Me*1e3));this._requestSetTime=!0,yt!=null?this._mediaElement.currentTime=yt.dts/1e3:this._mediaElement.currentTime=Me}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Me),this._transmuxer.seek(Math.floor(Me*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Me)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Me=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Me)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Me),this._transmuxer.seek(Math.floor(Me*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Me))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Me){let ze=this._mediaElement;if(Me||!this._receivedCanPlay||ze.readyState<2){let Ve=ze.buffered;Ve.length>0&&ze.currentTime<Ve.start(0)&&(re.w(this.TAG,`Playback seems stuck at ${ze.currentTime}, seek to ${Ve.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=Ve.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Me){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Me){let ze=this._mediaElement.currentTime,Ve=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(ze<1&&Ve.length>0){let st=Ve.start(0);if(st<1&&ze<st||Se.safari){this._requestSetTime=!0,this._mediaElement.currentTime=Se.safari?.1:st;return}}if(this._isTimepointBuffered(ze)){if(this._alwaysSeekKeyframe){let st=this._msectl.getNearestKeyframe(Math.floor(ze*1e3));st!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=st.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:ze,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Me){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Me){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Me){this._checkAndResumeStuckPlayback()}}var Hn=sr;class In{constructor(Me,ze){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ce()),this._config=ct(),typeof ze=="object"&&Object.assign(this._config,ze),Me.type.toLowerCase()==="flv")throw new y("NativePlayer does't support flv MediaDataSource input!");if(Me.hasOwnProperty("segments"))throw new y(`NativePlayer(${Me.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Me,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Me,ze){Me===Je.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(Je.MEDIA_INFO,this.mediaInfo)}):Me===Je.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(Je.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Me,ze)}off(Me,ze){this._emitter.removeListener(Me,ze)}attachMediaElement(Me){if(this._mediaElement=Me,Me.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Me.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(ze){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Me){this._mediaElement.volume=Me}get muted(){return this._mediaElement.muted}set muted(Me){this._mediaElement.muted=Me}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Me){this._mediaElement?this._mediaElement.currentTime=Me:this._pendingSeekTime=Me}get mediaInfo(){let ze={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(ze.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(ze.width=this._mediaElement.videoWidth,ze.height=this._mediaElement.videoHeight)),ze}get statisticsInfo(){let Me={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Me;let ze=!0,Ve=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let yt=this._mediaElement.getVideoPlaybackQuality();Ve=yt.totalVideoFrames,st=yt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(Ve=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):ze=!1;return ze&&(Me.decodedFrames=Ve,Me.droppedFrames=st),Me}_onvLoadedMetadata(Me){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(Je.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(Je.STATISTICS_INFO,this.statisticsInfo)}}var gn=In;ie.install();function Wn(Qt,Me){let ze=Qt;if(ze==null||typeof ze!="object")throw new y("MediaDataSource must be an javascript object!");if(!ze.hasOwnProperty("type"))throw new y("MediaDataSource must has type field to indicate video file type!");switch(ze.type){case"flv":return new Hn(ze,Me);default:return new gn(ze,Me)}}function fr(){return Ue.supportMSEH264Playback()}function mn(){return Ue.getFeatureList()}let En={};En.createPlayer=Wn,En.isSupported=fr,En.getFeatureList=mn,En.BaseLoader=ae,En.LoaderStatus=x,En.LoaderErrors=ne,En.Events=Je,En.ErrorTypes=jn,En.ErrorDetails=Bn,En.FlvPlayer=Hn,En.NativePlayer=gn,En.LoggingControl=Qe,Object.defineProperty(En,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var rr=En},93125:function(Jt,Ot,we){(function(de){if(1)window.OSS=de(),Jt.exports=de();else var ie})(function(){var de;return function(){function ie(Ee,ce,se){function re(te,E){if(!ce[te]){if(!Ee[te]){var y=void 0;if(!E&&y)return require(te,!0);if(ue)return ue(te,!0);var z=new Error("Cannot find module '"+te+"'");throw z.code="MODULE_NOT_FOUND",z}var x=ce[te]={exports:{}};Ee[te][0].call(x.exports,function(ne){return re(Ee[te][1][ne]||ne)},x,x.exports,ie,Ee,ce,se)}return ce[te].exports}for(var ue=void 0,ee=0;ee<se.length;ee++)re(se[ee]);return re}return ie}()({1:[function(ie,Ee,ce){"use strict";var se=ie("./browser/client");se.Buffer=ie("buffer").Buffer,se.co=ie("co"),se.urllib=ie("../shims/xhr"),se.version=ie("./browser/version").version,Ee.exports=se},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(ie,Ee,ce){(function(se,re){"use strict";function ue(Ue){return Ue&&Ue.__esModule?Ue:{default:Ue}}function ee(Ue,Ze){return Ue[Ze]||Ue[Ze.toLowerCase()]}function te(Ue,Ze){var Je=ke.parse(Ue);if(!Je.protocol){var $e=Ze?"https://":"http://";Je=ke.parse($e+Ue)}if(Je.protocol!=="http:"&&Je.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return Je}function E(Ue,Ze,Je){var $e=Je?"https://":"http://",Qe=Ze?"-internal.aliyuncs.com":".aliyuncs.com";return Ue.substr(0,14)==="vpc100-oss-cn-"&&(Qe=".aliyuncs.com"),ke.parse($e+Ue+Qe)}function y(){return document&&document.location&&document.location.protocol==="https:"}function z(Ue,Ze){if(!(this instanceof z))return new z(Ue,Ze);Ue&&Ue.inited?this.options=Ue:this.options=z.initOptions(Ue),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=qe,this.agent=this.options.agent||ct),this.ctx=Ze,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var x=ie("babel-runtime/regenerator"),ne=ue(x),ae=ie("babel-runtime/core-js/object/keys"),oe=ue(ae),ge=ie("debug")("ali-oss"),Se=ie("./../../shims/crypto/crypto.js"),ve=ie("path"),be=ie("copy-to"),xe=ie("mime"),pe=ie("xml2js"),me=ie("humanize-ms"),Ae=ie("agentkeepalive"),De=ie("merge-descriptors"),ke=ie("url"),Ie=ie("is-type-of"),Fe=ie("platform"),Pe=ie("utility"),qe=ie("urllib"),Ke=ie("./version"),ot=ie("dateformat"),He=ie("bowser"),rt=ie("../common/signUtils"),Ge=ie("../common/utils"),ct=new Ae;Ee.exports=z,z.initOptions=function(Ue){if(!Ue||!Ue.accessKeyId||!Ue.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var Ze=y(),Je={region:"oss-cn-hangzhou",internal:!1,secure:Ze,bucket:null,endpoint:null,cname:!1};if((0,oe.default)(Ue).forEach(function($e){Ue[$e]!==void 0&&(Je[$e]=Ue[$e])}),Je.accessKeyId=Je.accessKeyId.trim(),Je.accessKeySecret=Je.accessKeySecret.trim(),Je.timeout&&(Je.timeout=me(Je.timeout)),Je.endpoint)Je.endpoint=te(Je.endpoint,Je.secure);else{if(!Je.region)throw new Error("require options.endpoint or options.region");Je.endpoint=E(Je.region,Je.internal,Je.secure)}return Je.inited=!0,Je};var We=z.prototype;De(We,ie("./object")),De(We,ie("./managed_upload")),De(We,ie("../common/multipart")),De(We,ie("../common/thunkpool.js")),z.Wrapper=ie("./wrapper"),We.signature=function(Ue){return ge("authorization stringToSign: %s",Ue),rt.computeSignature(this.options.accessKeySecret,Ue)},We.authorization=function(Ue,Ze,Je,$e){var Qe=rt.buildCanonicalString(Ue.toUpperCase(),Ze,{headers:$e,parameters:Je});return rt.authorization(this.options.accessKeyId,this.options.accessKeySecret,Qe)},We.createRequest=function(Ue){var Ze={"x-oss-date":ot(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(Ze["x-oss-security-token"]=this.options.stsToken),be(Ue.headers).to(Ze),ee(Ze,"Content-Type")||(Ue.mime===xe.default_type&&(Ue.mime=""),Ue.mime&&Ue.mime.indexOf("/")>0?Ze["Content-Type"]=Ue.mime:Ze["Content-Type"]=xe.getType(Ue.mime||ve.extname(Ue.object||""))||"application/octet-stream"),Ue.content&&(Ze["Content-Md5"]=Se.createHash("md5").update(new re(Ue.content,"utf8")).digest("base64"),Ze["Content-Length"]||(Ze["Content-Length"]=Ue.content.length));var Je=this._getResource(Ue);Ze.authorization=this.authorization(Ue.method,Je,Ue.subres,Ze);var $e=this._getReqUrl(Ue);ge("request %s %s, with headers %j, !!stream: %s",Ue.method,$e,Ze,!!Ue.stream);var Qe=Ue.timeout||this.options.timeout;return{url:$e,params:{agent:this.agent,method:Ue.method,content:Ue.content,stream:Ue.stream,headers:Ze,timeout:Qe,writeStream:Ue.writeStream,customResponse:Ue.customResponse,ctx:Ue.ctx||this.ctx}}},We.request=ne.default.mark(function Ue(Ze){var Je,$e,Qe,pt;return ne.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return Je=this.createRequest(Ze),$e=void 0,Qe=void 0,ht.prev=3,ht.next=6,this.urllib.request(Je.url,Je.params);case 6:$e=ht.sent,ge("response %s %s, got %s, headers: %j",Ze.method,Je.url,$e.status,$e.headers),ht.next=13;break;case 10:ht.prev=10,ht.t0=ht.catch(3),Qe=ht.t0;case 13:if(pt=void 0,!$e||!Ze.successStatuses||Ze.successStatuses.indexOf($e.status)!==-1){ht.next=26;break}return ht.next=17,this.requestError($e);case 17:if(pt=ht.sent,pt.code!=="RequestTimeTooSkewed"){ht.next=23;break}return this.options.amendTimeSkewed=+new Date(pt.serverTime)-new Date,ht.next=22,this.request(Ze);case 22:return ht.abrupt("return",ht.sent);case 23:pt.params=Ze,ht.next=30;break;case 26:if(!Qe){ht.next=30;break}return ht.next=29,this.requestError(Qe);case 29:pt=ht.sent;case 30:if(!pt){ht.next=32;break}throw pt;case 32:if(!Ze.xmlResponse){ht.next=36;break}return ht.next=35,this.parseXML($e.data);case 35:$e.data=ht.sent;case 36:return ht.abrupt("return",$e);case 37:case"end":return ht.stop()}},Ue,this,[[3,10]])}),We._getResource=function(Ue){var Ze="/";return Ue.bucket&&(Ze+=Ue.bucket+"/"),Ue.object&&(Ze+=Ue.object),Ze},We._isIP=function(Ue){return Ge._isIP(Ue)},We._escape=function(Ue){return Pe.encodeURIComponent(Ue).replace(/%2F/g,"/")},We._getReqUrl=function(Ue){var Ze={};be(this.options.endpoint).to(Ze);var Je=this._isIP(Ze.hostname),$e=this.options.cname;!Ue.bucket||$e||Je||(Ze.host=Ue.bucket+"."+Ze.host);var Qe="/";Ue.bucket&&Je&&(Qe+=Ue.bucket+"/"),Ue.object&&(Qe+=this._escape(Ue.object).replace(/\+/g,"%2B")),Ze.pathname=Qe;var pt={};if(Ue.query&&De(pt,Ue.query),Ue.subres){var ht={};Ie.string(Ue.subres)?ht[Ue.subres]="":Ie.array(Ue.subres)?Ue.subres.forEach(function(Pt){ht[Pt]=""}):ht=Ue.subres,De(pt,ht)}return Ze.query=pt,ke.format(Ze)},We._getUserAgent=function(){var Ue=se&&se.browser?"js":"nodejs",Ze="aliyun-sdk-"+Ue+"/"+Ke.version,Je=Fe.description;return!Je&&se&&(Je="Node.js "+se.version.slice(1)+" on "+se.platform+" "+se.arch),this._checkUserAgent(Ze+" "+Je)},We._checkUserAgent=function(Ue){return Ue.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},We.checkBrowserAndVersion=function(Ue,Ze){return He.name===Ue&&He.version.split(".")[0]===Ze},We.parseXML=function(Ue){return function(Ze){re.isBuffer(Ue)&&(Ue=Ue.toString()),pe.parseString(Ue,{explicitRoot:!1,explicitArray:!1},Ze)}},We.requestError=ne.default.mark(function Ue(Ze){var Je,$e,Qe,pt;return ne.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(Je=null,Ze.data&&Ze.data.length){ht.next=5;break}Ze.status===-1||Ze.status===-2?(Je=new Error(Ze.message),Je.name=Ze.name,Je.status=Ze.status,Je.code=Ze.name):(Ze.status===404?(Je=new Error("Object not exists"),Je.name="NoSuchKeyError",Je.status=404,Je.code="NoSuchKey"):Ze.status===412?(Je=new Error("Pre condition failed"),Je.name="PreconditionFailedError",Je.status=412,Je.code="PreconditionFailed"):(Je=new Error("Unknow error, status: "+Ze.status),Je.name="UnknowError",Je.status=Ze.status),Je.requestId=Ze.headers["x-oss-request-id"],Je.host=""),ht.next=30;break;case 5:return $e=String(Ze.data),ge("request response error data: %s",$e),Qe=void 0,ht.prev=8,ht.next=11,this.parseXML($e)||{};case 11:Qe=ht.sent,ht.next=21;break;case 14:return ht.prev=14,ht.t0=ht.catch(8),ge($e),ht.t0.message+=`
raw xml: `+$e,ht.t0.status=Ze.status,ht.t0.requestId=Ze.headers["x-oss-request-id"],ht.abrupt("return",ht.t0);case 21:pt=Qe.Message||"unknow request error, status: "+Ze.status,Qe.Condition&&(pt+=" (condition: "+Qe.Condition+")"),Je=new Error(pt),Je.name=Qe.Code?Qe.Code+"Error":"UnknowError",Je.status=Ze.status,Je.code=Qe.Code,Je.requestId=Qe.RequestId,Je.hostId=Qe.HostId,Je.serverTime=Qe.ServerTime;case 30:return ge("generate error %j",Je),ht.abrupt("return",Je);case 32:case"end":return ht.stop()}},Ue,this,[[8,14]])})}).call(this,ie("_process"),ie("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(ie,Ee,ce){(function(se){"use strict";function re(be){return be&&be.__esModule?be:{default:be}}function ue(be,xe){if(!(this instanceof ue))return new ue(be,xe);ve.call(this,xe),this.file=be,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ee=ie("babel-runtime/core-js/array/from"),te=re(ee),E=ie("babel-runtime/regenerator"),y=re(E),z=ie("is-type-of"),x=ie("util"),ne=ie("path"),ae=ie("mime"),oe=ie("copy-to"),ge=ce;ge.multipartUpload=y.default.mark(function be(xe,pe,me){var Ae,De,ke,Ie,Fe,Pe,qe,Ke,ot;return y.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(this.resetCancelFlag(),me=me||{},!me.checkpoint||!me.checkpoint.uploadId){He.next=6;break}return He.next=5,this._resumeMultipart(me.checkpoint,me);case 5:return He.abrupt("return",He.sent);case 6:return Ae=102400,me.mime||(z.file(pe)?me.mime=ae.getType(ne.extname(pe.name)):z.blob(pe)?me.mime=pe.type:me.mime=ae.getType(ne.extname(pe))),me.headers=me.headers||{},this._convertMetaToHeaders(me.meta,me.headers),He.next=12,this._getFileSize(pe);case 12:if(!((De=He.sent)<Ae)){He.next=25;break}return ke=this._createStream(pe,0,De),me.contentLength=De,He.next=18,this.putStream(xe,ke,me);case 18:if(Ie=He.sent,!me||!me.progress){He.next=22;break}return He.next=22,me.progress(1);case 22:return Fe={res:Ie.res,bucket:this.options.bucket,name:xe,etag:Ie.res.headers.etag},(me.headers&&me.headers["x-oss-callback"]||me.callback)&&(Fe.data=Ie.data),He.abrupt("return",Fe);case 25:if(!(me.partSize&&me.partSize<Ae)){He.next=27;break}throw new Error("partSize must not be smaller than "+Ae);case 27:return He.next=29,this.initMultipartUpload(xe,me);case 29:if(Pe=He.sent,qe=Pe.uploadId,Ke=this._getPartSize(De,me.partSize),ot={file:pe,name:xe,fileSize:De,partSize:Ke,uploadId:qe,doneParts:[]},!me||!me.progress){He.next=36;break}return He.next=36,me.progress(0,ot,Pe.res);case 36:return He.next=38,this._resumeMultipart(ot,me);case 38:return He.abrupt("return",He.sent);case 39:case"end":return He.stop()}},be,this)}),ge._resumeMultipart=y.default.mark(function be(xe,pe){var me,Ae,De,ke,Ie,Fe,Pe,qe,Ke,ot,He,rt,Ge,ct,We,Ue,Ze,Je,$e,Qe,pt;return y.default.wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:if(!this.isCancel()){ht.next=2;break}throw this._makeCancelEvent();case 2:if(me=xe.file,Ae=xe.fileSize,De=xe.partSize,ke=xe.uploadId,Ie=xe.doneParts,Fe=xe.name,Pe=[],Ie.length>0&&oe(Ie).to(Pe),qe=this._divideParts(Ae,De),Ke=qe.length,ot=!1,He=y.default.mark(function Pt(gt,bt){var St,lt,_t;return y.default.wrap(function(dt){for(;;)switch(dt.prev=dt.next){case 0:if(gt.isCancel()){dt.next=21;break}return dt.prev=1,St=qe[bt-1],lt={stream:gt._createStream(me,St.start,St.end),size:St.end-St.start},dt.next=6,gt._uploadPart(Fe,ke,bt,lt);case 6:if(_t=dt.sent,gt.isCancel()||ot){dt.next=13;break}if(xe.doneParts.push({number:bt,etag:_t.res.headers.etag}),Pe.push({number:bt,etag:_t.res.headers.etag}),!pe||!pe.progress){dt.next=13;break}return dt.next=13,pe.progress(Ie.length/Ke,xe,_t.res);case 13:dt.next=21;break;case 15:if(dt.prev=15,dt.t0=dt.catch(1),gt.isCancel()){dt.next=21;break}throw gt.cancel(),dt.t0.partNum=bt,dt.t0;case 21:case"end":return dt.stop()}},Pt,this,[[1,15]])}),rt=(0,te.default)(new Array(Ke),function(Pt,gt){return gt+1}),Ge=Pe.map(function(Pt){return Pt.number}),ct=rt.filter(function(Pt){return Ge.indexOf(Pt)<0}),We=5,Ue=pe.parallel||We,!this.checkBrowserAndVersion("Internet Explorer","10")&&Ue!==1){ht.next=26;break}Ze=0;case 16:if(!(Ze<ct.length)){ht.next=24;break}if(!this.isCancel()){ht.next=19;break}throw this._makeCancelEvent();case 19:return ht.next=21,He(this,ct[Ze]);case 21:Ze++,ht.next=16;break;case 24:ht.next=40;break;case 26:for(Je=[],$e=0;$e<ct.length;$e++)Je.push(He(this,ct[$e]));return ht.next=30,this._thunkPool(Je,Ue);case 30:if(Qe=ht.sent,ot=!0,!(Qe&&Qe.length>0)){ht.next=37;break}throw this.resetCancelFlag(),pt=Qe[0],pt.message="Failed to upload some parts with error: "+pt.toString()+" part_num: "+pt.partNum,pt;case 37:if(!this.isCancel()){ht.next=40;break}throw Je=null,this._makeCancelEvent();case 40:return ht.next=42,this.completeMultipartUpload(Fe,ke,Pe,pe);case 42:return ht.abrupt("return",ht.sent);case 43:case"end":return ht.stop()}},be,this)}),z.file=function(be){return typeof File!="undefined"&&be instanceof File},z.blob=function(be){return typeof Blob!="undefined"&&be instanceof Blob},ge._getFileSize=y.default.mark(function be(xe){var pe;return y.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:if(!z.buffer(xe)){me.next=4;break}return me.abrupt("return",xe.length);case 4:if(!z.blob(xe)&&!z.file(xe)){me.next=6;break}return me.abrupt("return",xe.size);case 6:if(!z.string(xe)){me.next=11;break}return me.next=9,this._statFile(xe);case 9:return pe=me.sent,me.abrupt("return",pe.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return me.stop()}},be,this)});var Se=ie("stream"),ve=Se.Readable;x.inherits(ue,ve),ue.prototype.readFileAndPush=function(be){if(this.fileBuffer)for(var xe=!0;xe&&this.fileBuffer&&this.start<this.fileBuffer.length;){var pe=this.start,me=pe+be;me=me>this.fileBuffer.length?this.fileBuffer.length:me,this.start=me,xe=this.push(this.fileBuffer.slice(pe,me))}},ue.prototype._read=function(be){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);be=be||16384;var xe=this;this.reader.onload=function(pe){xe.fileBuffer=new se(new Uint8Array(pe.target.result)),xe.file=null,xe.readFileAndPush(be)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(be)},ge._createStream=function(be,xe,pe){if(z.blob(be)||z.file(be))return new ue(be.slice(xe,pe));throw new Error("_createStream requires File/String.")},ge._getPartSize=function(be,xe){return xe?Math.max(Math.ceil(be/1e4),xe):1048576},ge._divideParts=function(be,xe){for(var pe=Math.ceil(be/xe),me=[],Ae=0;Ae<pe;Ae++){var De=xe*Ae,ke=Math.min(De+xe,be);me.push({start:De,end:ke})}return me},ge._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(ie,Ee,ce){"use strict";function se(xe){return xe&&xe.__esModule?xe:{default:xe}}var re=ie("babel-runtime/core-js/object/keys"),ue=se(re),ee=ie("babel-runtime/regenerator"),te=se(ee),E=ie("debug")("ali-oss:object"),y=ie("utility"),z=ie("fs"),x=ie("is-type-of"),ne=ie("url"),ae=ie("copy-to"),oe=ie("path"),ge=ie("mime"),Se=ie("../common/callback"),ve=ie("../common/signUtils"),be=ce;be.append=te.default.mark(function xe(pe,me,Ae){var De;return te.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return Ae=Ae||{},Ae.position===void 0&&(Ae.position="0"),Ae.subres={append:"",position:Ae.position},Ae.method="POST",ke.next=6,this.put(pe,me,Ae);case 6:return De=ke.sent,De.nextAppendPosition=De.res.headers["x-oss-next-append-position"],ke.abrupt("return",De);case 9:case"end":return ke.stop()}},xe,this)}),be.put=te.default.mark(function xe(pe,me,Ae){var De,ke,Ie,Fe,Pe,qe;return te.default.wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(De=void 0,Ae=Ae||{},!x.buffer(me)){Ke.next=6;break}De=me,Ke.next=18;break;case 6:if(!x.blob(me)&&!x.file(me)){Ke.next=17;break}return Ae.mime||(x.file(me)?Ae.mime=ge.getType(oe.extname(me.name)):Ae.mime=me.type),ke=this._createStream(me,0,me.size),Ke.next=11,this._getFileSize(me);case 11:return Ae.contentLength=Ke.sent,Ke.next=14,this.putStream(pe,ke,Ae);case 14:return Ke.abrupt("return",Ke.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return Ae.headers=Ae.headers||{},this._convertMetaToHeaders(Ae.meta,Ae.headers),Ie=Ae.method||"PUT",Fe=this._objectRequestParams(Ie,pe,Ae),Se.encodeCallback(Fe,Ae),Fe.mime=Ae.mime,Fe.content=De,Fe.successStatuses=[200],Ke.next=28,this.request(Fe);case 28:return Pe=Ke.sent,qe={name:pe,url:this._objectUrl(pe),res:Pe.res},Fe.headers&&Fe.headers["x-oss-callback"]&&(qe.data=JSON.parse(Pe.data.toString())),Ke.abrupt("return",qe);case 32:case"end":return Ke.stop()}},xe,this)}),be.putStream=te.default.mark(function xe(pe,me,Ae){var De,ke,Ie,Fe;return te.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},Ae.contentLength?Ae.headers["Content-Length"]=Ae.contentLength:Ae.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(Ae.meta,Ae.headers),De=Ae.method||"PUT",ke=this._objectRequestParams(De,pe,Ae),Se.encodeCallback(ke,Ae),ke.mime=Ae.mime,ke.stream=me,ke.successStatuses=[200],Pe.next=12,this.request(ke);case 12:return Ie=Pe.sent,Fe={name:pe,url:this._objectUrl(pe),res:Ie.res},ke.headers&&ke.headers["x-oss-callback"]&&(Fe.data=JSON.parse(Ie.data.toString())),Pe.abrupt("return",Fe);case 16:case"end":return Pe.stop()}},xe,this)}),be.head=te.default.mark(function xe(pe,me){var Ae,De,ke;return te.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ae=this._objectRequestParams("HEAD",pe,me),Ae.successStatuses=[200,304],Ie.next=4,this.request(Ae);case 4:return De=Ie.sent,ke={meta:null,res:De.res,status:De.status},De.status===200&&(0,ue.default)(De.headers).forEach(function(Fe){Fe.indexOf("x-oss-meta-")===0&&(ke.meta||(ke.meta={}),ke.meta[Fe.substring(11)]=De.headers[Fe])}),Ie.abrupt("return",ke);case 8:case"end":return Ie.stop()}},xe,this)}),be.get=te.default.mark(function xe(pe,me,Ae){var De,ke,Ie,Fe;return te.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return De=null,ke=!1,x.writableStream(me)?De=me:x.string(me)?(De=z.createWriteStream(me),ke=!0):Ae=me,Ae=Ae||{},Ae.process&&(Ae.subres=Ae.subres||{},Ae.subres["x-oss-process"]=Ae.process),Ie=void 0,Pe.prev=6,Fe=this._objectRequestParams("GET",pe,Ae),Fe.writeStream=De,Fe.successStatuses=[200,206,304],Pe.next=12,this.request(Fe);case 12:Ie=Pe.sent,ke&&De.destroy(),Pe.next=24;break;case 16:if(Pe.prev=16,Pe.t0=Pe.catch(6),!ke){Pe.next=23;break}return De.destroy(),E("get error: %s, delete the exists file %s",Pe.t0,me),Pe.next=23,this._deleteFileSafe(me);case 23:throw Pe.t0;case 24:return Pe.abrupt("return",{res:Ie.res,content:Ie.data});case 25:case"end":return Pe.stop()}},xe,this,[[6,16]])}),be.getStream=te.default.mark(function xe(pe,me){var Ae,De;return te.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return me=me||{},Ae=this._objectRequestParams("GET",pe,me),Ae.customResponse=!0,Ae.successStatuses=[200,206,304],ke.next=6,this.request(Ae);case 6:return De=ke.sent,ke.abrupt("return",{stream:De.res,res:{status:De.status,headers:De.headers}});case 8:case"end":return ke.stop()}},xe,this)}),be.delete=te.default.mark(function xe(pe,me){var Ae,De;return te.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return Ae=this._objectRequestParams("DELETE",pe,me),Ae.successStatuses=[204],ke.next=4,this.request(Ae);case 4:return De=ke.sent,ke.abrupt("return",{res:De.res});case 6:case"end":return ke.stop()}},xe,this)}),be.deleteMulti=te.default.mark(function xe(pe,me){var Ae,De,ke,Ie,Fe,Pe;return te.default.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:for(me=me||{},Ae=`<?xml version="1.0" encoding="UTF-8"?>
<Delete>
`,me.quiet?Ae+=` <Quiet>true</Quiet>
`:Ae+=` <Quiet>false</Quiet>
`,De=0;De<pe.length;De++)Ae+=" <Object><Key>"+y.escape(this._objectName(pe[De]))+`</Key></Object>
`;return Ae+="</Delete>",E("delete multi objects: %s",Ae),me.subres="delete",ke=this._objectRequestParams("POST","",me),ke.mime="xml",ke.content=Ae,ke.xmlResponse=!0,ke.successStatuses=[200],qe.next=14,this.request(ke);case 14:return Ie=qe.sent,Fe=Ie.data,Pe=Fe&&Fe.Deleted||null,Pe&&(Array.isArray(Pe)||(Pe=[Pe]),Pe=Pe.map(function(Ke){return Ke.Key})),qe.abrupt("return",{res:Ie.res,deleted:Pe});case 19:case"end":return qe.stop()}},xe,this)}),be.copy=te.default.mark(function xe(pe,me,Ae){var De,ke,Ie;return te.default.wrap(function(Fe){for(;;)switch(Fe.prev=Fe.next){case 0:return Ae=Ae||{},Ae.headers=Ae.headers||{},(0,ue.default)(Ae.headers).forEach(function(Pe){Ae.headers["x-oss-copy-source-"+Pe.toLowerCase()]=Ae.headers[Pe]}),Ae.meta&&(Ae.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(Ae.meta,Ae.headers),me=me[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(me):"/"+encodeURIComponent(me.slice(1)),Ae.headers["x-oss-copy-source"]=me,De=this._objectRequestParams("PUT",pe,Ae),De.xmlResponse=!0,De.successStatuses=[200,304],Fe.next=12,this.request(De);case 12:return ke=Fe.sent,Ie=ke.data,Ie&&(Ie={etag:Ie.ETag,lastModified:Ie.LastModified}),Fe.abrupt("return",{data:Ie,res:ke.res});case 16:case"end":return Fe.stop()}},xe,this)}),be.putMeta=te.default.mark(function xe(pe,me,Ae){return te.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,this.copy(pe,pe,{meta:me||{},timeout:Ae&&Ae.timeout,ctx:Ae&&Ae.ctx});case 2:return De.abrupt("return",De.sent);case 3:case"end":return De.stop()}},xe,this)}),be.list=te.default.mark(function xe(pe,me){var Ae,De,ke,Ie,Fe;return te.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Ae=this._objectRequestParams("GET","",me),Ae.query=pe,Ae.xmlResponse=!0,Ae.successStatuses=[200],Pe.next=6,this.request(Ae);case 6:return De=Pe.sent,ke=De.data.Contents,Ie=this,ke&&(Array.isArray(ke)||(ke=[ke]),ke=ke.map(function(qe){return{name:qe.Key,url:Ie._objectUrl(qe.Key),lastModified:qe.LastModified,etag:qe.ETag,type:qe.Type,size:Number(qe.Size),storageClass:qe.StorageClass,owner:{id:qe.Owner.ID,displayName:qe.Owner.DisplayName}}})),Fe=De.data.CommonPrefixes||null,Fe&&(Array.isArray(Fe)||(Fe=[Fe]),Fe=Fe.map(function(qe){return qe.Prefix})),Pe.abrupt("return",{res:De.res,objects:ke,prefixes:Fe,nextMarker:De.data.NextMarker||null,isTruncated:De.data.IsTruncated==="true"});case 13:case"end":return Pe.stop()}},xe,this)}),be.putACL=te.default.mark(function xe(pe,me,Ae){var De,ke;return te.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ae=Ae||{},Ae.subres="acl",Ae.headers=Ae.headers||{},Ae.headers["x-oss-object-acl"]=me,pe=this._objectName(pe),De=this._objectRequestParams("PUT",pe,Ae),De.successStatuses=[200],Ie.next=9,this.request(De);case 9:return ke=Ie.sent,Ie.abrupt("return",{res:ke.res});case 11:case"end":return Ie.stop()}},xe,this)}),be.getACL=te.default.mark(function xe(pe,me){var Ae,De;return te.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return me=me||{},me.subres="acl",pe=this._objectName(pe),Ae=this._objectRequestParams("GET",pe,me),Ae.successStatuses=[200],Ae.xmlResponse=!0,ke.next=8,this.request(Ae);case 8:return De=ke.sent,ke.abrupt("return",{acl:De.data.AccessControlList.Grant,owner:{id:De.data.Owner.ID,displayName:De.data.Owner.DisplayName},res:De.res});case 10:case"end":return ke.stop()}},xe,this)}),be.restore=te.default.mark(function xe(pe,me){var Ae,De;return te.default.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return me=me||{},me.subres="restore",Ae=this._objectRequestParams("POST",pe,me),Ae.successStatuses=[202],ke.next=6,this.request(Ae);case 6:return De=ke.sent,ke.abrupt("return",{res:De.res});case 8:case"end":return ke.stop()}},xe,this)}),be.signatureUrl=function(xe,pe){pe=pe||{},xe=this._objectName(xe),pe.method=pe.method||"GET";var me=y.timestamp()+(pe.expires||1800),Ae={bucket:this.options.bucket,object:xe},De=this._getResource(Ae);this.options.stsToken&&(pe["security-token"]=this.options.stsToken);var ke=ve._signatureForURL(this.options.accessKeySecret,pe,De,me),Ie=ne.parse(this._getReqUrl(Ae));return Ie.query={OSSAccessKeyId:this.options.accessKeyId,Expires:me,Signature:ke.Signature},ae(ke.subResource).to(Ie.query),Ie.format()},be.getObjectUrl=function(xe,pe){return pe?pe[pe.length-1]!=="/"&&(pe+="/"):pe=this.options.endpoint.format(),pe+this._escape(this._objectName(xe))},be._objectUrl=function(xe){return this._getReqUrl({bucket:this.options.bucket,object:xe})},be.generateObjectUrl=function(xe,pe){if(pe)pe[pe.length-1]!=="/"&&(pe+="/");else{pe=this.options.endpoint.format();var me=ne.parse(pe),Ae=this.options.bucket;me.hostname=Ae+"."+me.hostname,me.host=Ae+"."+me.host,pe=me.format()}return pe+this._escape(this._objectName(xe))},be._objectRequestParams=function(xe,pe,me){if(!this.options.bucket)throw new Error("Please create a bucket first");me=me||{},pe=this._objectName(pe);var Ae={object:pe,bucket:this.options.bucket,method:xe,subres:me&&me.subres,timeout:me&&me.timeout,ctx:me&&me.ctx};return me.headers&&(Ae.headers={},ae(me.headers).to(Ae.headers)),Ae},be._objectName=function(xe){return xe.replace(/^\/+/,"")},be._statFile=function(xe){return function(pe){z.stat(xe,pe)}},be._convertMetaToHeaders=function(xe,pe){xe&&(0,ue.default)(xe).forEach(function(me){pe["x-oss-meta-"+me]=xe[me]})},be._deleteFileSafe=function(xe){return function(pe){z.exists(xe,function(me){me?z.unlink(xe,function(Ae){Ae&&E("unlink %j error: %s",xe,Ae),pe()}):pe()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(ie,Ee,ce){"use strict";ce.version="5.3.1"},{}],6:[function(ie,Ee,ce){"use strict";function se(oe){return oe&&oe.__esModule?oe:{default:oe}}function re(oe){return oe&&typeof oe.next=="function"&&typeof oe.throw=="function"}function ue(oe){if(!oe)return!1;var ge=oe.constructor;return!!ge&&(ge.name==="GeneratorFunction"||ge.displayName==="GeneratorFunction"||re(ge.prototype)||re(oe.prototype))}function ee(oe,ge){var Se=new oe(ge),ve=(0,x.default)(Se),be=(0,x.default)((0,y.default)(Se));ve.concat(be).forEach(function(xe){ue(Se[xe])?this[xe]=ne.wrap(Se[xe]).bind(Se):this[xe]=Se[xe]},this)}function te(oe){if(!(this instanceof te))return new te(oe);ee.call(this,ae,oe)}var E=ie("babel-runtime/core-js/object/get-prototype-of"),y=se(E),z=ie("babel-runtime/core-js/object/keys"),x=se(z),ne=ie("co"),ae=ie("./client");Ee.exports=te,te.STS=function oe(ge){if(!(this instanceof oe))return new oe(ge);ee.call(this,ae.STS,ge)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(ie,Ee,ce){(function(se){"use strict";function re(y){return y&&y.__esModule?y:{default:y}}var ue=ie("babel-runtime/core-js/object/keys"),ee=re(ue),te=ie("babel-runtime/core-js/json/stringify"),E=re(te);ce.encodeCallback=function(y,z){if(y.headers=y.headers||{},!Object.prototype.hasOwnProperty.call(y.headers,"x-oss-callback")&&z.callback){var x={callbackUrl:encodeURI(z.callback.url),callbackBody:z.callback.body};z.callback.host&&(x.callbackHost=z.callback.host),z.callback.contentType&&(x.callbackBodyType=z.callback.contentType);var ne=new se((0,E.default)(x)).toString("base64");if(y.headers["x-oss-callback"]=ne,z.callback.customValue){var ae={};(0,ee.default)(z.callback.customValue).forEach(function(oe){ae["x:"+oe]=z.callback.customValue[oe]}),y.headers["x-oss-callback-var"]=new se((0,E.default)(ae)).toString("base64")}}}}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/regenerator"),re=function(E){return E&&E.__esModule?E:{default:E}}(se),ue=ie("copy-to"),ee=ie("./callback"),te=ce;te.listUploads=re.default.mark(function E(y,z){var x,ne,ae,oe;return re.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return z=z||{},x={},ue(z).to(x),x.subres="uploads",ne=this._objectRequestParams("GET","",x),ne.query=y,ne.xmlResponse=!0,ne.successStatuses=[200],ge.next=10,this.request(ne);case 10:return ae=ge.sent,oe=ae.data.Upload||[],Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(Se){return{name:Se.Key,uploadId:Se.UploadId,initiated:Se.Initiated}}),ge.abrupt("return",{res:ae.res,uploads:oe,bucket:ae.data.Bucket,nextKeyMarker:ae.data.NextKeyMarker,nextUploadIdMarker:ae.data.NextUploadIdMarker,isTruncated:ae.data.IsTruncated==="true"});case 15:case"end":return ge.stop()}},E,this)}),te.listParts=re.default.mark(function E(y,z,x,ne){var ae,oe,ge;return re.default.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return ne=ne||{},ae={},ue(ne).to(ae),ae.subres={uploadId:z},oe=this._objectRequestParams("GET",y,ae),oe.query=x,oe.xmlResponse=!0,oe.successStatuses=[200],Se.next=10,this.request(oe);case 10:return ge=Se.sent,Se.abrupt("return",{res:ge.res,uploadId:ge.data.UploadId,bucket:ge.data.Bucket,name:ge.data.Key,partNumberMarker:ge.data.PartNumberMarker,nextPartNumberMarker:ge.data.NextPartNumberMarker,maxParts:ge.data.MaxParts,isTruncated:ge.data.IsTruncated,parts:ge.data.Part||[]});case 12:case"end":return Se.stop()}},E,this)}),te.abortMultipartUpload=re.default.mark(function E(y,z,x){var ne,ae,oe;return re.default.wrap(function(ge){for(;;)switch(ge.prev=ge.next){case 0:return this.cancel(),x=x||{},ne={},ue(x).to(ne),ne.subres={uploadId:z},ae=this._objectRequestParams("DELETE",y,ne),ae.successStatuses=[204],ge.next=9,this.request(ae);case 9:return oe=ge.sent,ge.abrupt("return",{res:oe.res});case 11:case"end":return ge.stop()}},E,this)}),te.initMultipartUpload=re.default.mark(function E(y,z){var x,ne,ae;return re.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return z=z||{},x={},ue(z).to(x),x.headers=x.headers||{},this._convertMetaToHeaders(z.meta,x.headers),x.subres="uploads",ne=this._objectRequestParams("POST",y,x),ne.mime=z.mime,ne.xmlResponse=!0,ne.successStatuses=[200],oe.next=12,this.request(ne);case 12:return ae=oe.sent,oe.abrupt("return",{res:ae.res,bucket:ae.data.Bucket,name:ae.data.Key,uploadId:ae.data.UploadId});case 14:case"end":return oe.stop()}},E,this)}),te.uploadPart=re.default.mark(function E(y,z,x,ne,ae,oe,ge){var Se;return re.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return Se={stream:this._createStream(ne,ae,oe),size:oe-ae},ve.next=3,this._uploadPart(y,z,x,Se,ge);case 3:return ve.abrupt("return",ve.sent);case 4:case"end":return ve.stop()}},E,this)}),te.completeMultipartUpload=re.default.mark(function E(y,z,x,ne){var ae,oe,ge,Se,ve,be,xe,pe;return re.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:for(ae=x.concat().sort(function(Ae,De){return Ae.number-De.number}).filter(function(Ae,De,ke){return!De||Ae.number!==ke[De-1].number}),oe=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,ge=0;ge<ae.length;ge++)Se=ae[ge],oe+=`<Part>
`,oe+="<PartNumber>"+Se.number+`</PartNumber>
`,oe+="<ETag>"+Se.etag+`</ETag>
`,oe+=`</Part>
`;return oe+="</CompleteMultipartUpload>",ne=ne||{},ve={},ue(ne).to(ve),ve.subres={uploadId:z},be=this._objectRequestParams("POST",y,ve),ee.encodeCallback(be,ve),be.mime="xml",be.content=oe,be.headers&&be.headers["x-oss-callback"]||(be.xmlResponse=!0),be.successStatuses=[200],me.next=16,this.request(be);case 16:return xe=me.sent,pe={res:xe.res,bucket:be.bucket,name:y,etag:xe.res.headers.etag},be.headers&&be.headers["x-oss-callback"]&&(pe.data=JSON.parse(xe.data.toString())),me.abrupt("return",pe);case 20:case"end":return me.stop()}},E,this)}),te._uploadPart=re.default.mark(function E(y,z,x,ne,ae){var oe,ge,Se;return re.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return ae=ae||{},oe={},ue(ae).to(oe),oe.headers={"Content-Length":ne.size},oe.subres={partNumber:x,uploadId:z},ge=this._objectRequestParams("PUT",y,oe),ge.mime=oe.mime,ge.stream=ne.stream,ge.successStatuses=[200],ve.next=11,this.request(ge);case 11:return Se=ve.sent,ne.stream=null,ge.stream=null,ve.abrupt("return",{name:y,etag:Se.res.headers.etag,res:Se.res});case 15:case"end":return ve.stop()}},E,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(ie,Ee,ce){(function(se){"use strict";function re(x){return x&&x.__esModule?x:{default:x}}var ue=ie("babel-runtime/core-js/json/stringify"),ee=re(ue),te=ie("babel-runtime/core-js/object/keys"),E=re(te),y=ie("./../../shims/crypto/crypto.js"),z=ie("is-type-of");ce.buildCanonicalizedResource=function(x,ne){var ae=""+x,oe="?";if(z.string(ne)&&ne.trim()!=="")ae+=oe+ne;else if(z.array(ne))ne.sort(),ae+=oe+ne.join("&");else if(ne){var ge=function(ve,be){return ve[0]>be[0]?1:ve[0]<be[0]?-1:0},Se=function(ve){ae+=oe+ve,ne[ve]&&(ae+="="+ne[ve]),oe="&"};(0,E.default)(ne).sort(ge).forEach(Se)}return ae},ce.buildCanonicalString=function(x,ne,ae,oe){ae=ae||{};var ge=ae.headers||{},Se=[],ve={},be=[x.toUpperCase(),ge["Content-Md5"]||"",ge["Content-Type"]||ge["Content-Type".toLowerCase()],oe||ge["x-oss-date"]];return(0,E.default)(ge).forEach(function(xe){var pe=xe.toLowerCase();pe.indexOf("x-oss-")===0&&(ve[pe]=String(ge[xe]).trim())}),(0,E.default)(ve).sort().forEach(function(xe){Se.push(xe+":"+ve[xe])}),be=be.concat(Se),be.push(this.buildCanonicalizedResource(ne,ae.parameters)),be.join(`
`)},ce.computeSignature=function(x,ne){return y.createHmac("sha1",x).update(new se(ne,"utf8")).digest("base64")},ce.authorization=function(x,ne,ae){return"OSS "+x+":"+this.computeSignature(ne,ae)},ce._signatureForURL=function(x,ne,ae,oe){var ge={},Se={};if(ne.process&&(Se["x-oss-process"]=ne.process),ne.response&&(0,E.default)(ne.response).forEach(function(pe){var me="response-"+pe.toLowerCase();Se[me]=ne.response[pe]}),(0,E.default)(ne).forEach(function(pe){var me=pe.toLowerCase(),Ae=ne[pe];me.indexOf("x-oss-")===0?ge[me]=Ae:me.indexOf("content-md5")===0||me.indexOf("content-type")===0?ge[pe]=Ae:me!=="expires"&&me!=="response"&&me!=="process"&&me!=="method"&&(Se[me]=Ae)}),Object.prototype.hasOwnProperty.call(ne,"security-token")&&(Se["security-token"]=ne["security-token"]),Object.prototype.hasOwnProperty.call(ne,"callback")){var ve={callbackUrl:encodeURI(ne.callback.url),callbackBody:ne.callback.body};if(ne.callback.host&&(ve.callbackHost=ne.callback.host),ne.callback.contentType&&(ve.callbackBodyType=ne.callback.contentType),Se.callback=new se((0,ee.default)(ve)).toString("base64"),ne.callback.customValue){var be={};(0,E.default)(ne.callback.customValue).forEach(function(pe){be["x:"+pe]=ne.callback.customValue[pe]}),Se["callback-var"]=new se((0,ee.default)(be)).toString("base64")}}var xe=this.buildCanonicalString(ne.method,ae,{headers:ge,parameters:Se},oe.toString());return{Signature:this.computeSignature(x,xe),subResource:Se}}}).call(this,ie("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/regenerator"),re=function(y){return y&&y.__esModule?y:{default:y}}(se),ue=ie("co"),ee=ie("co-priority-queue"),te=ie("any-promise"),E=ce;E._thunkPool=function(y,z){function x(Se,ve){++oe===Se.length&&ve(ge)}function ne(Se,ve){function be(){var ke;return re.default.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:ke=void 0;case 1:if(ae.isCancel()){Ie.next=9;break}return Ie.next=4,me.next();case 4:return ke=Ie.sent,Ie.next=7,ke();case 7:Ie.next=1;break;case 9:Ae+=1,Ae===Se&&(me.fns=[],me.buffer=[],ve(ge));case 11:case"end":return Ie.stop()}},pe,this)}function xe(ke){console.error(ke.stack)}for(var pe=re.default.mark(be),me=new ee,Ae=0,De=0;De<Se;De++)ue(be).catch(xe);return function(ke,Ie){return function(Fe){me.push(re.default.mark(function Pe(){return re.default.wrap(function(qe){for(;;)switch(qe.prev=qe.next){case 0:return qe.prev=0,qe.t0=Fe,qe.next=4,ke;case 4:qe.t1=qe.sent,(0,qe.t0)(null,qe.t1),qe.next=11;break;case 8:qe.prev=8,qe.t2=qe.catch(0),Fe(qe.t2);case 11:case"end":return qe.stop()}},Pe,this,[[0,8]])}),Ie)}}}var ae=this,oe=0,ge=[];return new te(function(Se){function ve(Ae){return re.default.wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.next=2,pe(y[Ae]);case 2:x(y,Se);case 3:case"end":return De.stop()}},xe,this)}function be(Ae){ge.push(Ae),x(y,Se)}for(var xe=re.default.mark(ve),pe=new ne(z,Se),me=0;me<y.length;me++)ue(ve(me)).catch(be)})},E.cancel=function(){this.options.cancelFlag=!0},E.isCancel=function(){return this.options.cancelFlag},E.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(ie,Ee,ce){"use strict";ce._isIP=function(se){var re=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,ue=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return re.test(se)||ue.test(se)}},{}],12:[function(ie,Ee,ce){function se(){}Ee.exports=se,Ee.exports.HttpsAgent=se},{}],13:[function(ie,Ee,ce){Ee.exports=ie("./register")().Promise},{"./register":15}],14:[function(ie,Ee,ce){"use strict";var se=null;Ee.exports=function(re,ue){return function(ee,te){ee=ee||null,te=te||{};var E=te.global!==!1;if(se===null&&E&&(se=re["@@any-promise/REGISTRATION"]||null),se!==null&&ee!==null&&se.implementation!==ee)throw new Error('any-promise already defined as "'+se.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return se===null&&(se=ee!==null&&te.Promise!==void 0?{Promise:te.Promise,implementation:ee}:ue(ee),E&&(re["@@any-promise/REGISTRATION"]=se)),se}}},{}],15:[function(ie,Ee,ce){"use strict";function se(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}Ee.exports=ie("./loader")(window,se)},{"./loader":14}],16:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(ie,Ee,ce){Ee.exports={default:ie("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(ie,Ee,ce){"use strict";ce.__esModule=!0,ce.default=function(se,re){if(!(se instanceof re))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(ie,Ee,ce){"use strict";ce.__esModule=!0;var se=ie("../core-js/object/define-property"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);ce.default=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),(0,re.default)(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}()},{"../core-js/object/define-property":20}],32:[function(ie,Ee,ce){"use strict";function se(y){return y&&y.__esModule?y:{default:y}}ce.__esModule=!0;var re=ie("../core-js/symbol/iterator"),ue=se(re),ee=ie("../core-js/symbol"),te=se(ee),E=typeof te.default=="function"&&typeof ue.default=="symbol"?function(y){return typeof y}:function(y){return y&&typeof te.default=="function"&&y.constructor===te.default&&y!==te.default.prototype?"symbol":typeof y};ce.default=typeof te.default=="function"&&E(ue.default)==="symbol"?function(y){return y===void 0?"undefined":E(y)}:function(y){return y&&typeof te.default=="function"&&y.constructor===te.default&&y!==te.default.prototype?"symbol":y===void 0?"undefined":E(y)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(ie,Ee,ce){Ee.exports=ie("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(ie,Ee,ce){"use strict";function se(Se){var ve=Se.length;if(ve%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var be=Se.indexOf("=");return be===-1&&(be=ve),[be,be===ve?0:4-be%4]}function re(Se){var ve=se(Se),be=ve[0],xe=ve[1];return 3*(be+xe)/4-xe}function ue(Se,ve,be){return 3*(ve+be)/4-be}function ee(Se){for(var ve,be=se(Se),xe=be[0],pe=be[1],me=new ne(ue(Se,xe,pe)),Ae=0,De=pe>0?xe-4:xe,ke=0;ke<De;ke+=4)ve=x[Se.charCodeAt(ke)]<<18|x[Se.charCodeAt(ke+1)]<<12|x[Se.charCodeAt(ke+2)]<<6|x[Se.charCodeAt(ke+3)],me[Ae++]=ve>>16&255,me[Ae++]=ve>>8&255,me[Ae++]=255&ve;return pe===2&&(ve=x[Se.charCodeAt(ke)]<<2|x[Se.charCodeAt(ke+1)]>>4,me[Ae++]=255&ve),pe===1&&(ve=x[Se.charCodeAt(ke)]<<10|x[Se.charCodeAt(ke+1)]<<4|x[Se.charCodeAt(ke+2)]>>2,me[Ae++]=ve>>8&255,me[Ae++]=255&ve),me}function te(Se){return z[Se>>18&63]+z[Se>>12&63]+z[Se>>6&63]+z[63&Se]}function E(Se,ve,be){for(var xe,pe=[],me=ve;me<be;me+=3)xe=(Se[me]<<16&16711680)+(Se[me+1]<<8&65280)+(255&Se[me+2]),pe.push(te(xe));return pe.join("")}function y(Se){for(var ve,be=Se.length,xe=be%3,pe=[],me=0,Ae=be-xe;me<Ae;me+=16383)pe.push(E(Se,me,me+16383>Ae?Ae:me+16383));return xe===1?(ve=Se[be-1],pe.push(z[ve>>2]+z[ve<<4&63]+"==")):xe===2&&(ve=(Se[be-2]<<8)+Se[be-1],pe.push(z[ve>>10]+z[ve>>4&63]+z[ve<<2&63]+"=")),pe.join("")}ce.byteLength=re,ce.toByteArray=ee,ce.fromByteArray=y;for(var z=[],x=[],ne=typeof Uint8Array!="undefined"?Uint8Array:Array,ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oe=0,ge=ae.length;oe<ge;++oe)z[oe]=ae[oe],x[ae.charCodeAt(oe)]=oe;x[45]=62,x[95]=63},{}],35:[function(ie,Ee,ce){(function(se,re,ue){Ee!==void 0&&Ee.exports?Ee.exports=ue():typeof de=="function"&&de.amd?de("bowser",ue):se.bowser=ue()})(this,0,function(){function se(x){function ne(Ue){var Ze=x.match(Ue);return Ze&&Ze.length>1&&Ze[1]||""}function ae(Ue){var Ze=x.match(Ue);return Ze&&Ze.length>1&&Ze[2]||""}var oe,ge=ne(/(ipod|iphone|ipad)/i).toLowerCase(),Se=/like android/i.test(x),ve=!Se&&/android/i.test(x),be=/nexus\s*[0-6]\s*/i.test(x),xe=!be&&/nexus\s*[0-9]+/i.test(x),pe=/CrOS/.test(x),me=/silk/i.test(x),Ae=/sailfish/i.test(x),De=/tizen/i.test(x),ke=/(web|hpw)os/i.test(x),Ie=/windows phone/i.test(x),Fe=(/SamsungBrowser/i.test(x),!Ie&&/windows/i.test(x)),Pe=!ge&&!me&&/macintosh/i.test(x),qe=!ve&&!Ae&&!De&&!ke&&/linux/i.test(x),Ke=ae(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=ne(/version\/(\d+(\.\d+)?)/i),He=/tablet/i.test(x)&&!/tablet pc/i.test(x),rt=!He&&/[^-]mobi/i.test(x),Ge=/xbox/i.test(x);/opera/i.test(x)?oe={name:"Opera",opera:y,version:ot||ne(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(x)?oe={name:"Opera",opera:y,version:ne(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(x)?oe={name:"Samsung Internet for Android",samsungBrowser:y,version:ot||ne(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(x)?oe={name:"Opera Coast",coast:y,version:ot||ne(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(x)?oe={name:"Yandex Browser",yandexbrowser:y,version:ot||ne(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(x)?oe={name:"UC Browser",ucbrowser:y,version:ne(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(x)?oe={name:"Maxthon",maxthon:y,version:ne(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(x)?oe={name:"Epiphany",epiphany:y,version:ne(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(x)?oe={name:"Puffin",puffin:y,version:ne(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(x)?oe={name:"Sleipnir",sleipnir:y,version:ne(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(x)?oe={name:"K-Meleon",kMeleon:y,version:ne(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Ie?(oe={name:"Windows Phone",osname:"Windows Phone",windowsphone:y},Ke?(oe.msedge=y,oe.version=Ke):(oe.msie=y,oe.version=ne(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(x)?oe={name:"Internet Explorer",msie:y,version:ne(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:pe?oe={name:"Chrome",osname:"Chrome OS",chromeos:y,chromeBook:y,chrome:y,version:ne(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(x)?oe={name:"Microsoft Edge",msedge:y,version:Ke}:/vivaldi/i.test(x)?oe={name:"Vivaldi",vivaldi:y,version:ne(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:Ae?oe={name:"Sailfish",osname:"Sailfish OS",sailfish:y,version:ne(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(x)?oe={name:"SeaMonkey",seamonkey:y,version:ne(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(x)?(oe={name:"Firefox",firefox:y,version:ne(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(x)&&(oe.firefoxos=y,oe.osname="Firefox OS")):me?oe={name:"Amazon Silk",silk:y,version:ne(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(x)?oe={name:"PhantomJS",phantom:y,version:ne(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(x)?oe={name:"SlimerJS",slimer:y,version:ne(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(x)||/rim\stablet/i.test(x)?oe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:y,version:ot||ne(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:ke?(oe={name:"WebOS",osname:"WebOS",webos:y,version:ot||ne(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(x)&&(oe.touchpad=y)):/bada/i.test(x)?oe={name:"Bada",osname:"Bada",bada:y,version:ne(/dolfin\/(\d+(\.\d+)?)/i)}:De?oe={name:"Tizen",osname:"Tizen",tizen:y,version:ne(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(x)?oe={name:"QupZilla",qupzilla:y,version:ne(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(x)?oe={name:"Chromium",chromium:y,version:ne(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(x)?oe={name:"Chrome",chrome:y,version:ne(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:ve?oe={name:"Android",version:ot}:/safari|applewebkit/i.test(x)?(oe={name:"Safari",safari:y},ot&&(oe.version=ot)):ge?(oe={name:ge=="iphone"?"iPhone":ge=="ipad"?"iPad":"iPod"},ot&&(oe.version=ot)):oe=/googlebot/i.test(x)?{name:"Googlebot",googlebot:y,version:ne(/googlebot\/(\d+(\.\d+))/i)||ot}:{name:ne(/^(.*)\/(.*) /),version:ae(/^(.*)\/(.*) /)},!oe.msedge&&/(apple)?webkit/i.test(x)?(/(apple)?webkit\/537\.36/i.test(x)?(oe.name=oe.name||"Blink",oe.blink=y):(oe.name=oe.name||"Webkit",oe.webkit=y),!oe.version&&ot&&(oe.version=ot)):!oe.opera&&/gecko\//i.test(x)&&(oe.name=oe.name||"Gecko",oe.gecko=y,oe.version=oe.version||ne(/gecko\/(\d+(\.\d+)?)/i)),oe.windowsphone||!ve&&!oe.silk?!oe.windowsphone&&ge?(oe[ge]=y,oe.ios=y,oe.osname="iOS"):Pe?(oe.mac=y,oe.osname="macOS"):Ge?(oe.xbox=y,oe.osname="Xbox"):Fe?(oe.windows=y,oe.osname="Windows"):qe&&(oe.linux=y,oe.osname="Linux"):(oe.android=y,oe.osname="Android");var ct="";oe.windows?ct=function(Ue){switch(Ue){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(ne(/Windows ((NT|XP)( \d\d?.\d)?)/i)):oe.windowsphone?ct=ne(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):oe.mac?(ct=ne(/Mac OS X (\d+([_\.\s]\d+)*)/i),ct=ct.replace(/[_\s]/g,".")):ge?(ct=ne(/os (\d+([_\s]\d+)*) like mac os x/i),ct=ct.replace(/[_\s]/g,".")):ve?ct=ne(/android[ \/-](\d+(\.\d+)*)/i):oe.webos?ct=ne(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):oe.blackberry?ct=ne(/rim\stablet\sos\s(\d+(\.\d+)*)/i):oe.bada?ct=ne(/bada\/(\d+(\.\d+)*)/i):oe.tizen&&(ct=ne(/tizen[\/\s](\d+(\.\d+)*)/i)),ct&&(oe.osversion=ct);var We=!oe.windows&&ct.split(".")[0];return He||xe||ge=="ipad"||ve&&(We==3||We>=4&&!rt)||oe.silk?oe.tablet=y:(rt||ge=="iphone"||ge=="ipod"||ve||be||oe.blackberry||oe.webos||oe.bada)&&(oe.mobile=y),oe.msedge||oe.msie&&oe.version>=10||oe.yandexbrowser&&oe.version>=15||oe.vivaldi&&oe.version>=1||oe.chrome&&oe.version>=20||oe.samsungBrowser&&oe.version>=4||oe.firefox&&oe.version>=20||oe.safari&&oe.version>=6||oe.opera&&oe.version>=10||oe.ios&&oe.osversion&&oe.osversion.split(".")[0]>=6||oe.blackberry&&oe.version>=10.1||oe.chromium&&oe.version>=20?oe.a=y:oe.msie&&oe.version<10||oe.chrome&&oe.version<20||oe.firefox&&oe.version<20||oe.safari&&oe.version<6||oe.opera&&oe.version<10||oe.ios&&oe.osversion&&oe.osversion.split(".")[0]<6||oe.chromium&&oe.version<20?oe.c=y:oe.x=y,oe}function re(x){return x.split(".").length}function ue(x,ne){var ae,oe=[];if(Array.prototype.map)return Array.prototype.map.call(x,ne);for(ae=0;ae<x.length;ae++)oe.push(ne(x[ae]));return oe}function ee(x){for(var ne=Math.max(re(x[0]),re(x[1])),ae=ue(x,function(oe){var ge=ne-re(oe);return oe+=new Array(ge+1).join(".0"),ue(oe.split("."),function(Se){return new Array(20-Se.length).join("0")+Se}).reverse()});--ne>=0;){if(ae[0][ne]>ae[1][ne])return 1;if(ae[0][ne]!==ae[1][ne])return-1;if(ne===0)return 0}}function te(x,ne,ae){var oe=z;typeof ne=="string"&&(ae=ne,ne=void 0),ne===void 0&&(ne=!1),ae&&(oe=se(ae));var ge=""+oe.version;for(var Se in x)if(x.hasOwnProperty(Se)&&oe[Se]){if(typeof x[Se]!="string")throw new Error("Browser version in the minVersion map should be a string: "+Se+": "+String(x));return ee([ge,x[Se]])<0}return ne}function E(x,ne,ae){return!te(x,ne,ae)}var y=!0,z=se(typeof navigator!="undefined"&&navigator.userAgent||"");return z.test=function(x){for(var ne=0;ne<x.length;++ne){var ae=x[ne];if(typeof ae=="string"&&ae in z)return!0}return!1},z.isUnsupportedBrowser=te,z.compareVersions=ee,z.check=E,z._detect=se,z.detect=se,z})},{}],36:[function(ie,Ee,ce){},{}],37:[function(ie,Ee,ce){function se(z){if(z&&!E(z))throw new Error("Unknown encoding: "+z)}function re(z){return z.toString(this.encoding)}function ue(z){this.charReceived=z.length%2,this.charLength=this.charReceived?2:0}function ee(z){this.charReceived=z.length%3,this.charLength=this.charReceived?3:0}var te=ie("buffer").Buffer,E=te.isEncoding||function(z){switch(z&&z.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},y=ce.StringDecoder=function(z){switch(this.encoding=(z||"utf8").toLowerCase().replace(/[-_]/,""),se(z),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ue;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ee;break;default:return void(this.write=re)}this.charBuffer=new te(6),this.charReceived=0,this.charLength=0};y.prototype.write=function(z){for(var x="";this.charLength;){var ne=z.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:z.length;if(z.copy(this.charBuffer,this.charReceived,0,ne),this.charReceived+=ne,this.charReceived<this.charLength)return"";z=z.slice(ne,z.length),x=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var oe=x.charCodeAt(x.length-1);if(!(oe>=55296&&oe<=56319)){if(this.charReceived=this.charLength=0,z.length===0)return x;break}this.charLength+=this.surrogateSize,x=""}this.detectIncompleteChar(z);var ae=z.length;this.charLength&&(z.copy(this.charBuffer,0,z.length-this.charReceived,ae),ae-=this.charReceived),x+=z.toString(this.encoding,0,ae);var ae=x.length-1,oe=x.charCodeAt(ae);if(oe>=55296&&oe<=56319){var ge=this.surrogateSize;return this.charLength+=ge,this.charReceived+=ge,this.charBuffer.copy(this.charBuffer,ge,0,ge),z.copy(this.charBuffer,0,0,ge),x.substring(0,ae)}return x},y.prototype.detectIncompleteChar=function(z){for(var x=z.length>=3?3:z.length;x>0;x--){var ne=z[z.length-x];if(x==1&&ne>>5==6){this.charLength=2;break}if(x<=2&&ne>>4==14){this.charLength=3;break}if(x<=3&&ne>>3==30){this.charLength=4;break}}this.charReceived=x},y.prototype.end=function(z){var x="";if(z&&z.length&&(x=this.write(z)),this.charReceived){var ne=this.charReceived,ae=this.charBuffer,oe=this.encoding;x+=ae.slice(0,ne).toString(oe)}return x}},{buffer:38}],38:[function(ie,Ee,ce){(function(se){"use strict";function re(){return ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ue(Le,Te){if(re()<Te)throw new RangeError("Invalid typed array length");return ee.TYPED_ARRAY_SUPPORT?(Le=new Uint8Array(Te),Le.__proto__=ee.prototype):(Le===null&&(Le=new ee(Te)),Le.length=Te),Le}function ee(Le,Te,je){if(!(ee.TYPED_ARRAY_SUPPORT||this instanceof ee))return new ee(Le,Te,je);if(typeof Le=="number"){if(typeof Te=="string")throw new Error("If encoding is specified then the first argument must be a string");return z(this,Le)}return te(this,Le,Te,je)}function te(Le,Te,je,ye){if(typeof Te=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Te instanceof ArrayBuffer?ae(Le,Te,je,ye):typeof Te=="string"?x(Le,Te,je):oe(Le,Te)}function E(Le){if(typeof Le!="number")throw new TypeError('"size" argument must be a number');if(Le<0)throw new RangeError('"size" argument must not be negative')}function y(Le,Te,je,ye){return E(Te),Te<=0?ue(Le,Te):je!==void 0?typeof ye=="string"?ue(Le,Te).fill(je,ye):ue(Le,Te).fill(je):ue(Le,Te)}function z(Le,Te){if(E(Te),Le=ue(Le,Te<0?0:0|ge(Te)),!ee.TYPED_ARRAY_SUPPORT)for(var je=0;je<Te;++je)Le[je]=0;return Le}function x(Le,Te,je){if(typeof je=="string"&&je!==""||(je="utf8"),!ee.isEncoding(je))throw new TypeError('"encoding" must be a valid string encoding');var ye=0|ve(Te,je);Le=ue(Le,ye);var le=Le.write(Te,je);return le!==ye&&(Le=Le.slice(0,le)),Le}function ne(Le,Te){var je=Te.length<0?0:0|ge(Te.length);Le=ue(Le,je);for(var ye=0;ye<je;ye+=1)Le[ye]=255&Te[ye];return Le}function ae(Le,Te,je,ye){if(Te.byteLength,je<0||Te.byteLength<je)throw new RangeError("'offset' is out of bounds");if(Te.byteLength<je+(ye||0))throw new RangeError("'length' is out of bounds");return Te=je===void 0&&ye===void 0?new Uint8Array(Te):ye===void 0?new Uint8Array(Te,je):new Uint8Array(Te,je,ye),ee.TYPED_ARRAY_SUPPORT?(Le=Te,Le.__proto__=ee.prototype):Le=ne(Le,Te),Le}function oe(Le,Te){if(ee.isBuffer(Te)){var je=0|ge(Te.length);return Le=ue(Le,je),Le.length===0||Te.copy(Le,0,0,je),Le}if(Te){if(typeof ArrayBuffer!="undefined"&&Te.buffer instanceof ArrayBuffer||"length"in Te)return typeof Te.length!="number"||nt(Te.length)?ue(Le,0):ne(Le,Te);if(Te.type==="Buffer"&&wt(Te.data))return ne(Le,Te.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ge(Le){if(Le>=re())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+re().toString(16)+" bytes");return 0|Le}function Se(Le){return+Le!=Le&&(Le=0),ee.alloc(+Le)}function ve(Le,Te){if(ee.isBuffer(Le))return Le.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Le)||Le instanceof ArrayBuffer))return Le.byteLength;typeof Le!="string"&&(Le=""+Le);var je=Le.length;if(je===0)return 0;for(var ye=!1;;)switch(Te){case"ascii":case"latin1":case"binary":return je;case"utf8":case"utf-8":case void 0:return bt(Le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*je;case"hex":return je>>>1;case"base64":return _t(Le).length;default:if(ye)return bt(Le).length;Te=(""+Te).toLowerCase(),ye=!0}}function be(Le,Te,je){var ye=!1;if((Te===void 0||Te<0)&&(Te=0),Te>this.length||((je===void 0||je>this.length)&&(je=this.length),je<=0)||(je>>>=0,Te>>>=0,je<=Te))return"";for(Le||(Le="utf8");;)switch(Le){case"hex":return Ge(this,Te,je);case"utf8":case"utf-8":return Ke(this,Te,je);case"ascii":return He(this,Te,je);case"latin1":case"binary":return rt(this,Te,je);case"base64":return qe(this,Te,je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ct(this,Te,je);default:if(ye)throw new TypeError("Unknown encoding: "+Le);Le=(Le+"").toLowerCase(),ye=!0}}function xe(Le,Te,je){var ye=Le[Te];Le[Te]=Le[je],Le[je]=ye}function pe(Le,Te,je,ye,le){if(Le.length===0)return-1;if(typeof je=="string"?(ye=je,je=0):je>2147483647?je=2147483647:je<-2147483648&&(je=-2147483648),je=+je,isNaN(je)&&(je=le?0:Le.length-1),je<0&&(je=Le.length+je),je>=Le.length){if(le)return-1;je=Le.length-1}else if(je<0){if(!le)return-1;je=0}if(typeof Te=="string"&&(Te=ee.from(Te,ye)),ee.isBuffer(Te))return Te.length===0?-1:me(Le,Te,je,ye,le);if(typeof Te=="number")return Te&=255,ee.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(Le,Te,je):Uint8Array.prototype.lastIndexOf.call(Le,Te,je):me(Le,[Te],je,ye,le);throw new TypeError("val must be string, number or Buffer")}function me(Le,Te,je,ye,le){function _e(ut,Ht){return Ne===1?ut[Ht]:ut.readUInt16BE(Ht*Ne)}var Ne=1,Ye=Le.length,Oe=Te.length;if(ye!==void 0&&((ye=String(ye).toLowerCase())==="ucs2"||ye==="ucs-2"||ye==="utf16le"||ye==="utf-16le")){if(Le.length<2||Te.length<2)return-1;Ne=2,Ye/=2,Oe/=2,je/=2}var tt;if(le){var Ct=-1;for(tt=je;tt<Ye;tt++)if(_e(Le,tt)===_e(Te,Ct===-1?0:tt-Ct)){if(Ct===-1&&(Ct=tt),tt-Ct+1===Oe)return Ct*Ne}else Ct!==-1&&(tt-=tt-Ct),Ct=-1}else for(je+Oe>Ye&&(je=Ye-Oe),tt=je;tt>=0;tt--){for(var Nt=!0,Dt=0;Dt<Oe;Dt++)if(_e(Le,tt+Dt)!==_e(Te,Dt)){Nt=!1;break}if(Nt)return tt}return-1}function Ae(Le,Te,je,ye){je=Number(je)||0;var le=Le.length-je;ye?(ye=Number(ye))>le&&(ye=le):ye=le;var _e=Te.length;if(_e%2!=0)throw new TypeError("Invalid hex string");ye>_e/2&&(ye=_e/2);for(var Ne=0;Ne<ye;++Ne){var Ye=parseInt(Te.substr(2*Ne,2),16);if(isNaN(Ye))return Ne;Le[je+Ne]=Ye}return Ne}function De(Le,Te,je,ye){return dt(bt(Te,Le.length-je),Le,je,ye)}function ke(Le,Te,je,ye){return dt(St(Te),Le,je,ye)}function Ie(Le,Te,je,ye){return ke(Le,Te,je,ye)}function Fe(Le,Te,je,ye){return dt(_t(Te),Le,je,ye)}function Pe(Le,Te,je,ye){return dt(lt(Te,Le.length-je),Le,je,ye)}function qe(Le,Te,je){return Te===0&&je===Le.length?et.fromByteArray(Le):et.fromByteArray(Le.slice(Te,je))}function Ke(Le,Te,je){je=Math.min(Le.length,je);for(var ye=[],le=Te;le<je;){var _e=Le[le],Ne=null,Ye=_e>239?4:_e>223?3:_e>191?2:1;if(le+Ye<=je){var Oe,tt,Ct,Nt;switch(Ye){case 1:_e<128&&(Ne=_e);break;case 2:Oe=Le[le+1],(192&Oe)==128&&(Nt=(31&_e)<<6|63&Oe)>127&&(Ne=Nt);break;case 3:Oe=Le[le+1],tt=Le[le+2],(192&Oe)==128&&(192&tt)==128&&(Nt=(15&_e)<<12|(63&Oe)<<6|63&tt)>2047&&(Nt<55296||Nt>57343)&&(Ne=Nt);break;case 4:Oe=Le[le+1],tt=Le[le+2],Ct=Le[le+3],(192&Oe)==128&&(192&tt)==128&&(192&Ct)==128&&(Nt=(15&_e)<<18|(63&Oe)<<12|(63&tt)<<6|63&Ct)>65535&&Nt<1114112&&(Ne=Nt)}}Ne===null?(Ne=65533,Ye=1):Ne>65535&&(Ne-=65536,ye.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),ye.push(Ne),le+=Ye}return ot(ye)}function ot(Le){var Te=Le.length;if(Te<=Tt)return String.fromCharCode.apply(String,Le);for(var je="",ye=0;ye<Te;)je+=String.fromCharCode.apply(String,Le.slice(ye,ye+=Tt));return je}function He(Le,Te,je){var ye="";je=Math.min(Le.length,je);for(var le=Te;le<je;++le)ye+=String.fromCharCode(127&Le[le]);return ye}function rt(Le,Te,je){var ye="";je=Math.min(Le.length,je);for(var le=Te;le<je;++le)ye+=String.fromCharCode(Le[le]);return ye}function Ge(Le,Te,je){var ye=Le.length;(!Te||Te<0)&&(Te=0),(!je||je<0||je>ye)&&(je=ye);for(var le="",_e=Te;_e<je;++_e)le+=gt(Le[_e]);return le}function ct(Le,Te,je){for(var ye=Le.slice(Te,je),le="",_e=0;_e<ye.length;_e+=2)le+=String.fromCharCode(ye[_e]+256*ye[_e+1]);return le}function We(Le,Te,je){if(Le%1!=0||Le<0)throw new RangeError("offset is not uint");if(Le+Te>je)throw new RangeError("Trying to access beyond buffer length")}function Ue(Le,Te,je,ye,le,_e){if(!ee.isBuffer(Le))throw new TypeError('"buffer" argument must be a Buffer instance');if(Te>le||Te<_e)throw new RangeError('"value" argument is out of bounds');if(je+ye>Le.length)throw new RangeError("Index out of range")}function Ze(Le,Te,je,ye){Te<0&&(Te=65535+Te+1);for(var le=0,_e=Math.min(Le.length-je,2);le<_e;++le)Le[je+le]=(Te&255<<8*(ye?le:1-le))>>>8*(ye?le:1-le)}function Je(Le,Te,je,ye){Te<0&&(Te=4294967295+Te+1);for(var le=0,_e=Math.min(Le.length-je,4);le<_e;++le)Le[je+le]=Te>>>8*(ye?le:3-le)&255}function $e(Le,Te,je,ye,le,_e){if(je+ye>Le.length)throw new RangeError("Index out of range");if(je<0)throw new RangeError("Index out of range")}function Qe(Le,Te,je,ye,le){return le||$e(Le,Te,je,4,34028234663852886e22,-34028234663852886e22),ft.write(Le,Te,je,ye,23,4),je+4}function pt(Le,Te,je,ye,le){return le||$e(Le,Te,je,8,17976931348623157e292,-17976931348623157e292),ft.write(Le,Te,je,ye,52,8),je+8}function ht(Le){if(Le=Pt(Le).replace(Re,""),Le.length<2)return"";for(;Le.length%4!=0;)Le+="=";return Le}function Pt(Le){return Le.trim?Le.trim():Le.replace(/^\s+|\s+$/g,"")}function gt(Le){return Le<16?"0"+Le.toString(16):Le.toString(16)}function bt(Le,Te){Te=Te||1/0;for(var je,ye=Le.length,le=null,_e=[],Ne=0;Ne<ye;++Ne){if((je=Le.charCodeAt(Ne))>55295&&je<57344){if(!le){if(je>56319){(Te-=3)>-1&&_e.push(239,191,189);continue}if(Ne+1===ye){(Te-=3)>-1&&_e.push(239,191,189);continue}le=je;continue}if(je<56320){(Te-=3)>-1&&_e.push(239,191,189),le=je;continue}je=65536+(le-55296<<10|je-56320)}else le&&(Te-=3)>-1&&_e.push(239,191,189);if(le=null,je<128){if((Te-=1)<0)break;_e.push(je)}else if(je<2048){if((Te-=2)<0)break;_e.push(je>>6|192,63&je|128)}else if(je<65536){if((Te-=3)<0)break;_e.push(je>>12|224,je>>6&63|128,63&je|128)}else{if(!(je<1114112))throw new Error("Invalid code point");if((Te-=4)<0)break;_e.push(je>>18|240,je>>12&63|128,je>>6&63|128,63&je|128)}}return _e}function St(Le){for(var Te=[],je=0;je<Le.length;++je)Te.push(255&Le.charCodeAt(je));return Te}function lt(Le,Te){for(var je,ye,le,_e=[],Ne=0;Ne<Le.length&&!((Te-=2)<0);++Ne)je=Le.charCodeAt(Ne),ye=je>>8,le=je%256,_e.push(le),_e.push(ye);return _e}function _t(Le){return et.toByteArray(ht(Le))}function dt(Le,Te,je,ye){for(var le=0;le<ye&&!(le+je>=Te.length||le>=Le.length);++le)Te[le+je]=Le[le];return le}function nt(Le){return Le!==Le}var et=ie("base64-js"),ft=ie("ieee754"),wt=ie("isarray");ce.Buffer=ee,ce.SlowBuffer=Se,ce.INSPECT_MAX_BYTES=50,ee.TYPED_ARRAY_SUPPORT=se.TYPED_ARRAY_SUPPORT!==void 0?se.TYPED_ARRAY_SUPPORT:function(){try{var Le=new Uint8Array(1);return Le.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Le.foo()===42&&typeof Le.subarray=="function"&&Le.subarray(1,1).byteLength===0}catch(Te){return!1}}(),ce.kMaxLength=re(),ee.poolSize=8192,ee._augment=function(Le){return Le.__proto__=ee.prototype,Le},ee.from=function(Le,Te,je){return te(null,Le,Te,je)},ee.TYPED_ARRAY_SUPPORT&&(ee.prototype.__proto__=Uint8Array.prototype,ee.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ee[Symbol.species]===ee&&Object.defineProperty(ee,Symbol.species,{value:null,configurable:!0})),ee.alloc=function(Le,Te,je){return y(null,Le,Te,je)},ee.allocUnsafe=function(Le){return z(null,Le)},ee.allocUnsafeSlow=function(Le){return z(null,Le)},ee.isBuffer=function(Le){return!(Le==null||!Le._isBuffer)},ee.compare=function(Le,Te){if(!ee.isBuffer(Le)||!ee.isBuffer(Te))throw new TypeError("Arguments must be Buffers");if(Le===Te)return 0;for(var je=Le.length,ye=Te.length,le=0,_e=Math.min(je,ye);le<_e;++le)if(Le[le]!==Te[le]){je=Le[le],ye=Te[le];break}return je<ye?-1:ye<je?1:0},ee.isEncoding=function(Le){switch(String(Le).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ee.concat=function(Le,Te){if(!wt(Le))throw new TypeError('"list" argument must be an Array of Buffers');if(Le.length===0)return ee.alloc(0);var je;if(Te===void 0)for(Te=0,je=0;je<Le.length;++je)Te+=Le[je].length;var ye=ee.allocUnsafe(Te),le=0;for(je=0;je<Le.length;++je){var _e=Le[je];if(!ee.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(ye,le),le+=_e.length}return ye},ee.byteLength=ve,ee.prototype._isBuffer=!0,ee.prototype.swap16=function(){var Le=this.length;if(Le%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Te=0;Te<Le;Te+=2)xe(this,Te,Te+1);return this},ee.prototype.swap32=function(){var Le=this.length;if(Le%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Te=0;Te<Le;Te+=4)xe(this,Te,Te+3),xe(this,Te+1,Te+2);return this},ee.prototype.swap64=function(){var Le=this.length;if(Le%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Te=0;Te<Le;Te+=8)xe(this,Te,Te+7),xe(this,Te+1,Te+6),xe(this,Te+2,Te+5),xe(this,Te+3,Te+4);return this},ee.prototype.toString=function(){var Le=0|this.length;return Le===0?"":arguments.length===0?Ke(this,0,Le):be.apply(this,arguments)},ee.prototype.equals=function(Le){if(!ee.isBuffer(Le))throw new TypeError("Argument must be a Buffer");return this===Le||ee.compare(this,Le)===0},ee.prototype.inspect=function(){var Le="",Te=ce.INSPECT_MAX_BYTES;return this.length>0&&(Le=this.toString("hex",0,Te).match(/.{2}/g).join(" "),this.length>Te&&(Le+=" ... ")),"<Buffer "+Le+">"},ee.prototype.compare=function(Le,Te,je,ye,le){if(!ee.isBuffer(Le))throw new TypeError("Argument must be a Buffer");if(Te===void 0&&(Te=0),je===void 0&&(je=Le?Le.length:0),ye===void 0&&(ye=0),le===void 0&&(le=this.length),Te<0||je>Le.length||ye<0||le>this.length)throw new RangeError("out of range index");if(ye>=le&&Te>=je)return 0;if(ye>=le)return-1;if(Te>=je)return 1;if(Te>>>=0,je>>>=0,ye>>>=0,le>>>=0,this===Le)return 0;for(var _e=le-ye,Ne=je-Te,Ye=Math.min(_e,Ne),Oe=this.slice(ye,le),tt=Le.slice(Te,je),Ct=0;Ct<Ye;++Ct)if(Oe[Ct]!==tt[Ct]){_e=Oe[Ct],Ne=tt[Ct];break}return _e<Ne?-1:Ne<_e?1:0},ee.prototype.includes=function(Le,Te,je){return this.indexOf(Le,Te,je)!==-1},ee.prototype.indexOf=function(Le,Te,je){return pe(this,Le,Te,je,!0)},ee.prototype.lastIndexOf=function(Le,Te,je){return pe(this,Le,Te,je,!1)},ee.prototype.write=function(Le,Te,je,ye){if(Te===void 0)ye="utf8",je=this.length,Te=0;else if(je===void 0&&typeof Te=="string")ye=Te,je=this.length,Te=0;else{if(!isFinite(Te))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Te|=0,isFinite(je)?(je|=0,ye===void 0&&(ye="utf8")):(ye=je,je=void 0)}var le=this.length-Te;if((je===void 0||je>le)&&(je=le),Le.length>0&&(je<0||Te<0)||Te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ye||(ye="utf8");for(var _e=!1;;)switch(ye){case"hex":return Ae(this,Le,Te,je);case"utf8":case"utf-8":return De(this,Le,Te,je);case"ascii":return ke(this,Le,Te,je);case"latin1":case"binary":return Ie(this,Le,Te,je);case"base64":return Fe(this,Le,Te,je);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,Le,Te,je);default:if(_e)throw new TypeError("Unknown encoding: "+ye);ye=(""+ye).toLowerCase(),_e=!0}},ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Tt=4096;ee.prototype.slice=function(Le,Te){var je=this.length;Le=~~Le,Te=Te===void 0?je:~~Te,Le<0?(Le+=je)<0&&(Le=0):Le>je&&(Le=je),Te<0?(Te+=je)<0&&(Te=0):Te>je&&(Te=je),Te<Le&&(Te=Le);var ye;if(ee.TYPED_ARRAY_SUPPORT)ye=this.subarray(Le,Te),ye.__proto__=ee.prototype;else{var le=Te-Le;ye=new ee(le,void 0);for(var _e=0;_e<le;++_e)ye[_e]=this[_e+Le]}return ye},ee.prototype.readUIntLE=function(Le,Te,je){Le|=0,Te|=0,je||We(Le,Te,this.length);for(var ye=this[Le],le=1,_e=0;++_e<Te&&(le*=256);)ye+=this[Le+_e]*le;return ye},ee.prototype.readUIntBE=function(Le,Te,je){Le|=0,Te|=0,je||We(Le,Te,this.length);for(var ye=this[Le+--Te],le=1;Te>0&&(le*=256);)ye+=this[Le+--Te]*le;return ye},ee.prototype.readUInt8=function(Le,Te){return Te||We(Le,1,this.length),this[Le]},ee.prototype.readUInt16LE=function(Le,Te){return Te||We(Le,2,this.length),this[Le]|this[Le+1]<<8},ee.prototype.readUInt16BE=function(Le,Te){return Te||We(Le,2,this.length),this[Le]<<8|this[Le+1]},ee.prototype.readUInt32LE=function(Le,Te){return Te||We(Le,4,this.length),(this[Le]|this[Le+1]<<8|this[Le+2]<<16)+16777216*this[Le+3]},ee.prototype.readUInt32BE=function(Le,Te){return Te||We(Le,4,this.length),16777216*this[Le]+(this[Le+1]<<16|this[Le+2]<<8|this[Le+3])},ee.prototype.readIntLE=function(Le,Te,je){Le|=0,Te|=0,je||We(Le,Te,this.length);for(var ye=this[Le],le=1,_e=0;++_e<Te&&(le*=256);)ye+=this[Le+_e]*le;return le*=128,ye>=le&&(ye-=Math.pow(2,8*Te)),ye},ee.prototype.readIntBE=function(Le,Te,je){Le|=0,Te|=0,je||We(Le,Te,this.length);for(var ye=Te,le=1,_e=this[Le+--ye];ye>0&&(le*=256);)_e+=this[Le+--ye]*le;return le*=128,_e>=le&&(_e-=Math.pow(2,8*Te)),_e},ee.prototype.readInt8=function(Le,Te){return Te||We(Le,1,this.length),128&this[Le]?-1*(255-this[Le]+1):this[Le]},ee.prototype.readInt16LE=function(Le,Te){Te||We(Le,2,this.length);var je=this[Le]|this[Le+1]<<8;return 32768&je?4294901760|je:je},ee.prototype.readInt16BE=function(Le,Te){Te||We(Le,2,this.length);var je=this[Le+1]|this[Le]<<8;return 32768&je?4294901760|je:je},ee.prototype.readInt32LE=function(Le,Te){return Te||We(Le,4,this.length),this[Le]|this[Le+1]<<8|this[Le+2]<<16|this[Le+3]<<24},ee.prototype.readInt32BE=function(Le,Te){return Te||We(Le,4,this.length),this[Le]<<24|this[Le+1]<<16|this[Le+2]<<8|this[Le+3]},ee.prototype.readFloatLE=function(Le,Te){return Te||We(Le,4,this.length),ft.read(this,Le,!0,23,4)},ee.prototype.readFloatBE=function(Le,Te){return Te||We(Le,4,this.length),ft.read(this,Le,!1,23,4)},ee.prototype.readDoubleLE=function(Le,Te){return Te||We(Le,8,this.length),ft.read(this,Le,!0,52,8)},ee.prototype.readDoubleBE=function(Le,Te){return Te||We(Le,8,this.length),ft.read(this,Le,!1,52,8)},ee.prototype.writeUIntLE=function(Le,Te,je,ye){Le=+Le,Te|=0,je|=0,!ye&&Ue(this,Le,Te,je,Math.pow(2,8*je)-1,0);var le=1,_e=0;for(this[Te]=255&Le;++_e<je&&(le*=256);)this[Te+_e]=Le/le&255;return Te+je},ee.prototype.writeUIntBE=function(Le,Te,je,ye){Le=+Le,Te|=0,je|=0,!ye&&Ue(this,Le,Te,je,Math.pow(2,8*je)-1,0);var le=je-1,_e=1;for(this[Te+le]=255&Le;--le>=0&&(_e*=256);)this[Te+le]=Le/_e&255;return Te+je},ee.prototype.writeUInt8=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,1,255,0),ee.TYPED_ARRAY_SUPPORT||(Le=Math.floor(Le)),this[Te]=255&Le,Te+1},ee.prototype.writeUInt16LE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Te]=255&Le,this[Te+1]=Le>>>8):Ze(this,Le,Te,!0),Te+2},ee.prototype.writeUInt16BE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Te]=Le>>>8,this[Te+1]=255&Le):Ze(this,Le,Te,!1),Te+2},ee.prototype.writeUInt32LE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Te+3]=Le>>>24,this[Te+2]=Le>>>16,this[Te+1]=Le>>>8,this[Te]=255&Le):Je(this,Le,Te,!0),Te+4},ee.prototype.writeUInt32BE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Te]=Le>>>24,this[Te+1]=Le>>>16,this[Te+2]=Le>>>8,this[Te+3]=255&Le):Je(this,Le,Te,!1),Te+4},ee.prototype.writeIntLE=function(Le,Te,je,ye){if(Le=+Le,Te|=0,!ye){var le=Math.pow(2,8*je-1);Ue(this,Le,Te,je,le-1,-le)}var _e=0,Ne=1,Ye=0;for(this[Te]=255&Le;++_e<je&&(Ne*=256);)Le<0&&Ye===0&&this[Te+_e-1]!==0&&(Ye=1),this[Te+_e]=(Le/Ne>>0)-Ye&255;return Te+je},ee.prototype.writeIntBE=function(Le,Te,je,ye){if(Le=+Le,Te|=0,!ye){var le=Math.pow(2,8*je-1);Ue(this,Le,Te,je,le-1,-le)}var _e=je-1,Ne=1,Ye=0;for(this[Te+_e]=255&Le;--_e>=0&&(Ne*=256);)Le<0&&Ye===0&&this[Te+_e+1]!==0&&(Ye=1),this[Te+_e]=(Le/Ne>>0)-Ye&255;return Te+je},ee.prototype.writeInt8=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,1,127,-128),ee.TYPED_ARRAY_SUPPORT||(Le=Math.floor(Le)),Le<0&&(Le=255+Le+1),this[Te]=255&Le,Te+1},ee.prototype.writeInt16LE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Te]=255&Le,this[Te+1]=Le>>>8):Ze(this,Le,Te,!0),Te+2},ee.prototype.writeInt16BE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Te]=Le>>>8,this[Te+1]=255&Le):Ze(this,Le,Te,!1),Te+2},ee.prototype.writeInt32LE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,4,2147483647,-2147483648),ee.TYPED_ARRAY_SUPPORT?(this[Te]=255&Le,this[Te+1]=Le>>>8,this[Te+2]=Le>>>16,this[Te+3]=Le>>>24):Je(this,Le,Te,!0),Te+4},ee.prototype.writeInt32BE=function(Le,Te,je){return Le=+Le,Te|=0,je||Ue(this,Le,Te,4,2147483647,-2147483648),Le<0&&(Le=4294967295+Le+1),ee.TYPED_ARRAY_SUPPORT?(this[Te]=Le>>>24,this[Te+1]=Le>>>16,this[Te+2]=Le>>>8,this[Te+3]=255&Le):Je(this,Le,Te,!1),Te+4},ee.prototype.writeFloatLE=function(Le,Te,je){return Qe(this,Le,Te,!0,je)},ee.prototype.writeFloatBE=function(Le,Te,je){return Qe(this,Le,Te,!1,je)},ee.prototype.writeDoubleLE=function(Le,Te,je){return pt(this,Le,Te,!0,je)},ee.prototype.writeDoubleBE=function(Le,Te,je){return pt(this,Le,Te,!1,je)},ee.prototype.copy=function(Le,Te,je,ye){if(je||(je=0),ye||ye===0||(ye=this.length),Te>=Le.length&&(Te=Le.length),Te||(Te=0),ye>0&&ye<je&&(ye=je),ye===je||Le.length===0||this.length===0)return 0;if(Te<0)throw new RangeError("targetStart out of bounds");if(je<0||je>=this.length)throw new RangeError("sourceStart out of bounds");if(ye<0)throw new RangeError("sourceEnd out of bounds");ye>this.length&&(ye=this.length),Le.length-Te<ye-je&&(ye=Le.length-Te+je);var le,_e=ye-je;if(this===Le&&je<Te&&Te<ye)for(le=_e-1;le>=0;--le)Le[le+Te]=this[le+je];else if(_e<1e3||!ee.TYPED_ARRAY_SUPPORT)for(le=0;le<_e;++le)Le[le+Te]=this[le+je];else Uint8Array.prototype.set.call(Le,this.subarray(je,je+_e),Te);return _e},ee.prototype.fill=function(Le,Te,je,ye){if(typeof Le=="string"){if(typeof Te=="string"?(ye=Te,Te=0,je=this.length):typeof je=="string"&&(ye=je,je=this.length),Le.length===1){var le=Le.charCodeAt(0);le<256&&(Le=le)}if(ye!==void 0&&typeof ye!="string")throw new TypeError("encoding must be a string");if(typeof ye=="string"&&!ee.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye)}else typeof Le=="number"&&(Le&=255);if(Te<0||this.length<Te||this.length<je)throw new RangeError("Out of range index");if(je<=Te)return this;Te>>>=0,je=je===void 0?this.length:je>>>0,Le||(Le=0);var _e;if(typeof Le=="number")for(_e=Te;_e<je;++_e)this[_e]=Le;else{var Ne=ee.isBuffer(Le)?Le:bt(new ee(Le,ye).toString()),Ye=Ne.length;for(_e=0;_e<je-Te;++_e)this[_e+Te]=Ne[_e%Ye]}return this};var Re=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(ie,Ee,ce){Ee.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(ie,Ee,ce){"use strict";var se=function(){this.buffer=[],this.fns=[]};se.prototype.push=function(ue,ee){if(this.fns.length)return this.fns.shift()(null,ue);var te={data:ue,priority:ee},E=re(this.buffer,te,function(y){return y.priority});this.buffer.splice(E,0,te)},se.prototype.next=function(){var ue=this;return function(ee){if(ue.buffer.length)return ee(null,ue.buffer.pop().data);ue.fns.push(ee)}};var re=function(ue,ee,te){ee=te(ee);for(var E=0,y=ue?ue.length:E;E<y;){var z=E+y>>>1;te(ue[z])<ee?E=z+1:y=z}return E};Ee.exports=se},{}],41:[function(ie,Ee,ce){function se(ae){var oe=this,ge=ne.call(arguments,1);return new Promise(function(Se,ve){function be(me){var Ae;try{Ae=ae.next(me)}catch(De){return ve(De)}pe(Ae)}function xe(me){var Ae;try{Ae=ae.throw(me)}catch(De){return ve(De)}pe(Ae)}function pe(me){if(me.done)return Se(me.value);var Ae=re.call(oe,me.value);return Ae&&E(Ae)?Ae.then(be,xe):xe(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(me.value)+'"'))}if(typeof ae=="function"&&(ae=ae.apply(oe,ge)),!ae||typeof ae.next!="function")return Se(ae);be()})}function re(ae){return ae&&(E(ae)?ae:z(ae)||y(ae)?se.call(this,ae):typeof ae=="function"?ue.call(this,ae):Array.isArray(ae)?ee.call(this,ae):x(ae)?te.call(this,ae):ae)}function ue(ae){var oe=this;return new Promise(function(ge,Se){ae.call(oe,function(ve,be){if(ve)return Se(ve);arguments.length>2&&(be=ne.call(arguments,1)),ge(be)})})}function ee(ae){return Promise.all(ae.map(re,this))}function te(ae){for(var oe=new ae.constructor,ge=Object.keys(ae),Se=[],ve=0;ve<ge.length;ve++){var be=ge[ve],xe=re.call(this,ae[be]);xe&&E(xe)?function(pe,me){oe[me]=void 0,Se.push(pe.then(function(Ae){oe[me]=Ae}))}(xe,be):oe[be]=ae[be]}return Promise.all(Se).then(function(){return oe})}function E(ae){return typeof ae.then=="function"}function y(ae){return typeof ae.next=="function"&&typeof ae.throw=="function"}function z(ae){var oe=ae.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||y(oe.prototype))}function x(ae){return Object==ae.constructor}var ne=Array.prototype.slice;Ee.exports=se.default=se.co=se,se.wrap=function(ae){function oe(){return se.call(this,ae.apply(this,arguments))}return oe.__generatorFunction__=ae,oe}},{}],42:[function(ie,Ee,ce){Ee.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(ie,Ee,ce){"use strict";function se(ee,te){if(!(this instanceof se))return new se(ee,te);this.src=ee,this._withAccess=te}function re(ee,te){return ee[te]===void 0&&ee.__lookupGetter__(te)===void 0&&ee.__lookupSetter__(te)===void 0}var ue=Array.prototype.slice;Ee.exports=se,se.prototype.withAccess=function(ee){return this._withAccess=ee!==!1,this},se.prototype.pick=function(ee){return Array.isArray(ee)||(ee=ue.call(arguments)),ee.length&&(this.keys=ee),this},se.prototype.to=function(ee){if(ee=ee||{},!this.src)return ee;var te=this.keys||Object.keys(this.src);if(!this._withAccess){for(var E=0;E<te.length;E++)y=te[E],ee[y]===void 0&&(ee[y]=this.src[y]);return ee}for(var E=0;E<te.length;E++){var y=te[E];if(re(ee,y)){var z=this.src.__lookupGetter__(y),x=this.src.__lookupSetter__(y);z&&ee.__defineGetter__(y,z),x&&ee.__defineSetter__(y,x),z||x||(ee[y]=this.src[y])}}return ee},se.prototype.toCover=function(ee){for(var te=this.keys||Object.keys(this.src),E=0;E<te.length;E++){var y=te[E];delete ee[y];var z=this.src.__lookupGetter__(y),x=this.src.__lookupSetter__(y);z&&ee.__defineGetter__(y,z),x&&ee.__defineSetter__(y,x),z||x||(ee[y]=this.src[y])}},se.prototype.override=se.prototype.toCover,se.prototype.and=function(ee){var te={};return this.to(te),this.src=ee,this.to(te),this.src=te,this}},{}],44:[function(ie,Ee,ce){ie("../../modules/es6.string.iterator"),ie("../../modules/es6.array.from"),Ee.exports=ie("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(ie,Ee,ce){var se=ie("../../modules/_core"),re=se.JSON||(se.JSON={stringify:JSON.stringify});Ee.exports=function(ue){return re.stringify.apply(re,arguments)}},{"../../modules/_core":65}],46:[function(ie,Ee,ce){ie("../../modules/es6.object.assign"),Ee.exports=ie("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(ie,Ee,ce){ie("../../modules/es6.object.create");var se=ie("../../modules/_core").Object;Ee.exports=function(re,ue){return se.create(re,ue)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(ie,Ee,ce){ie("../../modules/es6.object.define-property");var se=ie("../../modules/_core").Object;Ee.exports=function(re,ue,ee){return se.defineProperty(re,ue,ee)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(ie,Ee,ce){ie("../../modules/es6.object.get-own-property-names");var se=ie("../../modules/_core").Object;Ee.exports=function(re){return se.getOwnPropertyNames(re)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(ie,Ee,ce){ie("../../modules/es6.object.get-prototype-of"),Ee.exports=ie("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(ie,Ee,ce){ie("../../modules/es6.object.keys"),Ee.exports=ie("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(ie,Ee,ce){ie("../modules/es6.object.to-string"),ie("../modules/es6.string.iterator"),ie("../modules/web.dom.iterable"),ie("../modules/es6.promise"),ie("../modules/es7.promise.finally"),ie("../modules/es7.promise.try"),Ee.exports=ie("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(ie,Ee,ce){ie("../modules/web.immediate"),Ee.exports=ie("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(ie,Ee,ce){ie("../../modules/es6.string.from-code-point"),Ee.exports=ie("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(ie,Ee,ce){ie("../../modules/es6.function.has-instance"),Ee.exports=ie("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(ie,Ee,ce){ie("../../modules/es6.symbol"),ie("../../modules/es6.object.to-string"),ie("../../modules/es7.symbol.async-iterator"),ie("../../modules/es7.symbol.observable"),Ee.exports=ie("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(ie,Ee,ce){ie("../../modules/es6.string.iterator"),ie("../../modules/web.dom.iterable"),Ee.exports=ie("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(ie,Ee,ce){Ee.exports=function(se){if(typeof se!="function")throw TypeError(se+" is not a function!");return se}},{}],59:[function(ie,Ee,ce){Ee.exports=function(){}},{}],60:[function(ie,Ee,ce){Ee.exports=function(se,re,ue,ee){if(!(se instanceof re)||ee!==void 0&&ee in se)throw TypeError(ue+": incorrect invocation!");return se}},{}],61:[function(ie,Ee,ce){var se=ie("./_is-object");Ee.exports=function(re){if(!se(re))throw TypeError(re+" is not an object!");return re}},{"./_is-object":85}],62:[function(ie,Ee,ce){var se=ie("./_to-iobject"),re=ie("./_to-length"),ue=ie("./_to-absolute-index");Ee.exports=function(ee){return function(te,E,y){var z,x=se(te),ne=re(x.length),ae=ue(y,ne);if(ee&&E!=E){for(;ne>ae;)if((z=x[ae++])!=z)return!0}else for(;ne>ae;ae++)if((ee||ae in x)&&x[ae]===E)return ee||ae||0;return!ee&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(ie,Ee,ce){var se=ie("./_cof"),re=ie("./_wks")("toStringTag"),ue=se(function(){return arguments}())=="Arguments",ee=function(te,E){try{return te[E]}catch(y){}};Ee.exports=function(te){var E,y,z;return te===void 0?"Undefined":te===null?"Null":typeof(y=ee(E=Object(te),re))=="string"?y:ue?se(E):(z=se(E))=="Object"&&typeof E.callee=="function"?"Arguments":z}},{"./_cof":64,"./_wks":131}],64:[function(ie,Ee,ce){var se={}.toString;Ee.exports=function(re){return se.call(re).slice(8,-1)}},{}],65:[function(ie,Ee,ce){var se=Ee.exports={version:"2.5.7"};typeof __e=="number"&&(__e=se)},{}],66:[function(ie,Ee,ce){"use strict";var se=ie("./_object-dp"),re=ie("./_property-desc");Ee.exports=function(ue,ee,te){ee in ue?se.f(ue,ee,re(0,te)):ue[ee]=te}},{"./_object-dp":98,"./_property-desc":111}],67:[function(ie,Ee,ce){var se=ie("./_a-function");Ee.exports=function(re,ue,ee){if(se(re),ue===void 0)return re;switch(ee){case 1:return function(te){return re.call(ue,te)};case 2:return function(te,E){return re.call(ue,te,E)};case 3:return function(te,E,y){return re.call(ue,te,E,y)}}return function(){return re.apply(ue,arguments)}}},{"./_a-function":58}],68:[function(ie,Ee,ce){Ee.exports=function(se){if(se==null)throw TypeError("Can't call method on "+se);return se}},{}],69:[function(ie,Ee,ce){Ee.exports=!ie("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(ie,Ee,ce){var se=ie("./_is-object"),re=ie("./_global").document,ue=se(re)&&se(re.createElement);Ee.exports=function(ee){return ue?re.createElement(ee):{}}},{"./_global":76,"./_is-object":85}],71:[function(ie,Ee,ce){Ee.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(ie,Ee,ce){var se=ie("./_object-keys"),re=ie("./_object-gops"),ue=ie("./_object-pie");Ee.exports=function(ee){var te=se(ee),E=re.f;if(E)for(var y,z=E(ee),x=ue.f,ne=0;z.length>ne;)x.call(ee,y=z[ne++])&&te.push(y);return te}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(ie,Ee,ce){var se=ie("./_global"),re=ie("./_core"),ue=ie("./_ctx"),ee=ie("./_hide"),te=ie("./_has"),E=function(y,z,x){var ne,ae,oe,ge=y&E.F,Se=y&E.G,ve=y&E.S,be=y&E.P,xe=y&E.B,pe=y&E.W,me=Se?re:re[z]||(re[z]={}),Ae=me.prototype,De=Se?se:ve?se[z]:(se[z]||{}).prototype;Se&&(x=z);for(ne in x)(ae=!ge&&De&&De[ne]!==void 0)&&te(me,ne)||(oe=ae?De[ne]:x[ne],me[ne]=Se&&typeof De[ne]!="function"?x[ne]:xe&&ae?ue(oe,se):pe&&De[ne]==oe?function(ke){var Ie=function(Fe,Pe,qe){if(this instanceof ke){switch(arguments.length){case 0:return new ke;case 1:return new ke(Fe);case 2:return new ke(Fe,Pe)}return new ke(Fe,Pe,qe)}return ke.apply(this,arguments)};return Ie.prototype=ke.prototype,Ie}(oe):be&&typeof oe=="function"?ue(Function.call,oe):oe,be&&((me.virtual||(me.virtual={}))[ne]=oe,y&E.R&&Ae&&!Ae[ne]&&ee(Ae,ne,oe)))};E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128,Ee.exports=E},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(ie,Ee,ce){Ee.exports=function(se){try{return!!se()}catch(re){return!0}}},{}],75:[function(ie,Ee,x){var se=ie("./_ctx"),re=ie("./_iter-call"),ue=ie("./_is-array-iter"),ee=ie("./_an-object"),te=ie("./_to-length"),E=ie("./core.get-iterator-method"),y={},z={},x=Ee.exports=function(ne,ae,oe,ge,Se){var ve,be,xe,pe,me=Se?function(){return ne}:E(ne),Ae=se(oe,ge,ae?2:1),De=0;if(typeof me!="function")throw TypeError(ne+" is not iterable!");if(ue(me)){for(ve=te(ne.length);ve>De;De++)if((pe=ae?Ae(ee(be=ne[De])[0],be[1]):Ae(ne[De]))===y||pe===z)return pe}else for(xe=me.call(ne);!(be=xe.next()).done;)if((pe=re(xe,Ae,be.value,ae))===y||pe===z)return pe};x.BREAK=y,x.RETURN=z},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(ie,Ee,ce){var se=Ee.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=se)},{}],77:[function(ie,Ee,ce){var se={}.hasOwnProperty;Ee.exports=function(re,ue){return se.call(re,ue)}},{}],78:[function(ie,Ee,ce){var se=ie("./_object-dp"),re=ie("./_property-desc");Ee.exports=ie("./_descriptors")?function(ue,ee,te){return se.f(ue,ee,re(1,te))}:function(ue,ee,te){return ue[ee]=te,ue}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(ie,Ee,ce){var se=ie("./_global").document;Ee.exports=se&&se.documentElement},{"./_global":76}],80:[function(ie,Ee,ce){Ee.exports=!ie("./_descriptors")&&!ie("./_fails")(function(){return Object.defineProperty(ie("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(ie,Ee,ce){Ee.exports=function(se,re,ue){var ee=ue===void 0;switch(re.length){case 0:return ee?se():se.call(ue);case 1:return ee?se(re[0]):se.call(ue,re[0]);case 2:return ee?se(re[0],re[1]):se.call(ue,re[0],re[1]);case 3:return ee?se(re[0],re[1],re[2]):se.call(ue,re[0],re[1],re[2]);case 4:return ee?se(re[0],re[1],re[2],re[3]):se.call(ue,re[0],re[1],re[2],re[3])}return se.apply(ue,re)}},{}],82:[function(ie,Ee,ce){var se=ie("./_cof");Ee.exports=Object("z").propertyIsEnumerable(0)?Object:function(re){return se(re)=="String"?re.split(""):Object(re)}},{"./_cof":64}],83:[function(ie,Ee,ce){var se=ie("./_iterators"),re=ie("./_wks")("iterator"),ue=Array.prototype;Ee.exports=function(ee){return ee!==void 0&&(se.Array===ee||ue[re]===ee)}},{"./_iterators":91,"./_wks":131}],84:[function(ie,Ee,ce){var se=ie("./_cof");Ee.exports=Array.isArray||function(re){return se(re)=="Array"}},{"./_cof":64}],85:[function(ie,Ee,ce){Ee.exports=function(se){return typeof se=="object"?se!==null:typeof se=="function"}},{}],86:[function(ie,Ee,ce){var se=ie("./_an-object");Ee.exports=function(re,ue,ee,te){try{return te?ue(se(ee)[0],ee[1]):ue(ee)}catch(y){var E=re.return;throw E!==void 0&&se(E.call(re)),y}}},{"./_an-object":61}],87:[function(ie,Ee,ce){"use strict";var se=ie("./_object-create"),re=ie("./_property-desc"),ue=ie("./_set-to-string-tag"),ee={};ie("./_hide")(ee,ie("./_wks")("iterator"),function(){return this}),Ee.exports=function(te,E,y){te.prototype=se(ee,{next:re(1,y)}),ue(te,E+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(ie,Ee,ce){"use strict";var se=ie("./_library"),re=ie("./_export"),ue=ie("./_redefine"),ee=ie("./_hide"),te=ie("./_iterators"),E=ie("./_iter-create"),y=ie("./_set-to-string-tag"),z=ie("./_object-gpo"),x=ie("./_wks")("iterator"),ne=!([].keys&&"next"in[].keys()),ae=function(){return this};Ee.exports=function(oe,ge,Se,ve,be,xe,pe){E(Se,ge,ve);var me,Ae,De,ke=function(Ge){if(!ne&&Ge in qe)return qe[Ge];switch(Ge){case"keys":case"values":return function(){return new Se(this,Ge)}}return function(){return new Se(this,Ge)}},Ie=ge+" Iterator",Fe=be=="values",Pe=!1,qe=oe.prototype,Ke=qe[x]||qe["@@iterator"]||be&&qe[be],ot=Ke||ke(be),He=be?Fe?ke("entries"):ot:void 0,rt=ge=="Array"&&qe.entries||Ke;if(rt&&(De=z(rt.call(new oe)))!==Object.prototype&&De.next&&(y(De,Ie,!0),se||typeof De[x]=="function"||ee(De,x,ae)),Fe&&Ke&&Ke.name!=="values"&&(Pe=!0,ot=function(){return Ke.call(this)}),se&&!pe||!ne&&!Pe&&qe[x]||ee(qe,x,ot),te[ge]=ot,te[Ie]=ae,be)if(me={values:Fe?ot:ke("values"),keys:xe?ot:ke("keys"),entries:He},pe)for(Ae in me)Ae in qe||ue(qe,Ae,me[Ae]);else re(re.P+re.F*(ne||Pe),ge,me);return me}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(ie,Ee,ce){var se=ie("./_wks")("iterator"),re=!1;try{var ue=[7][se]();ue.return=function(){re=!0},Array.from(ue,function(){throw 2})}catch(ee){}Ee.exports=function(ee,te){if(!te&&!re)return!1;var E=!1;try{var y=[7],z=y[se]();z.next=function(){return{done:E=!0}},y[se]=function(){return z},ee(y)}catch(x){}return E}},{"./_wks":131}],90:[function(ie,Ee,ce){Ee.exports=function(se,re){return{value:re,done:!!se}}},{}],91:[function(ie,Ee,ce){Ee.exports={}},{}],92:[function(ie,Ee,ce){Ee.exports=!0},{}],93:[function(ie,Ee,ce){var se=ie("./_uid")("meta"),re=ie("./_is-object"),ue=ie("./_has"),ee=ie("./_object-dp").f,te=0,E=Object.isExtensible||function(){return!0},y=!ie("./_fails")(function(){return E(Object.preventExtensions({}))}),z=function(ge){ee(ge,se,{value:{i:"O"+ ++te,w:{}}})},x=function(ge,Se){if(!re(ge))return typeof ge=="symbol"?ge:(typeof ge=="string"?"S":"P")+ge;if(!ue(ge,se)){if(!E(ge))return"F";if(!Se)return"E";z(ge)}return ge[se].i},ne=function(ge,Se){if(!ue(ge,se)){if(!E(ge))return!0;if(!Se)return!1;z(ge)}return ge[se].w},ae=function(ge){return y&&oe.NEED&&E(ge)&&!ue(ge,se)&&z(ge),ge},oe=Ee.exports={KEY:se,NEED:!1,fastKey:x,getWeak:ne,onFreeze:ae}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(ie,Ee,ce){var se=ie("./_global"),re=ie("./_task").set,ue=se.MutationObserver||se.WebKitMutationObserver,ee=se.process,te=se.Promise,E=ie("./_cof")(ee)=="process";Ee.exports=function(){var y,z,x,ne=function(){var Se,ve;for(E&&(Se=ee.domain)&&Se.exit();y;){ve=y.fn,y=y.next;try{ve()}catch(be){throw y?x():z=void 0,be}}z=void 0,Se&&Se.enter()};if(E)x=function(){ee.nextTick(ne)};else if(!ue||se.navigator&&se.navigator.standalone)if(te&&te.resolve){var ae=te.resolve(void 0);x=function(){ae.then(ne)}}else x=function(){re.call(se,ne)};else{var oe=!0,ge=document.createTextNode("");new ue(ne).observe(ge,{characterData:!0}),x=function(){ge.data=oe=!oe}}return function(Se){var ve={fn:Se,next:void 0};z&&(z.next=ve),y||(y=ve,x()),z=ve}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(ie,Ee,ce){"use strict";function se(ue){var ee,te;this.promise=new ue(function(E,y){if(ee!==void 0||te!==void 0)throw TypeError("Bad Promise constructor");ee=E,te=y}),this.resolve=re(ee),this.reject=re(te)}var re=ie("./_a-function");Ee.exports.f=function(ue){return new se(ue)}},{"./_a-function":58}],96:[function(ie,Ee,ce){"use strict";var se=ie("./_object-keys"),re=ie("./_object-gops"),ue=ie("./_object-pie"),ee=ie("./_to-object"),te=ie("./_iobject"),E=Object.assign;Ee.exports=!E||ie("./_fails")(function(){var y={},z={},x=Symbol(),ne="abcdefghijklmnopqrst";return y[x]=7,ne.split("").forEach(function(ae){z[ae]=ae}),E({},y)[x]!=7||Object.keys(E({},z)).join("")!=ne})?function(y,z){for(var x=ee(y),ne=arguments.length,ae=1,oe=re.f,ge=ue.f;ne>ae;)for(var Se,ve=te(arguments[ae++]),be=oe?se(ve).concat(oe(ve)):se(ve),xe=be.length,pe=0;xe>pe;)ge.call(ve,Se=be[pe++])&&(x[Se]=ve[Se]);return x}:E},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(ie,Ee,ce){var se=ie("./_an-object"),re=ie("./_object-dps"),ue=ie("./_enum-bug-keys"),ee=ie("./_shared-key")("IE_PROTO"),te=function(){},E=function(){var y,z=ie("./_dom-create")("iframe"),x=ue.length;for(z.style.display="none",ie("./_html").appendChild(z),z.src="javascript:",y=z.contentWindow.document,y.open(),y.write("<script>document.F=Object<\/script>"),y.close(),E=y.F;x--;)delete E.prototype[ue[x]];return E()};Ee.exports=Object.create||function(y,z){var x;return y!==null?(te.prototype=se(y),x=new te,te.prototype=null,x[ee]=y):x=E(),z===void 0?x:re(x,z)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(ie,Ee,ce){var se=ie("./_an-object"),re=ie("./_ie8-dom-define"),ue=ie("./_to-primitive"),ee=Object.defineProperty;ce.f=ie("./_descriptors")?Object.defineProperty:function(te,E,y){if(se(te),E=ue(E,!0),se(y),re)try{return ee(te,E,y)}catch(z){}if("get"in y||"set"in y)throw TypeError("Accessors not supported!");return"value"in y&&(te[E]=y.value),te}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(ie,Ee,ce){var se=ie("./_object-dp"),re=ie("./_an-object"),ue=ie("./_object-keys");Ee.exports=ie("./_descriptors")?Object.defineProperties:function(ee,te){re(ee);for(var E,y=ue(te),z=y.length,x=0;z>x;)se.f(ee,E=y[x++],te[E]);return ee}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(ie,Ee,ce){var se=ie("./_object-pie"),re=ie("./_property-desc"),ue=ie("./_to-iobject"),ee=ie("./_to-primitive"),te=ie("./_has"),E=ie("./_ie8-dom-define"),y=Object.getOwnPropertyDescriptor;ce.f=ie("./_descriptors")?y:function(z,x){if(z=ue(z),x=ee(x,!0),E)try{return y(z,x)}catch(ne){}if(te(z,x))return re(!se.f.call(z,x),z[x])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(ie,Ee,ce){var se=ie("./_to-iobject"),re=ie("./_object-gopn").f,ue={}.toString,ee=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],te=function(E){try{return re(E)}catch(y){return ee.slice()}};Ee.exports.f=function(E){return ee&&ue.call(E)=="[object Window]"?te(E):re(se(E))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(ie,Ee,ce){var se=ie("./_object-keys-internal"),re=ie("./_enum-bug-keys").concat("length","prototype");ce.f=Object.getOwnPropertyNames||function(ue){return se(ue,re)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(ie,Ee,ce){ce.f=Object.getOwnPropertySymbols},{}],104:[function(ie,Ee,ce){var se=ie("./_has"),re=ie("./_to-object"),ue=ie("./_shared-key")("IE_PROTO"),ee=Object.prototype;Ee.exports=Object.getPrototypeOf||function(te){return te=re(te),se(te,ue)?te[ue]:typeof te.constructor=="function"&&te instanceof te.constructor?te.constructor.prototype:te instanceof Object?ee:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(ie,Ee,ce){var se=ie("./_has"),re=ie("./_to-iobject"),ue=ie("./_array-includes")(!1),ee=ie("./_shared-key")("IE_PROTO");Ee.exports=function(te,E){var y,z=re(te),x=0,ne=[];for(y in z)y!=ee&&se(z,y)&&ne.push(y);for(;E.length>x;)se(z,y=E[x++])&&(~ue(ne,y)||ne.push(y));return ne}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(ie,Ee,ce){var se=ie("./_object-keys-internal"),re=ie("./_enum-bug-keys");Ee.exports=Object.keys||function(ue){return se(ue,re)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(ie,Ee,ce){ce.f={}.propertyIsEnumerable},{}],108:[function(ie,Ee,ce){var se=ie("./_export"),re=ie("./_core"),ue=ie("./_fails");Ee.exports=function(ee,te){var E=(re.Object||{})[ee]||Object[ee],y={};y[ee]=te(E),se(se.S+se.F*ue(function(){E(1)}),"Object",y)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(ie,Ee,ce){Ee.exports=function(se){try{return{e:!1,v:se()}}catch(re){return{e:!0,v:re}}}},{}],110:[function(ie,Ee,ce){var se=ie("./_an-object"),re=ie("./_is-object"),ue=ie("./_new-promise-capability");Ee.exports=function(ee,te){if(se(ee),re(te)&&te.constructor===ee)return te;var E=ue.f(ee);return(0,E.resolve)(te),E.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(ie,Ee,ce){Ee.exports=function(se,re){return{enumerable:!(1&se),configurable:!(2&se),writable:!(4&se),value:re}}},{}],112:[function(ie,Ee,ce){var se=ie("./_hide");Ee.exports=function(re,ue,ee){for(var te in ue)ee&&re[te]?re[te]=ue[te]:se(re,te,ue[te]);return re}},{"./_hide":78}],113:[function(ie,Ee,ce){Ee.exports=ie("./_hide")},{"./_hide":78}],114:[function(ie,Ee,ce){"use strict";var se=ie("./_global"),re=ie("./_core"),ue=ie("./_object-dp"),ee=ie("./_descriptors"),te=ie("./_wks")("species");Ee.exports=function(E){var y=typeof re[E]=="function"?re[E]:se[E];ee&&y&&!y[te]&&ue.f(y,te,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(ie,Ee,ce){var se=ie("./_object-dp").f,re=ie("./_has"),ue=ie("./_wks")("toStringTag");Ee.exports=function(ee,te,E){ee&&!re(ee=E?ee:ee.prototype,ue)&&se(ee,ue,{configurable:!0,value:te})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(ie,Ee,ce){var se=ie("./_shared")("keys"),re=ie("./_uid");Ee.exports=function(ue){return se[ue]||(se[ue]=re(ue))}},{"./_shared":117,"./_uid":127}],117:[function(ie,Ee,ce){var se=ie("./_core"),re=ie("./_global"),ue=re["__core-js_shared__"]||(re["__core-js_shared__"]={});(Ee.exports=function(ee,te){return ue[ee]||(ue[ee]=te!==void 0?te:{})})("versions",[]).push({version:se.version,mode:ie("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(ie,Ee,ce){var se=ie("./_an-object"),re=ie("./_a-function"),ue=ie("./_wks")("species");Ee.exports=function(ee,te){var E,y=se(ee).constructor;return y===void 0||(E=se(y)[ue])==null?te:re(E)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(ie,Ee,ce){var se=ie("./_to-integer"),re=ie("./_defined");Ee.exports=function(ue){return function(ee,te){var E,y,z=String(re(ee)),x=se(te),ne=z.length;return x<0||x>=ne?ue?"":void 0:(E=z.charCodeAt(x),E<55296||E>56319||x+1===ne||(y=z.charCodeAt(x+1))<56320||y>57343?ue?z.charAt(x):E:ue?z.slice(x,x+2):y-56320+(E-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(ie,Ee,ce){var se,re,ue,ee=ie("./_ctx"),te=ie("./_invoke"),E=ie("./_html"),y=ie("./_dom-create"),z=ie("./_global"),x=z.process,ne=z.setImmediate,ae=z.clearImmediate,oe=z.MessageChannel,ge=z.Dispatch,Se=0,ve={},be=function(){var pe=+this;if(ve.hasOwnProperty(pe)){var me=ve[pe];delete ve[pe],me()}},xe=function(pe){be.call(pe.data)};ne&&ae||(ne=function(pe){for(var me=[],Ae=1;arguments.length>Ae;)me.push(arguments[Ae++]);return ve[++Se]=function(){te(typeof pe=="function"?pe:Function(pe),me)},se(Se),Se},ae=function(pe){delete ve[pe]},ie("./_cof")(x)=="process"?se=function(pe){x.nextTick(ee(be,pe,1))}:ge&&ge.now?se=function(pe){ge.now(ee(be,pe,1))}:oe?(re=new oe,ue=re.port2,re.port1.onmessage=xe,se=ee(ue.postMessage,ue,1)):z.addEventListener&&typeof postMessage=="function"&&!z.importScripts?(se=function(pe){z.postMessage(pe+"","*")},z.addEventListener("message",xe,!1)):se="onreadystatechange"in y("script")?function(pe){E.appendChild(y("script")).onreadystatechange=function(){E.removeChild(this),be.call(pe)}}:function(pe){setTimeout(ee(be,pe,1),0)}),Ee.exports={set:ne,clear:ae}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(ie,Ee,ce){var se=ie("./_to-integer"),re=Math.max,ue=Math.min;Ee.exports=function(ee,te){return ee=se(ee),ee<0?re(ee+te,0):ue(ee,te)}},{"./_to-integer":122}],122:[function(ie,Ee,ce){var se=Math.ceil,re=Math.floor;Ee.exports=function(ue){return isNaN(ue=+ue)?0:(ue>0?re:se)(ue)}},{}],123:[function(ie,Ee,ce){var se=ie("./_iobject"),re=ie("./_defined");Ee.exports=function(ue){return se(re(ue))}},{"./_defined":68,"./_iobject":82}],124:[function(ie,Ee,ce){var se=ie("./_to-integer"),re=Math.min;Ee.exports=function(ue){return ue>0?re(se(ue),9007199254740991):0}},{"./_to-integer":122}],125:[function(ie,Ee,ce){var se=ie("./_defined");Ee.exports=function(re){return Object(se(re))}},{"./_defined":68}],126:[function(ie,Ee,ce){var se=ie("./_is-object");Ee.exports=function(re,ue){if(!se(re))return re;var ee,te;if(ue&&typeof(ee=re.toString)=="function"&&!se(te=ee.call(re))||typeof(ee=re.valueOf)=="function"&&!se(te=ee.call(re))||!ue&&typeof(ee=re.toString)=="function"&&!se(te=ee.call(re)))return te;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(ie,Ee,ce){var se=0,re=Math.random();Ee.exports=function(ue){return"Symbol(".concat(ue===void 0?"":ue,")_",(++se+re).toString(36))}},{}],128:[function(ie,Ee,ce){var se=ie("./_global"),re=se.navigator;Ee.exports=re&&re.userAgent||""},{"./_global":76}],129:[function(ie,Ee,ce){var se=ie("./_global"),re=ie("./_core"),ue=ie("./_library"),ee=ie("./_wks-ext"),te=ie("./_object-dp").f;Ee.exports=function(E){var y=re.Symbol||(re.Symbol=ue?{}:se.Symbol||{});E.charAt(0)=="_"||E in y||te(y,E,{value:ee.f(E)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(ie,Ee,ce){ce.f=ie("./_wks")},{"./_wks":131}],131:[function(ie,Ee,ce){var se=ie("./_shared")("wks"),re=ie("./_uid"),ue=ie("./_global").Symbol,ee=typeof ue=="function";(Ee.exports=function(te){return se[te]||(se[te]=ee&&ue[te]||(ee?ue:re)("Symbol."+te))}).store=se},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(ie,Ee,ce){var se=ie("./_classof"),re=ie("./_wks")("iterator"),ue=ie("./_iterators");Ee.exports=ie("./_core").getIteratorMethod=function(ee){if(ee!=null)return ee[re]||ee["@@iterator"]||ue[se(ee)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(ie,Ee,ce){"use strict";var se=ie("./_ctx"),re=ie("./_export"),ue=ie("./_to-object"),ee=ie("./_iter-call"),te=ie("./_is-array-iter"),E=ie("./_to-length"),y=ie("./_create-property"),z=ie("./core.get-iterator-method");re(re.S+re.F*!ie("./_iter-detect")(function(x){Array.from(x)}),"Array",{from:function(x){var ne,ae,oe,ge,Se=ue(x),ve=typeof this=="function"?this:Array,be=arguments.length,xe=be>1?arguments[1]:void 0,pe=xe!==void 0,me=0,Ae=z(Se);if(pe&&(xe=se(xe,be>2?arguments[2]:void 0,2)),Ae==null||ve==Array&&te(Ae))for(ne=E(Se.length),ae=new ve(ne);ne>me;me++)y(ae,me,pe?xe(Se[me],me):Se[me]);else for(ge=Ae.call(Se),ae=new ve;!(oe=ge.next()).done;me++)y(ae,me,pe?ee(ge,xe,[oe.value,me],!0):oe.value);return ae.length=me,ae}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(ie,Ee,ce){"use strict";var se=ie("./_add-to-unscopables"),re=ie("./_iter-step"),ue=ie("./_iterators"),ee=ie("./_to-iobject");Ee.exports=ie("./_iter-define")(Array,"Array",function(te,E){this._t=ee(te),this._i=0,this._k=E},function(){var te=this._t,E=this._k,y=this._i++;return!te||y>=te.length?(this._t=void 0,re(1)):E=="keys"?re(0,y):E=="values"?re(0,te[y]):re(0,[y,te[y]])},"values"),ue.Arguments=ue.Array,se("keys"),se("values"),se("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(ie,Ee,ce){"use strict";var se=ie("./_is-object"),re=ie("./_object-gpo"),ue=ie("./_wks")("hasInstance"),ee=Function.prototype;ue in ee||ie("./_object-dp").f(ee,ue,{value:function(te){if(typeof this!="function"||!se(te))return!1;if(!se(this.prototype))return te instanceof this;for(;te=re(te);)if(this.prototype===te)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(ie,Ee,ce){var se=ie("./_export");se(se.S+se.F,"Object",{assign:ie("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(ie,Ee,ce){var se=ie("./_export");se(se.S,"Object",{create:ie("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(ie,Ee,ce){var se=ie("./_export");se(se.S+se.F*!ie("./_descriptors"),"Object",{defineProperty:ie("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(ie,Ee,ce){ie("./_object-sap")("getOwnPropertyNames",function(){return ie("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(ie,Ee,ce){var se=ie("./_to-object"),re=ie("./_object-gpo");ie("./_object-sap")("getPrototypeOf",function(){return function(ue){return re(se(ue))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(ie,Ee,ce){var se=ie("./_to-object"),re=ie("./_object-keys");ie("./_object-sap")("keys",function(){return function(ue){return re(se(ue))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(ie,Ee,ce){arguments[4][36][0].apply(ce,arguments)},{dup:36}],143:[function(ie,Ee,ce){"use strict";var se,re,ue,ee,te=ie("./_library"),E=ie("./_global"),y=ie("./_ctx"),z=ie("./_classof"),x=ie("./_export"),ne=ie("./_is-object"),ae=ie("./_a-function"),oe=ie("./_an-instance"),ge=ie("./_for-of"),Se=ie("./_species-constructor"),ve=ie("./_task").set,be=ie("./_microtask")(),xe=ie("./_new-promise-capability"),pe=ie("./_perform"),me=ie("./_user-agent"),Ae=ie("./_promise-resolve"),De=E.TypeError,ke=E.process,Ie=ke&&ke.versions,Fe=Ie&&Ie.v8||"",Pe=E.Promise,qe=z(ke)=="process",Ke=function(){},ot=re=xe.f,He=!!function(){try{var $e=Pe.resolve(1),Qe=($e.constructor={})[ie("./_wks")("species")]=function(pt){pt(Ke,Ke)};return(qe||typeof PromiseRejectionEvent=="function")&&$e.then(Ke)instanceof Qe&&Fe.indexOf("6.6")!==0&&me.indexOf("Chrome/66")===-1}catch(pt){}}(),rt=function($e){var Qe;return!(!ne($e)||typeof(Qe=$e.then)!="function")&&Qe},Ge=function($e,Qe){if(!$e._n){$e._n=!0;var pt=$e._c;be(function(){for(var ht=$e._v,Pt=$e._s==1,gt=0;pt.length>gt;)(function(bt){var St,lt,_t,dt=Pt?bt.ok:bt.fail,nt=bt.resolve,et=bt.reject,ft=bt.domain;try{dt?(Pt||($e._h==2&&Ue($e),$e._h=1),dt===!0?St=ht:(ft&&ft.enter(),St=dt(ht),ft&&(ft.exit(),_t=!0)),St===bt.promise?et(De("Promise-chain cycle")):(lt=rt(St))?lt.call(St,nt,et):nt(St)):et(ht)}catch(wt){ft&&!_t&&ft.exit(),et(wt)}})(pt[gt++]);$e._c=[],$e._n=!1,Qe&&!$e._h&&ct($e)})}},ct=function($e){ve.call(E,function(){var Qe,pt,ht,Pt=$e._v,gt=We($e);if(gt&&(Qe=pe(function(){qe?ke.emit("unhandledRejection",Pt,$e):(pt=E.onunhandledrejection)?pt({promise:$e,reason:Pt}):(ht=E.console)&&ht.error&&ht.error("Unhandled promise rejection",Pt)}),$e._h=qe||We($e)?2:1),$e._a=void 0,gt&&Qe.e)throw Qe.v})},We=function($e){return $e._h!==1&&($e._a||$e._c).length===0},Ue=function($e){ve.call(E,function(){var Qe;qe?ke.emit("rejectionHandled",$e):(Qe=E.onrejectionhandled)&&Qe({promise:$e,reason:$e._v})})},Ze=function($e){var Qe=this;Qe._d||(Qe._d=!0,Qe=Qe._w||Qe,Qe._v=$e,Qe._s=2,Qe._a||(Qe._a=Qe._c.slice()),Ge(Qe,!0))},Je=function($e){var Qe,pt=this;if(!pt._d){pt._d=!0,pt=pt._w||pt;try{if(pt===$e)throw De("Promise can't be resolved itself");(Qe=rt($e))?be(function(){var ht={_w:pt,_d:!1};try{Qe.call($e,y(Je,ht,1),y(Ze,ht,1))}catch(Pt){Ze.call(ht,Pt)}}):(pt._v=$e,pt._s=1,Ge(pt,!1))}catch(ht){Ze.call({_w:pt,_d:!1},ht)}}};He||(Pe=function($e){oe(this,Pe,"Promise","_h"),ae($e),se.call(this);try{$e(y(Je,this,1),y(Ze,this,1))}catch(Qe){Ze.call(this,Qe)}},se=function($e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},se.prototype=ie("./_redefine-all")(Pe.prototype,{then:function($e,Qe){var pt=ot(Se(this,Pe));return pt.ok=typeof $e!="function"||$e,pt.fail=typeof Qe=="function"&&Qe,pt.domain=qe?ke.domain:void 0,this._c.push(pt),this._a&&this._a.push(pt),this._s&&Ge(this,!1),pt.promise},catch:function($e){return this.then(void 0,$e)}}),ue=function(){var $e=new se;this.promise=$e,this.resolve=y(Je,$e,1),this.reject=y(Ze,$e,1)},xe.f=ot=function($e){return $e===Pe||$e===ee?new ue($e):re($e)}),x(x.G+x.W+x.F*!He,{Promise:Pe}),ie("./_set-to-string-tag")(Pe,"Promise"),ie("./_set-species")("Promise"),ee=ie("./_core").Promise,x(x.S+x.F*!He,"Promise",{reject:function($e){var Qe=ot(this);return(0,Qe.reject)($e),Qe.promise}}),x(x.S+x.F*(te||!He),"Promise",{resolve:function($e){return Ae(te&&this===ee?Pe:this,$e)}}),x(x.S+x.F*!(He&&ie("./_iter-detect")(function($e){Pe.all($e).catch(Ke)})),"Promise",{all:function($e){var Qe=this,pt=ot(Qe),ht=pt.resolve,Pt=pt.reject,gt=pe(function(){var bt=[],St=0,lt=1;ge($e,!1,function(_t){var dt=St++,nt=!1;bt.push(void 0),lt++,Qe.resolve(_t).then(function(et){nt||(nt=!0,bt[dt]=et,--lt||ht(bt))},Pt)}),--lt||ht(bt)});return gt.e&&Pt(gt.v),pt.promise},race:function($e){var Qe=this,pt=ot(Qe),ht=pt.reject,Pt=pe(function(){ge($e,!1,function(gt){Qe.resolve(gt).then(pt.resolve,ht)})});return Pt.e&&ht(Pt.v),pt.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(ie,Ee,ce){var se=ie("./_export"),re=ie("./_to-absolute-index"),ue=String.fromCharCode,ee=String.fromCodePoint;se(se.S+se.F*(!!ee&&ee.length!=1),"String",{fromCodePoint:function(te){for(var E,y=[],z=arguments.length,x=0;z>x;){if(E=+arguments[x++],re(E,1114111)!==E)throw RangeError(E+" is not a valid code point");y.push(E<65536?ue(E):ue(55296+((E-=65536)>>10),E%1024+56320))}return y.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(ie,Ee,ce){"use strict";var se=ie("./_string-at")(!0);ie("./_iter-define")(String,"String",function(re){this._t=String(re),this._i=0},function(){var re,ue=this._t,ee=this._i;return ee>=ue.length?{value:void 0,done:!0}:(re=se(ue,ee),this._i+=re.length,{value:re,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(ie,Ee,ce){"use strict";var se=ie("./_global"),re=ie("./_has"),ue=ie("./_descriptors"),ee=ie("./_export"),te=ie("./_redefine"),E=ie("./_meta").KEY,y=ie("./_fails"),z=ie("./_shared"),x=ie("./_set-to-string-tag"),ne=ie("./_uid"),ae=ie("./_wks"),oe=ie("./_wks-ext"),ge=ie("./_wks-define"),Se=ie("./_enum-keys"),ve=ie("./_is-array"),be=ie("./_an-object"),xe=ie("./_is-object"),pe=ie("./_to-iobject"),me=ie("./_to-primitive"),Ae=ie("./_property-desc"),De=ie("./_object-create"),ke=ie("./_object-gopn-ext"),Ie=ie("./_object-gopd"),Fe=ie("./_object-dp"),Pe=ie("./_object-keys"),qe=Ie.f,Ke=Fe.f,ot=ke.f,He=se.Symbol,rt=se.JSON,Ge=rt&&rt.stringify,ct=ae("_hidden"),We=ae("toPrimitive"),Ue={}.propertyIsEnumerable,Ze=z("symbol-registry"),Je=z("symbols"),$e=z("op-symbols"),Qe=Object.prototype,pt=typeof He=="function",ht=se.QObject,Pt=!ht||!ht.prototype||!ht.prototype.findChild,gt=ue&&y(function(){return De(Ke({},"a",{get:function(){return Ke(this,"a",{value:7}).a}})).a!=7})?function(je,ye,le){var _e=qe(Qe,ye);_e&&delete Qe[ye],Ke(je,ye,le),_e&&je!==Qe&&Ke(Qe,ye,_e)}:Ke,bt=function(je){var ye=Je[je]=De(He.prototype);return ye._k=je,ye},St=pt&&typeof He.iterator=="symbol"?function(je){return typeof je=="symbol"}:function(je){return je instanceof He},lt=function(je,ye,le){return je===Qe&&lt($e,ye,le),be(je),ye=me(ye,!0),be(le),re(Je,ye)?(le.enumerable?(re(je,ct)&&je[ct][ye]&&(je[ct][ye]=!1),le=De(le,{enumerable:Ae(0,!1)})):(re(je,ct)||Ke(je,ct,Ae(1,{})),je[ct][ye]=!0),gt(je,ye,le)):Ke(je,ye,le)},_t=function(je,ye){be(je);for(var le,_e=Se(ye=pe(ye)),Ne=0,Ye=_e.length;Ye>Ne;)lt(je,le=_e[Ne++],ye[le]);return je},dt=function(je,ye){return ye===void 0?De(je):_t(De(je),ye)},nt=function(je){var ye=Ue.call(this,je=me(je,!0));return!(this===Qe&&re(Je,je)&&!re($e,je))&&(!(ye||!re(this,je)||!re(Je,je)||re(this,ct)&&this[ct][je])||ye)},et=function(je,ye){if(je=pe(je),ye=me(ye,!0),je!==Qe||!re(Je,ye)||re($e,ye)){var le=qe(je,ye);return!le||!re(Je,ye)||re(je,ct)&&je[ct][ye]||(le.enumerable=!0),le}},ft=function(je){for(var ye,le=ot(pe(je)),_e=[],Ne=0;le.length>Ne;)re(Je,ye=le[Ne++])||ye==ct||ye==E||_e.push(ye);return _e},wt=function(je){for(var ye,le=je===Qe,_e=ot(le?$e:pe(je)),Ne=[],Ye=0;_e.length>Ye;)!re(Je,ye=_e[Ye++])||le&&!re(Qe,ye)||Ne.push(Je[ye]);return Ne};pt||(He=function(){if(this instanceof He)throw TypeError("Symbol is not a constructor!");var je=ne(arguments.length>0?arguments[0]:void 0),ye=function(le){this===Qe&&ye.call($e,le),re(this,ct)&&re(this[ct],je)&&(this[ct][je]=!1),gt(this,je,Ae(1,le))};return ue&&Pt&&gt(Qe,je,{configurable:!0,set:ye}),bt(je)},te(He.prototype,"toString",function(){return this._k}),Ie.f=et,Fe.f=lt,ie("./_object-gopn").f=ke.f=ft,ie("./_object-pie").f=nt,ie("./_object-gops").f=wt,ue&&!ie("./_library")&&te(Qe,"propertyIsEnumerable",nt,!0),oe.f=function(je){return bt(ae(je))}),ee(ee.G+ee.W+ee.F*!pt,{Symbol:He});for(var Tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Re=0;Tt.length>Re;)ae(Tt[Re++]);for(var Le=Pe(ae.store),Te=0;Le.length>Te;)ge(Le[Te++]);ee(ee.S+ee.F*!pt,"Symbol",{for:function(je){return re(Ze,je+="")?Ze[je]:Ze[je]=He(je)},keyFor:function(je){if(!St(je))throw TypeError(je+" is not a symbol!");for(var ye in Ze)if(Ze[ye]===je)return ye},useSetter:function(){Pt=!0},useSimple:function(){Pt=!1}}),ee(ee.S+ee.F*!pt,"Object",{create:dt,defineProperty:lt,defineProperties:_t,getOwnPropertyDescriptor:et,getOwnPropertyNames:ft,getOwnPropertySymbols:wt}),rt&&ee(ee.S+ee.F*(!pt||y(function(){var je=He();return Ge([je])!="[null]"||Ge({a:je})!="{}"||Ge(Object(je))!="{}"})),"JSON",{stringify:function(je){for(var ye,le,_e=[je],Ne=1;arguments.length>Ne;)_e.push(arguments[Ne++]);if(le=ye=_e[1],(xe(ye)||je!==void 0)&&!St(je))return ve(ye)||(ye=function(Ye,Oe){if(typeof le=="function"&&(Oe=le.call(this,Ye,Oe)),!St(Oe))return Oe}),_e[1]=ye,Ge.apply(rt,_e)}}),He.prototype[We]||ie("./_hide")(He.prototype,We,He.prototype.valueOf),x(He,"Symbol"),x(Math,"Math",!0),x(se.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(ie,Ee,ce){"use strict";var se=ie("./_export"),re=ie("./_core"),ue=ie("./_global"),ee=ie("./_species-constructor"),te=ie("./_promise-resolve");se(se.P+se.R,"Promise",{finally:function(E){var y=ee(this,re.Promise||ue.Promise),z=typeof E=="function";return this.then(z?function(x){return te(y,E()).then(function(){return x})}:E,z?function(x){return te(y,E()).then(function(){throw x})}:E)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(ie,Ee,ce){"use strict";var se=ie("./_export"),re=ie("./_new-promise-capability"),ue=ie("./_perform");se(se.S,"Promise",{try:function(ee){var te=re.f(this),E=ue(ee);return(E.e?te.reject:te.resolve)(E.v),te.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(ie,Ee,ce){ie("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(ie,Ee,ce){ie("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(ie,Ee,ce){ie("./es6.array.iterator");for(var se=ie("./_global"),re=ie("./_hide"),ue=ie("./_iterators"),ee=ie("./_wks")("toStringTag"),te="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),E=0;E<te.length;E++){var y=te[E],z=se[y],x=z&&z.prototype;x&&!x[ee]&&re(x,ee,y),ue[y]=ue.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(ie,Ee,ce){var se=ie("./_export"),re=ie("./_task");se(se.G+se.B,{setImmediate:re.set,clearImmediate:re.clear})},{"./_export":73,"./_task":120}],153:[function(ie,Ee,ce){(function(se){"use strict";function re(me){return Array.isArray?Array.isArray(me):be(me)==="[object Array]"}function ue(me){return typeof me=="boolean"}function ee(me){return me===null}function te(me){return me==null}function E(me){return typeof me=="number"}function y(me){return typeof me=="string"}function z(me){return(me===void 0?"undefined":(0,pe.default)(me))==="symbol"}function x(me){return me===void 0}function ne(me){return be(me)==="[object RegExp]"}function ae(me){return(me===void 0?"undefined":(0,pe.default)(me))==="object"&&me!==null}function oe(me){return be(me)==="[object Date]"}function ge(me){return be(me)==="[object Error]"||me instanceof Error}function Se(me){return typeof me=="function"}function ve(me){return me===null||typeof me=="boolean"||typeof me=="number"||typeof me=="string"||(me===void 0?"undefined":(0,pe.default)(me))==="symbol"||me===void 0}function be(me){return Object.prototype.toString.call(me)}var xe=ie("babel-runtime/helpers/typeof"),pe=function(me){return me&&me.__esModule?me:{default:me}}(xe);ce.isArray=re,ce.isBoolean=ue,ce.isNull=ee,ce.isNullOrUndefined=te,ce.isNumber=E,ce.isString=y,ce.isSymbol=z,ce.isUndefined=x,ce.isRegExp=ne,ce.isObject=ae,ce.isDate=oe,ce.isError=ge,ce.isFunction=Se,ce.isPrimitive=ve,ce.isBuffer=se.isBuffer}).call(this,{isBuffer:ie("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/helpers/typeof"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(ue){function ee(x,ne){for(x=String(x),ne=ne||2;x.length<ne;)x="0"+x;return x}function te(x){var ne=new Date(x.getFullYear(),x.getMonth(),x.getDate());ne.setDate(ne.getDate()-(ne.getDay()+6)%7+3);var ae=new Date(ne.getFullYear(),0,4);ae.setDate(ae.getDate()-(ae.getDay()+6)%7+3);var oe=ne.getTimezoneOffset()-ae.getTimezoneOffset();ne.setHours(ne.getHours()-oe);var ge=(ne-ae)/6048e5;return 1+Math.floor(ge)}function E(x){var ne=x.getDay();return ne===0&&(ne=7),ne}function y(x){return x===null?"null":x===void 0?"undefined":(x===void 0?"undefined":(0,re.default)(x))!=="object"?x===void 0?"undefined":(0,re.default)(x):Array.isArray(x)?"array":{}.toString.call(x).slice(8,-1).toLowerCase()}var z=function(){var x=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,ne=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ae=/[^-+\dA-Z]/g;return function(oe,ge,Se,ve){if(arguments.length!==1||y(oe)!=="string"||/\d/.test(oe)||(ge=oe,oe=void 0),oe=oe||new Date,oe instanceof Date||(oe=new Date(oe)),isNaN(oe))throw TypeError("Invalid date");ge=String(z.masks[ge]||ge||z.masks.default);var be=ge.slice(0,4);be!=="UTC:"&&be!=="GMT:"||(ge=ge.slice(4),Se=!0,be==="GMT:"&&(ve=!0));var xe=Se?"getUTC":"get",pe=oe[xe+"Date"](),me=oe[xe+"Day"](),Ae=oe[xe+"Month"](),De=oe[xe+"FullYear"](),ke=oe[xe+"Hours"](),Ie=oe[xe+"Minutes"](),Fe=oe[xe+"Seconds"](),Pe=oe[xe+"Milliseconds"](),qe=Se?0:oe.getTimezoneOffset(),Ke=te(oe),ot=E(oe),He={d:pe,dd:ee(pe),ddd:z.i18n.dayNames[me],dddd:z.i18n.dayNames[me+7],m:Ae+1,mm:ee(Ae+1),mmm:z.i18n.monthNames[Ae],mmmm:z.i18n.monthNames[Ae+12],yy:String(De).slice(2),yyyy:De,h:ke%12||12,hh:ee(ke%12||12),H:ke,HH:ee(ke),M:Ie,MM:ee(Ie),s:Fe,ss:ee(Fe),l:ee(Pe,3),L:ee(Math.round(Pe/10)),t:ke<12?"a":"p",tt:ke<12?"am":"pm",T:ke<12?"A":"P",TT:ke<12?"AM":"PM",Z:ve?"GMT":Se?"UTC":(String(oe).match(ne)||[""]).pop().replace(ae,""),o:(qe>0?"-":"+")+ee(100*Math.floor(Math.abs(qe)/60)+Math.abs(qe)%60,4),S:["th","st","nd","rd"][pe%10>3?0:(pe%100-pe%10!=10)*pe%10],W:Ke,N:ot};return ge.replace(x,function(rt){return rt in He?He[rt]:rt.slice(1,rt.length-1)})}}();z.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},z.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof de=="function"&&de.amd?de(function(){return z}):(ce===void 0?"undefined":(0,re.default)(ce))==="object"?Ee.exports=z:ue.dateFormat=z})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(ie,Ee,ce){(function(se){function re(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ue(y){var z=this.useColors;if(y[0]=(z?"%c":"")+this.namespace+(z?" %c":" ")+y[0]+(z?"%c ":" ")+"+"+ce.humanize(this.diff),z){var x="color: "+this.color;y.splice(1,0,x,"color: inherit");var ne=0,ae=0;y[0].replace(/%[a-zA-Z%]/g,function(oe){oe!=="%%"&&(ne++,oe==="%c"&&(ae=ne))}),y.splice(ae,0,x)}}function ee(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function te(y){try{y==null?ce.storage.removeItem("debug"):ce.storage.debug=y}catch(z){}}function E(){var y;try{y=ce.storage.debug}catch(z){}return!y&&se!==void 0&&"env"in se&&(y=se.env.DEBUG),y}ce=Ee.exports=ie("./debug"),ce.log=ee,ce.formatArgs=ue,ce.save=te,ce.load=E,ce.useColors=re,ce.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(y){}}(),ce.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],ce.formatters.j=function(y){try{return JSON.stringify(y)}catch(z){return"[UnexpectedJSONParseError]: "+z.message}},ce.enable(E())}).call(this,ie("_process"))},{"./debug":156,_process:173}],156:[function(ie,Ee,ce){function se(z){var x,ne=0;for(x in z)ne=(ne<<5)-ne+z.charCodeAt(x),ne|=0;return ce.colors[Math.abs(ne)%ce.colors.length]}function re(z){function x(){if(x.enabled){var ne=x,ae=+new Date,oe=ae-(y||ae);ne.diff=oe,ne.prev=y,ne.curr=ae,y=ae;for(var ge=new Array(arguments.length),Se=0;Se<ge.length;Se++)ge[Se]=arguments[Se];ge[0]=ce.coerce(ge[0]),typeof ge[0]!="string"&&ge.unshift("%O");var ve=0;ge[0]=ge[0].replace(/%([a-zA-Z%])/g,function(be,xe){if(be==="%%")return be;ve++;var pe=ce.formatters[xe];if(typeof pe=="function"){var me=ge[ve];be=pe.call(ne,me),ge.splice(ve,1),ve--}return be}),ce.formatArgs.call(ne,ge),(x.log||ce.log||console.log.bind(console)).apply(ne,ge)}}return x.namespace=z,x.enabled=ce.enabled(z),x.useColors=ce.useColors(),x.color=se(z),typeof ce.init=="function"&&ce.init(x),x}function ue(z){ce.save(z),ce.names=[],ce.skips=[];for(var x=(typeof z=="string"?z:"").split(/[\s,]+/),ne=x.length,ae=0;ae<ne;ae++)x[ae]&&(z=x[ae].replace(/\*/g,".*?"),z[0]==="-"?ce.skips.push(new RegExp("^"+z.substr(1)+"$")):ce.names.push(new RegExp("^"+z+"$")))}function ee(){ce.enable("")}function te(z){var x,ne;for(x=0,ne=ce.skips.length;x<ne;x++)if(ce.skips[x].test(z))return!1;for(x=0,ne=ce.names.length;x<ne;x++)if(ce.names[x].test(z))return!0;return!1}function E(z){return z instanceof Error?z.stack||z.message:z}ce=Ee.exports=re.debug=re.default=re,ce.coerce=E,ce.disable=ee,ce.enable=ue,ce.enabled=te,ce.humanize=ie("ms"),ce.names=[],ce.skips=[],ce.formatters={};var y},{ms:169}],157:[function(ie,Ee,ce){"use strict";function se(ue){var ee=""+ue,te=re.exec(ee);if(!te)return ee;var E,y="",z=0,x=0;for(z=te.index;z<ee.length;z++){switch(ee.charCodeAt(z)){case 34:E="&quot;";break;case 38:E="&amp;";break;case 39:E="&#39;";break;case 60:E="&lt;";break;case 62:E="&gt;";break;default:continue}x!==z&&(y+=ee.substring(x,z)),x=z+1,y+=E}return x!==z?y+ee.substring(x,z):y}var re=/["'&<>]/;Ee.exports=se},{}],158:[function(ie,Ee,ce){function se(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function re(E){return typeof E=="function"}function ue(E){return typeof E=="number"}function ee(E){return typeof E=="object"&&E!==null}function te(E){return E===void 0}Ee.exports=se,se.EventEmitter=se,se.prototype._events=void 0,se.prototype._maxListeners=void 0,se.defaultMaxListeners=10,se.prototype.setMaxListeners=function(E){if(!ue(E)||E<0||isNaN(E))throw TypeError("n must be a positive number");return this._maxListeners=E,this},se.prototype.emit=function(E){var y,z,x,ne,ae,oe;if(this._events||(this._events={}),E==="error"&&(!this._events.error||ee(this._events.error)&&!this._events.error.length)){if((y=arguments[1])instanceof Error)throw y;var ge=new Error('Uncaught, unspecified "error" event. ('+y+")");throw ge.context=y,ge}if(z=this._events[E],te(z))return!1;if(re(z))switch(arguments.length){case 1:z.call(this);break;case 2:z.call(this,arguments[1]);break;case 3:z.call(this,arguments[1],arguments[2]);break;default:ne=Array.prototype.slice.call(arguments,1),z.apply(this,ne)}else if(ee(z))for(ne=Array.prototype.slice.call(arguments,1),oe=z.slice(),x=oe.length,ae=0;ae<x;ae++)oe[ae].apply(this,ne);return!0},se.prototype.addListener=function(E,y){var z;if(!re(y))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",E,re(y.listener)?y.listener:y),this._events[E]?ee(this._events[E])?this._events[E].push(y):this._events[E]=[this._events[E],y]:this._events[E]=y,ee(this._events[E])&&!this._events[E].warned&&(z=te(this._maxListeners)?se.defaultMaxListeners:this._maxListeners)&&z>0&&this._events[E].length>z&&(this._events[E].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[E].length),typeof console.trace=="function"&&console.trace()),this},se.prototype.on=se.prototype.addListener,se.prototype.once=function(E,y){function z(){this.removeListener(E,z),x||(x=!0,y.apply(this,arguments))}if(!re(y))throw TypeError("listener must be a function");var x=!1;return z.listener=y,this.on(E,z),this},se.prototype.removeListener=function(E,y){var z,x,ne,ae;if(!re(y))throw TypeError("listener must be a function");if(!this._events||!this._events[E])return this;if(z=this._events[E],ne=z.length,x=-1,z===y||re(z.listener)&&z.listener===y)delete this._events[E],this._events.removeListener&&this.emit("removeListener",E,y);else if(ee(z)){for(ae=ne;ae-- >0;)if(z[ae]===y||z[ae].listener&&z[ae].listener===y){x=ae;break}if(x<0)return this;z.length===1?(z.length=0,delete this._events[E]):z.splice(x,1),this._events.removeListener&&this.emit("removeListener",E,y)}return this},se.prototype.removeAllListeners=function(E){var y,z;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[E]&&delete this._events[E],this;if(arguments.length===0){for(y in this._events)y!=="removeListener"&&this.removeAllListeners(y);return this.removeAllListeners("removeListener"),this._events={},this}if(z=this._events[E],re(z))this.removeListener(E,z);else if(z)for(;z.length;)this.removeListener(E,z[z.length-1]);return delete this._events[E],this},se.prototype.listeners=function(E){return this._events&&this._events[E]?re(this._events[E])?[this._events[E]]:this._events[E].slice():[]},se.prototype.listenerCount=function(E){if(this._events){var y=this._events[E];if(re(y))return 1;if(y)return y.length}return 0},se.listenerCount=function(E,y){return E.listenerCount(y)}},{}],159:[function(ie,Ee,ce){var se=ie("http"),re=Ee.exports;for(var ue in se)se.hasOwnProperty(ue)&&(re[ue]=se[ue]);re.request=function(ee,te){return ee||(ee={}),ee.scheme="https",ee.protocol="https:",se.request.call(this,ee,te)}},{http:196}],160:[function(ie,Ee,ce){"use strict";var se=ie("util"),re=ie("ms");Ee.exports=function(ue){if(typeof ue=="number")return ue;var ee=re(ue);if(ee===void 0){var te=new Error(se.format("humanize-ms(%j) result undefined",ue));console.warn(te.stack)}return ee}},{ms:169,util:207}],161:[function(ie,Ee,ce){ce.read=function(se,re,ue,ee,te){var E,y,z=8*te-ee-1,x=(1<<z)-1,ne=x>>1,ae=-7,oe=ue?te-1:0,ge=ue?-1:1,Se=se[re+oe];for(oe+=ge,E=Se&(1<<-ae)-1,Se>>=-ae,ae+=z;ae>0;E=256*E+se[re+oe],oe+=ge,ae-=8);for(y=E&(1<<-ae)-1,E>>=-ae,ae+=ee;ae>0;y=256*y+se[re+oe],oe+=ge,ae-=8);if(E===0)E=1-ne;else{if(E===x)return y?NaN:1/0*(Se?-1:1);y+=Math.pow(2,ee),E-=ne}return(Se?-1:1)*y*Math.pow(2,E-ee)},ce.write=function(se,re,ue,ee,te,E){var y,z,x,ne=8*E-te-1,ae=(1<<ne)-1,oe=ae>>1,ge=te===23?Math.pow(2,-24)-Math.pow(2,-77):0,Se=ee?0:E-1,ve=ee?1:-1,be=re<0||re===0&&1/re<0?1:0;for(re=Math.abs(re),isNaN(re)||re===1/0?(z=isNaN(re)?1:0,y=ae):(y=Math.floor(Math.log(re)/Math.LN2),re*(x=Math.pow(2,-y))<1&&(y--,x*=2),re+=y+oe>=1?ge/x:ge*Math.pow(2,1-oe),re*x>=2&&(y++,x/=2),y+oe>=ae?(z=0,y=ae):y+oe>=1?(z=(re*x-1)*Math.pow(2,te),y+=oe):(z=re*Math.pow(2,oe-1)*Math.pow(2,te),y=0));te>=8;se[ue+Se]=255&z,Se+=ve,z/=256,te-=8);for(y=y<<te|z,ne+=te;ne>0;se[ue+Se]=255&y,Se+=ve,y/=256,ne-=8);se[ue+Se-ve]|=128*be}},{}],162:[function(ie,Ee,ce){typeof Object.create=="function"?Ee.exports=function(se,re){se.super_=re,se.prototype=Object.create(re.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}})}:Ee.exports=function(se,re){se.super_=re;var ue=function(){};ue.prototype=re.prototype,se.prototype=new ue,se.prototype.constructor=se}},{}],163:[function(ie,Ee,ce){function se(ue){return!!ue.constructor&&typeof ue.constructor.isBuffer=="function"&&ue.constructor.isBuffer(ue)}function re(ue){return typeof ue.readFloatLE=="function"&&typeof ue.slice=="function"&&se(ue.slice(0,0))}Ee.exports=function(ue){return ue!=null&&(se(ue)||re(ue)||!!ue._isBuffer)}},{}],164:[function(ie,Ee,ce){(function(se){function re(te){return ee.call(te).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function ue(te){return typeof te=="function"&&(/^class(\s|\{\}$)/.test(ee.call(te))||/^.*classCallCheck\(/.test(re(te)))}var ee=Function.prototype.toString;ce!==void 0?(Ee!==void 0&&Ee.exports&&(ce=Ee.exports=ue),ce.isClass=ue):typeof de=="function"&&de.amd?de([],function(){return ue}):se.isClass=ue})(this)},{}],165:[function(ie,Ee,ce){"use strict";function se(E){var y=E.slice(2);return y=y[0].toLowerCase()+y.slice(1)}var re=ie("core-util-is"),ue=ie("isstream"),ee=ie("is-class");Object.keys(re).map(function(E){ce[se(E)]=re[E]}),ce.stream=ue,ce.readableStream=ue.isReadable,ce.writableStream=ue.isWritable,ce.duplexStream=ue.isDuplex,ce.class=ee,ce.finite=function(E){return Number.isFinite(E)},ce.NaN=function(E){return Number.isNaN(E)},ce.generator=function(E){return E&&typeof E.next=="function"&&typeof E.throw=="function"},ce.generatorFunction=function(E){return E&&E.constructor&&E.constructor.name==="GeneratorFunction"},ce.asyncFunction=function(E){return E&&E.constructor&&E.constructor.name==="AsyncFunction"},ce.promise=function(E){return E&&typeof E.then=="function"};var te=Math.pow(2,31);ce.int=function(E){return re.isNumber(E)&&E%1==0},ce.int32=function(E){return ce.int(E)&&E<te&&E>=-te},ce.long=function(E){return ce.int(E)&&(E>=te||E<-te)},ce.Long=function(E){return ce.object(E)&&ce.number(E.high)&&ce.number(E.low)},ce.double=function(E){return re.isNumber(E)&&!isNaN(E)&&E%1!=0},ce.date=function(E){return E instanceof Date},ce.regExp=function(E){return E instanceof RegExp},ce.regexp=ce.regExp,ce.error=function(E){return E instanceof Error},ce.array=function(E){return Array.isArray(E)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(ie,Ee,ce){var se={}.toString;Ee.exports=Array.isArray||function(re){return se.call(re)=="[object Array]"}},{}],167:[function(ie,Ee,ce){function se(E){return E instanceof te.Stream}function re(E){return se(E)&&typeof E._read=="function"&&typeof E._readableState=="object"}function ue(E){return se(E)&&typeof E._write=="function"&&typeof E._writableState=="object"}function ee(E){return re(E)&&ue(E)}var te=ie("stream");Ee.exports=se,Ee.exports.isReadable=re,Ee.exports.isWritable=ue,Ee.exports.isDuplex=ee},{stream:195}],168:[function(ie,Ee,ce){"use strict";function se(ue,ee,te){if(!ue)throw new TypeError("argument dest is required");if(!ee)throw new TypeError("argument src is required");return te===void 0&&(te=!0),Object.getOwnPropertyNames(ee).forEach(function(E){if(te||!re.call(ue,E)){var y=Object.getOwnPropertyDescriptor(ee,E);Object.defineProperty(ue,E,y)}}),ue}Ee.exports=se;var re=Object.prototype.hasOwnProperty},{}],169:[function(ie,Ee,ce){function se(ne){if(ne=String(ne),!(ne.length>100)){var ae=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(ne);if(ae){var oe=parseFloat(ae[1]);switch((ae[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return oe*x;case"days":case"day":case"d":return oe*z;case"hours":case"hour":case"hrs":case"hr":case"h":return oe*y;case"minutes":case"minute":case"mins":case"min":case"m":return oe*E;case"seconds":case"second":case"secs":case"sec":case"s":return oe*te;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return oe;default:return}}}}function re(ne){return ne>=z?Math.round(ne/z)+"d":ne>=y?Math.round(ne/y)+"h":ne>=E?Math.round(ne/E)+"m":ne>=te?Math.round(ne/te)+"s":ne+"ms"}function ue(ne){return ee(ne,z,"day")||ee(ne,y,"hour")||ee(ne,E,"minute")||ee(ne,te,"second")||ne+" ms"}function ee(ne,ae,oe){if(!(ne<ae))return ne<1.5*ae?Math.floor(ne/ae)+" "+oe:Math.ceil(ne/ae)+" "+oe+"s"}var te=1e3,E=60*te,y=60*E,z=24*y,x=365.25*z;Ee.exports=function(ne,ae){ae=ae||{};var oe=typeof ne;if(oe==="string"&&ne.length>0)return se(ne);if(oe==="number"&&isNaN(ne)===!1)return ae.long?ue(ne):re(ne);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(ne))}},{}],170:[function(ie,Ee,ce){(function(se){function re(E,y){for(var z=0,x=E.length-1;x>=0;x--){var ne=E[x];ne==="."?E.splice(x,1):ne===".."?(E.splice(x,1),z++):z&&(E.splice(x,1),z--)}if(y)for(;z--;z)E.unshift("..");return E}function ue(E){typeof E!="string"&&(E+="");var y,z=0,x=-1,ne=!0;for(y=E.length-1;y>=0;--y)if(E.charCodeAt(y)===47){if(!ne){z=y+1;break}}else x===-1&&(ne=!1,x=y+1);return x===-1?"":E.slice(z,x)}function ee(E,y){if(E.filter)return E.filter(y);for(var z=[],x=0;x<E.length;x++)y(E[x],x,E)&&z.push(E[x]);return z}ce.resolve=function(){for(var E="",y=!1,z=arguments.length-1;z>=-1&&!y;z--){var x=z>=0?arguments[z]:se.cwd();if(typeof x!="string")throw new TypeError("Arguments to path.resolve must be strings");x&&(E=x+"/"+E,y=x.charAt(0)==="/")}return E=re(ee(E.split("/"),function(ne){return!!ne}),!y).join("/"),(y?"/":"")+E||"."},ce.normalize=function(E){var y=ce.isAbsolute(E),z=te(E,-1)==="/";return E=re(ee(E.split("/"),function(x){return!!x}),!y).join("/"),E||y||(E="."),E&&z&&(E+="/"),(y?"/":"")+E},ce.isAbsolute=function(E){return E.charAt(0)==="/"},ce.join=function(){var E=Array.prototype.slice.call(arguments,0);return ce.normalize(ee(E,function(y,z){if(typeof y!="string")throw new TypeError("Arguments to path.join must be strings");return y}).join("/"))},ce.relative=function(E,y){function z(ve){for(var be=0;be<ve.length&&ve[be]==="";be++);for(var xe=ve.length-1;xe>=0&&ve[xe]==="";xe--);return be>xe?[]:ve.slice(be,xe-be+1)}E=ce.resolve(E).substr(1),y=ce.resolve(y).substr(1);for(var x=z(E.split("/")),ne=z(y.split("/")),ae=Math.min(x.length,ne.length),oe=ae,ge=0;ge<ae;ge++)if(x[ge]!==ne[ge]){oe=ge;break}for(var Se=[],ge=oe;ge<x.length;ge++)Se.push("..");return Se=Se.concat(ne.slice(oe)),Se.join("/")},ce.sep="/",ce.delimiter=":",ce.dirname=function(E){if(typeof E!="string"&&(E+=""),E.length===0)return".";for(var y=E.charCodeAt(0),z=y===47,x=-1,ne=!0,ae=E.length-1;ae>=1;--ae)if((y=E.charCodeAt(ae))===47){if(!ne){x=ae;break}}else ne=!1;return x===-1?z?"/":".":z&&x===1?"/":E.slice(0,x)},ce.basename=function(E,y){var z=ue(E);return y&&z.substr(-1*y.length)===y&&(z=z.substr(0,z.length-y.length)),z},ce.extname=function(E){typeof E!="string"&&(E+="");for(var y=-1,z=0,x=-1,ne=!0,ae=0,oe=E.length-1;oe>=0;--oe){var ge=E.charCodeAt(oe);if(ge!==47)x===-1&&(ne=!1,x=oe+1),ge===46?y===-1?y=oe:ae!==1&&(ae=1):y!==-1&&(ae=-1);else if(!ne){z=oe+1;break}}return y===-1||x===-1||ae===0||ae===1&&y===x-1&&y===z+1?"":E.slice(y,x)};var te=function(E,y,z){return E.substr(y,z)}}).call(this,ie("_process"))},{_process:173}],171:[function(ie,Ee,ce){(function(se){(function(){"use strict";function re(Fe){return Fe=String(Fe),Fe.charAt(0).toUpperCase()+Fe.slice(1)}function ue(Fe,Pe,qe){var Ke={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Pe&&qe&&/^Win/i.test(Fe)&&!/^Windows Phone /i.test(Fe)&&(Ke=Ke[/[\d.]+$/.exec(Fe)])&&(Fe="Windows "+Ke),Fe=String(Fe),Pe&&qe&&(Fe=Fe.replace(RegExp(Pe,"i"),qe)),Fe=te(Fe.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function ee(Fe,Pe){var qe=-1,Ke=Fe?Fe.length:0;if(typeof Ke=="number"&&Ke>-1&&Ke<=pe)for(;++qe<Ke;)Pe(Fe[qe],qe,Fe);else E(Fe,Pe)}function te(Fe){return Fe=ae(Fe),/^(?:webOS|i(?:OS|P))/.test(Fe)?Fe:re(Fe)}function E(Fe,Pe){for(var qe in Fe)De.call(Fe,qe)&&Pe(Fe[qe],qe,Fe)}function y(Fe){return Fe==null?re(Fe):ke.call(Fe).slice(8,-1)}function z(Fe,Pe){var qe=Fe!=null?typeof Fe[Pe]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(qe)||qe=="object"&&!Fe[Pe])}function x(Fe){return String(Fe).replace(/([ -])(?!$)/g,"$1?")}function ne(Fe,Pe){var qe=null;return ee(Fe,function(Ke,ot){qe=Pe(qe,Ke,ot,Fe)}),qe}function ae(Fe){return String(Fe).replace(/^ +| +$/g,"")}function oe(Fe){function Pe(je){return ne(je,function(ye,le){var _e=le.pattern||x(le);return!ye&&(ye=RegExp("\\b"+_e+" *\\d+[.\\w_]*","i").exec(Fe)||RegExp("\\b"+_e+" *\\w+-[\\w]*","i").exec(Fe)||RegExp("\\b"+_e+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(Fe))&&((ye=String(le.label&&!RegExp(_e,"i").test(le.label)?le.label:ye).split("/"))[1]&&!/[\d.]+/.test(ye[0])&&(ye[0]+=" "+ye[1]),le=le.label||le,ye=te(ye[0].replace(RegExp(_e,"i"),le).replace(RegExp("; *(?:"+le+"[_-])?","i")," ").replace(RegExp("("+le+")[-_.]?(\\w)","i"),"$1 $2"))),ye})}function qe(){return this.description||""}var Ke=Se,ot=Fe&&typeof Fe=="object"&&y(Fe)!="String";ot&&(Ke=Fe,Fe=null);var He=Ke.navigator||{},rt=He.userAgent||"";Fe||(Fe=rt);var Ge,ct,We=ot?!!He.likeChrome:/\bChrome\b/.test(Fe)&&!/internal|\n/i.test(ke.toString()),Ue=ot?"Object":"ScriptBridgingProxyObject",Ze=ot?"Object":"Environment",Je=ot&&Ke.java?"JavaPackage":y(Ke.java),$e=ot?"Object":"RuntimeObject",Qe=/\bJava/.test(Je)&&Ke.java,pt=Qe&&y(Ke.environment)==Ze,ht=Qe?"a":"\u4F2A",Pt=Qe?"b":"\u5C3E",gt=Ke.document||{},bt=Ke.operamini||Ke.opera,St=me.test(St=ot&&bt?bt["[[Class]]"]:y(bt))?St:bt=null,lt=Fe,_t=[],dt=null,nt=Fe==rt,et=nt&&bt&&typeof bt.version=="function"&&bt.version(),ft=function(je){return ne(je,function(ye,le){return ye||RegExp("\\b"+(le.pattern||x(le))+"\\b","i").exec(Fe)&&(le.label||le)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),wt=function(je){return ne(je,function(ye,le){return ye||RegExp("\\b"+(le.pattern||x(le))+"\\b","i").exec(Fe)&&(le.label||le)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Tt=Pe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),Re=function(je){return ne(je,function(ye,le,_e){return ye||(le[Tt]||le[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Tt)]||RegExp("\\b"+x(_e)+"(?:\\b|\\w*\\d)","i").exec(Fe))&&_e})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),Le=function(je){return ne(je,function(ye,le){var _e=le.pattern||x(le);return!ye&&(ye=RegExp("\\b"+_e+"(?:/[\\d.]+|[ \\w.]*)","i").exec(Fe))&&(ye=ue(ye,_e,le.label||le)),ye})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(ft&&(ft=[ft]),Re&&!Tt&&(Tt=Pe([Re])),(Ge=/\bGoogle TV\b/.exec(Tt))&&(Tt=Ge[0]),/\bSimulator\b/i.test(Fe)&&(Tt=(Tt?Tt+" ":"")+"Simulator"),wt=="Opera Mini"&&/\bOPiOS\b/.test(Fe)&&_t.push("running in Turbo/Uncompressed mode"),wt=="IE"&&/\blike iPhone OS\b/.test(Fe)?(Ge=oe(Fe.replace(/like iPhone OS/,"")),Re=Ge.manufacturer,Tt=Ge.product):/^iP/.test(Tt)?(wt||(wt="Safari"),Le="iOS"+((Ge=/ OS ([\d_]+)/i.exec(Fe))?" "+Ge[1].replace(/_/g,"."):"")):wt!="Konqueror"||/buntu/i.test(Le)?Re&&Re!="Google"&&(/Chrome/.test(wt)&&!/\bMobile Safari\b/i.test(Fe)||/\bVita\b/.test(Tt))||/\bAndroid\b/.test(Le)&&/^Chrome/.test(wt)&&/\bVersion\//i.test(Fe)?(wt="Android Browser",Le=/\bAndroid\b/.test(Le)?Le:"Android"):wt=="Silk"?(/\bMobi/i.test(Fe)||(Le="Android",_t.unshift("desktop mode")),/Accelerated *= *true/i.test(Fe)&&_t.unshift("accelerated")):wt=="PaleMoon"&&(Ge=/\bFirefox\/([\d.]+)\b/.exec(Fe))?_t.push("identifying as Firefox "+Ge[1]):wt=="Firefox"&&(Ge=/\b(Mobile|Tablet|TV)\b/i.exec(Fe))?(Le||(Le="Firefox OS"),Tt||(Tt=Ge[1])):!wt||(Ge=!/\bMinefield\b/i.test(Fe)&&/\b(?:Firefox|Safari)\b/.exec(wt))?(wt&&!Tt&&/[\/,]|^[^(]+?\)/.test(Fe.slice(Fe.indexOf(Ge+"/")+8))&&(wt=null),(Ge=Tt||Re||Le)&&(Tt||Re||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Le))&&(wt=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Le)?Le:Ge)+" Browser")):wt=="Electron"&&(Ge=(/\bChrome\/([\d.]+)\b/.exec(Fe)||0)[1])&&_t.push("Chromium "+Ge):Le="Kubuntu",et||(et=function(je){return ne(je,function(ye,le){return ye||(RegExp(le+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(Fe)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(wt),"(?:Firefox|Minefield|NetFront)"])),(Ge=ft=="iCab"&&parseFloat(et)>3&&"WebKit"||/\bOpera\b/.test(wt)&&(/\bOPR\b/.test(Fe)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(Fe)&&!/^(?:Trident|EdgeHTML)$/.test(ft)&&"WebKit"||!ft&&/\bMSIE\b/i.test(Fe)&&(Le=="Mac OS"?"Tasman":"Trident")||ft=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(wt)&&"NetFront")&&(ft=[Ge]),wt=="IE"&&(Ge=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(Fe)||0)[1])?(wt+=" Mobile",Le="Windows Phone "+(/\+$/.test(Ge)?Ge:Ge+".x"),_t.unshift("desktop mode")):/\bWPDesktop\b/i.test(Fe)?(wt="IE Mobile",Le="Windows Phone 8.x",_t.unshift("desktop mode"),et||(et=(/\brv:([\d.]+)/.exec(Fe)||0)[1])):wt!="IE"&&ft=="Trident"&&(Ge=/\brv:([\d.]+)/.exec(Fe))&&(wt&&_t.push("identifying as "+wt+(et?" "+et:"")),wt="IE",et=Ge[1]),nt){if(z(Ke,"global"))if(Qe&&(Ge=Qe.lang.System,lt=Ge.getProperty("os.arch"),Le=Le||Ge.getProperty("os.name")+" "+Ge.getProperty("os.version")),pt){try{et=Ke.require("ringo/engine").version.join("."),wt="RingoJS"}catch(je){(Ge=Ke.system)&&Ge.global.system==Ke.system&&(wt="Narwhal",Le||(Le=Ge[0].os||null))}wt||(wt="Rhino")}else typeof Ke.process=="object"&&!Ke.process.browser&&(Ge=Ke.process)&&(typeof Ge.versions=="object"&&(typeof Ge.versions.electron=="string"?(_t.push("Node "+Ge.versions.node),wt="Electron",et=Ge.versions.electron):typeof Ge.versions.nw=="string"&&(_t.push("Chromium "+et,"Node "+Ge.versions.node),wt="NW.js",et=Ge.versions.nw)),wt||(wt="Node.js",lt=Ge.arch,Le=Ge.platform,et=/[\d.]+/.exec(Ge.version),et=et?et[0]:null));else y(Ge=Ke.runtime)==Ue?(wt="Adobe AIR",Le=Ge.flash.system.Capabilities.os):y(Ge=Ke.phantom)==$e?(wt="PhantomJS",et=(Ge=Ge.version||null)&&Ge.major+"."+Ge.minor+"."+Ge.patch):typeof gt.documentMode=="number"&&(Ge=/\bTrident\/(\d+)/i.exec(Fe))?(et=[et,gt.documentMode],(Ge=+Ge[1]+4)!=et[1]&&(_t.push("IE "+et[1]+" mode"),ft&&(ft[1]=""),et[1]=Ge),et=wt=="IE"?String(et[1].toFixed(1)):et[0]):typeof gt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(wt)&&(_t.push("masking as "+wt+" "+et),wt="IE",et="11.0",ft=["Trident"],Le="Windows");Le=Le&&te(Le)}if(et&&(Ge=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(et)||/(?:alpha|beta)(?: ?\d)?/i.exec(Fe+";"+(nt&&He.appMinorVersion))||/\bMinefield\b/i.test(Fe)&&"a")&&(dt=/b/i.test(Ge)?"beta":"alpha",et=et.replace(RegExp(Ge+"\\+?$"),"")+(dt=="beta"?Pt:ht)+(/\d+\+?/.exec(Ge)||"")),wt=="Fennec"||wt=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Le))wt="Firefox Mobile";else if(wt=="Maxthon"&&et)et=et.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Tt))Tt=="Xbox 360"&&(Le=null),Tt=="Xbox 360"&&/\bIEMobile\b/.test(Fe)&&_t.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(wt)&&(!wt||Tt||/Browser|Mobi/.test(wt))||Le!="Windows CE"&&!/Mobi/i.test(Fe))if(wt=="IE"&&nt)try{Ke.external===null&&_t.unshift("platform preview")}catch(je){_t.unshift("embedded")}else(/\bBlackBerry\b/.test(Tt)||/\bBB10\b/.test(Fe))&&(Ge=(RegExp(Tt.replace(/ +/g," *")+"/([.\\d]+)","i").exec(Fe)||0)[1]||et)?(Ge=[Ge,/BB10/.test(Fe)],Le=(Ge[1]?(Tt=null,Re="BlackBerry"):"Device Software")+" "+Ge[0],et=null):this!=E&&Tt!="Wii"&&(nt&&bt||/Opera/.test(wt)&&/\b(?:MSIE|Firefox)\b/i.test(Fe)||wt=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Le)||wt=="IE"&&(Le&&!/^Win/.test(Le)&&et>5.5||/\bWindows XP\b/.test(Le)&&et>8||et==8&&!/\bTrident\b/.test(Fe)))&&!me.test(Ge=oe.call(E,Fe.replace(me,"")+";"))&&Ge.name&&(Ge="ing as "+Ge.name+((Ge=Ge.version)?" "+Ge:""),me.test(wt)?(/\bIE\b/.test(Ge)&&Le=="Mac OS"&&(Le=null),Ge="identify"+Ge):(Ge="mask"+Ge,wt=St?te(St.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(Ge)&&(Le=null),nt||(et=null)),ft=["Presto"],_t.push(Ge));else wt+=" Mobile";(Ge=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(Fe)||0)[1])&&(Ge=[parseFloat(Ge.replace(/\.(\d)$/,".0$1")),Ge],wt=="Safari"&&Ge[1].slice(-1)=="+"?(wt="WebKit Nightly",dt="alpha",et=Ge[1].slice(0,-1)):et!=Ge[1]&&et!=(Ge[2]=(/\bSafari\/([\d.]+\+?)/i.exec(Fe)||0)[1])||(et=null),Ge[1]=(/\bChrome\/([\d.]+)/i.exec(Fe)||0)[1],Ge[0]==537.36&&Ge[2]==537.36&&parseFloat(Ge[1])>=28&&ft=="WebKit"&&(ft=["Blink"]),nt&&(We||Ge[1])?(ft&&(ft[1]="like Chrome"),Ge=Ge[1]||(Ge=Ge[0],Ge<530?1:Ge<532?2:Ge<532.05?3:Ge<533?4:Ge<534.03?5:Ge<534.07?6:Ge<534.1?7:Ge<534.13?8:Ge<534.16?9:Ge<534.24?10:Ge<534.3?11:Ge<535.01?12:Ge<535.02?"13+":Ge<535.07?15:Ge<535.11?16:Ge<535.19?17:Ge<536.05?18:Ge<536.1?19:Ge<537.01?20:Ge<537.11?"21+":Ge<537.13?23:Ge<537.18?24:Ge<537.24?25:Ge<537.36?26:ft!="Blink"?"27":"28")):(ft&&(ft[1]="like Safari"),Ge=Ge[0],Ge=Ge<400?1:Ge<500?2:Ge<526?3:Ge<533?4:Ge<534?"4+":Ge<535?5:Ge<537?6:Ge<538?7:Ge<601?8:"8"),ft&&(ft[1]+=" "+(Ge+=typeof Ge=="number"?".x":/[.+]/.test(Ge)?"":"+")),wt=="Safari"&&(!et||parseInt(et)>45)&&(et=Ge)),wt=="Opera"&&(Ge=/\bzbov|zvav$/.exec(Le))?(wt+=" ",_t.unshift("desktop mode"),Ge=="zvav"?(wt+="Mini",et=null):wt+="Mobile",Le=Le.replace(RegExp(" *"+Ge+"$"),"")):wt=="Safari"&&/\bChrome\b/.exec(ft&&ft[1])&&(_t.unshift("desktop mode"),wt="Chrome Mobile",et=null,/\bOS X\b/.test(Le)?(Re="Apple",Le="iOS 4.3+"):Le=null),et&&et.indexOf(Ge=/[\d.]+$/.exec(Le))==0&&Fe.indexOf("/"+Ge+"-")>-1&&(Le=ae(Le.replace(Ge,""))),ft&&!/\b(?:Avant|Nook)\b/.test(wt)&&(/Browser|Lunascape|Maxthon/.test(wt)||wt!="Safari"&&/^iOS/.test(Le)&&/\bSafari\b/.test(ft[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(wt)&&ft[1])&&(Ge=ft[ft.length-1])&&_t.push(Ge),_t.length&&(_t=["("+_t.join("; ")+")"]),Re&&Tt&&Tt.indexOf(Re)<0&&_t.push("on "+Re),Tt&&_t.push((/^on /.test(_t[_t.length-1])?"":"on ")+Tt),Le&&(Ge=/ ([\d.+]+)$/.exec(Le),ct=Ge&&Le.charAt(Le.length-Ge[0].length-1)=="/",Le={architecture:32,family:Ge&&!ct?Le.replace(Ge[0],""):Le,version:Ge?Ge[1]:null,toString:function(){var je=this.version;return this.family+(je&&!ct?" "+je:"")+(this.architecture==64?" 64-bit":"")}}),(Ge=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(lt))&&!/\bi686\b/i.test(lt)?(Le&&(Le.architecture=64,Le.family=Le.family.replace(RegExp(" *"+Ge),"")),wt&&(/\bWOW64\b/i.test(Fe)||nt&&/\w(?:86|32)$/.test(He.cpuClass||He.platform)&&!/\bWin64; x64\b/i.test(Fe))&&_t.unshift("32-bit")):Le&&/^OS X/.test(Le.family)&&wt=="Chrome"&&parseFloat(et)>=39&&(Le.architecture=64),Fe||(Fe=null);var Te={};return Te.description=Fe,Te.layout=ft&&ft[0],Te.manufacturer=Re,Te.name=wt,Te.prerelease=dt,Te.product=Tt,Te.ua=Fe,Te.version=wt&&et,Te.os=Le||{architecture:null,family:null,version:null,toString:function(){return"null"}},Te.parse=oe,Te.toString=qe,Te.version&&_t.unshift(et),Te.name&&_t.unshift(wt),Le&&wt&&(Le!=String(Le).split(" ")[0]||Le!=wt.split(" ")[0]&&!Tt)&&_t.push(Tt?"("+Le+")":"on "+Le),_t.length&&(Te.description=_t.join(" ")),Te}var ge={function:!0,object:!0},Se=ge[typeof window]&&window||this,ve=ge[typeof ce]&&ce,be=ge[typeof Ee]&&Ee&&!Ee.nodeType&&Ee,xe=ve&&be&&typeof se=="object"&&se;!xe||xe.global!==xe&&xe.window!==xe&&xe.self!==xe||(Se=xe);var pe=Math.pow(2,53)-1,me=/\bOpera/,Ae=Object.prototype,De=Ae.hasOwnProperty,ke=Ae.toString,Ie=oe();typeof de=="function"&&typeof de.amd=="object"&&de.amd?(Se.platform=Ie,de(function(){return Ie})):ve&&be?E(Ie,function(Fe,Pe){ve[Pe]=Fe}):Se.platform=Ie}).call(this)}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(ie,Ee,ce){(function(se){"use strict";function re(ue,ee,te,E){if(typeof ue!="function")throw new TypeError('"callback" argument must be a function');var y,z,x=arguments.length;switch(x){case 0:case 1:return se.nextTick(ue);case 2:return se.nextTick(function(){ue.call(null,ee)});case 3:return se.nextTick(function(){ue.call(null,ee,te)});case 4:return se.nextTick(function(){ue.call(null,ee,te,E)});default:for(y=new Array(x-1),z=0;z<y.length;)y[z++]=arguments[z];return se.nextTick(function(){ue.apply(null,y)})}}!se.version||se.version.indexOf("v0.")===0||se.version.indexOf("v1.")===0&&se.version.indexOf("v1.8.")!==0?Ee.exports={nextTick:re}:Ee.exports=se}).call(this,ie("_process"))},{_process:173}],173:[function(ie,Ee,ce){function se(){throw new Error("setTimeout has not been defined")}function re(){throw new Error("clearTimeout has not been defined")}function ue(be){if(x===setTimeout)return setTimeout(be,0);if((x===se||!x)&&setTimeout)return x=setTimeout,setTimeout(be,0);try{return x(be,0)}catch(xe){try{return x.call(null,be,0)}catch(pe){return x.call(this,be,0)}}}function ee(be){if(ne===clearTimeout)return clearTimeout(be);if((ne===re||!ne)&&clearTimeout)return ne=clearTimeout,clearTimeout(be);try{return ne(be)}catch(xe){try{return ne.call(null,be)}catch(pe){return ne.call(this,be)}}}function te(){Se&&oe&&(Se=!1,oe.length?ge=oe.concat(ge):ve=-1,ge.length&&E())}function E(){if(!Se){var be=ue(te);Se=!0;for(var xe=ge.length;xe;){for(oe=ge,ge=[];++ve<xe;)oe&&oe[ve].run();ve=-1,xe=ge.length}oe=null,Se=!1,ee(be)}}function y(be,xe){this.fun=be,this.array=xe}function z(){}var x,ne,ae=Ee.exports={};(function(){try{x=typeof setTimeout=="function"?setTimeout:se}catch(be){x=se}try{ne=typeof clearTimeout=="function"?clearTimeout:re}catch(be){ne=re}})();var oe,ge=[],Se=!1,ve=-1;ae.nextTick=function(be){var xe=new Array(arguments.length-1);if(arguments.length>1)for(var pe=1;pe<arguments.length;pe++)xe[pe-1]=arguments[pe];ge.push(new y(be,xe)),ge.length!==1||Se||ue(E)},y.prototype.run=function(){this.fun.apply(null,this.array)},ae.title="browser",ae.browser=!0,ae.env={},ae.argv=[],ae.version="",ae.versions={},ae.on=z,ae.addListener=z,ae.once=z,ae.off=z,ae.removeListener=z,ae.removeAllListeners=z,ae.emit=z,ae.prependListener=z,ae.prependOnceListener=z,ae.listeners=function(be){return[]},ae.binding=function(be){throw new Error("process.binding is not supported")},ae.cwd=function(){return"/"},ae.chdir=function(be){throw new Error("process.chdir is not supported")},ae.umask=function(){return 0}},{}],174:[function(ie,Ee,ce){(function(se){(function(re){function ue(Je){throw new RangeError(ct[Je])}function ee(Je,$e){for(var Qe=Je.length,pt=[];Qe--;)pt[Qe]=$e(Je[Qe]);return pt}function te(Je,$e){var Qe=Je.split("@"),pt="";return Qe.length>1&&(pt=Qe[0]+"@",Je=Qe[1]),Je=Je.replace(Ge,"."),pt+ee(Je.split("."),$e).join(".")}function E(Je){for(var $e,Qe,pt=[],ht=0,Pt=Je.length;ht<Pt;)$e=Je.charCodeAt(ht++),$e>=55296&&$e<=56319&&ht<Pt?(Qe=Je.charCodeAt(ht++),(64512&Qe)==56320?pt.push(((1023&$e)<<10)+(1023&Qe)+65536):(pt.push($e),ht--)):pt.push($e);return pt}function y(Je){return ee(Je,function($e){var Qe="";return $e>65535&&($e-=65536,Qe+=Ze($e>>>10&1023|55296),$e=56320|1023&$e),Qe+=Ze($e)}).join("")}function z(Je){return Je-48<10?Je-22:Je-65<26?Je-65:Je-97<26?Je-97:De}function x(Je,$e){return Je+22+75*(Je<26)-(($e!=0)<<5)}function ne(Je,$e,Qe){var pt=0;for(Je=Qe?Ue(Je/Pe):Je>>1,Je+=Ue(Je/$e);Je>We*Ie>>1;pt+=De)Je=Ue(Je/We);return Ue(pt+(We+1)*Je/(Je+Fe))}function ae(Je){var $e,Qe,pt,ht,Pt,gt,bt,St,lt,_t,dt=[],nt=Je.length,et=0,ft=Ke,wt=qe;for(Qe=Je.lastIndexOf(ot),Qe<0&&(Qe=0),pt=0;pt<Qe;++pt)Je.charCodeAt(pt)>=128&&ue("not-basic"),dt.push(Je.charCodeAt(pt));for(ht=Qe>0?Qe+1:0;ht<nt;){for(Pt=et,gt=1,bt=De;ht>=nt&&ue("invalid-input"),St=z(Je.charCodeAt(ht++)),(St>=De||St>Ue((Ae-et)/gt))&&ue("overflow"),et+=St*gt,lt=bt<=wt?ke:bt>=wt+Ie?Ie:bt-wt,!(St<lt);bt+=De)_t=De-lt,gt>Ue(Ae/_t)&&ue("overflow"),gt*=_t;$e=dt.length+1,wt=ne(et-Pt,$e,Pt==0),Ue(et/$e)>Ae-ft&&ue("overflow"),ft+=Ue(et/$e),et%=$e,dt.splice(et++,0,ft)}return y(dt)}function oe(Je){var $e,Qe,pt,ht,Pt,gt,bt,St,lt,_t,dt,nt,et,ft,wt,Tt=[];for(Je=E(Je),nt=Je.length,$e=Ke,Qe=0,Pt=qe,gt=0;gt<nt;++gt)(dt=Je[gt])<128&&Tt.push(Ze(dt));for(pt=ht=Tt.length,ht&&Tt.push(ot);pt<nt;){for(bt=Ae,gt=0;gt<nt;++gt)(dt=Je[gt])>=$e&&dt<bt&&(bt=dt);for(et=pt+1,bt-$e>Ue((Ae-Qe)/et)&&ue("overflow"),Qe+=(bt-$e)*et,$e=bt,gt=0;gt<nt;++gt)if(dt=Je[gt],dt<$e&&++Qe>Ae&&ue("overflow"),dt==$e){for(St=Qe,lt=De;_t=lt<=Pt?ke:lt>=Pt+Ie?Ie:lt-Pt,!(St<_t);lt+=De)wt=St-_t,ft=De-_t,Tt.push(Ze(x(_t+wt%ft,0))),St=Ue(wt/ft);Tt.push(Ze(x(St,0))),Pt=ne(Qe,et,pt==ht),Qe=0,++pt}++Qe,++$e}return Tt.join("")}function ge(Je){return te(Je,function($e){return He.test($e)?ae($e.slice(4).toLowerCase()):$e})}function Se(Je){return te(Je,function($e){return rt.test($e)?"xn--"+oe($e):$e})}var ve=typeof ce=="object"&&ce&&!ce.nodeType&&ce,be=typeof Ee=="object"&&Ee&&!Ee.nodeType&&Ee,xe=typeof se=="object"&&se;xe.global!==xe&&xe.window!==xe&&xe.self!==xe||(re=xe);var pe,me,Ae=2147483647,De=36,ke=1,Ie=26,Fe=38,Pe=700,qe=72,Ke=128,ot="-",He=/^xn--/,rt=/[^\x20-\x7E]/,Ge=/[\x2E\u3002\uFF0E\uFF61]/g,ct={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},We=De-ke,Ue=Math.floor,Ze=String.fromCharCode;if(pe={version:"1.4.1",ucs2:{decode:E,encode:y},decode:ae,encode:oe,toASCII:Se,toUnicode:ge},typeof de=="function"&&typeof de.amd=="object"&&de.amd)de("punycode",function(){return pe});else if(ve&&be)if(Ee.exports==ve)be.exports=pe;else for(me in pe)pe.hasOwnProperty(me)&&(ve[me]=pe[me]);else re.punycode=pe})(this)}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(ie,Ee,ce){"use strict";function se(ue,ee){return Object.prototype.hasOwnProperty.call(ue,ee)}Ee.exports=function(ue,ee,te,E){ee=ee||"&",te=te||"=";var y={};if(typeof ue!="string"||ue.length===0)return y;var z=/\+/g;ue=ue.split(ee);var x=1e3;E&&typeof E.maxKeys=="number"&&(x=E.maxKeys);var ne=ue.length;x>0&&ne>x&&(ne=x);for(var ae=0;ae<ne;++ae){var oe,ge,Se,ve,be=ue[ae].replace(z,"%20"),xe=be.indexOf(te);xe>=0?(oe=be.substr(0,xe),ge=be.substr(xe+1)):(oe=be,ge=""),Se=decodeURIComponent(oe),ve=decodeURIComponent(ge),se(y,Se)?re(y[Se])?y[Se].push(ve):y[Se]=[y[Se],ve]:y[Se]=ve}return y};var re=Array.isArray||function(ue){return Object.prototype.toString.call(ue)==="[object Array]"}},{}],176:[function(ie,Ee,ce){"use strict";function se(te,E){if(te.map)return te.map(E);for(var y=[],z=0;z<te.length;z++)y.push(E(te[z],z));return y}var re=function(te){switch(typeof te){case"string":return te;case"boolean":return te?"true":"false";case"number":return isFinite(te)?te:"";default:return""}};Ee.exports=function(te,E,y,z){return E=E||"&",y=y||"=",te===null&&(te=void 0),typeof te=="object"?se(ee(te),function(x){var ne=encodeURIComponent(re(x))+y;return ue(te[x])?se(te[x],function(ae){return ne+encodeURIComponent(re(ae))}).join(E):ne+encodeURIComponent(re(te[x]))}).join(E):z?encodeURIComponent(re(z))+y+encodeURIComponent(re(te)):""};var ue=Array.isArray||function(te){return Object.prototype.toString.call(te)==="[object Array]"},ee=Object.keys||function(te){var E=[];for(var y in te)Object.prototype.hasOwnProperty.call(te,y)&&E.push(y);return E}},{}],177:[function(ie,Ee,ce){"use strict";ce.decode=ce.parse=ie("./decode"),ce.encode=ce.stringify=ie("./encode")},{"./decode":175,"./encode":176}],178:[function(ie,Ee,ce){Ee.exports=ie("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(ie,Ee,ce){"use strict";function se(Se){if(!(this instanceof se))return new se(Se);x.call(this,Se),ne.call(this,Se),Se&&Se.readable===!1&&(this.readable=!1),Se&&Se.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,Se&&Se.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",re)}function re(){this.allowHalfOpen||this._writableState.ended||E.nextTick(ue,this)}function ue(Se){Se.end()}var ee=ie("babel-runtime/core-js/object/keys"),te=function(Se){return Se&&Se.__esModule?Se:{default:Se}}(ee),E=ie("process-nextick-args"),y=te.default||function(Se){var ve=[];for(var be in Se)ve.push(be);return ve};Ee.exports=se;var z=ie("core-util-is");z.inherits=ie("inherits");var x=ie("./_stream_readable"),ne=ie("./_stream_writable");z.inherits(se,x);for(var ae=y(ne.prototype),oe=0;oe<ae.length;oe++){var ge=ae[oe];se.prototype[ge]||(se.prototype[ge]=ne.prototype[ge])}Object.defineProperty(se.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(se.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(Se){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=Se,this._writableState.destroyed=Se)}}),se.prototype._destroy=function(Se,ve){this.push(null),this.end(),E.nextTick(ve,Se)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(ie,Ee,ce){"use strict";function se(ee){if(!(this instanceof se))return new se(ee);re.call(this,ee)}Ee.exports=se;var re=ie("./_stream_transform"),ue=ie("core-util-is");ue.inherits=ie("inherits"),ue.inherits(se,re),se.prototype._transform=function(ee,te,E){E(null,ee)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(ie,Ee,ce){(function(se,re){"use strict";function ue(nt){return Qe.from(nt)}function ee(nt){return Qe.isBuffer(nt)||nt instanceof pt}function te(nt,et,ft){if(typeof nt.prependListener=="function")return nt.prependListener(et,ft);nt._events&&nt._events[et]?Ze(nt._events[et])?nt._events[et].unshift(ft):nt._events[et]=[ft,nt._events[et]]:nt.on(et,ft)}function E(nt,et){Ue=Ue||ie("./_stream_duplex"),nt=nt||{};var ft=et instanceof Ue;this.objectMode=!!nt.objectMode,ft&&(this.objectMode=this.objectMode||!!nt.readableObjectMode);var wt=nt.highWaterMark,Tt=nt.readableHighWaterMark,Re=this.objectMode?16:16384;this.highWaterMark=wt||wt===0?wt:ft&&(Tt||Tt===0)?Tt:Re,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new St,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=nt.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,nt.encoding&&(bt||(bt=ie("string_decoder/").StringDecoder),this.decoder=new bt(nt.encoding),this.encoding=nt.encoding)}function y(nt){if(Ue=Ue||ie("./_stream_duplex"),!(this instanceof y))return new y(nt);this._readableState=new E(nt,this),this.readable=!0,nt&&(typeof nt.read=="function"&&(this._read=nt.read),typeof nt.destroy=="function"&&(this._destroy=nt.destroy)),$e.call(this)}function z(nt,et,ft,wt,Tt){var Re=nt._readableState;if(et===null)Re.reading=!1,Se(nt,Re);else{var Le;Tt||(Le=ne(Re,et)),Le?nt.emit("error",Le):Re.objectMode||et&&et.length>0?(typeof et=="string"||Re.objectMode||(0,ct.default)(et)===Qe.prototype||(et=ue(et)),wt?Re.endEmitted?nt.emit("error",new Error("stream.unshift() after end event")):x(nt,Re,et,!0):Re.ended?nt.emit("error",new Error("stream.push() after EOF")):(Re.reading=!1,Re.decoder&&!ft?(et=Re.decoder.write(et),Re.objectMode||et.length!==0?x(nt,Re,et,!1):xe(nt,Re)):x(nt,Re,et,!1))):wt||(Re.reading=!1)}return ae(Re)}function x(nt,et,ft,wt){et.flowing&&et.length===0&&!et.sync?(nt.emit("data",ft),nt.read(0)):(et.length+=et.objectMode?1:ft.length,wt?et.buffer.unshift(ft):et.buffer.push(ft),et.needReadable&&ve(nt)),xe(nt,et)}function ne(nt,et){var ft;return ee(et)||typeof et=="string"||et===void 0||nt.objectMode||(ft=new TypeError("Invalid non-string/buffer chunk")),ft}function ae(nt){return!nt.ended&&(nt.needReadable||nt.length<nt.highWaterMark||nt.length===0)}function oe(nt){return nt>=dt?nt=dt:(nt--,nt|=nt>>>1,nt|=nt>>>2,nt|=nt>>>4,nt|=nt>>>8,nt|=nt>>>16,nt++),nt}function ge(nt,et){return nt<=0||et.length===0&&et.ended?0:et.objectMode?1:nt!==nt?et.flowing&&et.length?et.buffer.head.data.length:et.length:(nt>et.highWaterMark&&(et.highWaterMark=oe(nt)),nt<=et.length?nt:et.ended?et.length:(et.needReadable=!0,0))}function Se(nt,et){if(!et.ended){if(et.decoder){var ft=et.decoder.end();ft&&ft.length&&(et.buffer.push(ft),et.length+=et.objectMode?1:ft.length)}et.ended=!0,ve(nt)}}function ve(nt){var et=nt._readableState;et.needReadable=!1,et.emittedReadable||(gt("emitReadable",et.flowing),et.emittedReadable=!0,et.sync?We.nextTick(be,nt):be(nt))}function be(nt){gt("emit readable"),nt.emit("readable"),Ie(nt)}function xe(nt,et){et.readingMore||(et.readingMore=!0,We.nextTick(pe,nt,et))}function pe(nt,et){for(var ft=et.length;!et.reading&&!et.flowing&&!et.ended&&et.length<et.highWaterMark&&(gt("maybeReadMore read 0"),nt.read(0),ft!==et.length);)ft=et.length;et.readingMore=!1}function me(nt){return function(){var et=nt._readableState;gt("pipeOnDrain",et.awaitDrain),et.awaitDrain&&et.awaitDrain--,et.awaitDrain===0&&Je(nt,"data")&&(et.flowing=!0,Ie(nt))}}function Ae(nt){gt("readable nexttick read 0"),nt.read(0)}function De(nt,et){et.resumeScheduled||(et.resumeScheduled=!0,We.nextTick(ke,nt,et))}function ke(nt,et){et.reading||(gt("resume read 0"),nt.read(0)),et.resumeScheduled=!1,et.awaitDrain=0,nt.emit("resume"),Ie(nt),et.flowing&&!et.reading&&nt.read(0)}function Ie(nt){var et=nt._readableState;for(gt("flow",et.flowing);et.flowing&&nt.read()!==null;);}function Fe(nt,et){if(et.length===0)return null;var ft;return et.objectMode?ft=et.buffer.shift():!nt||nt>=et.length?(ft=et.decoder?et.buffer.join(""):et.buffer.length===1?et.buffer.head.data:et.buffer.concat(et.length),et.buffer.clear()):ft=Pe(nt,et.buffer,et.decoder),ft}function Pe(nt,et,ft){var wt;return nt<et.head.data.length?(wt=et.head.data.slice(0,nt),et.head.data=et.head.data.slice(nt)):wt=nt===et.head.data.length?et.shift():ft?qe(nt,et):Ke(nt,et),wt}function qe(nt,et){var ft=et.head,wt=1,Tt=ft.data;for(nt-=Tt.length;ft=ft.next;){var Re=ft.data,Le=nt>Re.length?Re.length:nt;if(Le===Re.length?Tt+=Re:Tt+=Re.slice(0,nt),(nt-=Le)===0){Le===Re.length?(++wt,ft.next?et.head=ft.next:et.head=et.tail=null):(et.head=ft,ft.data=Re.slice(Le));break}++wt}return et.length-=wt,Tt}function Ke(nt,et){var ft=Qe.allocUnsafe(nt),wt=et.head,Tt=1;for(wt.data.copy(ft),nt-=wt.data.length;wt=wt.next;){var Re=wt.data,Le=nt>Re.length?Re.length:nt;if(Re.copy(ft,ft.length-nt,0,Le),(nt-=Le)===0){Le===Re.length?(++Tt,wt.next?et.head=wt.next:et.head=et.tail=null):(et.head=wt,wt.data=Re.slice(Le));break}++Tt}return et.length-=Tt,ft}function ot(nt){var et=nt._readableState;if(et.length>0)throw new Error('"endReadable()" called on non-empty stream');et.endEmitted||(et.ended=!0,We.nextTick(He,et,nt))}function He(nt,et){nt.endEmitted||nt.length!==0||(nt.endEmitted=!0,et.readable=!1,et.emit("end"))}function rt(nt,et){for(var ft=0,wt=nt.length;ft<wt;ft++)if(nt[ft]===et)return ft;return-1}var Ge=ie("babel-runtime/core-js/object/get-prototype-of"),ct=function(nt){return nt&&nt.__esModule?nt:{default:nt}}(Ge),We=ie("process-nextick-args");Ee.exports=y;var Ue,Ze=ie("isarray");y.ReadableState=E;var Je=(ie("events").EventEmitter,function(nt,et){return nt.listeners(et).length}),$e=ie("./internal/streams/stream"),Qe=ie("safe-buffer").Buffer,pt=re.Uint8Array||function(){},ht=ie("core-util-is");ht.inherits=ie("inherits");var Pt=ie("util"),gt=void 0;gt=Pt&&Pt.debuglog?Pt.debuglog("stream"):function(){};var bt,St=ie("./internal/streams/BufferList"),lt=ie("./internal/streams/destroy");ht.inherits(y,$e);var _t=["error","close","destroy","pause","resume"];Object.defineProperty(y.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(nt){this._readableState&&(this._readableState.destroyed=nt)}}),y.prototype.destroy=lt.destroy,y.prototype._undestroy=lt.undestroy,y.prototype._destroy=function(nt,et){this.push(null),et(nt)},y.prototype.push=function(nt,et){var ft,wt=this._readableState;return wt.objectMode?ft=!0:typeof nt=="string"&&(et=et||wt.defaultEncoding,et!==wt.encoding&&(nt=Qe.from(nt,et),et=""),ft=!0),z(this,nt,et,!1,ft)},y.prototype.unshift=function(nt){return z(this,nt,null,!0,!1)},y.prototype.isPaused=function(){return this._readableState.flowing===!1},y.prototype.setEncoding=function(nt){return bt||(bt=ie("string_decoder/").StringDecoder),this._readableState.decoder=new bt(nt),this._readableState.encoding=nt,this};var dt=8388608;y.prototype.read=function(nt){gt("read",nt),nt=parseInt(nt,10);var et=this._readableState,ft=nt;if(nt!==0&&(et.emittedReadable=!1),nt===0&&et.needReadable&&(et.length>=et.highWaterMark||et.ended))return gt("read: emitReadable",et.length,et.ended),et.length===0&&et.ended?ot(this):ve(this),null;if((nt=ge(nt,et))===0&&et.ended)return et.length===0&&ot(this),null;var wt=et.needReadable;gt("need readable",wt),(et.length===0||et.length-nt<et.highWaterMark)&&(wt=!0,gt("length less than watermark",wt)),et.ended||et.reading?(wt=!1,gt("reading or ended",wt)):wt&&(gt("do read"),et.reading=!0,et.sync=!0,et.length===0&&(et.needReadable=!0),this._read(et.highWaterMark),et.sync=!1,et.reading||(nt=ge(ft,et)));var Tt;return Tt=nt>0?Fe(nt,et):null,Tt===null?(et.needReadable=!0,nt=0):et.length-=nt,et.length===0&&(et.ended||(et.needReadable=!0),ft!==nt&&et.ended&&ot(this)),Tt!==null&&this.emit("data",Tt),Tt},y.prototype._read=function(nt){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(nt,et){function ft(Nt,Dt){gt("onunpipe"),Nt===le&&Dt&&Dt.hasUnpiped===!1&&(Dt.hasUnpiped=!0,Tt())}function wt(){gt("onend"),nt.end()}function Tt(){gt("cleanup"),nt.removeListener("close",Te),nt.removeListener("finish",je),nt.removeListener("drain",Oe),nt.removeListener("error",Le),nt.removeListener("unpipe",ft),le.removeListener("end",wt),le.removeListener("end",ye),le.removeListener("data",Re),tt=!0,!_e.awaitDrain||nt._writableState&&!nt._writableState.needDrain||Oe()}function Re(Nt){gt("ondata"),Ct=!1,nt.write(Nt)!==!1||Ct||((_e.pipesCount===1&&_e.pipes===nt||_e.pipesCount>1&&rt(_e.pipes,nt)!==-1)&&!tt&&(gt("false write response, pause",le._readableState.awaitDrain),le._readableState.awaitDrain++,Ct=!0),le.pause())}function Le(Nt){gt("onerror",Nt),ye(),nt.removeListener("error",Le),Je(nt,"error")===0&&nt.emit("error",Nt)}function Te(){nt.removeListener("finish",je),ye()}function je(){gt("onfinish"),nt.removeListener("close",Te),ye()}function ye(){gt("unpipe"),le.unpipe(nt)}var le=this,_e=this._readableState;switch(_e.pipesCount){case 0:_e.pipes=nt;break;case 1:_e.pipes=[_e.pipes,nt];break;default:_e.pipes.push(nt)}_e.pipesCount+=1,gt("pipe count=%d opts=%j",_e.pipesCount,et);var Ne=(!et||et.end!==!1)&&nt!==se.stdout&&nt!==se.stderr,Ye=Ne?wt:ye;_e.endEmitted?We.nextTick(Ye):le.once("end",Ye),nt.on("unpipe",ft);var Oe=me(le);nt.on("drain",Oe);var tt=!1,Ct=!1;return le.on("data",Re),te(nt,"error",Le),nt.once("close",Te),nt.once("finish",je),nt.emit("pipe",le),_e.flowing||(gt("pipe resume"),le.resume()),nt},y.prototype.unpipe=function(nt){var et=this._readableState,ft={hasUnpiped:!1};if(et.pipesCount===0)return this;if(et.pipesCount===1)return nt&&nt!==et.pipes?this:(nt||(nt=et.pipes),et.pipes=null,et.pipesCount=0,et.flowing=!1,nt&&nt.emit("unpipe",this,ft),this);if(!nt){var wt=et.pipes,Tt=et.pipesCount;et.pipes=null,et.pipesCount=0,et.flowing=!1;for(var Re=0;Re<Tt;Re++)wt[Re].emit("unpipe",this,ft);return this}var Le=rt(et.pipes,nt);return Le===-1?this:(et.pipes.splice(Le,1),et.pipesCount-=1,et.pipesCount===1&&(et.pipes=et.pipes[0]),nt.emit("unpipe",this,ft),this)},y.prototype.on=function(nt,et){var ft=$e.prototype.on.call(this,nt,et);if(nt==="data")this._readableState.flowing!==!1&&this.resume();else if(nt==="readable"){var wt=this._readableState;wt.endEmitted||wt.readableListening||(wt.readableListening=wt.needReadable=!0,wt.emittedReadable=!1,wt.reading?wt.length&&ve(this):We.nextTick(Ae,this))}return ft},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var nt=this._readableState;return nt.flowing||(gt("resume"),nt.flowing=!0,De(this,nt)),this},y.prototype.pause=function(){return gt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(gt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(nt){var et=this,ft=this._readableState,wt=!1;nt.on("end",function(){if(gt("wrapped end"),ft.decoder&&!ft.ended){var Le=ft.decoder.end();Le&&Le.length&&et.push(Le)}et.push(null)}),nt.on("data",function(Le){gt("wrapped data"),ft.decoder&&(Le=ft.decoder.write(Le)),(!ft.objectMode||Le!=null)&&(ft.objectMode||Le&&Le.length)&&(et.push(Le)||(wt=!0,nt.pause()))});for(var Tt in nt)this[Tt]===void 0&&typeof nt[Tt]=="function"&&(this[Tt]=function(Le){return function(){return nt[Le].apply(nt,arguments)}}(Tt));for(var Re=0;Re<_t.length;Re++)nt.on(_t[Re],this.emit.bind(this,_t[Re]));return this._read=function(Le){gt("wrapped _read",Le),wt&&(wt=!1,nt.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=Fe}).call(this,ie("_process"),typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(ie,Ee,ce){"use strict";function se(y,z){var x=this._transformState;x.transforming=!1;var ne=x.writecb;if(!ne)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,z!=null&&this.push(z),ne(y);var ae=this._readableState;ae.reading=!1,(ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}function re(y){if(!(this instanceof re))return new re(y);te.call(this,y),this._transformState={afterTransform:se.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,y&&(typeof y.transform=="function"&&(this._transform=y.transform),typeof y.flush=="function"&&(this._flush=y.flush)),this.on("prefinish",ue)}function ue(){var y=this;typeof this._flush=="function"?this._flush(function(z,x){ee(y,z,x)}):ee(this,null,null)}function ee(y,z,x){if(z)return y.emit("error",z);if(x!=null&&y.push(x),y._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(y._transformState.transforming)throw new Error("Calling transform done when still transforming");return y.push(null)}Ee.exports=re;var te=ie("./_stream_duplex"),E=ie("core-util-is");E.inherits=ie("inherits"),E.inherits(re,te),re.prototype.push=function(y,z){return this._transformState.needTransform=!1,te.prototype.push.call(this,y,z)},re.prototype._transform=function(y,z,x){throw new Error("_transform() is not implemented")},re.prototype._write=function(y,z,x){var ne=this._transformState;if(ne.writecb=x,ne.writechunk=y,ne.writeencoding=z,!ne.transforming){var ae=this._readableState;(ne.needTransform||ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}},re.prototype._read=function(y){var z=this._transformState;z.writechunk!==null&&z.writecb&&!z.transforming?(z.transforming=!0,this._transform(z.writechunk,z.writeencoding,z.afterTransform)):z.needTransform=!0},re.prototype._destroy=function(y,z){var x=this;te.prototype._destroy.call(this,y,function(ne){z(ne),x.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(ie,Ee,ce){(function(se,re){"use strict";function ue(lt){return lt&&lt.__esModule?lt:{default:lt}}function ee(lt){var _t=this;this.next=null,this.entry=null,this.finish=function(){qe(_t,lt)}}function te(lt){return Pt.from(lt)}function E(lt){return Pt.isBuffer(lt)||lt instanceof gt}function y(){}function z(lt,_t){Je=Je||ie("./_stream_duplex"),lt=lt||{};var dt=_t instanceof Je;this.objectMode=!!lt.objectMode,dt&&(this.objectMode=this.objectMode||!!lt.writableObjectMode);var nt=lt.highWaterMark,et=lt.writableHighWaterMark,ft=this.objectMode?16:16384;this.highWaterMark=nt||nt===0?nt:dt&&(et||et===0)?et:ft,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var wt=lt.decodeStrings===!1;this.decodeStrings=!wt,this.defaultEncoding=lt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Tt){xe(_t,Tt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ee(this)}function x(lt){if(Je=Je||ie("./_stream_duplex"),!(St.call(x,this)||this instanceof Je))return new x(lt);this._writableState=new z(lt,this),this.writable=!0,lt&&(typeof lt.write=="function"&&(this._write=lt.write),typeof lt.writev=="function"&&(this._writev=lt.writev),typeof lt.destroy=="function"&&(this._destroy=lt.destroy),typeof lt.final=="function"&&(this._final=lt.final)),ht.call(this)}function ne(lt,_t){var dt=new Error("write after end");lt.emit("error",dt),Ze.nextTick(_t,dt)}function ae(lt,_t,dt,nt){var et=!0,ft=!1;return dt===null?ft=new TypeError("May not write null values to stream"):typeof dt=="string"||dt===void 0||_t.objectMode||(ft=new TypeError("Invalid non-string/buffer chunk")),ft&&(lt.emit("error",ft),Ze.nextTick(nt,ft),et=!1),et}function oe(lt,_t,dt){return lt.objectMode||lt.decodeStrings===!1||typeof _t!="string"||(_t=Pt.from(_t,dt)),_t}function ge(lt,_t,dt,nt,et,ft){if(!dt){var wt=oe(_t,nt,et);nt!==wt&&(dt=!0,et="buffer",nt=wt)}var Tt=_t.objectMode?1:nt.length;_t.length+=Tt;var Re=_t.length<_t.highWaterMark;if(Re||(_t.needDrain=!0),_t.writing||_t.corked){var Le=_t.lastBufferedRequest;_t.lastBufferedRequest={chunk:nt,encoding:et,isBuf:dt,callback:ft,next:null},Le?Le.next=_t.lastBufferedRequest:_t.bufferedRequest=_t.lastBufferedRequest,_t.bufferedRequestCount+=1}else Se(lt,_t,!1,Tt,nt,et,ft);return Re}function Se(lt,_t,dt,nt,et,ft,wt){_t.writelen=nt,_t.writecb=wt,_t.writing=!0,_t.sync=!0,dt?lt._writev(et,_t.onwrite):lt._write(et,ft,_t.onwrite),_t.sync=!1}function ve(lt,_t,dt,nt,et){--_t.pendingcb,dt?(Ze.nextTick(et,nt),Ze.nextTick(Fe,lt,_t),lt._writableState.errorEmitted=!0,lt.emit("error",nt)):(et(nt),lt._writableState.errorEmitted=!0,lt.emit("error",nt),Fe(lt,_t))}function be(lt){lt.writing=!1,lt.writecb=null,lt.length-=lt.writelen,lt.writelen=0}function xe(lt,_t){var dt=lt._writableState,nt=dt.sync,et=dt.writecb;if(be(dt),_t)ve(lt,dt,nt,_t,et);else{var ft=De(dt);ft||dt.corked||dt.bufferProcessing||!dt.bufferedRequest||Ae(lt,dt),nt?$e(pe,lt,dt,ft,et):pe(lt,dt,ft,et)}}function pe(lt,_t,dt,nt){dt||me(lt,_t),_t.pendingcb--,nt(),Fe(lt,_t)}function me(lt,_t){_t.length===0&&_t.needDrain&&(_t.needDrain=!1,lt.emit("drain"))}function Ae(lt,_t){_t.bufferProcessing=!0;var dt=_t.bufferedRequest;if(lt._writev&&dt&&dt.next){var nt=_t.bufferedRequestCount,et=new Array(nt),ft=_t.corkedRequestsFree;ft.entry=dt;for(var wt=0,Tt=!0;dt;)et[wt]=dt,dt.isBuf||(Tt=!1),dt=dt.next,wt+=1;et.allBuffers=Tt,Se(lt,_t,!0,_t.length,et,"",ft.finish),_t.pendingcb++,_t.lastBufferedRequest=null,ft.next?(_t.corkedRequestsFree=ft.next,ft.next=null):_t.corkedRequestsFree=new ee(_t),_t.bufferedRequestCount=0}else{for(;dt;){var Re=dt.chunk,Le=dt.encoding,Te=dt.callback;if(Se(lt,_t,!1,_t.objectMode?1:Re.length,Re,Le,Te),dt=dt.next,_t.bufferedRequestCount--,_t.writing)break}dt===null&&(_t.lastBufferedRequest=null)}_t.bufferedRequest=dt,_t.bufferProcessing=!1}function De(lt){return lt.ending&&lt.length===0&&lt.bufferedRequest===null&&!lt.finished&&!lt.writing}function ke(lt,_t){lt._final(function(dt){_t.pendingcb--,dt&&lt.emit("error",dt),_t.prefinished=!0,lt.emit("prefinish"),Fe(lt,_t)})}function Ie(lt,_t){_t.prefinished||_t.finalCalled||(typeof lt._final=="function"?(_t.pendingcb++,_t.finalCalled=!0,Ze.nextTick(ke,lt,_t)):(_t.prefinished=!0,lt.emit("prefinish")))}function Fe(lt,_t){var dt=De(_t);return dt&&(Ie(lt,_t),_t.pendingcb===0&&(_t.finished=!0,lt.emit("finish"))),dt}function Pe(lt,_t,dt){_t.ending=!0,Fe(lt,_t),dt&&(_t.finished?Ze.nextTick(dt):lt.once("finish",dt)),_t.ended=!0,lt.writable=!1}function qe(lt,_t,dt){var nt=lt.entry;for(lt.entry=null;nt;){var et=nt.callback;_t.pendingcb--,et(dt),nt=nt.next}_t.corkedRequestsFree?_t.corkedRequestsFree.next=lt:_t.corkedRequestsFree=lt}var Ke=ie("babel-runtime/core-js/object/define-property"),ot=ue(Ke),He=ie("babel-runtime/core-js/symbol/has-instance"),rt=ue(He),Ge=ie("babel-runtime/core-js/symbol"),ct=ue(Ge),We=ie("babel-runtime/core-js/set-immediate"),Ue=ue(We),Ze=ie("process-nextick-args");Ee.exports=x;var Je,$e=!se.browser&&["v0.10","v0.9."].indexOf(se.version.slice(0,5))>-1?Ue.default:Ze.nextTick;x.WritableState=z;var Qe=ie("core-util-is");Qe.inherits=ie("inherits");var pt={deprecate:ie("util-deprecate")},ht=ie("./internal/streams/stream"),Pt=ie("safe-buffer").Buffer,gt=re.Uint8Array||function(){},bt=ie("./internal/streams/destroy");Qe.inherits(x,ht),z.prototype.getBuffer=function(){for(var lt=this.bufferedRequest,_t=[];lt;)_t.push(lt),lt=lt.next;return _t},function(){try{Object.defineProperty(z.prototype,"buffer",{get:pt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(lt){}}();var St;typeof ct.default=="function"&&rt.default&&typeof Function.prototype[rt.default]=="function"?(St=Function.prototype[rt.default],(0,ot.default)(x,rt.default,{value:function(lt){return!!St.call(this,lt)||this===x&&lt&&lt._writableState instanceof z}})):St=function(lt){return lt instanceof this},x.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},x.prototype.write=function(lt,_t,dt){var nt=this._writableState,et=!1,ft=!nt.objectMode&&E(lt);return ft&&!Pt.isBuffer(lt)&&(lt=te(lt)),typeof _t=="function"&&(dt=_t,_t=null),ft?_t="buffer":_t||(_t=nt.defaultEncoding),typeof dt!="function"&&(dt=y),nt.ended?ne(this,dt):(ft||ae(this,nt,lt,dt))&&(nt.pendingcb++,et=ge(this,nt,ft,lt,_t,dt)),et},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var lt=this._writableState;lt.corked&&(lt.corked--,lt.writing||lt.corked||lt.finished||lt.bufferProcessing||!lt.bufferedRequest||Ae(this,lt))},x.prototype.setDefaultEncoding=function(lt){if(typeof lt=="string"&&(lt=lt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((lt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+lt);return this._writableState.defaultEncoding=lt,this},Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(lt,_t,dt){dt(new Error("_write() is not implemented"))},x.prototype._writev=null,x.prototype.end=function(lt,_t,dt){var nt=this._writableState;typeof lt=="function"?(dt=lt,lt=null,_t=null):typeof _t=="function"&&(dt=_t,_t=null),lt!=null&&this.write(lt,_t),nt.corked&&(nt.corked=1,this.uncork()),nt.ending||nt.finished||Pe(this,nt,dt)},Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(lt){this._writableState&&(this._writableState.destroyed=lt)}}),x.prototype.destroy=bt.destroy,x.prototype._undestroy=bt.undestroy,x.prototype._destroy=function(lt,_t){this.end(),_t(lt)}}).call(this,ie("_process"),typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(ie,Ee,ce){"use strict";function se(te,E){if(!(te instanceof E))throw new TypeError("Cannot call a class as a function")}function re(te,E,y){te.copy(E,y)}var ue=ie("safe-buffer").Buffer,ee=ie("util");Ee.exports=function(){function te(){se(this,te),this.head=null,this.tail=null,this.length=0}return te.prototype.push=function(E){var y={data:E,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length},te.prototype.unshift=function(E){var y={data:E,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length},te.prototype.shift=function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}},te.prototype.clear=function(){this.head=this.tail=null,this.length=0},te.prototype.join=function(E){if(this.length===0)return"";for(var y=this.head,z=""+y.data;y=y.next;)z+=E+y.data;return z},te.prototype.concat=function(E){if(this.length===0)return ue.alloc(0);if(this.length===1)return this.head.data;for(var y=ue.allocUnsafe(E>>>0),z=this.head,x=0;z;)re(z.data,y,x),x+=z.data.length,z=z.next;return y},te}(),ee&&ee.inspect&&ee.inspect.custom&&(Ee.exports.prototype[ee.inspect.custom]=function(){var te=ee.inspect({length:this.length});return this.constructor.name+" "+te})},{"safe-buffer":193,util:36}],185:[function(ie,Ee,ce){"use strict";function se(te,E){var y=this,z=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;return z||x?(E?E(te):!te||this._writableState&&this._writableState.errorEmitted||ee.nextTick(ue,this,te),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(te||null,function(ne){!E&&ne?(ee.nextTick(ue,y,ne),y._writableState&&(y._writableState.errorEmitted=!0)):E&&E(ne)}),this)}function re(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ue(te,E){te.emit("error",E)}var ee=ie("process-nextick-args");Ee.exports={destroy:se,undestroy:re}},{"process-nextick-args":172}],186:[function(ie,Ee,ce){"use strict";Ee.exports=ie("events").EventEmitter},{events:158}],187:[function(ie,Ee,ce){Ee.exports=ie("./readable").PassThrough},{"./readable":188}],188:[function(ie,Ee,ce){ce=Ee.exports=ie("./lib/_stream_readable.js"),ce.Stream=ce,ce.Readable=ce,ce.Writable=ie("./lib/_stream_writable.js"),ce.Duplex=ie("./lib/_stream_duplex.js"),ce.Transform=ie("./lib/_stream_transform.js"),ce.PassThrough=ie("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(ie,Ee,ce){Ee.exports=ie("./readable").Transform},{"./readable":188}],190:[function(ie,Ee,ce){Ee.exports=ie("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(ie,Ee,ce){var se=function(){return this}()||Function("return this")(),re=se.regeneratorRuntime&&Object.getOwnPropertyNames(se).indexOf("regeneratorRuntime")>=0,ue=re&&se.regeneratorRuntime;if(se.regeneratorRuntime=void 0,Ee.exports=ie("./runtime"),re)se.regeneratorRuntime=ue;else try{delete se.regeneratorRuntime}catch(ee){se.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(ie,Ee,ce){(function(se){"use strict";function re(Ue,Ze,Je,$e){var Qe=Ze&&Ze.prototype instanceof ee?Ze:ee,pt=Object.create(Qe.prototype),ht=new ge($e||[]);return pt._invoke=x(Ue,Je,ht),pt}function ue(Ue,Ze,Je){try{return{type:"normal",arg:Ue.call(Ze,Je)}}catch($e){return{type:"throw",arg:$e}}}function ee(){}function te(){}function E(){}function y(Ue){["next","throw","return"].forEach(function(Ze){Ue[Ze]=function(Je){return this._invoke(Ze,Je)}})}function z(Ue){function Ze(Qe,pt,ht,Pt){var gt=ue(Ue[Qe],Ue,pt);if(gt.type!=="throw"){var bt=gt.arg,St=bt.value;return St&&typeof St=="object"&&pe.call(St,"__await")?Promise.resolve(St.__await).then(function(lt){Ze("next",lt,ht,Pt)},function(lt){Ze("throw",lt,ht,Pt)}):Promise.resolve(St).then(function(lt){bt.value=lt,ht(bt)},Pt)}Pt(gt.arg)}function Je(Qe,pt){function ht(){return new Promise(function(Pt,gt){Ze(Qe,pt,Pt,gt)})}return $e=$e?$e.then(ht,ht):ht()}var $e;this._invoke=Je}function x(Ue,Ze,Je){var $e=Pe;return function(Qe,pt){if($e===Ke)throw new Error("Generator is already running");if($e===ot){if(Qe==="throw")throw pt;return ve()}for(Je.method=Qe,Je.arg=pt;;){var ht=Je.delegate;if(ht){var Pt=ne(ht,Je);if(Pt){if(Pt===He)continue;return Pt}}if(Je.method==="next")Je.sent=Je._sent=Je.arg;else if(Je.method==="throw"){if($e===Pe)throw $e=ot,Je.arg;Je.dispatchException(Je.arg)}else Je.method==="return"&&Je.abrupt("return",Je.arg);$e=Ke;var gt=ue(Ue,Ze,Je);if(gt.type==="normal"){if($e=Je.done?ot:qe,gt.arg===He)continue;return{value:gt.arg,done:Je.done}}gt.type==="throw"&&($e=ot,Je.method="throw",Je.arg=gt.arg)}}}function ne(Ue,Ze){var Je=Ue.iterator[Ze.method];if(Je===be){if(Ze.delegate=null,Ze.method==="throw"){if(Ue.iterator.return&&(Ze.method="return",Ze.arg=be,ne(Ue,Ze),Ze.method==="throw"))return He;Ze.method="throw",Ze.arg=new TypeError("The iterator does not provide a 'throw' method")}return He}var $e=ue(Je,Ue.iterator,Ze.arg);if($e.type==="throw")return Ze.method="throw",Ze.arg=$e.arg,Ze.delegate=null,He;var Qe=$e.arg;return Qe?Qe.done?(Ze[Ue.resultName]=Qe.value,Ze.next=Ue.nextLoc,Ze.method!=="return"&&(Ze.method="next",Ze.arg=be),Ze.delegate=null,He):Qe:(Ze.method="throw",Ze.arg=new TypeError("iterator result is not an object"),Ze.delegate=null,He)}function ae(Ue){var Ze={tryLoc:Ue[0]};1 in Ue&&(Ze.catchLoc=Ue[1]),2 in Ue&&(Ze.finallyLoc=Ue[2],Ze.afterLoc=Ue[3]),this.tryEntries.push(Ze)}function oe(Ue){var Ze=Ue.completion||{};Ze.type="normal",delete Ze.arg,Ue.completion=Ze}function ge(Ue){this.tryEntries=[{tryLoc:"root"}],Ue.forEach(ae,this),this.reset(!0)}function Se(Ue){if(Ue){var Ze=Ue[Ae];if(Ze)return Ze.call(Ue);if(typeof Ue.next=="function")return Ue;if(!isNaN(Ue.length)){var Je=-1,$e=function Qe(){for(;++Je<Ue.length;)if(pe.call(Ue,Je))return Qe.value=Ue[Je],Qe.done=!1,Qe;return Qe.value=be,Qe.done=!0,Qe};return $e.next=$e}}return{next:ve}}function ve(){return{value:be,done:!0}}var be,xe=Object.prototype,pe=xe.hasOwnProperty,me=typeof Symbol=="function"?Symbol:{},Ae=me.iterator||"@@iterator",De=me.asyncIterator||"@@asyncIterator",ke=me.toStringTag||"@@toStringTag",Ie=typeof Ee=="object",Fe=se.regeneratorRuntime;if(Fe)return void(Ie&&(Ee.exports=Fe));Fe=se.regeneratorRuntime=Ie?Ee.exports:{},Fe.wrap=re;var Pe="suspendedStart",qe="suspendedYield",Ke="executing",ot="completed",He={},rt={};rt[Ae]=function(){return this};var Ge=Object.getPrototypeOf,ct=Ge&&Ge(Ge(Se([])));ct&&ct!==xe&&pe.call(ct,Ae)&&(rt=ct);var We=E.prototype=ee.prototype=Object.create(rt);te.prototype=We.constructor=E,E.constructor=te,E[ke]=te.displayName="GeneratorFunction",Fe.isGeneratorFunction=function(Ue){var Ze=typeof Ue=="function"&&Ue.constructor;return!!Ze&&(Ze===te||(Ze.displayName||Ze.name)==="GeneratorFunction")},Fe.mark=function(Ue){return Object.setPrototypeOf?Object.setPrototypeOf(Ue,E):(Ue.__proto__=E,ke in Ue||(Ue[ke]="GeneratorFunction")),Ue.prototype=Object.create(We),Ue},Fe.awrap=function(Ue){return{__await:Ue}},y(z.prototype),z.prototype[De]=function(){return this},Fe.AsyncIterator=z,Fe.async=function(Ue,Ze,Je,$e){var Qe=new z(re(Ue,Ze,Je,$e));return Fe.isGeneratorFunction(Ze)?Qe:Qe.next().then(function(pt){return pt.done?pt.value:Qe.next()})},y(We),We[ke]="Generator",We[Ae]=function(){return this},We.toString=function(){return"[object Generator]"},Fe.keys=function(Ue){var Ze=[];for(var Je in Ue)Ze.push(Je);return Ze.reverse(),function $e(){for(;Ze.length;){var Qe=Ze.pop();if(Qe in Ue)return $e.value=Qe,$e.done=!1,$e}return $e.done=!0,$e}},Fe.values=Se,ge.prototype={constructor:ge,reset:function(Ue){if(this.prev=0,this.next=0,this.sent=this._sent=be,this.done=!1,this.delegate=null,this.method="next",this.arg=be,this.tryEntries.forEach(oe),!Ue)for(var Ze in this)Ze.charAt(0)==="t"&&pe.call(this,Ze)&&!isNaN(+Ze.slice(1))&&(this[Ze]=be)},stop:function(){this.done=!0;var Ue=this.tryEntries[0],Ze=Ue.completion;if(Ze.type==="throw")throw Ze.arg;return this.rval},dispatchException:function(Ue){function Ze(gt,bt){return pt.type="throw",pt.arg=Ue,Je.next=gt,bt&&(Je.method="next",Je.arg=be),!!bt}if(this.done)throw Ue;for(var Je=this,$e=this.tryEntries.length-1;$e>=0;--$e){var Qe=this.tryEntries[$e],pt=Qe.completion;if(Qe.tryLoc==="root")return Ze("end");if(Qe.tryLoc<=this.prev){var ht=pe.call(Qe,"catchLoc"),Pt=pe.call(Qe,"finallyLoc");if(ht&&Pt){if(this.prev<Qe.catchLoc)return Ze(Qe.catchLoc,!0);if(this.prev<Qe.finallyLoc)return Ze(Qe.finallyLoc)}else if(ht){if(this.prev<Qe.catchLoc)return Ze(Qe.catchLoc,!0)}else{if(!Pt)throw new Error("try statement without catch or finally");if(this.prev<Qe.finallyLoc)return Ze(Qe.finallyLoc)}}}},abrupt:function(Ue,Ze){for(var Je=this.tryEntries.length-1;Je>=0;--Je){var $e=this.tryEntries[Je];if($e.tryLoc<=this.prev&&pe.call($e,"finallyLoc")&&this.prev<$e.finallyLoc){var Qe=$e;break}}Qe&&(Ue==="break"||Ue==="continue")&&Qe.tryLoc<=Ze&&Ze<=Qe.finallyLoc&&(Qe=null);var pt=Qe?Qe.completion:{};return pt.type=Ue,pt.arg=Ze,Qe?(this.method="next",this.next=Qe.finallyLoc,He):this.complete(pt)},complete:function(Ue,Ze){if(Ue.type==="throw")throw Ue.arg;return Ue.type==="break"||Ue.type==="continue"?this.next=Ue.arg:Ue.type==="return"?(this.rval=this.arg=Ue.arg,this.method="return",this.next="end"):Ue.type==="normal"&&Ze&&(this.next=Ze),He},finish:function(Ue){for(var Ze=this.tryEntries.length-1;Ze>=0;--Ze){var Je=this.tryEntries[Ze];if(Je.finallyLoc===Ue)return this.complete(Je.completion,Je.afterLoc),oe(Je),He}},catch:function(Ue){for(var Ze=this.tryEntries.length-1;Ze>=0;--Ze){var Je=this.tryEntries[Ze];if(Je.tryLoc===Ue){var $e=Je.completion;if($e.type==="throw"){var Qe=$e.arg;oe(Je)}return Qe}}throw new Error("illegal catch attempt")},delegateYield:function(Ue,Ze,Je){return this.delegate={iterator:Se(Ue),resultName:Ze,nextLoc:Je},this.method==="next"&&(this.arg=be),He}}})(function(){return this}()||Function("return this")())},{}],193:[function(ie,Ee,ce){function se(te,E){for(var y in te)E[y]=te[y]}function re(te,E,y){return ee(te,E,y)}var ue=ie("buffer"),ee=ue.Buffer;ee.from&&ee.alloc&&ee.allocUnsafe&&ee.allocUnsafeSlow?Ee.exports=ue:(se(ue,ce),ce.Buffer=re),se(ee,re),re.from=function(te,E,y){if(typeof te=="number")throw new TypeError("Argument must not be a number");return ee(te,E,y)},re.alloc=function(te,E,y){if(typeof te!="number")throw new TypeError("Argument must be a number");var z=ee(te);return E!==void 0?typeof y=="string"?z.fill(E,y):z.fill(E):z.fill(0),z},re.allocUnsafe=function(te){if(typeof te!="number")throw new TypeError("Argument must be a number");return ee(te)},re.allocUnsafeSlow=function(te){if(typeof te!="number")throw new TypeError("Argument must be a number");return ue.SlowBuffer(te)}},{buffer:38}],194:[function(ie,Ee,ce){(function(se){"use strict";function re(ve){return ve&&ve.__esModule?ve:{default:ve}}var ue=ie("babel-runtime/core-js/string/from-code-point"),ee=re(ue),te=ie("babel-runtime/core-js/json/stringify"),E=re(te),y=ie("babel-runtime/helpers/typeof"),z=re(y),x=ie("babel-runtime/core-js/object/define-property"),ne=re(x),ae=ie("babel-runtime/core-js/object/keys"),oe=re(ae),ge=ie("babel-runtime/core-js/object/create"),Se=re(ge);(function(ve){function be(ye,le){if(!(this instanceof be))return new be(ye,le);var _e=this;pe(_e),_e.q=_e.c="",_e.bufferCheckPosition=ve.MAX_BUFFER_LENGTH,_e.opt=le||{},_e.opt.lowercase=_e.opt.lowercase||_e.opt.lowercasetags,_e.looseCase=_e.opt.lowercase?"toLowerCase":"toUpperCase",_e.tags=[],_e.closed=_e.closedRoot=_e.sawRoot=!1,_e.tag=_e.error=null,_e.strict=!!ye,_e.noscript=!(!ye&&!_e.opt.noscript),_e.state=Te.BEGIN,_e.strictEntities=_e.opt.strictEntities,_e.ENTITIES=_e.strictEntities?(0,Se.default)(ve.XML_ENTITIES):(0,Se.default)(ve.ENTITIES),_e.attribList=[],_e.opt.xmlns&&(_e.ns=(0,Se.default)(ft)),_e.trackPosition=_e.opt.position!==!1,_e.trackPosition&&(_e.position=_e.line=_e.column=0),Ke(_e,"onready")}function xe(ye){for(var le=Math.max(ve.MAX_BUFFER_LENGTH,10),_e=0,Ne=0,Ye=bt.length;Ne<Ye;Ne++){var Oe=ye[bt[Ne]].length;if(Oe>le)switch(bt[Ne]){case"textNode":He(ye);break;case"cdata":ot(ye,"oncdata",ye.cdata),ye.cdata="";break;case"script":ot(ye,"onscript",ye.script),ye.script="";break;default:Ge(ye,"Max buffer length exceeded: "+bt[Ne])}_e=Math.max(_e,Oe)}var tt=ve.MAX_BUFFER_LENGTH-_e;ye.bufferCheckPosition=tt+ye.position}function pe(ye){for(var le=0,_e=bt.length;le<_e;le++)ye[bt[le]]=""}function me(ye){He(ye),ye.cdata!==""&&(ot(ye,"oncdata",ye.cdata),ye.cdata=""),ye.script!==""&&(ot(ye,"onscript",ye.script),ye.script="")}function Ae(ye,le){return new De(ye,le)}function De(ye,le){if(!(this instanceof De))return new De(ye,le);St.apply(this),this._parser=new be(ye,le),this.writable=!0,this.readable=!0;var _e=this;this._parser.onend=function(){_e.emit("end")},this._parser.onerror=function(Ne){_e.emit("error",Ne),_e._parser.error=null},this._decoder=null,lt.forEach(function(Ne){(0,ne.default)(_e,"on"+Ne,{get:function(){return _e._parser["on"+Ne]},set:function(Ye){if(!Ye)return _e.removeAllListeners(Ne),_e._parser["on"+Ne]=Ye,Ye;_e.on(Ne,Ye)},enumerable:!0,configurable:!1})})}function ke(ye){return ye===" "||ye===`
`||ye==="\r"||ye===" "}function Ie(ye){return ye==='"'||ye==="'"}function Fe(ye){return ye===">"||ke(ye)}function Pe(ye,le){return ye.test(le)}function qe(ye,le){return!Pe(ye,le)}function Ke(ye,le,_e){ye[le]&&ye[le](_e)}function ot(ye,le,_e){ye.textNode&&He(ye),Ke(ye,le,_e)}function He(ye){ye.textNode=rt(ye.opt,ye.textNode),ye.textNode&&Ke(ye,"ontext",ye.textNode),ye.textNode=""}function rt(ye,le){return ye.trim&&(le=le.trim()),ye.normalize&&(le=le.replace(/\s+/g," ")),le}function Ge(ye,le){return He(ye),ye.trackPosition&&(le+=`
Line: `+ye.line+`
Column: `+ye.column+`
Char: `+ye.c),le=new Error(le),ye.error=le,Ke(ye,"onerror",le),ye}function ct(ye){return ye.sawRoot&&!ye.closedRoot&&We(ye,"Unclosed root tag"),ye.state!==Te.BEGIN&&ye.state!==Te.BEGIN_WHITESPACE&&ye.state!==Te.TEXT&&Ge(ye,"Unexpected end"),He(ye),ye.c="",ye.closed=!0,Ke(ye,"onend"),be.call(ye,ye.strict,ye.opt),ye}function We(ye,le){if((ye===void 0?"undefined":(0,z.default)(ye))!=="object"||!(ye instanceof be))throw new Error("bad call to strictFail");ye.strict&&Ge(ye,le)}function Ue(ye){ye.strict||(ye.tagName=ye.tagName[ye.looseCase]());var le=ye.tags[ye.tags.length-1]||ye,_e=ye.tag={name:ye.tagName,attributes:{}};ye.opt.xmlns&&(_e.ns=le.ns),ye.attribList.length=0,ot(ye,"onopentagstart",_e)}function Ze(ye,le){var _e=ye.indexOf(":"),Ne=_e<0?["",ye]:ye.split(":"),Ye=Ne[0],Oe=Ne[1];return le&&ye==="xmlns"&&(Ye="xmlns",Oe=""),{prefix:Ye,local:Oe}}function Je(ye){if(ye.strict||(ye.attribName=ye.attribName[ye.looseCase]()),ye.attribList.indexOf(ye.attribName)!==-1||ye.tag.attributes.hasOwnProperty(ye.attribName))return void(ye.attribName=ye.attribValue="");if(ye.opt.xmlns){var le=Ze(ye.attribName,!0),_e=le.prefix,Ne=le.local;if(_e==="xmlns")if(Ne==="xml"&&ye.attribValue!==nt)We(ye,"xml: prefix must be bound to "+nt+`
Actual: `+ye.attribValue);else if(Ne==="xmlns"&&ye.attribValue!==et)We(ye,"xmlns: prefix must be bound to "+et+`
Actual: `+ye.attribValue);else{var Ye=ye.tag,Oe=ye.tags[ye.tags.length-1]||ye;Ye.ns===Oe.ns&&(Ye.ns=(0,Se.default)(Oe.ns)),Ye.ns[Ne]=ye.attribValue}ye.attribList.push([ye.attribName,ye.attribValue])}else ye.tag.attributes[ye.attribName]=ye.attribValue,ot(ye,"onattribute",{name:ye.attribName,value:ye.attribValue});ye.attribName=ye.attribValue=""}function $e(ye,le){if(ye.opt.xmlns){var _e=ye.tag,Ne=Ze(ye.tagName);_e.prefix=Ne.prefix,_e.local=Ne.local,_e.uri=_e.ns[Ne.prefix]||"",_e.prefix&&!_e.uri&&(We(ye,"Unbound namespace prefix: "+(0,E.default)(ye.tagName)),_e.uri=Ne.prefix);var Ye=ye.tags[ye.tags.length-1]||ye;_e.ns&&Ye.ns!==_e.ns&&(0,oe.default)(_e.ns).forEach(function(bn){ot(ye,"onopennamespace",{prefix:bn,uri:_e.ns[bn]})});for(var Oe=0,tt=ye.attribList.length;Oe<tt;Oe++){var Ct=ye.attribList[Oe],Nt=Ct[0],Dt=Ct[1],ut=Ze(Nt,!0),Ht=ut.prefix,At=ut.local,Wt=Ht===""?"":_e.ns[Ht]||"",on={name:Nt,value:Dt,prefix:Ht,local:At,uri:Wt};Ht&&Ht!=="xmlns"&&!Wt&&(We(ye,"Unbound namespace prefix: "+(0,E.default)(Ht)),on.uri=Ht),ye.tag.attributes[Nt]=on,ot(ye,"onattribute",on)}ye.attribList.length=0}ye.tag.isSelfClosing=!!le,ye.sawRoot=!0,ye.tags.push(ye.tag),ot(ye,"onopentag",ye.tag),le||(ye.noscript||ye.tagName.toLowerCase()!=="script"?ye.state=Te.TEXT:ye.state=Te.SCRIPT,ye.tag=null,ye.tagName=""),ye.attribName=ye.attribValue="",ye.attribList.length=0}function Qe(ye){if(!ye.tagName)return We(ye,"Weird empty close tag."),ye.textNode+="</>",void(ye.state=Te.TEXT);if(ye.script){if(ye.tagName!=="script")return ye.script+="</"+ye.tagName+">",ye.tagName="",void(ye.state=Te.SCRIPT);ot(ye,"onscript",ye.script),ye.script=""}var le=ye.tags.length,_e=ye.tagName;ye.strict||(_e=_e[ye.looseCase]());for(var Ne=_e;le--&&ye.tags[le].name!==Ne;)We(ye,"Unexpected close tag");if(le<0)return We(ye,"Unmatched closing tag: "+ye.tagName),ye.textNode+="</"+ye.tagName+">",void(ye.state=Te.TEXT);ye.tagName=_e;for(var Ye=ye.tags.length;Ye-- >le;){var Oe=ye.tag=ye.tags.pop();ye.tagName=ye.tag.name,ot(ye,"onclosetag",ye.tagName);var tt={};for(var Ct in Oe.ns)tt[Ct]=Oe.ns[Ct];var Nt=ye.tags[ye.tags.length-1]||ye;ye.opt.xmlns&&Oe.ns!==Nt.ns&&(0,oe.default)(Oe.ns).forEach(function(Dt){var ut=Oe.ns[Dt];ot(ye,"onclosenamespace",{prefix:Dt,uri:ut})})}le===0&&(ye.closedRoot=!0),ye.tagName=ye.attribValue=ye.attribName="",ye.attribList.length=0,ye.state=Te.TEXT}function pt(ye){var le,_e=ye.entity,Ne=_e.toLowerCase(),Ye="";return ye.ENTITIES[_e]?ye.ENTITIES[_e]:ye.ENTITIES[Ne]?ye.ENTITIES[Ne]:(_e=Ne,_e.charAt(0)==="#"&&(_e.charAt(1)==="x"?(_e=_e.slice(2),le=parseInt(_e,16),Ye=le.toString(16)):(_e=_e.slice(1),le=parseInt(_e,10),Ye=le.toString(10))),_e=_e.replace(/^0+/,""),isNaN(le)||Ye.toLowerCase()!==_e?(We(ye,"Invalid character entity"),"&"+ye.entity+";"):(0,ee.default)(le))}function ht(ye,le){le==="<"?(ye.state=Te.OPEN_WAKA,ye.startTagPosition=ye.position):ke(le)||(We(ye,"Non-whitespace before first tag."),ye.textNode=le,ye.state=Te.TEXT)}function Pt(ye,le){var _e="";return le<ye.length&&(_e=ye.charAt(le)),_e}function gt(ye){var le=this;if(this.error)throw this.error;if(le.closed)return Ge(le,"Cannot write after close. Assign an onready handler.");if(ye===null)return ct(le);(ye===void 0?"undefined":(0,z.default)(ye))==="object"&&(ye=ye.toString());for(var _e=0,Ne="";Ne=Pt(ye,_e++),le.c=Ne,!!Ne;)switch(le.trackPosition&&(le.position++,Ne===`
`?(le.line++,le.column=0):le.column++),le.state){case Te.BEGIN:if(le.state=Te.BEGIN_WHITESPACE,Ne==="\uFEFF")continue;ht(le,Ne);continue;case Te.BEGIN_WHITESPACE:ht(le,Ne);continue;case Te.TEXT:if(le.sawRoot&&!le.closedRoot){for(var Ye=_e-1;Ne&&Ne!=="<"&&Ne!=="&";)(Ne=Pt(ye,_e++))&&le.trackPosition&&(le.position++,Ne===`
`?(le.line++,le.column=0):le.column++);le.textNode+=ye.substring(Ye,_e-1)}Ne!=="<"||le.sawRoot&&le.closedRoot&&!le.strict?(ke(Ne)||le.sawRoot&&!le.closedRoot||We(le,"Text data outside of root node."),Ne==="&"?le.state=Te.TEXT_ENTITY:le.textNode+=Ne):(le.state=Te.OPEN_WAKA,le.startTagPosition=le.position);continue;case Te.SCRIPT:Ne==="<"?le.state=Te.SCRIPT_ENDING:le.script+=Ne;continue;case Te.SCRIPT_ENDING:Ne==="/"?le.state=Te.CLOSE_TAG:(le.script+="<"+Ne,le.state=Te.SCRIPT);continue;case Te.OPEN_WAKA:if(Ne==="!")le.state=Te.SGML_DECL,le.sgmlDecl="";else if(!ke(Ne))if(Pe(wt,Ne))le.state=Te.OPEN_TAG,le.tagName=Ne;else if(Ne==="/")le.state=Te.CLOSE_TAG,le.tagName="";else if(Ne==="?")le.state=Te.PROC_INST,le.procInstName=le.procInstBody="";else{if(We(le,"Unencoded <"),le.startTagPosition+1<le.position){var Oe=le.position-le.startTagPosition;Ne=new Array(Oe).join(" ")+Ne}le.textNode+="<"+Ne,le.state=Te.TEXT}continue;case Te.SGML_DECL:(le.sgmlDecl+Ne).toUpperCase()===_t?(ot(le,"onopencdata"),le.state=Te.CDATA,le.sgmlDecl="",le.cdata=""):le.sgmlDecl+Ne==="--"?(le.state=Te.COMMENT,le.comment="",le.sgmlDecl=""):(le.sgmlDecl+Ne).toUpperCase()===dt?(le.state=Te.DOCTYPE,(le.doctype||le.sawRoot)&&We(le,"Inappropriately located doctype declaration"),le.doctype="",le.sgmlDecl=""):Ne===">"?(ot(le,"onsgmldeclaration",le.sgmlDecl),le.sgmlDecl="",le.state=Te.TEXT):(Ie(Ne)&&(le.state=Te.SGML_DECL_QUOTED),le.sgmlDecl+=Ne);continue;case Te.SGML_DECL_QUOTED:Ne===le.q&&(le.state=Te.SGML_DECL,le.q=""),le.sgmlDecl+=Ne;continue;case Te.DOCTYPE:Ne===">"?(le.state=Te.TEXT,ot(le,"ondoctype",le.doctype),le.doctype=!0):(le.doctype+=Ne,Ne==="["?le.state=Te.DOCTYPE_DTD:Ie(Ne)&&(le.state=Te.DOCTYPE_QUOTED,le.q=Ne));continue;case Te.DOCTYPE_QUOTED:le.doctype+=Ne,Ne===le.q&&(le.q="",le.state=Te.DOCTYPE);continue;case Te.DOCTYPE_DTD:le.doctype+=Ne,Ne==="]"?le.state=Te.DOCTYPE:Ie(Ne)&&(le.state=Te.DOCTYPE_DTD_QUOTED,le.q=Ne);continue;case Te.DOCTYPE_DTD_QUOTED:le.doctype+=Ne,Ne===le.q&&(le.state=Te.DOCTYPE_DTD,le.q="");continue;case Te.COMMENT:Ne==="-"?le.state=Te.COMMENT_ENDING:le.comment+=Ne;continue;case Te.COMMENT_ENDING:Ne==="-"?(le.state=Te.COMMENT_ENDED,le.comment=rt(le.opt,le.comment),le.comment&&ot(le,"oncomment",le.comment),le.comment=""):(le.comment+="-"+Ne,le.state=Te.COMMENT);continue;case Te.COMMENT_ENDED:Ne!==">"?(We(le,"Malformed comment"),le.comment+="--"+Ne,le.state=Te.COMMENT):le.state=Te.TEXT;continue;case Te.CDATA:Ne==="]"?le.state=Te.CDATA_ENDING:le.cdata+=Ne;continue;case Te.CDATA_ENDING:Ne==="]"?le.state=Te.CDATA_ENDING_2:(le.cdata+="]"+Ne,le.state=Te.CDATA);continue;case Te.CDATA_ENDING_2:Ne===">"?(le.cdata&&ot(le,"oncdata",le.cdata),ot(le,"onclosecdata"),le.cdata="",le.state=Te.TEXT):Ne==="]"?le.cdata+="]":(le.cdata+="]]"+Ne,le.state=Te.CDATA);continue;case Te.PROC_INST:Ne==="?"?le.state=Te.PROC_INST_ENDING:ke(Ne)?le.state=Te.PROC_INST_BODY:le.procInstName+=Ne;continue;case Te.PROC_INST_BODY:if(!le.procInstBody&&ke(Ne))continue;Ne==="?"?le.state=Te.PROC_INST_ENDING:le.procInstBody+=Ne;continue;case Te.PROC_INST_ENDING:Ne===">"?(ot(le,"onprocessinginstruction",{name:le.procInstName,body:le.procInstBody}),le.procInstName=le.procInstBody="",le.state=Te.TEXT):(le.procInstBody+="?"+Ne,le.state=Te.PROC_INST_BODY);continue;case Te.OPEN_TAG:Pe(Tt,Ne)?le.tagName+=Ne:(Ue(le),Ne===">"?$e(le):Ne==="/"?le.state=Te.OPEN_TAG_SLASH:(ke(Ne)||We(le,"Invalid character in tag name"),le.state=Te.ATTRIB));continue;case Te.OPEN_TAG_SLASH:Ne===">"?($e(le,!0),Qe(le)):(We(le,"Forward-slash in opening tag not followed by >"),le.state=Te.ATTRIB);continue;case Te.ATTRIB:if(ke(Ne))continue;Ne===">"?$e(le):Ne==="/"?le.state=Te.OPEN_TAG_SLASH:Pe(wt,Ne)?(le.attribName=Ne,le.attribValue="",le.state=Te.ATTRIB_NAME):We(le,"Invalid attribute name");continue;case Te.ATTRIB_NAME:Ne==="="?le.state=Te.ATTRIB_VALUE:Ne===">"?(We(le,"Attribute without value"),le.attribValue=le.attribName,Je(le),$e(le)):ke(Ne)?le.state=Te.ATTRIB_NAME_SAW_WHITE:Pe(Tt,Ne)?le.attribName+=Ne:We(le,"Invalid attribute name");continue;case Te.ATTRIB_NAME_SAW_WHITE:if(Ne==="=")le.state=Te.ATTRIB_VALUE;else{if(ke(Ne))continue;We(le,"Attribute without value"),le.tag.attributes[le.attribName]="",le.attribValue="",ot(le,"onattribute",{name:le.attribName,value:""}),le.attribName="",Ne===">"?$e(le):Pe(wt,Ne)?(le.attribName=Ne,le.state=Te.ATTRIB_NAME):(We(le,"Invalid attribute name"),le.state=Te.ATTRIB)}continue;case Te.ATTRIB_VALUE:if(ke(Ne))continue;Ie(Ne)?(le.q=Ne,le.state=Te.ATTRIB_VALUE_QUOTED):(We(le,"Unquoted attribute value"),le.state=Te.ATTRIB_VALUE_UNQUOTED,le.attribValue=Ne);continue;case Te.ATTRIB_VALUE_QUOTED:if(Ne!==le.q){Ne==="&"?le.state=Te.ATTRIB_VALUE_ENTITY_Q:le.attribValue+=Ne;continue}Je(le),le.q="",le.state=Te.ATTRIB_VALUE_CLOSED;continue;case Te.ATTRIB_VALUE_CLOSED:ke(Ne)?le.state=Te.ATTRIB:Ne===">"?$e(le):Ne==="/"?le.state=Te.OPEN_TAG_SLASH:Pe(wt,Ne)?(We(le,"No whitespace between attributes"),le.attribName=Ne,le.attribValue="",le.state=Te.ATTRIB_NAME):We(le,"Invalid attribute name");continue;case Te.ATTRIB_VALUE_UNQUOTED:if(!Fe(Ne)){Ne==="&"?le.state=Te.ATTRIB_VALUE_ENTITY_U:le.attribValue+=Ne;continue}Je(le),Ne===">"?$e(le):le.state=Te.ATTRIB;continue;case Te.CLOSE_TAG:if(le.tagName)Ne===">"?Qe(le):Pe(Tt,Ne)?le.tagName+=Ne:le.script?(le.script+="</"+le.tagName,le.tagName="",le.state=Te.SCRIPT):(ke(Ne)||We(le,"Invalid tagname in closing tag"),le.state=Te.CLOSE_TAG_SAW_WHITE);else{if(ke(Ne))continue;qe(wt,Ne)?le.script?(le.script+="</"+Ne,le.state=Te.SCRIPT):We(le,"Invalid tagname in closing tag."):le.tagName=Ne}continue;case Te.CLOSE_TAG_SAW_WHITE:if(ke(Ne))continue;Ne===">"?Qe(le):We(le,"Invalid characters in closing tag");continue;case Te.TEXT_ENTITY:case Te.ATTRIB_VALUE_ENTITY_Q:case Te.ATTRIB_VALUE_ENTITY_U:var tt,Ct;switch(le.state){case Te.TEXT_ENTITY:tt=Te.TEXT,Ct="textNode";break;case Te.ATTRIB_VALUE_ENTITY_Q:tt=Te.ATTRIB_VALUE_QUOTED,Ct="attribValue";break;case Te.ATTRIB_VALUE_ENTITY_U:tt=Te.ATTRIB_VALUE_UNQUOTED,Ct="attribValue"}Ne===";"?(le[Ct]+=pt(le),le.entity="",le.state=tt):Pe(le.entity.length?Le:Re,Ne)?le.entity+=Ne:(We(le,"Invalid character in entity name"),le[Ct]+="&"+le.entity+Ne,le.entity="",le.state=tt);continue;default:throw new Error(le,"Unknown state: "+le.state)}return le.position>=le.bufferCheckPosition&&xe(le),le}ve.parser=function(ye,le){return new be(ye,le)},ve.SAXParser=be,ve.SAXStream=De,ve.createStream=Ae,ve.MAX_BUFFER_LENGTH=65536;var bt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ve.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Se.default||(Object.create=function(ye){function le(){}return le.prototype=ye,new le}),oe.default||(Object.keys=function(ye){var le=[];for(var _e in ye)ye.hasOwnProperty(_e)&&le.push(_e);return le}),be.prototype={end:function(){ct(this)},write:gt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){me(this)}};var St;try{St=ie("stream").Stream}catch(ye){St=function(){}}var lt=ve.EVENTS.filter(function(ye){return ye!=="error"&&ye!=="end"});De.prototype=(0,Se.default)(St.prototype,{constructor:{value:De}}),De.prototype.write=function(ye){if(typeof se=="function"&&typeof se.isBuffer=="function"&&se.isBuffer(ye)){if(!this._decoder){var le=ie("string_decoder").StringDecoder;this._decoder=new le("utf8")}ye=this._decoder.write(ye)}return this._parser.write(ye.toString()),this.emit("data",ye),!0},De.prototype.end=function(ye){return ye&&ye.length&&this.write(ye),this._parser.end(),!0},De.prototype.on=function(ye,le){var _e=this;return _e._parser["on"+ye]||lt.indexOf(ye)===-1||(_e._parser["on"+ye]=function(){var Ne=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ne.splice(0,0,ye),_e.emit.apply(_e,Ne)}),St.prototype.on.call(_e,ye,le)};var _t="[CDATA[",dt="DOCTYPE",nt="http://www.w3.org/XML/1998/namespace",et="http://www.w3.org/2000/xmlns/",ft={xml:nt,xmlns:et},wt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Tt=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Re=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Le=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Te=0;ve.STATE={BEGIN:Te++,BEGIN_WHITESPACE:Te++,TEXT:Te++,TEXT_ENTITY:Te++,OPEN_WAKA:Te++,SGML_DECL:Te++,SGML_DECL_QUOTED:Te++,DOCTYPE:Te++,DOCTYPE_QUOTED:Te++,DOCTYPE_DTD:Te++,DOCTYPE_DTD_QUOTED:Te++,COMMENT_STARTING:Te++,COMMENT:Te++,COMMENT_ENDING:Te++,COMMENT_ENDED:Te++,CDATA:Te++,CDATA_ENDING:Te++,CDATA_ENDING_2:Te++,PROC_INST:Te++,PROC_INST_BODY:Te++,PROC_INST_ENDING:Te++,OPEN_TAG:Te++,OPEN_TAG_SLASH:Te++,ATTRIB:Te++,ATTRIB_NAME:Te++,ATTRIB_NAME_SAW_WHITE:Te++,ATTRIB_VALUE:Te++,ATTRIB_VALUE_QUOTED:Te++,ATTRIB_VALUE_CLOSED:Te++,ATTRIB_VALUE_UNQUOTED:Te++,ATTRIB_VALUE_ENTITY_Q:Te++,ATTRIB_VALUE_ENTITY_U:Te++,CLOSE_TAG:Te++,CLOSE_TAG_SAW_WHITE:Te++,SCRIPT:Te++,SCRIPT_ENDING:Te++},ve.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ve.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,oe.default)(ve.ENTITIES).forEach(function(ye){var le=ve.ENTITIES[ye],_e=typeof le=="number"?String.fromCharCode(le):le;ve.ENTITIES[ye]=_e});for(var je in ve.STATE)ve.STATE[ve.STATE[je]]=je;Te=ve.STATE,ee.default||function(){var ye=String.fromCharCode,le=Math.floor,_e=function(){var Ne,Ye,Oe=[],tt=-1,Ct=arguments.length;if(!Ct)return"";for(var Nt="";++tt<Ct;){var Dt=Number(arguments[tt]);if(!isFinite(Dt)||Dt<0||Dt>1114111||le(Dt)!==Dt)throw RangeError("Invalid code point: "+Dt);Dt<=65535?Oe.push(Dt):(Dt-=65536,Ne=55296+(Dt>>10),Ye=Dt%1024+56320,Oe.push(Ne,Ye)),(tt+1===Ct||Oe.length>16384)&&(Nt+=ye.apply(null,Oe),Oe.length=0)}return Nt};ne.default?Object.defineProperty(String,"fromCodePoint",{value:_e,configurable:!0,writable:!0}):String.fromCodePoint=_e}()})(ce===void 0?(void 0).sax={}:ce)}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(ie,Ee,ce){function se(){re.call(this)}Ee.exports=se;var re=ie("events").EventEmitter;ie("inherits")(se,re),se.Readable=ie("readable-stream/readable.js"),se.Writable=ie("readable-stream/writable.js"),se.Duplex=ie("readable-stream/duplex.js"),se.Transform=ie("readable-stream/transform.js"),se.PassThrough=ie("readable-stream/passthrough.js"),se.Stream=se,se.prototype.pipe=function(ue,ee){function te(ge){ue.writable&&ue.write(ge)===!1&&ae.pause&&ae.pause()}function E(){ae.readable&&ae.resume&&ae.resume()}function y(){oe||(oe=!0,ue.end())}function z(){oe||(oe=!0,typeof ue.destroy=="function"&&ue.destroy())}function x(ge){if(ne(),re.listenerCount(this,"error")===0)throw ge}function ne(){ae.removeListener("data",te),ue.removeListener("drain",E),ae.removeListener("end",y),ae.removeListener("close",z),ae.removeListener("error",x),ue.removeListener("error",x),ae.removeListener("end",ne),ae.removeListener("close",ne),ue.removeListener("close",ne)}var ae=this;ae.on("data",te),ue.on("drain",E),ue._isStdio||ee&&ee.end===!1||(ae.on("end",y),ae.on("close",z));var oe=!1;return ae.on("error",x),ue.on("error",x),ae.on("end",ne),ae.on("close",ne),ue.on("close",ne),ue.emit("pipe",ae),ue}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(ie,Ee,ce){(function(se){var re=ie("./lib/request"),ue=ie("./lib/response"),ee=ie("xtend"),te=ie("builtin-status-codes"),E=ie("url"),y=ce;y.request=function(z,x){z=typeof z=="string"?E.parse(z):ee(z);var ne=se.location.protocol.search(/^https?:$/)===-1?"http:":"",ae=z.protocol||ne,oe=z.hostname||z.host,ge=z.port,Se=z.path||"/";oe&&oe.indexOf(":")!==-1&&(oe="["+oe+"]"),z.url=(oe?ae+"//"+oe:"")+(ge?":"+ge:"")+Se,z.method=(z.method||"GET").toUpperCase(),z.headers=z.headers||{};var ve=new re(z);return x&&ve.on("response",x),ve},y.get=function(z,x){var ne=y.request(z,x);return ne.end(),ne},y.ClientRequest=re,y.IncomingMessage=ue.IncomingMessage,y.Agent=function(){},y.Agent.defaultMaxSockets=4,y.globalAgent=new y.Agent,y.STATUS_CODES=te,y.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(ie,Ee,ce){(function(se){"use strict";function re(){if(te!==void 0)return te;if(se.XMLHttpRequest){te=new se.XMLHttpRequest;try{te.open("GET",se.XDomainRequest?"/":"https://example.com")}catch(z){te=null}}else te=null;return te}function ue(z){var x=re();if(!x)return!1;try{return x.responseType=z,x.responseType===z}catch(ne){}return!1}function ee(z){return typeof z=="function"}ce.fetch=ee(se.fetch)&&ee(se.ReadableStream),ce.writableStream=ee(se.WritableStream),ce.abortController=ee(se.AbortController),ce.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ce.blobConstructor=!0}catch(z){}var te,E=se.ArrayBuffer!==void 0,y=E&&ee(se.ArrayBuffer.prototype.slice);ce.arraybuffer=ce.fetch||E&&ue("arraybuffer"),ce.msstream=!ce.fetch&&y&&ue("ms-stream"),ce.mozchunkedarraybuffer=!ce.fetch&&E&&ue("moz-chunked-arraybuffer"),ce.overrideMimeType=ce.fetch||!!re()&&ee(re().overrideMimeType),ce.vbArray=ee(se.VBArray),te=null}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(ie,Ee,ce){(function(se,re,ue){"use strict";function ee(xe,pe){return z.fetch&&pe?"fetch":z.mozchunkedarraybuffer?"moz-chunked-arraybuffer":z.msstream?"ms-stream":z.arraybuffer&&xe?"arraybuffer":z.vbArray&&xe?"text:vbarray":"text"}function te(xe){try{var pe=xe.status;return pe!==null&&pe!==0}catch(me){return!1}}var E=ie("babel-runtime/core-js/object/keys"),y=function(xe){return xe&&xe.__esModule?xe:{default:xe}}(E),z=ie("./capability"),x=ie("inherits"),ne=ie("./response"),ae=ie("readable-stream"),oe=ie("to-arraybuffer"),ge=ne.IncomingMessage,Se=ne.readyStates,ve=Ee.exports=function(xe){var pe=this;ae.Writable.call(pe),pe._opts=xe,pe._body=[],pe._headers={},xe.auth&&pe.setHeader("Authorization","Basic "+new ue(xe.auth).toString("base64")),(0,y.default)(xe.headers).forEach(function(De){pe.setHeader(De,xe.headers[De])});var me,Ae=!0;if(xe.mode==="disable-fetch"||"requestTimeout"in xe&&!z.abortController)Ae=!1,me=!0;else if(xe.mode==="prefer-streaming")me=!1;else if(xe.mode==="allow-wrong-content-type")me=!z.overrideMimeType;else{if(xe.mode&&xe.mode!=="default"&&xe.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");me=!0}pe._mode=ee(me,Ae),pe._fetchTimer=null,pe.on("finish",function(){pe._onFinish()})};x(ve,ae.Writable),ve.prototype.setHeader=function(xe,pe){var me=this,Ae=xe.toLowerCase();be.indexOf(Ae)===-1&&(me._headers[Ae]={name:xe,value:pe})},ve.prototype.getHeader=function(xe){var pe=this._headers[xe.toLowerCase()];return pe?pe.value:null},ve.prototype.removeHeader=function(xe){delete this._headers[xe.toLowerCase()]},ve.prototype._onFinish=function(){var xe=this;if(!xe._destroyed){var pe=xe._opts,me=xe._headers,Ae=null;pe.method!=="GET"&&pe.method!=="HEAD"&&(Ae=z.arraybuffer?oe(ue.concat(xe._body)):z.blobConstructor?new re.Blob(xe._body.map(function(Pe){return oe(Pe)}),{type:(me["content-type"]||{}).value||""}):ue.concat(xe._body).toString());var De=[];if((0,y.default)(me).forEach(function(Pe){var qe=me[Pe].name,Ke=me[Pe].value;Array.isArray(Ke)?Ke.forEach(function(ot){De.push([qe,ot])}):De.push([qe,Ke])}),xe._mode==="fetch"){var ke=null;if(z.abortController){var Ie=new AbortController;ke=Ie.signal,xe._fetchAbortController=Ie,"requestTimeout"in pe&&pe.requestTimeout!==0&&(xe._fetchTimer=re.setTimeout(function(){xe.emit("requestTimeout"),xe._fetchAbortController&&xe._fetchAbortController.abort()},pe.requestTimeout))}re.fetch(xe._opts.url,{method:xe._opts.method,headers:De,body:Ae||void 0,mode:"cors",credentials:pe.withCredentials?"include":"same-origin",signal:ke}).then(function(Pe){xe._fetchResponse=Pe,xe._connect()},function(Pe){re.clearTimeout(xe._fetchTimer),xe._destroyed||xe.emit("error",Pe)})}else{var Fe=xe._xhr=new re.XMLHttpRequest;try{Fe.open(xe._opts.method,xe._opts.url,!0)}catch(Pe){return void se.nextTick(function(){xe.emit("error",Pe)})}"responseType"in Fe&&(Fe.responseType=xe._mode.split(":")[0]),"withCredentials"in Fe&&(Fe.withCredentials=!!pe.withCredentials),xe._mode==="text"&&"overrideMimeType"in Fe&&Fe.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in pe&&(Fe.timeout=pe.requestTimeout,Fe.ontimeout=function(){xe.emit("requestTimeout")}),De.forEach(function(Pe){Fe.setRequestHeader(Pe[0],Pe[1])}),xe._response=null,Fe.onreadystatechange=function(){switch(Fe.readyState){case Se.LOADING:case Se.DONE:xe._onXHRProgress()}},xe._mode==="moz-chunked-arraybuffer"&&(Fe.onprogress=function(){xe._onXHRProgress()}),Fe.onerror=function(){xe._destroyed||xe.emit("error",new Error("XHR error"))};try{Fe.send(Ae)}catch(Pe){return void se.nextTick(function(){xe.emit("error",Pe)})}}}},ve.prototype._onXHRProgress=function(){var xe=this;te(xe._xhr)&&!xe._destroyed&&(xe._response||xe._connect(),xe._response._onXHRProgress())},ve.prototype._connect=function(){var xe=this;xe._destroyed||(xe._response=new ge(xe._xhr,xe._fetchResponse,xe._mode,xe._fetchTimer),xe._response.on("error",function(pe){xe.emit("error",pe)}),xe.emit("response",xe._response))},ve.prototype._write=function(xe,pe,me){this._body.push(xe),me()},ve.prototype.abort=ve.prototype.destroy=function(){var xe=this;xe._destroyed=!0,re.clearTimeout(xe._fetchTimer),xe._response&&(xe._response._destroyed=!0),xe._xhr?xe._xhr.abort():xe._fetchAbortController&&xe._fetchAbortController.abort()},ve.prototype.end=function(xe,pe,me){var Ae=this;typeof xe=="function"&&(me=xe,xe=void 0),ae.Writable.prototype.end.call(Ae,xe,pe,me)},ve.prototype.flushHeaders=function(){},ve.prototype.setTimeout=function(){},ve.prototype.setNoDelay=function(){},ve.prototype.setSocketKeepAlive=function(){};var be=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,ie("_process"),typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(ie,Ee,ce){(function(se,re,ue){"use strict";var ee=ie("babel-runtime/core-js/promise"),te=function(ae){return ae&&ae.__esModule?ae:{default:ae}}(ee),E=ie("./capability"),y=ie("inherits"),z=ie("readable-stream"),x=ce.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},ne=ce.IncomingMessage=function(ae,oe,ge,Se){var ve=this;if(z.Readable.call(ve),ve._mode=ge,ve.headers={},ve.rawHeaders=[],ve.trailers={},ve.rawTrailers=[],ve.on("end",function(){se.nextTick(function(){ve.emit("close")})}),ge==="fetch"){if(ve._fetchResponse=oe,ve.url=oe.url,ve.statusCode=oe.status,ve.statusMessage=oe.statusText,oe.headers.forEach(function(Ae,De){ve.headers[De.toLowerCase()]=Ae,ve.rawHeaders.push(De,Ae)}),E.writableStream){var be=new WritableStream({write:function(Ae){return new te.default(function(De,ke){ve._destroyed?ke():ve.push(new ue(Ae))?De():ve._resumeFetch=De})},close:function(){re.clearTimeout(Se),ve._destroyed||ve.push(null)},abort:function(Ae){ve._destroyed||ve.emit("error",Ae)}});try{return void oe.body.pipeTo(be).catch(function(Ae){re.clearTimeout(Se),ve._destroyed||ve.emit("error",Ae)})}catch(Ae){}}var xe=oe.body.getReader();(function Ae(){xe.read().then(function(De){if(!ve._destroyed){if(De.done)return re.clearTimeout(Se),void ve.push(null);ve.push(new ue(De.value)),Ae()}}).catch(function(De){re.clearTimeout(Se),ve._destroyed||ve.emit("error",De)})})()}else if(ve._xhr=ae,ve._pos=0,ve.url=ae.responseURL,ve.statusCode=ae.status,ve.statusMessage=ae.statusText,ae.getAllResponseHeaders().split(/\r?\n/).forEach(function(Ae){var De=Ae.match(/^([^:]+):\s*(.*)/);if(De){var ke=De[1].toLowerCase();ke==="set-cookie"?(ve.headers[ke]===void 0&&(ve.headers[ke]=[]),ve.headers[ke].push(De[2])):ve.headers[ke]!==void 0?ve.headers[ke]+=", "+De[2]:ve.headers[ke]=De[2],ve.rawHeaders.push(De[1],De[2])}}),ve._charset="x-user-defined",!E.overrideMimeType){var pe=ve.rawHeaders["mime-type"];if(pe){var me=pe.match(/;\s*charset=([^;])(;|$)/);me&&(ve._charset=me[1].toLowerCase())}ve._charset||(ve._charset="utf-8")}};y(ne,z.Readable),ne.prototype._read=function(){var ae=this,oe=ae._resumeFetch;oe&&(ae._resumeFetch=null,oe())},ne.prototype._onXHRProgress=function(){var ae=this,oe=ae._xhr,ge=null;switch(ae._mode){case"text:vbarray":if(oe.readyState!==x.DONE)break;try{ge=new re.VBArray(oe.responseBody).toArray()}catch(pe){}if(ge!==null){ae.push(new ue(ge));break}case"text":try{ge=oe.responseText}catch(pe){ae._mode="text:vbarray";break}if(ge.length>ae._pos){var Se=ge.substr(ae._pos);if(ae._charset==="x-user-defined"){for(var ve=new ue(Se.length),be=0;be<Se.length;be++)ve[be]=255&Se.charCodeAt(be);ae.push(ve)}else ae.push(Se,ae._charset);ae._pos=ge.length}break;case"arraybuffer":if(oe.readyState!==x.DONE||!oe.response)break;ge=oe.response,ae.push(new ue(new Uint8Array(ge)));break;case"moz-chunked-arraybuffer":if(ge=oe.response,oe.readyState!==x.LOADING||!ge)break;ae.push(new ue(new Uint8Array(ge)));break;case"ms-stream":if(ge=oe.response,oe.readyState!==x.LOADING)break;var xe=new re.MSStreamReader;xe.onprogress=function(){xe.result.byteLength>ae._pos&&(ae.push(new ue(new Uint8Array(xe.result.slice(ae._pos)))),ae._pos=xe.result.byteLength)},xe.onload=function(){ae.push(null)},xe.readAsArrayBuffer(ge)}ae._xhr.readyState===x.DONE&&ae._mode!=="ms-stream"&&ae.push(null)}}).call(this,ie("_process"),typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(ie,Ee,ce){"use strict";function se(pe){if(!pe)return"utf8";for(var me;;)switch(pe){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return pe;default:if(me)return;pe=(""+pe).toLowerCase(),me=!0}}function re(pe){var me=se(pe);if(typeof me!="string"&&(be.isEncoding===xe||!xe(pe)))throw new Error("Unknown encoding: "+pe);return me||pe}function ue(pe){this.encoding=re(pe);var me;switch(this.encoding){case"utf16le":this.text=ne,this.end=ae,me=4;break;case"utf8":this.fillLast=y,me=4;break;case"base64":this.text=oe,this.end=ge,me=3;break;default:return this.write=Se,void(this.end=ve)}this.lastNeed=0,this.lastTotal=0,this.lastChar=be.allocUnsafe(me)}function ee(pe){return pe<=127?0:pe>>5==6?2:pe>>4==14?3:pe>>3==30?4:pe>>6==2?-1:-2}function te(pe,me,Ae){var De=me.length-1;if(De<Ae)return 0;var ke=ee(me[De]);return ke>=0?(ke>0&&(pe.lastNeed=ke-1),ke):--De<Ae||ke===-2?0:(ke=ee(me[De]))>=0?(ke>0&&(pe.lastNeed=ke-2),ke):--De<Ae||ke===-2?0:(ke=ee(me[De]),ke>=0?(ke>0&&(ke===2?ke=0:pe.lastNeed=ke-3),ke):0)}function E(pe,me,Ae){if((192&me[0])!=128)return pe.lastNeed=0,"\u951F\uFFFD";if(pe.lastNeed>1&&me.length>1){if((192&me[1])!=128)return pe.lastNeed=1,"\u951F\uFFFD";if(pe.lastNeed>2&&me.length>2&&(192&me[2])!=128)return pe.lastNeed=2,"\u951F\uFFFD"}}function y(pe){var me=this.lastTotal-this.lastNeed,Ae=E(this,pe,me);return Ae!==void 0?Ae:this.lastNeed<=pe.length?(pe.copy(this.lastChar,me,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(pe.copy(this.lastChar,me,0,pe.length),void(this.lastNeed-=pe.length))}function z(pe,me){var Ae=te(this,pe,me);if(!this.lastNeed)return pe.toString("utf8",me);this.lastTotal=Ae;var De=pe.length-(Ae-this.lastNeed);return pe.copy(this.lastChar,0,De),pe.toString("utf8",me,De)}function x(pe){var me=pe&&pe.length?this.write(pe):"";return this.lastNeed?me+"\u951F\uFFFD":me}function ne(pe,me){if((pe.length-me)%2==0){var Ae=pe.toString("utf16le",me);if(Ae){var De=Ae.charCodeAt(Ae.length-1);if(De>=55296&&De<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=pe[pe.length-2],this.lastChar[1]=pe[pe.length-1],Ae.slice(0,-1)}return Ae}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=pe[pe.length-1],pe.toString("utf16le",me,pe.length-1)}function ae(pe){var me=pe&&pe.length?this.write(pe):"";if(this.lastNeed){var Ae=this.lastTotal-this.lastNeed;return me+this.lastChar.toString("utf16le",0,Ae)}return me}function oe(pe,me){var Ae=(pe.length-me)%3;return Ae===0?pe.toString("base64",me):(this.lastNeed=3-Ae,this.lastTotal=3,Ae===1?this.lastChar[0]=pe[pe.length-1]:(this.lastChar[0]=pe[pe.length-2],this.lastChar[1]=pe[pe.length-1]),pe.toString("base64",me,pe.length-Ae))}function ge(pe){var me=pe&&pe.length?this.write(pe):"";return this.lastNeed?me+this.lastChar.toString("base64",0,3-this.lastNeed):me}function Se(pe){return pe.toString(this.encoding)}function ve(pe){return pe&&pe.length?this.write(pe):""}var be=ie("safe-buffer").Buffer,xe=be.isEncoding||function(pe){switch((pe=""+pe)&&pe.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};ce.StringDecoder=ue,ue.prototype.write=function(pe){if(pe.length===0)return"";var me,Ae;if(this.lastNeed){if((me=this.fillLast(pe))===void 0)return"";Ae=this.lastNeed,this.lastNeed=0}else Ae=0;return Ae<pe.length?me?me+this.text(pe,Ae):this.text(pe,Ae):me||""},ue.prototype.end=x,ue.prototype.text=z,ue.prototype.fillLast=function(pe){if(this.lastNeed<=pe.length)return pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);pe.copy(this.lastChar,this.lastTotal-this.lastNeed,0,pe.length),this.lastNeed-=pe.length}},{"safe-buffer":193}],201:[function(ie,Ee,ce){(function(se,re){function ue(x,ne){this._id=x,this._clearFn=ne}var ee=ie("process/browser.js").nextTick,te=Function.prototype.apply,E=Array.prototype.slice,y={},z=0;ce.setTimeout=function(){return new ue(te.call(setTimeout,window,arguments),clearTimeout)},ce.setInterval=function(){return new ue(te.call(setInterval,window,arguments),clearInterval)},ce.clearTimeout=ce.clearInterval=function(x){x.close()},ue.prototype.unref=ue.prototype.ref=function(){},ue.prototype.close=function(){this._clearFn.call(window,this._id)},ce.enroll=function(x,ne){clearTimeout(x._idleTimeoutId),x._idleTimeout=ne},ce.unenroll=function(x){clearTimeout(x._idleTimeoutId),x._idleTimeout=-1},ce._unrefActive=ce.active=function(x){clearTimeout(x._idleTimeoutId);var ne=x._idleTimeout;ne>=0&&(x._idleTimeoutId=setTimeout(function(){x._onTimeout&&x._onTimeout()},ne))},ce.setImmediate=typeof se=="function"?se:function(x){var ne=z++,ae=!(arguments.length<2)&&E.call(arguments,1);return y[ne]=!0,ee(function(){y[ne]&&(ae?x.apply(null,ae):x.call(null),ce.clearImmediate(ne))}),ne},ce.clearImmediate=typeof re=="function"?re:function(x){delete y[x]}}).call(this,ie("timers").setImmediate,ie("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(ie,Ee,ce){var se=ie("buffer").Buffer;Ee.exports=function(re){if(re instanceof Uint8Array){if(re.byteOffset===0&&re.byteLength===re.buffer.byteLength)return re.buffer;if(typeof re.buffer.slice=="function")return re.buffer.slice(re.byteOffset,re.byteOffset+re.byteLength)}if(se.isBuffer(re)){for(var ue=new Uint8Array(re.length),ee=re.length,te=0;te<ee;te++)ue[te]=re[te];return ue.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(ie,Ee,ce){"use strict";function se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function re(ke,Ie,Fe){if(ke&&y.isObject(ke)&&ke instanceof se)return ke;var Pe=new se;return Pe.parse(ke,Ie,Fe),Pe}function ue(ke){return y.isString(ke)&&(ke=re(ke)),ke instanceof se?ke.format():se.prototype.format.call(ke)}function ee(ke,Ie){return re(ke,!1,!0).resolve(Ie)}function te(ke,Ie){return ke?re(ke,!1,!0).resolveObject(Ie):Ie}var E=ie("punycode"),y=ie("./util");ce.parse=re,ce.resolve=ee,ce.resolveObject=te,ce.format=ue,ce.Url=se;var z=/^([a-z0-9.+-]+:)/i,x=/:[0-9]*$/,ne=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ae=["<",">",'"',"`"," ","\r",`
`," "],oe=["{","}","|","\\","^","`"].concat(ae),ge=["'"].concat(oe),Se=["%","/","?",";","#"].concat(ge),ve=["/","?","#"],be=/^[+a-z0-9A-Z_-]{0,63}$/,xe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,pe={javascript:!0,"javascript:":!0},me={javascript:!0,"javascript:":!0},Ae={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},De=ie("querystring");se.prototype.parse=function(ke,Ie,Fe){if(!y.isString(ke))throw new TypeError("Parameter 'url' must be a string, not "+typeof ke);var Pe=ke.indexOf("?"),qe=Pe!==-1&&Pe<ke.indexOf("#")?"?":"#",Ke=ke.split(qe),ot=/\\/g;Ke[0]=Ke[0].replace(ot,"/"),ke=Ke.join(qe);var He=ke;if(He=He.trim(),!Fe&&ke.split("#").length===1){var rt=ne.exec(He);if(rt)return this.path=He,this.href=He,this.pathname=rt[1],rt[2]?(this.search=rt[2],this.query=Ie?De.parse(this.search.substr(1)):this.search.substr(1)):Ie&&(this.search="",this.query={}),this}var Ge=z.exec(He);if(Ge){Ge=Ge[0];var ct=Ge.toLowerCase();this.protocol=ct,He=He.substr(Ge.length)}if(Fe||Ge||He.match(/^\/\/[^@\/]+@[^@\/]+/)){var We=He.substr(0,2)==="//";!We||Ge&&me[Ge]||(He=He.substr(2),this.slashes=!0)}if(!me[Ge]&&(We||Ge&&!Ae[Ge])){for(var Ue=-1,Ze=0;Ze<ve.length;Ze++){var Je=He.indexOf(ve[Ze]);Je!==-1&&(Ue===-1||Je<Ue)&&(Ue=Je)}var $e,Qe;Qe=Ue===-1?He.lastIndexOf("@"):He.lastIndexOf("@",Ue),Qe!==-1&&($e=He.slice(0,Qe),He=He.slice(Qe+1),this.auth=decodeURIComponent($e)),Ue=-1;for(var Ze=0;Ze<Se.length;Ze++){var Je=He.indexOf(Se[Ze]);Je!==-1&&(Ue===-1||Je<Ue)&&(Ue=Je)}Ue===-1&&(Ue=He.length),this.host=He.slice(0,Ue),He=He.slice(Ue),this.parseHost(),this.hostname=this.hostname||"";var pt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pt)for(var ht=this.hostname.split(/\./),Ze=0,Pt=ht.length;Ze<Pt;Ze++){var gt=ht[Ze];if(gt&&!gt.match(be)){for(var bt="",St=0,lt=gt.length;St<lt;St++)gt.charCodeAt(St)>127?bt+="x":bt+=gt[St];if(!bt.match(be)){var _t=ht.slice(0,Ze),dt=ht.slice(Ze+1),nt=gt.match(xe);nt&&(_t.push(nt[1]),dt.unshift(nt[2])),dt.length&&(He="/"+dt.join(".")+He),this.hostname=_t.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),pt||(this.hostname=E.toASCII(this.hostname));var et=this.port?":"+this.port:"",ft=this.hostname||"";this.host=ft+et,this.href+=this.host,pt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),He[0]!=="/"&&(He="/"+He))}if(!pe[ct])for(var Ze=0,Pt=ge.length;Ze<Pt;Ze++){var wt=ge[Ze];if(He.indexOf(wt)!==-1){var Tt=encodeURIComponent(wt);Tt===wt&&(Tt=escape(wt)),He=He.split(wt).join(Tt)}}var Re=He.indexOf("#");Re!==-1&&(this.hash=He.substr(Re),He=He.slice(0,Re));var Le=He.indexOf("?");if(Le!==-1?(this.search=He.substr(Le),this.query=He.substr(Le+1),Ie&&(this.query=De.parse(this.query)),He=He.slice(0,Le)):Ie&&(this.search="",this.query={}),He&&(this.pathname=He),Ae[ct]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var et=this.pathname||"",Te=this.search||"";this.path=et+Te}return this.href=this.format(),this},se.prototype.format=function(){var ke=this.auth||"";ke&&(ke=encodeURIComponent(ke),ke=ke.replace(/%3A/i,":"),ke+="@");var Ie=this.protocol||"",Fe=this.pathname||"",Pe=this.hash||"",qe=!1,Ke="";this.host?qe=ke+this.host:this.hostname&&(qe=ke+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(qe+=":"+this.port)),this.query&&y.isObject(this.query)&&Object.keys(this.query).length&&(Ke=De.stringify(this.query));var ot=this.search||Ke&&"?"+Ke||"";return Ie&&Ie.substr(-1)!==":"&&(Ie+=":"),this.slashes||(!Ie||Ae[Ie])&&qe!==!1?(qe="//"+(qe||""),Fe&&Fe.charAt(0)!=="/"&&(Fe="/"+Fe)):qe||(qe=""),Pe&&Pe.charAt(0)!=="#"&&(Pe="#"+Pe),ot&&ot.charAt(0)!=="?"&&(ot="?"+ot),Fe=Fe.replace(/[?#]/g,function(He){return encodeURIComponent(He)}),ot=ot.replace("#","%23"),Ie+qe+Fe+ot+Pe},se.prototype.resolve=function(ke){return this.resolveObject(re(ke,!1,!0)).format()},se.prototype.resolveObject=function(ke){if(y.isString(ke)){var Ie=new se;Ie.parse(ke,!1,!0),ke=Ie}for(var Fe=new se,Pe=Object.keys(this),qe=0;qe<Pe.length;qe++){var Ke=Pe[qe];Fe[Ke]=this[Ke]}if(Fe.hash=ke.hash,ke.href==="")return Fe.href=Fe.format(),Fe;if(ke.slashes&&!ke.protocol){for(var ot=Object.keys(ke),He=0;He<ot.length;He++){var rt=ot[He];rt!=="protocol"&&(Fe[rt]=ke[rt])}return Ae[Fe.protocol]&&Fe.hostname&&!Fe.pathname&&(Fe.path=Fe.pathname="/"),Fe.href=Fe.format(),Fe}if(ke.protocol&&ke.protocol!==Fe.protocol){if(!Ae[ke.protocol]){for(var Ge=Object.keys(ke),ct=0;ct<Ge.length;ct++){var We=Ge[ct];Fe[We]=ke[We]}return Fe.href=Fe.format(),Fe}if(Fe.protocol=ke.protocol,ke.host||me[ke.protocol])Fe.pathname=ke.pathname;else{for(var Pt=(ke.pathname||"").split("/");Pt.length&&!(ke.host=Pt.shift()););ke.host||(ke.host=""),ke.hostname||(ke.hostname=""),Pt[0]!==""&&Pt.unshift(""),Pt.length<2&&Pt.unshift(""),Fe.pathname=Pt.join("/")}if(Fe.search=ke.search,Fe.query=ke.query,Fe.host=ke.host||"",Fe.auth=ke.auth,Fe.hostname=ke.hostname||ke.host,Fe.port=ke.port,Fe.pathname||Fe.search){var Ue=Fe.pathname||"",Ze=Fe.search||"";Fe.path=Ue+Ze}return Fe.slashes=Fe.slashes||ke.slashes,Fe.href=Fe.format(),Fe}var Je=Fe.pathname&&Fe.pathname.charAt(0)==="/",$e=ke.host||ke.pathname&&ke.pathname.charAt(0)==="/",Qe=$e||Je||Fe.host&&ke.pathname,pt=Qe,ht=Fe.pathname&&Fe.pathname.split("/")||[],Pt=ke.pathname&&ke.pathname.split("/")||[],gt=Fe.protocol&&!Ae[Fe.protocol];if(gt&&(Fe.hostname="",Fe.port=null,Fe.host&&(ht[0]===""?ht[0]=Fe.host:ht.unshift(Fe.host)),Fe.host="",ke.protocol&&(ke.hostname=null,ke.port=null,ke.host&&(Pt[0]===""?Pt[0]=ke.host:Pt.unshift(ke.host)),ke.host=null),Qe=Qe&&(Pt[0]===""||ht[0]==="")),$e)Fe.host=ke.host||ke.host===""?ke.host:Fe.host,Fe.hostname=ke.hostname||ke.hostname===""?ke.hostname:Fe.hostname,Fe.search=ke.search,Fe.query=ke.query,ht=Pt;else if(Pt.length)ht||(ht=[]),ht.pop(),ht=ht.concat(Pt),Fe.search=ke.search,Fe.query=ke.query;else if(!y.isNullOrUndefined(ke.search)){if(gt){Fe.hostname=Fe.host=ht.shift();var bt=!!(Fe.host&&Fe.host.indexOf("@")>0)&&Fe.host.split("@");bt&&(Fe.auth=bt.shift(),Fe.host=Fe.hostname=bt.shift())}return Fe.search=ke.search,Fe.query=ke.query,y.isNull(Fe.pathname)&&y.isNull(Fe.search)||(Fe.path=(Fe.pathname?Fe.pathname:"")+(Fe.search?Fe.search:"")),Fe.href=Fe.format(),Fe}if(!ht.length)return Fe.pathname=null,Fe.search?Fe.path="/"+Fe.search:Fe.path=null,Fe.href=Fe.format(),Fe;for(var St=ht.slice(-1)[0],lt=(Fe.host||ke.host||ht.length>1)&&(St==="."||St==="..")||St==="",_t=0,dt=ht.length;dt>=0;dt--)St=ht[dt],St==="."?ht.splice(dt,1):St===".."?(ht.splice(dt,1),_t++):_t&&(ht.splice(dt,1),_t--);if(!Qe&&!pt)for(;_t--;_t)ht.unshift("..");!Qe||ht[0]===""||ht[0]&&ht[0].charAt(0)==="/"||ht.unshift(""),lt&&ht.join("/").substr(-1)!=="/"&&ht.push("");var nt=ht[0]===""||ht[0]&&ht[0].charAt(0)==="/";if(gt){Fe.hostname=Fe.host=nt?"":ht.length?ht.shift():"";var bt=!!(Fe.host&&Fe.host.indexOf("@")>0)&&Fe.host.split("@");bt&&(Fe.auth=bt.shift(),Fe.host=Fe.hostname=bt.shift())}return Qe=Qe||Fe.host&&ht.length,Qe&&!nt&&ht.unshift(""),ht.length?Fe.pathname=ht.join("/"):(Fe.pathname=null,Fe.path=null),y.isNull(Fe.pathname)&&y.isNull(Fe.search)||(Fe.path=(Fe.pathname?Fe.pathname:"")+(Fe.search?Fe.search:"")),Fe.auth=ke.auth||Fe.auth,Fe.slashes=Fe.slashes||ke.slashes,Fe.href=Fe.format(),Fe},se.prototype.parseHost=function(){var ke=this.host,Ie=x.exec(ke);Ie&&(Ie=Ie[0],Ie!==":"&&(this.port=Ie.substr(1)),ke=ke.substr(0,ke.length-Ie.length)),ke&&(this.hostname=ke)}},{"./util":204,punycode:174,querystring:177}],204:[function(ie,Ee,ce){"use strict";Ee.exports={isString:function(se){return typeof se=="string"},isObject:function(se){return typeof se=="object"&&se!==null},isNull:function(se){return se===null},isNullOrUndefined:function(se){return se==null}}},{}],205:[function(ie,Ee,ce){(function(se){function re(ee,te){function E(){if(!y){if(ue("throwDeprecation"))throw new Error(te);ue("traceDeprecation")?console.trace(te):console.warn(te),y=!0}return ee.apply(this,arguments)}if(ue("noDeprecation"))return ee;var y=!1;return E}function ue(ee){try{if(!se.localStorage)return!1}catch(E){return!1}var te=se.localStorage[ee];return te!=null&&String(te).toLowerCase()==="true"}Ee.exports=re}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(ie,Ee,ce){Ee.exports=function(se){return se&&typeof se=="object"&&typeof se.copy=="function"&&typeof se.fill=="function"&&typeof se.readUInt8=="function"}},{}],207:[function(ie,Ee,ce){(function(se,re){function ue(Ze,Je){var $e={seen:[],stylize:te};return arguments.length>=3&&($e.depth=arguments[2]),arguments.length>=4&&($e.colors=arguments[3]),Se(Je)?$e.showHidden=Je:Je&&ce._extend($e,Je),Ae($e.showHidden)&&($e.showHidden=!1),Ae($e.depth)&&($e.depth=2),Ae($e.colors)&&($e.colors=!1),Ae($e.customInspect)&&($e.customInspect=!0),$e.colors&&($e.stylize=ee),y($e,Ze,$e.depth)}function ee(Ze,Je){var $e=ue.styles[Je];return $e?"\x1B["+ue.colors[$e][0]+"m"+Ze+"\x1B["+ue.colors[$e][1]+"m":Ze}function te(Ze,Je){return Ze}function E(Ze){var Je={};return Ze.forEach(function($e,Qe){Je[$e]=!0}),Je}function y(Ze,Je,$e){if(Ze.customInspect&&Je&&Pe(Je.inspect)&&Je.inspect!==ce.inspect&&(!Je.constructor||Je.constructor.prototype!==Je)){var Qe=Je.inspect($e,Ze);return pe(Qe)||(Qe=y(Ze,Qe,$e)),Qe}var pt=z(Ze,Je);if(pt)return pt;var ht=Object.keys(Je),Pt=E(ht);if(Ze.showHidden&&(ht=Object.getOwnPropertyNames(Je)),Fe(Je)&&(ht.indexOf("message")>=0||ht.indexOf("description")>=0))return x(Je);if(ht.length===0){if(Pe(Je)){var gt=Je.name?": "+Je.name:"";return Ze.stylize("[Function"+gt+"]","special")}if(De(Je))return Ze.stylize(RegExp.prototype.toString.call(Je),"regexp");if(Ie(Je))return Ze.stylize(Date.prototype.toString.call(Je),"date");if(Fe(Je))return x(Je)}var bt="",St=!1,lt=["{","}"];if(ge(Je)&&(St=!0,lt=["[","]"]),Pe(Je)&&(bt=" [Function"+(Je.name?": "+Je.name:"")+"]"),De(Je)&&(bt=" "+RegExp.prototype.toString.call(Je)),Ie(Je)&&(bt=" "+Date.prototype.toUTCString.call(Je)),Fe(Je)&&(bt=" "+x(Je)),ht.length===0&&(!St||Je.length==0))return lt[0]+bt+lt[1];if($e<0)return De(Je)?Ze.stylize(RegExp.prototype.toString.call(Je),"regexp"):Ze.stylize("[Object]","special");Ze.seen.push(Je);var _t;return _t=St?ne(Ze,Je,$e,Pt,ht):ht.map(function(dt){return ae(Ze,Je,$e,Pt,dt,St)}),Ze.seen.pop(),oe(_t,bt,lt)}function z(Ze,Je){if(Ae(Je))return Ze.stylize("undefined","undefined");if(pe(Je)){var $e="'"+JSON.stringify(Je).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Ze.stylize($e,"string")}return xe(Je)?Ze.stylize(""+Je,"number"):Se(Je)?Ze.stylize(""+Je,"boolean"):ve(Je)?Ze.stylize("null","null"):void 0}function x(Ze){return"["+Error.prototype.toString.call(Ze)+"]"}function ne(Ze,Je,$e,Qe,pt){for(var ht=[],Pt=0,gt=Je.length;Pt<gt;++Pt)rt(Je,String(Pt))?ht.push(ae(Ze,Je,$e,Qe,String(Pt),!0)):ht.push("");return pt.forEach(function(bt){bt.match(/^\d+$/)||ht.push(ae(Ze,Je,$e,Qe,bt,!0))}),ht}function ae(Ze,Je,$e,Qe,pt,ht){var Pt,gt,bt;if(bt=Object.getOwnPropertyDescriptor(Je,pt)||{value:Je[pt]},bt.get?gt=bt.set?Ze.stylize("[Getter/Setter]","special"):Ze.stylize("[Getter]","special"):bt.set&&(gt=Ze.stylize("[Setter]","special")),rt(Qe,pt)||(Pt="["+pt+"]"),gt||(Ze.seen.indexOf(bt.value)<0?(gt=ve($e)?y(Ze,bt.value,null):y(Ze,bt.value,$e-1),gt.indexOf(`
`)>-1&&(gt=ht?gt.split(`
`).map(function(St){return" "+St}).join(`
`).substr(2):`
`+gt.split(`
`).map(function(St){return" "+St}).join(`
`))):gt=Ze.stylize("[Circular]","special")),Ae(Pt)){if(ht&&pt.match(/^\d+$/))return gt;Pt=JSON.stringify(""+pt),Pt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Pt=Pt.substr(1,Pt.length-2),Pt=Ze.stylize(Pt,"name")):(Pt=Pt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Pt=Ze.stylize(Pt,"string"))}return Pt+": "+gt}function oe(Ze,Je,$e){var Qe=0;return Ze.reduce(function(pt,ht){return Qe++,ht.indexOf(`
`)>=0&&Qe++,pt+ht.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?$e[0]+(Je===""?"":Je+`
`)+" "+Ze.join(`,
`)+" "+$e[1]:$e[0]+Je+" "+Ze.join(", ")+" "+$e[1]}function ge(Ze){return Array.isArray(Ze)}function Se(Ze){return typeof Ze=="boolean"}function ve(Ze){return Ze===null}function be(Ze){return Ze==null}function xe(Ze){return typeof Ze=="number"}function pe(Ze){return typeof Ze=="string"}function me(Ze){return typeof Ze=="symbol"}function Ae(Ze){return Ze===void 0}function De(Ze){return ke(Ze)&&Ke(Ze)==="[object RegExp]"}function ke(Ze){return typeof Ze=="object"&&Ze!==null}function Ie(Ze){return ke(Ze)&&Ke(Ze)==="[object Date]"}function Fe(Ze){return ke(Ze)&&(Ke(Ze)==="[object Error]"||Ze instanceof Error)}function Pe(Ze){return typeof Ze=="function"}function qe(Ze){return Ze===null||typeof Ze=="boolean"||typeof Ze=="number"||typeof Ze=="string"||typeof Ze=="symbol"||Ze===void 0}function Ke(Ze){return Object.prototype.toString.call(Ze)}function ot(Ze){return Ze<10?"0"+Ze.toString(10):Ze.toString(10)}function He(){var Ze=new Date,Je=[ot(Ze.getHours()),ot(Ze.getMinutes()),ot(Ze.getSeconds())].join(":");return[Ze.getDate(),Ue[Ze.getMonth()],Je].join(" ")}function rt(Ze,Je){return Object.prototype.hasOwnProperty.call(Ze,Je)}var Ge=/%[sdj%]/g;ce.format=function(Ze){if(!pe(Ze)){for(var Je=[],$e=0;$e<arguments.length;$e++)Je.push(ue(arguments[$e]));return Je.join(" ")}for(var $e=1,Qe=arguments,pt=Qe.length,ht=String(Ze).replace(Ge,function(bt){if(bt==="%%")return"%";if($e>=pt)return bt;switch(bt){case"%s":return String(Qe[$e++]);case"%d":return Number(Qe[$e++]);case"%j":try{return JSON.stringify(Qe[$e++])}catch(St){return"[Circular]"}default:return bt}}),Pt=Qe[$e];$e<pt;Pt=Qe[++$e])ve(Pt)||!ke(Pt)?ht+=" "+Pt:ht+=" "+ue(Pt);return ht},ce.deprecate=function(Ze,Je){function $e(){if(!Qe){if(se.throwDeprecation)throw new Error(Je);se.traceDeprecation?console.trace(Je):console.error(Je),Qe=!0}return Ze.apply(this,arguments)}if(Ae(re.process))return function(){return ce.deprecate(Ze,Je).apply(this,arguments)};if(se.noDeprecation===!0)return Ze;var Qe=!1;return $e};var ct,We={};ce.debuglog=function(Ze){if(Ae(ct)&&(ct=se.env.NODE_DEBUG||""),Ze=Ze.toUpperCase(),!We[Ze])if(new RegExp("\\b"+Ze+"\\b","i").test(ct)){var Je=se.pid;We[Ze]=function(){var $e=ce.format.apply(ce,arguments);console.error("%s %d: %s",Ze,Je,$e)}}else We[Ze]=function(){};return We[Ze]},ce.inspect=ue,ue.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ue.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ce.isArray=ge,ce.isBoolean=Se,ce.isNull=ve,ce.isNullOrUndefined=be,ce.isNumber=xe,ce.isString=pe,ce.isSymbol=me,ce.isUndefined=Ae,ce.isRegExp=De,ce.isObject=ke,ce.isDate=Ie,ce.isError=Fe,ce.isFunction=Pe,ce.isPrimitive=qe,ce.isBuffer=ie("./support/isBuffer");var Ue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ce.log=function(){console.log("%s - %s",He(),ce.format.apply(ce,arguments))},ce.inherits=ie("inherits"),ce._extend=function(Ze,Je){if(!Je||!ke(Je))return Ze;for(var $e=Object.keys(Je),Qe=$e.length;Qe--;)Ze[$e[Qe]]=Je[$e[Qe]];return Ze}}).call(this,ie("_process"),typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(ie,Ee,ce){"use strict";(function(){ce.stripBOM=function(se){return se[0]==="\uFEFF"?se.substring(1):se}}).call(void 0)},{}],209:[function(ie,Ee,ce){"use strict";function se(E){return E&&E.__esModule?E:{default:E}}var re=ie("babel-runtime/helpers/typeof"),ue=se(re),ee=ie("babel-runtime/core-js/object/keys"),te=se(ee);(function(){var E,y,z,x,ne,ae={}.hasOwnProperty;E=ie("xmlbuilder"),y=ie("./defaults").defaults,x=function(oe){return typeof oe=="string"&&(oe.indexOf("&")>=0||oe.indexOf(">")>=0||oe.indexOf("<")>=0)},ne=function(oe){return"<![CDATA["+z(oe)+"]]>"},z=function(oe){return oe.replace("]]>","]]]]><![CDATA[>")},ce.Builder=function(){function oe(ge){var Se,ve,be;this.options={},ve=y[.2];for(Se in ve)ae.call(ve,Se)&&(be=ve[Se],this.options[Se]=be);for(Se in ge)ae.call(ge,Se)&&(be=ge[Se],this.options[Se]=be)}return oe.prototype.buildObject=function(ge){var Se,ve,be,xe,pe;return Se=this.options.attrkey,ve=this.options.charkey,(0,te.default)(ge).length===1&&this.options.rootName===y[.2].rootName?(pe=(0,te.default)(ge)[0],ge=ge[pe]):pe=this.options.rootName,be=function(me){return function(Ae,De){var ke,Ie,Fe,Pe,qe,Ke;if((De===void 0?"undefined":(0,ue.default)(De))!=="object")me.options.cdata&&x(De)?Ae.raw(ne(De)):Ae.txt(De);else if(Array.isArray(De)){for(Pe in De)if(ae.call(De,Pe)){Ie=De[Pe];for(qe in Ie)Fe=Ie[qe],Ae=be(Ae.ele(qe),Fe).up()}}else for(qe in De)if(ae.call(De,qe))if(Ie=De[qe],qe===Se){if((Ie===void 0?"undefined":(0,ue.default)(Ie))==="object")for(ke in Ie)Ke=Ie[ke],Ae=Ae.att(ke,Ke)}else if(qe===ve)Ae=me.options.cdata&&x(Ie)?Ae.raw(ne(Ie)):Ae.txt(Ie);else if(Array.isArray(Ie))for(Pe in Ie)ae.call(Ie,Pe)&&(Fe=Ie[Pe],Ae=typeof Fe=="string"?me.options.cdata&&x(Fe)?Ae.ele(qe).raw(ne(Fe)).up():Ae.ele(qe,Fe).up():be(Ae.ele(qe),Fe).up());else(Ie===void 0?"undefined":(0,ue.default)(Ie))==="object"?Ae=be(Ae.ele(qe),Ie).up():typeof Ie=="string"&&me.options.cdata&&x(Ie)?Ae=Ae.ele(qe).raw(ne(Ie)).up():(Ie==null&&(Ie=""),Ae=Ae.ele(qe,Ie.toString()).up());return Ae}}(this),xe=E.create(pe,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),be(xe,ge).end(this.options.renderOpts)},oe}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(ie,Ee,ce){"use strict";(function(){ce.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(ie,Ee,ce){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var re=ie("babel-runtime/core-js/object/get-own-property-names"),ue=se(re),ee=ie("babel-runtime/core-js/object/keys"),te=se(ee),E=ie("babel-runtime/helpers/typeof"),y=se(E);(function(){var z,x,ne,ae,oe,ge,Se,ve,be=function(me,Ae){return function(){return me.apply(Ae,arguments)}},xe=function(me,Ae){function De(){this.constructor=me}for(var ke in Ae)pe.call(Ae,ke)&&(me[ke]=Ae[ke]);return De.prototype=Ae.prototype,me.prototype=new De,me.__super__=Ae.prototype,me},pe={}.hasOwnProperty;Se=ie("sax"),ne=ie("events"),z=ie("./bom"),ge=ie("./processors"),ve=ie("timers").setImmediate,x=ie("./defaults").defaults,ae=function(me){return(me===void 0?"undefined":(0,y.default)(me))==="object"&&me!=null&&(0,te.default)(me).length===0},oe=function(me,Ae,De){var ke,Ie,Fe;for(ke=0,Ie=me.length;ke<Ie;ke++)Fe=me[ke],Ae=Fe(Ae,De);return Ae},ce.Parser=function(me){function Ae(De){this.parseString=be(this.parseString,this),this.reset=be(this.reset,this),this.assignOrPush=be(this.assignOrPush,this),this.processAsync=be(this.processAsync,this);var ke,Ie,Fe;if(!(this instanceof ce.Parser))return new ce.Parser(De);this.options={},Ie=x[.2];for(ke in Ie)pe.call(Ie,ke)&&(Fe=Ie[ke],this.options[ke]=Fe);for(ke in De)pe.call(De,ke)&&(Fe=De[ke],this.options[ke]=Fe);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ge.normalize)),this.reset()}return xe(Ae,me),Ae.prototype.processAsync=function(){var De,ke;try{return this.remaining.length<=this.options.chunkSize?(De=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(De),this.saxParser.close()):(De=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(De),ve(this.processAsync))}catch(Ie){if(ke=Ie,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(ke)}},Ae.prototype.assignOrPush=function(De,ke,Ie){return ke in De?(De[ke]instanceof Array||(De[ke]=[De[ke]]),De[ke].push(Ie)):this.options.explicitArray?De[ke]=[Ie]:De[ke]=Ie},Ae.prototype.reset=function(){var De,ke,Ie,Fe;return this.removeAllListeners(),this.saxParser=Se.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Pe){return function(qe){if(Pe.saxParser.resume(),!Pe.saxParser.errThrown)return Pe.saxParser.errThrown=!0,Pe.emit("error",qe)}}(this),this.saxParser.onend=function(Pe){return function(){if(!Pe.saxParser.ended)return Pe.saxParser.ended=!0,Pe.emit("end",Pe.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,Fe=[],De=this.options.attrkey,ke=this.options.charkey,this.saxParser.onopentag=function(Pe){return function(qe){var Ke,ot,He,rt,Ge;if(He={},He[ke]="",!Pe.options.ignoreAttrs){Ge=qe.attributes;for(Ke in Ge)pe.call(Ge,Ke)&&(De in He||Pe.options.mergeAttrs||(He[De]={}),ot=Pe.options.attrValueProcessors?oe(Pe.options.attrValueProcessors,qe.attributes[Ke],Ke):qe.attributes[Ke],rt=Pe.options.attrNameProcessors?oe(Pe.options.attrNameProcessors,Ke):Ke,Pe.options.mergeAttrs?Pe.assignOrPush(He,rt,ot):He[De][rt]=ot)}return He["#name"]=Pe.options.tagNameProcessors?oe(Pe.options.tagNameProcessors,qe.name):qe.name,Pe.options.xmlns&&(He[Pe.options.xmlnskey]={uri:qe.uri,local:qe.local}),Fe.push(He)}}(this),this.saxParser.onclosetag=function(Pe){return function(){var qe,Ke,ot,He,rt,Ge,ct,We,Ue,Ze;if(Ge=Fe.pop(),rt=Ge["#name"],Pe.options.explicitChildren&&Pe.options.preserveChildrenOrder||delete Ge["#name"],Ge.cdata===!0&&(qe=Ge.cdata,delete Ge.cdata),Ue=Fe[Fe.length-1],Ge[ke].match(/^\s*$/)&&!qe?(Ke=Ge[ke],delete Ge[ke]):(Pe.options.trim&&(Ge[ke]=Ge[ke].trim()),Pe.options.normalize&&(Ge[ke]=Ge[ke].replace(/\s{2,}/g," ").trim()),Ge[ke]=Pe.options.valueProcessors?oe(Pe.options.valueProcessors,Ge[ke],rt):Ge[ke],(0,te.default)(Ge).length===1&&ke in Ge&&!Pe.EXPLICIT_CHARKEY&&(Ge=Ge[ke])),ae(Ge)&&(Ge=Pe.options.emptyTag!==""?Pe.options.emptyTag:Ke),Pe.options.validator!=null&&(Ze="/"+function(){var Je,$e,Qe;for(Qe=[],Je=0,$e=Fe.length;Je<$e;Je++)He=Fe[Je],Qe.push(He["#name"]);return Qe}().concat(rt).join("/"),function(){var Je;try{Ge=Pe.options.validator(Ze,Ue&&Ue[rt],Ge)}catch($e){return Je=$e,Pe.emit("error",Je)}}()),Pe.options.explicitChildren&&!Pe.options.mergeAttrs&&(Ge===void 0?"undefined":(0,y.default)(Ge))==="object")if(Pe.options.preserveChildrenOrder){if(Ue){Ue[Pe.options.childkey]=Ue[Pe.options.childkey]||[],ct={};for(ot in Ge)pe.call(Ge,ot)&&(ct[ot]=Ge[ot]);Ue[Pe.options.childkey].push(ct),delete Ge["#name"],(0,te.default)(Ge).length===1&&ke in Ge&&!Pe.EXPLICIT_CHARKEY&&(Ge=Ge[ke])}}else He={},Pe.options.attrkey in Ge&&(He[Pe.options.attrkey]=Ge[Pe.options.attrkey],delete Ge[Pe.options.attrkey]),!Pe.options.charsAsChildren&&Pe.options.charkey in Ge&&(He[Pe.options.charkey]=Ge[Pe.options.charkey],delete Ge[Pe.options.charkey]),(0,ue.default)(Ge).length>0&&(He[Pe.options.childkey]=Ge),Ge=He;return Fe.length>0?Pe.assignOrPush(Ue,rt,Ge):(Pe.options.explicitRoot&&(We=Ge,Ge={},Ge[rt]=We),Pe.resultObject=Ge,Pe.saxParser.ended=!0,Pe.emit("end",Pe.resultObject))}}(this),Ie=function(Pe){return function(qe){var Ke,ot;if(ot=Fe[Fe.length-1])return ot[ke]+=qe,Pe.options.explicitChildren&&Pe.options.preserveChildrenOrder&&Pe.options.charsAsChildren&&(Pe.options.includeWhiteChars||qe.replace(/\\n/g,"").trim()!=="")&&(ot[Pe.options.childkey]=ot[Pe.options.childkey]||[],Ke={"#name":"__text__"},Ke[ke]=qe,Pe.options.normalize&&(Ke[ke]=Ke[ke].replace(/\s{2,}/g," ").trim()),ot[Pe.options.childkey].push(Ke)),ot}}(this),this.saxParser.ontext=Ie,this.saxParser.oncdata=function(Pe){return function(qe){var Ke;if(Ke=Ie(qe))return Ke.cdata=!0}}()},Ae.prototype.parseString=function(De,ke){var Ie;ke!=null&&typeof ke=="function"&&(this.on("end",function(Fe){return this.reset(),ke(null,Fe)}),this.on("error",function(Fe){return this.reset(),ke(Fe)}));try{return De=De.toString(),De.trim()===""?(this.emit("end",null),!0):(De=z.stripBOM(De),this.options.async?(this.remaining=De,ve(this.processAsync),this.saxParser):this.saxParser.write(De).close())}catch(Fe){if(Ie=Fe,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Ie),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Ie}},Ae}(ne.EventEmitter),ce.parseString=function(me,Ae,De){var ke,Ie,Fe;return De!=null?(typeof De=="function"&&(ke=De),(Ae===void 0?"undefined":(0,y.default)(Ae))==="object"&&(Ie=Ae)):(typeof Ae=="function"&&(ke=Ae),Ie={}),Fe=new ce.Parser(Ie),Fe.parseString(me,ke)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(ie,Ee,ce){"use strict";(function(){var se;se=new RegExp(/(?!xmlns)^.*:/),ce.normalize=function(re){return re.toLowerCase()},ce.firstCharLowerCase=function(re){return re.charAt(0).toLowerCase()+re.slice(1)},ce.stripPrefix=function(re){return re.replace(se,"")},ce.parseNumbers=function(re){return isNaN(re)||(re=re%1==0?parseInt(re,10):parseFloat(re)),re},ce.parseBooleans=function(re){return/^(?:true|false)$/i.test(re)&&(re=re.toLowerCase()==="true"),re}}).call(void 0)},{}],213:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te=function(y,z){function x(){this.constructor=y}for(var ne in z)E.call(z,ne)&&(y[ne]=z[ne]);return x.prototype=z.prototype,y.prototype=new x,y.__super__=z.prototype,y},E={}.hasOwnProperty;re=ie("./defaults"),se=ie("./builder"),ue=ie("./parser"),ee=ie("./processors"),ce.defaults=re.defaults,ce.processors=ee,ce.ValidationError=function(y){function z(x){this.message=x}return te(z,y),z}(Error),ce.Builder=se.Builder,ce.Parser=ue.Parser,ce.parseString=ue.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(ie,Ee,ce){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var re=ie("babel-runtime/core-js/object/get-prototype-of"),ue=se(re),ee=ie("babel-runtime/helpers/typeof"),te=se(ee),E=ie("babel-runtime/core-js/object/assign"),y=se(E);(function(){var z,x,ne,ae,oe,ge,Se=[].slice,ve={}.hasOwnProperty;z=function(){var be,xe,pe,me,Ae,De;if(De=arguments[0],Ae=2<=arguments.length?Se.call(arguments,1):[],ae(y.default))y.default.apply(null,arguments);else for(be=0,pe=Ae.length;be<pe;be++)if((me=Ae[be])!=null)for(xe in me)ve.call(me,xe)&&(De[xe]=me[xe]);return De},ae=function(be){return!!be&&Object.prototype.toString.call(be)==="[object Function]"},oe=function(be){var xe;return!!be&&((xe=be===void 0?"undefined":(0,te.default)(be))==="function"||xe==="object")},x=function(be){return ae(Array.isArray)?Array.isArray(be):Object.prototype.toString.call(be)==="[object Array]"},ne=function(be){var xe;if(x(be))return!be.length;for(xe in be)if(ve.call(be,xe))return!1;return!0},ge=function(be){var xe,pe;return oe(be)&&(pe=(0,ue.default)(be))&&(xe=pe.constructor)&&typeof xe=="function"&&xe instanceof xe&&Function.prototype.toString.call(xe)===Function.prototype.toString.call(Object)},Ee.exports.assign=z,Ee.exports.isFunction=ae,Ee.exports.isObject=oe,Ee.exports.isArray=x,Ee.exports.isEmpty=ne,Ee.exports.isPlainObject=ge}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){Ee.exports=function(){function ue(ee,te,E){if(this.options=ee.options,this.stringify=ee.stringify,te==null)throw new Error("Missing attribute name of element "+ee.name);if(E==null)throw new Error("Missing attribute value for attribute "+te+" of element "+ee.name);this.name=this.stringify.attName(te),this.value=this.stringify.attValue(E)}return ue.prototype.clone=function(){return(0,re.default)(this)},ue.prototype.toString=function(ee){return this.options.writer.set(ee).attribute(this)},ue}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee=function(E,y){function z(){this.constructor=E}for(var x in y)te.call(y,x)&&(E[x]=y[x]);return z.prototype=y.prototype,E.prototype=new z,E.__super__=y.prototype,E},te={}.hasOwnProperty;ue=ie("./XMLNode"),Ee.exports=function(E){function y(z,x){if(y.__super__.constructor.call(this,z),x==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(x)}return ee(y,E),y.prototype.clone=function(){return(0,re.default)(this)},y.prototype.toString=function(z){return this.options.writer.set(z).cdata(this)},y}(ue)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee=function(E,y){function z(){this.constructor=E}for(var x in y)te.call(y,x)&&(E[x]=y[x]);return z.prototype=y.prototype,E.prototype=new z,E.__super__=y.prototype,E},te={}.hasOwnProperty;ue=ie("./XMLNode"),Ee.exports=function(E){function y(z,x){if(y.__super__.constructor.call(this,z),x==null)throw new Error("Missing comment text");this.text=this.stringify.comment(x)}return ee(y,E),y.prototype.clone=function(){return(0,re.default)(this)},y.prototype.toString=function(z){return this.options.writer.set(z).comment(this)},y}(ue)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(ie,Ee,ce){"use strict";(function(){var se,re=function(ee,te){function E(){this.constructor=ee}for(var y in te)ue.call(te,y)&&(ee[y]=te[y]);return E.prototype=te.prototype,ee.prototype=new E,ee.__super__=te.prototype,ee},ue={}.hasOwnProperty;se=ie("./XMLNode"),Ee.exports=function(ee){function te(E,y,z,x,ne,ae){if(te.__super__.constructor.call(this,E),y==null)throw new Error("Missing DTD element name");if(z==null)throw new Error("Missing DTD attribute name");if(!x)throw new Error("Missing DTD attribute type");if(!ne)throw new Error("Missing DTD attribute default");if(ne.indexOf("#")!==0&&(ne="#"+ne),!ne.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(ae&&!ne.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(y),this.attributeName=this.stringify.attName(z),this.attributeType=this.stringify.dtdAttType(x),this.defaultValue=this.stringify.dtdAttDefault(ae),this.defaultValueType=ne}return re(te,ee),te.prototype.toString=function(E){return this.options.writer.set(E).dtdAttList(this)},te}(se)}).call(void 0)},{"./XMLNode":227}],219:[function(ie,Ee,ce){"use strict";(function(){var se,re=function(ee,te){function E(){this.constructor=ee}for(var y in te)ue.call(te,y)&&(ee[y]=te[y]);return E.prototype=te.prototype,ee.prototype=new E,ee.__super__=te.prototype,ee},ue={}.hasOwnProperty;se=ie("./XMLNode"),Ee.exports=function(ee){function te(E,y,z){if(te.__super__.constructor.call(this,E),y==null)throw new Error("Missing DTD element name");z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.eleName(y),this.value=this.stringify.dtdElementValue(z)}return re(te,ee),te.prototype.toString=function(E){return this.options.writer.set(E).dtdElement(this)},te}(se)}).call(void 0)},{"./XMLNode":227}],220:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue=function(te,E){function y(){this.constructor=te}for(var z in E)ee.call(E,z)&&(te[z]=E[z]);return y.prototype=E.prototype,te.prototype=new y,te.__super__=E.prototype,te},ee={}.hasOwnProperty;re=ie("./Utility").isObject,se=ie("./XMLNode"),Ee.exports=function(te){function E(y,z,x,ne){if(E.__super__.constructor.call(this,y),x==null)throw new Error("Missing entity name");if(ne==null)throw new Error("Missing entity value");if(this.pe=!!z,this.name=this.stringify.eleName(x),re(ne)){if(!ne.pubID&&!ne.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(ne.pubID&&!ne.sysID)throw new Error("System identifier is required for a public external entity");if(ne.pubID!=null&&(this.pubID=this.stringify.dtdPubID(ne.pubID)),ne.sysID!=null&&(this.sysID=this.stringify.dtdSysID(ne.sysID)),ne.nData!=null&&(this.nData=this.stringify.dtdNData(ne.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(ne)}return ue(E,te),E.prototype.toString=function(y){return this.options.writer.set(y).dtdEntity(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(ie,Ee,ce){"use strict";(function(){var se,re=function(ee,te){function E(){this.constructor=ee}for(var y in te)ue.call(te,y)&&(ee[y]=te[y]);return E.prototype=te.prototype,ee.prototype=new E,ee.__super__=te.prototype,ee},ue={}.hasOwnProperty;se=ie("./XMLNode"),Ee.exports=function(ee){function te(E,y,z){if(te.__super__.constructor.call(this,E),y==null)throw new Error("Missing notation name");if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(y),z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return re(te,ee),te.prototype.toString=function(E){return this.options.writer.set(E).dtdNotation(this)},te}(se)}).call(void 0)},{"./XMLNode":227}],222:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue=function(te,E){function y(){this.constructor=te}for(var z in E)ee.call(E,z)&&(te[z]=E[z]);return y.prototype=E.prototype,te.prototype=new y,te.__super__=E.prototype,te},ee={}.hasOwnProperty;re=ie("./Utility").isObject,se=ie("./XMLNode"),Ee.exports=function(te){function E(y,z,x,ne){var ae;E.__super__.constructor.call(this,y),re(z)&&(ae=z,z=ae.version,x=ae.encoding,ne=ae.standalone),z||(z="1.0"),this.version=this.stringify.xmlVersion(z),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),ne!=null&&(this.standalone=this.stringify.xmlStandalone(ne))}return ue(E,te),E.prototype.toString=function(y){return this.options.writer.set(y).declaration(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y=function(x,ne){function ae(){this.constructor=x}for(var oe in ne)z.call(ne,oe)&&(x[oe]=ne[oe]);return ae.prototype=ne.prototype,x.prototype=new ae,x.__super__=ne.prototype,x},z={}.hasOwnProperty;E=ie("./Utility").isObject,te=ie("./XMLNode"),se=ie("./XMLDTDAttList"),ue=ie("./XMLDTDEntity"),re=ie("./XMLDTDElement"),ee=ie("./XMLDTDNotation"),Ee.exports=function(x){function ne(ae,oe,ge){var Se,ve;ne.__super__.constructor.call(this,ae),this.documentObject=ae,E(oe)&&(Se=oe,oe=Se.pubID,ge=Se.sysID),ge==null&&(ve=[oe,ge],ge=ve[0],oe=ve[1]),oe!=null&&(this.pubID=this.stringify.dtdPubID(oe)),ge!=null&&(this.sysID=this.stringify.dtdSysID(ge))}return y(ne,x),ne.prototype.element=function(ae,oe){var ge;return ge=new re(this,ae,oe),this.children.push(ge),this},ne.prototype.attList=function(ae,oe,ge,Se,ve){var be;return be=new se(this,ae,oe,ge,Se,ve),this.children.push(be),this},ne.prototype.entity=function(ae,oe){var ge;return ge=new ue(this,!1,ae,oe),this.children.push(ge),this},ne.prototype.pEntity=function(ae,oe){var ge;return ge=new ue(this,!0,ae,oe),this.children.push(ge),this},ne.prototype.notation=function(ae,oe){var ge;return ge=new ee(this,ae,oe),this.children.push(ge),this},ne.prototype.toString=function(ae){return this.options.writer.set(ae).docType(this)},ne.prototype.ele=function(ae,oe){return this.element(ae,oe)},ne.prototype.att=function(ae,oe,ge,Se,ve){return this.attList(ae,oe,ge,Se,ve)},ne.prototype.ent=function(ae,oe){return this.entity(ae,oe)},ne.prototype.pent=function(ae,oe){return this.pEntity(ae,oe)},ne.prototype.not=function(ae,oe){return this.notation(ae,oe)},ne.prototype.up=function(){return this.root()||this.documentObject},ne}(te)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te=function(y,z){function x(){this.constructor=y}for(var ne in z)E.call(z,ne)&&(y[ne]=z[ne]);return x.prototype=z.prototype,y.prototype=new x,y.__super__=z.prototype,y},E={}.hasOwnProperty;ee=ie("./Utility").isPlainObject,se=ie("./XMLNode"),ue=ie("./XMLStringifier"),re=ie("./XMLStringWriter"),Ee.exports=function(y){function z(x){z.__super__.constructor.call(this,null),x||(x={}),x.writer||(x.writer=new re),this.options=x,this.stringify=new ue(x),this.isDocument=!0}return te(z,y),z.prototype.end=function(x){var ne;return x?ee(x)&&(ne=x,x=this.options.writer.set(ne)):x=this.options.writer,x.document(this)},z.prototype.toString=function(x){return this.options.writer.set(x).document(this)},z}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y,z,x,ne,ae,oe,ge,Se,ve,be,xe,pe,me,Ae={}.hasOwnProperty;me=ie("./Utility"),xe=me.isObject,be=me.isFunction,pe=me.isPlainObject,ne=ie("./XMLElement"),re=ie("./XMLCData"),ue=ie("./XMLComment"),oe=ie("./XMLRaw"),ve=ie("./XMLText"),ae=ie("./XMLProcessingInstruction"),z=ie("./XMLDeclaration"),x=ie("./XMLDocType"),ee=ie("./XMLDTDAttList"),E=ie("./XMLDTDEntity"),te=ie("./XMLDTDElement"),y=ie("./XMLDTDNotation"),se=ie("./XMLAttribute"),Se=ie("./XMLStringifier"),ge=ie("./XMLStringWriter"),Ee.exports=function(){function De(ke,Ie,Fe){var Pe;ke||(ke={}),ke.writer?pe(ke.writer)&&(Pe=ke.writer,ke.writer=new ge(Pe)):ke.writer=new ge(ke),this.options=ke,this.writer=ke.writer,this.stringify=new Se(ke),this.onDataCallback=Ie||function(){},this.onEndCallback=Fe||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return De.prototype.node=function(ke,Ie,Fe){var Pe;if(ke==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),ke=ke.valueOf(),Ie==null&&(Ie={}),Ie=Ie.valueOf(),xe(Ie)||(Pe=[Ie,Fe],Fe=Pe[0],Ie=Pe[1]),this.currentNode=new ne(this,ke,Ie),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,Fe!=null&&this.text(Fe),this},De.prototype.element=function(ke,Ie,Fe){return this.currentNode&&this.currentNode instanceof x?this.dtdElement.apply(this,arguments):this.node(ke,Ie,Fe)},De.prototype.attribute=function(ke,Ie){var Fe,Pe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(ke!=null&&(ke=ke.valueOf()),xe(ke))for(Fe in ke)Ae.call(ke,Fe)&&(Pe=ke[Fe],this.attribute(Fe,Pe));else be(Ie)&&(Ie=Ie.apply()),this.options.skipNullAttributes&&Ie==null||(this.currentNode.attributes[ke]=new se(this,ke,Ie));return this},De.prototype.text=function(ke){var Ie;return this.openCurrent(),Ie=new ve(this,ke),this.onData(this.writer.text(Ie,this.currentLevel+1)),this},De.prototype.cdata=function(ke){var Ie;return this.openCurrent(),Ie=new re(this,ke),this.onData(this.writer.cdata(Ie,this.currentLevel+1)),this},De.prototype.comment=function(ke){var Ie;return this.openCurrent(),Ie=new ue(this,ke),this.onData(this.writer.comment(Ie,this.currentLevel+1)),this},De.prototype.raw=function(ke){var Ie;return this.openCurrent(),Ie=new oe(this,ke),this.onData(this.writer.raw(Ie,this.currentLevel+1)),this},De.prototype.instruction=function(ke,Ie){var Fe,Pe,qe,Ke,ot;if(this.openCurrent(),ke!=null&&(ke=ke.valueOf()),Ie!=null&&(Ie=Ie.valueOf()),Array.isArray(ke))for(Fe=0,Ke=ke.length;Fe<Ke;Fe++)Pe=ke[Fe],this.instruction(Pe);else if(xe(ke))for(Pe in ke)Ae.call(ke,Pe)&&(qe=ke[Pe],this.instruction(Pe,qe));else be(Ie)&&(Ie=Ie.apply()),ot=new ae(this,ke,Ie),this.onData(this.writer.processingInstruction(ot,this.currentLevel+1));return this},De.prototype.declaration=function(ke,Ie,Fe){var Pe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Pe=new z(this,ke,Ie,Fe),this.onData(this.writer.declaration(Pe,this.currentLevel+1)),this},De.prototype.doctype=function(ke,Ie,Fe){if(this.openCurrent(),ke==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new x(this,Ie,Fe),this.currentNode.rootNodeName=ke,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},De.prototype.dtdElement=function(ke,Ie){var Fe;return this.openCurrent(),Fe=new te(this,ke,Ie),this.onData(this.writer.dtdElement(Fe,this.currentLevel+1)),this},De.prototype.attList=function(ke,Ie,Fe,Pe,qe){var Ke;return this.openCurrent(),Ke=new ee(this,ke,Ie,Fe,Pe,qe),this.onData(this.writer.dtdAttList(Ke,this.currentLevel+1)),this},De.prototype.entity=function(ke,Ie){var Fe;return this.openCurrent(),Fe=new E(this,!1,ke,Ie),this.onData(this.writer.dtdEntity(Fe,this.currentLevel+1)),this},De.prototype.pEntity=function(ke,Ie){var Fe;return this.openCurrent(),Fe=new E(this,!0,ke,Ie),this.onData(this.writer.dtdEntity(Fe,this.currentLevel+1)),this},De.prototype.notation=function(ke,Ie){var Fe;return this.openCurrent(),Fe=new y(this,ke,Ie),this.onData(this.writer.dtdNotation(Fe,this.currentLevel+1)),this},De.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},De.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},De.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},De.prototype.openNode=function(ke){if(!ke.isOpen)return!this.root&&this.currentLevel===0&&ke instanceof ne&&(this.root=ke),this.onData(this.writer.openNode(ke,this.currentLevel)),ke.isOpen=!0},De.prototype.closeNode=function(ke){if(!ke.isClosed)return this.onData(this.writer.closeNode(ke,this.currentLevel)),ke.isClosed=!0},De.prototype.onData=function(ke){return this.documentStarted=!0,this.onDataCallback(ke)},De.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},De.prototype.ele=function(){return this.element.apply(this,arguments)},De.prototype.nod=function(ke,Ie,Fe){return this.node(ke,Ie,Fe)},De.prototype.txt=function(ke){return this.text(ke)},De.prototype.dat=function(ke){return this.cdata(ke)},De.prototype.com=function(ke){return this.comment(ke)},De.prototype.ins=function(ke,Ie){return this.instruction(ke,Ie)},De.prototype.dec=function(ke,Ie,Fe){return this.declaration(ke,Ie,Fe)},De.prototype.dtd=function(ke,Ie,Fe){return this.doctype(ke,Ie,Fe)},De.prototype.e=function(ke,Ie,Fe){return this.element(ke,Ie,Fe)},De.prototype.n=function(ke,Ie,Fe){return this.node(ke,Ie,Fe)},De.prototype.t=function(ke){return this.text(ke)},De.prototype.d=function(ke){return this.cdata(ke)},De.prototype.c=function(ke){return this.comment(ke)},De.prototype.r=function(ke){return this.raw(ke)},De.prototype.i=function(ke,Ie){return this.instruction(ke,Ie)},De.prototype.att=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.a=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},De.prototype.ent=function(ke,Ie){return this.entity(ke,Ie)},De.prototype.pent=function(ke,Ie){return this.pEntity(ke,Ie)},De.prototype.not=function(ke,Ie){return this.notation(ke,Ie)},De}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee,te,E,y,z=function(ne,ae){function oe(){this.constructor=ne}for(var ge in ae)x.call(ae,ge)&&(ne[ge]=ae[ge]);return oe.prototype=ae.prototype,ne.prototype=new oe,ne.__super__=ae.prototype,ne},x={}.hasOwnProperty;y=ie("./Utility"),E=y.isObject,te=y.isFunction,ee=ie("./XMLNode"),ue=ie("./XMLAttribute"),Ee.exports=function(ne){function ae(oe,ge,Se){if(ae.__super__.constructor.call(this,oe),ge==null)throw new Error("Missing element name");this.name=this.stringify.eleName(ge),this.attributes={},Se!=null&&this.attribute(Se),oe.isDocument&&(this.isRoot=!0,this.documentObject=oe,oe.rootObject=this)}return z(ae,ne),ae.prototype.clone=function(){var oe,ge,Se,ve;Se=(0,re.default)(this),Se.isRoot&&(Se.documentObject=null),Se.attributes={},ve=this.attributes;for(ge in ve)x.call(ve,ge)&&(oe=ve[ge],Se.attributes[ge]=oe.clone());return Se.children=[],this.children.forEach(function(be){var xe;return xe=be.clone(),xe.parent=Se,Se.children.push(xe)}),Se},ae.prototype.attribute=function(oe,ge){var Se,ve;if(oe!=null&&(oe=oe.valueOf()),E(oe))for(Se in oe)x.call(oe,Se)&&(ve=oe[Se],this.attribute(Se,ve));else te(ge)&&(ge=ge.apply()),this.options.skipNullAttributes&&ge==null||(this.attributes[oe]=new ue(this,oe,ge));return this},ae.prototype.removeAttribute=function(oe){var ge,Se,ve;if(oe==null)throw new Error("Missing attribute name");if(oe=oe.valueOf(),Array.isArray(oe))for(Se=0,ve=oe.length;Se<ve;Se++)ge=oe[Se],delete this.attributes[ge];else delete this.attributes[oe];return this},ae.prototype.toString=function(oe){return this.options.writer.set(oe).element(this)},ae.prototype.att=function(oe,ge){return this.attribute(oe,ge)},ae.prototype.a=function(oe,ge){return this.attribute(oe,ge)},ae}(ee)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y,z,x,ne,ae,oe,ge={}.hasOwnProperty;oe=ie("./Utility"),ae=oe.isObject,ne=oe.isFunction,x=oe.isEmpty,te=null,se=null,re=null,ue=null,ee=null,y=null,z=null,E=null,Ee.exports=function(){function Se(ve){this.parent=ve,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],te||(te=ie("./XMLElement"),se=ie("./XMLCData"),re=ie("./XMLComment"),ue=ie("./XMLDeclaration"),ee=ie("./XMLDocType"),y=ie("./XMLRaw"),z=ie("./XMLText"),E=ie("./XMLProcessingInstruction"))}return Se.prototype.element=function(ve,be,xe){var pe,me,Ae,De,ke,Ie,Fe,Pe,qe,Ke;if(Ie=null,be==null&&(be={}),be=be.valueOf(),ae(be)||(qe=[be,xe],xe=qe[0],be=qe[1]),ve!=null&&(ve=ve.valueOf()),Array.isArray(ve))for(Ae=0,Fe=ve.length;Ae<Fe;Ae++)me=ve[Ae],Ie=this.element(me);else if(ne(ve))Ie=this.element(ve.apply());else if(ae(ve)){for(ke in ve)if(ge.call(ve,ke))if(Ke=ve[ke],ne(Ke)&&(Ke=Ke.apply()),ae(Ke)&&x(Ke)&&(Ke=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&ke.indexOf(this.stringify.convertAttKey)===0)Ie=this.attribute(ke.substr(this.stringify.convertAttKey.length),Ke);else if(!this.options.separateArrayItems&&Array.isArray(Ke))for(De=0,Pe=Ke.length;De<Pe;De++)me=Ke[De],pe={},pe[ke]=me,Ie=this.element(pe);else ae(Ke)?(Ie=this.element(ke),Ie.element(Ke)):Ie=this.element(ke,Ke)}else Ie=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&ve.indexOf(this.stringify.convertTextKey)===0?this.text(xe):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&ve.indexOf(this.stringify.convertCDataKey)===0?this.cdata(xe):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&ve.indexOf(this.stringify.convertCommentKey)===0?this.comment(xe):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&ve.indexOf(this.stringify.convertRawKey)===0?this.raw(xe):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&ve.indexOf(this.stringify.convertPIKey)===0?this.instruction(ve.substr(this.stringify.convertPIKey.length),xe):this.node(ve,be,xe);if(Ie==null)throw new Error("Could not create any elements with: "+ve);return Ie},Se.prototype.insertBefore=function(ve,be,xe){var pe,me,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return me=this.parent.children.indexOf(this),Ae=this.parent.children.splice(me),pe=this.parent.element(ve,be,xe),Array.prototype.push.apply(this.parent.children,Ae),pe},Se.prototype.insertAfter=function(ve,be,xe){var pe,me,Ae;if(this.isRoot)throw new Error("Cannot insert elements at root level");return me=this.parent.children.indexOf(this),Ae=this.parent.children.splice(me+1),pe=this.parent.element(ve,be,xe),Array.prototype.push.apply(this.parent.children,Ae),pe},Se.prototype.remove=function(){var ve;if(this.isRoot)throw new Error("Cannot remove the root element");return ve=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[ve,ve-ve+1].concat([])),this.parent},Se.prototype.node=function(ve,be,xe){var pe,me;return ve!=null&&(ve=ve.valueOf()),be||(be={}),be=be.valueOf(),ae(be)||(me=[be,xe],xe=me[0],be=me[1]),pe=new te(this,ve,be),xe!=null&&pe.text(xe),this.children.push(pe),pe},Se.prototype.text=function(ve){var be;return be=new z(this,ve),this.children.push(be),this},Se.prototype.cdata=function(ve){var be;return be=new se(this,ve),this.children.push(be),this},Se.prototype.comment=function(ve){var be;return be=new re(this,ve),this.children.push(be),this},Se.prototype.commentBefore=function(ve){var be,xe;return be=this.parent.children.indexOf(this),xe=this.parent.children.splice(be),this.parent.comment(ve),Array.prototype.push.apply(this.parent.children,xe),this},Se.prototype.commentAfter=function(ve){var be,xe;return be=this.parent.children.indexOf(this),xe=this.parent.children.splice(be+1),this.parent.comment(ve),Array.prototype.push.apply(this.parent.children,xe),this},Se.prototype.raw=function(ve){var be;return be=new y(this,ve),this.children.push(be),this},Se.prototype.instruction=function(ve,be){var xe,pe,me,Ae,De;if(ve!=null&&(ve=ve.valueOf()),be!=null&&(be=be.valueOf()),Array.isArray(ve))for(Ae=0,De=ve.length;Ae<De;Ae++)xe=ve[Ae],this.instruction(xe);else if(ae(ve))for(xe in ve)ge.call(ve,xe)&&(pe=ve[xe],this.instruction(xe,pe));else ne(be)&&(be=be.apply()),me=new E(this,ve,be),this.children.push(me);return this},Se.prototype.instructionBefore=function(ve,be){var xe,pe;return xe=this.parent.children.indexOf(this),pe=this.parent.children.splice(xe),this.parent.instruction(ve,be),Array.prototype.push.apply(this.parent.children,pe),this},Se.prototype.instructionAfter=function(ve,be){var xe,pe;return xe=this.parent.children.indexOf(this),pe=this.parent.children.splice(xe+1),this.parent.instruction(ve,be),Array.prototype.push.apply(this.parent.children,pe),this},Se.prototype.declaration=function(ve,be,xe){var pe,me;return pe=this.document(),me=new ue(pe,ve,be,xe),pe.children[0]instanceof ue?pe.children[0]=me:pe.children.unshift(me),pe.root()||pe},Se.prototype.doctype=function(ve,be){var xe,pe,me,Ae,De,ke,Ie,Fe,Pe,qe;for(pe=this.document(),me=new ee(pe,ve,be),Pe=pe.children,Ae=De=0,Ie=Pe.length;De<Ie;Ae=++De)if((xe=Pe[Ae])instanceof ee)return pe.children[Ae]=me,me;for(qe=pe.children,Ae=ke=0,Fe=qe.length;ke<Fe;Ae=++ke)if(xe=qe[Ae],xe.isRoot)return pe.children.splice(Ae,0,me),me;return pe.children.push(me),me},Se.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},Se.prototype.root=function(){var ve;for(ve=this;ve;){if(ve.isDocument)return ve.rootObject;if(ve.isRoot)return ve;ve=ve.parent}},Se.prototype.document=function(){var ve;for(ve=this;ve;){if(ve.isDocument)return ve;ve=ve.parent}},Se.prototype.end=function(ve){return this.document().end(ve)},Se.prototype.prev=function(){var ve;if((ve=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[ve-1]},Se.prototype.next=function(){var ve;if((ve=this.parent.children.indexOf(this))===-1||ve===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[ve+1]},Se.prototype.importDocument=function(ve){var be;return be=ve.root().clone(),be.parent=this,be.isRoot=!1,this.children.push(be),this},Se.prototype.ele=function(ve,be,xe){return this.element(ve,be,xe)},Se.prototype.nod=function(ve,be,xe){return this.node(ve,be,xe)},Se.prototype.txt=function(ve){return this.text(ve)},Se.prototype.dat=function(ve){return this.cdata(ve)},Se.prototype.com=function(ve){return this.comment(ve)},Se.prototype.ins=function(ve,be){return this.instruction(ve,be)},Se.prototype.doc=function(){return this.document()},Se.prototype.dec=function(ve,be,xe){return this.declaration(ve,be,xe)},Se.prototype.dtd=function(ve,be){return this.doctype(ve,be)},Se.prototype.e=function(ve,be,xe){return this.element(ve,be,xe)},Se.prototype.n=function(ve,be,xe){return this.node(ve,be,xe)},Se.prototype.t=function(ve){return this.text(ve)},Se.prototype.d=function(ve){return this.cdata(ve)},Se.prototype.c=function(ve){return this.comment(ve)},Se.prototype.r=function(ve){return this.raw(ve)},Se.prototype.i=function(ve,be){return this.instruction(ve,be)},Se.prototype.u=function(){return this.up()},Se.prototype.importXMLBuilder=function(ve){return this.importDocument(ve)},Se}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee=function(E,y){function z(){this.constructor=E}for(var x in y)te.call(y,x)&&(E[x]=y[x]);return z.prototype=y.prototype,E.prototype=new z,E.__super__=y.prototype,E},te={}.hasOwnProperty;ue=ie("./XMLNode"),Ee.exports=function(E){function y(z,x,ne){if(y.__super__.constructor.call(this,z),x==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(x),ne&&(this.value=this.stringify.insValue(ne))}return ee(y,E),y.prototype.clone=function(){return(0,re.default)(this)},y.prototype.toString=function(z){return this.options.writer.set(z).processingInstruction(this)},y}(ue)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee=function(E,y){function z(){this.constructor=E}for(var x in y)te.call(y,x)&&(E[x]=y[x]);return z.prototype=y.prototype,E.prototype=new z,E.__super__=y.prototype,E},te={}.hasOwnProperty;ue=ie("./XMLNode"),Ee.exports=function(E){function y(z,x){if(y.__super__.constructor.call(this,z),x==null)throw new Error("Missing raw text");this.value=this.stringify.raw(x)}return ee(y,E),y.prototype.clone=function(){return(0,re.default)(this)},y.prototype.toString=function(z){return this.options.writer.set(z).raw(this)},y}(ue)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y,z,x,ne,ae,oe,ge,Se=function(be,xe){function pe(){this.constructor=be}for(var me in xe)ve.call(xe,me)&&(be[me]=xe[me]);return pe.prototype=xe.prototype,be.prototype=new pe,be.__super__=xe.prototype,be},ve={}.hasOwnProperty;y=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),re=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),ne=ie("./XMLProcessingInstruction"),ue=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),te=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ge=ie("./XMLWriterBase"),Ee.exports=function(be){function xe(pe,me){xe.__super__.constructor.call(this,me),this.stream=pe}return Se(xe,be),xe.prototype.document=function(pe){var me,Ae,De,ke,Ie,Fe,Pe,qe;for(Fe=pe.children,Ae=0,ke=Fe.length;Ae<ke;Ae++)me=Fe[Ae],me.isLastRootNode=!1;for(pe.children[pe.children.length-1].isLastRootNode=!0,Pe=pe.children,qe=[],De=0,Ie=Pe.length;De<Ie;De++)switch(me=Pe[De],!1){case!(me instanceof y):qe.push(this.declaration(me));break;case!(me instanceof z):qe.push(this.docType(me));break;case!(me instanceof re):qe.push(this.comment(me));break;case!(me instanceof ne):qe.push(this.processingInstruction(me));break;default:qe.push(this.element(me))}return qe},xe.prototype.attribute=function(pe){return this.stream.write(" "+pe.name+'="'+pe.value+'"')},xe.prototype.cdata=function(pe,me){return this.stream.write(this.space(me)+"<![CDATA["+pe.text+"]]>"+this.endline(pe))},xe.prototype.comment=function(pe,me){return this.stream.write(this.space(me)+"<!-- "+pe.text+" -->"+this.endline(pe))},xe.prototype.declaration=function(pe,me){return this.stream.write(this.space(me)),this.stream.write('<?xml version="'+pe.version+'"'),pe.encoding!=null&&this.stream.write(' encoding="'+pe.encoding+'"'),pe.standalone!=null&&this.stream.write(' standalone="'+pe.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(pe))},xe.prototype.docType=function(pe,me){var Ae,De,ke,Ie;if(me||(me=0),this.stream.write(this.space(me)),this.stream.write("<!DOCTYPE "+pe.root().name),pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),pe.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(pe)),Ie=pe.children,De=0,ke=Ie.length;De<ke;De++)switch(Ae=Ie[De],!1){case!(Ae instanceof ue):this.dtdAttList(Ae,me+1);break;case!(Ae instanceof ee):this.dtdElement(Ae,me+1);break;case!(Ae instanceof te):this.dtdEntity(Ae,me+1);break;case!(Ae instanceof E):this.dtdNotation(Ae,me+1);break;case!(Ae instanceof se):this.cdata(Ae,me+1);break;case!(Ae instanceof re):this.comment(Ae,me+1);break;case!(Ae instanceof ne):this.processingInstruction(Ae,me+1);break;default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(pe))},xe.prototype.element=function(pe,me){var Ae,De,ke,Ie,Fe,Pe,qe,Ke;me||(me=0),Ke=this.space(me),this.stream.write(Ke+"<"+pe.name),Pe=pe.attributes;for(Fe in Pe)ve.call(Pe,Fe)&&(Ae=Pe[Fe],this.attribute(Ae));if(pe.children.length===0||pe.children.every(function(ot){return ot.value===""}))this.allowEmpty?this.stream.write("></"+pe.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&pe.children.length===1&&pe.children[0].value!=null)this.stream.write(">"),this.stream.write(pe.children[0].value),this.stream.write("</"+pe.name+">");else{for(this.stream.write(">"+this.newline),qe=pe.children,ke=0,Ie=qe.length;ke<Ie;ke++)switch(De=qe[ke],!1){case!(De instanceof se):this.cdata(De,me+1);break;case!(De instanceof re):this.comment(De,me+1);break;case!(De instanceof x):this.element(De,me+1);break;case!(De instanceof ae):this.raw(De,me+1);break;case!(De instanceof oe):this.text(De,me+1);break;case!(De instanceof ne):this.processingInstruction(De,me+1);break;default:throw new Error("Unknown XML node type: "+De.constructor.name)}this.stream.write(Ke+"</"+pe.name+">")}return this.stream.write(this.endline(pe))},xe.prototype.processingInstruction=function(pe,me){return this.stream.write(this.space(me)+"<?"+pe.target),pe.value&&this.stream.write(" "+pe.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(pe))},xe.prototype.raw=function(pe,me){return this.stream.write(this.space(me)+pe.value+this.endline(pe))},xe.prototype.text=function(pe,me){return this.stream.write(this.space(me)+pe.value+this.endline(pe))},xe.prototype.dtdAttList=function(pe,me){return this.stream.write(this.space(me)+"<!ATTLIST "+pe.elementName+" "+pe.attributeName+" "+pe.attributeType),pe.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+pe.defaultValueType),pe.defaultValue&&this.stream.write(' "'+pe.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},xe.prototype.dtdElement=function(pe,me){return this.stream.write(this.space(me)+"<!ELEMENT "+pe.name+" "+pe.value),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},xe.prototype.dtdEntity=function(pe,me){return this.stream.write(this.space(me)+"<!ENTITY"),pe.pe&&this.stream.write(" %"),this.stream.write(" "+pe.name),pe.value?this.stream.write(' "'+pe.value+'"'):(pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),pe.nData&&this.stream.write(" NDATA "+pe.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},xe.prototype.dtdNotation=function(pe,me){return this.stream.write(this.space(me)+"<!NOTATION "+pe.name),pe.pubID&&pe.sysID?this.stream.write(' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"'):pe.pubID?this.stream.write(' PUBLIC "'+pe.pubID+'"'):pe.sysID&&this.stream.write(' SYSTEM "'+pe.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(pe))},xe.prototype.endline=function(pe){return pe.isLastRootNode?"":this.newline},xe}(ge)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y,z,x,ne,ae,oe,ge,Se=function(be,xe){function pe(){this.constructor=be}for(var me in xe)ve.call(xe,me)&&(be[me]=xe[me]);return pe.prototype=xe.prototype,be.prototype=new pe,be.__super__=xe.prototype,be},ve={}.hasOwnProperty;y=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),re=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),ne=ie("./XMLProcessingInstruction"),ue=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),te=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ge=ie("./XMLWriterBase"),Ee.exports=function(be){function xe(pe){xe.__super__.constructor.call(this,pe)}return Se(xe,be),xe.prototype.document=function(pe){var me,Ae,De,ke,Ie;for(this.textispresent=!1,ke="",Ie=pe.children,Ae=0,De=Ie.length;Ae<De;Ae++)me=Ie[Ae],ke+=function(){switch(!1){case!(me instanceof y):return this.declaration(me);case!(me instanceof z):return this.docType(me);case!(me instanceof re):return this.comment(me);case!(me instanceof ne):return this.processingInstruction(me);default:return this.element(me,0)}}.call(this);return this.pretty&&ke.slice(-this.newline.length)===this.newline&&(ke=ke.slice(0,-this.newline.length)),ke},xe.prototype.attribute=function(pe){return" "+pe.name+'="'+pe.value+'"'},xe.prototype.cdata=function(pe,me){return this.space(me)+"<![CDATA["+pe.text+"]]>"+this.newline},xe.prototype.comment=function(pe,me){return this.space(me)+"<!-- "+pe.text+" -->"+this.newline},xe.prototype.declaration=function(pe,me){var Ae;return Ae=this.space(me),Ae+='<?xml version="'+pe.version+'"',pe.encoding!=null&&(Ae+=' encoding="'+pe.encoding+'"'),pe.standalone!=null&&(Ae+=' standalone="'+pe.standalone+'"'),Ae+=this.spacebeforeslash+"?>",Ae+=this.newline},xe.prototype.docType=function(pe,me){var Ae,De,ke,Ie,Fe;if(me||(me=0),Ie=this.space(me),Ie+="<!DOCTYPE "+pe.root().name,pe.pubID&&pe.sysID?Ie+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(Ie+=' SYSTEM "'+pe.sysID+'"'),pe.children.length>0){for(Ie+=" [",Ie+=this.newline,Fe=pe.children,De=0,ke=Fe.length;De<ke;De++)Ae=Fe[De],Ie+=function(){switch(!1){case!(Ae instanceof ue):return this.dtdAttList(Ae,me+1);case!(Ae instanceof ee):return this.dtdElement(Ae,me+1);case!(Ae instanceof te):return this.dtdEntity(Ae,me+1);case!(Ae instanceof E):return this.dtdNotation(Ae,me+1);case!(Ae instanceof se):return this.cdata(Ae,me+1);case!(Ae instanceof re):return this.comment(Ae,me+1);case!(Ae instanceof ne):return this.processingInstruction(Ae,me+1);default:throw new Error("Unknown DTD node type: "+Ae.constructor.name)}}.call(this);Ie+="]"}return Ie+=this.spacebeforeslash+">",Ie+=this.newline},xe.prototype.element=function(pe,me){var Ae,De,ke,Ie,Fe,Pe,qe,Ke,ot,He,rt,Ge,ct;me||(me=0),ct=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Ge=this.space(me),Ke="",Ke+=Ge+"<"+pe.name,ot=pe.attributes;for(qe in ot)ve.call(ot,qe)&&(Ae=ot[qe],Ke+=this.attribute(Ae));if(pe.children.length===0||pe.children.every(function(We){return We.value===""}))this.allowEmpty?Ke+="></"+pe.name+">"+this.newline:Ke+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&pe.children.length===1&&pe.children[0].value!=null)Ke+=">",Ke+=pe.children[0].value,Ke+="</"+pe.name+">"+this.newline;else{if(this.dontprettytextnodes){for(He=pe.children,ke=0,Fe=He.length;ke<Fe;ke++)if(De=He[ke],De.value!=null){this.textispresent++,ct=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,Ge=this.space(me)),Ke+=">"+this.newline,rt=pe.children,Ie=0,Pe=rt.length;Ie<Pe;Ie++)De=rt[Ie],Ke+=function(){switch(!1){case!(De instanceof se):return this.cdata(De,me+1);case!(De instanceof re):return this.comment(De,me+1);case!(De instanceof x):return this.element(De,me+1);case!(De instanceof ae):return this.raw(De,me+1);case!(De instanceof oe):return this.text(De,me+1);case!(De instanceof ne):return this.processingInstruction(De,me+1);default:throw new Error("Unknown XML node type: "+De.constructor.name)}}.call(this);ct&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Ke+=Ge+"</"+pe.name+">"+this.newline}return Ke},xe.prototype.processingInstruction=function(pe,me){var Ae;return Ae=this.space(me)+"<?"+pe.target,pe.value&&(Ae+=" "+pe.value),Ae+=this.spacebeforeslash+"?>"+this.newline},xe.prototype.raw=function(pe,me){return this.space(me)+pe.value+this.newline},xe.prototype.text=function(pe,me){return this.space(me)+pe.value+this.newline},xe.prototype.dtdAttList=function(pe,me){var Ae;return Ae=this.space(me)+"<!ATTLIST "+pe.elementName+" "+pe.attributeName+" "+pe.attributeType,pe.defaultValueType!=="#DEFAULT"&&(Ae+=" "+pe.defaultValueType),pe.defaultValue&&(Ae+=' "'+pe.defaultValue+'"'),Ae+=this.spacebeforeslash+">"+this.newline},xe.prototype.dtdElement=function(pe,me){return this.space(me)+"<!ELEMENT "+pe.name+" "+pe.value+this.spacebeforeslash+">"+this.newline},xe.prototype.dtdEntity=function(pe,me){var Ae;return Ae=this.space(me)+"<!ENTITY",pe.pe&&(Ae+=" %"),Ae+=" "+pe.name,pe.value?Ae+=' "'+pe.value+'"':(pe.pubID&&pe.sysID?Ae+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(Ae+=' SYSTEM "'+pe.sysID+'"'),pe.nData&&(Ae+=" NDATA "+pe.nData)),Ae+=this.spacebeforeslash+">"+this.newline},xe.prototype.dtdNotation=function(pe,me){var Ae;return Ae=this.space(me)+"<!NOTATION "+pe.name,pe.pubID&&pe.sysID?Ae+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.pubID?Ae+=' PUBLIC "'+pe.pubID+'"':pe.sysID&&(Ae+=' SYSTEM "'+pe.sysID+'"'),Ae+=this.spacebeforeslash+">"+this.newline},xe.prototype.openNode=function(pe,me){var Ae,De,ke,Ie;if(me||(me=0),pe instanceof x){ke=this.space(me)+"<"+pe.name,Ie=pe.attributes;for(De in Ie)ve.call(Ie,De)&&(Ae=Ie[De],ke+=this.attribute(Ae));return ke+=(pe.children?">":"/>")+this.newline}return ke=this.space(me)+"<!DOCTYPE "+pe.rootNodeName,pe.pubID&&pe.sysID?ke+=' PUBLIC "'+pe.pubID+'" "'+pe.sysID+'"':pe.sysID&&(ke+=' SYSTEM "'+pe.sysID+'"'),ke+=(pe.children?" [":">")+this.newline},xe.prototype.closeNode=function(pe,me){switch(me||(me=0),!1){case!(pe instanceof x):return this.space(me)+"</"+pe.name+">"+this.newline;case!(pe instanceof z):return this.space(me)+"]>"+this.newline}},xe}(ge)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(ie,Ee,ce){"use strict";(function(){var se=function(ue,ee){return function(){return ue.apply(ee,arguments)}},re={}.hasOwnProperty;Ee.exports=function(){function ue(ee){this.assertLegalChar=se(this.assertLegalChar,this);var te,E,y;ee||(ee={}),this.noDoubleEncoding=ee.noDoubleEncoding,E=ee.stringify||{};for(te in E)re.call(E,te)&&(y=E[te],this[te]=y)}return ue.prototype.eleName=function(ee){return ee=""+ee||"",this.assertLegalChar(ee)},ue.prototype.eleText=function(ee){return ee=""+ee||"",this.assertLegalChar(this.elEscape(ee))},ue.prototype.cdata=function(ee){return ee=""+ee||"",ee=ee.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ee)},ue.prototype.comment=function(ee){if(ee=""+ee||"",ee.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ee);return this.assertLegalChar(ee)},ue.prototype.raw=function(ee){return""+ee||""},ue.prototype.attName=function(ee){return ee=""+ee||""},ue.prototype.attValue=function(ee){return ee=""+ee||"",this.attEscape(ee)},ue.prototype.insTarget=function(ee){return""+ee||""},ue.prototype.insValue=function(ee){if(ee=""+ee||"",ee.match(/\?>/))throw new Error("Invalid processing instruction value: "+ee);return ee},ue.prototype.xmlVersion=function(ee){if(ee=""+ee||"",!ee.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ee);return ee},ue.prototype.xmlEncoding=function(ee){if(ee=""+ee||"",!ee.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ee);return ee},ue.prototype.xmlStandalone=function(ee){return ee?"yes":"no"},ue.prototype.dtdPubID=function(ee){return""+ee||""},ue.prototype.dtdSysID=function(ee){return""+ee||""},ue.prototype.dtdElementValue=function(ee){return""+ee||""},ue.prototype.dtdAttType=function(ee){return""+ee||""},ue.prototype.dtdAttDefault=function(ee){return ee!=null?""+ee||"":ee},ue.prototype.dtdEntityValue=function(ee){return""+ee||""},ue.prototype.dtdNData=function(ee){return""+ee||""},ue.prototype.convertAttKey="@",ue.prototype.convertPIKey="?",ue.prototype.convertTextKey="#text",ue.prototype.convertCDataKey="#cdata",ue.prototype.convertCommentKey="#comment",ue.prototype.convertRawKey="#raw",ue.prototype.assertLegalChar=function(ee){var te;if(te=ee.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ee+" at index "+te.index);return ee},ue.prototype.elEscape=function(ee){var te;return te=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(te,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},ue.prototype.attEscape=function(ee){var te;return te=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(te,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},ue}()}).call(void 0)},{}],233:[function(ie,Ee,ce){"use strict";var se=ie("babel-runtime/core-js/object/create"),re=function(ue){return ue&&ue.__esModule?ue:{default:ue}}(se);(function(){var ue,ee=function(E,y){function z(){this.constructor=E}for(var x in y)te.call(y,x)&&(E[x]=y[x]);return z.prototype=y.prototype,E.prototype=new z,E.__super__=y.prototype,E},te={}.hasOwnProperty;ue=ie("./XMLNode"),Ee.exports=function(E){function y(z,x){if(y.__super__.constructor.call(this,z),x==null)throw new Error("Missing element text");this.value=this.stringify.eleText(x)}return ee(y,E),y.prototype.clone=function(){return(0,re.default)(this)},y.prototype.toString=function(z){return this.options.writer.set(z).text(this)},y}(ue)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(ie,Ee,ce){"use strict";(function(){var se={}.hasOwnProperty;Ee.exports=function(){function re(ue){var ee,te,E,y,z,x,ne,ae,oe;ue||(ue={}),this.pretty=ue.pretty||!1,this.allowEmpty=(te=ue.allowEmpty)!=null&&te,this.pretty?(this.indent=(E=ue.indent)!=null?E:" ",this.newline=(y=ue.newline)!=null?y:`
`,this.offset=(z=ue.offset)!=null?z:0,this.dontprettytextnodes=(x=ue.dontprettytextnodes)!=null?x:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(ne=ue.spacebeforeslash)!=null?ne:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ae=ue.writer||{};for(ee in ae)se.call(ae,ee)&&(oe=ae[ee],this[ee]=oe)}return re.prototype.set=function(ue){var ee,te,E;ue||(ue={}),"pretty"in ue&&(this.pretty=ue.pretty),"allowEmpty"in ue&&(this.allowEmpty=ue.allowEmpty),this.pretty?(this.indent="indent"in ue?ue.indent:" ",this.newline="newline"in ue?ue.newline:`
`,this.offset="offset"in ue?ue.offset:0,this.dontprettytextnodes="dontprettytextnodes"in ue?ue.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in ue?ue.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,te=ue.writer||{};for(ee in te)se.call(te,ee)&&(E=te[ee],this[ee]=E);return this},re.prototype.space=function(ue){var ee;return this.pretty?(ee=(ue||0)+this.offset+1,ee>0?new Array(ee).join(this.indent):""):""},re}()}).call(void 0)},{}],235:[function(ie,Ee,ce){"use strict";(function(){var se,re,ue,ee,te,E,y;y=ie("./Utility"),te=y.assign,E=y.isFunction,se=ie("./XMLDocument"),re=ie("./XMLDocumentCB"),ee=ie("./XMLStringWriter"),ue=ie("./XMLStreamWriter"),Ee.exports.create=function(z,x,ne,ae){var oe,ge;if(z==null)throw new Error("Root element needs a name");return ae=te({},x,ne,ae),oe=new se(ae),ge=oe.element(z),ae.headless||(oe.declaration(ae),ae.pubID==null&&ae.sysID==null||oe.doctype(ae)),ge},Ee.exports.begin=function(z,x,ne){var ae;return E(z)&&(ae=[z,x],x=ae[0],ne=ae[1],z={}),x?new re(z,x,ne):new se(z)},Ee.exports.stringWriter=function(z){return new ee(z)},Ee.exports.streamWriter=function(z,x){return new ue(z,x)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(ie,Ee,ce){function se(){for(var ue={},ee=0;ee<arguments.length;ee++){var te=arguments[ee];for(var E in te)re.call(te,E)&&(ue[E]=te[E])}return ue}Ee.exports=se;var re=Object.prototype.hasOwnProperty},{}],237:[function(ie,Ee,ce){"use strict";function se(ae,oe,ge){ee.isBuffer(oe)||(oe=new ee(oe)),ee.isBuffer(ge)||(ge=new ee(ge)),oe.length>x?oe=ae(oe):oe.length<x&&(oe=ee.concat([oe,ne],x));for(var Se=new ee(x),ve=new ee(x),be=0;be<x;be++)Se[be]=54^oe[be],ve[be]=92^oe[be];var xe=ae(ee.concat([Se,ge]));return ae(ee.concat([ve,xe]))}function re(ae,oe){ae=ae||"sha1";var ge=z[ae],Se=[],ve=0;return ge||ue("algorithm:",ae,"is not yet supported"),{update:function(be){return ee.isBuffer(be)||(be=new ee(be)),Se.push(be),ve+=be.length,this},digest:function(be){var xe=ee.concat(Se),pe=oe?se(ge,oe,xe):ge(xe);return Se=null,be?pe.toString(be):pe}}}function ue(){var ae=[].slice.call(arguments).join(" ");throw new Error([ae,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
`))}var ee=ie("buffer").Buffer,te=ie("./sha"),E=ie("./sha256"),y=ie("./md5"),z={sha1:te,sha256:E,md5:y},x=64,ne=new ee(x);ne.fill(0),ce.createHash=function(ae){return re(ae)},ce.createHmac=function(ae,oe){return re(ae,oe)},function(ae,oe){for(var ge in ae)oe(ae[ge],ge)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(ae){ce[ae]=function(){ue("sorry,",ae,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(ie,Ee,ce){"use strict";function se(z,x){if(z.length%te!=0){var ne=z.length+(te-z.length%te);z=ee.concat([z,E],ne)}for(var ae=[],oe=x?z.readInt32BE:z.readInt32LE,ge=0;ge<z.length;ge+=te)ae.push(oe.call(z,ge));return ae}function re(z,x,ne){for(var ae=new ee(x),oe=ne?ae.writeInt32BE:ae.writeInt32LE,ge=0;ge<z.length;ge++)oe.call(ae,z[ge],4*ge,!0);return ae}function ue(z,x,ne,ae){return ee.isBuffer(z)||(z=new ee(z)),re(x(se(z,ae),z.length*y),ne,ae)}var ee=ie("buffer").Buffer,te=4,E=new ee(te);E.fill(0);var y=8;Ee.exports={hash:ue}},{buffer:38}],239:[function(ie,Ee,ce){"use strict";function se(ne,ae){ne[ae>>5]|=128<<ae%32,ne[14+(ae+64>>>9<<4)]=ae;for(var oe=1732584193,ge=-271733879,Se=-1732584194,ve=271733878,be=0;be<ne.length;be+=16){var xe=oe,pe=ge,me=Se,Ae=ve;oe=ue(oe,ge,Se,ve,ne[be+0],7,-680876936),ve=ue(ve,oe,ge,Se,ne[be+1],12,-389564586),Se=ue(Se,ve,oe,ge,ne[be+2],17,606105819),ge=ue(ge,Se,ve,oe,ne[be+3],22,-1044525330),oe=ue(oe,ge,Se,ve,ne[be+4],7,-176418897),ve=ue(ve,oe,ge,Se,ne[be+5],12,1200080426),Se=ue(Se,ve,oe,ge,ne[be+6],17,-1473231341),ge=ue(ge,Se,ve,oe,ne[be+7],22,-45705983),oe=ue(oe,ge,Se,ve,ne[be+8],7,1770035416),ve=ue(ve,oe,ge,Se,ne[be+9],12,-1958414417),Se=ue(Se,ve,oe,ge,ne[be+10],17,-42063),ge=ue(ge,Se,ve,oe,ne[be+11],22,-1990404162),oe=ue(oe,ge,Se,ve,ne[be+12],7,1804603682),ve=ue(ve,oe,ge,Se,ne[be+13],12,-40341101),Se=ue(Se,ve,oe,ge,ne[be+14],17,-1502002290),ge=ue(ge,Se,ve,oe,ne[be+15],22,1236535329),oe=ee(oe,ge,Se,ve,ne[be+1],5,-165796510),ve=ee(ve,oe,ge,Se,ne[be+6],9,-1069501632),Se=ee(Se,ve,oe,ge,ne[be+11],14,643717713),ge=ee(ge,Se,ve,oe,ne[be+0],20,-373897302),oe=ee(oe,ge,Se,ve,ne[be+5],5,-701558691),ve=ee(ve,oe,ge,Se,ne[be+10],9,38016083),Se=ee(Se,ve,oe,ge,ne[be+15],14,-660478335),ge=ee(ge,Se,ve,oe,ne[be+4],20,-405537848),oe=ee(oe,ge,Se,ve,ne[be+9],5,568446438),ve=ee(ve,oe,ge,Se,ne[be+14],9,-1019803690),Se=ee(Se,ve,oe,ge,ne[be+3],14,-187363961),ge=ee(ge,Se,ve,oe,ne[be+8],20,1163531501),oe=ee(oe,ge,Se,ve,ne[be+13],5,-1444681467),ve=ee(ve,oe,ge,Se,ne[be+2],9,-51403784),Se=ee(Se,ve,oe,ge,ne[be+7],14,1735328473),ge=ee(ge,Se,ve,oe,ne[be+12],20,-1926607734),oe=te(oe,ge,Se,ve,ne[be+5],4,-378558),ve=te(ve,oe,ge,Se,ne[be+8],11,-2022574463),Se=te(Se,ve,oe,ge,ne[be+11],16,1839030562),ge=te(ge,Se,ve,oe,ne[be+14],23,-35309556),oe=te(oe,ge,Se,ve,ne[be+1],4,-1530992060),ve=te(ve,oe,ge,Se,ne[be+4],11,1272893353),Se=te(Se,ve,oe,ge,ne[be+7],16,-155497632),ge=te(ge,Se,ve,oe,ne[be+10],23,-1094730640),oe=te(oe,ge,Se,ve,ne[be+13],4,681279174),ve=te(ve,oe,ge,Se,ne[be+0],11,-358537222),Se=te(Se,ve,oe,ge,ne[be+3],16,-722521979),ge=te(ge,Se,ve,oe,ne[be+6],23,76029189),oe=te(oe,ge,Se,ve,ne[be+9],4,-640364487),ve=te(ve,oe,ge,Se,ne[be+12],11,-421815835),Se=te(Se,ve,oe,ge,ne[be+15],16,530742520),ge=te(ge,Se,ve,oe,ne[be+2],23,-995338651),oe=E(oe,ge,Se,ve,ne[be+0],6,-198630844),ve=E(ve,oe,ge,Se,ne[be+7],10,1126891415),Se=E(Se,ve,oe,ge,ne[be+14],15,-1416354905),ge=E(ge,Se,ve,oe,ne[be+5],21,-57434055),oe=E(oe,ge,Se,ve,ne[be+12],6,1700485571),ve=E(ve,oe,ge,Se,ne[be+3],10,-1894986606),Se=E(Se,ve,oe,ge,ne[be+10],15,-1051523),ge=E(ge,Se,ve,oe,ne[be+1],21,-2054922799),oe=E(oe,ge,Se,ve,ne[be+8],6,1873313359),ve=E(ve,oe,ge,Se,ne[be+15],10,-30611744),Se=E(Se,ve,oe,ge,ne[be+6],15,-1560198380),ge=E(ge,Se,ve,oe,ne[be+13],21,1309151649),oe=E(oe,ge,Se,ve,ne[be+4],6,-145523070),ve=E(ve,oe,ge,Se,ne[be+11],10,-1120210379),Se=E(Se,ve,oe,ge,ne[be+2],15,718787259),ge=E(ge,Se,ve,oe,ne[be+9],21,-343485551),oe=y(oe,xe),ge=y(ge,pe),Se=y(Se,me),ve=y(ve,Ae)}return Array(oe,ge,Se,ve)}function re(ne,ae,oe,ge,Se,ve){return y(z(y(y(ae,ne),y(ge,ve)),Se),oe)}function ue(ne,ae,oe,ge,Se,ve,be){return re(ae&oe|~ae&ge,ne,ae,Se,ve,be)}function ee(ne,ae,oe,ge,Se,ve,be){return re(ae&ge|oe&~ge,ne,ae,Se,ve,be)}function te(ne,ae,oe,ge,Se,ve,be){return re(ae^oe^ge,ne,ae,Se,ve,be)}function E(ne,ae,oe,ge,Se,ve,be){return re(oe^(ae|~ge),ne,ae,Se,ve,be)}function y(ne,ae){var oe=(65535&ne)+(65535&ae);return(ne>>16)+(ae>>16)+(oe>>16)<<16|65535&oe}function z(ne,ae){return ne<<ae|ne>>>32-ae}var x=ie("./helpers");Ee.exports=function(ne){return x.hash(ne,se,16)}},{"./helpers":238}],240:[function(ie,Ee,ce){"use strict";function se(y,z){y[z>>5]|=128<<24-z%32,y[15+(z+64>>9<<4)]=z;for(var x=Array(80),ne=1732584193,ae=-271733879,oe=-1732584194,ge=271733878,Se=-1009589776,ve=0;ve<y.length;ve+=16){for(var be=ne,xe=ae,pe=oe,me=ge,Ae=Se,De=0;De<80;De++){x[De]=De<16?y[ve+De]:te(x[De-3]^x[De-8]^x[De-14]^x[De-16],1);var ke=ee(ee(te(ne,5),re(De,ae,oe,ge)),ee(ee(Se,x[De]),ue(De)));Se=ge,ge=oe,oe=te(ae,30),ae=ne,ne=ke}ne=ee(ne,be),ae=ee(ae,xe),oe=ee(oe,pe),ge=ee(ge,me),Se=ee(Se,Ae)}return Array(ne,ae,oe,ge,Se)}function re(y,z,x,ne){return y<20?z&x|~z&ne:y<40?z^x^ne:y<60?z&x|z&ne|x&ne:z^x^ne}function ue(y){return y<20?1518500249:y<40?1859775393:y<60?-1894007588:-899497514}function ee(y,z){var x=(65535&y)+(65535&z);return(y>>16)+(z>>16)+(x>>16)<<16|65535&x}function te(y,z){return y<<z|y>>>32-z}var E=ie("./helpers");Ee.exports=function(y){return E.hash(y,se,20,!0)}},{"./helpers":238}],241:[function(ie,Ee,ce){"use strict";var se=ie("./helpers"),re=function(oe,ge){var Se=(65535&oe)+(65535&ge);return(oe>>16)+(ge>>16)+(Se>>16)<<16|65535&Se},ue=function(oe,ge){return oe>>>ge|oe<<32-ge},ee=function(oe,ge){return oe>>>ge},te=function(oe,ge,Se){return oe&ge^~oe&Se},E=function(oe,ge,Se){return oe&ge^oe&Se^ge&Se},y=function(oe){return ue(oe,2)^ue(oe,13)^ue(oe,22)},z=function(oe){return ue(oe,6)^ue(oe,11)^ue(oe,25)},x=function(oe){return ue(oe,7)^ue(oe,18)^ee(oe,3)},ne=function(oe){return ue(oe,17)^ue(oe,19)^ee(oe,10)},ae=function(oe,ge){var Se,ve,be,xe,pe,me,Ae,De,ke,Ie,Fe,Pe,qe=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),Ke=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),ot=new Array(64);oe[ge>>5]|=128<<24-ge%32,oe[15+(ge+64>>9<<4)]=ge;for(var ke=0;ke<oe.length;ke+=16){Se=Ke[0],ve=Ke[1],be=Ke[2],xe=Ke[3],pe=Ke[4],me=Ke[5],Ae=Ke[6],De=Ke[7];for(var Ie=0;Ie<64;Ie++)ot[Ie]=Ie<16?oe[Ie+ke]:re(re(re(ne(ot[Ie-2]),ot[Ie-7]),x(ot[Ie-15])),ot[Ie-16]),Fe=re(re(re(re(De,z(pe)),te(pe,me,Ae)),qe[Ie]),ot[Ie]),Pe=re(y(Se),E(Se,ve,be)),De=Ae,Ae=me,me=pe,pe=re(xe,Fe),xe=be,be=ve,ve=Se,Se=re(Fe,Pe);Ke[0]=re(Se,Ke[0]),Ke[1]=re(ve,Ke[1]),Ke[2]=re(be,Ke[2]),Ke[3]=re(xe,Ke[3]),Ke[4]=re(pe,Ke[4]),Ke[5]=re(me,Ke[5]),Ke[6]=re(Ae,Ke[6]),Ke[7]=re(De,Ke[7])}return Ke};Ee.exports=function(oe){return se.hash(oe,ae,32,!0)}},{"./helpers":238}],242:[function(ie,Ee,ce){(function(se){"use strict";function re(ae){return ae&&ae.__esModule?ae:{default:ae}}var ue=ie("babel-runtime/core-js/object/create"),ee=re(ue),te=ie("babel-runtime/helpers/classCallCheck"),E=re(te),y=ie("babel-runtime/helpers/createClass"),z=re(y),x=ie("babel-runtime/helpers/typeof"),ne=re(x);(function(ae){if((ce===void 0?"undefined":(0,ne.default)(ce))==="object"&&Ee!==void 0)Ee.exports=ae();else if(typeof de=="function"&&de.amd)de([],ae);else{var oe;oe=typeof window!="undefined"?window:se!==void 0?se:typeof self!="undefined"?self:this,oe.mime=ae()}})(function(){return function ae(oe,ge,Se){function ve(pe,me){if(!ge[pe]){if(!oe[pe]){var Ae=typeof ie=="function"&&ie;if(!me&&Ae)return Ae(pe,!0);if(be)return be(pe,!0);var De=new Error("Cannot find module '"+pe+"'");throw De.code="MODULE_NOT_FOUND",De}var ke=ge[pe]={exports:{}};oe[pe][0].call(ke.exports,function(Ie){var Fe=oe[pe][1][Ie];return ve(Fe||Ie)},ke,ke.exports,ae,oe,ge,Se)}return ge[pe].exports}for(var be=typeof ie=="function"&&ie,xe=0;xe<Se.length;xe++)ve(Se[xe]);return ve}({1:[function(ae,oe,ge){var Se=function(){function ve(){(0,E.default)(this,ve),this._types=(0,ee.default)(null),this._extensions=(0,ee.default)(null);for(var be=0;be<arguments.length;be++)this.define(arguments[be])}return(0,z.default)(ve,[{key:"define",value:function(be,xe){for(var pe in be){for(var me=be[pe],Ae=0;Ae<me.length;Ae++){var De=me[Ae];if(!xe&&De in this._types)throw new Error('Attempt to change mapping for "'+De+'" extension from "'+this._types[De]+'" to "'+pe+'". Pass `force=true` to allow this, otherwise remove "'+De+'" from the list of extensions for "'+pe+'".');this._types[De]=pe}!xe&&this._extensions[pe]||(this._extensions[pe]=me[0])}}},{key:"getType",value:function(be){be=String(be);var xe=be.replace(/^.*[\/\\]/,"").toLowerCase(),pe=xe.replace(/^.*\./,"").toLowerCase(),me=xe.length<be.length;return(pe.length<xe.length-1||!me)&&this._types[pe]||null}},{key:"getExtension",value:function(be){return(be=/^\s*([^;\s]*)/.test(be)&&RegExp.$1)&&this._extensions[be.toLowerCase()]||null}}]),ve}();oe.exports=Se},{}],2:[function(ae,oe,ge){var Se=ae("./Mime");oe.exports=new Se(ae("./types/standard"),ae("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(ae,oe,ge){oe.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(ae,oe,ge){oe.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof we.g!="undefined"?we.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(ie,Ee,ce){"use strict";ce.encodeURIComponent=function(se){try{return encodeURIComponent(se)}catch(re){return se}},ce.escape=ie("escape-html"),ce.timestamp=function(se){if(se){var re=se;return typeof re=="string"&&(re=Number(re)),String(se).length===10&&(re*=1e3),new Date(re)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(ie,Ee,ce){(function(se,re){"use strict";function ue(De){return De&&De.__esModule?De:{default:De}}function ee(De,ke){return De===void 0?ke:De}function te(De,ke){return function(Ie,Fe,Pe){if(Ie)return ke(Ie);De({data:Fe,status:Pe.statusCode,headers:Pe.headers,res:Pe})}}var E,y=ie("babel-runtime/core-js/json/stringify"),z=ue(y),x=ie("babel-runtime/helpers/typeof"),ne=ue(x),ae=ie("util"),oe=ie("url"),ge=ie("http"),Se=ie("https"),ve=ie("debug")("urllib"),be=ie("humanize-ms"),xe=0,pe=Math.pow(2,31)-10,me=/^https?:\/\//i;ce.TIMEOUTS=[be("300s"),be("300s")];var Ae=["json","text"];ce.request=function(De,ke,Ie){return arguments.length===2&&typeof ke=="function"&&(Ie=ke,ke=null),typeof Ie=="function"?ce.requestWithCallback(De,ke,Ie):(E||(E=ie("any-promise")),new E(function(Fe,Pe){ce.requestWithCallback(De,ke,te(Fe,Pe))}))},ce.requestWithCallback=function(De,ke,Ie){function Fe(){Tt&&(clearTimeout(Tt),Tt=null)}function Pe(){Re&&(clearTimeout(Re),Re=null)}function qe(ut,Ht,At){if(Pe(),!Ie)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),We,se.pid,gt.method,De),void(ut&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),We,se.pid,ut.name,ut.message,ut.stack));var Wt=Ie;Ie=null;var on={};if(At&&(le=At.statusCode,on=At.headers),le===401&&on["www-authenticate"]&&(!ke.headers||!ke.headers.Authorization)&&ke.digestAuth){var bn=on["www-authenticate"];if(bn.indexOf("Digest ")>=0)return ve("Request#%d %s: got digest auth header WWW-Authenticate: %s",We,De,bn),ke.headers=ke.headers||{},ke.headers.Authorization=digestAuthHeader(gt.method,gt.path,bn,ke.digestAuth),ve("Request#%d %s: auth with digest header: %s",We,De,ke.headers.Authorization),At.headers["set-cookie"]&&(ke.headers.Cookie=At.headers["set-cookie"].join(";")),ce.requestWithCallback(De,ke,Wt)}var Yt=Date.now()-Je;Oe&&(Oe.contentDownload=Yt),ve("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Yt,ye,le,gt.method,gt.host,gt.path,je,Oe);var Mn={status:le,statusCode:le,headers:on,size:ye,aborted:_e,rt:Yt,keepAliveSocket:je,data:Ht,requestUrls:ke.requestUrls,timing:Oe,remoteAddress:Ne,remotePort:Ye};if(ut){var Yn="";ht&&typeof ht.getCurrentStatus=="function"&&(Yn=", agent status: "+(0,z.default)(ht.getCurrentStatus())),ut.message+=", "+gt.method+" "+De+" "+le+" (connected: "+Te+", keepalive socket: "+je+Yn+`)
headers: `+(0,z.default)(on),ut.data=Ht,ut.path=gt.path,ut.status=le,ut.headers=on,ut.res=Mn}Wt(ut,Ht,ke.streaming?At:Mn),ke.emitter&&(Ue.url=De,Ue.socket=Dt&&Dt.connection,Ue.options=gt,Ue.size=ft,ke.emitter.emit("response",{requestId:We,error:ut,ctx:ke.ctx,req:Ue,res:Mn}))}function Ke(ut){var Ht=null;if(ke.followRedirect&&statuses.redirect[ut.statusCode]){ke._followRedirectCount=(ke._followRedirectCount||0)+1;var At=ut.headers.location;if(At){if(!(ke._followRedirectCount>ke.maxRedirects)){var Wt=ke.formatRedirectUrl?ke.formatRedirectUrl(De,At):oe.resolve(De,At);ve("Request#%d %s: `redirected` from %s to %s",We,gt.path,De,Wt),Pe(),ke.headers&&ke.headers.Host&&me.test(At)&&(ke.headers.Host=null);var on=Ie;return Ie=null,ce.requestWithCallback(Wt,ke,on),{redirect:!0,error:null}}Ht=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+De),Ht.name="MaxRedirectError"}else Ht=new Error("Got statusCode "+ut.statusCode+" but cannot resolve next location from headers"),Ht.name="FollowRedirectError"}return{redirect:!1,error:Ht}}function ot(ut,Ht,At){return At(null,Ht,ut.headers["content-encoding"])}function He(ut){if(Oe&&(Oe.waiting=Date.now()-Je),ve("Request#%d %s `req response` event emit: status %d, headers: %j",We,De,ut.statusCode,ut.headers),ke.streaming){var Ht=Ke(ut);return Ht.redirect?void ut.resume():Ht.error?(ut.resume(),qe(Ht.error,null,ut)):qe(null,null,ut)}if(ut.on("close",function(){ve("Request#%d %s: `res close` event emit, total size %d",We,De,ye)}),ut.on("error",function(){ve("Request#%d %s: `res error` event emit, total size %d",We,De,ye)}),ut.on("aborted",function(){_e=!0,ve("Request#%d %s: `res aborted` event emit, total size %d",We,De,ye)}),tt){var Ht=Ke(ut);return Ht.redirect?void ut.resume():Ht.error?(ut.resume(),tt.end(),qe(Ht.error,null,ut)):(ke.consumeWriteStream===!1?ut.on("end",qe.bind(null,null,null,ut)):isNode010||isNode012?first([[tt,"close"],[ut,"aborted"]],function(on,bn,Yt){ve("Request#%d %s: writeStream or res %s event emitted",We,De,Yt),qe(Le||null,null,ut)}):tt.on("close",function(){ve("Request#%d %s: writeStream close event emitted",We,De),qe(Le||null,null,ut)}),ut.pipe(tt))}var At=[];ut.on("data",function(Wt){ve("Request#%d %s: `res data` event emit, size %d",We,De,Wt.length),ye+=Wt.length,At.push(Wt)}),ut.on("end",function(){var Wt=re.concat(At,ye);if(ve("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",We,De,ye,ut._dumped),Le)return qe(Le,Wt,ut);var on=Ke(ut);if(on.error)return qe(on.error,Wt,ut);on.redirect||ot(ut,Wt,function(bn,Yt,Mn){if(bn)return qe(bn,Wt,ut);if(!Mn&&Ae.indexOf(ke.dataType)>=0){try{Yt=decodeBodyByCharset(Yt,ut)}catch(Vn){return ve("decodeBodyByCharset error: %s",Vn),qe(null,Yt,ut)}if(ke.dataType==="json")if(ye===0)Yt=null;else{var Yn=parseJSON(Yt,Pt);Yn.error?bn=Yn.error:Yt=Yn.data}}_e&&ve("Request#%d %s: Remote socket was terminated before `response.end()` was called",We,De),qe(bn,Yt,ut)})})}function rt(){ve("Response timer ticking, timeout: %d",Nt),Re=setTimeout(function(){Re=null;var ut="Response timeout for "+Nt+"ms";Le=new Error(ut),Le.name="ResponseTimeoutError",Le.requestId=We,ve("ResponseTimeout: Request#%d %s %s: %s, connected: %s",We,De,Le.name,ut,Te),Ge()},Nt)}function Ge(){ve("Request#%d %s abort, connected: %s",We,De,Te),Dt.socket||(Le.noSocket=!0,qe(Le)),Dt.abort()}if(!De||typeof De!="string"&&(De===void 0?"undefined":(0,ne.default)(De))!=="object"){var ct=ae.format("expect request url to be a string or a http request options, but got %j",De);throw new Error(ct)}arguments.length===2&&typeof ke=="function"&&(Ie=ke,ke=null),ke=ke||{},xe>=pe&&(xe=0);var We=++xe;ke.requestUrls=ke.requestUrls||[];var Ue={requestId:We,url:De,args:ke,ctx:ke.ctx};ke.emitter&&ke.emitter.emit("request",Ue),ke.timeout=ke.timeout||ce.TIMEOUTS,ke.maxRedirects=ke.maxRedirects||10,ke.streaming=ke.streaming||ke.customResponse;var Ze,Je=Date.now();typeof De=="string"?(me.test(De)||(De="http://"+De),Ze=oe.parse(De)):Ze=De;var $e=(ke.type||ke.method||Ze.method||"GET").toUpperCase(),Qe=Ze.port||80,pt=ge,ht=ee(ke.agent,ce.agent),Pt=ke.fixJSONCtlChars;Ze.protocol==="https:"&&(pt=Se,ht=ee(ke.httpsAgent,ce.httpsAgent),Ze.port||(Qe=443));var gt={host:Ze.hostname||Ze.host||"localhost",path:Ze.path||"/",method:$e,port:Qe,agent:ht,headers:ke.headers||{},lookup:ke.lookup};Array.isArray(ke.timeout)?gt.requestTimeout=ke.timeout[ke.timeout.length-1]:ke.timeout!==void 0&&(gt.requestTimeout=ke.timeout);for(var bt=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],St=0;St<bt.length;St++){var lt=bt[St];ke.hasOwnProperty(lt)&&(gt[lt]=ke[lt])}gt.rejectUnauthorized!==!1||gt.hasOwnProperty("secureOptions")||(gt.secureOptions=ie("constants").SSL_OP_NO_TLSv1_2);var _t=ke.auth||Ze.auth;_t&&(gt.auth=_t);var dt=ke.content||ke.data,nt=$e==="GET"||$e==="HEAD"||ke.dataAsQueryString;if(!ke.content&&dt&&typeof dt!="string"&&!re.isBuffer(dt))if(nt)dt=ke.nestedQuerystring?qs.stringify(dt):querystring.stringify(dt);else{var et=gt.headers["Content-Type"]||gt.headers["content-type"];et||(et=ke.contentType==="json"?"application/json":"application/x-www-form-urlencoded",gt.headers["Content-Type"]=et),dt=parseContentType(et).type==="application/json"?(0,z.default)(dt):ke.nestedQuerystring?qs.stringify(dt):querystring.stringify(dt)}nt&&dt&&(gt.path+=(Ze.query?"&":"?")+dt,dt=null);var ft=0;if(dt){var wt=dt.length;re.isBuffer(dt)||(wt=re.byteLength(dt)),ft=gt.headers["Content-Length"]=wt}ke.dataType==="json"&&(gt.headers.Accept="application/json"),typeof ke.beforeRequest=="function"&&ke.beforeRequest(gt);var Tt=null,Re=null,Le=null,Te=!1,je=!1,ye=0,le=-1,_e=!1,Ne="",Ye="",Oe=null;ke.timing&&(Oe={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),gt.headers["User-Agent"]||gt.headers["user-agent"]||(gt.headers["User-Agent"]=navigator.userAgent),ke.gzip&&(gt.headers["Accept-Encoding"]||gt.headers["accept-encoding"]||(gt.headers["Accept-Encoding"]="gzip"));var tt=ke.writeStream;ve("Request#%d %s %s with headers %j, options.path: %s",We,$e,De,gt.headers,gt.path),ke.requestUrls.push(De);var Ct,Nt;Array.isArray(ke.timeout)?(Ct=be(ke.timeout[0]),Nt=be(ke.timeout[1])):Ct=Nt=be(ke.timeout),ve("ConnectTimeout: %d, ResponseTimeout: %d",Ct,Nt);var Dt;try{Dt=pt.request(gt,He)}catch(ut){return qe(ut)}return typeof window=="undefined"?function(){ve("Connect timer ticking, timeout: %d",Ct),Tt=setTimeout(function(){Tt=null,le===-1&&(le=-2);var ut="Connect timeout for "+Ct+"ms",Ht="ConnectionTimeoutError";Dt.socket||(Ht="SocketAssignTimeoutError",ut+=", working sockets is full"),Le=new Error(ut),Le.name=Ht,Le.requestId=We,ve("ConnectTimeout: Request#%d %s %s: %s, connected: %s",We,De,Le.name,ut,Te),Ge()},Ct)}():Dt.on("requestTimeout",function(){le===-1&&(le=-2);var ut="Connect timeout for "+Ct+"ms";Le=new Error(ut),Le.name="ConnectionTimeoutError",Le.requestId=We,Ge()}),Oe&&Dt.on("finish",function(){Oe.requestSent=Date.now()-Je}),Dt.once("socket",function(ut){Oe&&(Oe.queuing=Date.now()-Je),isNode010&&ut.socket&&(ut=ut.socket);var Ht=ut.readyState;if(Ht==="opening")return ut.once("lookup",function(At,Wt,on){ve("Request#%d %s lookup: %s, %s, %s",We,De,At,Wt,on),Oe&&(Oe.dnslookup=Date.now()-Je),Wt&&(Ne=Wt)}),void ut.once("connect",function(){Oe&&(Oe.connected=Date.now()-Je),Fe(),rt(),ve("Request#%d %s new socket connected",We,De),Te=!0,Ne||(Ne=ut.remoteAddress),Ye=ut.remotePort});ve("Request#%d %s reuse socket connected, readyState: %s",We,De,Ht),Te=!0,je=!0,Ne||(Ne=ut.remoteAddress),Ye=ut.remotePort,Fe(),rt()}),Dt.on("error",function(ut){ut.name!=="Error"&&ut.name!=="TypeError"||(ut.name=Te?"ResponseError":"RequestError"),ut.message+=' (req "error")',ve("Request#%d %s `req error` event emit, %s: %s",We,De,ut.name,ut.message),qe(Le||ut)}),tt&&tt.once("error",function(ut){ut.message+=' (writeStream "error")',Le=ut,ve("Request#%d %s `writeStream error` event emit, %s: %s",We,De,ut.name,ut.message),Ge()}),ke.stream?(ke.stream.pipe(Dt),ke.stream.once("error",function(ut){ut.message+=' (stream "error")',Le=ut,ve("Request#%d %s `readStream error` event emit, %s: %s",We,De,ut.name,ut.message),Ge()})):Dt.end(dt),Dt.requestId=We,Dt}}).call(this,ie("_process"),ie("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(de){function ie(ce){if(Ee[ce])return Ee[ce].exports;var se=Ee[ce]={i:ce,l:!1,exports:{}};return de[ce].call(se.exports,se,se.exports,ie),se.l=!0,se.exports}var Ee={};ie.m=de,ie.c=Ee,ie.d=function(ce,se,re){ie.o(ce,se)||Object.defineProperty(ce,se,{configurable:!1,enumerable:!0,get:re})},ie.n=function(ce){var se=ce&&ce.__esModule?function(){return ce.default}:function(){return ce};return ie.d(se,"a",se),se},ie.o=function(ce,se){return Object.prototype.hasOwnProperty.call(ce,se)},ie.p="",ie(ie.s=12)}([function(de,ie,Ee){(function(ce,se){de.exports=ie=se()})(0,function(){var ce=ce||function(se,re){var ue=Object.create||function(){function Se(){}return function(ve){var be;return Se.prototype=ve,be=new Se,Se.prototype=null,be}}(),ee={},te=ee.lib={},E=te.Base=function(){return{extend:function(Se){var ve=ue(this);return Se&&ve.mixIn(Se),ve.hasOwnProperty("init")&&this.init!==ve.init||(ve.init=function(){ve.$super.init.apply(this,arguments)}),ve.init.prototype=ve,ve.$super=this,ve},create:function(){var Se=this.extend();return Se.init.apply(Se,arguments),Se},init:function(){},mixIn:function(Se){for(var ve in Se)Se.hasOwnProperty(ve)&&(this[ve]=Se[ve]);Se.hasOwnProperty("toString")&&(this.toString=Se.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),y=te.WordArray=E.extend({init:function(Se,ve){Se=this.words=Se||[],this.sigBytes=ve!=null?ve:4*Se.length},toString:function(Se){return(Se||x).stringify(this)},concat:function(Se){var ve=this.words,be=Se.words,xe=this.sigBytes,pe=Se.sigBytes;if(this.clamp(),xe%4)for(var me=0;me<pe;me++){var Ae=be[me>>>2]>>>24-me%4*8&255;ve[xe+me>>>2]|=Ae<<24-(xe+me)%4*8}else for(var me=0;me<pe;me+=4)ve[xe+me>>>2]=be[me>>>2];return this.sigBytes+=pe,this},clamp:function(){var Se=this.words,ve=this.sigBytes;Se[ve>>>2]&=4294967295<<32-ve%4*8,Se.length=se.ceil(ve/4)},clone:function(){var Se=E.clone.call(this);return Se.words=this.words.slice(0),Se},random:function(Se){for(var ve,be=[],xe=0;xe<Se;xe+=4){var pe=function(Ae){var Ae=Ae,De=987654321,ke=4294967295;return function(){De=36969*(65535&De)+(De>>16)&ke,Ae=18e3*(65535&Ae)+(Ae>>16)&ke;var Ie=(De<<16)+Ae&ke;return Ie/=4294967296,(Ie+=.5)*(se.random()>.5?1:-1)}}(4294967296*(ve||se.random()));ve=987654071*pe(),be.push(4294967296*pe()|0)}return new y.init(be,Se)}}),z=ee.enc={},x=z.Hex={stringify:function(Se){for(var ve=Se.words,be=Se.sigBytes,xe=[],pe=0;pe<be;pe++){var me=ve[pe>>>2]>>>24-pe%4*8&255;xe.push((me>>>4).toString(16)),xe.push((15&me).toString(16))}return xe.join("")},parse:function(Se){for(var ve=Se.length,be=[],xe=0;xe<ve;xe+=2)be[xe>>>3]|=parseInt(Se.substr(xe,2),16)<<24-xe%8*4;return new y.init(be,ve/2)}},ne=z.Latin1={stringify:function(Se){for(var ve=Se.words,be=Se.sigBytes,xe=[],pe=0;pe<be;pe++){var me=ve[pe>>>2]>>>24-pe%4*8&255;xe.push(String.fromCharCode(me))}return xe.join("")},parse:function(Se){for(var ve=Se.length,be=[],xe=0;xe<ve;xe++)be[xe>>>2]|=(255&Se.charCodeAt(xe))<<24-xe%4*8;return new y.init(be,ve)}},ae=z.Utf8={stringify:function(Se){try{return decodeURIComponent(escape(ne.stringify(Se)))}catch(ve){throw new Error("Malformed UTF-8 data")}},parse:function(Se){return ne.parse(unescape(encodeURIComponent(Se)))}},oe=te.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(Se){typeof Se=="string"&&(Se=ae.parse(Se)),this._data.concat(Se),this._nDataBytes+=Se.sigBytes},_process:function(Se){var ve=this._data,be=ve.words,xe=ve.sigBytes,pe=this.blockSize,me=4*pe,Ae=xe/me;Ae=Se?se.ceil(Ae):se.max((0|Ae)-this._minBufferSize,0);var De=Ae*pe,ke=se.min(4*De,xe);if(De){for(var Ie=0;Ie<De;Ie+=pe)this._doProcessBlock(be,Ie);var Fe=be.splice(0,De);ve.sigBytes-=ke}return new y.init(Fe,ke)},clone:function(){var Se=E.clone.call(this);return Se._data=this._data.clone(),Se},_minBufferSize:0}),ge=(te.Hasher=oe.extend({cfg:E.extend(),init:function(Se){this.cfg=this.cfg.extend(Se),this.reset()},reset:function(){oe.reset.call(this),this._doReset()},update:function(Se){return this._append(Se),this._process(),this},finalize:function(Se){return Se&&this._append(Se),this._doFinalize()},blockSize:16,_createHelper:function(Se){return function(ve,be){return new Se.init(be).finalize(ve)}},_createHmacHelper:function(Se){return function(ve,be){return new ge.HMAC.init(Se,be).finalize(ve)}}}),ee.algo={});return ee}(Math);return ce})},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"detectIEVersion",value:function(){for(var ee=4,te=document.createElement("div"),E=te.getElementsByTagName("i");te.innerHTML="<!--[if gt IE "+ee+"]><i></i><![endif]-->",E[0];)ee++;return ee>4&&ee}},{key:"extend",value:function(ee,te){for(var E in te)Object.prototype.hasOwnProperty.call(te,E)&&te[E]&&(ee[E]=te[E])}},{key:"isArray",value:function(ee){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ee){return ee=ee.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ee)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ee)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ee)?"img":"other"}},{key:"isImage",value:function(ee){return ee=ee.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ee)}},{key:"ISODateString",value:function(ee){function te(E){return E<10?"0"+E:E}return ee.getUTCFullYear()+"-"+te(ee.getUTCMonth()+1)+"-"+te(ee.getUTCDate())+"T"+te(ee.getUTCHours())+":"+te(ee.getUTCMinutes())+":"+te(ee.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ee){return!!/^\d+$/.test(ee)}}]),ue}();ie.default=re},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return function(se){function re(ge,Se,ve,be,xe,pe,me){var Ae=ge+(Se&ve|~Se&be)+xe+me;return(Ae<<pe|Ae>>>32-pe)+Se}function ue(ge,Se,ve,be,xe,pe,me){var Ae=ge+(Se&be|ve&~be)+xe+me;return(Ae<<pe|Ae>>>32-pe)+Se}function ee(ge,Se,ve,be,xe,pe,me){var Ae=ge+(Se^ve^be)+xe+me;return(Ae<<pe|Ae>>>32-pe)+Se}function te(ge,Se,ve,be,xe,pe,me){var Ae=ge+(ve^(Se|~be))+xe+me;return(Ae<<pe|Ae>>>32-pe)+Se}var E=ce,y=E.lib,z=y.WordArray,x=y.Hasher,ne=E.algo,ae=[];(function(){for(var ge=0;ge<64;ge++)ae[ge]=4294967296*se.abs(se.sin(ge+1))|0})();var oe=ne.MD5=x.extend({_doReset:function(){this._hash=new z.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(ge,Se){for(var ve=0;ve<16;ve++){var be=Se+ve,xe=ge[be];ge[be]=16711935&(xe<<8|xe>>>24)|4278255360&(xe<<24|xe>>>8)}var pe=this._hash.words,me=ge[Se+0],Ae=ge[Se+1],De=ge[Se+2],ke=ge[Se+3],Ie=ge[Se+4],Fe=ge[Se+5],Pe=ge[Se+6],qe=ge[Se+7],Ke=ge[Se+8],ot=ge[Se+9],He=ge[Se+10],rt=ge[Se+11],Ge=ge[Se+12],ct=ge[Se+13],We=ge[Se+14],Ue=ge[Se+15],Ze=pe[0],Je=pe[1],$e=pe[2],Qe=pe[3];Ze=re(Ze,Je,$e,Qe,me,7,ae[0]),Qe=re(Qe,Ze,Je,$e,Ae,12,ae[1]),$e=re($e,Qe,Ze,Je,De,17,ae[2]),Je=re(Je,$e,Qe,Ze,ke,22,ae[3]),Ze=re(Ze,Je,$e,Qe,Ie,7,ae[4]),Qe=re(Qe,Ze,Je,$e,Fe,12,ae[5]),$e=re($e,Qe,Ze,Je,Pe,17,ae[6]),Je=re(Je,$e,Qe,Ze,qe,22,ae[7]),Ze=re(Ze,Je,$e,Qe,Ke,7,ae[8]),Qe=re(Qe,Ze,Je,$e,ot,12,ae[9]),$e=re($e,Qe,Ze,Je,He,17,ae[10]),Je=re(Je,$e,Qe,Ze,rt,22,ae[11]),Ze=re(Ze,Je,$e,Qe,Ge,7,ae[12]),Qe=re(Qe,Ze,Je,$e,ct,12,ae[13]),$e=re($e,Qe,Ze,Je,We,17,ae[14]),Je=re(Je,$e,Qe,Ze,Ue,22,ae[15]),Ze=ue(Ze,Je,$e,Qe,Ae,5,ae[16]),Qe=ue(Qe,Ze,Je,$e,Pe,9,ae[17]),$e=ue($e,Qe,Ze,Je,rt,14,ae[18]),Je=ue(Je,$e,Qe,Ze,me,20,ae[19]),Ze=ue(Ze,Je,$e,Qe,Fe,5,ae[20]),Qe=ue(Qe,Ze,Je,$e,He,9,ae[21]),$e=ue($e,Qe,Ze,Je,Ue,14,ae[22]),Je=ue(Je,$e,Qe,Ze,Ie,20,ae[23]),Ze=ue(Ze,Je,$e,Qe,ot,5,ae[24]),Qe=ue(Qe,Ze,Je,$e,We,9,ae[25]),$e=ue($e,Qe,Ze,Je,ke,14,ae[26]),Je=ue(Je,$e,Qe,Ze,Ke,20,ae[27]),Ze=ue(Ze,Je,$e,Qe,ct,5,ae[28]),Qe=ue(Qe,Ze,Je,$e,De,9,ae[29]),$e=ue($e,Qe,Ze,Je,qe,14,ae[30]),Je=ue(Je,$e,Qe,Ze,Ge,20,ae[31]),Ze=ee(Ze,Je,$e,Qe,Fe,4,ae[32]),Qe=ee(Qe,Ze,Je,$e,Ke,11,ae[33]),$e=ee($e,Qe,Ze,Je,rt,16,ae[34]),Je=ee(Je,$e,Qe,Ze,We,23,ae[35]),Ze=ee(Ze,Je,$e,Qe,Ae,4,ae[36]),Qe=ee(Qe,Ze,Je,$e,Ie,11,ae[37]),$e=ee($e,Qe,Ze,Je,qe,16,ae[38]),Je=ee(Je,$e,Qe,Ze,He,23,ae[39]),Ze=ee(Ze,Je,$e,Qe,ct,4,ae[40]),Qe=ee(Qe,Ze,Je,$e,me,11,ae[41]),$e=ee($e,Qe,Ze,Je,ke,16,ae[42]),Je=ee(Je,$e,Qe,Ze,Pe,23,ae[43]),Ze=ee(Ze,Je,$e,Qe,ot,4,ae[44]),Qe=ee(Qe,Ze,Je,$e,Ge,11,ae[45]),$e=ee($e,Qe,Ze,Je,Ue,16,ae[46]),Je=ee(Je,$e,Qe,Ze,De,23,ae[47]),Ze=te(Ze,Je,$e,Qe,me,6,ae[48]),Qe=te(Qe,Ze,Je,$e,qe,10,ae[49]),$e=te($e,Qe,Ze,Je,We,15,ae[50]),Je=te(Je,$e,Qe,Ze,Fe,21,ae[51]),Ze=te(Ze,Je,$e,Qe,Ge,6,ae[52]),Qe=te(Qe,Ze,Je,$e,ke,10,ae[53]),$e=te($e,Qe,Ze,Je,He,15,ae[54]),Je=te(Je,$e,Qe,Ze,Ae,21,ae[55]),Ze=te(Ze,Je,$e,Qe,Ke,6,ae[56]),Qe=te(Qe,Ze,Je,$e,Ue,10,ae[57]),$e=te($e,Qe,Ze,Je,Pe,15,ae[58]),Je=te(Je,$e,Qe,Ze,ct,21,ae[59]),Ze=te(Ze,Je,$e,Qe,Ie,6,ae[60]),Qe=te(Qe,Ze,Je,$e,rt,10,ae[61]),$e=te($e,Qe,Ze,Je,De,15,ae[62]),Je=te(Je,$e,Qe,Ze,ot,21,ae[63]),pe[0]=pe[0]+Ze|0,pe[1]=pe[1]+Je|0,pe[2]=pe[2]+$e|0,pe[3]=pe[3]+Qe|0},_doFinalize:function(){var ge=this._data,Se=ge.words,ve=8*this._nDataBytes,be=8*ge.sigBytes;Se[be>>>5]|=128<<24-be%32;var xe=se.floor(ve/4294967296),pe=ve;Se[15+(be+64>>>9<<4)]=16711935&(xe<<8|xe>>>24)|4278255360&(xe<<24|xe>>>8),Se[14+(be+64>>>9<<4)]=16711935&(pe<<8|pe>>>24)|4278255360&(pe<<24|pe>>>8),ge.sigBytes=4*(Se.length+1),this._process();for(var me=this._hash,Ae=me.words,De=0;De<4;De++){var ke=Ae[De];Ae[De]=16711935&(ke<<8|ke>>>24)|4278255360&(ke<<24|ke>>>8)}return me},clone:function(){var ge=x.clone.call(this);return ge._hash=this._hash.clone(),ge}});E.MD5=x._createHelper(oe),E.HmacMD5=x._createHmacHelper(oe)}(Math),ce.MD5})},function(de,ie,Ee){"use strict";Object.defineProperty(ie,"__esModule",{value:!0}),ie.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},ie.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},ie.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(de,ie,Ee){"use strict";function ce(oe){return oe&&oe.__esModule?oe:{default:oe}}function se(oe,ge){if(!(oe instanceof ge))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function oe(ge,Se){for(var ve=0;ve<Se.length;ve++){var be=Se[ve];be.enumerable=be.enumerable||!1,be.configurable=!0,"value"in be&&(be.writable=!0),Object.defineProperty(ge,be.key,be)}}return function(ge,Se,ve){return Se&&oe(ge.prototype,Se),ve&&oe(ge,ve),ge}}(),ue=Ee(5),ee=ce(ue),te=Ee(25),E=ce(te),y=Ee(6),z=ce(y),x=Ee(7),ne=ce(x),ae=function(){function oe(ge){se(this,oe);var Se=ne.default.os.name,ve=ne.default.os.version||"",be=ne.default.browser.name,xe=ne.default.browser.version||"",pe=window.location.href,me="";pe&&(me=ne.default.getHost(pe));var Ae="pc";ne.default.os.ipad?Ae="pad":(ne.default.os.iphone||ne.default.os.android)&&(Ae="phone"),this._ri=ee.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:z.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:oe.getUuid(),os:Se,ov:ve,et:be,ev:xe,uat:navigator.userAgent,app_n:me,tt:Ae,dm:"h5",ut:""}}return re(oe,[{key:"log",value:function(ge,Se){Se&&Se.ri?(this._ri=Se.ri,delete Se.ri):this._ri=ee.default.create(),Se&&Se.ut&&(this.initParam.ut=Se.ut,delete Se.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=ge=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=ge;var ve=[];if(Se)for(var be in Se)ve.push(be+"="+Se[be]);var xe=ve.join("&");this.initParam.args=encodeURIComponent(xe==""?"0":xe);var pe=[];for(var be in this.initParam)pe.push(be+"="+this.initParam[be]);var me=pe.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(me):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+me}}],[{key:"getUuid",value:function(){var ge=E.default.get("p_h5_upload_u");return ge||(ge=ee.default.create(),E.default.set("p_h5_upload_u",ge,730)),ge}},{key:"getClientId",value:function(){return E.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(ge){return ge||(ge=ee.default.create()),E.default.set("p_h5_upload_clientId",ge,730),ge}}]),oe}();ie.default=ae},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"create",value:function(ee,te){var E,y="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),z=[];if(te=te||y.length,ee)for(E=0;E<ee;E++)z[E]=y[0|Math.random()*te];else{var x;for(z[8]=z[13]=z[18]=z[23]="-",z[14]="4",E=0;E<36;E++)z[E]||(x=0|16*Math.random(),z[E]=y[E==19?3&x|8:x])}return z.join("")}}]),ue}();ie.default=re},function(de,ie,Ee){"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var ce={version:"1.5.0"};ie.default=ce},function(de,ie,Ee){"use strict";function ce(y,z){if(!(y instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function y(z,x){for(var ne=0;ne<x.length;ne++){var ae=x[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,ne){return x&&y(z.prototype,x),ne&&y(z,ne),z}}(),re=function(y){var z=navigator.userAgent,x="other";if(y.ios)return"iOS";if(y.android)return"android";if(z.indexOf("Baiduspider")>-1)return"Baiduspider";if(z.indexOf("PlayStation")>-1)return"PS4";var ne=navigator.platform=="Win32"||navigator.platform=="Windows"||z.indexOf("Windows")>-1,ae=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return ae&&(x="macOS"),navigator.platform=="X11"&&!ne&&!ae&&(x="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(x="Linux"),ne?"windows":x},ue=function(){var y=navigator.userAgent,z="";return(y.indexOf("Windows NT 5.0")>-1||y.indexOf("Windows 2000")>-1)&&(z="2000"),(y.indexOf("Windows NT 5.1")>-1||y.indexOf("Windows XP")>-1)&&(z="XP"),(y.indexOf("Windows NT 5.2")>-1||y.indexOf("Windows 2003")>-1)&&(z="2003"),(y.indexOf("Windows NT 6.0")>-1||y.indexOf("Windows Vista")>-1)&&(z="Vista"),(y.indexOf("Windows NT 6.1")>-1||y.indexOf("Windows 7")>-1)&&(z="7"),(y.indexOf("Windows NT 6.2")>-1||y.indexOf("Windows 8")>-1)&&(z="8"),(y.indexOf("Windows NT 6.3")>-1||y.indexOf("Windows 8.1")>-1)&&(z="8.1"),(y.indexOf("Windows NT 10")>-1||y.indexOf("Windows 10")>-1)&&(z="10"),z},ee=function(y){var z=navigator.userAgent.toLowerCase();return y.chrome?"Chrome":y.firefox?"Firefox":y.safari?"Safari":y.webview?"webview":y.ie?/edge/.test(z)?"Edge":"IE":/baiduspider/.test(z)?"Baiduspider":/ucweb/.test(z)||/UCBrowser/.test(z)?"UC":/opera/.test(z)?"Opera":/ucweb/.test(z)?"UC":/360se/.test(z)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(z)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(z)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(z)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(z)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(z)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(z)?"PS4\u6D4F\u89C8\u5668":void 0},te=function(){var y={},z={},x=navigator.userAgent,ne=navigator.platform,ae=x.match(/Web[kK]it[\/]{0,1}([\d.]+)/),oe=x.match(/(Android);?[\s\/]+([\d.]+)?/),ge=!!x.match(/\(Macintosh\; Intel /),Se=x.match(/(iPad).*OS\s([\d_]+)/),ve=x.match(/(iPod)(.*OS\s([\d_]+))?/),be=!Se&&x.match(/(iPhone\sOS)\s([\d_]+)/),xe=x.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),pe=/Win\d{2}|Windows/.test(ne),me=x.match(/Windows Phone ([\d.]+)/),Ae=xe&&x.match(/TouchPad/),De=x.match(/Kindle\/([\d.]+)/),ke=x.match(/Silk\/([\d._]+)/),Ie=x.match(/(BlackBerry).*Version\/([\d.]+)/),Fe=x.match(/(BB10).*Version\/([\d.]+)/),Pe=x.match(/(RIM\sTablet\sOS)\s([\d.]+)/),qe=x.match(/PlayBook/),Ke=x.match(/Chrome\/([\d.]+)/)||x.match(/CriOS\/([\d.]+)/),ot=x.match(/Firefox\/([\d.]+)/),He=x.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),rt=x.match(/MSIE\s([\d.]+)/)||x.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),Ge=!Ke&&x.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),ct=Ge||x.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((z.webkit=!!ae)&&(z.version=ae[1]),oe&&(y.android=!0,y.version=oe[2]),be&&!ve&&(y.ios=y.iphone=!0,y.version=be[2].replace(/_/g,".")),Se&&(y.ios=y.ipad=!0,y.version=Se[2].replace(/_/g,".")),ve&&(y.ios=y.ipod=!0,y.version=ve[3]?ve[3].replace(/_/g,"."):null),me&&(y.wp=!0,y.version=me[1]),xe&&(y.webos=!0,y.version=xe[2]),Ae&&(y.touchpad=!0),Ie&&(y.blackberry=!0,y.version=Ie[2]),Fe&&(y.bb10=!0,y.version=Fe[2]),Pe&&(y.rimtabletos=!0,y.version=Pe[2]),qe&&(z.playbook=!0),De&&(y.kindle=!0,y.version=De[1]),ke&&(z.silk=!0,z.version=ke[1]),!ke&&y.android&&x.match(/Kindle Fire/)&&(z.silk=!0),Ke&&(z.chrome=!0,z.version=Ke[1]),ot&&(z.firefox=!0,z.version=ot[1]),He&&(y.firefoxos=!0,y.version=He[1]),rt&&(z.ie=!0,z.version=rt[1]),ct&&(ge||y.ios||pe||oe)&&(z.safari=!0,y.ios||(z.version=ct[1])),Ge&&(z.webview=!0),ge){var We=x.match(/[\d]*_[\d]*_[\d]*/);We&&We.length>0&&We[0]&&(y.version=We[0].replace(/_/g,"."))}return y.tablet=!!(Se||qe||oe&&!x.match(/Mobile/)||ot&&x.match(/Tablet/)||rt&&!x.match(/Phone/)&&x.match(/Touch/)),y.phone=!(y.tablet||y.ipod||!(oe||be||xe||Ie||Fe||Ke&&x.match(/Android/)||Ke&&x.match(/CriOS\/([\d.]+)/)||ot&&x.match(/Mobile/)||rt&&x.match(/Touch/))),y.pc=!y.tablet&&!y.phone,ge?y.name="macOS":pe?(y.name="windows",y.version=ue()):y.name=re(y),z.name=ee(z),{os:y,browser:z}}(),E=function(){function y(){ce(this,y)}return se(y,null,[{key:"getHost",value:function(z){var ae="";if(z===void 0||z==null||z=="")return"";var x=z.indexOf("//"),ne=z;x>-1&&(ne=z.substring(x+2));var ae=ne,oe=ne.split("/");return oe&&oe.length>0&&(ae=oe[0]),oe=ae.split(":"),oe&&oe.length>0&&(ae=oe[0]),ae}},{key:"os",get:function(){return te.os}},{key:"browser",get:function(){var z=te.browser;return z.name||(z.name=ee()),z}}]),y}();ie.default=E},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"get",value:function(ee,te,E,y,z){var x;E=E||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(ne){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(ne){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(ne){}throw new Error("This browser does not support XMLHttpRequest.")}),x=new XMLHttpRequest,x.onreadystatechange=function(){x.readyState===4&&(x.status===200?te(x.responseText):E(x.responseText))};try{y===void 0&&(y=!0),x.open("GET",ee,y),z&&(x.withCredentials=!0)}catch(ne){return void E(ne)}try{x.send()}catch(ne){E(ne)}}}]),ue}();ie.default=re},function(de,ie,Ee){"use strict";function ce(te,E){if(!(te instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function te(E,y){for(var z=0;z<y.length;z++){var x=y[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,y,z){return y&&te(E.prototype,y),z&&te(E,z),E}}(),re=Ee(27),ue=Ee(30),ee=(Ee(10),function(){function te(){ce(this,te)}return se(te,null,[{key:"randomUUID",value:function(){for(var E=[],y="0123456789abcdef",z=0;z<36;z++)E[z]=y.substr(Math.floor(16*Math.random()),1);return E[14]="4",E[19]=y.substr(3&E[19]|8,1),E[8]=E[13]=E[18]=E[23]="-",E.join("")}},{key:"aliyunEncodeURI",value:function(E){var y=encodeURIComponent(E);return y=y.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(E,y,z){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");var x=[];for(var ne in E)x.push(ne);for(var ae=x.sort(),oe="",ge=ae.length,ne=0;ne<ge;ne++){var Se=te.aliyunEncodeURI(ae[ne]),ve=te.aliyunEncodeURI(E[ae[ne]]);oe==""?oe=Se+y+ve:oe+=z+Se+y+ve}return oe}},{key:"makeChangeSiga",value:function(E,y){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");return ue.stringify(re("GET&"+te.aliyunEncodeURI("/")+"&"+te.aliyunEncodeURI(te.makeUTF8sort(E,"=","&")),y+"&"))}}]),te}());ie.default=ee},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return ce.enc.Utf8})},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return ce.enc.Hex})},function(de,ie,Ee){de.exports=Ee(13)},function(de,ie,Ee){"use strict";var ce,se,re=Ee(14),ue=function(te){return te&&te.__esModule?te:{default:te}}(re),ee={Vod:ue.default};ce=[],(se=function(){return ee}.apply(ie,ce))!==void 0&&(de.exports=se),window.AliyunUpload=ee,Jt.exports=AliyunUpload},function(de,ie,Ee){"use strict";function ce(Fe){return Fe&&Fe.__esModule?Fe:{default:Fe}}function se(Fe,Pe){if(!(Fe instanceof Pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function Fe(Pe,qe){for(var Ke=0;Ke<qe.length;Ke++){var ot=qe[Ke];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(Pe,ot.key,ot)}}return function(Pe,qe,Ke){return qe&&Fe(Pe.prototype,qe),Ke&&Fe(Pe,Ke),Pe}}(),ue=Ee(15),ee=Ee(3),te=Ee(16),E=ce(te),y=Ee(18),z=ce(y),x=Ee(24),ne=ce(x),ae=Ee(4),oe=ce(ae),ge=Ee(1),Se=ce(ge),ve=Ee(5),be=ce(ve),xe=Ee(26),pe=ce(xe),me=Ee(31),Ae=ce(me),De=Ee(32),ke=ce(De),Ie=(Ee(2),function(){function Fe(Pe){se(this,Fe),this.options=Pe,this.options.partSize=this.options.partSize||ee.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ee.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=ue.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new oe.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=ue.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return re(Fe,[{key:"init",value:function(Pe,qe,Ke,ot){return this._retryCount=0,!(Ke&&!ot||!Ke&&ot)&&!(Pe&&!qe||!Pe&&qe)&&(this._ossCreditor.accessKeyId=Pe,this._ossCreditor.accessKeySecret=qe,this._ossCreditor.securityToken=Ke,this._ossCreditor.expireTime=ot,!0)}},{key:"addFile",value:function(Pe,qe,Ke,ot,He,rt){if(!Pe)return!1;if(Pe.size==0)try{this.options.onUploadFailed({file:Pe},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(Ue){console.log(Ue)}for(var Ge=(this.options,0);Ge<this._uploadList.length;Ge++)if(this._uploadList[Ge].file==Pe)return!1;var ct=new Object;if(ct.file=Pe,ct._endpoint=qe,ct._bucket=Ke,ct._object=ot,ct.state=ue.UPLOADSTATE.INIT,ct.isImage=Se.default.isImage(Pe.name),!ct.isImage&&this.options.enableUploadProgress){var We=this;ke.default.getMd5(Pe,function(Ue){ct.fileHash=Ue;var Ze=We._getCheckoutpoint(ct);We.options.localCheckpoint||Ze||We._getCheckoutpointFromCloud(ct,function(Je){if(Je.UploadPoint){var $e=JSON.parse(Je.UploadPoint);$e.loaded!=1&&(ct.checkpoint=$e.checkpoint,ct.loaded=$e.loaded,ct.videoId=Je.VideoId,We._saveCheckoutpoint(ct,$e.checkpoint))}},function(Je){try{if((Je=JSON.parse(Je))&&Je.Code=="InvalidParameter"&&Je.Message.indexOf("UserId")>0){We._invalidUserId=!0;var $e=Je.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log($e)}}catch(Qe){console.log(Qe)}})})}He&&(ct.videoInfo=He?JSON.parse(He).Vod:{},ct.userData=z.default.encode(He)),ct.ri=be.default.create(),this._uploadList.push(ct),this._reportLog("20001",ct,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(ct)}catch(Ue){console.log(Ue)}return!0}},{key:"deleteFile",value:function(Pe){return!!this.cancelFile(Pe)&&(this._uploadList.splice(Pe,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Pe){if(this.options,Pe<0||Pe>=this._uploadList.length)return!1;var qe=this._uploadList[Pe];if(Pe==this._curIndex&&qe.state==ue.UPLOADSTATE.UPLOADING){qe.state=ue.UPLOADSTATE.CANCELED;var Ke=this._getCheckoutpoint(qe);Ke&&Ke.checkpoint&&(Ke=Ke.checkpoint),Ke&&this._ossUpload.abort(qe),this._removeCheckoutpoint(qe),this.nextUpload()}else qe.state!=ue.UPLOADSTATE.SUCCESS&&(qe.state=ue.UPLOADSTATE.CANCELED);return this._reportLog("20008",qe),!0}},{key:"resumeFile",value:function(Pe){if(this.options,Pe<0||Pe>=this._uploadList.length)return!1;var qe=this._uploadList[Pe];return qe.state==ue.UPLOADSTATE.CANCELED&&(qe.state=ue.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Pe){return this._getCheckoutpoint({file:Pe})}},{key:"startUpload",value:function(Pe){if(this._retryCount=0,this.options,this._state==ue.VODSTATE.START||this._state==ue.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=ue.VODSTATE.END);var qe=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(qe),this._state=ue.VODSTATE.START}},{key:"nextUpload",value:function(){var Pe=this.options;if(this._state==ue.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var qe=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(qe)}else{this._state=ue.VODSTATE.END;try{Pe.onUploadEnd&&Pe.onUploadEnd(qe)}catch(Ke){console.log(Ke)}}}},{key:"clear",value:function(Pe){for(var qe=this.options,Ke=0,ot=0;ot<this._uploadList.length;ot++)qe.uploadList[ot].state==ue.UPLOADSTATE.SUCCESS&&Ke++,this._uploadList[ot].state==Pe&&(qe.uploadList.splice(ot,1),ot--);qe.onClear&&qe.onClear(qe.uploadList.length,Ke)}},{key:"stopUpload",value:function(){if((this._state==ue.VODSTATE.START||this._state==ue.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Pe=this._uploadList[this._curIndex];this._state=ue.VODSTATE.STOP,Pe.state=ue.UPLOADSTATE.STOPED,this._changeState(Pe,ue.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Pe){var qe=this;if(!Pe)return!1;var Ke=JSON.parse(z.default.decode(Pe));return!!(Ke.AccessKeyId&&Ke.AccessKeySecret&&Ke.SecurityToken&&Ke.Expiration)&&qe.resumeUploadWithToken(Ke.AccessKeyId,Ke.AccessKeySecret,Ke.SecurityToken,Ke.Expiration)}},{key:"resumeUploadWithToken",value:function(Pe,qe,Ke,ot){if(this.options,!(Pe&&qe&&Ke&&ot)||this._state!=ue.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var He="";return this._uploadList.length>this._curIndex&&(He=this._uploadList[this._curIndex]),He&&(this.init(Pe,qe,Ke,ot),this._state=ue.VODSTATE.START,this._ossUpload=null,this._uploadCore(He,He.retry),He.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Pe,qe,Ke){if(this._curIndex==-1||this._state!=ue.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var ot=this._uploadList[this._curIndex];ot.object?this._refreshSTSTokenUpload(ot,Pe,qe,Ke):this.setSTSToken(ot,Pe,qe,Ke)}}},{key:"setSTSTokenDirectlyUpload",value:function(Pe,qe,Ke,ot,He){if(!(qe&&Ke&&ot&&He))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var rt=Pe;this.init(qe,Ke,ot,He),rt.endpoint=rt._endpoint,rt.bucket=rt._bucket,rt.object=rt._object,this._ossUpload=null,this._uploadCore(rt,Pe.retry),Pe.retry=!1}},{key:"setSTSToken",value:function(Pe,qe,Ke,ot){if(!qe||!Ke||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var He=Pe.videoInfo,rt={accessKeyId:qe,securityToken:ot,accessKeySecret:Ke,fileName:Pe.file.name,title:He.Title,requestId:Pe.ri,region:this.options.region};He.ImageType&&(rt.imageType=He.ImageType),He.ImageExt&&(rt.imageExt=He.ImageExt),He.FileSize&&(rt.fileSize=He.FileSize),He.Description&&(rt.description=He.Description),He.CateId&&(rt.cateId=He.CateId),He.Tags&&(rt.tags=He.Tags),He.TemplateGroupId&&(rt.templateGroupId=He.TemplateGroupId),He.StorageLocation&&(rt.storageLocation=He.StorageLocation),He.CoverURL&&(rt.coverUrl=He.CoverURL),He.TransCodeMode&&(rt.transCodeMode=He.TransCodeMode),He.UserData&&(rt.userData=He.UserData);var Ge=this,ct="getUploadAuth";Pe.videoId?(rt.videoId=Pe.videoId,ct="refreshUploadAuth"):Pe.isImage&&(ct="getImageUploadAuth"),pe.default[ct](rt,function(We){Pe.videoId=We.VideoId?We.VideoId:Pe.videoId,Ge.setUploadAuthAndAddress(Pe,We.UploadAuth,We.UploadAddress),Ge._state=ue.VODSTATE.START},function(We){Ge._error(Pe,{name:We.Code,code:We.Code,message:We.Message,requestId:We.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Pe,qe,Ke,ot){if(!Pe||!qe||!Ke)return!1;var He=JSON.parse(z.default.decode(qe));if(!(He.AccessKeyId&&He.AccessKeySecret&&He.SecurityToken&&He.Expiration))return console.error("uploadauth is invalid"),!1;var rt={},Ge=Pe;if(Ke){if(rt=JSON.parse(z.default.decode(Ke)),!rt.Endpoint||!rt.Bucket||!rt.FileName)return console.error("uploadAddress is invalid"),!1}else rt.Endpoint=Ge.endpoint,rt.Bucket=Ge.bucket,rt.FileName=Ge.object;this._ut="vod",this._uploadWay="vod",this.options.region=He.Region||this.options.region,this.init(He.AccessKeyId,He.AccessKeySecret,He.SecurityToken,He.Expiration),Ge.endpoint=Ge._endpoint?Ge._endpoint:rt.Endpoint,Ge.bucket=Ge._bucket?Ge._bucket:rt.Bucket,Ge.object=Ge._object?Ge._object:rt.FileName,Ge.region=this.options.region,ot&&(Ge.videoId=ot),this._ossUpload=null,this._uploadCore(Ge,Pe.retry),Pe.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Pe,qe,Ke,ot){if(!qe||!Ke||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var He={accessKeyId:qe,securityToken:ot,accessKeySecret:Ke,videoId:Pe.object,requestId:Pe.ri,region:this.options.region},rt=this,Ge="refreshUploadAuth";Pe.isImage&&(Ge="getImageUploadAuth"),pe.default[Ge](He,function(ct){rt.setUploadAuthAndAddress(Pe,ct.UploadAuth,UploadAddress),rt._state=ue.VODSTATE.START},function(ct){rt._error(Pe,{name:ct.Code,code:ct.Code,message:ct.Message,requestId:ct.RequestId})})}},{key:"_upload",value:function(Pe){var qe=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Ke=this.options;if(Pe.retry=qe,Ke.onUploadstarted&&!qe)try{var ot=this._getCheckoutpoint(Pe);ot&&ot.state!=ue.UPLOADSTATE.UPLOADING&&(Pe.checkpoint=ot,Pe.videoId=ot.videoId),Ke.onUploadstarted(Pe)}catch(He){console.log(He)}}},{key:"_uploadCore",value:function(Pe){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Pe.state=ue.UPLOADSTATE.UPLOADING,!this._ossUpload){Pe.endpoint=Pe.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var qe=this;this._ossUpload=new E.default({bucket:Pe.bucket,endpoint:Pe.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(We,Ue){qe._error.call(qe,We,Ue)},oncomplete:function(We,Ue){qe._complete.call(qe,We,Ue)},onprogress:function(We,Ue,Ze){qe._progress.call(qe,We,Ue,Ze)}})}var Ke=Se.default.getFileType(Pe.file.name),ot=this._getCheckoutpoint(Pe),He="",rt="";ot&&ot.checkpoint&&(rt=ot.state,He=ot.videoId,ot=ot.checkpoint),ot&&He==Pe.videoId&&rt!=ue.UPLOADSTATE.UPLOADING&&(ot.file=Pe.file,Pe.checkpoint=ot,ot.uploadId);var Ge=this._adjustPartSize(Pe);this._reportLog("20002",Pe,{ft:Ke,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,vid:Pe.videoId||"",fn:Pe.file.name,fw:null,fh:null,ps:Ge});var ct={headers:{"x-oss-notification":Pe.userData?Pe.userData:""},partSize:Ge,parallel:this.options.parallel};this._ossUpload.upload(Pe,ct)}},{key:"_findUploadIndex",value:function(){for(var Pe=-1,qe=0;qe<this._uploadList.length;qe++)if(this._uploadList[qe].state==ue.UPLOADSTATE.INIT){Pe=qe;break}return Pe}},{key:"_error",value:function(Pe,qe){if(qe.name=="cancel")try{this.options.onUploadCanceled(Pe,qe)}catch(ot){console.log(ot)}else{if(qe.message.indexOf("InvalidAccessKeyIdError")>0||qe.name=="SignatureDoesNotMatchError"||qe.code=="SecurityTokenExpired"||qe.code=="InvalidSecurityToken.Expired"||qe.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=ue.VODSTATE.EXPIRE,Pe.state=ue.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Pe,qe)}catch(ot){console.log(ot)}}return}if((qe.name=="RequestTimeoutError"||qe.name=="ConnectionTimeout"||qe.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var Ke=this;return setTimeout(function(){Ke._uploadCore(Pe,!0)},1e3*Ke._retryDuration),void this._retryCount++}qe.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Pe),this._handleError(Pe,qe)}}},{key:"_handleError",value:function(Pe,qe){var Ke=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],ot=ue.UPLOADSTATE.FAIlURE;if(Pe.state!=ue.UPLOADSTATE.CANCELED&&(Pe.state=ue.UPLOADSTATE.FAIlURE,this._state=ue.VODSTATE.FAILURE,this.options.onUploadFailed&&qe&&qe.code&&qe.message))try{this.options.onUploadFailed(Pe,qe.code,qe.message)}catch(rt){console.log(rt)}if(Ke&&this._changeState(Pe,ot),this._reportLog("20006",Pe,{code:qe.name,message:qe.message,requestId:qe.requestId,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),this._reportLog("20004",Pe,{requestId:qe.requestId,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),Pe.ri=be.default.create(),this._findUploadIndex()!=-1){var He=this;this._state=ue.VODSTATE.START,setTimeout(function(){He.nextUpload()},100)}}},{key:"_complete",value:function(Pe,qe){if(Pe.state=ue.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Pe)}catch(He){console.log(He)}var Ke=0;qe&&qe.res&&qe.res.headers&&(Ke=qe.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Pe);var ot=this;setTimeout(function(){ot.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Pe,{requestId:Ke})}},{key:"_progress",value:function(Pe,qe,Ke){if(this.options.onUploadProgress)try{Pe.loaded=qe.loaded,this.options.onUploadProgress(Pe,qe.total,qe.loaded)}catch(Ue){console.log(Ue)}var ot=qe.checkpoint,He=0;ot&&(Pe.checkpoint=ot,this._saveCheckoutpoint(Pe,ot,ue.UPLOADSTATE.UPLOADING),He=ot.uploadId),this._retryCount=0;var rt=this._getPortNumber(ot),Ge=0;if(Ke&&Ke.headers&&(Ge=Ke.headers["x-oss-request-id"]),qe.loaded!=0&&this._reportLog("20007",Pe,{pn:rt,requestId:Ge}),qe.loaded!=1&&this._reportLog("20005",Pe,{UploadId:He,pn:rt+1,pr:Pe.retry?1:0,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),!this._invalidUserId&&!Pe.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var ct={file:Pe.file,checkpoint:qe,userId:this.options.userId,videoId:Pe.videoId,region:this.options.region,fileHash:Pe.fileHash};try{var We=this;Ae.default.upload(ct,function(){},function(Ue){if((Ue=JSON.parse(Ue))&&Ue.Code=="InvalidParameter"&&Ue.Message.indexOf("UserId")>0){We._invalidUserId=!0;var Ze=Ue.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Ze)}})}catch(Ue){console.log(Ue)}}}},{key:"_getPortNumber",value:function(Pe){if(Pe){var qe=Pe.doneParts;if(qe&&qe.length>0)return qe[qe.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Pe){var qe=this._getCheckoutpointKey(Pe);ne.default.remove(qe)}},{key:"_getCheckoutpoint",value:function(Pe){var qe=this._getCheckoutpointKey(Pe),Ke=ne.default.get(qe);if(Ke)try{return JSON.parse(Ke)}catch(ot){}return""}},{key:"_saveCheckoutpoint",value:function(Pe,qe,Ke){if(qe){var ot=this._getCheckoutpointKey(Pe),He=Pe.file,rt={fileName:He.name,lastModified:He.lastModified,size:He.size,object:Pe.object,videoId:Pe.videoId,bucket:Pe.bucket,endpoint:Pe.endpoint,checkpoint:qe,loaded:Pe.loaded,state:Ke};ne.default.set(ot,JSON.stringify(rt))}}},{key:"_changeState",value:function(Pe,qe){var Ke=this._getCheckoutpoint(Pe);Ke&&((this._onbeforeunload=!0)&&(qe=ue.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Pe,Ke.checkpoint,qe))}},{key:"_getCheckoutpointKey",value:function(Pe){return"upload_"+Pe.file.lastModified+"_"+Pe.file.name+"_"+Pe.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Pe,qe,Ke){var ot={userId:this.options.userId,uploadInfoList:[{FileName:Pe.file.name,FileSize:Pe.file.size,FileCreateTime:Pe.file.lastModified,FileHash:Pe.fileHash}],region:this.options.region};Ae.default.get(ot,function(He){qe(He)},Ke)}},{key:"_reportLog",value:function(Pe,qe,Ke){Ke||(Ke={}),Ke.ri=qe.ri,this._ut&&(Ke.ut=this._ut),this._log.log(Pe,Ke)}},{key:"_initEvent",value:function(){var Pe=this;window&&(window.onbeforeunload=function(qe){if(Pe._onbeforeunload=!0,Pe._curIndex!=-1&&Pe._uploadList.length>Pe._curIndex){var Ke=Pe._uploadList[Pe._curIndex];Pe._changeState(Ke,ue.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Pe=0;Pe<this._uploadList.length;Pe++){var qe=this._uploadList[Pe];qe.state!=ue.UPLOADSTATE.FAIlURE&&qe.state!=ue.UPLOADSTATE.STOPED||(qe.state=ue.UPLOADSTATE.INIT)}this._state=ue.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Pe){return Pe.file.size/this.options.partSize>1e4?Pe.file.size/9999:this.options.partSize}}]),Fe}());ie.default=Ie},function(de,ie,Ee){"use strict";Object.defineProperty(ie,"__esModule",{value:!0}),ie.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},ie.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(de,ie,Ee){"use strict";function ce(y){return y&&y.__esModule?y:{default:y}}function se(y,z){if(!(y instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function y(z,x){for(var ne=0;ne<x.length;ne++){var ae=x[ne];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,ne){return x&&y(z.prototype,x),ne&&y(z,ne),z}}(),ue=Ee(3),ee=Ee(17),te=(ce(ee),Ee(1)),E=(ce(te),function(){function y(z,x){if(se(this,y),z){this._config=z,this.create(this._config),this._uploadInfo=null,this._callback={};var ne=function(){};this._callback.onerror=x.onerror||ne,this._callback.oncomplete=x.oncomplete||ne,this._callback.onprogress=x.onprogress||ne}}return re(y,[{key:"create",value:function(z){if(z.endpoint=z.endpoint||this._config.endpoint,z.bucket=z.bucket||this._config.bucket,!(z.AccessKeyId&&z.AccessKeySecret&&z.endpoint&&z.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var x={accessKeyId:z.AccessKeyId,accessKeySecret:z.AccessKeySecret,stsToken:z.SecurityToken,endpoint:z.endpoint||this._config.endpoint,bucket:z.bucket||this._config.bucket,secure:!0,cname:z.cname};z.timeout&&(x.timeout=z.timeout),this.oss=new OSS.Wrapper(x)}},{key:"abort",value:function(z){if(z.checkpoint){var x=z.checkpoint.uploadId;this.oss.abortMultipartUpload(z.object,x)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(z,x){this._uploadInfo=z;var ne=this,ae=function(ge,Se,ve){return function(be){ne._progress(ge,Se,ve),be()}},oe={parallel:x.parallel||this._config.parallel||ue.UPLOADDEFAULT.PARALLEL,partSize:x.partSize||this._config.partSize||ue.UPLOADDEFAULT.PARTSIZE,progress:ae};x.headers&&(oe.headers=x.headers),z.checkpoint&&(oe.checkpoint=z.checkpoint),z.bucket||(this.oss.options.bucket=z.bucket),z.endpoint||(this.oss.options.endpoint=z.endpoint),this.oss.multipartUpload(z.object,z.file,oe).then(function(ge,Se){ne._complete(ge)}).catch(function(ge){ne.oss.cancel&&(ne.oss&&ne.oss.isCancel()?console.log("oss is cancel as error"):ne.oss.cancel()),ne._error(ge)})}},{key:"header",value:function(z,x,ne){this.oss.get(z.object).then(function(ae){x(ae)}).catch(function(ae){ne(ae)})}},{key:"_progress",value:function(z,x,ne){this._callback.onprogress(this._uploadInfo,{loaded:z,total:this._uploadInfo.file.size,checkpoint:x},ne)}},{key:"_error",value:function(z){this._callback.onerror(this._uploadInfo,z)}},{key:"_complete",value:function(z){this._callback.oncomplete(this._uploadInfo,z)}}]),y}());ie.default=E},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"format",value:function(ee){if(arguments.length<2)return null;for(var te=arguments[1],E=1;E<arguments.length;E++){var y=new RegExp("\\{"+(E-1)+"\\}","gm");te=te.replace(y,arguments[E+1])}return{code:ee,message:te}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),ue}();ie.default=re},function(de,ie,Ee){"use strict";(function(ce){function se(ee,te){if(!(ee instanceof te))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function ee(te,E){for(var y=0;y<E.length;y++){var z=E[y];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(te,z.key,z)}}return function(te,E,y){return E&&ee(te.prototype,E),y&&ee(te,y),te}}(),ue=function(){function ee(){se(this,ee)}return re(ee,null,[{key:"encode",value:function(te){return new ce(te).toString("base64")}},{key:"decode",value:function(te){return new ce(te,"base64").toString()}}]),ee}();ie.default=ue}).call(ie,Ee(19).Buffer)},function(de,ie,Ee){"use strict";(function(ce){function se(){return ue.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function re(Re,Le){if(se()<Le)throw new RangeError("Invalid typed array length");return ue.TYPED_ARRAY_SUPPORT?(Re=new Uint8Array(Le),Re.__proto__=ue.prototype):(Re===null&&(Re=new ue(Le)),Re.length=Le),Re}function ue(Re,Le,Te){if(!(ue.TYPED_ARRAY_SUPPORT||this instanceof ue))return new ue(Re,Le,Te);if(typeof Re=="number"){if(typeof Le=="string")throw new Error("If encoding is specified then the first argument must be a string");return y(this,Re)}return ee(this,Re,Le,Te)}function ee(Re,Le,Te,je){if(typeof Le=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Le instanceof ArrayBuffer?ne(Re,Le,Te,je):typeof Le=="string"?z(Re,Le,Te):ae(Re,Le)}function te(Re){if(typeof Re!="number")throw new TypeError('"size" argument must be a number');if(Re<0)throw new RangeError('"size" argument must not be negative')}function E(Re,Le,Te,je){return te(Le),Le<=0?re(Re,Le):Te!==void 0?typeof je=="string"?re(Re,Le).fill(Te,je):re(Re,Le).fill(Te):re(Re,Le)}function y(Re,Le){if(te(Le),Re=re(Re,Le<0?0:0|oe(Le)),!ue.TYPED_ARRAY_SUPPORT)for(var Te=0;Te<Le;++Te)Re[Te]=0;return Re}function z(Re,Le,Te){if(typeof Te=="string"&&Te!==""||(Te="utf8"),!ue.isEncoding(Te))throw new TypeError('"encoding" must be a valid string encoding');var je=0|Se(Le,Te);Re=re(Re,je);var ye=Re.write(Le,Te);return ye!==je&&(Re=Re.slice(0,ye)),Re}function x(Re,Le){var Te=Le.length<0?0:0|oe(Le.length);Re=re(Re,Te);for(var je=0;je<Te;je+=1)Re[je]=255&Le[je];return Re}function ne(Re,Le,Te,je){if(Le.byteLength,Te<0||Le.byteLength<Te)throw new RangeError("'offset' is out of bounds");if(Le.byteLength<Te+(je||0))throw new RangeError("'length' is out of bounds");return Le=Te===void 0&&je===void 0?new Uint8Array(Le):je===void 0?new Uint8Array(Le,Te):new Uint8Array(Le,Te,je),ue.TYPED_ARRAY_SUPPORT?(Re=Le,Re.__proto__=ue.prototype):Re=x(Re,Le),Re}function ae(Re,Le){if(ue.isBuffer(Le)){var Te=0|oe(Le.length);return Re=re(Re,Te),Re.length===0||Le.copy(Re,0,0,Te),Re}if(Le){if(typeof ArrayBuffer!="undefined"&&Le.buffer instanceof ArrayBuffer||"length"in Le)return typeof Le.length!="number"||dt(Le.length)?re(Re,0):x(Re,Le);if(Le.type==="Buffer"&&ft(Le.data))return x(Re,Le.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(Re){if(Re>=se())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+se().toString(16)+" bytes");return 0|Re}function ge(Re){return+Re!=Re&&(Re=0),ue.alloc(+Re)}function Se(Re,Le){if(ue.isBuffer(Re))return Re.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(Re)||Re instanceof ArrayBuffer))return Re.byteLength;typeof Re!="string"&&(Re=""+Re);var Te=Re.length;if(Te===0)return 0;for(var je=!1;;)switch(Le){case"ascii":case"latin1":case"binary":return Te;case"utf8":case"utf-8":case void 0:return gt(Re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Te;case"hex":return Te>>>1;case"base64":return lt(Re).length;default:if(je)return gt(Re).length;Le=(""+Le).toLowerCase(),je=!0}}function ve(Re,Le,Te){var je=!1;if((Le===void 0||Le<0)&&(Le=0),Le>this.length||((Te===void 0||Te>this.length)&&(Te=this.length),Te<=0)||(Te>>>=0,Le>>>=0,Te<=Le))return"";for(Re||(Re="utf8");;)switch(Re){case"hex":return rt(this,Le,Te);case"utf8":case"utf-8":return qe(this,Le,Te);case"ascii":return ot(this,Le,Te);case"latin1":case"binary":return He(this,Le,Te);case"base64":return Pe(this,Le,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,Le,Te);default:if(je)throw new TypeError("Unknown encoding: "+Re);Re=(Re+"").toLowerCase(),je=!0}}function be(Re,Le,Te){var je=Re[Le];Re[Le]=Re[Te],Re[Te]=je}function xe(Re,Le,Te,je,ye){if(Re.length===0)return-1;if(typeof Te=="string"?(je=Te,Te=0):Te>2147483647?Te=2147483647:Te<-2147483648&&(Te=-2147483648),Te=+Te,isNaN(Te)&&(Te=ye?0:Re.length-1),Te<0&&(Te=Re.length+Te),Te>=Re.length){if(ye)return-1;Te=Re.length-1}else if(Te<0){if(!ye)return-1;Te=0}if(typeof Le=="string"&&(Le=ue.from(Le,je)),ue.isBuffer(Le))return Le.length===0?-1:pe(Re,Le,Te,je,ye);if(typeof Le=="number")return Le&=255,ue.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ye?Uint8Array.prototype.indexOf.call(Re,Le,Te):Uint8Array.prototype.lastIndexOf.call(Re,Le,Te):pe(Re,[Le],Te,je,ye);throw new TypeError("val must be string, number or Buffer")}function pe(Re,Le,Te,je,ye){function le(Dt,ut){return _e===1?Dt[ut]:Dt.readUInt16BE(ut*_e)}var _e=1,Ne=Re.length,Ye=Le.length;if(je!==void 0&&((je=String(je).toLowerCase())==="ucs2"||je==="ucs-2"||je==="utf16le"||je==="utf-16le")){if(Re.length<2||Le.length<2)return-1;_e=2,Ne/=2,Ye/=2,Te/=2}var Oe;if(ye){var tt=-1;for(Oe=Te;Oe<Ne;Oe++)if(le(Re,Oe)===le(Le,tt===-1?0:Oe-tt)){if(tt===-1&&(tt=Oe),Oe-tt+1===Ye)return tt*_e}else tt!==-1&&(Oe-=Oe-tt),tt=-1}else for(Te+Ye>Ne&&(Te=Ne-Ye),Oe=Te;Oe>=0;Oe--){for(var Ct=!0,Nt=0;Nt<Ye;Nt++)if(le(Re,Oe+Nt)!==le(Le,Nt)){Ct=!1;break}if(Ct)return Oe}return-1}function me(Re,Le,Te,je){Te=Number(Te)||0;var ye=Re.length-Te;je?(je=Number(je))>ye&&(je=ye):je=ye;var le=Le.length;if(le%2!=0)throw new TypeError("Invalid hex string");je>le/2&&(je=le/2);for(var _e=0;_e<je;++_e){var Ne=parseInt(Le.substr(2*_e,2),16);if(isNaN(Ne))return _e;Re[Te+_e]=Ne}return _e}function Ae(Re,Le,Te,je){return _t(gt(Le,Re.length-Te),Re,Te,je)}function De(Re,Le,Te,je){return _t(bt(Le),Re,Te,je)}function ke(Re,Le,Te,je){return De(Re,Le,Te,je)}function Ie(Re,Le,Te,je){return _t(lt(Le),Re,Te,je)}function Fe(Re,Le,Te,je){return _t(St(Le,Re.length-Te),Re,Te,je)}function Pe(Re,Le,Te){return Le===0&&Te===Re.length?nt.fromByteArray(Re):nt.fromByteArray(Re.slice(Le,Te))}function qe(Re,Le,Te){Te=Math.min(Re.length,Te);for(var je=[],ye=Le;ye<Te;){var le=Re[ye],_e=null,Ne=le>239?4:le>223?3:le>191?2:1;if(ye+Ne<=Te){var Ye,Oe,tt,Ct;switch(Ne){case 1:le<128&&(_e=le);break;case 2:Ye=Re[ye+1],(192&Ye)==128&&(Ct=(31&le)<<6|63&Ye)>127&&(_e=Ct);break;case 3:Ye=Re[ye+1],Oe=Re[ye+2],(192&Ye)==128&&(192&Oe)==128&&(Ct=(15&le)<<12|(63&Ye)<<6|63&Oe)>2047&&(Ct<55296||Ct>57343)&&(_e=Ct);break;case 4:Ye=Re[ye+1],Oe=Re[ye+2],tt=Re[ye+3],(192&Ye)==128&&(192&Oe)==128&&(192&tt)==128&&(Ct=(15&le)<<18|(63&Ye)<<12|(63&Oe)<<6|63&tt)>65535&&Ct<1114112&&(_e=Ct)}}_e===null?(_e=65533,Ne=1):_e>65535&&(_e-=65536,je.push(_e>>>10&1023|55296),_e=56320|1023&_e),je.push(_e),ye+=Ne}return Ke(je)}function Ke(Re){var Le=Re.length;if(Le<=wt)return String.fromCharCode.apply(String,Re);for(var Te="",je=0;je<Le;)Te+=String.fromCharCode.apply(String,Re.slice(je,je+=wt));return Te}function ot(Re,Le,Te){var je="";Te=Math.min(Re.length,Te);for(var ye=Le;ye<Te;++ye)je+=String.fromCharCode(127&Re[ye]);return je}function He(Re,Le,Te){var je="";Te=Math.min(Re.length,Te);for(var ye=Le;ye<Te;++ye)je+=String.fromCharCode(Re[ye]);return je}function rt(Re,Le,Te){var je=Re.length;(!Le||Le<0)&&(Le=0),(!Te||Te<0||Te>je)&&(Te=je);for(var ye="",le=Le;le<Te;++le)ye+=Pt(Re[le]);return ye}function Ge(Re,Le,Te){for(var je=Re.slice(Le,Te),ye="",le=0;le<je.length;le+=2)ye+=String.fromCharCode(je[le]+256*je[le+1]);return ye}function ct(Re,Le,Te){if(Re%1!=0||Re<0)throw new RangeError("offset is not uint");if(Re+Le>Te)throw new RangeError("Trying to access beyond buffer length")}function We(Re,Le,Te,je,ye,le){if(!ue.isBuffer(Re))throw new TypeError('"buffer" argument must be a Buffer instance');if(Le>ye||Le<le)throw new RangeError('"value" argument is out of bounds');if(Te+je>Re.length)throw new RangeError("Index out of range")}function Ue(Re,Le,Te,je){Le<0&&(Le=65535+Le+1);for(var ye=0,le=Math.min(Re.length-Te,2);ye<le;++ye)Re[Te+ye]=(Le&255<<8*(je?ye:1-ye))>>>8*(je?ye:1-ye)}function Ze(Re,Le,Te,je){Le<0&&(Le=4294967295+Le+1);for(var ye=0,le=Math.min(Re.length-Te,4);ye<le;++ye)Re[Te+ye]=Le>>>8*(je?ye:3-ye)&255}function Je(Re,Le,Te,je,ye,le){if(Te+je>Re.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("Index out of range")}function $e(Re,Le,Te,je,ye){return ye||Je(Re,Le,Te,4,34028234663852886e22,-34028234663852886e22),et.write(Re,Le,Te,je,23,4),Te+4}function Qe(Re,Le,Te,je,ye){return ye||Je(Re,Le,Te,8,17976931348623157e292,-17976931348623157e292),et.write(Re,Le,Te,je,52,8),Te+8}function pt(Re){if(Re=ht(Re).replace(Tt,""),Re.length<2)return"";for(;Re.length%4!=0;)Re+="=";return Re}function ht(Re){return Re.trim?Re.trim():Re.replace(/^\s+|\s+$/g,"")}function Pt(Re){return Re<16?"0"+Re.toString(16):Re.toString(16)}function gt(Re,Le){Le=Le||1/0;for(var Te,je=Re.length,ye=null,le=[],_e=0;_e<je;++_e){if((Te=Re.charCodeAt(_e))>55295&&Te<57344){if(!ye){if(Te>56319){(Le-=3)>-1&&le.push(239,191,189);continue}if(_e+1===je){(Le-=3)>-1&&le.push(239,191,189);continue}ye=Te;continue}if(Te<56320){(Le-=3)>-1&&le.push(239,191,189),ye=Te;continue}Te=65536+(ye-55296<<10|Te-56320)}else ye&&(Le-=3)>-1&&le.push(239,191,189);if(ye=null,Te<128){if((Le-=1)<0)break;le.push(Te)}else if(Te<2048){if((Le-=2)<0)break;le.push(Te>>6|192,63&Te|128)}else if(Te<65536){if((Le-=3)<0)break;le.push(Te>>12|224,Te>>6&63|128,63&Te|128)}else{if(!(Te<1114112))throw new Error("Invalid code point");if((Le-=4)<0)break;le.push(Te>>18|240,Te>>12&63|128,Te>>6&63|128,63&Te|128)}}return le}function bt(Re){for(var Le=[],Te=0;Te<Re.length;++Te)Le.push(255&Re.charCodeAt(Te));return Le}function St(Re,Le){for(var Te,je,ye,le=[],_e=0;_e<Re.length&&!((Le-=2)<0);++_e)Te=Re.charCodeAt(_e),je=Te>>8,ye=Te%256,le.push(ye),le.push(je);return le}function lt(Re){return nt.toByteArray(pt(Re))}function _t(Re,Le,Te,je){for(var ye=0;ye<je&&!(ye+Te>=Le.length||ye>=Re.length);++ye)Le[ye+Te]=Re[ye];return ye}function dt(Re){return Re!==Re}var nt=Ee(21),et=Ee(22),ft=Ee(23);ie.Buffer=ue,ie.SlowBuffer=ge,ie.INSPECT_MAX_BYTES=50,ue.TYPED_ARRAY_SUPPORT=ce.TYPED_ARRAY_SUPPORT!==void 0?ce.TYPED_ARRAY_SUPPORT:function(){try{var Re=new Uint8Array(1);return Re.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},Re.foo()===42&&typeof Re.subarray=="function"&&Re.subarray(1,1).byteLength===0}catch(Le){return!1}}(),ie.kMaxLength=se(),ue.poolSize=8192,ue._augment=function(Re){return Re.__proto__=ue.prototype,Re},ue.from=function(Re,Le,Te){return ee(null,Re,Le,Te)},ue.TYPED_ARRAY_SUPPORT&&(ue.prototype.__proto__=Uint8Array.prototype,ue.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ue[Symbol.species]===ue&&Object.defineProperty(ue,Symbol.species,{value:null,configurable:!0})),ue.alloc=function(Re,Le,Te){return E(null,Re,Le,Te)},ue.allocUnsafe=function(Re){return y(null,Re)},ue.allocUnsafeSlow=function(Re){return y(null,Re)},ue.isBuffer=function(Re){return!(Re==null||!Re._isBuffer)},ue.compare=function(Re,Le){if(!ue.isBuffer(Re)||!ue.isBuffer(Le))throw new TypeError("Arguments must be Buffers");if(Re===Le)return 0;for(var Te=Re.length,je=Le.length,ye=0,le=Math.min(Te,je);ye<le;++ye)if(Re[ye]!==Le[ye]){Te=Re[ye],je=Le[ye];break}return Te<je?-1:je<Te?1:0},ue.isEncoding=function(Re){switch(String(Re).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ue.concat=function(Re,Le){if(!ft(Re))throw new TypeError('"list" argument must be an Array of Buffers');if(Re.length===0)return ue.alloc(0);var Te;if(Le===void 0)for(Le=0,Te=0;Te<Re.length;++Te)Le+=Re[Te].length;var je=ue.allocUnsafe(Le),ye=0;for(Te=0;Te<Re.length;++Te){var le=Re[Te];if(!ue.isBuffer(le))throw new TypeError('"list" argument must be an Array of Buffers');le.copy(je,ye),ye+=le.length}return je},ue.byteLength=Se,ue.prototype._isBuffer=!0,ue.prototype.swap16=function(){var Re=this.length;if(Re%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;Le<Re;Le+=2)be(this,Le,Le+1);return this},ue.prototype.swap32=function(){var Re=this.length;if(Re%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Le=0;Le<Re;Le+=4)be(this,Le,Le+3),be(this,Le+1,Le+2);return this},ue.prototype.swap64=function(){var Re=this.length;if(Re%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Le=0;Le<Re;Le+=8)be(this,Le,Le+7),be(this,Le+1,Le+6),be(this,Le+2,Le+5),be(this,Le+3,Le+4);return this},ue.prototype.toString=function(){var Re=0|this.length;return Re===0?"":arguments.length===0?qe(this,0,Re):ve.apply(this,arguments)},ue.prototype.equals=function(Re){if(!ue.isBuffer(Re))throw new TypeError("Argument must be a Buffer");return this===Re||ue.compare(this,Re)===0},ue.prototype.inspect=function(){var Re="",Le=ie.INSPECT_MAX_BYTES;return this.length>0&&(Re=this.toString("hex",0,Le).match(/.{2}/g).join(" "),this.length>Le&&(Re+=" ... ")),"<Buffer "+Re+">"},ue.prototype.compare=function(Re,Le,Te,je,ye){if(!ue.isBuffer(Re))throw new TypeError("Argument must be a Buffer");if(Le===void 0&&(Le=0),Te===void 0&&(Te=Re?Re.length:0),je===void 0&&(je=0),ye===void 0&&(ye=this.length),Le<0||Te>Re.length||je<0||ye>this.length)throw new RangeError("out of range index");if(je>=ye&&Le>=Te)return 0;if(je>=ye)return-1;if(Le>=Te)return 1;if(Le>>>=0,Te>>>=0,je>>>=0,ye>>>=0,this===Re)return 0;for(var le=ye-je,_e=Te-Le,Ne=Math.min(le,_e),Ye=this.slice(je,ye),Oe=Re.slice(Le,Te),tt=0;tt<Ne;++tt)if(Ye[tt]!==Oe[tt]){le=Ye[tt],_e=Oe[tt];break}return le<_e?-1:_e<le?1:0},ue.prototype.includes=function(Re,Le,Te){return this.indexOf(Re,Le,Te)!==-1},ue.prototype.indexOf=function(Re,Le,Te){return xe(this,Re,Le,Te,!0)},ue.prototype.lastIndexOf=function(Re,Le,Te){return xe(this,Re,Le,Te,!1)},ue.prototype.write=function(Re,Le,Te,je){if(Le===void 0)je="utf8",Te=this.length,Le=0;else if(Te===void 0&&typeof Le=="string")je=Le,Te=this.length,Le=0;else{if(!isFinite(Le))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Le|=0,isFinite(Te)?(Te|=0,je===void 0&&(je="utf8")):(je=Te,Te=void 0)}var ye=this.length-Le;if((Te===void 0||Te>ye)&&(Te=ye),Re.length>0&&(Te<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");je||(je="utf8");for(var le=!1;;)switch(je){case"hex":return me(this,Re,Le,Te);case"utf8":case"utf-8":return Ae(this,Re,Le,Te);case"ascii":return De(this,Re,Le,Te);case"latin1":case"binary":return ke(this,Re,Le,Te);case"base64":return Ie(this,Re,Le,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Fe(this,Re,Le,Te);default:if(le)throw new TypeError("Unknown encoding: "+je);je=(""+je).toLowerCase(),le=!0}},ue.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var wt=4096;ue.prototype.slice=function(Re,Le){var Te=this.length;Re=~~Re,Le=Le===void 0?Te:~~Le,Re<0?(Re+=Te)<0&&(Re=0):Re>Te&&(Re=Te),Le<0?(Le+=Te)<0&&(Le=0):Le>Te&&(Le=Te),Le<Re&&(Le=Re);var je;if(ue.TYPED_ARRAY_SUPPORT)je=this.subarray(Re,Le),je.__proto__=ue.prototype;else{var ye=Le-Re;je=new ue(ye,void 0);for(var le=0;le<ye;++le)je[le]=this[le+Re]}return je},ue.prototype.readUIntLE=function(Re,Le,Te){Re|=0,Le|=0,Te||ct(Re,Le,this.length);for(var je=this[Re],ye=1,le=0;++le<Le&&(ye*=256);)je+=this[Re+le]*ye;return je},ue.prototype.readUIntBE=function(Re,Le,Te){Re|=0,Le|=0,Te||ct(Re,Le,this.length);for(var je=this[Re+--Le],ye=1;Le>0&&(ye*=256);)je+=this[Re+--Le]*ye;return je},ue.prototype.readUInt8=function(Re,Le){return Le||ct(Re,1,this.length),this[Re]},ue.prototype.readUInt16LE=function(Re,Le){return Le||ct(Re,2,this.length),this[Re]|this[Re+1]<<8},ue.prototype.readUInt16BE=function(Re,Le){return Le||ct(Re,2,this.length),this[Re]<<8|this[Re+1]},ue.prototype.readUInt32LE=function(Re,Le){return Le||ct(Re,4,this.length),(this[Re]|this[Re+1]<<8|this[Re+2]<<16)+16777216*this[Re+3]},ue.prototype.readUInt32BE=function(Re,Le){return Le||ct(Re,4,this.length),16777216*this[Re]+(this[Re+1]<<16|this[Re+2]<<8|this[Re+3])},ue.prototype.readIntLE=function(Re,Le,Te){Re|=0,Le|=0,Te||ct(Re,Le,this.length);for(var je=this[Re],ye=1,le=0;++le<Le&&(ye*=256);)je+=this[Re+le]*ye;return ye*=128,je>=ye&&(je-=Math.pow(2,8*Le)),je},ue.prototype.readIntBE=function(Re,Le,Te){Re|=0,Le|=0,Te||ct(Re,Le,this.length);for(var je=Le,ye=1,le=this[Re+--je];je>0&&(ye*=256);)le+=this[Re+--je]*ye;return ye*=128,le>=ye&&(le-=Math.pow(2,8*Le)),le},ue.prototype.readInt8=function(Re,Le){return Le||ct(Re,1,this.length),128&this[Re]?-1*(255-this[Re]+1):this[Re]},ue.prototype.readInt16LE=function(Re,Le){Le||ct(Re,2,this.length);var Te=this[Re]|this[Re+1]<<8;return 32768&Te?4294901760|Te:Te},ue.prototype.readInt16BE=function(Re,Le){Le||ct(Re,2,this.length);var Te=this[Re+1]|this[Re]<<8;return 32768&Te?4294901760|Te:Te},ue.prototype.readInt32LE=function(Re,Le){return Le||ct(Re,4,this.length),this[Re]|this[Re+1]<<8|this[Re+2]<<16|this[Re+3]<<24},ue.prototype.readInt32BE=function(Re,Le){return Le||ct(Re,4,this.length),this[Re]<<24|this[Re+1]<<16|this[Re+2]<<8|this[Re+3]},ue.prototype.readFloatLE=function(Re,Le){return Le||ct(Re,4,this.length),et.read(this,Re,!0,23,4)},ue.prototype.readFloatBE=function(Re,Le){return Le||ct(Re,4,this.length),et.read(this,Re,!1,23,4)},ue.prototype.readDoubleLE=function(Re,Le){return Le||ct(Re,8,this.length),et.read(this,Re,!0,52,8)},ue.prototype.readDoubleBE=function(Re,Le){return Le||ct(Re,8,this.length),et.read(this,Re,!1,52,8)},ue.prototype.writeUIntLE=function(Re,Le,Te,je){Re=+Re,Le|=0,Te|=0,!je&&We(this,Re,Le,Te,Math.pow(2,8*Te)-1,0);var ye=1,le=0;for(this[Le]=255&Re;++le<Te&&(ye*=256);)this[Le+le]=Re/ye&255;return Le+Te},ue.prototype.writeUIntBE=function(Re,Le,Te,je){Re=+Re,Le|=0,Te|=0,!je&&We(this,Re,Le,Te,Math.pow(2,8*Te)-1,0);var ye=Te-1,le=1;for(this[Le+ye]=255&Re;--ye>=0&&(le*=256);)this[Le+ye]=Re/le&255;return Le+Te},ue.prototype.writeUInt8=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,1,255,0),ue.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),this[Le]=255&Re,Le+1},ue.prototype.writeUInt16LE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,2,65535,0),ue.TYPED_ARRAY_SUPPORT?(this[Le]=255&Re,this[Le+1]=Re>>>8):Ue(this,Re,Le,!0),Le+2},ue.prototype.writeUInt16BE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,2,65535,0),ue.TYPED_ARRAY_SUPPORT?(this[Le]=Re>>>8,this[Le+1]=255&Re):Ue(this,Re,Le,!1),Le+2},ue.prototype.writeUInt32LE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,4,4294967295,0),ue.TYPED_ARRAY_SUPPORT?(this[Le+3]=Re>>>24,this[Le+2]=Re>>>16,this[Le+1]=Re>>>8,this[Le]=255&Re):Ze(this,Re,Le,!0),Le+4},ue.prototype.writeUInt32BE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,4,4294967295,0),ue.TYPED_ARRAY_SUPPORT?(this[Le]=Re>>>24,this[Le+1]=Re>>>16,this[Le+2]=Re>>>8,this[Le+3]=255&Re):Ze(this,Re,Le,!1),Le+4},ue.prototype.writeIntLE=function(Re,Le,Te,je){if(Re=+Re,Le|=0,!je){var ye=Math.pow(2,8*Te-1);We(this,Re,Le,Te,ye-1,-ye)}var le=0,_e=1,Ne=0;for(this[Le]=255&Re;++le<Te&&(_e*=256);)Re<0&&Ne===0&&this[Le+le-1]!==0&&(Ne=1),this[Le+le]=(Re/_e>>0)-Ne&255;return Le+Te},ue.prototype.writeIntBE=function(Re,Le,Te,je){if(Re=+Re,Le|=0,!je){var ye=Math.pow(2,8*Te-1);We(this,Re,Le,Te,ye-1,-ye)}var le=Te-1,_e=1,Ne=0;for(this[Le+le]=255&Re;--le>=0&&(_e*=256);)Re<0&&Ne===0&&this[Le+le+1]!==0&&(Ne=1),this[Le+le]=(Re/_e>>0)-Ne&255;return Le+Te},ue.prototype.writeInt8=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,1,127,-128),ue.TYPED_ARRAY_SUPPORT||(Re=Math.floor(Re)),Re<0&&(Re=255+Re+1),this[Le]=255&Re,Le+1},ue.prototype.writeInt16LE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,2,32767,-32768),ue.TYPED_ARRAY_SUPPORT?(this[Le]=255&Re,this[Le+1]=Re>>>8):Ue(this,Re,Le,!0),Le+2},ue.prototype.writeInt16BE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,2,32767,-32768),ue.TYPED_ARRAY_SUPPORT?(this[Le]=Re>>>8,this[Le+1]=255&Re):Ue(this,Re,Le,!1),Le+2},ue.prototype.writeInt32LE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,4,2147483647,-2147483648),ue.TYPED_ARRAY_SUPPORT?(this[Le]=255&Re,this[Le+1]=Re>>>8,this[Le+2]=Re>>>16,this[Le+3]=Re>>>24):Ze(this,Re,Le,!0),Le+4},ue.prototype.writeInt32BE=function(Re,Le,Te){return Re=+Re,Le|=0,Te||We(this,Re,Le,4,2147483647,-2147483648),Re<0&&(Re=4294967295+Re+1),ue.TYPED_ARRAY_SUPPORT?(this[Le]=Re>>>24,this[Le+1]=Re>>>16,this[Le+2]=Re>>>8,this[Le+3]=255&Re):Ze(this,Re,Le,!1),Le+4},ue.prototype.writeFloatLE=function(Re,Le,Te){return $e(this,Re,Le,!0,Te)},ue.prototype.writeFloatBE=function(Re,Le,Te){return $e(this,Re,Le,!1,Te)},ue.prototype.writeDoubleLE=function(Re,Le,Te){return Qe(this,Re,Le,!0,Te)},ue.prototype.writeDoubleBE=function(Re,Le,Te){return Qe(this,Re,Le,!1,Te)},ue.prototype.copy=function(Re,Le,Te,je){if(Te||(Te=0),je||je===0||(je=this.length),Le>=Re.length&&(Le=Re.length),Le||(Le=0),je>0&&je<Te&&(je=Te),je===Te||Re.length===0||this.length===0)return 0;if(Le<0)throw new RangeError("targetStart out of bounds");if(Te<0||Te>=this.length)throw new RangeError("sourceStart out of bounds");if(je<0)throw new RangeError("sourceEnd out of bounds");je>this.length&&(je=this.length),Re.length-Le<je-Te&&(je=Re.length-Le+Te);var ye,le=je-Te;if(this===Re&&Te<Le&&Le<je)for(ye=le-1;ye>=0;--ye)Re[ye+Le]=this[ye+Te];else if(le<1e3||!ue.TYPED_ARRAY_SUPPORT)for(ye=0;ye<le;++ye)Re[ye+Le]=this[ye+Te];else Uint8Array.prototype.set.call(Re,this.subarray(Te,Te+le),Le);return le},ue.prototype.fill=function(Re,Le,Te,je){if(typeof Re=="string"){if(typeof Le=="string"?(je=Le,Le=0,Te=this.length):typeof Te=="string"&&(je=Te,Te=this.length),Re.length===1){var ye=Re.charCodeAt(0);ye<256&&(Re=ye)}if(je!==void 0&&typeof je!="string")throw new TypeError("encoding must be a string");if(typeof je=="string"&&!ue.isEncoding(je))throw new TypeError("Unknown encoding: "+je)}else typeof Re=="number"&&(Re&=255);if(Le<0||this.length<Le||this.length<Te)throw new RangeError("Out of range index");if(Te<=Le)return this;Le>>>=0,Te=Te===void 0?this.length:Te>>>0,Re||(Re=0);var le;if(typeof Re=="number")for(le=Le;le<Te;++le)this[le]=Re;else{var _e=ue.isBuffer(Re)?Re:gt(new ue(Re,je).toString()),Ne=_e.length;for(le=0;le<Te-Le;++le)this[le+Le]=_e[le%Ne]}return this};var Tt=/[^+\/0-9A-Za-z-_]/g}).call(ie,Ee(20))},function(de,ie){var Ee;Ee=function(){return this}();try{Ee=Ee||Function("return this")()||(0,eval)("this")}catch(ce){typeof window=="object"&&(Ee=window)}de.exports=Ee},function(de,ie,Ee){"use strict";function ce(oe){var ge=oe.length;if(ge%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return oe[ge-2]==="="?2:oe[ge-1]==="="?1:0}function se(oe){return 3*oe.length/4-ce(oe)}function re(oe){var ge,Se,ve,be,xe,pe=oe.length;be=ce(oe),xe=new z(3*pe/4-be),Se=be>0?pe-4:pe;var me=0;for(ge=0;ge<Se;ge+=4)ve=y[oe.charCodeAt(ge)]<<18|y[oe.charCodeAt(ge+1)]<<12|y[oe.charCodeAt(ge+2)]<<6|y[oe.charCodeAt(ge+3)],xe[me++]=ve>>16&255,xe[me++]=ve>>8&255,xe[me++]=255&ve;return be===2?(ve=y[oe.charCodeAt(ge)]<<2|y[oe.charCodeAt(ge+1)]>>4,xe[me++]=255&ve):be===1&&(ve=y[oe.charCodeAt(ge)]<<10|y[oe.charCodeAt(ge+1)]<<4|y[oe.charCodeAt(ge+2)]>>2,xe[me++]=ve>>8&255,xe[me++]=255&ve),xe}function ue(oe){return E[oe>>18&63]+E[oe>>12&63]+E[oe>>6&63]+E[63&oe]}function ee(oe,ge,Se){for(var ve,be=[],xe=ge;xe<Se;xe+=3)ve=(oe[xe]<<16)+(oe[xe+1]<<8)+oe[xe+2],be.push(ue(ve));return be.join("")}function te(oe){for(var ge,Se=oe.length,ve=Se%3,be="",xe=[],pe=0,me=Se-ve;pe<me;pe+=16383)xe.push(ee(oe,pe,pe+16383>me?me:pe+16383));return ve===1?(ge=oe[Se-1],be+=E[ge>>2],be+=E[ge<<4&63],be+="=="):ve===2&&(ge=(oe[Se-2]<<8)+oe[Se-1],be+=E[ge>>10],be+=E[ge>>4&63],be+=E[ge<<2&63],be+="="),xe.push(be),xe.join("")}ie.byteLength=se,ie.toByteArray=re,ie.fromByteArray=te;for(var E=[],y=[],z=typeof Uint8Array!="undefined"?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ne=0,ae=x.length;ne<ae;++ne)E[ne]=x[ne],y[x.charCodeAt(ne)]=ne;y[45]=62,y[95]=63},function(de,ie){ie.read=function(Ee,ce,se,re,ue){var ee,te,E=8*ue-re-1,y=(1<<E)-1,z=y>>1,x=-7,ne=se?ue-1:0,ae=se?-1:1,oe=Ee[ce+ne];for(ne+=ae,ee=oe&(1<<-x)-1,oe>>=-x,x+=E;x>0;ee=256*ee+Ee[ce+ne],ne+=ae,x-=8);for(te=ee&(1<<-x)-1,ee>>=-x,x+=re;x>0;te=256*te+Ee[ce+ne],ne+=ae,x-=8);if(ee===0)ee=1-z;else{if(ee===y)return te?NaN:1/0*(oe?-1:1);te+=Math.pow(2,re),ee-=z}return(oe?-1:1)*te*Math.pow(2,ee-re)},ie.write=function(Ee,ce,se,re,ue,ee){var te,E,y,z=8*ee-ue-1,x=(1<<z)-1,ne=x>>1,ae=ue===23?Math.pow(2,-24)-Math.pow(2,-77):0,oe=re?0:ee-1,ge=re?1:-1,Se=ce<0||ce===0&&1/ce<0?1:0;for(ce=Math.abs(ce),isNaN(ce)||ce===1/0?(E=isNaN(ce)?1:0,te=x):(te=Math.floor(Math.log(ce)/Math.LN2),ce*(y=Math.pow(2,-te))<1&&(te--,y*=2),ce+=te+ne>=1?ae/y:ae*Math.pow(2,1-ne),ce*y>=2&&(te++,y/=2),te+ne>=x?(E=0,te=x):te+ne>=1?(E=(ce*y-1)*Math.pow(2,ue),te+=ne):(E=ce*Math.pow(2,ne-1)*Math.pow(2,ue),te=0));ue>=8;Ee[se+oe]=255&E,oe+=ge,E/=256,ue-=8);for(te=te<<ue|E,z+=ue;z>0;Ee[se+oe]=255&te,oe+=ge,te/=256,z-=8);Ee[se+oe-ge]|=128*Se}},function(de,ie){var Ee={}.toString;de.exports=Array.isArray||function(ce){return Ee.call(ce)=="[object Array]"}},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"set",value:function(ee,te){try{window.localStorage&&localStorage.setItem(ee,te)}catch(E){window[ee+"_localStorage"]=te}}},{key:"get",value:function(ee){try{if(window.localStorage)return localStorage.getItem(ee)}catch(te){return window[ee+"_localStorage"]}return""}},{key:"remove",value:function(ee){try{window.localStorage&&localStorage.removeItem(ee)}catch(te){delete window[ee+"_localStorage"]}}}]),ue}();ie.default=re},function(de,ie,Ee){"use strict";function ce(ue,ee){if(!(ue instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ue(ee,te){for(var E=0;E<te.length;E++){var y=te[E];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ee,y.key,y)}}return function(ee,te,E){return te&&ue(ee.prototype,te),E&&ue(ee,E),ee}}(),re=function(){function ue(){ce(this,ue)}return se(ue,null,[{key:"get",value:function(ee){for(var te=ee+"",E=document.cookie.split(";"),y=0;y<E.length;y++){var z=E[y].trim();if(z.indexOf(te)==0)return unescape(z.substring(te.length+1,z.length))}return""}},{key:"set",value:function(ee,te,E){var y=new Date;y.setTime(y.getTime()+24*E*60*60*1e3);var z="expires="+y.toGMTString();document.cookie=ee+"="+escape(te)+"; "+z}}]),ue}();ie.default=re},function(de,ie,Ee){"use strict";function ce(z){return z&&z.__esModule?z:{default:z}}function se(z,x){if(!(z instanceof x))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function z(x,ne){for(var ae=0;ae<ne.length;ae++){var oe=ne[ae];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(x,oe.key,oe)}}return function(x,ne,ae){return ne&&z(x.prototype,ne),ae&&z(x,ae),x}}(),ue=Ee(8),ee=ce(ue),te=Ee(9),E=ce(te),y=function(){function z(){se(this,z)}return re(z,null,[{key:"refreshUploadAuth",value:function(x,ne,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ge={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"RefreshUploadVideo",VideoId:x.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId},Se=E.default.makeUTF8sort(ge,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ge,x.accessKeySecret)),ve="https://vod."+x.region+".aliyuncs.com/?"+Se;ee.default.get(ve,function(xe){var xe=JSON.parse(xe);ne&&ne(xe)},function(be){if(ae){var xe=JSON.parse(be);ae(xe)}})}},{key:"getUploadAuth",value:function(x,ne,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ge={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"CreateUploadVideo",Title:x.title,FileName:x.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId};x.fileSize&&(ge.FileSize=x.fileSize),x.description&&(ge.Description=x.description),x.cateId&&(ge.CateId=x.cateId),x.tags&&(ge.Tags=x.tags),x.templateGroupId&&(ge.TemplateGroupId=x.templateGroupId),x.storageLocation&&(ge.StorageLocation=x.storageLocation),x.coverUrl&&(ge.CoverURL=x.coverUrl),x.transCodeMode&&(ge.TransCodeMode=x.transCodeMode),x.userData&&(ge.UserData=JSON.stringify(x.userData));var Se=E.default.makeUTF8sort(ge,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ge,x.accessKeySecret)),ve="https://vod."+x.region+".aliyuncs.com/?"+Se;ee.default.get(ve,function(be){try{be=JSON.parse(be)}catch(xe){if(ae)return void ae({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}ne&&ne(be)},function(be){if(ae){var xe={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{xe=JSON.parse(be)}catch(pe){}ae(xe)}})}},{key:"getImageUploadAuth",value:function(x,ne,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ge={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"CreateUploadImage",ImageType:x.imageType?x.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId};x.title&&(ge.Title=x.title),x.imageExt&&(ge.ImageExt=x.imageExt),x.tags&&(ge.Tags=x.tags),x.storageLocation&&(ge.StorageLocation=x.storageLocation);var Se=E.default.makeUTF8sort(ge,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ge,x.accessKeySecret)),ve="https://vod."+x.region+".aliyuncs.com/?"+Se;ee.default.get(ve,function(be){be=JSON.parse(be),ne&&ne(be)},function(be){if(ae){var xe=JSON.parse(be);ae(xe)}})}}]),z}();ie.default=y},function(de,ie,Ee){(function(ce,se,re){de.exports=ie=se(Ee(0),Ee(28),Ee(29))})(0,function(ce){return ce.HmacSHA1})},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return function(){var se=ce,re=se.lib,ue=re.WordArray,ee=re.Hasher,te=se.algo,E=[],y=te.SHA1=ee.extend({_doReset:function(){this._hash=new ue.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,x){for(var ne=this._hash.words,ae=ne[0],oe=ne[1],ge=ne[2],Se=ne[3],ve=ne[4],be=0;be<80;be++){if(be<16)E[be]=0|z[x+be];else{var xe=E[be-3]^E[be-8]^E[be-14]^E[be-16];E[be]=xe<<1|xe>>>31}var pe=(ae<<5|ae>>>27)+ve+E[be];pe+=be<20?1518500249+(oe&ge|~oe&Se):be<40?1859775393+(oe^ge^Se):be<60?(oe&ge|oe&Se|ge&Se)-1894007588:(oe^ge^Se)-899497514,ve=Se,Se=ge,ge=oe<<30|oe>>>2,oe=ae,ae=pe}ne[0]=ne[0]+ae|0,ne[1]=ne[1]+oe|0,ne[2]=ne[2]+ge|0,ne[3]=ne[3]+Se|0,ne[4]=ne[4]+ve|0},_doFinalize:function(){var z=this._data,x=z.words,ne=8*this._nDataBytes,ae=8*z.sigBytes;return x[ae>>>5]|=128<<24-ae%32,x[14+(ae+64>>>9<<4)]=Math.floor(ne/4294967296),x[15+(ae+64>>>9<<4)]=ne,z.sigBytes=4*x.length,this._process(),this._hash},clone:function(){var z=ee.clone.call(this);return z._hash=this._hash.clone(),z}});se.SHA1=ee._createHelper(y),se.HmacSHA1=ee._createHmacHelper(y)}(),ce.SHA1})},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){(function(){var se=ce,re=se.lib,ue=re.Base,ee=se.enc,te=ee.Utf8,E=se.algo;E.HMAC=ue.extend({init:function(y,z){y=this._hasher=new y.init,typeof z=="string"&&(z=te.parse(z));var x=y.blockSize,ne=4*x;z.sigBytes>ne&&(z=y.finalize(z)),z.clamp();for(var ae=this._oKey=z.clone(),oe=this._iKey=z.clone(),ge=ae.words,Se=oe.words,ve=0;ve<x;ve++)ge[ve]^=1549556828,Se[ve]^=909522486;ae.sigBytes=oe.sigBytes=ne,this.reset()},reset:function(){var y=this._hasher;y.reset(),y.update(this._iKey)},update:function(y){return this._hasher.update(y),this},finalize:function(y){var z=this._hasher,x=z.finalize(y);return z.reset(),z.finalize(this._oKey.clone().concat(x))}})})()})},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return function(){function se(E,y,z){for(var x=[],ne=0,ae=0;ae<y;ae++)if(ae%4){var oe=z[E.charCodeAt(ae-1)]<<ae%4*2,ge=z[E.charCodeAt(ae)]>>>6-ae%4*2;x[ne>>>2]|=(oe|ge)<<24-ne%4*8,ne++}return ee.create(x,ne)}var re=ce,ue=re.lib,ee=ue.WordArray,te=re.enc;te.Base64={stringify:function(E){var y=E.words,z=E.sigBytes,x=this._map;E.clamp();for(var ne=[],ae=0;ae<z;ae+=3)for(var oe=y[ae>>>2]>>>24-ae%4*8&255,ge=y[ae+1>>>2]>>>24-(ae+1)%4*8&255,Se=y[ae+2>>>2]>>>24-(ae+2)%4*8&255,ve=oe<<16|ge<<8|Se,be=0;be<4&&ae+.75*be<z;be++)ne.push(x.charAt(ve>>>6*(3-be)&63));var xe=x.charAt(64);if(xe)for(;ne.length%4;)ne.push(xe);return ne.join("")},parse:function(E){var y=E.length,z=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var ne=0;ne<z.length;ne++)x[z.charCodeAt(ne)]=ne}var ae=z.charAt(64);if(ae){var oe=E.indexOf(ae);oe!==-1&&(y=oe)}return se(E,y,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ce.enc.Base64})},function(de,ie,Ee){"use strict";function ce(me){return me&&me.__esModule?me:{default:me}}function se(me,Ae){if(!(me instanceof Ae))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var re=function(){function me(Ae,De){for(var ke=0;ke<De.length;ke++){var Ie=De[ke];Ie.enumerable=Ie.enumerable||!1,Ie.configurable=!0,"value"in Ie&&(Ie.writable=!0),Object.defineProperty(Ae,Ie.key,Ie)}}return function(Ae,De,ke){return De&&me(Ae.prototype,De),ke&&me(Ae,ke),Ae}}(),ue=Ee(8),ee=ce(ue),te=Ee(7),E=ce(te),y=Ee(4),z=ce(y),x=Ee(6),ne=ce(x),ae=Ee(1),oe=ce(ae),ge=Ee(9),Se=ce(ge),ve=Ee(2),be=Ee(11),xe=Ee(10),pe=function(){function me(){se(this,me)}return re(me,null,[{key:"getAuthInfo",value:function(Ae,De,ke){var Ie=Ae+"|f#Ylm&^1TppeRhLg|"+ke;return De&&(Ie=Ae+"|"+De+"|f#Ylm&^1TppeRhLg|"+ke),ve(xe.parse(Ie)).toString(be)}},{key:"upload",value:function(Ae,De,ke){var Ie=oe.default.ISODateString(new Date),Fe=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId();Pe=z.default.setClientId(Pe);var qe=me.getAuthInfo(Ae.userId,Pe,Fe),Ke=Se.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:ne.default.version,AuthTimestamp:Fe,Timestamp:Ie,AuthInfo:qe,FileName:Ae.file.name,FileSize:Ae.file.size,FileCreateTime:Ae.file.lastModified,FileHash:Ae.fileHash,UploadId:Ae.checkpoint.checkpoint.uploadId,PartSize:Ae.checkpoint.checkpoint.partSize,DonePartsCount:Ae.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(Ae.checkpoint),UploadRatio:Ae.checkpoint.loaded,UserId:Ae.userId,VideoId:Ae.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Ke};Pe&&(ot.ClientId=Pe);var He=Se.default.makeUTF8sort(ot,"=","&")+"&Signature="+Se.default.aliyunEncodeURI(Se.default.makeChangeSiga(ot,Ae.accessKeySecret)),rt="https://vod."+Ae.region+".aliyuncs.com/?"+He;ee.default.get(rt,function(Ge){De&&De()},function(Ge){Ge&&(ke(Ge),console.log(Ge))})}},{key:"get",value:function(Ae,De,ke){var Ie=oe.default.ISODateString(new Date),Fe=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId(),qe=me.getAuthInfo(Ae.userId,Pe,Fe),Ke=Se.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:ne.default.version,AuthTimestamp:Fe,Timestamp:Ie,AuthInfo:qe,UserId:Ae.userId,UploadInfoList:JSON.stringify(Ae.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Ke};Pe&&(ot.ClientId=Pe);var He=Se.default.makeUTF8sort(ot,"=","&")+"&Signature="+Se.default.aliyunEncodeURI(Se.default.makeChangeSiga(ot,Ae.accessKeySecret)),rt="https://vod."+Ae.region+".aliyuncs.com/?"+He;ee.default.get(rt,function(Ge){var ct={},We=Pe;Ge=Ge?JSON.parse(Ge):{},Ge.UploadProgress&&Ge.UploadProgress.UploadProgressList&&Ge.UploadProgress.UploadProgressList.length>0&&(ct=Ge.UploadProgress.UploadProgressList[0],We=ct.ClientId),z.default.setClientId(We),De&&De(ct)},function(Ge){Ge&&(ke(Ge),console.log(Ge))})}}]),me}();ie.default=pe},function(de,ie,Ee){"use strict";function ce(te,E){if(!(te instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function te(E,y){for(var z=0;z<y.length;z++){var x=y[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,y,z){return y&&te(E.prototype,y),z&&te(E,z),E}}(),re=Ee(2),ue=Ee(33),ee=(Ee(11),function(){function te(){ce(this,te)}return se(te,null,[{key:"getMd5",value:function(E,y,z){var x=new FileReader;x.onload=function(oe){try{if(oe&&oe.target){var ge=re(ue.parse(oe.target.result)),Se=ge.toString();y(Se)}}catch(ve){console.log(ve)}},x.onerror=function(oe){console.log(oe),errorCallback(oe)};var ne=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ae=ne.call(E,0,1024);x.readAsBinaryString(ae)}}]),te}());ie.default=ee},function(de,ie,Ee){(function(ce,se){de.exports=ie=se(Ee(0))})(0,function(ce){return ce.enc.Latin1})}])},99498:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){de.defineOption("placeholder","",function(ee,te,E){var y=E&&E!=de.Init;if(te&&!y)ee.on("blur",se),ee.on("change",re),ee.on("swapDoc",re),de.on(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose=function(){ce(ee)}),re(ee);else if(!te&&y){ee.off("blur",se),ee.off("change",re),ee.off("swapDoc",re),de.off(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose),ie(ee);var z=ee.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}te&&!ee.hasFocus()&&se(ee)});function ie(ee){ee.state.placeholder&&(ee.state.placeholder.parentNode.removeChild(ee.state.placeholder),ee.state.placeholder=null)}function Ee(ee){ie(ee);var te=ee.state.placeholder=document.createElement("pre");te.style.cssText="height: 0; overflow: visible",te.style.direction=ee.getOption("direction"),te.className="CodeMirror-placeholder CodeMirror-line-like";var E=ee.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),te.appendChild(E),ee.display.lineSpace.insertBefore(te,ee.display.lineSpace.firstChild)}function ce(ee){setTimeout(function(){var te=!1,E=ee.getInputField();E.nodeName=="TEXTAREA"?te=!E.value:ee.lineCount()==1&&(te=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),te?Ee(ee):ie(ee)},20)}function se(ee){ue(ee)&&Ee(ee)}function re(ee){var te=ee.getWrapperElement(),E=ue(ee);te.className=te.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?Ee(ee):ie(ee)}function ue(ee){return ee.lineCount()===1&&ee.getLine(0)===""}})},25717:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){var ie={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ee=de.Pos;de.defineOption("autoCloseBrackets",!1,function(ae,oe,ge){ge&&ge!=de.Init&&(ae.removeKeyMap(se),ae.state.closeBrackets=null),oe&&(re(ce(oe,"pairs")),ae.state.closeBrackets=oe,ae.addKeyMap(se))});function ce(ae,oe){return oe=="pairs"&&typeof ae=="string"?ae:typeof ae=="object"&&ae[oe]!=null?ae[oe]:ie[oe]}var se={Backspace:te,Enter:E};function re(ae){for(var oe=0;oe<ae.length;oe++){var ge=ae.charAt(oe),Se="'"+ge+"'";se[Se]||(se[Se]=ue(ge))}}re(ie.pairs+"`");function ue(ae){return function(oe){return z(oe,ae)}}function ee(ae){var oe=ae.state.closeBrackets;if(!oe||oe.override)return oe;var ge=ae.getModeAt(ae.getCursor());return ge.closeBrackets||oe}function te(ae){var oe=ee(ae);if(!oe||ae.getOption("disableInput"))return de.Pass;for(var ge=ce(oe,"pairs"),Se=ae.listSelections(),ve=0;ve<Se.length;ve++){if(!Se[ve].empty())return de.Pass;var be=x(ae,Se[ve].head);if(!be||ge.indexOf(be)%2!=0)return de.Pass}for(var ve=Se.length-1;ve>=0;ve--){var xe=Se[ve].head;ae.replaceRange("",Ee(xe.line,xe.ch-1),Ee(xe.line,xe.ch+1),"+delete")}}function E(ae){var oe=ee(ae),ge=oe&&ce(oe,"explode");if(!ge||ae.getOption("disableInput"))return de.Pass;for(var Se=ae.listSelections(),ve=0;ve<Se.length;ve++){if(!Se[ve].empty())return de.Pass;var be=x(ae,Se[ve].head);if(!be||ge.indexOf(be)%2!=0)return de.Pass}ae.operation(function(){var xe=ae.lineSeparator()||`
`;ae.replaceSelection(xe+xe,null),ae.execCommand("goCharLeft"),Se=ae.listSelections();for(var pe=0;pe<Se.length;pe++){var me=Se[pe].head.line;ae.indentLine(me,null,!0),ae.indentLine(me+1,null,!0)}})}function y(ae){var oe=de.cmpPos(ae.anchor,ae.head)>0;return{anchor:new Ee(ae.anchor.line,ae.anchor.ch+(oe?-1:1)),head:new Ee(ae.head.line,ae.head.ch+(oe?1:-1))}}function z(ae,oe){var ge=ee(ae);if(!ge||ae.getOption("disableInput"))return de.Pass;var Se=ce(ge,"pairs"),ve=Se.indexOf(oe);if(ve==-1)return de.Pass;for(var be=ce(ge,"closeBefore"),xe=ce(ge,"triples"),pe=Se.charAt(ve+1)==oe,me=ae.listSelections(),Ae=ve%2==0,De,ke=0;ke<me.length;ke++){var Ie=me[ke],Fe=Ie.head,Pe,qe=ae.getRange(Fe,Ee(Fe.line,Fe.ch+1));if(Ae&&!Ie.empty())Pe="surround";else if((pe||!Ae)&&qe==oe)pe&&ne(ae,Fe)?Pe="both":xe.indexOf(oe)>=0&&ae.getRange(Fe,Ee(Fe.line,Fe.ch+3))==oe+oe+oe?Pe="skipThree":Pe="skip";else if(pe&&Fe.ch>1&&xe.indexOf(oe)>=0&&ae.getRange(Ee(Fe.line,Fe.ch-2),Fe)==oe+oe){if(Fe.ch>2&&/\bstring/.test(ae.getTokenTypeAt(Ee(Fe.line,Fe.ch-2))))return de.Pass;Pe="addFour"}else if(pe){var Ke=Fe.ch==0?" ":ae.getRange(Ee(Fe.line,Fe.ch-1),Fe);if(!de.isWordChar(qe)&&Ke!=oe&&!de.isWordChar(Ke))Pe="both";else return de.Pass}else if(Ae&&(qe.length===0||/\s/.test(qe)||be.indexOf(qe)>-1))Pe="both";else return de.Pass;if(!De)De=Pe;else if(De!=Pe)return de.Pass}var ot=ve%2?Se.charAt(ve-1):oe,He=ve%2?oe:Se.charAt(ve+1);ae.operation(function(){if(De=="skip")ae.execCommand("goCharRight");else if(De=="skipThree")for(var rt=0;rt<3;rt++)ae.execCommand("goCharRight");else if(De=="surround"){for(var Ge=ae.getSelections(),rt=0;rt<Ge.length;rt++)Ge[rt]=ot+Ge[rt]+He;ae.replaceSelections(Ge,"around"),Ge=ae.listSelections().slice();for(var rt=0;rt<Ge.length;rt++)Ge[rt]=y(Ge[rt]);ae.setSelections(Ge)}else De=="both"?(ae.replaceSelection(ot+He,null),ae.triggerElectric(ot+He),ae.execCommand("goCharLeft")):De=="addFour"&&(ae.replaceSelection(ot+ot+ot+ot,"before"),ae.execCommand("goCharRight"))})}function x(ae,oe){var ge=ae.getRange(Ee(oe.line,oe.ch-1),Ee(oe.line,oe.ch+1));return ge.length==2?ge:null}function ne(ae,oe){var ge=ae.getTokenAt(Ee(oe.line,oe.ch+1));return/\bstring/.test(ge.type)&&ge.start==oe.ch&&(oe.ch==0||!/\bstring/.test(ae.getTokenTypeAt(oe)))}})},6313:function(Jt,Ot,we){(function(de){de(we(89780),we(32855))})(function(de){de.defineOption("autoCloseTags",!1,function(te,E,y){if(y!=de.Init&&y&&te.removeKeyMap("autoCloseTags"),!!E){var z={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(z["'/'"]=function(x){return re(x)}),(typeof E!="object"||E.whenOpening!==!1)&&(z["'>'"]=function(x){return ce(x)}),te.addKeyMap(z)}});var ie=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ee=["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 ce(te){if(te.getOption("disableInput"))return de.Pass;for(var E=te.listSelections(),y=[],z=te.getOption("autoCloseTags"),x=0;x<E.length;x++){if(!E[x].empty())return de.Pass;var ne=E[x].head,ae=te.getTokenAt(ne),oe=de.innerMode(te.getMode(),ae.state),ge=oe.state,Se=oe.mode.xmlCurrentTag&&oe.mode.xmlCurrentTag(ge),ve=Se&&Se.name;if(!ve)return de.Pass;var be=oe.mode.configuration=="html",xe=typeof z=="object"&&z.dontCloseTags||be&&ie,pe=typeof z=="object"&&z.indentTags||be&&Ee;ae.end>ne.ch&&(ve=ve.slice(0,ve.length-ae.end+ne.ch));var me=ve.toLowerCase();if(!ve||ae.type=="string"&&(ae.end!=ne.ch||!/[\"\']/.test(ae.string.charAt(ae.string.length-1))||ae.string.length==1)||ae.type=="tag"&&Se.close||ae.string.indexOf("/")==ne.ch-ae.start-1||xe&&ue(xe,me)>-1||ee(te,oe.mode.xmlCurrentContext&&oe.mode.xmlCurrentContext(ge)||[],ve,ne,!0))return de.Pass;var Ae=typeof z=="object"&&z.emptyTags;if(Ae&&ue(Ae,ve)>-1){y[x]={text:"/>",newPos:de.Pos(ne.line,ne.ch+2)};continue}var De=pe&&ue(pe,me)>-1;y[x]={indent:De,text:">"+(De?`
`:"")+"</"+ve+">",newPos:De?de.Pos(ne.line+1,0):de.Pos(ne.line,ne.ch+1)}}for(var ke=typeof z=="object"&&z.dontIndentOnAutoClose,x=E.length-1;x>=0;x--){var Ie=y[x];te.replaceRange(Ie.text,E[x].head,E[x].anchor,"+insert");var Fe=te.listSelections().slice(0);Fe[x]={head:Ie.newPos,anchor:Ie.newPos},te.setSelections(Fe),!ke&&Ie.indent&&(te.indentLine(Ie.newPos.line,null,!0),te.indentLine(Ie.newPos.line+1,null,!0))}}function se(te,E){for(var y=te.listSelections(),z=[],x=E?"/":"</",ne=te.getOption("autoCloseTags"),ae=typeof ne=="object"&&ne.dontIndentOnSlash,oe=0;oe<y.length;oe++){if(!y[oe].empty())return de.Pass;var ge=y[oe].head,Se=te.getTokenAt(ge),ve=de.innerMode(te.getMode(),Se.state),be=ve.state;if(E&&(Se.type=="string"||Se.string.charAt(0)!="<"||Se.start!=ge.ch-1))return de.Pass;var xe,pe=ve.mode.name!="xml"&&te.getMode().name=="htmlmixed";if(pe&&ve.mode.name=="javascript")xe=x+"script";else if(pe&&ve.mode.name=="css")xe=x+"style";else{var me=ve.mode.xmlCurrentContext&&ve.mode.xmlCurrentContext(be);if(!me||me.length&&ee(te,me,me[me.length-1],ge))return de.Pass;xe=x+me[me.length-1]}te.getLine(ge.line).charAt(Se.end)!=">"&&(xe+=">"),z[oe]=xe}if(te.replaceSelections(z),y=te.listSelections(),!ae)for(var oe=0;oe<y.length;oe++)(oe==y.length-1||y[oe].head.line<y[oe+1].head.line)&&te.indentLine(y[oe].head.line)}function re(te){return te.getOption("disableInput")?de.Pass:se(te,!0)}de.commands.closeTag=function(te){return se(te)};function ue(te,E){if(te.indexOf)return te.indexOf(E);for(var y=0,z=te.length;y<z;++y)if(te[y]==E)return y;return-1}function ee(te,E,y,z,x){if(!de.scanForClosingTag)return!1;var ne=Math.min(te.lastLine()+1,z.line+500),ae=de.scanForClosingTag(te,z,null,ne);if(!ae||ae.tag!=y)return!1;for(var oe=x?1:0,ge=E.length-1;ge>=0&&E[ge]==y;ge--)++oe;z=ae.to;for(var ge=1;ge<oe;ge++){var Se=de.scanForClosingTag(te,z,null,ne);if(!Se||Se.tag!=y)return!1;z=Se.to}return!0}})},32855:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){"use strict";var ie=de.Pos;function Ee(ge,Se){return ge.line-Se.line||ge.ch-Se.ch}var ce="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",se=ce+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",re=new RegExp("<(/?)(["+ce+"]["+se+"]*)","g");function ue(ge,Se,ve,be){this.line=Se,this.ch=ve,this.cm=ge,this.text=ge.getLine(Se),this.min=be?Math.max(be.from,ge.firstLine()):ge.firstLine(),this.max=be?Math.min(be.to-1,ge.lastLine()):ge.lastLine()}function ee(ge,Se){var ve=ge.cm.getTokenTypeAt(ie(ge.line,Se));return ve&&/\btag\b/.test(ve)}function te(ge){if(!(ge.line>=ge.max))return ge.ch=0,ge.text=ge.cm.getLine(++ge.line),!0}function E(ge){if(!(ge.line<=ge.min))return ge.text=ge.cm.getLine(--ge.line),ge.ch=ge.text.length,!0}function y(ge){for(;;){var Se=ge.text.indexOf(">",ge.ch);if(Se==-1){if(te(ge))continue;return}if(!ee(ge,Se+1)){ge.ch=Se+1;continue}var ve=ge.text.lastIndexOf("/",Se),be=ve>-1&&!/\S/.test(ge.text.slice(ve+1,Se));return ge.ch=Se+1,be?"selfClose":"regular"}}function z(ge){for(;;){var Se=ge.ch?ge.text.lastIndexOf("<",ge.ch-1):-1;if(Se==-1){if(E(ge))continue;return}if(!ee(ge,Se+1)){ge.ch=Se;continue}re.lastIndex=Se,ge.ch=Se;var ve=re.exec(ge.text);if(ve&&ve.index==Se)return ve}}function x(ge){for(;;){re.lastIndex=ge.ch;var Se=re.exec(ge.text);if(!Se){if(te(ge))continue;return}if(!ee(ge,Se.index+1)){ge.ch=Se.index+1;continue}return ge.ch=Se.index+Se[0].length,Se}}function ne(ge){for(;;){var Se=ge.ch?ge.text.lastIndexOf(">",ge.ch-1):-1;if(Se==-1){if(E(ge))continue;return}if(!ee(ge,Se+1)){ge.ch=Se;continue}var ve=ge.text.lastIndexOf("/",Se),be=ve>-1&&!/\S/.test(ge.text.slice(ve+1,Se));return ge.ch=Se+1,be?"selfClose":"regular"}}function ae(ge,Se){for(var ve=[];;){var be=x(ge),xe,pe=ge.line,me=ge.ch-(be?be[0].length:0);if(!be||!(xe=y(ge)))return;if(xe!="selfClose")if(be[1]){for(var Ae=ve.length-1;Ae>=0;--Ae)if(ve[Ae]==be[2]){ve.length=Ae;break}if(Ae<0&&(!Se||Se==be[2]))return{tag:be[2],from:ie(pe,me),to:ie(ge.line,ge.ch)}}else ve.push(be[2])}}function oe(ge,Se){for(var ve=[];;){var be=ne(ge);if(!be)return;if(be=="selfClose"){z(ge);continue}var xe=ge.line,pe=ge.ch,me=z(ge);if(!me)return;if(me[1])ve.push(me[2]);else{for(var Ae=ve.length-1;Ae>=0;--Ae)if(ve[Ae]==me[2]){ve.length=Ae;break}if(Ae<0&&(!Se||Se==me[2]))return{tag:me[2],from:ie(ge.line,ge.ch),to:ie(xe,pe)}}}}de.registerHelper("fold","xml",function(ge,Se){for(var ve=new ue(ge,Se.line,0);;){var be=x(ve);if(!be||ve.line!=Se.line)return;var xe=y(ve);if(!xe)return;if(!be[1]&&xe!="selfClose"){var pe=ie(ve.line,ve.ch),me=ae(ve,be[2]);return me&&Ee(me.from,pe)>0?{from:pe,to:me.from}:null}}}),de.findMatchingTag=function(ge,Se,ve){var be=new ue(ge,Se.line,Se.ch,ve);if(!(be.text.indexOf(">")==-1&&be.text.indexOf("<")==-1)){var xe=y(be),pe=xe&&ie(be.line,be.ch),me=xe&&z(be);if(!(!xe||!me||Ee(be,Se)>0)){var Ae={from:ie(be.line,be.ch),to:pe,tag:me[2]};return xe=="selfClose"?{open:Ae,close:null,at:"open"}:me[1]?{open:oe(be,me[2]),close:Ae,at:"close"}:(be=new ue(ge,pe.line,pe.ch,ve),{open:Ae,close:ae(be,me[2]),at:"open"})}}},de.findEnclosingTag=function(ge,Se,ve,be){for(var xe=new ue(ge,Se.line,Se.ch,ve);;){var pe=oe(xe,be);if(!pe)break;var me=new ue(ge,Se.line,Se.ch,ve),Ae=ae(me,pe.tag);if(Ae)return{open:pe,close:Ae}}},de.scanForClosingTag=function(ge,Se,ve,be){var xe=new ue(ge,Se.line,Se.ch,be?{from:0,to:be}:null);return ae(xe,ve)}})},89780:function(Jt){(function(Ot,we){Jt.exports=we()})(this,function(){"use strict";var Ot=navigator.userAgent,we=navigator.platform,de=/gecko\/\d/i.test(Ot),ie=/MSIE \d/.test(Ot),Ee=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ot),ce=/Edge\/(\d+)/.exec(Ot),se=ie||Ee||ce,re=se&&(ie?document.documentMode||6:+(ce||Ee)[1]),ue=!ce&&/WebKit\//.test(Ot),ee=ue&&/Qt\/\d+\.\d+/.test(Ot),te=!ce&&/Chrome\//.test(Ot),E=/Opera\//.test(Ot),y=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ot),x=/PhantomJS/.test(Ot),ne=!ce&&/AppleWebKit/.test(Ot)&&/Mobile\/\w+/.test(Ot),ae=/Android/.test(Ot),oe=ne||ae||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ot),ge=ne||/Mac/.test(we),Se=/\bCrOS\b/.test(Ot),ve=/win/i.test(we),be=E&&Ot.match(/Version\/(\d*\.\d*)/);be&&(be=Number(be[1])),be&&be>=15&&(E=!1,ue=!0);var xe=ge&&(ee||E&&(be==null||be<12.11)),pe=de||se&&re>=9;function me(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var Ae=function(a,b){var he=a.className,fe=me(b).exec(he);if(fe){var Ce=he.slice(fe.index+fe[0].length);a.className=he.slice(0,fe.index)+(Ce?fe[1]+Ce:"")}};function De(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function ke(a,b){return De(a).appendChild(b)}function Ie(a,b,he,fe){var Ce=document.createElement(a);if(he&&(Ce.className=he),fe&&(Ce.style.cssText=fe),typeof b=="string")Ce.appendChild(document.createTextNode(b));else if(b)for(var Be=0;Be<b.length;++Be)Ce.appendChild(b[Be]);return Ce}function Fe(a,b,he,fe){var Ce=Ie(a,b,he,fe);return Ce.setAttribute("role","presentation"),Ce}var Pe;document.createRange?Pe=function(a,b,he,fe){var Ce=document.createRange();return Ce.setEnd(fe||a,he),Ce.setStart(a,b),Ce}:Pe=function(a,b,he){var fe=document.body.createTextRange();try{fe.moveToElementText(a.parentNode)}catch(Ce){return fe}return fe.collapse(!0),fe.moveEnd("character",he),fe.moveStart("character",b),fe};function qe(a,b){if(b.nodeType==3&&(b=b.parentNode),a.contains)return a.contains(b);do if(b.nodeType==11&&(b=b.host),b==a)return!0;while(b=b.parentNode)}function Ke(){var a;try{a=document.activeElement}catch(b){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function ot(a,b){var he=a.className;me(b).test(he)||(a.className+=(he?" ":"")+b)}function He(a,b){for(var he=a.split(" "),fe=0;fe<he.length;fe++)he[fe]&&!me(he[fe]).test(b)&&(b+=" "+he[fe]);return b}var rt=function(a){a.select()};ne?rt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:se&&(rt=function(a){try{a.select()}catch(b){}});function Ge(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function ct(a,b,he){b||(b={});for(var fe in a)a.hasOwnProperty(fe)&&(he!==!1||!b.hasOwnProperty(fe))&&(b[fe]=a[fe]);return b}function We(a,b,he,fe,Ce){b==null&&(b=a.search(/[^\s\u00a0]/),b==-1&&(b=a.length));for(var Be=fe||0,Xe=Ce||0;;){var it=a.indexOf(" ",Be);if(it<0||it>=b)return Xe+(b-Be);Xe+=it-Be,Xe+=he-Xe%he,Be=it+1}}var Ue=function(){this.id=null,this.f=null,this.time=0,this.handler=Ge(this.onTimeout,this)};Ue.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},Ue.prototype.set=function(a,b){this.f=b;var he=+new Date+a;(!this.id||he<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=he)};function Ze(a,b){for(var he=0;he<a.length;++he)if(a[he]==b)return he;return-1}var Je=50,$e={toString:function(){return"CodeMirror.Pass"}},Qe={scroll:!1},pt={origin:"*mouse"},ht={origin:"+move"};function Pt(a,b,he){for(var fe=0,Ce=0;;){var Be=a.indexOf(" ",fe);Be==-1&&(Be=a.length);var Xe=Be-fe;if(Be==a.length||Ce+Xe>=b)return fe+Math.min(Xe,b-Ce);if(Ce+=Be-fe,Ce+=he-Ce%he,fe=Be+1,Ce>=b)return fe}}var gt=[""];function bt(a){for(;gt.length<=a;)gt.push(St(gt)+" ");return gt[a]}function St(a){return a[a.length-1]}function lt(a,b){for(var he=[],fe=0;fe<a.length;fe++)he[fe]=b(a[fe],fe);return he}function _t(a,b,he){for(var fe=0,Ce=he(b);fe<a.length&&he(a[fe])<=Ce;)fe++;a.splice(fe,0,b)}function dt(){}function nt(a,b){var he;return Object.create?he=Object.create(a):(dt.prototype=a,he=new dt),b&&ct(b,he),he}var et=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ft(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||et.test(a))}function wt(a,b){return b?b.source.indexOf("\\w")>-1&&ft(a)?!0:b.test(a):ft(a)}function Tt(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}var Re=/[\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 Le(a){return a.charCodeAt(0)>=768&&Re.test(a)}function Te(a,b,he){for(;(he<0?b>0:b<a.length)&&Le(a.charAt(b));)b+=he;return b}function je(a,b,he){for(var fe=b>he?-1:1;;){if(b==he)return b;var Ce=(b+he)/2,Be=fe<0?Math.ceil(Ce):Math.floor(Ce);if(Be==b)return a(Be)?b:he;a(Be)?he=Be:b=Be+fe}}function ye(a,b,he,fe){if(!a)return fe(b,he,"ltr",0);for(var Ce=!1,Be=0;Be<a.length;++Be){var Xe=a[Be];(Xe.from<he&&Xe.to>b||b==he&&Xe.to==b)&&(fe(Math.max(Xe.from,b),Math.min(Xe.to,he),Xe.level==1?"rtl":"ltr",Be),Ce=!0)}Ce||fe(b,he,"ltr")}var le=null;function _e(a,b,he){var fe;le=null;for(var Ce=0;Ce<a.length;++Ce){var Be=a[Ce];if(Be.from<b&&Be.to>b)return Ce;Be.to==b&&(Be.from!=Be.to&&he=="before"?fe=Ce:le=Ce),Be.from==b&&(Be.from!=Be.to&&he!="before"?fe=Ce:le=Ce)}return fe!=null?fe:le}var Ne=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",b="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function he(vt){return vt<=247?a.charAt(vt):1424<=vt&&vt<=1524?"R":1536<=vt&&vt<=1785?b.charAt(vt-1536):1774<=vt&&vt<=2220?"r":8192<=vt&&vt<=8203?"w":vt==8204?"b":"L"}var fe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Ce=/[stwN]/,Be=/[LRr]/,Xe=/[Lb1n]/,it=/[1n]/;function at(vt,Bt,Ut){this.level=vt,this.from=Bt,this.to=Ut}return function(vt,Bt){var Ut=Bt=="ltr"?"L":"R";if(vt.length==0||Bt=="ltr"&&!fe.test(vt))return!1;for(var an=vt.length,en=[],Dn=0;Dn<an;++Dn)en.push(he(vt.charCodeAt(Dn)));for(var Kn=0,ir=Ut;Kn<an;++Kn){var pr=en[Kn];pr=="m"?en[Kn]=ir:ir=pr}for(var Sr=0,mr=Ut;Sr<an;++Sr){var Tr=en[Sr];Tr=="1"&&mr=="r"?en[Sr]="n":Be.test(Tr)&&(mr=Tr,Tr=="r"&&(en[Sr]="R"))}for(var ei=1,Vr=en[0];ei<an-1;++ei){var ki=en[ei];ki=="+"&&Vr=="1"&&en[ei+1]=="1"?en[ei]="1":ki==","&&Vr==en[ei+1]&&(Vr=="1"||Vr=="n")&&(en[ei]=Vr),Vr=ki}for(var eo=0;eo<an;++eo){var Mo=en[eo];if(Mo==",")en[eo]="N";else if(Mo=="%"){var ho=void 0;for(ho=eo+1;ho<an&&en[ho]=="%";++ho);for(var sa=eo&&en[eo-1]=="!"||ho<an&&en[ho]=="1"?"1":"N",$o=eo;$o<ho;++$o)en[$o]=sa;eo=ho-1}}for(var wo=0,ea=Ut;wo<an;++wo){var Bo=en[wo];ea=="L"&&Bo=="1"?en[wo]="L":Be.test(Bo)&&(ea=Bo)}for(var Lo=0;Lo<an;++Lo)if(Ce.test(en[Lo])){var xo=void 0;for(xo=Lo+1;xo<an&&Ce.test(en[xo]);++xo);for(var go=(Lo?en[Lo-1]:Ut)=="L",ta=(xo<an?en[xo]:Ut)=="L",Is=go==ta?go?"L":"R":Ut,us=Lo;us<xo;++us)en[us]=Is;Lo=xo-1}for(var zo=[],Ua,Ro=0;Ro<an;)if(Xe.test(en[Ro])){var xl=Ro;for(++Ro;Ro<an&&Xe.test(en[Ro]);++Ro);zo.push(new at(0,xl,Ro))}else{var Xa=Ro,gs=zo.length,ys=Bt=="rtl"?1:0;for(++Ro;Ro<an&&en[Ro]!="L";++Ro);for(var Vo=Xa;Vo<Ro;)if(it.test(en[Vo])){Xa<Vo&&(zo.splice(gs,0,new at(1,Xa,Vo)),gs+=ys);var Os=Vo;for(++Vo;Vo<Ro&&it.test(en[Vo]);++Vo);zo.splice(gs,0,new at(2,Os,Vo)),gs+=ys,Xa=Vo}else++Vo;Xa<Ro&&zo.splice(gs,0,new at(1,Xa,Ro))}return Bt=="ltr"&&(zo[0].level==1&&(Ua=vt.match(/^\s+/))&&(zo[0].from=Ua[0].length,zo.unshift(new at(0,0,Ua[0].length))),St(zo).level==1&&(Ua=vt.match(/\s+$/))&&(St(zo).to-=Ua[0].length,zo.push(new at(0,an-Ua[0].length,an)))),Bt=="rtl"?zo.reverse():zo}}();function Ye(a,b){var he=a.order;return he==null&&(he=a.order=Ne(a.text,b)),he}var Oe=[],tt=function(a,b,he){if(a.addEventListener)a.addEventListener(b,he,!1);else if(a.attachEvent)a.attachEvent("on"+b,he);else{var fe=a._handlers||(a._handlers={});fe[b]=(fe[b]||Oe).concat(he)}};function Ct(a,b){return a._handlers&&a._handlers[b]||Oe}function Nt(a,b,he){if(a.removeEventListener)a.removeEventListener(b,he,!1);else if(a.detachEvent)a.detachEvent("on"+b,he);else{var fe=a._handlers,Ce=fe&&fe[b];if(Ce){var Be=Ze(Ce,he);Be>-1&&(fe[b]=Ce.slice(0,Be).concat(Ce.slice(Be+1)))}}}function Dt(a,b){var he=Ct(a,b);if(he.length)for(var fe=Array.prototype.slice.call(arguments,2),Ce=0;Ce<he.length;++Ce)he[Ce].apply(null,fe)}function ut(a,b,he){return typeof b=="string"&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}}),Dt(a,he||b.type,a,b),Yt(b)||b.codemirrorIgnore}function Ht(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var he=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),fe=0;fe<b.length;++fe)Ze(he,b[fe])==-1&&he.push(b[fe])}function At(a,b){return Ct(a,b).length>0}function Wt(a){a.prototype.on=function(b,he){tt(this,b,he)},a.prototype.off=function(b,he){Nt(this,b,he)}}function on(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function bn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Yt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Mn(a){on(a),bn(a)}function Yn(a){return a.target||a.srcElement}function Vn(a){var b=a.which;return b==null&&(a.button&1?b=1:a.button&2?b=3:a.button&4&&(b=2)),ge&&a.ctrlKey&&b==1&&(b=3),b}var Jn=function(){if(se&&re<9)return!1;var a=Ie("div");return"draggable"in a||"dragDrop"in a}(),ar;function ur(a){if(ar==null){var b=Ie("span","\u200B");ke(a,Ie("span",[b,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(ar=b.offsetWidth<=1&&b.offsetHeight>2&&!(se&&re<8))}var he=ar?Ie("span","\u200B"):Ie("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return he.setAttribute("cm-text",""),he}var jn;function Bn(a){if(jn!=null)return jn;var b=ke(a,document.createTextNode("A\u062EA")),he=Pe(b,0,1).getBoundingClientRect(),fe=Pe(b,1,2).getBoundingClientRect();return De(a),!he||he.left==he.right?!1:jn=fe.right-he.right<3}var sr=`
b`.split(/\n/).length!=3?function(a){for(var b=0,he=[],fe=a.length;b<=fe;){var Ce=a.indexOf(`
`,b);Ce==-1&&(Ce=a.length);var Be=a.slice(b,a.charAt(Ce-1)=="\r"?Ce-1:Ce),Xe=Be.indexOf("\r");Xe!=-1?(he.push(Be.slice(0,Xe)),b+=Xe+1):(he.push(Be),b=Ce+1)}return he}:function(a){return a.split(/\r\n?|\n/)},Hn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){var b;try{b=a.ownerDocument.selection.createRange()}catch(he){}return!b||b.parentElement()!=a?!1:b.compareEndPoints("StartToEnd",b)!=0},In=function(){var a=Ie("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),gn=null;function Wn(a){if(gn!=null)return gn;var b=ke(a,Ie("span","x")),he=b.getBoundingClientRect(),fe=Pe(b,0,1).getBoundingClientRect();return gn=Math.abs(he.left-fe.left)>1}var fr={},mn={};function En(a,b){arguments.length>2&&(b.dependencies=Array.prototype.slice.call(arguments,2)),fr[a]=b}function rr(a,b){mn[a]=b}function Qt(a){if(typeof a=="string"&&mn.hasOwnProperty(a))a=mn[a];else if(a&&typeof a.name=="string"&&mn.hasOwnProperty(a.name)){var b=mn[a.name];typeof b=="string"&&(b={name:b}),a=nt(b,a),a.name=b.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return Qt("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return Qt("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Me(a,b){b=Qt(b);var he=fr[b.name];if(!he)return Me(a,"text/plain");var fe=he(a,b);if(ze.hasOwnProperty(b.name)){var Ce=ze[b.name];for(var Be in Ce)Ce.hasOwnProperty(Be)&&(fe.hasOwnProperty(Be)&&(fe["_"+Be]=fe[Be]),fe[Be]=Ce[Be])}if(fe.name=b.name,b.helperType&&(fe.helperType=b.helperType),b.modeProps)for(var Xe in b.modeProps)fe[Xe]=b.modeProps[Xe];return fe}var ze={};function Ve(a,b){var he=ze.hasOwnProperty(a)?ze[a]:ze[a]={};ct(b,he)}function st(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var he={};for(var fe in b){var Ce=b[fe];Ce instanceof Array&&(Ce=Ce.concat([])),he[fe]=Ce}return he}function yt(a,b){for(var he;a.innerMode&&(he=a.innerMode(b),!(!he||he.mode==a));)b=he.state,a=he.mode;return he||{mode:a,state:b}}function Ft(a,b,he){return a.startState?a.startState(b,he):!0}var Mt=function(a,b,he){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=he};Mt.prototype.eol=function(){return this.pos>=this.string.length},Mt.prototype.sol=function(){return this.pos==this.lineStart},Mt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Mt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Mt.prototype.eat=function(a){var b=this.string.charAt(this.pos),he;if(typeof a=="string"?he=b==a:he=b&&(a.test?a.test(b):a(b)),he)return++this.pos,b},Mt.prototype.eatWhile=function(a){for(var b=this.pos;this.eat(a););return this.pos>b},Mt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},Mt.prototype.skipToEnd=function(){this.pos=this.string.length},Mt.prototype.skipTo=function(a){var b=this.string.indexOf(a,this.pos);if(b>-1)return this.pos=b,!0},Mt.prototype.backUp=function(a){this.pos-=a},Mt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=We(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?We(this.string,this.lineStart,this.tabSize):0)},Mt.prototype.indentation=function(){return We(this.string,null,this.tabSize)-(this.lineStart?We(this.string,this.lineStart,this.tabSize):0)},Mt.prototype.match=function(a,b,he){if(typeof a=="string"){var fe=function(Xe){return he?Xe.toLowerCase():Xe},Ce=this.string.substr(this.pos,a.length);if(fe(Ce)==fe(a))return b!==!1&&(this.pos+=a.length),!0}else{var Be=this.string.slice(this.pos).match(a);return Be&&Be.index>0?null:(Be&&b!==!1&&(this.pos+=Be[0].length),Be)}},Mt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Mt.prototype.hideFirstChars=function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}},Mt.prototype.lookAhead=function(a){var b=this.lineOracle;return b&&b.lookAhead(a)},Mt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function jt(a,b){if(b-=a.first,b<0||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var he=a;!he.lines;)for(var fe=0;;++fe){var Ce=he.children[fe],Be=Ce.chunkSize();if(b<Be){he=Ce;break}b-=Be}return he.lines[b]}function qt(a,b,he){var fe=[],Ce=b.line;return a.iter(b.line,he.line+1,function(Be){var Xe=Be.text;Ce==he.line&&(Xe=Xe.slice(0,he.ch)),Ce==b.line&&(Xe=Xe.slice(b.ch)),fe.push(Xe),++Ce}),fe}function wn(a,b,he){var fe=[];return a.iter(b,he,function(Ce){fe.push(Ce.text)}),fe}function Qn(a,b){var he=b-a.height;if(he)for(var fe=a;fe;fe=fe.parent)fe.height+=he}function Rt(a){if(a.parent==null)return null;for(var b=a.parent,he=Ze(b.lines,a),fe=b.parent;fe;b=fe,fe=fe.parent)for(var Ce=0;fe.children[Ce]!=b;++Ce)he+=fe.children[Ce].chunkSize();return he+b.first}function Et(a,b){var he=a.first;e:do{for(var fe=0;fe<a.children.length;++fe){var Ce=a.children[fe],Be=Ce.height;if(b<Be){a=Ce;continue e}b-=Be,he+=Ce.chunkSize()}return he}while(!a.lines);for(var Xe=0;Xe<a.lines.length;++Xe){var it=a.lines[Xe],at=it.height;if(b<at)break;b-=at}return he+Xe}function sn(a,b){return b>=a.first&&b<a.first+a.size}function Zt(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function Lt(a,b,he){if(he===void 0&&(he=null),!(this instanceof Lt))return new Lt(a,b,he);this.line=a,this.ch=b,this.sticky=he}function zt(a,b){return a.line-b.line||a.ch-b.ch}function nn(a,b){return a.sticky==b.sticky&&zt(a,b)==0}function rn(a){return Lt(a.line,a.ch)}function _n(a,b){return zt(a,b)<0?b:a}function xn(a,b){return zt(a,b)<0?a:b}function Ln(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function Kt(a,b){if(b.line<a.first)return Lt(a.first,0);var he=a.first+a.size-1;return b.line>he?Lt(he,jt(a,he).text.length):Xt(b,jt(a,b.line).text.length)}function Xt(a,b){var he=a.ch;return he==null||he>b?Lt(a.line,b):he<0?Lt(a.line,0):a}function Cn(a,b){for(var he=[],fe=0;fe<b.length;fe++)he[fe]=Kt(a,b[fe]);return he}var Un=function(a,b){this.state=a,this.lookAhead=b},Zn=function(a,b,he,fe){this.state=b,this.doc=a,this.line=he,this.maxLookAhead=fe||0,this.baseTokens=null,this.baseTokenPos=1};Zn.prototype.lookAhead=function(a){var b=this.doc.getLine(this.line+a);return b!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),b},Zn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var b=this.baseTokens[this.baseTokenPos+1];return{type:b&&b.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},Zn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Zn.fromSaved=function(a,b,he){return b instanceof Un?new Zn(a,st(a.mode,b.state),he,b.lookAhead):new Zn(a,st(a.mode,b),he)},Zn.prototype.save=function(a){var b=a!==!1?st(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Un(b,this.maxLookAhead):b};function er(a,b,he,fe){var Ce=[a.state.modeGen],Be={};Yr(a,b.text,a.doc.mode,he,function(vt,Bt){return Ce.push(vt,Bt)},Be,fe);for(var Xe=he.state,it=function(vt){he.baseTokens=Ce;var Bt=a.state.overlays[vt],Ut=1,an=0;he.state=!0,Yr(a,b.text,Bt.mode,he,function(en,Dn){for(var Kn=Ut;an<en;){var ir=Ce[Ut];ir>en&&Ce.splice(Ut,1,en,Ce[Ut+1],ir),Ut+=2,an=Math.min(en,ir)}if(Dn)if(Bt.opaque)Ce.splice(Kn,Ut-Kn,en,"overlay "+Dn),Ut=Kn+2;else for(;Kn<Ut;Kn+=2){var pr=Ce[Kn+1];Ce[Kn+1]=(pr?pr+" ":"")+"overlay "+Dn}},Be),he.state=Xe,he.baseTokens=null,he.baseTokenPos=1},at=0;at<a.state.overlays.length;++at)it(at);return{styles:Ce,classes:Be.bgClass||Be.textClass?Be:null}}function Lr(a,b,he){if(!b.styles||b.styles[0]!=a.state.modeGen){var fe=wr(a,Rt(b)),Ce=b.text.length>a.options.maxHighlightLength&&st(a.doc.mode,fe.state),Be=er(a,b,fe);Ce&&(fe.state=Ce),b.stateAfter=fe.save(!Ce),b.styles=Be.styles,Be.classes?b.styleClasses=Be.classes:b.styleClasses&&(b.styleClasses=null),he===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return b.styles}function wr(a,b,he){var fe=a.doc,Ce=a.display;if(!fe.mode.startState)return new Zn(fe,!0,b);var Be=pi(a,b,he),Xe=Be>fe.first&&jt(fe,Be-1).stateAfter,it=Xe?Zn.fromSaved(fe,Xe,Be):new Zn(fe,Ft(fe.mode),Be);return fe.iter(Be,b,function(at){tr(a,at.text,it);var vt=it.line;at.stateAfter=vt==b-1||vt%5==0||vt>=Ce.viewFrom&&vt<Ce.viewTo?it.save():null,it.nextLine()}),he&&(fe.modeFrontier=it.line),it}function tr(a,b,he,fe){var Ce=a.doc.mode,Be=new Mt(b,a.options.tabSize,he);for(Be.start=Be.pos=fe||0,b==""&&zn(Ce,he.state);!Be.eol();)cr(Ce,Be,he.state),Be.start=Be.pos}function zn(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var he=yt(a,b);if(he.mode.blankLine)return he.mode.blankLine(he.state)}}function cr(a,b,he,fe){for(var Ce=0;Ce<10;Ce++){fe&&(fe[0]=yt(a,he).mode);var Be=a.token(b,he);if(b.pos>b.start)return Be}throw new Error("Mode "+a.name+" failed to advance stream.")}var Xn=function(a,b,he){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=b||null,this.state=he};function yr(a,b,he,fe){var Ce=a.doc,Be=Ce.mode,Xe;b=Kt(Ce,b);var it=jt(Ce,b.line),at=wr(a,b.line,he),vt=new Mt(it.text,a.options.tabSize,at),Bt;for(fe&&(Bt=[]);(fe||vt.pos<b.ch)&&!vt.eol();)vt.start=vt.pos,Xe=cr(Be,vt,at.state),fe&&Bt.push(new Xn(vt,Xe,st(Ce.mode,at.state)));return fe?Bt:new Xn(vt,Xe,at.state)}function Nr(a,b){if(a)for(;;){var he=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!he)break;a=a.slice(0,he.index)+a.slice(he.index+he[0].length);var fe=he[1]?"bgClass":"textClass";b[fe]==null?b[fe]=he[2]:new RegExp("(?:^|\\s)"+he[2]+"(?:$|\\s)").test(b[fe])||(b[fe]+=" "+he[2])}return a}function Yr(a,b,he,fe,Ce,Be,Xe){var it=he.flattenSpans;it==null&&(it=a.options.flattenSpans);var at=0,vt=null,Bt=new Mt(b,a.options.tabSize,fe),Ut,an=a.options.addModeClass&&[null];for(b==""&&Nr(zn(he,fe.state),Be);!Bt.eol();){if(Bt.pos>a.options.maxHighlightLength?(it=!1,Xe&&tr(a,b,fe,Bt.pos),Bt.pos=b.length,Ut=null):Ut=Nr(cr(he,Bt,fe.state,an),Be),an){var en=an[0].name;en&&(Ut="m-"+(Ut?en+" "+Ut:en))}if(!it||vt!=Ut){for(;at<Bt.start;)at=Math.min(Bt.start,at+5e3),Ce(at,vt);vt=Ut}Bt.start=Bt.pos}for(;at<Bt.pos;){var Dn=Math.min(Bt.pos,at+5e3);Ce(Dn,vt),at=Dn}}function pi(a,b,he){for(var fe,Ce,Be=a.doc,Xe=he?-1:b-(a.doc.mode.innerMode?1e3:100),it=b;it>Xe;--it){if(it<=Be.first)return Be.first;var at=jt(Be,it-1),vt=at.stateAfter;if(vt&&(!he||it+(vt instanceof Un?vt.lookAhead:0)<=Be.modeFrontier))return it;var Bt=We(at.text,null,a.options.tabSize);(Ce==null||fe>Bt)&&(Ce=it-1,fe=Bt)}return Ce}function _i(a,b){if(a.modeFrontier=Math.min(a.modeFrontier,b),!(a.highlightFrontier<b-10)){for(var he=a.first,fe=b-1;fe>he;fe--){var Ce=jt(a,fe).stateAfter;if(Ce&&(!(Ce instanceof Un)||fe+Ce.lookAhead<b)){he=fe+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,he)}}var Si=!1,oi=!1;function Mi(){Si=!0}function Li(){oi=!0}function lr(a,b,he){this.marker=a,this.from=b,this.to=he}function Ar(a,b){if(a)for(var he=0;he<a.length;++he){var fe=a[he];if(fe.marker==b)return fe}}function Mr(a,b){for(var he,fe=0;fe<a.length;++fe)a[fe]!=b&&(he||(he=[])).push(a[fe]);return he}function $r(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function Jr(a,b,he){var fe;if(a)for(var Ce=0;Ce<a.length;++Ce){var Be=a[Ce],Xe=Be.marker,it=Be.from==null||(Xe.inclusiveLeft?Be.from<=b:Be.from<b);if(it||Be.from==b&&Xe.type=="bookmark"&&(!he||!Be.marker.insertLeft)){var at=Be.to==null||(Xe.inclusiveRight?Be.to>=b:Be.to>b);(fe||(fe=[])).push(new lr(Xe,Be.from,at?null:Be.to))}}return fe}function wi(a,b,he){var fe;if(a)for(var Ce=0;Ce<a.length;++Ce){var Be=a[Ce],Xe=Be.marker,it=Be.to==null||(Xe.inclusiveRight?Be.to>=b:Be.to>b);if(it||Be.from==b&&Xe.type=="bookmark"&&(!he||Be.marker.insertLeft)){var at=Be.from==null||(Xe.inclusiveLeft?Be.from<=b:Be.from<b);(fe||(fe=[])).push(new lr(Xe,at?null:Be.from-b,Be.to==null?null:Be.to-b))}}return fe}function Hi(a,b){if(b.full)return null;var he=sn(a,b.from.line)&&jt(a,b.from.line).markedSpans,fe=sn(a,b.to.line)&&jt(a,b.to.line).markedSpans;if(!he&&!fe)return null;var Ce=b.from.ch,Be=b.to.ch,Xe=zt(b.from,b.to)==0,it=Jr(he,Ce,Xe),at=wi(fe,Be,Xe),vt=b.text.length==1,Bt=St(b.text).length+(vt?Ce:0);if(it)for(var Ut=0;Ut<it.length;++Ut){var an=it[Ut];if(an.to==null){var en=Ar(at,an.marker);en?vt&&(an.to=en.to==null?null:en.to+Bt):an.to=Ce}}if(at)for(var Dn=0;Dn<at.length;++Dn){var Kn=at[Dn];if(Kn.to!=null&&(Kn.to+=Bt),Kn.from==null){var ir=Ar(it,Kn.marker);ir||(Kn.from=Bt,vt&&(it||(it=[])).push(Kn))}else Kn.from+=Bt,vt&&(it||(it=[])).push(Kn)}it&&(it=It(it)),at&&at!=it&&(at=It(at));var pr=[it];if(!vt){var Sr=b.text.length-2,mr;if(Sr>0&&it)for(var Tr=0;Tr<it.length;++Tr)it[Tr].to==null&&(mr||(mr=[])).push(new lr(it[Tr].marker,null,null));for(var ei=0;ei<Sr;++ei)pr.push(mr);pr.push(at)}return pr}function It(a){for(var b=0;b<a.length;++b){var he=a[b];he.from!=null&&he.from==he.to&&he.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function tn(a,b,he){var fe=null;if(a.iter(b.line,he.line+1,function(en){if(en.markedSpans)for(var Dn=0;Dn<en.markedSpans.length;++Dn){var Kn=en.markedSpans[Dn].marker;Kn.readOnly&&(!fe||Ze(fe,Kn)==-1)&&(fe||(fe=[])).push(Kn)}}),!fe)return null;for(var Ce=[{from:b,to:he}],Be=0;Be<fe.length;++Be)for(var Xe=fe[Be],it=Xe.find(0),at=0;at<Ce.length;++at){var vt=Ce[at];if(!(zt(vt.to,it.from)<0||zt(vt.from,it.to)>0)){var Bt=[at,1],Ut=zt(vt.from,it.from),an=zt(vt.to,it.to);(Ut<0||!Xe.inclusiveLeft&&!Ut)&&Bt.push({from:vt.from,to:it.from}),(an>0||!Xe.inclusiveRight&&!an)&&Bt.push({from:it.to,to:vt.to}),Ce.splice.apply(Ce,Bt),at+=Bt.length-3}}return Ce}function Vt(a){var b=a.markedSpans;if(b){for(var he=0;he<b.length;++he)b[he].marker.detachLine(a);a.markedSpans=null}}function $t(a,b){if(b){for(var he=0;he<b.length;++he)b[he].marker.attachLine(a);a.markedSpans=b}}function cn(a){return a.inclusiveLeft?-1:0}function hn(a){return a.inclusiveRight?1:0}function Fn(a,b){var he=a.lines.length-b.lines.length;if(he!=0)return he;var fe=a.find(),Ce=b.find(),Be=zt(fe.from,Ce.from)||cn(a)-cn(b);if(Be)return-Be;var Xe=zt(fe.to,Ce.to)||hn(a)-hn(b);return Xe||b.id-a.id}function An(a,b){var he=oi&&a.markedSpans,fe;if(he)for(var Ce=void 0,Be=0;Be<he.length;++Be)Ce=he[Be],Ce.marker.collapsed&&(b?Ce.from:Ce.to)==null&&(!fe||Fn(fe,Ce.marker)<0)&&(fe=Ce.marker);return fe}function Sn(a){return An(a,!0)}function Gt(a){return An(a,!1)}function ln(a,b){var he=oi&&a.markedSpans,fe;if(he)for(var Ce=0;Ce<he.length;++Ce){var Be=he[Ce];Be.marker.collapsed&&(Be.from==null||Be.from<b)&&(Be.to==null||Be.to>b)&&(!fe||Fn(fe,Be.marker)<0)&&(fe=Be.marker)}return fe}function dn(a,b,he,fe,Ce){var Be=jt(a,b),Xe=oi&&Be.markedSpans;if(Xe)for(var it=0;it<Xe.length;++it){var at=Xe[it];if(at.marker.collapsed){var vt=at.marker.find(0),Bt=zt(vt.from,he)||cn(at.marker)-cn(Ce),Ut=zt(vt.to,fe)||hn(at.marker)-hn(Ce);if(!(Bt>=0&&Ut<=0||Bt<=0&&Ut>=0)&&(Bt<=0&&(at.marker.inclusiveRight&&Ce.inclusiveLeft?zt(vt.to,he)>=0:zt(vt.to,he)>0)||Bt>=0&&(at.marker.inclusiveRight&&Ce.inclusiveLeft?zt(vt.from,fe)<=0:zt(vt.from,fe)<0)))return!0}}}function un(a){for(var b;b=Sn(a);)a=b.find(-1,!0).line;return a}function vn(a){for(var b;b=Gt(a);)a=b.find(1,!0).line;return a}function Gn(a){for(var b,he;b=Gt(a);)a=b.find(1,!0).line,(he||(he=[])).push(a);return he}function yn(a,b){var he=jt(a,b),fe=un(he);return he==fe?b:Rt(fe)}function fn(a,b){if(b>a.lastLine())return b;var he=jt(a,b),fe;if(!Rn(a,he))return b;for(;fe=Gt(he);)he=fe.find(1,!0).line;return Rt(he)+1}function Rn(a,b){var he=oi&&b.markedSpans;if(he){for(var fe=void 0,Ce=0;Ce<he.length;++Ce)if(fe=he[Ce],!!fe.marker.collapsed){if(fe.from==null)return!0;if(!fe.marker.widgetNode&&fe.from==0&&fe.marker.inclusiveLeft&&On(a,b,fe))return!0}}}function On(a,b,he){if(he.to==null){var fe=he.marker.find(1,!0);return On(a,fe.line,Ar(fe.line.markedSpans,he.marker))}if(he.marker.inclusiveRight&&he.to==b.text.length)return!0;for(var Ce=void 0,Be=0;Be<b.markedSpans.length;++Be)if(Ce=b.markedSpans[Be],Ce.marker.collapsed&&!Ce.marker.widgetNode&&Ce.from==he.to&&(Ce.to==null||Ce.to!=he.from)&&(Ce.marker.inclusiveLeft||he.marker.inclusiveRight)&&On(a,b,Ce))return!0}function qn(a){a=un(a);for(var b=0,he=a.parent,fe=0;fe<he.lines.length;++fe){var Ce=he.lines[fe];if(Ce==a)break;b+=Ce.height}for(var Be=he.parent;Be;he=Be,Be=he.parent)for(var Xe=0;Xe<Be.children.length;++Xe){var it=Be.children[Xe];if(it==he)break;b+=it.height}return b}function gr(a){if(a.height==0)return 0;for(var b=a.text.length,he,fe=a;he=Sn(fe);){var Ce=he.find(0,!0);fe=Ce.from.line,b+=Ce.from.ch-Ce.to.ch}for(fe=a;he=Gt(fe);){var Be=he.find(0,!0);b-=fe.text.length-Be.from.ch,fe=Be.to.line,b+=fe.text.length-Be.to.ch}return b}function dr(a){var b=a.display,he=a.doc;b.maxLine=jt(he,he.first),b.maxLineLength=gr(b.maxLine),b.maxLineChanged=!0,he.iter(function(fe){var Ce=gr(fe);Ce>b.maxLineLength&&(b.maxLineLength=Ce,b.maxLine=fe)})}var Pr=function(a,b,he){this.text=a,$t(this,b),this.height=he?he(this):1};Pr.prototype.lineNo=function(){return Rt(this)},Wt(Pr);function Er(a,b,he,fe){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Vt(a),$t(a,he);var Ce=fe?fe(a):1;Ce!=a.height&&Qn(a,Ce)}function Ir(a){a.parent=null,Vt(a)}var Zr={},Fr={};function li(a,b){if(!a||/^\s*$/.test(a))return null;var he=b.addModeClass?Fr:Zr;return he[a]||(he[a]=a.replace(/\S+/g,"cm-$&"))}function Wr(a,b){var he=Fe("span",null,null,ue?"padding-right: .1px":null),fe={pre:Fe("pre",[he],"CodeMirror-line"),content:he,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};b.measure={};for(var Ce=0;Ce<=(b.rest?b.rest.length:0);Ce++){var Be=Ce?b.rest[Ce-1]:b.line,Xe=void 0;fe.pos=0,fe.addToken=Rr,Bn(a.display.measure)&&(Xe=Ye(Be,a.doc.direction))&&(fe.addToken=vr(fe.addToken,Xe)),fe.map=[];var it=b!=a.display.externalMeasured&&Rt(Be);_r(Be,fe,Lr(a,Be,it)),Be.styleClasses&&(Be.styleClasses.bgClass&&(fe.bgClass=He(Be.styleClasses.bgClass,fe.bgClass||"")),Be.styleClasses.textClass&&(fe.textClass=He(Be.styleClasses.textClass,fe.textClass||""))),fe.map.length==0&&fe.map.push(0,0,fe.content.appendChild(ur(a.display.measure))),Ce==0?(b.measure.map=fe.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(fe.map),(b.measure.caches||(b.measure.caches=[])).push({}))}if(ue){var at=fe.content.lastChild;(/\bcm-tab\b/.test(at.className)||at.querySelector&&at.querySelector(".cm-tab"))&&(fe.content.className="cm-tab-wrap-hack")}return Dt(a,"renderLine",a,b.line,fe.pre),fe.pre.className&&(fe.textClass=He(fe.pre.className,fe.textClass||"")),fe}function qr(a){var b=Ie("span","\u2022","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function Rr(a,b,he,fe,Ce,Be,Xe){if(b){var it=a.splitSpaces?hr(b,a.trailingSpace):b,at=a.cm.state.specialChars,vt=!1,Bt;if(!at.test(b))a.col+=b.length,Bt=document.createTextNode(it),a.map.push(a.pos,a.pos+b.length,Bt),se&&re<9&&(vt=!0),a.pos+=b.length;else{Bt=document.createDocumentFragment();for(var Ut=0;;){at.lastIndex=Ut;var an=at.exec(b),en=an?an.index-Ut:b.length-Ut;if(en){var Dn=document.createTextNode(it.slice(Ut,Ut+en));se&&re<9?Bt.appendChild(Ie("span",[Dn])):Bt.appendChild(Dn),a.map.push(a.pos,a.pos+en,Dn),a.col+=en,a.pos+=en}if(!an)break;Ut+=en+1;var Kn=void 0;if(an[0]==" "){var ir=a.cm.options.tabSize,pr=ir-a.col%ir;Kn=Bt.appendChild(Ie("span",bt(pr),"cm-tab")),Kn.setAttribute("role","presentation"),Kn.setAttribute("cm-text"," "),a.col+=pr}else an[0]=="\r"||an[0]==`
`?(Kn=Bt.appendChild(Ie("span",an[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Kn.setAttribute("cm-text",an[0]),a.col+=1):(Kn=a.cm.options.specialCharPlaceholder(an[0]),Kn.setAttribute("cm-text",an[0]),se&&re<9?Bt.appendChild(Ie("span",[Kn])):Bt.appendChild(Kn),a.col+=1);a.map.push(a.pos,a.pos+1,Kn),a.pos++}}if(a.trailingSpace=it.charCodeAt(b.length-1)==32,he||fe||Ce||vt||Be||Xe){var Sr=he||"";fe&&(Sr+=fe),Ce&&(Sr+=Ce);var mr=Ie("span",[Bt],Sr,Be);if(Xe)for(var Tr in Xe)Xe.hasOwnProperty(Tr)&&Tr!="style"&&Tr!="class"&&mr.setAttribute(Tr,Xe[Tr]);return a.content.appendChild(mr)}a.content.appendChild(Bt)}}function hr(a,b){if(a.length>1&&!/ /.test(a))return a;for(var he=b,fe="",Ce=0;Ce<a.length;Ce++){var Be=a.charAt(Ce);Be==" "&&he&&(Ce==a.length-1||a.charCodeAt(Ce+1)==32)&&(Be="\xA0"),fe+=Be,he=Be==" "}return fe}function vr(a,b){return function(he,fe,Ce,Be,Xe,it,at){Ce=Ce?Ce+" cm-force-border":"cm-force-border";for(var vt=he.pos,Bt=vt+fe.length;;){for(var Ut=void 0,an=0;an<b.length&&(Ut=b[an],!(Ut.to>vt&&Ut.from<=vt));an++);if(Ut.to>=Bt)return a(he,fe,Ce,Be,Xe,it,at);a(he,fe.slice(0,Ut.to-vt),Ce,Be,null,it,at),Be=null,fe=fe.slice(Ut.to-vt),vt=Ut.to}}}function jr(a,b,he,fe){var Ce=!fe&&he.widgetNode;Ce&&a.map.push(a.pos,a.pos+b,Ce),!fe&&a.cm.display.input.needsContentAttribute&&(Ce||(Ce=a.content.appendChild(document.createElement("span"))),Ce.setAttribute("cm-marker",he.id)),Ce&&(a.cm.display.input.setUneditable(Ce),a.content.appendChild(Ce)),a.pos+=b,a.trailingSpace=!1}function _r(a,b,he){var fe=a.markedSpans,Ce=a.text,Be=0;if(!fe){for(var Xe=1;Xe<he.length;Xe+=2)b.addToken(b,Ce.slice(Be,Be=he[Xe]),li(he[Xe+1],b.cm.options));return}for(var it=Ce.length,at=0,vt=1,Bt="",Ut,an,en=0,Dn,Kn,ir,pr,Sr;;){if(en==at){Dn=Kn=ir=an="",Sr=null,pr=null,en=1/0;for(var mr=[],Tr=void 0,ei=0;ei<fe.length;++ei){var Vr=fe[ei],ki=Vr.marker;if(ki.type=="bookmark"&&Vr.from==at&&ki.widgetNode)mr.push(ki);else if(Vr.from<=at&&(Vr.to==null||Vr.to>at||ki.collapsed&&Vr.to==at&&Vr.from==at)){if(Vr.to!=null&&Vr.to!=at&&en>Vr.to&&(en=Vr.to,Kn=""),ki.className&&(Dn+=" "+ki.className),ki.css&&(an=(an?an+";":"")+ki.css),ki.startStyle&&Vr.from==at&&(ir+=" "+ki.startStyle),ki.endStyle&&Vr.to==en&&(Tr||(Tr=[])).push(ki.endStyle,Vr.to),ki.title&&((Sr||(Sr={})).title=ki.title),ki.attributes)for(var eo in ki.attributes)(Sr||(Sr={}))[eo]=ki.attributes[eo];ki.collapsed&&(!pr||Fn(pr.marker,ki)<0)&&(pr=Vr)}else Vr.from>at&&en>Vr.from&&(en=Vr.from)}if(Tr)for(var Mo=0;Mo<Tr.length;Mo+=2)Tr[Mo+1]==en&&(Kn+=" "+Tr[Mo]);if(!pr||pr.from==at)for(var ho=0;ho<mr.length;++ho)jr(b,0,mr[ho]);if(pr&&(pr.from||0)==at){if(jr(b,(pr.to==null?it+1:pr.to)-at,pr.marker,pr.from==null),pr.to==null)return;pr.to==at&&(pr=!1)}}if(at>=it)break;for(var sa=Math.min(it,en);;){if(Bt){var $o=at+Bt.length;if(!pr){var wo=$o>sa?Bt.slice(0,sa-at):Bt;b.addToken(b,wo,Ut?Ut+Dn:Dn,ir,at+wo.length==en?Kn:"",an,Sr)}if($o>=sa){Bt=Bt.slice(sa-at),at=sa;break}at=$o,ir=""}Bt=Ce.slice(Be,Be=he[vt++]),Ut=li(he[vt++],b.cm.options)}}}function Qr(a,b,he){this.line=b,this.rest=Gn(b),this.size=this.rest?Rt(St(this.rest))-he+1:1,this.node=this.text=null,this.hidden=Rn(a,b)}function ti(a,b,he){for(var fe=[],Ce,Be=b;Be<he;Be=Ce){var Xe=new Qr(a.doc,jt(a.doc,Be),Be);Ce=Be+Xe.size,fe.push(Xe)}return fe}var di=null;function po(a){di?di.ops.push(a):a.ownsGroup=di={ops:[a],delayedCallbacks:[]}}function ao(a){var b=a.delayedCallbacks,he=0;do{for(;he<b.length;he++)b[he].call(null);for(var fe=0;fe<a.ops.length;fe++){var Ce=a.ops[fe];if(Ce.cursorActivityHandlers)for(;Ce.cursorActivityCalled<Ce.cursorActivityHandlers.length;)Ce.cursorActivityHandlers[Ce.cursorActivityCalled++].call(null,Ce.cm)}}while(he<b.length)}function to(a,b){var he=a.ownsGroup;if(he)try{ao(he)}finally{di=null,b(he)}}var mo=null;function Ii(a,b){var he=Ct(a,b);if(he.length){var fe=Array.prototype.slice.call(arguments,2),Ce;di?Ce=di.delayedCallbacks:mo?Ce=mo:(Ce=mo=[],setTimeout(Ti,0));for(var Be=function(it){Ce.push(function(){return he[it].apply(null,fe)})},Xe=0;Xe<he.length;++Xe)Be(Xe)}}function Ti(){var a=mo;mo=null;for(var b=0;b<a.length;++b)a[b]()}function Ni(a,b,he,fe){for(var Ce=0;Ce<b.changes.length;Ce++){var Be=b.changes[Ce];Be=="text"?ji(a,b):Be=="gutter"?Kr(a,b,he,fe):Be=="class"?xr(a,b):Be=="widget"&&Gr(a,b,fe)}b.changes=null}function vo(a){return a.node==a.text&&(a.node=Ie("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),se&&re<8&&(a.node.style.zIndex=2)),a.node}function Fi(a,b){var he=b.bgClass?b.bgClass+" "+(b.line.bgClass||""):b.line.bgClass;if(he&&(he+=" CodeMirror-linebackground"),b.background)he?b.background.className=he:(b.background.parentNode.removeChild(b.background),b.background=null);else if(he){var fe=vo(b);b.background=fe.insertBefore(Ie("div",null,he),fe.firstChild),a.display.input.setUneditable(b.background)}}function Gi(a,b){var he=a.display.externalMeasured;return he&&he.line==b.line?(a.display.externalMeasured=null,b.measure=he.measure,he.built):Wr(a,b)}function ji(a,b){var he=b.text.className,fe=Gi(a,b);b.text==b.node&&(b.node=fe.pre),b.text.parentNode.replaceChild(fe.pre,b.text),b.text=fe.pre,fe.bgClass!=b.bgClass||fe.textClass!=b.textClass?(b.bgClass=fe.bgClass,b.textClass=fe.textClass,xr(a,b)):he&&(b.text.className=he)}function xr(a,b){Fi(a,b),b.line.wrapClass?vo(b).className=b.line.wrapClass:b.node!=b.text&&(b.node.className="");var he=b.textClass?b.textClass+" "+(b.line.textClass||""):b.line.textClass;b.text.className=he||""}function Kr(a,b,he,fe){if(b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null),b.gutterBackground&&(b.node.removeChild(b.gutterBackground),b.gutterBackground=null),b.line.gutterClass){var Ce=vo(b);b.gutterBackground=Ie("div",null,"CodeMirror-gutter-background "+b.line.gutterClass,"left: "+(a.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px; width: "+fe.gutterTotalWidth+"px"),a.display.input.setUneditable(b.gutterBackground),Ce.insertBefore(b.gutterBackground,b.text)}var Be=b.line.gutterMarkers;if(a.options.lineNumbers||Be){var Xe=vo(b),it=b.gutter=Ie("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?fe.fixedPos:-fe.gutterTotalWidth)+"px");if(a.display.input.setUneditable(it),Xe.insertBefore(it,b.text),b.line.gutterClass&&(it.className+=" "+b.line.gutterClass),a.options.lineNumbers&&(!Be||!Be["CodeMirror-linenumbers"])&&(b.lineNumber=it.appendChild(Ie("div",Zt(a.options,he),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fe.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),Be)for(var at=0;at<a.display.gutterSpecs.length;++at){var vt=a.display.gutterSpecs[at].className,Bt=Be.hasOwnProperty(vt)&&Be[vt];Bt&&it.appendChild(Ie("div",[Bt],"CodeMirror-gutter-elt","left: "+fe.gutterLeft[vt]+"px; width: "+fe.gutterWidth[vt]+"px"))}}}function Gr(a,b,he){b.alignable&&(b.alignable=null);for(var fe=me("CodeMirror-linewidget"),Ce=b.node.firstChild,Be=void 0;Ce;Ce=Be)Be=Ce.nextSibling,fe.test(Ce.className)&&b.node.removeChild(Ce);xi(a,b,he)}function Xr(a,b,he,fe){var Ce=Gi(a,b);return b.text=b.node=Ce.pre,Ce.bgClass&&(b.bgClass=Ce.bgClass),Ce.textClass&&(b.textClass=Ce.textClass),xr(a,b),Kr(a,b,he,fe),xi(a,b,fe),b.node}function xi(a,b,he){if(Oi(a,b.line,b,he,!0),b.rest)for(var fe=0;fe<b.rest.length;fe++)Oi(a,b.rest[fe],b,he,!1)}function Oi(a,b,he,fe,Ce){if(b.widgets)for(var Be=vo(he),Xe=0,it=b.widgets;Xe<it.length;++Xe){var at=it[Xe],vt=Ie("div",[at.node],"CodeMirror-linewidget"+(at.className?" "+at.className:""));at.handleMouseEvents||vt.setAttribute("cm-ignore-events","true"),Ao(at,vt,he,fe),a.display.input.setUneditable(vt),Ce&&at.above?Be.insertBefore(vt,he.gutter||he.text):Be.appendChild(vt),Ii(at,"redraw")}}function Ao(a,b,he,fe){if(a.noHScroll){(he.alignable||(he.alignable=[])).push(b);var Ce=fe.wrapperWidth;b.style.left=fe.fixedPos+"px",a.coverGutter||(Ce-=fe.gutterTotalWidth,b.style.paddingLeft=fe.gutterTotalWidth+"px"),b.style.width=Ce+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-fe.gutterTotalWidth+"px"))}function Yi(a){if(a.height!=null)return a.height;var b=a.doc.cm;if(!b)return 0;if(!qe(document.body,a.node)){var he="position: relative;";a.coverGutter&&(he+="margin-left: -"+b.display.gutters.offsetWidth+"px;"),a.noHScroll&&(he+="width: "+b.display.wrapper.clientWidth+"px;"),ke(b.display.measure,Ie("div",[a.node],null,he))}return a.height=a.node.parentNode.offsetHeight}function Xi(a,b){for(var he=Yn(b);he!=a.wrapper;he=he.parentNode)if(!he||he.nodeType==1&&he.getAttribute("cm-ignore-events")=="true"||he.parentNode==a.sizer&&he!=a.mover)return!0}function ui(a){return a.lineSpace.offsetTop}function no(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Io(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=ke(a.measure,Ie("pre","x","CodeMirror-line-like")),he=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,fe={left:parseInt(he.paddingLeft),right:parseInt(he.paddingRight)};return!isNaN(fe.left)&&!isNaN(fe.right)&&(a.cachedPaddingH=fe),fe}function Ui(a){return Je-a.display.nativeBarWidth}function Ho(a){return a.display.scroller.clientWidth-Ui(a)-a.display.barWidth}function Co(a){return a.display.scroller.clientHeight-Ui(a)-a.display.barHeight}function Oo(a,b,he){var fe=a.options.lineWrapping,Ce=fe&&Ho(a);if(!b.measure.heights||fe&&b.measure.width!=Ce){var Be=b.measure.heights=[];if(fe){b.measure.width=Ce;for(var Xe=b.text.firstChild.getClientRects(),it=0;it<Xe.length-1;it++){var at=Xe[it],vt=Xe[it+1];Math.abs(at.bottom-vt.bottom)>2&&Be.push((at.bottom+vt.top)/2-he.top)}}Be.push(he.bottom-he.top)}}function Ki(a,b,he){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var fe=0;fe<a.rest.length;fe++)if(a.rest[fe]==b)return{map:a.measure.maps[fe],cache:a.measure.caches[fe]};for(var Ce=0;Ce<a.rest.length;Ce++)if(Rt(a.rest[Ce])>he)return{map:a.measure.maps[Ce],cache:a.measure.caches[Ce],before:!0}}function Wo(a,b){b=un(b);var he=Rt(b),fe=a.display.externalMeasured=new Qr(a.doc,b,he);fe.lineN=he;var Ce=fe.built=Wr(a,fe);return fe.text=Ce.pre,ke(a.display.lineMeasure,Ce.pre),fe}function za(a,b,he,fe){return Zo(a,la(a,b),he,fe)}function Yo(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[_o(a,b)];var he=a.display.externalMeasured;if(he&&b>=he.lineN&&b<he.lineN+he.size)return he}function la(a,b){var he=Rt(b),fe=Yo(a,he);fe&&!fe.text?fe=null:fe&&fe.changes&&(Ni(a,fe,he,Xo(a)),a.curOp.forceUpdate=!0),fe||(fe=Wo(a,b));var Ce=Ki(fe,b,he);return{line:b,view:fe,rect:null,map:Ce.map,cache:Ce.cache,before:Ce.before,hasHeights:!1}}function Zo(a,b,he,fe,Ce){b.before&&(he=-1);var Be=he+(fe||""),Xe;return b.cache.hasOwnProperty(Be)?Xe=b.cache[Be]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(Oo(a,b.view,b.rect),b.hasHeights=!0),Xe=cs(a,b,he,fe),Xe.bogus||(b.cache[Be]=Xe)),{left:Xe.left,right:Xe.right,top:Ce?Xe.rtop:Xe.top,bottom:Ce?Xe.rbottom:Xe.bottom}}var Da={left:0,right:0,top:0,bottom:0};function qa(a,b,he){for(var fe,Ce,Be,Xe,it,at,vt=0;vt<a.length;vt+=3)if(it=a[vt],at=a[vt+1],b<it?(Ce=0,Be=1,Xe="left"):b<at?(Ce=b-it,Be=Ce+1):(vt==a.length-3||b==at&&a[vt+3]>b)&&(Be=at-it,Ce=Be-1,b>=at&&(Xe="right")),Ce!=null){if(fe=a[vt+2],it==at&&he==(fe.insertLeft?"left":"right")&&(Xe=he),he=="left"&&Ce==0)for(;vt&&a[vt-2]==a[vt-3]&&a[vt-1].insertLeft;)fe=a[(vt-=3)+2],Xe="left";if(he=="right"&&Ce==at-it)for(;vt<a.length-3&&a[vt+3]==a[vt+4]&&!a[vt+5].insertLeft;)fe=a[(vt+=3)+2],Xe="right";break}return{node:fe,start:Ce,end:Be,collapse:Xe,coverStart:it,coverEnd:at}}function ba(a,b){var he=Da;if(b=="left")for(var fe=0;fe<a.length&&(he=a[fe]).left==he.right;fe++);else for(var Ce=a.length-1;Ce>=0&&(he=a[Ce]).left==he.right;Ce--);return he}function cs(a,b,he,fe){var Ce=qa(b.map,he,fe),Be=Ce.node,Xe=Ce.start,it=Ce.end,at=Ce.collapse,vt;if(Be.nodeType==3){for(var Bt=0;Bt<4;Bt++){for(;Xe&&Le(b.line.text.charAt(Ce.coverStart+Xe));)--Xe;for(;Ce.coverStart+it<Ce.coverEnd&&Le(b.line.text.charAt(Ce.coverStart+it));)++it;if(se&&re<9&&Xe==0&&it==Ce.coverEnd-Ce.coverStart?vt=Be.parentNode.getBoundingClientRect():vt=ba(Pe(Be,Xe,it).getClientRects(),fe),vt.left||vt.right||Xe==0)break;it=Xe,Xe=Xe-1,at="right"}se&&re<11&&(vt=Ma(a.display.measure,vt))}else{Xe>0&&(at=fe="right");var Ut;a.options.lineWrapping&&(Ut=Be.getClientRects()).length>1?vt=Ut[fe=="right"?Ut.length-1:0]:vt=Be.getBoundingClientRect()}if(se&&re<9&&!Xe&&(!vt||!vt.left&&!vt.right)){var an=Be.parentNode.getClientRects()[0];an?vt={left:an.left,right:an.left+Fo(a.display),top:an.top,bottom:an.bottom}:vt=Da}for(var en=vt.top-b.rect.top,Dn=vt.bottom-b.rect.top,Kn=(en+Dn)/2,ir=b.view.measure.heights,pr=0;pr<ir.length-1&&!(Kn<ir[pr]);pr++);var Sr=pr?ir[pr-1]:0,mr=ir[pr],Tr={left:(at=="right"?vt.right:vt.left)-b.rect.left,right:(at=="left"?vt.left:vt.right)-b.rect.left,top:Sr,bottom:mr};return!vt.left&&!vt.right&&(Tr.bogus=!0),a.options.singleCursorHeightPerLine||(Tr.rtop=en,Tr.rbottom=Dn),Tr}function Ma(a,b){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Wn(a))return b;var he=screen.logicalXDPI/screen.deviceXDPI,fe=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*he,right:b.right*he,top:b.top*fe,bottom:b.bottom*fe}}function Ha(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function Ra(a){a.display.externalMeasure=null,De(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)Ha(a.display.view[b])}function pa(a){Ra(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Wa(){return te&&ae?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ja(){return te&&ae?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Sa(a){var b=0;if(a.widgets)for(var he=0;he<a.widgets.length;++he)a.widgets[he].above&&(b+=Yi(a.widgets[he]));return b}function wa(a,b,he,fe,Ce){if(!Ce){var Be=Sa(b);he.top+=Be,he.bottom+=Be}if(fe=="line")return he;fe||(fe="local");var Xe=qn(b);if(fe=="local"?Xe+=ui(a.display):Xe-=a.display.viewOffset,fe=="page"||fe=="window"){var it=a.display.lineSpace.getBoundingClientRect();Xe+=it.top+(fe=="window"?0:Ja());var at=it.left+(fe=="window"?0:Wa());he.left+=at,he.right+=at}return he.top+=Xe,he.bottom+=Xe,he}function ua(a,b,he){if(he=="div")return b;var fe=b.left,Ce=b.top;if(he=="page")fe-=Wa(),Ce-=Ja();else if(he=="local"||!he){var Be=a.display.sizer.getBoundingClientRect();fe+=Be.left,Ce+=Be.top}var Xe=a.display.lineSpace.getBoundingClientRect();return{left:fe-Xe.left,top:Ce-Xe.top}}function To(a,b,he,fe,Ce){return fe||(fe=jt(a.doc,b.line)),wa(a,fe,za(a,fe,b.ch,Ce),he)}function qi(a,b,he,fe,Ce,Be){fe=fe||jt(a.doc,b.line),Ce||(Ce=la(a,fe));function Xe(Dn,Kn){var ir=Zo(a,Ce,Dn,Kn?"right":"left",Be);return Kn?ir.left=ir.right:ir.right=ir.left,wa(a,fe,ir,he)}var it=Ye(fe,a.doc.direction),at=b.ch,vt=b.sticky;if(at>=fe.text.length?(at=fe.text.length,vt="before"):at<=0&&(at=0,vt="after"),!it)return Xe(vt=="before"?at-1:at,vt=="before");function Bt(Dn,Kn,ir){var pr=it[Kn],Sr=pr.level==1;return Xe(ir?Dn-1:Dn,Sr!=ir)}var Ut=_e(it,at,vt),an=le,en=Bt(at,Ut,vt=="before");return an!=null&&(en.other=Bt(at,an,vt!="before")),en}function vi(a,b){var he=0;b=Kt(a.doc,b),a.options.lineWrapping||(he=Fo(a.display)*b.ch);var fe=jt(a.doc,b.line),Ce=qn(fe)+ui(a.display);return{left:he,right:he,top:Ce,bottom:Ce+fe.height}}function ai(a,b,he,fe,Ce){var Be=Lt(a,b,he);return Be.xRel=Ce,fe&&(Be.outside=fe),Be}function ro(a,b,he){var fe=a.doc;if(he+=a.display.viewOffset,he<0)return ai(fe.first,0,null,-1,-1);var Ce=Et(fe,he),Be=fe.first+fe.size-1;if(Ce>Be)return ai(fe.first+fe.size-1,jt(fe,Be).text.length,null,1,1);b<0&&(b=0);for(var Xe=jt(fe,Ce);;){var it=na(a,Xe,Ce,b,he),at=ln(Xe,it.ch+(it.xRel>0||it.outside>0?1:0));if(!at)return it;var vt=at.find(1);if(vt.line==Ce)return vt;Xe=jt(fe,Ce=vt.line)}}function Ji(a,b,he,fe){fe-=Sa(b);var Ce=b.text.length,Be=je(function(Xe){return Zo(a,he,Xe-1).bottom<=fe},Ce,0);return Ce=je(function(Xe){return Zo(a,he,Xe).top>fe},Be,Ce),{begin:Be,end:Ce}}function io(a,b,he,fe){he||(he=la(a,b));var Ce=wa(a,b,Zo(a,he,fe),"line").top;return Ji(a,b,he,Ce)}function co(a,b,he,fe){return a.bottom<=he?!1:a.top>he?!0:(fe?a.left:a.right)>b}function na(a,b,he,fe,Ce){Ce-=qn(b);var Be=la(a,b),Xe=Sa(b),it=0,at=b.text.length,vt=!0,Bt=Ye(b,a.doc.direction);if(Bt){var Ut=(a.options.lineWrapping?ca:Go)(a,b,he,Be,Bt,fe,Ce);vt=Ut.level!=1,it=vt?Ut.from:Ut.to-1,at=vt?Ut.to:Ut.from-1}var an=null,en=null,Dn=je(function(ei){var Vr=Zo(a,Be,ei);return Vr.top+=Xe,Vr.bottom+=Xe,co(Vr,fe,Ce,!1)?(Vr.top<=Ce&&Vr.left<=fe&&(an=ei,en=Vr),!0):!1},it,at),Kn,ir,pr=!1;if(en){var Sr=fe-en.left<en.right-fe,mr=Sr==vt;Dn=an+(mr?0:1),ir=mr?"after":"before",Kn=Sr?en.left:en.right}else{!vt&&(Dn==at||Dn==it)&&Dn++,ir=Dn==0?"after":Dn==b.text.length?"before":Zo(a,Be,Dn-(vt?1:0)).bottom+Xe<=Ce==vt?"after":"before";var Tr=qi(a,Lt(he,Dn,ir),"line",b,Be);Kn=Tr.left,pr=Ce<Tr.top?-1:Ce>=Tr.bottom?1:0}return Dn=Te(b.text,Dn,1),ai(he,Dn,ir,pr,fe-Kn)}function Go(a,b,he,fe,Ce,Be,Xe){var it=je(function(Ut){var an=Ce[Ut],en=an.level!=1;return co(qi(a,Lt(he,en?an.to:an.from,en?"before":"after"),"line",b,fe),Be,Xe,!0)},0,Ce.length-1),at=Ce[it];if(it>0){var vt=at.level!=1,Bt=qi(a,Lt(he,vt?at.from:at.to,vt?"after":"before"),"line",b,fe);co(Bt,Be,Xe,!0)&&Bt.top>Xe&&(at=Ce[it-1])}return at}function ca(a,b,he,fe,Ce,Be,Xe){var it=Ji(a,b,fe,Xe),at=it.begin,vt=it.end;/\s/.test(b.text.charAt(vt-1))&&vt--;for(var Bt=null,Ut=null,an=0;an<Ce.length;an++){var en=Ce[an];if(!(en.from>=vt||en.to<=at)){var Dn=en.level!=1,Kn=Zo(a,fe,Dn?Math.min(vt,en.to)-1:Math.max(at,en.from)).right,ir=Kn<Be?Be-Kn+1e9:Kn-Be;(!Bt||Ut>ir)&&(Bt=en,Ut=ir)}}return Bt||(Bt=Ce[Ce.length-1]),Bt.from<at&&(Bt={from:at,to:Bt.to,level:Bt.level}),Bt.to>vt&&(Bt={from:Bt.from,to:vt,level:Bt.level}),Bt}var Qi;function yo(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Qi==null){Qi=Ie("pre",null,"CodeMirror-line-like");for(var b=0;b<49;++b)Qi.appendChild(document.createTextNode("x")),Qi.appendChild(Ie("br"));Qi.appendChild(document.createTextNode("x"))}ke(a.measure,Qi);var he=Qi.offsetHeight/50;return he>3&&(a.cachedTextHeight=he),De(a.measure),he||1}function Fo(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var b=Ie("span","xxxxxxxxxx"),he=Ie("pre",[b],"CodeMirror-line-like");ke(a.measure,he);var fe=b.getBoundingClientRect(),Ce=(fe.right-fe.left)/10;return Ce>2&&(a.cachedCharWidth=Ce),Ce||10}function Xo(a){for(var b=a.display,he={},fe={},Ce=b.gutters.clientLeft,Be=b.gutters.firstChild,Xe=0;Be;Be=Be.nextSibling,++Xe){var it=a.display.gutterSpecs[Xe].className;he[it]=Be.offsetLeft+Be.clientLeft+Ce,fe[it]=Be.clientWidth}return{fixedPos:Ia(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:he,gutterWidth:fe,wrapperWidth:b.wrapper.clientWidth}}function Ia(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ds(a){var b=yo(a.display),he=a.options.lineWrapping,fe=he&&Math.max(5,a.display.scroller.clientWidth/Fo(a.display)-3);return function(Ce){if(Rn(a.doc,Ce))return 0;var Be=0;if(Ce.widgets)for(var Xe=0;Xe<Ce.widgets.length;Xe++)Ce.widgets[Xe].height&&(Be+=Ce.widgets[Xe].height);return he?Be+(Math.ceil(Ce.text.length/fe)||1)*b:Be+b}}function fs(a){var b=a.doc,he=ds(a);b.iter(function(fe){var Ce=he(fe);Ce!=fe.height&&Qn(fe,Ce)})}function da(a,b,he,fe){var Ce=a.display;if(!he&&Yn(b).getAttribute("cm-not-content")=="true")return null;var Be,Xe,it=Ce.lineSpace.getBoundingClientRect();try{Be=b.clientX-it.left,Xe=b.clientY-it.top}catch(Ut){return null}var at=ro(a,Be,Xe),vt;if(fe&&at.xRel>0&&(vt=jt(a.doc,at.line).text).length==at.ch){var Bt=We(vt,vt.length,a.options.tabSize)-vt.length;at=Lt(at.line,Math.max(0,Math.round((Be-Io(a.display).left)/Fo(a.display))-Bt))}return at}function _o(a,b){if(b>=a.display.viewTo||(b-=a.display.viewFrom,b<0))return null;for(var he=a.display.view,fe=0;fe<he.length;fe++)if(b-=he[fe].size,b<0)return fe}function Eo(a,b,he,fe){b==null&&(b=a.doc.first),he==null&&(he=a.doc.first+a.doc.size),fe||(fe=0);var Ce=a.display;if(fe&&he<Ce.viewTo&&(Ce.updateLineNumbers==null||Ce.updateLineNumbers>b)&&(Ce.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=Ce.viewTo)oi&&yn(a.doc,b)<Ce.viewTo&&Ko(a);else if(he<=Ce.viewFrom)oi&&fn(a.doc,he+fe)>Ce.viewFrom?Ko(a):(Ce.viewFrom+=fe,Ce.viewTo+=fe);else if(b<=Ce.viewFrom&&he>=Ce.viewTo)Ko(a);else if(b<=Ce.viewFrom){var Be=Qa(a,he,he+fe,1);Be?(Ce.view=Ce.view.slice(Be.index),Ce.viewFrom=Be.lineN,Ce.viewTo+=fe):Ko(a)}else if(he>=Ce.viewTo){var Xe=Qa(a,b,b,-1);Xe?(Ce.view=Ce.view.slice(0,Xe.index),Ce.viewTo=Xe.lineN):Ko(a)}else{var it=Qa(a,b,b,-1),at=Qa(a,he,he+fe,1);it&&at?(Ce.view=Ce.view.slice(0,it.index).concat(ti(a,it.lineN,at.lineN)).concat(Ce.view.slice(at.index)),Ce.viewTo+=fe):Ko(a)}var vt=Ce.externalMeasured;vt&&(he<vt.lineN?vt.lineN+=fe:b<vt.lineN+vt.size&&(Ce.externalMeasured=null))}function ko(a,b,he){a.curOp.viewChanged=!0;var fe=a.display,Ce=a.display.externalMeasured;if(Ce&&b>=Ce.lineN&&b<Ce.lineN+Ce.size&&(fe.externalMeasured=null),!(b<fe.viewFrom||b>=fe.viewTo)){var Be=fe.view[_o(a,b)];if(Be.node!=null){var Xe=Be.changes||(Be.changes=[]);Ze(Xe,he)==-1&&Xe.push(he)}}}function Ko(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Qa(a,b,he,fe){var Ce=_o(a,b),Be,Xe=a.display.view;if(!oi||he==a.doc.first+a.doc.size)return{index:Ce,lineN:he};for(var it=a.display.viewFrom,at=0;at<Ce;at++)it+=Xe[at].size;if(it!=b){if(fe>0){if(Ce==Xe.length-1)return null;Be=it+Xe[Ce].size-b,Ce++}else Be=it-b;b+=Be,he+=Be}for(;yn(a.doc,he)!=he;){if(Ce==(fe<0?0:Xe.length-1))return null;he+=fe*Xe[Ce-(fe<0?1:0)].size,Ce+=fe}return{index:Ce,lineN:he}}function xa(a,b,he){var fe=a.display,Ce=fe.view;Ce.length==0||b>=fe.viewTo||he<=fe.viewFrom?(fe.view=ti(a,b,he),fe.viewFrom=b):(fe.viewFrom>b?fe.view=ti(a,b,fe.viewFrom).concat(fe.view):fe.viewFrom<b&&(fe.view=fe.view.slice(_o(a,b))),fe.viewFrom=b,fe.viewTo<he?fe.view=fe.view.concat(ti(a,fe.viewTo,he)):fe.viewTo>he&&(fe.view=fe.view.slice(0,_o(a,he)))),fe.viewTo=he}function _s(a){for(var b=a.display.view,he=0,fe=0;fe<b.length;fe++){var Ce=b[fe];!Ce.hidden&&(!Ce.node||Ce.changes)&&++he}return he}function Oa(a){a.display.input.showSelection(a.display.input.prepareSelection())}function bs(a,b){b===void 0&&(b=!0);for(var he=a.doc,fe={},Ce=fe.cursors=document.createDocumentFragment(),Be=fe.selection=document.createDocumentFragment(),Xe=0;Xe<he.sel.ranges.length;Xe++)if(!(!b&&Xe==he.sel.primIndex)){var it=he.sel.ranges[Xe];if(!(it.from().line>=a.display.viewTo||it.to().line<a.display.viewFrom)){var at=it.empty();(at||a.options.showCursorWhenSelecting)&&$a(a,it.head,Ce),at||Ss(a,it,Be)}}return fe}function $a(a,b,he){var fe=qi(a,b,"div",null,null,!a.options.singleCursorHeightPerLine),Ce=he.appendChild(Ie("div","\xA0","CodeMirror-cursor"));if(Ce.style.left=fe.left+"px",Ce.style.top=fe.top+"px",Ce.style.height=Math.max(0,fe.bottom-fe.top)*a.options.cursorHeight+"px",fe.other){var Be=he.appendChild(Ie("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Be.style.display="",Be.style.left=fe.other.left+"px",Be.style.top=fe.other.top+"px",Be.style.height=(fe.other.bottom-fe.other.top)*.85+"px"}}function Ca(a,b){return a.top-b.top||a.left-b.left}function Ss(a,b,he){var fe=a.display,Ce=a.doc,Be=document.createDocumentFragment(),Xe=Io(a.display),it=Xe.left,at=Math.max(fe.sizerWidth,Ho(a)-fe.sizer.offsetLeft)-Xe.right,vt=Ce.direction=="ltr";function Bt(mr,Tr,ei,Vr){Tr<0&&(Tr=0),Tr=Math.round(Tr),Vr=Math.round(Vr),Be.appendChild(Ie("div",null,"CodeMirror-selected","position: absolute; left: "+mr+`px;
top: `+Tr+"px; width: "+(ei==null?at-mr:ei)+`px;
height: `+(Vr-Tr)+"px"))}function Ut(mr,Tr,ei){var Vr=jt(Ce,mr),ki=Vr.text.length,eo,Mo;function ho(wo,ea){return To(a,Lt(mr,wo),"div",Vr,ea)}function sa(wo,ea,Bo){var Lo=io(a,Vr,null,wo),xo=ea=="ltr"==(Bo=="after")?"left":"right",go=Bo=="after"?Lo.begin:Lo.end-(/\s/.test(Vr.text.charAt(Lo.end-1))?2:1);return ho(go,xo)[xo]}var $o=Ye(Vr,Ce.direction);return ye($o,Tr||0,ei==null?ki:ei,function(wo,ea,Bo,Lo){var xo=Bo=="ltr",go=ho(wo,xo?"left":"right"),ta=ho(ea-1,xo?"right":"left"),Is=Tr==null&&wo==0,us=ei==null&&ea==ki,zo=Lo==0,Ua=!$o||Lo==$o.length-1;if(ta.top-go.top<=3){var Ro=(vt?Is:us)&&zo,xl=(vt?us:Is)&&Ua,Xa=Ro?it:(xo?go:ta).left,gs=xl?at:(xo?ta:go).right;Bt(Xa,go.top,gs-Xa,go.bottom)}else{var ys,Vo,Os,Cl;xo?(ys=vt&&Is&&zo?it:go.left,Vo=vt?at:sa(wo,Bo,"before"),Os=vt?it:sa(ea,Bo,"after"),Cl=vt&&us&&Ua?at:ta.right):(ys=vt?sa(wo,Bo,"before"):it,Vo=!vt&&Is&&zo?at:go.right,Os=!vt&&us&&Ua?it:ta.left,Cl=vt?sa(ea,Bo,"after"):at),Bt(ys,go.top,Vo-ys,go.bottom),go.bottom<ta.top&&Bt(it,go.bottom,null,ta.top),Bt(Os,ta.top,Cl-Os,ta.bottom)}(!eo||Ca(go,eo)<0)&&(eo=go),Ca(ta,eo)<0&&(eo=ta),(!Mo||Ca(go,Mo)<0)&&(Mo=go),Ca(ta,Mo)<0&&(Mo=ta)}),{start:eo,end:Mo}}var an=b.from(),en=b.to();if(an.line==en.line)Ut(an.line,an.ch,en.ch);else{var Dn=jt(Ce,an.line),Kn=jt(Ce,en.line),ir=un(Dn)==un(Kn),pr=Ut(an.line,an.ch,ir?Dn.text.length+1:null).end,Sr=Ut(en.line,ir?0:null,en.ch).start;ir&&(pr.top<Sr.top-2?(Bt(pr.right,pr.top,null,pr.bottom),Bt(it,Sr.top,Sr.left,Sr.bottom)):Bt(pr.right,pr.top,Sr.left-pr.right,pr.bottom)),pr.bottom<Sr.top&&Bt(it,pr.bottom,null,Sr.top)}he.appendChild(Be)}function es(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var he=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){a.hasFocus()||Ga(a),b.cursorDiv.style.visibility=(he=!he)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function ra(a){a.state.focused||(a.display.input.focus(),Ea(a))}function Za(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ga(a))},100)}function Ea(a,b){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Dt(a,"focus",a,b),a.state.focused=!0,ot(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),ue&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),es(a))}function Ga(a,b){a.state.delayingBlurEvent||(a.state.focused&&(Dt(a,"blur",a,b),a.state.focused=!1,Ae(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function ts(a){for(var b=a.display,he=b.lineDiv.offsetTop,fe=0;fe<b.view.length;fe++){var Ce=b.view[fe],Be=a.options.lineWrapping,Xe=void 0,it=0;if(!Ce.hidden){if(se&&re<8){var at=Ce.node.offsetTop+Ce.node.offsetHeight;Xe=at-he,he=at}else{var vt=Ce.node.getBoundingClientRect();Xe=vt.bottom-vt.top,!Be&&Ce.text.firstChild&&(it=Ce.text.firstChild.getBoundingClientRect().right-vt.left-1)}var Bt=Ce.line.height-Xe;if((Bt>.005||Bt<-.005)&&(Qn(Ce.line,Xe),hs(Ce.line),Ce.rest))for(var Ut=0;Ut<Ce.rest.length;Ut++)hs(Ce.rest[Ut]);if(it>a.display.sizerWidth){var an=Math.ceil(it/Fo(a.display));an>a.display.maxLineLength&&(a.display.maxLineLength=an,a.display.maxLine=Ce.line,a.display.maxLineChanged=!0)}}}}function hs(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b){var he=a.widgets[b],fe=he.node.parentNode;fe&&(he.height=fe.offsetHeight)}}function ka(a,b,he){var fe=he&&he.top!=null?Math.max(0,he.top):a.scroller.scrollTop;fe=Math.floor(fe-ui(a));var Ce=he&&he.bottom!=null?he.bottom:fe+a.wrapper.clientHeight,Be=Et(b,fe),Xe=Et(b,Ce);if(he&&he.ensure){var it=he.ensure.from.line,at=he.ensure.to.line;it<Be?(Be=it,Xe=Et(b,qn(jt(b,it))+a.wrapper.clientHeight)):Math.min(at,b.lastLine())>=Xe&&(Be=Et(b,qn(jt(b,at))-a.wrapper.clientHeight),Xe=at)}return{from:Be,to:Math.max(Xe,Be+1)}}function ps(a,b){if(!ut(a,"scrollCursorIntoView")){var he=a.display,fe=he.sizer.getBoundingClientRect(),Ce=null;if(b.top+fe.top<0?Ce=!0:b.bottom+fe.top>(window.innerHeight||document.documentElement.clientHeight)&&(Ce=!1),Ce!=null&&!x){var Be=Ie("div","\u200B",null,`position: absolute;
top: `+(b.top-he.viewOffset-ui(a.display))+`px;
height: `+(b.bottom-b.top+Ui(a)+he.barHeight)+`px;
left: `+b.left+"px; width: "+Math.max(2,b.right-b.left)+"px;");a.display.lineSpace.appendChild(Be),Be.scrollIntoView(Ce),a.display.lineSpace.removeChild(Be)}}}function ms(a,b,he,fe){fe==null&&(fe=0);var Ce;!a.options.lineWrapping&&b==he&&(b=b.ch?Lt(b.line,b.sticky=="before"?b.ch-1:b.ch,"after"):b,he=b.sticky=="before"?Lt(b.line,b.ch+1,"before"):b);for(var Be=0;Be<5;Be++){var Xe=!1,it=qi(a,b),at=!he||he==b?it:qi(a,he);Ce={left:Math.min(it.left,at.left),top:Math.min(it.top,at.top)-fe,right:Math.max(it.left,at.left),bottom:Math.max(it.bottom,at.bottom)+fe};var vt=ns(a,Ce),Bt=a.doc.scrollTop,Ut=a.doc.scrollLeft;if(vt.scrollTop!=null&&(ia(a,vt.scrollTop),Math.abs(a.doc.scrollTop-Bt)>1&&(Xe=!0)),vt.scrollLeft!=null&&(ma(a,vt.scrollLeft),Math.abs(a.doc.scrollLeft-Ut)>1&&(Xe=!0)),!Xe)break}return Ce}function ws(a,b){var he=ns(a,b);he.scrollTop!=null&&ia(a,he.scrollTop),he.scrollLeft!=null&&ma(a,he.scrollLeft)}function ns(a,b){var he=a.display,fe=yo(a.display);b.top<0&&(b.top=0);var Ce=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:he.scroller.scrollTop,Be=Co(a),Xe={};b.bottom-b.top>Be&&(b.bottom=b.top+Be);var it=a.doc.height+no(he),at=b.top<fe,vt=b.bottom>it-fe;if(b.top<Ce)Xe.scrollTop=at?0:b.top;else if(b.bottom>Ce+Be){var Bt=Math.min(b.top,(vt?it:b.bottom)-Be);Bt!=Ce&&(Xe.scrollTop=Bt)}var Ut=a.options.fixedGutter?0:he.gutters.offsetWidth,an=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:he.scroller.scrollLeft-Ut,en=Ho(a)-he.gutters.offsetWidth,Dn=b.right-b.left>en;return Dn&&(b.right=b.left+en),b.left<10?Xe.scrollLeft=0:b.left<an?Xe.scrollLeft=Math.max(0,b.left+Ut-(Dn?0:10)):b.right>en+an-3&&(Xe.scrollLeft=b.right+(Dn?0:10)-en),Xe}function rs(a,b){b!=null&&(Na(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+b)}function La(a){Na(a);var b=a.getCursor();a.curOp.scrollToPos={from:b,to:b,margin:a.options.cursorScrollMargin}}function Ur(a,b,he){(b!=null||he!=null)&&Na(a),b!=null&&(a.curOp.scrollLeft=b),he!=null&&(a.curOp.scrollTop=he)}function xs(a,b){Na(a),a.curOp.scrollToPos=b}function Na(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var he=vi(a,b.from),fe=vi(a,b.to);vs(a,he,fe,b.margin)}}function vs(a,b,he,fe){var Ce=ns(a,{left:Math.min(b.left,he.left),top:Math.min(b.top,he.top)-fe,right:Math.max(b.right,he.right),bottom:Math.max(b.bottom,he.bottom)+fe});Ur(a,Ce.scrollLeft,Ce.scrollTop)}function ia(a,b){Math.abs(a.doc.scrollTop-b)<2||(de||yi(a,{top:b}),is(a,b,!0),de&&yi(a),Tn(a,100))}function is(a,b,he){b=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,b)),!(a.display.scroller.scrollTop==b&&!he)&&(a.doc.scrollTop=b,a.display.scrollbars.setScrollTop(b),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b))}function ma(a,b,he,fe){b=Math.max(0,Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((he?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)&&!fe)&&(a.doc.scrollLeft=b,Ei(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function hi(a){var b=a.display,he=b.gutters.offsetWidth,fe=Math.round(a.doc.height+no(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?he:0,docHeight:fe,scrollHeight:fe+Ui(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:he}}var Cr=function(a,b,he){this.cm=he;var fe=this.vert=Ie("div",[Ie("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Ce=this.horiz=Ie("div",[Ie("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fe.tabIndex=Ce.tabIndex=-1,a(fe),a(Ce),tt(fe,"scroll",function(){fe.clientHeight&&b(fe.scrollTop,"vertical")}),tt(Ce,"scroll",function(){Ce.clientWidth&&b(Ce.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,se&&re<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Cr.prototype.update=function(a){var b=a.scrollWidth>a.clientWidth+1,he=a.scrollHeight>a.clientHeight+1,fe=a.nativeBarWidth;if(he){this.vert.style.display="block",this.vert.style.bottom=b?fe+"px":"0";var Ce=a.viewHeight-(b?fe:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+Ce)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=he?fe+"px":"0",this.horiz.style.left=a.barLeft+"px";var Be=a.viewWidth-a.barLeft-(he?fe:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+Be)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(fe==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:he?fe:0,bottom:b?fe:0}},Cr.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Cr.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Cr.prototype.zeroWidthHack=function(){var a=ge&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ue,this.disableVert=new Ue},Cr.prototype.enableZeroWidthBar=function(a,b,he){a.style.pointerEvents="auto";function fe(){var Ce=a.getBoundingClientRect(),Be=he=="vert"?document.elementFromPoint(Ce.right-1,(Ce.top+Ce.bottom)/2):document.elementFromPoint((Ce.right+Ce.left)/2,Ce.bottom-1);Be!=a?a.style.pointerEvents="none":b.set(1e3,fe)}b.set(1e3,fe)},Cr.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Ci=function(){};Ci.prototype.update=function(){return{bottom:0,right:0}},Ci.prototype.setScrollLeft=function(){},Ci.prototype.setScrollTop=function(){},Ci.prototype.clear=function(){};function So(a,b){b||(b=hi(a));var he=a.display.barWidth,fe=a.display.barHeight;Pi(a,b);for(var Ce=0;Ce<4&&he!=a.display.barWidth||fe!=a.display.barHeight;Ce++)he!=a.display.barWidth&&a.options.lineWrapping&&ts(a),Pi(a,hi(a)),he=a.display.barWidth,fe=a.display.barHeight}function Pi(a,b){var he=a.display,fe=he.scrollbars.update(b);he.sizer.style.paddingRight=(he.barWidth=fe.right)+"px",he.sizer.style.paddingBottom=(he.barHeight=fe.bottom)+"px",he.heightForcer.style.borderBottom=fe.bottom+"px solid transparent",fe.right&&fe.bottom?(he.scrollbarFiller.style.display="block",he.scrollbarFiller.style.height=fe.bottom+"px",he.scrollbarFiller.style.width=fe.right+"px"):he.scrollbarFiller.style.display="",fe.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(he.gutterFiller.style.display="block",he.gutterFiller.style.height=fe.bottom+"px",he.gutterFiller.style.width=b.gutterWidth+"px"):he.gutterFiller.style.display=""}var Pa={native:Cr,null:Ci};function va(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Ae(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Pa[a.options.scrollbarStyle](function(b){a.display.wrapper.insertBefore(b,a.display.scrollbarFiller),tt(b,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),b.setAttribute("cm-not-content","true")},function(b,he){he=="horizontal"?ma(a,b):ia(a,b)},a),a.display.scrollbars.addClass&&ot(a.display.wrapper,a.display.scrollbars.addClass)}var Aa=0;function No(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:++Aa},po(a.curOp)}function fa(a){var b=a.curOp;b&&to(b,function(he){for(var fe=0;fe<he.ops.length;fe++)he.ops[fe].cm.curOp=null;sl(he)})}function sl(a){for(var b=a.ops,he=0;he<b.length;he++)ll(b[he]);for(var fe=0;fe<b.length;fe++)ul(b[fe]);for(var Ce=0;Ce<b.length;Ce++)cl(b[Ce]);for(var Be=0;Be<b.length;Be++)mt(b[Be]);for(var Xe=0;Xe<b.length;Xe++)xt(b[Xe])}function ll(a){var b=a.cm,he=b.display;nr(b),a.updateMaxLine&&dr(b),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<he.viewFrom||a.scrollToPos.to.line>=he.viewTo)||he.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new Pn(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function ul(a){a.updatedDisplay=a.mustUpdate&&gi(a.cm,a.update)}function cl(a){var b=a.cm,he=b.display;a.updatedDisplay&&ts(b),a.barMeasure=hi(b),he.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=za(b,he.maxLine,he.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(he.scroller.clientWidth,he.sizer.offsetLeft+a.adjustWidthTo+Ui(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,he.sizer.offsetLeft+a.adjustWidthTo-Ho(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=he.input.prepareSelection())}function mt(a){var b=a.cm;a.adjustWidthTo!=null&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&ma(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1);var he=a.focus&&a.focus==Ke();a.preparedSelection&&b.display.input.showSelection(a.preparedSelection,he),(a.updatedDisplay||a.startHeight!=b.doc.height)&&So(b,a.barMeasure),a.updatedDisplay&&ni(b,a.barMeasure),a.selectionChanged&&es(b),b.state.focused&&a.updateInput&&b.display.input.reset(a.typing),he&&ra(a.cm)}function xt(a){var b=a.cm,he=b.display,fe=b.doc;if(a.updatedDisplay&&Dr(b,a.update),he.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(he.wheelStartX=he.wheelStartY=null),a.scrollTop!=null&&is(b,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ma(b,a.scrollLeft,!0,!0),a.scrollToPos){var Ce=ms(b,Kt(fe,a.scrollToPos.from),Kt(fe,a.scrollToPos.to),a.scrollToPos.margin);ps(b,Ce)}var Be=a.maybeHiddenMarkers,Xe=a.maybeUnhiddenMarkers;if(Be)for(var it=0;it<Be.length;++it)Be[it].lines.length||Dt(Be[it],"hide");if(Xe)for(var at=0;at<Xe.length;++at)Xe[at].lines.length&&Dt(Xe[at],"unhide");he.wrapper.offsetHeight&&(fe.scrollTop=b.display.scroller.scrollTop),a.changeObjs&&Dt(b,"changes",b,a.changeObjs),a.update&&a.update.finish()}function kt(a,b){if(a.curOp)return b();No(a);try{return b()}finally{fa(a)}}function $n(a,b){return function(){if(a.curOp)return b.apply(a,arguments);No(a);try{return b.apply(a,arguments)}finally{fa(a)}}}function Nn(a){return function(){if(this.curOp)return a.apply(this,arguments);No(this);try{return a.apply(this,arguments)}finally{fa(this)}}}function pn(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);No(b);try{return a.apply(this,arguments)}finally{fa(b)}}}function Tn(a,b){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(b,Ge(kn,a))}function kn(a){var b=a.doc;if(!(b.highlightFrontier>=a.display.viewTo)){var he=+new Date+a.options.workTime,fe=wr(a,b.highlightFrontier),Ce=[];b.iter(fe.line,Math.min(b.first+b.size,a.display.viewTo+500),function(Be){if(fe.line>=a.display.viewFrom){var Xe=Be.styles,it=Be.text.length>a.options.maxHighlightLength?st(b.mode,fe.state):null,at=er(a,Be,fe,!0);it&&(fe.state=it),Be.styles=at.styles;var vt=Be.styleClasses,Bt=at.classes;Bt?Be.styleClasses=Bt:vt&&(Be.styleClasses=null);for(var Ut=!Xe||Xe.length!=Be.styles.length||vt!=Bt&&(!vt||!Bt||vt.bgClass!=Bt.bgClass||vt.textClass!=Bt.textClass),an=0;!Ut&&an<Xe.length;++an)Ut=Xe[an]!=Be.styles[an];Ut&&Ce.push(fe.line),Be.stateAfter=fe.save(),fe.nextLine()}else Be.text.length<=a.options.maxHighlightLength&&tr(a,Be.text,fe),Be.stateAfter=fe.line%5==0?fe.save():null,fe.nextLine();if(+new Date>he)return Tn(a,a.options.workDelay),!0}),b.highlightFrontier=fe.line,b.modeFrontier=Math.max(b.modeFrontier,fe.line),Ce.length&&kt(a,function(){for(var Be=0;Be<Ce.length;Be++)ko(a,Ce[Be],"text")})}}var Pn=function(a,b,he){var fe=a.display;this.viewport=b,this.visible=ka(fe,a.doc,b),this.editorIsHidden=!fe.wrapper.offsetWidth,this.wrapperHeight=fe.wrapper.clientHeight,this.wrapperWidth=fe.wrapper.clientWidth,this.oldDisplayWidth=Ho(a),this.force=he,this.dims=Xo(a),this.events=[]};Pn.prototype.signal=function(a,b){At(a,b)&&this.events.push(arguments)},Pn.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Dt.apply(null,this.events[a])};function nr(a){var b=a.display;!b.scrollbarsClipped&&b.scroller.offsetWidth&&(b.nativeBarWidth=b.scroller.offsetWidth-b.scroller.clientWidth,b.heightForcer.style.height=Ui(a)+"px",b.sizer.style.marginBottom=-b.nativeBarWidth+"px",b.sizer.style.borderRightWidth=Ui(a)+"px",b.scrollbarsClipped=!0)}function ci(a){if(a.hasFocus())return null;var b=Ke();if(!b||!qe(a.display.lineDiv,b))return null;var he={activeElt:b};if(window.getSelection){var fe=window.getSelection();fe.anchorNode&&fe.extend&&qe(a.display.lineDiv,fe.anchorNode)&&(he.anchorNode=fe.anchorNode,he.anchorOffset=fe.anchorOffset,he.focusNode=fe.focusNode,he.focusOffset=fe.focusOffset)}return he}function Br(a){if(!(!a||!a.activeElt||a.activeElt==Ke())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&qe(document.body,a.anchorNode)&&qe(document.body,a.focusNode))){var b=window.getSelection(),he=document.createRange();he.setEnd(a.anchorNode,a.anchorOffset),he.collapse(!1),b.removeAllRanges(),b.addRange(he),b.extend(a.focusNode,a.focusOffset)}}function gi(a,b){var he=a.display,fe=a.doc;if(b.editorIsHidden)return Ko(a),!1;if(!b.force&&b.visible.from>=he.viewFrom&&b.visible.to<=he.viewTo&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo)&&he.renderedView==he.view&&_s(a)==0)return!1;Wi(a)&&(Ko(a),b.dims=Xo(a));var Ce=fe.first+fe.size,Be=Math.max(b.visible.from-a.options.viewportMargin,fe.first),Xe=Math.min(Ce,b.visible.to+a.options.viewportMargin);he.viewFrom<Be&&Be-he.viewFrom<20&&(Be=Math.max(fe.first,he.viewFrom)),he.viewTo>Xe&&he.viewTo-Xe<20&&(Xe=Math.min(Ce,he.viewTo)),oi&&(Be=yn(a.doc,Be),Xe=fn(a.doc,Xe));var it=Be!=he.viewFrom||Xe!=he.viewTo||he.lastWrapHeight!=b.wrapperHeight||he.lastWrapWidth!=b.wrapperWidth;xa(a,Be,Xe),he.viewOffset=qn(jt(a.doc,he.viewFrom)),a.display.mover.style.top=he.viewOffset+"px";var at=_s(a);if(!it&&at==0&&!b.force&&he.renderedView==he.view&&(he.updateLineNumbers==null||he.updateLineNumbers>=he.viewTo))return!1;var vt=ci(a);return at>4&&(he.lineDiv.style.display="none"),zr(a,he.updateLineNumbers,b.dims),at>4&&(he.lineDiv.style.display=""),he.renderedView=he.view,Br(vt),De(he.cursorDiv),De(he.selectionDiv),he.gutters.style.height=he.sizer.style.minHeight=0,it&&(he.lastWrapHeight=b.wrapperHeight,he.lastWrapWidth=b.wrapperWidth,Tn(a,400)),he.updateLineNumbers=null,!0}function Dr(a,b){for(var he=b.viewport,fe=!0;;fe=!1){if(!fe||!a.options.lineWrapping||b.oldDisplayWidth==Ho(a)){if(he&&he.top!=null&&(he={top:Math.min(a.doc.height+no(a.display)-Co(a),he.top)}),b.visible=ka(a.display,a.doc,he),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break}else fe&&(b.visible=ka(a.display,a.doc,he));if(!gi(a,b))break;ts(a);var Ce=hi(a);Oa(a),So(a,Ce),ni(a,Ce),b.force=!1}b.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function yi(a,b){var he=new Pn(a,b);if(gi(a,he)){ts(a),Dr(a,he);var fe=hi(a);Oa(a),So(a,fe),ni(a,fe),he.finish()}}function zr(a,b,he){var fe=a.display,Ce=a.options.lineNumbers,Be=fe.lineDiv,Xe=Be.firstChild;function it(Dn){var Kn=Dn.nextSibling;return ue&&ge&&a.display.currentWheelTarget==Dn?Dn.style.display="none":Dn.parentNode.removeChild(Dn),Kn}for(var at=fe.view,vt=fe.viewFrom,Bt=0;Bt<at.length;Bt++){var Ut=at[Bt];if(!Ut.hidden)if(!Ut.node||Ut.node.parentNode!=Be){var an=Xr(a,Ut,vt,he);Be.insertBefore(an,Xe)}else{for(;Xe!=Ut.node;)Xe=it(Xe);var en=Ce&&b!=null&&b<=vt&&Ut.lineNumber;Ut.changes&&(Ze(Ut.changes,"gutter")>-1&&(en=!1),Ni(a,Ut,vt,he)),en&&(De(Ut.lineNumber),Ut.lineNumber.appendChild(document.createTextNode(Zt(a.options,vt)))),Xe=Ut.node.nextSibling}vt+=Ut.size}for(;Xe;)Xe=it(Xe)}function zi(a){var b=a.gutters.offsetWidth;a.sizer.style.marginLeft=b+"px"}function ni(a,b){a.display.sizer.style.minHeight=b.docHeight+"px",a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=b.docHeight+a.display.barHeight+Ui(a)+"px"}function Ei(a){var b=a.display,he=b.view;if(!(!b.alignWidgets&&(!b.gutters.firstChild||!a.options.fixedGutter))){for(var fe=Ia(b)-b.scroller.scrollLeft+a.doc.scrollLeft,Ce=b.gutters.offsetWidth,Be=fe+"px",Xe=0;Xe<he.length;Xe++)if(!he[Xe].hidden){a.options.fixedGutter&&(he[Xe].gutter&&(he[Xe].gutter.style.left=Be),he[Xe].gutterBackground&&(he[Xe].gutterBackground.style.left=Be));var it=he[Xe].alignable;if(it)for(var at=0;at<it.length;at++)it[at].style.left=Be}a.options.fixedGutter&&(b.gutters.style.left=fe+Ce+"px")}}function Wi(a){if(!a.options.lineNumbers)return!1;var b=a.doc,he=Zt(a.options,b.first+b.size-1),fe=a.display;if(he.length!=fe.lineNumChars){var Ce=fe.measure.appendChild(Ie("div",[Ie("div",he)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Be=Ce.firstChild.offsetWidth,Xe=Ce.offsetWidth-Be;return fe.lineGutter.style.width="",fe.lineNumInnerWidth=Math.max(Be,fe.lineGutter.offsetWidth-Xe)+1,fe.lineNumWidth=fe.lineNumInnerWidth+Xe,fe.lineNumChars=fe.lineNumInnerWidth?he.length:-1,fe.lineGutter.style.width=fe.lineNumWidth+"px",zi(a.display),!0}return!1}function ri(a,b){for(var he=[],fe=!1,Ce=0;Ce<a.length;Ce++){var Be=a[Ce],Xe=null;if(typeof Be!="string"&&(Xe=Be.style,Be=Be.className),Be=="CodeMirror-linenumbers")if(b)fe=!0;else continue;he.push({className:Be,style:Xe})}return b&&!fe&&he.push({className:"CodeMirror-linenumbers",style:null}),he}function Di(a){var b=a.gutters,he=a.gutterSpecs;De(b),a.lineGutter=null;for(var fe=0;fe<he.length;++fe){var Ce=he[fe],Be=Ce.className,Xe=Ce.style,it=b.appendChild(Ie("div",null,"CodeMirror-gutter "+Be));Xe&&(it.style.cssText=Xe),Be=="CodeMirror-linenumbers"&&(a.lineGutter=it,it.style.width=(a.lineNumWidth||1)+"px")}b.style.display=he.length?"":"none",zi(a)}function or(a){Di(a.display),Eo(a),Ei(a)}function Bi(a,b,he,fe){var Ce=this;this.input=he,Ce.scrollbarFiller=Ie("div",null,"CodeMirror-scrollbar-filler"),Ce.scrollbarFiller.setAttribute("cm-not-content","true"),Ce.gutterFiller=Ie("div",null,"CodeMirror-gutter-filler"),Ce.gutterFiller.setAttribute("cm-not-content","true"),Ce.lineDiv=Fe("div",null,"CodeMirror-code"),Ce.selectionDiv=Ie("div",null,null,"position: relative; z-index: 1"),Ce.cursorDiv=Ie("div",null,"CodeMirror-cursors"),Ce.measure=Ie("div",null,"CodeMirror-measure"),Ce.lineMeasure=Ie("div",null,"CodeMirror-measure"),Ce.lineSpace=Fe("div",[Ce.measure,Ce.lineMeasure,Ce.selectionDiv,Ce.cursorDiv,Ce.lineDiv],null,"position: relative; outline: none");var Be=Fe("div",[Ce.lineSpace],"CodeMirror-lines");Ce.mover=Ie("div",[Be],null,"position: relative"),Ce.sizer=Ie("div",[Ce.mover],"CodeMirror-sizer"),Ce.sizerWidth=null,Ce.heightForcer=Ie("div",null,null,"position: absolute; height: "+Je+"px; width: 1px;"),Ce.gutters=Ie("div",null,"CodeMirror-gutters"),Ce.lineGutter=null,Ce.scroller=Ie("div",[Ce.sizer,Ce.heightForcer,Ce.gutters],"CodeMirror-scroll"),Ce.scroller.setAttribute("tabIndex","-1"),Ce.wrapper=Ie("div",[Ce.scrollbarFiller,Ce.gutterFiller,Ce.scroller],"CodeMirror"),se&&re<8&&(Ce.gutters.style.zIndex=-1,Ce.scroller.style.paddingRight=0),!ue&&!(de&&oe)&&(Ce.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(Ce.wrapper):a(Ce.wrapper)),Ce.viewFrom=Ce.viewTo=b.first,Ce.reportedViewFrom=Ce.reportedViewTo=b.first,Ce.view=[],Ce.renderedView=null,Ce.externalMeasured=null,Ce.viewOffset=0,Ce.lastWrapHeight=Ce.lastWrapWidth=0,Ce.updateLineNumbers=null,Ce.nativeBarWidth=Ce.barHeight=Ce.barWidth=0,Ce.scrollbarsClipped=!1,Ce.lineNumWidth=Ce.lineNumInnerWidth=Ce.lineNumChars=null,Ce.alignWidgets=!1,Ce.cachedCharWidth=Ce.cachedTextHeight=Ce.cachedPaddingH=null,Ce.maxLine=null,Ce.maxLineLength=0,Ce.maxLineChanged=!1,Ce.wheelDX=Ce.wheelDY=Ce.wheelStartX=Ce.wheelStartY=null,Ce.shift=!1,Ce.selForContextMenu=null,Ce.activeTouch=null,Ce.gutterSpecs=ri(fe.gutters,fe.lineNumbers),Di(Ce),he.init(Ce)}var bi=0,Ri=null;se?Ri=-.53:de?Ri=15:te?Ri=-.7:y&&(Ri=-1/3);function Po(a){var b=a.wheelDeltaX,he=a.wheelDeltaY;return b==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),he==null&&a.detail&&a.axis==a.VERTICAL_AXIS?he=a.detail:he==null&&(he=a.wheelDelta),{x:b,y:he}}function br(a){var b=Po(a);return b.x*=Ri,b.y*=Ri,b}function Zi(a,b){var he=Po(b),fe=he.x,Ce=he.y,Be=a.display,Xe=Be.scroller,it=Xe.scrollWidth>Xe.clientWidth,at=Xe.scrollHeight>Xe.clientHeight;if(fe&&it||Ce&&at){if(Ce&&ge&&ue){e:for(var vt=b.target,Bt=Be.view;vt!=Xe;vt=vt.parentNode)for(var Ut=0;Ut<Bt.length;Ut++)if(Bt[Ut].node==vt){a.display.currentWheelTarget=vt;break e}}if(fe&&!de&&!E&&Ri!=null){Ce&&at&&ia(a,Math.max(0,Xe.scrollTop+Ce*Ri)),ma(a,Math.max(0,Xe.scrollLeft+fe*Ri)),(!Ce||Ce&&at)&&on(b),Be.wheelStartX=null;return}if(Ce&&Ri!=null){var an=Ce*Ri,en=a.doc.scrollTop,Dn=en+Be.wrapper.clientHeight;an<0?en=Math.max(0,en+an-50):Dn=Math.min(a.doc.height,Dn+an+50),yi(a,{top:en,bottom:Dn})}bi<20&&(Be.wheelStartX==null?(Be.wheelStartX=Xe.scrollLeft,Be.wheelStartY=Xe.scrollTop,Be.wheelDX=fe,Be.wheelDY=Ce,setTimeout(function(){if(Be.wheelStartX!=null){var Kn=Xe.scrollLeft-Be.wheelStartX,ir=Xe.scrollTop-Be.wheelStartY,pr=ir&&Be.wheelDY&&ir/Be.wheelDY||Kn&&Be.wheelDX&&Kn/Be.wheelDX;Be.wheelStartX=Be.wheelStartY=null,pr&&(Ri=(Ri*bi+pr)/(bi+1),++bi)}},200)):(Be.wheelDX+=fe,Be.wheelDY+=Ce))}}var si=function(a,b){this.ranges=a,this.primIndex=b};si.prototype.primary=function(){return this.ranges[this.primIndex]},si.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var he=this.ranges[b],fe=a.ranges[b];if(!nn(he.anchor,fe.anchor)||!nn(he.head,fe.head))return!1}return!0},si.prototype.deepCopy=function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new kr(rn(this.ranges[b].anchor),rn(this.ranges[b].head));return new si(a,this.primIndex)},si.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},si.prototype.contains=function(a,b){b||(b=a);for(var he=0;he<this.ranges.length;he++){var fe=this.ranges[he];if(zt(b,fe.from())>=0&&zt(a,fe.to())<=0)return he}return-1};var kr=function(a,b){this.anchor=a,this.head=b};kr.prototype.from=function(){return xn(this.anchor,this.head)},kr.prototype.to=function(){return _n(this.anchor,this.head)},kr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Hr(a,b,he){var fe=a&&a.options.selectionsMayTouch,Ce=b[he];b.sort(function(an,en){return zt(an.from(),en.from())}),he=Ze(b,Ce);for(var Be=1;Be<b.length;Be++){var Xe=b[Be],it=b[Be-1],at=zt(it.to(),Xe.from());if(fe&&!Xe.empty()?at>0:at>=0){var vt=xn(it.from(),Xe.from()),Bt=_n(it.to(),Xe.to()),Ut=it.empty()?Xe.from()==Xe.head:it.from()==it.head;Be<=he&&--he,b.splice(--Be,2,new kr(Ut?Bt:vt,Ut?vt:Bt))}}return new si(b,he)}function mi(a,b){return new si([new kr(a,b||a)],0)}function Or(a){return a.text?Lt(a.from.line+a.text.length-1,St(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function qo(a,b){if(zt(a,b.from)<0)return a;if(zt(a,b.to)<=0)return Or(b);var he=a.line+b.text.length-(b.to.line-b.from.line)-1,fe=a.ch;return a.line==b.to.line&&(fe+=Or(b).ch-b.to.ch),Lt(he,fe)}function so(a,b){for(var he=[],fe=0;fe<a.sel.ranges.length;fe++){var Ce=a.sel.ranges[fe];he.push(new kr(qo(Ce.anchor,b),qo(Ce.head,b)))}return Hr(a.cm,he,a.sel.primIndex)}function oa(a,b,he){return a.line==b.line?Lt(he.line,a.ch-b.ch+he.ch):Lt(he.line+(a.line-b.line),a.ch)}function os(a,b,he){for(var fe=[],Ce=Lt(a.first,0),Be=Ce,Xe=0;Xe<b.length;Xe++){var it=b[Xe],at=oa(it.from,Ce,Be),vt=oa(Or(it),Ce,Be);if(Ce=it.to,Be=vt,he=="around"){var Bt=a.sel.ranges[Xe],Ut=zt(Bt.head,Bt.anchor)<0;fe[Xe]=new kr(Ut?vt:at,Ut?at:vt)}else fe[Xe]=new kr(at,at)}return new si(fe,a.sel.primIndex)}function aa(a){a.doc.mode=Me(a.options,a.doc.modeOption),ga(a)}function ga(a){a.doc.iter(function(b){b.stateAfter&&(b.stateAfter=null),b.styles&&(b.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,Tn(a,100),a.state.modeGen++,a.curOp&&Eo(a)}function ii(a,b){return b.from.ch==0&&b.to.ch==0&&St(b.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Ai(a,b,he,fe){function Ce(Sr){return he?he[Sr]:null}function Be(Sr,mr,Tr){Er(Sr,mr,Tr,fe),Ii(Sr,"change",Sr,b)}function Xe(Sr,mr){for(var Tr=[],ei=Sr;ei<mr;++ei)Tr.push(new Pr(vt[ei],Ce(ei),fe));return Tr}var it=b.from,at=b.to,vt=b.text,Bt=jt(a,it.line),Ut=jt(a,at.line),an=St(vt),en=Ce(vt.length-1),Dn=at.line-it.line;if(b.full)a.insert(0,Xe(0,vt.length)),a.remove(vt.length,a.size-vt.length);else if(ii(a,b)){var Kn=Xe(0,vt.length-1);Be(Ut,Ut.text,en),Dn&&a.remove(it.line,Dn),Kn.length&&a.insert(it.line,Kn)}else if(Bt==Ut)if(vt.length==1)Be(Bt,Bt.text.slice(0,it.ch)+an+Bt.text.slice(at.ch),en);else{var ir=Xe(1,vt.length-1);ir.push(new Pr(an+Bt.text.slice(at.ch),en,fe)),Be(Bt,Bt.text.slice(0,it.ch)+vt[0],Ce(0)),a.insert(it.line+1,ir)}else if(vt.length==1)Be(Bt,Bt.text.slice(0,it.ch)+vt[0]+Ut.text.slice(at.ch),Ce(0)),a.remove(it.line+1,Dn);else{Be(Bt,Bt.text.slice(0,it.ch)+vt[0],Ce(0)),Be(Ut,an+Ut.text.slice(at.ch),en);var pr=Xe(1,vt.length-1);Dn>1&&a.remove(it.line+1,Dn-1),a.insert(it.line+1,pr)}Ii(a,"change",a,b)}function oo(a,b,he){function fe(Ce,Be,Xe){if(Ce.linked)for(var it=0;it<Ce.linked.length;++it){var at=Ce.linked[it];if(at.doc!=Be){var vt=Xe&&at.sharedHist;he&&!vt||(b(at.doc,vt),fe(at.doc,Ce,vt))}}}fe(a,null,!0)}function Ba(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,fs(a),aa(a),jo(a),a.options.lineWrapping||dr(a),a.options.mode=b.modeOption,Eo(a)}function jo(a){(a.doc.direction=="rtl"?ot:Ae)(a.display.lineDiv,"CodeMirror-rtl")}function Cs(a){kt(a,function(){jo(a),Eo(a)})}function Jo(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function lo(a,b){var he={from:rn(b.from),to:Or(b),text:qt(a,b.from,b.to)};return Do(a,he,b.from.line,b.to.line+1),oo(a,function(fe){return Do(fe,he,b.from.line,b.to.line+1)},!0),he}function Fa(a){for(;a.length;){var b=St(a);if(b.ranges)a.pop();else break}}function dl(a,b){if(b)return Fa(a.done),St(a.done);if(a.done.length&&!St(a.done).ranges)return St(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),St(a.done)}function Xs(a,b,he,fe){var Ce=a.history;Ce.undone.length=0;var Be=+new Date,Xe,it;if((Ce.lastOp==fe||Ce.lastOrigin==b.origin&&b.origin&&(b.origin.charAt(0)=="+"&&Ce.lastModTime>Be-(a.cm?a.cm.options.historyEventDelay:500)||b.origin.charAt(0)=="*"))&&(Xe=dl(Ce,Ce.lastOp==fe)))it=St(Xe.changes),zt(b.from,b.to)==0&&zt(b.from,it.to)==0?it.to=Or(b):Xe.changes.push(lo(a,b));else{var at=St(Ce.done);for((!at||!at.ranges)&&$i(a.sel,Ce.done),Xe={changes:[lo(a,b)],generation:Ce.generation},Ce.done.push(Xe);Ce.done.length>Ce.undoDepth;)Ce.done.shift(),Ce.done[0].ranges||Ce.done.shift()}Ce.done.push(he),Ce.generation=++Ce.maxGeneration,Ce.lastModTime=Ce.lastSelTime=Be,Ce.lastOp=Ce.lastSelOp=fe,Ce.lastOrigin=Ce.lastSelOrigin=b.origin,it||Dt(a,"historyAdded")}function fl(a,b,he,fe){var Ce=b.charAt(0);return Ce=="*"||Ce=="+"&&he.ranges.length==fe.ranges.length&&he.somethingSelected()==fe.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function fi(a,b,he,fe){var Ce=a.history,Be=fe&&fe.origin;he==Ce.lastSelOp||Be&&Ce.lastSelOrigin==Be&&(Ce.lastModTime==Ce.lastSelTime&&Ce.lastOrigin==Be||fl(a,Be,St(Ce.done),b))?Ce.done[Ce.done.length-1]=b:$i(b,Ce.done),Ce.lastSelTime=+new Date,Ce.lastSelOrigin=Be,Ce.lastSelOp=he,fe&&fe.clearRedo!==!1&&Fa(Ce.undone)}function $i(a,b){var he=St(b);he&&he.ranges&&he.equals(a)||b.push(a)}function Do(a,b,he,fe){var Ce=b["spans_"+a.id],Be=0;a.iter(Math.max(a.first,he),Math.min(a.first+a.size,fe),function(Xe){Xe.markedSpans&&((Ce||(Ce=b["spans_"+a.id]={}))[Be]=Xe.markedSpans),++Be})}function ya(a){if(!a)return null;for(var b,he=0;he<a.length;++he)a[he].marker.explicitlyCleared?b||(b=a.slice(0,he)):b&&b.push(a[he]);return b?b.length?b:null:a}function fo(a,b){var he=b["spans_"+a.id];if(!he)return null;for(var fe=[],Ce=0;Ce<b.text.length;++Ce)fe.push(ya(he[Ce]));return fe}function _a(a,b){var he=fo(a,b),fe=Hi(a,b);if(!he)return fe;if(!fe)return he;for(var Ce=0;Ce<he.length;++Ce){var Be=he[Ce],Xe=fe[Ce];if(Be&&Xe)e:for(var it=0;it<Xe.length;++it){for(var at=Xe[it],vt=0;vt<Be.length;++vt)if(Be[vt].marker==at.marker)continue e;Be.push(at)}else Xe&&(he[Ce]=Xe)}return he}function ha(a,b,he){for(var fe=[],Ce=0;Ce<a.length;++Ce){var Be=a[Ce];if(Be.ranges){fe.push(he?si.prototype.deepCopy.call(Be):Be);continue}var Xe=Be.changes,it=[];fe.push({changes:it});for(var at=0;at<Xe.length;++at){var vt=Xe[at],Bt=void 0;if(it.push({from:vt.from,to:vt.to,text:vt.text}),b)for(var Ut in vt)(Bt=Ut.match(/^spans_(\d+)$/))&&Ze(b,Number(Bt[1]))>-1&&(St(it)[Ut]=vt[Ut],delete vt[Ut])}}return fe}function Ka(a,b,he,fe){if(fe){var Ce=a.anchor;if(he){var Be=zt(b,Ce)<0;Be!=zt(he,Ce)<0?(Ce=b,b=he):Be!=zt(b,he)<0&&(b=he)}return new kr(Ce,b)}else return new kr(he||b,b)}function Va(a,b,he,fe,Ce){Ce==null&&(Ce=a.cm&&(a.cm.display.shift||a.extend)),Uo(a,new si([Ka(a.sel.primary(),b,he,Ce)],0),fe)}function ja(a,b,he){for(var fe=[],Ce=a.cm&&(a.cm.display.shift||a.extend),Be=0;Be<a.sel.ranges.length;Be++)fe[Be]=Ka(a.sel.ranges[Be],b[Be],null,Ce);var Xe=Hr(a.cm,fe,a.sel.primIndex);Uo(a,Xe,he)}function Ns(a,b,he,fe){var Ce=a.sel.ranges.slice(0);Ce[b]=he,Uo(a,Hr(a.cm,Ce,a.sel.primIndex),fe)}function as(a,b,he,fe){Uo(a,mi(b,he),fe)}function hl(a,b,he){var fe={ranges:b.ranges,update:function(Ce){this.ranges=[];for(var Be=0;Be<Ce.length;Be++)this.ranges[Be]=new kr(Kt(a,Ce[Be].anchor),Kt(a,Ce[Be].head))},origin:he&&he.origin};return Dt(a,"beforeSelectionChange",a,fe),a.cm&&Dt(a.cm,"beforeSelectionChange",a.cm,fe),fe.ranges!=b.ranges?Hr(a.cm,fe.ranges,fe.ranges.length-1):b}function El(a,b,he){var fe=a.history.done,Ce=St(fe);Ce&&Ce.ranges?(fe[fe.length-1]=b,Js(a,b,he)):Uo(a,b,he)}function Uo(a,b,he){Js(a,b,he),fi(a,a.sel,a.cm?a.cm.curOp.id:NaN,he)}function Js(a,b,he){(At(a,"beforeSelectionChange")||a.cm&&At(a.cm,"beforeSelectionChange"))&&(b=hl(a,b,he));var fe=he&&he.bias||(zt(b.primary().head,a.sel.primary().head)<0?-1:1);kl(a,Al(a,b,fe,!0)),!(he&&he.scroll===!1)&&a.cm&&La(a.cm)}function kl(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Ht(a.cm)),Ii(a,"cursorActivity",a))}function Ll(a){kl(a,Al(a,a.sel,null,!1))}function Al(a,b,he,fe){for(var Ce,Be=0;Be<b.ranges.length;Be++){var Xe=b.ranges[Be],it=b.ranges.length==a.sel.ranges.length&&a.sel.ranges[Be],at=Qs(a,Xe.anchor,it&&it.anchor,he,fe),vt=Qs(a,Xe.head,it&&it.head,he,fe);(Ce||at!=Xe.anchor||vt!=Xe.head)&&(Ce||(Ce=b.ranges.slice(0,Be)),Ce[Be]=new kr(at,vt))}return Ce?Hr(a.cm,Ce,b.primIndex):b}function Es(a,b,he,fe,Ce){var Be=jt(a,b.line);if(Be.markedSpans)for(var Xe=0;Xe<Be.markedSpans.length;++Xe){var it=Be.markedSpans[Xe],at=it.marker,vt="selectLeft"in at?!at.selectLeft:at.inclusiveLeft,Bt="selectRight"in at?!at.selectRight:at.inclusiveRight;if((it.from==null||(vt?it.from<=b.ch:it.from<b.ch))&&(it.to==null||(Bt?it.to>=b.ch:it.to>b.ch))){if(Ce&&(Dt(at,"beforeCursorEnter"),at.explicitlyCleared))if(Be.markedSpans){--Xe;continue}else break;if(!at.atomic)continue;if(he){var Ut=at.find(fe<0?1:-1),an=void 0;if((fe<0?Bt:vt)&&(Ut=Tl(a,Ut,-fe,Ut&&Ut.line==b.line?Be:null)),Ut&&Ut.line==b.line&&(an=zt(Ut,he))&&(fe<0?an<0:an>0))return Es(a,Ut,b,fe,Ce)}var en=at.find(fe<0?-1:1);return(fe<0?vt:Bt)&&(en=Tl(a,en,fe,en.line==b.line?Be:null)),en?Es(a,en,b,fe,Ce):null}}return b}function Qs(a,b,he,fe,Ce){var Be=fe||1,Xe=Es(a,b,he,Be,Ce)||!Ce&&Es(a,b,he,Be,!0)||Es(a,b,he,-Be,Ce)||!Ce&&Es(a,b,he,-Be,!0);return Xe||(a.cantEdit=!0,Lt(a.first,0))}function Tl(a,b,he,fe){return he<0&&b.ch==0?b.line>a.first?Kt(a,Lt(b.line-1)):null:he>0&&b.ch==(fe||jt(a,b.line)).text.length?b.line<a.first+a.size-1?Lt(b.line+1,0):null:new Lt(b.line,b.ch+he)}function Dl(a){a.setSelection(Lt(a.firstLine(),0),Lt(a.lastLine()),Qe)}function Ml(a,b,he){var fe={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){return fe.canceled=!0}};return he&&(fe.update=function(Ce,Be,Xe,it){Ce&&(fe.from=Kt(a,Ce)),Be&&(fe.to=Kt(a,Be)),Xe&&(fe.text=Xe),it!==void 0&&(fe.origin=it)}),Dt(a,"beforeChange",a,fe),a.cm&&Dt(a.cm,"beforeChange",a.cm,fe),fe.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:fe.from,to:fe.to,text:fe.text,origin:fe.origin}}function ks(a,b,he){if(a.cm){if(!a.cm.curOp)return $n(a.cm,ks)(a,b,he);if(a.cm.state.suppressEdits)return}if(!((At(a,"beforeChange")||a.cm&&At(a.cm,"beforeChange"))&&(b=Ml(a,b,!0),!b))){var fe=Si&&!he&&tn(a,b.from,b.to);if(fe)for(var Ce=fe.length-1;Ce>=0;--Ce)Rl(a,{from:fe[Ce].from,to:fe[Ce].to,text:Ce?[""]:b.text,origin:b.origin});else Rl(a,b)}}function Rl(a,b){if(!(b.text.length==1&&b.text[0]==""&&zt(b.from,b.to)==0)){var he=so(a,b);Xs(a,b,he,a.cm?a.cm.curOp.id:NaN),Ps(a,b,he,Hi(a,b));var fe=[];oo(a,function(Ce,Be){!Be&&Ze(fe,Ce.history)==-1&&(Pl(Ce.history,b),fe.push(Ce.history)),Ps(Ce,b,null,Hi(Ce,b))})}}function $s(a,b,he){var fe=a.cm&&a.cm.state.suppressEdits;if(!(fe&&!he)){for(var Ce=a.history,Be,Xe=a.sel,it=b=="undo"?Ce.done:Ce.undone,at=b=="undo"?Ce.undone:Ce.done,vt=0;vt<it.length&&(Be=it[vt],!(he?Be.ranges&&!Be.equals(a.sel):!Be.ranges));vt++);if(vt!=it.length){for(Ce.lastOrigin=Ce.lastSelOrigin=null;;)if(Be=it.pop(),Be.ranges){if($i(Be,at),he&&!Be.equals(a.sel)){Uo(a,Be,{clearRedo:!1});return}Xe=Be}else if(fe){it.push(Be);return}else break;var Bt=[];$i(Xe,at),at.push({changes:Bt,generation:Ce.generation}),Ce.generation=Be.generation||++Ce.maxGeneration;for(var Ut=At(a,"beforeChange")||a.cm&&At(a.cm,"beforeChange"),an=function(Kn){var ir=Be.changes[Kn];if(ir.origin=b,Ut&&!Ml(a,ir,!1))return it.length=0,{};Bt.push(lo(a,ir));var pr=Kn?so(a,ir):St(it);Ps(a,ir,pr,_a(a,ir)),!Kn&&a.cm&&a.cm.scrollIntoView({from:ir.from,to:Or(ir)});var Sr=[];oo(a,function(mr,Tr){!Tr&&Ze(Sr,mr.history)==-1&&(Pl(mr.history,ir),Sr.push(mr.history)),Ps(mr,ir,null,_a(mr,ir))})},en=Be.changes.length-1;en>=0;--en){var Dn=an(en);if(Dn)return Dn.v}}}}function Il(a,b){if(b!=0&&(a.first+=b,a.sel=new si(lt(a.sel.ranges,function(Ce){return new kr(Lt(Ce.anchor.line+b,Ce.anchor.ch),Lt(Ce.head.line+b,Ce.head.ch))}),a.sel.primIndex),a.cm)){Eo(a.cm,a.first,a.first-b,b);for(var he=a.cm.display,fe=he.viewFrom;fe<he.viewTo;fe++)ko(a.cm,fe,"gutter")}}function Ps(a,b,he,fe){if(a.cm&&!a.cm.curOp)return $n(a.cm,Ps)(a,b,he,fe);if(b.to.line<a.first){Il(a,b.text.length-1-(b.to.line-b.from.line));return}if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var Ce=b.text.length-1-(a.first-b.from.line);Il(a,Ce),b={from:Lt(a.first,0),to:Lt(b.to.line+Ce,b.to.ch),text:[St(b.text)],origin:b.origin}}var Be=a.lastLine();b.to.line>Be&&(b={from:b.from,to:Lt(Be,jt(a,Be).text.length),text:[b.text[0]],origin:b.origin}),b.removed=qt(a,b.from,b.to),he||(he=so(a,b)),a.cm?pu(a.cm,b,fe):Ai(a,b,fe),Js(a,he,Qe),a.cantEdit&&Qs(a,Lt(a.firstLine(),0))&&(a.cantEdit=!1)}}function pu(a,b,he){var fe=a.doc,Ce=a.display,Be=b.from,Xe=b.to,it=!1,at=Be.line;a.options.lineWrapping||(at=Rt(un(jt(fe,Be.line))),fe.iter(at,Xe.line+1,function(en){if(en==Ce.maxLine)return it=!0,!0})),fe.sel.contains(b.from,b.to)>-1&&Ht(a),Ai(fe,b,he,ds(a)),a.options.lineWrapping||(fe.iter(at,Be.line+b.text.length,function(en){var Dn=gr(en);Dn>Ce.maxLineLength&&(Ce.maxLine=en,Ce.maxLineLength=Dn,Ce.maxLineChanged=!0,it=!1)}),it&&(a.curOp.updateMaxLine=!0)),_i(fe,Be.line),Tn(a,400);var vt=b.text.length-(Xe.line-Be.line)-1;b.full?Eo(a):Be.line==Xe.line&&b.text.length==1&&!ii(a.doc,b)?ko(a,Be.line,"text"):Eo(a,Be.line,Xe.line+1,vt);var Bt=At(a,"changes"),Ut=At(a,"change");if(Ut||Bt){var an={from:Be,to:Xe,text:b.text,removed:b.removed,origin:b.origin};Ut&&Ii(a,"change",a,an),Bt&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(an)}a.display.selForContextMenu=null}function Ls(a,b,he,fe,Ce){var Be;fe||(fe=he),zt(fe,he)<0&&(Be=[fe,he],he=Be[0],fe=Be[1]),typeof b=="string"&&(b=a.splitLines(b)),ks(a,{from:he,to:fe,text:b,origin:Ce})}function Ol(a,b,he,fe){he<a.line?a.line+=fe:b<a.line&&(a.line=b,a.ch=0)}function Nl(a,b,he,fe){for(var Ce=0;Ce<a.length;++Ce){var Be=a[Ce],Xe=!0;if(Be.ranges){Be.copied||(Be=a[Ce]=Be.deepCopy(),Be.copied=!0);for(var it=0;it<Be.ranges.length;it++)Ol(Be.ranges[it].anchor,b,he,fe),Ol(Be.ranges[it].head,b,he,fe);continue}for(var at=0;at<Be.changes.length;++at){var vt=Be.changes[at];if(he<vt.from.line)vt.from=Lt(vt.from.line+fe,vt.from.ch),vt.to=Lt(vt.to.line+fe,vt.to.ch);else if(b<=vt.to.line){Xe=!1;break}}Xe||(a.splice(0,Ce+1),Ce=0)}}function Pl(a,b){var he=b.from.line,fe=b.to.line,Ce=b.text.length-(fe-he)-1;Nl(a.done,he,fe,Ce),Nl(a.undone,he,fe,Ce)}function Bs(a,b,he,fe){var Ce=b,Be=b;return typeof b=="number"?Be=jt(a,Ln(a,b)):Ce=Rt(b),Ce==null?null:(fe(Be,Ce)&&a.cm&&ko(a.cm,Ce,he),Be)}function Fs(a){this.lines=a,this.parent=null;for(var b=0,he=0;he<a.length;++he)a[he].parent=this,b+=a[he].height;this.height=b}Fs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var he=a,fe=a+b;he<fe;++he){var Ce=this.lines[he];this.height-=Ce.height,Ir(Ce),Ii(Ce,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,he){this.height+=he,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var fe=0;fe<b.length;++fe)b[fe].parent=this},iterN:function(a,b,he){for(var fe=a+b;a<fe;++a)if(he(this.lines[a]))return!0}};function js(a){this.children=a;for(var b=0,he=0,fe=0;fe<a.length;++fe){var Ce=a[fe];b+=Ce.chunkSize(),he+=Ce.height,Ce.parent=this}this.size=b,this.height=he,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var he=0;he<this.children.length;++he){var fe=this.children[he],Ce=fe.chunkSize();if(a<Ce){var Be=Math.min(b,Ce-a),Xe=fe.height;if(fe.removeInner(a,Be),this.height-=Xe-fe.height,Ce==Be&&(this.children.splice(he--,1),fe.parent=null),(b-=Be)==0)break;a=0}else a-=Ce}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Fs))){var it=[];this.collapse(it),this.children=[new Fs(it)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,he){this.size+=b.length,this.height+=he;for(var fe=0;fe<this.children.length;++fe){var Ce=this.children[fe],Be=Ce.chunkSize();if(a<=Be){if(Ce.insertInner(a,b,he),Ce.lines&&Ce.lines.length>50){for(var Xe=Ce.lines.length%25+25,it=Xe;it<Ce.lines.length;){var at=new Fs(Ce.lines.slice(it,it+=25));Ce.height-=at.height,this.children.splice(++fe,0,at),at.parent=this}Ce.lines=Ce.lines.slice(0,Xe),this.maybeSpill()}break}a-=Be}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),he=new js(b);if(a.parent){a.size-=he.size,a.height-=he.height;var Ce=Ze(a.parent.children,a);a.parent.children.splice(Ce+1,0,he)}else{var fe=new js(a.children);fe.parent=a,a.children=[fe,he],a=fe}he.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,he){for(var fe=0;fe<this.children.length;++fe){var Ce=this.children[fe],Be=Ce.chunkSize();if(a<Be){var Xe=Math.min(b,Be-a);if(Ce.iterN(a,Xe,he))return!0;if((b-=Xe)==0)break;a=0}else a-=Be}}};var Us=function(a,b,he){if(he)for(var fe in he)he.hasOwnProperty(fe)&&(this[fe]=he[fe]);this.doc=a,this.node=b};Us.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,he=this.line,fe=Rt(he);if(!(fe==null||!b)){for(var Ce=0;Ce<b.length;++Ce)b[Ce]==this&&b.splice(Ce--,1);b.length||(he.widgets=null);var Be=Yi(this);Qn(he,Math.max(0,he.height-Be)),a&&(kt(a,function(){Bl(a,he,-Be),ko(a,fe,"widget")}),Ii(a,"lineWidgetCleared",a,this,fe))}},Us.prototype.changed=function(){var a=this,b=this.height,he=this.doc.cm,fe=this.line;this.height=null;var Ce=Yi(this)-b;Ce&&(Rn(this.doc,fe)||Qn(fe,fe.height+Ce),he&&kt(he,function(){he.curOp.forceUpdate=!0,Bl(he,fe,Ce),Ii(he,"lineWidgetChanged",he,a,Rt(fe))}))},Wt(Us);function Bl(a,b,he){qn(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&rs(a,he)}function mu(a,b,he,fe){var Ce=new Us(a,he,fe),Be=a.cm;return Be&&Ce.noHScroll&&(Be.display.alignWidgets=!0),Bs(a,b,"widget",function(Xe){var it=Xe.widgets||(Xe.widgets=[]);if(Ce.insertAt==null?it.push(Ce):it.splice(Math.min(it.length-1,Math.max(0,Ce.insertAt)),0,Ce),Ce.line=Xe,Be&&!Rn(a,Xe)){var at=qn(Xe)<a.scrollTop;Qn(Xe,Xe.height+Yi(Ce)),at&&rs(Be,Ce.height),Be.curOp.forceUpdate=!0}return!0}),Be&&Ii(Be,"lineWidgetAdded",Be,Ce,typeof b=="number"?b:Rt(b)),Ce}var Fl=0,ss=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++Fl};ss.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&No(a),At(this,"clear")){var he=this.find();he&&Ii(this,"clear",he.from,he.to)}for(var fe=null,Ce=null,Be=0;Be<this.lines.length;++Be){var Xe=this.lines[Be],it=Ar(Xe.markedSpans,this);a&&!this.collapsed?ko(a,Rt(Xe),"text"):a&&(it.to!=null&&(Ce=Rt(Xe)),it.from!=null&&(fe=Rt(Xe))),Xe.markedSpans=Mr(Xe.markedSpans,it),it.from==null&&this.collapsed&&!Rn(this.doc,Xe)&&a&&Qn(Xe,yo(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var at=0;at<this.lines.length;++at){var vt=un(this.lines[at]),Bt=gr(vt);Bt>a.display.maxLineLength&&(a.display.maxLine=vt,a.display.maxLineLength=Bt,a.display.maxLineChanged=!0)}fe!=null&&a&&this.collapsed&&Eo(a,fe,Ce+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ll(a.doc)),a&&Ii(a,"markerCleared",a,this,fe,Ce),b&&fa(a),this.parent&&this.parent.clear()}},ss.prototype.find=function(a,b){a==null&&this.type=="bookmark"&&(a=1);for(var he,fe,Ce=0;Ce<this.lines.length;++Ce){var Be=this.lines[Ce],Xe=Ar(Be.markedSpans,this);if(Xe.from!=null&&(he=Lt(b?Be:Rt(Be),Xe.from),a==-1))return he;if(Xe.to!=null&&(fe=Lt(b?Be:Rt(Be),Xe.to),a==1))return fe}return he&&{from:he,to:fe}},ss.prototype.changed=function(){var a=this,b=this.find(-1,!0),he=this,fe=this.doc.cm;!b||!fe||kt(fe,function(){var Ce=b.line,Be=Rt(b.line),Xe=Yo(fe,Be);if(Xe&&(Ha(Xe),fe.curOp.selectionChanged=fe.curOp.forceUpdate=!0),fe.curOp.updateMaxLine=!0,!Rn(he.doc,Ce)&&he.height!=null){var it=he.height;he.height=null;var at=Yi(he)-it;at&&Qn(Ce,Ce.height+at)}Ii(fe,"markerChanged",fe,a)})},ss.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(!b.maybeHiddenMarkers||Ze(b.maybeHiddenMarkers,this)==-1)&&(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ss.prototype.detachLine=function(a){if(this.lines.splice(Ze(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}},Wt(ss);function As(a,b,he,fe,Ce){if(fe&&fe.shared)return vu(a,b,he,fe,Ce);if(a.cm&&!a.cm.curOp)return $n(a.cm,As)(a,b,he,fe,Ce);var Be=new ss(a,Ce),Xe=zt(b,he);if(fe&&ct(fe,Be,!1),Xe>0||Xe==0&&Be.clearWhenEmpty!==!1)return Be;if(Be.replacedWith&&(Be.collapsed=!0,Be.widgetNode=Fe("span",[Be.replacedWith],"CodeMirror-widget"),fe.handleMouseEvents||Be.widgetNode.setAttribute("cm-ignore-events","true"),fe.insertLeft&&(Be.widgetNode.insertLeft=!0)),Be.collapsed){if(dn(a,b.line,b,he,Be)||b.line!=he.line&&dn(a,he.line,b,he,Be))throw new Error("Inserting collapsed marker partially overlapping an existing one");Li()}Be.addToHistory&&Xs(a,{from:b,to:he,origin:"markText"},a.sel,NaN);var it=b.line,at=a.cm,vt;if(a.iter(it,he.line+1,function(Ut){at&&Be.collapsed&&!at.options.lineWrapping&&un(Ut)==at.display.maxLine&&(vt=!0),Be.collapsed&&it!=b.line&&Qn(Ut,0),$r(Ut,new lr(Be,it==b.line?b.ch:null,it==he.line?he.ch:null)),++it}),Be.collapsed&&a.iter(b.line,he.line+1,function(Ut){Rn(a,Ut)&&Qn(Ut,0)}),Be.clearOnEnter&&tt(Be,"beforeCursorEnter",function(){return Be.clear()}),Be.readOnly&&(Mi(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),Be.collapsed&&(Be.id=++Fl,Be.atomic=!0),at){if(vt&&(at.curOp.updateMaxLine=!0),Be.collapsed)Eo(at,b.line,he.line+1);else if(Be.className||Be.startStyle||Be.endStyle||Be.css||Be.attributes||Be.title)for(var Bt=b.line;Bt<=he.line;Bt++)ko(at,Bt,"text");Be.atomic&&Ll(at.doc),Ii(at,"markerAdded",at,Be)}return Be}var zs=function(a,b){this.markers=a,this.primary=b;for(var he=0;he<a.length;++he)a[he].parent=this};zs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Ii(this,"clear")}},zs.prototype.find=function(a,b){return this.primary.find(a,b)},Wt(zs);function vu(a,b,he,fe,Ce){fe=ct(fe),fe.shared=!1;var Be=[As(a,b,he,fe,Ce)],Xe=Be[0],it=fe.widgetNode;return oo(a,function(at){it&&(fe.widgetNode=it.cloneNode(!0)),Be.push(As(at,Kt(at,b),Kt(at,he),fe,Ce));for(var vt=0;vt<at.linked.length;++vt)if(at.linked[vt].isParent)return;Xe=St(Be)}),new zs(Be,Xe)}function jl(a){return a.findMarks(Lt(a.first,0),a.clipPos(Lt(a.lastLine())),function(b){return b.parent})}function gu(a,b){for(var he=0;he<b.length;he++){var fe=b[he],Ce=fe.find(),Be=a.clipPos(Ce.from),Xe=a.clipPos(Ce.to);if(zt(Be,Xe)){var it=As(a,Be,Xe,fe.primary,fe.primary.type);fe.markers.push(it),it.parent=fe}}}function yu(a){for(var b=function(fe){var Ce=a[fe],Be=[Ce.primary.doc];oo(Ce.primary.doc,function(at){return Be.push(at)});for(var Xe=0;Xe<Ce.markers.length;Xe++){var it=Ce.markers[Xe];Ze(Be,it.doc)==-1&&(it.parent=null,Ce.markers.splice(Xe--,1))}},he=0;he<a.length;he++)b(he)}var _u=0,Qo=function(a,b,he,fe,Ce){if(!(this instanceof Qo))return new Qo(a,b,he,fe,Ce);he==null&&(he=0),js.call(this,[new Fs([new Pr("",null)])]),this.first=he,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=he;var Be=Lt(he,0);this.sel=mi(Be),this.history=new Jo(null),this.id=++_u,this.modeOption=b,this.lineSep=fe,this.direction=Ce=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),Ai(this,{from:Be,to:Be,text:a}),Uo(this,mi(Be),Qe)};Qo.prototype=nt(js.prototype,{constructor:Qo,iter:function(a,b,he){he?this.iterN(a-this.first,b-a,he):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var he=0,fe=0;fe<b.length;++fe)he+=b[fe].height;this.insertInner(a-this.first,b,he)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=wn(this,this.first,this.first+this.size);return a===!1?b:b.join(a||this.lineSeparator())},setValue:pn(function(a){var b=Lt(this.first,0),he=this.first+this.size-1;ks(this,{from:b,to:Lt(he,jt(this,he).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Ur(this.cm,0,0),Uo(this,mi(b),Qe)}),replaceRange:function(a,b,he,fe){b=Kt(this,b),he=he?Kt(this,he):b,Ls(this,a,b,he,fe)},getRange:function(a,b,he){var fe=qt(this,Kt(this,a),Kt(this,b));return he===!1?fe:fe.join(he||this.lineSeparator())},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){if(sn(this,a))return jt(this,a)},getLineNumber:function(a){return Rt(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=jt(this,a)),un(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Kt(this,a)},getCursor:function(a){var b=this.sel.primary(),he;return a==null||a=="head"?he=b.head:a=="anchor"?he=b.anchor:a=="end"||a=="to"||a===!1?he=b.to():he=b.from(),he},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pn(function(a,b,he){as(this,Kt(this,typeof a=="number"?Lt(a,b||0):a),null,he)}),setSelection:pn(function(a,b,he){as(this,Kt(this,a),Kt(this,b||a),he)}),extendSelection:pn(function(a,b,he){Va(this,Kt(this,a),b&&Kt(this,b),he)}),extendSelections:pn(function(a,b){ja(this,Cn(this,a),b)}),extendSelectionsBy:pn(function(a,b){var he=lt(this.sel.ranges,a);ja(this,Cn(this,he),b)}),setSelections:pn(function(a,b,he){if(a.length){for(var fe=[],Ce=0;Ce<a.length;Ce++)fe[Ce]=new kr(Kt(this,a[Ce].anchor),Kt(this,a[Ce].head));b==null&&(b=Math.min(a.length-1,this.sel.primIndex)),Uo(this,Hr(this.cm,fe,b),he)}}),addSelection:pn(function(a,b,he){var fe=this.sel.ranges.slice(0);fe.push(new kr(Kt(this,a),Kt(this,b||a))),Uo(this,Hr(this.cm,fe,fe.length-1),he)}),getSelection:function(a){for(var b=this.sel.ranges,he,fe=0;fe<b.length;fe++){var Ce=qt(this,b[fe].from(),b[fe].to());he=he?he.concat(Ce):Ce}return a===!1?he:he.join(a||this.lineSeparator())},getSelections:function(a){for(var b=[],he=this.sel.ranges,fe=0;fe<he.length;fe++){var Ce=qt(this,he[fe].from(),he[fe].to());a!==!1&&(Ce=Ce.join(a||this.lineSeparator())),b[fe]=Ce}return b},replaceSelection:function(a,b,he){for(var fe=[],Ce=0;Ce<this.sel.ranges.length;Ce++)fe[Ce]=a;this.replaceSelections(fe,b,he||"+input")},replaceSelections:pn(function(a,b,he){for(var fe=[],Ce=this.sel,Be=0;Be<Ce.ranges.length;Be++){var Xe=Ce.ranges[Be];fe[Be]={from:Xe.from(),to:Xe.to(),text:this.splitLines(a[Be]),origin:he}}for(var it=b&&b!="end"&&os(this,fe,b),at=fe.length-1;at>=0;at--)ks(this,fe[at]);it?El(this,it):this.cm&&La(this.cm)}),undo:pn(function(){$s(this,"undo")}),redo:pn(function(){$s(this,"redo")}),undoSelection:pn(function(){$s(this,"undo",!0)}),redoSelection:pn(function(){$s(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,he=0,fe=0;fe<a.done.length;fe++)a.done[fe].ranges||++b;for(var Ce=0;Ce<a.undone.length;Ce++)a.undone[Ce].ranges||++he;return{undo:b,redo:he}},clearHistory:function(){var a=this;this.history=new Jo(this.history.maxGeneration),oo(this,function(b){return b.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ha(this.history.done),undone:ha(this.history.undone)}},setHistory:function(a){var b=this.history=new Jo(this.history.maxGeneration);b.done=ha(a.done.slice(0),null,!0),b.undone=ha(a.undone.slice(0),null,!0)},setGutterMarker:pn(function(a,b,he){return Bs(this,a,"gutter",function(fe){var Ce=fe.gutterMarkers||(fe.gutterMarkers={});return Ce[b]=he,!he&&Tt(Ce)&&(fe.gutterMarkers=null),!0})}),clearGutter:pn(function(a){var b=this;this.iter(function(he){he.gutterMarkers&&he.gutterMarkers[a]&&Bs(b,he,"gutter",function(){return he.gutterMarkers[a]=null,Tt(he.gutterMarkers)&&(he.gutterMarkers=null),!0})})}),lineInfo:function(a){var b;if(typeof a=="number"){if(!sn(this,a)||(b=a,a=jt(this,a),!a))return null}else if(b=Rt(a),b==null)return null;return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:pn(function(a,b,he){return Bs(this,a,b=="gutter"?"gutter":"class",function(fe){var Ce=b=="text"?"textClass":b=="background"?"bgClass":b=="gutter"?"gutterClass":"wrapClass";if(!fe[Ce])fe[Ce]=he;else{if(me(he).test(fe[Ce]))return!1;fe[Ce]+=" "+he}return!0})}),removeLineClass:pn(function(a,b,he){return Bs(this,a,b=="gutter"?"gutter":"class",function(fe){var Ce=b=="text"?"textClass":b=="background"?"bgClass":b=="gutter"?"gutterClass":"wrapClass",Be=fe[Ce];if(Be)if(he==null)fe[Ce]=null;else{var Xe=Be.match(me(he));if(!Xe)return!1;var it=Xe.index+Xe[0].length;fe[Ce]=Be.slice(0,Xe.index)+(!Xe.index||it==Be.length?"":" ")+Be.slice(it)||null}else return!1;return!0})}),addLineWidget:pn(function(a,b,he){return mu(this,a,b,he)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,he){return As(this,Kt(this,a),Kt(this,b),he,he&&he.type||"range")},setBookmark:function(a,b){var he={replacedWith:b&&(b.nodeType==null?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};return a=Kt(this,a),As(this,a,a,he,"bookmark")},findMarksAt:function(a){a=Kt(this,a);var b=[],he=jt(this,a.line).markedSpans;if(he)for(var fe=0;fe<he.length;++fe){var Ce=he[fe];(Ce.from==null||Ce.from<=a.ch)&&(Ce.to==null||Ce.to>=a.ch)&&b.push(Ce.marker.parent||Ce.marker)}return b},findMarks:function(a,b,he){a=Kt(this,a),b=Kt(this,b);var fe=[],Ce=a.line;return this.iter(a.line,b.line+1,function(Be){var Xe=Be.markedSpans;if(Xe)for(var it=0;it<Xe.length;it++){var at=Xe[it];!(at.to!=null&&Ce==a.line&&a.ch>=at.to||at.from==null&&Ce!=a.line||at.from!=null&&Ce==b.line&&at.from>=b.ch)&&(!he||he(at.marker))&&fe.push(at.marker.parent||at.marker)}++Ce}),fe},getAllMarks:function(){var a=[];return this.iter(function(b){var he=b.markedSpans;if(he)for(var fe=0;fe<he.length;++fe)he[fe].from!=null&&a.push(he[fe].marker)}),a},posFromIndex:function(a){var b,he=this.first,fe=this.lineSeparator().length;return this.iter(function(Ce){var Be=Ce.text.length+fe;if(Be>a)return b=a,!0;a-=Be,++he}),Kt(this,Lt(he,b))},indexFromPos:function(a){a=Kt(this,a);var b=a.ch;if(a.line<this.first||a.ch<0)return 0;var he=this.lineSeparator().length;return this.iter(this.first,a.line,function(fe){b+=fe.text.length+he}),b},copy:function(a){var b=new Qo(wn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var b=this.first,he=this.first+this.size;a.from!=null&&a.from>b&&(b=a.from),a.to!=null&&a.to<he&&(he=a.to);var fe=new Qo(wn(this,b,he),a.mode||this.modeOption,b,this.lineSep,this.direction);return a.sharedHist&&(fe.history=this.history),(this.linked||(this.linked=[])).push({doc:fe,sharedHist:a.sharedHist}),fe.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],gu(fe,jl(this)),fe},unlinkDoc:function(a){if(a instanceof uo&&(a=a.doc),this.linked)for(var b=0;b<this.linked.length;++b){var he=this.linked[b];if(he.doc==a){this.linked.splice(b,1),a.unlinkDoc(this),yu(jl(this));break}}if(a.history==this.history){var fe=[a.id];oo(a,function(Ce){return fe.push(Ce.id)},!0),a.history=new Jo(null),a.history.done=ha(this.history.done,fe),a.history.undone=ha(this.history.undone,fe)}},iterLinkedDocs:function(a){oo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):sr(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:pn(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(b){return b.order=null}),this.cm&&Cs(this.cm))})}),Qo.prototype.eachLine=Qo.prototype.iter;var Ul=0;function bu(a){var b=this;if(zl(b),!(ut(b,a)||Xi(b.display,a))){on(a),se&&(Ul=+new Date);var he=da(b,a,!0),fe=a.dataTransfer.files;if(!(!he||b.isReadOnly()))if(fe&&fe.length&&window.FileReader&&window.File)for(var Ce=fe.length,Be=Array(Ce),Xe=0,it=function(){++Xe==Ce&&$n(b,function(){he=Kt(b.doc,he);var en={from:he,to:he,text:b.doc.splitLines(Be.filter(function(Dn){return Dn!=null}).join(b.doc.lineSeparator())),origin:"paste"};ks(b.doc,en),El(b.doc,mi(Kt(b.doc,he),Kt(b.doc,Or(en))))})()},at=function(en,Dn){if(b.options.allowDropFileTypes&&Ze(b.options.allowDropFileTypes,en.type)==-1){it();return}var Kn=new FileReader;Kn.onerror=function(){return it()},Kn.onload=function(){var ir=Kn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ir)){it();return}Be[Dn]=ir,it()},Kn.readAsText(en)},vt=0;vt<fe.length;vt++)at(fe[vt],vt);else{if(b.state.draggingText&&b.doc.sel.contains(he)>-1){b.state.draggingText(a),setTimeout(function(){return b.display.input.focus()},20);return}try{var Bt=a.dataTransfer.getData("Text");if(Bt){var Ut;if(b.state.draggingText&&!b.state.draggingText.copy&&(Ut=b.listSelections()),Js(b.doc,mi(he,he)),Ut)for(var an=0;an<Ut.length;++an)Ls(b.doc,"",Ut[an].anchor,Ut[an].head,"drag");b.replaceSelection(Bt,"around","paste"),b.display.input.focus()}}catch(en){}}}}function Su(a,b){if(se&&(!a.state.draggingText||+new Date-Ul<100)){Mn(b);return}if(!(ut(a,b)||Xi(a.display,b))&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.effectAllowed="copyMove",b.dataTransfer.setDragImage&&!y)){var he=Ie("img",null,null,"position: fixed; left: 0; top: 0;");he.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(he.width=he.height=1,a.display.wrapper.appendChild(he),he._top=he.offsetTop),b.dataTransfer.setDragImage(he,0,0),E&&he.parentNode.removeChild(he)}}function wu(a,b){var he=da(a,b);if(he){var fe=document.createDocumentFragment();$a(a,he,fe),a.display.dragCursor||(a.display.dragCursor=Ie("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),ke(a.display.dragCursor,fe)}}function zl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function Hl(a){if(document.getElementsByClassName){for(var b=document.getElementsByClassName("CodeMirror"),he=[],fe=0;fe<b.length;fe++){var Ce=b[fe].CodeMirror;Ce&&he.push(Ce)}he.length&&he[0].operation(function(){for(var Be=0;Be<he.length;Be++)a(he[Be])})}}var Wl=!1;function xu(){Wl||(Cu(),Wl=!0)}function Cu(){var a;tt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,Hl(Eu)},100))}),tt(window,"blur",function(){return Hl(Ga)})}function Eu(a){var b=a.display;b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize()}for(var ls={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Hs=0;Hs<10;Hs++)ls[Hs+48]=ls[Hs+96]=String(Hs);for(var el=65;el<=90;el++)ls[el]=String.fromCharCode(el);for(var Ws=1;Ws<=12;Ws++)ls[Ws+111]=ls[Ws+63235]="F"+Ws;var Ya={};Ya.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ya.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ya.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ya.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ya.default=ge?Ya.macDefault:Ya.pcDefault;function ku(a){var b=a.split(/-(?!$)/);a=b[b.length-1];for(var he,fe,Ce,Be,Xe=0;Xe<b.length-1;Xe++){var it=b[Xe];if(/^(cmd|meta|m)$/i.test(it))Be=!0;else if(/^a(lt)?$/i.test(it))he=!0;else if(/^(c|ctrl|control)$/i.test(it))fe=!0;else if(/^s(hift)?$/i.test(it))Ce=!0;else throw new Error("Unrecognized modifier name: "+it)}return he&&(a="Alt-"+a),fe&&(a="Ctrl-"+a),Be&&(a="Cmd-"+a),Ce&&(a="Shift-"+a),a}function Lu(a){var b={};for(var he in a)if(a.hasOwnProperty(he)){var fe=a[he];if(/^(name|fallthrough|(de|at)tach)$/.test(he))continue;if(fe=="..."){delete a[he];continue}for(var Ce=lt(he.split(" "),ku),Be=0;Be<Ce.length;Be++){var Xe=void 0,it=void 0;Be==Ce.length-1?(it=Ce.join(" "),Xe=fe):(it=Ce.slice(0,Be+1).join(" "),Xe="...");var at=b[it];if(!at)b[it]=Xe;else if(at!=Xe)throw new Error("Inconsistent bindings for "+it)}delete a[he]}for(var vt in b)a[vt]=b[vt];return a}function Ts(a,b,he,fe){b=tl(b);var Ce=b.call?b.call(a,fe):b[a];if(Ce===!1)return"nothing";if(Ce==="...")return"multi";if(Ce!=null&&he(Ce))return"handled";if(b.fallthrough){if(Object.prototype.toString.call(b.fallthrough)!="[object Array]")return Ts(a,b.fallthrough,he,fe);for(var Be=0;Be<b.fallthrough.length;Be++){var Xe=Ts(a,b.fallthrough[Be],he,fe);if(Xe)return Xe}}}function Zl(a){var b=typeof a=="string"?a:ls[a.keyCode];return b=="Ctrl"||b=="Alt"||b=="Shift"||b=="Mod"}function Gl(a,b,he){var fe=a;return b.altKey&&fe!="Alt"&&(a="Alt-"+a),(xe?b.metaKey:b.ctrlKey)&&fe!="Ctrl"&&(a="Ctrl-"+a),(xe?b.ctrlKey:b.metaKey)&&fe!="Mod"&&(a="Cmd-"+a),!he&&b.shiftKey&&fe!="Shift"&&(a="Shift-"+a),a}function Kl(a,b){if(E&&a.keyCode==34&&a.char)return!1;var he=ls[a.keyCode];return he==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(he=a.code),Gl(he,a,b))}function tl(a){return typeof a=="string"?Ya[a]:a}function Ds(a,b){for(var he=a.doc.sel.ranges,fe=[],Ce=0;Ce<he.length;Ce++){for(var Be=b(he[Ce]);fe.length&&zt(Be.from,St(fe).to)<=0;){var Xe=fe.pop();if(zt(Xe.from,Be.from)<0){Be.from=Xe.from;break}}fe.push(Be)}kt(a,function(){for(var it=fe.length-1;it>=0;it--)Ls(a.doc,"",fe[it].from,fe[it].to,"+delete");La(a)})}function pl(a,b,he){var fe=Te(a.text,b+he,he);return fe<0||fe>a.text.length?null:fe}function ml(a,b,he){var fe=pl(a,b.ch,he);return fe==null?null:new Lt(b.line,fe,he<0?"after":"before")}function vl(a,b,he,fe,Ce){if(a){b.doc.direction=="rtl"&&(Ce=-Ce);var Be=Ye(he,b.doc.direction);if(Be){var Xe=Ce<0?St(Be):Be[0],it=Ce<0==(Xe.level==1),at=it?"after":"before",vt;if(Xe.level>0||b.doc.direction=="rtl"){var Bt=la(b,he);vt=Ce<0?he.text.length-1:0;var Ut=Zo(b,Bt,vt).top;vt=je(function(an){return Zo(b,Bt,an).top==Ut},Ce<0==(Xe.level==1)?Xe.from:Xe.to-1,vt),at=="before"&&(vt=pl(he,vt,1))}else vt=Ce<0?Xe.to:Xe.from;return new Lt(fe,vt,at)}}return new Lt(fe,Ce<0?he.text.length:0,Ce<0?"before":"after")}function Au(a,b,he,fe){var Ce=Ye(b,a.doc.direction);if(!Ce)return ml(b,he,fe);he.ch>=b.text.length?(he.ch=b.text.length,he.sticky="before"):he.ch<=0&&(he.ch=0,he.sticky="after");var Be=_e(Ce,he.ch,he.sticky),Xe=Ce[Be];if(a.doc.direction=="ltr"&&Xe.level%2==0&&(fe>0?Xe.to>he.ch:Xe.from<he.ch))return ml(b,he,fe);var it=function(pr,Sr){return pl(b,pr instanceof Lt?pr.ch:pr,Sr)},at,vt=function(pr){return a.options.lineWrapping?(at=at||la(a,b),io(a,b,at,pr)):{begin:0,end:b.text.length}},Bt=vt(he.sticky=="before"?it(he,-1):he.ch);if(a.doc.direction=="rtl"||Xe.level==1){var Ut=Xe.level==1==fe<0,an=it(he,Ut?1:-1);if(an!=null&&(Ut?an<=Xe.to&&an<=Bt.end:an>=Xe.from&&an>=Bt.begin)){var en=Ut?"before":"after";return new Lt(he.line,an,en)}}var Dn=function(pr,Sr,mr){for(var Tr=function(eo,Mo){return Mo?new Lt(he.line,it(eo,1),"before"):new Lt(he.line,eo,"after")};pr>=0&&pr<Ce.length;pr+=Sr){var ei=Ce[pr],Vr=Sr>0==(ei.level!=1),ki=Vr?mr.begin:it(mr.end,-1);if(ei.from<=ki&&ki<ei.to||(ki=Vr?ei.from:it(ei.to,-1),mr.begin<=ki&&ki<mr.end))return Tr(ki,Vr)}},Kn=Dn(Be+fe,fe,Bt);if(Kn)return Kn;var ir=fe>0?Bt.end:it(Bt.begin,-1);return ir!=null&&!(fe>0&&ir==b.text.length)&&(Kn=Dn(fe>0?0:Ce.length-1,fe,vt(ir)),Kn)?Kn:null}var Zs={selectAll:Dl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Qe)},killLine:function(a){return Ds(a,function(b){if(b.empty()){var he=jt(a.doc,b.head.line).text.length;return b.head.ch==he&&b.head.line<a.lastLine()?{from:b.head,to:Lt(b.head.line+1,0)}:{from:b.head,to:Lt(b.head.line,he)}}else return{from:b.from(),to:b.to()}})},deleteLine:function(a){return Ds(a,function(b){return{from:Lt(b.from().line,0),to:Kt(a.doc,Lt(b.to().line+1,0))}})},delLineLeft:function(a){return Ds(a,function(b){return{from:Lt(b.from().line,0),to:b.from()}})},delWrappedLineLeft:function(a){return Ds(a,function(b){var he=a.charCoords(b.head,"div").top+5,fe=a.coordsChar({left:0,top:he},"div");return{from:fe,to:b.from()}})},delWrappedLineRight:function(a){return Ds(a,function(b){var he=a.charCoords(b.head,"div").top+5,fe=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:he},"div");return{from:b.from(),to:fe}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Lt(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Lt(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(b){return Vl(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(b){return Yl(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(b){return Tu(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(b){var he=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:he},"div")},ht)},goLineLeft:function(a){return a.extendSelectionsBy(function(b){var he=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:he},"div")},ht)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(b){var he=a.cursorCoords(b.head,"div").top+5,fe=a.coordsChar({left:0,top:he},"div");return fe.ch<a.getLine(fe.line).search(/\S/)?Yl(a,b.head):fe},ht)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var b=[],he=a.listSelections(),fe=a.options.tabSize,Ce=0;Ce<he.length;Ce++){var Be=he[Ce].from(),Xe=We(a.getLine(Be.line),Be.ch,fe);b.push(bt(fe-Xe%fe))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return kt(a,function(){for(var b=a.listSelections(),he=[],fe=0;fe<b.length;fe++)if(b[fe].empty()){var Ce=b[fe].head,Be=jt(a.doc,Ce.line).text;if(Be){if(Ce.ch==Be.length&&(Ce=new Lt(Ce.line,Ce.ch-1)),Ce.ch>0)Ce=new Lt(Ce.line,Ce.ch+1),a.replaceRange(Be.charAt(Ce.ch-1)+Be.charAt(Ce.ch-2),Lt(Ce.line,Ce.ch-2),Ce,"+transpose");else if(Ce.line>a.doc.first){var Xe=jt(a.doc,Ce.line-1).text;Xe&&(Ce=new Lt(Ce.line,1),a.replaceRange(Be.charAt(0)+a.doc.lineSeparator()+Xe.charAt(Xe.length-1),Lt(Ce.line-1,Xe.length-1),Ce,"+transpose"))}}he.push(new kr(Ce,Ce))}a.setSelections(he)})},newlineAndIndent:function(a){return kt(a,function(){for(var b=a.listSelections(),he=b.length-1;he>=0;he--)a.replaceRange(a.doc.lineSeparator(),b[he].anchor,b[he].head,"+input");b=a.listSelections();for(var fe=0;fe<b.length;fe++)a.indentLine(b[fe].from().line,null,!0);La(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function Vl(a,b){var he=jt(a.doc,b),fe=un(he);return fe!=he&&(b=Rt(fe)),vl(!0,a,fe,b,1)}function Tu(a,b){var he=jt(a.doc,b),fe=vn(he);return fe!=he&&(b=Rt(fe)),vl(!0,a,he,b,-1)}function Yl(a,b){var he=Vl(a,b.line),fe=jt(a.doc,he.line),Ce=Ye(fe,a.doc.direction);if(!Ce||Ce[0].level==0){var Be=Math.max(he.ch,fe.text.search(/\S/)),Xe=b.line==he.line&&b.ch<=Be&&b.ch;return Lt(he.line,Xe?0:Be,he.sticky)}return he}function nl(a,b,he){if(typeof b=="string"&&(b=Zs[b],!b))return!1;a.display.input.ensurePolled();var fe=a.display.shift,Ce=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),he&&(a.display.shift=!1),Ce=b(a)!=$e}finally{a.display.shift=fe,a.state.suppressEdits=!1}return Ce}function Du(a,b,he){for(var fe=0;fe<a.state.keyMaps.length;fe++){var Ce=Ts(b,a.state.keyMaps[fe],he,a);if(Ce)return Ce}return a.options.extraKeys&&Ts(b,a.options.extraKeys,he,a)||Ts(b,a.options.keyMap,he,a)}var Mu=new Ue;function Gs(a,b,he,fe){var Ce=a.state.keySeq;if(Ce){if(Zl(b))return"handled";if(/\'$/.test(b)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==Ce&&(a.state.keySeq=null,a.display.input.reset())}),Xl(a,Ce+" "+b,he,fe))return!0}return Xl(a,b,he,fe)}function Xl(a,b,he,fe){var Ce=Du(a,b,fe);return Ce=="multi"&&(a.state.keySeq=b),Ce=="handled"&&Ii(a,"keyHandled",a,b,he),(Ce=="handled"||Ce=="multi")&&(on(he),es(a)),!!Ce}function ql(a,b){var he=Kl(b,!0);return he?b.shiftKey&&!a.state.keySeq?Gs(a,"Shift-"+he,b,function(fe){return nl(a,fe,!0)})||Gs(a,he,b,function(fe){if(typeof fe=="string"?/^go[A-Z]/.test(fe):fe.motion)return nl(a,fe)}):Gs(a,he,b,function(fe){return nl(a,fe)}):!1}function Ru(a,b,he){return Gs(a,"'"+he+"'",b,function(fe){return nl(a,fe,!0)})}var gl=null;function Jl(a){var b=this;if(!(a.target&&a.target!=b.display.input.getField())&&(b.curOp.focus=Ke(),!ut(b,a))){se&&re<11&&a.keyCode==27&&(a.returnValue=!1);var he=a.keyCode;b.display.shift=he==16||a.shiftKey;var fe=ql(b,a);E&&(gl=fe?he:null,!fe&&he==88&&!In&&(ge?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),de&&!ge&&!fe&&he==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),he==18&&!/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)&&Iu(b)}}function Iu(a){var b=a.display.lineDiv;ot(b,"CodeMirror-crosshair");function he(fe){(fe.keyCode==18||!fe.altKey)&&(Ae(b,"CodeMirror-crosshair"),Nt(document,"keyup",he),Nt(document,"mouseover",he))}tt(document,"keyup",he),tt(document,"mouseover",he)}function Ql(a){a.keyCode==16&&(this.doc.sel.shift=!1),ut(this,a)}function $l(a){var b=this;if(!(a.target&&a.target!=b.display.input.getField())&&!(Xi(b.display,a)||ut(b,a)||a.ctrlKey&&!a.altKey||ge&&a.metaKey)){var he=a.keyCode,fe=a.charCode;if(E&&he==gl){gl=null,on(a);return}if(!(E&&(!a.which||a.which<10)&&ql(b,a))){var Ce=String.fromCharCode(fe==null?he:fe);Ce!="\b"&&(Ru(b,a,Ce)||b.display.input.onKeyPress(a))}}}var Ou=400,yl=function(a,b,he){this.time=a,this.pos=b,this.button=he};yl.prototype.compare=function(a,b,he){return this.time+Ou>a&&zt(b,this.pos)==0&&he==this.button};var Ks,Vs;function Nu(a,b){var he=+new Date;return Vs&&Vs.compare(he,a,b)?(Ks=Vs=null,"triple"):Ks&&Ks.compare(he,a,b)?(Vs=new yl(he,a,b),Ks=null,"double"):(Ks=new yl(he,a,b),Vs=null,"single")}function eu(a){var b=this,he=b.display;if(!(ut(b,a)||he.activeTouch&&he.input.supportsTouch())){if(he.input.ensurePolled(),he.shift=a.shiftKey,Xi(he,a)){ue||(he.scroller.draggable=!1,setTimeout(function(){return he.scroller.draggable=!0},100));return}if(!_l(b,a)){var fe=da(b,a),Ce=Vn(a),Be=fe?Nu(fe,Ce):"single";window.focus(),Ce==1&&b.state.selectingText&&b.state.selectingText(a),!(fe&&Pu(b,Ce,fe,Be,a))&&(Ce==1?fe?Fu(b,fe,Be,a):Yn(a)==he.scroller&&on(a):Ce==2?(fe&&Va(b.doc,fe),setTimeout(function(){return he.input.focus()},20)):Ce==3&&(pe?b.display.input.onContextMenu(a):Za(b)))}}}function Pu(a,b,he,fe,Ce){var Be="Click";return fe=="double"?Be="Double"+Be:fe=="triple"&&(Be="Triple"+Be),Be=(b==1?"Left":b==2?"Middle":"Right")+Be,Gs(a,Gl(Be,Ce),Ce,function(Xe){if(typeof Xe=="string"&&(Xe=Zs[Xe]),!Xe)return!1;var it=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),it=Xe(a,he)!=$e}finally{a.state.suppressEdits=!1}return it})}function Bu(a,b,he){var fe=a.getOption("configureMouse"),Ce=fe?fe(a,b,he):{};if(Ce.unit==null){var Be=Se?he.shiftKey&&he.metaKey:he.altKey;Ce.unit=Be?"rectangle":b=="single"?"char":b=="double"?"word":"line"}return(Ce.extend==null||a.doc.extend)&&(Ce.extend=a.doc.extend||he.shiftKey),Ce.addNew==null&&(Ce.addNew=ge?he.metaKey:he.ctrlKey),Ce.moveOnDrag==null&&(Ce.moveOnDrag=!(ge?he.altKey:he.ctrlKey)),Ce}function Fu(a,b,he,fe){se?setTimeout(Ge(ra,a),0):a.curOp.focus=Ke();var Ce=Bu(a,he,fe),Be=a.doc.sel,Xe;a.options.dragDrop&&Jn&&!a.isReadOnly()&&he=="single"&&(Xe=Be.contains(b))>-1&&(zt((Xe=Be.ranges[Xe]).from(),b)<0||b.xRel>0)&&(zt(Xe.to(),b)>0||b.xRel<0)?ju(a,fe,b,Ce):Uu(a,fe,b,Ce)}function ju(a,b,he,fe){var Ce=a.display,Be=!1,Xe=$n(a,function(vt){ue&&(Ce.scroller.draggable=!1),a.state.draggingText=!1,Nt(Ce.wrapper.ownerDocument,"mouseup",Xe),Nt(Ce.wrapper.ownerDocument,"mousemove",it),Nt(Ce.scroller,"dragstart",at),Nt(Ce.scroller,"drop",Xe),Be||(on(vt),fe.addNew||Va(a.doc,he,null,null,fe.extend),ue&&!y||se&&re==9?setTimeout(function(){Ce.wrapper.ownerDocument.body.focus({preventScroll:!0}),Ce.input.focus()},20):Ce.input.focus())}),it=function(vt){Be=Be||Math.abs(b.clientX-vt.clientX)+Math.abs(b.clientY-vt.clientY)>=10},at=function(){return Be=!0};ue&&(Ce.scroller.draggable=!0),a.state.draggingText=Xe,Xe.copy=!fe.moveOnDrag,Ce.scroller.dragDrop&&Ce.scroller.dragDrop(),tt(Ce.wrapper.ownerDocument,"mouseup",Xe),tt(Ce.wrapper.ownerDocument,"mousemove",it),tt(Ce.scroller,"dragstart",at),tt(Ce.scroller,"drop",Xe),Za(a),setTimeout(function(){return Ce.input.focus()},20)}function tu(a,b,he){if(he=="char")return new kr(b,b);if(he=="word")return a.findWordAt(b);if(he=="line")return new kr(Lt(b.line,0),Kt(a.doc,Lt(b.line+1,0)));var fe=he(a,b);return new kr(fe.from,fe.to)}function Uu(a,b,he,fe){var Ce=a.display,Be=a.doc;on(b);var Xe,it,at=Be.sel,vt=at.ranges;if(fe.addNew&&!fe.extend?(it=Be.sel.contains(he),it>-1?Xe=vt[it]:Xe=new kr(he,he)):(Xe=Be.sel.primary(),it=Be.sel.primIndex),fe.unit=="rectangle")fe.addNew||(Xe=new kr(he,he)),he=da(a,b,!0,!0),it=-1;else{var Bt=tu(a,he,fe.unit);fe.extend?Xe=Ka(Xe,Bt.anchor,Bt.head,fe.extend):Xe=Bt}fe.addNew?it==-1?(it=vt.length,Uo(Be,Hr(a,vt.concat([Xe]),it),{scroll:!1,origin:"*mouse"})):vt.length>1&&vt[it].empty()&&fe.unit=="char"&&!fe.extend?(Uo(Be,Hr(a,vt.slice(0,it).concat(vt.slice(it+1)),0),{scroll:!1,origin:"*mouse"}),at=Be.sel):Ns(Be,it,Xe,pt):(it=0,Uo(Be,new si([Xe],0),pt),at=Be.sel);var Ut=he;function an(mr){if(zt(Ut,mr)!=0)if(Ut=mr,fe.unit=="rectangle"){for(var Tr=[],ei=a.options.tabSize,Vr=We(jt(Be,he.line).text,he.ch,ei),ki=We(jt(Be,mr.line).text,mr.ch,ei),eo=Math.min(Vr,ki),Mo=Math.max(Vr,ki),ho=Math.min(he.line,mr.line),sa=Math.min(a.lastLine(),Math.max(he.line,mr.line));ho<=sa;ho++){var $o=jt(Be,ho).text,wo=Pt($o,eo,ei);eo==Mo?Tr.push(new kr(Lt(ho,wo),Lt(ho,wo))):$o.length>wo&&Tr.push(new kr(Lt(ho,wo),Lt(ho,Pt($o,Mo,ei))))}Tr.length||Tr.push(new kr(he,he)),Uo(Be,Hr(a,at.ranges.slice(0,it).concat(Tr),it),{origin:"*mouse",scroll:!1}),a.scrollIntoView(mr)}else{var ea=Xe,Bo=tu(a,mr,fe.unit),Lo=ea.anchor,xo;zt(Bo.anchor,Lo)>0?(xo=Bo.head,Lo=xn(ea.from(),Bo.anchor)):(xo=Bo.anchor,Lo=_n(ea.to(),Bo.head));var go=at.ranges.slice(0);go[it]=zu(a,new kr(Kt(Be,Lo),xo)),Uo(Be,Hr(a,go,it),pt)}}var en=Ce.wrapper.getBoundingClientRect(),Dn=0;function Kn(mr){var Tr=++Dn,ei=da(a,mr,!0,fe.unit=="rectangle");if(ei)if(zt(ei,Ut)!=0){a.curOp.focus=Ke(),an(ei);var Vr=ka(Ce,Be);(ei.line>=Vr.to||ei.line<Vr.from)&&setTimeout($n(a,function(){Dn==Tr&&Kn(mr)}),150)}else{var ki=mr.clientY<en.top?-20:mr.clientY>en.bottom?20:0;ki&&setTimeout($n(a,function(){Dn==Tr&&(Ce.scroller.scrollTop+=ki,Kn(mr))}),50)}}function ir(mr){a.state.selectingText=!1,Dn=1/0,mr&&(on(mr),Ce.input.focus()),Nt(Ce.wrapper.ownerDocument,"mousemove",pr),Nt(Ce.wrapper.ownerDocument,"mouseup",Sr),Be.history.lastSelOrigin=null}var pr=$n(a,function(mr){mr.buttons===0||!Vn(mr)?ir(mr):Kn(mr)}),Sr=$n(a,ir);a.state.selectingText=Sr,tt(Ce.wrapper.ownerDocument,"mousemove",pr),tt(Ce.wrapper.ownerDocument,"mouseup",Sr)}function zu(a,b){var he=b.anchor,fe=b.head,Ce=jt(a.doc,he.line);if(zt(he,fe)==0&&he.sticky==fe.sticky)return b;var Be=Ye(Ce);if(!Be)return b;var Xe=_e(Be,he.ch,he.sticky),it=Be[Xe];if(it.from!=he.ch&&it.to!=he.ch)return b;var at=Xe+(it.from==he.ch==(it.level!=1)?0:1);if(at==0||at==Be.length)return b;var vt;if(fe.line!=he.line)vt=(fe.line-he.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Bt=_e(Be,fe.ch,fe.sticky),Ut=Bt-Xe||(fe.ch-he.ch)*(it.level==1?-1:1);Bt==at-1||Bt==at?vt=Ut<0:vt=Ut>0}var an=Be[at+(vt?-1:0)],en=vt==(an.level==1),Dn=en?an.from:an.to,Kn=en?"after":"before";return he.ch==Dn&&he.sticky==Kn?b:new kr(new Lt(he.line,Dn,Kn),fe)}function nu(a,b,he,fe){var Ce,Be;if(b.touches)Ce=b.touches[0].clientX,Be=b.touches[0].clientY;else try{Ce=b.clientX,Be=b.clientY}catch(an){return!1}if(Ce>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;fe&&on(b);var Xe=a.display,it=Xe.lineDiv.getBoundingClientRect();if(Be>it.bottom||!At(a,he))return Yt(b);Be-=it.top-Xe.viewOffset;for(var at=0;at<a.display.gutterSpecs.length;++at){var vt=Xe.gutters.childNodes[at];if(vt&&vt.getBoundingClientRect().right>=Ce){var Bt=Et(a.doc,Be),Ut=a.display.gutterSpecs[at];return Dt(a,he,a,Bt,Ut.className,b),Yt(b)}}}function _l(a,b){return nu(a,b,"gutterClick",!0)}function ru(a,b){Xi(a.display,b)||Hu(a,b)||ut(a,b,"contextmenu")||pe||a.display.input.onContextMenu(b)}function Hu(a,b){return At(a,"gutterContextMenu")?nu(a,b,"gutterContextMenu",!1):!1}function iu(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pa(a)}var Ms={toString:function(){return"CodeMirror.Init"}},ou={},rl={};function Wu(a){var b=a.optionHandlers;function he(fe,Ce,Be,Xe){a.defaults[fe]=Ce,Be&&(b[fe]=Xe?function(it,at,vt){vt!=Ms&&Be(it,at,vt)}:Be)}a.defineOption=he,a.Init=Ms,he("value","",function(fe,Ce){return fe.setValue(Ce)},!0),he("mode",null,function(fe,Ce){fe.doc.modeOption=Ce,aa(fe)},!0),he("indentUnit",2,aa,!0),he("indentWithTabs",!1),he("smartIndent",!0),he("tabSize",4,function(fe){ga(fe),pa(fe),Eo(fe)},!0),he("lineSeparator",null,function(fe,Ce){if(fe.doc.lineSep=Ce,!!Ce){var Be=[],Xe=fe.doc.first;fe.doc.iter(function(at){for(var vt=0;;){var Bt=at.text.indexOf(Ce,vt);if(Bt==-1)break;vt=Bt+Ce.length,Be.push(Lt(Xe,Bt))}Xe++});for(var it=Be.length-1;it>=0;it--)Ls(fe.doc,Ce,Be[it],Lt(Be[it].line,Be[it].ch+Ce.length))}}),he("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(fe,Ce,Be){fe.state.specialChars=new RegExp(Ce.source+(Ce.test(" ")?"":"| "),"g"),Be!=Ms&&fe.refresh()}),he("specialCharPlaceholder",qr,function(fe){return fe.refresh()},!0),he("electricChars",!0),he("inputStyle",oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),he("spellcheck",!1,function(fe,Ce){return fe.getInputField().spellcheck=Ce},!0),he("autocorrect",!1,function(fe,Ce){return fe.getInputField().autocorrect=Ce},!0),he("autocapitalize",!1,function(fe,Ce){return fe.getInputField().autocapitalize=Ce},!0),he("rtlMoveVisually",!ve),he("wholeLineUpdateBefore",!0),he("theme","default",function(fe){iu(fe),or(fe)},!0),he("keyMap","default",function(fe,Ce,Be){var Xe=tl(Ce),it=Be!=Ms&&tl(Be);it&&it.detach&&it.detach(fe,Xe),Xe.attach&&Xe.attach(fe,it||null)}),he("extraKeys",null),he("configureMouse",null),he("lineWrapping",!1,Gu,!0),he("gutters",[],function(fe,Ce){fe.display.gutterSpecs=ri(Ce,fe.options.lineNumbers),or(fe)},!0),he("fixedGutter",!0,function(fe,Ce){fe.display.gutters.style.left=Ce?Ia(fe.display)+"px":"0",fe.refresh()},!0),he("coverGutterNextToScrollbar",!1,function(fe){return So(fe)},!0),he("scrollbarStyle","native",function(fe){va(fe),So(fe),fe.display.scrollbars.setScrollTop(fe.doc.scrollTop),fe.display.scrollbars.setScrollLeft(fe.doc.scrollLeft)},!0),he("lineNumbers",!1,function(fe,Ce){fe.display.gutterSpecs=ri(fe.options.gutters,Ce),or(fe)},!0),he("firstLineNumber",1,or,!0),he("lineNumberFormatter",function(fe){return fe},or,!0),he("showCursorWhenSelecting",!1,Oa,!0),he("resetSelectionOnContextMenu",!0),he("lineWiseCopyCut",!0),he("pasteLinesPerSelection",!0),he("selectionsMayTouch",!1),he("readOnly",!1,function(fe,Ce){Ce=="nocursor"&&(Ga(fe),fe.display.input.blur()),fe.display.input.readOnlyChanged(Ce)}),he("screenReaderLabel",null,function(fe,Ce){Ce=Ce===""?null:Ce,fe.display.input.screenReaderLabelChanged(Ce)}),he("disableInput",!1,function(fe,Ce){Ce||fe.display.input.reset()},!0),he("dragDrop",!0,Zu),he("allowDropFileTypes",null),he("cursorBlinkRate",530),he("cursorScrollMargin",0),he("cursorHeight",1,Oa,!0),he("singleCursorHeightPerLine",!0,Oa,!0),he("workTime",100),he("workDelay",100),he("flattenSpans",!0,ga,!0),he("addModeClass",!1,ga,!0),he("pollInterval",100),he("undoDepth",200,function(fe,Ce){return fe.doc.history.undoDepth=Ce}),he("historyEventDelay",1250),he("viewportMargin",10,function(fe){return fe.refresh()},!0),he("maxHighlightLength",1e4,ga,!0),he("moveInputWithCursor",!0,function(fe,Ce){Ce||fe.display.input.resetPosition()}),he("tabindex",null,function(fe,Ce){return fe.display.input.getField().tabIndex=Ce||""}),he("autofocus",null),he("direction","ltr",function(fe,Ce){return fe.doc.setDirection(Ce)},!0),he("phrases",null)}function Zu(a,b,he){var fe=he&&he!=Ms;if(!b!=!fe){var Ce=a.display.dragFunctions,Be=b?tt:Nt;Be(a.display.scroller,"dragstart",Ce.start),Be(a.display.scroller,"dragenter",Ce.enter),Be(a.display.scroller,"dragover",Ce.over),Be(a.display.scroller,"dragleave",Ce.leave),Be(a.display.scroller,"drop",Ce.drop)}}function Gu(a){a.options.lineWrapping?(ot(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Ae(a.display.wrapper,"CodeMirror-wrap"),dr(a)),fs(a),Eo(a),pa(a),setTimeout(function(){return So(a)},100)}function uo(a,b){var he=this;if(!(this instanceof uo))return new uo(a,b);this.options=b=b?ct(b):{},ct(ou,b,!1);var fe=b.value;typeof fe=="string"?fe=new Qo(fe,b.mode,null,b.lineSeparator,b.direction):b.mode&&(fe.modeOption=b.mode),this.doc=fe;var Ce=new uo.inputStyles[b.inputStyle](this),Be=this.display=new Bi(a,fe,Ce,b);Be.wrapper.CodeMirror=this,iu(this),b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),va(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Ue,keySeq:null,specialChars:null},b.autofocus&&!oe&&Be.input.focus(),se&&re<11&&setTimeout(function(){return he.display.input.reset(!0)},20),Ku(this),xu(),No(this),this.curOp.forceUpdate=!0,Ba(this,fe),b.autofocus&&!oe||this.hasFocus()?setTimeout(function(){he.hasFocus()&&!he.state.focused&&Ea(he)},20):Ga(this);for(var Xe in rl)rl.hasOwnProperty(Xe)&&rl[Xe](this,b[Xe],Ms);Wi(this),b.finishInit&&b.finishInit(this);for(var it=0;it<bl.length;++it)bl[it](this);fa(this),ue&&b.lineWrapping&&getComputedStyle(Be.lineDiv).textRendering=="optimizelegibility"&&(Be.lineDiv.style.textRendering="auto")}uo.defaults=ou,uo.optionHandlers=rl;function Ku(a){var b=a.display;tt(b.scroller,"mousedown",$n(a,eu)),se&&re<11?tt(b.scroller,"dblclick",$n(a,function(at){if(!ut(a,at)){var vt=da(a,at);if(!(!vt||_l(a,at)||Xi(a.display,at))){on(at);var Bt=a.findWordAt(vt);Va(a.doc,Bt.anchor,Bt.head)}}})):tt(b.scroller,"dblclick",function(at){return ut(a,at)||on(at)}),tt(b.scroller,"contextmenu",function(at){return ru(a,at)}),tt(b.input.getField(),"contextmenu",function(at){b.scroller.contains(at.target)||ru(a,at)});var he,fe={end:0};function Ce(){b.activeTouch&&(he=setTimeout(function(){return b.activeTouch=null},1e3),fe=b.activeTouch,fe.end=+new Date)}function Be(at){if(at.touches.length!=1)return!1;var vt=at.touches[0];return vt.radiusX<=1&&vt.radiusY<=1}function Xe(at,vt){if(vt.left==null)return!0;var Bt=vt.left-at.left,Ut=vt.top-at.top;return Bt*Bt+Ut*Ut>20*20}tt(b.scroller,"touchstart",function(at){if(!ut(a,at)&&!Be(at)&&!_l(a,at)){b.input.ensurePolled(),clearTimeout(he);var vt=+new Date;b.activeTouch={start:vt,moved:!1,prev:vt-fe.end<=300?fe:null},at.touches.length==1&&(b.activeTouch.left=at.touches[0].pageX,b.activeTouch.top=at.touches[0].pageY)}}),tt(b.scroller,"touchmove",function(){b.activeTouch&&(b.activeTouch.moved=!0)}),tt(b.scroller,"touchend",function(at){var vt=b.activeTouch;if(vt&&!Xi(b,at)&&vt.left!=null&&!vt.moved&&new Date-vt.start<300){var Bt=a.coordsChar(b.activeTouch,"page"),Ut;!vt.prev||Xe(vt,vt.prev)?Ut=new kr(Bt,Bt):!vt.prev.prev||Xe(vt,vt.prev.prev)?Ut=a.findWordAt(Bt):Ut=new kr(Lt(Bt.line,0),Kt(a.doc,Lt(Bt.line+1,0))),a.setSelection(Ut.anchor,Ut.head),a.focus(),on(at)}Ce()}),tt(b.scroller,"touchcancel",Ce),tt(b.scroller,"scroll",function(){b.scroller.clientHeight&&(ia(a,b.scroller.scrollTop),ma(a,b.scroller.scrollLeft,!0),Dt(a,"scroll",a))}),tt(b.scroller,"mousewheel",function(at){return Zi(a,at)}),tt(b.scroller,"DOMMouseScroll",function(at){return Zi(a,at)}),tt(b.wrapper,"scroll",function(){return b.wrapper.scrollTop=b.wrapper.scrollLeft=0}),b.dragFunctions={enter:function(at){ut(a,at)||Mn(at)},over:function(at){ut(a,at)||(wu(a,at),Mn(at))},start:function(at){return Su(a,at)},drop:$n(a,bu),leave:function(at){ut(a,at)||zl(a)}};var it=b.input.getField();tt(it,"keyup",function(at){return Ql.call(a,at)}),tt(it,"keydown",$n(a,Jl)),tt(it,"keypress",$n(a,$l)),tt(it,"focus",function(at){return Ea(a,at)}),tt(it,"blur",function(at){return Ga(a,at)})}var bl=[];uo.defineInitHook=function(a){return bl.push(a)};function Ys(a,b,he,fe){var Ce=a.doc,Be;he==null&&(he="add"),he=="smart"&&(Ce.mode.indent?Be=wr(a,b).state:he="prev");var Xe=a.options.tabSize,it=jt(Ce,b),at=We(it.text,null,Xe);it.stateAfter&&(it.stateAfter=null);var vt=it.text.match(/^\s*/)[0],Bt;if(!fe&&!/\S/.test(it.text))Bt=0,he="not";else if(he=="smart"&&(Bt=Ce.mode.indent(Be,it.text.slice(vt.length),it.text),Bt==$e||Bt>150)){if(!fe)return;he="prev"}he=="prev"?b>Ce.first?Bt=We(jt(Ce,b-1).text,null,Xe):Bt=0:he=="add"?Bt=at+a.options.indentUnit:he=="subtract"?Bt=at-a.options.indentUnit:typeof he=="number"&&(Bt=at+he),Bt=Math.max(0,Bt);var Ut="",an=0;if(a.options.indentWithTabs)for(var en=Math.floor(Bt/Xe);en;--en)an+=Xe,Ut+=" ";if(an<Bt&&(Ut+=bt(Bt-an)),Ut!=vt)return Ls(Ce,Ut,Lt(b,0),Lt(b,vt.length),"+input"),it.stateAfter=null,!0;for(var Dn=0;Dn<Ce.sel.ranges.length;Dn++){var Kn=Ce.sel.ranges[Dn];if(Kn.head.line==b&&Kn.head.ch<vt.length){var ir=Lt(b,vt.length);Ns(Ce,Dn,new kr(ir,ir));break}}}var Ta=null;function il(a){Ta=a}function Sl(a,b,he,fe,Ce){var Be=a.doc;a.display.shift=!1,fe||(fe=Be.sel);var Xe=+new Date-200,it=Ce=="paste"||a.state.pasteIncoming>Xe,at=sr(b),vt=null;if(it&&fe.ranges.length>1)if(Ta&&Ta.text.join(`
`)==b){if(fe.ranges.length%Ta.text.length==0){vt=[];for(var Bt=0;Bt<Ta.text.length;Bt++)vt.push(Be.splitLines(Ta.text[Bt]))}}else at.length==fe.ranges.length&&a.options.pasteLinesPerSelection&&(vt=lt(at,function(pr){return[pr]}));for(var Ut=a.curOp.updateInput,an=fe.ranges.length-1;an>=0;an--){var en=fe.ranges[an],Dn=en.from(),Kn=en.to();en.empty()&&(he&&he>0?Dn=Lt(Dn.line,Dn.ch-he):a.state.overwrite&&!it?Kn=Lt(Kn.line,Math.min(jt(Be,Kn.line).text.length,Kn.ch+St(at).length)):it&&Ta&&Ta.lineWise&&Ta.text.join(`
`)==at.join(`
`)&&(Dn=Kn=Lt(Dn.line,0)));var ir={from:Dn,to:Kn,text:vt?vt[an%vt.length]:at,origin:Ce||(it?"paste":a.state.cutIncoming>Xe?"cut":"+input")};ks(a.doc,ir),Ii(a,"inputRead",a,ir)}b&&!it&&su(a,b),La(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ut),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function au(a,b){var he=a.clipboardData&&a.clipboardData.getData("Text");if(he)return a.preventDefault(),!b.isReadOnly()&&!b.options.disableInput&&kt(b,function(){return Sl(b,he,0,null,"paste")}),!0}function su(a,b){if(!(!a.options.electricChars||!a.options.smartIndent))for(var he=a.doc.sel,fe=he.ranges.length-1;fe>=0;fe--){var Ce=he.ranges[fe];if(!(Ce.head.ch>100||fe&&he.ranges[fe-1].head.line==Ce.head.line)){var Be=a.getModeAt(Ce.head),Xe=!1;if(Be.electricChars){for(var it=0;it<Be.electricChars.length;it++)if(b.indexOf(Be.electricChars.charAt(it))>-1){Xe=Ys(a,Ce.head.line,"smart");break}}else Be.electricInput&&Be.electricInput.test(jt(a.doc,Ce.head.line).text.slice(0,Ce.head.ch))&&(Xe=Ys(a,Ce.head.line,"smart"));Xe&&Ii(a,"electricInput",a,Ce.head.line)}}}function lu(a){for(var b=[],he=[],fe=0;fe<a.doc.sel.ranges.length;fe++){var Ce=a.doc.sel.ranges[fe].head.line,Be={anchor:Lt(Ce,0),head:Lt(Ce+1,0)};he.push(Be),b.push(a.getRange(Be.anchor,Be.head))}return{text:b,ranges:he}}function uu(a,b,he,fe){a.setAttribute("autocorrect",he?"":"off"),a.setAttribute("autocapitalize",fe?"":"off"),a.setAttribute("spellcheck",!!b)}function cu(){var a=Ie("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),b=Ie("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ue?a.style.width="1000px":a.setAttribute("wrap","off"),ne&&(a.style.border="1px solid black"),uu(a),b}function Vu(a){var b=a.optionHandlers,he=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(fe,Ce){var Be=this.options,Xe=Be[fe];Be[fe]==Ce&&fe!="mode"||(Be[fe]=Ce,b.hasOwnProperty(fe)&&$n(this,b[fe])(this,Ce,Xe),Dt(this,"optionChange",this,fe))},getOption:function(fe){return this.options[fe]},getDoc:function(){return this.doc},addKeyMap:function(fe,Ce){this.state.keyMaps[Ce?"push":"unshift"](tl(fe))},removeKeyMap:function(fe){for(var Ce=this.state.keyMaps,Be=0;Be<Ce.length;++Be)if(Ce[Be]==fe||Ce[Be].name==fe)return Ce.splice(Be,1),!0},addOverlay:Nn(function(fe,Ce){var Be=fe.token?fe:a.getMode(this.options,fe);if(Be.startState)throw new Error("Overlays may not be stateful.");_t(this.state.overlays,{mode:Be,modeSpec:fe,opaque:Ce&&Ce.opaque,priority:Ce&&Ce.priority||0},function(Xe){return Xe.priority}),this.state.modeGen++,Eo(this)}),removeOverlay:Nn(function(fe){for(var Ce=this.state.overlays,Be=0;Be<Ce.length;++Be){var Xe=Ce[Be].modeSpec;if(Xe==fe||typeof fe=="string"&&Xe.name==fe){Ce.splice(Be,1),this.state.modeGen++,Eo(this);return}}}),indentLine:Nn(function(fe,Ce,Be){typeof Ce!="string"&&typeof Ce!="number"&&(Ce==null?Ce=this.options.smartIndent?"smart":"prev":Ce=Ce?"add":"subtract"),sn(this.doc,fe)&&Ys(this,fe,Ce,Be)}),indentSelection:Nn(function(fe){for(var Ce=this.doc.sel.ranges,Be=-1,Xe=0;Xe<Ce.length;Xe++){var it=Ce[Xe];if(it.empty())it.head.line>Be&&(Ys(this,it.head.line,fe,!0),Be=it.head.line,Xe==this.doc.sel.primIndex&&La(this));else{var at=it.from(),vt=it.to(),Bt=Math.max(Be,at.line);Be=Math.min(this.lastLine(),vt.line-(vt.ch?0:1))+1;for(var Ut=Bt;Ut<Be;++Ut)Ys(this,Ut,fe);var an=this.doc.sel.ranges;at.ch==0&&Ce.length==an.length&&an[Xe].from().ch>0&&Ns(this.doc,Xe,new kr(at,an[Xe].to()),Qe)}}}),getTokenAt:function(fe,Ce){return yr(this,fe,Ce)},getLineTokens:function(fe,Ce){return yr(this,Lt(fe),Ce,!0)},getTokenTypeAt:function(fe){fe=Kt(this.doc,fe);var Ce=Lr(this,jt(this.doc,fe.line)),Be=0,Xe=(Ce.length-1)/2,it=fe.ch,at;if(it==0)at=Ce[2];else for(;;){var vt=Be+Xe>>1;if((vt?Ce[vt*2-1]:0)>=it)Xe=vt;else if(Ce[vt*2+1]<it)Be=vt+1;else{at=Ce[vt*2+2];break}}var Bt=at?at.indexOf("overlay "):-1;return Bt<0?at:Bt==0?null:at.slice(0,Bt-1)},getModeAt:function(fe){var Ce=this.doc.mode;return Ce.innerMode?a.innerMode(Ce,this.getTokenAt(fe).state).mode:Ce},getHelper:function(fe,Ce){return this.getHelpers(fe,Ce)[0]},getHelpers:function(fe,Ce){var Be=[];if(!he.hasOwnProperty(Ce))return Be;var Xe=he[Ce],it=this.getModeAt(fe);if(typeof it[Ce]=="string")Xe[it[Ce]]&&Be.push(Xe[it[Ce]]);else if(it[Ce])for(var at=0;at<it[Ce].length;at++){var vt=Xe[it[Ce][at]];vt&&Be.push(vt)}else it.helperType&&Xe[it.helperType]?Be.push(Xe[it.helperType]):Xe[it.name]&&Be.push(Xe[it.name]);for(var Bt=0;Bt<Xe._global.length;Bt++){var Ut=Xe._global[Bt];Ut.pred(it,this)&&Ze(Be,Ut.val)==-1&&Be.push(Ut.val)}return Be},getStateAfter:function(fe,Ce){var Be=this.doc;return fe=Ln(Be,fe==null?Be.first+Be.size-1:fe),wr(this,fe+1,Ce).state},cursorCoords:function(fe,Ce){var Be,Xe=this.doc.sel.primary();return fe==null?Be=Xe.head:typeof fe=="object"?Be=Kt(this.doc,fe):Be=fe?Xe.from():Xe.to(),qi(this,Be,Ce||"page")},charCoords:function(fe,Ce){return To(this,Kt(this.doc,fe),Ce||"page")},coordsChar:function(fe,Ce){return fe=ua(this,fe,Ce||"page"),ro(this,fe.left,fe.top)},lineAtHeight:function(fe,Ce){return fe=ua(this,{top:fe,left:0},Ce||"page").top,Et(this.doc,fe+this.display.viewOffset)},heightAtLine:function(fe,Ce,Be){var Xe=!1,it;if(typeof fe=="number"){var at=this.doc.first+this.doc.size-1;fe<this.doc.first?fe=this.doc.first:fe>at&&(fe=at,Xe=!0),it=jt(this.doc,fe)}else it=fe;return wa(this,it,{top:0,left:0},Ce||"page",Be||Xe).top+(Xe?this.doc.height-qn(it):0)},defaultTextHeight:function(){return yo(this.display)},defaultCharWidth:function(){return Fo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fe,Ce,Be,Xe,it){var at=this.display;fe=qi(this,Kt(this.doc,fe));var vt=fe.bottom,Bt=fe.left;if(Ce.style.position="absolute",Ce.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Ce),at.sizer.appendChild(Ce),Xe=="over")vt=fe.top;else if(Xe=="above"||Xe=="near"){var Ut=Math.max(at.wrapper.clientHeight,this.doc.height),an=Math.max(at.sizer.clientWidth,at.lineSpace.clientWidth);(Xe=="above"||fe.bottom+Ce.offsetHeight>Ut)&&fe.top>Ce.offsetHeight?vt=fe.top-Ce.offsetHeight:fe.bottom+Ce.offsetHeight<=Ut&&(vt=fe.bottom),Bt+Ce.offsetWidth>an&&(Bt=an-Ce.offsetWidth)}Ce.style.top=vt+"px",Ce.style.left=Ce.style.right="",it=="right"?(Bt=at.sizer.clientWidth-Ce.offsetWidth,Ce.style.right="0px"):(it=="left"?Bt=0:it=="middle"&&(Bt=(at.sizer.clientWidth-Ce.offsetWidth)/2),Ce.style.left=Bt+"px"),Be&&ws(this,{left:Bt,top:vt,right:Bt+Ce.offsetWidth,bottom:vt+Ce.offsetHeight})},triggerOnKeyDown:Nn(Jl),triggerOnKeyPress:Nn($l),triggerOnKeyUp:Ql,triggerOnMouseDown:Nn(eu),execCommand:function(fe){if(Zs.hasOwnProperty(fe))return Zs[fe].call(null,this)},triggerElectric:Nn(function(fe){su(this,fe)}),findPosH:function(fe,Ce,Be,Xe){var it=1;Ce<0&&(it=-1,Ce=-Ce);for(var at=Kt(this.doc,fe),vt=0;vt<Ce&&(at=wl(this.doc,at,it,Be,Xe),!at.hitSide);++vt);return at},moveH:Nn(function(fe,Ce){var Be=this;this.extendSelectionsBy(function(Xe){return Be.display.shift||Be.doc.extend||Xe.empty()?wl(Be.doc,Xe.head,fe,Ce,Be.options.rtlMoveVisually):fe<0?Xe.from():Xe.to()},ht)}),deleteH:Nn(function(fe,Ce){var Be=this.doc.sel,Xe=this.doc;Be.somethingSelected()?Xe.replaceSelection("",null,"+delete"):Ds(this,function(it){var at=wl(Xe,it.head,fe,Ce,!1);return fe<0?{from:at,to:it.head}:{from:it.head,to:at}})}),findPosV:function(fe,Ce,Be,Xe){var it=1,at=Xe;Ce<0&&(it=-1,Ce=-Ce);for(var vt=Kt(this.doc,fe),Bt=0;Bt<Ce;++Bt){var Ut=qi(this,vt,"div");if(at==null?at=Ut.left:Ut.left=at,vt=du(this,Ut,it,Be),vt.hitSide)break}return vt},moveV:Nn(function(fe,Ce){var Be=this,Xe=this.doc,it=[],at=!this.display.shift&&!Xe.extend&&Xe.sel.somethingSelected();if(Xe.extendSelectionsBy(function(Bt){if(at)return fe<0?Bt.from():Bt.to();var Ut=qi(Be,Bt.head,"div");Bt.goalColumn!=null&&(Ut.left=Bt.goalColumn),it.push(Ut.left);var an=du(Be,Ut,fe,Ce);return Ce=="page"&&Bt==Xe.sel.primary()&&rs(Be,To(Be,an,"div").top-Ut.top),an},ht),it.length)for(var vt=0;vt<Xe.sel.ranges.length;vt++)Xe.sel.ranges[vt].goalColumn=it[vt]}),findWordAt:function(fe){var Ce=this.doc,Be=jt(Ce,fe.line).text,Xe=fe.ch,it=fe.ch;if(Be){var at=this.getHelper(fe,"wordChars");(fe.sticky=="before"||it==Be.length)&&Xe?--Xe:++it;for(var vt=Be.charAt(Xe),Bt=wt(vt,at)?function(Ut){return wt(Ut,at)}:/\s/.test(vt)?function(Ut){return/\s/.test(Ut)}:function(Ut){return!/\s/.test(Ut)&&!wt(Ut)};Xe>0&&Bt(Be.charAt(Xe-1));)--Xe;for(;it<Be.length&&Bt(Be.charAt(it));)++it}return new kr(Lt(fe.line,Xe),Lt(fe.line,it))},toggleOverwrite:function(fe){fe!=null&&fe==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ot(this.display.cursorDiv,"CodeMirror-overwrite"):Ae(this.display.cursorDiv,"CodeMirror-overwrite"),Dt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Ke()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Nn(function(fe,Ce){Ur(this,fe,Ce)}),getScrollInfo:function(){var fe=this.display.scroller;return{left:fe.scrollLeft,top:fe.scrollTop,height:fe.scrollHeight-Ui(this)-this.display.barHeight,width:fe.scrollWidth-Ui(this)-this.display.barWidth,clientHeight:Co(this),clientWidth:Ho(this)}},scrollIntoView:Nn(function(fe,Ce){fe==null?(fe={from:this.doc.sel.primary().head,to:null},Ce==null&&(Ce=this.options.cursorScrollMargin)):typeof fe=="number"?fe={from:Lt(fe,0),to:null}:fe.from==null&&(fe={from:fe,to:null}),fe.to||(fe.to=fe.from),fe.margin=Ce||0,fe.from.line!=null?xs(this,fe):vs(this,fe.from,fe.to,fe.margin)}),setSize:Nn(function(fe,Ce){var Be=this,Xe=function(at){return typeof at=="number"||/^\d+$/.test(String(at))?at+"px":at};fe!=null&&(this.display.wrapper.style.width=Xe(fe)),Ce!=null&&(this.display.wrapper.style.height=Xe(Ce)),this.options.lineWrapping&&Ra(this);var it=this.display.viewFrom;this.doc.iter(it,this.display.viewTo,function(at){if(at.widgets){for(var vt=0;vt<at.widgets.length;vt++)if(at.widgets[vt].noHScroll){ko(Be,it,"widget");break}}++it}),this.curOp.forceUpdate=!0,Dt(this,"refresh",this)}),operation:function(fe){return kt(this,fe)},startOperation:function(){return No(this)},endOperation:function(){return fa(this)},refresh:Nn(function(){var fe=this.display.cachedTextHeight;Eo(this),this.curOp.forceUpdate=!0,pa(this),Ur(this,this.doc.scrollLeft,this.doc.scrollTop),zi(this.display),(fe==null||Math.abs(fe-yo(this.display))>.5||this.options.lineWrapping)&&fs(this),Dt(this,"refresh",this)}),swapDoc:Nn(function(fe){var Ce=this.doc;return Ce.cm=null,this.state.selectingText&&this.state.selectingText(),Ba(this,fe),pa(this),this.display.input.reset(),Ur(this,fe.scrollLeft,fe.scrollTop),this.curOp.forceScroll=!0,Ii(this,"swapDoc",this,Ce),Ce}),phrase:function(fe){var Ce=this.options.phrases;return Ce&&Object.prototype.hasOwnProperty.call(Ce,fe)?Ce[fe]:fe},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}},Wt(a),a.registerHelper=function(fe,Ce,Be){he.hasOwnProperty(fe)||(he[fe]=a[fe]={_global:[]}),he[fe][Ce]=Be},a.registerGlobalHelper=function(fe,Ce,Be,Xe){a.registerHelper(fe,Ce,Xe),he[fe]._global.push({pred:Be,val:Xe})}}function wl(a,b,he,fe,Ce){var Be=b,Xe=he,it=jt(a,b.line),at=Ce&&a.direction=="rtl"?-he:he;function vt(){var Sr=b.line+at;return Sr<a.first||Sr>=a.first+a.size?!1:(b=new Lt(Sr,b.ch,b.sticky),it=jt(a,Sr))}function Bt(Sr){var mr;if(fe=="codepoint"){var Tr=it.text.charCodeAt(b.ch+(fe>0?0:-1));isNaN(Tr)?mr=null:mr=new Lt(b.line,Math.max(0,Math.min(it.text.length,b.ch+he*(Tr>=55296&&Tr<56320?2:1))),-he)}else Ce?mr=Au(a.cm,it,b,he):mr=ml(it,b,he);if(mr==null)if(!Sr&&vt())b=vl(Ce,a.cm,it,b.line,at);else return!1;else b=mr;return!0}if(fe=="char"||fe=="codepoint")Bt();else if(fe=="column")Bt(!0);else if(fe=="word"||fe=="group")for(var Ut=null,an=fe=="group",en=a.cm&&a.cm.getHelper(b,"wordChars"),Dn=!0;!(he<0&&!Bt(!Dn));Dn=!1){var Kn=it.text.charAt(b.ch)||`
`,ir=wt(Kn,en)?"w":an&&Kn==`
`?"n":!an||/\s/.test(Kn)?null:"p";if(an&&!Dn&&!ir&&(ir="s"),Ut&&Ut!=ir){he<0&&(he=1,Bt(),b.sticky="after");break}if(ir&&(Ut=ir),he>0&&!Bt(!Dn))break}var pr=Qs(a,b,Be,Xe,!0);return nn(Be,pr)&&(pr.hitSide=!0),pr}function du(a,b,he,fe){var Ce=a.doc,Be=b.left,Xe;if(fe=="page"){var it=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),at=Math.max(it-.5*yo(a.display),3);Xe=(he>0?b.bottom:b.top)+he*at}else fe=="line"&&(Xe=he>0?b.bottom+3:b.top-3);for(var vt;vt=ro(a,Be,Xe),!!vt.outside;){if(he<0?Xe<=0:Xe>=Ce.height){vt.hitSide=!0;break}Xe+=he*5}return vt}var Vi=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ue,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vi.prototype.init=function(a){var b=this,he=this,fe=he.cm,Ce=he.div=a.lineDiv;uu(Ce,fe.options.spellcheck,fe.options.autocorrect,fe.options.autocapitalize);function Be(it){for(var at=it.target;at;at=at.parentNode){if(at==Ce)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(at.className))break}return!1}tt(Ce,"paste",function(it){!Be(it)||ut(fe,it)||au(it,fe)||re<=11&&setTimeout($n(fe,function(){return b.updateFromDOM()}),20)}),tt(Ce,"compositionstart",function(it){b.composing={data:it.data,done:!1}}),tt(Ce,"compositionupdate",function(it){b.composing||(b.composing={data:it.data,done:!1})}),tt(Ce,"compositionend",function(it){b.composing&&(it.data!=b.composing.data&&b.readFromDOMSoon(),b.composing.done=!0)}),tt(Ce,"touchstart",function(){return he.forceCompositionEnd()}),tt(Ce,"input",function(){b.composing||b.readFromDOMSoon()});function Xe(it){if(!(!Be(it)||ut(fe,it))){if(fe.somethingSelected())il({lineWise:!1,text:fe.getSelections()}),it.type=="cut"&&fe.replaceSelection("",null,"cut");else if(fe.options.lineWiseCopyCut){var at=lu(fe);il({lineWise:!0,text:at.text}),it.type=="cut"&&fe.operation(function(){fe.setSelections(at.ranges,0,Qe),fe.replaceSelection("",null,"cut")})}else return;if(it.clipboardData){it.clipboardData.clearData();var vt=Ta.text.join(`
`);if(it.clipboardData.setData("Text",vt),it.clipboardData.getData("Text")==vt){it.preventDefault();return}}var Bt=cu(),Ut=Bt.firstChild;fe.display.lineSpace.insertBefore(Bt,fe.display.lineSpace.firstChild),Ut.value=Ta.text.join(`
`);var an=document.activeElement;rt(Ut),setTimeout(function(){fe.display.lineSpace.removeChild(Bt),an.focus(),an==Ce&&he.showPrimarySelection()},50)}}tt(Ce,"copy",Xe),tt(Ce,"cut",Xe)},Vi.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Vi.prototype.prepareSelection=function(){var a=bs(this.cm,!1);return a.focus=document.activeElement==this.div,a},Vi.prototype.showSelection=function(a,b){!a||!this.cm.display.view.length||((a.focus||b)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Vi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vi.prototype.showPrimarySelection=function(){var a=this.getSelection(),b=this.cm,he=b.doc.sel.primary(),fe=he.from(),Ce=he.to();if(b.display.viewTo==b.display.viewFrom||fe.line>=b.display.viewTo||Ce.line<b.display.viewFrom){a.removeAllRanges();return}var Be=ol(b,a.anchorNode,a.anchorOffset),Xe=ol(b,a.focusNode,a.focusOffset);if(!(Be&&!Be.bad&&Xe&&!Xe.bad&&zt(xn(Be,Xe),fe)==0&&zt(_n(Be,Xe),Ce)==0)){var it=b.display.view,at=fe.line>=b.display.viewFrom&&fu(b,fe)||{node:it[0].measure.map[2],offset:0},vt=Ce.line<b.display.viewTo&&fu(b,Ce);if(!vt){var Bt=it[it.length-1].measure,Ut=Bt.maps?Bt.maps[Bt.maps.length-1]:Bt.map;vt={node:Ut[Ut.length-1],offset:Ut[Ut.length-2]-Ut[Ut.length-3]}}if(!at||!vt){a.removeAllRanges();return}var an=a.rangeCount&&a.getRangeAt(0),en;try{en=Pe(at.node,at.offset,vt.offset,vt.node)}catch(Dn){}en&&(!de&&b.state.focused?(a.collapse(at.node,at.offset),en.collapsed||(a.removeAllRanges(),a.addRange(en))):(a.removeAllRanges(),a.addRange(en)),an&&a.anchorNode==null?a.addRange(an):de&&this.startGracePeriod()),this.rememberSelection()}},Vi.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Vi.prototype.showMultipleSelections=function(a){ke(this.cm.display.cursorDiv,a.cursors),ke(this.cm.display.selectionDiv,a.selection)},Vi.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Vi.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return qe(this.div,b)},Vi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vi.prototype.blur=function(){this.div.blur()},Vi.prototype.getField=function(){return this.div},Vi.prototype.supportsTouch=function(){return!0},Vi.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():kt(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function b(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,b))}this.polling.set(this.cm.options.pollInterval,b)},Vi.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Vi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),b=this.cm;if(ae&&te&&this.cm.display.gutterSpecs.length&&Yu(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var he=ol(b,a.anchorNode,a.anchorOffset),fe=ol(b,a.focusNode,a.focusOffset);he&&fe&&kt(b,function(){Uo(b.doc,mi(he,fe),Qe),(he.bad||fe.bad)&&(b.curOp.selectionChanged=!0)})}}},Vi.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,b=a.display,he=a.doc.sel.primary(),fe=he.from(),Ce=he.to();if(fe.ch==0&&fe.line>a.firstLine()&&(fe=Lt(fe.line-1,jt(a.doc,fe.line-1).length)),Ce.ch==jt(a.doc,Ce.line).text.length&&Ce.line<a.lastLine()&&(Ce=Lt(Ce.line+1,0)),fe.line<b.viewFrom||Ce.line>b.viewTo-1)return!1;var Be,Xe,it;fe.line==b.viewFrom||(Be=_o(a,fe.line))==0?(Xe=Rt(b.view[0].line),it=b.view[0].node):(Xe=Rt(b.view[Be].line),it=b.view[Be-1].node.nextSibling);var at=_o(a,Ce.line),vt,Bt;if(at==b.view.length-1?(vt=b.viewTo-1,Bt=b.lineDiv.lastChild):(vt=Rt(b.view[at+1].line)-1,Bt=b.view[at+1].node.previousSibling),!it)return!1;for(var Ut=a.doc.splitLines(Xu(a,it,Bt,Xe,vt)),an=qt(a.doc,Lt(Xe,0),Lt(vt,jt(a.doc,vt).text.length));Ut.length>1&&an.length>1;)if(St(Ut)==St(an))Ut.pop(),an.pop(),vt--;else if(Ut[0]==an[0])Ut.shift(),an.shift(),Xe++;else break;for(var en=0,Dn=0,Kn=Ut[0],ir=an[0],pr=Math.min(Kn.length,ir.length);en<pr&&Kn.charCodeAt(en)==ir.charCodeAt(en);)++en;for(var Sr=St(Ut),mr=St(an),Tr=Math.min(Sr.length-(Ut.length==1?en:0),mr.length-(an.length==1?en:0));Dn<Tr&&Sr.charCodeAt(Sr.length-Dn-1)==mr.charCodeAt(mr.length-Dn-1);)++Dn;if(Ut.length==1&&an.length==1&&Xe==fe.line)for(;en&&en>fe.ch&&Sr.charCodeAt(Sr.length-Dn-1)==mr.charCodeAt(mr.length-Dn-1);)en--,Dn++;Ut[Ut.length-1]=Sr.slice(0,Sr.length-Dn).replace(/^\u200b+/,""),Ut[0]=Ut[0].slice(en).replace(/\u200b+$/,"");var ei=Lt(Xe,en),Vr=Lt(vt,an.length?St(an).length-Dn:0);if(Ut.length>1||Ut[0]||zt(ei,Vr))return Ls(a.doc,Ut,ei,Vr,"+input"),!0},Vi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vi.prototype.reset=function(){this.forceCompositionEnd()},Vi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vi.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))},Vi.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&kt(this.cm,function(){return Eo(a.cm)})},Vi.prototype.setUneditable=function(a){a.contentEditable="false"},Vi.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||$n(this.cm,Sl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Vi.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Vi.prototype.onContextMenu=function(){},Vi.prototype.resetPosition=function(){},Vi.prototype.needsContentAttribute=!0;function fu(a,b){var he=Yo(a,b.line);if(!he||he.hidden)return null;var fe=jt(a.doc,b.line),Ce=Ki(he,fe,b.line),Be=Ye(fe,a.doc.direction),Xe="left";if(Be){var it=_e(Be,b.ch);Xe=it%2?"right":"left"}var at=qa(Ce.map,b.ch,Xe);return at.offset=at.collapse=="right"?at.end:at.start,at}function Yu(a){for(var b=a;b;b=b.parentNode)if(/CodeMirror-gutter-wrapper/.test(b.className))return!0;return!1}function Rs(a,b){return b&&(a.bad=!0),a}function Xu(a,b,he,fe,Ce){var Be="",Xe=!1,it=a.doc.lineSeparator(),at=!1;function vt(en){return function(Dn){return Dn.id==en}}function Bt(){Xe&&(Be+=it,at&&(Be+=it),Xe=at=!1)}function Ut(en){en&&(Bt(),Be+=en)}function an(en){if(en.nodeType==1){var Dn=en.getAttribute("cm-text");if(Dn){Ut(Dn);return}var Kn=en.getAttribute("cm-marker"),ir;if(Kn){var pr=a.findMarks(Lt(fe,0),Lt(Ce+1,0),vt(+Kn));pr.length&&(ir=pr[0].find(0))&&Ut(qt(a.doc,ir.from,ir.to).join(it));return}if(en.getAttribute("contenteditable")=="false")return;var Sr=/^(pre|div|p|li|table|br)$/i.test(en.nodeName);if(!/^br$/i.test(en.nodeName)&&en.textContent.length==0)return;Sr&&Bt();for(var mr=0;mr<en.childNodes.length;mr++)an(en.childNodes[mr]);/^(pre|p)$/i.test(en.nodeName)&&(at=!0),Sr&&(Xe=!0)}else en.nodeType==3&&Ut(en.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;an(b),b!=he;)b=b.nextSibling,at=!1;return Be}function ol(a,b,he){var fe;if(b==a.display.lineDiv){if(fe=a.display.lineDiv.childNodes[he],!fe)return Rs(a.clipPos(Lt(a.display.viewTo-1)),!0);b=null,he=0}else for(fe=b;;fe=fe.parentNode){if(!fe||fe==a.display.lineDiv)return null;if(fe.parentNode&&fe.parentNode==a.display.lineDiv)break}for(var Ce=0;Ce<a.display.view.length;Ce++){var Be=a.display.view[Ce];if(Be.node==fe)return qu(Be,b,he)}}function qu(a,b,he){var fe=a.text.firstChild,Ce=!1;if(!b||!qe(fe,b))return Rs(Lt(Rt(a.line),0),!0);if(b==fe&&(Ce=!0,b=fe.childNodes[he],he=0,!b)){var Be=a.rest?St(a.rest):a.line;return Rs(Lt(Rt(Be),Be.text.length),Ce)}var Xe=b.nodeType==3?b:null,it=b;for(!Xe&&b.childNodes.length==1&&b.firstChild.nodeType==3&&(Xe=b.firstChild,he&&(he=Xe.nodeValue.length));it.parentNode!=fe;)it=it.parentNode;var at=a.measure,vt=at.maps;function Bt(ir,pr,Sr){for(var mr=-1;mr<(vt?vt.length:0);mr++)for(var Tr=mr<0?at.map:vt[mr],ei=0;ei<Tr.length;ei+=3){var Vr=Tr[ei+2];if(Vr==ir||Vr==pr){var ki=Rt(mr<0?a.line:a.rest[mr]),eo=Tr[ei]+Sr;return(Sr<0||Vr!=ir)&&(eo=Tr[ei+(Sr?1:0)]),Lt(ki,eo)}}}var Ut=Bt(Xe,it,he);if(Ut)return Rs(Ut,Ce);for(var an=it.nextSibling,en=Xe?Xe.nodeValue.length-he:0;an;an=an.nextSibling){if(Ut=Bt(an,an.firstChild,0),Ut)return Rs(Lt(Ut.line,Ut.ch-en),Ce);en+=an.textContent.length}for(var Dn=it.previousSibling,Kn=he;Dn;Dn=Dn.previousSibling){if(Ut=Bt(Dn,Dn.firstChild,-1),Ut)return Rs(Lt(Ut.line,Ut.ch+Kn),Ce);Kn+=Dn.textContent.length}}var bo=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new Ue,this.hasSelection=!1,this.composing=null};bo.prototype.init=function(a){var b=this,he=this,fe=this.cm;this.createField(a);var Ce=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),ne&&(Ce.style.width="0px"),tt(Ce,"input",function(){se&&re>=9&&b.hasSelection&&(b.hasSelection=null),he.poll()}),tt(Ce,"paste",function(Xe){ut(fe,Xe)||au(Xe,fe)||(fe.state.pasteIncoming=+new Date,he.fastPoll())});function Be(Xe){if(!ut(fe,Xe)){if(fe.somethingSelected())il({lineWise:!1,text:fe.getSelections()});else if(fe.options.lineWiseCopyCut){var it=lu(fe);il({lineWise:!0,text:it.text}),Xe.type=="cut"?fe.setSelections(it.ranges,null,Qe):(he.prevInput="",Ce.value=it.text.join(`
`),rt(Ce))}else return;Xe.type=="cut"&&(fe.state.cutIncoming=+new Date)}}tt(Ce,"cut",Be),tt(Ce,"copy",Be),tt(a.scroller,"paste",function(Xe){if(!(Xi(a,Xe)||ut(fe,Xe))){if(!Ce.dispatchEvent){fe.state.pasteIncoming=+new Date,he.focus();return}var it=new Event("paste");it.clipboardData=Xe.clipboardData,Ce.dispatchEvent(it)}}),tt(a.lineSpace,"selectstart",function(Xe){Xi(a,Xe)||on(Xe)}),tt(Ce,"compositionstart",function(){var Xe=fe.getCursor("from");he.composing&&he.composing.range.clear(),he.composing={start:Xe,range:fe.markText(Xe,fe.getCursor("to"),{className:"CodeMirror-composing"})}}),tt(Ce,"compositionend",function(){he.composing&&(he.poll(),he.composing.range.clear(),he.composing=null)})},bo.prototype.createField=function(a){this.wrapper=cu(),this.textarea=this.wrapper.firstChild},bo.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},bo.prototype.prepareSelection=function(){var a=this.cm,b=a.display,he=a.doc,fe=bs(a);if(a.options.moveInputWithCursor){var Ce=qi(a,he.sel.primary().head,"div"),Be=b.wrapper.getBoundingClientRect(),Xe=b.lineDiv.getBoundingClientRect();fe.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,Ce.top+Xe.top-Be.top)),fe.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,Ce.left+Xe.left-Be.left))}return fe},bo.prototype.showSelection=function(a){var b=this.cm,he=b.display;ke(he.cursorDiv,a.cursors),ke(he.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},bo.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var b=this.cm;if(b.somethingSelected()){this.prevInput="";var he=b.getSelection();this.textarea.value=he,b.state.focused&&rt(this.textarea),se&&re>=9&&(this.hasSelection=he)}else a||(this.prevInput=this.textarea.value="",se&&re>=9&&(this.hasSelection=null))}},bo.prototype.getField=function(){return this.textarea},bo.prototype.supportsTouch=function(){return!1},bo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!oe||Ke()!=this.textarea))try{this.textarea.focus()}catch(a){}},bo.prototype.blur=function(){this.textarea.blur()},bo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},bo.prototype.receivedFocus=function(){this.slowPoll()},bo.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},bo.prototype.fastPoll=function(){var a=!1,b=this;b.pollingFast=!0;function he(){var fe=b.poll();!fe&&!a?(a=!0,b.polling.set(60,he)):(b.pollingFast=!1,b.slowPoll())}b.polling.set(20,he)},bo.prototype.poll=function(){var a=this,b=this.cm,he=this.textarea,fe=this.prevInput;if(this.contextMenuPending||!b.state.focused||Hn(he)&&!fe&&!this.composing||b.isReadOnly()||b.options.disableInput||b.state.keySeq)return!1;var Ce=he.value;if(Ce==fe&&!b.somethingSelected())return!1;if(se&&re>=9&&this.hasSelection===Ce||ge&&/[\uf700-\uf7ff]/.test(Ce))return b.display.input.reset(),!1;if(b.doc.sel==b.display.selForContextMenu){var Be=Ce.charCodeAt(0);if(Be==8203&&!fe&&(fe="\u200B"),Be==8666)return this.reset(),this.cm.execCommand("undo")}for(var Xe=0,it=Math.min(fe.length,Ce.length);Xe<it&&fe.charCodeAt(Xe)==Ce.charCodeAt(Xe);)++Xe;return kt(b,function(){Sl(b,Ce.slice(Xe),fe.length-Xe,null,a.composing?"*compose":null),Ce.length>1e3||Ce.indexOf(`
`)>-1?he.value=a.prevInput="":a.prevInput=Ce,a.composing&&(a.composing.range.clear(),a.composing.range=b.markText(a.composing.start,b.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},bo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},bo.prototype.onKeyPress=function(){se&&re>=9&&(this.hasSelection=null),this.fastPoll()},bo.prototype.onContextMenu=function(a){var b=this,he=b.cm,fe=he.display,Ce=b.textarea;b.contextMenuPending&&b.contextMenuPending();var Be=da(he,a),Xe=fe.scroller.scrollTop;if(!Be||E)return;var it=he.options.resetSelectionOnContextMenu;it&&he.doc.sel.contains(Be)==-1&&$n(he,Uo)(he.doc,mi(Be),Qe);var at=Ce.style.cssText,vt=b.wrapper.style.cssText,Bt=b.wrapper.offsetParent.getBoundingClientRect();b.wrapper.style.cssText="position: static",Ce.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-Bt.top-5)+"px; left: "+(a.clientX-Bt.left-5)+`px;
z-index: 1000; background: `+(se?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ut;ue&&(Ut=window.scrollY),fe.input.focus(),ue&&window.scrollTo(null,Ut),fe.input.reset(),he.somethingSelected()||(Ce.value=b.prevInput=" "),b.contextMenuPending=en,fe.selForContextMenu=he.doc.sel,clearTimeout(fe.detectingSelectAll);function an(){if(Ce.selectionStart!=null){var Kn=he.somethingSelected(),ir="\u200B"+(Kn?Ce.value:"");Ce.value="\u21DA",Ce.value=ir,b.prevInput=Kn?"":"\u200B",Ce.selectionStart=1,Ce.selectionEnd=ir.length,fe.selForContextMenu=he.doc.sel}}function en(){if(b.contextMenuPending==en&&(b.contextMenuPending=!1,b.wrapper.style.cssText=vt,Ce.style.cssText=at,se&&re<9&&fe.scrollbars.setScrollTop(fe.scroller.scrollTop=Xe),Ce.selectionStart!=null)){(!se||se&&re<9)&&an();var Kn=0,ir=function(){fe.selForContextMenu==he.doc.sel&&Ce.selectionStart==0&&Ce.selectionEnd>0&&b.prevInput=="\u200B"?$n(he,Dl)(he):Kn++<10?fe.detectingSelectAll=setTimeout(ir,500):(fe.selForContextMenu=null,fe.input.reset())};fe.detectingSelectAll=setTimeout(ir,200)}}if(se&&re>=9&&an(),pe){Mn(a);var Dn=function(){Nt(window,"mouseup",Dn),setTimeout(en,20)};tt(window,"mouseup",Dn)}else setTimeout(en,50)},bo.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},bo.prototype.setUneditable=function(){},bo.prototype.needsContentAttribute=!1;function Ju(a,b){if(b=b?ct(b):{},b.value=a.value,!b.tabindex&&a.tabIndex&&(b.tabindex=a.tabIndex),!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder),b.autofocus==null){var he=Ke();b.autofocus=he==a||a.getAttribute("autofocus")!=null&&he==document.body}function fe(){a.value=it.getValue()}var Ce;if(a.form&&(tt(a.form,"submit",fe),!b.leaveSubmitMethodAlone)){var Be=a.form;Ce=Be.submit;try{var Xe=Be.submit=function(){fe(),Be.submit=Ce,Be.submit(),Be.submit=Xe}}catch(at){}}b.finishInit=function(at){at.save=fe,at.getTextArea=function(){return a},at.toTextArea=function(){at.toTextArea=isNaN,fe(),a.parentNode.removeChild(at.getWrapperElement()),a.style.display="",a.form&&(Nt(a.form,"submit",fe),!b.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=Ce))}},a.style.display="none";var it=uo(function(at){return a.parentNode.insertBefore(at,a.nextSibling)},b);return it}function Qu(a){a.off=Nt,a.on=tt,a.wheelEventPixels=br,a.Doc=Qo,a.splitLines=sr,a.countColumn=We,a.findColumn=Pt,a.isWordChar=ft,a.Pass=$e,a.signal=Dt,a.Line=Pr,a.changeEnd=Or,a.scrollbarModel=Pa,a.Pos=Lt,a.cmpPos=zt,a.modes=fr,a.mimeModes=mn,a.resolveMode=Qt,a.getMode=Me,a.modeExtensions=ze,a.extendMode=Ve,a.copyState=st,a.startState=Ft,a.innerMode=yt,a.commands=Zs,a.keyMap=Ya,a.keyName=Kl,a.isModifierKey=Zl,a.lookupKey=Ts,a.normalizeKeyMap=Lu,a.StringStream=Mt,a.SharedTextMarker=zs,a.TextMarker=ss,a.LineWidget=Us,a.e_preventDefault=on,a.e_stopPropagation=bn,a.e_stop=Mn,a.addClass=ot,a.contains=qe,a.rmClass=Ae,a.keyNames=ls}Wu(uo),Vu(uo);var $u="iter insert remove copy getEditor constructor".split(" ");for(var al in Qo.prototype)Qo.prototype.hasOwnProperty(al)&&Ze($u,al)<0&&(uo.prototype[al]=function(a){return function(){return a.apply(this.doc,arguments)}}(Qo.prototype[al]));return Wt(Qo),uo.inputStyles={textarea:bo,contenteditable:Vi},uo.defineMode=function(a){!uo.defaults.mode&&a!="null"&&(uo.defaults.mode=a),En.apply(this,arguments)},uo.defineMIME=rr,uo.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),uo.defineMIME("text/plain","null"),uo.defineExtension=function(a,b){uo.prototype[a]=b},uo.defineDocExtension=function(a,b){Qo.prototype[a]=b},uo.fromTextArea=Ju,Qu(uo),uo.version="5.58.2",uo})},25419:function(Jt,Ot,we){(function(de){de(we(89780),we(15525),we(98101))})(function(de){"use strict";de.defineMode("markdown",function(ie,Ee){var ce=de.getMode(ie,"text/html"),se=ce.name=="null";function re(We){if(de.findModeByName){var Ue=de.findModeByName(We);Ue&&(We=Ue.mime||Ue.mimes[0])}var Ze=de.getMode(ie,We);return Ze.name=="null"?null:Ze}Ee.highlightFormatting===void 0&&(Ee.highlightFormatting=!1),Ee.maxBlockquoteDepth===void 0&&(Ee.maxBlockquoteDepth=0),Ee.taskLists===void 0&&(Ee.taskLists=!1),Ee.strikethrough===void 0&&(Ee.strikethrough=!1),Ee.emoji===void 0&&(Ee.emoji=!1),Ee.fencedCodeBlockHighlighting===void 0&&(Ee.fencedCodeBlockHighlighting=!0),Ee.fencedCodeBlockDefaultMode===void 0&&(Ee.fencedCodeBlockDefaultMode="text/plain"),Ee.xml===void 0&&(Ee.xml=!0),Ee.tokenTypeOverrides===void 0&&(Ee.tokenTypeOverrides={});var ue={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 ee in ue)ue.hasOwnProperty(ee)&&Ee.tokenTypeOverrides[ee]&&(ue[ee]=Ee.tokenTypeOverrides[ee]);var te=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,y=/^\[(x| )\](?=\s)/i,z=Ee.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,x=/^ {0,3}(?:\={1,}|-{2,})\s*$/,ne=/^[^#!\[\]*_\\<>` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,oe=/^\s*\[[^\]]+?\]:.*$/,ge=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Se=" ";function ve(We,Ue,Ze){return Ue.f=Ue.inline=Ze,Ze(We,Ue)}function be(We,Ue,Ze){return Ue.f=Ue.block=Ze,Ze(We,Ue)}function xe(We){return!We||!/\S/.test(We.string)}function pe(We){if(We.linkTitle=!1,We.linkHref=!1,We.linkText=!1,We.em=!1,We.strong=!1,We.strikethrough=!1,We.quote=0,We.indentedCode=!1,We.f==Ae){var Ue=se;if(!Ue){var Ze=de.innerMode(ce,We.htmlState);Ue=Ze.mode.name=="xml"&&Ze.state.tagStart===null&&!Ze.state.context&&Ze.state.tokenize.isInText}Ue&&(We.f=Fe,We.block=me,We.htmlState=null)}return We.trailingSpace=0,We.trailingSpaceNewLine=!1,We.prevLine=We.thisLine,We.thisLine={stream:null},null}function me(We,Ue){var Ze=We.column()===Ue.indentation,Je=xe(Ue.prevLine.stream),$e=Ue.indentedCode,Qe=Ue.prevLine.hr,pt=Ue.list!==!1,ht=(Ue.listStack[Ue.listStack.length-1]||0)+3;Ue.indentedCode=!1;var Pt=Ue.indentation;if(Ue.indentationDiff===null&&(Ue.indentationDiff=Ue.indentation,pt)){for(Ue.list=null;Pt<Ue.listStack[Ue.listStack.length-1];)Ue.listStack.pop(),Ue.listStack.length?Ue.indentation=Ue.listStack[Ue.listStack.length-1]:Ue.list=!1;Ue.list!==!1&&(Ue.indentationDiff=Pt-Ue.listStack[Ue.listStack.length-1])}var gt=!Je&&!Qe&&!Ue.prevLine.header&&(!pt||!$e)&&!Ue.prevLine.fencedCodeEnd,bt=(Ue.list===!1||Qe||Je)&&Ue.indentation<=ht&&We.match(te),St=null;if(Ue.indentationDiff>=4&&($e||Ue.prevLine.fencedCodeEnd||Ue.prevLine.header||Je))return We.skipToEnd(),Ue.indentedCode=!0,ue.code;if(We.eatSpace())return null;if(Ze&&Ue.indentation<=ht&&(St=We.match(z))&&St[1].length<=6)return Ue.quote=0,Ue.header=St[1].length,Ue.thisLine.header=!0,Ee.highlightFormatting&&(Ue.formatting="header"),Ue.f=Ue.inline,ke(Ue);if(Ue.indentation<=ht&&We.eat(">"))return Ue.quote=Ze?1:Ue.quote+1,Ee.highlightFormatting&&(Ue.formatting="quote"),We.eatSpace(),ke(Ue);if(!bt&&!Ue.setext&&Ze&&Ue.indentation<=ht&&(St=We.match(E))){var lt=St[1]?"ol":"ul";return Ue.indentation=Pt+We.current().length,Ue.list=!0,Ue.quote=0,Ue.listStack.push(Ue.indentation),Ue.em=!1,Ue.strong=!1,Ue.code=!1,Ue.strikethrough=!1,Ee.taskLists&&We.match(y,!1)&&(Ue.taskList=!0),Ue.f=Ue.inline,Ee.highlightFormatting&&(Ue.formatting=["list","list-"+lt]),ke(Ue)}else{if(Ze&&Ue.indentation<=ht&&(St=We.match(ae,!0)))return Ue.quote=0,Ue.fencedEndRE=new RegExp(St[1]+"+ *$"),Ue.localMode=Ee.fencedCodeBlockHighlighting&&re(St[2]||Ee.fencedCodeBlockDefaultMode),Ue.localMode&&(Ue.localState=de.startState(Ue.localMode)),Ue.f=Ue.block=De,Ee.highlightFormatting&&(Ue.formatting="code-block"),Ue.code=-1,ke(Ue);if(Ue.setext||(!gt||!pt)&&!Ue.quote&&Ue.list===!1&&!Ue.code&&!bt&&!oe.test(We.string)&&(St=We.lookAhead(1))&&(St=St.match(x)))return Ue.setext?(Ue.header=Ue.setext,Ue.setext=0,We.skipToEnd(),Ee.highlightFormatting&&(Ue.formatting="header")):(Ue.header=St[0].charAt(0)=="="?1:2,Ue.setext=Ue.header),Ue.thisLine.header=!0,Ue.f=Ue.inline,ke(Ue);if(bt)return We.skipToEnd(),Ue.hr=!0,Ue.thisLine.hr=!0,ue.hr;if(We.peek()==="[")return ve(We,Ue,He)}return ve(We,Ue,Ue.inline)}function Ae(We,Ue){var Ze=ce.token(We,Ue.htmlState);if(!se){var Je=de.innerMode(ce,Ue.htmlState);(Je.mode.name=="xml"&&Je.state.tagStart===null&&!Je.state.context&&Je.state.tokenize.isInText||Ue.md_inside&&We.current().indexOf(">")>-1)&&(Ue.f=Fe,Ue.block=me,Ue.htmlState=null)}return Ze}function De(We,Ue){var Ze=Ue.listStack[Ue.listStack.length-1]||0,Je=Ue.indentation<Ze,$e=Ze+3;if(Ue.fencedEndRE&&Ue.indentation<=$e&&(Je||We.match(Ue.fencedEndRE))){Ee.highlightFormatting&&(Ue.formatting="code-block");var Qe;return Je||(Qe=ke(Ue)),Ue.localMode=Ue.localState=null,Ue.block=me,Ue.f=Fe,Ue.fencedEndRE=null,Ue.code=0,Ue.thisLine.fencedCodeEnd=!0,Je?be(We,Ue,Ue.block):Qe}else return Ue.localMode?Ue.localMode.token(We,Ue.localState):(We.skipToEnd(),ue.code)}function ke(We){var Ue=[];if(We.formatting){Ue.push(ue.formatting),typeof We.formatting=="string"&&(We.formatting=[We.formatting]);for(var Ze=0;Ze<We.formatting.length;Ze++)Ue.push(ue.formatting+"-"+We.formatting[Ze]),We.formatting[Ze]==="header"&&Ue.push(ue.formatting+"-"+We.formatting[Ze]+"-"+We.header),We.formatting[Ze]==="quote"&&(!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=We.quote?Ue.push(ue.formatting+"-"+We.formatting[Ze]+"-"+We.quote):Ue.push("error"))}if(We.taskOpen)return Ue.push("meta"),Ue.length?Ue.join(" "):null;if(We.taskClosed)return Ue.push("property"),Ue.length?Ue.join(" "):null;if(We.linkHref?Ue.push(ue.linkHref,"url"):(We.strong&&Ue.push(ue.strong),We.em&&Ue.push(ue.em),We.strikethrough&&Ue.push(ue.strikethrough),We.emoji&&Ue.push(ue.emoji),We.linkText&&Ue.push(ue.linkText),We.code&&Ue.push(ue.code),We.image&&Ue.push(ue.image),We.imageAltText&&Ue.push(ue.imageAltText,"link"),We.imageMarker&&Ue.push(ue.imageMarker)),We.header&&Ue.push(ue.header,ue.header+"-"+We.header),We.quote&&(Ue.push(ue.quote),!Ee.maxBlockquoteDepth||Ee.maxBlockquoteDepth>=We.quote?Ue.push(ue.quote+"-"+We.quote):Ue.push(ue.quote+"-"+Ee.maxBlockquoteDepth)),We.list!==!1){var Je=(We.listStack.length-1)%3;Je?Je===1?Ue.push(ue.list2):Ue.push(ue.list3):Ue.push(ue.list1)}return We.trailingSpaceNewLine?Ue.push("trailing-space-new-line"):We.trailingSpace&&Ue.push("trailing-space-"+(We.trailingSpace%2?"a":"b")),Ue.length?Ue.join(" "):null}function Ie(We,Ue){if(We.match(ne,!0))return ke(Ue)}function Fe(We,Ue){var Ze=Ue.text(We,Ue);if(typeof Ze!="undefined")return Ze;if(Ue.list)return Ue.list=null,ke(Ue);if(Ue.taskList){var Je=We.match(y,!0)[1]===" ";return Je?Ue.taskOpen=!0:Ue.taskClosed=!0,Ee.highlightFormatting&&(Ue.formatting="task"),Ue.taskList=!1,ke(Ue)}if(Ue.taskOpen=!1,Ue.taskClosed=!1,Ue.header&&We.match(/^#+$/,!0))return Ee.highlightFormatting&&(Ue.formatting="header"),ke(Ue);var $e=We.next();if(Ue.linkTitle){Ue.linkTitle=!1;var Qe=$e;$e==="("&&(Qe=")"),Qe=(Qe+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pt="^\\s*(?:[^"+Qe+"\\\\]+|\\\\\\\\|\\\\.)"+Qe;if(We.match(new RegExp(pt),!0))return ue.linkHref}if($e==="`"){var ht=Ue.formatting;Ee.highlightFormatting&&(Ue.formatting="code"),We.eatWhile("`");var Pt=We.current().length;if(Ue.code==0&&(!Ue.quote||Pt==1))return Ue.code=Pt,ke(Ue);if(Pt==Ue.code){var gt=ke(Ue);return Ue.code=0,gt}else return Ue.formatting=ht,ke(Ue)}else if(Ue.code)return ke(Ue);if($e==="\\"&&(We.next(),Ee.highlightFormatting)){var bt=ke(Ue),St=ue.formatting+"-escape";return bt?bt+" "+St:St}if($e==="!"&&We.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ue.imageMarker=!0,Ue.image=!0,Ee.highlightFormatting&&(Ue.formatting="image"),ke(Ue);if($e==="["&&Ue.imageMarker&&We.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ue.imageMarker=!1,Ue.imageAltText=!0,Ee.highlightFormatting&&(Ue.formatting="image"),ke(Ue);if($e==="]"&&Ue.imageAltText){Ee.highlightFormatting&&(Ue.formatting="image");var bt=ke(Ue);return Ue.imageAltText=!1,Ue.image=!1,Ue.inline=Ue.f=qe,bt}if($e==="["&&!Ue.image)return Ue.linkText&&We.match(/^.*?\]/)||(Ue.linkText=!0,Ee.highlightFormatting&&(Ue.formatting="link")),ke(Ue);if($e==="]"&&Ue.linkText){Ee.highlightFormatting&&(Ue.formatting="link");var bt=ke(Ue);return Ue.linkText=!1,Ue.inline=Ue.f=We.match(/\(.*?\)| ?\[.*?\]/,!1)?qe:Fe,bt}if($e==="<"&&We.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Pe,Ee.highlightFormatting&&(Ue.formatting="link");var bt=ke(Ue);return bt?bt+=" ":bt="",bt+ue.linkInline}if($e==="<"&&We.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ue.f=Ue.inline=Pe,Ee.highlightFormatting&&(Ue.formatting="link");var bt=ke(Ue);return bt?bt+=" ":bt="",bt+ue.linkEmail}if(Ee.xml&&$e==="<"&&We.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var lt=We.string.indexOf(">",We.pos);if(lt!=-1){var _t=We.string.substring(We.start,lt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_t)&&(Ue.md_inside=!0)}return We.backUp(1),Ue.htmlState=de.startState(ce),be(We,Ue,Ae)}if(Ee.xml&&$e==="<"&&We.match(/^\/\w*?>/))return Ue.md_inside=!1,"tag";if($e==="*"||$e==="_"){for(var dt=1,nt=We.pos==1?" ":We.string.charAt(We.pos-2);dt<3&&We.eat($e);)dt++;var et=We.peek()||" ",ft=!/\s/.test(et)&&(!ge.test(et)||/\s/.test(nt)||ge.test(nt)),wt=!/\s/.test(nt)&&(!ge.test(nt)||/\s/.test(et)||ge.test(et)),Tt=null,Re=null;if(dt%2&&(!Ue.em&&ft&&($e==="*"||!wt||ge.test(nt))?Tt=!0:Ue.em==$e&&wt&&($e==="*"||!ft||ge.test(et))&&(Tt=!1)),dt>1&&(!Ue.strong&&ft&&($e==="*"||!wt||ge.test(nt))?Re=!0:Ue.strong==$e&&wt&&($e==="*"||!ft||ge.test(et))&&(Re=!1)),Re!=null||Tt!=null){Ee.highlightFormatting&&(Ue.formatting=Tt==null?"strong":Re==null?"em":"strong em"),Tt===!0&&(Ue.em=$e),Re===!0&&(Ue.strong=$e);var gt=ke(Ue);return Tt===!1&&(Ue.em=!1),Re===!1&&(Ue.strong=!1),gt}}else if($e===" "&&(We.eat("*")||We.eat("_"))){if(We.peek()===" ")return ke(Ue);We.backUp(1)}if(Ee.strikethrough){if($e==="~"&&We.eatWhile($e)){if(Ue.strikethrough){Ee.highlightFormatting&&(Ue.formatting="strikethrough");var gt=ke(Ue);return Ue.strikethrough=!1,gt}else if(We.match(/^[^\s]/,!1))return Ue.strikethrough=!0,Ee.highlightFormatting&&(Ue.formatting="strikethrough"),ke(Ue)}else if($e===" "&&We.match(/^~~/,!0)){if(We.peek()===" ")return ke(Ue);We.backUp(2)}}if(Ee.emoji&&$e===":"&&We.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ue.emoji=!0,Ee.highlightFormatting&&(Ue.formatting="emoji");var Le=ke(Ue);return Ue.emoji=!1,Le}return $e===" "&&(We.match(/^ +$/,!1)?Ue.trailingSpace++:Ue.trailingSpace&&(Ue.trailingSpaceNewLine=!0)),ke(Ue)}function Pe(We,Ue){var Ze=We.next();if(Ze===">"){Ue.f=Ue.inline=Fe,Ee.highlightFormatting&&(Ue.formatting="link");var Je=ke(Ue);return Je?Je+=" ":Je="",Je+ue.linkInline}return We.match(/^[^>]+/,!0),ue.linkInline}function qe(We,Ue){if(We.eatSpace())return null;var Ze=We.next();return Ze==="("||Ze==="["?(Ue.f=Ue.inline=ot(Ze==="("?")":"]"),Ee.highlightFormatting&&(Ue.formatting="link-string"),Ue.linkHref=!0,ke(Ue)):"error"}var Ke={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ot(We){return function(Ue,Ze){var Je=Ue.next();if(Je===We){Ze.f=Ze.inline=Fe,Ee.highlightFormatting&&(Ze.formatting="link-string");var $e=ke(Ze);return Ze.linkHref=!1,$e}return Ue.match(Ke[We]),Ze.linkHref=!0,ke(Ze)}}function He(We,Ue){return We.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ue.f=rt,We.next(),Ee.highlightFormatting&&(Ue.formatting="link"),Ue.linkText=!0,ke(Ue)):ve(We,Ue,Fe)}function rt(We,Ue){if(We.match(/^\]:/,!0)){Ue.f=Ue.inline=Ge,Ee.highlightFormatting&&(Ue.formatting="link");var Ze=ke(Ue);return Ue.linkText=!1,Ze}return We.match(/^([^\]\\]|\\.)+/,!0),ue.linkText}function Ge(We,Ue){return We.eatSpace()?null:(We.match(/^[^\s]+/,!0),We.peek()===void 0?Ue.linkTitle=!0:We.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ue.f=Ue.inline=Fe,ue.linkHref+" url")}var ct={startState:function(){return{f:me,prevLine:{stream:null},thisLine:{stream:null},block:me,htmlState:null,indentation:0,inline:Fe,text:Ie,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(We){return{f:We.f,prevLine:We.prevLine,thisLine:We.thisLine,block:We.block,htmlState:We.htmlState&&de.copyState(ce,We.htmlState),indentation:We.indentation,localMode:We.localMode,localState:We.localMode?de.copyState(We.localMode,We.localState):null,inline:We.inline,text:We.text,formatting:!1,linkText:We.linkText,linkTitle:We.linkTitle,linkHref:We.linkHref,code:We.code,em:We.em,strong:We.strong,strikethrough:We.strikethrough,emoji:We.emoji,header:We.header,setext:We.setext,hr:We.hr,taskList:We.taskList,list:We.list,listStack:We.listStack.slice(0),quote:We.quote,indentedCode:We.indentedCode,trailingSpace:We.trailingSpace,trailingSpaceNewLine:We.trailingSpaceNewLine,md_inside:We.md_inside,fencedEndRE:We.fencedEndRE}},token:function(We,Ue){if(Ue.formatting=!1,We!=Ue.thisLine.stream){if(Ue.header=0,Ue.hr=!1,We.match(/^\s*$/,!0))return pe(Ue),null;if(Ue.prevLine=Ue.thisLine,Ue.thisLine={stream:We},Ue.taskList=!1,Ue.trailingSpace=0,Ue.trailingSpaceNewLine=!1,!Ue.localState&&(Ue.f=Ue.block,Ue.f!=Ae)){var Ze=We.match(/^\s*/,!0)[0].replace(/\t/g,Se).length;if(Ue.indentation=Ze,Ue.indentationDiff=null,Ze>0)return null}}return Ue.f(We,Ue)},innerMode:function(We){return We.block==Ae?{state:We.htmlState,mode:ce}:We.localState?{state:We.localState,mode:We.localMode}:{state:We,mode:ct}},indent:function(We,Ue,Ze){return We.block==Ae&&ce.indent?ce.indent(We.htmlState,Ue,Ze):We.localState&&We.localMode.indent?We.localMode.indent(We.localState,Ue,Ze):de.Pass},blankLine:pe,getType:ke,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ct},"xml"),de.defineMIME("text/markdown","markdown"),de.defineMIME("text/x-markdown","markdown")})},98101:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){"use strict";de.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 ie=0;ie<de.modeInfo.length;ie++){var Ee=de.modeInfo[ie];Ee.mimes&&(Ee.mime=Ee.mimes[0])}de.findModeByMIME=function(ce){ce=ce.toLowerCase();for(var se=0;se<de.modeInfo.length;se++){var re=de.modeInfo[se];if(re.mime==ce)return re;if(re.mimes){for(var ue=0;ue<re.mimes.length;ue++)if(re.mimes[ue]==ce)return re}}if(/\+xml$/.test(ce))return de.findModeByMIME("application/xml");if(/\+json$/.test(ce))return de.findModeByMIME("application/json")},de.findModeByExtension=function(ce){ce=ce.toLowerCase();for(var se=0;se<de.modeInfo.length;se++){var re=de.modeInfo[se];if(re.ext){for(var ue=0;ue<re.ext.length;ue++)if(re.ext[ue]==ce)return re}}},de.findModeByFileName=function(ce){for(var se=0;se<de.modeInfo.length;se++){var re=de.modeInfo[se];if(re.file&&re.file.test(ce))return re}var ue=ce.lastIndexOf("."),ee=ue>-1&&ce.substring(ue+1,ce.length);if(ee)return de.findModeByExtension(ee)},de.findModeByName=function(ce){ce=ce.toLowerCase();for(var se=0;se<de.modeInfo.length;se++){var re=de.modeInfo[se];if(re.name.toLowerCase()==ce)return re;if(re.alias){for(var ue=0;ue<re.alias.length;ue++)if(re.alias[ue].toLowerCase()==ce)return re}}}})},67549:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){"use strict";de.defineMode("stex",function(ie,Ee){"use strict";function ce(ne,ae){ne.cmdState.push(ae)}function se(ne){return ne.cmdState.length>0?ne.cmdState[ne.cmdState.length-1]:null}function re(ne){var ae=ne.cmdState.pop();ae&&ae.closeBracket()}function ue(ne){for(var ae=ne.cmdState,oe=ae.length-1;oe>=0;oe--){var ge=ae[oe];if(ge.name!="DEFAULT")return ge}return{styleIdentifier:function(){return null}}}function ee(ne,ae,oe){return function(){this.name=ne,this.bracketNo=0,this.style=ae,this.styles=oe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var te={};te.importmodule=ee("importmodule","tag",["string","builtin"]),te.documentclass=ee("documentclass","tag",["","atom"]),te.usepackage=ee("usepackage","tag",["atom"]),te.begin=ee("begin","tag",["atom"]),te.end=ee("end","tag",["atom"]),te.label=ee("label","tag",["atom"]),te.ref=ee("ref","tag",["atom"]),te.eqref=ee("eqref","tag",["atom"]),te.cite=ee("cite","tag",["atom"]),te.bibitem=ee("bibitem","tag",["atom"]),te.Bibitem=ee("Bibitem","tag",["atom"]),te.RBibitem=ee("RBibitem","tag",["atom"]),te.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(ne,ae){ne.f=ae}function y(ne,ae){var oe;if(ne.match(/^\\[a-zA-Z@]+/)){var ge=ne.current().slice(1);return oe=te.hasOwnProperty(ge)?te[ge]:te.DEFAULT,oe=new oe,ce(ae,oe),E(ae,x),oe.style}if(ne.match(/^\\[$&%#{}_]/)||ne.match(/^\\[,;!\/\\]/))return"tag";if(ne.match("\\["))return E(ae,function(ve,be){return z(ve,be,"\\]")}),"keyword";if(ne.match("\\("))return E(ae,function(ve,be){return z(ve,be,"\\)")}),"keyword";if(ne.match("$$"))return E(ae,function(ve,be){return z(ve,be,"$$")}),"keyword";if(ne.match("$"))return E(ae,function(ve,be){return z(ve,be,"$")}),"keyword";var Se=ne.next();if(Se=="%")return ne.skipToEnd(),"comment";if(Se=="}"||Se=="]"){if(oe=se(ae),oe)oe.closeBracket(Se),E(ae,x);else return"error";return"bracket"}else return Se=="{"||Se=="["?(oe=te.DEFAULT,oe=new oe,ce(ae,oe),"bracket"):/\d/.test(Se)?(ne.eatWhile(/[\w.%]/),"atom"):(ne.eatWhile(/[\w\-_]/),oe=ue(ae),oe.name=="begin"&&(oe.argument=ne.current()),oe.styleIdentifier())}function z(ne,ae,oe){if(ne.eatSpace())return null;if(oe&&ne.match(oe))return E(ae,y),"keyword";if(ne.match(/^\\[a-zA-Z@]+/))return"tag";if(ne.match(/^[a-zA-Z]+/))return"variable-2";if(ne.match(/^\\[$&%#{}_]/)||ne.match(/^\\[,;!\/]/)||ne.match(/^[\^_&]/))return"tag";if(ne.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(ne.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ge=ne.next();return ge=="{"||ge=="}"||ge=="["||ge=="]"||ge=="("||ge==")"?"bracket":ge=="%"?(ne.skipToEnd(),"comment"):"error"}function x(ne,ae){var oe=ne.peek(),ge;return oe=="{"||oe=="["?(ge=se(ae),ge.openBracket(oe),ne.eat(oe),E(ae,y),"bracket"):/[ \t\r]/.test(oe)?(ne.eat(oe),null):(E(ae,y),re(ae),y(ne,ae))}return{startState:function(){var ne=Ee.inMathMode?function(ae,oe){return z(ae,oe)}:y;return{cmdState:[],f:ne}},copyState:function(ne){return{cmdState:ne.cmdState.slice(),f:ne.f}},token:function(ne,ae){return ae.f(ne,ae)},blankLine:function(ne){ne.f=y,ne.cmdState.length=0},lineComment:"%"}}),de.defineMIME("text/x-stex","stex"),de.defineMIME("text/x-latex","stex")})},15525:function(Jt,Ot,we){(function(de){de(we(89780))})(function(de){"use strict";var ie={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},Ee={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};de.defineMode("xml",function(ce,se){var re=ce.indentUnit,ue={},ee=se.htmlMode?ie:Ee;for(var te in ee)ue[te]=ee[te];for(var te in se)ue[te]=se[te];var E,y;function z(Pe,qe){function Ke(rt){return qe.tokenize=rt,rt(Pe,qe)}var ot=Pe.next();if(ot=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Ke(ae("atom","]]>")):null:Pe.match("--")?Ke(ae("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Ke(oe(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),qe.tokenize=ae("meta","?>"),"meta"):(E=Pe.eat("/")?"closeTag":"openTag",qe.tokenize=x,"tag bracket");if(ot=="&"){var He;return Pe.eat("#")?Pe.eat("x")?He=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):He=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):He=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),He?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}z.isInText=!0;function x(Pe,qe){var Ke=Pe.next();if(Ke==">"||Ke=="/"&&Pe.eat(">"))return qe.tokenize=z,E=Ke==">"?"endTag":"selfcloseTag","tag bracket";if(Ke=="=")return E="equals",null;if(Ke=="<"){qe.tokenize=z,qe.state=be,qe.tagName=qe.tagStart=null;var ot=qe.tokenize(Pe,qe);return ot?ot+" tag error":"tag error"}else return/[\'\"]/.test(Ke)?(qe.tokenize=ne(Ke),qe.stringStartCol=Pe.column(),qe.tokenize(Pe,qe)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function ne(Pe){var qe=function(Ke,ot){for(;!Ke.eol();)if(Ke.next()==Pe){ot.tokenize=x;break}return"string"};return qe.isInAttribute=!0,qe}function ae(Pe,qe){return function(Ke,ot){for(;!Ke.eol();){if(Ke.match(qe)){ot.tokenize=z;break}Ke.next()}return Pe}}function oe(Pe){return function(qe,Ke){for(var ot;(ot=qe.next())!=null;){if(ot=="<")return Ke.tokenize=oe(Pe+1),Ke.tokenize(qe,Ke);if(ot==">")if(Pe==1){Ke.tokenize=z;break}else return Ke.tokenize=oe(Pe-1),Ke.tokenize(qe,Ke)}return"meta"}}function ge(Pe,qe,Ke){this.prev=Pe.context,this.tagName=qe,this.indent=Pe.indented,this.startOfLine=Ke,(ue.doNotIndent.hasOwnProperty(qe)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function Se(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function ve(Pe,qe){for(var Ke;;){if(!Pe.context||(Ke=Pe.context.tagName,!ue.contextGrabbers.hasOwnProperty(Ke)||!ue.contextGrabbers[Ke].hasOwnProperty(qe)))return;Se(Pe)}}function be(Pe,qe,Ke){return Pe=="openTag"?(Ke.tagStart=qe.column(),xe):Pe=="closeTag"?pe:be}function xe(Pe,qe,Ke){return Pe=="word"?(Ke.tagName=qe.current(),y="tag",De):ue.allowMissingTagName&&Pe=="endTag"?(y="tag bracket",De(Pe,qe,Ke)):(y="error",xe)}function pe(Pe,qe,Ke){if(Pe=="word"){var ot=qe.current();return Ke.context&&Ke.context.tagName!=ot&&ue.implicitlyClosed.hasOwnProperty(Ke.context.tagName)&&Se(Ke),Ke.context&&Ke.context.tagName==ot||ue.matchClosing===!1?(y="tag",me):(y="tag error",Ae)}else return ue.allowMissingTagName&&Pe=="endTag"?(y="tag bracket",me(Pe,qe,Ke)):(y="error",Ae)}function me(Pe,qe,Ke){return Pe!="endTag"?(y="error",me):(Se(Ke),be)}function Ae(Pe,qe,Ke){return y="error",me(Pe,qe,Ke)}function De(Pe,qe,Ke){if(Pe=="word")return y="attribute",ke;if(Pe=="endTag"||Pe=="selfcloseTag"){var ot=Ke.tagName,He=Ke.tagStart;return Ke.tagName=Ke.tagStart=null,Pe=="selfcloseTag"||ue.autoSelfClosers.hasOwnProperty(ot)?ve(Ke,ot):(ve(Ke,ot),Ke.context=new ge(Ke,ot,He==Ke.indented)),be}return y="error",De}function ke(Pe,qe,Ke){return Pe=="equals"?Ie:(ue.allowMissing||(y="error"),De(Pe,qe,Ke))}function Ie(Pe,qe,Ke){return Pe=="string"?Fe:Pe=="word"&&ue.allowUnquoted?(y="string",De):(y="error",De(Pe,qe,Ke))}function Fe(Pe,qe,Ke){return Pe=="string"?Fe:De(Pe,qe,Ke)}return{startState:function(Pe){var qe={tokenize:z,state:be,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(qe.baseIndent=Pe),qe},token:function(Pe,qe){if(!qe.tagName&&Pe.sol()&&(qe.indented=Pe.indentation()),Pe.eatSpace())return null;E=null;var Ke=qe.tokenize(Pe,qe);return(Ke||E)&&Ke!="comment"&&(y=null,qe.state=qe.state(E||Ke,Pe,qe),y&&(Ke=y=="error"?Ke+" error":y)),Ke},indent:function(Pe,qe,Ke){var ot=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+re;if(ot&&ot.noIndent)return de.Pass;if(Pe.tokenize!=x&&Pe.tokenize!=z)return Ke?Ke.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return ue.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+re*(ue.multilineTagIndentFactor||1);if(ue.alignCDATA&&/<!\[CDATA\[/.test(qe))return 0;var He=qe&&/^<(\/)?([\w_:\.-]*)/.exec(qe);if(He&&He[1])for(;ot;)if(ot.tagName==He[2]){ot=ot.prev;break}else if(ue.implicitlyClosed.hasOwnProperty(ot.tagName))ot=ot.prev;else break;else if(He)for(;ot;){var rt=ue.contextGrabbers[ot.tagName];if(rt&&rt.hasOwnProperty(He[2]))ot=ot.prev;else break}for(;ot&&ot.prev&&!ot.startOfLine;)ot=ot.prev;return ot?ot.indent+re:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ue.htmlMode?"html":"xml",helperType:ue.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Ie&&(Pe.state=De)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var qe=[],Ke=Pe.context;Ke;Ke=Ke.prev)Ke.tagName&&qe.push(Ke.tagName);return qe.reverse()}}}),de.defineMIME("text/xml","xml"),de.defineMIME("application/xml","xml"),de.mimeModes.hasOwnProperty("text/html")||de.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(Jt,Ot,we){var de=we(97671);(function(ie,Ee){Jt.exports=Ee()})(this,function(){"use strict";function ie(Te){var je=typeof Te;return Te!==null&&(je==="object"||je==="function")}function Ee(Te){return typeof Te=="function"}var ce=void 0;Array.isArray?ce=Array.isArray:ce=function(Te){return Object.prototype.toString.call(Te)==="[object Array]"};var se=ce,re=0,ue=void 0,ee=void 0,te=function(je,ye){pe[re]=je,pe[re+1]=ye,re+=2,re===2&&(ee?ee(me):De())};function E(Te){ee=Te}function y(Te){te=Te}var z=typeof window!="undefined"?window:void 0,x=z||{},ne=x.MutationObserver||x.WebKitMutationObserver,ae=typeof self=="undefined"&&typeof de!="undefined"&&{}.toString.call(de)==="[object process]",oe=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function ge(){return function(){return de.nextTick(me)}}function Se(){return typeof ue!="undefined"?function(){ue(me)}:xe()}function ve(){var Te=0,je=new ne(me),ye=document.createTextNode("");return je.observe(ye,{characterData:!0}),function(){ye.data=Te=++Te%2}}function be(){var Te=new MessageChannel;return Te.port1.onmessage=me,function(){return Te.port2.postMessage(0)}}function xe(){var Te=setTimeout;return function(){return Te(me,1)}}var pe=new Array(1e3);function me(){for(var Te=0;Te<re;Te+=2){var je=pe[Te],ye=pe[Te+1];je(ye),pe[Te]=void 0,pe[Te+1]=void 0}re=0}function Ae(){try{var Te=Function("return this")().require("vertx");return ue=Te.runOnLoop||Te.runOnContext,Se()}catch(je){return xe()}}var De=void 0;ae?De=ge():ne?De=ve():oe?De=be():z===void 0?De=Ae():De=xe();function ke(Te,je){var ye=this,le=new this.constructor(Pe);le[Fe]===void 0&&lt(le);var _e=ye._state;if(_e){var Ne=arguments[_e-1];te(function(){return Pt(_e,le,Ne,ye._result)})}else pt(ye,le,Te,je);return le}function Ie(Te){var je=this;if(Te&&typeof Te=="object"&&Te.constructor===je)return Te;var ye=new je(Pe);return Ze(ye,Te),ye}var Fe=Math.random().toString(36).substring(2);function Pe(){}var qe=void 0,Ke=1,ot=2;function He(){return new TypeError("You cannot resolve a promise with itself")}function rt(){return new TypeError("A promises callback cannot return that same promise.")}function Ge(Te,je,ye,le){try{Te.call(je,ye,le)}catch(_e){return _e}}function ct(Te,je,ye){te(function(le){var _e=!1,Ne=Ge(ye,je,function(Ye){_e||(_e=!0,je!==Ye?Ze(le,Ye):$e(le,Ye))},function(Ye){_e||(_e=!0,Qe(le,Ye))},"Settle: "+(le._label||" unknown promise"));!_e&&Ne&&(_e=!0,Qe(le,Ne))},Te)}function We(Te,je){je._state===Ke?$e(Te,je._result):je._state===ot?Qe(Te,je._result):pt(je,void 0,function(ye){return Ze(Te,ye)},function(ye){return Qe(Te,ye)})}function Ue(Te,je,ye){je.constructor===Te.constructor&&ye===ke&&je.constructor.resolve===Ie?We(Te,je):ye===void 0?$e(Te,je):Ee(ye)?ct(Te,je,ye):$e(Te,je)}function Ze(Te,je){if(Te===je)Qe(Te,He());else if(ie(je)){var ye=void 0;try{ye=je.then}catch(le){Qe(Te,le);return}Ue(Te,je,ye)}else $e(Te,je)}function Je(Te){Te._onerror&&Te._onerror(Te._result),ht(Te)}function $e(Te,je){Te._state===qe&&(Te._result=je,Te._state=Ke,Te._subscribers.length!==0&&te(ht,Te))}function Qe(Te,je){Te._state===qe&&(Te._state=ot,Te._result=je,te(Je,Te))}function pt(Te,je,ye,le){var _e=Te._subscribers,Ne=_e.length;Te._onerror=null,_e[Ne]=je,_e[Ne+Ke]=ye,_e[Ne+ot]=le,Ne===0&&Te._state&&te(ht,Te)}function ht(Te){var je=Te._subscribers,ye=Te._state;if(je.length!==0){for(var le=void 0,_e=void 0,Ne=Te._result,Ye=0;Ye<je.length;Ye+=3)le=je[Ye],_e=je[Ye+ye],le?Pt(ye,le,_e,Ne):_e(Ne);Te._subscribers.length=0}}function Pt(Te,je,ye,le){var _e=Ee(ye),Ne=void 0,Ye=void 0,Oe=!0;if(_e){try{Ne=ye(le)}catch(tt){Oe=!1,Ye=tt}if(je===Ne){Qe(je,rt());return}}else Ne=le;je._state!==qe||(_e&&Oe?Ze(je,Ne):Oe===!1?Qe(je,Ye):Te===Ke?$e(je,Ne):Te===ot&&Qe(je,Ne))}function gt(Te,je){try{je(function(le){Ze(Te,le)},function(le){Qe(Te,le)})}catch(ye){Qe(Te,ye)}}var bt=0;function St(){return bt++}function lt(Te){Te[Fe]=bt++,Te._state=void 0,Te._result=void 0,Te._subscribers=[]}function _t(){return new Error("Array Methods must be provided an Array")}var dt=function(){function Te(je,ye){this._instanceConstructor=je,this.promise=new je(Pe),this.promise[Fe]||lt(this.promise),se(ye)?(this.length=ye.length,this._remaining=ye.length,this._result=new Array(this.length),this.length===0?$e(this.promise,this._result):(this.length=this.length||0,this._enumerate(ye),this._remaining===0&&$e(this.promise,this._result))):Qe(this.promise,_t())}return Te.prototype._enumerate=function(ye){for(var le=0;this._state===qe&&le<ye.length;le++)this._eachEntry(ye[le],le)},Te.prototype._eachEntry=function(ye,le){var _e=this._instanceConstructor,Ne=_e.resolve;if(Ne===Ie){var Ye=void 0,Oe=void 0,tt=!1;try{Ye=ye.then}catch(Nt){tt=!0,Oe=Nt}if(Ye===ke&&ye._state!==qe)this._settledAt(ye._state,le,ye._result);else if(typeof Ye!="function")this._remaining--,this._result[le]=ye;else if(_e===Re){var Ct=new _e(Pe);tt?Qe(Ct,Oe):Ue(Ct,ye,Ye),this._willSettleAt(Ct,le)}else this._willSettleAt(new _e(function(Nt){return Nt(ye)}),le)}else this._willSettleAt(Ne(ye),le)},Te.prototype._settledAt=function(ye,le,_e){var Ne=this.promise;Ne._state===qe&&(this._remaining--,ye===ot?Qe(Ne,_e):this._result[le]=_e),this._remaining===0&&$e(Ne,this._result)},Te.prototype._willSettleAt=function(ye,le){var _e=this;pt(ye,void 0,function(Ne){return _e._settledAt(Ke,le,Ne)},function(Ne){return _e._settledAt(ot,le,Ne)})},Te}();function nt(Te){return new dt(this,Te).promise}function et(Te){var je=this;return se(Te)?new je(function(ye,le){for(var _e=Te.length,Ne=0;Ne<_e;Ne++)je.resolve(Te[Ne]).then(ye,le)}):new je(function(ye,le){return le(new TypeError("You must pass an array to race."))})}function ft(Te){var je=this,ye=new je(Pe);return Qe(ye,Te),ye}function wt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Tt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Re=function(){function Te(je){this[Fe]=St(),this._result=this._state=void 0,this._subscribers=[],Pe!==je&&(typeof je!="function"&&wt(),this instanceof Te?gt(this,je):Tt())}return Te.prototype.catch=function(ye){return this.then(null,ye)},Te.prototype.finally=function(ye){var le=this,_e=le.constructor;return Ee(ye)?le.then(function(Ne){return _e.resolve(ye()).then(function(){return Ne})},function(Ne){return _e.resolve(ye()).then(function(){throw Ne})}):le.then(ye,ye)},Te}();Re.prototype.then=ke,Re.all=nt,Re.race=et,Re.resolve=Ie,Re.reject=ft,Re._setScheduler=E,Re._setAsap=y,Re._asap=te;function Le(){var Te=void 0;if(typeof we.g!="undefined")Te=we.g;else if(typeof self!="undefined")Te=self;else try{Te=Function("return this")()}catch(le){throw new Error("polyfill failed because global object is unavailable in this environment")}var je=Te.Promise;if(je){var ye=null;try{ye=Object.prototype.toString.call(je.resolve())}catch(le){}if(ye==="[object Promise]"&&!je.cast)return}Te.Promise=Re}return Re.polyfill=Le,Re.Promise=Re,Re})},86204:function(Jt){"use strict";var Ot=typeof Reflect=="object"?Reflect:null,we=Ot&&typeof Ot.apply=="function"?Ot.apply:function(be,xe,pe){return Function.prototype.apply.call(be,xe,pe)},de;Ot&&typeof Ot.ownKeys=="function"?de=Ot.ownKeys:Object.getOwnPropertySymbols?de=function(be){return Object.getOwnPropertyNames(be).concat(Object.getOwnPropertySymbols(be))}:de=function(be){return Object.getOwnPropertyNames(be)};function ie(ve){console&&console.warn&&console.warn(ve)}var Ee=Number.isNaN||function(be){return be!==be};function ce(){ce.init.call(this)}Jt.exports=ce,Jt.exports.once=oe,ce.EventEmitter=ce,ce.prototype._events=void 0,ce.prototype._eventsCount=0,ce.prototype._maxListeners=void 0;var se=10;function re(ve){if(typeof ve!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ve)}Object.defineProperty(ce,"defaultMaxListeners",{enumerable:!0,get:function(){return se},set:function(ve){if(typeof ve!="number"||ve<0||Ee(ve))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ve+".");se=ve}}),ce.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ce.prototype.setMaxListeners=function(be){if(typeof be!="number"||be<0||Ee(be))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+be+".");return this._maxListeners=be,this};function ue(ve){return ve._maxListeners===void 0?ce.defaultMaxListeners:ve._maxListeners}ce.prototype.getMaxListeners=function(){return ue(this)},ce.prototype.emit=function(be){for(var xe=[],pe=1;pe<arguments.length;pe++)xe.push(arguments[pe]);var me=be==="error",Ae=this._events;if(Ae!==void 0)me=me&&Ae.error===void 0;else if(!me)return!1;if(me){var De;if(xe.length>0&&(De=xe[0]),De instanceof Error)throw De;var ke=new Error("Unhandled error."+(De?" ("+De.message+")":""));throw ke.context=De,ke}var Ie=Ae[be];if(Ie===void 0)return!1;if(typeof Ie=="function")we(Ie,this,xe);else for(var Fe=Ie.length,Pe=x(Ie,Fe),pe=0;pe<Fe;++pe)we(Pe[pe],this,xe);return!0};function ee(ve,be,xe,pe){var me,Ae,De;if(re(xe),Ae=ve._events,Ae===void 0?(Ae=ve._events=Object.create(null),ve._eventsCount=0):(Ae.newListener!==void 0&&(ve.emit("newListener",be,xe.listener?xe.listener:xe),Ae=ve._events),De=Ae[be]),De===void 0)De=Ae[be]=xe,++ve._eventsCount;else if(typeof De=="function"?De=Ae[be]=pe?[xe,De]:[De,xe]:pe?De.unshift(xe):De.push(xe),me=ue(ve),me>0&&De.length>me&&!De.warned){De.warned=!0;var ke=new Error("Possible EventEmitter memory leak detected. "+De.length+" "+String(be)+" listeners added. Use emitter.setMaxListeners() to increase limit");ke.name="MaxListenersExceededWarning",ke.emitter=ve,ke.type=be,ke.count=De.length,ie(ke)}return ve}ce.prototype.addListener=function(be,xe){return ee(this,be,xe,!1)},ce.prototype.on=ce.prototype.addListener,ce.prototype.prependListener=function(be,xe){return ee(this,be,xe,!0)};function te(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(ve,be,xe){var pe={fired:!1,wrapFn:void 0,target:ve,type:be,listener:xe},me=te.bind(pe);return me.listener=xe,pe.wrapFn=me,me}ce.prototype.once=function(be,xe){return re(xe),this.on(be,E(this,be,xe)),this},ce.prototype.prependOnceListener=function(be,xe){return re(xe),this.prependListener(be,E(this,be,xe)),this},ce.prototype.removeListener=function(be,xe){var pe,me,Ae,De,ke;if(re(xe),me=this._events,me===void 0)return this;if(pe=me[be],pe===void 0)return this;if(pe===xe||pe.listener===xe)--this._eventsCount===0?this._events=Object.create(null):(delete me[be],me.removeListener&&this.emit("removeListener",be,pe.listener||xe));else if(typeof pe!="function"){for(Ae=-1,De=pe.length-1;De>=0;De--)if(pe[De]===xe||pe[De].listener===xe){ke=pe[De].listener,Ae=De;break}if(Ae<0)return this;Ae===0?pe.shift():ne(pe,Ae),pe.length===1&&(me[be]=pe[0]),me.removeListener!==void 0&&this.emit("removeListener",be,ke||xe)}return this},ce.prototype.off=ce.prototype.removeListener,ce.prototype.removeAllListeners=function(be){var xe,pe,me;if(pe=this._events,pe===void 0)return this;if(pe.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):pe[be]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete pe[be]),this;if(arguments.length===0){var Ae=Object.keys(pe),De;for(me=0;me<Ae.length;++me)De=Ae[me],De!=="removeListener"&&this.removeAllListeners(De);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xe=pe[be],typeof xe=="function")this.removeListener(be,xe);else if(xe!==void 0)for(me=xe.length-1;me>=0;me--)this.removeListener(be,xe[me]);return this};function y(ve,be,xe){var pe=ve._events;if(pe===void 0)return[];var me=pe[be];return me===void 0?[]:typeof me=="function"?xe?[me.listener||me]:[me]:xe?ae(me):x(me,me.length)}ce.prototype.listeners=function(be){return y(this,be,!0)},ce.prototype.rawListeners=function(be){return y(this,be,!1)},ce.listenerCount=function(ve,be){return typeof ve.listenerCount=="function"?ve.listenerCount(be):z.call(ve,be)},ce.prototype.listenerCount=z;function z(ve){var be=this._events;if(be!==void 0){var xe=be[ve];if(typeof xe=="function")return 1;if(xe!==void 0)return xe.length}return 0}ce.prototype.eventNames=function(){return this._eventsCount>0?de(this._events):[]};function x(ve,be){for(var xe=new Array(be),pe=0;pe<be;++pe)xe[pe]=ve[pe];return xe}function ne(ve,be){for(;be+1<ve.length;be++)ve[be]=ve[be+1];ve.pop()}function ae(ve){for(var be=new Array(ve.length),xe=0;xe<be.length;++xe)be[xe]=ve[xe].listener||ve[xe];return be}function oe(ve,be){return new Promise(function(xe,pe){function me(De){ve.removeListener(be,Ae),pe(De)}function Ae(){typeof ve.removeListener=="function"&&ve.removeListener("error",me),xe([].slice.call(arguments))}Se(ve,be,Ae,{once:!0}),be!=="error"&&ge(ve,me,{once:!0})})}function ge(ve,be,xe){typeof ve.on=="function"&&Se(ve,"error",be,xe)}function Se(ve,be,xe,pe){if(typeof ve.on=="function")pe.once?ve.once(be,xe):ve.on(be,xe);else if(typeof ve.addEventListener=="function")ve.addEventListener(be,function me(Ae){pe.once&&ve.removeEventListener(be,me),xe(Ae)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof ve)}},24334:function(Jt,Ot,we){var de,ie;(function(Ee,ce){Jt.exports=ce(Ee)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof we.g!="undefined"?we.g:this,function(Ee){"use strict";Ee=Ee||{};var ce=Ee.Base64,se="2.6.4",re="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ue=function(Ke){for(var ot={},He=0,rt=Ke.length;He<rt;He++)ot[Ke.charAt(He)]=He;return ot}(re),ee=String.fromCharCode,te=function(Ke){if(Ke.length<2){var ot=Ke.charCodeAt(0);return ot<128?Ke:ot<2048?ee(192|ot>>>6)+ee(128|ot&63):ee(224|ot>>>12&15)+ee(128|ot>>>6&63)+ee(128|ot&63)}else{var ot=65536+(Ke.charCodeAt(0)-55296)*1024+(Ke.charCodeAt(1)-56320);return ee(240|ot>>>18&7)+ee(128|ot>>>12&63)+ee(128|ot>>>6&63)+ee(128|ot&63)}},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,y=function(Ke){return Ke.replace(E,te)},z=function(Ke){var ot=[0,2,1][Ke.length%3],He=Ke.charCodeAt(0)<<16|(Ke.length>1?Ke.charCodeAt(1):0)<<8|(Ke.length>2?Ke.charCodeAt(2):0),rt=[re.charAt(He>>>18),re.charAt(He>>>12&63),ot>=2?"=":re.charAt(He>>>6&63),ot>=1?"=":re.charAt(He&63)];return rt.join("")},x=Ee.btoa&&typeof Ee.btoa=="function"?function(Ke){return Ee.btoa(Ke)}:function(Ke){if(Ke.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Ke.replace(/[\s\S]{1,3}/g,z)},ne=function(Ke){return x(y(String(Ke)))},ae=function(Ke){return Ke.replace(/[+\/]/g,function(ot){return ot=="+"?"-":"_"}).replace(/=/g,"")},oe=function(Ke,ot){return ot?ae(ne(Ke)):ne(Ke)},ge=function(Ke){return oe(Ke,!0)},Se;Ee.Uint8Array&&(Se=function(Ke,ot){for(var He="",rt=0,Ge=Ke.length;rt<Ge;rt+=3){var ct=Ke[rt],We=Ke[rt+1],Ue=Ke[rt+2],Ze=ct<<16|We<<8|Ue;He+=re.charAt(Ze>>>18)+re.charAt(Ze>>>12&63)+(typeof We!="undefined"?re.charAt(Ze>>>6&63):"=")+(typeof Ue!="undefined"?re.charAt(Ze&63):"=")}return ot?ae(He):He});var ve=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,be=function(Ke){switch(Ke.length){case 4:var ot=(7&Ke.charCodeAt(0))<<18|(63&Ke.charCodeAt(1))<<12|(63&Ke.charCodeAt(2))<<6|63&Ke.charCodeAt(3),He=ot-65536;return ee((He>>>10)+55296)+ee((He&1023)+56320);case 3:return ee((15&Ke.charCodeAt(0))<<12|(63&Ke.charCodeAt(1))<<6|63&Ke.charCodeAt(2));default:return ee((31&Ke.charCodeAt(0))<<6|63&Ke.charCodeAt(1))}},xe=function(Ke){return Ke.replace(ve,be)},pe=function(Ke){var ot=Ke.length,He=ot%4,rt=(ot>0?ue[Ke.charAt(0)]<<18:0)|(ot>1?ue[Ke.charAt(1)]<<12:0)|(ot>2?ue[Ke.charAt(2)]<<6:0)|(ot>3?ue[Ke.charAt(3)]:0),Ge=[ee(rt>>>16),ee(rt>>>8&255),ee(rt&255)];return Ge.length-=[0,0,2,1][He],Ge.join("")},me=Ee.atob&&typeof Ee.atob=="function"?function(Ke){return Ee.atob(Ke)}:function(Ke){return Ke.replace(/\S{1,4}/g,pe)},Ae=function(Ke){return me(String(Ke).replace(/[^A-Za-z0-9\+\/]/g,""))},De=function(Ke){return xe(me(Ke))},ke=function(Ke){return String(Ke).replace(/[-_]/g,function(ot){return ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Ie=function(Ke){return De(ke(Ke))},Fe;Ee.Uint8Array&&(Fe=function(Ke){return Uint8Array.from(Ae(ke(Ke)),function(ot){return ot.charCodeAt(0)})});var Pe=function(){var Ke=Ee.Base64;return Ee.Base64=ce,Ke};if(Ee.Base64={VERSION:se,atob:Ae,btoa:x,fromBase64:Ie,toBase64:oe,utob:y,encode:oe,encodeURI:ge,btou:xe,decode:Ie,noConflict:Pe,fromUint8Array:Se,toUint8Array:Fe},typeof Object.defineProperty=="function"){var qe=function(Ke){return{value:Ke,enumerable:!1,writable:!0,configurable:!0}};Ee.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",qe(function(){return Ie(this)})),Object.defineProperty(String.prototype,"toBase64",qe(function(Ke){return oe(this,Ke)})),Object.defineProperty(String.prototype,"toBase64URI",qe(function(){return oe(this,!0)}))}}return Ee.Meteor&&(Base64=Ee.Base64),Jt.exports?Jt.exports.Base64=Ee.Base64:(de=[],ie=function(){return Ee.Base64}.apply(Ot,de),ie!==void 0&&(Jt.exports=ie)),{Base64:Ee.Base64}})},66042:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return qe}});var de=we(33885),ie=we(42978),Ee=we(43403),ce=we(34280),se=we(59301),re=se.createContext(null),ue=se.createContext({}),ee=re,te=we(20068),E=we(54476),y=we(92310),z=we.n(y),x=we(77900),ne=we(10228),ae=we(26112),oe=we(75931),ge=we(8654),Se=["prefixCls","className","containerRef"],ve=function(ot){var He=ot.prefixCls,rt=ot.className,Ge=ot.containerRef,ct=(0,oe.Z)(ot,Se),We=se.useContext(ue),Ue=We.panel,Ze=(0,ge.x1)(Ue,Ge);return se.createElement("div",(0,E.Z)({className:z()("".concat(He,"-content"),rt),role:"dialog",ref:Ze},(0,ae.Z)(ot,{aria:!0}),{"aria-modal":"true"},ct))},be=ve,xe=we(48736);function pe(Ke){return typeof Ke=="string"&&String(Number(Ke))===Ke?((0,xe.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Ke)):Ke}function me(Ke){warning(!("wrapperClassName"in Ke),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Ke.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var Ae={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function De(Ke,ot){var He,rt,Ge,ct=Ke.prefixCls,We=Ke.open,Ue=Ke.placement,Ze=Ke.inline,Je=Ke.push,$e=Ke.forceRender,Qe=Ke.autoFocus,pt=Ke.keyboard,ht=Ke.classNames,Pt=Ke.rootClassName,gt=Ke.rootStyle,bt=Ke.zIndex,St=Ke.className,lt=Ke.id,_t=Ke.style,dt=Ke.motion,nt=Ke.width,et=Ke.height,ft=Ke.children,wt=Ke.mask,Tt=Ke.maskClosable,Re=Ke.maskMotion,Le=Ke.maskClassName,Te=Ke.maskStyle,je=Ke.afterOpenChange,ye=Ke.onClose,le=Ke.onMouseEnter,_e=Ke.onMouseOver,Ne=Ke.onMouseLeave,Ye=Ke.onClick,Oe=Ke.onKeyDown,tt=Ke.onKeyUp,Ct=Ke.styles,Nt=Ke.drawerRender,Dt=se.useRef(),ut=se.useRef(),Ht=se.useRef();se.useImperativeHandle(ot,function(){return Dt.current});var At=function(gn){var Wn=gn.keyCode,fr=gn.shiftKey;switch(Wn){case ne.Z.TAB:{if(Wn===ne.Z.TAB){if(!fr&&document.activeElement===Ht.current){var mn;(mn=ut.current)===null||mn===void 0||mn.focus({preventScroll:!0})}else if(fr&&document.activeElement===ut.current){var En;(En=Ht.current)===null||En===void 0||En.focus({preventScroll:!0})}}break}case ne.Z.ESC:{ye&&pt&&(gn.stopPropagation(),ye(gn));break}}};se.useEffect(function(){if(We&&Qe){var In;(In=Dt.current)===null||In===void 0||In.focus({preventScroll:!0})}},[We]);var Wt=se.useState(!1),on=(0,ie.Z)(Wt,2),bn=on[0],Yt=on[1],Mn=se.useContext(ee),Yn;typeof Je=="boolean"?Yn=Je?{}:{distance:0}:Yn=Je||{};var Vn=(He=(rt=(Ge=Yn)===null||Ge===void 0?void 0:Ge.distance)!==null&&rt!==void 0?rt:Mn==null?void 0:Mn.pushDistance)!==null&&He!==void 0?He:180,Jn=se.useMemo(function(){return{pushDistance:Vn,push:function(){Yt(!0)},pull:function(){Yt(!1)}}},[Vn]);se.useEffect(function(){if(We){var In;Mn==null||(In=Mn.push)===null||In===void 0||In.call(Mn)}else{var gn;Mn==null||(gn=Mn.pull)===null||gn===void 0||gn.call(Mn)}},[We]),se.useEffect(function(){return function(){var In;Mn==null||(In=Mn.pull)===null||In===void 0||In.call(Mn)}},[]);var ar=wt&&se.createElement(x.default,(0,E.Z)({key:"mask"},Re,{visible:We}),function(In,gn){var Wn=In.className,fr=In.style;return se.createElement("div",{className:z()("".concat(ct,"-mask"),Wn,ht==null?void 0:ht.mask,Le),style:(0,de.Z)((0,de.Z)((0,de.Z)({},fr),Te),Ct==null?void 0:Ct.mask),onClick:Tt&&We?ye:void 0,ref:gn})}),ur=typeof dt=="function"?dt(Ue):dt,jn={};if(bn&&Vn)switch(Ue){case"top":jn.transform="translateY(".concat(Vn,"px)");break;case"bottom":jn.transform="translateY(".concat(-Vn,"px)");break;case"left":jn.transform="translateX(".concat(Vn,"px)");break;default:jn.transform="translateX(".concat(-Vn,"px)");break}Ue==="left"||Ue==="right"?jn.width=pe(nt):jn.height=pe(et);var Bn={onMouseEnter:le,onMouseOver:_e,onMouseLeave:Ne,onClick:Ye,onKeyDown:Oe,onKeyUp:tt},sr=se.createElement(x.default,(0,E.Z)({key:"panel"},ur,{visible:We,forceRender:$e,onVisibleChanged:function(gn){je==null||je(gn)},removeOnLeave:!1,leavedClassName:"".concat(ct,"-content-wrapper-hidden")}),function(In,gn){var Wn=In.className,fr=In.style,mn=se.createElement(be,(0,E.Z)({id:lt,containerRef:gn,prefixCls:ct,className:z()(St,ht==null?void 0:ht.content),style:(0,de.Z)((0,de.Z)({},_t),Ct==null?void 0:Ct.content)},(0,ae.Z)(Ke,{aria:!0}),Bn),ft);return se.createElement("div",(0,E.Z)({className:z()("".concat(ct,"-content-wrapper"),ht==null?void 0:ht.wrapper,Wn),style:(0,de.Z)((0,de.Z)((0,de.Z)({},jn),fr),Ct==null?void 0:Ct.wrapper)},(0,ae.Z)(Ke,{data:!0})),Nt?Nt(mn):mn)}),Hn=(0,de.Z)({},gt);return bt&&(Hn.zIndex=bt),se.createElement(ee.Provider,{value:Jn},se.createElement("div",{className:z()(ct,"".concat(ct,"-").concat(Ue),Pt,(0,te.Z)((0,te.Z)({},"".concat(ct,"-open"),We),"".concat(ct,"-inline"),Ze)),style:Hn,tabIndex:-1,ref:Dt,onKeyDown:At},ar,se.createElement("div",{tabIndex:0,ref:ut,style:Ae,"aria-hidden":"true","data-sentinel":"start"}),sr,se.createElement("div",{tabIndex:0,ref:Ht,style:Ae,"aria-hidden":"true","data-sentinel":"end"})))}var ke=se.forwardRef(De),Ie=ke,Fe=function(ot){var He=ot.open,rt=He===void 0?!1:He,Ge=ot.prefixCls,ct=Ge===void 0?"rc-drawer":Ge,We=ot.placement,Ue=We===void 0?"right":We,Ze=ot.autoFocus,Je=Ze===void 0?!0:Ze,$e=ot.keyboard,Qe=$e===void 0?!0:$e,pt=ot.width,ht=pt===void 0?378:pt,Pt=ot.mask,gt=Pt===void 0?!0:Pt,bt=ot.maskClosable,St=bt===void 0?!0:bt,lt=ot.getContainer,_t=ot.forceRender,dt=ot.afterOpenChange,nt=ot.destroyOnClose,et=ot.onMouseEnter,ft=ot.onMouseOver,wt=ot.onMouseLeave,Tt=ot.onClick,Re=ot.onKeyDown,Le=ot.onKeyUp,Te=ot.panelRef,je=se.useState(!1),ye=(0,ie.Z)(je,2),le=ye[0],_e=ye[1],Ne=se.useState(!1),Ye=(0,ie.Z)(Ne,2),Oe=Ye[0],tt=Ye[1];(0,ce.Z)(function(){tt(!0)},[]);var Ct=Oe?rt:!1,Nt=se.useRef(),Dt=se.useRef();(0,ce.Z)(function(){Ct&&(Dt.current=document.activeElement)},[Ct]);var ut=function(bn){var Yt;if(_e(bn),dt==null||dt(bn),!bn&&Dt.current&&!((Yt=Nt.current)!==null&&Yt!==void 0&&Yt.contains(Dt.current))){var Mn;(Mn=Dt.current)===null||Mn===void 0||Mn.focus({preventScroll:!0})}},Ht=se.useMemo(function(){return{panel:Te}},[Te]);if(!_t&&!le&&!Ct&&nt)return null;var At={onMouseEnter:et,onMouseOver:ft,onMouseLeave:wt,onClick:Tt,onKeyDown:Re,onKeyUp:Le},Wt=(0,de.Z)((0,de.Z)({},ot),{},{open:Ct,prefixCls:ct,placement:Ue,autoFocus:Je,keyboard:Qe,width:ht,mask:gt,maskClosable:St,inline:lt===!1,afterOpenChange:ut,ref:Nt},At);return se.createElement(ue.Provider,{value:Ht},se.createElement(Ee.Z,{open:Ct||_t||le,autoDestroy:!1,getContainer:lt,autoLock:gt&&(Ct||le)},se.createElement(Ie,Wt)))},Pe=Fe,qe=Pe},91574:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return Ye}});var de=we(54476),ie=we(33885),Ee=we(20068),ce=we(42978),se=we(76190),re=we(75931),ue=we(92310),ee=we.n(ue),te=/margin|padding|width|height|max|min|offset/,E={left:!0,top:!0},y={cssFloat:1,styleFloat:1,float:1};function z(Oe){return Oe.nodeType===1?Oe.ownerDocument.defaultView.getComputedStyle(Oe,null):{}}function x(Oe,tt,Ct){if(tt=tt.toLowerCase(),Ct==="auto"){if(tt==="height")return Oe.offsetHeight;if(tt==="width")return Oe.offsetWidth}return tt in E||(E[tt]=te.test(tt)),E[tt]?parseFloat(Ct)||0:Ct}function ne(Oe,tt){var Ct=arguments.length,Nt=z(Oe);return tt=y[tt]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":tt,Ct===1?Nt:x(Oe,tt,Nt[tt]||Oe.style[tt])}function ae(Oe,tt,Ct){var Nt=arguments.length;if(tt=y[tt]?"cssFloat"in Oe.style?"cssFloat":"styleFloat":tt,Nt===3)return typeof Ct=="number"&&te.test(tt)&&(Ct="".concat(Ct,"px")),Oe.style[tt]=Ct,Ct;for(var Dt in tt)tt.hasOwnProperty(Dt)&&ae(Oe,Dt,tt[Dt]);return z(Oe)}function oe(Oe){return Oe===document.body?document.documentElement.clientWidth:Oe.offsetWidth}function ge(Oe){return Oe===document.body?window.innerHeight||document.documentElement.clientHeight:Oe.offsetHeight}function Se(){var Oe=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),tt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Oe,height:tt}}function ve(){var Oe=document.documentElement.clientWidth,tt=window.innerHeight||document.documentElement.clientHeight;return{width:Oe,height:tt}}function be(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function xe(Oe){var tt=Oe.getBoundingClientRect(),Ct=document.documentElement;return{left:tt.left+(window.pageXOffset||Ct.scrollLeft)-(Ct.clientLeft||document.body.clientLeft||0),top:tt.top+(window.pageYOffset||Ct.scrollTop)-(Ct.clientTop||document.body.clientTop||0)}}var pe=we(18929),me=we(59301),Ae=we(55311),De=we(8224),ke=we(10228),Ie=we(43403),Fe=we(77900),Pe=me.createContext(null),qe=function(tt){var Ct=tt.visible,Nt=tt.maskTransitionName,Dt=tt.getContainer,ut=tt.prefixCls,Ht=tt.rootClassName,At=tt.icons,Wt=tt.countRender,on=tt.showSwitch,bn=tt.showProgress,Yt=tt.current,Mn=tt.transform,Yn=tt.count,Vn=tt.scale,Jn=tt.minScale,ar=tt.maxScale,ur=tt.closeIcon,jn=tt.onActive,Bn=tt.onClose,sr=tt.onZoomIn,Hn=tt.onZoomOut,In=tt.onRotateRight,gn=tt.onRotateLeft,Wn=tt.onFlipX,fr=tt.onFlipY,mn=tt.onReset,En=tt.toolbarRender,rr=tt.zIndex,Qt=tt.image,Me=(0,me.useContext)(Pe),ze=At.rotateLeft,Ve=At.rotateRight,st=At.zoomIn,yt=At.zoomOut,Ft=At.close,Mt=At.left,jt=At.right,qt=At.flipX,wn=At.flipY,Qn="".concat(ut,"-operations-operation");me.useEffect(function(){var Kt=function(Cn){Cn.keyCode===ke.Z.ESC&&Bn()};return Ct&&window.addEventListener("keydown",Kt),function(){window.removeEventListener("keydown",Kt)}},[Ct]);var Rt=function(Xt,Cn){Xt.preventDefault(),Xt.stopPropagation(),jn(Cn)},Et=me.useCallback(function(Kt){var Xt=Kt.type,Cn=Kt.disabled,Un=Kt.onClick,Zn=Kt.icon;return me.createElement("div",{key:Xt,className:ee()(Qn,"".concat(ut,"-operations-operation-").concat(Xt),(0,Ee.Z)({},"".concat(ut,"-operations-operation-disabled"),!!Cn)),onClick:Un},Zn)},[Qn,ut]),sn=on?Et({icon:Mt,onClick:function(Xt){return Rt(Xt,-1)},type:"prev",disabled:Yt===0}):void 0,Zt=on?Et({icon:jt,onClick:function(Xt){return Rt(Xt,1)},type:"next",disabled:Yt===Yn-1}):void 0,Lt=Et({icon:wn,onClick:fr,type:"flipY"}),zt=Et({icon:qt,onClick:Wn,type:"flipX"}),nn=Et({icon:ze,onClick:gn,type:"rotateLeft"}),rn=Et({icon:Ve,onClick:In,type:"rotateRight"}),_n=Et({icon:yt,onClick:Hn,type:"zoomOut",disabled:Vn<=Jn}),xn=Et({icon:st,onClick:sr,type:"zoomIn",disabled:Vn===ar}),Ln=me.createElement("div",{className:"".concat(ut,"-operations")},Lt,zt,nn,rn,_n,xn);return me.createElement(Fe.default,{visible:Ct,motionName:Nt},function(Kt){var Xt=Kt.className,Cn=Kt.style;return me.createElement(Ie.Z,{open:!0,getContainer:Dt!=null?Dt:document.body},me.createElement("div",{className:ee()("".concat(ut,"-operations-wrapper"),Xt,Ht),style:(0,ie.Z)((0,ie.Z)({},Cn),{},{zIndex:rr})},ur===null?null:me.createElement("button",{className:"".concat(ut,"-close"),onClick:Bn},ur||Ft),on&&me.createElement(me.Fragment,null,me.createElement("div",{className:ee()("".concat(ut,"-switch-left"),(0,Ee.Z)({},"".concat(ut,"-switch-left-disabled"),Yt===0)),onClick:function(Zn){return Rt(Zn,-1)}},Mt),me.createElement("div",{className:ee()("".concat(ut,"-switch-right"),(0,Ee.Z)({},"".concat(ut,"-switch-right-disabled"),Yt===Yn-1)),onClick:function(Zn){return Rt(Zn,1)}},jt)),me.createElement("div",{className:"".concat(ut,"-footer")},bn&&me.createElement("div",{className:"".concat(ut,"-progress")},Wt?Wt(Yt+1,Yn):"".concat(Yt+1," / ").concat(Yn)),En?En(Ln,(0,ie.Z)((0,ie.Z)({icons:{prevIcon:sn,nextIcon:Zt,flipYIcon:Lt,flipXIcon:zt,rotateLeftIcon:nn,rotateRightIcon:rn,zoomOutIcon:_n,zoomInIcon:xn},actions:{onActive:jn,onFlipY:fr,onFlipX:Wn,onRotateLeft:gn,onRotateRight:In,onZoomOut:Hn,onZoomIn:sr,onReset:mn,onClose:Bn},transform:Mn},Me?{current:Yt,total:Yn}:{}),{},{image:Qt})):Ln)))})},Ke=qe,ot=we(13697),He=we(16089),rt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Ge(Oe,tt,Ct,Nt){var Dt=(0,me.useRef)(null),ut=(0,me.useRef)([]),Ht=(0,me.useState)(rt),At=(0,ce.Z)(Ht,2),Wt=At[0],on=At[1],bn=function(Vn){on(rt),(0,ot.Z)(rt,Wt)||Nt==null||Nt({transform:rt,action:Vn})},Yt=function(Vn,Jn){Dt.current===null&&(ut.current=[],Dt.current=(0,He.Z)(function(){on(function(ar){var ur=ar;return ut.current.forEach(function(jn){ur=(0,ie.Z)((0,ie.Z)({},ur),jn)}),Dt.current=null,Nt==null||Nt({transform:ur,action:Jn}),ur})})),ut.current.push((0,ie.Z)((0,ie.Z)({},Wt),Vn))},Mn=function(Vn,Jn,ar,ur,jn){var Bn=Oe.current,sr=Bn.width,Hn=Bn.height,In=Bn.offsetWidth,gn=Bn.offsetHeight,Wn=Bn.offsetLeft,fr=Bn.offsetTop,mn=Vn,En=Wt.scale*Vn;En>Ct?(En=Ct,mn=Ct/Wt.scale):En<tt&&(En=jn?En:tt,mn=En/Wt.scale);var rr=ar!=null?ar:innerWidth/2,Qt=ur!=null?ur:innerHeight/2,Me=mn-1,ze=Me*sr*.5,Ve=Me*Hn*.5,st=Me*(rr-Wt.x-Wn),yt=Me*(Qt-Wt.y-fr),Ft=Wt.x-(st-ze),Mt=Wt.y-(yt-Ve);if(Vn<1&&En===1){var jt=In*En,qt=gn*En,wn=ve(),Qn=wn.width,Rt=wn.height;jt<=Qn&&qt<=Rt&&(Ft=0,Mt=0)}Yt({x:Ft,y:Mt,scale:En},Jn)};return{transform:Wt,resetTransform:bn,updateTransform:Yt,dispatchZoomChange:Mn}}var ct=we(48736);function We(Oe,tt,Ct,Nt){var Dt=tt+Ct,ut=(Ct-Nt)/2;if(Ct>Nt){if(tt>0)return(0,Ee.Z)({},Oe,ut);if(tt<0&&Dt<Nt)return(0,Ee.Z)({},Oe,-ut)}else if(tt<0||Dt>Nt)return(0,Ee.Z)({},Oe,tt<0?ut:-ut);return{}}function Ue(Oe,tt,Ct,Nt){var Dt=ve(),ut=Dt.width,Ht=Dt.height,At=null;return Oe<=ut&&tt<=Ht?At={x:0,y:0}:(Oe>ut||tt>Ht)&&(At=(0,ie.Z)((0,ie.Z)({},We("x",Ct,Oe,ut)),We("y",Nt,tt,Ht))),At}var Ze=1,Je=1;function $e(Oe,tt,Ct,Nt,Dt,ut,Ht){var At=Dt.rotate,Wt=Dt.scale,on=Dt.x,bn=Dt.y,Yt=(0,me.useState)(!1),Mn=(0,ce.Z)(Yt,2),Yn=Mn[0],Vn=Mn[1],Jn=(0,me.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),ar=function(Hn){!tt||Hn.button!==0||(Hn.preventDefault(),Hn.stopPropagation(),Jn.current={diffX:Hn.pageX-on,diffY:Hn.pageY-bn,transformX:on,transformY:bn},Vn(!0))},ur=function(Hn){Ct&&Yn&&ut({x:Hn.pageX-Jn.current.diffX,y:Hn.pageY-Jn.current.diffY},"move")},jn=function(){if(Ct&&Yn){Vn(!1);var Hn=Jn.current,In=Hn.transformX,gn=Hn.transformY,Wn=on!==In&&bn!==gn;if(!Wn)return;var fr=Oe.current.offsetWidth*Wt,mn=Oe.current.offsetHeight*Wt,En=Oe.current.getBoundingClientRect(),rr=En.left,Qt=En.top,Me=At%180!==0,ze=Ue(Me?mn:fr,Me?fr:mn,rr,Qt);ze&&ut((0,ie.Z)({},ze),"dragRebound")}},Bn=function(Hn){if(!(!Ct||Hn.deltaY==0)){var In=Math.abs(Hn.deltaY/100),gn=Math.min(In,Je),Wn=Ze+gn*Nt;Hn.deltaY>0&&(Wn=Ze/Wn),Ht(Wn,"wheel",Hn.clientX,Hn.clientY)}};return(0,me.useEffect)(function(){var sr,Hn,In,gn;if(tt){In=(0,De.Z)(window,"mouseup",jn,!1),gn=(0,De.Z)(window,"mousemove",ur,!1);try{window.top!==window.self&&(sr=(0,De.Z)(window.top,"mouseup",jn,!1),Hn=(0,De.Z)(window.top,"mousemove",ur,!1))}catch(Wn){(0,ct.Kp)(!1,"[rc-image] ".concat(Wn))}}return function(){var Wn,fr,mn,En;(Wn=In)===null||Wn===void 0||Wn.remove(),(fr=gn)===null||fr===void 0||fr.remove(),(mn=sr)===null||mn===void 0||mn.remove(),(En=Hn)===null||En===void 0||En.remove()}},[Ct,Yn,on,bn,At,tt]),{isMoving:Yn,onMouseDown:ar,onMouseMove:ur,onMouseUp:jn,onWheel:Bn}}function Qe(Oe){return new Promise(function(tt){if(!Oe){tt(!1);return}var Ct=document.createElement("img");Ct.onerror=function(){return tt(!1)},Ct.onload=function(){return tt(!0)},Ct.src=Oe})}function pt(Oe){var tt=Oe.src,Ct=Oe.isCustomPlaceholder,Nt=Oe.fallback,Dt=(0,me.useState)(Ct?"loading":"normal"),ut=(0,ce.Z)(Dt,2),Ht=ut[0],At=ut[1],Wt=(0,me.useRef)(!1),on=Ht==="error";(0,me.useEffect)(function(){var Yn=!0;return Qe(tt).then(function(Vn){!Vn&&Yn&&At("error")}),function(){Yn=!1}},[tt]),(0,me.useEffect)(function(){Ct&&!Wt.current?At("loading"):on&&At("normal")},[tt]);var bn=function(){At("normal")},Yt=function(Vn){Wt.current=!1,Ht==="loading"&&Vn!==null&&Vn!==void 0&&Vn.complete&&(Vn.naturalWidth||Vn.naturalHeight)&&(Wt.current=!0,bn())},Mn=on&&Nt?{src:Nt}:{onLoad:bn,src:tt};return[Yt,Mn,Ht]}function ht(Oe,tt){var Ct=Oe.x-tt.x,Nt=Oe.y-tt.y;return Math.hypot(Ct,Nt)}function Pt(Oe,tt,Ct,Nt){var Dt=ht(Oe,Ct),ut=ht(tt,Nt);if(Dt===0&&ut===0)return[Oe.x,Oe.y];var Ht=Dt/(Dt+ut),At=Oe.x+Ht*(tt.x-Oe.x),Wt=Oe.y+Ht*(tt.y-Oe.y);return[At,Wt]}function gt(Oe,tt,Ct,Nt,Dt,ut,Ht){var At=Dt.rotate,Wt=Dt.scale,on=Dt.x,bn=Dt.y,Yt=(0,me.useState)(!1),Mn=(0,ce.Z)(Yt,2),Yn=Mn[0],Vn=Mn[1],Jn=(0,me.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),ar=function(Hn){Jn.current=(0,ie.Z)((0,ie.Z)({},Jn.current),Hn)},ur=function(Hn){if(tt){Hn.stopPropagation(),Vn(!0);var In=Hn.touches,gn=In===void 0?[]:In;gn.length>1?ar({point1:{x:gn[0].clientX,y:gn[0].clientY},point2:{x:gn[1].clientX,y:gn[1].clientY},eventType:"touchZoom"}):ar({point1:{x:gn[0].clientX-on,y:gn[0].clientY-bn},eventType:"move"})}},jn=function(Hn){var In=Hn.touches,gn=In===void 0?[]:In,Wn=Jn.current,fr=Wn.point1,mn=Wn.point2,En=Wn.eventType;if(gn.length>1&&En==="touchZoom"){var rr={x:gn[0].clientX,y:gn[0].clientY},Qt={x:gn[1].clientX,y:gn[1].clientY},Me=Pt(fr,mn,rr,Qt),ze=(0,ce.Z)(Me,2),Ve=ze[0],st=ze[1],yt=ht(rr,Qt)/ht(fr,mn);Ht(yt,"touchZoom",Ve,st,!0),ar({point1:rr,point2:Qt,eventType:"touchZoom"})}else En==="move"&&(ut({x:gn[0].clientX-fr.x,y:gn[0].clientY-fr.y},"move"),ar({eventType:"move"}))},Bn=function(){if(Ct){if(Yn&&Vn(!1),ar({eventType:"none"}),Nt>Wt)return ut({x:0,y:0,scale:Nt},"touchZoom");var Hn=Oe.current.offsetWidth*Wt,In=Oe.current.offsetHeight*Wt,gn=Oe.current.getBoundingClientRect(),Wn=gn.left,fr=gn.top,mn=At%180!==0,En=Ue(mn?In:Hn,mn?Hn:In,Wn,fr);En&&ut((0,ie.Z)({},En),"dragRebound")}};return(0,me.useEffect)(function(){var sr;return Ct&&tt&&(sr=(0,De.Z)(window,"touchmove",function(Hn){return Hn.preventDefault()},{passive:!1})),function(){var Hn;(Hn=sr)===null||Hn===void 0||Hn.remove()}},[Ct,tt]),{isTouching:Yn,onTouchStart:ur,onTouchMove:jn,onTouchEnd:Bn}}var bt=["fallback","src","imgRef"],St=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],lt=function(tt){var Ct=tt.fallback,Nt=tt.src,Dt=tt.imgRef,ut=(0,re.Z)(tt,bt),Ht=pt({src:Nt,fallback:Ct}),At=(0,ce.Z)(Ht,2),Wt=At[0],on=At[1];return me.createElement("img",(0,de.Z)({ref:function(Yt){Dt.current=Yt,Wt(Yt)}},ut,on))},_t=function(tt){var Ct=tt.prefixCls,Nt=tt.src,Dt=tt.alt,ut=tt.imageInfo,Ht=tt.fallback,At=tt.movable,Wt=At===void 0?!0:At,on=tt.onClose,bn=tt.visible,Yt=tt.icons,Mn=Yt===void 0?{}:Yt,Yn=tt.rootClassName,Vn=tt.closeIcon,Jn=tt.getContainer,ar=tt.current,ur=ar===void 0?0:ar,jn=tt.count,Bn=jn===void 0?1:jn,sr=tt.countRender,Hn=tt.scaleStep,In=Hn===void 0?.5:Hn,gn=tt.minScale,Wn=gn===void 0?1:gn,fr=tt.maxScale,mn=fr===void 0?50:fr,En=tt.transitionName,rr=En===void 0?"zoom":En,Qt=tt.maskTransitionName,Me=Qt===void 0?"fade":Qt,ze=tt.imageRender,Ve=tt.imgCommonProps,st=tt.toolbarRender,yt=tt.onTransform,Ft=tt.onChange,Mt=(0,re.Z)(tt,St),jt=(0,me.useRef)(),qt=(0,me.useContext)(Pe),wn=qt&&Bn>1,Qn=qt&&Bn>=1,Rt=(0,me.useState)(!0),Et=(0,ce.Z)(Rt,2),sn=Et[0],Zt=Et[1],Lt=Ge(jt,Wn,mn,yt),zt=Lt.transform,nn=Lt.resetTransform,rn=Lt.updateTransform,_n=Lt.dispatchZoomChange,xn=$e(jt,Wt,bn,In,zt,rn,_n),Ln=xn.isMoving,Kt=xn.onMouseDown,Xt=xn.onWheel,Cn=gt(jt,Wt,bn,Wn,zt,rn,_n),Un=Cn.isTouching,Zn=Cn.onTouchStart,er=Cn.onTouchMove,Lr=Cn.onTouchEnd,wr=zt.rotate,tr=zt.scale,zn=ee()((0,Ee.Z)({},"".concat(Ct,"-moving"),Ln));(0,me.useEffect)(function(){sn||Zt(!0)},[sn]);var cr=function(){nn("close")},Xn=function(){_n(Ze+In,"zoomIn")},yr=function(){_n(Ze/(Ze+In),"zoomOut")},Nr=function(){rn({rotate:wr+90},"rotateRight")},Yr=function(){rn({rotate:wr-90},"rotateLeft")},pi=function(){rn({flipX:!zt.flipX},"flipX")},_i=function(){rn({flipY:!zt.flipY},"flipY")},Si=function(){nn("reset")},oi=function($r){var Jr=ur+$r;!Number.isInteger(Jr)||Jr<0||Jr>Bn-1||(Zt(!1),nn($r<0?"prev":"next"),Ft==null||Ft(Jr,ur))},Mi=function($r){!bn||!wn||($r.keyCode===ke.Z.LEFT?oi(-1):$r.keyCode===ke.Z.RIGHT&&oi(1))},Li=function($r){bn&&(tr!==1?rn({x:0,y:0,scale:1},"doubleClick"):_n(Ze+In,"doubleClick",$r.clientX,$r.clientY))};(0,me.useEffect)(function(){var Mr=(0,De.Z)(window,"keydown",Mi,!1);return function(){Mr.remove()}},[bn,wn,ur]);var lr=me.createElement(lt,(0,de.Z)({},Ve,{width:tt.width,height:tt.height,imgRef:jt,className:"".concat(Ct,"-img"),alt:Dt,style:{transform:"translate3d(".concat(zt.x,"px, ").concat(zt.y,"px, 0) scale3d(").concat(zt.flipX?"-":"").concat(tr,", ").concat(zt.flipY?"-":"").concat(tr,", 1) rotate(").concat(wr,"deg)"),transitionDuration:(!sn||Un)&&"0s"},fallback:Ht,src:Nt,onWheel:Xt,onMouseDown:Kt,onDoubleClick:Li,onTouchStart:Zn,onTouchMove:er,onTouchEnd:Lr,onTouchCancel:Lr})),Ar=(0,ie.Z)({url:Nt,alt:Dt},ut);return me.createElement(me.Fragment,null,me.createElement(Ae.Z,(0,de.Z)({transitionName:rr,maskTransitionName:Me,closable:!1,keyboard:!0,prefixCls:Ct,onClose:on,visible:bn,classNames:{wrapper:zn},rootClassName:Yn,getContainer:Jn},Mt,{afterClose:cr}),me.createElement("div",{className:"".concat(Ct,"-img-wrapper")},ze?ze(lr,(0,ie.Z)({transform:zt,image:Ar},qt?{current:ur}:{})):lr)),me.createElement(Ke,{visible:bn,transform:zt,maskTransitionName:Me,closeIcon:Vn,getContainer:Jn,prefixCls:Ct,rootClassName:Yn,icons:Mn,countRender:sr,showSwitch:wn,showProgress:Qn,current:ur,count:Bn,scale:tr,minScale:Wn,maxScale:mn,toolbarRender:st,onActive:oi,onZoomIn:Xn,onZoomOut:yr,onRotateRight:Nr,onRotateLeft:Yr,onFlipX:pi,onFlipY:_i,onClose:on,onReset:Si,zIndex:Mt.zIndex!==void 0?Mt.zIndex+1:void 0,image:Ar}))},dt=_t,nt=we(94480),et=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function ft(Oe){var tt=me.useState({}),Ct=(0,ce.Z)(tt,2),Nt=Ct[0],Dt=Ct[1],ut=me.useCallback(function(At,Wt){return Dt(function(on){return(0,ie.Z)((0,ie.Z)({},on),{},(0,Ee.Z)({},At,Wt))}),function(){Dt(function(on){var bn=(0,ie.Z)({},on);return delete bn[At],bn})}},[]),Ht=me.useMemo(function(){return Oe?Oe.map(function(At){if(typeof At=="string")return{data:{src:At}};var Wt={};return Object.keys(At).forEach(function(on){["src"].concat((0,nt.Z)(et)).includes(on)&&(Wt[on]=At[on])}),{data:Wt}}):Object.keys(Nt).reduce(function(At,Wt){var on=Nt[Wt],bn=on.canPreview,Yt=on.data;return bn&&At.push({data:Yt,id:Wt}),At},[])},[Oe,Nt]);return[Ht,ut,!!Oe]}var wt=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Tt=["src"],Re=function(tt){var Ct,Nt=tt.previewPrefixCls,Dt=Nt===void 0?"rc-image-preview":Nt,ut=tt.children,Ht=tt.icons,At=Ht===void 0?{}:Ht,Wt=tt.items,on=tt.preview,bn=tt.fallback,Yt=(0,se.Z)(on)==="object"?on:{},Mn=Yt.visible,Yn=Yt.onVisibleChange,Vn=Yt.getContainer,Jn=Yt.current,ar=Yt.movable,ur=Yt.minScale,jn=Yt.maxScale,Bn=Yt.countRender,sr=Yt.closeIcon,Hn=Yt.onChange,In=Yt.onTransform,gn=Yt.toolbarRender,Wn=Yt.imageRender,fr=(0,re.Z)(Yt,wt),mn=ft(Wt),En=(0,ce.Z)(mn,3),rr=En[0],Qt=En[1],Me=En[2],ze=(0,pe.Z)(0,{value:Jn}),Ve=(0,ce.Z)(ze,2),st=Ve[0],yt=Ve[1],Ft=(0,me.useState)(!1),Mt=(0,ce.Z)(Ft,2),jt=Mt[0],qt=Mt[1],wn=((Ct=rr[st])===null||Ct===void 0?void 0:Ct.data)||{},Qn=wn.src,Rt=(0,re.Z)(wn,Tt),Et=(0,pe.Z)(!!Mn,{value:Mn,onChange:function(Un,Zn){Yn==null||Yn(Un,Zn,st)}}),sn=(0,ce.Z)(Et,2),Zt=sn[0],Lt=sn[1],zt=(0,me.useState)(null),nn=(0,ce.Z)(zt,2),rn=nn[0],_n=nn[1],xn=me.useCallback(function(Cn,Un,Zn,er){var Lr=Me?rr.findIndex(function(wr){return wr.data.src===Un}):rr.findIndex(function(wr){return wr.id===Cn});yt(Lr<0?0:Lr),Lt(!0),_n({x:Zn,y:er}),qt(!0)},[rr,Me]);me.useEffect(function(){Zt?jt||yt(0):qt(!1)},[Zt]);var Ln=function(Un,Zn){yt(Un),Hn==null||Hn(Un,Zn)},Kt=function(){Lt(!1),_n(null)},Xt=me.useMemo(function(){return{register:Qt,onPreview:xn}},[Qt,xn]);return me.createElement(Pe.Provider,{value:Xt},ut,me.createElement(dt,(0,de.Z)({"aria-hidden":!Zt,movable:ar,visible:Zt,prefixCls:Dt,closeIcon:sr,onClose:Kt,mousePosition:rn,imgCommonProps:Rt,src:Qn,fallback:bn,icons:At,minScale:ur,maxScale:jn,getContainer:Vn,current:st,count:rr.length,countRender:Bn,onTransform:In,toolbarRender:gn,imageRender:Wn,onChange:Ln},fr)))},Le=Re,Te=0;function je(Oe,tt){var Ct=me.useState(function(){return Te+=1,String(Te)}),Nt=(0,ce.Z)(Ct,1),Dt=Nt[0],ut=me.useContext(Pe),Ht={data:tt,canPreview:Oe};return me.useEffect(function(){if(ut)return ut.register(Dt,Ht)},[]),me.useEffect(function(){ut&&ut.register(Dt,Ht)},[Oe,tt]),Dt}var ye=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],le=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],_e=function(tt){var Ct=tt.src,Nt=tt.alt,Dt=tt.onPreviewClose,ut=tt.prefixCls,Ht=ut===void 0?"rc-image":ut,At=tt.previewPrefixCls,Wt=At===void 0?"".concat(Ht,"-preview"):At,on=tt.placeholder,bn=tt.fallback,Yt=tt.width,Mn=tt.height,Yn=tt.style,Vn=tt.preview,Jn=Vn===void 0?!0:Vn,ar=tt.className,ur=tt.onClick,jn=tt.onError,Bn=tt.wrapperClassName,sr=tt.wrapperStyle,Hn=tt.rootClassName,In=(0,re.Z)(tt,ye),gn=on&&on!==!0,Wn=(0,se.Z)(Jn)==="object"?Jn:{},fr=Wn.src,mn=Wn.visible,En=mn===void 0?void 0:mn,rr=Wn.onVisibleChange,Qt=rr===void 0?Dt:rr,Me=Wn.getContainer,ze=Me===void 0?void 0:Me,Ve=Wn.mask,st=Wn.maskClassName,yt=Wn.movable,Ft=Wn.icons,Mt=Wn.scaleStep,jt=Wn.minScale,qt=Wn.maxScale,wn=Wn.imageRender,Qn=Wn.toolbarRender,Rt=(0,re.Z)(Wn,le),Et=fr!=null?fr:Ct,sn=(0,pe.Z)(!!En,{value:En,onChange:Qt}),Zt=(0,ce.Z)(sn,2),Lt=Zt[0],zt=Zt[1],nn=pt({src:Ct,isCustomPlaceholder:gn,fallback:bn}),rn=(0,ce.Z)(nn,3),_n=rn[0],xn=rn[1],Ln=rn[2],Kt=(0,me.useState)(null),Xt=(0,ce.Z)(Kt,2),Cn=Xt[0],Un=Xt[1],Zn=(0,me.useContext)(Pe),er=!!Jn,Lr=function(){zt(!1),Un(null)},wr=ee()(Ht,Bn,Hn,(0,Ee.Z)({},"".concat(Ht,"-error"),Ln==="error")),tr=(0,me.useMemo)(function(){var yr={};return et.forEach(function(Nr){tt[Nr]!==void 0&&(yr[Nr]=tt[Nr])}),yr},et.map(function(yr){return tt[yr]})),zn=(0,me.useMemo)(function(){return(0,ie.Z)((0,ie.Z)({},tr),{},{src:Et})},[Et,tr]),cr=je(er,zn),Xn=function(Nr){var Yr=xe(Nr.target),pi=Yr.left,_i=Yr.top;Zn?Zn.onPreview(cr,Et,pi,_i):(Un({x:pi,y:_i}),zt(!0)),ur==null||ur(Nr)};return me.createElement(me.Fragment,null,me.createElement("div",(0,de.Z)({},In,{className:wr,onClick:er?Xn:ur,style:(0,ie.Z)({width:Yt,height:Mn},sr)}),me.createElement("img",(0,de.Z)({},tr,{className:ee()("".concat(Ht,"-img"),(0,Ee.Z)({},"".concat(Ht,"-img-placeholder"),on===!0),ar),style:(0,ie.Z)({height:Mn},Yn),ref:_n},xn,{width:Yt,height:Mn,onError:jn})),Ln==="loading"&&me.createElement("div",{"aria-hidden":"true",className:"".concat(Ht,"-placeholder")},on),Ve&&er&&me.createElement("div",{className:ee()("".concat(Ht,"-mask"),st),style:{display:(Yn==null?void 0:Yn.display)==="none"?"none":void 0}},Ve)),!Zn&&er&&me.createElement(dt,(0,de.Z)({"aria-hidden":!Lt,visible:Lt,prefixCls:Wt,onClose:Lr,mousePosition:Cn,src:Et,alt:Nt,imageInfo:{width:Yt,height:Mn},fallback:bn,getContainer:ze,icons:Ft,movable:yt,scaleStep:Mt,minScale:jt,maxScale:qt,rootClassName:Hn,imageRender:wn,imgCommonProps:tr,toolbarRender:Qn},Rt)))};_e.PreviewGroup=Le;var Ne=_e,Ye=Ne},20922:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return gt}});var de=we(54476),ie=we(20068),Ee=we(76190),ce=we(42978),se=we(75931),re=we(67732),ue=we(83652);function ee(){return typeof BigInt=="function"}function te(bt){return!bt&&bt!==0&&!Number.isNaN(bt)||!String(bt).trim()}function E(bt){var St=bt.trim(),lt=St.startsWith("-");lt&&(St=St.slice(1)),St=St.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),St.startsWith(".")&&(St="0".concat(St));var _t=St||"0",dt=_t.split("."),nt=dt[0]||"0",et=dt[1]||"0";nt==="0"&&et==="0"&&(lt=!1);var ft=lt?"-":"";return{negative:lt,negativeStr:ft,trimStr:_t,integerStr:nt,decimalStr:et,fullStr:"".concat(ft).concat(_t)}}function y(bt){var St=String(bt);return!Number.isNaN(Number(St))&&St.includes("e")}function z(bt){var St=String(bt);if(y(bt)){var lt=Number(St.slice(St.indexOf("e-")+2)),_t=St.match(/\.(\d+)/);return _t!=null&&_t[1]&&(lt+=_t[1].length),lt}return St.includes(".")&&ne(St)?St.length-St.indexOf(".")-1:0}function x(bt){var St=String(bt);if(y(bt)){if(bt>Number.MAX_SAFE_INTEGER)return String(ee()?BigInt(bt).toString():Number.MAX_SAFE_INTEGER);if(bt<Number.MIN_SAFE_INTEGER)return String(ee()?BigInt(bt).toString():Number.MIN_SAFE_INTEGER);St=bt.toFixed(z(St))}return E(St).fullStr}function ne(bt){return typeof bt=="number"?!Number.isNaN(bt):bt?/^\s*-?\d+(\.\d+)?\s*$/.test(bt)||/^\s*-?\d+\.\s*$/.test(bt)||/^\s*-?\.\d+\s*$/.test(bt):!1}var ae=function(){function bt(St){if((0,re.Z)(this,bt),(0,ie.Z)(this,"origin",""),(0,ie.Z)(this,"negative",void 0),(0,ie.Z)(this,"integer",void 0),(0,ie.Z)(this,"decimal",void 0),(0,ie.Z)(this,"decimalLen",void 0),(0,ie.Z)(this,"empty",void 0),(0,ie.Z)(this,"nan",void 0),te(St)){this.empty=!0;return}if(this.origin=String(St),St==="-"||Number.isNaN(St)){this.nan=!0;return}var lt=St;if(y(lt)&&(lt=Number(lt)),lt=typeof lt=="string"?lt:x(lt),ne(lt)){var _t=E(lt);this.negative=_t.negative;var dt=_t.trimStr.split(".");this.integer=BigInt(dt[0]);var nt=dt[1]||"0";this.decimal=BigInt(nt),this.decimalLen=nt.length}else this.nan=!0}return(0,ue.Z)(bt,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(lt){var _t="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(lt,"0"));return BigInt(_t)}},{key:"negate",value:function(){var lt=new bt(this.toString());return lt.negative=!lt.negative,lt}},{key:"cal",value:function(lt,_t,dt){var nt=Math.max(this.getDecimalStr().length,lt.getDecimalStr().length),et=this.alignDecimal(nt),ft=lt.alignDecimal(nt),wt=_t(et,ft).toString(),Tt=dt(nt),Re=E(wt),Le=Re.negativeStr,Te=Re.trimStr,je="".concat(Le).concat(Te.padStart(Tt+1,"0"));return new bt("".concat(je.slice(0,-Tt),".").concat(je.slice(-Tt)))}},{key:"add",value:function(lt){if(this.isInvalidate())return new bt(lt);var _t=new bt(lt);return _t.isInvalidate()?this:this.cal(_t,function(dt,nt){return dt+nt},function(dt){return dt})}},{key:"multi",value:function(lt){var _t=new bt(lt);return this.isInvalidate()||_t.isInvalidate()?new bt(NaN):this.cal(_t,function(dt,nt){return dt*nt},function(dt){return dt*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(lt){return this.toString()===(lt==null?void 0:lt.toString())}},{key:"lessEquals",value:function(lt){return this.add(lt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return lt?this.isInvalidate()?"":E("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),bt}(),oe=function(){function bt(St){if((0,re.Z)(this,bt),(0,ie.Z)(this,"origin",""),(0,ie.Z)(this,"number",void 0),(0,ie.Z)(this,"empty",void 0),te(St)){this.empty=!0;return}this.origin=String(St),this.number=Number(St)}return(0,ue.Z)(bt,[{key:"negate",value:function(){return new bt(-this.toNumber())}},{key:"add",value:function(lt){if(this.isInvalidate())return new bt(lt);var _t=Number(lt);if(Number.isNaN(_t))return this;var dt=this.number+_t;if(dt>Number.MAX_SAFE_INTEGER)return new bt(Number.MAX_SAFE_INTEGER);if(dt<Number.MIN_SAFE_INTEGER)return new bt(Number.MIN_SAFE_INTEGER);var nt=Math.max(z(this.number),z(_t));return new bt(dt.toFixed(nt))}},{key:"multi",value:function(lt){var _t=Number(lt);if(this.isInvalidate()||Number.isNaN(_t))return new bt(NaN);var dt=this.number*_t;if(dt>Number.MAX_SAFE_INTEGER)return new bt(Number.MAX_SAFE_INTEGER);if(dt<Number.MIN_SAFE_INTEGER)return new bt(Number.MIN_SAFE_INTEGER);var nt=Math.max(z(this.number),z(_t));return new bt(dt.toFixed(nt))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(lt){return this.toNumber()===(lt==null?void 0:lt.toNumber())}},{key:"lessEquals",value:function(lt){return this.add(lt.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return lt?this.isInvalidate()?"":x(this.number):this.origin}}]),bt}();function ge(bt){return ee()?new ae(bt):new oe(bt)}function Se(bt,St,lt){var _t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(bt==="")return"";var dt=E(bt),nt=dt.negativeStr,et=dt.integerStr,ft=dt.decimalStr,wt="".concat(St).concat(ft),Tt="".concat(nt).concat(et);if(lt>=0){var Re=Number(ft[lt]);if(Re>=5&&!_t){var Le=ge(bt).add("".concat(nt,"0.").concat("0".repeat(lt)).concat(10-Re));return Se(Le.toString(),St,lt,_t)}return lt===0?Tt:"".concat(Tt).concat(St).concat(ft.padEnd(lt,"0").slice(0,lt))}return wt===".0"?Tt:"".concat(Tt).concat(wt)}var ve=ge,be=we(92310),xe=we.n(be),pe=we(36901),me=we(34280);function Ae(bt,St){return typeof Proxy!="undefined"&&bt?new Proxy(bt,{get:function(_t,dt){if(St[dt])return St[dt];var nt=_t[dt];return typeof nt=="function"?nt.bind(_t):nt}}):bt}var De=we(8654),ke=we(59301),Ie=we(48736);function Fe(bt,St){var lt=(0,ke.useRef)(null);function _t(){try{var nt=bt.selectionStart,et=bt.selectionEnd,ft=bt.value,wt=ft.substring(0,nt),Tt=ft.substring(et);lt.current={start:nt,end:et,value:ft,beforeTxt:wt,afterTxt:Tt}}catch(Re){}}function dt(){if(bt&&lt.current&&St)try{var nt=bt.value,et=lt.current,ft=et.beforeTxt,wt=et.afterTxt,Tt=et.start,Re=nt.length;if(nt.startsWith(ft))Re=ft.length;else if(nt.endsWith(wt))Re=nt.length-lt.current.afterTxt.length;else{var Le=ft[Tt-1],Te=nt.indexOf(Le,Tt-1);Te!==-1&&(Re=Te+1)}bt.setSelectionRange(Re,Re)}catch(je){(0,Ie.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(je.message))}}return[_t,dt]}var Pe=we(49658),qe=function(){var St=(0,ke.useState)(!1),lt=(0,ce.Z)(St,2),_t=lt[0],dt=lt[1];return(0,me.Z)(function(){dt((0,Pe.Z)())},[]),_t},Ke=qe,ot=we(16089),He=200,rt=600;function Ge(bt){var St=bt.prefixCls,lt=bt.upNode,_t=bt.downNode,dt=bt.upDisabled,nt=bt.downDisabled,et=bt.onStep,ft=ke.useRef(),wt=ke.useRef([]),Tt=ke.useRef();Tt.current=et;var Re=function(){clearTimeout(ft.current)},Le=function(Oe,tt){Oe.preventDefault(),Re(),Tt.current(tt);function Ct(){Tt.current(tt),ft.current=setTimeout(Ct,He)}ft.current=setTimeout(Ct,rt)};ke.useEffect(function(){return function(){Re(),wt.current.forEach(function(Ye){return ot.Z.cancel(Ye)})}},[]);var Te=Ke();if(Te)return null;var je="".concat(St,"-handler"),ye=xe()(je,"".concat(je,"-up"),(0,ie.Z)({},"".concat(je,"-up-disabled"),dt)),le=xe()(je,"".concat(je,"-down"),(0,ie.Z)({},"".concat(je,"-down-disabled"),nt)),_e=function(){return wt.current.push((0,ot.Z)(Re))},Ne={unselectable:"on",role:"button",onMouseUp:_e,onMouseLeave:_e};return ke.createElement("div",{className:"".concat(je,"-wrap")},ke.createElement("span",(0,de.Z)({},Ne,{onMouseDown:function(Oe){Le(Oe,!0)},"aria-label":"Increase Value","aria-disabled":dt,className:ye}),lt||ke.createElement("span",{unselectable:"on",className:"".concat(St,"-handler-up-inner")})),ke.createElement("span",(0,de.Z)({},Ne,{onMouseDown:function(Oe){Le(Oe,!1)},"aria-label":"Decrease Value","aria-disabled":nt,className:le}),_t||ke.createElement("span",{unselectable:"on",className:"".concat(St,"-handler-down-inner")})))}function ct(bt){var St=typeof bt=="number"?x(bt):E(bt).fullStr,lt=St.includes(".");return lt?E(St.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:bt+"0"}var We=we(30292),Ue=function(){var bt=(0,ke.useRef)(0),St=function(){ot.Z.cancel(bt.current)};return(0,ke.useEffect)(function(){return St},[]),function(lt){St(),bt.current=(0,ot.Z)(function(){lt()})}},Ze=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Je=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],$e=function(St,lt){return St||lt.isEmpty()?lt.toString():lt.toNumber()},Qe=function(St){var lt=ve(St);return lt.isInvalidate()?null:lt},pt=ke.forwardRef(function(bt,St){var lt=bt.prefixCls,_t=bt.className,dt=bt.style,nt=bt.min,et=bt.max,ft=bt.step,wt=ft===void 0?1:ft,Tt=bt.defaultValue,Re=bt.value,Le=bt.disabled,Te=bt.readOnly,je=bt.upHandler,ye=bt.downHandler,le=bt.keyboard,_e=bt.changeOnWheel,Ne=_e===void 0?!1:_e,Ye=bt.controls,Oe=Ye===void 0?!0:Ye,tt=bt.classNames,Ct=bt.stringMode,Nt=bt.parser,Dt=bt.formatter,ut=bt.precision,Ht=bt.decimalSeparator,At=bt.onChange,Wt=bt.onInput,on=bt.onPressEnter,bn=bt.onStep,Yt=bt.changeOnBlur,Mn=Yt===void 0?!0:Yt,Yn=bt.domRef,Vn=(0,se.Z)(bt,Ze),Jn="".concat(lt,"-input"),ar=ke.useRef(null),ur=ke.useState(!1),jn=(0,ce.Z)(ur,2),Bn=jn[0],sr=jn[1],Hn=ke.useRef(!1),In=ke.useRef(!1),gn=ke.useRef(!1),Wn=ke.useState(function(){return ve(Re!=null?Re:Tt)}),fr=(0,ce.Z)(Wn,2),mn=fr[0],En=fr[1];function rr(tr){Re===void 0&&En(tr)}var Qt=ke.useCallback(function(tr,zn){if(!zn)return ut>=0?ut:Math.max(z(tr),z(wt))},[ut,wt]),Me=ke.useCallback(function(tr){var zn=String(tr);if(Nt)return Nt(zn);var cr=zn;return Ht&&(cr=cr.replace(Ht,".")),cr.replace(/[^\w.-]+/g,"")},[Nt,Ht]),ze=ke.useRef(""),Ve=ke.useCallback(function(tr,zn){if(Dt)return Dt(tr,{userTyping:zn,input:String(ze.current)});var cr=typeof tr=="number"?x(tr):tr;if(!zn){var Xn=Qt(cr,zn);if(ne(cr)&&(Ht||Xn>=0)){var yr=Ht||".";cr=Se(cr,yr,Xn)}}return cr},[Dt,Qt,Ht]),st=ke.useState(function(){var tr=Tt!=null?Tt:Re;return mn.isInvalidate()&&["string","number"].includes((0,Ee.Z)(tr))?Number.isNaN(tr)?"":tr:Ve(mn.toString(),!1)}),yt=(0,ce.Z)(st,2),Ft=yt[0],Mt=yt[1];ze.current=Ft;function jt(tr,zn){Mt(Ve(tr.isInvalidate()?tr.toString(!1):tr.toString(!zn),zn))}var qt=ke.useMemo(function(){return Qe(et)},[et,ut]),wn=ke.useMemo(function(){return Qe(nt)},[nt,ut]),Qn=ke.useMemo(function(){return!qt||!mn||mn.isInvalidate()?!1:qt.lessEquals(mn)},[qt,mn]),Rt=ke.useMemo(function(){return!wn||!mn||mn.isInvalidate()?!1:mn.lessEquals(wn)},[wn,mn]),Et=Fe(ar.current,Bn),sn=(0,ce.Z)(Et,2),Zt=sn[0],Lt=sn[1],zt=function(zn){return qt&&!zn.lessEquals(qt)?qt:wn&&!wn.lessEquals(zn)?wn:null},nn=function(zn){return!zt(zn)},rn=function(zn,cr){var Xn=zn,yr=nn(Xn)||Xn.isEmpty();if(!Xn.isEmpty()&&!cr&&(Xn=zt(Xn)||Xn,yr=!0),!Te&&!Le&&yr){var Nr=Xn.toString(),Yr=Qt(Nr,cr);return Yr>=0&&(Xn=ve(Se(Nr,".",Yr)),nn(Xn)||(Xn=ve(Se(Nr,".",Yr,!0)))),Xn.equals(mn)||(rr(Xn),At==null||At(Xn.isEmpty()?null:$e(Ct,Xn)),Re===void 0&&jt(Xn,cr)),Xn}return mn},_n=Ue(),xn=function tr(zn){if(Zt(),ze.current=zn,Mt(zn),!In.current){var cr=Me(zn),Xn=ve(cr);Xn.isNaN()||rn(Xn,!0)}Wt==null||Wt(zn),_n(function(){var yr=zn;Nt||(yr=zn.replace(/。/g,".")),yr!==zn&&tr(yr)})},Ln=function(){In.current=!0},Kt=function(){In.current=!1,xn(ar.current.value)},Xt=function(zn){xn(zn.target.value)},Cn=function(zn){var cr;if(!(zn&&Qn||!zn&&Rt)){Hn.current=!1;var Xn=ve(gn.current?ct(wt):wt);zn||(Xn=Xn.negate());var yr=(mn||ve(0)).add(Xn.toString()),Nr=rn(yr,!1);bn==null||bn($e(Ct,Nr),{offset:gn.current?ct(wt):wt,type:zn?"up":"down"}),(cr=ar.current)===null||cr===void 0||cr.focus()}},Un=function(zn){var cr=ve(Me(Ft)),Xn;cr.isNaN()?Xn=rn(mn,zn):Xn=rn(cr,zn),Re!==void 0?jt(mn,!1):Xn.isNaN()||jt(Xn,!1)},Zn=function(){Hn.current=!0},er=function(zn){var cr=zn.key,Xn=zn.shiftKey;Hn.current=!0,gn.current=Xn,cr==="Enter"&&(In.current||(Hn.current=!1),Un(!1),on==null||on(zn)),le!==!1&&!In.current&&["Up","ArrowUp","Down","ArrowDown"].includes(cr)&&(Cn(cr==="Up"||cr==="ArrowUp"),zn.preventDefault())},Lr=function(){Hn.current=!1,gn.current=!1};ke.useEffect(function(){if(Ne&&Bn){var tr=function(Xn){Cn(Xn.deltaY<0),Xn.preventDefault()},zn=ar.current;if(zn)return zn.addEventListener("wheel",tr,{passive:!1}),function(){return zn.removeEventListener("wheel",tr)}}});var wr=function(){Mn&&Un(!1),sr(!1),Hn.current=!1};return(0,me.o)(function(){mn.isInvalidate()||jt(mn,!1)},[ut,Dt]),(0,me.o)(function(){var tr=ve(Re);En(tr);var zn=ve(Me(Ft));(!tr.equals(zn)||!Hn.current||Dt)&&jt(tr,Hn.current)},[Re]),(0,me.o)(function(){Dt&&Lt()},[Ft]),ke.createElement("div",{ref:Yn,className:xe()(lt,_t,(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(lt,"-focused"),Bn),"".concat(lt,"-disabled"),Le),"".concat(lt,"-readonly"),Te),"".concat(lt,"-not-a-number"),mn.isNaN()),"".concat(lt,"-out-of-range"),!mn.isInvalidate()&&!nn(mn))),style:dt,onFocus:function(){sr(!0)},onBlur:wr,onKeyDown:er,onKeyUp:Lr,onCompositionStart:Ln,onCompositionEnd:Kt,onBeforeInput:Zn},Oe&&ke.createElement(Ge,{prefixCls:lt,upNode:je,downNode:ye,upDisabled:Qn,downDisabled:Rt,onStep:Cn}),ke.createElement("div",{className:"".concat(Jn,"-wrap")},ke.createElement("input",(0,de.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":nt,"aria-valuemax":et,"aria-valuenow":mn.isInvalidate()?null:mn.toString(),step:wt},Vn,{ref:(0,De.sQ)(ar,St),className:Jn,value:Ft,onChange:Xt,disabled:Le,readOnly:Te}))))}),ht=ke.forwardRef(function(bt,St){var lt=bt.disabled,_t=bt.style,dt=bt.prefixCls,nt=dt===void 0?"rc-input-number":dt,et=bt.value,ft=bt.prefix,wt=bt.suffix,Tt=bt.addonBefore,Re=bt.addonAfter,Le=bt.className,Te=bt.classNames,je=(0,se.Z)(bt,Je),ye=ke.useRef(null),le=ke.useRef(null),_e=ke.useRef(null),Ne=function(Oe){_e.current&&(0,We.nH)(_e.current,Oe)};return ke.useImperativeHandle(St,function(){return Ae(_e.current,{focus:Ne,nativeElement:ye.current.nativeElement||le.current})}),ke.createElement(pe.BaseInput,{className:Le,triggerFocus:Ne,prefixCls:nt,value:et,disabled:lt,style:_t,prefix:ft,suffix:wt,addonAfter:Re,addonBefore:Tt,classNames:Te,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:ye},ke.createElement(pt,(0,de.Z)({prefixCls:nt,disabled:lt,ref:_e,domRef:le,className:Te==null?void 0:Te.input},je)))}),Pt=ht,gt=Pt},23425:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return Ae}});var de=we(20068),ie=we(54476),Ee=we(76190),ce=we(33885),se=we(42978),re=we(92310),ue=we.n(re),ee=we(18929),te=we(10228),E=we(26112),y=we(48736),z=we(59301),x=we(17119),ne=[10,20,50,100],ae=function(ke){var Ie=ke.pageSizeOptions,Fe=Ie===void 0?ne:Ie,Pe=ke.locale,qe=ke.changeSize,Ke=ke.pageSize,ot=ke.goButton,He=ke.quickGo,rt=ke.rootPrefixCls,Ge=ke.disabled,ct=ke.buildOptionText,We=ke.showSizeChanger,Ue=ke.sizeChangerRender,Ze=z.useState(""),Je=(0,se.Z)(Ze,2),$e=Je[0],Qe=Je[1],pt=function(){return!$e||Number.isNaN($e)?void 0:Number($e)},ht=typeof ct=="function"?ct:function(et){return"".concat(et," ").concat(Pe.items_per_page)},Pt=function(ft){Qe(ft.target.value)},gt=function(ft){ot||$e===""||(Qe(""),!(ft.relatedTarget&&(ft.relatedTarget.className.indexOf("".concat(rt,"-item-link"))>=0||ft.relatedTarget.className.indexOf("".concat(rt,"-item"))>=0))&&(He==null||He(pt())))},bt=function(ft){$e!==""&&(ft.keyCode===te.Z.ENTER||ft.type==="click")&&(Qe(""),He==null||He(pt()))},St=function(){return Fe.some(function(ft){return ft.toString()===Ke.toString()})?Fe:Fe.concat([Ke]).sort(function(ft,wt){var Tt=Number.isNaN(Number(ft))?0:Number(ft),Re=Number.isNaN(Number(wt))?0:Number(wt);return Tt-Re})},lt="".concat(rt,"-options");if(!We&&!He)return null;var _t=null,dt=null,nt=null;return We&&Ue&&(_t=Ue({disabled:Ge,size:Ke,onSizeChange:function(ft){qe==null||qe(Number(ft))},"aria-label":Pe.page_size,className:"".concat(lt,"-size-changer"),options:St().map(function(et){return{label:ht(et),value:et}})})),He&&(ot&&(nt=typeof ot=="boolean"?z.createElement("button",{type:"button",onClick:bt,onKeyUp:bt,disabled:Ge,className:"".concat(lt,"-quick-jumper-button")},Pe.jump_to_confirm):z.createElement("span",{onClick:bt,onKeyUp:bt},ot)),dt=z.createElement("div",{className:"".concat(lt,"-quick-jumper")},Pe.jump_to,z.createElement("input",{disabled:Ge,type:"text",value:$e,onChange:Pt,onKeyUp:bt,onBlur:gt,"aria-label":Pe.page}),Pe.page,nt)),z.createElement("li",{className:lt},_t,dt)},oe=ae,ge=function(ke){var Ie=ke.rootPrefixCls,Fe=ke.page,Pe=ke.active,qe=ke.className,Ke=ke.showTitle,ot=ke.onClick,He=ke.onKeyPress,rt=ke.itemRender,Ge="".concat(Ie,"-item"),ct=ue()(Ge,"".concat(Ge,"-").concat(Fe),(0,de.Z)((0,de.Z)({},"".concat(Ge,"-active"),Pe),"".concat(Ge,"-disabled"),!Fe),qe),We=function(){ot(Fe)},Ue=function($e){He($e,ot,Fe)},Ze=rt(Fe,"page",z.createElement("a",{rel:"nofollow"},Fe));return Ze?z.createElement("li",{title:Ke?String(Fe):null,className:ct,onClick:We,onKeyDown:Ue,tabIndex:0},Ze):null},Se=ge,ve=function(ke,Ie,Fe){return Fe};function be(){}function xe(De){var ke=Number(De);return typeof ke=="number"&&!Number.isNaN(ke)&&isFinite(ke)&&Math.floor(ke)===ke}function pe(De,ke,Ie){var Fe=typeof De=="undefined"?ke:De;return Math.floor((Ie-1)/Fe)+1}var me=function(ke){var Ie=ke.prefixCls,Fe=Ie===void 0?"rc-pagination":Ie,Pe=ke.selectPrefixCls,qe=Pe===void 0?"rc-select":Pe,Ke=ke.className,ot=ke.current,He=ke.defaultCurrent,rt=He===void 0?1:He,Ge=ke.total,ct=Ge===void 0?0:Ge,We=ke.pageSize,Ue=ke.defaultPageSize,Ze=Ue===void 0?10:Ue,Je=ke.onChange,$e=Je===void 0?be:Je,Qe=ke.hideOnSinglePage,pt=ke.align,ht=ke.showPrevNextJumpers,Pt=ht===void 0?!0:ht,gt=ke.showQuickJumper,bt=ke.showLessItems,St=ke.showTitle,lt=St===void 0?!0:St,_t=ke.onShowSizeChange,dt=_t===void 0?be:_t,nt=ke.locale,et=nt===void 0?x.Z:nt,ft=ke.style,wt=ke.totalBoundaryShowSizeChanger,Tt=wt===void 0?50:wt,Re=ke.disabled,Le=ke.simple,Te=ke.showTotal,je=ke.showSizeChanger,ye=je===void 0?ct>Tt:je,le=ke.sizeChangerRender,_e=ke.pageSizeOptions,Ne=ke.itemRender,Ye=Ne===void 0?ve:Ne,Oe=ke.jumpPrevIcon,tt=ke.jumpNextIcon,Ct=ke.prevIcon,Nt=ke.nextIcon,Dt=z.useRef(null),ut=(0,ee.Z)(10,{value:We,defaultValue:Ze}),Ht=(0,se.Z)(ut,2),At=Ht[0],Wt=Ht[1],on=(0,ee.Z)(1,{value:ot,defaultValue:rt,postState:function(Ar){return Math.max(1,Math.min(Ar,pe(void 0,At,ct)))}}),bn=(0,se.Z)(on,2),Yt=bn[0],Mn=bn[1],Yn=z.useState(Yt),Vn=(0,se.Z)(Yn,2),Jn=Vn[0],ar=Vn[1];(0,z.useEffect)(function(){ar(Yt)},[Yt]);var ur=$e!==be,jn="current"in ke,Bn=Math.max(1,Yt-(bt?3:5)),sr=Math.min(pe(void 0,At,ct),Yt+(bt?3:5));function Hn(lr,Ar){var Mr=lr||z.createElement("button",{type:"button","aria-label":Ar,className:"".concat(Fe,"-item-link")});return typeof lr=="function"&&(Mr=z.createElement(lr,(0,ce.Z)({},ke))),Mr}function In(lr){var Ar=lr.target.value,Mr=pe(void 0,At,ct),$r;return Ar===""?$r=Ar:Number.isNaN(Number(Ar))?$r=Jn:Ar>=Mr?$r=Mr:$r=Number(Ar),$r}function gn(lr){return xe(lr)&&lr!==Yt&&xe(ct)&&ct>0}var Wn=ct>At?gt:!1;function fr(lr){(lr.keyCode===te.Z.UP||lr.keyCode===te.Z.DOWN)&&lr.preventDefault()}function mn(lr){var Ar=In(lr);switch(Ar!==Jn&&ar(Ar),lr.keyCode){case te.Z.ENTER:Qt(Ar);break;case te.Z.UP:Qt(Ar-1);break;case te.Z.DOWN:Qt(Ar+1);break;default:break}}function En(lr){Qt(In(lr))}function rr(lr){var Ar=pe(lr,At,ct),Mr=Yt>Ar&&Ar!==0?Ar:Yt;Wt(lr),ar(Mr),dt==null||dt(Yt,lr),Mn(Mr),$e==null||$e(Mr,lr)}function Qt(lr){if(gn(lr)&&!Re){var Ar=pe(void 0,At,ct),Mr=lr;return lr>Ar?Mr=Ar:lr<1&&(Mr=1),Mr!==Jn&&ar(Mr),Mn(Mr),$e==null||$e(Mr,At),Mr}return Yt}var Me=Yt>1,ze=Yt<pe(void 0,At,ct);function Ve(){Me&&Qt(Yt-1)}function st(){ze&&Qt(Yt+1)}function yt(){Qt(Bn)}function Ft(){Qt(sr)}function Mt(lr,Ar){if(lr.key==="Enter"||lr.charCode===te.Z.ENTER||lr.keyCode===te.Z.ENTER){for(var Mr=arguments.length,$r=new Array(Mr>2?Mr-2:0),Jr=2;Jr<Mr;Jr++)$r[Jr-2]=arguments[Jr];Ar.apply(void 0,$r)}}function jt(lr){Mt(lr,Ve)}function qt(lr){Mt(lr,st)}function wn(lr){Mt(lr,yt)}function Qn(lr){Mt(lr,Ft)}function Rt(lr){var Ar=Ye(lr,"prev",Hn(Ct,"prev page"));return z.isValidElement(Ar)?z.cloneElement(Ar,{disabled:!Me}):Ar}function Et(lr){var Ar=Ye(lr,"next",Hn(Nt,"next page"));return z.isValidElement(Ar)?z.cloneElement(Ar,{disabled:!ze}):Ar}function sn(lr){(lr.type==="click"||lr.keyCode===te.Z.ENTER)&&Qt(Jn)}var Zt=null,Lt=(0,E.Z)(ke,{aria:!0,data:!0}),zt=Te&&z.createElement("li",{className:"".concat(Fe,"-total-text")},Te(ct,[ct===0?0:(Yt-1)*At+1,Yt*At>ct?ct:Yt*At])),nn=null,rn=pe(void 0,At,ct);if(Qe&&ct<=At)return null;var _n=[],xn={rootPrefixCls:Fe,onClick:Qt,onKeyPress:Mt,showTitle:lt,itemRender:Ye,page:-1},Ln=Yt-1>0?Yt-1:0,Kt=Yt+1<rn?Yt+1:rn,Xt=gt&&gt.goButton,Cn=(0,Ee.Z)(Le)==="object"?Le.readOnly:!Le,Un=Xt,Zn=null;Le&&(Xt&&(typeof Xt=="boolean"?Un=z.createElement("button",{type:"button",onClick:sn,onKeyUp:sn},et.jump_to_confirm):Un=z.createElement("span",{onClick:sn,onKeyUp:sn},Xt),Un=z.createElement("li",{title:lt?"".concat(et.jump_to).concat(Yt,"/").concat(rn):null,className:"".concat(Fe,"-simple-pager")},Un)),Zn=z.createElement("li",{title:lt?"".concat(Yt,"/").concat(rn):null,className:"".concat(Fe,"-simple-pager")},Cn?Jn:z.createElement("input",{type:"text","aria-label":et.jump_to,value:Jn,disabled:Re,onKeyDown:fr,onKeyUp:mn,onChange:mn,onBlur:En,size:3}),z.createElement("span",{className:"".concat(Fe,"-slash")},"/"),rn));var er=bt?1:2;if(rn<=3+er*2){rn||_n.push(z.createElement(Se,(0,ie.Z)({},xn,{key:"noPager",page:1,className:"".concat(Fe,"-item-disabled")})));for(var Lr=1;Lr<=rn;Lr+=1)_n.push(z.createElement(Se,(0,ie.Z)({},xn,{key:Lr,page:Lr,active:Yt===Lr})))}else{var wr=bt?et.prev_3:et.prev_5,tr=bt?et.next_3:et.next_5,zn=Ye(Bn,"jump-prev",Hn(Oe,"prev page")),cr=Ye(sr,"jump-next",Hn(tt,"next page"));Pt&&(Zt=zn?z.createElement("li",{title:lt?wr:null,key:"prev",onClick:yt,tabIndex:0,onKeyDown:wn,className:ue()("".concat(Fe,"-jump-prev"),(0,de.Z)({},"".concat(Fe,"-jump-prev-custom-icon"),!!Oe))},zn):null,nn=cr?z.createElement("li",{title:lt?tr:null,key:"next",onClick:Ft,tabIndex:0,onKeyDown:Qn,className:ue()("".concat(Fe,"-jump-next"),(0,de.Z)({},"".concat(Fe,"-jump-next-custom-icon"),!!tt))},cr):null);var Xn=Math.max(1,Yt-er),yr=Math.min(Yt+er,rn);Yt-1<=er&&(yr=1+er*2),rn-Yt<=er&&(Xn=rn-er*2);for(var Nr=Xn;Nr<=yr;Nr+=1)_n.push(z.createElement(Se,(0,ie.Z)({},xn,{key:Nr,page:Nr,active:Yt===Nr})));if(Yt-1>=er*2&&Yt!==3&&(_n[0]=z.cloneElement(_n[0],{className:ue()("".concat(Fe,"-item-after-jump-prev"),_n[0].props.className)}),_n.unshift(Zt)),rn-Yt>=er*2&&Yt!==rn-2){var Yr=_n[_n.length-1];_n[_n.length-1]=z.cloneElement(Yr,{className:ue()("".concat(Fe,"-item-before-jump-next"),Yr.props.className)}),_n.push(nn)}Xn!==1&&_n.unshift(z.createElement(Se,(0,ie.Z)({},xn,{key:1,page:1}))),yr!==rn&&_n.push(z.createElement(Se,(0,ie.Z)({},xn,{key:rn,page:rn})))}var pi=Rt(Ln);if(pi){var _i=!Me||!rn;pi=z.createElement("li",{title:lt?et.prev_page:null,onClick:Ve,tabIndex:_i?null:0,onKeyDown:jt,className:ue()("".concat(Fe,"-prev"),(0,de.Z)({},"".concat(Fe,"-disabled"),_i)),"aria-disabled":_i},pi)}var Si=Et(Kt);if(Si){var oi,Mi;Le?(oi=!ze,Mi=Me?0:null):(oi=!ze||!rn,Mi=oi?null:0),Si=z.createElement("li",{title:lt?et.next_page:null,onClick:st,tabIndex:Mi,onKeyDown:qt,className:ue()("".concat(Fe,"-next"),(0,de.Z)({},"".concat(Fe,"-disabled"),oi)),"aria-disabled":oi},Si)}var Li=ue()(Fe,Ke,(0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)((0,de.Z)({},"".concat(Fe,"-start"),pt==="start"),"".concat(Fe,"-center"),pt==="center"),"".concat(Fe,"-end"),pt==="end"),"".concat(Fe,"-simple"),Le),"".concat(Fe,"-disabled"),Re));return z.createElement("ul",(0,ie.Z)({className:Li,style:ft,ref:Dt},Lt),zt,pi,Le?Zn:_n,Si,z.createElement(oe,{locale:et,rootPrefixCls:Fe,disabled:Re,selectPrefixCls:qe,changeSize:rr,pageSize:At,pageSizeOptions:_e,quickGo:Wn?Qt:null,goButton:Un,showSizeChanger:ye,sizeChangerRender:le}))},Ae=me},6551:function(Jt,Ot,we){"use strict";we.d(Ot,{ZP:function(){return ue}});var de=we(42978),ie=we(59301),Ee=we(47273),ce=0,se=(0,Ee.Z)();function re(){var ee;return se?(ee=ce,ce+=1):ee="TEST_OR_SSR",ee}function ue(ee){var te=ie.useState(),E=(0,de.Z)(te,2),y=E[0],z=E[1];return ie.useEffect(function(){z("rc_select_".concat(re()))},[]),ee||y}},37463:function(Jt,Ot,we){"use strict";we.d(Ot,{Ac:function(){return ut},Xo:function(){return At},Wx:function(){return on},ZP:function(){return Qn},lk:function(){return be}});var de=we(54476),ie=we(94480),Ee=we(20068),ce=we(33885),se=we(42978),re=we(75931),ue=we(76190),ee=we(18929),te=we(48736),E=we(59301),y=we(92310),z=we.n(y),x=we(34280),ne=we(49658),ae=we(8654),oe=function(Et){var sn=Et.className,Zt=Et.customizeIcon,Lt=Et.customizeIconProps,zt=Et.children,nn=Et.onMouseDown,rn=Et.onClick,_n=typeof Zt=="function"?Zt(Lt):Zt;return E.createElement("span",{className:sn,onMouseDown:function(Ln){Ln.preventDefault(),nn==null||nn(Ln)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:rn,"aria-hidden":!0},_n!==void 0?_n:E.createElement("span",{className:z()(sn.split(/\s+/).map(function(xn){return"".concat(xn,"-icon")}))},zt))},ge=oe,Se=function(Et,sn,Zt,Lt,zt){var nn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,rn=arguments.length>6?arguments[6]:void 0,_n=arguments.length>7?arguments[7]:void 0,xn=E.useMemo(function(){if((0,ue.Z)(Lt)==="object")return Lt.clearIcon;if(zt)return zt},[Lt,zt]),Ln=E.useMemo(function(){return!!(!nn&&Lt&&(Zt.length||rn)&&!(_n==="combobox"&&rn===""))},[Lt,nn,Zt.length,rn,_n]);return{allowClear:Ln,clearIcon:E.createElement(ge,{className:"".concat(Et,"-clear"),onMouseDown:sn,customizeIcon:xn},"\xD7")}},ve=E.createContext(null);function be(){return E.useContext(ve)}function xe(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Et=E.useState(!1),sn=(0,se.Z)(Et,2),Zt=sn[0],Lt=sn[1],zt=E.useRef(null),nn=function(){window.clearTimeout(zt.current)};E.useEffect(function(){return nn},[]);var rn=function(xn,Ln){nn(),zt.current=window.setTimeout(function(){Lt(xn),Ln&&Ln()},Rt)};return[Zt,rn,nn]}function pe(){var Rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Et=E.useRef(null),sn=E.useRef(null);E.useEffect(function(){return function(){window.clearTimeout(sn.current)}},[]);function Zt(Lt){(Lt||Et.current===null)&&(Et.current=Lt),window.clearTimeout(sn.current),sn.current=window.setTimeout(function(){Et.current=null},Rt)}return[function(){return Et.current},Zt]}function me(Rt,Et,sn,Zt){var Lt=E.useRef(null);Lt.current={open:Et,triggerOpen:sn,customizedTrigger:Zt},E.useEffect(function(){function zt(nn){var rn;if(!((rn=Lt.current)!==null&&rn!==void 0&&rn.customizedTrigger)){var _n=nn.target;_n.shadowRoot&&nn.composed&&(_n=nn.composedPath()[0]||_n),Lt.current.open&&Rt().filter(function(xn){return xn}).every(function(xn){return!xn.contains(_n)&&xn!==_n})&&Lt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",zt),function(){return window.removeEventListener("mousedown",zt)}},[])}var Ae=we(10228);function De(Rt){return Rt&&![Ae.Z.ESC,Ae.Z.SHIFT,Ae.Z.BACKSPACE,Ae.Z.TAB,Ae.Z.WIN_KEY,Ae.Z.ALT,Ae.Z.META,Ae.Z.WIN_KEY_RIGHT,Ae.Z.CTRL,Ae.Z.SEMICOLON,Ae.Z.EQUALS,Ae.Z.CAPS_LOCK,Ae.Z.CONTEXT_MENU,Ae.Z.F1,Ae.Z.F2,Ae.Z.F3,Ae.Z.F4,Ae.Z.F5,Ae.Z.F6,Ae.Z.F7,Ae.Z.F8,Ae.Z.F9,Ae.Z.F10,Ae.Z.F11,Ae.Z.F12].includes(Rt)}var ke=we(26112),Ie=we(83836);function Fe(Rt,Et,sn){var Zt=(0,ce.Z)((0,ce.Z)({},Rt),sn?Et:{});return Object.keys(Et).forEach(function(Lt){var zt=Et[Lt];typeof zt=="function"&&(Zt[Lt]=function(){for(var nn,rn=arguments.length,_n=new Array(rn),xn=0;xn<rn;xn++)_n[xn]=arguments[xn];return zt.apply(void 0,_n),(nn=Rt[Lt])===null||nn===void 0?void 0:nn.call.apply(nn,[Rt].concat(_n))})}),Zt}var Pe=Fe,qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Ke=function(Et,sn){var Zt=Et.prefixCls,Lt=Et.id,zt=Et.inputElement,nn=Et.autoFocus,rn=Et.autoComplete,_n=Et.editable,xn=Et.activeDescendantId,Ln=Et.value,Kt=Et.open,Xt=Et.attrs,Cn=(0,re.Z)(Et,qe),Un=zt||E.createElement("input",null),Zn=Un,er=Zn.ref,Lr=Zn.props;return(0,te.Kp)(!("maxLength"in Un.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),Un=E.cloneElement(Un,(0,ce.Z)((0,ce.Z)((0,ce.Z)({type:"search"},Pe(Cn,Lr,!0)),{},{id:Lt,ref:(0,ae.sQ)(sn,er),autoComplete:rn||"off",autoFocus:nn,className:z()("".concat(Zt,"-selection-search-input"),Lr==null?void 0:Lr.className),role:"combobox","aria-expanded":Kt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Lt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Lt,"_list"),"aria-activedescendant":Kt?xn:void 0},Xt),{},{value:_n?Ln:"",readOnly:!_n,unselectable:_n?null:"on",style:(0,ce.Z)((0,ce.Z)({},Lr.style),{},{opacity:_n?null:0})})),Un},ot=E.forwardRef(Ke),He=ot;function rt(Rt){return Array.isArray(Rt)?Rt:Rt!==void 0?[Rt]:[]}var Ge=typeof window!="undefined"&&window.document&&window.document.documentElement,ct=Ge;function We(Rt){return Rt!=null}function Ue(Rt){return!Rt&&Rt!==0}function Ze(Rt){return["string","number"].includes((0,ue.Z)(Rt))}function Je(Rt){var Et=void 0;return Rt&&(Ze(Rt.title)?Et=Rt.title.toString():Ze(Rt.label)&&(Et=Rt.label.toString())),Et}function $e(Rt,Et){ct?E.useLayoutEffect(Rt,Et):E.useEffect(Rt,Et)}function Qe(Rt){var Et;return(Et=Rt.key)!==null&&Et!==void 0?Et:Rt.value}var pt=function(Et){Et.preventDefault(),Et.stopPropagation()},ht=function(Et){var sn=Et.id,Zt=Et.prefixCls,Lt=Et.values,zt=Et.open,nn=Et.searchValue,rn=Et.autoClearSearchValue,_n=Et.inputRef,xn=Et.placeholder,Ln=Et.disabled,Kt=Et.mode,Xt=Et.showSearch,Cn=Et.autoFocus,Un=Et.autoComplete,Zn=Et.activeDescendantId,er=Et.tabIndex,Lr=Et.removeIcon,wr=Et.maxTagCount,tr=Et.maxTagTextLength,zn=Et.maxTagPlaceholder,cr=zn===void 0?function(dn){return"+ ".concat(dn.length," ...")}:zn,Xn=Et.tagRender,yr=Et.onToggleOpen,Nr=Et.onRemove,Yr=Et.onInputChange,pi=Et.onInputPaste,_i=Et.onInputKeyDown,Si=Et.onInputMouseDown,oi=Et.onInputCompositionStart,Mi=Et.onInputCompositionEnd,Li=Et.onInputBlur,lr=E.useRef(null),Ar=(0,E.useState)(0),Mr=(0,se.Z)(Ar,2),$r=Mr[0],Jr=Mr[1],wi=(0,E.useState)(!1),Hi=(0,se.Z)(wi,2),It=Hi[0],tn=Hi[1],Vt="".concat(Zt,"-selection"),$t=zt||Kt==="multiple"&&rn===!1||Kt==="tags"?nn:"",cn=Kt==="tags"||Kt==="multiple"&&rn===!1||Xt&&(zt||It);$e(function(){Jr(lr.current.scrollWidth)},[$t]);var hn=function(un,vn,Gn,yn,fn){return E.createElement("span",{title:Je(un),className:z()("".concat(Vt,"-item"),(0,Ee.Z)({},"".concat(Vt,"-item-disabled"),Gn))},E.createElement("span",{className:"".concat(Vt,"-item-content")},vn),yn&&E.createElement(ge,{className:"".concat(Vt,"-item-remove"),onMouseDown:pt,onClick:fn,customizeIcon:Lr},"\xD7"))},Fn=function(un,vn,Gn,yn,fn,Rn){var On=function(gr){pt(gr),yr(!zt)};return E.createElement("span",{onMouseDown:On},Xn({label:vn,value:un,disabled:Gn,closable:yn,onClose:fn,isMaxTag:!!Rn}))},An=function(un){var vn=un.disabled,Gn=un.label,yn=un.value,fn=!Ln&&!vn,Rn=Gn;if(typeof tr=="number"&&(typeof Gn=="string"||typeof Gn=="number")){var On=String(Rn);On.length>tr&&(Rn="".concat(On.slice(0,tr),"..."))}var qn=function(dr){dr&&dr.stopPropagation(),Nr(un)};return typeof Xn=="function"?Fn(yn,Rn,vn,fn,qn):hn(un,Rn,vn,fn,qn)},Sn=function(un){if(!Lt.length)return null;var vn=typeof cr=="function"?cr(un):cr;return typeof Xn=="function"?Fn(void 0,vn,!1,!1,void 0,!0):hn({title:vn},vn,!1)},Gt=E.createElement("div",{className:"".concat(Vt,"-search"),style:{width:$r},onFocus:function(){tn(!0)},onBlur:function(){tn(!1)}},E.createElement(He,{ref:_n,open:zt,prefixCls:Zt,id:sn,inputElement:null,disabled:Ln,autoFocus:Cn,autoComplete:Un,editable:cn,activeDescendantId:Zn,value:$t,onKeyDown:_i,onMouseDown:Si,onChange:Yr,onPaste:pi,onCompositionStart:oi,onCompositionEnd:Mi,onBlur:Li,tabIndex:er,attrs:(0,ke.Z)(Et,!0)}),E.createElement("span",{ref:lr,className:"".concat(Vt,"-search-mirror"),"aria-hidden":!0},$t,"\xA0")),ln=E.createElement(Ie.Z,{prefixCls:"".concat(Vt,"-overflow"),data:Lt,renderItem:An,renderRest:Sn,suffix:Gt,itemKey:Qe,maxCount:wr});return E.createElement("span",{className:"".concat(Vt,"-wrap")},ln,!Lt.length&&!$t&&E.createElement("span",{className:"".concat(Vt,"-placeholder")},xn))},Pt=ht,gt=function(Et){var sn=Et.inputElement,Zt=Et.prefixCls,Lt=Et.id,zt=Et.inputRef,nn=Et.disabled,rn=Et.autoFocus,_n=Et.autoComplete,xn=Et.activeDescendantId,Ln=Et.mode,Kt=Et.open,Xt=Et.values,Cn=Et.placeholder,Un=Et.tabIndex,Zn=Et.showSearch,er=Et.searchValue,Lr=Et.activeValue,wr=Et.maxLength,tr=Et.onInputKeyDown,zn=Et.onInputMouseDown,cr=Et.onInputChange,Xn=Et.onInputPaste,yr=Et.onInputCompositionStart,Nr=Et.onInputCompositionEnd,Yr=Et.onInputBlur,pi=Et.title,_i=E.useState(!1),Si=(0,se.Z)(_i,2),oi=Si[0],Mi=Si[1],Li=Ln==="combobox",lr=Li||Zn,Ar=Xt[0],Mr=er||"";Li&&Lr&&!oi&&(Mr=Lr),E.useEffect(function(){Li&&Mi(!1)},[Li,Lr]);var $r=Ln!=="combobox"&&!Kt&&!Zn?!1:!!Mr,Jr=pi===void 0?Je(Ar):pi,wi=E.useMemo(function(){return Ar?null:E.createElement("span",{className:"".concat(Zt,"-selection-placeholder"),style:$r?{visibility:"hidden"}:void 0},Cn)},[Ar,$r,Cn,Zt]);return E.createElement("span",{className:"".concat(Zt,"-selection-wrap")},E.createElement("span",{className:"".concat(Zt,"-selection-search")},E.createElement(He,{ref:zt,prefixCls:Zt,id:Lt,open:Kt,inputElement:sn,disabled:nn,autoFocus:rn,autoComplete:_n,editable:lr,activeDescendantId:xn,value:Mr,onKeyDown:tr,onMouseDown:zn,onChange:function(It){Mi(!0),cr(It)},onPaste:Xn,onCompositionStart:yr,onCompositionEnd:Nr,onBlur:Yr,tabIndex:Un,attrs:(0,ke.Z)(Et,!0),maxLength:Li?wr:void 0})),!Li&&Ar?E.createElement("span",{className:"".concat(Zt,"-selection-item"),title:Jr,style:$r?{visibility:"hidden"}:void 0},Ar.label):null,wi)},bt=gt,St=function(Et,sn){var Zt=(0,E.useRef)(null),Lt=(0,E.useRef)(!1),zt=Et.prefixCls,nn=Et.open,rn=Et.mode,_n=Et.showSearch,xn=Et.tokenWithEnter,Ln=Et.disabled,Kt=Et.prefix,Xt=Et.autoClearSearchValue,Cn=Et.onSearch,Un=Et.onSearchSubmit,Zn=Et.onToggleOpen,er=Et.onInputKeyDown,Lr=Et.onInputBlur,wr=Et.domRef;E.useImperativeHandle(sn,function(){return{focus:function(Jr){Zt.current.focus(Jr)},blur:function(){Zt.current.blur()}}});var tr=pe(0),zn=(0,se.Z)(tr,2),cr=zn[0],Xn=zn[1],yr=function(Jr){var wi=Jr.which,Hi=Zt.current instanceof HTMLTextAreaElement;!Hi&&nn&&(wi===Ae.Z.UP||wi===Ae.Z.DOWN)&&Jr.preventDefault(),er&&er(Jr),wi===Ae.Z.ENTER&&rn==="tags"&&!Lt.current&&!nn&&(Un==null||Un(Jr.target.value)),!(Hi&&!nn&&~[Ae.Z.UP,Ae.Z.DOWN,Ae.Z.LEFT,Ae.Z.RIGHT].indexOf(wi))&&De(wi)&&Zn(!0)},Nr=function(){Xn(!0)},Yr=(0,E.useRef)(null),pi=function(Jr){Cn(Jr,!0,Lt.current)!==!1&&Zn(!0)},_i=function(){Lt.current=!0},Si=function(Jr){Lt.current=!1,rn!=="combobox"&&pi(Jr.target.value)},oi=function(Jr){var wi=Jr.target.value;if(xn&&Yr.current&&/[\r\n]/.test(Yr.current)){var Hi=Yr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");wi=wi.replace(Hi,Yr.current)}Yr.current=null,pi(wi)},Mi=function(Jr){var wi=Jr.clipboardData,Hi=wi==null?void 0:wi.getData("text");Yr.current=Hi||""},Li=function(Jr){var wi=Jr.target;if(wi!==Zt.current){var Hi=document.body.style.msTouchAction!==void 0;Hi?setTimeout(function(){Zt.current.focus()}):Zt.current.focus()}},lr=function(Jr){var wi=cr();Jr.target!==Zt.current&&!wi&&!(rn==="combobox"&&Ln)&&Jr.preventDefault(),(rn!=="combobox"&&(!_n||!wi)||!nn)&&(nn&&Xt!==!1&&Cn("",!0,!1),Zn())},Ar={inputRef:Zt,onInputKeyDown:yr,onInputMouseDown:Nr,onInputChange:oi,onInputPaste:Mi,onInputCompositionStart:_i,onInputCompositionEnd:Si,onInputBlur:Lr},Mr=rn==="multiple"||rn==="tags"?E.createElement(Pt,(0,de.Z)({},Et,Ar)):E.createElement(bt,(0,de.Z)({},Et,Ar));return E.createElement("div",{ref:wr,className:"".concat(zt,"-selector"),onClick:Li,onMouseDown:lr},Kt&&E.createElement("div",{className:"".concat(zt,"-prefix")},Kt),Mr)},lt=E.forwardRef(St),_t=lt,dt=we(65030),nt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],et=function(Et){var sn=Et===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:sn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:sn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:sn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:sn,adjustY:1},htmlRegion:"scroll"}}},ft=function(Et,sn){var Zt=Et.prefixCls,Lt=Et.disabled,zt=Et.visible,nn=Et.children,rn=Et.popupElement,_n=Et.animation,xn=Et.transitionName,Ln=Et.dropdownStyle,Kt=Et.dropdownClassName,Xt=Et.direction,Cn=Xt===void 0?"ltr":Xt,Un=Et.placement,Zn=Et.builtinPlacements,er=Et.dropdownMatchSelectWidth,Lr=Et.dropdownRender,wr=Et.dropdownAlign,tr=Et.getPopupContainer,zn=Et.empty,cr=Et.getTriggerDOMNode,Xn=Et.onPopupVisibleChange,yr=Et.onPopupMouseEnter,Nr=(0,re.Z)(Et,nt),Yr="".concat(Zt,"-dropdown"),pi=rn;Lr&&(pi=Lr(rn));var _i=E.useMemo(function(){return Zn||et(er)},[Zn,er]),Si=_n?"".concat(Yr,"-").concat(_n):xn,oi=typeof er=="number",Mi=E.useMemo(function(){return oi?null:er===!1?"minWidth":"width"},[er,oi]),Li=Ln;oi&&(Li=(0,ce.Z)((0,ce.Z)({},Li),{},{width:er}));var lr=E.useRef(null);return E.useImperativeHandle(sn,function(){return{getPopupElement:function(){var Mr;return(Mr=lr.current)===null||Mr===void 0?void 0:Mr.popupElement}}}),E.createElement(dt.Z,(0,de.Z)({},Nr,{showAction:Xn?["click"]:[],hideAction:Xn?["click"]:[],popupPlacement:Un||(Cn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_i,prefixCls:Yr,popupTransitionName:Si,popup:E.createElement("div",{onMouseEnter:yr},pi),ref:lr,stretch:Mi,popupAlign:wr,popupVisible:zt,getPopupContainer:tr,popupClassName:z()(Kt,(0,Ee.Z)({},"".concat(Yr,"-empty"),zn)),popupStyle:Li,getTriggerDOMNode:cr,onPopupVisibleChange:Xn}),nn)},wt=E.forwardRef(ft),Tt=wt,Re=we(66712);function Le(Rt,Et){var sn=Rt.key,Zt;return"value"in Rt&&(Zt=Rt.value),sn!=null?sn:Zt!==void 0?Zt:"rc-index-key-".concat(Et)}function Te(Rt){return typeof Rt!="undefined"&&!Number.isNaN(Rt)}function je(Rt,Et){var sn=Rt||{},Zt=sn.label,Lt=sn.value,zt=sn.options,nn=sn.groupLabel,rn=Zt||(Et?"children":"label");return{label:rn,value:Lt||"value",options:zt||"options",groupLabel:nn||rn}}function ye(Rt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},sn=Et.fieldNames,Zt=Et.childrenAsData,Lt=[],zt=je(sn,!1),nn=zt.label,rn=zt.value,_n=zt.options,xn=zt.groupLabel;function Ln(Kt,Xt){Array.isArray(Kt)&&Kt.forEach(function(Cn){if(Xt||!(_n in Cn)){var Un=Cn[rn];Lt.push({key:Le(Cn,Lt.length),groupOption:Xt,data:Cn,label:Cn[nn],value:Un})}else{var Zn=Cn[xn];Zn===void 0&&Zt&&(Zn=Cn.label),Lt.push({key:Le(Cn,Lt.length),group:!0,data:Cn,label:Zn}),Ln(Cn[_n],!0)}})}return Ln(Rt,!1),Lt}function le(Rt){var Et=(0,ce.Z)({},Rt);return"props"in Et||Object.defineProperty(Et,"props",{get:function(){return(0,te.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Et}}),Et}var _e=function(Et,sn,Zt){if(!sn||!sn.length)return null;var Lt=!1,zt=function rn(_n,xn){var Ln=(0,Re.Z)(xn),Kt=Ln[0],Xt=Ln.slice(1);if(!Kt)return[_n];var Cn=_n.split(Kt);return Lt=Lt||Cn.length>1,Cn.reduce(function(Un,Zn){return[].concat((0,ie.Z)(Un),(0,ie.Z)(rn(Zn,Xt)))},[]).filter(Boolean)},nn=zt(Et,sn);return Lt?typeof Zt!="undefined"?nn.slice(0,Zt):nn:null},Ne=E.createContext(null),Ye=Ne;function Oe(Rt){var Et=Rt.visible,sn=Rt.values;if(!Et)return null;var Zt=50;return E.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(sn.slice(0,Zt).map(function(Lt){var zt=Lt.label,nn=Lt.value;return["number","string"].includes((0,ue.Z)(zt))?zt:nn}).join(", ")),sn.length>Zt?", ...":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"],Ct=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Nt=function(Et){return Et==="tags"||Et==="multiple"},Dt=E.forwardRef(function(Rt,Et){var sn,Zt=Rt.id,Lt=Rt.prefixCls,zt=Rt.className,nn=Rt.showSearch,rn=Rt.tagRender,_n=Rt.direction,xn=Rt.omitDomProps,Ln=Rt.displayValues,Kt=Rt.onDisplayValuesChange,Xt=Rt.emptyOptions,Cn=Rt.notFoundContent,Un=Cn===void 0?"Not Found":Cn,Zn=Rt.onClear,er=Rt.mode,Lr=Rt.disabled,wr=Rt.loading,tr=Rt.getInputElement,zn=Rt.getRawInputElement,cr=Rt.open,Xn=Rt.defaultOpen,yr=Rt.onDropdownVisibleChange,Nr=Rt.activeValue,Yr=Rt.onActiveValueChange,pi=Rt.activeDescendantId,_i=Rt.searchValue,Si=Rt.autoClearSearchValue,oi=Rt.onSearch,Mi=Rt.onSearchSplit,Li=Rt.tokenSeparators,lr=Rt.allowClear,Ar=Rt.prefix,Mr=Rt.suffixIcon,$r=Rt.clearIcon,Jr=Rt.OptionList,wi=Rt.animation,Hi=Rt.transitionName,It=Rt.dropdownStyle,tn=Rt.dropdownClassName,Vt=Rt.dropdownMatchSelectWidth,$t=Rt.dropdownRender,cn=Rt.dropdownAlign,hn=Rt.placement,Fn=Rt.builtinPlacements,An=Rt.getPopupContainer,Sn=Rt.showAction,Gt=Sn===void 0?[]:Sn,ln=Rt.onFocus,dn=Rt.onBlur,un=Rt.onKeyUp,vn=Rt.onKeyDown,Gn=Rt.onMouseDown,yn=(0,re.Z)(Rt,tt),fn=Nt(er),Rn=(nn!==void 0?nn:fn)||er==="combobox",On=(0,ce.Z)({},yn);Ct.forEach(function(vi){delete On[vi]}),xn==null||xn.forEach(function(vi){delete On[vi]});var qn=E.useState(!1),gr=(0,se.Z)(qn,2),dr=gr[0],Pr=gr[1];E.useEffect(function(){Pr((0,ne.Z)())},[]);var Er=E.useRef(null),Ir=E.useRef(null),Zr=E.useRef(null),Fr=E.useRef(null),li=E.useRef(null),Wr=E.useRef(!1),qr=xe(),Rr=(0,se.Z)(qr,3),hr=Rr[0],vr=Rr[1],jr=Rr[2];E.useImperativeHandle(Et,function(){var vi,ai;return{focus:(vi=Fr.current)===null||vi===void 0?void 0:vi.focus,blur:(ai=Fr.current)===null||ai===void 0?void 0:ai.blur,scrollTo:function(Ji){var io;return(io=li.current)===null||io===void 0?void 0:io.scrollTo(Ji)},nativeElement:Er.current||Ir.current}});var _r=E.useMemo(function(){var vi;if(er!=="combobox")return _i;var ai=(vi=Ln[0])===null||vi===void 0?void 0:vi.value;return typeof ai=="string"||typeof ai=="number"?String(ai):""},[_i,er,Ln]),Qr=er==="combobox"&&typeof tr=="function"&&tr()||null,ti=typeof zn=="function"&&zn(),di=(0,ae.x1)(Ir,ti==null||(sn=ti.props)===null||sn===void 0?void 0:sn.ref),po=E.useState(!1),ao=(0,se.Z)(po,2),to=ao[0],mo=ao[1];(0,x.Z)(function(){mo(!0)},[]);var Ii=(0,ee.Z)(!1,{defaultValue:Xn,value:cr}),Ti=(0,se.Z)(Ii,2),Ni=Ti[0],vo=Ti[1],Fi=to?Ni:!1,Gi=!Un&&Xt;(Lr||Gi&&Fi&&er==="combobox")&&(Fi=!1);var ji=Gi?!1:Fi,xr=E.useCallback(function(vi){var ai=vi!==void 0?vi:!Fi;Lr||(vo(ai),Fi!==ai&&(yr==null||yr(ai)))},[Lr,Fi,vo,yr]),Kr=E.useMemo(function(){return(Li||[]).some(function(vi){return[`
`,`\r
`].includes(vi)})},[Li]),Gr=E.useContext(Ye)||{},Xr=Gr.maxCount,xi=Gr.rawValues,Oi=function(ai,ro,Ji){if(!(fn&&Te(Xr)&&(xi==null?void 0:xi.size)>=Xr)){var io=!0,co=ai;Yr==null||Yr(null);var na=_e(ai,Li,Te(Xr)?Xr-xi.size:void 0),Go=Ji?null:na;return er!=="combobox"&&Go&&(co="",Mi==null||Mi(Go),xr(!1),io=!1),oi&&_r!==co&&oi(co,{source:ro?"typing":"effect"}),io}},Ao=function(ai){!ai||!ai.trim()||oi(ai,{source:"submit"})};E.useEffect(function(){!Fi&&!fn&&er!=="combobox"&&Oi("",!1,!1)},[Fi]),E.useEffect(function(){Ni&&Lr&&vo(!1),Lr&&!Wr.current&&vr(!1)},[Lr]);var Yi=pe(),Xi=(0,se.Z)(Yi,2),ui=Xi[0],no=Xi[1],Io=E.useRef(!1),Ui=function(ai){var ro=ui(),Ji=ai.key,io=Ji==="Enter";if(io&&(er!=="combobox"&&ai.preventDefault(),Fi||xr(!0)),no(!!_r),Ji==="Backspace"&&!ro&&fn&&!_r&&Ln.length){for(var co=(0,ie.Z)(Ln),na=null,Go=co.length-1;Go>=0;Go-=1){var ca=co[Go];if(!ca.disabled){co.splice(Go,1),na=ca;break}}na&&Kt(co,{type:"remove",values:[na]})}for(var Qi=arguments.length,yo=new Array(Qi>1?Qi-1:0),Fo=1;Fo<Qi;Fo++)yo[Fo-1]=arguments[Fo];if(Fi&&(!io||!Io.current)){var Xo;io&&(Io.current=!0),(Xo=li.current)===null||Xo===void 0||Xo.onKeyDown.apply(Xo,[ai].concat(yo))}vn==null||vn.apply(void 0,[ai].concat(yo))},Ho=function(ai){for(var ro=arguments.length,Ji=new Array(ro>1?ro-1:0),io=1;io<ro;io++)Ji[io-1]=arguments[io];if(Fi){var co;(co=li.current)===null||co===void 0||co.onKeyUp.apply(co,[ai].concat(Ji))}ai.key==="Enter"&&(Io.current=!1),un==null||un.apply(void 0,[ai].concat(Ji))},Co=function(ai){var ro=Ln.filter(function(Ji){return Ji!==ai});Kt(ro,{type:"remove",values:[ai]})},Oo=function(){Io.current=!1},Ki=E.useRef(!1),Wo=function(){vr(!0),Lr||(ln&&!Ki.current&&ln.apply(void 0,arguments),Gt.includes("focus")&&xr(!0)),Ki.current=!0},za=function(){Wr.current=!0,vr(!1,function(){Ki.current=!1,Wr.current=!1,xr(!1)}),!Lr&&(_r&&(er==="tags"?oi(_r,{source:"submit"}):er==="multiple"&&oi("",{source:"blur"})),dn&&dn.apply(void 0,arguments))},Yo=[];E.useEffect(function(){return function(){Yo.forEach(function(vi){return clearTimeout(vi)}),Yo.splice(0,Yo.length)}},[]);var la=function(ai){var ro,Ji=ai.target,io=(ro=Zr.current)===null||ro===void 0?void 0:ro.getPopupElement();if(io&&io.contains(Ji)){var co=setTimeout(function(){var Qi=Yo.indexOf(co);if(Qi!==-1&&Yo.splice(Qi,1),jr(),!dr&&!io.contains(document.activeElement)){var yo;(yo=Fr.current)===null||yo===void 0||yo.focus()}});Yo.push(co)}for(var na=arguments.length,Go=new Array(na>1?na-1:0),ca=1;ca<na;ca++)Go[ca-1]=arguments[ca];Gn==null||Gn.apply(void 0,[ai].concat(Go))},Zo=E.useState({}),Da=(0,se.Z)(Zo,2),qa=Da[1];function ba(){qa({})}var cs;ti&&(cs=function(ai){xr(ai)}),me(function(){var vi;return[Er.current,(vi=Zr.current)===null||vi===void 0?void 0:vi.getPopupElement()]},ji,xr,!!ti);var Ma=E.useMemo(function(){return(0,ce.Z)((0,ce.Z)({},Rt),{},{notFoundContent:Un,open:Fi,triggerOpen:ji,id:Zt,showSearch:Rn,multiple:fn,toggleOpen:xr})},[Rt,Un,ji,Fi,Zt,Rn,fn,xr]),Ha=!!Mr||wr,Ra;Ha&&(Ra=E.createElement(ge,{className:z()("".concat(Lt,"-arrow"),(0,Ee.Z)({},"".concat(Lt,"-arrow-loading"),wr)),customizeIcon:Mr,customizeIconProps:{loading:wr,searchValue:_r,open:Fi,focused:hr,showSearch:Rn}}));var pa=function(){var ai;Zn==null||Zn(),(ai=Fr.current)===null||ai===void 0||ai.focus(),Kt([],{type:"clear",values:Ln}),Oi("",!1,!1)},Wa=Se(Lt,pa,Ln,lr,$r,Lr,_r,er),Ja=Wa.allowClear,Sa=Wa.clearIcon,wa=E.createElement(Jr,{ref:li}),ua=z()(Lt,zt,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(Lt,"-focused"),hr),"".concat(Lt,"-multiple"),fn),"".concat(Lt,"-single"),!fn),"".concat(Lt,"-allow-clear"),lr),"".concat(Lt,"-show-arrow"),Ha),"".concat(Lt,"-disabled"),Lr),"".concat(Lt,"-loading"),wr),"".concat(Lt,"-open"),Fi),"".concat(Lt,"-customize-input"),Qr),"".concat(Lt,"-show-search"),Rn)),To=E.createElement(Tt,{ref:Zr,disabled:Lr,prefixCls:Lt,visible:ji,popupElement:wa,animation:wi,transitionName:Hi,dropdownStyle:It,dropdownClassName:tn,direction:_n,dropdownMatchSelectWidth:Vt,dropdownRender:$t,dropdownAlign:cn,placement:hn,builtinPlacements:Fn,getPopupContainer:An,empty:Xt,getTriggerDOMNode:function(ai){return Ir.current||ai},onPopupVisibleChange:cs,onPopupMouseEnter:ba},ti?E.cloneElement(ti,{ref:di}):E.createElement(_t,(0,de.Z)({},Rt,{domRef:Ir,prefixCls:Lt,inputElement:Qr,ref:Fr,id:Zt,prefix:Ar,showSearch:Rn,autoClearSearchValue:Si,mode:er,activeDescendantId:pi,tagRender:rn,values:Ln,open:Fi,onToggleOpen:xr,activeValue:Nr,searchValue:_r,onSearch:Oi,onSearchSubmit:Ao,onRemove:Co,tokenWithEnter:Kr,onInputBlur:Oo}))),qi;return ti?qi=To:qi=E.createElement("div",(0,de.Z)({className:ua},On,{ref:Er,onMouseDown:la,onKeyDown:Ui,onKeyUp:Ho,onFocus:Wo,onBlur:za}),E.createElement(Oe,{visible:hr&&!Fi,values:Ln}),To,Ra,Ja&&Sa),E.createElement(ve.Provider,{value:Ma},qi)}),ut=Dt,Ht=function(){return null};Ht.isSelectOptGroup=!0;var At=Ht,Wt=function(){return null};Wt.isSelectOption=!0;var on=Wt,bn=we(80547),Yt=we(2738),Mn=we(48911);function Yn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Vn=["disabled","title","children","style","className"];function Jn(Rt){return typeof Rt=="string"||typeof Rt=="number"}var ar=function(Et,sn){var Zt=be(),Lt=Zt.prefixCls,zt=Zt.id,nn=Zt.open,rn=Zt.multiple,_n=Zt.mode,xn=Zt.searchValue,Ln=Zt.toggleOpen,Kt=Zt.notFoundContent,Xt=Zt.onPopupScroll,Cn=E.useContext(Ye),Un=Cn.maxCount,Zn=Cn.flattenOptions,er=Cn.onActiveValue,Lr=Cn.defaultActiveFirstOption,wr=Cn.onSelect,tr=Cn.menuItemSelectedIcon,zn=Cn.rawValues,cr=Cn.fieldNames,Xn=Cn.virtual,yr=Cn.direction,Nr=Cn.listHeight,Yr=Cn.listItemHeight,pi=Cn.optionRender,_i="".concat(Lt,"-item"),Si=(0,bn.Z)(function(){return Zn},[nn,Zn],function(Sn,Gt){return Gt[0]&&Sn[1]!==Gt[1]}),oi=E.useRef(null),Mi=E.useMemo(function(){return rn&&Te(Un)&&(zn==null?void 0:zn.size)>=Un},[rn,Un,zn==null?void 0:zn.size]),Li=function(Gt){Gt.preventDefault()},lr=function(Gt){var ln;(ln=oi.current)===null||ln===void 0||ln.scrollTo(typeof Gt=="number"?{index:Gt}:Gt)},Ar=E.useCallback(function(Sn){return _n==="combobox"?!1:zn.has(Sn)},[_n,(0,ie.Z)(zn).toString(),zn.size]),Mr=function(Gt){for(var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,dn=Si.length,un=0;un<dn;un+=1){var vn=(Gt+un*ln+dn)%dn,Gn=Si[vn]||{},yn=Gn.group,fn=Gn.data;if(!yn&&!(fn!=null&&fn.disabled)&&(Ar(fn.value)||!Mi))return vn}return-1},$r=E.useState(function(){return Mr(0)}),Jr=(0,se.Z)($r,2),wi=Jr[0],Hi=Jr[1],It=function(Gt){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Hi(Gt);var dn={source:ln?"keyboard":"mouse"},un=Si[Gt];if(!un){er(null,-1,dn);return}er(un.value,Gt,dn)};(0,E.useEffect)(function(){It(Lr!==!1?Mr(0):-1)},[Si.length,xn]);var tn=E.useCallback(function(Sn){return _n==="combobox"?String(Sn).toLowerCase()===xn.toLowerCase():zn.has(Sn)},[_n,xn,(0,ie.Z)(zn).toString(),zn.size]);(0,E.useEffect)(function(){var Sn=setTimeout(function(){if(!rn&&nn&&zn.size===1){var ln=Array.from(zn)[0],dn=Si.findIndex(function(un){var vn=un.data;return xn?String(vn.value).startsWith(xn):vn.value===ln});dn!==-1&&(It(dn),lr(dn))}});if(nn){var Gt;(Gt=oi.current)===null||Gt===void 0||Gt.scrollTo(void 0)}return function(){return clearTimeout(Sn)}},[nn,xn]);var Vt=function(Gt){Gt!==void 0&&wr(Gt,{selected:!zn.has(Gt)}),rn||Ln(!1)};if(E.useImperativeHandle(sn,function(){return{onKeyDown:function(Gt){var ln=Gt.which,dn=Gt.ctrlKey;switch(ln){case Ae.Z.N:case Ae.Z.P:case Ae.Z.UP:case Ae.Z.DOWN:{var un=0;if(ln===Ae.Z.UP?un=-1:ln===Ae.Z.DOWN?un=1:Yn()&&dn&&(ln===Ae.Z.N?un=1:ln===Ae.Z.P&&(un=-1)),un!==0){var vn=Mr(wi+un,un);lr(vn),It(vn,!0)}break}case Ae.Z.TAB:case Ae.Z.ENTER:{var Gn,yn=Si[wi];yn&&!(yn!=null&&(Gn=yn.data)!==null&&Gn!==void 0&&Gn.disabled)&&!Mi?Vt(yn.value):Vt(void 0),nn&&Gt.preventDefault();break}case Ae.Z.ESC:Ln(!1),nn&&Gt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Gt){lr(Gt)}}}),Si.length===0)return E.createElement("div",{role:"listbox",id:"".concat(zt,"_list"),className:"".concat(_i,"-empty"),onMouseDown:Li},Kt);var $t=Object.keys(cr).map(function(Sn){return cr[Sn]}),cn=function(Gt){return Gt.label};function hn(Sn,Gt){var ln=Sn.group;return{role:ln?"presentation":"option",id:"".concat(zt,"_list_").concat(Gt)}}var Fn=function(Gt){var ln=Si[Gt];if(!ln)return null;var dn=ln.data||{},un=dn.value,vn=ln.group,Gn=(0,ke.Z)(dn,!0),yn=cn(ln);return ln?E.createElement("div",(0,de.Z)({"aria-label":typeof yn=="string"&&!vn?yn:null},Gn,{key:Gt},hn(ln,Gt),{"aria-selected":tn(un)}),un):null},An={role:"listbox",id:"".concat(zt,"_list")};return E.createElement(E.Fragment,null,Xn&&E.createElement("div",(0,de.Z)({},An,{style:{height:0,width:0,overflow:"hidden"}}),Fn(wi-1),Fn(wi),Fn(wi+1)),E.createElement(Mn.Z,{itemKey:"key",ref:oi,data:Si,height:Nr,itemHeight:Yr,fullHeight:!1,onMouseDown:Li,onScroll:Xt,virtual:Xn,direction:yr,innerProps:Xn?null:An},function(Sn,Gt){var ln=Sn.group,dn=Sn.groupOption,un=Sn.data,vn=Sn.label,Gn=Sn.value,yn=un.key;if(ln){var fn,Rn=(fn=un.title)!==null&&fn!==void 0?fn:Jn(vn)?vn.toString():void 0;return E.createElement("div",{className:z()(_i,"".concat(_i,"-group"),un.className),title:Rn},vn!==void 0?vn:yn)}var On=un.disabled,qn=un.title,gr=un.children,dr=un.style,Pr=un.className,Er=(0,re.Z)(un,Vn),Ir=(0,Yt.Z)(Er,$t),Zr=Ar(Gn),Fr=On||!Zr&&Mi,li="".concat(_i,"-option"),Wr=z()(_i,li,Pr,(0,Ee.Z)((0,Ee.Z)((0,Ee.Z)((0,Ee.Z)({},"".concat(li,"-grouped"),dn),"".concat(li,"-active"),wi===Gt&&!Fr),"".concat(li,"-disabled"),Fr),"".concat(li,"-selected"),Zr)),qr=cn(Sn),Rr=!tr||typeof tr=="function"||Zr,hr=typeof qr=="number"?qr:qr||Gn,vr=Jn(hr)?hr.toString():void 0;return qn!==void 0&&(vr=qn),E.createElement("div",(0,de.Z)({},(0,ke.Z)(Ir),Xn?{}:hn(Sn,Gt),{"aria-selected":tn(Gn),className:Wr,title:vr,onMouseMove:function(){wi===Gt||Fr||It(Gt)},onClick:function(){Fr||Vt(Gn)},style:dr}),E.createElement("div",{className:"".concat(li,"-content")},typeof pi=="function"?pi(Sn,{index:Gt}):hr),E.isValidElement(tr)||Zr,Rr&&E.createElement(ge,{className:"".concat(_i,"-option-state"),customizeIcon:tr,customizeIconProps:{value:Gn,disabled:Fr,isSelected:Zr}},Zr?"\u2713":null))}))},ur=E.forwardRef(ar),jn=ur,Bn=function(Rt,Et){var sn=E.useRef({values:new Map,options:new Map}),Zt=E.useMemo(function(){var zt=sn.current,nn=zt.values,rn=zt.options,_n=Rt.map(function(Kt){if(Kt.label===void 0){var Xt;return(0,ce.Z)((0,ce.Z)({},Kt),{},{label:(Xt=nn.get(Kt.value))===null||Xt===void 0?void 0:Xt.label})}return Kt}),xn=new Map,Ln=new Map;return _n.forEach(function(Kt){xn.set(Kt.value,Kt),Ln.set(Kt.value,Et.get(Kt.value)||rn.get(Kt.value))}),sn.current.values=xn,sn.current.options=Ln,_n},[Rt,Et]),Lt=E.useCallback(function(zt){return Et.get(zt)||sn.current.options.get(zt)},[Et]);return[Zt,Lt]};function sr(Rt,Et){return rt(Rt).join("").toUpperCase().includes(Et)}var Hn=function(Rt,Et,sn,Zt,Lt){return E.useMemo(function(){if(!sn||Zt===!1)return Rt;var zt=Et.options,nn=Et.label,rn=Et.value,_n=[],xn=typeof Zt=="function",Ln=sn.toUpperCase(),Kt=xn?Zt:function(Cn,Un){return Lt?sr(Un[Lt],Ln):Un[zt]?sr(Un[nn!=="children"?nn:"label"],Ln):sr(Un[rn],Ln)},Xt=xn?function(Cn){return le(Cn)}:function(Cn){return Cn};return Rt.forEach(function(Cn){if(Cn[zt]){var Un=Kt(sn,Xt(Cn));if(Un)_n.push(Cn);else{var Zn=Cn[zt].filter(function(er){return Kt(sn,Xt(er))});Zn.length&&_n.push((0,ce.Z)((0,ce.Z)({},Cn),{},(0,Ee.Z)({},zt,Zn)))}return}Kt(sn,Xt(Cn))&&_n.push(Cn)}),_n},[Rt,Zt,Lt,sn,Et])},In=we(6551),gn=we(11592),Wn=["children","value"],fr=["children"];function mn(Rt){var Et=Rt,sn=Et.key,Zt=Et.props,Lt=Zt.children,zt=Zt.value,nn=(0,re.Z)(Zt,Wn);return(0,ce.Z)({key:sn,value:zt!==void 0?zt:sn,children:Lt},nn)}function En(Rt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,gn.Z)(Rt).map(function(sn,Zt){if(!E.isValidElement(sn)||!sn.type)return null;var Lt=sn,zt=Lt.type.isSelectOptGroup,nn=Lt.key,rn=Lt.props,_n=rn.children,xn=(0,re.Z)(rn,fr);return Et||!zt?mn(sn):(0,ce.Z)((0,ce.Z)({key:"__RC_SELECT_GRP__".concat(nn===null?Zt:nn,"__"),label:nn},xn),{},{options:En(_n)})}).filter(function(sn){return sn})}var rr=function(Et,sn,Zt,Lt,zt){return E.useMemo(function(){var nn=Et,rn=!Et;rn&&(nn=En(sn));var _n=new Map,xn=new Map,Ln=function(Cn,Un,Zn){Zn&&typeof Zn=="string"&&Cn.set(Un[Zn],Un)},Kt=function Xt(Cn){for(var Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zn=0;Zn<Cn.length;Zn+=1){var er=Cn[Zn];!er[Zt.options]||Un?(_n.set(er[Zt.value],er),Ln(xn,er,Zt.label),Ln(xn,er,Lt),Ln(xn,er,zt)):Xt(er[Zt.options],!0)}};return Kt(nn),{options:nn,valueOptions:_n,labelOptions:xn}},[Et,sn,Zt,Lt,zt])},Qt=rr;function Me(Rt){var Et=E.useRef();Et.current=Rt;var sn=E.useCallback(function(){return Et.current.apply(Et,arguments)},[]);return sn}function ze(Rt){var Et=Rt.mode,sn=Rt.options,Zt=Rt.children,Lt=Rt.backfill,zt=Rt.allowClear,nn=Rt.placeholder,rn=Rt.getInputElement,_n=Rt.showSearch,xn=Rt.onSearch,Ln=Rt.defaultOpen,Kt=Rt.autoFocus,Xt=Rt.labelInValue,Cn=Rt.value,Un=Rt.inputValue,Zn=Rt.optionLabelProp,er=isMultiple(Et),Lr=_n!==void 0?_n:er||Et==="combobox",wr=sn||convertChildrenToData(Zt);if(warning(Et!=="tags"||wr.every(function(Xn){return!Xn.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Et==="tags"||Et==="combobox"){var tr=wr.some(function(Xn){return Xn.options?Xn.options.some(function(yr){return typeof("value"in yr?yr.value:yr.key)=="number"}):typeof("value"in Xn?Xn.value:Xn.key)=="number"});warning(!tr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Et!=="combobox"||!Zn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Et==="combobox"||!Lt,"`backfill` only works with `combobox` mode."),warning(Et==="combobox"||!rn,"`getInputElement` only work with `combobox` mode."),noteOnce(Et!=="combobox"||!rn||!zt||!nn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),xn&&!Lr&&Et!=="combobox"&&Et!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Ln||Kt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Cn!=null){var zn=toArray(Cn);warning(!Xt||zn.every(function(Xn){return _typeof(Xn)==="object"&&("key"in Xn||"value"in Xn)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!er||Array.isArray(Cn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Zt){var cr=null;toNodeArray(Zt).some(function(Xn){if(!React.isValidElement(Xn)||!Xn.type)return!1;var yr=Xn,Nr=yr.type;if(Nr.isSelectOption)return!1;if(Nr.isSelectOptGroup){var Yr=toNodeArray(Xn.props.children).every(function(pi){return!React.isValidElement(pi)||!Xn.type||pi.type.isSelectOption?!0:(cr=pi.type,!1)});return!Yr}return cr=Nr,!0}),cr&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(cr.displayName||cr.name||cr,"`.")),warning(Un===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Ve(Rt,Et){if(Rt){var sn=function Zt(Lt){for(var zt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=0;nn<Lt.length;nn++){var rn=Lt[nn];if(rn[Et==null?void 0:Et.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!zt&&Array.isArray(rn[Et==null?void 0:Et.options])&&Zt(rn[Et==null?void 0:Et.options],!0))break}};sn(Rt)}}var st=null,yt=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Ft=["inputValue"];function Mt(Rt){return!Rt||(0,ue.Z)(Rt)!=="object"}var jt=E.forwardRef(function(Rt,Et){var sn=Rt.id,Zt=Rt.mode,Lt=Rt.prefixCls,zt=Lt===void 0?"rc-select":Lt,nn=Rt.backfill,rn=Rt.fieldNames,_n=Rt.inputValue,xn=Rt.searchValue,Ln=Rt.onSearch,Kt=Rt.autoClearSearchValue,Xt=Kt===void 0?!0:Kt,Cn=Rt.onSelect,Un=Rt.onDeselect,Zn=Rt.dropdownMatchSelectWidth,er=Zn===void 0?!0:Zn,Lr=Rt.filterOption,wr=Rt.filterSort,tr=Rt.optionFilterProp,zn=Rt.optionLabelProp,cr=Rt.options,Xn=Rt.optionRender,yr=Rt.children,Nr=Rt.defaultActiveFirstOption,Yr=Rt.menuItemSelectedIcon,pi=Rt.virtual,_i=Rt.direction,Si=Rt.listHeight,oi=Si===void 0?200:Si,Mi=Rt.listItemHeight,Li=Mi===void 0?20:Mi,lr=Rt.labelRender,Ar=Rt.value,Mr=Rt.defaultValue,$r=Rt.labelInValue,Jr=Rt.onChange,wi=Rt.maxCount,Hi=(0,re.Z)(Rt,yt),It=(0,In.ZP)(sn),tn=Nt(Zt),Vt=!!(!cr&&yr),$t=E.useMemo(function(){return Lr===void 0&&Zt==="combobox"?!1:Lr},[Lr,Zt]),cn=E.useMemo(function(){return je(rn,Vt)},[JSON.stringify(rn),Vt]),hn=(0,ee.Z)("",{value:xn!==void 0?xn:_n,postState:function(Kr){return Kr||""}}),Fn=(0,se.Z)(hn,2),An=Fn[0],Sn=Fn[1],Gt=Qt(cr,yr,cn,tr,zn),ln=Gt.valueOptions,dn=Gt.labelOptions,un=Gt.options,vn=E.useCallback(function(xr){var Kr=rt(xr);return Kr.map(function(Gr){var Xr,xi,Oi,Ao,Yi;if(Mt(Gr))Xr=Gr;else{var Xi;Oi=Gr.key,xi=Gr.label,Xr=(Xi=Gr.value)!==null&&Xi!==void 0?Xi:Oi}var ui=ln.get(Xr);if(ui){var no;if(xi===void 0&&(xi=ui==null?void 0:ui[zn||cn.label]),Oi===void 0&&(Oi=(no=ui==null?void 0:ui.key)!==null&&no!==void 0?no:Xr),Ao=ui==null?void 0:ui.disabled,Yi=ui==null?void 0:ui.title,0)var Io}return{label:xi,value:Xr,key:Oi,disabled:Ao,title:Yi}})},[cn,zn,ln]),Gn=(0,ee.Z)(Mr,{value:Ar}),yn=(0,se.Z)(Gn,2),fn=yn[0],Rn=yn[1],On=E.useMemo(function(){var xr,Kr=tn&&fn===null?[]:fn,Gr=vn(Kr);return Zt==="combobox"&&Ue((xr=Gr[0])===null||xr===void 0?void 0:xr.value)?[]:Gr},[fn,vn,Zt,tn]),qn=Bn(On,ln),gr=(0,se.Z)(qn,2),dr=gr[0],Pr=gr[1],Er=E.useMemo(function(){if(!Zt&&dr.length===1){var xr=dr[0];if(xr.value===null&&(xr.label===null||xr.label===void 0))return[]}return dr.map(function(Kr){var Gr;return(0,ce.Z)((0,ce.Z)({},Kr),{},{label:(Gr=typeof lr=="function"?lr(Kr):Kr.label)!==null&&Gr!==void 0?Gr:Kr.value})})},[Zt,dr,lr]),Ir=E.useMemo(function(){return new Set(dr.map(function(xr){return xr.value}))},[dr]);E.useEffect(function(){if(Zt==="combobox"){var xr,Kr=(xr=dr[0])===null||xr===void 0?void 0:xr.value;Sn(We(Kr)?String(Kr):"")}},[dr]);var Zr=Me(function(xr,Kr){var Gr=Kr!=null?Kr:xr;return(0,Ee.Z)((0,Ee.Z)({},cn.value,xr),cn.label,Gr)}),Fr=E.useMemo(function(){if(Zt!=="tags")return un;var xr=(0,ie.Z)(un),Kr=function(Xr){return ln.has(Xr)};return(0,ie.Z)(dr).sort(function(Gr,Xr){return Gr.value<Xr.value?-1:1}).forEach(function(Gr){var Xr=Gr.value;Kr(Xr)||xr.push(Zr(Xr,Gr.label))}),xr},[Zr,un,ln,dr,Zt]),li=Hn(Fr,cn,An,$t,tr),Wr=E.useMemo(function(){return Zt!=="tags"||!An||li.some(function(xr){return xr[tr||"value"]===An})||li.some(function(xr){return xr[cn.value]===An})?li:[Zr(An)].concat((0,ie.Z)(li))},[Zr,tr,Zt,li,An,cn]),qr=function xr(Kr){var Gr=(0,ie.Z)(Kr).sort(function(Xr,xi){return wr(Xr,xi,{searchValue:An})});return Gr.map(function(Xr){return Array.isArray(Xr.options)?(0,ce.Z)((0,ce.Z)({},Xr),{},{options:Xr.options.length>0?xr(Xr.options):Xr.options}):Xr})},Rr=E.useMemo(function(){return wr?qr(Wr):Wr},[Wr,wr,An]),hr=E.useMemo(function(){return ye(Rr,{fieldNames:cn,childrenAsData:Vt})},[Rr,cn,Vt]),vr=function(Kr){var Gr=vn(Kr);if(Rn(Gr),Jr&&(Gr.length!==dr.length||Gr.some(function(Oi,Ao){var Yi;return((Yi=dr[Ao])===null||Yi===void 0?void 0:Yi.value)!==(Oi==null?void 0:Oi.value)}))){var Xr=$r?Gr:Gr.map(function(Oi){return Oi.value}),xi=Gr.map(function(Oi){return le(Pr(Oi.value))});Jr(tn?Xr:Xr[0],tn?xi:xi[0])}},jr=E.useState(null),_r=(0,se.Z)(jr,2),Qr=_r[0],ti=_r[1],di=E.useState(0),po=(0,se.Z)(di,2),ao=po[0],to=po[1],mo=Nr!==void 0?Nr:Zt!=="combobox",Ii=E.useCallback(function(xr,Kr){var Gr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Xr=Gr.source,xi=Xr===void 0?"keyboard":Xr;to(Kr),nn&&Zt==="combobox"&&xr!==null&&xi==="keyboard"&&ti(String(xr))},[nn,Zt]),Ti=function(Kr,Gr,Xr){var xi=function(){var Co,Oo=Pr(Kr);return[$r?{label:Oo==null?void 0:Oo[cn.label],value:Kr,key:(Co=Oo==null?void 0:Oo.key)!==null&&Co!==void 0?Co:Kr}:Kr,le(Oo)]};if(Gr&&Cn){var Oi=xi(),Ao=(0,se.Z)(Oi,2),Yi=Ao[0],Xi=Ao[1];Cn(Yi,Xi)}else if(!Gr&&Un&&Xr!=="clear"){var ui=xi(),no=(0,se.Z)(ui,2),Io=no[0],Ui=no[1];Un(Io,Ui)}},Ni=Me(function(xr,Kr){var Gr,Xr=tn?Kr.selected:!0;Xr?Gr=tn?[].concat((0,ie.Z)(dr),[xr]):[xr]:Gr=dr.filter(function(xi){return xi.value!==xr}),vr(Gr),Ti(xr,Xr),Zt==="combobox"?ti(""):(!Nt||Xt)&&(Sn(""),ti(""))}),vo=function(Kr,Gr){vr(Kr);var Xr=Gr.type,xi=Gr.values;(Xr==="remove"||Xr==="clear")&&xi.forEach(function(Oi){Ti(Oi.value,!1,Xr)})},Fi=function(Kr,Gr){if(Sn(Kr),ti(null),Gr.source==="submit"){var Xr=(Kr||"").trim();if(Xr){var xi=Array.from(new Set([].concat((0,ie.Z)(Ir),[Xr])));vr(xi),Ti(Xr,!0),Sn("")}return}Gr.source!=="blur"&&(Zt==="combobox"&&vr(Kr),Ln==null||Ln(Kr))},Gi=function(Kr){var Gr=Kr;Zt!=="tags"&&(Gr=Kr.map(function(xi){var Oi=dn.get(xi);return Oi==null?void 0:Oi.value}).filter(function(xi){return xi!==void 0}));var Xr=Array.from(new Set([].concat((0,ie.Z)(Ir),(0,ie.Z)(Gr))));vr(Xr),Xr.forEach(function(xi){Ti(xi,!0)})},ji=E.useMemo(function(){var xr=pi!==!1&&er!==!1;return(0,ce.Z)((0,ce.Z)({},Gt),{},{flattenOptions:hr,onActiveValue:Ii,defaultActiveFirstOption:mo,onSelect:Ni,menuItemSelectedIcon:Yr,rawValues:Ir,fieldNames:cn,virtual:xr,direction:_i,listHeight:oi,listItemHeight:Li,childrenAsData:Vt,maxCount:wi,optionRender:Xn})},[wi,Gt,hr,Ii,mo,Ni,Yr,Ir,cn,pi,er,_i,oi,Li,Vt,Xn]);return E.createElement(Ye.Provider,{value:ji},E.createElement(ut,(0,de.Z)({},Hi,{id:It,prefixCls:zt,ref:Et,omitDomProps:Ft,mode:Zt,displayValues:Er,onDisplayValuesChange:vo,direction:_i,searchValue:An,onSearch:Fi,autoClearSearchValue:Xt,onSearchSplit:Gi,dropdownMatchSelectWidth:er,OptionList:jn,emptyOptions:!hr.length,activeValue:Qr,activeDescendantId:"".concat(It,"_list_").concat(ao)})))}),qt=jt;qt.Option=on,qt.OptGroup=At;var wn=qt,Qn=wn},63158:function(Jt,Ot,we){"use strict";var de=we(54476),ie=we(20068),Ee=we(42978),ce=we(75931),se=we(59301),re=we(92310),ue=we.n(re),ee=we(18929),te=we(10228),E=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],y=se.forwardRef(function(z,x){var ne,ae=z.prefixCls,oe=ae===void 0?"rc-switch":ae,ge=z.className,Se=z.checked,ve=z.defaultChecked,be=z.disabled,xe=z.loadingIcon,pe=z.checkedChildren,me=z.unCheckedChildren,Ae=z.onClick,De=z.onChange,ke=z.onKeyDown,Ie=(0,ce.Z)(z,E),Fe=(0,ee.Z)(!1,{value:Se,defaultValue:ve}),Pe=(0,Ee.Z)(Fe,2),qe=Pe[0],Ke=Pe[1];function ot(ct,We){var Ue=qe;return be||(Ue=ct,Ke(Ue),De==null||De(Ue,We)),Ue}function He(ct){ct.which===te.Z.LEFT?ot(!1,ct):ct.which===te.Z.RIGHT&&ot(!0,ct),ke==null||ke(ct)}function rt(ct){var We=ot(!qe,ct);Ae==null||Ae(We,ct)}var Ge=ue()(oe,ge,(ne={},(0,ie.Z)(ne,"".concat(oe,"-checked"),qe),(0,ie.Z)(ne,"".concat(oe,"-disabled"),be),ne));return se.createElement("button",(0,de.Z)({},Ie,{type:"button",role:"switch","aria-checked":qe,disabled:be,className:Ge,ref:x,onKeyDown:He,onClick:rt}),xe,se.createElement("span",{className:"".concat(oe,"-inner")},se.createElement("span",{className:"".concat(oe,"-inner-checked")},pe),se.createElement("span",{className:"".concat(oe,"-inner-unchecked")},me)))});y.displayName="Switch",Ot.Z=y},86351:function(Jt,Ot,we){"use strict";we.d(Ot,{R:function(){return ie},w:function(){return de}});var de={},ie="rc-table-internal-hook"},97347:function(Jt,Ot,we){"use strict";we.d(Ot,{L:function(){return oe},Z:function(){return xe}});var de=we(42978),ie=we(20068),Ee=we(94480),ce=we(76190),se=we(33885),re=we(75931),ue=we(11592),ee=we(48736),te=we(59301),E=we(86351),y=we(54451);function z(pe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof me=="number"?me:me.endsWith("%")?pe*parseFloat(me)/100:null}function x(pe,me,Ae){return te.useMemo(function(){if(me&&me>0){var De=0,ke=0;pe.forEach(function(rt){var Ge=z(me,rt.width);Ge?De+=Ge:ke+=1});var Ie=Math.max(me,Ae),Fe=Math.max(Ie-De,ke),Pe=ke,qe=Fe/ke,Ke=0,ot=pe.map(function(rt){var Ge=(0,se.Z)({},rt),ct=z(me,Ge.width);if(ct)Ge.width=ct;else{var We=Math.floor(qe);Ge.width=Pe===1?Fe:We,Fe-=We,Pe-=1}return Ke+=Ge.width,Ge});if(Ke<Ie){var He=Ie/Ke;Fe=Ie,ot.forEach(function(rt,Ge){var ct=Math.floor(rt.width*He);rt.width=Ge===ot.length-1?Fe:ct,Fe-=ct})}return[ot,Math.max(Ke,Ie)]}return[pe,me]},[pe,me,Ae])}var ne=["children"],ae=["fixed"];function oe(pe){return(0,ue.Z)(pe).filter(function(me){return te.isValidElement(me)}).map(function(me){var Ae=me.key,De=me.props,ke=De.children,Ie=(0,re.Z)(De,ne),Fe=(0,se.Z)({key:Ae},Ie);return ke&&(Fe.children=oe(ke)),Fe})}function ge(pe){return pe.filter(function(me){return me&&(0,ce.Z)(me)==="object"&&!me.hidden}).map(function(me){var Ae=me.children;return Ae&&Ae.length>0?(0,se.Z)((0,se.Z)({},me),{},{children:ge(Ae)}):me})}function Se(pe){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return pe.filter(function(Ae){return Ae&&(0,ce.Z)(Ae)==="object"}).reduce(function(Ae,De,ke){var Ie=De.fixed,Fe=Ie===!0?"left":Ie,Pe="".concat(me,"-").concat(ke),qe=De.children;return qe&&qe.length>0?[].concat((0,Ee.Z)(Ae),(0,Ee.Z)(Se(qe,Pe).map(function(Ke){return(0,se.Z)({fixed:Fe},Ke)}))):[].concat((0,Ee.Z)(Ae),[(0,se.Z)((0,se.Z)({key:Pe},De),{},{fixed:Fe})])},[])}function ve(pe){return pe.map(function(me){var Ae=me.fixed,De=(0,re.Z)(me,ae),ke=Ae;return Ae==="left"?ke="right":Ae==="right"&&(ke="left"),(0,se.Z)({fixed:ke},De)})}function be(pe,me){var Ae=pe.prefixCls,De=pe.columns,ke=pe.children,Ie=pe.expandable,Fe=pe.expandedKeys,Pe=pe.columnTitle,qe=pe.getRowKey,Ke=pe.onTriggerExpand,ot=pe.expandIcon,He=pe.rowExpandable,rt=pe.expandIconColumnIndex,Ge=pe.direction,ct=pe.expandRowByClick,We=pe.columnWidth,Ue=pe.fixed,Ze=pe.scrollWidth,Je=pe.clientWidth,$e=te.useMemo(function(){var _t=De||oe(ke)||[];return ge(_t.slice())},[De,ke]),Qe=te.useMemo(function(){if(Ie){var _t=$e.slice();if(!_t.includes(E.w)){var dt=rt||0;dt>=0&&(dt||Ue==="left"||!Ue)&&_t.splice(dt,0,E.w),Ue==="right"&&_t.splice($e.length,0,E.w)}var nt=_t.indexOf(E.w);_t=_t.filter(function(Tt,Re){return Tt!==E.w||Re===nt});var et=$e[nt],ft;Ue?ft=Ue:ft=et?et.fixed:null;var wt=(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},y.v,{className:"".concat(Ae,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Pe),"fixed",ft),"className","".concat(Ae,"-row-expand-icon-cell")),"width",We),"render",function(Re,Le,Te){var je=qe(Le,Te),ye=Fe.has(je),le=He?He(Le):!0,_e=ot({prefixCls:Ae,expanded:ye,expandable:le,record:Le,onExpand:Ke});return ct?te.createElement("span",{onClick:function(Ye){return Ye.stopPropagation()}},_e):_e});return _t.map(function(Tt){return Tt===E.w?wt:Tt})}return $e.filter(function(Tt){return Tt!==E.w})},[Ie,$e,qe,Fe,ot,Ge]),pt=te.useMemo(function(){var _t=Qe;return me&&(_t=me(_t)),_t.length||(_t=[{render:function(){return null}}]),_t},[me,Qe,Ge]),ht=te.useMemo(function(){return Ge==="rtl"?ve(Se(pt)):Se(pt)},[pt,Ge,Ze]),Pt=te.useMemo(function(){for(var _t=-1,dt=ht.length-1;dt>=0;dt-=1){var nt=ht[dt].fixed;if(nt==="left"||nt===!0){_t=dt;break}}if(_t>=0)for(var et=0;et<=_t;et+=1){var ft=ht[et].fixed;if(ft!=="left"&&ft!==!0)return!0}var wt=ht.findIndex(function(Le){var Te=Le.fixed;return Te==="right"});if(wt>=0)for(var Tt=wt;Tt<ht.length;Tt+=1){var Re=ht[Tt].fixed;if(Re!=="right")return!0}return!1},[ht]),gt=x(ht,Ze,Je),bt=(0,de.Z)(gt,2),St=bt[0],lt=bt[1];return[pt,St,lt,Pt]}var xe=be},4030:function(Jt,Ot,we){"use strict";we.d(Ot,{w2:function(){return de.w},vP:function(){return Jn.v},RQ:function(){return de.R},ER:function(){return je},Q$:function(){return Lr},TN:function(){return Jr}});var de=we(86351),ie=we(42978),Ee=we(6089),ce=we(34280),se=we(13697),re=we(59301),ue=we(4676);function ee(It){var tn=re.createContext(void 0),Vt=function(cn){var hn=cn.value,Fn=cn.children,An=re.useRef(hn);An.current=hn;var Sn=re.useState(function(){return{getValue:function(){return An.current},listeners:new Set}}),Gt=(0,ie.Z)(Sn,1),ln=Gt[0];return(0,ce.Z)(function(){(0,ue.unstable_batchedUpdates)(function(){ln.listeners.forEach(function(dn){dn(hn)})})},[hn]),re.createElement(tn.Provider,{value:ln},Fn)};return{Context:tn,Provider:Vt,defaultValue:It}}function te(It,tn){var Vt=(0,Ee.Z)(typeof tn=="function"?tn:function(dn){if(tn===void 0)return dn;if(!Array.isArray(tn))return dn[tn];var un={};return tn.forEach(function(vn){un[vn]=dn[vn]}),un}),$t=re.useContext(It==null?void 0:It.Context),cn=$t||{},hn=cn.listeners,Fn=cn.getValue,An=re.useRef();An.current=Vt($t?Fn():It==null?void 0:It.defaultValue);var Sn=re.useState({}),Gt=(0,ie.Z)(Sn,2),ln=Gt[1];return(0,ce.Z)(function(){if(!$t)return;function dn(un){var vn=Vt(un);(0,se.Z)(An.current,vn,!0)||ln({})}return hn.add(dn),function(){hn.delete(dn)}},[$t]),An.current}var E=we(54476),y=we(8654);function z(){var It=re.createContext(null);function tn(){return re.useContext(It)}function Vt(cn,hn){var Fn=(0,y.Yr)(cn),An=function(Gt,ln){var dn=Fn?{ref:ln}:{},un=re.useRef(0),vn=re.useRef(Gt),Gn=tn();return Gn!==null?re.createElement(cn,(0,E.Z)({},Gt,dn)):((!hn||hn(vn.current,Gt))&&(un.current+=1),vn.current=Gt,re.createElement(It.Provider,{value:un.current},re.createElement(cn,(0,E.Z)({},Gt,dn))))};return Fn?re.forwardRef(An):An}function $t(cn,hn){var Fn=(0,y.Yr)(cn),An=function(Gt,ln){var dn=Fn?{ref:ln}:{};return tn(),re.createElement(cn,(0,E.Z)({},Gt,dn))};return Fn?re.memo(re.forwardRef(An),hn):re.memo(An,hn)}return{makeImmutable:Vt,responseImmutable:$t,useImmutableMark:tn}}var x=z(),ne=x.makeImmutable,ae=x.responseImmutable,oe=x.useImmutableMark,ge=z(),Se=ge.makeImmutable,ve=ge.responseImmutable,be=ge.useImmutableMark,xe=ee(),pe=xe;function me(It,tn){var Vt=React.useRef(0);Vt.current+=1;var $t=React.useRef(It),cn=[];Object.keys(It||{}).map(function(Fn){var An;(It==null?void 0:It[Fn])!==((An=$t.current)===null||An===void 0?void 0:An[Fn])&&cn.push(Fn)}),$t.current=It;var hn=React.useRef([]);return cn.length&&(hn.current=cn),React.useDebugValue(Vt.current),React.useDebugValue(hn.current.join(", ")),tn&&console.log("".concat(tn,":"),Vt.current,hn.current),Vt.current}var Ae=null,De=null,ke=we(76190),Ie=we(33885),Fe=we(20068),Pe=we(92310),qe=we.n(Pe),Ke=we(80547),ot=we(97938),He=we(48736),rt=re.createContext({renderWithProps:!1}),Ge=rt,ct="RC_TABLE_KEY";function We(It){return It==null?[]:Array.isArray(It)?It:[It]}function Ue(It){var tn=[],Vt={};return It.forEach(function($t){for(var cn=$t||{},hn=cn.key,Fn=cn.dataIndex,An=hn||We(Fn).join("-")||ct;Vt[An];)An="".concat(An,"_next");Vt[An]=!0,tn.push(An)}),tn}function Ze(It){return It!=null}function Je(It){return typeof It=="number"&&!Number.isNaN(It)}function $e(It){return It&&(0,ke.Z)(It)==="object"&&!Array.isArray(It)&&!re.isValidElement(It)}function Qe(It,tn,Vt,$t,cn,hn){var Fn=re.useContext(Ge),An=be(),Sn=(0,Ke.Z)(function(){if(Ze($t))return[$t];var Gt=tn==null||tn===""?[]:Array.isArray(tn)?tn:[tn],ln=(0,ot.Z)(It,Gt),dn=ln,un=void 0;if(cn){var vn=cn(ln,It,Vt);$e(vn)?(dn=vn.children,un=vn.props,Fn.renderWithProps=!0):dn=vn}return[dn,un]},[An,It,$t,tn,cn,Vt],function(Gt,ln){if(hn){var dn=(0,ie.Z)(Gt,2),un=dn[1],vn=(0,ie.Z)(ln,2),Gn=vn[1];return hn(Gn,un)}return Fn.renderWithProps?!0:!(0,se.Z)(Gt,ln,!0)});return Sn}function pt(It,tn,Vt,$t){var cn=It+tn-1;return It<=$t&&cn>=Vt}function ht(It,tn){return te(pe,function(Vt){var $t=pt(It,tn||1,Vt.hoverStartRow,Vt.hoverEndRow);return[$t,Vt.onHover]})}var Pt=we(70425),gt=function(tn){var Vt=tn.ellipsis,$t=tn.rowType,cn=tn.children,hn,Fn=Vt===!0?{showTitle:!0}:Vt;return Fn&&(Fn.showTitle||$t==="header")&&(typeof cn=="string"||typeof cn=="number"?hn=cn.toString():re.isValidElement(cn)&&typeof cn.props.children=="string"&&(hn=cn.props.children)),hn};function bt(It){var tn,Vt,$t,cn,hn,Fn,An,Sn,Gt=It.component,ln=It.children,dn=It.ellipsis,un=It.scope,vn=It.prefixCls,Gn=It.className,yn=It.align,fn=It.record,Rn=It.render,On=It.dataIndex,qn=It.renderIndex,gr=It.shouldCellUpdate,dr=It.index,Pr=It.rowType,Er=It.colSpan,Ir=It.rowSpan,Zr=It.fixLeft,Fr=It.fixRight,li=It.firstFixLeft,Wr=It.lastFixLeft,qr=It.firstFixRight,Rr=It.lastFixRight,hr=It.appendNode,vr=It.additionalProps,jr=vr===void 0?{}:vr,_r=It.isSticky,Qr="".concat(vn,"-cell"),ti=te(pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),di=ti.supportSticky,po=ti.allColumnsFixedLeft,ao=ti.rowHoverable,to=Qe(fn,On,qn,ln,Rn,gr),mo=(0,ie.Z)(to,2),Ii=mo[0],Ti=mo[1],Ni={},vo=typeof Zr=="number"&&di,Fi=typeof Fr=="number"&&di;vo&&(Ni.position="sticky",Ni.left=Zr),Fi&&(Ni.position="sticky",Ni.right=Fr);var Gi=(tn=(Vt=($t=Ti==null?void 0:Ti.colSpan)!==null&&$t!==void 0?$t:jr.colSpan)!==null&&Vt!==void 0?Vt:Er)!==null&&tn!==void 0?tn:1,ji=(cn=(hn=(Fn=Ti==null?void 0:Ti.rowSpan)!==null&&Fn!==void 0?Fn:jr.rowSpan)!==null&&hn!==void 0?hn:Ir)!==null&&cn!==void 0?cn:1,xr=ht(dr,ji),Kr=(0,ie.Z)(xr,2),Gr=Kr[0],Xr=Kr[1],xi=(0,Pt.zX)(function(Io){var Ui;fn&&Xr(dr,dr+ji-1),jr==null||(Ui=jr.onMouseEnter)===null||Ui===void 0||Ui.call(jr,Io)}),Oi=(0,Pt.zX)(function(Io){var Ui;fn&&Xr(-1,-1),jr==null||(Ui=jr.onMouseLeave)===null||Ui===void 0||Ui.call(jr,Io)});if(Gi===0||ji===0)return null;var Ao=(An=jr.title)!==null&&An!==void 0?An:gt({rowType:Pr,ellipsis:dn,children:Ii}),Yi=qe()(Qr,Gn,(Sn={},(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)(Sn,"".concat(Qr,"-fix-left"),vo&&di),"".concat(Qr,"-fix-left-first"),li&&di),"".concat(Qr,"-fix-left-last"),Wr&&di),"".concat(Qr,"-fix-left-all"),Wr&&po&&di),"".concat(Qr,"-fix-right"),Fi&&di),"".concat(Qr,"-fix-right-first"),qr&&di),"".concat(Qr,"-fix-right-last"),Rr&&di),"".concat(Qr,"-ellipsis"),dn),"".concat(Qr,"-with-append"),hr),"".concat(Qr,"-fix-sticky"),(vo||Fi)&&_r&&di),(0,Fe.Z)(Sn,"".concat(Qr,"-row-hover"),!Ti&&Gr)),jr.className,Ti==null?void 0:Ti.className),Xi={};yn&&(Xi.textAlign=yn);var ui=(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},Ti==null?void 0:Ti.style),Ni),Xi),jr.style),no=Ii;return(0,ke.Z)(no)==="object"&&!Array.isArray(no)&&!re.isValidElement(no)&&(no=null),dn&&(Wr||qr)&&(no=re.createElement("span",{className:"".concat(Qr,"-content")},no)),re.createElement(Gt,(0,E.Z)({},Ti,jr,{className:Yi,style:ui,title:Ao,scope:un,onMouseEnter:ao?xi:void 0,onMouseLeave:ao?Oi:void 0,colSpan:Gi!==1?Gi:null,rowSpan:ji!==1?ji:null}),hr,no)}var St=re.memo(bt);function lt(It,tn,Vt,$t,cn){var hn=Vt[It]||{},Fn=Vt[tn]||{},An,Sn;hn.fixed==="left"?An=$t.left[cn==="rtl"?tn:It]:Fn.fixed==="right"&&(Sn=$t.right[cn==="rtl"?It:tn]);var Gt=!1,ln=!1,dn=!1,un=!1,vn=Vt[tn+1],Gn=Vt[It-1],yn=vn&&!vn.fixed||Gn&&!Gn.fixed||Vt.every(function(gr){return gr.fixed==="left"});if(cn==="rtl"){if(An!==void 0){var fn=Gn&&Gn.fixed==="left";un=!fn&&yn}else if(Sn!==void 0){var Rn=vn&&vn.fixed==="right";dn=!Rn&&yn}}else if(An!==void 0){var On=vn&&vn.fixed==="left";Gt=!On&&yn}else if(Sn!==void 0){var qn=Gn&&Gn.fixed==="right";ln=!qn&&yn}return{fixLeft:An,fixRight:Sn,lastFixLeft:Gt,firstFixRight:ln,lastFixRight:dn,firstFixLeft:un,isSticky:$t.isSticky}}var _t=re.createContext({}),dt=_t;function nt(It){var tn=It.className,Vt=It.index,$t=It.children,cn=It.colSpan,hn=cn===void 0?1:cn,Fn=It.rowSpan,An=It.align,Sn=te(pe,["prefixCls","direction"]),Gt=Sn.prefixCls,ln=Sn.direction,dn=re.useContext(dt),un=dn.scrollColumnIndex,vn=dn.stickyOffsets,Gn=dn.flattenColumns,yn=Vt+hn-1,fn=yn+1===un?hn+1:hn,Rn=lt(Vt,Vt+fn-1,Gn,vn,ln);return re.createElement(St,(0,E.Z)({className:tn,index:Vt,component:"td",prefixCls:Gt,record:null,dataIndex:null,align:An,colSpan:fn,rowSpan:Fn,render:function(){return $t}},Rn))}var et=we(75931),ft=["children"];function wt(It){var tn=It.children,Vt=(0,et.Z)(It,ft);return re.createElement("tr",Vt,tn)}function Tt(It){var tn=It.children;return tn}Tt.Row=wt,Tt.Cell=nt;var Re=Tt;function Le(It){var tn=It.children,Vt=It.stickyOffsets,$t=It.flattenColumns,cn=te(pe,"prefixCls"),hn=$t.length-1,Fn=$t[hn],An=re.useMemo(function(){return{stickyOffsets:Vt,flattenColumns:$t,scrollColumnIndex:Fn!=null&&Fn.scrollbar?hn:null}},[Fn,$t,hn,Vt]);return re.createElement(dt.Provider,{value:An},re.createElement("tfoot",{className:"".concat(cn,"-summary")},tn))}var Te=ve(Le),je=Re,ye=we(29301),le=we(3465),_e=we(75152),Ne=we(26112);function Ye(It,tn,Vt,$t,cn,hn,Fn){It.push({record:tn,indent:Vt,index:Fn});var An=hn(tn),Sn=cn==null?void 0:cn.has(An);if(tn&&Array.isArray(tn[$t])&&Sn)for(var Gt=0;Gt<tn[$t].length;Gt+=1)Ye(It,tn[$t][Gt],Vt+1,$t,cn,hn,Gt)}function Oe(It,tn,Vt,$t){var cn=re.useMemo(function(){if(Vt!=null&&Vt.size){for(var hn=[],Fn=0;Fn<(It==null?void 0:It.length);Fn+=1){var An=It[Fn];Ye(hn,An,0,tn,Vt,$t,Fn)}return hn}return It==null?void 0:It.map(function(Sn,Gt){return{record:Sn,indent:0,index:Gt}})},[It,tn,Vt,$t]);return cn}function tt(It,tn,Vt,$t){var cn=te(pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),hn=cn.flattenColumns,Fn=cn.expandableType,An=cn.expandedKeys,Sn=cn.childrenColumnName,Gt=cn.onTriggerExpand,ln=cn.rowExpandable,dn=cn.onRow,un=cn.expandRowByClick,vn=cn.rowClassName,Gn=Fn==="nest",yn=Fn==="row"&&(!ln||ln(It)),fn=yn||Gn,Rn=An&&An.has(tn),On=Sn&&It&&It[Sn],qn=(0,Pt.zX)(Gt),gr=dn==null?void 0:dn(It,Vt),dr=gr==null?void 0:gr.onClick,Pr=function(Fr){un&&fn&&Gt(It,Fr);for(var li=arguments.length,Wr=new Array(li>1?li-1:0),qr=1;qr<li;qr++)Wr[qr-1]=arguments[qr];dr==null||dr.apply(void 0,[Fr].concat(Wr))},Er;typeof vn=="string"?Er=vn:typeof vn=="function"&&(Er=vn(It,Vt,$t));var Ir=Ue(hn);return(0,Ie.Z)((0,Ie.Z)({},cn),{},{columnsKey:Ir,nestExpandable:Gn,expanded:Rn,hasNestChildren:On,record:It,onTriggerExpand:qn,rowSupportExpand:yn,expandable:fn,rowProps:(0,Ie.Z)((0,Ie.Z)({},gr),{},{className:qe()(Er,gr==null?void 0:gr.className),onClick:Pr})})}function Ct(It){var tn=It.prefixCls,Vt=It.children,$t=It.component,cn=It.cellComponent,hn=It.className,Fn=It.expanded,An=It.colSpan,Sn=It.isEmpty,Gt=te(pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),ln=Gt.scrollbarSize,dn=Gt.fixHeader,un=Gt.fixColumn,vn=Gt.componentWidth,Gn=Gt.horizonScroll,yn=Vt;return(Sn?Gn&&vn:un)&&(yn=re.createElement("div",{style:{width:vn-(dn&&!Sn?ln:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(tn,"-expanded-row-fixed")},yn)),re.createElement($t,{className:hn,style:{display:Fn?null:"none"}},re.createElement(St,{component:cn,prefixCls:tn,colSpan:An},yn))}var Nt=Ct;function Dt(It){var tn=It.prefixCls,Vt=It.record,$t=It.onExpand,cn=It.expanded,hn=It.expandable,Fn="".concat(tn,"-row-expand-icon");if(!hn)return re.createElement("span",{className:qe()(Fn,"".concat(tn,"-row-spaced"))});var An=function(Gt){$t(Vt,Gt),Gt.stopPropagation()};return re.createElement("span",{className:qe()(Fn,(0,Fe.Z)((0,Fe.Z)({},"".concat(tn,"-row-expanded"),cn),"".concat(tn,"-row-collapsed"),!cn)),onClick:An})}function ut(It,tn,Vt){var $t=[];function cn(hn){(hn||[]).forEach(function(Fn,An){$t.push(tn(Fn,An)),cn(Fn[Vt])})}return cn(It),$t}function Ht(It,tn,Vt,$t){return typeof It=="string"?It:typeof It=="function"?It(tn,Vt,$t):""}function At(It,tn,Vt,$t,cn){var hn=It.record,Fn=It.prefixCls,An=It.columnsKey,Sn=It.fixedInfoList,Gt=It.expandIconColumnIndex,ln=It.nestExpandable,dn=It.indentSize,un=It.expandIcon,vn=It.expanded,Gn=It.hasNestChildren,yn=It.onTriggerExpand,fn=An[Vt],Rn=Sn[Vt],On;Vt===(Gt||0)&&ln&&(On=re.createElement(re.Fragment,null,re.createElement("span",{style:{paddingLeft:"".concat(dn*$t,"px")},className:"".concat(Fn,"-row-indent indent-level-").concat($t)}),un({prefixCls:Fn,expanded:vn,expandable:Gn,record:hn,onExpand:yn})));var qn;return tn.onCell&&(qn=tn.onCell(hn,cn)),{key:fn,fixedInfo:Rn,appendCellNode:On,additionalCellProps:qn||{}}}function Wt(It){var tn=It.className,Vt=It.style,$t=It.record,cn=It.index,hn=It.renderIndex,Fn=It.rowKey,An=It.indent,Sn=An===void 0?0:An,Gt=It.rowComponent,ln=It.cellComponent,dn=It.scopeCellComponent,un=tt($t,Fn,cn,Sn),vn=un.prefixCls,Gn=un.flattenColumns,yn=un.expandedRowClassName,fn=un.expandedRowRender,Rn=un.rowProps,On=un.expanded,qn=un.rowSupportExpand,gr=re.useRef(!1);gr.current||(gr.current=On);var dr=Ht(yn,$t,cn,Sn),Pr=re.createElement(Gt,(0,E.Z)({},Rn,{"data-row-key":Fn,className:qe()(tn,"".concat(vn,"-row"),"".concat(vn,"-row-level-").concat(Sn),Rn==null?void 0:Rn.className,(0,Fe.Z)({},dr,Sn>=1)),style:(0,Ie.Z)((0,Ie.Z)({},Vt),Rn==null?void 0:Rn.style)}),Gn.map(function(Zr,Fr){var li=Zr.render,Wr=Zr.dataIndex,qr=Zr.className,Rr=At(un,Zr,Fr,Sn,cn),hr=Rr.key,vr=Rr.fixedInfo,jr=Rr.appendCellNode,_r=Rr.additionalCellProps;return re.createElement(St,(0,E.Z)({className:qr,ellipsis:Zr.ellipsis,align:Zr.align,scope:Zr.rowScope,component:Zr.rowScope?dn:ln,prefixCls:vn,key:hr,record:$t,index:cn,renderIndex:hn,dataIndex:Wr,render:li,shouldCellUpdate:Zr.shouldCellUpdate},vr,{appendNode:jr,additionalProps:_r}))})),Er;if(qn&&(gr.current||On)){var Ir=fn($t,cn,Sn+1,On);Er=re.createElement(Nt,{expanded:On,className:qe()("".concat(vn,"-expanded-row"),"".concat(vn,"-expanded-row-level-").concat(Sn+1),dr),prefixCls:vn,component:Gt,cellComponent:ln,colSpan:Gn.length,isEmpty:!1},Ir)}return re.createElement(re.Fragment,null,Pr,Er)}var on=ve(Wt);function bn(It){var tn=It.columnKey,Vt=It.onColumnResize,$t=re.useRef();return(0,ce.Z)(function(){$t.current&&Vt(tn,$t.current.offsetWidth)},[]),re.createElement(ye.Z,{data:tn},re.createElement("td",{ref:$t,style:{padding:0,border:0,height:0}},re.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Yt=we(29194);function Mn(It){var tn=It.prefixCls,Vt=It.columnsKey,$t=It.onColumnResize,cn=re.useRef(null);return re.createElement("tr",{"aria-hidden":"true",className:"".concat(tn,"-measure-row"),style:{height:0,fontSize:0},ref:cn},re.createElement(ye.Z.Collection,{onBatchResize:function(Fn){(0,Yt.Z)(cn.current)&&Fn.forEach(function(An){var Sn=An.data,Gt=An.size;$t(Sn,Gt.offsetWidth)})}},Vt.map(function(hn){return re.createElement(bn,{key:hn,columnKey:hn,onColumnResize:$t})})))}function Yn(It){var tn=It.data,Vt=It.measureColumnWidth,$t=te(pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),cn=$t.prefixCls,hn=$t.getComponent,Fn=$t.onColumnResize,An=$t.flattenColumns,Sn=$t.getRowKey,Gt=$t.expandedKeys,ln=$t.childrenColumnName,dn=$t.emptyNode,un=Oe(tn,ln,Gt,Sn),vn=re.useRef({renderWithProps:!1}),Gn=hn(["body","wrapper"],"tbody"),yn=hn(["body","row"],"tr"),fn=hn(["body","cell"],"td"),Rn=hn(["body","cell"],"th"),On;tn.length?On=un.map(function(gr,dr){var Pr=gr.record,Er=gr.indent,Ir=gr.index,Zr=Sn(Pr,dr);return re.createElement(on,{key:Zr,rowKey:Zr,record:Pr,index:dr,renderIndex:Ir,rowComponent:yn,cellComponent:fn,scopeCellComponent:Rn,indent:Er})}):On=re.createElement(Nt,{expanded:!0,className:"".concat(cn,"-placeholder"),prefixCls:cn,component:yn,cellComponent:fn,colSpan:An.length,isEmpty:!0},dn);var qn=Ue(An);return re.createElement(Ge.Provider,{value:vn.current},re.createElement(Gn,{className:"".concat(cn,"-tbody")},Vt&&re.createElement(Mn,{prefixCls:cn,columnsKey:qn,onColumnResize:Fn}),On))}var Vn=ve(Yn),Jn=we(54451),ar=["columnType"];function ur(It){for(var tn=It.colWidths,Vt=It.columns,$t=It.columCount,cn=te(pe,["tableLayout"]),hn=cn.tableLayout,Fn=[],An=$t||Vt.length,Sn=!1,Gt=An-1;Gt>=0;Gt-=1){var ln=tn[Gt],dn=Vt&&Vt[Gt],un=void 0,vn=void 0;if(dn&&(un=dn[Jn.v],hn==="auto"&&(vn=dn.minWidth)),ln||vn||un||Sn){var Gn=un||{},yn=Gn.columnType,fn=(0,et.Z)(Gn,ar);Fn.unshift(re.createElement("col",(0,E.Z)({key:Gt,style:{width:ln,minWidth:vn}},fn))),Sn=!0}}return re.createElement("colgroup",null,Fn)}var jn=ur,Bn=we(94480),sr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Hn(It,tn){return(0,re.useMemo)(function(){for(var Vt=[],$t=0;$t<tn;$t+=1){var cn=It[$t];if(cn!==void 0)Vt[$t]=cn;else return null}return Vt},[It.join("_"),tn])}var In=re.forwardRef(function(It,tn){var Vt=It.className,$t=It.noData,cn=It.columns,hn=It.flattenColumns,Fn=It.colWidths,An=It.columCount,Sn=It.stickyOffsets,Gt=It.direction,ln=It.fixHeader,dn=It.stickyTopOffset,un=It.stickyBottomOffset,vn=It.stickyClassName,Gn=It.onScroll,yn=It.maxContentScroll,fn=It.children,Rn=(0,et.Z)(It,sr),On=te(pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),qn=On.prefixCls,gr=On.scrollbarSize,dr=On.isSticky,Pr=On.getComponent,Er=Pr(["header","table"],"table"),Ir=dr&&!ln?0:gr,Zr=re.useRef(null),Fr=re.useCallback(function(_r){(0,y.mH)(tn,_r),(0,y.mH)(Zr,_r)},[]);re.useEffect(function(){var _r;function Qr(ti){var di=ti,po=di.currentTarget,ao=di.deltaX;ao&&(Gn({currentTarget:po,scrollLeft:po.scrollLeft+ao}),ti.preventDefault())}return(_r=Zr.current)===null||_r===void 0||_r.addEventListener("wheel",Qr,{passive:!1}),function(){var ti;(ti=Zr.current)===null||ti===void 0||ti.removeEventListener("wheel",Qr)}},[]);var li=re.useMemo(function(){return hn.every(function(_r){return _r.width})},[hn]),Wr=hn[hn.length-1],qr={fixed:Wr?Wr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(qn,"-cell-scrollbar")}}},Rr=(0,re.useMemo)(function(){return Ir?[].concat((0,Bn.Z)(cn),[qr]):cn},[Ir,cn]),hr=(0,re.useMemo)(function(){return Ir?[].concat((0,Bn.Z)(hn),[qr]):hn},[Ir,hn]),vr=(0,re.useMemo)(function(){var _r=Sn.right,Qr=Sn.left;return(0,Ie.Z)((0,Ie.Z)({},Sn),{},{left:Gt==="rtl"?[].concat((0,Bn.Z)(Qr.map(function(ti){return ti+Ir})),[0]):Qr,right:Gt==="rtl"?_r:[].concat((0,Bn.Z)(_r.map(function(ti){return ti+Ir})),[0]),isSticky:dr})},[Ir,Sn,dr]),jr=Hn(Fn,An);return re.createElement("div",{style:(0,Ie.Z)({overflow:"hidden"},dr?{top:dn,bottom:un}:{}),ref:Fr,className:qe()(Vt,(0,Fe.Z)({},vn,!!vn))},re.createElement(Er,{style:{tableLayout:"fixed",visibility:$t||jr?null:"hidden"}},(!$t||!yn||li)&&re.createElement(jn,{colWidths:jr?[].concat((0,Bn.Z)(jr),[Ir]):[],columCount:An+1,columns:hr}),fn((0,Ie.Z)((0,Ie.Z)({},Rn),{},{stickyOffsets:vr,columns:Rr,flattenColumns:hr}))))}),gn=re.memo(In),Wn=function(tn){var Vt=tn.cells,$t=tn.stickyOffsets,cn=tn.flattenColumns,hn=tn.rowComponent,Fn=tn.cellComponent,An=tn.onHeaderRow,Sn=tn.index,Gt=te(pe,["prefixCls","direction"]),ln=Gt.prefixCls,dn=Gt.direction,un;An&&(un=An(Vt.map(function(Gn){return Gn.column}),Sn));var vn=Ue(Vt.map(function(Gn){return Gn.column}));return re.createElement(hn,un,Vt.map(function(Gn,yn){var fn=Gn.column,Rn=lt(Gn.colStart,Gn.colEnd,cn,$t,dn),On;return fn&&fn.onHeaderCell&&(On=Gn.column.onHeaderCell(fn)),re.createElement(St,(0,E.Z)({},Gn,{scope:fn.title?Gn.colSpan>1?"colgroup":"col":null,ellipsis:fn.ellipsis,align:fn.align,component:Fn,prefixCls:ln,key:vn[yn]},Rn,{additionalProps:On,rowType:"header"}))}))},fr=Wn;function mn(It){var tn=[];function Vt(Fn,An){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;tn[Sn]=tn[Sn]||[];var Gt=An,ln=Fn.filter(Boolean).map(function(dn){var un={key:dn.key,className:dn.className||"",children:dn.title,column:dn,colStart:Gt},vn=1,Gn=dn.children;return Gn&&Gn.length>0&&(vn=Vt(Gn,Gt,Sn+1).reduce(function(yn,fn){return yn+fn},0),un.hasSubColumns=!0),"colSpan"in dn&&(vn=dn.colSpan),"rowSpan"in dn&&(un.rowSpan=dn.rowSpan),un.colSpan=vn,un.colEnd=un.colStart+vn-1,tn[Sn].push(un),Gt+=vn,vn});return ln}Vt(It,0);for(var $t=tn.length,cn=function(An){tn[An].forEach(function(Sn){!("rowSpan"in Sn)&&!Sn.hasSubColumns&&(Sn.rowSpan=$t-An)})},hn=0;hn<$t;hn+=1)cn(hn);return tn}var En=function(tn){var Vt=tn.stickyOffsets,$t=tn.columns,cn=tn.flattenColumns,hn=tn.onHeaderRow,Fn=te(pe,["prefixCls","getComponent"]),An=Fn.prefixCls,Sn=Fn.getComponent,Gt=re.useMemo(function(){return mn($t)},[$t]),ln=Sn(["header","wrapper"],"thead"),dn=Sn(["header","row"],"tr"),un=Sn(["header","cell"],"th");return re.createElement(ln,{className:"".concat(An,"-thead")},Gt.map(function(vn,Gn){var yn=re.createElement(fr,{key:Gn,flattenColumns:cn,cells:vn,stickyOffsets:Vt,rowComponent:dn,cellComponent:un,onHeaderRow:hn,index:Gn});return yn}))},rr=ve(En),Qt=we(97347);function Me(It,tn,Vt){var $t=(0,Jn.g)(It),cn=$t.expandIcon,hn=$t.expandedRowKeys,Fn=$t.defaultExpandedRowKeys,An=$t.defaultExpandAllRows,Sn=$t.expandedRowRender,Gt=$t.onExpand,ln=$t.onExpandedRowsChange,dn=$t.childrenColumnName,un=cn||Dt,vn=dn||"children",Gn=re.useMemo(function(){return Sn?"row":It.expandable&&It.internalHooks===de.R&&It.expandable.__PARENT_RENDER_ICON__||tn.some(function(dr){return dr&&(0,ke.Z)(dr)==="object"&&dr[vn]})?"nest":!1},[!!Sn,tn]),yn=re.useState(function(){return Fn||(An?ut(tn,Vt,vn):[])}),fn=(0,ie.Z)(yn,2),Rn=fn[0],On=fn[1],qn=re.useMemo(function(){return new Set(hn||Rn||[])},[hn,Rn]),gr=re.useCallback(function(dr){var Pr=Vt(dr,tn.indexOf(dr)),Er,Ir=qn.has(Pr);Ir?(qn.delete(Pr),Er=(0,Bn.Z)(qn)):Er=[].concat((0,Bn.Z)(qn),[Pr]),On(Er),Gt&&Gt(!Ir,dr),ln&&ln(Er)},[Vt,qn,tn,Gt,ln]);return[$t,Gn,qn,un,vn,gr]}function ze(It,tn,Vt){var $t=It.map(function(cn,hn){return lt(hn,hn,It,tn,Vt)});return(0,Ke.Z)(function(){return $t},[$t],function(cn,hn){return!(0,se.Z)(cn,hn)})}function Ve(It){var tn=(0,re.useRef)(It),Vt=(0,re.useState)({}),$t=(0,ie.Z)(Vt,2),cn=$t[1],hn=(0,re.useRef)(null),Fn=(0,re.useRef)([]);function An(Sn){Fn.current.push(Sn);var Gt=Promise.resolve();hn.current=Gt,Gt.then(function(){if(hn.current===Gt){var ln=Fn.current,dn=tn.current;Fn.current=[],ln.forEach(function(un){tn.current=un(tn.current)}),hn.current=null,dn!==tn.current&&cn({})}})}return(0,re.useEffect)(function(){return function(){hn.current=null}},[]),[tn.current,An]}function st(It){var tn=(0,re.useRef)(It||null),Vt=(0,re.useRef)();function $t(){window.clearTimeout(Vt.current)}function cn(Fn){tn.current=Fn,$t(),Vt.current=window.setTimeout(function(){tn.current=null,Vt.current=void 0},100)}function hn(){return tn.current}return(0,re.useEffect)(function(){return $t},[]),[cn,hn]}function yt(){var It=re.useState(-1),tn=(0,ie.Z)(It,2),Vt=tn[0],$t=tn[1],cn=re.useState(-1),hn=(0,ie.Z)(cn,2),Fn=hn[0],An=hn[1],Sn=re.useCallback(function(Gt,ln){$t(Gt),An(ln)},[]);return[Vt,Fn,Sn]}var Ft=we(47273),Mt=(0,Ft.Z)()?window:null;function jt(It,tn){var Vt=(0,ke.Z)(It)==="object"?It:{},$t=Vt.offsetHeader,cn=$t===void 0?0:$t,hn=Vt.offsetSummary,Fn=hn===void 0?0:hn,An=Vt.offsetScroll,Sn=An===void 0?0:An,Gt=Vt.getContainer,ln=Gt===void 0?function(){return Mt}:Gt,dn=ln()||Mt,un=!!It;return re.useMemo(function(){return{isSticky:un,stickyClassName:un?"".concat(tn,"-sticky-holder"):"",offsetHeader:cn,offsetSummary:Fn,offsetScroll:Sn,container:dn}},[un,Sn,cn,Fn,tn,dn])}function qt(It,tn,Vt){var $t=(0,re.useMemo)(function(){var cn=tn.length,hn=function(Gt,ln,dn){for(var un=[],vn=0,Gn=Gt;Gn!==ln;Gn+=dn)un.push(vn),tn[Gn].fixed&&(vn+=It[Gn]||0);return un},Fn=hn(0,cn,1),An=hn(cn-1,-1,-1).reverse();return Vt==="rtl"?{left:An,right:Fn}:{left:Fn,right:An}},[It,tn,Vt]);return $t}var wn=qt;function Qn(It){var tn=It.className,Vt=It.children;return re.createElement("div",{className:tn},Vt)}var Rt=Qn,Et=we(8224),sn=we(16089),Zt=we(76846);function Lt(It){var tn=(0,Zt.bn)(It),Vt=tn.getBoundingClientRect(),$t=document.documentElement;return{left:Vt.left+(window.pageXOffset||$t.scrollLeft)-($t.clientLeft||document.body.clientLeft||0),top:Vt.top+(window.pageYOffset||$t.scrollTop)-($t.clientTop||document.body.clientTop||0)}}var zt=function(tn,Vt){var $t,cn,hn=tn.scrollBodyRef,Fn=tn.onScroll,An=tn.offsetScroll,Sn=tn.container,Gt=tn.direction,ln=te(pe,"prefixCls"),dn=(($t=hn.current)===null||$t===void 0?void 0:$t.scrollWidth)||0,un=((cn=hn.current)===null||cn===void 0?void 0:cn.clientWidth)||0,vn=dn&&un*(un/dn),Gn=re.useRef(),yn=Ve({scrollLeft:0,isHiddenScrollBar:!0}),fn=(0,ie.Z)(yn,2),Rn=fn[0],On=fn[1],qn=re.useRef({delta:0,x:0}),gr=re.useState(!1),dr=(0,ie.Z)(gr,2),Pr=dr[0],Er=dr[1],Ir=re.useRef(null);re.useEffect(function(){return function(){sn.Z.cancel(Ir.current)}},[]);var Zr=function(){Er(!1)},Fr=function(hr){hr.persist(),qn.current.delta=hr.pageX-Rn.scrollLeft,qn.current.x=0,Er(!0),hr.preventDefault()},li=function(hr){var vr,jr=hr||((vr=window)===null||vr===void 0?void 0:vr.event),_r=jr.buttons;if(!Pr||_r===0){Pr&&Er(!1);return}var Qr=qn.current.x+hr.pageX-qn.current.x-qn.current.delta,ti=Gt==="rtl";Qr=Math.max(ti?vn-un:0,Math.min(ti?0:un-vn,Qr));var di=!ti||Math.abs(Qr)+Math.abs(vn)<un;di&&(Fn({scrollLeft:Qr/un*(dn+2)}),qn.current.x=hr.pageX)},Wr=function(){sn.Z.cancel(Ir.current),Ir.current=(0,sn.Z)(function(){if(hn.current){var hr=Lt(hn.current).top,vr=hr+hn.current.offsetHeight,jr=Sn===window?document.documentElement.scrollTop+window.innerHeight:Lt(Sn).top+Sn.clientHeight;vr-(0,_e.Z)()<=jr||hr>=jr-An?On(function(_r){return(0,Ie.Z)((0,Ie.Z)({},_r),{},{isHiddenScrollBar:!0})}):On(function(_r){return(0,Ie.Z)((0,Ie.Z)({},_r),{},{isHiddenScrollBar:!1})})}})},qr=function(hr){On(function(vr){return(0,Ie.Z)((0,Ie.Z)({},vr),{},{scrollLeft:hr/dn*un||0})})};return re.useImperativeHandle(Vt,function(){return{setScrollLeft:qr,checkScrollBarVisible:Wr}}),re.useEffect(function(){var Rr=(0,Et.Z)(document.body,"mouseup",Zr,!1),hr=(0,Et.Z)(document.body,"mousemove",li,!1);return Wr(),function(){Rr.remove(),hr.remove()}},[vn,Pr]),re.useEffect(function(){if(hn.current){for(var Rr=[],hr=(0,Zt.bn)(hn.current);hr;)Rr.push(hr),hr=hr.parentElement;return Rr.forEach(function(vr){return vr.addEventListener("scroll",Wr,!1)}),window.addEventListener("resize",Wr,!1),window.addEventListener("scroll",Wr,!1),Sn.addEventListener("scroll",Wr,!1),function(){Rr.forEach(function(vr){return vr.removeEventListener("scroll",Wr)}),window.removeEventListener("resize",Wr),window.removeEventListener("scroll",Wr),Sn.removeEventListener("scroll",Wr)}}},[Sn]),re.useEffect(function(){Rn.isHiddenScrollBar||On(function(Rr){var hr=hn.current;return hr?(0,Ie.Z)((0,Ie.Z)({},Rr),{},{scrollLeft:hr.scrollLeft/hr.scrollWidth*hr.clientWidth}):Rr})},[Rn.isHiddenScrollBar]),dn<=un||!vn||Rn.isHiddenScrollBar?null:re.createElement("div",{style:{height:(0,_e.Z)(),width:un,bottom:An},className:"".concat(ln,"-sticky-scroll")},re.createElement("div",{onMouseDown:Fr,ref:Gn,className:qe()("".concat(ln,"-sticky-scroll-bar"),(0,Fe.Z)({},"".concat(ln,"-sticky-scroll-bar-active"),Pr)),style:{width:"".concat(vn,"px"),transform:"translate3d(".concat(Rn.scrollLeft,"px, 0, 0)")}}))},nn=re.forwardRef(zt);function rn(It){return null}var _n=rn;function xn(It){return null}var Ln=xn,Kt="rc-table",Xt=[],Cn={};function Un(){return"No Data"}function Zn(It,tn){var Vt=(0,Ie.Z)({rowKey:"key",prefixCls:Kt,emptyText:Un},It),$t=Vt.prefixCls,cn=Vt.className,hn=Vt.rowClassName,Fn=Vt.style,An=Vt.data,Sn=Vt.rowKey,Gt=Vt.scroll,ln=Vt.tableLayout,dn=Vt.direction,un=Vt.title,vn=Vt.footer,Gn=Vt.summary,yn=Vt.caption,fn=Vt.id,Rn=Vt.showHeader,On=Vt.components,qn=Vt.emptyText,gr=Vt.onRow,dr=Vt.onHeaderRow,Pr=Vt.onScroll,Er=Vt.internalHooks,Ir=Vt.transformColumns,Zr=Vt.internalRefs,Fr=Vt.tailor,li=Vt.getContainerWidth,Wr=Vt.sticky,qr=Vt.rowHoverable,Rr=qr===void 0?!0:qr,hr=An||Xt,vr=!!hr.length,jr=Er===de.R,_r=re.useCallback(function(hi,Cr){return(0,ot.Z)(On,hi)||Cr},[On]),Qr=re.useMemo(function(){return typeof Sn=="function"?Sn:function(hi){var Cr=hi&&hi[Sn];return Cr}},[Sn]),ti=_r(["body"]),di=yt(),po=(0,ie.Z)(di,3),ao=po[0],to=po[1],mo=po[2],Ii=Me(Vt,hr,Qr),Ti=(0,ie.Z)(Ii,6),Ni=Ti[0],vo=Ti[1],Fi=Ti[2],Gi=Ti[3],ji=Ti[4],xr=Ti[5],Kr=Gt==null?void 0:Gt.x,Gr=re.useState(0),Xr=(0,ie.Z)(Gr,2),xi=Xr[0],Oi=Xr[1],Ao=(0,Qt.Z)((0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},Vt),Ni),{},{expandable:!!Ni.expandedRowRender,columnTitle:Ni.columnTitle,expandedKeys:Fi,getRowKey:Qr,onTriggerExpand:xr,expandIcon:Gi,expandIconColumnIndex:Ni.expandIconColumnIndex,direction:dn,scrollWidth:jr&&Fr&&typeof Kr=="number"?Kr:null,clientWidth:xi}),jr?Ir:null),Yi=(0,ie.Z)(Ao,4),Xi=Yi[0],ui=Yi[1],no=Yi[2],Io=Yi[3],Ui=no!=null?no:Kr,Ho=re.useMemo(function(){return{columns:Xi,flattenColumns:ui}},[Xi,ui]),Co=re.useRef(),Oo=re.useRef(),Ki=re.useRef(),Wo=re.useRef();re.useImperativeHandle(tn,function(){return{nativeElement:Co.current,scrollTo:function(Cr){var Ci;if(Ki.current instanceof HTMLElement){var So=Cr.index,Pi=Cr.top,Pa=Cr.key;if(Je(Pi)){var va;(va=Ki.current)===null||va===void 0||va.scrollTo({top:Pi})}else{var Aa,No=Pa!=null?Pa:Qr(hr[So]);(Aa=Ki.current.querySelector('[data-row-key="'.concat(No,'"]')))===null||Aa===void 0||Aa.scrollIntoView()}}else(Ci=Ki.current)!==null&&Ci!==void 0&&Ci.scrollTo&&Ki.current.scrollTo(Cr)}}});var za=re.useRef(),Yo=re.useState(!1),la=(0,ie.Z)(Yo,2),Zo=la[0],Da=la[1],qa=re.useState(!1),ba=(0,ie.Z)(qa,2),cs=ba[0],Ma=ba[1],Ha=re.useState(new Map),Ra=(0,ie.Z)(Ha,2),pa=Ra[0],Wa=Ra[1],Ja=Ue(ui),Sa=Ja.map(function(hi){return pa.get(hi)}),wa=re.useMemo(function(){return Sa},[Sa.join("_")]),ua=wn(wa,ui,dn),To=Gt&&Ze(Gt.y),qi=Gt&&Ze(Ui)||!!Ni.fixed,vi=qi&&ui.some(function(hi){var Cr=hi.fixed;return Cr}),ai=re.useRef(),ro=jt(Wr,$t),Ji=ro.isSticky,io=ro.offsetHeader,co=ro.offsetSummary,na=ro.offsetScroll,Go=ro.stickyClassName,ca=ro.container,Qi=re.useMemo(function(){return Gn==null?void 0:Gn(hr)},[Gn,hr]),yo=(To||Ji)&&re.isValidElement(Qi)&&Qi.type===Re&&Qi.props.fixed,Fo,Xo,Ia;To&&(Xo={overflowY:vr?"scroll":"auto",maxHeight:Gt.y}),qi&&(Fo={overflowX:"auto"},To||(Xo={overflowY:"hidden"}),Ia={width:Ui===!0?"auto":Ui,minWidth:"100%"});var ds=re.useCallback(function(hi,Cr){Wa(function(Ci){if(Ci.get(hi)!==Cr){var So=new Map(Ci);return So.set(hi,Cr),So}return Ci})},[]),fs=st(null),da=(0,ie.Z)(fs,2),_o=da[0],Eo=da[1];function ko(hi,Cr){Cr&&(typeof Cr=="function"?Cr(hi):Cr.scrollLeft!==hi&&(Cr.scrollLeft=hi,Cr.scrollLeft!==hi&&setTimeout(function(){Cr.scrollLeft=hi},0)))}var Ko=(0,Ee.Z)(function(hi){var Cr=hi.currentTarget,Ci=hi.scrollLeft,So=dn==="rtl",Pi=typeof Ci=="number"?Ci:Cr.scrollLeft,Pa=Cr||Cn;if(!Eo()||Eo()===Pa){var va;_o(Pa),ko(Pi,Oo.current),ko(Pi,Ki.current),ko(Pi,za.current),ko(Pi,(va=ai.current)===null||va===void 0?void 0:va.setScrollLeft)}var Aa=Cr||Oo.current;if(Aa){var No=jr&&Fr&&typeof Ui=="number"?Ui:Aa.scrollWidth,fa=Aa.clientWidth;if(No===fa){Da(!1),Ma(!1);return}So?(Da(-Pi<No-fa),Ma(-Pi>0)):(Da(Pi>0),Ma(Pi<No-fa))}}),Qa=(0,Ee.Z)(function(hi){Ko(hi),Pr==null||Pr(hi)}),xa=function(){if(qi&&Ki.current){var Cr;Ko({currentTarget:(0,Zt.bn)(Ki.current),scrollLeft:(Cr=Ki.current)===null||Cr===void 0?void 0:Cr.scrollLeft})}else Da(!1),Ma(!1)},_s=function(Cr){var Ci,So=Cr.width;(Ci=ai.current)===null||Ci===void 0||Ci.checkScrollBarVisible();var Pi=Co.current?Co.current.offsetWidth:So;jr&&li&&Co.current&&(Pi=li(Co.current,Pi)||Pi),Pi!==xi&&(xa(),Oi(Pi))},Oa=re.useRef(!1);re.useEffect(function(){Oa.current&&xa()},[qi,An,Xi.length]),re.useEffect(function(){Oa.current=!0},[]);var bs=re.useState(0),$a=(0,ie.Z)(bs,2),Ca=$a[0],Ss=$a[1],es=re.useState(!0),ra=(0,ie.Z)(es,2),Za=ra[0],Ea=ra[1];(0,ce.Z)(function(){(!Fr||!jr)&&(Ki.current instanceof Element?Ss((0,_e.o)(Ki.current).width):Ss((0,_e.o)(Wo.current).width)),Ea((0,le.G)("position","sticky"))},[]),re.useEffect(function(){jr&&Zr&&(Zr.body.current=Ki.current)});var Ga=re.useCallback(function(hi){return re.createElement(re.Fragment,null,re.createElement(rr,hi),yo==="top"&&re.createElement(Te,hi,Qi))},[yo,Qi]),ts=re.useCallback(function(hi){return re.createElement(Te,hi,Qi)},[Qi]),hs=_r(["table"],"table"),ka=re.useMemo(function(){return ln||(vi?Ui==="max-content"?"auto":"fixed":To||Ji||ui.some(function(hi){var Cr=hi.ellipsis;return Cr})?"fixed":"auto")},[To,vi,ui,ln,Ji]),ps,ms={colWidths:wa,columCount:ui.length,stickyOffsets:ua,onHeaderRow:dr,fixHeader:To,scroll:Gt},ws=re.useMemo(function(){return vr?null:typeof qn=="function"?qn():qn},[vr,qn]),ns=re.createElement(Vn,{data:hr,measureColumnWidth:To||qi||Ji}),rs=re.createElement(jn,{colWidths:ui.map(function(hi){var Cr=hi.width;return Cr}),columns:ui}),La=yn!=null?re.createElement("caption",{className:"".concat($t,"-caption")},yn):void 0,Ur=(0,Ne.Z)(Vt,{data:!0}),xs=(0,Ne.Z)(Vt,{aria:!0});if(To||Ji){var Na;typeof ti=="function"?(Na=ti(hr,{scrollbarSize:Ca,ref:Ki,onScroll:Ko}),ms.colWidths=ui.map(function(hi,Cr){var Ci=hi.width,So=Cr===ui.length-1?Ci-Ca:Ci;return typeof So=="number"&&!Number.isNaN(So)?So:0})):Na=re.createElement("div",{style:(0,Ie.Z)((0,Ie.Z)({},Fo),Xo),onScroll:Qa,ref:Ki,className:qe()("".concat($t,"-body"))},re.createElement(hs,(0,E.Z)({style:(0,Ie.Z)((0,Ie.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,ns,!yo&&Qi&&re.createElement(Te,{stickyOffsets:ua,flattenColumns:ui},Qi)));var vs=(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({noData:!hr.length,maxContentScroll:qi&&Ui==="max-content"},ms),Ho),{},{direction:dn,stickyClassName:Go,onScroll:Ko});ps=re.createElement(re.Fragment,null,Rn!==!1&&re.createElement(gn,(0,E.Z)({},vs,{stickyTopOffset:io,className:"".concat($t,"-header"),ref:Oo}),Ga),Na,yo&&yo!=="top"&&re.createElement(gn,(0,E.Z)({},vs,{stickyBottomOffset:co,className:"".concat($t,"-summary"),ref:za}),ts),Ji&&Ki.current&&Ki.current instanceof Element&&re.createElement(nn,{ref:ai,offsetScroll:na,scrollBodyRef:Ki,onScroll:Ko,container:ca,direction:dn}))}else ps=re.createElement("div",{style:(0,Ie.Z)((0,Ie.Z)({},Fo),Xo),className:qe()("".concat($t,"-content")),onScroll:Ko,ref:Ki},re.createElement(hs,(0,E.Z)({style:(0,Ie.Z)((0,Ie.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,Rn!==!1&&re.createElement(rr,(0,E.Z)({},ms,Ho)),ns,Qi&&re.createElement(Te,{stickyOffsets:ua,flattenColumns:ui},Qi)));var ia=re.createElement("div",(0,E.Z)({className:qe()($t,cn,(0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)((0,Fe.Z)({},"".concat($t,"-rtl"),dn==="rtl"),"".concat($t,"-ping-left"),Zo),"".concat($t,"-ping-right"),cs),"".concat($t,"-layout-fixed"),ln==="fixed"),"".concat($t,"-fixed-header"),To),"".concat($t,"-fixed-column"),vi),"".concat($t,"-fixed-column-gapped"),vi&&Io),"".concat($t,"-scroll-horizontal"),qi),"".concat($t,"-has-fix-left"),ui[0]&&ui[0].fixed),"".concat($t,"-has-fix-right"),ui[ui.length-1]&&ui[ui.length-1].fixed==="right")),style:Fn,id:fn,ref:Co},Ur),un&&re.createElement(Rt,{className:"".concat($t,"-title")},un(hr)),re.createElement("div",{ref:Wo,className:"".concat($t,"-container")},ps),vn&&re.createElement(Rt,{className:"".concat($t,"-footer")},vn(hr)));qi&&(ia=re.createElement(ye.Z,{onResize:_s},ia));var is=ze(ui,ua,dn),ma=re.useMemo(function(){return{scrollX:Ui,prefixCls:$t,getComponent:_r,scrollbarSize:Ca,direction:dn,fixedInfoList:is,isSticky:Ji,supportSticky:Za,componentWidth:xi,fixHeader:To,fixColumn:vi,horizonScroll:qi,tableLayout:ka,rowClassName:hn,expandedRowClassName:Ni.expandedRowClassName,expandIcon:Gi,expandableType:vo,expandRowByClick:Ni.expandRowByClick,expandedRowRender:Ni.expandedRowRender,onTriggerExpand:xr,expandIconColumnIndex:Ni.expandIconColumnIndex,indentSize:Ni.indentSize,allColumnsFixedLeft:ui.every(function(hi){return hi.fixed==="left"}),emptyNode:ws,columns:Xi,flattenColumns:ui,onColumnResize:ds,hoverStartRow:ao,hoverEndRow:to,onHover:mo,rowExpandable:Ni.rowExpandable,onRow:gr,getRowKey:Qr,expandedKeys:Fi,childrenColumnName:ji,rowHoverable:Rr}},[Ui,$t,_r,Ca,dn,is,Ji,Za,xi,To,vi,qi,ka,hn,Ni.expandedRowClassName,Gi,vo,Ni.expandRowByClick,Ni.expandedRowRender,xr,Ni.expandIconColumnIndex,Ni.indentSize,ws,Xi,ui,ds,ao,to,mo,Ni.rowExpandable,gr,Qr,Fi,ji,Rr]);return re.createElement(pe.Provider,{value:ma},ia)}var er=re.forwardRef(Zn);function Lr(It){return Se(er,It)}var wr=Lr();wr.EXPAND_COLUMN=de.w,wr.INTERNAL_HOOKS=de.R,wr.Column=_n,wr.ColumnGroup=Ln,wr.Summary=je;var tr=wr,zn=we(48911),cr=ee(null),Xn=ee(null);function yr(It,tn,Vt){var $t=tn||1;return Vt[It+$t]-(Vt[It]||0)}function Nr(It){var tn=It.rowInfo,Vt=It.column,$t=It.colIndex,cn=It.indent,hn=It.index,Fn=It.component,An=It.renderIndex,Sn=It.record,Gt=It.style,ln=It.className,dn=It.inverse,un=It.getHeight,vn=Vt.render,Gn=Vt.dataIndex,yn=Vt.className,fn=Vt.width,Rn=te(Xn,["columnsOffset"]),On=Rn.columnsOffset,qn=At(tn,Vt,$t,cn,hn),gr=qn.key,dr=qn.fixedInfo,Pr=qn.appendCellNode,Er=qn.additionalCellProps,Ir=Er.style,Zr=Er.colSpan,Fr=Zr===void 0?1:Zr,li=Er.rowSpan,Wr=li===void 0?1:li,qr=$t-1,Rr=yr(qr,Fr,On),hr=Fr>1?fn-Rr:0,vr=(0,Ie.Z)((0,Ie.Z)((0,Ie.Z)({},Ir),Gt),{},{flex:"0 0 ".concat(Rr,"px"),width:"".concat(Rr,"px"),marginRight:hr,pointerEvents:"auto"}),jr=re.useMemo(function(){return dn?Wr<=1:Fr===0||Wr===0||Wr>1},[Wr,Fr,dn]);jr?vr.visibility="hidden":dn&&(vr.height=un==null?void 0:un(Wr));var _r=jr?function(){return null}:vn,Qr={};return(Wr===0||Fr===0)&&(Qr.rowSpan=1,Qr.colSpan=1),re.createElement(St,(0,E.Z)({className:qe()(yn,ln),ellipsis:Vt.ellipsis,align:Vt.align,scope:Vt.rowScope,component:Fn,prefixCls:tn.prefixCls,key:gr,record:Sn,index:hn,renderIndex:An,dataIndex:Gn,render:_r,shouldCellUpdate:Vt.shouldCellUpdate},dr,{appendNode:Pr,additionalProps:(0,Ie.Z)((0,Ie.Z)({},Er),{},{style:vr},Qr)}))}var Yr=Nr,pi=["data","index","className","rowKey","style","extra","getHeight"],_i=re.forwardRef(function(It,tn){var Vt=It.data,$t=It.index,cn=It.className,hn=It.rowKey,Fn=It.style,An=It.extra,Sn=It.getHeight,Gt=(0,et.Z)(It,pi),ln=Vt.record,dn=Vt.indent,un=Vt.index,vn=te(pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Gn=vn.scrollX,yn=vn.flattenColumns,fn=vn.prefixCls,Rn=vn.fixColumn,On=vn.componentWidth,qn=te(cr,["getComponent"]),gr=qn.getComponent,dr=tt(ln,hn,$t,dn),Pr=gr(["body","row"],"div"),Er=gr(["body","cell"],"div"),Ir=dr.rowSupportExpand,Zr=dr.expanded,Fr=dr.rowProps,li=dr.expandedRowRender,Wr=dr.expandedRowClassName,qr;if(Ir&&Zr){var Rr=li(ln,$t,dn+1,Zr),hr=Ht(Wr,ln,$t,dn),vr={};Rn&&(vr={style:(0,Fe.Z)({},"--virtual-width","".concat(On,"px"))});var jr="".concat(fn,"-expanded-row-cell");qr=re.createElement(Pr,{className:qe()("".concat(fn,"-expanded-row"),"".concat(fn,"-expanded-row-level-").concat(dn+1),hr)},re.createElement(St,{component:Er,prefixCls:fn,className:qe()(jr,(0,Fe.Z)({},"".concat(jr,"-fixed"),Rn)),additionalProps:vr},Rr))}var _r=(0,Ie.Z)((0,Ie.Z)({},Fn),{},{width:Gn});An&&(_r.position="absolute",_r.pointerEvents="none");var Qr=re.createElement(Pr,(0,E.Z)({},Fr,Gt,{"data-row-key":hn,ref:Ir?null:tn,className:qe()(cn,"".concat(fn,"-row"),Fr==null?void 0:Fr.className,(0,Fe.Z)({},"".concat(fn,"-row-extra"),An)),style:(0,Ie.Z)((0,Ie.Z)({},_r),Fr==null?void 0:Fr.style)}),yn.map(function(ti,di){return re.createElement(Yr,{key:di,component:Er,rowInfo:dr,column:ti,colIndex:di,indent:dn,index:$t,renderIndex:un,record:ln,inverse:An,getHeight:Sn})}));return Ir?re.createElement("div",{ref:tn},Qr,qr):Qr}),Si=ve(_i),oi=Si,Mi=re.forwardRef(function(It,tn){var Vt=It.data,$t=It.onScroll,cn=te(pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),hn=cn.flattenColumns,Fn=cn.onColumnResize,An=cn.getRowKey,Sn=cn.expandedKeys,Gt=cn.prefixCls,ln=cn.childrenColumnName,dn=cn.scrollX,un=cn.direction,vn=te(cr),Gn=vn.sticky,yn=vn.scrollY,fn=vn.listItemHeight,Rn=vn.getComponent,On=vn.onScroll,qn=re.useRef(),gr=Oe(Vt,ln,Sn,An),dr=re.useMemo(function(){var qr=0;return hn.map(function(Rr){var hr=Rr.width,vr=Rr.key;return qr+=hr,[vr,hr,qr]})},[hn]),Pr=re.useMemo(function(){return dr.map(function(qr){return qr[2]})},[dr]);re.useEffect(function(){dr.forEach(function(qr){var Rr=(0,ie.Z)(qr,2),hr=Rr[0],vr=Rr[1];Fn(hr,vr)})},[dr]),re.useImperativeHandle(tn,function(){var qr,Rr={scrollTo:function(vr){var jr;(jr=qn.current)===null||jr===void 0||jr.scrollTo(vr)},nativeElement:(qr=qn.current)===null||qr===void 0?void 0:qr.nativeElement};return Object.defineProperty(Rr,"scrollLeft",{get:function(){var vr;return((vr=qn.current)===null||vr===void 0?void 0:vr.getScrollInfo().x)||0},set:function(vr){var jr;(jr=qn.current)===null||jr===void 0||jr.scrollTo({left:vr})}}),Rr});var Er=function(Rr,hr){var vr,jr=(vr=gr[hr])===null||vr===void 0?void 0:vr.record,_r=Rr.onCell;if(_r){var Qr,ti=_r(jr,hr);return(Qr=ti==null?void 0:ti.rowSpan)!==null&&Qr!==void 0?Qr:1}return 1},Ir=function(Rr){var hr=Rr.start,vr=Rr.end,jr=Rr.getSize,_r=Rr.offsetY;if(vr<0)return null;for(var Qr=hn.filter(function(Gi){return Er(Gi,hr)===0}),ti=hr,di=function(ji){if(Qr=Qr.filter(function(xr){return Er(xr,ji)===0}),!Qr.length)return ti=ji,1},po=hr;po>=0&&!di(po);po-=1);for(var ao=hn.filter(function(Gi){return Er(Gi,vr)!==1}),to=vr,mo=function(ji){if(ao=ao.filter(function(xr){return Er(xr,ji)!==1}),!ao.length)return to=Math.max(ji-1,vr),1},Ii=vr;Ii<gr.length&&!mo(Ii);Ii+=1);for(var Ti=[],Ni=function(ji){var xr=gr[ji];if(!xr)return 1;hn.some(function(Kr){return Er(Kr,ji)>1})&&Ti.push(ji)},vo=ti;vo<=to;vo+=1)Ni(vo);var Fi=Ti.map(function(Gi){var ji=gr[Gi],xr=An(ji.record,Gi),Kr=function(xi){var Oi=Gi+xi-1,Ao=An(gr[Oi].record,Oi),Yi=jr(xr,Ao);return Yi.bottom-Yi.top},Gr=jr(xr);return re.createElement(oi,{key:Gi,data:ji,rowKey:xr,index:Gi,style:{top:-_r+Gr.top},extra:!0,getHeight:Kr})});return Fi},Zr=re.useMemo(function(){return{columnsOffset:Pr}},[Pr]),Fr="".concat(Gt,"-tbody"),li=Rn(["body","wrapper"]),Wr={};return Gn&&(Wr.position="sticky",Wr.bottom=0,(0,ke.Z)(Gn)==="object"&&Gn.offsetScroll&&(Wr.bottom=Gn.offsetScroll)),re.createElement(Xn.Provider,{value:Zr},re.createElement(zn.Z,{fullHeight:!1,ref:qn,prefixCls:"".concat(Fr,"-virtual"),styles:{horizontalScrollBar:Wr},className:Fr,height:yn,itemHeight:fn||24,data:gr,itemKey:function(Rr){return An(Rr.record)},component:li,scrollWidth:dn,direction:un,onVirtualScroll:function(Rr){var hr,vr=Rr.x;$t({currentTarget:(hr=qn.current)===null||hr===void 0?void 0:hr.nativeElement,scrollLeft:vr})},onScroll:On,extraRender:Ir},function(qr,Rr,hr){var vr=An(qr.record,Rr);return re.createElement(oi,{data:qr,rowKey:vr,index:Rr,style:hr.style})}))}),Li=ve(Mi),lr=Li,Ar=function(tn,Vt){var $t=Vt.ref,cn=Vt.onScroll;return re.createElement(lr,{ref:$t,data:tn,onScroll:cn})};function Mr(It,tn){var Vt=It.data,$t=It.columns,cn=It.scroll,hn=It.sticky,Fn=It.prefixCls,An=Fn===void 0?Kt:Fn,Sn=It.className,Gt=It.listItemHeight,ln=It.components,dn=It.onScroll,un=cn||{},vn=un.x,Gn=un.y;typeof vn!="number"&&(vn=1),typeof Gn!="number"&&(Gn=500);var yn=(0,Pt.zX)(function(On,qn){return(0,ot.Z)(ln,On)||qn}),fn=(0,Pt.zX)(dn),Rn=re.useMemo(function(){return{sticky:hn,scrollY:Gn,listItemHeight:Gt,getComponent:yn,onScroll:fn}},[hn,Gn,Gt,yn,fn]);return re.createElement(cr.Provider,{value:Rn},re.createElement(tr,(0,E.Z)({},It,{className:qe()(Sn,"".concat(An,"-virtual")),scroll:(0,Ie.Z)((0,Ie.Z)({},cn),{},{x:vn}),components:(0,Ie.Z)((0,Ie.Z)({},ln),{},{body:Vt!=null&&Vt.length?Ar:void 0}),columns:$t,internalHooks:de.R,tailor:!0,ref:tn})))}var $r=re.forwardRef(Mr);function Jr(It){return Se($r,It)}var wi=Jr(),Hi=null},54451:function(Jt,Ot,we){"use strict";we.d(Ot,{g:function(){return re},v:function(){return se}});var de=we(33885),ie=we(75931),Ee=we(48736),ce=["expandable"],se="RC_TABLE_INTERNAL_COL_DEFINE";function re(ue){var ee=ue.expandable,te=(0,ie.Z)(ue,ce),E;return"expandable"in ue?E=(0,de.Z)((0,de.Z)({},te),ee):E=te,E.showExpandColumn===!1&&(E.expandIconColumnIndex=-1),E}},22711:function(Jt,Ot,we){"use strict";we.r(Ot),we.d(Ot,{ResizableTextArea:function(){return Pe},default:function(){return He}});var de=we(54476),ie=we(20068),Ee=we(33885),ce=we(94480),se=we(42978),re=we(75931),ue=we(92310),ee=we.n(ue),te=we(36901),E=we(66003),y=we(30292),z=we(18929),x=we(59301),ne=we(76190),ae=we(29301),oe=we(34280),ge=we(16089),Se=`
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;
`,ve=["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"],be={},xe;function pe(rt){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=rt.getAttribute("id")||rt.getAttribute("data-reactid")||rt.getAttribute("name");if(Ge&&be[ct])return be[ct];var We=window.getComputedStyle(rt),Ue=We.getPropertyValue("box-sizing")||We.getPropertyValue("-moz-box-sizing")||We.getPropertyValue("-webkit-box-sizing"),Ze=parseFloat(We.getPropertyValue("padding-bottom"))+parseFloat(We.getPropertyValue("padding-top")),Je=parseFloat(We.getPropertyValue("border-bottom-width"))+parseFloat(We.getPropertyValue("border-top-width")),$e=ve.map(function(pt){return"".concat(pt,":").concat(We.getPropertyValue(pt))}).join(";"),Qe={sizingStyle:$e,paddingSize:Ze,borderSize:Je,boxSizing:Ue};return Ge&&ct&&(be[ct]=Qe),Qe}function me(rt){var Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,We=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xe||(xe=document.createElement("textarea"),xe.setAttribute("tab-index","-1"),xe.setAttribute("aria-hidden","true"),xe.setAttribute("name","hiddenTextarea"),document.body.appendChild(xe)),rt.getAttribute("wrap")?xe.setAttribute("wrap",rt.getAttribute("wrap")):xe.removeAttribute("wrap");var Ue=pe(rt,Ge),Ze=Ue.paddingSize,Je=Ue.borderSize,$e=Ue.boxSizing,Qe=Ue.sizingStyle;xe.setAttribute("style","".concat(Qe,";").concat(Se)),xe.value=rt.value||rt.placeholder||"";var pt=void 0,ht=void 0,Pt,gt=xe.scrollHeight;if($e==="border-box"?gt+=Je:$e==="content-box"&&(gt-=Ze),ct!==null||We!==null){xe.value=" ";var bt=xe.scrollHeight-Ze;ct!==null&&(pt=bt*ct,$e==="border-box"&&(pt=pt+Ze+Je),gt=Math.max(pt,gt)),We!==null&&(ht=bt*We,$e==="border-box"&&(ht=ht+Ze+Je),Pt=gt>ht?"":"hidden",gt=Math.min(ht,gt))}var St={height:gt,overflowY:Pt,resize:"none"};return pt&&(St.minHeight=pt),ht&&(St.maxHeight=ht),St}var Ae=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],De=0,ke=1,Ie=2,Fe=x.forwardRef(function(rt,Ge){var ct=rt,We=ct.prefixCls,Ue=ct.defaultValue,Ze=ct.value,Je=ct.autoSize,$e=ct.onResize,Qe=ct.className,pt=ct.style,ht=ct.disabled,Pt=ct.onChange,gt=ct.onInternalAutoSize,bt=(0,re.Z)(ct,Ae),St=(0,z.Z)(Ue,{value:Ze,postState:function(on){return on!=null?on:""}}),lt=(0,se.Z)(St,2),_t=lt[0],dt=lt[1],nt=function(on){dt(on.target.value),Pt==null||Pt(on)},et=x.useRef();x.useImperativeHandle(Ge,function(){return{textArea:et.current}});var ft=x.useMemo(function(){return Je&&(0,ne.Z)(Je)==="object"?[Je.minRows,Je.maxRows]:[]},[Je]),wt=(0,se.Z)(ft,2),Tt=wt[0],Re=wt[1],Le=!!Je,Te=function(){try{if(document.activeElement===et.current){var on=et.current,bn=on.selectionStart,Yt=on.selectionEnd,Mn=on.scrollTop;et.current.setSelectionRange(bn,Yt),et.current.scrollTop=Mn}}catch(Yn){}},je=x.useState(Ie),ye=(0,se.Z)(je,2),le=ye[0],_e=ye[1],Ne=x.useState(),Ye=(0,se.Z)(Ne,2),Oe=Ye[0],tt=Ye[1],Ct=function(){_e(De)};(0,oe.Z)(function(){Le&&Ct()},[Ze,Tt,Re,Le]),(0,oe.Z)(function(){if(le===De)_e(ke);else if(le===ke){var Wt=me(et.current,!1,Tt,Re);_e(Ie),tt(Wt)}else Te()},[le]);var Nt=x.useRef(),Dt=function(){ge.Z.cancel(Nt.current)},ut=function(on){le===Ie&&($e==null||$e(on),Je&&(Dt(),Nt.current=(0,ge.Z)(function(){Ct()})))};x.useEffect(function(){return Dt},[]);var Ht=Le?Oe:null,At=(0,Ee.Z)((0,Ee.Z)({},pt),Ht);return(le===De||le===ke)&&(At.overflowY="hidden",At.overflowX="hidden"),x.createElement(ae.Z,{onResize:ut,disabled:!(Je||$e)},x.createElement("textarea",(0,de.Z)({},bt,{ref:et,style:At,className:ee()(We,Qe,(0,ie.Z)({},"".concat(We,"-disabled"),ht)),disabled:ht,value:_t,onChange:nt})))}),Pe=Fe,qe=["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"],Ke=x.forwardRef(function(rt,Ge){var ct,We=rt.defaultValue,Ue=rt.value,Ze=rt.onFocus,Je=rt.onBlur,$e=rt.onChange,Qe=rt.allowClear,pt=rt.maxLength,ht=rt.onCompositionStart,Pt=rt.onCompositionEnd,gt=rt.suffix,bt=rt.prefixCls,St=bt===void 0?"rc-textarea":bt,lt=rt.showCount,_t=rt.count,dt=rt.className,nt=rt.style,et=rt.disabled,ft=rt.hidden,wt=rt.classNames,Tt=rt.styles,Re=rt.onResize,Le=rt.onClear,Te=rt.onPressEnter,je=rt.readOnly,ye=rt.autoSize,le=rt.onKeyDown,_e=(0,re.Z)(rt,qe),Ne=(0,z.Z)(We,{value:Ue,defaultValue:We}),Ye=(0,se.Z)(Ne,2),Oe=Ye[0],tt=Ye[1],Ct=Oe==null?"":String(Oe),Nt=x.useState(!1),Dt=(0,se.Z)(Nt,2),ut=Dt[0],Ht=Dt[1],At=x.useRef(!1),Wt=x.useState(null),on=(0,se.Z)(Wt,2),bn=on[0],Yt=on[1],Mn=(0,x.useRef)(null),Yn=(0,x.useRef)(null),Vn=function(){var qt;return(qt=Yn.current)===null||qt===void 0?void 0:qt.textArea},Jn=function(){Vn().focus()};(0,x.useImperativeHandle)(Ge,function(){var jt;return{resizableTextArea:Yn.current,focus:Jn,blur:function(){Vn().blur()},nativeElement:((jt=Mn.current)===null||jt===void 0?void 0:jt.nativeElement)||Vn()}}),(0,x.useEffect)(function(){Ht(function(jt){return!et&&jt})},[et]);var ar=x.useState(null),ur=(0,se.Z)(ar,2),jn=ur[0],Bn=ur[1];x.useEffect(function(){if(jn){var jt;(jt=Vn()).setSelectionRange.apply(jt,(0,ce.Z)(jn))}},[jn]);var sr=(0,E.Z)(_t,lt),Hn=(ct=sr.max)!==null&&ct!==void 0?ct:pt,In=Number(Hn)>0,gn=sr.strategy(Ct),Wn=!!Hn&&gn>Hn,fr=function(qt,wn){var Qn=wn;!At.current&&sr.exceedFormatter&&sr.max&&sr.strategy(wn)>sr.max&&(Qn=sr.exceedFormatter(wn,{max:sr.max}),wn!==Qn&&Bn([Vn().selectionStart||0,Vn().selectionEnd||0])),tt(Qn),(0,y.rJ)(qt.currentTarget,qt,$e,Qn)},mn=function(qt){At.current=!0,ht==null||ht(qt)},En=function(qt){At.current=!1,fr(qt,qt.currentTarget.value),Pt==null||Pt(qt)},rr=function(qt){fr(qt,qt.target.value)},Qt=function(qt){qt.key==="Enter"&&Te&&Te(qt),le==null||le(qt)},Me=function(qt){Ht(!0),Ze==null||Ze(qt)},ze=function(qt){Ht(!1),Je==null||Je(qt)},Ve=function(qt){tt(""),Jn(),(0,y.rJ)(Vn(),qt,$e)},st=gt,yt;sr.show&&(sr.showFormatter?yt=sr.showFormatter({value:Ct,count:gn,maxLength:Hn}):yt="".concat(gn).concat(In?" / ".concat(Hn):""),st=x.createElement(x.Fragment,null,st,x.createElement("span",{className:ee()("".concat(St,"-data-count"),wt==null?void 0:wt.count),style:Tt==null?void 0:Tt.count},yt)));var Ft=function(qt){var wn;Re==null||Re(qt),(wn=Vn())!==null&&wn!==void 0&&wn.style.height&&Yt(!0)},Mt=!ye&&!lt&&!Qe;return x.createElement(te.BaseInput,{ref:Mn,value:Ct,allowClear:Qe,handleReset:Ve,suffix:st,prefixCls:St,classNames:(0,Ee.Z)((0,Ee.Z)({},wt),{},{affixWrapper:ee()(wt==null?void 0:wt.affixWrapper,(0,ie.Z)((0,ie.Z)({},"".concat(St,"-show-count"),lt),"".concat(St,"-textarea-allow-clear"),Qe))}),disabled:et,focused:ut,className:ee()(dt,Wn&&"".concat(St,"-out-of-range")),style:(0,Ee.Z)((0,Ee.Z)({},nt),bn&&!Mt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof yt=="string"?yt:void 0}},hidden:ft,readOnly:je,onClear:Le},x.createElement(Pe,(0,de.Z)({},_e,{autoSize:ye,maxLength:pt,onKeyDown:Qt,onChange:rr,onFocus:Me,onBlur:ze,onCompositionStart:mn,onCompositionEnd:En,className:ee()(wt==null?void 0:wt.textarea),style:(0,Ee.Z)((0,Ee.Z)({},Tt==null?void 0:Tt.textarea),{},{resize:nt==null?void 0:nt.resize}),disabled:et,prefixCls:St,onResize:Ft,ref:Yn,readOnly:je})))}),ot=Ke,He=ot},639:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return be}});var de=we(54476),ie=we(20068),Ee=we(33885),ce=we(42978),se=we(75931),re=we(59301),ue=we(92310),ee=we.n(ue),te=we(26112),E=we(30699),y=function(pe){for(var me=pe.prefixCls,Ae=pe.level,De=pe.isStart,ke=pe.isEnd,Ie="".concat(me,"-indent-unit"),Fe=[],Pe=0;Pe<Ae;Pe+=1)Fe.push(re.createElement("span",{key:Pe,className:ee()(Ie,(0,ie.Z)((0,ie.Z)({},"".concat(Ie,"-start"),De[Pe]),"".concat(Ie,"-end"),ke[Pe]))}));return re.createElement("span",{"aria-hidden":"true",className:"".concat(me,"-indent")},Fe)},z=re.memo(y),x=we(65065),ne=we(34061),ae=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],oe="open",ge="close",Se="---",ve=function(pe){var me,Ae,De,ke=pe.eventKey,Ie=pe.className,Fe=pe.style,Pe=pe.dragOver,qe=pe.dragOverGapTop,Ke=pe.dragOverGapBottom,ot=pe.isLeaf,He=pe.isStart,rt=pe.isEnd,Ge=pe.expanded,ct=pe.selected,We=pe.checked,Ue=pe.halfChecked,Ze=pe.loading,Je=pe.domRef,$e=pe.active,Qe=pe.data,pt=pe.onMouseMove,ht=pe.selectable,Pt=(0,se.Z)(pe,ae),gt=re.useContext(E.k),bt=re.useContext(E.y),St=re.useRef(null),lt=re.useState(!1),_t=(0,ce.Z)(lt,2),dt=_t[0],nt=_t[1],et=!!(gt.disabled||pe.disabled||(me=bt.nodeDisabled)!==null&&me!==void 0&&me.call(bt,Qe)),ft=re.useMemo(function(){return!gt.checkable||pe.checkable===!1?!1:gt.checkable},[gt.checkable,pe.checkable]),wt=function(gn){et||gt.onNodeSelect(gn,(0,ne.F)(pe))},Tt=function(gn){et||!ft||pe.disableCheckbox||gt.onNodeCheck(gn,(0,ne.F)(pe),!We)},Re=re.useMemo(function(){return typeof ht=="boolean"?ht:gt.selectable},[ht,gt.selectable]),Le=function(gn){gt.onNodeClick(gn,(0,ne.F)(pe)),Re?wt(gn):Tt(gn)},Te=function(gn){gt.onNodeDoubleClick(gn,(0,ne.F)(pe))},je=function(gn){gt.onNodeMouseEnter(gn,(0,ne.F)(pe))},ye=function(gn){gt.onNodeMouseLeave(gn,(0,ne.F)(pe))},le=function(gn){gt.onNodeContextMenu(gn,(0,ne.F)(pe))},_e=re.useMemo(function(){return!!(gt.draggable&&(!gt.draggable.nodeDraggable||gt.draggable.nodeDraggable(Qe)))},[gt.draggable,Qe]),Ne=function(gn){gn.stopPropagation(),nt(!0),gt.onNodeDragStart(gn,pe);try{gn.dataTransfer.setData("text/plain","")}catch(Wn){}},Ye=function(gn){gn.preventDefault(),gn.stopPropagation(),gt.onNodeDragEnter(gn,pe)},Oe=function(gn){gn.preventDefault(),gn.stopPropagation(),gt.onNodeDragOver(gn,pe)},tt=function(gn){gn.stopPropagation(),gt.onNodeDragLeave(gn,pe)},Ct=function(gn){gn.stopPropagation(),nt(!1),gt.onNodeDragEnd(gn,pe)},Nt=function(gn){gn.preventDefault(),gn.stopPropagation(),nt(!1),gt.onNodeDrop(gn,pe)},Dt=function(gn){Ze||gt.onNodeExpand(gn,(0,ne.F)(pe))},ut=re.useMemo(function(){var In=(0,x.Z)(gt.keyEntities,ke)||{},gn=In.children;return!!(gn||[]).length},[gt.keyEntities,ke]),Ht=re.useMemo(function(){return ot===!1?!1:ot||!gt.loadData&&!ut||gt.loadData&&pe.loaded&&!ut},[ot,gt.loadData,ut,pe.loaded]);re.useEffect(function(){Ze||typeof gt.loadData=="function"&&Ge&&!Ht&&!pe.loaded&&gt.onNodeLoad((0,ne.F)(pe))},[Ze,gt.loadData,gt.onNodeLoad,Ge,Ht,pe]);var At=re.useMemo(function(){var In;return(In=gt.draggable)!==null&&In!==void 0&&In.icon?re.createElement("span",{className:"".concat(gt.prefixCls,"-draggable-icon")},gt.draggable.icon):null},[gt.draggable]),Wt=function(gn){var Wn=pe.switcherIcon||gt.switcherIcon;return typeof Wn=="function"?Wn((0,Ee.Z)((0,Ee.Z)({},pe),{},{isLeaf:gn})):Wn},on=function(){if(Ht){var gn=Wt(!0);return gn!==!1?re.createElement("span",{className:ee()("".concat(gt.prefixCls,"-switcher"),"".concat(gt.prefixCls,"-switcher-noop"))},gn):null}var Wn=Wt(!1);return Wn!==!1?re.createElement("span",{onClick:Dt,className:ee()("".concat(gt.prefixCls,"-switcher"),"".concat(gt.prefixCls,"-switcher_").concat(Ge?oe:ge))},Wn):null},bn=re.useMemo(function(){if(!ft)return null;var In=typeof ft!="boolean"?ft:null;return re.createElement("span",{className:ee()("".concat(gt.prefixCls,"-checkbox"),(0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(gt.prefixCls,"-checkbox-checked"),We),"".concat(gt.prefixCls,"-checkbox-indeterminate"),!We&&Ue),"".concat(gt.prefixCls,"-checkbox-disabled"),et||pe.disableCheckbox)),onClick:Tt,role:"checkbox","aria-checked":Ue?"mixed":We,"aria-disabled":et||pe.disableCheckbox,"aria-label":"Select ".concat(typeof pe.title=="string"?pe.title:"tree node")},In)},[ft,We,Ue,et,pe.disableCheckbox,pe.title]),Yt=re.useMemo(function(){return Ht?null:Ge?oe:ge},[Ht,Ge]),Mn=re.useMemo(function(){return re.createElement("span",{className:ee()("".concat(gt.prefixCls,"-iconEle"),"".concat(gt.prefixCls,"-icon__").concat(Yt||"docu"),(0,ie.Z)({},"".concat(gt.prefixCls,"-icon_loading"),Ze))})},[gt.prefixCls,Yt,Ze]),Yn=re.useMemo(function(){var In=!!gt.draggable,gn=!pe.disabled&&In&&gt.dragOverNodeKey===ke;return gn?gt.dropIndicatorRender({dropPosition:gt.dropPosition,dropLevelOffset:gt.dropLevelOffset,indent:gt.indent,prefixCls:gt.prefixCls,direction:gt.direction}):null},[gt.dropPosition,gt.dropLevelOffset,gt.indent,gt.prefixCls,gt.direction,gt.draggable,gt.dragOverNodeKey,gt.dropIndicatorRender]),Vn=re.useMemo(function(){var In=pe.title,gn=In===void 0?Se:In,Wn="".concat(gt.prefixCls,"-node-content-wrapper"),fr;if(gt.showIcon){var mn=pe.icon||gt.icon;fr=mn?re.createElement("span",{className:ee()("".concat(gt.prefixCls,"-iconEle"),"".concat(gt.prefixCls,"-icon__customize"))},typeof mn=="function"?mn(pe):mn):Mn}else gt.loadData&&Ze&&(fr=Mn);var En;return typeof gn=="function"?En=gn(Qe):gt.titleRender?En=gt.titleRender(Qe):En=gn,re.createElement("span",{ref:St,title:typeof gn=="string"?gn:"",className:ee()(Wn,"".concat(Wn,"-").concat(Yt||"normal"),(0,ie.Z)({},"".concat(gt.prefixCls,"-node-selected"),!et&&(ct||dt))),onMouseEnter:je,onMouseLeave:ye,onContextMenu:le,onClick:Le,onDoubleClick:Te},fr,re.createElement("span",{className:"".concat(gt.prefixCls,"-title")},En),Yn)},[gt.prefixCls,gt.showIcon,pe,gt.icon,Mn,gt.titleRender,Qe,Yt,je,ye,le,Le,Te]),Jn=(0,te.Z)(Pt,{aria:!0,data:!0}),ar=(0,x.Z)(gt.keyEntities,ke)||{},ur=ar.level,jn=rt[rt.length-1],Bn=!et&&_e,sr=gt.draggingNodeKey===ke,Hn=ht!==void 0?{"aria-selected":!!ht}:void 0;return re.createElement("div",(0,de.Z)({ref:Je,role:"treeitem","aria-expanded":ot?void 0:Ge,className:ee()(Ie,"".concat(gt.prefixCls,"-treenode"),(De={},(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)(De,"".concat(gt.prefixCls,"-treenode-disabled"),et),"".concat(gt.prefixCls,"-treenode-switcher-").concat(Ge?"open":"close"),!ot),"".concat(gt.prefixCls,"-treenode-checkbox-checked"),We),"".concat(gt.prefixCls,"-treenode-checkbox-indeterminate"),Ue),"".concat(gt.prefixCls,"-treenode-selected"),ct),"".concat(gt.prefixCls,"-treenode-loading"),Ze),"".concat(gt.prefixCls,"-treenode-active"),$e),"".concat(gt.prefixCls,"-treenode-leaf-last"),jn),"".concat(gt.prefixCls,"-treenode-draggable"),_e),"dragging",sr),(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)(De,"drop-target",gt.dropTargetKey===ke),"drop-container",gt.dropContainerKey===ke),"drag-over",!et&&Pe),"drag-over-gap-top",!et&&qe),"drag-over-gap-bottom",!et&&Ke),"filter-node",(Ae=gt.filterTreeNode)===null||Ae===void 0?void 0:Ae.call(gt,(0,ne.F)(pe))),"".concat(gt.prefixCls,"-treenode-leaf"),Ht))),style:Fe,draggable:Bn,onDragStart:Bn?Ne:void 0,onDragEnter:_e?Ye:void 0,onDragOver:_e?Oe:void 0,onDragLeave:_e?tt:void 0,onDrop:_e?Nt:void 0,onDragEnd:_e?Ct:void 0,onMouseMove:pt},Hn,Jn),re.createElement(z,{prefixCls:gt.prefixCls,level:ur,isStart:He,isEnd:rt}),At,on(),bn,Vn)};ve.isTreeNode=1;var be=ve},30699:function(Jt,Ot,we){"use strict";we.d(Ot,{k:function(){return ie},y:function(){return Ee}});var de=we(59301),ie=de.createContext(null),Ee=de.createContext({})},3741:function(Jt,Ot,we){"use strict";we.d(Ot,{OF:function(){return ke.Z},y6:function(){return ge.y},ZP:function(){return et}});var de=we(54476),ie=we(76190),Ee=we(33885),ce=we(94480),se=we(67732),re=we(83652),ue=we(31226),ee=we(42403),te=we(158),E=we(20068),y=we(92310),z=we.n(y),x=we(10228),ne=we(26112),ae=we(48736),oe=we(59301),ge=we(30699),Se=function(wt){var Tt=wt.dropPosition,Re=wt.dropLevelOffset,Le=wt.indent,Te={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Tt){case-1:Te.top=0,Te.left=-Re*Le;break;case 1:Te.bottom=0,Te.left=-Re*Le;break;case 0:Te.bottom=0,Te.left=Le;break}return oe.createElement("div",{style:Te})},ve=Se;function be(ft){if(ft==null)throw new TypeError("Cannot destructure "+ft)}var xe=we(42978),pe=we(75931),me=we(34280),Ae=we(48911),De=we(77900),ke=we(639);function Ie(ft,wt){var Tt=oe.useState(!1),Re=(0,xe.Z)(Tt,2),Le=Re[0],Te=Re[1];(0,me.Z)(function(){if(Le)return ft(),function(){wt()}},[Le]),(0,me.Z)(function(){return Te(!0),function(){Te(!1)}},[])}var Fe=Ie,Pe=we(34061),qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Ke=oe.forwardRef(function(ft,wt){var Tt=ft.className,Re=ft.style,Le=ft.motion,Te=ft.motionNodes,je=ft.motionType,ye=ft.onMotionStart,le=ft.onMotionEnd,_e=ft.active,Ne=ft.treeNodeRequiredProps,Ye=(0,pe.Z)(ft,qe),Oe=oe.useState(!0),tt=(0,xe.Z)(Oe,2),Ct=tt[0],Nt=tt[1],Dt=oe.useContext(ge.k),ut=Dt.prefixCls,Ht=Te&&je!=="hide";(0,me.Z)(function(){Te&&Ht!==Ct&&Nt(Ht)},[Te]);var At=function(){Te&&ye()},Wt=oe.useRef(!1),on=function(){Te&&!Wt.current&&(Wt.current=!0,le())};Fe(At,on);var bn=function(Mn){Ht===Mn&&on()};return Te?oe.createElement(De.default,(0,de.Z)({ref:wt,visible:Ct},Le,{motionAppear:je==="show",onVisibleChanged:bn}),function(Yt,Mn){var Yn=Yt.className,Vn=Yt.style;return oe.createElement("div",{ref:Mn,className:z()("".concat(ut,"-treenode-motion"),Yn),style:Vn},Te.map(function(Jn){var ar=Object.assign({},(be(Jn.data),Jn.data)),ur=Jn.title,jn=Jn.key,Bn=Jn.isStart,sr=Jn.isEnd;delete ar.children;var Hn=(0,Pe.H8)(jn,Ne);return oe.createElement(ke.Z,(0,de.Z)({},ar,Hn,{title:ur,active:_e,data:Jn.data,key:jn,isStart:Bn,isEnd:sr}))}))}):oe.createElement(ke.Z,(0,de.Z)({domRef:wt,className:Tt,style:Re},Ye,{active:_e}))}),ot=Ke;function He(){var ft=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Tt=ft.length,Re=wt.length;if(Math.abs(Tt-Re)!==1)return{add:!1,key:null};function Le(Te,je){var ye=new Map;Te.forEach(function(_e){ye.set(_e,!0)});var le=je.filter(function(_e){return!ye.has(_e)});return le.length===1?le[0]:null}return Tt<Re?{add:!0,key:Le(ft,wt)}:{add:!1,key:Le(wt,ft)}}function rt(ft,wt,Tt){var Re=ft.findIndex(function(ye){return ye.key===Tt}),Le=ft[Re+1],Te=wt.findIndex(function(ye){return ye.key===Tt});if(Le){var je=wt.findIndex(function(ye){return ye.key===Le.key});return wt.slice(Te+1,je)}return wt.slice(Te+1)}var Ge=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ct={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},We=function(){},Ue="RC_TREE_MOTION_".concat(Math.random()),Ze={key:Ue},Je={key:Ue,level:0,index:0,pos:"0",node:Ze,nodes:[Ze]},$e={parent:null,children:[],pos:Je.pos,data:Ze,title:null,key:Ue,isStart:[],isEnd:[]};function Qe(ft,wt,Tt,Re){return wt===!1||!Tt?ft:ft.slice(0,Math.ceil(Tt/Re)+1)}function pt(ft){var wt=ft.key,Tt=ft.pos;return(0,Pe.km)(wt,Tt)}function ht(ft){for(var wt=String(ft.data.key),Tt=ft;Tt.parent;)Tt=Tt.parent,wt="".concat(Tt.data.key," > ").concat(wt);return wt}var Pt=oe.forwardRef(function(ft,wt){var Tt=ft.prefixCls,Re=ft.data,Le=ft.selectable,Te=ft.checkable,je=ft.expandedKeys,ye=ft.selectedKeys,le=ft.checkedKeys,_e=ft.loadedKeys,Ne=ft.loadingKeys,Ye=ft.halfCheckedKeys,Oe=ft.keyEntities,tt=ft.disabled,Ct=ft.dragging,Nt=ft.dragOverNodeKey,Dt=ft.dropPosition,ut=ft.motion,Ht=ft.height,At=ft.itemHeight,Wt=ft.virtual,on=ft.scrollWidth,bn=ft.focusable,Yt=ft.activeItem,Mn=ft.focused,Yn=ft.tabIndex,Vn=ft.onKeyDown,Jn=ft.onFocus,ar=ft.onBlur,ur=ft.onActiveChange,jn=ft.onListChangeStart,Bn=ft.onListChangeEnd,sr=(0,pe.Z)(ft,Ge),Hn=oe.useRef(null),In=oe.useRef(null);oe.useImperativeHandle(wt,function(){return{scrollTo:function(rn){Hn.current.scrollTo(rn)},getIndentWidth:function(){return In.current.offsetWidth}}});var gn=oe.useState(je),Wn=(0,xe.Z)(gn,2),fr=Wn[0],mn=Wn[1],En=oe.useState(Re),rr=(0,xe.Z)(En,2),Qt=rr[0],Me=rr[1],ze=oe.useState(Re),Ve=(0,xe.Z)(ze,2),st=Ve[0],yt=Ve[1],Ft=oe.useState([]),Mt=(0,xe.Z)(Ft,2),jt=Mt[0],qt=Mt[1],wn=oe.useState(null),Qn=(0,xe.Z)(wn,2),Rt=Qn[0],Et=Qn[1],sn=oe.useRef(Re);sn.current=Re;function Zt(){var nn=sn.current;Me(nn),yt(nn),qt([]),Et(null),Bn()}(0,me.Z)(function(){mn(je);var nn=He(fr,je);if(nn.key!==null)if(nn.add){var rn=Qt.findIndex(function(Cn){var Un=Cn.key;return Un===nn.key}),_n=Qe(rt(Qt,Re,nn.key),Wt,Ht,At),xn=Qt.slice();xn.splice(rn+1,0,$e),yt(xn),qt(_n),Et("show")}else{var Ln=Re.findIndex(function(Cn){var Un=Cn.key;return Un===nn.key}),Kt=Qe(rt(Re,Qt,nn.key),Wt,Ht,At),Xt=Re.slice();Xt.splice(Ln+1,0,$e),yt(Xt),qt(Kt),Et("hide")}else Qt!==Re&&(Me(Re),yt(Re))},[je,Re]),oe.useEffect(function(){Ct||Zt()},[Ct]);var Lt=ut?st:Re,zt={expandedKeys:je,selectedKeys:ye,loadedKeys:_e,loadingKeys:Ne,checkedKeys:le,halfCheckedKeys:Ye,dragOverNodeKey:Nt,dropPosition:Dt,keyEntities:Oe};return oe.createElement(oe.Fragment,null,Mn&&Yt&&oe.createElement("span",{style:ct,"aria-live":"assertive"},ht(Yt)),oe.createElement("div",null,oe.createElement("input",{style:ct,disabled:bn===!1||tt,tabIndex:bn!==!1?Yn:null,onKeyDown:Vn,onFocus:Jn,onBlur:ar,value:"",onChange:We,"aria-label":"for screen reader"})),oe.createElement("div",{className:"".concat(Tt,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},oe.createElement("div",{className:"".concat(Tt,"-indent")},oe.createElement("div",{ref:In,className:"".concat(Tt,"-indent-unit")}))),oe.createElement(Ae.Z,(0,de.Z)({},sr,{data:Lt,itemKey:pt,height:Ht,fullHeight:!1,virtual:Wt,itemHeight:At,scrollWidth:on,prefixCls:"".concat(Tt,"-list"),ref:Hn,role:"tree",onVisibleChange:function(rn){rn.every(function(_n){return pt(_n)!==Ue})&&Zt()}}),function(nn){var rn=nn.pos,_n=Object.assign({},(be(nn.data),nn.data)),xn=nn.title,Ln=nn.key,Kt=nn.isStart,Xt=nn.isEnd,Cn=(0,Pe.km)(Ln,rn);delete _n.key,delete _n.children;var Un=(0,Pe.H8)(Cn,zt);return oe.createElement(ot,(0,de.Z)({},_n,Un,{title:xn,active:!!Yt&&Ln===Yt.key,pos:rn,data:nn.data,isStart:Kt,isEnd:Xt,motion:ut,motionNodes:Ln===Ue?jt:null,motionType:Rt,onMotionStart:jn,onMotionEnd:Zt,treeNodeRequiredProps:zt,onMouseMove:function(){ur(null)}}))}))}),gt=Pt,bt=we(82661),St=we(34643),lt=we(65065),_t=10,dt=function(ft){(0,ee.Z)(Tt,ft);var wt=(0,te.Z)(Tt);function Tt(){var Re;(0,se.Z)(this,Tt);for(var Le=arguments.length,Te=new Array(Le),je=0;je<Le;je++)Te[je]=arguments[je];return Re=wt.call.apply(wt,[this].concat(Te)),(0,E.Z)((0,ue.Z)(Re),"destroyed",!1),(0,E.Z)((0,ue.Z)(Re),"delayedDragEnterLogic",void 0),(0,E.Z)((0,ue.Z)(Re),"loadingRetryTimes",{}),(0,E.Z)((0,ue.Z)(Re),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Pe.w$)()}),(0,E.Z)((0,ue.Z)(Re),"dragStartMousePosition",null),(0,E.Z)((0,ue.Z)(Re),"dragNodeProps",null),(0,E.Z)((0,ue.Z)(Re),"currentMouseOverDroppableNodeKey",null),(0,E.Z)((0,ue.Z)(Re),"listRef",oe.createRef()),(0,E.Z)((0,ue.Z)(Re),"onNodeDragStart",function(ye,le){var _e=Re.state,Ne=_e.expandedKeys,Ye=_e.keyEntities,Oe=Re.props.onDragStart,tt=le.eventKey;Re.dragNodeProps=le,Re.dragStartMousePosition={x:ye.clientX,y:ye.clientY};var Ct=(0,bt._5)(Ne,tt);Re.setState({draggingNodeKey:tt,dragChildrenKeys:(0,bt.wA)(tt,Ye),indent:Re.listRef.current.getIndentWidth()}),Re.setExpandedKeys(Ct),window.addEventListener("dragend",Re.onWindowDragEnd),Oe==null||Oe({event:ye,node:(0,Pe.F)(le)})}),(0,E.Z)((0,ue.Z)(Re),"onNodeDragEnter",function(ye,le){var _e=Re.state,Ne=_e.expandedKeys,Ye=_e.keyEntities,Oe=_e.dragChildrenKeys,tt=_e.flattenNodes,Ct=_e.indent,Nt=Re.props,Dt=Nt.onDragEnter,ut=Nt.onExpand,Ht=Nt.allowDrop,At=Nt.direction,Wt=le.pos,on=le.eventKey;if(Re.currentMouseOverDroppableNodeKey!==on&&(Re.currentMouseOverDroppableNodeKey=on),!Re.dragNodeProps){Re.resetDragState();return}var bn=(0,bt.OM)(ye,Re.dragNodeProps,le,Ct,Re.dragStartMousePosition,Ht,tt,Ye,Ne,At),Yt=bn.dropPosition,Mn=bn.dropLevelOffset,Yn=bn.dropTargetKey,Vn=bn.dropContainerKey,Jn=bn.dropTargetPos,ar=bn.dropAllowed,ur=bn.dragOverNodeKey;if(Oe.includes(Yn)||!ar){Re.resetDragState();return}if(Re.delayedDragEnterLogic||(Re.delayedDragEnterLogic={}),Object.keys(Re.delayedDragEnterLogic).forEach(function(jn){clearTimeout(Re.delayedDragEnterLogic[jn])}),Re.dragNodeProps.eventKey!==le.eventKey&&(ye.persist(),Re.delayedDragEnterLogic[Wt]=window.setTimeout(function(){if(Re.state.draggingNodeKey!==null){var jn=(0,ce.Z)(Ne),Bn=(0,lt.Z)(Ye,le.eventKey);Bn&&(Bn.children||[]).length&&(jn=(0,bt.L0)(Ne,le.eventKey)),Re.props.hasOwnProperty("expandedKeys")||Re.setExpandedKeys(jn),ut==null||ut(jn,{node:(0,Pe.F)(le),expanded:!0,nativeEvent:ye.nativeEvent})}},800)),Re.dragNodeProps.eventKey===Yn&&Mn===0){Re.resetDragState();return}Re.setState({dragOverNodeKey:ur,dropPosition:Yt,dropLevelOffset:Mn,dropTargetKey:Yn,dropContainerKey:Vn,dropTargetPos:Jn,dropAllowed:ar}),Dt==null||Dt({event:ye,node:(0,Pe.F)(le),expandedKeys:Ne})}),(0,E.Z)((0,ue.Z)(Re),"onNodeDragOver",function(ye,le){var _e=Re.state,Ne=_e.dragChildrenKeys,Ye=_e.flattenNodes,Oe=_e.keyEntities,tt=_e.expandedKeys,Ct=_e.indent,Nt=Re.props,Dt=Nt.onDragOver,ut=Nt.allowDrop,Ht=Nt.direction;if(Re.dragNodeProps){var At=(0,bt.OM)(ye,Re.dragNodeProps,le,Ct,Re.dragStartMousePosition,ut,Ye,Oe,tt,Ht),Wt=At.dropPosition,on=At.dropLevelOffset,bn=At.dropTargetKey,Yt=At.dropContainerKey,Mn=At.dropTargetPos,Yn=At.dropAllowed,Vn=At.dragOverNodeKey;Ne.includes(bn)||!Yn||(Re.dragNodeProps.eventKey===bn&&on===0?Re.state.dropPosition===null&&Re.state.dropLevelOffset===null&&Re.state.dropTargetKey===null&&Re.state.dropContainerKey===null&&Re.state.dropTargetPos===null&&Re.state.dropAllowed===!1&&Re.state.dragOverNodeKey===null||Re.resetDragState():Wt===Re.state.dropPosition&&on===Re.state.dropLevelOffset&&bn===Re.state.dropTargetKey&&Yt===Re.state.dropContainerKey&&Mn===Re.state.dropTargetPos&&Yn===Re.state.dropAllowed&&Vn===Re.state.dragOverNodeKey||Re.setState({dropPosition:Wt,dropLevelOffset:on,dropTargetKey:bn,dropContainerKey:Yt,dropTargetPos:Mn,dropAllowed:Yn,dragOverNodeKey:Vn}),Dt==null||Dt({event:ye,node:(0,Pe.F)(le)}))}}),(0,E.Z)((0,ue.Z)(Re),"onNodeDragLeave",function(ye,le){Re.currentMouseOverDroppableNodeKey===le.eventKey&&!ye.currentTarget.contains(ye.relatedTarget)&&(Re.resetDragState(),Re.currentMouseOverDroppableNodeKey=null);var _e=Re.props.onDragLeave;_e==null||_e({event:ye,node:(0,Pe.F)(le)})}),(0,E.Z)((0,ue.Z)(Re),"onWindowDragEnd",function(ye){Re.onNodeDragEnd(ye,null,!0),window.removeEventListener("dragend",Re.onWindowDragEnd)}),(0,E.Z)((0,ue.Z)(Re),"onNodeDragEnd",function(ye,le){var _e=Re.props.onDragEnd;Re.setState({dragOverNodeKey:null}),Re.cleanDragState(),_e==null||_e({event:ye,node:(0,Pe.F)(le)}),Re.dragNodeProps=null,window.removeEventListener("dragend",Re.onWindowDragEnd)}),(0,E.Z)((0,ue.Z)(Re),"onNodeDrop",function(ye,le){var _e,Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ye=Re.state,Oe=Ye.dragChildrenKeys,tt=Ye.dropPosition,Ct=Ye.dropTargetKey,Nt=Ye.dropTargetPos,Dt=Ye.dropAllowed;if(Dt){var ut=Re.props.onDrop;if(Re.setState({dragOverNodeKey:null}),Re.cleanDragState(),Ct!==null){var Ht=(0,Ee.Z)((0,Ee.Z)({},(0,Pe.H8)(Ct,Re.getTreeNodeRequiredProps())),{},{active:((_e=Re.getActiveItem())===null||_e===void 0?void 0:_e.key)===Ct,data:(0,lt.Z)(Re.state.keyEntities,Ct).node}),At=Oe.includes(Ct);(0,ae.ZP)(!At,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Wt=(0,bt.yx)(Nt),on={event:ye,node:(0,Pe.F)(Ht),dragNode:Re.dragNodeProps?(0,Pe.F)(Re.dragNodeProps):null,dragNodesKeys:[Re.dragNodeProps.eventKey].concat(Oe),dropToGap:tt!==0,dropPosition:tt+Number(Wt[Wt.length-1])};Ne||ut==null||ut(on),Re.dragNodeProps=null}}}),(0,E.Z)((0,ue.Z)(Re),"cleanDragState",function(){var ye=Re.state.draggingNodeKey;ye!==null&&Re.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),Re.dragStartMousePosition=null,Re.currentMouseOverDroppableNodeKey=null}),(0,E.Z)((0,ue.Z)(Re),"triggerExpandActionExpand",function(ye,le){var _e=Re.state,Ne=_e.expandedKeys,Ye=_e.flattenNodes,Oe=le.expanded,tt=le.key,Ct=le.isLeaf;if(!(Ct||ye.shiftKey||ye.metaKey||ye.ctrlKey)){var Nt=Ye.filter(function(ut){return ut.key===tt})[0],Dt=(0,Pe.F)((0,Ee.Z)((0,Ee.Z)({},(0,Pe.H8)(tt,Re.getTreeNodeRequiredProps())),{},{data:Nt.data}));Re.setExpandedKeys(Oe?(0,bt._5)(Ne,tt):(0,bt.L0)(Ne,tt)),Re.onNodeExpand(ye,Dt)}}),(0,E.Z)((0,ue.Z)(Re),"onNodeClick",function(ye,le){var _e=Re.props,Ne=_e.onClick,Ye=_e.expandAction;Ye==="click"&&Re.triggerExpandActionExpand(ye,le),Ne==null||Ne(ye,le)}),(0,E.Z)((0,ue.Z)(Re),"onNodeDoubleClick",function(ye,le){var _e=Re.props,Ne=_e.onDoubleClick,Ye=_e.expandAction;Ye==="doubleClick"&&Re.triggerExpandActionExpand(ye,le),Ne==null||Ne(ye,le)}),(0,E.Z)((0,ue.Z)(Re),"onNodeSelect",function(ye,le){var _e=Re.state.selectedKeys,Ne=Re.state,Ye=Ne.keyEntities,Oe=Ne.fieldNames,tt=Re.props,Ct=tt.onSelect,Nt=tt.multiple,Dt=le.selected,ut=le[Oe.key],Ht=!Dt;Ht?Nt?_e=(0,bt.L0)(_e,ut):_e=[ut]:_e=(0,bt._5)(_e,ut);var At=_e.map(function(Wt){var on=(0,lt.Z)(Ye,Wt);return on?on.node:null}).filter(Boolean);Re.setUncontrolledState({selectedKeys:_e}),Ct==null||Ct(_e,{event:"select",selected:Ht,node:le,selectedNodes:At,nativeEvent:ye.nativeEvent})}),(0,E.Z)((0,ue.Z)(Re),"onNodeCheck",function(ye,le,_e){var Ne=Re.state,Ye=Ne.keyEntities,Oe=Ne.checkedKeys,tt=Ne.halfCheckedKeys,Ct=Re.props,Nt=Ct.checkStrictly,Dt=Ct.onCheck,ut=le.key,Ht,At={event:"check",node:le,checked:_e,nativeEvent:ye.nativeEvent};if(Nt){var Wt=_e?(0,bt.L0)(Oe,ut):(0,bt._5)(Oe,ut),on=(0,bt._5)(tt,ut);Ht={checked:Wt,halfChecked:on},At.checkedNodes=Wt.map(function(Jn){return(0,lt.Z)(Ye,Jn)}).filter(Boolean).map(function(Jn){return Jn.node}),Re.setUncontrolledState({checkedKeys:Wt})}else{var bn=(0,St.S)([].concat((0,ce.Z)(Oe),[ut]),!0,Ye),Yt=bn.checkedKeys,Mn=bn.halfCheckedKeys;if(!_e){var Yn=new Set(Yt);Yn.delete(ut);var Vn=(0,St.S)(Array.from(Yn),{checked:!1,halfCheckedKeys:Mn},Ye);Yt=Vn.checkedKeys,Mn=Vn.halfCheckedKeys}Ht=Yt,At.checkedNodes=[],At.checkedNodesPositions=[],At.halfCheckedKeys=Mn,Yt.forEach(function(Jn){var ar=(0,lt.Z)(Ye,Jn);if(ar){var ur=ar.node,jn=ar.pos;At.checkedNodes.push(ur),At.checkedNodesPositions.push({node:ur,pos:jn})}}),Re.setUncontrolledState({checkedKeys:Yt},!1,{halfCheckedKeys:Mn})}Dt==null||Dt(Ht,At)}),(0,E.Z)((0,ue.Z)(Re),"onNodeLoad",function(ye){var le,_e=ye.key,Ne=Re.state.keyEntities,Ye=(0,lt.Z)(Ne,_e);if(!(Ye!=null&&(le=Ye.children)!==null&&le!==void 0&&le.length)){var Oe=new Promise(function(tt,Ct){Re.setState(function(Nt){var Dt=Nt.loadedKeys,ut=Dt===void 0?[]:Dt,Ht=Nt.loadingKeys,At=Ht===void 0?[]:Ht,Wt=Re.props,on=Wt.loadData,bn=Wt.onLoad;if(!on||ut.includes(_e)||At.includes(_e))return null;var Yt=on(ye);return Yt.then(function(){var Mn=Re.state.loadedKeys,Yn=(0,bt.L0)(Mn,_e);bn==null||bn(Yn,{event:"load",node:ye}),Re.setUncontrolledState({loadedKeys:Yn}),Re.setState(function(Vn){return{loadingKeys:(0,bt._5)(Vn.loadingKeys,_e)}}),tt()}).catch(function(Mn){if(Re.setState(function(Vn){return{loadingKeys:(0,bt._5)(Vn.loadingKeys,_e)}}),Re.loadingRetryTimes[_e]=(Re.loadingRetryTimes[_e]||0)+1,Re.loadingRetryTimes[_e]>=_t){var Yn=Re.state.loadedKeys;(0,ae.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),Re.setUncontrolledState({loadedKeys:(0,bt.L0)(Yn,_e)}),tt()}Ct(Mn)}),{loadingKeys:(0,bt.L0)(At,_e)}})});return Oe.catch(function(){}),Oe}}),(0,E.Z)((0,ue.Z)(Re),"onNodeMouseEnter",function(ye,le){var _e=Re.props.onMouseEnter;_e==null||_e({event:ye,node:le})}),(0,E.Z)((0,ue.Z)(Re),"onNodeMouseLeave",function(ye,le){var _e=Re.props.onMouseLeave;_e==null||_e({event:ye,node:le})}),(0,E.Z)((0,ue.Z)(Re),"onNodeContextMenu",function(ye,le){var _e=Re.props.onRightClick;_e&&(ye.preventDefault(),_e({event:ye,node:le}))}),(0,E.Z)((0,ue.Z)(Re),"onFocus",function(){var ye=Re.props.onFocus;Re.setState({focused:!0});for(var le=arguments.length,_e=new Array(le),Ne=0;Ne<le;Ne++)_e[Ne]=arguments[Ne];ye==null||ye.apply(void 0,_e)}),(0,E.Z)((0,ue.Z)(Re),"onBlur",function(){var ye=Re.props.onBlur;Re.setState({focused:!1}),Re.onActiveChange(null);for(var le=arguments.length,_e=new Array(le),Ne=0;Ne<le;Ne++)_e[Ne]=arguments[Ne];ye==null||ye.apply(void 0,_e)}),(0,E.Z)((0,ue.Z)(Re),"getTreeNodeRequiredProps",function(){var ye=Re.state,le=ye.expandedKeys,_e=ye.selectedKeys,Ne=ye.loadedKeys,Ye=ye.loadingKeys,Oe=ye.checkedKeys,tt=ye.halfCheckedKeys,Ct=ye.dragOverNodeKey,Nt=ye.dropPosition,Dt=ye.keyEntities;return{expandedKeys:le||[],selectedKeys:_e||[],loadedKeys:Ne||[],loadingKeys:Ye||[],checkedKeys:Oe||[],halfCheckedKeys:tt||[],dragOverNodeKey:Ct,dropPosition:Nt,keyEntities:Dt}}),(0,E.Z)((0,ue.Z)(Re),"setExpandedKeys",function(ye){var le=Re.state,_e=le.treeData,Ne=le.fieldNames,Ye=(0,Pe.oH)(_e,ye,Ne);Re.setUncontrolledState({expandedKeys:ye,flattenNodes:Ye},!0)}),(0,E.Z)((0,ue.Z)(Re),"onNodeExpand",function(ye,le){var _e=Re.state.expandedKeys,Ne=Re.state,Ye=Ne.listChanging,Oe=Ne.fieldNames,tt=Re.props,Ct=tt.onExpand,Nt=tt.loadData,Dt=le.expanded,ut=le[Oe.key];if(!Ye){var Ht=_e.includes(ut),At=!Dt;if((0,ae.ZP)(Dt&&Ht||!Dt&&!Ht,"Expand state not sync with index check"),_e=At?(0,bt.L0)(_e,ut):(0,bt._5)(_e,ut),Re.setExpandedKeys(_e),Ct==null||Ct(_e,{node:le,expanded:At,nativeEvent:ye.nativeEvent}),At&&Nt){var Wt=Re.onNodeLoad(le);Wt&&Wt.then(function(){var on=(0,Pe.oH)(Re.state.treeData,_e,Oe);Re.setUncontrolledState({flattenNodes:on})}).catch(function(){var on=Re.state.expandedKeys,bn=(0,bt._5)(on,ut);Re.setExpandedKeys(bn)})}}}),(0,E.Z)((0,ue.Z)(Re),"onListChangeStart",function(){Re.setUncontrolledState({listChanging:!0})}),(0,E.Z)((0,ue.Z)(Re),"onListChangeEnd",function(){setTimeout(function(){Re.setUncontrolledState({listChanging:!1})})}),(0,E.Z)((0,ue.Z)(Re),"onActiveChange",function(ye){var le=Re.state.activeKey,_e=Re.props,Ne=_e.onActiveChange,Ye=_e.itemScrollOffset,Oe=Ye===void 0?0:Ye;le!==ye&&(Re.setState({activeKey:ye}),ye!==null&&Re.scrollTo({key:ye,offset:Oe}),Ne==null||Ne(ye))}),(0,E.Z)((0,ue.Z)(Re),"getActiveItem",function(){var ye=Re.state,le=ye.activeKey,_e=ye.flattenNodes;return le===null?null:_e.find(function(Ne){var Ye=Ne.key;return Ye===le})||null}),(0,E.Z)((0,ue.Z)(Re),"offsetActiveKey",function(ye){var le=Re.state,_e=le.flattenNodes,Ne=le.activeKey,Ye=_e.findIndex(function(Ct){var Nt=Ct.key;return Nt===Ne});Ye===-1&&ye<0&&(Ye=_e.length),Ye=(Ye+ye+_e.length)%_e.length;var Oe=_e[Ye];if(Oe){var tt=Oe.key;Re.onActiveChange(tt)}else Re.onActiveChange(null)}),(0,E.Z)((0,ue.Z)(Re),"onKeyDown",function(ye){var le=Re.state,_e=le.activeKey,Ne=le.expandedKeys,Ye=le.checkedKeys,Oe=le.fieldNames,tt=Re.props,Ct=tt.onKeyDown,Nt=tt.checkable,Dt=tt.selectable;switch(ye.which){case x.Z.UP:{Re.offsetActiveKey(-1),ye.preventDefault();break}case x.Z.DOWN:{Re.offsetActiveKey(1),ye.preventDefault();break}}var ut=Re.getActiveItem();if(ut&&ut.data){var Ht=Re.getTreeNodeRequiredProps(),At=ut.data.isLeaf===!1||!!(ut.data[Oe.children]||[]).length,Wt=(0,Pe.F)((0,Ee.Z)((0,Ee.Z)({},(0,Pe.H8)(_e,Ht)),{},{data:ut.data,active:!0}));switch(ye.which){case x.Z.LEFT:{At&&Ne.includes(_e)?Re.onNodeExpand({},Wt):ut.parent&&Re.onActiveChange(ut.parent.key),ye.preventDefault();break}case x.Z.RIGHT:{At&&!Ne.includes(_e)?Re.onNodeExpand({},Wt):ut.children&&ut.children.length&&Re.onActiveChange(ut.children[0].key),ye.preventDefault();break}case x.Z.ENTER:case x.Z.SPACE:{Nt&&!Wt.disabled&&Wt.checkable!==!1&&!Wt.disableCheckbox?Re.onNodeCheck({},Wt,!Ye.includes(_e)):!Nt&&Dt&&!Wt.disabled&&Wt.selectable!==!1&&Re.onNodeSelect({},Wt);break}}}Ct==null||Ct(ye)}),(0,E.Z)((0,ue.Z)(Re),"setUncontrolledState",function(ye){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,_e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!Re.destroyed){var Ne=!1,Ye=!0,Oe={};Object.keys(ye).forEach(function(tt){if(Re.props.hasOwnProperty(tt)){Ye=!1;return}Ne=!0,Oe[tt]=ye[tt]}),Ne&&(!le||Ye)&&Re.setState((0,Ee.Z)((0,Ee.Z)({},Oe),_e))}}),(0,E.Z)((0,ue.Z)(Re),"scrollTo",function(ye){Re.listRef.current.scrollTo(ye)}),Re}return(0,re.Z)(Tt,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Le=this.props,Te=Le.activeKey,je=Le.itemScrollOffset,ye=je===void 0?0:je;Te!==void 0&&Te!==this.state.activeKey&&(this.setState({activeKey:Te}),Te!==null&&this.scrollTo({key:Te,offset:ye}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var Le=this.state,Te=Le.focused,je=Le.flattenNodes,ye=Le.keyEntities,le=Le.draggingNodeKey,_e=Le.activeKey,Ne=Le.dropLevelOffset,Ye=Le.dropContainerKey,Oe=Le.dropTargetKey,tt=Le.dropPosition,Ct=Le.dragOverNodeKey,Nt=Le.indent,Dt=this.props,ut=Dt.prefixCls,Ht=Dt.className,At=Dt.style,Wt=Dt.showLine,on=Dt.focusable,bn=Dt.tabIndex,Yt=bn===void 0?0:bn,Mn=Dt.selectable,Yn=Dt.showIcon,Vn=Dt.icon,Jn=Dt.switcherIcon,ar=Dt.draggable,ur=Dt.checkable,jn=Dt.checkStrictly,Bn=Dt.disabled,sr=Dt.motion,Hn=Dt.loadData,In=Dt.filterTreeNode,gn=Dt.height,Wn=Dt.itemHeight,fr=Dt.scrollWidth,mn=Dt.virtual,En=Dt.titleRender,rr=Dt.dropIndicatorRender,Qt=Dt.onContextMenu,Me=Dt.onScroll,ze=Dt.direction,Ve=Dt.rootClassName,st=Dt.rootStyle,yt=(0,ne.Z)(this.props,{aria:!0,data:!0}),Ft;ar&&((0,ie.Z)(ar)==="object"?Ft=ar:typeof ar=="function"?Ft={nodeDraggable:ar}:Ft={});var Mt={prefixCls:ut,selectable:Mn,showIcon:Yn,icon:Vn,switcherIcon:Jn,draggable:Ft,draggingNodeKey:le,checkable:ur,checkStrictly:jn,disabled:Bn,keyEntities:ye,dropLevelOffset:Ne,dropContainerKey:Ye,dropTargetKey:Oe,dropPosition:tt,dragOverNodeKey:Ct,indent:Nt,direction:ze,dropIndicatorRender:rr,loadData:Hn,filterTreeNode:In,titleRender:En,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return oe.createElement(ge.k.Provider,{value:Mt},oe.createElement("div",{className:z()(ut,Ht,Ve,(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(ut,"-show-line"),Wt),"".concat(ut,"-focused"),Te),"".concat(ut,"-active-focused"),_e!==null)),style:st},oe.createElement(gt,(0,de.Z)({ref:this.listRef,prefixCls:ut,style:At,data:je,disabled:Bn,selectable:Mn,checkable:!!ur,motion:sr,dragging:le!==null,height:gn,itemHeight:Wn,virtual:mn,focusable:on,focused:Te,tabIndex:Yt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Qt,onScroll:Me,scrollWidth:fr},this.getTreeNodeRequiredProps(),yt))))}}],[{key:"getDerivedStateFromProps",value:function(Le,Te){var je=Te.prevProps,ye={prevProps:Le};function le(Yt){return!je&&Le.hasOwnProperty(Yt)||je&&je[Yt]!==Le[Yt]}var _e,Ne=Te.fieldNames;if(le("fieldNames")&&(Ne=(0,Pe.w$)(Le.fieldNames),ye.fieldNames=Ne),le("treeData")?_e=Le.treeData:le("children")&&((0,ae.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),_e=(0,Pe.zn)(Le.children)),_e){ye.treeData=_e;var Ye=(0,Pe.I8)(_e,{fieldNames:Ne});ye.keyEntities=(0,Ee.Z)((0,E.Z)({},Ue,Je),Ye.keyEntities)}var Oe=ye.keyEntities||Te.keyEntities;if(le("expandedKeys")||je&&le("autoExpandParent"))ye.expandedKeys=Le.autoExpandParent||!je&&Le.defaultExpandParent?(0,bt.r7)(Le.expandedKeys,Oe):Le.expandedKeys;else if(!je&&Le.defaultExpandAll){var tt=(0,Ee.Z)({},Oe);delete tt[Ue];var Ct=[];Object.keys(tt).forEach(function(Yt){var Mn=tt[Yt];Mn.children&&Mn.children.length&&Ct.push(Mn.key)}),ye.expandedKeys=Ct}else!je&&Le.defaultExpandedKeys&&(ye.expandedKeys=Le.autoExpandParent||Le.defaultExpandParent?(0,bt.r7)(Le.defaultExpandedKeys,Oe):Le.defaultExpandedKeys);if(ye.expandedKeys||delete ye.expandedKeys,_e||ye.expandedKeys){var Nt=(0,Pe.oH)(_e||Te.treeData,ye.expandedKeys||Te.expandedKeys,Ne);ye.flattenNodes=Nt}if(Le.selectable&&(le("selectedKeys")?ye.selectedKeys=(0,bt.BT)(Le.selectedKeys,Le):!je&&Le.defaultSelectedKeys&&(ye.selectedKeys=(0,bt.BT)(Le.defaultSelectedKeys,Le))),Le.checkable){var Dt;if(le("checkedKeys")?Dt=(0,bt.E6)(Le.checkedKeys)||{}:!je&&Le.defaultCheckedKeys?Dt=(0,bt.E6)(Le.defaultCheckedKeys)||{}:_e&&(Dt=(0,bt.E6)(Le.checkedKeys)||{checkedKeys:Te.checkedKeys,halfCheckedKeys:Te.halfCheckedKeys}),Dt){var ut=Dt,Ht=ut.checkedKeys,At=Ht===void 0?[]:Ht,Wt=ut.halfCheckedKeys,on=Wt===void 0?[]:Wt;if(!Le.checkStrictly){var bn=(0,St.S)(At,!0,Oe);At=bn.checkedKeys,on=bn.halfCheckedKeys}ye.checkedKeys=At,ye.halfCheckedKeys=on}}return le("loadedKeys")&&(ye.loadedKeys=Le.loadedKeys),ye}}]),Tt}(oe.Component);(0,E.Z)(dt,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:ve,allowDrop:function(){return!0},expandAction:!1}),(0,E.Z)(dt,"TreeNode",ke.Z);var nt=dt,et=nt},82661:function(Jt,Ot,we){"use strict";we.d(Ot,{BT:function(){return oe},E6:function(){return ve},L0:function(){return E},OM:function(){return ae},_5:function(){return te},r7:function(){return be},wA:function(){return z},yx:function(){return y}});var de=we(94480),ie=we(76190),Ee=we(48736),ce=we(59301),se=we(639),re=we(65065),ue=we(34061),ee=null;function te(xe,pe){if(!xe)return[];var me=xe.slice(),Ae=me.indexOf(pe);return Ae>=0&&me.splice(Ae,1),me}function E(xe,pe){var me=(xe||[]).slice();return me.indexOf(pe)===-1&&me.push(pe),me}function y(xe){return xe.split("-")}function z(xe,pe){var me=[],Ae=(0,re.Z)(pe,xe);function De(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ke.forEach(function(Ie){var Fe=Ie.key,Pe=Ie.children;me.push(Fe),De(Pe)})}return De(Ae.children),me}function x(xe){if(xe.parent){var pe=y(xe.pos);return Number(pe[pe.length-1])===xe.parent.children.length-1}return!1}function ne(xe){var pe=y(xe.pos);return Number(pe[pe.length-1])===0}function ae(xe,pe,me,Ae,De,ke,Ie,Fe,Pe,qe){var Ke,ot=xe.clientX,He=xe.clientY,rt=xe.target.getBoundingClientRect(),Ge=rt.top,ct=rt.height,We=(qe==="rtl"?-1:1)*(((De==null?void 0:De.x)||0)-ot),Ue=(We-12)/Ae,Ze=Pe.filter(function(et){var ft;return(ft=Fe[et])===null||ft===void 0||(ft=ft.children)===null||ft===void 0?void 0:ft.length}),Je=(0,re.Z)(Fe,me.eventKey);if(He<Ge+ct/2){var $e=Ie.findIndex(function(et){return et.key===Je.key}),Qe=$e<=0?0:$e-1,pt=Ie[Qe].key;Je=(0,re.Z)(Fe,pt)}var ht=Je.key,Pt=Je,gt=Je.key,bt=0,St=0;if(!Ze.includes(ht))for(var lt=0;lt<Ue&&x(Je);lt+=1)Je=Je.parent,St+=1;var _t=pe.data,dt=Je.node,nt=!0;return ne(Je)&&Je.level===0&&He<Ge+ct/2&&ke({dragNode:_t,dropNode:dt,dropPosition:-1})&&Je.key===me.eventKey?bt=-1:(Pt.children||[]).length&&Ze.includes(gt)?ke({dragNode:_t,dropNode:dt,dropPosition:0})?bt=0:nt=!1:St===0?Ue>-1.5?ke({dragNode:_t,dropNode:dt,dropPosition:1})?bt=1:nt=!1:ke({dragNode:_t,dropNode:dt,dropPosition:0})?bt=0:ke({dragNode:_t,dropNode:dt,dropPosition:1})?bt=1:nt=!1:ke({dragNode:_t,dropNode:dt,dropPosition:1})?bt=1:nt=!1,{dropPosition:bt,dropLevelOffset:St,dropTargetKey:Je.key,dropTargetPos:Je.pos,dragOverNodeKey:gt,dropContainerKey:bt===0?null:((Ke=Je.parent)===null||Ke===void 0?void 0:Ke.key)||null,dropAllowed:nt}}function oe(xe,pe){if(xe){var me=pe.multiple;return me?xe.slice():xe.length?[xe[0]]:xe}}var ge=function(pe){return pe};function Se(xe,pe){if(!xe)return[];var me=pe||{},Ae=me.processProps,De=Ae===void 0?ge:Ae,ke=Array.isArray(xe)?xe:[xe];return ke.map(function(Ie){var Fe=Ie.children,Pe=_objectWithoutProperties(Ie,ee),qe=Se(Fe,pe);return React.createElement(TreeNode,_extends({key:Pe.key},De(Pe)),qe)})}function ve(xe){if(!xe)return null;var pe;if(Array.isArray(xe))pe={checkedKeys:xe,halfCheckedKeys:void 0};else if((0,ie.Z)(xe)==="object")pe={checkedKeys:xe.checked||void 0,halfCheckedKeys:xe.halfChecked||void 0};else return(0,Ee.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return pe}function be(xe,pe){var me=new Set;function Ae(De){if(!me.has(De)){var ke=(0,re.Z)(pe,De);if(ke){me.add(De);var Ie=ke.parent,Fe=ke.node;Fe.disabled||Ie&&Ae(Ie.key)}}}return(xe||[]).forEach(function(De){Ae(De)}),(0,de.Z)(me)}},34643:function(Jt,Ot,we){"use strict";we.d(Ot,{S:function(){return ue}});var de=we(48736),ie=we(65065);function Ee(ee,te){var E=new Set;return ee.forEach(function(y){te.has(y)||E.add(y)}),E}function ce(ee){var te=ee||{},E=te.disabled,y=te.disableCheckbox,z=te.checkable;return!!(E||y)||z===!1}function se(ee,te,E,y){for(var z=new Set(ee),x=new Set,ne=0;ne<=E;ne+=1){var ae=te.get(ne)||new Set;ae.forEach(function(ve){var be=ve.key,xe=ve.node,pe=ve.children,me=pe===void 0?[]:pe;z.has(be)&&!y(xe)&&me.filter(function(Ae){return!y(Ae.node)}).forEach(function(Ae){z.add(Ae.key)})})}for(var oe=new Set,ge=E;ge>=0;ge-=1){var Se=te.get(ge)||new Set;Se.forEach(function(ve){var be=ve.parent,xe=ve.node;if(!(y(xe)||!ve.parent||oe.has(ve.parent.key))){if(y(ve.parent.node)){oe.add(be.key);return}var pe=!0,me=!1;(be.children||[]).filter(function(Ae){return!y(Ae.node)}).forEach(function(Ae){var De=Ae.key,ke=z.has(De);pe&&!ke&&(pe=!1),!me&&(ke||x.has(De))&&(me=!0)}),pe&&z.add(be.key),me&&x.add(be.key),oe.add(be.key)}})}return{checkedKeys:Array.from(z),halfCheckedKeys:Array.from(Ee(x,z))}}function re(ee,te,E,y,z){for(var x=new Set(ee),ne=new Set(te),ae=0;ae<=y;ae+=1){var oe=E.get(ae)||new Set;oe.forEach(function(be){var xe=be.key,pe=be.node,me=be.children,Ae=me===void 0?[]:me;!x.has(xe)&&!ne.has(xe)&&!z(pe)&&Ae.filter(function(De){return!z(De.node)}).forEach(function(De){x.delete(De.key)})})}ne=new Set;for(var ge=new Set,Se=y;Se>=0;Se-=1){var ve=E.get(Se)||new Set;ve.forEach(function(be){var xe=be.parent,pe=be.node;if(!(z(pe)||!be.parent||ge.has(be.parent.key))){if(z(be.parent.node)){ge.add(xe.key);return}var me=!0,Ae=!1;(xe.children||[]).filter(function(De){return!z(De.node)}).forEach(function(De){var ke=De.key,Ie=x.has(ke);me&&!Ie&&(me=!1),!Ae&&(Ie||ne.has(ke))&&(Ae=!0)}),me||x.delete(xe.key),Ae&&ne.add(xe.key),ge.add(xe.key)}})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(Ee(ne,x))}}function ue(ee,te,E,y){var z=[],x;y?x=y:x=ce;var ne=new Set(ee.filter(function(Se){var ve=!!(0,ie.Z)(E,Se);return ve||z.push(Se),ve})),ae=new Map,oe=0;Object.keys(E).forEach(function(Se){var ve=E[Se],be=ve.level,xe=ae.get(be);xe||(xe=new Set,ae.set(be,xe)),xe.add(ve),oe=Math.max(oe,be)}),(0,de.ZP)(!z.length,"Tree missing follow keys: ".concat(z.slice(0,100).map(function(Se){return"'".concat(Se,"'")}).join(", ")));var ge;return te===!0?ge=se(ne,ae,oe,x):ge=re(ne,te.halfCheckedKeys,ae,oe,x),ge}},65065:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return de}});function de(ie,Ee){return ie[Ee]}},34061:function(Jt,Ot,we){"use strict";we.d(Ot,{F:function(){return be},H8:function(){return ve},I8:function(){return Se},km:function(){return z},oH:function(){return oe},w$:function(){return x},zn:function(){return ae}});var de=we(76190),ie=we(94480),Ee=we(33885),ce=we(75931),se=we(11592),re=we(2738),ue=we(48736),ee=we(65065),te=["children"];function E(xe,pe){return"".concat(xe,"-").concat(pe)}function y(xe){return xe&&xe.type&&xe.type.isTreeNode}function z(xe,pe){return xe!=null?xe:pe}function x(xe){var pe=xe||{},me=pe.title,Ae=pe._title,De=pe.key,ke=pe.children,Ie=me||"title";return{title:Ie,_title:Ae||[Ie],key:De||"key",children:ke||"children"}}function ne(xe,pe){var me=new Map;function Ae(De){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(De||[]).forEach(function(Ie){var Fe=Ie[pe.key],Pe=Ie[pe.children];warning(Fe!=null,"Tree node must have a certain key: [".concat(ke).concat(Fe,"]"));var qe=String(Fe);warning(!me.has(qe)||Fe===null||Fe===void 0,"Same 'key' exist in the Tree: ".concat(qe)),me.set(qe,!0),Ae(Pe,"".concat(ke).concat(qe," > "))})}Ae(xe)}function ae(xe){function pe(me){var Ae=(0,se.Z)(me);return Ae.map(function(De){if(!y(De))return(0,ue.ZP)(!De,"Tree/TreeNode can only accept TreeNode as children."),null;var ke=De.key,Ie=De.props,Fe=Ie.children,Pe=(0,ce.Z)(Ie,te),qe=(0,Ee.Z)({key:ke},Pe),Ke=pe(Fe);return Ke.length&&(qe.children=Ke),qe}).filter(function(De){return De})}return pe(xe)}function oe(xe,pe,me){var Ae=x(me),De=Ae._title,ke=Ae.key,Ie=Ae.children,Fe=new Set(pe===!0?[]:pe),Pe=[];function qe(Ke){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Ke.map(function(He,rt){for(var Ge=E(ot?ot.pos:"0",rt),ct=z(He[ke],Ge),We,Ue=0;Ue<De.length;Ue+=1){var Ze=De[Ue];if(He[Ze]!==void 0){We=He[Ze];break}}var Je=Object.assign((0,re.Z)(He,[].concat((0,ie.Z)(De),[ke,Ie])),{title:We,key:ct,parent:ot,pos:Ge,children:null,data:He,isStart:[].concat((0,ie.Z)(ot?ot.isStart:[]),[rt===0]),isEnd:[].concat((0,ie.Z)(ot?ot.isEnd:[]),[rt===Ke.length-1])});return Pe.push(Je),pe===!0||Fe.has(ct)?Je.children=qe(He[Ie]||[],Je):Je.children=[],Je})}return qe(xe),Pe}function ge(xe,pe,me){var Ae={};(0,de.Z)(me)==="object"?Ae=me:Ae={externalGetKey:me},Ae=Ae||{};var De=Ae,ke=De.childrenPropName,Ie=De.externalGetKey,Fe=De.fieldNames,Pe=x(Fe),qe=Pe.key,Ke=Pe.children,ot=ke||Ke,He;Ie?typeof Ie=="string"?He=function(ct){return ct[Ie]}:typeof Ie=="function"&&(He=function(ct){return Ie(ct)}):He=function(ct,We){return z(ct[qe],We)};function rt(Ge,ct,We,Ue){var Ze=Ge?Ge[ot]:xe,Je=Ge?E(We.pos,ct):"0",$e=Ge?[].concat((0,ie.Z)(Ue),[Ge]):[];if(Ge){var Qe=He(Ge,Je),pt={node:Ge,index:ct,pos:Je,key:Qe,parentPos:We.node?We.pos:null,level:We.level+1,nodes:$e};pe(pt)}Ze&&Ze.forEach(function(ht,Pt){rt(ht,Pt,{node:Ge,pos:Je,level:We?We.level+1:-1},$e)})}rt(null)}function Se(xe){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=pe.initWrapper,Ae=pe.processEntity,De=pe.onProcessFinished,ke=pe.externalGetKey,Ie=pe.childrenPropName,Fe=pe.fieldNames,Pe=arguments.length>2?arguments[2]:void 0,qe=ke||Pe,Ke={},ot={},He={posEntities:Ke,keyEntities:ot};return me&&(He=me(He)||He),ge(xe,function(rt){var Ge=rt.node,ct=rt.index,We=rt.pos,Ue=rt.key,Ze=rt.parentPos,Je=rt.level,$e=rt.nodes,Qe={node:Ge,nodes:$e,index:ct,key:Ue,pos:We,level:Je},pt=z(Ue,We);Ke[We]=Qe,ot[pt]=Qe,Qe.parent=Ke[Ze],Qe.parent&&(Qe.parent.children=Qe.parent.children||[],Qe.parent.children.push(Qe)),Ae&&Ae(Qe,He)},{externalGetKey:qe,childrenPropName:Ie,fieldNames:Fe}),De&&De(He),He}function ve(xe,pe){var me=pe.expandedKeys,Ae=pe.selectedKeys,De=pe.loadedKeys,ke=pe.loadingKeys,Ie=pe.checkedKeys,Fe=pe.halfCheckedKeys,Pe=pe.dragOverNodeKey,qe=pe.dropPosition,Ke=pe.keyEntities,ot=(0,ee.Z)(Ke,xe),He={eventKey:xe,expanded:me.indexOf(xe)!==-1,selected:Ae.indexOf(xe)!==-1,loaded:De.indexOf(xe)!==-1,loading:ke.indexOf(xe)!==-1,checked:Ie.indexOf(xe)!==-1,halfChecked:Fe.indexOf(xe)!==-1,pos:String(ot?ot.pos:""),dragOver:Pe===xe&&qe===0,dragOverGapTop:Pe===xe&&qe===-1,dragOverGapBottom:Pe===xe&&qe===1};return He}function be(xe){var pe=xe.data,me=xe.expanded,Ae=xe.selected,De=xe.checked,ke=xe.loaded,Ie=xe.loading,Fe=xe.halfChecked,Pe=xe.dragOver,qe=xe.dragOverGapTop,Ke=xe.dragOverGapBottom,ot=xe.pos,He=xe.active,rt=xe.eventKey,Ge=(0,Ee.Z)((0,Ee.Z)({},pe),{},{expanded:me,selected:Ae,checked:De,loaded:ke,loading:Ie,halfChecked:Fe,dragOver:Pe,dragOverGapTop:qe,dragOverGapBottom:Ke,pos:ot,active:He,key:rt});return"props"in Ge||Object.defineProperty(Ge,"props",{get:function(){return(0,ue.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xe}}),Ge}},8224:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ie}});var de=we(4676);function ie(Ee,ce,se,re){var ue=de.unstable_batchedUpdates?function(te){de.unstable_batchedUpdates(se,te)}:se;return Ee!=null&&Ee.addEventListener&&Ee.addEventListener(ce,ue,re),{remove:function(){Ee!=null&&Ee.removeEventListener&&Ee.removeEventListener(ce,ue,re)}}}},3465:function(Jt,Ot,we){"use strict";we.d(Ot,{G:function(){return ce}});var de=we(47273),ie=function(re){if((0,de.Z)()&&window.document.documentElement){var ue=Array.isArray(re)?re:[re],ee=window.document.documentElement;return ue.some(function(te){return te in ee.style})}return!1},Ee=function(re,ue){if(!ie(re))return!1;var ee=document.createElement("div"),te=ee.style[re];return ee.style[re]=ue,ee.style[re]!==te};function ce(se,re){return!Array.isArray(se)&&re!==void 0?Ee(se,re):ie(se)}},48911:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return _t}});var de=we(54476),ie=we(76190),Ee=we(33885),ce=we(20068),se=we(42978),re=we(75931),ue=we(92310),ee=we.n(ue),te=we(29301),E=we(70425),y=we(34280),z=we(59301),x=we(4676),ne=z.forwardRef(function(dt,nt){var et=dt.height,ft=dt.offsetY,wt=dt.offsetX,Tt=dt.children,Re=dt.prefixCls,Le=dt.onInnerResize,Te=dt.innerProps,je=dt.rtl,ye=dt.extra,le={},_e={display:"flex",flexDirection:"column"};return ft!==void 0&&(le={height:et,position:"relative",overflow:"hidden"},_e=(0,Ee.Z)((0,Ee.Z)({},_e),{},(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({transform:"translateY(".concat(ft,"px)")},je?"marginRight":"marginLeft",-wt),"position","absolute"),"left",0),"right",0),"top",0))),z.createElement("div",{style:le},z.createElement(te.Z,{onResize:function(Ye){var Oe=Ye.offsetHeight;Oe&&Le&&Le()}},z.createElement("div",(0,de.Z)({style:_e,className:ee()((0,ce.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:nt},Te),Tt,ye)))});ne.displayName="Filler";var ae=ne;function oe(dt){var nt=dt.children,et=dt.setRef,ft=z.useCallback(function(wt){et(wt)},[]);return z.cloneElement(nt,{ref:ft})}function ge(dt,nt,et,ft,wt,Tt,Re,Le){var Te=Le.getKey;return dt.slice(nt,et+1).map(function(je,ye){var le=nt+ye,_e=Re(je,le,{style:{width:ft},offsetX:wt}),Ne=Te(je);return z.createElement(oe,{key:Ne,setRef:function(Oe){return Tt(je,Oe)}},_e)})}function Se(dt,nt,et,ft){var wt=et-dt,Tt=nt-et,Re=Math.min(wt,Tt)*2;if(ft<=Re){var Le=Math.floor(ft/2);return ft%2?et+Le+1:et-Le}return wt>Tt?et-(ft-Tt):et+(ft-wt)}function ve(dt,nt,et){var ft=dt.length,wt=nt.length,Tt,Re;if(ft===0&&wt===0)return null;ft<wt?(Tt=dt,Re=nt):(Tt=nt,Re=dt);var Le={__EMPTY_ITEM__:!0};function Te(Ye){return Ye!==void 0?et(Ye):Le}for(var je=null,ye=Math.abs(ft-wt)!==1,le=0;le<Re.length;le+=1){var _e=Te(Tt[le]),Ne=Te(Re[le]);if(_e!==Ne){je=le,ye=ye||_e!==Te(Re[le+1]);break}}return je===null?null:{index:je,multiple:ye}}function be(dt,nt,et){var ft=z.useState(dt),wt=(0,se.Z)(ft,2),Tt=wt[0],Re=wt[1],Le=z.useState(null),Te=(0,se.Z)(Le,2),je=Te[0],ye=Te[1];return z.useEffect(function(){var le=ve(Tt||[],dt||[],nt);(le==null?void 0:le.index)!==void 0&&(et==null||et(le.index),ye(dt[le.index])),Re(dt)},[dt]),[je]}var xe=we(16089),pe=(typeof navigator=="undefined"?"undefined":(0,ie.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),me=pe,Ae=function(dt,nt,et,ft){var wt=(0,z.useRef)(!1),Tt=(0,z.useRef)(null);function Re(){clearTimeout(Tt.current),wt.current=!0,Tt.current=setTimeout(function(){wt.current=!1},50)}var Le=(0,z.useRef)({top:dt,bottom:nt,left:et,right:ft});return Le.current.top=dt,Le.current.bottom=nt,Le.current.left=et,Le.current.right=ft,function(Te,je){var ye=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,le=Te?je<0&&Le.current.left||je>0&&Le.current.right:je<0&&Le.current.top||je>0&&Le.current.bottom;return ye&&le?(clearTimeout(Tt.current),wt.current=!1):(!le||wt.current)&&Re(),!wt.current&&le}};function De(dt,nt,et,ft,wt,Tt,Re){var Le=(0,z.useRef)(0),Te=(0,z.useRef)(null),je=(0,z.useRef)(null),ye=(0,z.useRef)(!1),le=Ae(nt,et,ft,wt);function _e(Nt,Dt){if(xe.Z.cancel(Te.current),!le(!1,Dt)){var ut=Nt;if(!ut._virtualHandled)ut._virtualHandled=!0;else return;Le.current+=Dt,je.current=Dt,me||ut.preventDefault(),Te.current=(0,xe.Z)(function(){var Ht=ye.current?10:1;Re(Le.current*Ht,!1),Le.current=0})}}function Ne(Nt,Dt){Re(Dt,!0),me||Nt.preventDefault()}var Ye=(0,z.useRef)(null),Oe=(0,z.useRef)(null);function tt(Nt){if(dt){xe.Z.cancel(Oe.current),Oe.current=(0,xe.Z)(function(){Ye.current=null},2);var Dt=Nt.deltaX,ut=Nt.deltaY,Ht=Nt.shiftKey,At=Dt,Wt=ut;(Ye.current==="sx"||!Ye.current&&Ht&&ut&&!Dt)&&(At=ut,Wt=0,Ye.current="sx");var on=Math.abs(At),bn=Math.abs(Wt);Ye.current===null&&(Ye.current=Tt&&on>bn?"x":"y"),Ye.current==="y"?_e(Nt,Wt):Ne(Nt,At)}}function Ct(Nt){dt&&(ye.current=Nt.detail===je.current)}return[tt,Ct]}function ke(dt,nt,et,ft){var wt=z.useMemo(function(){return[new Map,[]]},[dt,et.id,ft]),Tt=(0,se.Z)(wt,2),Re=Tt[0],Le=Tt[1],Te=function(ye){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ye,_e=Re.get(ye),Ne=Re.get(le);if(_e===void 0||Ne===void 0)for(var Ye=dt.length,Oe=Le.length;Oe<Ye;Oe+=1){var tt,Ct=dt[Oe],Nt=nt(Ct);Re.set(Nt,Oe);var Dt=(tt=et.get(Nt))!==null&&tt!==void 0?tt:ft;if(Le[Oe]=(Le[Oe-1]||0)+Dt,Nt===ye&&(_e=Oe),Nt===le&&(Ne=Oe),_e!==void 0&&Ne!==void 0)break}return{top:Le[_e-1]||0,bottom:Le[Ne]}};return Te}var Ie=we(67732),Fe=we(83652),Pe=function(){function dt(){(0,Ie.Z)(this,dt),(0,ce.Z)(this,"maps",void 0),(0,ce.Z)(this,"id",0),(0,ce.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,Fe.Z)(dt,[{key:"set",value:function(et,ft){this.diffRecords.set(et,this.maps[et]),this.maps[et]=ft,this.id+=1}},{key:"get",value:function(et){return this.maps[et]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),dt}(),qe=Pe;function Ke(dt){var nt=parseFloat(dt);return isNaN(nt)?0:nt}function ot(dt,nt,et){var ft=z.useState(0),wt=(0,se.Z)(ft,2),Tt=wt[0],Re=wt[1],Le=(0,z.useRef)(new Map),Te=(0,z.useRef)(new qe),je=(0,z.useRef)(0);function ye(){je.current+=1}function le(){var Ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ye();var Ye=function(){var Ct=!1;Le.current.forEach(function(Nt,Dt){if(Nt&&Nt.offsetParent){var ut=Nt.offsetHeight,Ht=getComputedStyle(Nt),At=Ht.marginTop,Wt=Ht.marginBottom,on=Ke(At),bn=Ke(Wt),Yt=ut+on+bn;Te.current.get(Dt)!==Yt&&(Te.current.set(Dt,Yt),Ct=!0)}}),Ct&&Re(function(Nt){return Nt+1})};if(Ne)Ye();else{je.current+=1;var Oe=je.current;Promise.resolve().then(function(){Oe===je.current&&Ye()})}}function _e(Ne,Ye){var Oe=dt(Ne),tt=Le.current.get(Oe);Ye?(Le.current.set(Oe,Ye),le()):Le.current.delete(Oe),!tt!=!Ye&&(Ye?nt==null||nt(Ne):et==null||et(Ne))}return(0,z.useEffect)(function(){return ye},[]),[_e,le,Te.current,Tt]}var He=14/15;function rt(dt,nt,et){var ft=(0,z.useRef)(!1),wt=(0,z.useRef)(0),Tt=(0,z.useRef)(0),Re=(0,z.useRef)(null),Le=(0,z.useRef)(null),Te,je=function(Ne){if(ft.current){var Ye=Math.ceil(Ne.touches[0].pageX),Oe=Math.ceil(Ne.touches[0].pageY),tt=wt.current-Ye,Ct=Tt.current-Oe,Nt=Math.abs(tt)>Math.abs(Ct);Nt?wt.current=Ye:Tt.current=Oe;var Dt=et(Nt,Nt?tt:Ct,!1,Ne);Dt&&Ne.preventDefault(),clearInterval(Le.current),Dt&&(Le.current=setInterval(function(){Nt?tt*=He:Ct*=He;var ut=Math.floor(Nt?tt:Ct);(!et(Nt,ut,!0)||Math.abs(ut)<=.1)&&clearInterval(Le.current)},16))}},ye=function(){ft.current=!1,Te()},le=function(Ne){Te(),Ne.touches.length===1&&!ft.current&&(ft.current=!0,wt.current=Math.ceil(Ne.touches[0].pageX),Tt.current=Math.ceil(Ne.touches[0].pageY),Re.current=Ne.target,Re.current.addEventListener("touchmove",je,{passive:!1}),Re.current.addEventListener("touchend",ye,{passive:!0}))};Te=function(){Re.current&&(Re.current.removeEventListener("touchmove",je),Re.current.removeEventListener("touchend",ye))},(0,y.Z)(function(){return dt&&nt.current.addEventListener("touchstart",le,{passive:!0}),function(){var _e;(_e=nt.current)===null||_e===void 0||_e.removeEventListener("touchstart",le),Te(),clearInterval(Le.current)}},[dt])}function Ge(dt){return Math.floor(Math.pow(dt,.5))}function ct(dt,nt){var et="touches"in dt?dt.touches[0]:dt;return et[nt?"pageX":"pageY"]-window[nt?"scrollX":"scrollY"]}function We(dt,nt,et){z.useEffect(function(){var ft=nt.current;if(dt&&ft){var wt=!1,Tt,Re,Le=function(){xe.Z.cancel(Tt)},Te=function _e(){Le(),Tt=(0,xe.Z)(function(){et(Re),_e()})},je=function(){wt=!1,Le()},ye=function(Ne){if(!(Ne.target.draggable||Ne.button!==0)){var Ye=Ne;Ye._virtualHandled||(Ye._virtualHandled=!0,wt=!0)}},le=function(Ne){if(wt){var Ye=ct(Ne,!1),Oe=ft.getBoundingClientRect(),tt=Oe.top,Ct=Oe.bottom;if(Ye<=tt){var Nt=tt-Ye;Re=-Ge(Nt),Te()}else if(Ye>=Ct){var Dt=Ye-Ct;Re=Ge(Dt),Te()}else Le()}};return ft.addEventListener("mousedown",ye),ft.ownerDocument.addEventListener("mouseup",je),ft.ownerDocument.addEventListener("mousemove",le),ft.ownerDocument.addEventListener("dragend",je),function(){ft.removeEventListener("mousedown",ye),ft.ownerDocument.removeEventListener("mouseup",je),ft.ownerDocument.removeEventListener("mousemove",le),ft.ownerDocument.removeEventListener("dragend",je),Le()}}},[dt])}var Ue=10;function Ze(dt,nt,et,ft,wt,Tt,Re,Le){var Te=z.useRef(),je=z.useState(null),ye=(0,se.Z)(je,2),le=ye[0],_e=ye[1];return(0,y.Z)(function(){if(le&&le.times<Ue){if(!dt.current){_e(function(sr){return(0,Ee.Z)({},sr)});return}Tt();var Ne=le.targetAlign,Ye=le.originAlign,Oe=le.index,tt=le.offset,Ct=dt.current.clientHeight,Nt=!1,Dt=Ne,ut=null;if(Ct){for(var Ht=Ne||Ye,At=0,Wt=0,on=0,bn=Math.min(nt.length-1,Oe),Yt=0;Yt<=bn;Yt+=1){var Mn=wt(nt[Yt]);Wt=At;var Yn=et.get(Mn);on=Wt+(Yn===void 0?ft:Yn),At=on}for(var Vn=Ht==="top"?tt:Ct-tt,Jn=bn;Jn>=0;Jn-=1){var ar=wt(nt[Jn]),ur=et.get(ar);if(ur===void 0){Nt=!0;break}if(Vn-=ur,Vn<=0)break}switch(Ht){case"top":ut=Wt-tt;break;case"bottom":ut=on-Ct+tt;break;default:{var jn=dt.current.scrollTop,Bn=jn+Ct;Wt<jn?Dt="top":on>Bn&&(Dt="bottom")}}ut!==null&&Re(ut),ut!==le.lastTop&&(Nt=!0)}Nt&&_e((0,Ee.Z)((0,Ee.Z)({},le),{},{times:le.times+1,targetAlign:Dt,lastTop:ut}))}},[le,dt.current]),function(Ne){if(Ne==null){Le();return}if(xe.Z.cancel(Te.current),typeof Ne=="number")Re(Ne);else if(Ne&&(0,ie.Z)(Ne)==="object"){var Ye,Oe=Ne.align;"index"in Ne?Ye=Ne.index:Ye=nt.findIndex(function(Nt){return wt(Nt)===Ne.key});var tt=Ne.offset,Ct=tt===void 0?0:tt;_e({times:0,index:Ye,offset:Ct,originAlign:Oe})}}}var Je=z.forwardRef(function(dt,nt){var et=dt.prefixCls,ft=dt.rtl,wt=dt.scrollOffset,Tt=dt.scrollRange,Re=dt.onStartMove,Le=dt.onStopMove,Te=dt.onScroll,je=dt.horizontal,ye=dt.spinSize,le=dt.containerSize,_e=dt.style,Ne=dt.thumbStyle,Ye=dt.showScrollBar,Oe=z.useState(!1),tt=(0,se.Z)(Oe,2),Ct=tt[0],Nt=tt[1],Dt=z.useState(null),ut=(0,se.Z)(Dt,2),Ht=ut[0],At=ut[1],Wt=z.useState(null),on=(0,se.Z)(Wt,2),bn=on[0],Yt=on[1],Mn=!ft,Yn=z.useRef(),Vn=z.useRef(),Jn=z.useState(Ye),ar=(0,se.Z)(Jn,2),ur=ar[0],jn=ar[1],Bn=z.useRef(),sr=function(){Ye===!0||Ye===!1||(clearTimeout(Bn.current),jn(!0),Bn.current=setTimeout(function(){jn(!1)},3e3))},Hn=Tt-le||0,In=le-ye||0,gn=z.useMemo(function(){if(wt===0||Hn===0)return 0;var Ve=wt/Hn;return Ve*In},[wt,Hn,In]),Wn=function(st){st.stopPropagation(),st.preventDefault()},fr=z.useRef({top:gn,dragging:Ct,pageY:Ht,startTop:bn});fr.current={top:gn,dragging:Ct,pageY:Ht,startTop:bn};var mn=function(st){Nt(!0),At(ct(st,je)),Yt(fr.current.top),Re(),st.stopPropagation(),st.preventDefault()};z.useEffect(function(){var Ve=function(Mt){Mt.preventDefault()},st=Yn.current,yt=Vn.current;return st.addEventListener("touchstart",Ve,{passive:!1}),yt.addEventListener("touchstart",mn,{passive:!1}),function(){st.removeEventListener("touchstart",Ve),yt.removeEventListener("touchstart",mn)}},[]);var En=z.useRef();En.current=Hn;var rr=z.useRef();rr.current=In,z.useEffect(function(){if(Ct){var Ve,st=function(Mt){var jt=fr.current,qt=jt.dragging,wn=jt.pageY,Qn=jt.startTop;xe.Z.cancel(Ve);var Rt=Yn.current.getBoundingClientRect(),Et=le/(je?Rt.width:Rt.height);if(qt){var sn=(ct(Mt,je)-wn)*Et,Zt=Qn;!Mn&&je?Zt-=sn:Zt+=sn;var Lt=En.current,zt=rr.current,nn=zt?Zt/zt:0,rn=Math.ceil(nn*Lt);rn=Math.max(rn,0),rn=Math.min(rn,Lt),Ve=(0,xe.Z)(function(){Te(rn,je)})}},yt=function(){Nt(!1),Le()};return window.addEventListener("mousemove",st,{passive:!0}),window.addEventListener("touchmove",st,{passive:!0}),window.addEventListener("mouseup",yt,{passive:!0}),window.addEventListener("touchend",yt,{passive:!0}),function(){window.removeEventListener("mousemove",st),window.removeEventListener("touchmove",st),window.removeEventListener("mouseup",yt),window.removeEventListener("touchend",yt),xe.Z.cancel(Ve)}}},[Ct]),z.useEffect(function(){return sr(),function(){clearTimeout(Bn.current)}},[wt]),z.useImperativeHandle(nt,function(){return{delayHidden:sr}});var Qt="".concat(et,"-scrollbar"),Me={position:"absolute",visibility:ur?null:"hidden"},ze={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return je?(Object.assign(Me,{height:8,left:0,right:0,bottom:0}),Object.assign(ze,(0,ce.Z)({height:"100%",width:ye},Mn?"left":"right",gn))):(Object.assign(Me,(0,ce.Z)({width:8,top:0,bottom:0},Mn?"right":"left",0)),Object.assign(ze,{width:"100%",height:ye,top:gn})),z.createElement("div",{ref:Yn,className:ee()(Qt,(0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(Qt,"-horizontal"),je),"".concat(Qt,"-vertical"),!je),"".concat(Qt,"-visible"),ur)),style:(0,Ee.Z)((0,Ee.Z)({},Me),_e),onMouseDown:Wn,onMouseMove:sr},z.createElement("div",{ref:Vn,className:ee()("".concat(Qt,"-thumb"),(0,ce.Z)({},"".concat(Qt,"-thumb-moving"),Ct)),style:(0,Ee.Z)((0,Ee.Z)({},ze),Ne),onMouseDown:mn}))}),$e=Je,Qe=20;function pt(){var dt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,et=dt/nt*dt;return isNaN(et)&&(et=0),et=Math.max(et,Qe),Math.floor(et)}var ht=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Pt=[],gt={overflowY:"auto",overflowAnchor:"none"};function bt(dt,nt){var et=dt.prefixCls,ft=et===void 0?"rc-virtual-list":et,wt=dt.className,Tt=dt.height,Re=dt.itemHeight,Le=dt.fullHeight,Te=Le===void 0?!0:Le,je=dt.style,ye=dt.data,le=dt.children,_e=dt.itemKey,Ne=dt.virtual,Ye=dt.direction,Oe=dt.scrollWidth,tt=dt.component,Ct=tt===void 0?"div":tt,Nt=dt.onScroll,Dt=dt.onVirtualScroll,ut=dt.onVisibleChange,Ht=dt.innerProps,At=dt.extraRender,Wt=dt.styles,on=dt.showScrollBar,bn=on===void 0?"optional":on,Yt=(0,re.Z)(dt,ht),Mn=z.useCallback(function(Gt){return typeof _e=="function"?_e(Gt):Gt==null?void 0:Gt[_e]},[_e]),Yn=ot(Mn,null,null),Vn=(0,se.Z)(Yn,4),Jn=Vn[0],ar=Vn[1],ur=Vn[2],jn=Vn[3],Bn=!!(Ne!==!1&&Tt&&Re),sr=z.useMemo(function(){return Object.values(ur.maps).reduce(function(Gt,ln){return Gt+ln},0)},[ur.id,ur.maps]),Hn=Bn&&ye&&(Math.max(Re*ye.length,sr)>Tt||!!Oe),In=Ye==="rtl",gn=ee()(ft,(0,ce.Z)({},"".concat(ft,"-rtl"),In),wt),Wn=ye||Pt,fr=(0,z.useRef)(),mn=(0,z.useRef)(),En=(0,z.useRef)(),rr=(0,z.useState)(0),Qt=(0,se.Z)(rr,2),Me=Qt[0],ze=Qt[1],Ve=(0,z.useState)(0),st=(0,se.Z)(Ve,2),yt=st[0],Ft=st[1],Mt=(0,z.useState)(!1),jt=(0,se.Z)(Mt,2),qt=jt[0],wn=jt[1],Qn=function(){wn(!0)},Rt=function(){wn(!1)},Et={getKey:Mn};function sn(Gt){ze(function(ln){var dn;typeof Gt=="function"?dn=Gt(ln):dn=Gt;var un=Nr(dn);return fr.current.scrollTop=un,un})}var Zt=(0,z.useRef)({start:0,end:Wn.length}),Lt=(0,z.useRef)(),zt=be(Wn,Mn),nn=(0,se.Z)(zt,1),rn=nn[0];Lt.current=rn;var _n=z.useMemo(function(){if(!Bn)return{scrollHeight:void 0,start:0,end:Wn.length-1,offset:void 0};if(!Hn){var Gt;return{scrollHeight:((Gt=mn.current)===null||Gt===void 0?void 0:Gt.offsetHeight)||0,start:0,end:Wn.length-1,offset:void 0}}for(var ln=0,dn,un,vn,Gn=Wn.length,yn=0;yn<Gn;yn+=1){var fn=Wn[yn],Rn=Mn(fn),On=ur.get(Rn),qn=ln+(On===void 0?Re:On);qn>=Me&&dn===void 0&&(dn=yn,un=ln),qn>Me+Tt&&vn===void 0&&(vn=yn),ln=qn}return dn===void 0&&(dn=0,un=0,vn=Math.ceil(Tt/Re)),vn===void 0&&(vn=Wn.length-1),vn=Math.min(vn+1,Wn.length-1),{scrollHeight:ln,start:dn,end:vn,offset:un}},[Hn,Bn,Me,Wn,jn,Tt]),xn=_n.scrollHeight,Ln=_n.start,Kt=_n.end,Xt=_n.offset;Zt.current.start=Ln,Zt.current.end=Kt,z.useLayoutEffect(function(){var Gt=ur.getRecord();if(Gt.size===1){var ln=Array.from(Gt.keys())[0],dn=Gt.get(ln),un=Wn[Ln];if(un&&dn===void 0){var vn=Mn(un);if(vn===ln){var Gn=ur.get(ln),yn=Gn-Re;sn(function(fn){return fn+yn})}}}ur.resetRecord()},[xn]);var Cn=z.useState({width:0,height:Tt}),Un=(0,se.Z)(Cn,2),Zn=Un[0],er=Un[1],Lr=function(ln){er({width:ln.offsetWidth,height:ln.offsetHeight})},wr=(0,z.useRef)(),tr=(0,z.useRef)(),zn=z.useMemo(function(){return pt(Zn.width,Oe)},[Zn.width,Oe]),cr=z.useMemo(function(){return pt(Zn.height,xn)},[Zn.height,xn]),Xn=xn-Tt,yr=(0,z.useRef)(Xn);yr.current=Xn;function Nr(Gt){var ln=Gt;return Number.isNaN(yr.current)||(ln=Math.min(ln,yr.current)),ln=Math.max(ln,0),ln}var Yr=Me<=0,pi=Me>=Xn,_i=yt<=0,Si=yt>=Oe,oi=Ae(Yr,pi,_i,Si),Mi=function(){return{x:In?-yt:yt,y:Me}},Li=(0,z.useRef)(Mi()),lr=(0,E.zX)(function(Gt){if(Dt){var ln=(0,Ee.Z)((0,Ee.Z)({},Mi()),Gt);(Li.current.x!==ln.x||Li.current.y!==ln.y)&&(Dt(ln),Li.current=ln)}});function Ar(Gt,ln){var dn=Gt;ln?((0,x.flushSync)(function(){Ft(dn)}),lr()):sn(dn)}function Mr(Gt){var ln=Gt.currentTarget.scrollTop;ln!==Me&&sn(ln),Nt==null||Nt(Gt),lr()}var $r=function(ln){var dn=ln,un=Oe?Oe-Zn.width:0;return dn=Math.max(dn,0),dn=Math.min(dn,un),dn},Jr=(0,E.zX)(function(Gt,ln){ln?((0,x.flushSync)(function(){Ft(function(dn){var un=dn+(In?-Gt:Gt);return $r(un)})}),lr()):sn(function(dn){var un=dn+Gt;return un})}),wi=De(Bn,Yr,pi,_i,Si,!!Oe,Jr),Hi=(0,se.Z)(wi,2),It=Hi[0],tn=Hi[1];rt(Bn,fr,function(Gt,ln,dn,un){var vn=un;return oi(Gt,ln,dn)?!1:!vn||!vn._virtualHandled?(vn&&(vn._virtualHandled=!0),It({preventDefault:function(){},deltaX:Gt?ln:0,deltaY:Gt?0:ln}),!0):!1}),We(Hn,fr,function(Gt){sn(function(ln){return ln+Gt})}),(0,y.Z)(function(){function Gt(dn){var un=Yr&&dn.detail<0,vn=pi&&dn.detail>0;Bn&&!un&&!vn&&dn.preventDefault()}var ln=fr.current;return ln.addEventListener("wheel",It,{passive:!1}),ln.addEventListener("DOMMouseScroll",tn,{passive:!0}),ln.addEventListener("MozMousePixelScroll",Gt,{passive:!1}),function(){ln.removeEventListener("wheel",It),ln.removeEventListener("DOMMouseScroll",tn),ln.removeEventListener("MozMousePixelScroll",Gt)}},[Bn,Yr,pi]),(0,y.Z)(function(){if(Oe){var Gt=$r(yt);Ft(Gt),lr({x:Gt})}},[Zn.width,Oe]);var Vt=function(){var ln,dn;(ln=wr.current)===null||ln===void 0||ln.delayHidden(),(dn=tr.current)===null||dn===void 0||dn.delayHidden()},$t=Ze(fr,Wn,ur,Re,Mn,function(){return ar(!0)},sn,Vt);z.useImperativeHandle(nt,function(){return{nativeElement:En.current,getScrollInfo:Mi,scrollTo:function(ln){function dn(un){return un&&(0,ie.Z)(un)==="object"&&("left"in un||"top"in un)}dn(ln)?(ln.left!==void 0&&Ft($r(ln.left)),$t(ln.top)):$t(ln)}}}),(0,y.Z)(function(){if(ut){var Gt=Wn.slice(Ln,Kt+1);ut(Gt,Wn)}},[Ln,Kt,Wn]);var cn=ke(Wn,Mn,ur,Re),hn=At==null?void 0:At({start:Ln,end:Kt,virtual:Hn,offsetX:yt,offsetY:Xt,rtl:In,getSize:cn}),Fn=ge(Wn,Ln,Kt,Oe,yt,Jn,le,Et),An=null;Tt&&(An=(0,Ee.Z)((0,ce.Z)({},Te?"height":"maxHeight",Tt),gt),Bn&&(An.overflowY="hidden",Oe&&(An.overflowX="hidden"),qt&&(An.pointerEvents="none")));var Sn={};return In&&(Sn.dir="rtl"),z.createElement("div",(0,de.Z)({ref:En,style:(0,Ee.Z)((0,Ee.Z)({},je),{},{position:"relative"}),className:gn},Sn,Yt),z.createElement(te.Z,{onResize:Lr},z.createElement(Ct,{className:"".concat(ft,"-holder"),style:An,ref:fr,onScroll:Mr,onMouseEnter:Vt},z.createElement(ae,{prefixCls:ft,height:xn,offsetX:yt,offsetY:Xt,scrollWidth:Oe,onInnerResize:ar,ref:mn,innerProps:Ht,rtl:In,extra:hn},Fn))),Hn&&xn>Tt&&z.createElement($e,{ref:wr,prefixCls:ft,scrollOffset:Me,scrollRange:xn,rtl:In,onScroll:Ar,onStartMove:Qn,onStopMove:Rt,spinSize:cr,containerSize:Zn.height,style:Wt==null?void 0:Wt.verticalScrollBar,thumbStyle:Wt==null?void 0:Wt.verticalScrollBarThumb,showScrollBar:bn}),Hn&&Oe>Zn.width&&z.createElement($e,{ref:tr,prefixCls:ft,scrollOffset:yt,scrollRange:Oe,rtl:In,onScroll:Ar,onStartMove:Qn,onStopMove:Rt,spinSize:zn,containerSize:Zn.width,horizontal:!0,style:Wt==null?void 0:Wt.horizontalScrollBar,thumbStyle:Wt==null?void 0:Wt.horizontalScrollBarThumb,showScrollBar:bn}))}var St=z.forwardRef(bt);St.displayName="List";var lt=St,_t=lt},7062:function(Jt,Ot,we){var de=we(19637),ie=we(97573),Ee=[we(96627)];Jt.exports=de.createStore(ie,Ee)},96627:function(Jt,Ot,we){Jt.exports=de;function de(){return we(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(Jt){return Jt<10?"0"+Jt:Jt}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(Jt){return rx_escapable.lastIndex=0,rx_escapable.test(Jt)?'"'+Jt.replace(rx_escapable,function(Ot){var we=meta[Ot];return typeof we=="string"?we:"\\u"+("0000"+Ot.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+Jt+'"'}function str(Jt,Ot){var we,de,ie,Ee,ce=gap,se,re=Ot[Jt];switch(re&&typeof re=="object"&&typeof re.toJSON=="function"&&(re=re.toJSON(Jt)),typeof rep=="function"&&(re=rep.call(Ot,Jt,re)),typeof re){case"string":return quote(re);case"number":return isFinite(re)?String(re):"null";case"boolean":case"null":return String(re);case"object":if(!re)return"null";if(gap+=indent,se=[],Object.prototype.toString.apply(re)==="[object Array]"){for(Ee=re.length,we=0;we<Ee;we+=1)se[we]=str(we,re)||"null";return ie=se.length===0?"[]":gap?`[
`+gap+se.join(`,
`+gap)+`
`+ce+"]":"["+se.join(",")+"]",gap=ce,ie}if(rep&&typeof rep=="object")for(Ee=rep.length,we=0;we<Ee;we+=1)typeof rep[we]=="string"&&(de=rep[we],ie=str(de,re),ie&&se.push(quote(de)+(gap?": ":":")+ie));else for(de in re)Object.prototype.hasOwnProperty.call(re,de)&&(ie=str(de,re),ie&&se.push(quote(de)+(gap?": ":":")+ie));return ie=se.length===0?"{}":gap?`{
`+gap+se.join(`,
`+gap)+`
`+ce+"}":"{"+se.join(",")+"}",gap=ce,ie}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(Jt,Ot,we){var de;if(gap="",indent="",typeof we=="number")for(de=0;de<we;de+=1)indent+=" ";else typeof we=="string"&&(indent=we);if(rep=Ot,Ot&&typeof Ot!="function"&&(typeof Ot!="object"||typeof Ot.length!="number"))throw new Error("JSON.stringify");return str("",{"":Jt})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(Jt,Ot){var we,de,ie=Jt[Ot];if(ie&&typeof ie=="object")for(we in ie)Object.prototype.hasOwnProperty.call(ie,we)&&(de=walk(ie,we),de!==void 0?ie[we]=de:delete ie[we]);return reviver.call(Jt,Ot,ie)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(Jt){return"\\u"+("0000"+Jt.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(Jt,Ot,we){var de=we(67039),ie=de.slice,Ee=de.pluck,ce=de.each,se=de.bind,re=de.create,ue=de.isList,ee=de.isFunction,te=de.isObject;Jt.exports={createStore:z};var E={version:"2.0.12",enabled:!1,get:function(x,ne){var ae=this.storage.read(this._namespacePrefix+x);return this._deserialize(ae,ne)},set:function(x,ne){return ne===void 0?this.remove(x):(this.storage.write(this._namespacePrefix+x,this._serialize(ne)),ne)},remove:function(x){this.storage.remove(this._namespacePrefix+x)},each:function(x){var ne=this;this.storage.each(function(ae,oe){x.call(ne,ne._deserialize(ae),(oe||"").replace(ne._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(x){return this._namespacePrefix=="__storejs_"+x+"_"},createStore:function(){return z.apply(this,arguments)},addPlugin:function(x){this._addPlugin(x)},namespace:function(x){return z(this.storage,this.plugins,x)}};function y(){var x=typeof console=="undefined"?null:console;if(x){var ne=x.warn?x.warn:x.log;ne.apply(x,arguments)}}function z(x,ne,ae){ae||(ae=""),x&&!ue(x)&&(x=[x]),ne&&!ue(ne)&&(ne=[ne]);var oe=ae?"__storejs_"+ae+"_":"",ge=ae?new RegExp("^"+oe):null,Se=/^[a-zA-Z0-9_\-]*$/;if(!Se.test(ae))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var ve={_namespacePrefix:oe,_namespaceRegexp:ge,_testStorage:function(xe){try{var pe="__storejs__test__";xe.write(pe,pe);var me=xe.read(pe)===pe;return xe.remove(pe),me}catch(Ae){return!1}},_assignPluginFnProp:function(xe,pe){var me=this[pe];this[pe]=function(){var De=ie(arguments,0),ke=this;function Ie(){if(me)return ce(arguments,function(Pe,qe){De[qe]=Pe}),me.apply(ke,De)}var Fe=[Ie].concat(De);return xe.apply(ke,Fe)}},_serialize:function(xe){return JSON.stringify(xe)},_deserialize:function(xe,pe){if(!xe)return pe;var me="";try{me=JSON.parse(xe)}catch(Ae){me=xe}return me!==void 0?me:pe},_addStorage:function(xe){this.enabled||this._testStorage(xe)&&(this.storage=xe,this.enabled=!0)},_addPlugin:function(xe){var pe=this;if(ue(xe)){ce(xe,function(De){pe._addPlugin(De)});return}var me=Ee(this.plugins,function(De){return xe===De});if(!me){if(this.plugins.push(xe),!ee(xe))throw new Error("Plugins must be function values that return objects");var Ae=xe.call(this);if(!te(Ae))throw new Error("Plugins must return an object of function properties");ce(Ae,function(De,ke){if(!ee(De))throw new Error("Bad plugin property: "+ke+" from plugin "+xe.name+". Plugins should only return functions.");pe._assignPluginFnProp(De,ke)})}},addStorage:function(xe){y("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(xe)}},be=re(ve,E,{plugins:[]});return be.raw={},ce(be,function(xe,pe){ee(xe)&&(be.raw[pe]=se(be,xe))}),ce(x,function(xe){be._addStorage(xe)}),ce(ne,function(xe){be._addPlugin(xe)}),be}},67039:function(Jt,Ot,we){var de=se(),ie=re(),Ee=ue(),ce=typeof window!="undefined"?window:we.g;Jt.exports={assign:de,create:ie,trim:Ee,bind:ee,slice:te,each:E,map:y,pluck:z,isList:x,isFunction:ne,isObject:ae,Global:ce};function se(){return Object.assign?Object.assign:function(ge,Se,ve,be){for(var xe=1;xe<arguments.length;xe++)E(Object(arguments[xe]),function(pe,me){ge[me]=pe});return ge}}function re(){if(Object.create)return function(Se,ve,be,xe){var pe=te(arguments,1);return de.apply(this,[Object.create(Se)].concat(pe))};{let ge=function(){};var oe=ge;return function(ve,be,xe,pe){var me=te(arguments,1);return ge.prototype=ve,de.apply(this,[new ge].concat(me))}}}function ue(){return String.prototype.trim?function(ge){return String.prototype.trim.call(ge)}:function(ge){return ge.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ee(oe,ge){return function(){return ge.apply(oe,Array.prototype.slice.call(arguments,0))}}function te(oe,ge){return Array.prototype.slice.call(oe,ge||0)}function E(oe,ge){z(oe,function(Se,ve){return ge(Se,ve),!1})}function y(oe,ge){var Se=x(oe)?[]:{};return z(oe,function(ve,be){return Se[be]=ge(ve,be),!1}),Se}function z(oe,ge){if(x(oe)){for(var Se=0;Se<oe.length;Se++)if(ge(oe[Se],Se))return oe[Se]}else for(var ve in oe)if(oe.hasOwnProperty(ve)&&ge(oe[ve],ve))return oe[ve]}function x(oe){return oe!=null&&typeof oe!="function"&&typeof oe.length=="number"}function ne(oe){return oe&&{}.toString.call(oe)==="[object Function]"}function ae(oe){return oe&&{}.toString.call(oe)==="[object Object]"}},97573:function(Jt,Ot,we){Jt.exports=[we(52496),we(16436),we(76673),we(35701),we(65578),we(65300)]},35701:function(Jt,Ot,we){var de=we(67039),ie=de.Global,Ee=de.trim;Jt.exports={name:"cookieStorage",read:se,write:ue,each:re,remove:ee,clearAll:te};var ce=ie.document;function se(y){if(!y||!E(y))return null;var z="(?:^|.*;\\s*)"+escape(y).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ce.cookie.replace(new RegExp(z),"$1"))}function re(y){for(var z=ce.cookie.split(/; ?/g),x=z.length-1;x>=0;x--)if(Ee(z[x])){var ne=z[x].split("="),ae=unescape(ne[0]),oe=unescape(ne[1]);y(oe,ae)}}function ue(y,z){y&&(ce.cookie=escape(y)+"="+escape(z)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ee(y){!y||!E(y)||(ce.cookie=escape(y)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function te(){re(function(y,z){ee(z)})}function E(y){return new RegExp("(?:^|;\\s*)"+escape(y).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ce.cookie)}},52496:function(Jt,Ot,we){var de=we(67039),ie=de.Global;Jt.exports={name:"localStorage",read:ce,write:se,each:re,remove:ue,clearAll:ee};function Ee(){return ie.localStorage}function ce(te){return Ee().getItem(te)}function se(te,E){return Ee().setItem(te,E)}function re(te){for(var E=Ee().length-1;E>=0;E--){var y=Ee().key(E);te(ce(y),y)}}function ue(te){return Ee().removeItem(te)}function ee(){return Ee().clear()}},65300:function(Jt){Jt.exports={name:"memoryStorage",read:we,write:de,each:ie,remove:Ee,clearAll:ce};var Ot={};function we(se){return Ot[se]}function de(se,re){Ot[se]=re}function ie(se){for(var re in Ot)Ot.hasOwnProperty(re)&&se(Ot[re],re)}function Ee(se){delete Ot[se]}function ce(se){Ot={}}},16436:function(Jt,Ot,we){var de=we(67039),ie=de.Global;Jt.exports={name:"oldFF-globalStorage",read:ce,write:se,each:re,remove:ue,clearAll:ee};var Ee=ie.globalStorage;function ce(te){return Ee[te]}function se(te,E){Ee[te]=E}function re(te){for(var E=Ee.length-1;E>=0;E--){var y=Ee.key(E);te(Ee[y],y)}}function ue(te){return Ee.removeItem(te)}function ee(){re(function(te,E){delete Ee[te]})}},76673:function(Jt,Ot,we){var de=we(67039),ie=de.Global;Jt.exports={name:"oldIE-userDataStorage",write:ue,read:ee,each:te,remove:E,clearAll:y};var Ee="storejs",ce=ie.document,se=ne(),re=(ie.navigator?ie.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function ue(ae,oe){if(!re){var ge=x(ae);se(function(Se){Se.setAttribute(ge,oe),Se.save(Ee)})}}function ee(ae){if(!re){var oe=x(ae),ge=null;return se(function(Se){ge=Se.getAttribute(oe)}),ge}}function te(ae){se(function(oe){for(var ge=oe.XMLDocument.documentElement.attributes,Se=ge.length-1;Se>=0;Se--){var ve=ge[Se];ae(oe.getAttribute(ve.name),ve.name)}})}function E(ae){var oe=x(ae);se(function(ge){ge.removeAttribute(oe),ge.save(Ee)})}function y(){se(function(ae){var oe=ae.XMLDocument.documentElement.attributes;ae.load(Ee);for(var ge=oe.length-1;ge>=0;ge--)ae.removeAttribute(oe[ge].name);ae.save(Ee)})}var z=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function x(ae){return ae.replace(/^\d/,"___$&").replace(z,"___")}function ne(){if(!ce||!ce.documentElement||!ce.documentElement.addBehavior)return null;var ae="script",oe,ge,Se;try{ge=new ActiveXObject("htmlfile"),ge.open(),ge.write("<"+ae+">document.w=window</"+ae+'><iframe src="/favicon.ico"></iframe>'),ge.close(),oe=ge.w.frames[0].document,Se=oe.createElement("div")}catch(ve){Se=ce.createElement("div"),oe=ce.body}return function(ve){var be=[].slice.call(arguments,0);be.unshift(Se),oe.appendChild(Se),Se.addBehavior("#default#userData"),Se.load(Ee),ve.apply(this,be),oe.removeChild(Se)}}},65578:function(Jt,Ot,we){var de=we(67039),ie=de.Global;Jt.exports={name:"sessionStorage",read:ce,write:se,each:re,remove:ue,clearAll:ee};function Ee(){return ie.sessionStorage}function ce(te){return Ee().getItem(te)}function se(te,E){return Ee().setItem(te,E)}function re(te){for(var E=Ee().length-1;E>=0;E--){var y=Ee().key(E);te(ce(y),y)}}function ue(te){return Ee().removeItem(te)}function ee(){return Ee().clear()}},82059:function(Jt){var Ot=arguments[3],we=arguments[4],de=arguments[5],ie=JSON.stringify;Jt.exports=function(Ee,ce){for(var se,re=Object.keys(de),ue=0,ee=re.length;ue<ee;ue++){var te=re[ue],E=de[te].exports;if(E===Ee||E&&E.default===Ee){se=te;break}}if(!se){se=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var y={},ue=0,ee=re.length;ue<ee;ue++){var te=re[ue];y[te]=te}we[se]=["function(require,module,exports){"+Ee+"(self); }",y]}var z=Math.floor(Math.pow(16,8)*Math.random()).toString(16),x={};x[se]=se,we[z]=["function(require,module,exports){var f = require("+ie(se)+");(f.default ? f.default : f)(self);}",x];var ne={};ae(z);function ae(xe){ne[xe]=!0;for(var pe in we[xe][1]){var me=we[xe][1][pe];ne[me]||ae(me)}}var oe="("+Ot+")({"+Object.keys(ne).map(function(xe){return ie(xe)+":["+we[xe][0]+","+ie(we[xe][1])+"]"}).join(",")+"},{},["+ie(z)+"])",ge=window.URL||window.webkitURL||window.mozURL||window.msURL,Se=new Blob([oe],{type:"text/javascript"});if(ce&&ce.bare)return Se;var ve=ge.createObjectURL(Se),be=new Worker(ve);return be.objectURL=ve,be}},34376:function(Jt){(function(Ot,we){if(1)Jt.exports=we();else var de,ie})(window,function(){return function(Ot){var we={};function de(ie){if(we[ie])return we[ie].exports;var Ee=we[ie]={i:ie,l:!1,exports:{}};return Ot[ie].call(Ee.exports,Ee,Ee.exports,de),Ee.l=!0,Ee.exports}return de.m=Ot,de.c=we,de.d=function(ie,Ee,ce){de.o(ie,Ee)||Object.defineProperty(ie,Ee,{enumerable:!0,get:ce})},de.r=function(ie){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ie,"__esModule",{value:!0})},de.t=function(ie,Ee){if(1&Ee&&(ie=de(ie)),8&Ee||4&Ee&&typeof ie=="object"&&ie&&ie.__esModule)return ie;var ce=Object.create(null);if(de.r(ce),Object.defineProperty(ce,"default",{enumerable:!0,value:ie}),2&Ee&&typeof ie!="string")for(var se in ie)de.d(ce,se,function(re){return ie[re]}.bind(null,se));return ce},de.n=function(ie){var Ee=ie&&ie.__esModule?function(){return ie.default}:function(){return ie};return de.d(Ee,"a",Ee),Ee},de.o=function(ie,Ee){return Object.prototype.hasOwnProperty.call(ie,Ee)},de.p="",de(de.s=34)}([function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.forwardEvent=we.EventEmitter=void 0;var ie=function(){function Ee(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Ee.prototype,"event",{get:function(){var ce=this;return this._event||(this._event=function(se){return ce._listeners.push(se),{dispose:function(){if(!ce._disposed){for(var re=0;re<ce._listeners.length;re++)if(ce._listeners[re]===se)return void ce._listeners.splice(re,1)}}}}),this._event},enumerable:!1,configurable:!0}),Ee.prototype.fire=function(ce,se){for(var re=[],ue=0;ue<this._listeners.length;ue++)re.push(this._listeners[ue]);for(ue=0;ue<re.length;ue++)re[ue].call(void 0,ce,se)},Ee.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Ee}();we.EventEmitter=ie,we.forwardEvent=function(Ee,ce){return Ee(function(se){return ce.fire(se)})}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.IUnicodeService=we.IOptionsService=we.ILogService=we.IInstantiationService=we.IDirtyRowService=we.ICharsetService=we.ICoreService=we.ICoreMouseService=we.IBufferService=void 0;var ie=de(14);we.IBufferService=ie.createDecorator("BufferService"),we.ICoreMouseService=ie.createDecorator("CoreMouseService"),we.ICoreService=ie.createDecorator("CoreService"),we.ICharsetService=ie.createDecorator("CharsetService"),we.IDirtyRowService=ie.createDecorator("DirtyRowService"),we.IInstantiationService=ie.createDecorator("InstantiationService"),we.ILogService=ie.createDecorator("LogService"),we.IOptionsService=ie.createDecorator("OptionsService"),we.IUnicodeService=ie.createDecorator("UnicodeService")},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.getDisposeArrayDisposable=we.disposeArray=we.Disposable=void 0;var ie=function(){function ce(){this._disposables=[],this._isDisposed=!1}return ce.prototype.dispose=function(){this._isDisposed=!0;for(var se=0,re=this._disposables;se<re.length;se++)re[se].dispose();this._disposables.length=0},ce.prototype.register=function(se){return this._disposables.push(se),se},ce.prototype.unregister=function(se){var re=this._disposables.indexOf(se);re!==-1&&this._disposables.splice(re,1)},ce}();function Ee(ce){for(var se=0,re=ce;se<re.length;se++)re[se].dispose();ce.length=0}we.Disposable=ie,we.disposeArray=Ee,we.getDisposeArrayDisposable=function(ce){return{dispose:function(){return Ee(ce)}}}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.WHITESPACE_CELL_CODE=we.WHITESPACE_CELL_WIDTH=we.WHITESPACE_CELL_CHAR=we.NULL_CELL_CODE=we.NULL_CELL_WIDTH=we.NULL_CELL_CHAR=we.CHAR_DATA_CODE_INDEX=we.CHAR_DATA_WIDTH_INDEX=we.CHAR_DATA_CHAR_INDEX=we.CHAR_DATA_ATTR_INDEX=we.DEFAULT_ATTR=we.DEFAULT_COLOR=void 0,we.DEFAULT_COLOR=256,we.DEFAULT_ATTR=256|we.DEFAULT_COLOR<<9,we.CHAR_DATA_ATTR_INDEX=0,we.CHAR_DATA_CHAR_INDEX=1,we.CHAR_DATA_WIDTH_INDEX=2,we.CHAR_DATA_CODE_INDEX=3,we.NULL_CELL_CHAR="",we.NULL_CELL_WIDTH=1,we.NULL_CELL_CODE=0,we.WHITESPACE_CELL_CHAR=" ",we.WHITESPACE_CELL_WIDTH=1,we.WHITESPACE_CELL_CODE=32},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ee,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,y){E.__proto__=y}||function(E,y){for(var z in y)y.hasOwnProperty(z)&&(E[z]=y[z])})(ee,te)},function(ee,te){function E(){this.constructor=ee}ie(ee,te),ee.prototype=te===null?Object.create(te):(E.prototype=te.prototype,new E)});Object.defineProperty(we,"__esModule",{value:!0}),we.CellData=void 0;var ce=de(8),se=de(3),re=de(6),ue=function(ee){function te(){var E=ee!==null&&ee.apply(this,arguments)||this;return E.content=0,E.fg=0,E.bg=0,E.extended=new re.ExtendedAttrs,E.combinedData="",E}return Ee(te,ee),te.fromCharData=function(E){var y=new te;return y.setFromCharData(E),y},te.prototype.isCombined=function(){return 2097152&this.content},te.prototype.getWidth=function(){return this.content>>22},te.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?ce.stringFromCodePoint(2097151&this.content):""},te.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},te.prototype.setFromCharData=function(E){this.fg=E[se.CHAR_DATA_ATTR_INDEX],this.bg=0;var y=!1;if(E[se.CHAR_DATA_CHAR_INDEX].length>2)y=!0;else if(E[se.CHAR_DATA_CHAR_INDEX].length===2){var z=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=z&&z<=56319){var x=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=x&&x<=57343?this.content=1024*(z-55296)+x-56320+65536|E[se.CHAR_DATA_WIDTH_INDEX]<<22:y=!0}else y=!0}else this.content=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[se.CHAR_DATA_WIDTH_INDEX]<<22;y&&(this.combinedData=E[se.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[se.CHAR_DATA_WIDTH_INDEX]<<22)},te.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},te}(re.AttributeData);we.CellData=ue},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.ISoundService=we.ISelectionService=we.IRenderService=we.IMouseService=we.ICoreBrowserService=we.ICharSizeService=void 0;var ie=de(14);we.ICharSizeService=ie.createDecorator("CharSizeService"),we.ICoreBrowserService=ie.createDecorator("CoreBrowserService"),we.IMouseService=ie.createDecorator("MouseService"),we.IRenderService=ie.createDecorator("RenderService"),we.ISelectionService=ie.createDecorator("SelectionService"),we.ISoundService=ie.createDecorator("SoundService")},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.ExtendedAttrs=we.AttributeData=void 0;var ie=function(){function ce(){this.fg=0,this.bg=0,this.extended=new Ee}return ce.toColorRGB=function(se){return[se>>>16&255,se>>>8&255,255&se]},ce.fromColorRGB=function(se){return(255&se[0])<<16|(255&se[1])<<8|255&se[2]},ce.prototype.clone=function(){var se=new ce;return se.fg=this.fg,se.bg=this.bg,se.extended=this.extended.clone(),se},ce.prototype.isInverse=function(){return 67108864&this.fg},ce.prototype.isBold=function(){return 134217728&this.fg},ce.prototype.isUnderline=function(){return 268435456&this.fg},ce.prototype.isBlink=function(){return 536870912&this.fg},ce.prototype.isInvisible=function(){return 1073741824&this.fg},ce.prototype.isItalic=function(){return 67108864&this.bg},ce.prototype.isDim=function(){return 134217728&this.bg},ce.prototype.getFgColorMode=function(){return 50331648&this.fg},ce.prototype.getBgColorMode=function(){return 50331648&this.bg},ce.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},ce.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},ce.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},ce.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},ce.prototype.isFgDefault=function(){return(50331648&this.fg)==0},ce.prototype.isBgDefault=function(){return(50331648&this.bg)==0},ce.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},ce.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},ce.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},ce.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},ce.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},ce.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},ce.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},ce.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},ce.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},ce.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},ce.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},ce}();we.AttributeData=ie;var Ee=function(){function ce(se,re){se===void 0&&(se=0),re===void 0&&(re=-1),this.underlineStyle=se,this.underlineColor=re}return ce.prototype.clone=function(){return new ce(this.underlineStyle,this.underlineColor)},ce.prototype.isEmpty=function(){return this.underlineStyle===0},ce}();we.ExtendedAttrs=Ee},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.addDisposableDomListener=void 0,we.addDisposableDomListener=function(ie,Ee,ce,se){ie.addEventListener(Ee,ce,se);var re=!1;return{dispose:function(){re||(re=!0,ie.removeEventListener(Ee,ce,se))}}}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.Utf8ToUtf32=we.StringToUtf32=we.utf32ToString=we.stringFromCodePoint=void 0,we.stringFromCodePoint=function(ce){return ce>65535?(ce-=65536,String.fromCharCode(55296+(ce>>10))+String.fromCharCode(ce%1024+56320)):String.fromCharCode(ce)},we.utf32ToString=function(ce,se,re){se===void 0&&(se=0),re===void 0&&(re=ce.length);for(var ue="",ee=se;ee<re;++ee){var te=ce[ee];te>65535?(te-=65536,ue+=String.fromCharCode(55296+(te>>10))+String.fromCharCode(te%1024+56320)):ue+=String.fromCharCode(te)}return ue};var ie=function(){function ce(){this._interim=0}return ce.prototype.clear=function(){this._interim=0},ce.prototype.decode=function(se,re){var ue=se.length;if(!ue)return 0;var ee=0,te=0;this._interim&&(56320<=(z=se.charCodeAt(te++))&&z<=57343?re[ee++]=1024*(this._interim-55296)+z-56320+65536:(re[ee++]=this._interim,re[ee++]=z),this._interim=0);for(var E=te;E<ue;++E){var y=se.charCodeAt(E);if(55296<=y&&y<=56319){if(++E>=ue)return this._interim=y,ee;var z;56320<=(z=se.charCodeAt(E))&&z<=57343?re[ee++]=1024*(y-55296)+z-56320+65536:(re[ee++]=y,re[ee++]=z)}else re[ee++]=y}return ee},ce}();we.StringToUtf32=ie;var Ee=function(){function ce(){this.interim=new Uint8Array(3)}return ce.prototype.clear=function(){this.interim.fill(0)},ce.prototype.decode=function(se,re){var ue=se.length;if(!ue)return 0;var ee,te,E,y,z=0,x=0,ne=0;if(this.interim[0]){var ae=!1,oe=this.interim[0];oe&=(224&oe)==192?31:(240&oe)==224?15:7;for(var ge=0,Se=void 0;(Se=63&this.interim[++ge])&&ge<4;)oe<<=6,oe|=Se;for(var ve=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,be=ve-ge;ne<be;){if(ne>=ue)return 0;if((192&(Se=se[ne++]))!=128){ne--,ae=!0;break}this.interim[ge++]=Se,oe<<=6,oe|=63&Se}ae||(ve===2?oe<128?ne--:re[z++]=oe:ve===3?oe<2048||oe>=55296&&oe<=57343||(re[z++]=oe):oe<65536||oe>1114111||(re[z++]=oe)),this.interim.fill(0)}for(var xe=ue-4,pe=ne;pe<ue;){for(;!(!(pe<xe)||128&(ee=se[pe])||128&(te=se[pe+1])||128&(E=se[pe+2])||128&(y=se[pe+3]));)re[z++]=ee,re[z++]=te,re[z++]=E,re[z++]=y,pe+=4;if((ee=se[pe++])<128)re[z++]=ee;else if((224&ee)==192){if(pe>=ue)return this.interim[0]=ee,z;if((192&(te=se[pe++]))!=128){pe--;continue}if((x=(31&ee)<<6|63&te)<128){pe--;continue}re[z++]=x}else if((240&ee)==224){if(pe>=ue)return this.interim[0]=ee,z;if((192&(te=se[pe++]))!=128){pe--;continue}if(pe>=ue)return this.interim[0]=ee,this.interim[1]=te,z;if((192&(E=se[pe++]))!=128){pe--;continue}if((x=(15&ee)<<12|(63&te)<<6|63&E)<2048||x>=55296&&x<=57343)continue;re[z++]=x}else if((248&ee)==240){if(pe>=ue)return this.interim[0]=ee,z;if((192&(te=se[pe++]))!=128){pe--;continue}if(pe>=ue)return this.interim[0]=ee,this.interim[1]=te,z;if((192&(E=se[pe++]))!=128){pe--;continue}if(pe>=ue)return this.interim[0]=ee,this.interim[1]=te,this.interim[2]=E,z;if((192&(y=se[pe++]))!=128){pe--;continue}if((x=(7&ee)<<18|(63&te)<<12|(63&E)<<6|63&y)<65536||x>1114111)continue;re[z++]=x}}return z},ce}();we.Utf8ToUtf32=Ee},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.CHAR_ATLAS_CELL_SPACING=we.DIM_OPACITY=we.INVERTED_DEFAULT_COLOR=void 0,we.INVERTED_DEFAULT_COLOR=257,we.DIM_OPACITY=.5,we.CHAR_ATLAS_CELL_SPACING=1},function(Ot,we,de){"use strict";var ie,Ee,ce,se;function re(ee){var te=ee.toString(16);return te.length<2?"0"+te:te}function ue(ee,te){return ee<te?(te+.05)/(ee+.05):(ee+.05)/(te+.05)}Object.defineProperty(we,"__esModule",{value:!0}),we.contrastRatio=we.toPaddedHex=we.rgba=we.rgb=we.css=we.color=we.channels=void 0,function(ee){ee.toCss=function(te,E,y,z){return z!==void 0?"#"+re(te)+re(E)+re(y)+re(z):"#"+re(te)+re(E)+re(y)},ee.toRgba=function(te,E,y,z){return z===void 0&&(z=255),(te<<24|E<<16|y<<8|z)>>>0}}(ie=we.channels||(we.channels={})),(Ee=we.color||(we.color={})).blend=function(ee,te){var E=(255&te.rgba)/255;if(E===1)return{css:te.css,rgba:te.rgba};var y=te.rgba>>24&255,z=te.rgba>>16&255,x=te.rgba>>8&255,ne=ee.rgba>>24&255,ae=ee.rgba>>16&255,oe=ee.rgba>>8&255,ge=ne+Math.round((y-ne)*E),Se=ae+Math.round((z-ae)*E),ve=oe+Math.round((x-oe)*E);return{css:ie.toCss(ge,Se,ve),rgba:ie.toRgba(ge,Se,ve)}},Ee.isOpaque=function(ee){return(255&ee.rgba)==255},Ee.ensureContrastRatio=function(ee,te,E){var y=se.ensureContrastRatio(ee.rgba,te.rgba,E);if(y)return se.toColor(y>>24&255,y>>16&255,y>>8&255)},Ee.opaque=function(ee){var te=(255|ee.rgba)>>>0,E=se.toChannels(te),y=E[0],z=E[1],x=E[2];return{css:ie.toCss(y,z,x),rgba:te}},Ee.opacity=function(ee,te){var E=Math.round(255*te),y=se.toChannels(ee.rgba),z=y[0],x=y[1],ne=y[2];return{css:ie.toCss(z,x,ne,E),rgba:ie.toRgba(z,x,ne,E)}},(we.css||(we.css={})).toColor=function(ee){switch(ee.length){case 7:return{css:ee,rgba:(parseInt(ee.slice(1),16)<<8|255)>>>0};case 9:return{css:ee,rgba:parseInt(ee.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ee){function te(E,y,z){var x=E/255,ne=y/255,ae=z/255;return .2126*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.7152*(ne<=.03928?ne/12.92:Math.pow((ne+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:Math.pow((ae+.055)/1.055,2.4))}ee.relativeLuminance=function(E){return te(E>>16&255,E>>8&255,255&E)},ee.relativeLuminance2=te}(ce=we.rgb||(we.rgb={})),function(ee){function te(y,z,x){for(var ne=y>>24&255,ae=y>>16&255,oe=y>>8&255,ge=z>>24&255,Se=z>>16&255,ve=z>>8&255,be=ue(ce.relativeLuminance2(ge,ve,Se),ce.relativeLuminance2(ne,ae,oe));be<x&&(ge>0||Se>0||ve>0);)ge-=Math.max(0,Math.ceil(.1*ge)),Se-=Math.max(0,Math.ceil(.1*Se)),ve-=Math.max(0,Math.ceil(.1*ve)),be=ue(ce.relativeLuminance2(ge,ve,Se),ce.relativeLuminance2(ne,ae,oe));return(ge<<24|Se<<16|ve<<8|255)>>>0}function E(y,z,x){for(var ne=y>>24&255,ae=y>>16&255,oe=y>>8&255,ge=z>>24&255,Se=z>>16&255,ve=z>>8&255,be=ue(ce.relativeLuminance2(ge,ve,Se),ce.relativeLuminance2(ne,ae,oe));be<x&&(ge<255||Se<255||ve<255);)ge=Math.min(255,ge+Math.ceil(.1*(255-ge))),Se=Math.min(255,Se+Math.ceil(.1*(255-Se))),ve=Math.min(255,ve+Math.ceil(.1*(255-ve))),be=ue(ce.relativeLuminance2(ge,ve,Se),ce.relativeLuminance2(ne,ae,oe));return(ge<<24|Se<<16|ve<<8|255)>>>0}ee.ensureContrastRatio=function(y,z,x){var ne=ce.relativeLuminance(y>>8),ae=ce.relativeLuminance(z>>8);if(ue(ne,ae)<x)return ae<ne?te(y,z,x):E(y,z,x)},ee.reduceLuminance=te,ee.increaseLuminance=E,ee.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]},ee.toColor=function(y,z,x){return{css:ie.toCss(y,z,x),rgba:ie.toRgba(y,z,x)}}}(se=we.rgba||(we.rgba={})),we.toPaddedHex=re,we.contrastRatio=ue},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.isLinux=we.isWindows=we.isIphone=we.isIpad=we.isMac=we.isSafari=we.isFirefox=void 0;var ie=typeof navigator=="undefined",Ee=ie?"node":navigator.userAgent,ce=ie?"node":navigator.platform;function se(re,ue){return re.indexOf(ue)>=0}we.isFirefox=!!~Ee.indexOf("Firefox"),we.isSafari=/^((?!chrome|android).)*safari/i.test(Ee),we.isMac=se(["Macintosh","MacIntel","MacPPC","Mac68K"],ce),we.isIpad=ce==="iPad",we.isIphone=ce==="iPhone",we.isWindows=se(["Windows","Win16","Win32","WinCE"],ce),we.isLinux=ce.indexOf("Linux")>=0},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.C1=we.C0=void 0,function(ie){ie.NUL="\0",ie.SOH="",ie.STX="",ie.ETX="",ie.EOT="",ie.ENQ="",ie.ACK="",ie.BEL="\x07",ie.BS="\b",ie.HT=" ",ie.LF=`
`,ie.VT="\v",ie.FF="\f",ie.CR="\r",ie.SO="",ie.SI="",ie.DLE="",ie.DC1="",ie.DC2="",ie.DC3="",ie.DC4="",ie.NAK="",ie.SYN="",ie.ETB="",ie.CAN="",ie.EM="",ie.SUB="",ie.ESC="\x1B",ie.FS="",ie.GS="",ie.RS="",ie.US="",ie.SP=" ",ie.DEL="\x7F"}(we.C0||(we.C0={})),function(ie){ie.PAD="\x80",ie.HOP="\x81",ie.BPH="\x82",ie.NBH="\x83",ie.IND="\x84",ie.NEL="\x85",ie.SSA="\x86",ie.ESA="\x87",ie.HTS="\x88",ie.HTJ="\x89",ie.VTS="\x8A",ie.PLD="\x8B",ie.PLU="\x8C",ie.RI="\x8D",ie.SS2="\x8E",ie.SS3="\x8F",ie.DCS="\x90",ie.PU1="\x91",ie.PU2="\x92",ie.STS="\x93",ie.CCH="\x94",ie.MW="\x95",ie.SPA="\x96",ie.EPA="\x97",ie.SOS="\x98",ie.SGCI="\x99",ie.SCI="\x9A",ie.CSI="\x9B",ie.ST="\x9C",ie.OSC="\x9D",ie.PM="\x9E",ie.APC="\x9F"}(we.C1||(we.C1={}))},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.BaseRenderLayer=void 0;var ie=de(3),Ee=de(9),ce=de(25),se=de(6),re=de(28),ue=de(10),ee=de(17),te=function(){function E(y,z,x,ne,ae,oe,ge,Se){this._container=y,this._alpha=ne,this._colors=ae,this._rendererId=oe,this._bufferService=ge,this._optionsService=Se,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+z+"-layer"),this._canvas.style.zIndex=x.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return E.prototype.dispose=function(){var y;ee.removeElementFromParent(this._canvas),(y=this._charAtlas)===null||y===void 0||y.dispose()},E.prototype._initCanvas=function(){this._ctx=re.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},E.prototype.onOptionsChanged=function(){},E.prototype.onBlur=function(){},E.prototype.onFocus=function(){},E.prototype.onCursorMove=function(){},E.prototype.onGridChanged=function(y,z){},E.prototype.onSelectionChanged=function(y,z,x){x===void 0&&(x=!1)},E.prototype.setColors=function(y){this._refreshCharAtlas(y)},E.prototype._setTransparency=function(y){if(y!==this._alpha){var z=this._canvas;this._alpha=y,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,z),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},E.prototype._refreshCharAtlas=function(y){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=ce.acquireCharAtlas(this._optionsService.options,this._rendererId,y,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},E.prototype.resize=function(y){this._scaledCellWidth=y.scaledCellWidth,this._scaledCellHeight=y.scaledCellHeight,this._scaledCharWidth=y.scaledCharWidth,this._scaledCharHeight=y.scaledCharHeight,this._scaledCharLeft=y.scaledCharLeft,this._scaledCharTop=y.scaledCharTop,this._canvas.width=y.scaledCanvasWidth,this._canvas.height=y.scaledCanvasHeight,this._canvas.style.width=y.canvasWidth+"px",this._canvas.style.height=y.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},E.prototype._fillCells=function(y,z,x,ne){this._ctx.fillRect(y*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,ne*this._scaledCellHeight)},E.prototype._fillBottomLineAtCells=function(y,z,x){x===void 0&&(x=1),this._ctx.fillRect(y*this._scaledCellWidth,(z+1)*this._scaledCellHeight-window.devicePixelRatio-1,x*this._scaledCellWidth,window.devicePixelRatio)},E.prototype._fillLeftLineAtCell=function(y,z,x){this._ctx.fillRect(y*this._scaledCellWidth,z*this._scaledCellHeight,window.devicePixelRatio*x,this._scaledCellHeight)},E.prototype._strokeRectAtCell=function(y,z,x,ne){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(y*this._scaledCellWidth+window.devicePixelRatio/2,z*this._scaledCellHeight+window.devicePixelRatio/2,x*this._scaledCellWidth-window.devicePixelRatio,ne*this._scaledCellHeight-window.devicePixelRatio)},E.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},E.prototype._clearCells=function(y,z,x,ne){this._alpha?this._ctx.clearRect(y*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,ne*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(y*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,ne*this._scaledCellHeight))},E.prototype._fillCharTrueColor=function(y,z,x){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(x),this._ctx.fillText(y.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},E.prototype._drawChars=function(y,z,x){var ne,ae,oe=this._getContrastColor(y);oe||y.isFgRGB()||y.isBgRGB()?this._drawUncachedChars(y,z,x,oe):(y.isInverse()?(ne=y.isBgDefault()?Ee.INVERTED_DEFAULT_COLOR:y.getBgColor(),ae=y.isFgDefault()?Ee.INVERTED_DEFAULT_COLOR:y.getFgColor()):(ae=y.isBgDefault()?ie.DEFAULT_COLOR:y.getBgColor(),ne=y.isFgDefault()?ie.DEFAULT_COLOR:y.getFgColor()),ne+=this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&ne<8?8:0,this._currentGlyphIdentifier.chars=y.getChars()||ie.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=y.getCode()||ie.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ae,this._currentGlyphIdentifier.fg=ne,this._currentGlyphIdentifier.bold=!!y.isBold(),this._currentGlyphIdentifier.dim=!!y.isDim(),this._currentGlyphIdentifier.italic=!!y.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(y,z,x))},E.prototype._drawUncachedChars=function(y,z,x,ne){if(this._ctx.save(),this._ctx.font=this._getFont(!!y.isBold(),!!y.isItalic()),this._ctx.textBaseline="middle",y.isInverse())if(ne)this._ctx.fillStyle=ne.css;else if(y.isBgDefault())this._ctx.fillStyle=ue.color.opaque(this._colors.background).css;else if(y.isBgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(y.getBgColor()).join(",")+")";else{var ae=y.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&ae<8&&(ae+=8),this._ctx.fillStyle=this._colors.ansi[ae].css}else if(ne)this._ctx.fillStyle=ne.css;else if(y.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(y.isFgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(y.getFgColor()).join(",")+")";else{var oe=y.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&y.isBold()&&oe<8&&(oe+=8),this._ctx.fillStyle=this._colors.ansi[oe].css}this._clipRow(x),y.isDim()&&(this._ctx.globalAlpha=Ee.DIM_OPACITY),this._ctx.fillText(y.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},E.prototype._clipRow=function(y){this._ctx.beginPath(),this._ctx.rect(0,y*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},E.prototype._getFont=function(y,z){return(z?"italic":"")+" "+(y?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},E.prototype._getContrastColor=function(y){if(this._optionsService.options.minimumContrastRatio!==1){var z=this._colors.contrastCache.getColor(y.bg,y.fg);if(z!==void 0)return z||void 0;var x=y.getFgColor(),ne=y.getFgColorMode(),ae=y.getBgColor(),oe=y.getBgColorMode(),ge=!!y.isInverse(),Se=!!y.isInverse();if(ge){var ve=x;x=ae,ae=ve;var be=ne;ne=oe,oe=be}var xe=this._resolveBackgroundRgba(oe,ae,ge),pe=this._resolveForegroundRgba(ne,x,ge,Se),me=ue.rgba.ensureContrastRatio(xe,pe,this._optionsService.options.minimumContrastRatio);if(me){var Ae={css:ue.channels.toCss(me>>24&255,me>>16&255,me>>8&255),rgba:me};return this._colors.contrastCache.setColor(y.bg,y.fg,Ae),Ae}this._colors.contrastCache.setColor(y.bg,y.fg,null)}},E.prototype._resolveBackgroundRgba=function(y,z,x){switch(y){case 16777216:case 33554432:return this._colors.ansi[z].rgba;case 50331648:return z<<8;case 0:default:return x?this._colors.foreground.rgba:this._colors.background.rgba}},E.prototype._resolveForegroundRgba=function(y,z,x,ne){switch(y){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&ne&&z<8&&(z+=8),this._colors.ansi[z].rgba;case 50331648:return z<<8;case 0:default:return x?this._colors.background.rgba:this._colors.foreground.rgba}},E}();we.BaseRenderLayer=te},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.createDecorator=we.getServiceDependencies=we.serviceRegistry=void 0;function ie(Ee,ce,se){ce.di$target===ce?ce.di$dependencies.push({id:Ee,index:se}):(ce.di$dependencies=[{id:Ee,index:se}],ce.di$target=ce)}we.serviceRegistry=new Map,we.getServiceDependencies=function(Ee){return Ee.di$dependencies||[]},we.createDecorator=function(Ee){if(we.serviceRegistry.has(Ee))return we.serviceRegistry.get(Ee);var ce=function(se,re,ue){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ie(ce,se,ue)};return ce.toString=function(){return Ee},we.serviceRegistry.set(Ee,ce),ce}},function(Ot,we,de){"use strict";function ie(Ee,ce,se,re){if(se===void 0&&(se=0),re===void 0&&(re=Ee.length),se>=Ee.length)return Ee;se=(Ee.length+se)%Ee.length,re=re>=Ee.length?Ee.length:(Ee.length+re)%Ee.length;for(var ue=se;ue<re;++ue)Ee[ue]=ce;return Ee}Object.defineProperty(we,"__esModule",{value:!0}),we.concat=we.fillFallback=we.fill=void 0,we.fill=function(Ee,ce,se,re){return Ee.fill?Ee.fill(ce,se,re):ie(Ee,ce,se,re)},we.fillFallback=ie,we.concat=function(Ee,ce){var se=new Ee.constructor(Ee.length+ce.length);return se.set(Ee),se.set(ce,Ee.length),se}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.BufferLine=we.DEFAULT_ATTR_DATA=void 0;var ie=de(8),Ee=de(3),ce=de(4),se=de(6);we.DEFAULT_ATTR_DATA=Object.freeze(new se.AttributeData);var re=function(){function ue(ee,te,E){E===void 0&&(E=!1),this.isWrapped=E,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ee);for(var y=te||ce.CellData.fromCharData([0,Ee.NULL_CELL_CHAR,Ee.NULL_CELL_WIDTH,Ee.NULL_CELL_CODE]),z=0;z<ee;++z)this.setCell(z,y);this.length=ee}return ue.prototype.get=function(ee){var te=this._data[3*ee+0],E=2097151&te;return[this._data[3*ee+1],2097152&te?this._combined[ee]:E?ie.stringFromCodePoint(E):"",te>>22,2097152&te?this._combined[ee].charCodeAt(this._combined[ee].length-1):E]},ue.prototype.set=function(ee,te){this._data[3*ee+1]=te[Ee.CHAR_DATA_ATTR_INDEX],te[Ee.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ee]=te[1],this._data[3*ee+0]=2097152|ee|te[Ee.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ee+0]=te[Ee.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|te[Ee.CHAR_DATA_WIDTH_INDEX]<<22},ue.prototype.getWidth=function(ee){return this._data[3*ee+0]>>22},ue.prototype.hasWidth=function(ee){return 12582912&this._data[3*ee+0]},ue.prototype.getFg=function(ee){return this._data[3*ee+1]},ue.prototype.getBg=function(ee){return this._data[3*ee+2]},ue.prototype.hasContent=function(ee){return 4194303&this._data[3*ee+0]},ue.prototype.getCodePoint=function(ee){var te=this._data[3*ee+0];return 2097152&te?this._combined[ee].charCodeAt(this._combined[ee].length-1):2097151&te},ue.prototype.isCombined=function(ee){return 2097152&this._data[3*ee+0]},ue.prototype.getString=function(ee){var te=this._data[3*ee+0];return 2097152&te?this._combined[ee]:2097151&te?ie.stringFromCodePoint(2097151&te):""},ue.prototype.loadCell=function(ee,te){var E=3*ee;return te.content=this._data[E+0],te.fg=this._data[E+1],te.bg=this._data[E+2],2097152&te.content&&(te.combinedData=this._combined[ee]),268435456&te.bg&&(te.extended=this._extendedAttrs[ee]),te},ue.prototype.setCell=function(ee,te){2097152&te.content&&(this._combined[ee]=te.combinedData),268435456&te.bg&&(this._extendedAttrs[ee]=te.extended),this._data[3*ee+0]=te.content,this._data[3*ee+1]=te.fg,this._data[3*ee+2]=te.bg},ue.prototype.setCellFromCodePoint=function(ee,te,E,y,z,x){268435456&z&&(this._extendedAttrs[ee]=x),this._data[3*ee+0]=te|E<<22,this._data[3*ee+1]=y,this._data[3*ee+2]=z},ue.prototype.addCodepointToCell=function(ee,te){var E=this._data[3*ee+0];2097152&E?this._combined[ee]+=ie.stringFromCodePoint(te):(2097151&E?(this._combined[ee]=ie.stringFromCodePoint(2097151&E)+ie.stringFromCodePoint(te),E&=-2097152,E|=2097152):E=te|1<<22,this._data[3*ee+0]=E)},ue.prototype.insertCells=function(ee,te,E,y){if((ee%=this.length)&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs),te<this.length-ee){for(var z=new ce.CellData,x=this.length-ee-te-1;x>=0;--x)this.setCell(ee+te+x,this.loadCell(ee+x,z));for(x=0;x<te;++x)this.setCell(ee+x,E)}else for(x=ee;x<this.length;++x)this.setCell(x,E);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs)},ue.prototype.deleteCells=function(ee,te,E,y){if(ee%=this.length,te<this.length-ee){for(var z=new ce.CellData,x=0;x<this.length-ee-te;++x)this.setCell(ee+x,this.loadCell(ee+te+x,z));for(x=this.length-te;x<this.length;++x)this.setCell(x,E)}else for(x=ee;x<this.length;++x)this.setCell(x,E);ee&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs),this.getWidth(ee)!==0||this.hasContent(ee)||this.setCellFromCodePoint(ee,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs)},ue.prototype.replaceCells=function(ee,te,E,y){for(ee&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs),te<this.length&&this.getWidth(te-1)===2&&this.setCellFromCodePoint(te,0,1,(y==null?void 0:y.fg)||0,(y==null?void 0:y.bg)||0,(y==null?void 0:y.extended)||new se.ExtendedAttrs);ee<te&&ee<this.length;)this.setCell(ee++,E)},ue.prototype.resize=function(ee,te){if(ee!==this.length){if(ee>this.length){var E=new Uint32Array(3*ee);this.length&&(3*ee<this._data.length?E.set(this._data.subarray(0,3*ee)):E.set(this._data)),this._data=E;for(var y=this.length;y<ee;++y)this.setCell(y,te)}else if(ee){(E=new Uint32Array(3*ee)).set(this._data.subarray(0,3*ee)),this._data=E;var z=Object.keys(this._combined);for(y=0;y<z.length;y++){var x=parseInt(z[y],10);x>=ee&&delete this._combined[x]}}else this._data=new Uint32Array(0),this._combined={};this.length=ee}},ue.prototype.fill=function(ee){this._combined={},this._extendedAttrs={};for(var te=0;te<this.length;++te)this.setCell(te,ee)},ue.prototype.copyFrom=function(ee){for(var te in this.length!==ee.length?this._data=new Uint32Array(ee._data):this._data.set(ee._data),this.length=ee.length,this._combined={},ee._combined)this._combined[te]=ee._combined[te];for(var te in this._extendedAttrs={},ee._extendedAttrs)this._extendedAttrs[te]=ee._extendedAttrs[te];this.isWrapped=ee.isWrapped},ue.prototype.clone=function(){var ee=new ue(0);for(var te in ee._data=new Uint32Array(this._data),ee.length=this.length,this._combined)ee._combined[te]=this._combined[te];for(var te in this._extendedAttrs)ee._extendedAttrs[te]=this._extendedAttrs[te];return ee.isWrapped=this.isWrapped,ee},ue.prototype.getTrimmedLength=function(){for(var ee=this.length-1;ee>=0;--ee)if(4194303&this._data[3*ee+0])return ee+(this._data[3*ee+0]>>22);return 0},ue.prototype.copyCellsFrom=function(ee,te,E,y,z){var x=ee._data;if(z)for(var ne=y-1;ne>=0;ne--)for(var ae=0;ae<3;ae++)this._data[3*(E+ne)+ae]=x[3*(te+ne)+ae];else for(ne=0;ne<y;ne++)for(ae=0;ae<3;ae++)this._data[3*(E+ne)+ae]=x[3*(te+ne)+ae];var oe=Object.keys(ee._combined);for(ae=0;ae<oe.length;ae++){var ge=parseInt(oe[ae],10);ge>=te&&(this._combined[ge-te+E]=ee._combined[ge])}},ue.prototype.translateToString=function(ee,te,E){ee===void 0&&(ee=!1),te===void 0&&(te=0),E===void 0&&(E=this.length),ee&&(E=Math.min(E,this.getTrimmedLength()));for(var y="";te<E;){var z=this._data[3*te+0],x=2097151&z;y+=2097152&z?this._combined[te]:x?ie.stringFromCodePoint(x):Ee.WHITESPACE_CELL_CHAR,te+=z>>22||1}return y},ue}();we.BufferLine=re},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.removeElementFromParent=void 0,we.removeElementFromParent=function(){for(var ie,Ee=[],ce=0;ce<arguments.length;ce++)Ee[ce]=arguments[ce];for(var se=0,re=Ee;se<re.length;se++){var ue=re[se];(ie=ue==null?void 0:ue.parentElement)===null||ie===void 0||ie.removeChild(ue)}}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.tooMuchOutput=we.promptLabel=void 0,we.promptLabel="Terminal input",we.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(pe,me){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ae,De){Ae.__proto__=De}||function(Ae,De){for(var ke in De)De.hasOwnProperty(ke)&&(Ae[ke]=De[ke])})(pe,me)},function(pe,me){function Ae(){this.constructor=pe}ie(pe,me),pe.prototype=me===null?Object.create(me):(Ae.prototype=me.prototype,new Ae)});Object.defineProperty(we,"__esModule",{value:!0}),we.InputHandler=we.WindowsOptionsReportType=void 0;var ce,se=de(12),re=de(20),ue=de(39),ee=de(2),te=de(15),E=de(8),y=de(16),z=de(0),x=de(3),ne=de(4),ae=de(6),oe=de(22),ge=de(24),Se={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function ve(pe,me){if(pe>24)return me.setWinLines||!1;switch(pe){case 1:return!!me.restoreWin;case 2:return!!me.minimizeWin;case 3:return!!me.setWinPosition;case 4:return!!me.setWinSizePixels;case 5:return!!me.raiseWin;case 6:return!!me.lowerWin;case 7:return!!me.refreshWin;case 8:return!!me.setWinSizeChars;case 9:return!!me.maximizeWin;case 10:return!!me.fullscreenWin;case 11:return!!me.getWinState;case 13:return!!me.getWinPosition;case 14:return!!me.getWinSizePixels;case 15:return!!me.getScreenSizePixels;case 16:return!!me.getCellSizePixels;case 18:return!!me.getWinSizeChars;case 19:return!!me.getScreenSizeChars;case 20:return!!me.getIconTitle;case 21:return!!me.getWinTitle;case 22:return!!me.pushTitle;case 23:return!!me.popTitle;case 24:return!!me.setWinLines}return!1}(function(pe){pe[pe.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",pe[pe.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(ce=we.WindowsOptionsReportType||(we.WindowsOptionsReportType={}));var be=function(){function pe(me,Ae,De,ke){this._bufferService=me,this._coreService=Ae,this._logService=De,this._optionsService=ke,this._data=new Uint32Array(0)}return pe.prototype.hook=function(me){this._data=new Uint32Array(0)},pe.prototype.put=function(me,Ae,De){this._data=te.concat(this._data,me.subarray(Ae,De))},pe.prototype.unhook=function(me){if(me){var Ae=E.utf32ToString(this._data);switch(this._data=new Uint32Array(0),Ae){case'"q':return this._coreService.triggerDataEvent(se.C0.ESC+'P1$r0"q'+se.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(se.C0.ESC+'P1$r61;1"p'+se.C0.ESC+"\\");case"r":var De=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+De+se.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r0m"+se.C0.ESC+"\\");case" q":var ke={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return ke-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+ke+" q"+se.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",Ae),this._coreService.triggerDataEvent(se.C0.ESC+"P0$r"+se.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},pe}(),xe=function(pe){function me(Ae,De,ke,Ie,Fe,Pe,qe,Ke,ot){ot===void 0&&(ot=new ue.EscapeSequenceParser);var He=pe.call(this)||this;He._bufferService=Ae,He._charsetService=De,He._coreService=ke,He._dirtyRowService=Ie,He._logService=Fe,He._optionsService=Pe,He._coreMouseService=qe,He._unicodeService=Ke,He._parser=ot,He._parseBuffer=new Uint32Array(4096),He._stringDecoder=new E.StringToUtf32,He._utf8Decoder=new E.Utf8ToUtf32,He._workCell=new ne.CellData,He._windowTitle="",He._iconName="",He._windowTitleStack=[],He._iconNameStack=[],He._curAttrData=y.DEFAULT_ATTR_DATA.clone(),He._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone(),He._onRequestBell=new z.EventEmitter,He._onRequestRefreshRows=new z.EventEmitter,He._onRequestReset=new z.EventEmitter,He._onRequestScroll=new z.EventEmitter,He._onRequestSyncScrollBar=new z.EventEmitter,He._onRequestWindowsOptionsReport=new z.EventEmitter,He._onA11yChar=new z.EventEmitter,He._onA11yTab=new z.EventEmitter,He._onCursorMove=new z.EventEmitter,He._onLineFeed=new z.EventEmitter,He._onScroll=new z.EventEmitter,He._onTitleChange=new z.EventEmitter,He.register(He._parser),He._parser.setCsiHandlerFallback(function(We,Ue){He._logService.debug("Unknown CSI code: ",{identifier:He._parser.identToString(We),params:Ue.toArray()})}),He._parser.setEscHandlerFallback(function(We){He._logService.debug("Unknown ESC code: ",{identifier:He._parser.identToString(We)})}),He._parser.setExecuteHandlerFallback(function(We){He._logService.debug("Unknown EXECUTE code: ",{code:We})}),He._parser.setOscHandlerFallback(function(We,Ue,Ze){He._logService.debug("Unknown OSC code: ",{identifier:We,action:Ue,data:Ze})}),He._parser.setDcsHandlerFallback(function(We,Ue,Ze){Ue==="HOOK"&&(Ze=Ze.toArray()),He._logService.debug("Unknown DCS code: ",{identifier:He._parser.identToString(We),action:Ue,payload:Ze})}),He._parser.setPrintHandler(function(We,Ue,Ze){return He.print(We,Ue,Ze)}),He._parser.setCsiHandler({final:"@"},function(We){return He.insertChars(We)}),He._parser.setCsiHandler({intermediates:" ",final:"@"},function(We){return He.scrollLeft(We)}),He._parser.setCsiHandler({final:"A"},function(We){return He.cursorUp(We)}),He._parser.setCsiHandler({intermediates:" ",final:"A"},function(We){return He.scrollRight(We)}),He._parser.setCsiHandler({final:"B"},function(We){return He.cursorDown(We)}),He._parser.setCsiHandler({final:"C"},function(We){return He.cursorForward(We)}),He._parser.setCsiHandler({final:"D"},function(We){return He.cursorBackward(We)}),He._parser.setCsiHandler({final:"E"},function(We){return He.cursorNextLine(We)}),He._parser.setCsiHandler({final:"F"},function(We){return He.cursorPrecedingLine(We)}),He._parser.setCsiHandler({final:"G"},function(We){return He.cursorCharAbsolute(We)}),He._parser.setCsiHandler({final:"H"},function(We){return He.cursorPosition(We)}),He._parser.setCsiHandler({final:"I"},function(We){return He.cursorForwardTab(We)}),He._parser.setCsiHandler({final:"J"},function(We){return He.eraseInDisplay(We)}),He._parser.setCsiHandler({prefix:"?",final:"J"},function(We){return He.eraseInDisplay(We)}),He._parser.setCsiHandler({final:"K"},function(We){return He.eraseInLine(We)}),He._parser.setCsiHandler({prefix:"?",final:"K"},function(We){return He.eraseInLine(We)}),He._parser.setCsiHandler({final:"L"},function(We){return He.insertLines(We)}),He._parser.setCsiHandler({final:"M"},function(We){return He.deleteLines(We)}),He._parser.setCsiHandler({final:"P"},function(We){return He.deleteChars(We)}),He._parser.setCsiHandler({final:"S"},function(We){return He.scrollUp(We)}),He._parser.setCsiHandler({final:"T"},function(We){return He.scrollDown(We)}),He._parser.setCsiHandler({final:"X"},function(We){return He.eraseChars(We)}),He._parser.setCsiHandler({final:"Z"},function(We){return He.cursorBackwardTab(We)}),He._parser.setCsiHandler({final:"`"},function(We){return He.charPosAbsolute(We)}),He._parser.setCsiHandler({final:"a"},function(We){return He.hPositionRelative(We)}),He._parser.setCsiHandler({final:"b"},function(We){return He.repeatPrecedingCharacter(We)}),He._parser.setCsiHandler({final:"c"},function(We){return He.sendDeviceAttributesPrimary(We)}),He._parser.setCsiHandler({prefix:">",final:"c"},function(We){return He.sendDeviceAttributesSecondary(We)}),He._parser.setCsiHandler({final:"d"},function(We){return He.linePosAbsolute(We)}),He._parser.setCsiHandler({final:"e"},function(We){return He.vPositionRelative(We)}),He._parser.setCsiHandler({final:"f"},function(We){return He.hVPosition(We)}),He._parser.setCsiHandler({final:"g"},function(We){return He.tabClear(We)}),He._parser.setCsiHandler({final:"h"},function(We){return He.setMode(We)}),He._parser.setCsiHandler({prefix:"?",final:"h"},function(We){return He.setModePrivate(We)}),He._parser.setCsiHandler({final:"l"},function(We){return He.resetMode(We)}),He._parser.setCsiHandler({prefix:"?",final:"l"},function(We){return He.resetModePrivate(We)}),He._parser.setCsiHandler({final:"m"},function(We){return He.charAttributes(We)}),He._parser.setCsiHandler({final:"n"},function(We){return He.deviceStatus(We)}),He._parser.setCsiHandler({prefix:"?",final:"n"},function(We){return He.deviceStatusPrivate(We)}),He._parser.setCsiHandler({intermediates:"!",final:"p"},function(We){return He.softReset(We)}),He._parser.setCsiHandler({intermediates:" ",final:"q"},function(We){return He.setCursorStyle(We)}),He._parser.setCsiHandler({final:"r"},function(We){return He.setScrollRegion(We)}),He._parser.setCsiHandler({final:"s"},function(We){return He.saveCursor(We)}),He._parser.setCsiHandler({final:"t"},function(We){return He.windowOptions(We)}),He._parser.setCsiHandler({final:"u"},function(We){return He.restoreCursor(We)}),He._parser.setCsiHandler({intermediates:"'",final:"}"},function(We){return He.insertColumns(We)}),He._parser.setCsiHandler({intermediates:"'",final:"~"},function(We){return He.deleteColumns(We)}),He._parser.setExecuteHandler(se.C0.BEL,function(){return He.bell()}),He._parser.setExecuteHandler(se.C0.LF,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.VT,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.FF,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.CR,function(){return He.carriageReturn()}),He._parser.setExecuteHandler(se.C0.BS,function(){return He.backspace()}),He._parser.setExecuteHandler(se.C0.HT,function(){return He.tab()}),He._parser.setExecuteHandler(se.C0.SO,function(){return He.shiftOut()}),He._parser.setExecuteHandler(se.C0.SI,function(){return He.shiftIn()}),He._parser.setExecuteHandler(se.C1.IND,function(){return He.index()}),He._parser.setExecuteHandler(se.C1.NEL,function(){return He.nextLine()}),He._parser.setExecuteHandler(se.C1.HTS,function(){return He.tabSet()}),He._parser.setOscHandler(0,new oe.OscHandler(function(We){He.setTitle(We),He.setIconName(We)})),He._parser.setOscHandler(1,new oe.OscHandler(function(We){return He.setIconName(We)})),He._parser.setOscHandler(2,new oe.OscHandler(function(We){return He.setTitle(We)})),He._parser.setEscHandler({final:"7"},function(){return He.saveCursor()}),He._parser.setEscHandler({final:"8"},function(){return He.restoreCursor()}),He._parser.setEscHandler({final:"D"},function(){return He.index()}),He._parser.setEscHandler({final:"E"},function(){return He.nextLine()}),He._parser.setEscHandler({final:"H"},function(){return He.tabSet()}),He._parser.setEscHandler({final:"M"},function(){return He.reverseIndex()}),He._parser.setEscHandler({final:"="},function(){return He.keypadApplicationMode()}),He._parser.setEscHandler({final:">"},function(){return He.keypadNumericMode()}),He._parser.setEscHandler({final:"c"},function(){return He.fullReset()}),He._parser.setEscHandler({final:"n"},function(){return He.setgLevel(2)}),He._parser.setEscHandler({final:"o"},function(){return He.setgLevel(3)}),He._parser.setEscHandler({final:"|"},function(){return He.setgLevel(3)}),He._parser.setEscHandler({final:"}"},function(){return He.setgLevel(2)}),He._parser.setEscHandler({final:"~"},function(){return He.setgLevel(1)}),He._parser.setEscHandler({intermediates:"%",final:"@"},function(){return He.selectDefaultCharset()}),He._parser.setEscHandler({intermediates:"%",final:"G"},function(){return He.selectDefaultCharset()});var rt=function(We){Ge._parser.setEscHandler({intermediates:"(",final:We},function(){return He.selectCharset("("+We)}),Ge._parser.setEscHandler({intermediates:")",final:We},function(){return He.selectCharset(")"+We)}),Ge._parser.setEscHandler({intermediates:"*",final:We},function(){return He.selectCharset("*"+We)}),Ge._parser.setEscHandler({intermediates:"+",final:We},function(){return He.selectCharset("+"+We)}),Ge._parser.setEscHandler({intermediates:"-",final:We},function(){return He.selectCharset("-"+We)}),Ge._parser.setEscHandler({intermediates:".",final:We},function(){return He.selectCharset("."+We)}),Ge._parser.setEscHandler({intermediates:"/",final:We},function(){return He.selectCharset("/"+We)})},Ge=this;for(var ct in re.CHARSETS)rt(ct);return He._parser.setEscHandler({intermediates:"#",final:"8"},function(){return He.screenAlignmentPattern()}),He._parser.setErrorHandler(function(We){return He._logService.error("Parsing error: ",We),We}),He._parser.setDcsHandler({intermediates:"$",final:"q"},new be(He._bufferService,He._coreService,He._logService,He._optionsService)),He}return Ee(me,pe),Object.defineProperty(me.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){pe.prototype.dispose.call(this)},me.prototype.parse=function(Ae){var De=this._bufferService.buffer,ke=De.x,Ie=De.y;if(this._logService.debug("parsing data",Ae),this._parseBuffer.length<Ae.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(Ae.length,131072))),this._dirtyRowService.clearRange(),Ae.length>131072)for(var Fe=0;Fe<Ae.length;Fe+=131072){var Pe=Fe+131072<Ae.length?Fe+131072:Ae.length,qe=typeof Ae=="string"?this._stringDecoder.decode(Ae.substring(Fe,Pe),this._parseBuffer):this._utf8Decoder.decode(Ae.subarray(Fe,Pe),this._parseBuffer);this._parser.parse(this._parseBuffer,qe)}else qe=typeof Ae=="string"?this._stringDecoder.decode(Ae,this._parseBuffer):this._utf8Decoder.decode(Ae,this._parseBuffer),this._parser.parse(this._parseBuffer,qe);(De=this._bufferService.buffer).x===ke&&De.y===Ie||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},me.prototype.print=function(Ae,De,ke){var Ie,Fe,Pe=this._bufferService.buffer,qe=this._charsetService.charset,Ke=this._optionsService.options.screenReaderMode,ot=this._bufferService.cols,He=this._coreService.decPrivateModes.wraparound,rt=this._coreService.modes.insertMode,Ge=this._curAttrData,ct=Pe.lines.get(Pe.ybase+Pe.y);this._dirtyRowService.markDirty(Pe.y),Pe.x&&ke-De>0&&ct.getWidth(Pe.x-1)===2&&ct.setCellFromCodePoint(Pe.x-1,0,1,Ge.fg,Ge.bg,Ge.extended);for(var We=De;We<ke;++We){if(Ie=Ae[We],Fe=this._unicodeService.wcwidth(Ie),Ie<127&&qe){var Ue=qe[String.fromCharCode(Ie)];Ue&&(Ie=Ue.charCodeAt(0))}if(Ke&&this._onA11yChar.fire(E.stringFromCodePoint(Ie)),Fe||!Pe.x){if(Pe.x+Fe-1>=ot){if(He){for(;Pe.x<ot;)ct.setCellFromCodePoint(Pe.x++,0,1,Ge.fg,Ge.bg,Ge.extended);Pe.x=0,Pe.y++,Pe.y===Pe.scrollBottom+1?(Pe.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Pe.y>=this._bufferService.rows&&(Pe.y=this._bufferService.rows-1),Pe.lines.get(Pe.ybase+Pe.y).isWrapped=!0),ct=Pe.lines.get(Pe.ybase+Pe.y)}else if(Pe.x=ot-1,Fe===2)continue}if(rt&&(ct.insertCells(Pe.x,Fe,Pe.getNullCell(Ge),Ge),ct.getWidth(ot-1)===2&&ct.setCellFromCodePoint(ot-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,Ge.fg,Ge.bg,Ge.extended)),ct.setCellFromCodePoint(Pe.x++,Ie,Fe,Ge.fg,Ge.bg,Ge.extended),Fe>0)for(;--Fe;)ct.setCellFromCodePoint(Pe.x++,0,0,Ge.fg,Ge.bg,Ge.extended)}else ct.getWidth(Pe.x-1)?ct.addCodepointToCell(Pe.x-1,Ie):ct.addCodepointToCell(Pe.x-2,Ie)}ke-De>0&&(ct.loadCell(Pe.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Pe.x<ot&&ke-De>0&&ct.getWidth(Pe.x)===0&&!ct.hasContent(Pe.x)&&ct.setCellFromCodePoint(Pe.x,0,1,Ge.fg,Ge.bg,Ge.extended),this._dirtyRowService.markDirty(Pe.y)},me.prototype.addCsiHandler=function(Ae,De){var ke=this;return Ae.final!=="t"||Ae.prefix||Ae.intermediates?this._parser.addCsiHandler(Ae,De):this._parser.addCsiHandler(Ae,function(Ie){return!ve(Ie.params[0],ke._optionsService.options.windowOptions)||De(Ie)})},me.prototype.addDcsHandler=function(Ae,De){return this._parser.addDcsHandler(Ae,new ge.DcsHandler(De))},me.prototype.addEscHandler=function(Ae,De){return this._parser.addEscHandler(Ae,De)},me.prototype.addOscHandler=function(Ae,De){return this._parser.addOscHandler(Ae,new oe.OscHandler(De))},me.prototype.bell=function(){this._onRequestBell.fire()},me.prototype.lineFeed=function(){var Ae=this._bufferService.buffer;this._dirtyRowService.markDirty(Ae.y),this._optionsService.options.convertEol&&(Ae.x=0),Ae.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),Ae.x>=this._bufferService.cols&&Ae.x--,this._dirtyRowService.markDirty(Ae.y),this._onLineFeed.fire()},me.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},me.prototype.backspace=function(){var Ae,De=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(De.x>0&&De.x--);if(this._restrictCursor(this._bufferService.cols),De.x>0)De.x--;else if(De.x===0&&De.y>De.scrollTop&&De.y<=De.scrollBottom&&(!((Ae=De.lines.get(De.ybase+De.y))===null||Ae===void 0)&&Ae.isWrapped)){De.lines.get(De.ybase+De.y).isWrapped=!1,De.y--,De.x=this._bufferService.cols-1;var ke=De.lines.get(De.ybase+De.y);ke.hasWidth(De.x)&&!ke.hasContent(De.x)&&De.x--}this._restrictCursor()},me.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var Ae=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-Ae)}},me.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},me.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},me.prototype._restrictCursor=function(Ae){Ae===void 0&&(Ae=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(Ae,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},me.prototype._setCursor=function(Ae,De){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+De):(this._bufferService.buffer.x=Ae,this._bufferService.buffer.y=De),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},me.prototype._moveCursor=function(Ae,De){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+Ae,this._bufferService.buffer.y+De)},me.prototype.cursorUp=function(Ae){var De=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;De>=0?this._moveCursor(0,-Math.min(De,Ae.params[0]||1)):this._moveCursor(0,-(Ae.params[0]||1))},me.prototype.cursorDown=function(Ae){var De=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;De>=0?this._moveCursor(0,Math.min(De,Ae.params[0]||1)):this._moveCursor(0,Ae.params[0]||1)},me.prototype.cursorForward=function(Ae){this._moveCursor(Ae.params[0]||1,0)},me.prototype.cursorBackward=function(Ae){this._moveCursor(-(Ae.params[0]||1),0)},me.prototype.cursorNextLine=function(Ae){this.cursorDown(Ae),this._bufferService.buffer.x=0},me.prototype.cursorPrecedingLine=function(Ae){this.cursorUp(Ae),this._bufferService.buffer.x=0},me.prototype.cursorCharAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},me.prototype.cursorPosition=function(Ae){this._setCursor(Ae.length>=2?(Ae.params[1]||1)-1:0,(Ae.params[0]||1)-1)},me.prototype.charPosAbsolute=function(Ae){this._setCursor((Ae.params[0]||1)-1,this._bufferService.buffer.y)},me.prototype.hPositionRelative=function(Ae){this._moveCursor(Ae.params[0]||1,0)},me.prototype.linePosAbsolute=function(Ae){this._setCursor(this._bufferService.buffer.x,(Ae.params[0]||1)-1)},me.prototype.vPositionRelative=function(Ae){this._moveCursor(0,Ae.params[0]||1)},me.prototype.hVPosition=function(Ae){this.cursorPosition(Ae)},me.prototype.tabClear=function(Ae){var De=Ae.params[0];De===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:De===3&&(this._bufferService.buffer.tabs={})},me.prototype.cursorForwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1;De--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},me.prototype.cursorBackwardTab=function(Ae){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var De=Ae.params[0]||1,ke=this._bufferService.buffer;De--;)ke.x=ke.prevStop()},me.prototype._eraseInBufferLine=function(Ae,De,ke,Ie){Ie===void 0&&(Ie=!1);var Fe=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);Fe.replaceCells(De,ke,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Ie&&(Fe.isWrapped=!1)},me.prototype._resetBufferLine=function(Ae){var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+Ae);De.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),De.isWrapped=!1},me.prototype.eraseInDisplay=function(Ae){var De;switch(this._restrictCursor(),Ae.params[0]){case 0:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);De<this._bufferService.rows;De++)this._resetBufferLine(De);this._dirtyRowService.markDirty(De);break;case 1:for(De=this._bufferService.buffer.y,this._dirtyRowService.markDirty(De),this._eraseInBufferLine(De,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(De+1).isWrapped=!1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 2:for(De=this._bufferService.rows,this._dirtyRowService.markDirty(De-1);De--;)this._resetBufferLine(De);this._dirtyRowService.markDirty(0);break;case 3:var ke=this._bufferService.buffer.lines.length-this._bufferService.rows;ke>0&&(this._bufferService.buffer.lines.trimStart(ke),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-ke,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-ke,0),this._onScroll.fire(0))}},me.prototype.eraseInLine=function(Ae){switch(this._restrictCursor(),Ae.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},me.prototype.insertLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ke=this._bufferService.buffer;if(!(ke.y>ke.scrollBottom||ke.y<ke.scrollTop)){for(var Ie=ke.ybase+ke.y,Fe=this._bufferService.rows-1-ke.scrollBottom,Pe=this._bufferService.rows-1+ke.ybase-Fe+1;De--;)ke.lines.splice(Pe-1,1),ke.lines.splice(Ie,0,ke.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ke.y,ke.scrollBottom),ke.x=0}},me.prototype.deleteLines=function(Ae){this._restrictCursor();var De=Ae.params[0]||1,ke=this._bufferService.buffer;if(!(ke.y>ke.scrollBottom||ke.y<ke.scrollTop)){var Ie,Fe=ke.ybase+ke.y;for(Ie=this._bufferService.rows-1-ke.scrollBottom,Ie=this._bufferService.rows-1+ke.ybase-Ie;De--;)ke.lines.splice(Fe,1),ke.lines.splice(Ie,0,ke.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ke.y,ke.scrollBottom),ke.x=0}},me.prototype.insertChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.insertCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},me.prototype.deleteChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.deleteCells(this._bufferService.buffer.x,Ae.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},me.prototype.scrollUp=function(Ae){for(var De=Ae.params[0]||1,ke=this._bufferService.buffer;De--;)ke.lines.splice(ke.ybase+ke.scrollTop,1),ke.lines.splice(ke.ybase+ke.scrollBottom,0,ke.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)},me.prototype.scrollDown=function(Ae){for(var De=Ae.params[0]||1,ke=this._bufferService.buffer;De--;)ke.lines.splice(ke.ybase+ke.scrollBottom,1),ke.lines.splice(ke.ybase+ke.scrollTop,0,ke.getBlankLine(y.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)},me.prototype.scrollLeft=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ke=Ae.params[0]||1,Ie=De.scrollTop;Ie<=De.scrollBottom;++Ie){var Fe=De.lines.get(De.ybase+Ie);Fe.deleteCells(0,ke,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Fe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},me.prototype.scrollRight=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ke=Ae.params[0]||1,Ie=De.scrollTop;Ie<=De.scrollBottom;++Ie){var Fe=De.lines.get(De.ybase+Ie);Fe.insertCells(0,ke,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Fe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},me.prototype.insertColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ke=Ae.params[0]||1,Ie=De.scrollTop;Ie<=De.scrollBottom;++Ie){var Fe=this._bufferService.buffer.lines.get(De.ybase+Ie);Fe.insertCells(De.x,ke,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Fe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},me.prototype.deleteColumns=function(Ae){var De=this._bufferService.buffer;if(!(De.y>De.scrollBottom||De.y<De.scrollTop)){for(var ke=Ae.params[0]||1,Ie=De.scrollTop;Ie<=De.scrollBottom;++Ie){var Fe=De.lines.get(De.ybase+Ie);Fe.deleteCells(De.x,ke,De.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Fe.isWrapped=!1}this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom)}},me.prototype.eraseChars=function(Ae){this._restrictCursor();var De=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);De&&(De.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(Ae.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},me.prototype.repeatPrecedingCharacter=function(Ae){if(this._parser.precedingCodepoint){for(var De=Ae.params[0]||1,ke=new Uint32Array(De),Ie=0;Ie<De;++Ie)ke[Ie]=this._parser.precedingCodepoint;this.print(ke,0,ke.length)}},me.prototype.sendDeviceAttributesPrimary=function(Ae){Ae.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(se.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(se.C0.ESC+"[?6c"))},me.prototype.sendDeviceAttributesSecondary=function(Ae){Ae.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(se.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(se.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(Ae.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(se.C0.ESC+"[>83;40003;0c"))},me.prototype._is=function(Ae){return(this._optionsService.options.termName+"").indexOf(Ae)===0},me.prototype.setMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!0}},me.prototype.setModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,re.DEFAULT_CHARSET),this._charsetService.setgCharset(1,re.DEFAULT_CHARSET),this._charsetService.setgCharset(2,re.DEFAULT_CHARSET),this._charsetService.setgCharset(3,re.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},me.prototype.resetMode=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 4:this._coreService.modes.insertMode=!1}},me.prototype.resetModePrivate=function(Ae){for(var De=0;De<Ae.length;De++)switch(Ae.params[De]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),Ae.params[De]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},me.prototype._updateAttrColor=function(Ae,De,ke,Ie,Fe){return De===2?(Ae|=50331648,Ae&=-16777216,Ae|=ae.AttributeData.fromColorRGB([ke,Ie,Fe])):De===5&&(Ae&=-50331904,Ae|=33554432|255&ke),Ae},me.prototype._extractColor=function(Ae,De,ke){var Ie=[0,0,-1,0,0,0],Fe=0,Pe=0;do{if(Ie[Pe+Fe]=Ae.params[De+Pe],Ae.hasSubParams(De+Pe)){var qe=Ae.getSubParams(De+Pe),Ke=0;do Ie[1]===5&&(Fe=1),Ie[Pe+Ke+1+Fe]=qe[Ke];while(++Ke<qe.length&&Ke+Pe+1+Fe<Ie.length);break}if(Ie[1]===5&&Pe+Fe>=2||Ie[1]===2&&Pe+Fe>=5)break;Ie[1]&&(Fe=1)}while(++Pe+De<Ae.length&&Pe+Fe<Ie.length);for(Ke=2;Ke<Ie.length;++Ke)Ie[Ke]===-1&&(Ie[Ke]=0);switch(Ie[0]){case 38:ke.fg=this._updateAttrColor(ke.fg,Ie[1],Ie[3],Ie[4],Ie[5]);break;case 48:ke.bg=this._updateAttrColor(ke.bg,Ie[1],Ie[3],Ie[4],Ie[5]);break;case 58:ke.extended=ke.extended.clone(),ke.extended.underlineColor=this._updateAttrColor(ke.extended.underlineColor,Ie[1],Ie[3],Ie[4],Ie[5])}return Pe},me.prototype._processUnderline=function(Ae,De){De.extended=De.extended.clone(),(!~Ae||Ae>5)&&(Ae=1),De.extended.underlineStyle=Ae,De.fg|=268435456,Ae===0&&(De.fg&=-268435457),De.updateExtended()},me.prototype.charAttributes=function(Ae){if(Ae.length===1&&Ae.params[0]===0)return this._curAttrData.fg=y.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=y.DEFAULT_ATTR_DATA.bg);for(var De,ke=Ae.length,Ie=this._curAttrData,Fe=0;Fe<ke;Fe++)(De=Ae.params[Fe])>=30&&De<=37?(Ie.fg&=-50331904,Ie.fg|=16777216|De-30):De>=40&&De<=47?(Ie.bg&=-50331904,Ie.bg|=16777216|De-40):De>=90&&De<=97?(Ie.fg&=-50331904,Ie.fg|=16777224|De-90):De>=100&&De<=107?(Ie.bg&=-50331904,Ie.bg|=16777224|De-100):De===0?(Ie.fg=y.DEFAULT_ATTR_DATA.fg,Ie.bg=y.DEFAULT_ATTR_DATA.bg):De===1?Ie.fg|=134217728:De===3?Ie.bg|=67108864:De===4?(Ie.fg|=268435456,this._processUnderline(Ae.hasSubParams(Fe)?Ae.getSubParams(Fe)[0]:1,Ie)):De===5?Ie.fg|=536870912:De===7?Ie.fg|=67108864:De===8?Ie.fg|=1073741824:De===2?Ie.bg|=134217728:De===21?this._processUnderline(2,Ie):De===22?(Ie.fg&=-134217729,Ie.bg&=-134217729):De===23?Ie.bg&=-67108865:De===24?Ie.fg&=-268435457:De===25?Ie.fg&=-536870913:De===27?Ie.fg&=-67108865:De===28?Ie.fg&=-1073741825:De===39?(Ie.fg&=-67108864,Ie.fg|=16777215&y.DEFAULT_ATTR_DATA.fg):De===49?(Ie.bg&=-67108864,Ie.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):De===38||De===48||De===58?Fe+=this._extractColor(Ae,Fe,Ie):De===59?(Ie.extended=Ie.extended.clone(),Ie.extended.underlineColor=-1,Ie.updateExtended()):De===100?(Ie.fg&=-67108864,Ie.fg|=16777215&y.DEFAULT_ATTR_DATA.fg,Ie.bg&=-67108864,Ie.bg|=16777215&y.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",De)},me.prototype.deviceStatus=function(Ae){switch(Ae.params[0]){case 5:this._coreService.triggerDataEvent(se.C0.ESC+"[0n");break;case 6:var De=this._bufferService.buffer.y+1,ke=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"["+De+";"+ke+"R")}},me.prototype.deviceStatusPrivate=function(Ae){switch(Ae.params[0]){case 6:var De=this._bufferService.buffer.y+1,ke=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"[?"+De+";"+ke+"R")}},me.prototype.softReset=function(Ae){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},me.prototype.setCursorStyle=function(Ae){var De=Ae.params[0]||1;switch(De){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var ke=De%2==1;this._optionsService.options.cursorBlink=ke},me.prototype.setScrollRegion=function(Ae){var De,ke=Ae.params[0]||1;(Ae.length<2||(De=Ae.params[1])>this._bufferService.rows||De===0)&&(De=this._bufferService.rows),De>ke&&(this._bufferService.buffer.scrollTop=ke-1,this._bufferService.buffer.scrollBottom=De-1,this._setCursor(0,0))},me.prototype.windowOptions=function(Ae){if(ve(Ae.params[0],this._optionsService.options.windowOptions)){var De=Ae.length>1?Ae.params[1]:0;switch(Ae.params[0]){case 14:De!==2&&this._onRequestWindowsOptionsReport.fire(ce.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(ce.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(se.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:De!==0&&De!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),De!==0&&De!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:De!==0&&De!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),De!==0&&De!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},me.prototype.saveCursor=function(Ae){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},me.prototype.restoreCursor=function(Ae){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},me.prototype.setTitle=function(Ae){this._windowTitle=Ae,this._onTitleChange.fire(Ae)},me.prototype.setIconName=function(Ae){this._iconName=Ae},me.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},me.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},me.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},me.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,re.DEFAULT_CHARSET)},me.prototype.selectCharset=function(Ae){Ae.length===2?Ae[0]!=="/"&&this._charsetService.setgCharset(Se[Ae[0]],re.CHARSETS[Ae[1]]||re.DEFAULT_CHARSET):this.selectDefaultCharset()},me.prototype.index=function(){this._restrictCursor();var Ae=this._bufferService.buffer;this._bufferService.buffer.y++,Ae.y===Ae.scrollBottom+1?(Ae.y--,this._onRequestScroll.fire(this._eraseAttrData())):Ae.y>=this._bufferService.rows&&(Ae.y=this._bufferService.rows-1),this._restrictCursor()},me.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},me.prototype.reverseIndex=function(){this._restrictCursor();var Ae=this._bufferService.buffer;if(Ae.y===Ae.scrollTop){var De=Ae.scrollBottom-Ae.scrollTop;Ae.lines.shiftElements(Ae.ybase+Ae.y,De,1),Ae.lines.set(Ae.ybase+Ae.y,Ae.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(Ae.scrollTop,Ae.scrollBottom)}else Ae.y--,this._restrictCursor()},me.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},me.prototype.reset=function(){this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()},me.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},me.prototype.setgLevel=function(Ae){this._charsetService.setgLevel(Ae)},me.prototype.screenAlignmentPattern=function(){var Ae=new ne.CellData;Ae.content=1<<22|69,Ae.fg=this._curAttrData.fg,Ae.bg=this._curAttrData.bg;var De=this._bufferService.buffer;this._setCursor(0,0);for(var ke=0;ke<this._bufferService.rows;++ke){var Ie=De.ybase+De.y+ke,Fe=De.lines.get(Ie);Fe&&(Fe.fill(Ae),Fe.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},me}(ee.Disposable);we.InputHandler=xe},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.DEFAULT_CHARSET=we.CHARSETS=void 0,we.CHARSETS={},we.DEFAULT_CHARSET=we.CHARSETS.B,we.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},we.CHARSETS.A={"#":"\xA3"},we.CHARSETS.B=void 0,we.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},we.CHARSETS.C=we.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},we.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},we.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},we.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},we.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},we.CHARSETS.E=we.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},we.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},we.CHARSETS.H=we.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},we.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.Params=void 0;var ie=function(){function Ee(ce,se){if(ce===void 0&&(ce=32),se===void 0&&(se=32),this.maxLength=ce,this.maxSubParamsLength=se,se>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ce),this.length=0,this._subParams=new Int32Array(se),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ce),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Ee.fromArray=function(ce){var se=new Ee;if(!ce.length)return se;for(var re=ce[0]instanceof Array?1:0;re<ce.length;++re){var ue=ce[re];if(ue instanceof Array)for(var ee=0;ee<ue.length;++ee)se.addSubParam(ue[ee]);else se.addParam(ue)}return se},Ee.prototype.clone=function(){var ce=new Ee(this.maxLength,this.maxSubParamsLength);return ce.params.set(this.params),ce.length=this.length,ce._subParams.set(this._subParams),ce._subParamsLength=this._subParamsLength,ce._subParamsIdx.set(this._subParamsIdx),ce._rejectDigits=this._rejectDigits,ce._rejectSubDigits=this._rejectSubDigits,ce._digitIsSub=this._digitIsSub,ce},Ee.prototype.toArray=function(){for(var ce=[],se=0;se<this.length;++se){ce.push(this.params[se]);var re=this._subParamsIdx[se]>>8,ue=255&this._subParamsIdx[se];ue-re>0&&ce.push(Array.prototype.slice.call(this._subParams,re,ue))}return ce},Ee.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Ee.prototype.addParam=function(ce){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=ce>2147483647?2147483647:ce}},Ee.prototype.addSubParam=function(ce){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(ce<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=ce>2147483647?2147483647:ce,this._subParamsIdx[this.length-1]++}},Ee.prototype.hasSubParams=function(ce){return(255&this._subParamsIdx[ce])-(this._subParamsIdx[ce]>>8)>0},Ee.prototype.getSubParams=function(ce){var se=this._subParamsIdx[ce]>>8,re=255&this._subParamsIdx[ce];return re-se>0?this._subParams.subarray(se,re):null},Ee.prototype.getSubParamsAll=function(){for(var ce={},se=0;se<this.length;++se){var re=this._subParamsIdx[se]>>8,ue=255&this._subParamsIdx[se];ue-re>0&&(ce[se]=this._subParams.slice(re,ue))}return ce},Ee.prototype.addDigit=function(ce){var se;if(!(this._rejectDigits||!(se=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var re=this._digitIsSub?this._subParams:this.params,ue=re[se-1];re[se-1]=~ue?Math.min(10*ue+ce,2147483647):ce}},Ee}();we.Params=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.OscHandler=we.OscParser=void 0;var ie=de(23),Ee=de(8),ce=function(){function re(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return re.prototype.addHandler=function(ue,ee){this._handlers[ue]===void 0&&(this._handlers[ue]=[]);var te=this._handlers[ue];return te.push(ee),{dispose:function(){var E=te.indexOf(ee);E!==-1&&te.splice(E,1)}}},re.prototype.setHandler=function(ue,ee){this._handlers[ue]=[ee]},re.prototype.clearHandler=function(ue){this._handlers[ue]&&delete this._handlers[ue]},re.prototype.setHandlerFallback=function(ue){this._handlerFb=ue},re.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},re.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},re.prototype._start=function(){var ue=this._handlers[this._id];if(ue)for(var ee=ue.length-1;ee>=0;ee--)ue[ee].start();else this._handlerFb(this._id,"START")},re.prototype._put=function(ue,ee,te){var E=this._handlers[this._id];if(E)for(var y=E.length-1;y>=0;y--)E[y].put(ue,ee,te);else this._handlerFb(this._id,"PUT",Ee.utf32ToString(ue,ee,te))},re.prototype._end=function(ue){var ee=this._handlers[this._id];if(ee){for(var te=ee.length-1;te>=0&&ee[te].end(ue)===!1;te--);for(te--;te>=0;te--)ee[te].end(!1)}else this._handlerFb(this._id,"END",ue)},re.prototype.start=function(){this.reset(),this._id=-1,this._state=1},re.prototype.put=function(ue,ee,te){if(this._state!==3){if(this._state===1)for(;ee<te;){var E=ue[ee++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&te-ee>0&&this._put(ue,ee,te)}},re.prototype.end=function(ue){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(ue)),this._id=-1,this._state=0)},re}();we.OscParser=ce;var se=function(){function re(ue){this._handler=ue,this._data="",this._hitLimit=!1}return re.prototype.start=function(){this._data="",this._hitLimit=!1},re.prototype.put=function(ue,ee,te){this._hitLimit||(this._data+=Ee.utf32ToString(ue,ee,te),this._data.length>ie.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},re.prototype.end=function(ue){var ee;return this._hitLimit?ee=!1:ue&&(ee=this._handler(this._data)),this._data="",this._hitLimit=!1,ee},re}();we.OscHandler=se},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.PAYLOAD_LIMIT=void 0,we.PAYLOAD_LIMIT=1e7},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.DcsHandler=we.DcsParser=void 0;var ie=de(8),Ee=de(21),ce=de(23),se=[],re=function(){function ee(){this._handlers=Object.create(null),this._active=se,this._ident=0,this._handlerFb=function(){}}return ee.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ee.prototype.addHandler=function(te,E){this._handlers[te]===void 0&&(this._handlers[te]=[]);var y=this._handlers[te];return y.push(E),{dispose:function(){var z=y.indexOf(E);z!==-1&&y.splice(z,1)}}},ee.prototype.setHandler=function(te,E){this._handlers[te]=[E]},ee.prototype.clearHandler=function(te){this._handlers[te]&&delete this._handlers[te]},ee.prototype.setHandlerFallback=function(te){this._handlerFb=te},ee.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=se,this._ident=0},ee.prototype.hook=function(te,E){if(this.reset(),this._ident=te,this._active=this._handlers[te]||se,this._active.length)for(var y=this._active.length-1;y>=0;y--)this._active[y].hook(E);else this._handlerFb(this._ident,"HOOK",E)},ee.prototype.put=function(te,E,y){if(this._active.length)for(var z=this._active.length-1;z>=0;z--)this._active[z].put(te,E,y);else this._handlerFb(this._ident,"PUT",ie.utf32ToString(te,E,y))},ee.prototype.unhook=function(te){if(this._active.length){for(var E=this._active.length-1;E>=0&&this._active[E].unhook(te)===!1;E--);for(E--;E>=0;E--)this._active[E].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",te);this._active=se,this._ident=0},ee}();we.DcsParser=re;var ue=function(){function ee(te){this._handler=te,this._data="",this._hitLimit=!1}return ee.prototype.hook=function(te){this._params=te.clone(),this._data="",this._hitLimit=!1},ee.prototype.put=function(te,E,y){this._hitLimit||(this._data+=ie.utf32ToString(te,E,y),this._data.length>ce.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ee.prototype.unhook=function(te){var E;return this._hitLimit?E=!1:te&&(E=this._handler(this._data,this._params||new Ee.Params)),this._params=void 0,this._data="",this._hitLimit=!1,E},ee}();we.DcsHandler=ue},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.removeTerminalFromCache=we.acquireCharAtlas=void 0;var ie=de(26),Ee=de(43),ce=[];we.acquireCharAtlas=function(se,re,ue,ee,te){for(var E=ie.generateConfig(ee,te,se,ue),y=0;y<ce.length;y++){var z=(x=ce[y]).ownedBy.indexOf(re);if(z>=0){if(ie.configEquals(x.config,E))return x.atlas;x.ownedBy.length===1?(x.atlas.dispose(),ce.splice(y,1)):x.ownedBy.splice(z,1);break}}for(y=0;y<ce.length;y++){var x=ce[y];if(ie.configEquals(x.config,E))return x.ownedBy.push(re),x.atlas}var ne={atlas:new Ee.DynamicCharAtlas(document,E),config:E,ownedBy:[re]};return ce.push(ne),ne.atlas},we.removeTerminalFromCache=function(se){for(var re=0;re<ce.length;re++){var ue=ce[re].ownedBy.indexOf(se);if(ue!==-1){ce[re].ownedBy.length===1?(ce[re].atlas.dispose(),ce.splice(re,1)):ce[re].ownedBy.splice(ue,1);break}}}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.is256Color=we.configEquals=we.generateConfig=void 0;var ie=de(3);we.generateConfig=function(Ee,ce,se,re){var ue={foreground:re.foreground,background:re.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:re.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Ee,scaledCharHeight:ce,fontFamily:se.fontFamily,fontSize:se.fontSize,fontWeight:se.fontWeight,fontWeightBold:se.fontWeightBold,allowTransparency:se.allowTransparency,colors:ue}},we.configEquals=function(Ee,ce){for(var se=0;se<Ee.colors.ansi.length;se++)if(Ee.colors.ansi[se].rgba!==ce.colors.ansi[se].rgba)return!1;return Ee.devicePixelRatio===ce.devicePixelRatio&&Ee.fontFamily===ce.fontFamily&&Ee.fontSize===ce.fontSize&&Ee.fontWeight===ce.fontWeight&&Ee.fontWeightBold===ce.fontWeightBold&&Ee.allowTransparency===ce.allowTransparency&&Ee.scaledCharWidth===ce.scaledCharWidth&&Ee.scaledCharHeight===ce.scaledCharHeight&&Ee.colors.foreground===ce.colors.foreground&&Ee.colors.background===ce.colors.background},we.is256Color=function(Ee){return Ee<ie.DEFAULT_COLOR}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.ColorManager=we.DEFAULT_ANSI_COLORS=void 0;var ie=de(10),Ee=de(45),ce=ie.css.toColor("#ffffff"),se=ie.css.toColor("#000000"),re=ie.css.toColor("#ffffff"),ue=ie.css.toColor("#000000"),ee={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};we.DEFAULT_ANSI_COLORS=function(){for(var E=[ie.css.toColor("#2e3436"),ie.css.toColor("#cc0000"),ie.css.toColor("#4e9a06"),ie.css.toColor("#c4a000"),ie.css.toColor("#3465a4"),ie.css.toColor("#75507b"),ie.css.toColor("#06989a"),ie.css.toColor("#d3d7cf"),ie.css.toColor("#555753"),ie.css.toColor("#ef2929"),ie.css.toColor("#8ae234"),ie.css.toColor("#fce94f"),ie.css.toColor("#729fcf"),ie.css.toColor("#ad7fa8"),ie.css.toColor("#34e2e2"),ie.css.toColor("#eeeeec")],y=[0,95,135,175,215,255],z=0;z<216;z++){var x=y[z/36%6|0],ne=y[z/6%6|0],ae=y[z%6];E.push({css:ie.channels.toCss(x,ne,ae),rgba:ie.channels.toRgba(x,ne,ae)})}for(z=0;z<24;z++){var oe=8+10*z;E.push({css:ie.channels.toCss(oe,oe,oe),rgba:ie.channels.toRgba(oe,oe,oe)})}return E}();var te=function(){function E(y,z){this.allowTransparency=z;var x=y.createElement("canvas");x.width=1,x.height=1;var ne=x.getContext("2d");if(!ne)throw new Error("Could not get rendering context");this._ctx=ne,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Ee.ColorContrastCache,this.colors={foreground:ce,background:se,cursor:re,cursorAccent:ue,selectionTransparent:ee,selectionOpaque:ie.color.blend(se,ee),ansi:we.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return E.prototype.onOptionsChange=function(y){y==="minimumContrastRatio"&&this._contrastCache.clear()},E.prototype.setTheme=function(y){y===void 0&&(y={}),this.colors.foreground=this._parseColor(y.foreground,ce),this.colors.background=this._parseColor(y.background,se),this.colors.cursor=this._parseColor(y.cursor,re,!0),this.colors.cursorAccent=this._parseColor(y.cursorAccent,ue,!0),this.colors.selectionTransparent=this._parseColor(y.selection,ee,!0),this.colors.selectionOpaque=ie.color.blend(this.colors.background,this.colors.selectionTransparent),ie.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=ie.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(y.black,we.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(y.red,we.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(y.green,we.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(y.yellow,we.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(y.blue,we.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(y.magenta,we.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(y.cyan,we.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(y.white,we.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(y.brightBlack,we.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(y.brightRed,we.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(y.brightGreen,we.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(y.brightYellow,we.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(y.brightBlue,we.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(y.brightMagenta,we.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(y.brightCyan,we.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(y.brightWhite,we.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},E.prototype._parseColor=function(y,z,x){if(x===void 0&&(x=this.allowTransparency),y===void 0)return z;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=y,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+y+" is invalid using fallback "+z.css),z;this._ctx.fillRect(0,0,1,1);var ne=this._ctx.getImageData(0,0,1,1).data;if(ne[3]!==255){if(!x)return console.warn("Color: "+y+" is using transparency, but allowTransparency is false. Using fallback "+z.css+"."),z;var ae=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(xe){return Number(xe)}),oe=ae[0],ge=ae[1],Se=ae[2],ve=ae[3],be=Math.round(255*ve);return{rgba:ie.channels.toRgba(oe,ge,Se,be),css:y}}return{css:this._ctx.fillStyle,rgba:ie.channels.toRgba(ne[0],ne[1],ne[2],ne[3])}},E}();we.ColorManager=te},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.throwIfFalsy=void 0,we.throwIfFalsy=function(ie){if(!ie)throw new Error("value must not be falsy");return ie}},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(te,E){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,z){y.__proto__=z}||function(y,z){for(var x in z)z.hasOwnProperty(x)&&(y[x]=z[x])})(te,E)},function(te,E){function y(){this.constructor=te}ie(te,E),te.prototype=E===null?Object.create(E):(y.prototype=E.prototype,new y)});Object.defineProperty(we,"__esModule",{value:!0}),we.CharacterJoinerRegistry=we.JoinedCellData=void 0;var ce=de(6),se=de(3),re=de(4),ue=function(te){function E(y,z,x){var ne=te.call(this)||this;return ne.content=0,ne.combinedData="",ne.fg=y.fg,ne.bg=y.bg,ne.combinedData=z,ne._width=x,ne}return Ee(E,te),E.prototype.isCombined=function(){return 2097152},E.prototype.getWidth=function(){return this._width},E.prototype.getChars=function(){return this.combinedData},E.prototype.getCode=function(){return 2097151},E.prototype.setFromCharData=function(y){throw new Error("not implemented")},E.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},E}(ce.AttributeData);we.JoinedCellData=ue;var ee=function(){function te(E){this._bufferService=E,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new re.CellData}return te.prototype.registerCharacterJoiner=function(E){var y={id:this._nextCharacterJoinerId++,handler:E};return this._characterJoiners.push(y),y.id},te.prototype.deregisterCharacterJoiner=function(E){for(var y=0;y<this._characterJoiners.length;y++)if(this._characterJoiners[y].id===E)return this._characterJoiners.splice(y,1),!0;return!1},te.prototype.getJoinedCharacters=function(E){if(this._characterJoiners.length===0)return[];var y=this._bufferService.buffer.lines.get(E);if(!y||y.length===0)return[];for(var z=[],x=y.translateToString(!0),ne=0,ae=0,oe=0,ge=y.getFg(0),Se=y.getBg(0),ve=0;ve<y.getTrimmedLength();ve++)if(y.loadCell(ve,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==ge||this._workCell.bg!==Se){if(ve-ne>1)for(var be=this._getJoinedRanges(x,oe,ae,y,ne),xe=0;xe<be.length;xe++)z.push(be[xe]);ne=ve,oe=ae,ge=this._workCell.fg,Se=this._workCell.bg}ae+=this._workCell.getChars().length||se.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-ne>1)for(be=this._getJoinedRanges(x,oe,ae,y,ne),xe=0;xe<be.length;xe++)z.push(be[xe]);return z},te.prototype._getJoinedRanges=function(E,y,z,x,ne){for(var ae=E.substring(y,z),oe=this._characterJoiners[0].handler(ae),ge=1;ge<this._characterJoiners.length;ge++)for(var Se=this._characterJoiners[ge].handler(ae),ve=0;ve<Se.length;ve++)te._mergeRanges(oe,Se[ve]);return this._stringRangesToCellRanges(oe,x,ne),oe},te.prototype._stringRangesToCellRanges=function(E,y,z){var x=0,ne=!1,ae=0,oe=E[x];if(oe){for(var ge=z;ge<this._bufferService.cols;ge++){var Se=y.getWidth(ge),ve=y.getString(ge).length||se.WHITESPACE_CELL_CHAR.length;if(Se!==0){if(!ne&&oe[0]<=ae&&(oe[0]=ge,ne=!0),oe[1]<=ae){if(oe[1]=ge,!(oe=E[++x]))break;oe[0]<=ae?(oe[0]=ge,ne=!0):ne=!1}ae+=ve}}oe&&(oe[1]=this._bufferService.cols)}},te._mergeRanges=function(E,y){for(var z=!1,x=0;x<E.length;x++){var ne=E[x];if(z){if(y[1]<=ne[0])return E[x-1][1]=y[1],E;if(y[1]<=ne[1])return E[x-1][1]=Math.max(y[1],ne[1]),E.splice(x,1),E;E.splice(x,1),x--}else{if(y[1]<=ne[0])return E.splice(x,0,y),E;if(y[1]<=ne[1])return ne[0]=Math.min(y[0],ne[0]),E;y[0]<ne[1]&&(ne[0]=Math.min(y[0],ne[0]),z=!0)}}return z?E[E.length-1][1]=y[1]:E.push(y),E},te}();we.CharacterJoinerRegistry=ee},function(Ot,we,de){"use strict";function ie(Ee,ce){var se=ce.getBoundingClientRect();return[Ee.clientX-se.left,Ee.clientY-se.top]}Object.defineProperty(we,"__esModule",{value:!0}),we.getRawByteCoords=we.getCoords=we.getCoordsRelativeToElement=void 0,we.getCoordsRelativeToElement=ie,we.getCoords=function(Ee,ce,se,re,ue,ee,te,E){if(ue){var y=ie(Ee,ce);if(y)return y[0]=Math.ceil((y[0]+(E?ee/2:0))/ee),y[1]=Math.ceil(y[1]/te),y[0]=Math.min(Math.max(y[0],1),se+(E?1:0)),y[1]=Math.min(Math.max(y[1],1),re),y}},we.getRawByteCoords=function(Ee){if(Ee)return{x:Ee[0]+32,y:Ee[1]+32}}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.RenderDebouncer=void 0;var ie=function(){function Ee(ce){this._renderCallback=ce}return Ee.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Ee.prototype.refresh=function(ce,se,re){var ue=this;this._rowCount=re,ce=ce!==void 0?ce:0,se=se!==void 0?se:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,ce):ce,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,se):se,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return ue._innerRefresh()}))},Ee.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var ce=Math.max(this._rowStart,0),se=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(ce,se)}},Ee}();we.RenderDebouncer=ie},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(se,re){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ee){ue.__proto__=ee}||function(ue,ee){for(var te in ee)ee.hasOwnProperty(te)&&(ue[te]=ee[te])})(se,re)},function(se,re){function ue(){this.constructor=se}ie(se,re),se.prototype=re===null?Object.create(re):(ue.prototype=re.prototype,new ue)});Object.defineProperty(we,"__esModule",{value:!0}),we.ScreenDprMonitor=void 0;var ce=function(se){function re(){var ue=se!==null&&se.apply(this,arguments)||this;return ue._currentDevicePixelRatio=window.devicePixelRatio,ue}return Ee(re,se),re.prototype.setListener=function(ue){var ee=this;this._listener&&this.clearListener(),this._listener=ue,this._outerListener=function(){ee._listener&&(ee._listener(window.devicePixelRatio,ee._currentDevicePixelRatio),ee._updateDpr())},this._updateDpr()},re.prototype.dispose=function(){se.prototype.dispose.call(this),this.clearListener()},re.prototype._updateDpr=function(){var ue;this._outerListener&&((ue=this._resolutionMediaMatchList)===null||ue===void 0||ue.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},re.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},re}(de(2).Disposable);we.ScreenDprMonitor=ce},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.clone=void 0,we.clone=function ie(Ee,ce){if(ce===void 0&&(ce=5),typeof Ee!="object")return Ee;var se=Array.isArray(Ee)?[]:{};for(var re in Ee)se[re]=ce<=1?Ee[re]:Ee[re]?ie(Ee[re],ce-1):Ee[re];return se}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.Terminal=void 0;var ie=de(4),Ee=de(35),ce=de(18),se=de(0),re=de(83),ue=function(){function x(ne){this._core=new Ee.Terminal(ne),this._addonManager=new re.AddonManager}return x.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(x.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new y(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"unicode",{get:function(){return this._checkProposedApi(),new z(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffer",{get:function(){return this._checkProposedApi(),new te(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),x.prototype.blur=function(){this._core.blur()},x.prototype.focus=function(){this._core.focus()},x.prototype.resize=function(ne,ae){this._verifyIntegers(ne,ae),this._core.resize(ne,ae)},x.prototype.open=function(ne){this._core.open(ne)},x.prototype.attachCustomKeyEventHandler=function(ne){this._core.attachCustomKeyEventHandler(ne)},x.prototype.registerLinkMatcher=function(ne,ae,oe){return this._checkProposedApi(),this._core.registerLinkMatcher(ne,ae,oe)},x.prototype.deregisterLinkMatcher=function(ne){this._checkProposedApi(),this._core.deregisterLinkMatcher(ne)},x.prototype.registerLinkProvider=function(ne){return this._checkProposedApi(),this._core.registerLinkProvider(ne)},x.prototype.registerCharacterJoiner=function(ne){return this._checkProposedApi(),this._core.registerCharacterJoiner(ne)},x.prototype.deregisterCharacterJoiner=function(ne){this._checkProposedApi(),this._core.deregisterCharacterJoiner(ne)},x.prototype.registerMarker=function(ne){return this._checkProposedApi(),this._verifyIntegers(ne),this._core.addMarker(ne)},x.prototype.addMarker=function(ne){return this.registerMarker(ne)},x.prototype.hasSelection=function(){return this._core.hasSelection()},x.prototype.select=function(ne,ae,oe){this._verifyIntegers(ne,ae,oe),this._core.select(ne,ae,oe)},x.prototype.getSelection=function(){return this._core.getSelection()},x.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},x.prototype.clearSelection=function(){this._core.clearSelection()},x.prototype.selectAll=function(){this._core.selectAll()},x.prototype.selectLines=function(ne,ae){this._verifyIntegers(ne,ae),this._core.selectLines(ne,ae)},x.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},x.prototype.scrollLines=function(ne){this._verifyIntegers(ne),this._core.scrollLines(ne)},x.prototype.scrollPages=function(ne){this._verifyIntegers(ne),this._core.scrollPages(ne)},x.prototype.scrollToTop=function(){this._core.scrollToTop()},x.prototype.scrollToBottom=function(){this._core.scrollToBottom()},x.prototype.scrollToLine=function(ne){this._verifyIntegers(ne),this._core.scrollToLine(ne)},x.prototype.clear=function(){this._core.clear()},x.prototype.write=function(ne,ae){this._core.write(ne,ae)},x.prototype.writeUtf8=function(ne,ae){this._core.write(ne,ae)},x.prototype.writeln=function(ne,ae){this._core.write(ne),this._core.write(`\r
`,ae)},x.prototype.paste=function(ne){this._core.paste(ne)},x.prototype.getOption=function(ne){return this._core.optionsService.getOption(ne)},x.prototype.setOption=function(ne,ae){this._core.optionsService.setOption(ne,ae)},x.prototype.refresh=function(ne,ae){this._verifyIntegers(ne,ae),this._core.refresh(ne,ae)},x.prototype.reset=function(){this._core.reset()},x.prototype.loadAddon=function(ne){return this._addonManager.loadAddon(this,ne)},Object.defineProperty(x,"strings",{get:function(){return ce},enumerable:!1,configurable:!0}),x.prototype._verifyIntegers=function(){for(var ne=[],ae=0;ae<arguments.length;ae++)ne[ae]=arguments[ae];for(var oe=0,ge=ne;oe<ge.length;oe++){var Se=ge[oe];if(Se===1/0||isNaN(Se)||Se%1!=0)throw new Error("This API only accepts integers")}},x}();we.Terminal=ue;var ee=function(){function x(ne,ae){this._buffer=ne,this.type=ae}return x.prototype.init=function(ne){return this._buffer=ne,this},Object.defineProperty(x.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),x.prototype.getLine=function(ne){var ae=this._buffer.lines.get(ne);if(ae)return new E(ae)},x.prototype.getNullCell=function(){return new ie.CellData},x}(),te=function(){function x(ne){var ae=this;this._buffers=ne,this._onBufferChange=new se.EventEmitter,this._normal=new ee(this._buffers.normal,"normal"),this._alternate=new ee(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return ae._onBufferChange.fire(ae.active)})}return Object.defineProperty(x.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),x}(),E=function(){function x(ne){this._line=ne}return Object.defineProperty(x.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),x.prototype.getCell=function(ne,ae){if(!(ne<0||ne>=this._line.length))return ae?(this._line.loadCell(ne,ae),ae):this._line.loadCell(ne,new ie.CellData)},x.prototype.translateToString=function(ne,ae,oe){return this._line.translateToString(ne,ae,oe)},x}(),y=function(){function x(ne){this._core=ne}return x.prototype.registerCsiHandler=function(ne,ae){return this._core.addCsiHandler(ne,function(oe){return ae(oe.toArray())})},x.prototype.addCsiHandler=function(ne,ae){return this.registerCsiHandler(ne,ae)},x.prototype.registerDcsHandler=function(ne,ae){return this._core.addDcsHandler(ne,function(oe,ge){return ae(oe,ge.toArray())})},x.prototype.addDcsHandler=function(ne,ae){return this.registerDcsHandler(ne,ae)},x.prototype.registerEscHandler=function(ne,ae){return this._core.addEscHandler(ne,ae)},x.prototype.addEscHandler=function(ne,ae){return this.registerEscHandler(ne,ae)},x.prototype.registerOscHandler=function(ne,ae){return this._core.addOscHandler(ne,ae)},x.prototype.addOscHandler=function(ne,ae){return this.registerOscHandler(ne,ae)},x}(),z=function(){function x(ne){this._core=ne}return x.prototype.register=function(ne){this._core.unicodeService.register(ne)},Object.defineProperty(x.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(ne){this._core.unicodeService.activeVersion=ne},enumerable:!1,configurable:!0}),x}()},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ot,He){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,Ge){rt.__proto__=Ge}||function(rt,Ge){for(var ct in Ge)Ge.hasOwnProperty(ct)&&(rt[ct]=Ge[ct])})(ot,He)},function(ot,He){function rt(){this.constructor=ot}ie(ot,He),ot.prototype=He===null?Object.create(He):(rt.prototype=He.prototype,new rt)});Object.defineProperty(we,"__esModule",{value:!0}),we.Terminal=void 0;var ce=de(36),se=de(37),re=de(38),ue=de(12),ee=de(19),te=de(40),E=de(50),y=de(51),z=de(11),x=de(7),ne=de(18),ae=de(54),oe=de(55),ge=de(56),Se=de(57),ve=de(59),be=de(0),xe=de(16),pe=de(27),me=de(60),Ae=de(5),De=de(61),ke=de(62),Ie=de(63),Fe=de(64),Pe=de(65),qe=typeof window!="undefined"?window.document:null,Ke=function(ot){function He(rt){rt===void 0&&(rt={});var Ge=ot.call(this,rt)||this;return Ge.browser=z,Ge._keyDownHandled=!1,Ge._onCursorMove=new be.EventEmitter,Ge._onKey=new be.EventEmitter,Ge._onRender=new be.EventEmitter,Ge._onSelectionChange=new be.EventEmitter,Ge._onTitleChange=new be.EventEmitter,Ge._onFocus=new be.EventEmitter,Ge._onBlur=new be.EventEmitter,Ge._onA11yCharEmitter=new be.EventEmitter,Ge._onA11yTabEmitter=new be.EventEmitter,Ge._setup(),Ge.linkifier=Ge._instantiationService.createInstance(E.Linkifier),Ge.linkifier2=Ge.register(Ge._instantiationService.createInstance(Ie.Linkifier2)),Ge.register(Ge._inputHandler.onRequestBell(function(){return Ge.bell()})),Ge.register(Ge._inputHandler.onRequestRefreshRows(function(ct,We){return Ge.refresh(ct,We)})),Ge.register(Ge._inputHandler.onRequestReset(function(){return Ge.reset()})),Ge.register(Ge._inputHandler.onRequestScroll(function(ct,We){return Ge.scroll(ct,We||void 0)})),Ge.register(Ge._inputHandler.onRequestWindowsOptionsReport(function(ct){return Ge._reportWindowsOptions(ct)})),Ge.register(be.forwardEvent(Ge._inputHandler.onCursorMove,Ge._onCursorMove)),Ge.register(be.forwardEvent(Ge._inputHandler.onTitleChange,Ge._onTitleChange)),Ge.register(be.forwardEvent(Ge._inputHandler.onA11yChar,Ge._onA11yCharEmitter)),Ge.register(be.forwardEvent(Ge._inputHandler.onA11yTab,Ge._onA11yTabEmitter)),Ge.register(Ge._bufferService.onResize(function(ct){return Ge._afterResize(ct.cols,ct.rows)})),Ge}return Ee(He,ot),Object.defineProperty(He.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),He.prototype.dispose=function(){var rt,Ge,ct;this._isDisposed||(ot.prototype.dispose.call(this),(rt=this._renderService)===null||rt===void 0||rt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(ct=(Ge=this.element)===null||Ge===void 0?void 0:Ge.parentNode)===null||ct===void 0||ct.removeChild(this.element))},He.prototype._setup=function(){ot.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(He.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),He.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},He.prototype._updateOptions=function(rt){var Ge,ct,We,Ue;switch(ot.prototype._updateOptions.call(this,rt),rt){case"fontFamily":case"fontSize":(Ge=this._renderService)===null||Ge===void 0||Ge.clear(),(ct=this._charSizeService)===null||ct===void 0||ct.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(We=this.viewport)===null||We===void 0||We.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new ge.AccessibilityManager(this,this._renderService)):((Ue=this._accessibilityManager)===null||Ue===void 0||Ue.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},He.prototype._onTextAreaFocus=function(rt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ue.C0.ESC+"[I"),this.updateCursorStyle(rt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},He.prototype.blur=function(){var rt;return(rt=this.textarea)===null||rt===void 0?void 0:rt.blur()},He.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(ue.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},He.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var rt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),Ge=this._bufferService.buffer.y*rt,ct=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=ct+"px",this.textarea.style.top=Ge+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=rt+"px",this.textarea.style.lineHeight=rt+"px",this.textarea.style.zIndex="-5"}},He.prototype._initGlobal=function(){var rt=this;this._bindKeys(),this.register(x.addDisposableDomListener(this.element,"copy",function(ct){rt.hasSelection()&&re.copyHandler(ct,rt._selectionService)}));var Ge=function(ct){return re.handlePasteEvent(ct,rt.textarea,rt._coreService)};this.register(x.addDisposableDomListener(this.textarea,"paste",Ge)),this.register(x.addDisposableDomListener(this.element,"paste",Ge)),z.isFirefox?this.register(x.addDisposableDomListener(this.element,"mousedown",function(ct){ct.button===2&&re.rightClickHandler(ct,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})):this.register(x.addDisposableDomListener(this.element,"contextmenu",function(ct){re.rightClickHandler(ct,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})),z.isLinux&&this.register(x.addDisposableDomListener(this.element,"auxclick",function(ct){ct.button===1&&re.moveTextAreaUnderMouseCursor(ct,rt.textarea,rt.screenElement)}))},He.prototype._bindKeys=function(){var rt=this;this.register(x.addDisposableDomListener(this.textarea,"keyup",function(Ge){return rt._keyUp(Ge)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keydown",function(Ge){return rt._keyDown(Ge)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keypress",function(Ge){return rt._keyPress(Ge)},!0)),this.register(x.addDisposableDomListener(this.textarea,"compositionstart",function(){return rt._compositionHelper.compositionstart()})),this.register(x.addDisposableDomListener(this.textarea,"compositionupdate",function(Ge){return rt._compositionHelper.compositionupdate(Ge)})),this.register(x.addDisposableDomListener(this.textarea,"compositionend",function(){return rt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return rt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(Ge){return rt._queueLinkification(Ge.start,Ge.end)}))},He.prototype.open=function(rt){var Ge=this;if(!rt)throw new Error("Terminal requires a parent element.");qe.body.contains(rt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=rt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),rt.appendChild(this.element);var ct=qe.createDocumentFragment();this._viewportElement=qe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),ct.appendChild(this._viewportElement),this._viewportScrollArea=qe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=qe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=qe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),ct.appendChild(this.screenElement),this.textarea=qe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",ne.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(x.addDisposableDomListener(this.textarea,"focus",function(Ze){return Ge._onTextAreaFocus(Ze)})),this.register(x.addDisposableDomListener(this.textarea,"blur",function(){return Ge._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var We=this._instantiationService.createInstance(Fe.CoreBrowserService,this.textarea);this._instantiationService.setService(Ae.ICoreBrowserService,We),this._charSizeService=this._instantiationService.createInstance(De.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(Ae.ICharSizeService,this._charSizeService),this._compositionView=qe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ce.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(ct),this._theme=this.options.theme||this._theme,this._colorManager=new pe.ColorManager(qe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(Ze){return Ge._colorManager.onOptionsChange(Ze)})),this._colorManager.setTheme(this._theme);var Ue=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(me.RenderService,Ue,this.rows,this.screenElement)),this._instantiationService.setService(Ae.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(Ze){return Ge._onRender.fire(Ze)})),this.onResize(function(Ze){return Ge._renderService.resize(Ze.cols,Ze.rows)}),this._soundService=this._instantiationService.createInstance(ae.SoundService),this._instantiationService.setService(Ae.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(ke.MouseService),this._instantiationService.setService(Ae.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(se.Viewport,function(Ze,Je){return Ge.scrollLines(Ze,Je)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return Ge.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){Ge._renderService.onCursorMove(),Ge._syncTextArea()})),this.register(this.onResize(function(){return Ge._renderService.onResize(Ge.cols,Ge.rows)})),this.register(this.onBlur(function(){return Ge._renderService.onBlur()})),this.register(this.onFocus(function(){return Ge._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return Ge.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(y.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(Ae.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(Ze){return Ge.scrollLines(Ze.amount,Ze.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return Ge._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(Ze){return Ge._renderService.onSelectionChanged(Ze.start,Ze.end,Ze.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(Ze){Ge.textarea.value=Ze,Ge.textarea.focus(),Ge.textarea.select()})),this.register(this.onScroll(function(){Ge.viewport.syncScrollArea(),Ge._selectionService.refresh()})),this.register(x.addDisposableDomListener(this._viewportElement,"scroll",function(){return Ge._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(oe.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return Ge._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(x.addDisposableDomListener(this.element,"mousedown",function(Ze){return Ge._selectionService.onMouseDown(Ze)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new ge.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},He.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(te.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(Se.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},He.prototype._setTheme=function(rt){var Ge,ct,We;this._theme=rt,(Ge=this._colorManager)===null||Ge===void 0||Ge.setTheme(rt),(ct=this._renderService)===null||ct===void 0||ct.setColors(this._colorManager.colors),(We=this.viewport)===null||We===void 0||We.onThemeChange(this._colorManager.colors)},He.prototype.bindMouse=function(){var rt=this,Ge=this,ct=this.element;function We(pt){var ht,Pt,gt=Ge._mouseService.getRawByteCoords(pt,Ge.screenElement,Ge.cols,Ge.rows);if(!gt)return!1;switch(pt.overrideType||pt.type){case"mousemove":Pt=32,pt.buttons===void 0?(ht=3,pt.button!==void 0&&(ht=pt.button<3?pt.button:3)):ht=1&pt.buttons?0:4&pt.buttons?1:2&pt.buttons?2:3;break;case"mouseup":Pt=0,ht=pt.button<3?pt.button:3;break;case"mousedown":Pt=1,ht=pt.button<3?pt.button:3;break;case"wheel":pt.deltaY!==0&&(Pt=pt.deltaY<0?0:1),ht=4;break;default:return!1}return!(Pt===void 0||ht===void 0||ht>4)&&Ge._coreMouseService.triggerMouseEvent({col:gt.x-33,row:gt.y-33,button:ht,action:Pt,ctrl:pt.ctrlKey,alt:pt.altKey,shift:pt.shiftKey})}var Ue={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ze=function(pt){return We(pt),pt.buttons||(rt._document.removeEventListener("mouseup",Ue.mouseup),Ue.mousedrag&&rt._document.removeEventListener("mousemove",Ue.mousedrag)),rt.cancel(pt)},Je=function(pt){return We(pt),pt.preventDefault(),rt.cancel(pt)},$e=function(pt){pt.buttons&&We(pt)},Qe=function(pt){pt.buttons||We(pt)};this.register(this._coreMouseService.onProtocolChange(function(pt){pt?(rt.optionsService.options.logLevel==="debug"&&rt._logService.debug("Binding to mouse events:",rt._coreMouseService.explainEvents(pt)),rt.element.classList.add("enable-mouse-events"),rt._selectionService.disable()):(rt._logService.debug("Unbinding from mouse events."),rt.element.classList.remove("enable-mouse-events"),rt._selectionService.enable()),8&pt?Ue.mousemove||(ct.addEventListener("mousemove",Qe),Ue.mousemove=Qe):(ct.removeEventListener("mousemove",Ue.mousemove),Ue.mousemove=null),16&pt?Ue.wheel||(ct.addEventListener("wheel",Je,{passive:!1}),Ue.wheel=Je):(ct.removeEventListener("wheel",Ue.wheel),Ue.wheel=null),2&pt?Ue.mouseup||(Ue.mouseup=Ze):(rt._document.removeEventListener("mouseup",Ue.mouseup),Ue.mouseup=null),4&pt?Ue.mousedrag||(Ue.mousedrag=$e):(rt._document.removeEventListener("mousemove",Ue.mousedrag),Ue.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(x.addDisposableDomListener(ct,"mousedown",function(pt){if(pt.preventDefault(),rt.focus(),rt._coreMouseService.areMouseEventsActive&&!rt._selectionService.shouldForceSelection(pt))return We(pt),Ue.mouseup&&rt._document.addEventListener("mouseup",Ue.mouseup),Ue.mousedrag&&rt._document.addEventListener("mousemove",Ue.mousedrag),rt.cancel(pt)})),this.register(x.addDisposableDomListener(ct,"wheel",function(pt){if(!Ue.wheel){if(!rt.buffer.hasScrollback){var ht=rt.viewport.getLinesScrolled(pt);if(ht===0)return;for(var Pt=ue.C0.ESC+(rt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pt.deltaY<0?"A":"B"),gt="",bt=0;bt<Math.abs(ht);bt++)gt+=Pt;rt._coreService.triggerDataEvent(gt,!0)}}},{passive:!0})),this.register(x.addDisposableDomListener(ct,"wheel",function(pt){if(!Ue.wheel)return rt.viewport.onWheel(pt)?void 0:rt.cancel(pt)},{passive:!1})),this.register(x.addDisposableDomListener(ct,"touchstart",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchStart(pt),rt.cancel(pt)},{passive:!0})),this.register(x.addDisposableDomListener(ct,"touchmove",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchMove(pt)?void 0:rt.cancel(pt)},{passive:!1}))},He.prototype.refresh=function(rt,Ge){var ct;(ct=this._renderService)===null||ct===void 0||ct.refreshRows(rt,Ge)},He.prototype._queueLinkification=function(rt,Ge){var ct;(ct=this.linkifier)===null||ct===void 0||ct.linkifyRows(rt,Ge)},He.prototype.updateCursorStyle=function(rt){this._selectionService&&this._selectionService.shouldColumnSelect(rt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},He.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},He.prototype.scrollLines=function(rt,Ge){ot.prototype.scrollLines.call(this,rt,Ge),this.refresh(0,this.rows-1)},He.prototype.paste=function(rt){re.paste(rt,this.textarea,this._coreService)},He.prototype.attachCustomKeyEventHandler=function(rt){this._customKeyEventHandler=rt},He.prototype.registerLinkMatcher=function(rt,Ge,ct){var We=this.linkifier.registerLinkMatcher(rt,Ge,ct);return this.refresh(0,this.rows-1),We},He.prototype.deregisterLinkMatcher=function(rt){this.linkifier.deregisterLinkMatcher(rt)&&this.refresh(0,this.rows-1)},He.prototype.registerLinkProvider=function(rt){return this.linkifier2.registerLinkProvider(rt)},He.prototype.registerCharacterJoiner=function(rt){var Ge=this._renderService.registerCharacterJoiner(rt);return this.refresh(0,this.rows-1),Ge},He.prototype.deregisterCharacterJoiner=function(rt){this._renderService.deregisterCharacterJoiner(rt)&&this.refresh(0,this.rows-1)},Object.defineProperty(He.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),He.prototype.addMarker=function(rt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+rt)},He.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},He.prototype.select=function(rt,Ge,ct){this._selectionService.setSelection(rt,Ge,ct)},He.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},He.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},He.prototype.clearSelection=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.clearSelection()},He.prototype.selectAll=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.selectAll()},He.prototype.selectLines=function(rt,Ge){var ct;(ct=this._selectionService)===null||ct===void 0||ct.selectLines(rt,Ge)},He.prototype._keyDown=function(rt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1)return!1;if(!this._compositionHelper.keydown(rt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var Ge=ve.evaluateKeyboardEvent(rt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(rt),Ge.type===3||Ge.type===2){var ct=this.rows-1;return this.scrollLines(Ge.type===2?-ct:ct),this.cancel(rt,!0)}return Ge.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,rt)||(Ge.cancel&&this.cancel(rt,!0),!Ge.key||(Ge.key!==ue.C0.ETX&&Ge.key!==ue.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Ge.key,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ge.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(rt,!0)))},He.prototype._isThirdLevelShift=function(rt,Ge){var ct=rt.isMac&&!this.options.macOptionIsMeta&&Ge.altKey&&!Ge.ctrlKey&&!Ge.metaKey||rt.isWindows&&Ge.altKey&&Ge.ctrlKey&&!Ge.metaKey;return Ge.type==="keypress"?ct:ct&&(!Ge.keyCode||Ge.keyCode>47)},He.prototype._keyUp=function(rt){this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1||(function(Ge){return Ge.keyCode===16||Ge.keyCode===17||Ge.keyCode===18}(rt)||this.focus(),this.updateCursorStyle(rt))},He.prototype._keyPress=function(rt){var Ge;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1)return!1;if(this.cancel(rt),rt.charCode)Ge=rt.charCode;else if(rt.which===null||rt.which===void 0)Ge=rt.keyCode;else{if(rt.which===0||rt.charCode===0)return!1;Ge=rt.which}return!(!Ge||(rt.altKey||rt.ctrlKey||rt.metaKey)&&!this._isThirdLevelShift(this.browser,rt))&&(Ge=String.fromCharCode(Ge),this._onKey.fire({key:Ge,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ge,!0),!0)},He.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},He.prototype.resize=function(rt,Ge){rt!==this.cols||Ge!==this.rows?ot.prototype.resize.call(this,rt,Ge):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},He.prototype._afterResize=function(rt,Ge){var ct,We;(ct=this._charSizeService)===null||ct===void 0||ct.measure(),(We=this.viewport)===null||We===void 0||We.syncScrollArea(!0)},He.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var rt=1;rt<this.rows;rt++)this.buffer.lines.push(this.buffer.getBlankLine(xe.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},He.prototype.reset=function(){var rt,Ge;this.options.rows=this.rows,this.options.cols=this.cols;var ct=this._customKeyEventHandler;this._setup(),ot.prototype.reset.call(this),(rt=this._selectionService)===null||rt===void 0||rt.reset(),this._customKeyEventHandler=ct,this.refresh(0,this.rows-1),(Ge=this.viewport)===null||Ge===void 0||Ge.syncScrollArea()},He.prototype._reportWindowsOptions=function(rt){if(this._renderService)switch(rt){case ee.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var Ge=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),ct=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(ue.C0.ESC+"[4;"+ct+";"+Ge+"t");break;case ee.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var We=this._renderService.dimensions.scaledCellWidth.toFixed(0),Ue=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(ue.C0.ESC+"[6;"+Ue+";"+We+"t")}},He.prototype.cancel=function(rt,Ge){if(this.options.cancelEvents||Ge)return rt.preventDefault(),rt.stopPropagation(),!1},He.prototype._visualBell=function(){return!1},He.prototype._soundBell=function(){return this.options.bellStyle==="sound"},He}(Pe.CoreTerminal);we.Terminal=Ke},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(ue,ee,te,E){var y,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,te):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(ue,ee,te,E);else for(var ne=ue.length-1;ne>=0;ne--)(y=ue[ne])&&(x=(z<3?y(x):z>3?y(ee,te,x):y(ee,te))||x);return z>3&&x&&Object.defineProperty(ee,te,x),x},Ee=this&&this.__param||function(ue,ee){return function(te,E){ee(te,E,ue)}};Object.defineProperty(we,"__esModule",{value:!0}),we.CompositionHelper=void 0;var ce=de(5),se=de(1),re=function(){function ue(ee,te,E,y,z,x){this._textarea=ee,this._compositionView=te,this._bufferService=E,this._optionsService=y,this._charSizeService=z,this._coreService=x,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(ue.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),ue.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},ue.prototype.compositionupdate=function(ee){var te=this;this._compositionView.textContent=ee.data,this.updateCompositionElements(),setTimeout(function(){te._compositionPosition.end=te._textarea.value.length},0)},ue.prototype.compositionend=function(){this._finalizeComposition(!0)},ue.prototype.keydown=function(ee){if(this._isComposing||this._isSendingComposition){if(ee.keyCode===229||ee.keyCode===16||ee.keyCode===17||ee.keyCode===18)return!1;this._finalizeComposition(!1)}return ee.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},ue.prototype._finalizeComposition=function(ee){var te=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ee){var E={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(te._isSendingComposition){te._isSendingComposition=!1;var z=void 0;z=te._isComposing?te._textarea.value.substring(E.start,E.end):te._textarea.value.substring(E.start),te._coreService.triggerDataEvent(z,!0)}},0)}else{this._isSendingComposition=!1;var y=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(y,!0)}},ue.prototype._handleAnyTextareaChanges=function(){var ee=this,te=this._textarea.value;setTimeout(function(){if(!ee._isComposing){var E=ee._textarea.value.replace(te,"");E.length>0&&ee._coreService.triggerDataEvent(E,!0)}},0)},ue.prototype.updateCompositionElements=function(ee){var te=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var E=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),y=this._bufferService.buffer.y*E,z=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=z+"px",this._compositionView.style.top=y+"px",this._compositionView.style.height=E+"px",this._compositionView.style.lineHeight=E+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var x=this._compositionView.getBoundingClientRect();this._textarea.style.left=z+"px",this._textarea.style.top=y+"px",this._textarea.style.width=x.width+"px",this._textarea.style.height=x.height+"px",this._textarea.style.lineHeight=x.height+"px"}ee||setTimeout(function(){return te.updateCompositionElements(!0)},0)}},ue=ie([Ee(2,se.IBufferService),Ee(3,se.IOptionsService),Ee(4,ce.ICharSizeService),Ee(5,se.ICoreService)],ue)}();we.CompositionHelper=re},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ce=this&&this.__decorate||function(y,z,x,ne){var ae,oe=arguments.length,ge=oe<3?z:ne===null?ne=Object.getOwnPropertyDescriptor(z,x):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(y,z,x,ne);else for(var Se=y.length-1;Se>=0;Se--)(ae=y[Se])&&(ge=(oe<3?ae(ge):oe>3?ae(z,x,ge):ae(z,x))||ge);return oe>3&&ge&&Object.defineProperty(z,x,ge),ge},se=this&&this.__param||function(y,z){return function(x,ne){z(x,ne,y)}};Object.defineProperty(we,"__esModule",{value:!0}),we.Viewport=void 0;var re=de(2),ue=de(7),ee=de(5),te=de(1),E=function(y){function z(x,ne,ae,oe,ge,Se,ve){var be=y.call(this)||this;return be._scrollLines=x,be._viewportElement=ne,be._scrollArea=ae,be._bufferService=oe,be._optionsService=ge,be._charSizeService=Se,be._renderService=ve,be.scrollBarWidth=0,be._currentRowHeight=0,be._lastRecordedBufferLength=0,be._lastRecordedViewportHeight=0,be._lastRecordedBufferHeight=0,be._lastTouchY=0,be._lastScrollTop=0,be._wheelPartialScroll=0,be._refreshAnimationFrame=null,be._ignoreNextScrollEvent=!1,be.scrollBarWidth=be._viewportElement.offsetWidth-be._scrollArea.offsetWidth||15,be.register(ue.addDisposableDomListener(be._viewportElement,"scroll",be._onScroll.bind(be))),setTimeout(function(){return be.syncScrollArea()},0),be}return Ee(z,y),z.prototype.onThemeChange=function(x){this._viewportElement.style.backgroundColor=x.background.css},z.prototype._refresh=function(x){var ne=this;if(x)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return ne._innerRefresh()}))},z.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var ne=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==ne&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=ne),this._refreshAnimationFrame=null},z.prototype.syncScrollArea=function(x){if(x===void 0&&(x=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(x);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var ne=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===ne&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(x)}else this._refresh(x)},z.prototype._onScroll=function(x){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var ne=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(ne,!0)}},z.prototype._bubbleScroll=function(x,ne){var ae=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(ne<0&&this._viewportElement.scrollTop!==0||ne>0&&ae<this._lastRecordedBufferHeight)||(x.cancelable&&x.preventDefault(),!1)},z.prototype.onWheel=function(x){var ne=this._getPixelsScrolled(x);return ne!==0&&(this._viewportElement.scrollTop+=ne,this._bubbleScroll(x,ne))},z.prototype._getPixelsScrolled=function(x){if(x.deltaY===0)return 0;var ne=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_LINE?ne*=this._currentRowHeight:x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ne*=this._currentRowHeight*this._bufferService.rows),ne},z.prototype.getLinesScrolled=function(x){if(x.deltaY===0)return 0;var ne=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(ne/=this._currentRowHeight+0,this._wheelPartialScroll+=ne,ne=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(ne*=this._bufferService.rows),ne},z.prototype._applyScrollModifier=function(x,ne){var ae=this._optionsService.options.fastScrollModifier;return ae==="alt"&&ne.altKey||ae==="ctrl"&&ne.ctrlKey||ae==="shift"&&ne.shiftKey?x*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:x*this._optionsService.options.scrollSensitivity},z.prototype.onTouchStart=function(x){this._lastTouchY=x.touches[0].pageY},z.prototype.onTouchMove=function(x){var ne=this._lastTouchY-x.touches[0].pageY;return this._lastTouchY=x.touches[0].pageY,ne!==0&&(this._viewportElement.scrollTop+=ne,this._bubbleScroll(x,ne))},z=ce([se(3,te.IBufferService),se(4,te.IOptionsService),se(5,ee.ICharSizeService),se(6,ee.IRenderService)],z)}(re.Disposable);we.Viewport=E},function(Ot,we,de){"use strict";function ie(re){return re.replace(/\r?\n/g,"\r")}function Ee(re,ue){return ue?"\x1B[200~"+re+"\x1B[201~":re}function ce(re,ue,ee){re=Ee(re=ie(re),ee.decPrivateModes.bracketedPasteMode),ee.triggerDataEvent(re,!0),ue.value=""}function se(re,ue,ee){var te=ee.getBoundingClientRect(),E=re.clientX-te.left-10,y=re.clientY-te.top-10;ue.style.width="20px",ue.style.height="20px",ue.style.left=E+"px",ue.style.top=y+"px",ue.style.zIndex="1000",ue.focus()}Object.defineProperty(we,"__esModule",{value:!0}),we.rightClickHandler=we.moveTextAreaUnderMouseCursor=we.paste=we.handlePasteEvent=we.copyHandler=we.bracketTextForPaste=we.prepareTextForTerminal=void 0,we.prepareTextForTerminal=ie,we.bracketTextForPaste=Ee,we.copyHandler=function(re,ue){re.clipboardData&&re.clipboardData.setData("text/plain",ue.selectionText),re.preventDefault()},we.handlePasteEvent=function(re,ue,ee){re.stopPropagation(),re.clipboardData&&ce(re.clipboardData.getData("text/plain"),ue,ee)},we.paste=ce,we.moveTextAreaUnderMouseCursor=se,we.rightClickHandler=function(re,ue,ee,te,E){se(re,ue,ee),E&&!te.isClickInSelection(re)&&te.selectWordAtCursor(re),ue.value=te.selectionText,ue.select()}},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(we,"__esModule",{value:!0}),we.EscapeSequenceParser=we.VT500_TRANSITION_TABLE=we.TransitionTable=void 0;var ce=de(2),se=de(15),re=de(21),ue=de(22),ee=de(24),te=function(){function y(z){this.table=new Uint8Array(z)}return y.prototype.setDefault=function(z,x){se.fill(this.table,z<<4|x)},y.prototype.add=function(z,x,ne,ae){this.table[x<<8|z]=ne<<4|ae},y.prototype.addMany=function(z,x,ne,ae){for(var oe=0;oe<z.length;oe++)this.table[x<<8|z[oe]]=ne<<4|ae},y}();we.TransitionTable=te,we.VT500_TRANSITION_TABLE=function(){var y=new te(4095),z=Array.apply(null,Array(256)).map(function(Se,ve){return ve}),x=function(Se,ve){return z.slice(Se,ve)},ne=x(32,127),ae=x(0,24);ae.push(25),ae.push.apply(ae,x(28,32));var oe,ge=x(0,14);for(oe in y.setDefault(1,0),y.addMany(ne,0,2,0),ge)y.addMany([24,26,153,154],oe,3,0),y.addMany(x(128,144),oe,3,0),y.addMany(x(144,152),oe,3,0),y.add(156,oe,0,0),y.add(27,oe,11,1),y.add(157,oe,4,8),y.addMany([152,158,159],oe,0,7),y.add(155,oe,11,3),y.add(144,oe,11,9);return y.addMany(ae,0,3,0),y.addMany(ae,1,3,1),y.add(127,1,0,1),y.addMany(ae,8,0,8),y.addMany(ae,3,3,3),y.add(127,3,0,3),y.addMany(ae,4,3,4),y.add(127,4,0,4),y.addMany(ae,6,3,6),y.addMany(ae,5,3,5),y.add(127,5,0,5),y.addMany(ae,2,3,2),y.add(127,2,0,2),y.add(93,1,4,8),y.addMany(ne,8,5,8),y.add(127,8,5,8),y.addMany([156,27,24,26,7],8,6,0),y.addMany(x(28,32),8,0,8),y.addMany([88,94,95],1,0,7),y.addMany(ne,7,0,7),y.addMany(ae,7,0,7),y.add(156,7,0,0),y.add(127,7,0,7),y.add(91,1,11,3),y.addMany(x(64,127),3,7,0),y.addMany(x(48,60),3,8,4),y.addMany([60,61,62,63],3,9,4),y.addMany(x(48,60),4,8,4),y.addMany(x(64,127),4,7,0),y.addMany([60,61,62,63],4,0,6),y.addMany(x(32,64),6,0,6),y.add(127,6,0,6),y.addMany(x(64,127),6,0,0),y.addMany(x(32,48),3,9,5),y.addMany(x(32,48),5,9,5),y.addMany(x(48,64),5,0,6),y.addMany(x(64,127),5,7,0),y.addMany(x(32,48),4,9,5),y.addMany(x(32,48),1,9,2),y.addMany(x(32,48),2,9,2),y.addMany(x(48,127),2,10,0),y.addMany(x(48,80),1,10,0),y.addMany(x(81,88),1,10,0),y.addMany([89,90,92],1,10,0),y.addMany(x(96,127),1,10,0),y.add(80,1,11,9),y.addMany(ae,9,0,9),y.add(127,9,0,9),y.addMany(x(28,32),9,0,9),y.addMany(x(32,48),9,9,12),y.addMany(x(48,60),9,8,10),y.addMany([60,61,62,63],9,9,10),y.addMany(ae,11,0,11),y.addMany(x(32,128),11,0,11),y.addMany(x(28,32),11,0,11),y.addMany(ae,10,0,10),y.add(127,10,0,10),y.addMany(x(28,32),10,0,10),y.addMany(x(48,60),10,8,10),y.addMany([60,61,62,63],10,0,11),y.addMany(x(32,48),10,9,12),y.addMany(ae,12,0,12),y.add(127,12,0,12),y.addMany(x(28,32),12,0,12),y.addMany(x(32,48),12,9,12),y.addMany(x(48,64),12,0,11),y.addMany(x(64,127),12,12,13),y.addMany(x(64,127),10,12,13),y.addMany(x(64,127),9,12,13),y.addMany(ae,13,13,13),y.addMany(ne,13,13,13),y.add(127,13,0,13),y.addMany([27,156,24,26],13,14,0),y.add(160,0,2,0),y.add(160,8,5,8),y.add(160,6,0,6),y.add(160,11,0,11),y.add(160,13,13,13),y}();var E=function(y){function z(x){x===void 0&&(x=we.VT500_TRANSITION_TABLE);var ne=y.call(this)||this;return ne._transitions=x,ne.initialState=0,ne.currentState=ne.initialState,ne._params=new re.Params,ne._params.addParam(0),ne._collect=0,ne.precedingCodepoint=0,ne._printHandlerFb=function(ae,oe,ge){},ne._executeHandlerFb=function(ae){},ne._csiHandlerFb=function(ae,oe){},ne._escHandlerFb=function(ae){},ne._errorHandlerFb=function(ae){return ae},ne._printHandler=ne._printHandlerFb,ne._executeHandlers=Object.create(null),ne._csiHandlers=Object.create(null),ne._escHandlers=Object.create(null),ne._oscParser=new ue.OscParser,ne._dcsParser=new ee.DcsParser,ne._errorHandler=ne._errorHandlerFb,ne.setEscHandler({final:"\\"},function(){}),ne}return Ee(z,y),z.prototype._identifier=function(x,ne){ne===void 0&&(ne=[64,126]);var ae=0;if(x.prefix){if(x.prefix.length>1)throw new Error("only one byte as prefix supported");if((ae=x.prefix.charCodeAt(0))&&60>ae||ae>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(x.intermediates){if(x.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var oe=0;oe<x.intermediates.length;++oe){var ge=x.intermediates.charCodeAt(oe);if(32>ge||ge>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ae<<=8,ae|=ge}}if(x.final.length!==1)throw new Error("final must be a single byte");var Se=x.final.charCodeAt(0);if(ne[0]>Se||Se>ne[1])throw new Error("final must be in range "+ne[0]+" .. "+ne[1]);return ae<<=8,ae|=Se},z.prototype.identToString=function(x){for(var ne=[];x;)ne.push(String.fromCharCode(255&x)),x>>=8;return ne.reverse().join("")},z.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},z.prototype.setPrintHandler=function(x){this._printHandler=x},z.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},z.prototype.addEscHandler=function(x,ne){var ae=this._identifier(x,[48,126]);this._escHandlers[ae]===void 0&&(this._escHandlers[ae]=[]);var oe=this._escHandlers[ae];return oe.push(ne),{dispose:function(){var ge=oe.indexOf(ne);ge!==-1&&oe.splice(ge,1)}}},z.prototype.setEscHandler=function(x,ne){this._escHandlers[this._identifier(x,[48,126])]=[ne]},z.prototype.clearEscHandler=function(x){this._escHandlers[this._identifier(x,[48,126])]&&delete this._escHandlers[this._identifier(x,[48,126])]},z.prototype.setEscHandlerFallback=function(x){this._escHandlerFb=x},z.prototype.setExecuteHandler=function(x,ne){this._executeHandlers[x.charCodeAt(0)]=ne},z.prototype.clearExecuteHandler=function(x){this._executeHandlers[x.charCodeAt(0)]&&delete this._executeHandlers[x.charCodeAt(0)]},z.prototype.setExecuteHandlerFallback=function(x){this._executeHandlerFb=x},z.prototype.addCsiHandler=function(x,ne){var ae=this._identifier(x);this._csiHandlers[ae]===void 0&&(this._csiHandlers[ae]=[]);var oe=this._csiHandlers[ae];return oe.push(ne),{dispose:function(){var ge=oe.indexOf(ne);ge!==-1&&oe.splice(ge,1)}}},z.prototype.setCsiHandler=function(x,ne){this._csiHandlers[this._identifier(x)]=[ne]},z.prototype.clearCsiHandler=function(x){this._csiHandlers[this._identifier(x)]&&delete this._csiHandlers[this._identifier(x)]},z.prototype.setCsiHandlerFallback=function(x){this._csiHandlerFb=x},z.prototype.addDcsHandler=function(x,ne){return this._dcsParser.addHandler(this._identifier(x),ne)},z.prototype.setDcsHandler=function(x,ne){this._dcsParser.setHandler(this._identifier(x),ne)},z.prototype.clearDcsHandler=function(x){this._dcsParser.clearHandler(this._identifier(x))},z.prototype.setDcsHandlerFallback=function(x){this._dcsParser.setHandlerFallback(x)},z.prototype.addOscHandler=function(x,ne){return this._oscParser.addHandler(x,ne)},z.prototype.setOscHandler=function(x,ne){this._oscParser.setHandler(x,ne)},z.prototype.clearOscHandler=function(x){this._oscParser.clearHandler(x)},z.prototype.setOscHandlerFallback=function(x){this._oscParser.setHandlerFallback(x)},z.prototype.setErrorHandler=function(x){this._errorHandler=x},z.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},z.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},z.prototype.parse=function(x,ne){for(var ae=0,oe=0,ge=this.currentState,Se=this._oscParser,ve=this._dcsParser,be=this._collect,xe=this._params,pe=this._transitions.table,me=0;me<ne;++me){switch((oe=pe[ge<<8|((ae=x[me])<160?ae:160)])>>4){case 2:for(var Ae=me+1;;++Ae){if(Ae>=ne||(ae=x[Ae])<32||ae>126&&ae<160){this._printHandler(x,me,Ae),me=Ae-1;break}if(++Ae>=ne||(ae=x[Ae])<32||ae>126&&ae<160){this._printHandler(x,me,Ae),me=Ae-1;break}if(++Ae>=ne||(ae=x[Ae])<32||ae>126&&ae<160){this._printHandler(x,me,Ae),me=Ae-1;break}if(++Ae>=ne||(ae=x[Ae])<32||ae>126&&ae<160){this._printHandler(x,me,Ae),me=Ae-1;break}}break;case 3:this._executeHandlers[ae]?this._executeHandlers[ae]():this._executeHandlerFb(ae),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:me,code:ae,currentState:ge,collect:be,params:xe,abort:!1}).abort)return;break;case 7:for(var De=this._csiHandlers[be<<8|ae],ke=De?De.length-1:-1;ke>=0&&De[ke](xe)===!1;ke--);ke<0&&this._csiHandlerFb(be<<8|ae,xe),this.precedingCodepoint=0;break;case 8:do switch(ae){case 59:xe.addParam(0);break;case 58:xe.addSubParam(-1);break;default:xe.addDigit(ae-48)}while(++me<ne&&(ae=x[me])>47&&ae<60);me--;break;case 9:be<<=8,be|=ae;break;case 10:for(var Ie=this._escHandlers[be<<8|ae],Fe=Ie?Ie.length-1:-1;Fe>=0&&Ie[Fe]()===!1;Fe--);Fe<0&&this._escHandlerFb(be<<8|ae),this.precedingCodepoint=0;break;case 11:xe.reset(),xe.addParam(0),be=0;break;case 12:ve.hook(be<<8|ae,xe);break;case 13:for(var Pe=me+1;;++Pe)if(Pe>=ne||(ae=x[Pe])===24||ae===26||ae===27||ae>127&&ae<160){ve.put(x,me,Pe),me=Pe-1;break}break;case 14:ve.unhook(ae!==24&&ae!==26),ae===27&&(oe|=1),xe.reset(),xe.addParam(0),be=0,this.precedingCodepoint=0;break;case 4:Se.start();break;case 5:for(var qe=me+1;;qe++)if(qe>=ne||(ae=x[qe])<32||ae>127&&ae<=159){Se.put(x,me,qe),me=qe-1;break}break;case 6:Se.end(ae!==24&&ae!==26),ae===27&&(oe|=1),xe.reset(),xe.addParam(0),be=0,this.precedingCodepoint=0}ge=15&oe}this._collect=be,this.currentState=ge},z}(ce.Disposable);we.EscapeSequenceParser=E},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(Se,ve){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,xe){be.__proto__=xe}||function(be,xe){for(var pe in xe)xe.hasOwnProperty(pe)&&(be[pe]=xe[pe])})(Se,ve)},function(Se,ve){function be(){this.constructor=Se}ie(Se,ve),Se.prototype=ve===null?Object.create(ve):(be.prototype=ve.prototype,new be)}),ce=this&&this.__decorate||function(Se,ve,be,xe){var pe,me=arguments.length,Ae=me<3?ve:xe===null?xe=Object.getOwnPropertyDescriptor(ve,be):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(Se,ve,be,xe);else for(var De=Se.length-1;De>=0;De--)(pe=Se[De])&&(Ae=(me<3?pe(Ae):me>3?pe(ve,be,Ae):pe(ve,be))||Ae);return me>3&&Ae&&Object.defineProperty(ve,be,Ae),Ae},se=this&&this.__param||function(Se,ve){return function(be,xe){ve(be,xe,Se)}};Object.defineProperty(we,"__esModule",{value:!0}),we.Renderer=void 0;var re=de(41),ue=de(47),ee=de(48),te=de(49),E=de(29),y=de(2),z=de(5),x=de(1),ne=de(25),ae=de(0),oe=1,ge=function(Se){function ve(be,xe,pe,me,Ae,De,ke,Ie,Fe){var Pe=Se.call(this)||this;Pe._colors=be,Pe._screenElement=xe,Pe._bufferService=Ae,Pe._charSizeService=De,Pe._optionsService=ke,Pe._id=oe++,Pe._onRequestRedraw=new ae.EventEmitter;var qe=Pe._optionsService.options.allowTransparency;return Pe._characterJoinerRegistry=new E.CharacterJoinerRegistry(Pe._bufferService),Pe._renderLayers=[new re.TextRenderLayer(Pe._screenElement,0,Pe._colors,Pe._characterJoinerRegistry,qe,Pe._id,Pe._bufferService,ke),new ue.SelectionRenderLayer(Pe._screenElement,1,Pe._colors,Pe._id,Pe._bufferService,ke),new te.LinkRenderLayer(Pe._screenElement,2,Pe._colors,Pe._id,pe,me,Pe._bufferService,ke),new ee.CursorRenderLayer(Pe._screenElement,3,Pe._colors,Pe._id,Pe._onRequestRedraw,Pe._bufferService,ke,Ie,Fe)],Pe.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Pe._devicePixelRatio=window.devicePixelRatio,Pe._updateDimensions(),Pe.onOptionsChanged(),Pe}return Ee(ve,Se),Object.defineProperty(ve.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){for(var be=0,xe=this._renderLayers;be<xe.length;be++)xe[be].dispose();Se.prototype.dispose.call(this),ne.removeTerminalFromCache(this._id)},ve.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},ve.prototype.setColors=function(be){this._colors=be;for(var xe=0,pe=this._renderLayers;xe<pe.length;xe++){var me=pe[xe];me.setColors(this._colors),me.reset()}},ve.prototype.onResize=function(be,xe){this._updateDimensions();for(var pe=0,me=this._renderLayers;pe<me.length;pe++)me[pe].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ve.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},ve.prototype.onBlur=function(){this._runOperation(function(be){return be.onBlur()})},ve.prototype.onFocus=function(){this._runOperation(function(be){return be.onFocus()})},ve.prototype.onSelectionChanged=function(be,xe,pe){pe===void 0&&(pe=!1),this._runOperation(function(me){return me.onSelectionChanged(be,xe,pe)})},ve.prototype.onCursorMove=function(){this._runOperation(function(be){return be.onCursorMove()})},ve.prototype.onOptionsChanged=function(){this._runOperation(function(be){return be.onOptionsChanged()})},ve.prototype.clear=function(){this._runOperation(function(be){return be.reset()})},ve.prototype._runOperation=function(be){for(var xe=0,pe=this._renderLayers;xe<pe.length;xe++)be(pe[xe])},ve.prototype.renderRows=function(be,xe){for(var pe=0,me=this._renderLayers;pe<me.length;pe++)me[pe].onGridChanged(be,xe)},ve.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},ve.prototype.registerCharacterJoiner=function(be){return this._characterJoinerRegistry.registerCharacterJoiner(be)},ve.prototype.deregisterCharacterJoiner=function(be){return this._characterJoinerRegistry.deregisterCharacterJoiner(be)},ve=ce([se(4,x.IBufferService),se(5,z.ICharSizeService),se(6,x.IOptionsService),se(7,x.ICoreService),se(8,z.ICoreBrowserService)],ve)}(y.Disposable);we.Renderer=ge},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(we,"__esModule",{value:!0}),we.TextRenderLayer=void 0;var ce=de(42),se=de(13),re=de(6),ue=de(3),ee=de(29),te=de(4),E=function(y){function z(x,ne,ae,oe,ge,Se,ve,be){var xe=y.call(this,x,"text",ne,ge,ae,Se,ve,be)||this;return xe._characterWidth=0,xe._characterFont="",xe._characterOverlapCache={},xe._workCell=new te.CellData,xe._state=new ce.GridCache,xe._characterJoinerRegistry=oe,xe}return Ee(z,y),z.prototype.resize=function(x){y.prototype.resize.call(this,x);var ne=this._getFont(!1,!1);this._characterWidth===x.scaledCharWidth&&this._characterFont===ne||(this._characterWidth=x.scaledCharWidth,this._characterFont=ne,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},z.prototype.reset=function(){this._state.clear(),this._clearAll()},z.prototype._forEachCell=function(x,ne,ae,oe){for(var ge=x;ge<=ne;ge++)for(var Se=ge+this._bufferService.buffer.ydisp,ve=this._bufferService.buffer.lines.get(Se),be=ae?ae.getJoinedCharacters(Se):[],xe=0;xe<this._bufferService.cols;xe++){ve.loadCell(xe,this._workCell);var pe=this._workCell,me=!1,Ae=xe;if(pe.getWidth()!==0){if(be.length>0&&xe===be[0][0]){me=!0;var De=be.shift();pe=new ee.JoinedCellData(this._workCell,ve.translateToString(!0,De[0],De[1]),De[1]-De[0]),Ae=De[1]-1}!me&&this._isOverlapping(pe)&&Ae<ve.length-1&&ve.getCodePoint(Ae+1)===ue.NULL_CELL_CODE&&(pe.content&=-12582913,pe.content|=2<<22),oe(pe,xe,ge),xe=Ae}}},z.prototype._drawBackground=function(x,ne){var ae=this,oe=this._ctx,ge=this._bufferService.cols,Se=0,ve=0,be=null;oe.save(),this._forEachCell(x,ne,null,function(xe,pe,me){var Ae=null;xe.isInverse()?Ae=xe.isFgDefault()?ae._colors.foreground.css:xe.isFgRGB()?"rgb("+re.AttributeData.toColorRGB(xe.getFgColor()).join(",")+")":ae._colors.ansi[xe.getFgColor()].css:xe.isBgRGB()?Ae="rgb("+re.AttributeData.toColorRGB(xe.getBgColor()).join(",")+")":xe.isBgPalette()&&(Ae=ae._colors.ansi[xe.getBgColor()].css),be===null&&(Se=pe,ve=me),me!==ve?(oe.fillStyle=be||"",ae._fillCells(Se,ve,ge-Se,1),Se=pe,ve=me):be!==Ae&&(oe.fillStyle=be||"",ae._fillCells(Se,ve,pe-Se,1),Se=pe,ve=me),be=Ae}),be!==null&&(oe.fillStyle=be,this._fillCells(Se,ve,ge-Se,1)),oe.restore()},z.prototype._drawForeground=function(x,ne){var ae=this;this._forEachCell(x,ne,this._characterJoinerRegistry,function(oe,ge,Se){if(!oe.isInvisible()&&(ae._drawChars(oe,ge,Se),oe.isUnderline())){if(ae._ctx.save(),oe.isInverse())if(oe.isBgDefault())ae._ctx.fillStyle=ae._colors.background.css;else if(oe.isBgRGB())ae._ctx.fillStyle="rgb("+re.AttributeData.toColorRGB(oe.getBgColor()).join(",")+")";else{var ve=oe.getBgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&ve<8&&(ve+=8),ae._ctx.fillStyle=ae._colors.ansi[ve].css}else if(oe.isFgDefault())ae._ctx.fillStyle=ae._colors.foreground.css;else if(oe.isFgRGB())ae._ctx.fillStyle="rgb("+re.AttributeData.toColorRGB(oe.getFgColor()).join(",")+")";else{var be=oe.getFgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&be<8&&(be+=8),ae._ctx.fillStyle=ae._colors.ansi[be].css}ae._fillBottomLineAtCells(ge,Se,oe.getWidth()),ae._ctx.restore()}})},z.prototype.onGridChanged=function(x,ne){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,x,this._bufferService.cols,ne-x+1),this._drawBackground(x,ne),this._drawForeground(x,ne))},z.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},z.prototype._isOverlapping=function(x){if(x.getWidth()!==1||x.getCode()<256)return!1;var ne=x.getChars();if(this._characterOverlapCache.hasOwnProperty(ne))return this._characterOverlapCache[ne];this._ctx.save(),this._ctx.font=this._characterFont;var ae=Math.floor(this._ctx.measureText(ne).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[ne]=ae,ae},z}(se.BaseRenderLayer);we.TextRenderLayer=E},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.GridCache=void 0;var ie=function(){function Ee(){this.cache=[]}return Ee.prototype.resize=function(ce,se){for(var re=0;re<ce;re++){this.cache.length<=re&&this.cache.push([]);for(var ue=this.cache[re].length;ue<se;ue++)this.cache[re].push(void 0);this.cache[re].length=se}this.cache.length=ce},Ee.prototype.clear=function(){for(var ce=0;ce<this.cache.length;ce++)for(var se=0;se<this.cache[ce].length;se++)this.cache[ce][se]=void 0},Ee}();we.GridCache=ie},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ae,oe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,Se){ge.__proto__=Se}||function(ge,Se){for(var ve in Se)Se.hasOwnProperty(ve)&&(ge[ve]=Se[ve])})(ae,oe)},function(ae,oe){function ge(){this.constructor=ae}ie(ae,oe),ae.prototype=oe===null?Object.create(oe):(ge.prototype=oe.prototype,new ge)});Object.defineProperty(we,"__esModule",{value:!0}),we.NoneCharAtlas=we.DynamicCharAtlas=we.getGlyphCacheKey=void 0;var ce=de(9),se=de(44),re=de(27),ue=de(46),ee=de(11),te=de(28),E=de(10),y={css:"rgba(0, 0, 0, 0)",rgba:0};function z(ae){return ae.code<<21|ae.bg<<12|ae.fg<<3|(ae.bold?0:4)+(ae.dim?0:2)+(ae.italic?0:1)}we.getGlyphCacheKey=z;var x=function(ae){function oe(ge,Se){var ve=ae.call(this)||this;ve._config=Se,ve._drawToCacheCount=0,ve._glyphsWaitingOnBitmap=[],ve._bitmapCommitTimeout=null,ve._bitmap=null,ve._cacheCanvas=ge.createElement("canvas"),ve._cacheCanvas.width=1024,ve._cacheCanvas.height=1024,ve._cacheCtx=te.throwIfFalsy(ve._cacheCanvas.getContext("2d",{alpha:!0}));var be=ge.createElement("canvas");be.width=ve._config.scaledCharWidth,be.height=ve._config.scaledCharHeight,ve._tmpCtx=te.throwIfFalsy(be.getContext("2d",{alpha:ve._config.allowTransparency})),ve._width=Math.floor(1024/ve._config.scaledCharWidth),ve._height=Math.floor(1024/ve._config.scaledCharHeight);var xe=ve._width*ve._height;return ve._cacheMap=new ue.LRUMap(xe),ve._cacheMap.prealloc(xe),ve}return Ee(oe,ae),oe.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},oe.prototype.beginFrame=function(){this._drawToCacheCount=0},oe.prototype.draw=function(ge,Se,ve,be){if(Se.code===32)return!0;if(!this._canCache(Se))return!1;var xe=z(Se),pe=this._cacheMap.get(xe);if(pe!=null)return this._drawFromCache(ge,pe,ve,be),!0;if(this._drawToCacheCount<100){var me=void 0;me=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var Ae=this._drawToCache(Se,me);return this._cacheMap.set(xe,Ae),this._drawFromCache(ge,Ae,ve,be),!0}return!1},oe.prototype._canCache=function(ge){return ge.code<256},oe.prototype._toCoordinateX=function(ge){return ge%this._width*this._config.scaledCharWidth},oe.prototype._toCoordinateY=function(ge){return Math.floor(ge/this._width)*this._config.scaledCharHeight},oe.prototype._drawFromCache=function(ge,Se,ve,be){if(!Se.isEmpty){var xe=this._toCoordinateX(Se.index),pe=this._toCoordinateY(Se.index);ge.drawImage(Se.inBitmap?this._bitmap:this._cacheCanvas,xe,pe,this._config.scaledCharWidth,this._config.scaledCharHeight,ve,be,this._config.scaledCharWidth,this._config.scaledCharHeight)}},oe.prototype._getColorFromAnsiIndex=function(ge){return ge<this._config.colors.ansi.length?this._config.colors.ansi[ge]:re.DEFAULT_ANSI_COLORS[ge]},oe.prototype._getBackgroundColor=function(ge){return this._config.allowTransparency?y:ge.bg===ce.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:ge.bg<256?this._getColorFromAnsiIndex(ge.bg):this._config.colors.background},oe.prototype._getForegroundColor=function(ge){return ge.fg===ce.INVERTED_DEFAULT_COLOR?E.color.opaque(this._config.colors.background):ge.fg<256?this._getColorFromAnsiIndex(ge.fg):this._config.colors.foreground},oe.prototype._drawToCache=function(ge,Se){this._drawToCacheCount++,this._tmpCtx.save();var ve=this._getBackgroundColor(ge);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=ve.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var be=ge.bold?this._config.fontWeightBold:this._config.fontWeight,xe=ge.italic?"italic":"";this._tmpCtx.font=xe+" "+be+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(ge).css,ge.dim&&(this._tmpCtx.globalAlpha=ce.DIM_OPACITY),this._tmpCtx.fillText(ge.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var pe=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),me=!1;this._config.allowTransparency||(me=function(Ie,Fe){for(var Pe=!0,qe=Fe.rgba>>>24,Ke=Fe.rgba>>>16&255,ot=Fe.rgba>>>8&255,He=0;He<Ie.data.length;He+=4)Ie.data[He]===qe&&Ie.data[He+1]===Ke&&Ie.data[He+2]===ot?Ie.data[He+3]=0:Pe=!1;return Pe}(pe,ve));var Ae=this._toCoordinateX(Se),De=this._toCoordinateY(Se);this._cacheCtx.putImageData(pe,Ae,De);var ke={index:Se,isEmpty:me,inBitmap:!1};return this._addGlyphToBitmap(ke),ke},oe.prototype._addGlyphToBitmap=function(ge){var Se=this;!("createImageBitmap"in window)||ee.isFirefox||ee.isSafari||(this._glyphsWaitingOnBitmap.push(ge),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return Se._generateBitmap()},100)))},oe.prototype._generateBitmap=function(){var ge=this,Se=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(ve){ge._bitmap=ve;for(var be=0;be<Se.length;be++)Se[be].inBitmap=!0}),this._bitmapCommitTimeout=null},oe}(se.BaseCharAtlas);we.DynamicCharAtlas=x;var ne=function(ae){function oe(ge,Se){return ae.call(this)||this}return Ee(oe,ae),oe.prototype.draw=function(ge,Se,ve,be){return!1},oe}(se.BaseCharAtlas);we.NoneCharAtlas=ne},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.BaseCharAtlas=void 0;var ie=function(){function Ee(){this._didWarmUp=!1}return Ee.prototype.dispose=function(){},Ee.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Ee.prototype._doWarmUp=function(){},Ee.prototype.beginFrame=function(){},Ee}();we.BaseCharAtlas=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.ColorContrastCache=void 0;var ie=function(){function Ee(){this._color={},this._rgba={}}return Ee.prototype.clear=function(){this._color={},this._rgba={}},Ee.prototype.setCss=function(ce,se,re){this._rgba[ce]||(this._rgba[ce]={}),this._rgba[ce][se]=re},Ee.prototype.getCss=function(ce,se){return this._rgba[ce]?this._rgba[ce][se]:void 0},Ee.prototype.setColor=function(ce,se,re){this._color[ce]||(this._color[ce]={}),this._color[ce][se]=re},Ee.prototype.getColor=function(ce,se){return this._color[ce]?this._color[ce][se]:void 0},Ee}();we.ColorContrastCache=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.LRUMap=void 0;var ie=function(){function Ee(ce){this.capacity=ce,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Ee.prototype._unlinkNode=function(ce){var se=ce.prev,re=ce.next;ce===this._head&&(this._head=re),ce===this._tail&&(this._tail=se),se!==null&&(se.next=re),re!==null&&(re.prev=se)},Ee.prototype._appendNode=function(ce){var se=this._tail;se!==null&&(se.next=ce),ce.prev=se,ce.next=null,this._tail=ce,this._head===null&&(this._head=ce)},Ee.prototype.prealloc=function(ce){for(var se=this._nodePool,re=0;re<ce;re++)se.push({prev:null,next:null,key:null,value:null})},Ee.prototype.get=function(ce){var se=this._map[ce];return se!==void 0?(this._unlinkNode(se),this._appendNode(se),se.value):null},Ee.prototype.peekValue=function(ce){var se=this._map[ce];return se!==void 0?se.value:null},Ee.prototype.peek=function(){var ce=this._head;return ce===null?null:ce.value},Ee.prototype.set=function(ce,se){var re=this._map[ce];if(re!==void 0)re=this._map[ce],this._unlinkNode(re),re.value=se;else if(this.size>=this.capacity)re=this._head,this._unlinkNode(re),delete this._map[re.key],re.key=ce,re.value=se,this._map[ce]=re;else{var ue=this._nodePool;ue.length>0?((re=ue.pop()).key=ce,re.value=se):re={prev:null,next:null,key:ce,value:se},this._map[ce]=re,this.size++}this._appendNode(re)},Ee}();we.LRUMap=ie},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(se,re){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ue,ee){ue.__proto__=ee}||function(ue,ee){for(var te in ee)ee.hasOwnProperty(te)&&(ue[te]=ee[te])})(se,re)},function(se,re){function ue(){this.constructor=se}ie(se,re),se.prototype=re===null?Object.create(re):(ue.prototype=re.prototype,new ue)});Object.defineProperty(we,"__esModule",{value:!0}),we.SelectionRenderLayer=void 0;var ce=function(se){function re(ue,ee,te,E,y,z){var x=se.call(this,ue,"selection",ee,!0,te,E,y,z)||this;return x._clearState(),x}return Ee(re,se),re.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},re.prototype.resize=function(ue){se.prototype.resize.call(this,ue),this._clearState()},re.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},re.prototype.onSelectionChanged=function(ue,ee,te){if(this._didStateChange(ue,ee,te,this._bufferService.buffer.ydisp))if(this._clearAll(),ue&&ee){var E=ue[1]-this._bufferService.buffer.ydisp,y=ee[1]-this._bufferService.buffer.ydisp,z=Math.max(E,0),x=Math.min(y,this._bufferService.rows-1);if(!(z>=this._bufferService.rows||x<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,te){var ne=ue[0],ae=ee[0]-ne,oe=x-z+1;this._fillCells(ne,z,ae,oe)}else{ne=E===z?ue[0]:0;var ge=z===x?ee[0]:this._bufferService.cols;this._fillCells(ne,z,ge-ne,1);var Se=Math.max(x-z-1,0);if(this._fillCells(0,z+1,this._bufferService.cols,Se),z!==x){var ve=y===x?ee[0]:this._bufferService.cols;this._fillCells(0,x,ve,1)}}this._state.start=[ue[0],ue[1]],this._state.end=[ee[0],ee[1]],this._state.columnSelectMode=te,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},re.prototype._didStateChange=function(ue,ee,te,E){return!this._areCoordinatesEqual(ue,this._state.start)||!this._areCoordinatesEqual(ee,this._state.end)||te!==this._state.columnSelectMode||E!==this._state.ydisp},re.prototype._areCoordinatesEqual=function(ue,ee){return!(!ue||!ee)&&ue[0]===ee[0]&&ue[1]===ee[1]},re}(de(13).BaseRenderLayer);we.SelectionRenderLayer=ce},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ee,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,y){E.__proto__=y}||function(E,y){for(var z in y)y.hasOwnProperty(z)&&(E[z]=y[z])})(ee,te)},function(ee,te){function E(){this.constructor=ee}ie(ee,te),ee.prototype=te===null?Object.create(te):(E.prototype=te.prototype,new E)});Object.defineProperty(we,"__esModule",{value:!0}),we.CursorRenderLayer=void 0;var ce=de(13),se=de(4),re=function(ee){function te(E,y,z,x,ne,ae,oe,ge,Se){var ve=ee.call(this,E,"cursor",y,!0,z,x,ae,oe)||this;return ve._onRequestRedraw=ne,ve._coreService=ge,ve._coreBrowserService=Se,ve._cell=new se.CellData,ve._state={x:0,y:0,isFocused:!1,style:"",width:0},ve._cursorRenderers={bar:ve._renderBarCursor.bind(ve),block:ve._renderBlockCursor.bind(ve),underline:ve._renderUnderlineCursor.bind(ve)},ve}return Ee(te,ee),te.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},te.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},te.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},te.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},te.prototype.onOptionsChanged=function(){var E,y=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new ue(this._coreBrowserService.isFocused,function(){y._render(!0)})):((E=this._cursorBlinkStateManager)===null||E===void 0||E.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},te.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},te.prototype.onGridChanged=function(E,y){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},te.prototype._render=function(E){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var y=this._bufferService.buffer.ybase+this._bufferService.buffer.y,z=y-this._bufferService.buffer.ydisp;if(z<0||z>=this._bufferService.rows)this._clearCursor();else{var x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(y).loadCell(x,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var ne=this._optionsService.options.cursorStyle;return ne&&ne!=="block"?this._cursorRenderers[ne](x,z,this._cell):this._renderBlurCursor(x,z,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=z,this._state.isFocused=!1,this._state.style=ne,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===x&&this._state.y===z&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](x,z,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=z,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},te.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},te.prototype._renderBarCursor=function(E,y,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(E,y,this._optionsService.options.cursorWidth),this._ctx.restore()},te.prototype._renderBlockCursor=function(E,y,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(E,y,z.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(z,E,y),this._ctx.restore()},te.prototype._renderUnderlineCursor=function(E,y,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(E,y),this._ctx.restore()},te.prototype._renderBlurCursor=function(E,y,z){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(E,y,z.getWidth(),1),this._ctx.restore()},te}(ce.BaseRenderLayer);we.CursorRenderLayer=re;var ue=function(){function ee(te,E){this._renderCallback=E,this.isCursorVisible=!0,te&&this._restartInterval()}return Object.defineProperty(ee.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ee.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ee.prototype.restartBlinkAnimation=function(){var te=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){te._renderCallback(),te._animationFrame=void 0})))},ee.prototype._restartInterval=function(te){var E=this;te===void 0&&(te=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(E._animationTimeRestarted){var y=600-(Date.now()-E._animationTimeRestarted);if(E._animationTimeRestarted=void 0,y>0)return void E._restartInterval(y)}E.isCursorVisible=!1,E._animationFrame=window.requestAnimationFrame(function(){E._renderCallback(),E._animationFrame=void 0}),E._blinkInterval=window.setInterval(function(){if(E._animationTimeRestarted){var z=600-(Date.now()-E._animationTimeRestarted);return E._animationTimeRestarted=void 0,void E._restartInterval(z)}E.isCursorVisible=!E.isCursorVisible,E._animationFrame=window.requestAnimationFrame(function(){E._renderCallback(),E._animationFrame=void 0})},600)},te)},ee.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ee.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ee}()},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ee,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,y){E.__proto__=y}||function(E,y){for(var z in y)y.hasOwnProperty(z)&&(E[z]=y[z])})(ee,te)},function(ee,te){function E(){this.constructor=ee}ie(ee,te),ee.prototype=te===null?Object.create(te):(E.prototype=te.prototype,new E)});Object.defineProperty(we,"__esModule",{value:!0}),we.LinkRenderLayer=void 0;var ce=de(13),se=de(9),re=de(26),ue=function(ee){function te(E,y,z,x,ne,ae,oe,ge){var Se=ee.call(this,E,"link",y,!0,z,x,oe,ge)||this;return ne.onShowLinkUnderline(function(ve){return Se._onShowLinkUnderline(ve)}),ne.onHideLinkUnderline(function(ve){return Se._onHideLinkUnderline(ve)}),ae.onShowLinkUnderline(function(ve){return Se._onShowLinkUnderline(ve)}),ae.onHideLinkUnderline(function(ve){return Se._onHideLinkUnderline(ve)}),Se}return Ee(te,ee),te.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state=void 0},te.prototype.reset=function(){this._clearCurrentLink()},te.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var E=this._state.y2-this._state.y1-1;E>0&&this._clearCells(0,this._state.y1+1,this._state.cols,E),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},te.prototype._onShowLinkUnderline=function(E){if(E.fg===se.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:E.fg&&re.is256Color(E.fg)?this._ctx.fillStyle=this._colors.ansi[E.fg].css:this._ctx.fillStyle=this._colors.foreground.css,E.y1===E.y2)this._fillBottomLineAtCells(E.x1,E.y1,E.x2-E.x1);else{this._fillBottomLineAtCells(E.x1,E.y1,E.cols-E.x1);for(var y=E.y1+1;y<E.y2;y++)this._fillBottomLineAtCells(0,y,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E},te.prototype._onHideLinkUnderline=function(E){this._clearCurrentLink()},te}(ce.BaseRenderLayer);we.LinkRenderLayer=ue},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(ee,te,E,y){var z,x=arguments.length,ne=x<3?te:y===null?y=Object.getOwnPropertyDescriptor(te,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(ee,te,E,y);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(ne=(x<3?z(ne):x>3?z(te,E,ne):z(te,E))||ne);return x>3&&ne&&Object.defineProperty(te,E,ne),ne},Ee=this&&this.__param||function(ee,te){return function(E,y){te(E,y,ee)}};Object.defineProperty(we,"__esModule",{value:!0}),we.MouseZone=we.Linkifier=void 0;var ce=de(0),se=de(1),re=function(){function ee(te,E,y){this._bufferService=te,this._logService=E,this._unicodeService=y,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new ce.EventEmitter,this._onHideLinkUnderline=new ce.EventEmitter,this._onLinkTooltip=new ce.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ee.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ee.prototype.attachToDom=function(te,E){this._element=te,this._mouseZoneManager=E},ee.prototype.linkifyRows=function(te,E){var y=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=te,this._rowsToLinkify.end=E):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,te),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,E)),this._mouseZoneManager.clearAll(te,E),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return y._linkifyRows()},ee._timeBeforeLatency))},ee.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var te=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var E=te.ydisp+this._rowsToLinkify.start;if(!(E>=te.lines.length)){for(var y=te.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,z=Math.ceil(2e3/this._bufferService.cols),x=this._bufferService.buffer.iterator(!1,E,y,z,z);x.hasNext();)for(var ne=x.next(),ae=0;ae<this._linkMatchers.length;ae++)this._doLinkifyRow(ne.range.first,ne.content,this._linkMatchers[ae]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ee.prototype.registerLinkMatcher=function(te,E,y){if(y===void 0&&(y={}),!E)throw new Error("handler must be defined");var z={id:this._nextLinkMatcherId++,regex:te,handler:E,matchIndex:y.matchIndex,validationCallback:y.validationCallback,hoverTooltipCallback:y.tooltipCallback,hoverLeaveCallback:y.leaveCallback,willLinkActivate:y.willLinkActivate,priority:y.priority||0};return this._addLinkMatcherToList(z),z.id},ee.prototype._addLinkMatcherToList=function(te){if(this._linkMatchers.length!==0){for(var E=this._linkMatchers.length-1;E>=0;E--)if(te.priority<=this._linkMatchers[E].priority)return void this._linkMatchers.splice(E+1,0,te);this._linkMatchers.splice(0,0,te)}else this._linkMatchers.push(te)},ee.prototype.deregisterLinkMatcher=function(te){for(var E=0;E<this._linkMatchers.length;E++)if(this._linkMatchers[E].id===te)return this._linkMatchers.splice(E,1),!0;return!1},ee.prototype._doLinkifyRow=function(te,E,y){for(var z,x=this,ne=new RegExp(y.regex.source,(y.regex.flags||"")+"g"),ae=-1,oe=function(){var Se=z[typeof y.matchIndex!="number"?0:y.matchIndex];if(!Se)return ge._logService.debug("match found without corresponding matchIndex",z,y),"break";if(ae=E.indexOf(Se,ae+1),ne.lastIndex=ae+Se.length,ae<0)return"break";var ve=ge._bufferService.buffer.stringIndexToBufferIndex(te,ae);if(ve[0]<0)return"break";var be=ge._bufferService.buffer.lines.get(ve[0]);if(!be)return"break";var xe=be.getFg(ve[1]),pe=xe?xe>>9&511:void 0;y.validationCallback?y.validationCallback(Se,function(me){x._rowsTimeoutId||me&&x._addLink(ve[1],ve[0]-x._bufferService.buffer.ydisp,Se,y,pe)}):ge._addLink(ve[1],ve[0]-ge._bufferService.buffer.ydisp,Se,y,pe)},ge=this;(z=ne.exec(E))!==null&&oe()!=="break";);},ee.prototype._addLink=function(te,E,y,z,x){var ne=this;if(this._mouseZoneManager&&this._element){var ae=this._unicodeService.getStringCellWidth(y),oe=te%this._bufferService.cols,ge=E+Math.floor(te/this._bufferService.cols),Se=(oe+ae)%this._bufferService.cols,ve=ge+Math.floor((oe+ae)/this._bufferService.cols);Se===0&&(Se=this._bufferService.cols,ve--),this._mouseZoneManager.add(new ue(oe+1,ge+1,Se+1,ve+1,function(be){if(z.handler)return z.handler(be,y);var xe=window.open();xe?(xe.opener=null,xe.location.href=y):console.warn("Opening link blocked as opener could not be cleared")},function(){ne._onShowLinkUnderline.fire(ne._createLinkHoverEvent(oe,ge,Se,ve,x)),ne._element.classList.add("xterm-cursor-pointer")},function(be){ne._onLinkTooltip.fire(ne._createLinkHoverEvent(oe,ge,Se,ve,x)),z.hoverTooltipCallback&&z.hoverTooltipCallback(be,y,{start:{x:oe,y:ge},end:{x:Se,y:ve}})},function(){ne._onHideLinkUnderline.fire(ne._createLinkHoverEvent(oe,ge,Se,ve,x)),ne._element.classList.remove("xterm-cursor-pointer"),z.hoverLeaveCallback&&z.hoverLeaveCallback()},function(be){return!z.willLinkActivate||z.willLinkActivate(be,y)}))}},ee.prototype._createLinkHoverEvent=function(te,E,y,z,x){return{x1:te,y1:E,x2:y,y2:z,cols:this._bufferService.cols,fg:x}},ee._timeBeforeLatency=200,ee=ie([Ee(0,se.IBufferService),Ee(1,se.ILogService),Ee(2,se.IUnicodeService)],ee)}();we.Linkifier=re;var ue=function(ee,te,E,y,z,x,ne,ae,oe){this.x1=ee,this.y1=te,this.x2=E,this.y2=y,this.clickCallback=z,this.hoverCallback=x,this.tooltipCallback=ne,this.leaveCallback=ae,this.willLinkActivate=oe};we.MouseZone=ue},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(Se,ve){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,xe){be.__proto__=xe}||function(be,xe){for(var pe in xe)xe.hasOwnProperty(pe)&&(be[pe]=xe[pe])})(Se,ve)},function(Se,ve){function be(){this.constructor=Se}ie(Se,ve),Se.prototype=ve===null?Object.create(ve):(be.prototype=ve.prototype,new be)}),ce=this&&this.__decorate||function(Se,ve,be,xe){var pe,me=arguments.length,Ae=me<3?ve:xe===null?xe=Object.getOwnPropertyDescriptor(ve,be):xe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(Se,ve,be,xe);else for(var De=Se.length-1;De>=0;De--)(pe=Se[De])&&(Ae=(me<3?pe(Ae):me>3?pe(ve,be,Ae):pe(ve,be))||Ae);return me>3&&Ae&&Object.defineProperty(ve,be,Ae),Ae},se=this&&this.__param||function(Se,ve){return function(be,xe){ve(be,xe,Se)}};Object.defineProperty(we,"__esModule",{value:!0}),we.SelectionService=void 0;var re=de(11),ue=de(52),ee=de(4),te=de(0),E=de(5),y=de(1),z=de(30),x=de(53),ne=de(2),ae="\xA0",oe=new RegExp(ae,"g"),ge=function(Se){function ve(be,xe,pe,me,Ae,De,ke){var Ie=Se.call(this)||this;return Ie._element=be,Ie._screenElement=xe,Ie._bufferService=pe,Ie._coreService=me,Ie._mouseService=Ae,Ie._optionsService=De,Ie._renderService=ke,Ie._dragScrollAmount=0,Ie._enabled=!0,Ie._workCell=new ee.CellData,Ie._mouseDownTimeStamp=0,Ie._onLinuxMouseSelection=Ie.register(new te.EventEmitter),Ie._onRedrawRequest=Ie.register(new te.EventEmitter),Ie._onSelectionChange=Ie.register(new te.EventEmitter),Ie._onRequestScrollLines=Ie.register(new te.EventEmitter),Ie._mouseMoveListener=function(Fe){return Ie._onMouseMove(Fe)},Ie._mouseUpListener=function(Fe){return Ie._onMouseUp(Fe)},Ie._coreService.onUserInput(function(){Ie.hasSelection&&Ie.clearSelection()}),Ie._trimListener=Ie._bufferService.buffer.lines.onTrim(function(Fe){return Ie._onTrim(Fe)}),Ie.register(Ie._bufferService.buffers.onBufferActivate(function(Fe){return Ie._onBufferActivate(Fe)})),Ie.enable(),Ie._model=new ue.SelectionModel(Ie._bufferService),Ie._activeSelectionMode=0,Ie}return Ee(ve,Se),Object.defineProperty(ve.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){this._removeMouseDownListeners()},ve.prototype.reset=function(){this.clearSelection()},ve.prototype.disable=function(){this.clearSelection(),this._enabled=!1},ve.prototype.enable=function(){this._enabled=!0},Object.defineProperty(ve.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"hasSelection",{get:function(){var be=this._model.finalSelectionStart,xe=this._model.finalSelectionEnd;return!(!be||!xe)&&(be[0]!==xe[0]||be[1]!==xe[1])},enumerable:!1,configurable:!0}),Object.defineProperty(ve.prototype,"selectionText",{get:function(){var be=this._model.finalSelectionStart,xe=this._model.finalSelectionEnd;if(!be||!xe)return"";var pe=this._bufferService.buffer,me=[];if(this._activeSelectionMode===3){if(be[0]===xe[0])return"";for(var Ae=be[1];Ae<=xe[1];Ae++){var De=pe.translateBufferLineToString(Ae,!0,be[0],xe[0]);me.push(De)}}else{var ke=be[1]===xe[1]?xe[0]:void 0;for(me.push(pe.translateBufferLineToString(be[1],!0,be[0],ke)),Ae=be[1]+1;Ae<=xe[1]-1;Ae++){var Ie=pe.lines.get(Ae);De=pe.translateBufferLineToString(Ae,!0),Ie&&Ie.isWrapped?me[me.length-1]+=De:me.push(De)}be[1]!==xe[1]&&(Ie=pe.lines.get(xe[1]),De=pe.translateBufferLineToString(xe[1],!0,0,xe[0]),Ie&&Ie.isWrapped?me[me.length-1]+=De:me.push(De))}return me.map(function(Fe){return Fe.replace(oe," ")}).join(re.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),ve.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},ve.prototype.refresh=function(be){var xe=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return xe._refresh()})),re.isLinux&&be&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},ve.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},ve.prototype.isClickInSelection=function(be){var xe=this._getMouseBufferCoords(be),pe=this._model.finalSelectionStart,me=this._model.finalSelectionEnd;return!!(pe&&me&&xe)&&this._areCoordsInSelection(xe,pe,me)},ve.prototype._areCoordsInSelection=function(be,xe,pe){return be[1]>xe[1]&&be[1]<pe[1]||xe[1]===pe[1]&&be[1]===xe[1]&&be[0]>=xe[0]&&be[0]<pe[0]||xe[1]<pe[1]&&be[1]===pe[1]&&be[0]<pe[0]||xe[1]<pe[1]&&be[1]===xe[1]&&be[0]>=xe[0]},ve.prototype.selectWordAtCursor=function(be){var xe=this._getMouseBufferCoords(be);xe&&(this._selectWordAt(xe,!1),this._model.selectionEnd=void 0,this.refresh(!0))},ve.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},ve.prototype.selectLines=function(be,xe){this._model.clearSelection(),be=Math.max(be,0),xe=Math.min(xe,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,be],this._model.selectionEnd=[this._bufferService.cols,xe],this.refresh(),this._onSelectionChange.fire()},ve.prototype._onTrim=function(be){this._model.onTrim(be)&&this.refresh()},ve.prototype._getMouseBufferCoords=function(be){var xe=this._mouseService.getCoords(be,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(xe)return xe[0]--,xe[1]--,xe[1]+=this._bufferService.buffer.ydisp,xe},ve.prototype._getMouseEventScrollAmount=function(be){var xe=z.getCoordsRelativeToElement(be,this._screenElement)[1],pe=this._renderService.dimensions.canvasHeight;return xe>=0&&xe<=pe?0:(xe>pe&&(xe-=pe),xe=Math.min(Math.max(xe,-50),50),(xe/=50)/Math.abs(xe)+Math.round(14*xe))},ve.prototype.shouldForceSelection=function(be){return re.isMac?be.altKey&&this._optionsService.options.macOptionClickForcesSelection:be.shiftKey},ve.prototype.onMouseDown=function(be){if(this._mouseDownTimeStamp=be.timeStamp,(be.button!==2||!this.hasSelection)&&be.button===0){if(!this._enabled){if(!this.shouldForceSelection(be))return;be.stopPropagation()}be.preventDefault(),this._dragScrollAmount=0,this._enabled&&be.shiftKey?this._onIncrementalClick(be):be.detail===1?this._onSingleClick(be):be.detail===2?this._onDoubleClick(be):be.detail===3&&this._onTripleClick(be),this._addMouseDownListeners(),this.refresh(!0)}},ve.prototype._addMouseDownListeners=function(){var be=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return be._dragScroll()},50)},ve.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},ve.prototype._onIncrementalClick=function(be){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(be))},ve.prototype._onSingleClick=function(be){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(be)?3:0,this._model.selectionStart=this._getMouseBufferCoords(be),this._model.selectionStart){this._model.selectionEnd=void 0;var xe=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);xe&&xe.length!==this._model.selectionStart[0]&&xe.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},ve.prototype._onDoubleClick=function(be){var xe=this._getMouseBufferCoords(be);xe&&(this._activeSelectionMode=1,this._selectWordAt(xe,!0))},ve.prototype._onTripleClick=function(be){var xe=this._getMouseBufferCoords(be);xe&&(this._activeSelectionMode=2,this._selectLineAt(xe[1]))},ve.prototype.shouldColumnSelect=function(be){return be.altKey&&!(re.isMac&&this._optionsService.options.macOptionClickForcesSelection)},ve.prototype._onMouseMove=function(be){if(be.stopImmediatePropagation(),this._model.selectionStart){var xe=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(be),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(be),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var pe=this._bufferService.buffer;if(this._model.selectionEnd[1]<pe.lines.length){var me=pe.lines.get(this._model.selectionEnd[1]);me&&me.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}xe&&xe[0]===this._model.selectionEnd[0]&&xe[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},ve.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var be=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(be.ydisp+this._bufferService.rows,be.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=be.ydisp),this.refresh()}},ve.prototype._onMouseUp=function(be){var xe=be.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&xe<500&&be.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var pe=this._mouseService.getCoords(be,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(pe&&pe[0]!==void 0&&pe[1]!==void 0){var me=x.moveToCellSequence(pe[0]-1,pe[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(me,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},ve.prototype._onBufferActivate=function(be){var xe=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=be.activeBuffer.lines.onTrim(function(pe){return xe._onTrim(pe)})},ve.prototype._convertViewportColToCharacterIndex=function(be,xe){for(var pe=xe[0],me=0;xe[0]>=me;me++){var Ae=be.loadCell(me,this._workCell).getChars().length;this._workCell.getWidth()===0?pe--:Ae>1&&xe[0]!==me&&(pe+=Ae-1)}return pe},ve.prototype.setSelection=function(be,xe,pe){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[be,xe],this._model.selectionStartLength=pe,this.refresh()},ve.prototype._getWordAt=function(be,xe,pe,me){if(pe===void 0&&(pe=!0),me===void 0&&(me=!0),!(be[0]>=this._bufferService.cols)){var Ae=this._bufferService.buffer,De=Ae.lines.get(be[1]);if(De){var ke=Ae.translateBufferLineToString(be[1],!1),Ie=this._convertViewportColToCharacterIndex(De,be),Fe=Ie,Pe=be[0]-Ie,qe=0,Ke=0,ot=0,He=0;if(ke.charAt(Ie)===" "){for(;Ie>0&&ke.charAt(Ie-1)===" ";)Ie--;for(;Fe<ke.length&&ke.charAt(Fe+1)===" ";)Fe++}else{var rt=be[0],Ge=be[0];De.getWidth(rt)===0&&(qe++,rt--),De.getWidth(Ge)===2&&(Ke++,Ge++);var ct=De.getString(Ge).length;for(ct>1&&(He+=ct-1,Fe+=ct-1);rt>0&&Ie>0&&!this._isCharWordSeparator(De.loadCell(rt-1,this._workCell));){De.loadCell(rt-1,this._workCell);var We=this._workCell.getChars().length;this._workCell.getWidth()===0?(qe++,rt--):We>1&&(ot+=We-1,Ie-=We-1),Ie--,rt--}for(;Ge<De.length&&Fe+1<ke.length&&!this._isCharWordSeparator(De.loadCell(Ge+1,this._workCell));){De.loadCell(Ge+1,this._workCell);var Ue=this._workCell.getChars().length;this._workCell.getWidth()===2?(Ke++,Ge++):Ue>1&&(He+=Ue-1,Fe+=Ue-1),Fe++,Ge++}}Fe++;var Ze=Ie+Pe-qe+ot,Je=Math.min(this._bufferService.cols,Fe-Ie+qe+Ke-ot-He);if(xe||ke.slice(Ie,Fe).trim()!==""){if(pe&&Ze===0&&De.getCodePoint(0)!==32){var $e=Ae.lines.get(be[1]-1);if($e&&De.isWrapped&&$e.getCodePoint(this._bufferService.cols-1)!==32){var Qe=this._getWordAt([this._bufferService.cols-1,be[1]-1],!1,!0,!1);if(Qe){var pt=this._bufferService.cols-Qe.start;Ze-=pt,Je+=pt}}}if(me&&Ze+Je===this._bufferService.cols&&De.getCodePoint(this._bufferService.cols-1)!==32){var ht=Ae.lines.get(be[1]+1);if(ht&&ht.isWrapped&&ht.getCodePoint(0)!==32){var Pt=this._getWordAt([0,be[1]+1],!1,!1,!0);Pt&&(Je+=Pt.length)}}return{start:Ze,length:Je}}}}},ve.prototype._selectWordAt=function(be,xe){var pe=this._getWordAt(be,xe);if(pe){for(;pe.start<0;)pe.start+=this._bufferService.cols,be[1]--;this._model.selectionStart=[pe.start,be[1]],this._model.selectionStartLength=pe.length}},ve.prototype._selectToWordAt=function(be){var xe=this._getWordAt(be,!0);if(xe){for(var pe=be[1];xe.start<0;)xe.start+=this._bufferService.cols,pe--;if(!this._model.areSelectionValuesReversed())for(;xe.start+xe.length>this._bufferService.cols;)xe.length-=this._bufferService.cols,pe++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?xe.start:xe.start+xe.length,pe]}},ve.prototype._isCharWordSeparator=function(be){return be.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(be.getChars())>=0},ve.prototype._selectLineAt=function(be){var xe=this._bufferService.buffer.getWrappedRangeForLine(be);this._model.selectionStart=[0,xe.first],this._model.selectionEnd=[this._bufferService.cols,xe.last],this._model.selectionStartLength=0},ve=ce([se(2,y.IBufferService),se(3,y.ICoreService),se(4,E.IMouseService),se(5,y.IOptionsService),se(6,E.IRenderService)],ve)}(ne.Disposable);we.SelectionService=ge},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.SelectionModel=void 0;var ie=function(){function Ee(ce){this._bufferService=ce,this.isSelectAllActive=!1,this.selectionStartLength=0}return Ee.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Ee.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Ee.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var ce=this.selectionStart[0]+this.selectionStartLength;return ce>this._bufferService.cols?[ce%this._bufferService.cols,this.selectionStart[1]+Math.floor(ce/this._bufferService.cols)]:[ce,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Ee.prototype.areSelectionValuesReversed=function(){var ce=this.selectionStart,se=this.selectionEnd;return!(!ce||!se)&&(ce[1]>se[1]||ce[1]===se[1]&&ce[0]>se[0])},Ee.prototype.onTrim=function(ce){return this.selectionStart&&(this.selectionStart[1]-=ce),this.selectionEnd&&(this.selectionEnd[1]-=ce),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Ee}();we.SelectionModel=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.moveToCellSequence=void 0;var ie=de(12);function Ee(te,E,y,z){var x=te-ce(y,te),ne=E-ce(y,E);return ee(Math.abs(x-ne)-function(ae,oe,ge){for(var Se=0,ve=ae-ce(ge,ae),be=oe-ce(ge,oe),xe=0;xe<Math.abs(ve-be);xe++){var pe=se(ae,oe)==="A"?-1:1,me=ge.buffer.lines.get(ve+pe*xe);me&&me.isWrapped&&Se++}return Se}(te,E,y),ue(se(te,E),z))}function ce(te,E){for(var y=0,z=te.buffer.lines.get(E),x=z&&z.isWrapped;x&&E>=0&&E<te.rows;)y++,x=(z=te.buffer.lines.get(--E))&&z.isWrapped;return y}function se(te,E){return te>E?"A":"B"}function re(te,E,y,z,x,ne){for(var ae=te,oe=E,ge="";ae!==y||oe!==z;)ae+=x?1:-1,x&&ae>ne.cols-1?(ge+=ne.buffer.translateBufferLineToString(oe,!1,te,ae),ae=0,te=0,oe++):!x&&ae<0&&(ge+=ne.buffer.translateBufferLineToString(oe,!1,0,te+1),te=ae=ne.cols-1,oe--);return ge+ne.buffer.translateBufferLineToString(oe,!1,te,ae)}function ue(te,E){var y=E?"O":"[";return ie.C0.ESC+y+te}function ee(te,E){te=Math.floor(te);for(var y="",z=0;z<te;z++)y+=E;return y}we.moveToCellSequence=function(te,E,y,z){var x,ne=y.buffer.x,ae=y.buffer.y;if(!y.buffer.hasScrollback)return function(ge,Se,ve,be,xe,pe){return Ee(Se,be,xe,pe).length===0?"":ee(re(ge,Se,ge,Se-ce(xe,Se),!1,xe).length,ue("D",pe))}(ne,ae,0,E,y,z)+Ee(ae,E,y,z)+function(ge,Se,ve,be,xe,pe){var me;me=Ee(Se,be,xe,pe).length>0?be-ce(xe,be):Se;var Ae=be,De=function(ke,Ie,Fe,Pe,qe,Ke){var ot;return ot=Ee(Fe,Pe,qe,Ke).length>0?Pe-ce(qe,Pe):Ie,ke<Fe&&ot<=Pe||ke>=Fe&&ot<Pe?"C":"D"}(ge,Se,ve,be,xe,pe);return ee(re(ge,me,ve,Ae,De==="C",xe).length,ue(De,pe))}(ne,ae,te,E,y,z);if(ae===E)return x=ne>te?"D":"C",ee(Math.abs(ne-te),ue(x,z));x=ae>E?"D":"C";var oe=Math.abs(ae-E);return ee(function(ge,Se){return Se.cols-ge}(ae>E?te:ne,y)+(oe-1)*y.cols+1+((ae>E?ne:te)-1),ue(x,z))}},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(re,ue,ee,te){var E,y=arguments.length,z=y<3?ue:te===null?te=Object.getOwnPropertyDescriptor(ue,ee):te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(re,ue,ee,te);else for(var x=re.length-1;x>=0;x--)(E=re[x])&&(z=(y<3?E(z):y>3?E(ue,ee,z):E(ue,ee))||z);return y>3&&z&&Object.defineProperty(ue,ee,z),z},Ee=this&&this.__param||function(re,ue){return function(ee,te){ue(ee,te,re)}};Object.defineProperty(we,"__esModule",{value:!0}),we.SoundService=void 0;var ce=de(1),se=function(){function re(ue){this._optionsService=ue}return Object.defineProperty(re,"audioContext",{get:function(){if(!re._audioContext){var ue=window.AudioContext||window.webkitAudioContext;if(!ue)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;re._audioContext=new ue}return re._audioContext},enumerable:!1,configurable:!0}),re.prototype.playBellSound=function(){var ue=re.audioContext;if(ue){var ee=ue.createBufferSource();ue.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(te){ee.buffer=te,ee.connect(ue.destination),ee.start(0)})}},re.prototype._base64ToArrayBuffer=function(ue){for(var ee=window.atob(ue),te=ee.length,E=new Uint8Array(te),y=0;y<te;y++)E[y]=ee.charCodeAt(y);return E.buffer},re.prototype._removeMimeType=function(ue){return ue.split(",")[1]},re=ie([Ee(0,ce.IOptionsService)],re)}();we.SoundService=se},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ce=this&&this.__decorate||function(y,z,x,ne){var ae,oe=arguments.length,ge=oe<3?z:ne===null?ne=Object.getOwnPropertyDescriptor(z,x):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(y,z,x,ne);else for(var Se=y.length-1;Se>=0;Se--)(ae=y[Se])&&(ge=(oe<3?ae(ge):oe>3?ae(z,x,ge):ae(z,x))||ge);return oe>3&&ge&&Object.defineProperty(z,x,ge),ge},se=this&&this.__param||function(y,z){return function(x,ne){z(x,ne,y)}};Object.defineProperty(we,"__esModule",{value:!0}),we.MouseZoneManager=void 0;var re=de(2),ue=de(7),ee=de(5),te=de(1),E=function(y){function z(x,ne,ae,oe,ge,Se){var ve=y.call(this)||this;return ve._element=x,ve._screenElement=ne,ve._bufferService=ae,ve._mouseService=oe,ve._selectionService=ge,ve._optionsService=Se,ve._zones=[],ve._areZonesActive=!1,ve._lastHoverCoords=[void 0,void 0],ve._initialSelectionLength=0,ve.register(ue.addDisposableDomListener(ve._element,"mousedown",function(be){return ve._onMouseDown(be)})),ve._mouseMoveListener=function(be){return ve._onMouseMove(be)},ve._mouseLeaveListener=function(be){return ve._onMouseLeave(be)},ve._clickListener=function(be){return ve._onClick(be)},ve}return Ee(z,y),z.prototype.dispose=function(){y.prototype.dispose.call(this),this._deactivate()},z.prototype.add=function(x){this._zones.push(x),this._zones.length===1&&this._activate()},z.prototype.clearAll=function(x,ne){if(this._zones.length!==0){x&&ne||(x=0,ne=this._bufferService.rows-1);for(var ae=0;ae<this._zones.length;ae++){var oe=this._zones[ae];(oe.y1>x&&oe.y1<=ne+1||oe.y2>x&&oe.y2<=ne+1||oe.y1<x&&oe.y2>ne+1)&&(this._currentZone&&this._currentZone===oe&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(ae--,1))}this._zones.length===0&&this._deactivate()}},z.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},z.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},z.prototype._onMouseMove=function(x){this._lastHoverCoords[0]===x.pageX&&this._lastHoverCoords[1]===x.pageY||(this._onHover(x),this._lastHoverCoords=[x.pageX,x.pageY])},z.prototype._onHover=function(x){var ne=this,ae=this._findZoneEventAt(x);ae!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),ae&&(this._currentZone=ae,ae.hoverCallback&&ae.hoverCallback(x),this._tooltipTimeout=window.setTimeout(function(){return ne._onTooltip(x)},this._optionsService.options.linkTooltipHoverDuration)))},z.prototype._onTooltip=function(x){this._tooltipTimeout=void 0;var ne=this._findZoneEventAt(x);ne&&ne.tooltipCallback&&ne.tooltipCallback(x)},z.prototype._onMouseDown=function(x){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var ne=this._findZoneEventAt(x);ne!=null&&ne.willLinkActivate(x)&&(x.preventDefault(),x.stopImmediatePropagation())}},z.prototype._onMouseLeave=function(x){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},z.prototype._onClick=function(x){var ne=this._findZoneEventAt(x),ae=this._getSelectionLength();ne&&ae===this._initialSelectionLength&&(ne.clickCallback(x),x.preventDefault(),x.stopImmediatePropagation())},z.prototype._getSelectionLength=function(){var x=this._selectionService.selectionText;return x?x.length:0},z.prototype._findZoneEventAt=function(x){var ne=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(ne)for(var ae=ne[0],oe=ne[1],ge=0;ge<this._zones.length;ge++){var Se=this._zones[ge];if(Se.y1===Se.y2){if(oe===Se.y1&&ae>=Se.x1&&ae<Se.x2)return Se}else if(oe===Se.y1&&ae>=Se.x1||oe===Se.y2&&ae<Se.x2||oe>Se.y1&&oe<Se.y2)return Se}},z=ce([se(2,te.IBufferService),se(3,ee.IMouseService),se(4,ee.ISelectionService),se(5,te.IOptionsService)],z)}(re.Disposable);we.MouseZoneManager=E},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(z,x){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ne,ae){ne.__proto__=ae}||function(ne,ae){for(var oe in ae)ae.hasOwnProperty(oe)&&(ne[oe]=ae[oe])})(z,x)},function(z,x){function ne(){this.constructor=z}ie(z,x),z.prototype=x===null?Object.create(x):(ne.prototype=x.prototype,new ne)});Object.defineProperty(we,"__esModule",{value:!0}),we.AccessibilityManager=void 0;var ce=de(18),se=de(11),re=de(31),ue=de(7),ee=de(2),te=de(32),E=de(17),y=function(z){function x(ne,ae){var oe=z.call(this)||this;oe._terminal=ne,oe._renderService=ae,oe._liveRegionLineCount=0,oe._charsToConsume=[],oe._charsToAnnounce="",oe._accessibilityTreeRoot=document.createElement("div"),oe._accessibilityTreeRoot.classList.add("xterm-accessibility"),oe._rowContainer=document.createElement("div"),oe._rowContainer.classList.add("xterm-accessibility-tree"),oe._rowContainer.setAttribute("role","list"),oe._rowElements=[];for(var ge=0;ge<oe._terminal.rows;ge++)oe._rowElements[ge]=oe._createAccessibilityTreeNode(),oe._rowContainer.appendChild(oe._rowElements[ge]);if(oe._topBoundaryFocusListener=function(Se){return oe._onBoundaryFocus(Se,0)},oe._bottomBoundaryFocusListener=function(Se){return oe._onBoundaryFocus(Se,1)},oe._rowElements[0].addEventListener("focus",oe._topBoundaryFocusListener),oe._rowElements[oe._rowElements.length-1].addEventListener("focus",oe._bottomBoundaryFocusListener),oe._refreshRowsDimensions(),oe._accessibilityTreeRoot.appendChild(oe._rowContainer),oe._renderRowsDebouncer=new re.RenderDebouncer(oe._renderRows.bind(oe)),oe._refreshRows(),oe._liveRegion=document.createElement("div"),oe._liveRegion.classList.add("live-region"),oe._liveRegion.setAttribute("aria-live","assertive"),oe._accessibilityTreeRoot.appendChild(oe._liveRegion),!oe._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return oe._terminal.element.insertAdjacentElement("afterbegin",oe._accessibilityTreeRoot),oe.register(oe._renderRowsDebouncer),oe.register(oe._terminal.onResize(function(Se){return oe._onResize(Se.rows)})),oe.register(oe._terminal.onRender(function(Se){return oe._refreshRows(Se.start,Se.end)})),oe.register(oe._terminal.onScroll(function(){return oe._refreshRows()})),oe.register(oe._terminal.onA11yChar(function(Se){return oe._onChar(Se)})),oe.register(oe._terminal.onLineFeed(function(){return oe._onChar(`
`)})),oe.register(oe._terminal.onA11yTab(function(Se){return oe._onTab(Se)})),oe.register(oe._terminal.onKey(function(Se){return oe._onKey(Se.key)})),oe.register(oe._terminal.onBlur(function(){return oe._clearLiveRegion()})),oe.register(oe._renderService.onDimensionsChange(function(){return oe._refreshRowsDimensions()})),oe._screenDprMonitor=new te.ScreenDprMonitor,oe.register(oe._screenDprMonitor),oe._screenDprMonitor.setListener(function(){return oe._refreshRowsDimensions()}),oe.register(ue.addDisposableDomListener(window,"resize",function(){return oe._refreshRowsDimensions()})),oe}return Ee(x,z),x.prototype.dispose=function(){z.prototype.dispose.call(this),E.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},x.prototype._onBoundaryFocus=function(ne,ae){var oe=ne.target,ge=this._rowElements[ae===0?1:this._rowElements.length-2];if(oe.getAttribute("aria-posinset")!==(ae===0?"1":""+this._terminal.buffer.lines.length)&&ne.relatedTarget===ge){var Se,ve;if(ae===0?(Se=oe,ve=this._rowElements.pop(),this._rowContainer.removeChild(ve)):(Se=this._rowElements.shift(),ve=oe,this._rowContainer.removeChild(Se)),Se.removeEventListener("focus",this._topBoundaryFocusListener),ve.removeEventListener("focus",this._bottomBoundaryFocusListener),ae===0){var be=this._createAccessibilityTreeNode();this._rowElements.unshift(be),this._rowContainer.insertAdjacentElement("afterbegin",be)}else be=this._createAccessibilityTreeNode(),this._rowElements.push(be),this._rowContainer.appendChild(be);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(ae===0?-1:1),this._rowElements[ae===0?1:this._rowElements.length-2].focus(),ne.preventDefault(),ne.stopImmediatePropagation()}},x.prototype._onResize=function(ne){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var ae=this._rowContainer.children.length;ae<this._terminal.rows;ae++)this._rowElements[ae]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[ae]);for(;this._rowElements.length>ne;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},x.prototype._createAccessibilityTreeNode=function(){var ne=document.createElement("div");return ne.setAttribute("role","listitem"),ne.tabIndex=-1,this._refreshRowDimensions(ne),ne},x.prototype._onTab=function(ne){for(var ae=0;ae<ne;ae++)this._onChar(" ")},x.prototype._onChar=function(ne){var ae=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==ne&&(this._charsToAnnounce+=ne):this._charsToAnnounce+=ne,ne===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=ce.tooMuchOutput)),se.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){ae._accessibilityTreeRoot.appendChild(ae._liveRegion)},0))},x.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,se.isMac&&E.removeElementFromParent(this._liveRegion)},x.prototype._onKey=function(ne){this._clearLiveRegion(),this._charsToConsume.push(ne)},x.prototype._refreshRows=function(ne,ae){this._renderRowsDebouncer.refresh(ne,ae,this._terminal.rows)},x.prototype._renderRows=function(ne,ae){for(var oe=this._terminal.buffer,ge=oe.lines.length.toString(),Se=ne;Se<=ae;Se++){var ve=oe.translateBufferLineToString(oe.ydisp+Se,!0),be=(oe.ydisp+Se+1).toString(),xe=this._rowElements[Se];xe&&(ve.length===0?xe.innerHTML="&nbsp;":xe.textContent=ve,xe.setAttribute("aria-posinset",be),xe.setAttribute("aria-setsize",ge))}this._announceCharacters()},x.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var ne=0;ne<this._terminal.rows;ne++)this._refreshRowDimensions(this._rowElements[ne])}},x.prototype._refreshRowDimensions=function(ne){ne.style.height=this._renderService.dimensions.actualCellHeight+"px"},x.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},x}(ee.Disposable);we.AccessibilityManager=y},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(oe,ge){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,ve){Se.__proto__=ve}||function(Se,ve){for(var be in ve)ve.hasOwnProperty(be)&&(Se[be]=ve[be])})(oe,ge)},function(oe,ge){function Se(){this.constructor=oe}ie(oe,ge),oe.prototype=ge===null?Object.create(ge):(Se.prototype=ge.prototype,new Se)}),ce=this&&this.__decorate||function(oe,ge,Se,ve){var be,xe=arguments.length,pe=xe<3?ge:ve===null?ve=Object.getOwnPropertyDescriptor(ge,Se):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(oe,ge,Se,ve);else for(var me=oe.length-1;me>=0;me--)(be=oe[me])&&(pe=(xe<3?be(pe):xe>3?be(ge,Se,pe):be(ge,Se))||pe);return xe>3&&pe&&Object.defineProperty(ge,Se,pe),pe},se=this&&this.__param||function(oe,ge){return function(Se,ve){ge(Se,ve,oe)}};Object.defineProperty(we,"__esModule",{value:!0}),we.DomRenderer=void 0;var re=de(58),ue=de(9),ee=de(2),te=de(5),E=de(1),y=de(0),z=de(10),x=de(17),ne=1,ae=function(oe){function ge(Se,ve,be,xe,pe,me,Ae,De,ke){var Ie=oe.call(this)||this;return Ie._colors=Se,Ie._element=ve,Ie._screenElement=be,Ie._viewportElement=xe,Ie._linkifier=pe,Ie._linkifier2=me,Ie._charSizeService=Ae,Ie._optionsService=De,Ie._bufferService=ke,Ie._terminalClass=ne++,Ie._rowElements=[],Ie._rowContainer=document.createElement("div"),Ie._rowContainer.classList.add("xterm-rows"),Ie._rowContainer.style.lineHeight="normal",Ie._rowContainer.setAttribute("aria-hidden","true"),Ie._refreshRowElements(Ie._bufferService.cols,Ie._bufferService.rows),Ie._selectionContainer=document.createElement("div"),Ie._selectionContainer.classList.add("xterm-selection"),Ie._selectionContainer.setAttribute("aria-hidden","true"),Ie.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Ie._updateDimensions(),Ie._injectCss(),Ie._rowFactory=new re.DomRendererRowFactory(document,Ie._optionsService,Ie._colors),Ie._element.classList.add("xterm-dom-renderer-owner-"+Ie._terminalClass),Ie._screenElement.appendChild(Ie._rowContainer),Ie._screenElement.appendChild(Ie._selectionContainer),Ie._linkifier.onShowLinkUnderline(function(Fe){return Ie._onLinkHover(Fe)}),Ie._linkifier.onHideLinkUnderline(function(Fe){return Ie._onLinkLeave(Fe)}),Ie._linkifier2.onShowLinkUnderline(function(Fe){return Ie._onLinkHover(Fe)}),Ie._linkifier2.onHideLinkUnderline(function(Fe){return Ie._onLinkLeave(Fe)}),Ie}return Ee(ge,oe),Object.defineProperty(ge.prototype,"onRequestRedraw",{get:function(){return new y.EventEmitter().event},enumerable:!1,configurable:!0}),ge.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),x.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),oe.prototype.dispose.call(this)},ge.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var Se=0,ve=this._rowElements;Se<ve.length;Se++){var be=ve[Se];be.style.width=this.dimensions.canvasWidth+"px",be.style.height=this.dimensions.actualCellHeight+"px",be.style.lineHeight=this.dimensions.actualCellHeight+"px",be.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var xe=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=xe,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ge.prototype.setColors=function(Se){this._colors=Se,this._injectCss()},ge.prototype._injectCss=function(){var Se=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var ve=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";ve+=this._terminalSelector+" span:not(."+re.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+re.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+re.ITALIC_CLASS+" { font-style: italic;}",ve+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",ve+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",ve+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+re.CURSOR_CLASS+"."+re.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+re.CURSOR_CLASS+"."+re.CURSOR_BLINK_CLASS+":not(."+re.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+re.CURSOR_CLASS+"."+re.CURSOR_BLINK_CLASS+"."+re.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+re.CURSOR_CLASS+"."+re.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+re.CURSOR_CLASS+"."+re.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+re.CURSOR_CLASS+"."+re.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",ve+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(be,xe){ve+=Se._terminalSelector+" .xterm-fg-"+xe+" { color: "+be.css+"; }"+Se._terminalSelector+" .xterm-bg-"+xe+" { background-color: "+be.css+"; }"}),ve+=this._terminalSelector+" .xterm-fg-"+ue.INVERTED_DEFAULT_COLOR+" { color: "+z.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+ue.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=ve},ge.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},ge.prototype._refreshRowElements=function(Se,ve){for(var be=this._rowElements.length;be<=ve;be++){var xe=document.createElement("div");this._rowContainer.appendChild(xe),this._rowElements.push(xe)}for(;this._rowElements.length>ve;)this._rowContainer.removeChild(this._rowElements.pop())},ge.prototype.onResize=function(Se,ve){this._refreshRowElements(Se,ve),this._updateDimensions()},ge.prototype.onCharSizeChanged=function(){this._updateDimensions()},ge.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},ge.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},ge.prototype.onSelectionChanged=function(Se,ve,be){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(Se&&ve){var xe=Se[1]-this._bufferService.buffer.ydisp,pe=ve[1]-this._bufferService.buffer.ydisp,me=Math.max(xe,0),Ae=Math.min(pe,this._bufferService.rows-1);if(!(me>=this._bufferService.rows||Ae<0)){var De=document.createDocumentFragment();if(be)De.appendChild(this._createSelectionElement(me,Se[0],ve[0],Ae-me+1));else{var ke=xe===me?Se[0]:0,Ie=me===Ae?ve[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(me,ke,Ie));var Fe=Ae-me-1;if(De.appendChild(this._createSelectionElement(me+1,0,this._bufferService.cols,Fe)),me!==Ae){var Pe=pe===Ae?ve[0]:this._bufferService.cols;De.appendChild(this._createSelectionElement(Ae,0,Pe))}}this._selectionContainer.appendChild(De)}}},ge.prototype._createSelectionElement=function(Se,ve,be,xe){xe===void 0&&(xe=1);var pe=document.createElement("div");return pe.style.height=xe*this.dimensions.actualCellHeight+"px",pe.style.top=Se*this.dimensions.actualCellHeight+"px",pe.style.left=ve*this.dimensions.actualCellWidth+"px",pe.style.width=this.dimensions.actualCellWidth*(be-ve)+"px",pe},ge.prototype.onCursorMove=function(){},ge.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},ge.prototype.clear=function(){for(var Se=0,ve=this._rowElements;Se<ve.length;Se++)ve[Se].innerHTML=""},ge.prototype.renderRows=function(Se,ve){for(var be=this._bufferService.buffer.ybase+this._bufferService.buffer.y,xe=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),pe=this._optionsService.options.cursorBlink,me=Se;me<=ve;me++){var Ae=this._rowElements[me];Ae.innerHTML="";var De=me+this._bufferService.buffer.ydisp,ke=this._bufferService.buffer.lines.get(De),Ie=this._optionsService.options.cursorStyle;Ae.appendChild(this._rowFactory.createRow(ke,De===be,Ie,xe,pe,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(ge.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),ge.prototype.registerCharacterJoiner=function(Se){return-1},ge.prototype.deregisterCharacterJoiner=function(Se){return!1},ge.prototype._onLinkHover=function(Se){this._setCellUnderline(Se.x1,Se.x2,Se.y1,Se.y2,Se.cols,!0)},ge.prototype._onLinkLeave=function(Se){this._setCellUnderline(Se.x1,Se.x2,Se.y1,Se.y2,Se.cols,!1)},ge.prototype._setCellUnderline=function(Se,ve,be,xe,pe,me){for(;Se!==ve||be!==xe;){var Ae=this._rowElements[be];if(!Ae)return;var De=Ae.children[Se];De&&(De.style.textDecoration=me?"underline":"none"),++Se>=pe&&(Se=0,be++)}},ge=ce([se(6,te.ICharSizeService),se(7,E.IOptionsService),se(8,E.IBufferService)],ge)}(ee.Disposable);we.DomRenderer=ae},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.DomRendererRowFactory=we.CURSOR_STYLE_UNDERLINE_CLASS=we.CURSOR_STYLE_BAR_CLASS=we.CURSOR_STYLE_BLOCK_CLASS=we.CURSOR_BLINK_CLASS=we.CURSOR_CLASS=we.UNDERLINE_CLASS=we.ITALIC_CLASS=we.DIM_CLASS=we.BOLD_CLASS=void 0;var ie=de(9),Ee=de(3),ce=de(4),se=de(10);we.BOLD_CLASS="xterm-bold",we.DIM_CLASS="xterm-dim",we.ITALIC_CLASS="xterm-italic",we.UNDERLINE_CLASS="xterm-underline",we.CURSOR_CLASS="xterm-cursor",we.CURSOR_BLINK_CLASS="xterm-cursor-blink",we.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",we.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",we.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var re=function(){function ee(te,E,y){this._document=te,this._optionsService=E,this._colors=y,this._workCell=new ce.CellData}return ee.prototype.setColors=function(te){this._colors=te},ee.prototype.createRow=function(te,E,y,z,x,ne,ae){for(var oe=this._document.createDocumentFragment(),ge=0,Se=Math.min(te.length,ae)-1;Se>=0;Se--)if(te.loadCell(Se,this._workCell).getCode()!==Ee.NULL_CELL_CODE||E&&Se===z){ge=Se+1;break}for(Se=0;Se<ge;Se++){te.loadCell(Se,this._workCell);var ve=this._workCell.getWidth();if(ve!==0){var be=this._document.createElement("span");if(ve>1&&(be.style.width=ne*ve+"px"),E&&Se===z)switch(be.classList.add(we.CURSOR_CLASS),x&&be.classList.add(we.CURSOR_BLINK_CLASS),y){case"bar":be.classList.add(we.CURSOR_STYLE_BAR_CLASS);break;case"underline":be.classList.add(we.CURSOR_STYLE_UNDERLINE_CLASS);break;default:be.classList.add(we.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&be.classList.add(we.BOLD_CLASS),this._workCell.isItalic()&&be.classList.add(we.ITALIC_CLASS),this._workCell.isDim()&&be.classList.add(we.DIM_CLASS),this._workCell.isUnderline()&&be.classList.add(we.UNDERLINE_CLASS),this._workCell.isInvisible()?be.textContent=Ee.WHITESPACE_CELL_CHAR:be.textContent=this._workCell.getChars()||Ee.WHITESPACE_CELL_CHAR;var xe=this._workCell.getFgColor(),pe=this._workCell.getFgColorMode(),me=this._workCell.getBgColor(),Ae=this._workCell.getBgColorMode(),De=!!this._workCell.isInverse();if(De){var ke=xe;xe=me,me=ke;var Ie=pe;pe=Ae,Ae=Ie}switch(pe){case 16777216:case 33554432:this._workCell.isBold()&&xe<8&&this._optionsService.options.drawBoldTextInBrightColors&&(xe+=8),this._applyMinimumContrast(be,this._colors.background,this._colors.ansi[xe])||be.classList.add("xterm-fg-"+xe);break;case 50331648:var Fe=se.rgba.toColor(xe>>16&255,xe>>8&255,255&xe);this._applyMinimumContrast(be,this._colors.background,Fe)||this._addStyle(be,"color:#"+ue(xe.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(be,this._colors.background,this._colors.foreground)||De&&be.classList.add("xterm-fg-"+ie.INVERTED_DEFAULT_COLOR)}switch(Ae){case 16777216:case 33554432:be.classList.add("xterm-bg-"+me);break;case 50331648:this._addStyle(be,"background-color:#"+ue(me.toString(16),"0",6));break;case 0:default:De&&be.classList.add("xterm-bg-"+ie.INVERTED_DEFAULT_COLOR)}oe.appendChild(be)}}return oe},ee.prototype._applyMinimumContrast=function(te,E,y){if(this._optionsService.options.minimumContrastRatio===1)return!1;var z=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return z===void 0&&(z=se.color.ensureContrastRatio(E,y,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,z!=null?z:null)),!!z&&(this._addStyle(te,"color:"+z.css),!0)},ee.prototype._addStyle=function(te,E){te.setAttribute("style",""+(te.getAttribute("style")||"")+E+";")},ee}();function ue(ee,te,E){for(;ee.length<E;)ee=te+ee;return ee}we.DomRendererRowFactory=re},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.evaluateKeyboardEvent=void 0;var ie=de(12),Ee={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};we.evaluateKeyboardEvent=function(ce,se,re,ue){var ee={type:0,cancel:!1,key:void 0},te=(ce.shiftKey?1:0)|(ce.altKey?2:0)|(ce.ctrlKey?4:0)|(ce.metaKey?8:0);switch(ce.keyCode){case 0:ce.key==="UIKeyInputUpArrow"?ee.key=se?ie.C0.ESC+"OA":ie.C0.ESC+"[A":ce.key==="UIKeyInputLeftArrow"?ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D":ce.key==="UIKeyInputRightArrow"?ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C":ce.key==="UIKeyInputDownArrow"&&(ee.key=se?ie.C0.ESC+"OB":ie.C0.ESC+"[B");break;case 8:if(ce.shiftKey){ee.key=ie.C0.BS;break}if(ce.altKey){ee.key=ie.C0.ESC+ie.C0.DEL;break}ee.key=ie.C0.DEL;break;case 9:if(ce.shiftKey){ee.key=ie.C0.ESC+"[Z";break}ee.key=ie.C0.HT,ee.cancel=!0;break;case 13:ee.key=ce.altKey?ie.C0.ESC+ie.C0.CR:ie.C0.CR,ee.cancel=!0;break;case 27:ee.key=ie.C0.ESC,ce.altKey&&(ee.key=ie.C0.ESC+ie.C0.ESC),ee.cancel=!0;break;case 37:if(ce.metaKey)break;te?(ee.key=ie.C0.ESC+"[1;"+(te+1)+"D",ee.key===ie.C0.ESC+"[1;3D"&&(ee.key=ie.C0.ESC+(re?"b":"[1;5D"))):ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D";break;case 39:if(ce.metaKey)break;te?(ee.key=ie.C0.ESC+"[1;"+(te+1)+"C",ee.key===ie.C0.ESC+"[1;3C"&&(ee.key=ie.C0.ESC+(re?"f":"[1;5C"))):ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C";break;case 38:if(ce.metaKey)break;te?(ee.key=ie.C0.ESC+"[1;"+(te+1)+"A",re||ee.key!==ie.C0.ESC+"[1;3A"||(ee.key=ie.C0.ESC+"[1;5A")):ee.key=se?ie.C0.ESC+"OA":ie.C0.ESC+"[A";break;case 40:if(ce.metaKey)break;te?(ee.key=ie.C0.ESC+"[1;"+(te+1)+"B",re||ee.key!==ie.C0.ESC+"[1;3B"||(ee.key=ie.C0.ESC+"[1;5B")):ee.key=se?ie.C0.ESC+"OB":ie.C0.ESC+"[B";break;case 45:ce.shiftKey||ce.ctrlKey||(ee.key=ie.C0.ESC+"[2~");break;case 46:ee.key=te?ie.C0.ESC+"[3;"+(te+1)+"~":ie.C0.ESC+"[3~";break;case 36:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"H":se?ie.C0.ESC+"OH":ie.C0.ESC+"[H";break;case 35:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"F":se?ie.C0.ESC+"OF":ie.C0.ESC+"[F";break;case 33:ce.shiftKey?ee.type=2:ee.key=ie.C0.ESC+"[5~";break;case 34:ce.shiftKey?ee.type=3:ee.key=ie.C0.ESC+"[6~";break;case 112:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"P":ie.C0.ESC+"OP";break;case 113:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"Q":ie.C0.ESC+"OQ";break;case 114:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"R":ie.C0.ESC+"OR";break;case 115:ee.key=te?ie.C0.ESC+"[1;"+(te+1)+"S":ie.C0.ESC+"OS";break;case 116:ee.key=te?ie.C0.ESC+"[15;"+(te+1)+"~":ie.C0.ESC+"[15~";break;case 117:ee.key=te?ie.C0.ESC+"[17;"+(te+1)+"~":ie.C0.ESC+"[17~";break;case 118:ee.key=te?ie.C0.ESC+"[18;"+(te+1)+"~":ie.C0.ESC+"[18~";break;case 119:ee.key=te?ie.C0.ESC+"[19;"+(te+1)+"~":ie.C0.ESC+"[19~";break;case 120:ee.key=te?ie.C0.ESC+"[20;"+(te+1)+"~":ie.C0.ESC+"[20~";break;case 121:ee.key=te?ie.C0.ESC+"[21;"+(te+1)+"~":ie.C0.ESC+"[21~";break;case 122:ee.key=te?ie.C0.ESC+"[23;"+(te+1)+"~":ie.C0.ESC+"[23~";break;case 123:ee.key=te?ie.C0.ESC+"[24;"+(te+1)+"~":ie.C0.ESC+"[24~";break;default:if(!ce.ctrlKey||ce.shiftKey||ce.altKey||ce.metaKey)if(re&&!ue||!ce.altKey||ce.metaKey)re&&!ce.altKey&&!ce.ctrlKey&&ce.metaKey?ce.keyCode===65&&(ee.type=1):ce.key&&!ce.ctrlKey&&!ce.altKey&&!ce.metaKey&&ce.keyCode>=48&&ce.key.length===1?ee.key=ce.key:ce.key&&ce.ctrlKey&&ce.key==="_"&&(ee.key=ie.C0.US);else{var E=Ee[ce.keyCode],y=E&&E[ce.shiftKey?1:0];if(y)ee.key=ie.C0.ESC+y;else if(ce.keyCode>=65&&ce.keyCode<=90){var z=ce.ctrlKey?ce.keyCode-64:ce.keyCode+32;ee.key=ie.C0.ESC+String.fromCharCode(z)}}else ce.keyCode>=65&&ce.keyCode<=90?ee.key=String.fromCharCode(ce.keyCode-64):ce.keyCode===32?ee.key=ie.C0.NUL:ce.keyCode>=51&&ce.keyCode<=55?ee.key=String.fromCharCode(ce.keyCode-51+27):ce.keyCode===56?ee.key=ie.C0.DEL:ce.keyCode===219?ee.key=ie.C0.ESC:ce.keyCode===220?ee.key=ie.C0.FS:ce.keyCode===221&&(ee.key=ie.C0.GS)}return ee}},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ne,ae){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ge){oe.__proto__=ge}||function(oe,ge){for(var Se in ge)ge.hasOwnProperty(Se)&&(oe[Se]=ge[Se])})(ne,ae)},function(ne,ae){function oe(){this.constructor=ne}ie(ne,ae),ne.prototype=ae===null?Object.create(ae):(oe.prototype=ae.prototype,new oe)}),ce=this&&this.__decorate||function(ne,ae,oe,ge){var Se,ve=arguments.length,be=ve<3?ae:ge===null?ge=Object.getOwnPropertyDescriptor(ae,oe):ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")be=Reflect.decorate(ne,ae,oe,ge);else for(var xe=ne.length-1;xe>=0;xe--)(Se=ne[xe])&&(be=(ve<3?Se(be):ve>3?Se(ae,oe,be):Se(ae,oe))||be);return ve>3&&be&&Object.defineProperty(ae,oe,be),be},se=this&&this.__param||function(ne,ae){return function(oe,ge){ae(oe,ge,ne)}};Object.defineProperty(we,"__esModule",{value:!0}),we.RenderService=void 0;var re=de(31),ue=de(0),ee=de(2),te=de(32),E=de(7),y=de(1),z=de(5),x=function(ne){function ae(oe,ge,Se,ve,be,xe){var pe=ne.call(this)||this;if(pe._renderer=oe,pe._rowCount=ge,pe._isPaused=!1,pe._needsFullRefresh=!1,pe._isNextRenderRedrawOnly=!0,pe._needsSelectionRefresh=!1,pe._canvasWidth=0,pe._canvasHeight=0,pe._selectionState={start:void 0,end:void 0,columnSelectMode:!1},pe._onDimensionsChange=new ue.EventEmitter,pe._onRender=new ue.EventEmitter,pe._onRefreshRequest=new ue.EventEmitter,pe.register({dispose:function(){return pe._renderer.dispose()}}),pe._renderDebouncer=new re.RenderDebouncer(function(Ae,De){return pe._renderRows(Ae,De)}),pe.register(pe._renderDebouncer),pe._screenDprMonitor=new te.ScreenDprMonitor,pe._screenDprMonitor.setListener(function(){return pe.onDevicePixelRatioChange()}),pe.register(pe._screenDprMonitor),pe.register(xe.onResize(function(Ae){return pe._fullRefresh()})),pe.register(ve.onOptionChange(function(){return pe._renderer.onOptionsChanged()})),pe.register(be.onCharSizeChange(function(){return pe.onCharSizeChanged()})),pe._renderer.onRequestRedraw(function(Ae){return pe.refreshRows(Ae.start,Ae.end,!0)}),pe.register(E.addDisposableDomListener(window,"resize",function(){return pe.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var me=new IntersectionObserver(function(Ae){return pe._onIntersectionChange(Ae[Ae.length-1])},{threshold:0});me.observe(Se),pe.register({dispose:function(){return me.disconnect()}})}return pe}return Ee(ae,ne),Object.defineProperty(ae.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),ae.prototype._onIntersectionChange=function(oe){this._isPaused=oe.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},ae.prototype.refreshRows=function(oe,ge,Se){Se===void 0&&(Se=!1),this._isPaused?this._needsFullRefresh=!0:(Se||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(oe,ge,this._rowCount))},ae.prototype._renderRows=function(oe,ge){this._renderer.renderRows(oe,ge),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:oe,end:ge}),this._isNextRenderRedrawOnly=!0},ae.prototype.resize=function(oe,ge){this._rowCount=ge,this._fireOnCanvasResize()},ae.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},ae.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},ae.prototype.dispose=function(){ne.prototype.dispose.call(this)},ae.prototype.setRenderer=function(oe){var ge=this;this._renderer.dispose(),this._renderer=oe,this._renderer.onRequestRedraw(function(Se){return ge.refreshRows(Se.start,Se.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},ae.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},ae.prototype.setColors=function(oe){this._renderer.setColors(oe),this._fullRefresh()},ae.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},ae.prototype.onResize=function(oe,ge){this._renderer.onResize(oe,ge),this._fullRefresh()},ae.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},ae.prototype.onBlur=function(){this._renderer.onBlur()},ae.prototype.onFocus=function(){this._renderer.onFocus()},ae.prototype.onSelectionChanged=function(oe,ge,Se){this._selectionState.start=oe,this._selectionState.end=ge,this._selectionState.columnSelectMode=Se,this._renderer.onSelectionChanged(oe,ge,Se)},ae.prototype.onCursorMove=function(){this._renderer.onCursorMove()},ae.prototype.clear=function(){this._renderer.clear()},ae.prototype.registerCharacterJoiner=function(oe){return this._renderer.registerCharacterJoiner(oe)},ae.prototype.deregisterCharacterJoiner=function(oe){return this._renderer.deregisterCharacterJoiner(oe)},ae=ce([se(3,y.IOptionsService),se(4,z.ICharSizeService),se(5,y.IBufferService)],ae)}(ee.Disposable);we.RenderService=x},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(ee,te,E,y){var z,x=arguments.length,ne=x<3?te:y===null?y=Object.getOwnPropertyDescriptor(te,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(ee,te,E,y);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(ne=(x<3?z(ne):x>3?z(te,E,ne):z(te,E))||ne);return x>3&&ne&&Object.defineProperty(te,E,ne),ne},Ee=this&&this.__param||function(ee,te){return function(E,y){te(E,y,ee)}};Object.defineProperty(we,"__esModule",{value:!0}),we.CharSizeService=void 0;var ce=de(1),se=de(0),re=function(){function ee(te,E,y){this._optionsService=y,this.width=0,this.height=0,this._onCharSizeChange=new se.EventEmitter,this._measureStrategy=new ue(te,E,this._optionsService)}return Object.defineProperty(ee.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ee.prototype.measure=function(){var te=this._measureStrategy.measure();te.width===this.width&&te.height===this.height||(this.width=te.width,this.height=te.height,this._onCharSizeChange.fire())},ee=ie([Ee(2,ce.IOptionsService)],ee)}();we.CharSizeService=re;var ue=function(){function ee(te,E,y){this._document=te,this._parentElement=E,this._optionsService=y,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ee.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var te=this._measureElement.getBoundingClientRect();return te.width!==0&&te.height!==0&&(this._result.width=te.width,this._result.height=Math.ceil(te.height)),this._result},ee}()},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(ue,ee,te,E){var y,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,te):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(ue,ee,te,E);else for(var ne=ue.length-1;ne>=0;ne--)(y=ue[ne])&&(x=(z<3?y(x):z>3?y(ee,te,x):y(ee,te))||x);return z>3&&x&&Object.defineProperty(ee,te,x),x},Ee=this&&this.__param||function(ue,ee){return function(te,E){ee(te,E,ue)}};Object.defineProperty(we,"__esModule",{value:!0}),we.MouseService=void 0;var ce=de(5),se=de(30),re=function(){function ue(ee,te){this._renderService=ee,this._charSizeService=te}return ue.prototype.getCoords=function(ee,te,E,y,z){return se.getCoords(ee,te,E,y,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,z)},ue.prototype.getRawByteCoords=function(ee,te,E,y){var z=this.getCoords(ee,te,E,y);return se.getRawByteCoords(z)},ue=ie([Ee(0,ce.IRenderService),Ee(1,ce.ICharSizeService)],ue)}();we.MouseService=re},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ce=this&&this.__decorate||function(y,z,x,ne){var ae,oe=arguments.length,ge=oe<3?z:ne===null?ne=Object.getOwnPropertyDescriptor(z,x):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(y,z,x,ne);else for(var Se=y.length-1;Se>=0;Se--)(ae=y[Se])&&(ge=(oe<3?ae(ge):oe>3?ae(z,x,ge):ae(z,x))||ge);return oe>3&&ge&&Object.defineProperty(z,x,ge),ge},se=this&&this.__param||function(y,z){return function(x,ne){z(x,ne,y)}};Object.defineProperty(we,"__esModule",{value:!0}),we.Linkifier2=void 0;var re=de(1),ue=de(0),ee=de(2),te=de(7),E=function(y){function z(x){var ne=y.call(this)||this;return ne._bufferService=x,ne._linkProviders=[],ne._linkCacheDisposables=[],ne._isMouseOut=!0,ne._activeLine=-1,ne._onShowLinkUnderline=ne.register(new ue.EventEmitter),ne._onHideLinkUnderline=ne.register(new ue.EventEmitter),ne.register(ee.getDisposeArrayDisposable(ne._linkCacheDisposables)),ne}return Ee(z,y),Object.defineProperty(z.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),z.prototype.registerLinkProvider=function(x){var ne=this;return this._linkProviders.push(x),{dispose:function(){var ae=ne._linkProviders.indexOf(x);ae!==-1&&ne._linkProviders.splice(ae,1)}}},z.prototype.attachToDom=function(x,ne,ae){var oe=this;this._element=x,this._mouseService=ne,this._renderService=ae,this.register(te.addDisposableDomListener(this._element,"mouseleave",function(){oe._isMouseOut=!0,oe._clearCurrentLink()})),this.register(te.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(te.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},z.prototype._onMouseMove=function(x){if(this._lastMouseEvent=x,this._element&&this._mouseService){var ne=this._positionFromMouseEvent(x,this._element,this._mouseService);if(ne){this._isMouseOut=!1;for(var ae=x.composedPath(),oe=0;oe<ae.length;oe++){var ge=ae[oe];if(ge.classList.contains("xterm"))break;if(ge.classList.contains("xterm-hover"))return}this._lastBufferCell&&ne.x===this._lastBufferCell.x&&ne.y===this._lastBufferCell.y||(this._onHover(ne),this._lastBufferCell=ne)}}},z.prototype._onHover=function(x){if(this._activeLine!==x.y)return this._clearCurrentLink(),void this._askForLink(x,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,x)||(this._clearCurrentLink(),this._askForLink(x,!0))},z.prototype._askForLink=function(x,ne){var ae=this;this._activeProviderReplies&&ne||(this._activeProviderReplies=new Map,this._activeLine=x.y);var oe=!1;this._linkProviders.forEach(function(ge,Se){var ve;ne?!((ve=ae._activeProviderReplies)===null||ve===void 0)&&ve.get(Se)&&(oe=ae._checkLinkProviderResult(Se,x,oe)):ge.provideLinks(x.y,function(be){var xe,pe;if(!ae._isMouseOut){var me=be==null?void 0:be.map(function(Ae){return{link:Ae}});(xe=ae._activeProviderReplies)===null||xe===void 0||xe.set(Se,me),oe=ae._checkLinkProviderResult(Se,x,oe),((pe=ae._activeProviderReplies)===null||pe===void 0?void 0:pe.size)===ae._linkProviders.length&&ae._removeIntersectingLinks(x.y,ae._activeProviderReplies)}})})},z.prototype._removeIntersectingLinks=function(x,ne){for(var ae=new Set,oe=0;oe<ne.size;oe++){var ge=ne.get(oe);if(ge)for(var Se=0;Se<ge.length;Se++)for(var ve=ge[Se],be=ve.link.range.start.y<x?0:ve.link.range.start.x,xe=ve.link.range.end.y>x?this._bufferService.cols:ve.link.range.end.x,pe=be;pe<=xe;pe++){if(ae.has(pe)){ge.splice(Se--,1);break}ae.add(pe)}}},z.prototype._checkLinkProviderResult=function(x,ne,ae){var oe,ge=this;if(!this._activeProviderReplies)return ae;for(var Se=this._activeProviderReplies.get(x),ve=!1,be=0;be<x;be++)this._activeProviderReplies.has(be)&&!this._activeProviderReplies.get(be)||(ve=!0);if(!ve&&Se){var xe=Se.find(function(me){return ge._linkAtPosition(me.link,ne)});xe&&(ae=!0,this._handleNewLink(xe))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ae)for(be=0;be<this._activeProviderReplies.size;be++){var pe=(oe=this._activeProviderReplies.get(be))===null||oe===void 0?void 0:oe.find(function(me){return ge._linkAtPosition(me.link,ne)});if(pe){ae=!0,this._handleNewLink(pe);break}}return ae},z.prototype._onClick=function(x){if(this._element&&this._mouseService&&this._currentLink){var ne=this._positionFromMouseEvent(x,this._element,this._mouseService);ne&&this._linkAtPosition(this._currentLink.link,ne)&&this._currentLink.link.activate(x,this._currentLink.link.text)}},z.prototype._clearCurrentLink=function(x,ne){this._element&&this._currentLink&&this._lastMouseEvent&&(!x||!ne||this._currentLink.link.range.start.y>=x&&this._currentLink.link.range.end.y<=ne)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ee.disposeArray(this._linkCacheDisposables))},z.prototype._handleNewLink=function(x){var ne=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var ae=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);ae&&this._linkAtPosition(x.link,ae)&&(this._currentLink=x,this._currentLink.state={decorations:{underline:x.link.decorations===void 0||x.link.decorations.underline,pointerCursor:x.link.decorations===void 0||x.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,x.link,this._lastMouseEvent),x.link.decorations={},Object.defineProperties(x.link.decorations,{pointerCursor:{get:function(){var oe,ge;return(ge=(oe=ne._currentLink)===null||oe===void 0?void 0:oe.state)===null||ge===void 0?void 0:ge.decorations.pointerCursor},set:function(oe){var ge,Se;!((ge=ne._currentLink)===null||ge===void 0)&&ge.state&&ne._currentLink.state.decorations.pointerCursor!==oe&&(ne._currentLink.state.decorations.pointerCursor=oe,ne._currentLink.state.isHovered&&((Se=ne._element)===null||Se===void 0||Se.classList.toggle("xterm-cursor-pointer",oe)))}},underline:{get:function(){var oe,ge;return(ge=(oe=ne._currentLink)===null||oe===void 0?void 0:oe.state)===null||ge===void 0?void 0:ge.decorations.underline},set:function(oe){var ge,Se,ve;!((ge=ne._currentLink)===null||ge===void 0)&&ge.state&&((ve=(Se=ne._currentLink)===null||Se===void 0?void 0:Se.state)===null||ve===void 0?void 0:ve.decorations.underline)!==oe&&(ne._currentLink.state.decorations.underline=oe,ne._currentLink.state.isHovered&&ne._fireUnderlineEvent(x.link,oe))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(oe){var ge=oe.start===0?0:oe.start+1+ne._bufferService.buffer.ydisp;ne._clearCurrentLink(ge,oe.end+1+ne._bufferService.buffer.ydisp)})))}},z.prototype._linkHover=function(x,ne,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ne,!0),this._currentLink.state.decorations.pointerCursor&&x.classList.add("xterm-cursor-pointer")),ne.hover&&ne.hover(ae,ne.text)},z.prototype._fireUnderlineEvent=function(x,ne){var ae=x.range,oe=this._bufferService.buffer.ydisp,ge=this._createLinkUnderlineEvent(ae.start.x-1,ae.start.y-oe-1,ae.end.x,ae.end.y-oe-1,void 0);(ne?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(ge)},z.prototype._linkLeave=function(x,ne,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(ne,!1),this._currentLink.state.decorations.pointerCursor&&x.classList.remove("xterm-cursor-pointer")),ne.leave&&ne.leave(ae,ne.text)},z.prototype._linkAtPosition=function(x,ne){var ae=x.range.start.y===x.range.end.y,oe=x.range.start.y<ne.y,ge=x.range.end.y>ne.y;return(ae&&x.range.start.x<=ne.x&&x.range.end.x>=ne.x||oe&&x.range.end.x>=ne.x||ge&&x.range.start.x<=ne.x||oe&&ge)&&x.range.start.y<=ne.y&&x.range.end.y>=ne.y},z.prototype._positionFromMouseEvent=function(x,ne,ae){var oe=ae.getCoords(x,ne,this._bufferService.cols,this._bufferService.rows);if(oe)return{x:oe[0],y:oe[1]+this._bufferService.buffer.ydisp}},z.prototype._createLinkUnderlineEvent=function(x,ne,ae,oe,ge){return{x1:x,y1:ne,x2:ae,y2:oe,cols:this._bufferService.cols,fg:ge}},z=ce([se(0,re.IBufferService)],z)}(ee.Disposable);we.Linkifier2=E},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.CoreBrowserService=void 0;var ie=function(){function Ee(ce){this._textarea=ce}return Object.defineProperty(Ee.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Ee}();we.CoreBrowserService=ie},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(be,xe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pe,me){pe.__proto__=me}||function(pe,me){for(var Ae in me)me.hasOwnProperty(Ae)&&(pe[Ae]=me[Ae])})(be,xe)},function(be,xe){function pe(){this.constructor=be}ie(be,xe),be.prototype=xe===null?Object.create(xe):(pe.prototype=xe.prototype,new pe)});Object.defineProperty(we,"__esModule",{value:!0}),we.CoreTerminal=void 0;var ce=de(2),se=de(1),re=de(66),ue=de(67),ee=de(68),te=de(74),E=de(75),y=de(0),z=de(76),x=de(77),ne=de(78),ae=de(80),oe=de(81),ge=de(19),Se=de(82),ve=function(be){function xe(pe){var me=be.call(this)||this;return me._onBinary=new y.EventEmitter,me._onData=new y.EventEmitter,me._onLineFeed=new y.EventEmitter,me._onResize=new y.EventEmitter,me._onScroll=new y.EventEmitter,me._instantiationService=new re.InstantiationService,me.optionsService=new te.OptionsService(pe),me._instantiationService.setService(se.IOptionsService,me.optionsService),me._bufferService=me.register(me._instantiationService.createInstance(ee.BufferService)),me._instantiationService.setService(se.IBufferService,me._bufferService),me._logService=me._instantiationService.createInstance(ue.LogService),me._instantiationService.setService(se.ILogService,me._logService),me._coreService=me.register(me._instantiationService.createInstance(E.CoreService,function(){return me.scrollToBottom()})),me._instantiationService.setService(se.ICoreService,me._coreService),me._coreMouseService=me._instantiationService.createInstance(z.CoreMouseService),me._instantiationService.setService(se.ICoreMouseService,me._coreMouseService),me._dirtyRowService=me._instantiationService.createInstance(x.DirtyRowService),me._instantiationService.setService(se.IDirtyRowService,me._dirtyRowService),me.unicodeService=me._instantiationService.createInstance(ne.UnicodeService),me._instantiationService.setService(se.IUnicodeService,me.unicodeService),me._charsetService=me._instantiationService.createInstance(ae.CharsetService),me._instantiationService.setService(se.ICharsetService,me._charsetService),me._inputHandler=new ge.InputHandler(me._bufferService,me._charsetService,me._coreService,me._dirtyRowService,me._logService,me.optionsService,me._coreMouseService,me.unicodeService),me.register(y.forwardEvent(me._inputHandler.onLineFeed,me._onLineFeed)),me.register(me._inputHandler),me.register(y.forwardEvent(me._bufferService.onResize,me._onResize)),me.register(y.forwardEvent(me._coreService.onData,me._onData)),me.register(y.forwardEvent(me._coreService.onBinary,me._onBinary)),me.register(me.optionsService.onOptionChange(function(Ae){return me._updateOptions(Ae)})),me._writeBuffer=new Se.WriteBuffer(function(Ae){return me._inputHandler.parse(Ae)}),me}return Ee(xe,be),Object.defineProperty(xe.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(xe.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),xe.prototype.dispose=function(){var pe;this._isDisposed||(be.prototype.dispose.call(this),(pe=this._windowsMode)===null||pe===void 0||pe.dispose(),this._windowsMode=void 0)},xe.prototype.write=function(pe,me){this._writeBuffer.write(pe,me)},xe.prototype.writeSync=function(pe){this._writeBuffer.writeSync(pe)},xe.prototype.resize=function(pe,me){isNaN(pe)||isNaN(me)||(pe=Math.max(pe,ee.MINIMUM_COLS),me=Math.max(me,ee.MINIMUM_ROWS),this._bufferService.resize(pe,me))},xe.prototype.scroll=function(pe,me){me===void 0&&(me=!1);var Ae,De=this._bufferService.buffer;(Ae=this._cachedBlankLine)&&Ae.length===this.cols&&Ae.getFg(0)===pe.fg&&Ae.getBg(0)===pe.bg||(Ae=De.getBlankLine(pe,me),this._cachedBlankLine=Ae),Ae.isWrapped=me;var ke=De.ybase+De.scrollTop,Ie=De.ybase+De.scrollBottom;if(De.scrollTop===0){var Fe=De.lines.isFull;Ie===De.lines.length-1?Fe?De.lines.recycle().copyFrom(Ae):De.lines.push(Ae.clone()):De.lines.splice(Ie+1,0,Ae.clone()),Fe?this._bufferService.isUserScrolling&&(De.ydisp=Math.max(De.ydisp-1,0)):(De.ybase++,this._bufferService.isUserScrolling||De.ydisp++)}else{var Pe=Ie-ke+1;De.lines.shiftElements(ke+1,Pe-1,-1),De.lines.set(Ie,Ae.clone())}this._bufferService.isUserScrolling||(De.ydisp=De.ybase),this._dirtyRowService.markRangeDirty(De.scrollTop,De.scrollBottom),this._onScroll.fire(De.ydisp)},xe.prototype.scrollLines=function(pe,me){var Ae=this._bufferService.buffer;if(pe<0){if(Ae.ydisp===0)return;this._bufferService.isUserScrolling=!0}else pe+Ae.ydisp>=Ae.ybase&&(this._bufferService.isUserScrolling=!1);var De=Ae.ydisp;Ae.ydisp=Math.max(Math.min(Ae.ydisp+pe,Ae.ybase),0),De!==Ae.ydisp&&(me||this._onScroll.fire(Ae.ydisp))},xe.prototype.scrollPages=function(pe){this.scrollLines(pe*(this.rows-1))},xe.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},xe.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},xe.prototype.scrollToLine=function(pe){var me=pe-this._bufferService.buffer.ydisp;me!==0&&this.scrollLines(me)},xe.prototype.addEscHandler=function(pe,me){return this._inputHandler.addEscHandler(pe,me)},xe.prototype.addDcsHandler=function(pe,me){return this._inputHandler.addDcsHandler(pe,me)},xe.prototype.addCsiHandler=function(pe,me){return this._inputHandler.addCsiHandler(pe,me)},xe.prototype.addOscHandler=function(pe,me){return this._inputHandler.addOscHandler(pe,me)},xe.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},xe.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},xe.prototype._updateOptions=function(pe){var me;switch(pe){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((me=this._windowsMode)===null||me===void 0||me.dispose(),this._windowsMode=void 0)}},xe.prototype._enableWindowsMode=function(){var pe=this;if(!this._windowsMode){var me=[];me.push(this.onLineFeed(oe.updateWindowsModeWrappedState.bind(null,this._bufferService))),me.push(this.addCsiHandler({final:"H"},function(){return oe.updateWindowsModeWrappedState(pe._bufferService),!1})),this._windowsMode={dispose:function(){for(var Ae=0,De=me;Ae<De.length;Ae++)De[Ae].dispose()}}}},xe}(ce.Disposable);we.CoreTerminal=ve},function(Ot,we,de){"use strict";var ie=this&&this.__spreadArrays||function(){for(var ue=0,ee=0,te=arguments.length;ee<te;ee++)ue+=arguments[ee].length;var E=Array(ue),y=0;for(ee=0;ee<te;ee++)for(var z=arguments[ee],x=0,ne=z.length;x<ne;x++,y++)E[y]=z[x];return E};Object.defineProperty(we,"__esModule",{value:!0}),we.InstantiationService=we.ServiceCollection=void 0;var Ee=de(1),ce=de(14),se=function(){function ue(){for(var ee=[],te=0;te<arguments.length;te++)ee[te]=arguments[te];this._entries=new Map;for(var E=0,y=ee;E<y.length;E++){var z=y[E],x=z[0],ne=z[1];this.set(x,ne)}}return ue.prototype.set=function(ee,te){var E=this._entries.get(ee);return this._entries.set(ee,te),E},ue.prototype.forEach=function(ee){this._entries.forEach(function(te,E){return ee(E,te)})},ue.prototype.has=function(ee){return this._entries.has(ee)},ue.prototype.get=function(ee){return this._entries.get(ee)},ue}();we.ServiceCollection=se;var re=function(){function ue(){this._services=new se,this._services.set(Ee.IInstantiationService,this)}return ue.prototype.setService=function(ee,te){this._services.set(ee,te)},ue.prototype.getService=function(ee){return this._services.get(ee)},ue.prototype.createInstance=function(ee){for(var te=[],E=1;E<arguments.length;E++)te[E-1]=arguments[E];for(var y=ce.getServiceDependencies(ee).sort(function(Se,ve){return Se.index-ve.index}),z=[],x=0,ne=y;x<ne.length;x++){var ae=ne[x],oe=this._services.get(ae.id);if(!oe)throw new Error("[createInstance] "+ee.name+" depends on UNKNOWN service "+ae.id+".");z.push(oe)}var ge=y.length>0?y[0].index:te.length;if(te.length!==ge)throw new Error("[createInstance] First service dependency of "+ee.name+" at position "+(ge+1)+" conflicts with "+te.length+" static arguments");return new(ee.bind.apply(ee,ie([void 0],ie(te,z))))},ue}();we.InstantiationService=re},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(te,E,y,z){var x,ne=arguments.length,ae=ne<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,y):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(te,E,y,z);else for(var oe=te.length-1;oe>=0;oe--)(x=te[oe])&&(ae=(ne<3?x(ae):ne>3?x(E,y,ae):x(E,y))||ae);return ne>3&&ae&&Object.defineProperty(E,y,ae),ae},Ee=this&&this.__param||function(te,E){return function(y,z){E(y,z,te)}},ce=this&&this.__spreadArrays||function(){for(var te=0,E=0,y=arguments.length;E<y;E++)te+=arguments[E].length;var z=Array(te),x=0;for(E=0;E<y;E++)for(var ne=arguments[E],ae=0,oe=ne.length;ae<oe;ae++,x++)z[x]=ne[ae];return z};Object.defineProperty(we,"__esModule",{value:!0}),we.LogService=we.LogLevel=void 0;var se,re=de(1);(function(te){te[te.DEBUG=0]="DEBUG",te[te.INFO=1]="INFO",te[te.WARN=2]="WARN",te[te.ERROR=3]="ERROR",te[te.OFF=4]="OFF"})(se=we.LogLevel||(we.LogLevel={}));var ue={debug:se.DEBUG,info:se.INFO,warn:se.WARN,error:se.ERROR,off:se.OFF},ee=function(){function te(E){var y=this;this._optionsService=E,this._updateLogLevel(),this._optionsService.onOptionChange(function(z){z==="logLevel"&&y._updateLogLevel()})}return te.prototype._updateLogLevel=function(){this._logLevel=ue[this._optionsService.options.logLevel]},te.prototype._evalLazyOptionalParams=function(E){for(var y=0;y<E.length;y++)typeof E[y]=="function"&&(E[y]=E[y]())},te.prototype._log=function(E,y,z){this._evalLazyOptionalParams(z),E.call.apply(E,ce([console,"xterm.js: "+y],z))},te.prototype.debug=function(E){for(var y=[],z=1;z<arguments.length;z++)y[z-1]=arguments[z];this._logLevel<=se.DEBUG&&this._log(console.log,E,y)},te.prototype.info=function(E){for(var y=[],z=1;z<arguments.length;z++)y[z-1]=arguments[z];this._logLevel<=se.INFO&&this._log(console.info,E,y)},te.prototype.warn=function(E){for(var y=[],z=1;z<arguments.length;z++)y[z-1]=arguments[z];this._logLevel<=se.WARN&&this._log(console.warn,E,y)},te.prototype.error=function(E){for(var y=[],z=1;z<arguments.length;z++)y[z-1]=arguments[z];this._logLevel<=se.ERROR&&this._log(console.error,E,y)},te=ie([Ee(0,re.IOptionsService)],te)}();we.LogService=ee},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(y,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,ne){x.__proto__=ne}||function(x,ne){for(var ae in ne)ne.hasOwnProperty(ae)&&(x[ae]=ne[ae])})(y,z)},function(y,z){function x(){this.constructor=y}ie(y,z),y.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ce=this&&this.__decorate||function(y,z,x,ne){var ae,oe=arguments.length,ge=oe<3?z:ne===null?ne=Object.getOwnPropertyDescriptor(z,x):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(y,z,x,ne);else for(var Se=y.length-1;Se>=0;Se--)(ae=y[Se])&&(ge=(oe<3?ae(ge):oe>3?ae(z,x,ge):ae(z,x))||ge);return oe>3&&ge&&Object.defineProperty(z,x,ge),ge},se=this&&this.__param||function(y,z){return function(x,ne){z(x,ne,y)}};Object.defineProperty(we,"__esModule",{value:!0}),we.BufferService=we.MINIMUM_ROWS=we.MINIMUM_COLS=void 0;var re=de(1),ue=de(69),ee=de(0),te=de(2);we.MINIMUM_COLS=2,we.MINIMUM_ROWS=1;var E=function(y){function z(x){var ne=y.call(this)||this;return ne._optionsService=x,ne.isUserScrolling=!1,ne._onResize=new ee.EventEmitter,ne.cols=Math.max(x.options.cols,we.MINIMUM_COLS),ne.rows=Math.max(x.options.rows,we.MINIMUM_ROWS),ne.buffers=new ue.BufferSet(x,ne),ne}return Ee(z,y),Object.defineProperty(z.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),z.prototype.dispose=function(){y.prototype.dispose.call(this),this.buffers.dispose()},z.prototype.resize=function(x,ne){this.cols=x,this.rows=ne,this.buffers.resize(x,ne),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:x,rows:ne})},z.prototype.reset=function(){this.buffers.dispose(),this.buffers=new ue.BufferSet(this._optionsService,this),this.isUserScrolling=!1},z=ce([se(0,re.IOptionsService)],z)}(te.Disposable);we.BufferService=E},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(ue,ee){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(te,E){te.__proto__=E}||function(te,E){for(var y in E)E.hasOwnProperty(y)&&(te[y]=E[y])})(ue,ee)},function(ue,ee){function te(){this.constructor=ue}ie(ue,ee),ue.prototype=ee===null?Object.create(ee):(te.prototype=ee.prototype,new te)});Object.defineProperty(we,"__esModule",{value:!0}),we.BufferSet=void 0;var ce=de(70),se=de(0),re=function(ue){function ee(te,E){var y=ue.call(this)||this;return y._onBufferActivate=y.register(new se.EventEmitter),y._normal=new ce.Buffer(!0,te,E),y._normal.fillViewportRows(),y._alt=new ce.Buffer(!1,te,E),y._activeBuffer=y._normal,y.setupTabStops(),y}return Ee(ee,ue),Object.defineProperty(ee.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ee.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ee.prototype.activateAltBuffer=function(te){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(te),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ee.prototype.resize=function(te,E){this._normal.resize(te,E),this._alt.resize(te,E)},ee.prototype.setupTabStops=function(te){this._normal.setupTabStops(te),this._alt.setupTabStops(te)},ee}(de(2).Disposable);we.BufferSet=re},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.BufferStringIterator=we.Buffer=we.MAX_BUFFER_SIZE=void 0;var ie=de(71),Ee=de(16),ce=de(4),se=de(3),re=de(72),ue=de(73),ee=de(20),te=de(6);we.MAX_BUFFER_SIZE=4294967295;var E=function(){function z(x,ne,ae){this._hasScrollback=x,this._optionsService=ne,this._bufferService=ae,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Ee.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ee.DEFAULT_CHARSET,this.markers=[],this._nullCell=ce.CellData.fromCharData([0,se.NULL_CELL_CHAR,se.NULL_CELL_WIDTH,se.NULL_CELL_CODE]),this._whitespaceCell=ce.CellData.fromCharData([0,se.WHITESPACE_CELL_CHAR,se.WHITESPACE_CELL_WIDTH,se.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new ie.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return z.prototype.getNullCell=function(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new te.ExtendedAttrs),this._nullCell},z.prototype.getWhitespaceCell=function(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new te.ExtendedAttrs),this._whitespaceCell},z.prototype.getBlankLine=function(x,ne){return new Ee.BufferLine(this._bufferService.cols,this.getNullCell(x),ne)},Object.defineProperty(z.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"isCursorInViewport",{get:function(){var x=this.ybase+this.y-this.ydisp;return x>=0&&x<this._rows},enumerable:!1,configurable:!0}),z.prototype._getCorrectBufferLength=function(x){if(!this._hasScrollback)return x;var ne=x+this._optionsService.options.scrollback;return ne>we.MAX_BUFFER_SIZE?we.MAX_BUFFER_SIZE:ne},z.prototype.fillViewportRows=function(x){if(this.lines.length===0){x===void 0&&(x=Ee.DEFAULT_ATTR_DATA);for(var ne=this._rows;ne--;)this.lines.push(this.getBlankLine(x))}},z.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new ie.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},z.prototype.resize=function(x,ne){var ae=this.getNullCell(Ee.DEFAULT_ATTR_DATA),oe=this._getCorrectBufferLength(ne);if(oe>this.lines.maxLength&&(this.lines.maxLength=oe),this.lines.length>0){if(this._cols<x)for(var ge=0;ge<this.lines.length;ge++)this.lines.get(ge).resize(x,ae);var Se=0;if(this._rows<ne)for(var ve=this._rows;ve<ne;ve++)this.lines.length<ne+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Ee.BufferLine(x,ae)):this.ybase>0&&this.lines.length<=this.ybase+this.y+Se+1?(this.ybase--,Se++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ee.BufferLine(x,ae)));else for(ve=this._rows;ve>ne;ve--)this.lines.length>ne+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(oe<this.lines.maxLength){var be=this.lines.length-oe;be>0&&(this.lines.trimStart(be),this.ybase=Math.max(this.ybase-be,0),this.ydisp=Math.max(this.ydisp-be,0),this.savedY=Math.max(this.savedY-be,0)),this.lines.maxLength=oe}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,ne-1),Se&&(this.y+=Se),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=ne-1,this._isReflowEnabled&&(this._reflow(x,ne),this._cols>x))for(ge=0;ge<this.lines.length;ge++)this.lines.get(ge).resize(x,ae);this._cols=x,this._rows=ne},Object.defineProperty(z.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),z.prototype._reflow=function(x,ne){this._cols!==x&&(x>this._cols?this._reflowLarger(x,ne):this._reflowSmaller(x,ne))},z.prototype._reflowLarger=function(x,ne){var ae=re.reflowLargerGetLinesToRemove(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(Ee.DEFAULT_ATTR_DATA));if(ae.length>0){var oe=re.reflowLargerCreateNewLayout(this.lines,ae);re.reflowLargerApplyNewLayout(this.lines,oe.layout),this._reflowLargerAdjustViewport(x,ne,oe.countRemoved)}},z.prototype._reflowLargerAdjustViewport=function(x,ne,ae){for(var oe=this.getNullCell(Ee.DEFAULT_ATTR_DATA),ge=ae;ge-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<ne&&this.lines.push(new Ee.BufferLine(x,oe))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ae,0)},z.prototype._reflowSmaller=function(x,ne){for(var ae=this.getNullCell(Ee.DEFAULT_ATTR_DATA),oe=[],ge=0,Se=this.lines.length-1;Se>=0;Se--){var ve=this.lines.get(Se);if(!(!ve||!ve.isWrapped&&ve.getTrimmedLength()<=x)){for(var be=[ve];ve.isWrapped&&Se>0;)ve=this.lines.get(--Se),be.unshift(ve);var xe=this.ybase+this.y;if(!(xe>=Se&&xe<Se+be.length)){var pe=be[be.length-1].getTrimmedLength(),me=re.reflowSmallerGetNewLineLengths(be,this._cols,x),Ae=me.length-be.length,De=void 0;De=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Ae):Math.max(0,this.lines.length-this.lines.maxLength+Ae);for(var ke=[],Ie=0;Ie<Ae;Ie++){var Fe=this.getBlankLine(Ee.DEFAULT_ATTR_DATA,!0);ke.push(Fe)}ke.length>0&&(oe.push({start:Se+be.length+ge,newLines:ke}),ge+=ke.length),be.push.apply(be,ke);var Pe=me.length-1,qe=me[Pe];qe===0&&(qe=me[--Pe]);for(var Ke=be.length-Ae-1,ot=pe;Ke>=0;){var He=Math.min(ot,qe);if(be[Pe].copyCellsFrom(be[Ke],ot-He,qe-He,He,!0),(qe-=He)===0&&(qe=me[--Pe]),(ot-=He)===0){Ke--;var rt=Math.max(Ke,0);ot=re.getWrappedLineTrimmedLength(be,rt,this._cols)}}for(Ie=0;Ie<be.length;Ie++)me[Ie]<x&&be[Ie].setCell(me[Ie],ae);for(var Ge=Ae-De;Ge-- >0;)this.ybase===0?this.y<ne-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+ge)-ne&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Ae,this.ybase+ne-1)}}}if(oe.length>0){var ct=[],We=[];for(Ie=0;Ie<this.lines.length;Ie++)We.push(this.lines.get(Ie));var Ue=this.lines.length,Ze=Ue-1,Je=0,$e=oe[Je];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+ge);var Qe=0;for(Ie=Math.min(this.lines.maxLength-1,Ue+ge-1);Ie>=0;Ie--)if($e&&$e.start>Ze+Qe){for(var pt=$e.newLines.length-1;pt>=0;pt--)this.lines.set(Ie--,$e.newLines[pt]);Ie++,ct.push({index:Ze+1,amount:$e.newLines.length}),Qe+=$e.newLines.length,$e=oe[++Je]}else this.lines.set(Ie,We[Ze--]);var ht=0;for(Ie=ct.length-1;Ie>=0;Ie--)ct[Ie].index+=ht,this.lines.onInsertEmitter.fire(ct[Ie]),ht+=ct[Ie].amount;var Pt=Math.max(0,Ue+ge-this.lines.maxLength);Pt>0&&this.lines.onTrimEmitter.fire(Pt)}},z.prototype.stringIndexToBufferIndex=function(x,ne,ae){for(ae===void 0&&(ae=!1);ne;){var oe=this.lines.get(x);if(!oe)return[-1,-1];for(var ge=ae?oe.getTrimmedLength():oe.length,Se=0;Se<ge;++Se)if(oe.get(Se)[se.CHAR_DATA_WIDTH_INDEX]&&(ne-=oe.get(Se)[se.CHAR_DATA_CHAR_INDEX].length||1),ne<0)return[x,Se];x++}return[x,0]},z.prototype.translateBufferLineToString=function(x,ne,ae,oe){ae===void 0&&(ae=0);var ge=this.lines.get(x);return ge?ge.translateToString(ne,ae,oe):""},z.prototype.getWrappedRangeForLine=function(x){for(var ne=x,ae=x;ne>0&&this.lines.get(ne).isWrapped;)ne--;for(;ae+1<this.lines.length&&this.lines.get(ae+1).isWrapped;)ae++;return{first:ne,last:ae}},z.prototype.setupTabStops=function(x){for(x!=null?this.tabs[x]||(x=this.prevStop(x)):(this.tabs={},x=0);x<this._cols;x+=this._optionsService.options.tabStopWidth)this.tabs[x]=!0},z.prototype.prevStop=function(x){for(x==null&&(x=this.x);!this.tabs[--x]&&x>0;);return x>=this._cols?this._cols-1:x<0?0:x},z.prototype.nextStop=function(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x<this._cols;);return x>=this._cols?this._cols-1:x<0?0:x},z.prototype.addMarker=function(x){var ne=this,ae=new ue.Marker(x);return this.markers.push(ae),ae.register(this.lines.onTrim(function(oe){ae.line-=oe,ae.line<0&&ae.dispose()})),ae.register(this.lines.onInsert(function(oe){ae.line>=oe.index&&(ae.line+=oe.amount)})),ae.register(this.lines.onDelete(function(oe){ae.line>=oe.index&&ae.line<oe.index+oe.amount&&ae.dispose(),ae.line>oe.index&&(ae.line-=oe.amount)})),ae.register(ae.onDispose(function(){return ne._removeMarker(ae)})),ae},z.prototype._removeMarker=function(x){this.markers.splice(this.markers.indexOf(x),1)},z.prototype.iterator=function(x,ne,ae,oe,ge){return new y(this,x,ne,ae,oe,ge)},z}();we.Buffer=E;var y=function(){function z(x,ne,ae,oe,ge,Se){ae===void 0&&(ae=0),oe===void 0&&(oe=x.lines.length),ge===void 0&&(ge=0),Se===void 0&&(Se=0),this._buffer=x,this._trimRight=ne,this._startIndex=ae,this._endIndex=oe,this._startOverscan=ge,this._endOverscan=Se,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return z.prototype.hasNext=function(){return this._current<this._endIndex},z.prototype.next=function(){var x=this._buffer.getWrappedRangeForLine(this._current);x.first<this._startIndex-this._startOverscan&&(x.first=this._startIndex-this._startOverscan),x.last>this._endIndex+this._endOverscan&&(x.last=this._endIndex+this._endOverscan),x.first=Math.max(x.first,0),x.last=Math.min(x.last,this._buffer.lines.length);for(var ne="",ae=x.first;ae<=x.last;++ae)ne+=this._buffer.translateBufferLineToString(ae,this._trimRight);return this._current=x.last+1,{range:x,content:ne}},z}();we.BufferStringIterator=y},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.CircularList=void 0;var ie=de(0),Ee=function(){function ce(se){this._maxLength=se,this.onDeleteEmitter=new ie.EventEmitter,this.onInsertEmitter=new ie.EventEmitter,this.onTrimEmitter=new ie.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(ce.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"maxLength",{get:function(){return this._maxLength},set:function(se){if(this._maxLength!==se){for(var re=new Array(se),ue=0;ue<Math.min(se,this.length);ue++)re[ue]=this._array[this._getCyclicIndex(ue)];this._array=re,this._maxLength=se,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ce.prototype,"length",{get:function(){return this._length},set:function(se){if(se>this._length)for(var re=this._length;re<se;re++)this._array[re]=void 0;this._length=se},enumerable:!1,configurable:!0}),ce.prototype.get=function(se){return this._array[this._getCyclicIndex(se)]},ce.prototype.set=function(se,re){this._array[this._getCyclicIndex(se)]=re},ce.prototype.push=function(se){this._array[this._getCyclicIndex(this._length)]=se,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},ce.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(ce.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),ce.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},ce.prototype.splice=function(se,re){for(var ue=[],ee=2;ee<arguments.length;ee++)ue[ee-2]=arguments[ee];if(re){for(var te=se;te<this._length-re;te++)this._array[this._getCyclicIndex(te)]=this._array[this._getCyclicIndex(te+re)];this._length-=re}for(te=this._length-1;te>=se;te--)this._array[this._getCyclicIndex(te+ue.length)]=this._array[this._getCyclicIndex(te)];for(te=0;te<ue.length;te++)this._array[this._getCyclicIndex(se+te)]=ue[te];if(this._length+ue.length>this._maxLength){var E=this._length+ue.length-this._maxLength;this._startIndex+=E,this._length=this._maxLength,this.onTrimEmitter.fire(E)}else this._length+=ue.length},ce.prototype.trimStart=function(se){se>this._length&&(se=this._length),this._startIndex+=se,this._length-=se,this.onTrimEmitter.fire(se)},ce.prototype.shiftElements=function(se,re,ue){if(!(re<=0)){if(se<0||se>=this._length)throw new Error("start argument out of range");if(se+ue<0)throw new Error("Cannot shift elements in list beyond index 0");if(ue>0){for(var ee=re-1;ee>=0;ee--)this.set(se+ee+ue,this.get(se+ee));var te=se+re+ue-this._length;if(te>0)for(this._length+=te;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ee=0;ee<re;ee++)this.set(se+ee+ue,this.get(se+ee))}},ce.prototype._getCyclicIndex=function(se){return(this._startIndex+se)%this._maxLength},ce}();we.CircularList=Ee},function(Ot,we,de){"use strict";function ie(Ee,ce,se){if(ce===Ee.length-1)return Ee[ce].getTrimmedLength();var re=!Ee[ce].hasContent(se-1)&&Ee[ce].getWidth(se-1)===1,ue=Ee[ce+1].getWidth(0)===2;return re&&ue?se-1:se}Object.defineProperty(we,"__esModule",{value:!0}),we.getWrappedLineTrimmedLength=we.reflowSmallerGetNewLineLengths=we.reflowLargerApplyNewLayout=we.reflowLargerCreateNewLayout=we.reflowLargerGetLinesToRemove=void 0,we.reflowLargerGetLinesToRemove=function(Ee,ce,se,re,ue){for(var ee=[],te=0;te<Ee.length-1;te++){var E=te,y=Ee.get(++E);if(y.isWrapped){for(var z=[Ee.get(te)];E<Ee.length&&y.isWrapped;)z.push(y),y=Ee.get(++E);if(re>=te&&re<E)te+=z.length-1;else{for(var x=0,ne=ie(z,x,ce),ae=1,oe=0;ae<z.length;){var ge=ie(z,ae,ce),Se=ge-oe,ve=se-ne,be=Math.min(Se,ve);z[x].copyCellsFrom(z[ae],oe,ne,be,!1),(ne+=be)===se&&(x++,ne=0),(oe+=be)===ge&&(ae++,oe=0),ne===0&&x!==0&&z[x-1].getWidth(se-1)===2&&(z[x].copyCellsFrom(z[x-1],se-1,ne++,1,!1),z[x-1].setCell(se-1,ue))}z[x].replaceCells(ne,se,ue);for(var xe=0,pe=z.length-1;pe>0&&(pe>x||z[pe].getTrimmedLength()===0);pe--)xe++;xe>0&&(ee.push(te+z.length-xe),ee.push(xe)),te+=z.length-1}}}return ee},we.reflowLargerCreateNewLayout=function(Ee,ce){for(var se=[],re=0,ue=ce[re],ee=0,te=0;te<Ee.length;te++)if(ue===te){var E=ce[++re];Ee.onDeleteEmitter.fire({index:te-ee,amount:E}),te+=E-1,ee+=E,ue=ce[++re]}else se.push(te);return{layout:se,countRemoved:ee}},we.reflowLargerApplyNewLayout=function(Ee,ce){for(var se=[],re=0;re<ce.length;re++)se.push(Ee.get(ce[re]));for(re=0;re<se.length;re++)Ee.set(re,se[re]);Ee.length=ce.length},we.reflowSmallerGetNewLineLengths=function(Ee,ce,se){for(var re=[],ue=Ee.map(function(ne,ae){return ie(Ee,ae,ce)}).reduce(function(ne,ae){return ne+ae}),ee=0,te=0,E=0;E<ue;){if(ue-E<se){re.push(ue-E);break}ee+=se;var y=ie(Ee,te,ce);ee>y&&(ee-=y,te++);var z=Ee[te].getWidth(ee-1)===2;z&&ee--;var x=z?se-1:se;re.push(x),E+=x}return re},we.getWrappedLineTrimmedLength=ie},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(re,ue){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,te){ee.__proto__=te}||function(ee,te){for(var E in te)te.hasOwnProperty(E)&&(ee[E]=te[E])})(re,ue)},function(re,ue){function ee(){this.constructor=re}ie(re,ue),re.prototype=ue===null?Object.create(ue):(ee.prototype=ue.prototype,new ee)});Object.defineProperty(we,"__esModule",{value:!0}),we.Marker=void 0;var ce=de(0),se=function(re){function ue(ee){var te=re.call(this)||this;return te.line=ee,te._id=ue._nextId++,te.isDisposed=!1,te._onDispose=new ce.EventEmitter,te}return Ee(ue,re),Object.defineProperty(ue.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),ue.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},ue._nextId=1,ue}(de(2).Disposable);we.Marker=se},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.OptionsService=we.DEFAULT_OPTIONS=we.DEFAULT_BELL_SOUND=void 0;var ie=de(0),Ee=de(11),ce=de(33);we.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",we.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:we.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Ee.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var se=["cols","rows"],re=function(){function ue(ee){this._onOptionChange=new ie.EventEmitter,this.options=ce.clone(we.DEFAULT_OPTIONS);for(var te=0,E=Object.keys(ee);te<E.length;te++){var y=E[te];if(y in this.options){var z=ee[y];this.options[y]=z}}}return Object.defineProperty(ue.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),ue.prototype.setOption=function(ee,te){if(!(ee in we.DEFAULT_OPTIONS))throw new Error('No option with key "'+ee+'"');if(se.indexOf(ee)!==-1)throw new Error('Option "'+ee+'" can only be set in the constructor');this.options[ee]!==te&&(te=this._sanitizeAndValidateOption(ee,te),this.options[ee]!==te&&(this.options[ee]=te,this._onOptionChange.fire(ee)))},ue.prototype._sanitizeAndValidateOption=function(ee,te){switch(ee){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":te||(te=we.DEFAULT_OPTIONS[ee]);break;case"cursorWidth":te=Math.floor(te);case"lineHeight":case"tabStopWidth":if(te<1)throw new Error(ee+" cannot be less than 1, value: "+te);break;case"minimumContrastRatio":te=Math.max(1,Math.min(21,Math.round(10*te)/10));break;case"scrollback":if((te=Math.min(te,4294967295))<0)throw new Error(ee+" cannot be less than 0, value: "+te);break;case"fastScrollSensitivity":case"scrollSensitivity":if(te<=0)throw new Error(ee+" cannot be less than or equal to 0, value: "+te)}return te},ue.prototype.getOption=function(ee){if(!(ee in we.DEFAULT_OPTIONS))throw new Error('No option with key "'+ee+'"');return this.options[ee]},ue}();we.OptionsService=re},function(Ot,we,de){"use strict";var ie,Ee=this&&this.__extends||(ie=function(x,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,oe){ae.__proto__=oe}||function(ae,oe){for(var ge in oe)oe.hasOwnProperty(ge)&&(ae[ge]=oe[ge])})(x,ne)},function(x,ne){function ae(){this.constructor=x}ie(x,ne),x.prototype=ne===null?Object.create(ne):(ae.prototype=ne.prototype,new ae)}),ce=this&&this.__decorate||function(x,ne,ae,oe){var ge,Se=arguments.length,ve=Se<3?ne:oe===null?oe=Object.getOwnPropertyDescriptor(ne,ae):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(x,ne,ae,oe);else for(var be=x.length-1;be>=0;be--)(ge=x[be])&&(ve=(Se<3?ge(ve):Se>3?ge(ne,ae,ve):ge(ne,ae))||ve);return Se>3&&ve&&Object.defineProperty(ne,ae,ve),ve},se=this&&this.__param||function(x,ne){return function(ae,oe){ne(ae,oe,x)}};Object.defineProperty(we,"__esModule",{value:!0}),we.CoreService=void 0;var re=de(1),ue=de(0),ee=de(33),te=de(2),E=Object.freeze({insertMode:!1}),y=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),z=function(x){function ne(ae,oe,ge,Se){var ve=x.call(this)||this;return ve._bufferService=oe,ve._logService=ge,ve._optionsService=Se,ve.isCursorInitialized=!1,ve.isCursorHidden=!1,ve._onData=ve.register(new ue.EventEmitter),ve._onUserInput=ve.register(new ue.EventEmitter),ve._onBinary=ve.register(new ue.EventEmitter),ve._scrollToBottom=ae,ve.register({dispose:function(){return ve._scrollToBottom=void 0}}),ve.modes=ee.clone(E),ve.decPrivateModes=ee.clone(y),ve}return Ee(ne,x),Object.defineProperty(ne.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(ne.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),ne.prototype.reset=function(){this.modes=ee.clone(E),this.decPrivateModes=ee.clone(y)},ne.prototype.triggerDataEvent=function(ae,oe){if(oe===void 0&&(oe=!1),!this._optionsService.options.disableStdin){var ge=this._bufferService.buffer;ge.ybase!==ge.ydisp&&this._scrollToBottom(),oe&&this._onUserInput.fire(),this._logService.debug('sending data "'+ae+'"',function(){return ae.split("").map(function(Se){return Se.charCodeAt(0)})}),this._onData.fire(ae)}},ne.prototype.triggerBinaryEvent=function(ae){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+ae+'"',function(){return ae.split("").map(function(oe){return oe.charCodeAt(0)})}),this._onBinary.fire(ae))},ne=ce([se(1,re.IBufferService),se(2,re.ILogService),se(3,re.IOptionsService)],ne)}(te.Disposable);we.CoreService=z},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(y,z,x,ne){var ae,oe=arguments.length,ge=oe<3?z:ne===null?ne=Object.getOwnPropertyDescriptor(z,x):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(y,z,x,ne);else for(var Se=y.length-1;Se>=0;Se--)(ae=y[Se])&&(ge=(oe<3?ae(ge):oe>3?ae(z,x,ge):ae(z,x))||ge);return oe>3&&ge&&Object.defineProperty(z,x,ge),ge},Ee=this&&this.__param||function(y,z){return function(x,ne){z(x,ne,y)}};Object.defineProperty(we,"__esModule",{value:!0}),we.CoreMouseService=void 0;var ce=de(1),se=de(0),re={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(y){return y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)}},VT200:{events:19,restrict:function(y){return y.action!==32}},DRAG:{events:23,restrict:function(y){return y.action!==32||y.button!==3}},ANY:{events:31,restrict:function(y){return!0}}};function ue(y,z){var x=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(x|=64,x|=y.action):(x|=3&y.button,4&y.button&&(x|=64),8&y.button&&(x|=128),y.action===32?x|=32:y.action!==0||z||(x|=3)),x}var ee=String.fromCharCode,te={DEFAULT:function(y){var z=[ue(y,!1)+32,y.col+32,y.row+32];return z[0]>255||z[1]>255||z[2]>255?"":"\x1B[M"+ee(z[0])+ee(z[1])+ee(z[2])},SGR:function(y){var z=y.action===0&&y.button!==4?"m":"M";return"\x1B[<"+ue(y,!0)+";"+y.col+";"+y.row+z}},E=function(){function y(z,x){this._bufferService=z,this._coreService=x,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new se.EventEmitter,this._lastEvent=null;for(var ne=0,ae=Object.keys(re);ne<ae.length;ne++){var oe=ae[ne];this.addProtocol(oe,re[oe])}for(var ge=0,Se=Object.keys(te);ge<Se.length;ge++){var ve=Se[ge];this.addEncoding(ve,te[ve])}this.reset()}return y.prototype.addProtocol=function(z,x){this._protocols[z]=x},y.prototype.addEncoding=function(z,x){this._encodings[z]=x},Object.defineProperty(y.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(z){if(!this._protocols[z])throw new Error('unknown protocol "'+z+'"');this._activeProtocol=z,this._onProtocolChange.fire(this._protocols[z].events)},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(z){if(!this._encodings[z])throw new Error('unknown encoding "'+z+'"');this._activeEncoding=z},enumerable:!1,configurable:!0}),y.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(y.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),y.prototype.triggerMouseEvent=function(z){if(z.col<0||z.col>=this._bufferService.cols||z.row<0||z.row>=this._bufferService.rows||z.button===4&&z.action===32||z.button===3&&z.action!==32||z.button!==4&&(z.action===2||z.action===3)||(z.col++,z.row++,z.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,z))||!this._protocols[this._activeProtocol].restrict(z))return!1;var x=this._encodings[this._activeEncoding](z);return x&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(x):this._coreService.triggerDataEvent(x,!0)),this._lastEvent=z,!0},y.prototype.explainEvents=function(z){return{down:!!(1&z),up:!!(2&z),drag:!!(4&z),move:!!(8&z),wheel:!!(16&z)}},y.prototype._compareEvents=function(z,x){return z.col===x.col&&z.row===x.row&&z.button===x.button&&z.action===x.action&&z.ctrl===x.ctrl&&z.alt===x.alt&&z.shift===x.shift},y=ie([Ee(0,ce.IBufferService),Ee(1,ce.ICoreService)],y)}();we.CoreMouseService=E},function(Ot,we,de){"use strict";var ie=this&&this.__decorate||function(re,ue,ee,te){var E,y=arguments.length,z=y<3?ue:te===null?te=Object.getOwnPropertyDescriptor(ue,ee):te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(re,ue,ee,te);else for(var x=re.length-1;x>=0;x--)(E=re[x])&&(z=(y<3?E(z):y>3?E(ue,ee,z):E(ue,ee))||z);return y>3&&z&&Object.defineProperty(ue,ee,z),z},Ee=this&&this.__param||function(re,ue){return function(ee,te){ue(ee,te,re)}};Object.defineProperty(we,"__esModule",{value:!0}),we.DirtyRowService=void 0;var ce=de(1),se=function(){function re(ue){this._bufferService=ue,this.clearRange()}return Object.defineProperty(re.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),re.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},re.prototype.markDirty=function(ue){ue<this._start?this._start=ue:ue>this._end&&(this._end=ue)},re.prototype.markRangeDirty=function(ue,ee){if(ue>ee){var te=ue;ue=ee,ee=te}ue<this._start&&(this._start=ue),ee>this._end&&(this._end=ee)},re.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},re=ie([Ee(0,ce.IBufferService)],re)}();we.DirtyRowService=se},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.UnicodeService=void 0;var ie=de(0),Ee=de(79),ce=function(){function se(){this._providers=Object.create(null),this._active="",this._onChange=new ie.EventEmitter;var re=new Ee.UnicodeV6;this.register(re),this._active=re.version,this._activeProvider=re}return Object.defineProperty(se.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"activeVersion",{get:function(){return this._active},set:function(re){if(!this._providers[re])throw new Error('unknown Unicode version "'+re+'"');this._active=re,this._activeProvider=this._providers[re],this._onChange.fire(re)},enumerable:!1,configurable:!0}),se.prototype.register=function(re){this._providers[re.version]=re},se.prototype.wcwidth=function(re){return this._activeProvider.wcwidth(re)},se.prototype.getStringCellWidth=function(re){for(var ue=0,ee=re.length,te=0;te<ee;++te){var E=re.charCodeAt(te);if(55296<=E&&E<=56319){if(++te>=ee)return ue+this.wcwidth(E);var y=re.charCodeAt(te);56320<=y&&y<=57343?E=1024*(E-55296)+y-56320+65536:ue+=this.wcwidth(y)}ue+=this.wcwidth(E)}return ue},se}();we.UnicodeService=ce},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.UnicodeV6=void 0;var ie,Ee=de(15),ce=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],se=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],re=function(){function ue(){if(this.version="6",!ie){ie=new Uint8Array(65536),Ee.fill(ie,1),ie[0]=0,Ee.fill(ie,0,1,32),Ee.fill(ie,0,127,160),Ee.fill(ie,2,4352,4448),ie[9001]=2,ie[9002]=2,Ee.fill(ie,2,11904,42192),ie[12351]=1,Ee.fill(ie,2,44032,55204),Ee.fill(ie,2,63744,64256),Ee.fill(ie,2,65040,65050),Ee.fill(ie,2,65072,65136),Ee.fill(ie,2,65280,65377),Ee.fill(ie,2,65504,65511);for(var ee=0;ee<ce.length;++ee)Ee.fill(ie,0,ce[ee][0],ce[ee][1]+1)}}return ue.prototype.wcwidth=function(ee){return ee<32?0:ee<127?1:ee<65536?ie[ee]:function(te,E){var y,z=0,x=E.length-1;if(te<E[0][0]||te>E[x][1])return!1;for(;x>=z;)if(te>E[y=z+x>>1][1])z=y+1;else{if(!(te<E[y][0]))return!0;x=y-1}return!1}(ee,se)?0:ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?2:1},ue}();we.UnicodeV6=re},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.CharsetService=void 0;var ie=function(){function Ee(){this.glevel=0,this._charsets=[]}return Ee.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Ee.prototype.setgLevel=function(ce){this.glevel=ce,this.charset=this._charsets[ce]},Ee.prototype.setgCharset=function(ce,se){this._charsets[ce]=se,this.glevel===ce&&(this.charset=se)},Ee}();we.CharsetService=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.updateWindowsModeWrappedState=void 0;var ie=de(3);we.updateWindowsModeWrappedState=function(Ee){var ce=Ee.buffer.lines.get(Ee.buffer.ybase+Ee.buffer.y-1),se=ce==null?void 0:ce.get(Ee.cols-1),re=Ee.buffer.lines.get(Ee.buffer.ybase+Ee.buffer.y);re&&se&&(re.isWrapped=se[ie.CHAR_DATA_CODE_INDEX]!==ie.NULL_CELL_CODE&&se[ie.CHAR_DATA_CODE_INDEX]!==ie.WHITESPACE_CELL_CODE)}},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.WriteBuffer=void 0;var ie=function(){function Ee(ce){this._action=ce,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Ee.prototype.writeSync=function(ce){if(this._writeBuffer.length){for(var se=this._bufferOffset;se<this._writeBuffer.length;++se){var re=this._writeBuffer[se],ue=this._callbacks[se];this._action(re),ue&&ue()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ce)},Ee.prototype.write=function(ce,se){var re=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return re._innerWrite()})),this._pendingData+=ce.length,this._writeBuffer.push(ce),this._callbacks.push(se)},Ee.prototype._innerWrite=function(){for(var ce=this,se=Date.now();this._writeBuffer.length>this._bufferOffset;){var re=this._writeBuffer[this._bufferOffset],ue=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(re),this._pendingData-=re.length,ue&&ue(),Date.now()-se>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return ce._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Ee}();we.WriteBuffer=ie},function(Ot,we,de){"use strict";Object.defineProperty(we,"__esModule",{value:!0}),we.AddonManager=void 0;var ie=function(){function Ee(){this._addons=[]}return Ee.prototype.dispose=function(){for(var ce=this._addons.length-1;ce>=0;ce--)this._addons[ce].instance.dispose()},Ee.prototype.loadAddon=function(ce,se){var re=this,ue={instance:se,dispose:se.dispose,isDisposed:!1};this._addons.push(ue),se.dispose=function(){return re._wrappedAddonDispose(ue)},se.activate(ce)},Ee.prototype._wrappedAddonDispose=function(ce){if(!ce.isDisposed){for(var se=-1,re=0;re<this._addons.length;re++)if(this._addons[re]===ce){se=re;break}if(se===-1)throw new Error("Could not dispose an addon that has not been loaded");ce.isDisposed=!0,ce.dispose.apply(ce.instance),this._addons.splice(se,1)}},Ee}();we.AddonManager=ie}])})},93314:function(Jt){"use strict";Jt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(Jt){"use strict";Jt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},16722:function(Jt,Ot,we){"use strict";we.d(Ot,{Z:function(){return ee}});const de=te=>typeof te=="object"&&te!=null&&te.nodeType===1,ie=(te,E)=>(!E||te!=="hidden")&&te!=="visible"&&te!=="clip",Ee=(te,E)=>{if(te.clientHeight<te.scrollHeight||te.clientWidth<te.scrollWidth){const y=getComputedStyle(te,null);return ie(y.overflowY,E)||ie(y.overflowX,E)||(z=>{const x=(ne=>{if(!ne.ownerDocument||!ne.ownerDocument.defaultView)return null;try{return ne.ownerDocument.defaultView.frameElement}catch(ae){return null}})(z);return!!x&&(x.clientHeight<z.scrollHeight||x.clientWidth<z.scrollWidth)})(te)}return!1},ce=(te,E,y,z,x,ne,ae,oe)=>ne<te&&ae>E||ne>te&&ae<E?0:ne<=te&&oe<=y||ae>=E&&oe>=y?ne-te-z:ae>E&&oe<y||ne<te&&oe>y?ae-E+x:0,se=te=>{const E=te.parentElement;return E==null?te.getRootNode().host||null:E},re=(te,E)=>{var y,z,x,ne;if(typeof document=="undefined")return[];const{scrollMode:ae,block:oe,inline:ge,boundary:Se,skipOverflowHiddenElements:ve}=E,be=typeof Se=="function"?Se:$e=>$e!==Se;if(!de(te))throw new TypeError("Invalid target");const xe=document.scrollingElement||document.documentElement,pe=[];let me=te;for(;de(me)&&be(me);){if(me=se(me),me===xe){pe.push(me);break}me!=null&&me===document.body&&Ee(me)&&!Ee(document.documentElement)||me!=null&&Ee(me,ve)&&pe.push(me)}const Ae=(z=(y=window.visualViewport)==null?void 0:y.width)!=null?z:innerWidth,De=(ne=(x=window.visualViewport)==null?void 0:x.height)!=null?ne:innerHeight,{scrollX:ke,scrollY:Ie}=window,{height:Fe,width:Pe,top:qe,right:Ke,bottom:ot,left:He}=te.getBoundingClientRect(),{top:rt,right:Ge,bottom:ct,left:We}=($e=>{const Qe=window.getComputedStyle($e);return{top:parseFloat(Qe.scrollMarginTop)||0,right:parseFloat(Qe.scrollMarginRight)||0,bottom:parseFloat(Qe.scrollMarginBottom)||0,left:parseFloat(Qe.scrollMarginLeft)||0}})(te);let Ue=oe==="start"||oe==="nearest"?qe-rt:oe==="end"?ot+ct:qe+Fe/2-rt+ct,Ze=ge==="center"?He+Pe/2-We+Ge:ge==="end"?Ke+Ge:He-We;const Je=[];for(let $e=0;$e<pe.length;$e++){const Qe=pe[$e],{height:pt,width:ht,top:Pt,right:gt,bottom:bt,left:St}=Qe.getBoundingClientRect();if(ae==="if-needed"&&qe>=0&&He>=0&&ot<=De&&Ke<=Ae&&(Qe===xe&&!Ee(Qe)||qe>=Pt&&ot<=bt&&He>=St&&Ke<=gt))return Je;const lt=getComputedStyle(Qe),_t=parseInt(lt.borderLeftWidth,10),dt=parseInt(lt.borderTopWidth,10),nt=parseInt(lt.borderRightWidth,10),et=parseInt(lt.borderBottomWidth,10);let ft=0,wt=0;const Tt="offsetWidth"in Qe?Qe.offsetWidth-Qe.clientWidth-_t-nt:0,Re="offsetHeight"in Qe?Qe.offsetHeight-Qe.clientHeight-dt-et:0,Le="offsetWidth"in Qe?Qe.offsetWidth===0?0:ht/Qe.offsetWidth:0,Te="offsetHeight"in Qe?Qe.offsetHeight===0?0:pt/Qe.offsetHeight:0;if(xe===Qe)ft=oe==="start"?Ue:oe==="end"?Ue-De:oe==="nearest"?ce(Ie,Ie+De,De,dt,et,Ie+Ue,Ie+Ue+Fe,Fe):Ue-De/2,wt=ge==="start"?Ze:ge==="center"?Ze-Ae/2:ge==="end"?Ze-Ae:ce(ke,ke+Ae,Ae,_t,nt,ke+Ze,ke+Ze+Pe,Pe),ft=Math.max(0,ft+Ie),wt=Math.max(0,wt+ke);else{ft=oe==="start"?Ue-Pt-dt:oe==="end"?Ue-bt+et+Re:oe==="nearest"?ce(Pt,bt,pt,dt,et+Re,Ue,Ue+Fe,Fe):Ue-(Pt+pt/2)+Re/2,wt=ge==="start"?Ze-St-_t:ge==="center"?Ze-(St+ht/2)+Tt/2:ge==="end"?Ze-gt+nt+Tt:ce(St,gt,ht,_t,nt+Tt,Ze,Ze+Pe,Pe);const{scrollLeft:je,scrollTop:ye}=Qe;ft=Te===0?0:Math.max(0,Math.min(ye+ft/Te,Qe.scrollHeight-pt/Te+Re)),wt=Le===0?0:Math.max(0,Math.min(je+wt/Le,Qe.scrollWidth-ht/Le+Tt)),Ue+=ye-ft,Ze+=je-wt}Je.push({el:Qe,top:ft,left:wt})}return Je},ue=te=>te===!1?{block:"end",inline:"nearest"}:(E=>E===Object(E)&&Object.keys(E).length!==0)(te)?te:{block:"start",inline:"nearest"};function ee(te,E){if(!te.isConnected||!(x=>{let ne=x;for(;ne&&ne.parentNode;){if(ne.parentNode===document)return!0;ne=ne.parentNode instanceof ShadowRoot?ne.parentNode.host:ne.parentNode}return!1})(te))return;const y=(x=>{const ne=window.getComputedStyle(x);return{top:parseFloat(ne.scrollMarginTop)||0,right:parseFloat(ne.scrollMarginRight)||0,bottom:parseFloat(ne.scrollMarginBottom)||0,left:parseFloat(ne.scrollMarginLeft)||0}})(te);if((x=>typeof x=="object"&&typeof x.behavior=="function")(E))return E.behavior(re(te,E));const z=typeof E=="boolean"||E==null?void 0:E.behavior;for(const{el:x,top:ne,left:ae}of re(te,ue(E))){const oe=ne-y.top+y.bottom,ge=ae-y.left+y.right;x.scroll({top:oe,left:ge,behavior:z})}}}}]);