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($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ee}});var ce=Se(67711),ie=Se(59301),Ce={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"},ue=Ce,se=Se(7657),te=function(E,b){return ie.createElement(se.Z,(0,ce.Z)({},E,{ref:b,icon:ue}))},le=ie.forwardRef(te),ee=le},76618:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ee}});var ce=Se(67711),ie=Se(59301),Ce={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"},ue=Ce,se=Se(7657),te=function(E,b){return ie.createElement(se.Z,(0,ce.Z)({},E,{ref:b,icon:ue}))},le=ie.forwardRef(te),ee=le},66543:function(){"use strict"},59598:function(){"use strict"},21697:function($t,Dt){"use strict";Dt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},12085:function($t,Dt){"use strict";Dt.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"}},45298:function(){"use strict"},60515:function($t,Dt,Se){"use strict";var ce=Se(59301),ie=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,te=(ne,E,b)=>E in ne?ie(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b,le=(ne,E)=>{for(var b in E||(E={}))ue.call(E,b)&&te(ne,b,E[b]);if(Ce)for(var b of Ce(E))se.call(E,b)&&te(ne,b,E[b]);return ne};const ee=ne=>React.createElement("svg",le({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ne),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"})));Dt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},88977:function($t,Dt,Se){"use strict";var ce=Se(59301),ie=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,te=(ne,E,b)=>E in ne?ie(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b,le=(ne,E)=>{for(var b in E||(E={}))ue.call(E,b)&&te(ne,b,E[b]);if(Ce)for(var b of Ce(E))se.call(E,b)&&te(ne,b,E[b]);return ne};const ee=ne=>React.createElement("svg",le({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ne),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"})));Dt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var $t={},Dt="5.0",Se={},ce=null,ie=!1,Ce=!1,ue=null,se=!1,te=null,le=null,ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(ne!==null)switch(typeof ne){case"number":Dt=ne.toFixed(1);break;case"string":ne.match(new RegExp("^[0-9]\\.[0-9]+$"))?Dt=ne:ue=ne;break;case"object":typeof ne.is3D!="undefined"?ce=ne:Se=ne;break;case"boolean":ie=ne,Ce=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Se.material_id!==void 0&&!Ce&&(ie=!0)),ue!==null&&Se.id===void 0&&(Se.id=ue);var E="",b="",z=!1,x=null,re=null,ae=null,oe=!1,ve=null,ye=null,me=null,ge=null,_e=null;Se.height!==void 0&&(Se.height=Math.round(Se.height)),Se.width!==void 0&&(Se.width=Math.round(Se.width));var he=function(et){return parseFloat(et)>4?parseFloat(et):5};$t.setHTML5Codebase=function(et,pt){le=et,Ve(et,pt)},$t.setJavaCodebase=$t.setJavaCodebaseVersion=$t.isCompiledInstalled=$t.setPreCompiledScriptPath=$t.setPreCompiledResourcePath=function(){},$t.setHTML5CodebaseVersion=function(et,pt){var ct=parseFloat(et);if(ct!==NaN&&ct<5){console.log("The GeoGebra HTML5 codebase version "+ct+" is deprecated. Using version latest instead.");return}te=et,ze(et,pt)},$t.getHTML5CodebaseVersion=function(){return re},$t.getParameters=function(){return Se},$t.setFontsCSSURL=function(et){ge=et},$t.setGiacJSURL=function(et){},$t.setJNLPFile=function(et){E=et},$t.setJNLPBaseDir=function(et){},$t.inject=function(){function et(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pt="auto",ct=Se.id,Rt,dt=!1,Mt=0;Mt<arguments.length;Mt++){var xt=arguments[Mt];typeof xt=="string"?(xt=xt.toLowerCase(),xt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pt=xt:ct=arguments[Mt]):typeof xt=="boolean"?dt=xt:xt instanceof HTMLElement&&(Rt=xt)}yt();function yt(){if(!se){setTimeout(yt,200);return}pt=ut(pt);var bt=Rt||document.getElementById(ct);if(!bt){console.log("possibly bug on ajax loading? ");return}if($t.removeExistingApplet(bt,!1),Se.width===void 0&&bt.clientWidth&&(Se.width=bt.clientWidth),Se.height===void 0&&bt.clientHeight&&(Se.height=bt.clientHeight),!(Se.width&&Se.height)&&pt==="html5"&&(delete Se.width,delete Se.height),x=pt,pt==="screenshot")Xe(bt,Se);else{var He=!1;Se.hasOwnProperty("playButton")&&Se.playButton||Se.hasOwnProperty("clickToLoad")&&Se.clickToLoad?He=!0:Se.hasOwnProperty("playButtonAutoDecide")&&Se.playButtonAutoDecide&&(He=(!pe()||et())&&ke()),He?(x="screenshot",We(bt,Se,dt,pt)):Qe(bt,Se,dt)}}};function pe(){try{return window.self!==window.top}catch(et){return!0}}function ke(){return Se.hasOwnProperty("screenshotGenerator")&&Se.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}$t.getViews=function(){return ce},$t.isJavaInstalled=function(){return!1};var Te=function(et){var pt=function(Mt){var xt=JSON.parse(Mt),yt=function(Ae){return Ae.type=="G"||Ae.type=="E"},bt=xt.elements?xt.elements.filter(yt)[0]:xt;if(!bt||!bt.url){ct();return}Se.fileName=bt.url,Ee(bt.settings||{}),ce.is3D=!0;var He="https://www.geogebra.org/images/";$t.setPreviewImage(ve||bt.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),et()},ct=function(){Se.onError&&Se.onError(),$e("Error: Fetching material (id "+Se.material_id+") failed.",Se)},Rt=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dt="/materials/"+Se.material_id+"?scope=basic";Oe("https://"+Rt+"/api/proxy.php?path="+encodeURIComponent(dt),pt,ct)};function Ee(et){var pt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ct){et[ct]=!!et[ct]}),pt.forEach(function(ct){Se[ct]===void 0&&et[ct]!==void 0&&(Se[ct]=et[ct])}),Se.showToolBarHelp===void 0&&(Se.showToolBarHelp=Se.showToolBar)}function Oe(et,pt,ct){var Rt=new XMLHttpRequest;Rt.open("GET",et),Rt.onload=function(){pt(Rt.responseText)},Rt.onerror=ct,Rt.send()}$t.isHTML5Installed=function(){return!0},$t.getLoadedAppletType=function(){return x},$t.setPreviewImage=function(et,pt,ct){ve=et,ye=pt,me=ct},$t.removeExistingApplet=function(et,pt){var ct;typeof et=="string"&&(et=document.getElementById(et)),x=null;var Rt=null;for(ct=0;ct<et.childNodes.length;ct++){var dt=et.childNodes[ct],Mt=dt.className;Mt==="applet_screenshot"?pt?(dt.style.display="block",x="screenshot"):dt.style.display="none":Mt!=="applet_scaler prerender"&&(et.removeChild(dt),Rt=Mt&&Mt.indexOf("appletParameters")!=-1?dt.id:null,ct--)}var xt=Se.id!==void 0?Se.id:Rt,yt=window[xt];yt&&typeof yt.getBase64=="function"&&(yt.remove(),window[xt]=null)},$t.refreshHitPoints=function(){if(he(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var et=$t.getAppletObject();return et&&typeof et.recalculateEnvironments=="function"?(et.recalculateEnvironments(),!0):!1},$t.startAnimation=function(){var et=$t.getAppletObject();return et&&typeof et.startAnimation=="function"?(et.startAnimation(),!0):!1},$t.stopAnimation=function(){var et=$t.getAppletObject();return et&&typeof et.stopAnimation=="function"?(et.stopAnimation(),!0):!1},$t.getAppletObject=function(){var et=Se.id!==void 0?Se.id:"ggbApplet";return window[et]},$t.resize=function(){};var je=function(et,pt,ct){var Rt=document.createElement("param");Rt.setAttribute("name",pt),Rt.setAttribute("value",ct),et.appendChild(Rt)},Pe=function(et){return et&&et!=="false"},Qe=function(et,pt,ct){he(re)<=4.2&&(ct=!0);var Rt=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==re||ggbHTML5LoadedCodebaseIsWebSimple&&!oe)&&(Rt=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dt=document.createElement("div");dt.classList.add("appletParameters","notranslate");var Mt=pt.width,xt=pt.height;if(pt.disableAutoScale=pt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pt.disableAutoScale,pt.width!==void 0)if(he(re)<=4.4)Pe(pt.showToolBar)&&(pt.height-=7),Pe(pt.showAlgebraInput)&&(pt.height-=37),pt.width<605&&Pe(pt.showToolBar)&&(pt.width=605,Mt=605);else{var yt=100;(Pe(pt.showToolBar)||Pe(pt.showMenuBar))&&(pt.hasOwnProperty("customToolBar")&&(pt.customToolbar=pt.customToolBar),yt=Pe(pt.showMenuBar)?245:155),Mt<yt&&(pt.width=yt,Mt=yt)}dt.style.border="none",dt.style.display="inline-block";for(var bt in pt)pt.hasOwnProperty(bt)&&bt!=="appletOnLoad"&&dt.setAttribute("data-param-"+bt,pt[bt]);ge&&dt.setAttribute("data-param-fontscssurl",ge),$t.resize=function(){GGBAppletUtils.responsiveResize(et,pt)},window.addEventListener("resize",function(tt){$t.resize()});var He=typeof pt.appletOnLoad=="function"?pt.appletOnLoad:function(){};if(!ct&&pt.width!==void 0){pt.hasOwnProperty("showSplash")||dt.setAttribute("data-param-showSplash","false");var Ae=et.querySelector(".applet_scaler.prerender"),be=Ae!==null;if(be)var Be=Ae.querySelector(".ggb_preview");else{var Be=Ye(Mt,xt,pt.borderColor,!1);Ae=document.createElement("div"),Ae.className="applet_scaler",Ae.style.position="relative",Ae.style.display="block",Ae.style.width=Mt+"px",Ae.style.height=xt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ae,"66%"),he(re)>=5?(pt.appletOnLoad=function(tt){var lt=et.querySelector(".ggb_preview");lt&&lt.parentNode.removeChild(lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ae),window.GGBT_wsf_view&&$(window).trigger("resize"),He(tt)},be||Ae.appendChild(Be)):dt.appendChild(Be),Ae.appendChild(dt),be||et.appendChild(Ae),setTimeout(function(){$t.resize()},1)}else{var Ke=document.createElement("div");Ke.className="applet_scaler",Ke.style.position="relative",Ke.style.display="block",Ke.appendChild(dt),et.appendChild(Ke),pt.appletOnLoad=function(tt){$t.resize(),He(tt)}}function Ne(tt,lt){lt&&typeof lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(tt,lt.appletOnLoad):renderGGBElement(tt),$e("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",lt)}function De(tt,lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:tt,params:lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Pt){Ne(Pt.article,Pt.params)}),html5AppletsToProcess=null)},he(re)<5&&(tt.className+=" geogebraweb")):Ne(tt,lt)}if(Rt){scriptLoadStarted=!0;for(var we=0;we<dt.childNodes.length;we++){var Le=dt.childNodes[we].tagName;Le==="TABLE"&&(dt.removeChild(dt.childNodes[we]),we--)}if(ggbHTML5LoadedScript!==null){var Ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ue!=null&&Ue.parentNode.removeChild(Ue)}var Me=document.createElement("script"),Re=function(){De(dt,pt)};Me.src=b+ae,ggbHTML5LoadedCodebaseIsWebSimple=oe,ggbHTML5LoadedCodebaseVersion=re,ggbHTML5LoadedScript=Me.src,$e("GeoGebra HTML5 codebase loaded: '"+b+"'.",pt),!le&&(!te||te=="5.0")?(oe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Re()):b.requirejs?__webpack_require__.e(981).then(function(){var tt=[__webpack_require__(60981)];Re.apply(null,tt)}.bind(this)).catch(__webpack_require__.oe):(Me.onload=Re,et.appendChild(Me))}else De(dt,pt);pt.height=xt,pt.width=Mt},Xe=function(et,pt,ct){var Rt=Ye(pt.width,pt.height,pt.borderColor,ct),dt=document.createElement("div");dt.style.position="relative",dt.style.display="block",dt.style.width=pt.width+"px",dt.style.height=pt.height+"px",dt.className="applet_screenshot applet_scaler"+(ct?" applet_screenshot_play":""),dt.appendChild(Rt);var Mt=GGBAppletUtils.getScale(pt,et,ct);ct?(et.appendChild(rt()),window.GGBT_wsf_view||(et.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dt,"66%"),et.appendChild(dt),Mt!==1&&!isNaN(Mt)&&(GGBAppletUtils.scaleElement(dt,Mt),dt.style.width=pt.width+"px",dt.style.height=pt.height+"px",dt.parentNode.style.width=pt.width*Mt+"px",dt.parentNode.style.height=pt.height*Mt+"px"),$t.resize=function(){ot(et,Rt,dt,ct)},window.addEventListener("resize",function(xt){$t.resize()}),$t.resize()};function ot(et,pt,ct,Rt){if(et.contains(pt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(et.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(et)}var dt=GGBAppletUtils.getScale(Se,et,Rt);ct.parentNode!==null&&(!isNaN(dt)&&dt!==1?(GGBAppletUtils.scaleElement(ct,dt),ct.parentNode.style.width=Se.width*dt+"px",ct.parentNode.style.height=Se.height*dt+"px"):(GGBAppletUtils.scaleElement(ct,1),ct.parentNode.style.width=Se.width+"px",ct.parentNode.style.height=Se.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(et),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}$t.onExitFullscreen=function(et,pt){pt.appendChild(et)};var We=function(et,pt,ct,Rt){Xe(et,pt,!0);for(var dt=function(){var yt=[];for(xt=0;xt<et.childNodes.length;xt++)yt.push(et.childNodes[xt]);if(window.GGBT_wsf_view){var bt=window.GGBT_wsf_view.renderFullScreen(et,pt.id),He=document.getElementById("fullscreencontainer"),Ae=jQuery(et).find(".fullscreencontent");Ae.length>0?(bt.remove(),Ae.attr("id","fullscreencontent").show(),jQuery(He).append(Ae),window.dispatchEvent(new Event("resize"))):Qe(bt,pt,!1),window.GGBT_wsf_view.launchFullScreen(He)}else x=Rt,Qe(et,pt,!1);if(!window.GGBT_wsf_view)for(xt=0;xt<yt.length;xt++)et.removeChild(yt[xt])},Mt=et.getElementsByClassName("ggb_preview_play"),xt=0;xt<Mt.length;xt++)Mt[xt].addEventListener("click",dt,!1),Mt[xt].addEventListener("ontouchstart",dt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(et),ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},rt=function(){var et=document.createElement("div");if(et.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");}',ct=document.createElement("style");ct.styleSheet?ct.styleSheet.cssText=pt:ct.appendChild(document.createTextNode(pt)),document.getElementsByTagName("head")[0].appendChild(ct)}return et},Ye=function(et,pt,ct,Rt){var dt=document.createElement("div");dt.className="ggb_preview",dt.style.position="absolute",dt.style.zIndex="90",dt.style.width=et-2+"px",dt.style.height=pt-2+"px",dt.style.top="0px",dt.style.left="0px",dt.style.overflow="hidden",dt.style.backgroundColor="white";var Mt="lightgrey";ct!==void 0&&(ct==="none"?Mt="transparent":Mt=ct),dt.style.border="1px solid "+Mt;var xt=document.createElement("img");if(xt.style.position="relative",xt.style.zIndex="1000",xt.style.top="-1px",xt.style.left="-1px",ve!==null&&xt.setAttribute("src",ve),xt.style.opacity=.7,ye!==null){var yt,bt,He;if(!Rt){yt=document.createElement("img"),yt.style.position="absolute",yt.style.zIndex="1001",yt.style.opacity=1,xt.style.opacity=.3,bt=360,bt>et/4*3&&(bt=et/4*3),He=bt/5.8,yt.setAttribute("src",ye),yt.setAttribute("width",bt),yt.setAttribute("height",He);var Ae=(et-bt)/2,be=(pt-He)/2;yt.style.left=Ae+"px",yt.style.top=be+"px",dt.appendChild(yt)}}return dt.appendChild(xt),dt},ut=function(et){return et=et.toLowerCase(),et==="html5"||et==="screenshot"?et:"html5"},Ge=["web","webSimple","web3d","tablet","tablet3d","phone"],ze=function(et,pt){if(re=et,pt){Ve(re,!0);return}var ct=!ie;if(ct){var Rt=he(re);!isNaN(Rt)&&Rt<4.4&&(ct=!1)}var dt,Mt;window.location.protocol.substr(0,4)==="http"?dt=window.location.protocol:dt="http:";var xt=re.indexOf("//");xt>0?Mt=re:xt===0?Mt=dt+re:Mt="https://www.geogebra.org/apps/5.2.814.0/";for(var yt in Ge)if(re.slice(Ge[yt].length*-1)===Ge[yt]||re.slice((Ge[yt].length+1)*-1)===Ge[yt]+"/"){Ve(Mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ct&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!Pe(Se.showToolBar)&&!Pe(Se.showMenuBar)&&!Pe(Se.showAlgebraInput)&&!Pe(Se.enableRightClick)&&(!Se.appName||Se.appName=="classic")?Mt+="webSimple/":Mt+="web3d/",Ve(Mt,!1)},Ve=function(et,pt){if(et.requirejs){b=et;return}et.slice(-1)!=="/"&&(et+="/"),b=et,pt===null&&(pt=et.indexOf("http")===-1),z=pt,ae="web.nocache.js",oe=!1;var ct=b.split("/");ct.length>1&&(!pt&&ct[ct.length-2]==="webSimple"?(ae="webSimple.nocache.js",oe=!0):Ge.indexOf(ct[ct.length-2])>=0&&(ae=ct[ct.length-2]+".nocache.js")),ct=et.split("/"),re=ct[ct.length-3],re.substr(0,4)==="test"?re=re.substr(4,1)+"."+re.substr(5,1):(re.substr(0,3)==="war"||re.substr(0,4)==="beta")&&(re="5.0");var Rt=parseFloat(re);Rt!==NaN&&Rt<5&&et.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Rt+" is deprecated. Using version latest instead."),ze("5.0",pt))},$e=function(et,pt){window.console&&window.console.log&&(!pt||typeof pt.showLogging=="undefined"||pt.showLogging&&pt.showLogging!=="false")&&console.log(et)};Se.material_id!==void 0?Te(nt):nt();function nt(){var et=Dt;te!==null?et=te:parseFloat(et)<5&&(et="5.0"),ze(et,!1),le!==null&&Ve(le,z),se=!0}return $t},GGBAppletUtils=function(){"use strict";function $t(){return window.GGBT_wsf_edit!==void 0}function Dt(se,te){te!=1?(se.style.transformOrigin="0% 0% 0px",se.style.webkitTransformOrigin="0% 0% 0px",se.style.transform="scale("+te+","+te+")",se.style.webkitTransform="scale("+te+","+te+")",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 Se(se,te,le,ee,ne,E){var b=null;if(E!=null&&E!="")for(var z=se.parentNode;z!=null;)if((" "+z.className+" ").indexOf(" "+E+" ")>-1){b=z;break}else z=z.parentNode;var x=0,re=0,ae=0,oe=0,ve=0,ye=0,me=0;if(b)x=b.offsetWidth,re=Math.max(ee?b.offsetWidth:0,b.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(x=Math.min(window.innerWidth,document.documentElement.clientWidth),re=Math.min(window.innerHeight,document.documentElement.clientHeight),ae=x):(x=window.innerWidth,re=window.innerHeight,ae=window.innerWidth),se){var ge=se.getBoundingClientRect();ge.left>0&&ge.left<=x&&(ne===void 0||!ne)&&(document.dir==="rtl"?(ve=x-ge.width-ge.left,ye=ae<=480?10:30):(ye=ge.left,ve=ae<=480?10:30),oe=ye+ve)}if(se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var _e=se.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(oe=40,me=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(oe=0,me=40)}}return se&&((le===void 0||!le)&&te>0&&te+oe<x?x=te:x-=oe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(le===void 0||!le)&&(re-=me)),{width:x,height:re}}function ce(se,te,le,ee,ne){if(se.isScreenshoGenerator)return 1;var E=ee!==void 0&&ee,b=se.noScaleMargin!=null&&se.noScaleMargin,z=function(_e){return _e&&_e!=="false"},x=z(se.autoHeight),re=Se(te,se.width,le,x,E&&window.GGBT_wsf_view||b,ne),ae=parseInt(re.width),oe=se.width,ve=se.height;if(oe===void 0){var ye=te.querySelector(".appletParameters");ye&&(oe=ye.offsetWidth,ve=ye.offsetHeight)}var me=ae/oe,ge=E?1:re.height/ve;return le!==void 0&&!le&&(me=Math.min(1,me),ge=Math.min(1,ge)),Math.min(me,ge)}function ie(se,te,le){var ee=1,ne,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)),te&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(E=!0),!(se.hasOwnProperty("disableAutoScale")&&se.disableAutoScale))ne=ce(se,te,E,le,se.scaleContainerClass);else return ee;return E&&(!se.hasOwnProperty("scale")||ee===1)?ne:Math.min(ee,ne)}function Ce(se){var te=Math.min(window.innerWidth,document.documentElement.clientWidth),le=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=se.getBoundingClientRect(),ne=(te-ee.width)/2,E=(le-ee.height)/2;E<0&&(E=0),se.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ne<40?se.style.left="40px":se.style.left=ne+"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=ne+"px")}function ue(se,te){var le=se.querySelector(".appletParameters");if(le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(te.id!==le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(se)}if(le.parentElement&&/fullscreen/.test(le.parentElement.className))return;var ee=ie(te,se);$t()&&le.setAttribute("data-param-scale",ee);for(var ne=null,E=0;E<se.childNodes.length;E++)if(se.childNodes[E].className!==void 0&&se.childNodes[E].className.match(/^applet_scaler/)){ne=se.childNodes[E];break}if(ne!==null&&ne.querySelector(".noscale")!==null)return;var b=te.id!==void 0?te.id:"ggbApplet",z=window[b];(z==null||!z.recalculateEnvironments)&&ne!==null&&!ne.className.match(/fullscreen/)&&(ne.parentNode.style.transform="",!isNaN(ee)&&ee!==1?(ne.parentNode.style.width=te.width*ee+"px",ne.parentNode.style.height=te.height*ee+"px",Dt(ne,ee)):(Dt(ne,1),ne.parentNode.style.width=te.width+"px",ne.parentNode.style.height=te.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ce(se),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(le).parents(".content-added-content"))}}return{responsiveResize:ue,isFlexibleWorksheetEditor:$t,positionCenter:Ce,getScale:ie,scaleElement:Dt}}();__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 $t=n.location.search;return $t.indexOf(J)!=-1||$t.indexOf(K)!=-1}function q($t,Dt){}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($t){var Dt=s[L].bindings;s[L].bindings=function(){for(var Se=Dt?Dt():{},ce=$t[webModule.__softPermutationId],ie=O;ie<ce.length;ie++){var Ce=ce[ie];Se[Ce[O]]=Ce[P]}return Se}};var t;function u(){return v(),t}function v(){if(!t){var $t=o.createElement(Q);if($t.id=L,$t.style.cssText=R+S,$t.tabIndex=-1,o.body.appendChild($t),t=$t.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Dt=document.compatMode==U?V:W;t.write(Dt+X),t.close()}}}function w($t){function Dt(ce){function ie(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ce=ie();if(Ce){ce();return}function ue(){if(!Ce){if(!ie())return;Ce=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,ue,!1),se&&clearInterval(se)}}o.addEventListener&&o.addEventListener(Z,ue,!1);var se=setInterval(function(){ue()},$)}function Se(ce){var ie=u(),Ce=ie.body,ue=ie.createElement(_);ue.language=ab,ue.crossOrigin=W,ue.src=ce,webModule.__errFn&&(ue.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),Ce.appendChild(ue)}Dt(function(){Se($t)})}webModule.__startLoadingFragment=function($t){return C($t)},webModule.__installRunAsyncCode=function($t){var Dt=u(),Se=Dt.body,ce=Dt.createElement(_);ce.language=ab,ce.text=$t,Se.appendChild(ce),Se.removeChild(ce)};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($t){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch($t){alert(nb+k+qb)}}}__gwt_getMetaProperty=function($t){var Dt=c[$t];return Dt==null?null:Dt},r=d,webModule.__errFn=e}function B(){function $t(se){var te=se.lastIndexOf(rb);te==-1&&(te=se.length);var le=se.indexOf(sb);le==-1&&(le=se.length);var ee=se.lastIndexOf(tb,Math.min(le,te));return ee>=O?se.substring(O,ee+P):W}function Dt(se){if(!se.match(/^\w+:\/\//)){var te=o.createElement(ub);te.src=se+vb,se=$t(te.src)}return se}function Se(){var se=__gwt_getMetaProperty(wb);return se!=null?se:W}function ce(){for(var se=o.getElementsByTagName(_),te=O;te<se.length;++te)if(se[te].src.indexOf(xb)!=-1)return $t(se[te].src);return W}function ie(){var se=o.getElementsByTagName(yb);return se.length>O?se[se.length-P].href:W}function Ce(){var se=o.location;return se.href==se.protocol+zb+se.host+se.pathname+se.search+se.hash}var ue=Se();return ue==W&&(ue=ce()),ue==W&&(ue=ie()),ue==W&&Ce()&&(ue=$t(o.location.href)),ue=Dt(ue),ue}function C($t){return $t.match(/^\//)||$t.match(/^[a-zA-Z]+:\/\//)?$t:webModule.__moduleBase+$t}function D(){var $t=[],Dt=O,Se=[],ce=[];function ie(se){var te=ce[se](),le=Se[se];if(te in le)return te;var ee=[];for(var ne in le)ee[le[ne]]=ne;throw r&&r(se,ee,te),null}if(__gwt_isKnownPropertyValue=function(se,te){return te in Se[se]},webModule.__getPropMap=function(){var se={};for(var te in Se)Se.hasOwnProperty(te)&&(se[te]=ie(te));return se},webModule.__computePropValue=ie,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ce;try{Ce=Cb;var ue=Ce.indexOf(Db);ue!=-1&&(Dt=parseInt(Ce.substring(ue+P),$),Ce=Ce.substring(O,ue))}catch(se){}return webModule.__softPermutationId=Dt,C(Ce+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function($t,Dt,Se){"use strict";Se.d(Dt,{Ax:function(){return ue},Ds:function(){return se},KI:function(){return le},SI:function(){return Ce},f1:function(){return ie}});var ce=Se(90524);function ie(ee){let ne=!0;if(ee.length>0){for(let E=0;E<ee.length;E++)if(ee[E].compile_success==0||!ee[E].compile_success){ne=!1;break}}else ne=!1;return ne}function Ce(ee,ne=""){let E=[];for(let b=0;b<ee.length;b++){let z=ee[b],x=ne?`${ne}/${z.name}`:`${z.name}`;E.push({title:z.name,type:z.type,isLeaf:z.type!=="tree",key:x})}return E}function ue(ee,ne,E){for(let b=0;b<ee.length;b++){let z=ee[b];if(z.key===ne){z.children=E;break}z.children&&ue(z.children,ne,E)}return ee}function se(ee,ne,E){let b;return function(){let z=this,x=arguments,re=function(){b=null,E||ee.apply(z,x)},ae=E&&!b;clearTimeout(b),b=setTimeout(re,ne),ae&&ee.apply(z,x)}}const te=!0,le=ce.Z.API_SERVER},6077:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return b}});var ce=Se(59301),ie={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ce=Se(92310),ue=Se.n(Ce),se=Se(29787),te=Se(2859),le=Se(82093),ee=Se(49661),ne=(z,x,re)=>new Promise((ae,oe)=>{var ve=ge=>{try{me(re.next(ge))}catch(_e){oe(_e)}},ye=ge=>{try{me(re.throw(ge))}catch(_e){oe(_e)}},me=ge=>ge.done?ae(ge.value):Promise.resolve(ge.value).then(ve,ye);me((re=re.apply(z,x)).next())}),b=({data:z,className:x,fullWidth:re,style:ae={},onClose:oe,onOk:ve,showFullTools:ye,noAssociationId:me})=>{const ge=(0,ce.useRef)(null),_e=(0,ce.useRef)(null),he=(0,ce.useRef)(null),pe=(0,ce.useRef)(null),[ke,Te]=(0,ce.useState)(!1),[Ee,Oe]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>(he.current||(he.current=document.createElement("style"),document.head.appendChild(he.current)),z!=null&&z.visible?(document.body.setAttribute("data-custom","y-hidden"),he.current.innerHTML=" html { overflow-y: hidden; }",z!=null&&z.src&&je()):(document.body.removeAttribute("data-custom"),he.current&&(document.head.removeChild(he.current),he.current=null)),()=>{document.body.removeAttribute("data-custom"),he.current&&(document.head.removeChild(he.current),he.current=null)}),[z==null?void 0:z.visible]);const je=()=>ne(void 0,null,function*(){Te(!0),Oe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ot=yield(0,ee.ZJ)(z==null?void 0:z.src);ge.current.src="",ge.current.src=ot,ge.current.onload=function(){Xe()},Te(!1),Oe("")}),Pe=ot=>ne(void 0,null,function*(){Te(!0),Oe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const We=yield(0,le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:z.title,file:ot.dataUrl}});We!=null&&We.id&&!me?(yield(0,le.ZP)(`/api/attachments/${z.id}/add_subitem.json`,{method:"post",body:{subitem_id:We==null?void 0:We.id,settings:JSON.stringify(ot.state)}})).status===0&&ve():We!=null&&We.id&&ve(We),Te(!1),Oe("")}),Qe=()=>{const ot=document.querySelector('a[href="https://markerjs.com/"]');ot&&ot.parentNode&&(ot.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(rt=>{const Ye=document.querySelector(rt.name);Ye&&Ye.setAttribute("title",rt.title)})},Xe=()=>{_e.current=new te.hP(ge.current),_e.current.targetRoot=pe.current,_e.current.addEventListener("render",Pe),_e.current.addEventListener("beforeclose",oe),ye&&(_e.current.availableMarkerTypes=_e.current.ALL_MARKER_TYPES,_e.current.uiStyleSettings.redoButtonVisible=!0,_e.current.uiStyleSettings.notesButtonVisible=!0,_e.current.uiStyleSettings.zoomButtonVisible=!0,_e.current.uiStyleSettings.zoomOutButtonVisible=!0,_e.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=_e.current.uiStyleSettings,_e.current.show(),z!=null&&z.snapshotData&&_e.current.restoreState(z.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Qe()},300)};return ce.createElement(ce.Fragment,null,(z==null?void 0:z.visible)&&ce.createElement(se.Z,{spinning:ke,tip:Ee,style:{position:"absolute",width:"100vw"}},ce.createElement("div",{ref:pe,className:ue()(ie.imageDimensions,x,re?ie.fullWidth:""),style:ae},ce.createElement("img",{className:ie.img,ref:ge}))))}},88615:function($t,Dt,Se){"use strict";var ce=Se(59301),ie=Se(77019),Ce=Se(5269),ue=Se(20554),se=Se(99571),te=Se(38394),le=Se(21697),ee=Se(48136),ne=Se(59301);const E=(0,ce.forwardRef)(({callback:b,showSaveButton:z,value:x=""},re)=>{const ae=(0,ce.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 "}]}]}],ve=[{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}`}]}]}],ye=_e=>{ae.current.setValue(ae.current.getValue()+" "+_e.value+" ")},me=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ne.createElement(ie.Z,{className:le.Z.lists,gutter:[10,10]},oe.map((_e,he)=>ne.createElement(Ce.Z,{flex:"110px",className:le.Z.item},ne.createElement("div",null,ne.createElement(te.Z,{value:`$$${_e.value}$$`}),_e.name),ne.createElement("div",{className:le.Z.children},_e.children.map((pe,ke)=>ne.createElement("div",{key:ke},ne.createElement("h1",null,pe.name),ne.createElement(ie.Z,{gutter:[10,10]},pe.data.map((Te,Ee)=>ne.createElement(Ce.Z,{key:Ee,onClick:()=>ye(Te),className:le.Z.diamond},ne.createElement(te.Z,{value:"`$$"+Te.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ne.createElement(ie.Z,{className:le.Z.lists,gutter:[10,10]},ve.map((_e,he)=>ne.createElement(Ce.Z,{flex:"110px",className:le.Z.item},ne.createElement("div",null,ne.createElement(te.Z,{value:"`$$"+_e.value+"$$`"}),_e.name),ne.createElement("div",{className:le.Z.children},_e.children.map((pe,ke)=>ne.createElement("div",{key:ke},pe.name&&ne.createElement("h1",null,pe.name),ne.createElement(ie.Z,{gutter:[10,10]},pe.data.map((Te,Ee)=>ne.createElement(Ce.Z,{key:Ee,onClick:()=>ye(Te),className:le.Z.diamond},ne.createElement(te.Z,{value:"`$$"+Te.value+"$$`"}))))))))))}],ge=()=>{var _e=document.createElement("div");_e.innerHTML=ae.current.getValue();var he=_e.innerText;return b&&b(he),he};return(0,ce.useImperativeHandle)(re,()=>({getData:ge})),ne.createElement("div",{className:le.Z.mathWrap},ne.createElement(ue.default,{defaultActiveKey:"1",items:me}),ne.createElement("math-field",{locale:"zh_cn",className:le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ae,style:{width:800,marginTop:30,fontSize:18}},x||""),z&&ne.createElement("div",{className:le.Z.button},ne.createElement(se.ZP,{size:"large",onClick:ge,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Dt.Z=E},57884:function($t,Dt,Se){"use strict";var ce=Se(59301),ie=Se(93314),Ce=Se(99571),ue=Object.defineProperty,se=Object.defineProperties,te=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,E=(re,ae,oe)=>ae in re?ue(re,ae,{enumerable:!0,configurable:!0,writable:!0,value:oe}):re[ae]=oe,b=(re,ae)=>{for(var oe in ae||(ae={}))ee.call(ae,oe)&&E(re,oe,ae[oe]);if(le)for(var oe of le(ae))ne.call(ae,oe)&&E(re,oe,ae[oe]);return re},z=(re,ae)=>se(re,te(ae));const x=({img:re,buttonProps:ae={},styles:oe={},customText:ve,ButtonText:ye,ButtonClick:me,Buttonclass:ge,ButtonTwo:_e,imgStyles:he,loading:pe=!1,className:ke=""})=>ce.createElement("section",{className:`tc animated fadeIn ${ke}`,style:b({color:"#999",margin:"100px auto",visibility:pe?"hidden":"visible"},oe)},ce.createElement("img",{src:re||ie,style:z(b({},he),{pointerEvents:"none",userSelect:"none"})}),ce.createElement("p",{className:"mt20 font14"},ve||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ye&&ce.createElement(Ce.ZP,b({className:ge,onClick:me},ae),ye),_e&&_e);Dt.Z=x},41550:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ge}});var ce=Se(59301),ie={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ce=Se(99571),ue=Se(70557),se=Se(51124),te=Se(25399),le=Se(49661),ee=Se(72664),ne=Se(57884),E=Se(90524),b=Se(14794),z=Se(59301),x=Object.defineProperty,re=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ve=(_e,he,pe)=>he in _e?x(_e,he,{enumerable:!0,configurable:!0,writable:!0,value:pe}):_e[he]=pe,ye=(_e,he)=>{for(var pe in he||(he={}))ae.call(he,pe)&&ve(_e,pe,he[pe]);if(re)for(var pe of re(he))oe.call(he,pe)&&ve(_e,pe,he[pe]);return _e},me=(_e,he,pe)=>new Promise((ke,Te)=>{var Ee=Pe=>{try{je(pe.next(Pe))}catch(Qe){Te(Qe)}},Oe=Pe=>{try{je(pe.throw(Pe))}catch(Qe){Te(Qe)}},je=Pe=>Pe.done?ke(Pe.value):Promise.resolve(Pe.value).then(Ee,Oe);je((pe=pe.apply(_e,he)).next())}),ge=({editOffice:_e="view",data:he,issaver:pe,onSaver:ke,theme:Te,type:Ee,filename:Oe,monacoEditor:je,className:Pe,style:Qe,close:Xe,onClose:ot,hasMask:We,disabledDownload:rt,onImgDimensions:Ye,showNodata:ut,recordInfo:Ge})=>{const[ze,Ve]=(0,ce.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[$e,nt]=(0,ce.useState)(""),[et,pt]=(0,ce.useState)(),ct=window.ENV==="build"?"/react/build":"",Rt=location.host.startsWith("localhost")?E.Z.PROXY_SERVER:E.Z.API_SERVER,Mt=10*(1024*1024),xt=(0,ce.useRef)();he!=null&&he.startsWith("/api")&&Ee!=="txt"&&(he=E.Z.API_SERVER+he);const yt=Be=>Be.substring(Be.lastIndexOf("/")+1).split(".").pop();Oe&&je&&(je.filename=Oe),(0,ce.useEffect)(()=>{var Be,Ke;const Ne=(Ke=(Be=document.cookie)==null?void 0:Be.replace(/\s/g,""))==null?void 0:Ke.split(";");Ne==null||Ne.map(De=>{let we=De.split("=");we[0]==="_educoder_session"&&nt(we[1])})},[]),(0,ce.useEffect)(()=>{Ee==="office"&&(he.indexOf("bigfilescdn.")>-1||he.indexOf("bigfiles1")>-1?pt({url:he,fileType:yt(he),model:he.indexOf("model=edit")?"edit":"view"}):He())},[Ee,he]);function bt(Be){return me(this,null,function*(){Be.data.type==="pdfdata"&&(ke(Be.data.data),window.removeEventListener("message",bt,!1)),console.log("mess---:",Be.data)})}const He=()=>me(void 0,null,function*(){console.log("data:",he);let Be=he;he.startsWith("http")||(Be=location.origin+Be);let Ke=new URL(Be).pathname.split("/").pop();const Ne=yield(0,ee.gJ)({attachment_id:Ke});Ne.url=Rt+Ne.url,pt(Ne)}),Ae=()=>{if(he.startsWith("http")||he.startsWith("blob:")){be();return}(0,le.Sv)(Oe||"educoder",he,Oe)},be=()=>{Ge&&(0,b.fc)({id:Ge==null?void 0:Ge.id,watch_type:1,course_id:Ge==null?void 0:Ge.course_id}),(0,le.Nd)(Oe||"educoder",decodeURIComponent(he))};return z.createElement("div",{style:ye({},Qe||{}),className:`${We&&ie.bgBlack} ${Ee?ie.wrp:"hide"}`},Xe&&z.createElement("div",{className:ie.close,ref:xt},!!Ye&&z.createElement(te.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>xt.current},z.createElement("span",{onClick:()=>{ot(),Ye()}},z.createElement("i",{className:"icon-yulanpizhu"}))),!rt&&z.createElement(te.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>xt.current},z.createElement("span",{onClick:be},z.createElement("i",{className:"icon-quxiaozhiding"}))),pe&&z.createElement(te.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>xt.current},z.createElement("span",{className:"",onClick:()=>{const Be=document.getElementById("pdfiframe");window.addEventListener("message",bt,!1),setTimeout(()=>{Be.contentWindow.postMessage("getData","*")},300)}},z.createElement("i",{className:"icon-baocun"}))),z.createElement(te.Z,{title:"\u5173\u95ED",getPopupContainer:()=>xt.current},z.createElement("span",{className:"",onClick:()=>{ot()}},z.createElement("i",{className:"icon-guanbi1"})))),z.createElement("div",{className:`${ie[Pe]} ${Pe} ${ie.monaco} ${Ee==="txt"?"show":"hide"}`},Ee==="txt"&&z.createElement(z.Fragment,null,z.createElement(se.ZP,ye({},je)))),Ee==="audio"&&z.createElement("audio",{src:`${(he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${he}`,autoPlay:!0}),Ee==="video"&&z.createElement(z.Fragment,null,(he==null?void 0:he.indexOf("http"))>-1?z.createElement("video",{controls:!0,src:`${he}`,autoPlay:!0}):z.createElement("video",{controls:!0,src:`data:video/mp4;base64,${he}`,autoPlay:!0})),Ee==="office"&&et&&z.createElement("iframe",{src:`${ct}/office.html?key=${et.key}&url=${btoa(et.url)}&callbackUrl=${Rt+(et.callbackUrl||"")}&fileType=${et.fileType}&title=${et.title||""}&model=${_e}&officeServer=${E.Z.ONLYOFFICE}&disabledDownload=${!!rt}`}),Ee==="html"&&z.createElement("iframe",{src:he+"&disposition=inline"}),Ee==="pdf"&&z.createElement("iframe",{id:"pdfiframe",src:`${ct}/js/pdfview/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(he)}&disabledDownload=${!!rt}&model=${_e}`}),Ee==="image"&&z.createElement("img",{src:`${(he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:image/png;base64,"}${he}`}),(Ee==="other"||Ee==="download")&&z.createElement(z.Fragment,null,ut?z.createElement(ne.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:z.createElement(Ce.ZP,{icon:z.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ae,disabled:rt},"\u4E0B\u8F7D")}):z.createElement(Ce.ZP,{type:"primary",size:"middle",onClick:Ae,disabled:rt},z.createElement(ue.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ee==="flowChart"&&z.createElement("div",{className:"embed"},z.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${he||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function($t,Dt,Se){"use strict";Se.d(Dt,{z:function(){return je},Z:function(){return Pe}});var ce=Se(59301),ie=Se(88831),Ce=Se(90290),ue=Se(64018),se=Se(39394),te=Se(90524),le=Se(49661),ee=Se(15342),ne=Se(77736),E=Se(99571),b=Se(1012),z=Se(41550),x=Se(59301),ae=({html:Qe})=>{const Xe=(0,ce.useRef)(null),ot=(0,ce.useRef)(null),We=`.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,ce.useEffect)(()=>{const rt=Xe.current.attachShadow({mode:"open"});ot.current=document.createElement("div"),ot.current.className="markdown-body",ot.current.innerHTML=Qe,rt.appendChild(ot.current);const Ye=document.createElement("style");return Ye.textContent=We,rt.appendChild(Ye),()=>{rt.innerHTML=""}},[]),(0,ce.useEffect)(()=>{ot.current&&(ot.current.innerHTML=Qe)},[Qe]),x.createElement("div",{ref:Xe})};function oe(Qe){const Xe=["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(${Xe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(ot,"").trim()}var ve={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ye=Object.defineProperty,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,he=(Qe,Xe,ot)=>Xe in Qe?ye(Qe,Xe,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Qe[Xe]=ot,pe=(Qe,Xe)=>{for(var ot in Xe||(Xe={}))ge.call(Xe,ot)&&he(Qe,ot,Xe[ot]);if(me)for(var ot of me(Xe))_e.call(Xe,ot)&&he(Qe,ot,Xe[ot]);return Qe};const ke="@\u2581\u2581@",Te="@\u2581@",Ee=/<pre[^>]*>/g;function Oe(Qe){let Xe=document.createElement("div");return Xe.innerHTML=Qe,Xe.childNodes.length===0?"":Xe.childNodes[0].nodeValue}const je=(Qe,Xe)=>{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,We=/\"(?: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,Ye=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Xe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ot,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/api/attachments/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(Ye,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/attachments/download/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(ot,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/api/attachments/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(We,(ut,Ge,ze,Ve,$e)=>{const nt=Ge||Ve,et=ze||$e||"";return'"'+te.Z.API_SERVER+"/api/attachments/"+nt+et+nt+et+"&t="+(0,le.Jn)(nt,Date.now())}).replace(rt,(ut,Ge,ze,Ve,$e)=>{const nt=Ge||Ve,et=ze||$e||"";return"("+te.Z.API_SERVER+"/files/uploads/"+nt+et+nt+et+"&t="+(0,le.Jn)(nt,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:Xe=!1,className:ot,showTextOnly:We,showLines:rt,style:Ye={},stylesPrev:ut={},highlightKeywords:Ge,showProgramFill:ze,isProgramFill:Ve,disabledFill:$e=!1,programFillValue:nt,openEditor:et=()=>{},onFillChange:pt=dt=>{},onFillBlur:ct=()=>{},onFillFocus:Rt=()=>{}})=>{let dt=oe(String(Qe||""));const Mt=(0,ce.useRef)(),xt=(0,ce.useRef)(),[yt,bt]=(0,ce.useState)(""),[He,Ae]=(0,ce.useState)("office"),[be,Be]=(0,ce.useState)([]),Ke=(0,ce.useRef)("a"+(0,b.Z)()),Ne={},De=gt=>/<style[\s\S]*?>/i.test(gt||""),we=(gt,Qt,Lt)=>{const qt=document.createElement(gt===Te?"input":"textarea");qt.style.width="100%",qt.style.height=gt===Te?"40px":"151px",qt.rows=5,qt.spellcheck=!1,qt.name="edu-program-fill",qt.placeholder="\u8BF7\u8F93\u5165",qt.dataset.id=Qt;const un=Object.keys(Ne).length;return Ne[un]=qt,`<span class="edu-program-fill-wrap ${gt===Te?"":"show"}" style="width:${gt===Te?"600px":"100%"}" title=${Lt||""}><span>${qt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Le(gt){return gt=gt.replace(/!\[.*?\]\(.*?\)/g,""),gt=gt.replace(/\[.*?\]\(.*?\)/g,""),gt=gt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),gt=gt.replace(/<embed.*?>/g,""),gt=gt.replace(/<img.*?>/g,""),gt=gt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),gt=gt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),gt=gt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),gt=gt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),gt}const Ue=gt=>!We&&De(dt)?gt:gt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Qt,Lt){let qt=Lt.replace(/(\n|\r)/g,"").split("}"),un=[];return qt.map(Sn=>{Sn!=""&&un.push(`.${Ke.current} ${Sn}`)}),`<style>${un.join("}")}</style>`}),Me=(0,ce.useMemo)(()=>{try{const qt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,un=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Sn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Jt=/\(\/attachments\/download\//g;dt=dt.replace(Jt,"("+te.Z.API_SERVER+"/attachments/download/").replace(qt,"("+te.Z.API_SERVER+"/api/attachments/").replace(un,'"'+te.Z.API_SERVER+"/api/attachments/").replace(Sn,'"'+te.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
`),Mt.current.style.display="none"}catch(qt){}if(ze){let qt=-1;return dt=dt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(un,Sn,Jt){var Ln;return++qt,we(un,qt,(Ln=nt==null?void 0:nt[qt])==null?void 0:Ln.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Ue(dt||"")}</pre>`}let gt=Ue(dt);gt=(0,Ce.ZP)(gt);const Qt=(0,Ce.ez)();dt.match(/\[TOC\]/)&&(gt=gt.replace("<p>[TOC]</p>",(0,Ce.Qv)()),(0,Ce.Iy)()),gt=gt.replace(/(__special_katext_id_\d+__)/g,(qt,un)=>{const{type:Sn,expression:Jt}=Qt[un];return(0,ee.renderToString)(Oe(Jt)||"",{displayMode:Sn==="block",throwOnError:!1,output:"html"})}),gt=gt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ce.AL)();const Lt=document.createElement("div");if(Lt.innerHTML=gt,We)return Lt.innerText;if(Ge){const qt=Ge.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Pt(Lt,qt),Lt.innerHTML}return setTimeout(()=>Ot(),500),Lt.innerHTML},[dt,Ge]);(0,ce.useEffect)(()=>{Ct.current&&Ct.current.querySelectorAll(["input","textarea"]).forEach(Qt=>{Qt.oninput=Re,Qt.onblur=tt,Qt.onfocus=lt})},[be]),(0,ce.useEffect)(()=>{var gt,Qt,Lt,qt,un;if(nt!=null&&nt.length)try{const Sn=Ct.current.querySelectorAll(".edu-program-fill-score"),Jt=Ct.current.querySelectorAll('[name="edu-program-fill"]');for(const[Ln,Zn]of Jt.entries())Zn.value=((gt=nt==null?void 0:nt[Ln])==null?void 0:gt.value)||"",((Qt=nt==null?void 0:nt[Ln])==null?void 0:Qt.type)==="warning"?Zn.className="program-fill-warning":((Lt=nt==null?void 0:nt[Ln])==null?void 0:Lt.type)==="success"?Zn.className="program-fill-success":Zn.className="";for(const[Ln,Zn]of Sn.entries())Zn.innerHTML=(qt=nt==null?void 0:nt[Ln])!=null&&qt.score?`${(un=nt==null?void 0:nt[Ln])==null?void 0:un.score}\u5206`:"";Be(nt)}catch(Sn){console.log(Sn,"error")}},[nt]);const Re=gt=>{be[gt.target.dataset.id]=be[gt.target.dataset.id]||{},be[gt.target.dataset.id].value=gt.target.value,Be([...be]),pt(be,gt.target.dataset.id)},tt=gt=>{be[gt.target.dataset.id]=be[gt.target.dataset.id]||{},be[gt.target.dataset.id].value=gt.target.value,Be([...be]),ct(be,gt.target.dataset.id)},lt=gt=>{be[gt.target.dataset.id]=be[gt.target.dataset.id]||{},be[gt.target.dataset.id].value=gt.target.value,Be([...be]),Rt(be,gt.target.dataset.id)};function Pt(gt,Qt){return gt.childNodes.forEach(Lt=>{var qt;if(Lt.childNodes.length>0)Pt(Lt,Qt);else if(Lt.nodeName!=="IMG")if(Lt.innerHTML)Lt.innerHTML=(qt=Lt.innerHTML)==null?void 0:qt.replace(new RegExp(Qt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const un=document.createElement("span");un.innerHTML=Lt.textContent.replace(new RegExp(Qt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Lt.replaceWith(un)}})}const Ct=(0,ce.useRef)();Ce.jb.WebkitLineClamp=rt,rt&&(Ye=pe(pe({},Ye),Ce.jb));function vt(gt){let Qt=gt.target;if(Qt.tagName.toUpperCase()==="A"){let Lt=Qt.getAttribute("href");if(Lt.indexOf("office")>-1)gt.preventDefault(),bt(Lt),Ae("office");else if(Lt.indexOf("application/pdf")>-1)gt.preventDefault(),bt(Lt),Ae("pdf");else if(Lt.indexOf("text/html")>-1)gt.preventDefault(),bt(Lt),Ae("html");else if(Lt.startsWith("#")){gt.preventDefault();let qt=document.getElementById(Lt.replace("#",""));qt&&qt.scrollIntoView(!0)}}}const Ot=()=>{var gt;const Qt=(gt=Ct.current)==null?void 0:gt.querySelectorAll("video");Qt==null||Qt.forEach(Lt=>{if(Lt.oncontextmenu=()=>!1,Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(se.ZP.isSupported()){var qt=new se.ZP;qt.loadSource(Lt.src),qt.attachMedia(Lt)}}})};(0,ce.useEffect)(()=>{if(Ct.current&&Me&&Me.match(Ee)&&window.PR.prettyPrint(),Ct.current)return Ct.current.addEventListener("click",vt),()=>{var gt;(gt=Ct.current)==null||gt.removeEventListener("click",vt),(0,Ce.AL)(),(0,Ce.Iy)()}},[Me,Ct.current,vt]);const Zt=gt=>{gt.target.nodeName==="IMG"&&gt.target.className.indexOf("draw-flowchart")>-1?(Mt.current.style.zIndex=1,Mt.current.style.display="flex",Mt.current.style.width=gt.target.clientWidth+"px",Mt.current.style.height=gt.target.clientHeight+"px",Mt.current.style.top=gt.target.offsetTop+"px",Mt.current.style.left=gt.target.offsetLeft+"px",gt.target.id&&(xt.current=gt.target.id)):Mt.current.style.display="none"},Ut=()=>{Mt.current.style.display="none"};return(0,ce.useEffect)(()=>{var gt;const Qt=Lt=>{Lt.preventDefault(),Lt.clipboardData.setData("text",window.getSelection().toString())};return(gt=Ct.current)==null||gt.addEventListener("copy",Qt),()=>{var Lt;(Lt=Ct.current)==null||Lt.removeEventListener("copy",Qt)}},[Ct.current]),ce.createElement("div",{style:{position:"relative"},onMouseLeave:Ut},We&&ce.createElement("div",{ref:Ct,className:`${ve.mdBody} `},Me),!We&&!De(Me)&&ce.createElement("div",{ref:Ct,style:pe({},Ye),onMouseOver:Zt,className:`${ot||""} ${$e?"disabled-fill":""} markdown-body ${ve.mdBody} ${Ke.current}`,dangerouslySetInnerHTML:{__html:Me}}),!We&&De(Me)&&ce.createElement(ae,{html:Me}),ce.createElement("div",{ref:Mt,className:`${ve.button} ${Xe?"":ve.previewFlowChart}`},ce.createElement(ne.Z,null,ce.createElement(E.ZP,{onClick:()=>{Xe?et(xt.current):(bt(xt.current),Ae("flowChart"))}},Xe?"\u7F16\u8F91":"\u9884\u89C8"))),ce.createElement(z.Z,{close:!0,data:yt,type:yt!=null&&yt.length?He:"",style:pe({},ut),onClose:()=>bt("")}))}},766:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ue}});var ce=Se(76560),ie={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Ce=Se(59301),ue=({message:se,className:te,children:le,style:ee={}})=>Ce.createElement("div",{className:`custom-spinner ${ie.idsRingWrapper} ${te}`},Ce.createElement("div",{className:ie.ldsRing},Ce.createElement("div",null),Ce.createElement("div",null),Ce.createElement("div",null),Ce.createElement("div",null)),se?Ce.createElement("p",{style:ee},se):null,le,Ce.createElement(ce.Outlet,null))},72015:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ue}});var ce=Se(59301),ie=Se(33796),Ce=Se(59301),ue=({defaultX:se="40%",leftChild:te,rightChild:le,className:ee,hideResize:ne=!1})=>{const[E,b]=(0,ce.useState)(se),z=(0,ce.useRef)();function x(){z.current=!0}(0,ce.useEffect)(()=>{function oe(ye){z.current&&(ie.Z.publish("resize-move-bar",ye),b(ye.pageX))}function ve(){z.current=!1}return window.addEventListener("mousemove",oe),window.addEventListener("mouseup",ve),()=>{window.removeEventListener("mousemove",oe),window.removeEventListener("mouseup",ve)}},[]);const re=typeof E=="number"&&E!==.01?`${E}px`:se,ae=`calc(100% - ${ne?"0px":"4px"} - ${re})`;return Ce.createElement("div",{className:`split-panel-container ${ee}`},Ce.createElement("section",{style:{width:re,display:E===.01?"none":""}},te),Ce.createElement("section",{className:"resize-x-bar",onMouseDown:x},Ce.createElement("a",{className:"btn-resize"},Ce.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Ce.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"})))),Ce.createElement("section",{style:{width:ae}},le))}},46685:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return te}});var ce=Se(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_"},Ce=Se(92310),ue=Se.n(Ce),te=({className:le,style:ee={},leftNode:ne,leftTitle:E="\u81EA\u6D4B\u8F93\u5165",rightNode:b,rightTitle:z="\u8FD0\u884C\u7ED3\u679C"})=>ce.createElement("div",{className:ue()(ie.result,le),style:ee},ce.createElement("div",{className:ie.left},ce.createElement("div",{className:ie.title},ce.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),ce.createElement("span",null,E)),ce.createElement("div",{className:ie.leftNode},ne)),ce.createElement("div",{className:ie.right},ce.createElement("div",{className:ie.title},ce.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),ce.createElement("span",null,z)),ce.createElement("div",{className:ie.rightNode},b)))},38273:function($t,Dt,Se){"use strict";var ce=Se(59301);const ie=ue=>String(ue).length===1?`0${ue}`:ue,Ce=({className:ue="",onChange:se,defaultValue:te=0})=>{const[le,ee]=(0,ce.useState)(te);(0,ce.useEffect)(()=>{const z=setTimeout(()=>{ee(le+1e3)},1e3);return se(le+1e3),()=>{clearInterval(z)}},[le]);const ne=parseInt(le/(60*6e4))||"00",E=parseInt(le%(60*6e4)/6e4)||"00",b=parseInt(le%6e4/1e3)||"00";return ce.createElement("div",{className:ue},ie(ne),":",ie(E),":",ie(b))};Dt.Z=Ce},93152:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ae}});var ce=Se(59301),ie=Se(6767),Ce=Se(75727),ue=Se(60513),se=Se(39394),te=Se(34055),le=Se(56102),ee=Se(2610),ne={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,ve,ye)=>new Promise((me,ge)=>{var _e=ke=>{try{pe(ye.next(ke))}catch(Te){ge(Te)}},he=ke=>{try{pe(ye.throw(ke))}catch(Te){ge(Te)}},pe=ke=>ke.done?me(ke.value):Promise.resolve(ke.value).then(_e,he);pe((ye=ye.apply(oe,ve)).next())});function b(oe){if(isNaN(oe))return{minutes:"00",seconds:"00"};const ve=new Date(oe*1e3).toISOString().substr(11,8);return{hour:ve.substr(0,2),minutes:ve.substr(3,2),seconds:ve.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function z(oe,ve){return oe-ve}function x(oe){oe.sort(z);let ve=0;for(let ye=0;ye<oe.length-1;ye++){let me=Math.abs(oe[ye+1]-oe[ye]);me<21&&(ve+=me)}return ve}const re=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ae=(0,ce.forwardRef)(({allow_skip:oe,src:ve,toLog:ye,videoId:me,logWatchHistory:ge,courseId:_e=null,startTime:he,handlePause:pe=()=>{},handlePlay:ke=()=>{},handlePlayEnded:Te=()=>{},autoPlay:Ee=!1,onPlayEnded:Oe=()=>{},isShowWaterMark:je=!0},Pe)=>{var Qe;ve=ve==null?void 0:ve.replace("http://","https://");const ot=((Qe=ve==null?void 0:ve.split("."))==null?void 0:Qe.pop())==="flv",We=(0,ce.useRef)(),rt=(0,ce.useRef)(),Ye=(0,ce.useRef)(),ut=(0,ce.useRef)(),Ge=(0,ce.useRef)(),ze=(0,ce.useRef)(),Ve=(0,ce.useRef)(),$e=(0,ce.useRef)(),nt=(0,ce.useRef)(),et=(0,ce.useRef)(),pt=(0,ce.useRef)(),ct=(0,ce.useRef)(),Rt=(0,ce.useRef)(),dt=(0,ce.useRef)(),Mt=navigator.userAgent.toLowerCase().match(re),xt=Mt?Mt[0]:"pc",yt=(0,ce.useRef)(!1),bt=(0,te.eY)();let He=0,Ae=0,be=0,Be=null,Ke=!1,Ne=20,De=1,we=!1,Le=!1,Ue=[];(0,ce.useImperativeHandle)(Pe,()=>({getLastUpdatedTime:()=>We.current.currentTime,getDuration:()=>We.current.duration})),ie.ZP.config({maxCount:1,getContainer:()=>Ye.current});const Me=(0,ce.useCallback)((Ot,Zt=!1)=>{let Ut={point:We.current.currentTime};Be?(Ut.log_id=Be,Ut.watch_duration=x(Ue),Ut.total_duration=Ae):(_e?(Ut.video_id=parseInt(me,10),Ut.course_id=_e):Ut.video_id=me,Ut.duration=He,Ut.device=xt),Zt&&(Ut.ed="1");function gt(){return E(this,null,function*(){we=!0,Be=yield ge==null?void 0:ge(Ut),we=!1,Ot&&Ot()})}gt()},[me,_e]);(0,ce.useEffect)(()=>{We.current&&(ut.current.style.display="none",Ge.current.style.display="block"),ie.ZP.destroy();let Ot=null;return ue.Z.isSupported&&ot&&ve&&(ve==null?void 0:ve.indexOf(".m3u8"))<0?(Ot=ue.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:ve,muted:!1}),We.current&&(Ot.attachMediaElement(We.current),Ot.load())):We.current.setAttribute("src",ve),tt(),()=>{Ot&&(Ot.unload(),Ot.pause(),Ot.destroy(),Ot=null)}},[We,ot,ve]);function Re(){We.current.paused?(ut.current.style.display="none",Ge.current.style.display="block"):(ut.current.style.display="block",Ge.current.style.display="none")}function tt(){pt.current.style.display="none",Rt.current.style.display="none",ct.current.style.display="none",We.current.muted||We.current.volume===0?pt.current.style.display="block":We.current.volume>0&&We.current.volume<=.5?Rt.current.style.display="block":ct.current.style.display="block"}(0,ce.useEffect)(()=>{const Ot=document.getElementById("play"),Zt=document.querySelectorAll(".playback-icons use");function Ut(){ke(),he&&!yt.current&&(We.current.currentTime=he),yt.current=!0,Ue.push(We.current.currentTime),Ke||(Ke=!0,ye&&Me())}function gt(){return E(this,null,function*(){Re(),Ue.push(We.current.currentTime),ye&&Me(()=>{Be=null,be=0,Ke=!1,we=!1,Le=!1,Ue=[],Ae=0,De=1},!0),Oe()})}function Qt(){ze.current.value=Math.round(We.current.currentTime),Ve.current.value=Math.round(We.current.currentTime)}function Lt(){const jn=b(Math.round(We.current.currentTime));nt.current.innerText=`${jn.hour>0?jn.hour+":":""}${jn.minutes}:${jn.seconds}`,nt.current.setAttribute("datetime",`${jn.hour>0?" "+jn.hour+" ":""}${jn.minutes}m ${jn.seconds}s`)}function qt(){var jn,Nn,rr,Kn,In,gn,pn;const Dn=Math.round((jn=We.current)==null?void 0:jn.duration);(rr=(Nn=ze.current)==null?void 0:Nn.setAttribute)==null||rr.call(Nn,"max",Dn),(In=(Kn=Ve.current)==null?void 0:Kn.setAttribute)==null||In.call(Kn,"max",Dn);const Rn=b(Dn);$e.current&&($e.current.innerText=`${Rn.hour>0?Rn.hour+":":""}${Rn.minutes}:${Rn.seconds}`,(pn=(gn=$e.current).setAttribute)==null||pn.call(gn,"datetime",`${Rn.hour>0?" "+Rn.hour+" ":""}${Rn.minutes}m ${Rn.seconds}s`))}function un(){try{const jn=Math.round(We.current.duration);ze.current.setAttribute("max",jn),Ve.current.setAttribute("max",jn);const Nn=b(jn);$e.current.innerText=`${Nn.hour>0?Nn.hour+":":""}${Nn.minutes}:${Nn.seconds}`,$e.current.setAttribute("datetime",`${Nn.hour>0?" "+Nn.hour+" ":""}${Nn.minutes}m ${Nn.seconds}s`),Qt(),Lt();const{width:rr,height:Kn,x:In,y:gn}=rt.current.getBoundingClientRect();if(In<0||gn<0,!Le){let pn=We.current.currentTime,Dn=pn-be;Math.abs(Dn)<10?(Ae+=Math.abs(Dn),be=pn,we||Ae-De*Ne>=0&&(De++,Ue.push(be),ye&&Me())):(be=pn,ye&&Me())}}catch(jn){console.log("videoplaying:",jn)}}function Sn(){Le=!0}function Jt(){We.current.playing&&Ue.push(We.current.currentTime,be),be=We.current.currentTime,Le=!1}function Ln(){He=We.current.duration,He<=20&&(Ne=He/3),We.current.addEventListener("play",Ut)}function Zn(jn){jn.preventDefault(),(0,ee.vp)()?(We.current.style.width="100%",We.current.style.height="100%"):We.current.style.cssText=""}function Gn(){pe()}function Jn(jn){if(!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Nn=jn.target.dataset.seek?jn.target.dataset.seek:jn.target.value;We.current.currentTime=Nn,Ve.current.value=Nn,ze.current.value=Nn}function hr(jn){const Nn=Math.round(jn.offsetX/jn.target.clientWidth*parseInt(jn.target.getAttribute("max"),10));ze.current.setAttribute("data-seek",Nn);const rr=b(Nn);et.current.textContent=`${rr.hour>0?rr.hour+":":""}${rr.minutes}:${rr.seconds}`;const Kn=We.current.getBoundingClientRect();et.current.style.left=`${jn.pageX-Kn.left}px`}function ur(jn){switch(jn.code){case"Space":jn.preventDefault(),Ct();break;case"ArrowRight":if(jn.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(We.current.currentTime>=We.current.duration)break;We.current.currentTime=parseInt(We.current.currentTime)+5,Qt();break;case"ArrowLeft":if(jn.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(We.current.currentTime===0)break;We.current.currentTime=parseInt(We.current.currentTime)-5,Qt();break;case"ArrowUp":jn.preventDefault(),We.current.volume<1&&(We.current.volume=(parseInt(We.current.volume*10)+1)/10);break;case"ArrowDown":jn.preventDefault(),We.current.volume>0&&(We.current.volume=(parseInt(We.current.volume*10)-1)/10);break}}return Ye.current.addEventListener((0,ee.gH)(),Zn),We.current.addEventListener("canplay",Ln),We.current.addEventListener("ended",gt),We.current.addEventListener("seeking",Sn),We.current.addEventListener("seeked",Jt),We.current.addEventListener("loadedmetadata",qt),ze.current.addEventListener("mousemove",hr),ze.current.addEventListener("input",Jn),We.current.addEventListener("timeupdate",un),We.current.addEventListener("pause",Gn),We.current.addEventListener("volumechange",tt),document.addEventListener("keydown",ur),()=>{var jn,Nn,rr,Kn,In,gn,pn,Dn,Rn,Un,Mr,an;(jn=We.current)==null||jn.removeEventListener("canplay",Ln),(Nn=We.current)==null||Nn.removeEventListener("play",Ut),(rr=We.current)==null||rr.removeEventListener("ended",gt),(Kn=We.current)==null||Kn.removeEventListener("seeking",Sn),(In=We.current)==null||In.removeEventListener("seeked",Jt),(gn=ze.current)==null||gn.removeEventListener("mousemove",hr),(pn=ze.current)==null||pn.removeEventListener("input",Jn),(Dn=We.current)==null||Dn.removeEventListener("timeupdate",un),(Rn=We.current)==null||Rn.removeEventListener("pause",Gn),(Un=We.current)==null||Un.removeEventListener("loadedmetadata",qt),(Mr=We.current)==null||Mr.removeEventListener("volumechange",tt),document.removeEventListener("keydown",ur),(an=We.current)!=null&&an.playing&&(Ue.push(be,We.current.currentTime),ye&&Me())}},[We,ve]),(0,ce.useEffect)(()=>{if(We.current.onended=()=>{Te(We)},We.current.oncontextmenu=()=>!1,(ve==null?void 0:ve.indexOf(".m3u8"))>-1){if(We.current.canPlayType("application/vnd.apple.mpegurl"))We.current.src=ve;else if(se.ZP.isSupported()){var Ot=new se.ZP;Ot.loadSource(ve),Ot.attachMedia(We.current)}}},[ve]);const[lt,Pt]=(0,ce.useState)(1),Ct=()=>{We.current.paused||We.current.ended?We.current.play():We.current.pause(),Re()};function vt(){We.current.muted=!We.current.muted,We.current.muted?(dt.current.setAttribute("data-volume",volume.value),dt.current.value=0):dt.current.value=dt.current.dataset.volume}return ce.createElement("div",{style:{position:"relative"},ref:Ye},ce.createElement("div",{ref:rt,className:`${ne.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${ne.animate__loop}`},je&&bt?bt.login:" "),ce.createElement("div",{className:ne.container},ce.createElement("div",{className:ne["video-container"],id:"video-container"},ce.createElement("div",{className:ne["playback-animation"],id:"playback-animation"},ce.createElement("svg",{className:ne["playback-icons"]},ce.createElement("use",{className:"hidden",href:"#play-icon"}),ce.createElement("use",{href:"#pause"}))),ce.createElement("video",{className:ne.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:We,autoPlay:Ee}),ce.createElement("div",{className:`${ne["video-controls"]} `,id:"video-controls"},ce.createElement("div",{className:ne["bottom-controls"]},ce.createElement("div",{className:ne["left-controls"]},ce.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ct},ce.createElement("svg",{className:ne["playback-icons"]},ce.createElement("use",{ref:Ge,href:"#play-icon"}),ce.createElement("use",{ref:ut,style:{display:"none"},href:"#pause"}))),ce.createElement("div",{className:ne.time},ce.createElement("time",{id:"time-elapsed",ref:nt},"00:00"),ce.createElement("span",null," / "),ce.createElement("time",{id:"duration",ref:$e},"00:00"))),ce.createElement("div",{className:ne["right-controls"]},oe&&ce.createElement(Ce.Z,{placement:"top",overlayClassName:ne.rateOverlay,getPopupContainer:Ot=>Ot.parentNode,menu:{items:[{key:"1",label:ce.createElement("span",{onClick:()=>{Pt(1),We.current.playbackRate=1}},"1.0x")},{key:"2",label:ce.createElement("span",{onClick:()=>{Pt(1.5),We.current.playbackRate=1.5}},"1.5x")},{key:"3",label:ce.createElement("span",{onClick:()=>{Pt(2),We.current.playbackRate=2}},"2.0x")}]}},ce.createElement("div",{className:`${ne.controlText} mr5`},"\u500D\u901F")),ce.createElement(le.CopyToClipboard,{text:ve,onCopy:()=>ie.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},ce.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),ce.createElement("div",{className:ne["volume-controls"]},ce.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:ne["volume-button"],id:"volume-button",onClick:vt},ce.createElement("i",{ref:pt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),ce.createElement("i",{ref:Rt,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),ce.createElement("i",{ref:ct,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),ce.createElement("input",{className:ne.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:dt,style:{display:"none"},onClick:tt})),ce.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:ne["fullscreen-button"],onClick:()=>{(0,ee.vp)()?(0,ee.BU)():(0,ee.Dj)(Ye.current)}},ce.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),ce.createElement("div",{className:ne["video-progress"]},ce.createElement("progress",{ref:Ve,value:"0",min:"0"}),ce.createElement("input",{className:ne.seek,ref:ze,value:"0",min:"0",type:"range",step:"1"}),ce.createElement("div",{className:ne["seek-tooltip"],ref:et,id:"seek-tooltip"},"00:00"))))),ce.createElement("svg",{style:{display:"none"}},ce.createElement("defs",null,ce.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),ce.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),ce.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},ce.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"})),ce.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},ce.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"})),ce.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},ce.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"})),ce.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},ce.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"})),ce.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},ce.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"})),ce.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},ce.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"})))))})},39479:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ue}});var ce=Se(59301),ie=Se(33796),Ce=Se(90083),ue=()=>{const[se,te]=(0,ce.useState)(""),[le,ee]=(0,ce.useState)(0);let[ne,E]=(0,ce.useState)(),[b,z]=(0,ce.useState)();const[x,re]=(0,ce.useState)(!1),ae=(0,ce.useRef)("");(0,ce.useEffect)(()=>ie.Z.subscribe("preview-image",Ee=>{te(Ee),console.log(pe.current)}),[]),(0,ce.useEffect)(()=>(document.addEventListener("keydown",oe),()=>{document.removeEventListener("keydown",oe)}),[]),(0,ce.useEffect)(()=>{ae.current=se},[se]);function oe(Te){console.log("e====",Te),Te.keyCode==27&&ae.current&&ve()}function ve(){document.body.style.overflow="auto",E(void 0),z(void 0),ee(0),te("")}function ye(){ee(le+90)}function me(){ne=pe.current.width*1.1,b=pe.current.height*1.1,z(b),E(ne)}function ge(){ne=pe.current.width/1.1,b=pe.current.height/1.1,z(b),E(ne)}const _e=(0,ce.useRef)(),he=(0,ce.useRef)(),pe=(0,ce.useRef)(),ke=Te=>{(Te.nativeEvent.target===_e.current||Te.nativeEvent.target===he.current)&&ve()};return ce.createElement(ce.Fragment,null,se?ce.createElement("div",null,ce.createElement("div",{className:"preview-wrp-group",ref:he},ce.createElement(Ce.Z,{className:"image-preview",src:se,style:{display:"none"},preview:{visible:!0,src:se,onVisibleChange:Te=>{te("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},44905:function($t,Dt,Se){"use strict";Se.d(Dt,{h:function(){return _e}});var ce=Se(59301),ie=Se(82326),Ce=Se(28284),ue=Se(99571),se=Se(89780),te=Se.n(se),le=Se(66543),ee=Se(59598),ne=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ae=(he,pe,ke)=>pe in he?ne(he,pe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):he[pe]=ke,oe=(he,pe)=>{for(var ke in pe||(pe={}))x.call(pe,ke)&&ae(he,ke,pe[ke]);if(z)for(var ke of z(pe))re.call(pe,ke)&&ae(he,ke,pe[ke]);return he},ve=(he,pe)=>E(he,b(pe));const ye=ie.default.Option,me={labelCol:{span:4},wrapperCol:{span:20}},ge={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"]};Dt.Z=({callback:he,onCancel:pe})=>{const[ke,Te]=(0,ce.useState)("python");function Ee(je){Te(ge[je][1])}function Oe(je){he(je)}return ce.createElement(Ce.default,ve(oe({},me),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),ce.createElement(Ce.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(ie.default,{getPopupContainer:je=>je.parentNode,onChange:Ee},Object.keys(ge).map(je=>ce.createElement(ye,{key:je,value:je},ge[je][0])))),ce.createElement(Ce.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(_e,{mode:ke})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(ue.ZP,{type:"ghost",onClick:pe},"\u53D6\u6D88")))};function _e({value:he,onChange:pe,mode:ke,options:Te={}}){const Ee=(0,ce.useRef)(),[Oe,je]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if(Oe){let Pe=function(Qe){const Xe=Qe.getValue();pe&&pe(Xe)};return Oe.on("change",Pe),()=>{Oe.off("change",Pe)}}},[Oe,pe]),(0,ce.useEffect)(()=>{Oe&&Oe.setOption("mode",ke)},[Oe,ke]),(0,ce.useEffect)(()=>{Oe&&(he!==Oe.getValue()||he==="")&&setTimeout(()=>{Oe.setValue(he||"")},300)},[Oe,he]),(0,ce.useEffect)(()=>{if(Ee.current&&!Oe){const Pe=te().fromTextArea(Ee.current,oe({mode:ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Te));je(Pe)}},[Ee.current,Oe]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:Ee}))}},2978:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return gn}});var ce=Se(59301),ie=Se(89780),Ce=Se.n(ie),ue=Se(76374),se=Se(66543),te=Se(6313),le=Se(25717),ee=Se(99498),ne=Se(25419),E=Se(67549),b=Se(38394),z=({value:pn="",className:Dn,showTextOnly:Rn,showLines:Un,style:Mr={}})=>{const an=(0,ce.useMemo)(()=>"",[pn]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:an}}))},x=Object.defineProperty,re=Object.defineProperties,ae=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,me=(pn,Dn,Rn)=>Dn in pn?x(pn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):pn[Dn]=Rn,ge=(pn,Dn)=>{for(var Rn in Dn||(Dn={}))ve.call(Dn,Rn)&&me(pn,Rn,Dn[Rn]);if(oe)for(var Rn of oe(Dn))ye.call(Dn,Rn)&&me(pn,Rn,Dn[Rn]);return pn},_e=(pn,Dn)=>re(pn,ae(Dn));let he=[{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 pe({onActionCallback:pn,title:Dn,icon:Rn,actionName:Un,className:Mr="",children:an}){function Ie(){pn(Un)}return ce.createElement("a",{title:Dn,className:Mr,onClick:Ie},ce.createElement("i",{className:`${Rn}`}),an)}var ke=({watch:pn,showNullButton:Dn,showNullProgramButton:Rn,onActionCallback:Un,fullScreen:Mr,insertTemp:an,hidetoolBar:Ie,extraUse:Ze})=>{const qe=[...he,{title:`${pn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${pn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ce.createElement("ul",{className:"markdown-toolbar-container"},!Ie&&qe.map((st,mt)=>ce.createElement("li",{key:mt},st.actionName?ce.createElement(pe,_e(ge({},st),{onActionCallback:Un})):ce.createElement("span",{className:"v-line"}))),Dn?ce.createElement("li",null,ce.createElement(pe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Un},ce.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Rn?ce.createElement(ce.Fragment,null,ce.createElement("li",null,ce.createElement(pe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Un},ce.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ce.createElement("li",null,ce.createElement(pe,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Un},ce.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,an&&ce.createElement("li",null,ce.createElement(pe,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${an}`,onActionCallback:Un},ce.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Ze&&ce.createElement("li",null,Ze),ce.createElement("li",{className:"btn-full-screen"},ce.createElement(pe,{icon:`${Mr?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Mr?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Un})))},Te=Se(75790),Ee=Se(28284),Oe=Se(37568),je=Se(99571),Pe=Object.defineProperty,Qe=Object.defineProperties,Xe=Object.getOwnPropertyDescriptors,ot=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable,Ye=(pn,Dn,Rn)=>Dn in pn?Pe(pn,Dn,{enumerable:!0,configurable:!0,writable:!0,value:Rn}):pn[Dn]=Rn,ut=(pn,Dn)=>{for(var Rn in Dn||(Dn={}))We.call(Dn,Rn)&&Ye(pn,Rn,Dn[Rn]);if(ot)for(var Rn of ot(Dn))rt.call(Dn,Rn)&&Ye(pn,Rn,Dn[Rn]);return pn},Ge=(pn,Dn)=>Qe(pn,Xe(Dn));const ze={labelCol:{span:4},wrapperCol:{span:20}};var Ve=({callback:pn,onCancel:Dn})=>{function Rn(Un){pn(Un)}return ce.createElement(Ee.default,Ge(ut({},ze),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Rn,style:{width:500}}),ce.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(Oe.default,null)),ce.createElement(Ee.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(Oe.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(je.ZP,{type:"ghost",onClick:Dn},"\u53D6\u6D88")))},$e=Se(44905),nt=Se(45596),et=Se(62957),pt=Se(77019),ct=Se(6077),Rt=Se(59301),dt=({callback:pn,onCancel:Dn})=>{const Rn=document.createElement("canvas"),Un=Rn.getContext("2d");Rn.width=1e3,Rn.height=800,Un.fillStyle="#ffffff",Un.fillRect(0,0,Rn.width,Rn.height);const Mr=Rn.toDataURL("image/png");return Rt.createElement(et.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Rt.createElement(pt.Z,{style:{height:"100vh"}},Rt.createElement(ct.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Mr,visible:!0,title:String(Date.now())},onOk:an=>{pn({src:an.url})},onClose:Dn})))},Mt=Se(30641),xt=Se(5269),yt=Se(6767),bt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},He=Se(59301),be=(0,ce.forwardRef)(({onCancel:pn,editImgId:Dn,callback:Rn},Un)=>{let Mr=(0,ce.useRef)(),an=(0,ce.useRef)(),Ie=(0,ce.useRef)(),Ze=(0,ce.useRef)(!1);const qe=(0,ce.useRef)(!1);console.log("ref:",Un);const[st,mt]=(0,ce.useState)(0),[Bt,kt]=(0,ce.useState)("100vh");return(0,ce.useEffect)(()=>{mt(1)},[]),(0,ce.useImperativeHandle)(Un,()=>({setHeight:kt})),He.createElement("div",{ref:qe,className:"body-overflow-initial"},He.createElement(Mt.Z,{width:"100vw",height:Bt,footer:null,closable:!0,placement:"bottom",open:!!st,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${bt.drawerWrap}`,onClose:()=>{window.saveDrawData(Nt=>{Rn({src:`/api/attachments/${Nt}`,id:Nt})})},title:He.createElement(pt.Z,{align:"middle"},He.createElement(xt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),He.createElement(xt.Z,{onClick:()=>{kt(Bt==="60px"?"100vh":"60px")}},He.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),He.createElement(xt.Z,{onClick:()=>{window.saveDrawData(Nt=>{if(Nt===null){yt.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}yt.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),Rn({src:`/api/attachments/${Nt}`,id:Nt,disabledClose:!0})})}},He.createElement(je.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},He.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Dn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:an})))}),Be=Se(90524),Ke=Se(47889),Ne=Se(71051);const De=Ke.ZP.Group,we={margin:"0 8px"};var Le=({callback:pn,onCancel:Dn})=>{function Rn(Un){pn(Un)}return ce.createElement(Ee.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Rn},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:we},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:we},"\u884C\u6570"),ce.createElement(Ee.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(Ne.Z,null)),ce.createElement("span",{style:we},"\u5217\u6570"),ce.createElement(Ee.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(Ne.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:we},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement(Ee.default.Item,{name:"align"},ce.createElement(De,null,ce.createElement(Ke.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(Ke.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(Ke.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(Ke.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(je.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(je.ZP,{type:"ghost",onClick:Dn},"\u53D6\u6D88")))},Ue=Se(71411),Me=Se(11081),Re=Se.n(Me),lt=(0,ce.forwardRef)(({use3d:pn,width:Dn,height:Rn,callback:Un,showSaveButton:Mr},an)=>{const Ie=(0,ce.useRef)(),Ze=(0,ce.useRef)(),[qe,st]=(0,ce.useState)(!1),mt=(0,ce.useRef)({id:Ie,appName:"graphing",width:Dn||1e3,height:Rn||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{Ze.current=new(Re())(mt.current,!0),window.onload=function(){Ze.current.inject("applet_container")}},[]);const Bt=()=>{var kt=window.ggbApplet.getPNGBase64(1,!0,72);return Un&&Un(kt),kt};return(0,ce.useEffect)(()=>{mt.current.appName=qe?"3D":"graphing",Ze.current.inject("applet_container")},[qe]),(0,ce.useEffect)(()=>{st(pn)},[pn]),(0,ce.useImperativeHandle)(an,()=>({getImgData:Bt})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:Ie}),ce.createElement(pt.Z,{align:"middle"},ce.createElement(xt.Z,{flex:1},ce.createElement(Ue.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:qe,onChange:kt=>st(kt)})),ce.createElement(xt.Z,null,ce.createElement(je.ZP,{size:"large",onClick:Bt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Pt=Se(88615);const Ct="link",vt="upload-image",Ot="add-flowchart",Zt="draw-image",Ut="add-flowchart",gt="code-block",Qt="add-table",Lt="------------",qt={default:Lt,left:`:${Lt}`,center:`:${Lt}:`,right:`${Lt}:`};var un=Se(17904);function Sn(){}let Jt=0;const Ln=1e4,Zn="\u2581",Gn="@\u2581\u2581@",Jn="@\u2581@",hr=`
**\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`,ur=["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 jn(pn){return/^\d+$/.test(pn)?`${pn}px`:pn}const rr=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Kn={[rr+"-B"]:"bold",[rr+"-I"]:"italic"},In={[Ct]:"\u6DFB\u52A0\u94FE\u63A5",[gt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[vt]:"\u6DFB\u52A0\u56FE\u7247",[Zt]:"\u6DFB\u52A0\u753B\u56FE",[Ot]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Qt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var gn=({defaultValue:pn="",onChange:Dn,width:Rn="100%",height:Un=400,miniToolbar:Mr=!1,isFocus:an=!1,watch:Ie,insertTemp:Ze,mode:qe="markdown",id:st="markdown-editor-id",showResizeBar:mt=!1,noStorage:Bt=!1,showNullButton:kt=!1,showNullProgramButton:Nt=!1,hidetoolBar:nn=!1,fullScreen:An=!1,onBlur:Vn,onCMBeforeChange:At,onFullScreen:wt,className:dn="",disablePaste:Gt=!1,disabled:Et=!1,disabledFill:Ht=!1,placeholder:on="",values:sn="",extraUse:yn})=>{const[Wt,Cn]=(0,ce.useState)(null),[Vt,Pn]=(0,ce.useState)(pn),[bn,zn]=(0,ce.useState)(Ie),[Bn,er]=(0,ce.useState)(An),[cr,pr]=(0,ce.useState)(""),[Nr,Br]=(0,ce.useState)(0),[ei,xr]=(0,ce.useState)(Un),[Tr,Pr]=(0,ce.useState)(!1),[Xr,hi]=(0,ce.useState)(0),[bi,Si]=(0,ce.useState)(0),Kr=(0,ce.useRef)(),Ti=(0,ce.useRef)(),Ei=(0,ce.useRef)(),tr=(0,ce.useRef)(),br=(0,ce.useRef)(),kr=(0,ce.useRef)();(0,ce.useEffect)(()=>{const zt=window.scrollY||window.pageYOffset;Pn(sn),Wt==null||Wt.setValue(sn),window.scrollTo(0,zt)},[sn]),(0,ce.useEffect)(()=>{wt==null||wt(Bn)},[Bn]),(0,ce.useEffect)(()=>{if(Kr.current){let zt=function(Xt,cn){var Fn;if(Gt){cn.preventDefault();return}const Wn=cn.clipboardData;if(Wn){const nr=Wn.types.toString(),ar=Wn.items;if(nr==="Files"||Wn.types.indexOf("Files")>-1){if(cn.preventDefault(),qe=="stex")return;try{let $n=ar[1];((Fn=ar[0])==null?void 0:Fn.kind)==="file"&&($n=ar[0]);const mr=$n.getAsFile(),dr=mr.name.split(".").pop();(0,nt.I)(mr,jr=>{var qr,$r,Gr;jr.id?((qr=mr==null?void 0:mr.type)==null?void 0:qr.indexOf("image"))>-1?jt.replaceSelection(`<img width="100%" src="/api/attachments/${jr.id}?type=${jr.content_type})" alt="" />`):(($r=mr==null?void 0:mr.type)==null?void 0:$r.indexOf("video"))>-1?jt.replaceSelection(`<video width="100%" controls src="/api/attachments/${jr.id}"></video>`):((Gr=mr==null?void 0:mr.type)==null?void 0:Gr.indexOf("pdf"))>-1?jt.replaceSelection(`<a href="/api/attachments/${jr.id}?type=${mr.type}&disposition=inline" target="_blank">${mr.name}</a>`):ur.includes(dr)?jt.replaceSelection(`<a href="/api/attachments/${jr.id}?type=office&disposition=inline" target="_blank">${mr.name}</a>`):jt.replaceSelection(`[${mr.name}](/api/attachments/${jr.id}?type=${jr.content_type})`):(jr==null?void 0:jr.status)===401&&(document.location.href="/user/login")})}catch($n){yt.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const jt=Ce().fromTextArea(Kr.current,{mode:qe,lineNumbers:!Mr,lineWrapping:!0,value:pn,autoCloseTags:!0,autoCloseBrackets:!0});return jt.on("keyup",function(Xt,cn){cn.keyCode===8&&(Xt.getValue()==""?jt.setOption("placeholder",on):jt.setOption("placeholder",null))}),jt.on("keydown",function(Xt,cn){if(cn.keyCode===8){var Fn=ni(Xt);Fn&&cn.preventDefault()}}),an&&jt.focus(),jt.on("paste",zt),Et&&jt.on("beforeChange",function(Xt,cn){(cn.origin==="paste"||cn.origin==="+input")&&cn.cancel()}),Cn(jt),()=>{jt.off("paste",zt)}}},[]);const ti=(0,ce.useCallback)(()=>{if(Ti.current)try{}catch(zt){console.log(zt,"---- to set md editor body height")}},[ei,Ti,Bn]);(0,ce.useEffect)(()=>{function zt(){let jt=new ue.Z(Xt=>{for(let cn of Xt)(cn.target.offsetHeight>0||cn.target.offsetWidth>0)&&(ti(),Wt.setSize("100%","100%"),Wt.refresh())});return jt.observe(Kr.current.parentElement),jt}if(Wt){const jt=zt();return()=>{var Xt,cn;(Xt=Kr.current)!=null&&Xt.parentElement&&jt.unobserve((cn=Kr.current)==null?void 0:cn.parentElement)}}},[Wt,ti]),(0,ce.useEffect)(()=>{if(Wt){let zt=[];for(const[jt,Xt]of Object.entries(Kn)){let cn={[jt]:()=>{wi(Xt)}};zt.push(cn),Wt.addKeyMap(cn)}return()=>{for(let jt of zt)Wt.removeKeyMap(jt)}}},[Wt]),(0,ce.useEffect)(()=>{An!==Bn&&er(An)},[An]),(0,un.Z)(()=>{if(!Bt&&Nr>0){let zt=new Date().getTime(),jt=window.sessionStorage.getItem(st);zt>=Nr+Ln&&(!jt||jt!==Vt)&&(window.sessionStorage.setItem(st,Vt),Pr(!0))}},Ln),(0,ce.useEffect)(()=>{zn(Ie)},[Wt,Ie]),(0,ce.useEffect)(()=>{Wt&&an&&Wt.focus()},[Wt,an]),(0,ce.useEffect)(()=>{if(bn&&Wt){let zt=function(Xt){let cn=Xt.target;if(tr.current){let Fn=cn.scrollTop/cn.scrollHeight;tr.current.scrollTop=tr.current.scrollHeight*Fn}};const jt=Wt.getScrollerElement();return jt.addEventListener("scroll",zt),()=>{jt.removeEventListener("scroll",zt)}}},[Wt,bn]),(0,ce.useEffect)(()=>{if(Wt&&At){let zt=function(jt,Xt){At(jt,Xt)};return Wt.on("beforeChange",zt),()=>{Wt.off("beforeChange",zt)}}},[Wt,At]),(0,ce.useEffect)(()=>{if(Wt&&Vn){let zt=function(){Vn(Wt.getValue())};return Wt.on("blur",zt),()=>{Wt.off("blur",zt)}}},[Wt,Vn]);function ni(zt,jt){var Xt=zt.getDoc(),cn=Xt.getCursor(),Fn=Xt.getLine(cn.line),Wn=Fn.charAt(cn.ch-1),nr=Fn.lastIndexOf("@\u2581@",cn.ch),ar=Fn.lastIndexOf("@\u2581\u2581@",cn.ch),$n=nr>ar?nr:ar,mr=nr>ar?3:4;if(Gn.indexOf(Wn)===-1)return null;if(console.log("change1:",jt,zt,Fn,cn,$n,nr,ar,Wn),$n>=0&&cn.ch-$n<5){var dr=$n+mr;return Xt.replaceRange("",{line:cn.line,ch:$n},{line:cn.line,ch:dr}),{line:cn.line,ch:dr}}return null}(0,ce.useEffect)(()=>{if(Wt){let zt=function(jt,Xt){const cn=jt.getValue();Pn(cn),Br(new Date().getTime()),jt.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Dn&&(Nt?Dn(cn,On(cn)):Dn(cn))};return Wt.on("change",zt),()=>{Wt.off("change",zt)}}},[Wt,Dn]),(0,ce.useEffect)(()=>{if(Wt)if(pn==null)Wt.setValue(""),Pn("");else{const zt=window.scrollY||window.pageYOffset;pn!==Wt.getValue()&&(Wt.setValue(pn),Pn(pn),Wt.setCursor(Et?1:Wt.lineCount(),0),window.scrollTo(0,zt))}},[Wt,pn]);const wi=(0,ce.useCallback)(zt=>{const jt=Wt.getCursor(),Xt=Wt.getSelection();let cn=Xt.split(`
`);switch(zt){case"bold":return Wt.replaceSelection("**"+Xt+"**"),Xt===""&&Wt.setCursor(jt.line,jt.ch+2),Wt.focus();case"italic":return Wt.replaceSelection("*"+Xt+"*"),Xt===""&&Wt.setCursor(jt.line,jt.ch+1),Wt.focus();case"code":return Wt.replaceSelection("`"+Xt+"`"),Xt===""&&Wt.setCursor(jt.line,jt.ch+1),Wt.focus();case"inline-latex":return pr("inline-latex"),Wt.focus();case"latex":return Wt.replaceSelection("```latex\n"+Xt+"\n```"),Wt.setCursor(jt.line+1,Xt.length+1),Wt.focus();case"line-break":return Wt.replaceSelection(`<br/>
`),Wt.focus();case"list-ul":return Xt===""?Wt.replaceSelection("- "+Xt):Wt.replaceSelection(cn.map(Fn=>Fn===""?"":`- ${Fn}`).join(`
`)),Wt.focus();case"list-ol":return Xt===""?Wt.replaceSelection("1. "+Xt):Wt.replaceSelection(cn.map((Fn,Wn)=>Fn===""?"":`${Wn+1}. ${Fn}`).join(`
`)),Wt.focus();case"add-null-ch":return Xt===""&&Wt.setCursor(jt.line,jt.ch),Wt.replaceSelection(Zn),Wt.focus();case"add-signal":return Xt===""&&Wt.setCursor(jt.line,jt.ch),Wt.replaceSelection(Jn),Wt.focus();case"add-multiple":return Xt===""&&Wt.setCursor(jt.line,jt.ch),Wt.replaceSelection(Gn),Wt.focus();case"inster-template-1":return Xt===""&&Wt.setCursor(jt.line,jt.ch),Wt.replaceSelection(hr),Wt.focus();case"eraser":return Wt.setValue(""),Wt.focus();case"trigger-watch":return zn(!bn),Wt.focus();case"trigger-full-screen":return er(!Bn),Wt.focus();case Ct:pr(Ct);return;case gt:pr(gt);return;case vt:pr(vt);return;case Zt:pr(Zt);return;case"maths-latex":pr("maths-latex");return;case Ot:br.current="",sessionStorage.removeItem("file_id"),pr(Ot);return;case Qt:pr(Qt);return;default:throw new Error}},[Wt,bn,Bn]),Ri=(0,ce.useCallback)((zt,jt)=>{var Xt,cn,Fn,Wn,nr,ar;switch(zt!=null&&zt.disabledClose||pr(""),cr){case Ct:const{title:qr,link:$r}=zt;return Wt.replaceSelection(`[${qr}](${$r})`),Wt.focus();case gt:const{language:Gr,content:ri}=zt;return Wt.replaceSelection(["```"+Gr,ri,"```"].join(`
`)),Wt.focus();case"maths-latex":for(var $n=atob(zt),mr=new Uint8Array($n.length),dr=0;dr<$n.length;dr++)mr[dr]=$n.charCodeAt(dr);var jr=new Blob([mr],{type:"image/png"});(0,nt.I)(jr,Or=>{Or.id?Wt.replaceSelection(`![,](/api/attachments/${Or.id}?type=${Or.content_type})`):(Or==null?void 0:Or.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":Wt.replaceSelection("`$$"+zt+"$$`");break;case Ut:const{src:Jr,alt:Wr,id:Vr}=zt;if(!Vr)return;Wt.getValue().indexOf(Jr)===-1?Wt.replaceSelection(`<center><img id="${Vr}" width="80%" src="${Jr}" class="draw-flowchart" alt="${Wr||""}" /></center>`):document.getElementById(Vr).src=Be.Z.API_SERVER+Jr+"?t="+Date.now();break;case vt:case Zt:const ir=jt,or=(Fn=(cn=(Xt=ir==null?void 0:ir.name)==null?void 0:Xt.split("."))==null?void 0:cn.pop)==null?void 0:Fn.call(cn);return((Wn=ir==null?void 0:ir.type)==null?void 0:Wn.indexOf("image"))>-1||!(ir!=null&&ir.type)?ir!=null&&ir.align||ir!=null&&ir.width?Wt.replaceSelection(`<p style="text-align:${ir.align||"initial"}"><img width="${ir.width?ir.width+"%":"initial"}" src="${Jr}" alt="${Wr||""}" /></p>`):Wt.replaceSelection(`<img width="100%" src="${Jr}" alt="${Wr||""}" />`):((nr=ir==null?void 0:ir.type)==null?void 0:nr.indexOf("video"))>-1?Wt.replaceSelection(`<video width="100%" controls src="${Jr}"></video>`):((ar=ir==null?void 0:ir.type)==null?void 0:ar.indexOf("pdf"))>-1?Wt.replaceSelection(`<a href="${Jr}?type=${ir.type}&disposition=inline" target="_blank">${ir.name}</a>`):ur.includes(or)?Wt.replaceSelection(`<a href="${Jr}?type=office&disposition=inline" target="_blank">${ir.name}</a>`):Wt.replaceSelection(`[${ir.name}](${Jr})`),Wt.focus();case Qt:const{row:fr,col:Ar,align:Yr}=zt;let Zr=`
`;for(let Or=0;Or<fr;Or++){let di=[],lo=[];for(let uo=0;uo<Ar;uo++)Or===1&&lo.push(qt[Yr]),di.push(" ");Or===1&&(Zr+=`| ${lo.join(" | ")} |
`),Zr+=`| ${di.join(Ar===1?"":" | ")} |
`}return Wt.replaceSelection(Zr+`
`),Wt.focus();default:throw new Error}},[Wt,cr]),Tt=(0,ce.useMemo)(()=>{switch(cr){case Ct:return ce.createElement(Ve,{callback:Ri,onCancel:en});case gt:return ce.createElement($e.Z,{callback:Ri,onCancel:en});case vt:return ce.createElement(nt.Z,{callback:Ri,onCancel:en});case Ot:return ce.createElement(be,{editImgId:br.current,callback:Ri,onCancel:en});case Qt:return ce.createElement(Le,{callback:Ri,onCancel:en});case"maths-latex":return ce.createElement(lt,{showSaveButton:!0,callback:Ri});case"inline-latex":return ce.createElement(Pt.Z,{showSaveButton:!0,callback:Ri});default:return null}},[cr]);function en(){pr("")}(0,ce.useEffect)(()=>{if(Ei.current){let zt=function(nr){Fn=!0,Wn=nr.pageY},jt=function(){Fn=!1},Xt=function(nr){if(Fn){let ar=nr.pageY-Wn;ar<0&&(ar=0),ar>300&&(ar=300);let $n=Un+ar+"px";xr($n)}},cn=Ei.current,Fn=!1,Wn=0;return cn.addEventListener("mousedown",zt),document.addEventListener("mousemove",Xt),document.addEventListener("mouseup",jt),()=>{cn.removeEventListener("mousedown",zt),document.removeEventListener("mousemove",Xt),document.removeEventListener("mouseup",jt)}}},[Wt,Ei]),(0,ce.useEffect)(()=>{xr(Un)},[Un]);const Yt=jn(Rn),rn=jn(ei),hn={width:Yt,height:rn},vn=(0,ce.useMemo)(()=>{if(Nr){let zt=new Date(Nr),jt=zt.getHours(),Xt=zt.getMinutes(),cn=zt.getSeconds();return jt=jt<10?"0"+jt:jt,Xt=Xt<10?"0"+Xt:Xt,cn=cn<10?"0"+cn:cn,`${jt}:${Xt}:${cn}`}return 0},[Nr]),On=zt=>{const jt=[];if(Nt){let Xt=-1;zt=zt.replace(/(@▁▁@|@▁@)/g,function(cn,Fn,Wn){jt.push({multiLine:cn!==Jn})})}return jt};function En(){window.sessionStorage.removeItem(st),Pr(!1),Br(0)}function _n(){Pr(!1),Br(0),Wt.setValue(window.sessionStorage.getItem(st))}(0,ce.useEffect)(()=>{In[cr]&&cr!==Zt&&cr!==Ot&&setTimeout(()=>{const zt=document.getElementsByClassName("markdown-popup-form")[0],jt=window.innerWidth/2-zt.offsetWidth/2,Xt=window.innerHeight/2-zt.offsetHeight/2;hi(jt),Si(Xt)},0)},[cr]);const Kt=zt=>{zt.preventDefault();const jt=zt.clientX-Xr,Xt=zt.clientY-bi;document.body.onmousemove=cn=>{let Fn=cn.clientX-jt,Wn=cn.clientY-Xt;const nr=document.getElementsByClassName("markdown-popup-form")[0],ar=window.innerWidth-nr.offsetWidth,$n=window.innerHeight-nr.offsetHeight;Fn=Math.max(0,Math.min(Fn,ar)),Wn=Math.max(0,Math.min(Wn,$n)),fn(cn.clientX,cn.clientY,jt,Xt)&&(hi(Fn),Si(Wn))},document.body.onmouseup=function(){document.body.onmousemove=null}},fn=(zt,jt,Xt,cn)=>{const Fn=document.body.clientHeight,Wn=document.body.clientWidth;return zt<20&&Xt>zt||zt>Wn-20&&Xt<zt||jt<20&&cn>jt||jt>Fn-20&&cn<jt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:Ti},ce.createElement("div",{className:`markdown-editor-container ${dn} ${bn?"on-preview":""} ${Mr?"mini":""} ${Bn?"full-screen":""}`,style:hn},ce.createElement(ke,{insertTemp:Ze,watch:bn,fullScreen:Bn,showNullButton:kt,showNullProgramButton:Nt,onActionCallback:wi,hidetoolBar:nn,extraUse:yn}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:Kr,placeholder:on})),bn?ce.createElement("div",{ref:tr,className:"preview-container"},qe==="stex"&&ce.createElement(z,{value:Vt}),qe!=="stex"&&ce.createElement(b.Z,{edit:!0,disabledFill:Ht,showProgramFill:Nt,value:Vt,openEditor:zt=>{var jt;br.current=zt,(jt=kr.current)==null||jt.setHeight("100vh"),setTimeout(()=>{pr("add-flowchart")},150)}})):null))),mt?ce.createElement("a",{ref:Ei,className:"editor-resize"}):null,cr===Zt&&ce.createElement(dt,{callback:Ri,onCancel:en}),cr===Ot&&ce.createElement(be,{ref:kr,editImgId:br.current,callback:Ri,onCancel:en}),ce.createElement(Te.Z,null,In[cr]&&cr!==Zt&&cr!==Ot?ce.createElement(et.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Xr,top:bi},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:Kt},In[cr]),open:!0,onCancel:en,footer:null,destroyOnClose:!0,width:cr===Ot?"1200px":null,height:cr===Ot?"80vh":null,className:"markdown-popup-form"},Tt):null))}},45596:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return pe},I:function(){return Te}});var ce=Se(28284),ie=Se(6767),Ce=Se(37568),ue=Se(77736),se=Se(71051),te=Se(47889),le=Se(99571),ee=Se(67303),ne=Se(59301),E=Se(59301),b=Object.defineProperty,z=Object.defineProperties,x=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ve=(Ee,Oe,je)=>Oe in Ee?b(Ee,Oe,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ee[Oe]=je,ye=(Ee,Oe)=>{for(var je in Oe||(Oe={}))ae.call(Oe,je)&&ve(Ee,je,Oe[je]);if(re)for(var je of re(Oe))oe.call(Oe,je)&&ve(Ee,je,Oe[je]);return Ee},me=(Ee,Oe)=>z(Ee,x(Oe));const{useForm:ge}=ce.default,_e={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}};var pe=({callback:Ee,onCancel:Oe})=>{const[je]=ge();let Pe=(0,ne.useRef)();function Qe(We){Pe.current.width=je.getFieldValue("width"),Pe.current.align=je.getFieldValue("align"),Ee(We,Pe.current)}function Xe(We,rt){if(We.status===-1){ie.ZP.error(We.message);return}je.setFieldsValue({src:`/api/attachments/${We.id}`,type:rt.type})}function ot(We){let rt=We.target.files[0];Pe.current=rt,Te(rt,Xe)}return E.createElement(ce.default,me(ye({form:je},he),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},E.createElement("div",{className:"flex-container"},E.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},E.createElement(Ce.default,{style:_e})),E.createElement(ke,{onFileChange:ot}))),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},E.createElement(Ce.default,{style:{width:264}})),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},E.createElement(ue.Z,null,E.createElement(ce.default.Item,{name:"width",style:{margin:0}},E.createElement(se.Z,{style:{width:264}})),E.createElement("span",{className:"ml8"},"%"))),E.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},E.createElement(te.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(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},E.createElement(le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(le.ZP,{type:"default",onClick:Oe},"\u53D6\u6D88"))))};function ke({onFileChange:Ee}){return E.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",E.createElement("input",{type:"file",onChange:Ee}))}function Te(Ee,Oe){if(!Ee)throw new String("\u6CA1\u6709\u6587\u4EF6");let je=new FormData;je.append("editormd-image-file",Ee),je.append("file_param_name","editormd-image-file"),je.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(Qe){Oe(JSON.parse(Qe.target.responseText),Ee)},!1),Pe.addEventListener("error",function(Qe){console.error(Qe)},!1),Pe.open("POST",`${ee.KI}/api/attachments.json`),Pe.send(je)}},75790:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return Ce}});var ce=Se(59301),ie=Se(4676);class Ce extends ce.Component{constructor(se){super(se);const te=window.document;this.node=te.createElement("div"),te.body.appendChild(this.node)}render(){const{children:se}=this.props;return(0,ie.createPortal)(se,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function($t,Dt,Se){"use strict";Se.d(Dt,{SV:function(){return Mt},ZP:function(){return dt}});var ce=Se(59301),ie=Se(76374);const Ce={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"]},ue={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(`
`)}]},te={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(`
`)}]},le={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=Se(53184),ne=Se.n(ee),E=(xt,yt,bt)=>new Promise((He,Ae)=>{var be=Ne=>{try{Ke(bt.next(Ne))}catch(De){Ae(De)}},Be=Ne=>{try{Ke(bt.throw(Ne))}catch(De){Ae(De)}},Ke=Ne=>Ne.done?He(Ne.value):Promise.resolve(Ne.value).then(be,Be);Ke((bt=bt.apply(xt,yt)).next())});const b={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=(xt,yt,bt,He)=>{const Ae=yt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:bt.lineNumber,endColumn:bt.column});return Array.from(new Set(Ae.match(/\b\w{2,}\b/g)||[])).map(Be=>({label:Be,kind:xt.languages.CompletionItemKind.Text,insertText:Be,range:He}))},x=(xt,yt,bt,He)=>{xt.languages.registerCompletionItemProvider(yt,{provideCompletionItems(Ae,be){const Be=Ae.getWordUntilPosition(be),Ke={startLineNumber:be.lineNumber,endLineNumber:be.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ne=Ae.getLineContent(be.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...z(xt,Ae,be,Ke),...bt.map(we=>({label:we,kind:xt.languages.CompletionItemKind.Keyword,documentation:we,insertText:we,insertTextRules:xt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...He.map(we=>({label:we.label,kind:xt.languages.CompletionItemKind.Snippet,documentation:we.content,insertText:Ne.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:xt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}})};var re=xt=>{b.languages.forEach(yt=>{xt.languages.registerDocumentFormattingEditProvider(yt,{provideDocumentFormattingEdits(bt){return E(this,null,function*(){const He=ne()(bt.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:bt.getFullModelRange(),text:He}]})}})}),x(xt,"java",ue.keywords,ue.quickKey),x(xt,"cpp",se.keywords,se.quickKey),x(xt,"c",Ce.keywords,[]),x(xt,"python",te.keywords,te.quickKey),x(xt,"scala",le.keywords,le.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,ve=(xt,yt,bt)=>yt in xt?oe(xt,yt,{enumerable:!0,configurable:!0,writable:!0,value:bt}):xt[yt]=bt,ye=(xt,yt,bt)=>ve(xt,typeof yt!="symbol"?yt+"":yt,bt);const me=class hu{constructor(yt,bt,He){this.placeholder=yt,this.editor=bt,this.monaco=He,bt.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)}};ye(me,"ID","editor.widget.placeholderHint");var _e=me,he=Se(96236),pe=Se(6767),ke=Se(25399),Te=Se(89392),Ee=Se(33796),Oe=Se(56102),je=Object.defineProperty,Pe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,rt=(xt,yt,bt)=>yt in xt?je(xt,yt,{enumerable:!0,configurable:!0,writable:!0,value:bt}):xt[yt]=bt,Ye=(xt,yt)=>{for(var bt in yt||(yt={}))ot.call(yt,bt)&&rt(xt,bt,yt[bt]);if(Xe)for(var bt of Xe(yt))We.call(yt,bt)&&rt(xt,bt,yt[bt]);return xt},ut=(xt,yt)=>Pe(xt,Qe(yt)),Ge=(xt,yt)=>{var bt={};for(var He in xt)ot.call(xt,He)&&yt.indexOf(He)<0&&(bt[He]=xt[He]);if(xt!=null&&Xe)for(var He of Xe(xt))yt.indexOf(He)<0&&We.call(xt,He)&&(bt[He]=xt[He]);return bt},ze=(xt,yt,bt)=>new Promise((He,Ae)=>{var be=Ne=>{try{Ke(bt.next(Ne))}catch(De){Ae(De)}},Be=Ne=>{try{Ke(bt.throw(Ne))}catch(De){Ae(De)}},Ke=Ne=>Ne.done?He(Ne.value):Promise.resolve(Ne.value).then(be,Be);Ke((bt=bt.apply(xt,yt)).next())});function Ve(xt){return/^\d+$/.test(xt)?`${xt}px`:xt}function $e(){}let nt=!1;const et={"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(xt=[]){let yt=xt;if(Array.isArray(xt)){for(let bt=0;bt<xt.length;bt++){let He=et[xt[bt]];if(He)return He}return yt[0]}return et[yt]||yt}let ct=null;const Rt=()=>ze(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(xt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",xt)}});var dt=xt=>{var yt=xt,{width:bt="100%",height:He="100%",value:Ae,language:be="javascript",style:Be={},options:Ke={},overrideServices:Ne={},theme:De="vs-dark",onEditBlur:we,isCopy:Le=!1,onSave:Ue,autoHeight:Me=!1,forbidCopy:Re=!1,onChange:tt=$e,editorDidMount:lt=$e,onFocus:Pt=$e,onBreakPoint:Ct=$e,breakPointValue:vt=[],filename:Ot="educoder.txt",errorLine:Zt,errorContent:Ut="",highlightLine:gt,openBreakPoint:Qt=!1,placeholder:Lt="",showMiniMap:qt=!0}=yt,un=Ge(yt,["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 Sn=(0,ce.useRef)(),Jt=(0,ce.useRef)({}),Ln=(0,ce.useRef)(),Zn=(0,ce.useRef)(),Gn=(0,ce.useRef)([]),Jn=(0,ce.useRef)(!1),hr=(0,ce.useRef)(),ur=(0,ce.useRef)(),jn=(0,ce.useRef)(!1),[Nn,rr]=(0,ce.useState)(!1);function Kn(){let kt;return Sn.current&&(kt=new ie.Z(Nt=>{for(let nn of Nt)(nn.target.offsetHeight>0||nn.target.offsetWidth>0)&&Jt.current.instance.layout()}),kt.observe(Sn.current)),kt}function In(){pe.ZP.warning({content:decodeURIComponent(ae),key:"monaco-editor-tip"})}const gn=()=>{let kt=Jt.current.instance;if(Ae!=null&&kt&&Nn){const Nt=kt.getModel();Nt&&Ae!==Nt.getValue()&&(nt=!0,Nt.setValue(Ae),kt.layout(),nt=!1)}};(0,ce.useEffect)(()=>{const kt=Ee.Z.subscribe("formatDocument",Nt=>{var nn;let An=Jt.current.instance;(nn=An==null?void 0:An.getAction)==null||nn.call(An,"editor.action.formatDocument").run()});return window.updateMonacoValue=Nt=>{tt(Nt)},kt},[]),(0,ce.useEffect)(()=>{var kt;let Nt=Jt.current.instance;Zn.current&&clearTimeout(Zn.current),Zn.current=setTimeout(()=>{gn()},500),Ae&&(Ae!=null&&Ae.length)&&((kt=Nt==null?void 0:Nt.updateOptions)==null||kt.call(Nt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,Nn,Jt.current]),(0,ce.useEffect)(()=>{if(Zt&&Jt.current&&Jt.current.instance){let Nt=Jt.current.instance;Nt.changeViewZones(function(nn){var An=document.createElement("div");An.style.padding="10px 20px",An.style.width="calc(100% - 20px)",An.className="my-error-line-wrp",An.innerHTML=Ut,nn.addZone({afterLineNumber:Zt||11,heightInLines:3,domNode:An})});var kt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Nt.addOverlayWidget(kt),Nt.revealPositionInCenter({lineNumber:20,column:1})}},[Zt,Jt.current,Nn]);const pn=(kt="",Nt)=>{if(!kt||kt.trim()==="")return!0;const An=Jt.current.instance.getModel().getLineTokens(Nt);let Vn=!1;for(let At=0;At<2;At++)An.getStandardTokenType(At)===1&&(Vn=!0);return Vn};(0,ce.useEffect)(()=>{var kt;const Nt=(kt=Jt.current)==null?void 0:kt.instance;if(Nt&&Nn&&Re){const nn=Nt.onDidBlurEditorWidget(()=>{jn.current=!1}),An=Nt.onDidFocusEditorText(()=>{jn.current=!0});return()=>{nn.dispose(),An.dispose()}}},[Jt.current,Nn,Re]),(0,ce.useEffect)(()=>{var kt;if((kt=Jt.current)!=null&&kt.instance&&Nn&&Qt){let Nt=Jt.current.instance,nn=Nt.getModel();if(!nn)return;(()=>{var Wt;let Cn=[],Vt=[];const Pn=nn.getAllDecorations();for(let zn of Pn)zn.options.className==="highlighted-line"&&(Cn.push((Wt=zn==null?void 0:zn.range)==null?void 0:Wt.startLineNumber),Vt.push(zn==null?void 0:zn.id));if(gt===Cn[0])return;nn.deltaDecorations(Vt,[]);const bn=nn.getLineCount();gt&&gt<=bn&&(Nt.deltaDecorations([],[{range:new ct.Range(gt,1,gt,nn.getLineMaxColumn(gt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Nt.revealLineInCenter(gt))})();const Vn=(Wt=!1)=>{var Cn;let Vt=[],Pn=[];const bn=nn.getAllDecorations();for(let zn of bn)zn.options.linesDecorationsClassName==="breakpoints-select"&&(Vt.push((Cn=zn==null?void 0:zn.range)==null?void 0:Cn.startLineNumber),Pn.push(zn==null?void 0:zn.id));if(Wt)return{lines:Vt,ids:Pn};Ct(Vt)},At=Wt=>ze(void 0,null,function*(){let Cn={range:new ct.Range(Wt,1,Wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield nn.deltaDecorations([],[Cn]),Vn()}),wt=Wt=>ze(void 0,null,function*(){let Cn=[];const Vt=Nt.getLineDecorations(Wt);for(let Pn of Vt)Pn.options.linesDecorationsClassName==="breakpoints-select"&&Cn.push(Pn.id);yield nn.deltaDecorations(Cn,[]),Vn()}),dn=Wt=>{let Cn=Nt.getLineDecorations(Wt);for(let Vt of Cn)if(Vt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Te.isEqual)(vt,Vn(!0).lines)){nn.deltaDecorations(Vn(!0).ids,[]);const Wt=vt.map(Cn=>({range:new ct.Range(Cn,1,Cn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));nn.deltaDecorations([],Wt)}const Gt=Nt.onDidChangeModelContent(Wt=>{let Cn=Nt.getPosition();if(Cn){let Vt=Cn.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{pn(nn.getLineContent(Vt),Vt)?wt(Vt):dn(Vt)?(wt(Vt),At(Vt)):Vn()},100)}}),Et=Nt.onMouseDown(Wt=>{var Cn,Vt,Pn;if(Wt.target.detail&&((Pn=(Vt=(Cn=Wt.target)==null?void 0:Cn.element)==null?void 0:Vt.className)!=null&&Pn.includes("line-numbers"))){let bn=Wt.target.position.lineNumber;if(pn(nn.getLineContent(bn),bn))return;dn(bn)?wt(bn):At(bn)}}),Ht=Wt=>{let Cn={range:new ct.Range(Wt,1,Wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Gn.current=Nt.deltaDecorations(Gn.current,[Cn])},on=()=>{Gn.current=Nt.deltaDecorations(Gn.current,[])},sn=Nt.onMouseMove(Wt=>{var Cn,Vt,Pn;if(on(),Wt.target.detail&&((Pn=(Vt=(Cn=Wt.target)==null?void 0:Cn.element)==null?void 0:Vt.className)!=null&&Pn.includes("line-numbers"))){let bn=Wt.target.position.lineNumber;if(pn(nn.getLineContent(bn),bn))return;Ht(bn)}}),yn=Nt.onMouseLeave(()=>{on()});return()=>{Gt.dispose(),Et.dispose(),sn.dispose(),yn.dispose()}}},[Jt.current,Nn,vt,gt,Qt,be]),(0,ce.useEffect)(()=>{var kt;(kt=Jt.current)!=null&&kt.instance&&Qt&&Jt.current.instance.setPosition({lineNumber:0,column:0})},[gt]);function Dn(){let kt=Jt.current.instance;if(kt){const Nt=kt.getSelection(),nn=Jt.current.pastePos||{},An=new ct.Range(nn.startLineNumber||Nt.endLineNumber,nn.startColumn||Nt.endColumn,nn.endLineNumber||Nt.endLineNumber,nn.endColumn||Nt.endColumn);setTimeout(()=>{kt.executeEdits("",[{range:An,text:""}])},300)}}function Rn(kt){(window.navigator.platform.match("Mac")?kt.metaKey:kt.ctrlKey)&&kt.keyCode==83&&(kt.preventDefault(),Ue())}const Un=()=>{if(Me&&Jt.current.instance){const kt=Jt.current.instance.getContentHeight();mt(kt<He?He:kt)}else mt(He)};function Mr(kt){var Nt=document.createEvent("MouseEvents");Nt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),kt.dispatchEvent(Nt)}const an=kt=>{if(!jn.current)return;const{keyCode:Nt,ctrlKey:nn,metaKey:An,target:Vn,type:At}=kt;return(At==="paste"||(Nt===67||Nt===86)&&(An||nn))&&Vn.nodeName==="TEXTAREA"&&(In(),kt.preventDefault()),!1};function Ie(kt,Nt){var nn=window.URL||window.webkitURL||window,An=new Blob([Nt]),Vn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Vn.href=nn.createObjectURL(An),Vn.download=kt,Mr(Vn)}(0,ce.useEffect)(()=>{Un()},[Un]),(0,ce.useEffect)(()=>{Sn.current&&!Nn&&Promise.all([Se.e(8909),Se.e(5028)]).then(Se.bind(Se,71448)).then(kt=>{try{ct=kt,Jt.current.instance=ct.editor.create(Sn.current,{value:Ae,language:pt(be),theme:De,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:qt||!1}},Ne);const Nt=Jt.current.instance;let Vn=[...he.BH._menuItems].find(Gt=>Gt[0]._debugName=="EditorContext")[1],At=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],wt=(Gt,Et)=>{var Ht,on;let sn=Gt._first;do Et.includes((on=(Ht=sn.element)==null?void 0:Ht.command)==null?void 0:on.id)&&Gt._remove(sn);while(sn=sn.next)};if(lt(Nt,ct),setTimeout(()=>{Un(),Jt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ie(Ot||"educoder.txt",Nt.getValue())}})},500),Jt.current.subscription=Nt.onDidChangeModelContent(Gt=>{Jn.current?clearTimeout(hr.current):(Un(),tt(Nt.getValue(),Gt)),hr.current=setTimeout(()=>{Jn.current=!1},500)}),window.Monaco||re(ct,pt(be)),Re&&(wt(Vn,At),Sn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",an),window.removeEventListener("paste",an),window.addEventListener("keydown",an),window.addEventListener("paste",an)),window.Monaco=ct,we&&Nt.onDidBlurEditorWidget(()=>{we(Nt.getValue())}),Pt&&Nt.onDidFocusEditorText(()=>{Re&&Rt(),Pt(Nt.getValue())}),Re){Rt();try{Nt.onDidPaste(Gt=>{const Et=Nt.getSelection(),Ht=Jt.current.pastePos||{},on=new ct.Range(Ht.startLineNumber||Et.endLineNumber,Ht.startColumn||Et.endColumn,Ht.endLineNumber||Et.endLineNumber,Ht.endColumn||Et.endColumn);Nt.executeEdits("",[{range:Gt.range,text:""}])})}catch(Gt){}}let dn=Kn();return Lt&&typeof Lt=="string"&&new _e(Lt,Nt,ct),rr(!0),()=>{const Gt=Jt.current.instance;Gt.dispose();const Et=Gt.getModel();Et&&Et.dispose(),Jt.current.subscription&&Jt.current.subscription.dispose(),dn.unobserve(Sn.current)}}catch(Nt){}})},[]),(0,ce.useEffect)(()=>{if(Jt.current.instance&&Nn)return document.addEventListener("keydown",Rn,!1),()=>{document.removeEventListener("keydown",Rn)}},[Ue,Nn]),(0,ce.useEffect)(()=>{let kt=Jt.current.instance;if(kt&&Nn){let Nt=pt(be);ct.editor.setModelLanguage(kt.getModel(),Nt)}},[be,Nn]),(0,ce.useEffect)(()=>{Jt.current.instance&&Nn&&ct.editor.setTheme(De)},[De,Nn]),(0,ce.useEffect)(()=>{let kt=Jt.current.instance;Ln.current=Ke,kt&&Nn&&(kt.updateOptions(Ye({},Ke)),setTimeout(()=>{kt.getModel().updateOptions(Ye({},Ke))},200))},[JSON.stringify(Ke),Nn]),(0,ce.useEffect)(()=>{let kt=Jt.current.instance;kt&&Nn&&kt.layout()},[bt,He,Nn]);const[Ze,qe]=(0,ce.useState)(Ve(bt)),[st,mt]=(0,ce.useState)(Ve(He)),Bt=ut(Ye({},Be),{width:Ze,height:st,position:"relative"});return ce.createElement("div",{className:"my-monaco-editor",ref:Sn,style:Bt},Le&&ce.createElement(Oe.CopyToClipboard,{text:Ae,onCopy:()=>pe.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement(ke.Z,{title:"\u590D\u5236\u4EE3\u7801"},ce.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ce.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Mt({width:xt="100%",height:yt="100%",original:bt,modified:He,language:Ae,options:be={}}){const Be=(0,ce.useRef)(),[Ke,Ne]=(0,ce.useState)(null);function De(Me){let Re;return Be.current&&(Re=new ie.Z(tt=>{for(let lt of tt)(lt.target.offsetHeight>0||lt.target.offsetWidth>0)&&Me.layout()}),Re.observe(Be.current)),Re}(0,ce.useEffect)(()=>(Be.current&&Promise.all([Se.e(8909),Se.e(9404)]).then(Se.bind(Se,2550)).then(Me=>{ct=Me;const Re=ct.editor.createDiffEditor(Be.current,ut(Ye({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},be),{wordWrap:!0}));Ne(Re);let tt=De(Re);return()=>{Re.dispose();const lt=Re.getModel();lt&&lt.dispose(),tt.unobserve(Be.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ce.useEffect)(()=>{Ke&&Ke.setModel({original:ct.editor.createModel(bt,Ae),modified:ct.editor.createModel(He,Ae)})},[bt,He,Ae,Ke]);const we=Ve(xt),Le=Ve(yt),Ue={width:we,height:Le};return ce.createElement("div",{className:"my-diff-editor",ref:Be,style:Ue})}},64536:function($t,Dt,Se){"use strict";var ce=Se(45298),ie=Se(82326),Ce=Se(71411),ue=Se(59301);const se=ie.default.Option;Dt.Z=({isTheoretical:te,onFontSizeChange:le,cmFontSize:ee,cmCodeMode:ne,autoFormat:E,onCodeModeChange:b,onTabToSpace:z,onAutoFormat:x,formatDocument:re,className:ae="",tabToSpace:oe,children:ve,code_editor:ye,challenge:me,shixun_environment_id:ge,shixun_environments:_e})=>{var he;const pe={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},ke=(he=_e==null?void 0:_e.find(Te=>Te.shixun_environment_id===ge))==null?void 0:he.program_language;return console.log("----",ke,_e,ge,ye),ue.createElement("div",{className:`tpi-code-setting ${ae}`},ue.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ue.createElement("section",null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ue.createElement(ie.default,{bordered:!1,size:"small",value:ne,onChange:b},ue.createElement(se,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ue.createElement(se,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!te&&ue.createElement(ue.Fragment,null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ue.createElement(ie.default,{bordered:!1,size:"small",value:ee,onChange:le},ue.createElement(se,{value:12},"12px"),ue.createElement(se,{value:14},"14px"),ue.createElement(se,{value:16},"16px"),ue.createElement(se,{value:18},"18px"),ue.createElement(se,{value:20},"20px"),ue.createElement(se,{value:22},"22px"))),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"Tab\u8F6C\u6362"),ue.createElement(Ce.Z,{checked:oe,onChange:z})),ue.createElement("div",{className:"file-item",onClick:re},ue.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!te&&ue.createElement(ue.Fragment,null,ue.createElement("h3",null,"\u5FEB\u6377\u952E"),ue.createElement("section",null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ue.createElement("span",null,"Ctrl + S")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ue.createElement("span",null,"F1 / Alt + F1")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ue.createElement("span",null,"Ctrl + ]/[")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ue.createElement("span",null,"Ctrl + Shift + \\")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ue.createElement("span",null,"Home")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ue.createElement("span",null,"End"))),ve),!te&&ue.createElement(ue.Fragment,null,ue.createElement("h3",null,"\u5FEB\u6377\u952E"),ue.createElement("section",null,ke&&ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),ue.createElement("span",null,ke)),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ue.createElement("span",null,pe[me==null?void 0:me.difficulty])),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ue.createElement("span",null,ye==null?void 0:ye.name)),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ue.createElement("span",null,ye!=null&&ye.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},17904:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ie}});var ce=Se(59301);function ie(Ce,ue){const se=(0,ce.useRef)();(0,ce.useEffect)(()=>{se.current=Ce}),(0,ce.useEffect)(()=>{function te(){se.current()}if(ue!==null){let le=setInterval(te,ue);return()=>clearInterval(le)}},[ue])}},40148:function($t,Dt,Se){"use strict";Se.d(Dt,{Im:function(){return Oe},ZP:function(){return We},gZ:function(){return Xe}});var ce=Se(59301),ie=Se(37568),Ce=Se(99571),ue=Se(84105),se=Se(87395),te=Se(49162),le=Se(24334),ee=Se(766),ne=Se(38394),E=Se(49661),b=Se(46685),z=Se(34376),x=Se(92310),re=Se.n(x),ae=Se(59301),oe=Object.defineProperty,ve=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,he=(rt,Ye,ut)=>Ye in rt?oe(rt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:ut}):rt[Ye]=ut,pe=(rt,Ye)=>{for(var ut in Ye||(Ye={}))ge.call(Ye,ut)&&he(rt,ut,Ye[ut]);if(me)for(var ut of me(Ye))_e.call(Ye,ut)&&he(rt,ut,Ye[ut]);return rt},ke=(rt,Ye)=>ve(rt,ye(Ye));const{TextArea:Te}=ie.default,Ee={visible:!1,tabIndex:"0"},Oe={[te.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[te.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[te.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 je=(rt=>(rt[rt.SET_VISIBLE=0]="SET_VISIBLE",rt[rt.SET_TABINDEX=1]="SET_TABINDEX",rt))(je||{});function Pe(rt,Ye){switch(Ye.type){case 0:return ke(pe({},rt),{visible:Ye.payload});case 1:return ke(pe({},rt),{tabIndex:Ye.payload});default:throw new Error}}function Qe({value:rt,className:Ye}){const[ut,Ge]=(0,ce.useState)(!1),ze=(0,ce.useRef)(),Ve=(0,ce.useRef)();return(0,ce.useEffect)(()=>{ut&&(Ve.current.reset(),Ve.current.write((0,E.pp)(rt||"")))},[rt,ut]),(0,ce.useEffect)(()=>{var $e,nt,et,pt;if(ze.current){Ve.current=new z.Terminal({fontSize:14,disableStdin:!0}),Ve.current.open(ze.current);const ct=ze.current.offsetWidth-14,Rt=((pt=(et=(nt=($e=Ve.current)==null?void 0:$e._core)==null?void 0:nt._renderService)==null?void 0:et.dimensions)==null?void 0:pt.actualCellWidth)||9.5,dt=Math.ceil(ct/Rt);Ve.current.resize(dt,8),Ge(!0)}},[]),ae.createElement("div",{ref:ze,className:re()("XtermText-valueRef",Ye)})}function Xe(rt){const{status:Ye,error_msg:ut,output:Ge,input:ze,expected_output:Ve,is_file:$e,input_file_url:nt,output_file_url:et,expected_output_file_url:pt}=rt;let ct=null;const Rt={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(Ye){case te.h.NOMATCH:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:ze}),$e&&ae.createElement("div",{style:Rt},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:Ge&&le.Base64.decode(Ge)||""}),$e&&ae.createElement("div",{style:Rt},ae.createElement("a",{onClick:()=>(0,E.LR)(et,Ge)},Ge)),ae.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:Ve&&le.Base64.decode(Ve)||""}),$e&&ae.createElement("div",{style:Rt},ae.createElement("a",{onClick:()=>(0,E.LR)(pt,Ve)},Ve)));break;case te.h.EXECUTEFAILURE:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!$e&&ae.createElement(ne.Z,{value:ze,style:Rt}),$e&&ae.createElement("div",{style:Rt},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.COMPILEFAILURE:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!$e&&ae.createElement(ne.Z,{value:ze,style:Rt}),$e&&ae.createElement("div",{style:Rt},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.PODFAILURE:ct=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case te.h.TIMEOUT:ct=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",ct," ")}function ot(rt){const{status:Ye,error_msg:ut,execute_time:Ge,output:ze,input:Ve,expected_output:$e,is_file:nt,input_file_url:et,output_file_url:pt,expected_output_file_url:ct}=rt;let Rt=null;switch(Ye){case te.h.OK:Rt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ge,"\u79D2"),ae.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ae.createElement("pre",null,le.Base64.decode(ze)));break;case te.h.NOMATCH:Rt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u8F93\u51FA\uFF1A",ze&&le.Base64.decode(ze)),ae.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",$e&&le.Base64.decode($e)));break;case te.h.EXECUTEFAILURE:Rt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.COMPILEFAILURE:Rt=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.PODFAILURE:Rt=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case te.h.TIMEOUT:Rt=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",Rt," ")}var We=({id:rt,is_file:Ye,input:ut,debuging:Ge,submitting:ze,executingMessage:Ve,debugResult:$e,onChangeInput:nt,onDebugCode:et,onSubmitCode:pt})=>{const[ct,Rt]=(0,ce.useReducer)(Pe,Ee),{visible:dt,tabIndex:Mt}=ct;(0,ce.useEffect)(()=>{Rt({type:0,payload:!1})},[rt]);function xt(Ae){let be=Ae.target.id;Rt({type:1,payload:be})}function yt(){Rt({type:0,payload:!dt})}const bt=(0,ce.useMemo)(()=>{if($e){const{status:Ae}=$e;return ae.createElement(ae.Fragment,null,ot($e))}return null},[$e]);function He(){Rt({type:0,payload:!0}),Rt({type:1,payload:"1"}),et()}return ae.createElement("div",{className:"test-case-panel"},ae.createElement("div",{className:`test-case-panel-body ${dt?"active":""}`},ae.createElement("ul",{className:"s-navs"},ae.createElement("li",null,ae.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ae.createElement(b.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ae.createElement(Te,{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:Ye?"":ut,onChange:nt}),rightNode:Ge?ae.createElement(ee.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):$e?bt: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 ${dt?"up":""}`,onClick:yt},dt?ae.createElement(ue.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(Ce.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ae.createElement(Ce.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ae.createElement(Ce.ZP,{className:"btn-green",type:"ghost",loading:Ge,onClick:He},"\u8C03\u8BD5\u4EE3\u7801"),ae.createElement(Ce.ZP,{type:"primary",className:"custom-ant-disabled",loading:ze,disabled:ze,onClick:()=>{Rt({type:0,payload:!1}),pt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},63342:function($t,Dt,Se){"use strict";Se.r(Dt),Se.d(Dt,{default:function(){return ll}});var ce=Se(59301),ie=Se(10906),Ce=Se(76618),ue=Se(76560),se=Se(11938),te=Se(6767),le=Se(62957),ee=Se(29787),ne=Se(82326),E=Se(59205),b=Se(72015),z=Se(90524),x=Se(87169),re=Se(30641),ae=Se(51124),oe=Se(75790),ve=Se(89613),ye=Se(64536),me=Se(59301),ge=Object.defineProperty,_e=Object.defineProperties,he=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ee=(ft,_t,St)=>_t in ft?ge(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Oe=(ft,_t)=>{for(var St in _t||(_t={}))ke.call(_t,St)&&Ee(ft,St,_t[St]);if(pe)for(var St of pe(_t))Te.call(_t,St)&&Ee(ft,St,_t[St]);return ft},je=(ft,_t)=>_e(ft,he(_t));const Pe={theme:(0,ve.G)("cmCodeMode","vs-dark"),fontSize:(0,ve.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ve.G)("cmTabToSpace",!0)};var Qe=(ft=>(ft[ft.set_font_size=0]="set_font_size",ft[ft.set_theme=1]="set_theme",ft[ft.on_tab_to_space=2]="on_tab_to_space",ft[ft.set_show_editor_setting=3]="set_show_editor_setting",ft))(Qe||{});function Xe(ft,_t){switch(_t.type){case 3:return je(Oe({},ft),{showEditorSetting:_t.payload});case 1:return je(Oe({},ft),{theme:_t.payload});case 0:return je(Oe({},ft),{fontSize:_t.payload});case 2:return je(Oe({},ft),{tabToSpace:_t.payload});default:throw new Error}}var ot=({isLoading:ft,value:_t,onChange:St,language:Yn,onUpdateCode:Tn,ActionBarRender:mn=xn=>me.createElement(We,{onShowCodeSetting:xn})})=>{const[xn,wn]=(0,ce.useReducer)(Xe,Pe),{theme:Mn,fontSize:Xn,showEditorSetting:ci,tabToSpace:Lr}=xn,gi=(0,ce.useRef)(),Cr=(0,ce.useRef)(),yi={onFontSizeChange:ki=>{wn({type:0,payload:ki}),(0,ve.t)("cmFontSize",ki)},tabToSpace:Lr,cmFontSize:Xn,className:"oj",cmCodeMode:Mn,onTabToSpace:ki=>{wn({type:2,payload:ki}),(0,ve.t)("cmTabToSpace",ki)},onCodeModeChange:ki=>{wn({type:1,payload:ki}),(0,ve.t)("cmCodeMode",ki)}};function Rr(){wn({type:3,payload:!1})}function Hi(){wn({type:3,payload:!0})}const ii={value:_t,language:Yn,theme:Mn,height:"calc(100% - 56px)",options:{fontSize:Xn,insertSpaces:Lr},onChange:ki=>{St(ki),Cr.current=ki,clearTimeout(gi.current),gi.current=setTimeout(()=>{Tn(Cr.current)},1e4)},onEditBlur:ki=>{Cr.current&&Tn(Cr.current)}};return me.createElement(ce.Fragment,null,me.createElement("div",{className:"code-panel-container"},mn(Hi),!ft&&me.createElement(ae.ZP,Oe({},ii))),me.createElement(oe.Z,null,me.createElement(re.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ci,onClose:Rr},me.createElement(ye.Z,Oe({},yi)))))};function We({onShowCodeSetting:ft}){return me.createElement("div",{className:"action-bar"},me.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),me.createElement("a",{onClick:ft},me.createElement("i",{className:"iconfont icon-shezhi"})))}var rt=Se(24334),Ye=Se(12085),ut=Se(40148),Ge=Se(37568),ze=Se(28284),Ve=Se(99571);const{TextArea:$e}=Ge.default,nt=5e3;var et=({callback:ft,onCancel:_t,notes:St})=>{function Yn(Tn){ft(Tn)}return ce.createElement(ze.default,{className:"note-form-panel",onFinish:Yn,initialValues:{notes:St}},ce.createElement(ze.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:nt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${nt}`}]},ce.createElement($e,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),ce.createElement(ze.default.Item,{style:{textAlign:"right"}},ce.createElement(Ve.ZP,{type:"ghost",onClick:_t,style:{marginRight:10}}," \u53D6\u6D88 "),ce.createElement(Ve.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"},ct={pagination:"pagination___npPu7",info:"info___aRH6C"},Rt=Se(54172),dt=Se(13747),Mt=Se(58617),xt=Se(81953),yt=Se(49162),bt=Se(49661),He=Se(61186),Ae=Se.n(He);const{Column:be}=Rt.default;var Be=({submitResult:ft,submitting:_t,submitRecords:St,page:Yn,onPageChange:Tn,topicId:mn})=>{const{status:xn,id:wn,input:Mn,output:Xn,expected_output:ci,is_file:Lr,input_file_url:gi,output_file_url:Cr,expected_output_file_url:yi,error_msg:Rr}=ft||{},{records:Hi,records_count:ii}=St||{},ki=(0,ue.useParams)();function Wi(){Lr?navigator.clipboard.writeText(rt.Base64.decode(Rr)).then(()=>{te.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(rt.Base64.decode(Xn)).then(()=>{te.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return ce.createElement(ee.Z,{spinning:_t,tip:"\u8BC4\u6D4B\u4E2D...",indicator:ce.createElement(Mt.Z,{style:{fontSize:24},spin:!0})},wn?ce.createElement(ce.Fragment,null,ce.createElement("ul",{className:ct.info},ce.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",ce.createElement("span",{className:xn===yt.h.OK?"c-green":"c-red"},ut.Im[xn])),ce.createElement("li",{className:ct.error},ce.createElement("a",{onClick:Wi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",ce.createElement(xt.Z,null)," ")),ce.createElement("li",null,ce.createElement(ue.Link,{to:`/problems/${mn}/record-detail/${wn}?backId=${ki==null?void 0:ki.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),xn!==yt.h.OK?ce.createElement(ce.Fragment,null,ce.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),ce.createElement("pre",null,!Lr&&Mn,Lr&&ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,bt.LR)(gi,Mn)},Mn)),ce.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),ce.createElement("pre",null,(xn===4||xn===5)&&rt.Base64.decode(Rr),xn!=4&&xn!=5&&(Lr?ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,bt.LR)(Cr,Xn)},Xn):rt.Base64.decode(Xn))),ce.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),ce.createElement("pre",null,!Lr&&rt.Base64.decode(ci),Lr&&ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,bt.LR)(yi,ci)},ci))):null):null,(Hi==null?void 0:Hi.length)>0?ce.createElement(Rt.default,{dataSource:Hi,rowKey:"id",pagination:!1},ce.createElement(be,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(oi,Di)=>ce.createElement("span",null," ",Ae()(oi).format("YYYY-MM-DD HH:mm:ss"))}),ce.createElement(be,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(oi,Di)=>{var Qn;return ce.createElement(ue.Link,{className:oi===0?"c-green":"c-red",to:`/problems/${mn}/record-detail/${Di.id}?backId=${ki==null?void 0:ki.save_identifier}`},(Qn=ut.Im[oi])==null?void 0:Qn.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),ce.createElement(be,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),ce.createElement(be,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),ce.createElement(be,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ii>15?ce.createElement(dt.Z,{className:ct.pagination,current:Yn,pageSize:15,total:ii,onChange:Tn}):null)},Ke=Se(57884),Ne=Se(96599),De=Se(77736),we={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Le=Se(38394),Ue=Se(59301);const Me={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Re=({hack:ft,onTriggerPraise:_t,toDiscuss:St})=>{const{language:Yn,difficulty:Tn,time_limit:mn,username:xn,user_path:wn,user_praise:Mn,comments_count:Xn,praises_count:ci,description:Lr,pass_count:gi,submit_count:Cr}=ft,yi=(0,ue.useLocation)();console.log(ft.language,"language");const Rr=Me[Tn];return Ue.createElement(Ue.Fragment,null,Ue.createElement("ul",{className:we.info},Ue.createElement("li",null,"\u96BE\u5EA6\uFF1A",Ue.createElement(Ne.default,{color:Rr==null?void 0:Rr.color},Rr==null?void 0:Rr.name)),Ue.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Ue.createElement("b",null,mn,"\u79D2"))),Ue.createElement(Le.Z,{value:Lr,className:we.desc}),Ue.createElement("ul",{className:we["commit-info"]},Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Ue.createElement("b",null,gi))),Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Ue.createElement("b",null,Cr))," "),Ue.createElement("li",{style:{flex:"1 0 0"}}),Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("i",{className:"iconfont icon-huifu1",onClick:St})," ",Ue.createElement("b",null,Xn))," ")))},tt=Se(33796),lt=Object.defineProperty,Pt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ot=(ft,_t,St)=>_t in ft?lt(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Zt=(ft,_t)=>{for(var St in _t||(_t={}))Ct.call(_t,St)&&Ot(ft,St,_t[St]);if(Pt)for(var St of Pt(_t))vt.call(_t,St)&&Ot(ft,St,_t[St]);return ft};const Ut=ft=>React.createElement("svg",Zt({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},ft),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 gt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Qt=Se(82093);function Lt(ft){return(0,Qt.U2)("comments.json",ft)}function qt(ft){return(0,Qt.v_)(`/discusses/${ft}/plus.json`,{container_type:"Discuss",type:1})}function un(ft){return(0,Qt.v_)("comments/reply.json",ft)}function Sn(ft){return(0,Qt.v_)("comments.json",ft)}function Jt(ft){return(0,Qt.v_)(`comments/${ft==null?void 0:ft.id}/hidden.json`,ft)}function Ln(ft){return(0,Qt.IV)(`comments/${ft==null?void 0:ft.id}.json`)}var Zn=Se(46541),Gn=Se(34055);function Jn({author:ft}){return ce.createElement("a",{href:`/users/${ft.login}`,target:"_blank"},ce.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${z.Z.IMG_SERVER}/images/${ft.image_url}`,width:"50"}))}function hr({data:ft,index:_t,parentDiscussIndex:St,user:Yn,onSetActionType:Tn}){const{author:mn,can_delete:xn,content:wn,id:Mn,time:Xn}=ft;function ci(){Tn({id:Mn,index:_t,type:"delete-discuss",parentDiscussIndex:St,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Lr=Yn.admin||xn||mn.user_id===Yn.user_id;return ce.createElement("div",{className:"discuss-item-container second-discuss "},ce.createElement(Jn,{author:mn}),ce.createElement("section",null,ce.createElement("div",{className:"discuss-info"},ce.createElement("a",{href:`/users/${mn.login}`,target:"_blank"},mn.name),ce.createElement("span",{className:"grey"},Xn),ce.createElement("div",{className:"btn-group",style:{marginBottom:0}},Lr?ce.createElement("a",{onClick:ci,title:"\u5220\u9664"},ce.createElement("i",{className:"iconfont icon-shanchu"})):null)),ce.createElement(Le.Z,{className:"discuss-content",value:wn})))}var ur=({user:ft,data:_t,index:St,onPlusDiscuss:Yn,onSetActionType:Tn,activeDiscussIndex:mn,onReplyDiscuss:xn,onSetActiveDiscussIndex:wn})=>{const{content:Mn,children:Xn,hidden:ci,id:Lr,praise_count:gi,time:Cr,user_praise:yi,can_delete:Rr,author:Hi}=_t;console.log(Rr&&(!Xn||Xn.length==0),"children22");function ii(){wn(Lr)}function ki(){Yn(Lr,!yi,St)}function Wi(){Tn({id:Lr,index:St,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function oi(){Tn({id:Lr,index:St,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=ft.admin||ft.user_id===Hi.user_id;return ce.createElement("div",{className:"discuss-item-container",key:Lr},ce.createElement(Jn,{author:Hi}),ce.createElement("section",null,ce.createElement("div",{className:"discuss-info"},ce.createElement("a",{href:`/users/${Hi.login}`,target:"_blank"}," ",Hi.name," "),ce.createElement("span",{className:"grey"},Cr)),ce.createElement(Le.Z,{className:"discuss-content",value:Mn}),Xn&&Xn.length>0?ce.createElement("div",{className:"reply-discuss-container"},Xn.map((Qn,Fi)=>ce.createElement(hr,{key:Qn.id,data:Qn,index:Fi,user:ft,onSetActionType:Tn,parentDiscussIndex:St}))):null,ce.createElement("div",{className:"btn-group"},(0,Gn.Ny)()?ce.createElement("a",{onClick:oi,title:ci?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},ce.createElement("i",{className:ci?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Rr&&(!Xn||Xn.length==0)?ce.createElement("a",{onClick:Wi,title:"\u5220\u9664"},ce.createElement("i",{className:"iconfont icon-shanchu"})):null,ce.createElement("a",{onClick:ii,title:"\u56DE\u590D"}," ",ce.createElement("i",{className:"iconfont icon-huifu1"})," "),ce.createElement("a",{onClick:ki,className:yi?"c-orange":""},ce.createElement("i",{className:yi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),ce.createElement("span",null,gi||""))),ce.createElement(Zn.Z,{id:Lr,activeDiscussIndex:mn,onReplyDiscuss:xn})))},jn=Se(39479),Nn=Se(2978),rr=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())}),Kn=({user_praise:ft,praise_count:_t,praisePlus:St,onCreateDiscuss:Yn,discuss_count:Tn})=>{const[mn,xn]=(0,ce.useState)(!1),[wn,Mn]=(0,ce.useState)("");function Xn(Cr){Mn(Cr)}function ci(){xn(!0)}function Lr(){xn(!1)}function gi(){return rr(this,null,function*(){Yn(wn),Mn(""),xn(!1)})}return ce.createElement("div",{className:`dis-input-editor-container ${mn?"active":""} `},ce.createElement("div",{className:mn?"text-area hide":"text-area"},ce.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ci}),ce.createElement("a",{style:{alignItems:"center"}}," ",ce.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",Tn," "),ce.createElement("a",{className:"c-light-black",onClick:St,style:{alignItems:"center"},title:ft?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ce.createElement("i",{className:`mr3 ${ft?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),_t?ce.createElement("span",null,_t):"")),mn?ce.createElement("div",{className:"input-mask",onClick:Lr}):null,ce.createElement("div",{className:mn?"md-container":"md-container hide"},ce.createElement(Nn.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:wn,height:240,onChange:Xn}),ce.createElement("div",{className:"tip-container",onClick:Lr},ce.createElement("a",{className:"btn-send",onClick:gi}," \u53D1\u9001 "))))},In=Object.defineProperty,gn=Object.defineProperties,pn=Object.getOwnPropertyDescriptors,Dn=Object.getOwnPropertySymbols,Rn=Object.prototype.hasOwnProperty,Un=Object.prototype.propertyIsEnumerable,Mr=(ft,_t,St)=>_t in ft?In(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,an=(ft,_t)=>{for(var St in _t||(_t={}))Rn.call(_t,St)&&Mr(ft,St,_t[St]);if(Dn)for(var St of Dn(_t))Un.call(_t,St)&&Mr(ft,St,_t[St]);return ft},Ie=(ft,_t)=>gn(ft,pn(_t)),Ze=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())});const qe={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var st=(ft=>(ft[ft.GET_DISCUSSES=0]="GET_DISCUSSES",ft[ft.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ft[ft.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ft[ft.PLUS_DISCUSS=3]="PLUS_DISCUSS",ft[ft.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ft[ft.SET_PAGE=5]="SET_PAGE",ft[ft.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",ft))(st||{});function mt(ft,_t){switch(_t.type){case 6:return Ie(an({},ft),{loading:!0});case 0:return an(an({},ft),_t.payload);case 1:return an(an({},ft),_t.payload);case 4:return an(an({},ft),_t.payload);case 3:return an(an({},ft),_t.payload);case 5:return an(an({},ft),_t.payload);case 2:return an(an({},ft),_t.payload);default:throw new Error}}var Bt=({user:ft,identifier:_t,hack:St,onTriggerPraise:Yn,setDiscussTotal:Tn})=>{const[mn,xn]=(0,ce.useReducer)(mt,qe),{loading:wn,page:Mn,data:Xn,count:ci,actionType:Lr,activeDiscussIndex:gi}=mn;console.log("---",mn);const Cr=(0,ce.useCallback)(()=>Ze(void 0,null,function*(){xn({type:6});const Qn=yield Lt({container_type:"Practice",container_identifier:_t,limit:10,page:Mn}),{comments:Fi,disscuss_count:_i}=Qn;xn({type:0,payload:{data:Fi,count:_i,loading:!1}}),Tn(_i)}),[Mn,_t]);(0,ce.useEffect)(()=>{Cr()},[_t,Mn]);function yi(Qn){xn({type:5,payload:{page:Qn}})}function Rr(Qn){xn({type:4,payload:{actionType:Qn}})}function Hi(Qn){xn(gi===Qn?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:Qn}})}function ii(Qn,Fi,_i){return Ze(this,null,function*(){try{const Mi=yield qt(Qn);Xn[_i].user_praise=Fi,Xn[_i].praise_count=Mi.praise_count,xn({type:3,payload:{data:[...Xn]}})}catch(Mi){console.log(Mi)}})}function ki(){return Ze(this,null,function*(){const{id:Qn,params:Fi,type:_i,index:Mi,parentDiscussIndex:Po}=Lr;_i==="hidden-discuss"&&(console.log(Fi,"params"),yield Jt(an({id:Qn,container_type:"Practice",container_identifier:_t},Fi)),Po?Xn[Po].children[Mi].hidden=Fi.hidden==1:Xn[Mi].hidden=Fi.hidden==1,xn({type:4,payload:{actionType:null,data:[...Xn]}})),_i==="delete-discuss"&&(yield Ln({id:Qn,container_type:"Practice",container_identifier:_t}),xn({type:4,payload:{actionType:null}}),yield Cr())})}function Wi(){xn({type:4,payload:{actionType:null}})}function oi(Qn,Fi){return Ze(this,null,function*(){try{yield un({container_type:"Practice",container_identifier:_t,comments:{content:Fi,parent_id:Qn}}),Cr()}catch(_i){console.log(_i)}})}function Di(Qn){return Ze(this,null,function*(){xn({type:6}),yield Sn({comments:{content:Qn},container_type:"Practice",container_identifier:_t}),Cr()})}return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"discuss-panel"},Xn.length===0?ce.createElement(Ke.Z,null):ce.createElement(ee.Z,{spinning:wn},Xn.map((Qn,Fi)=>ce.createElement(ur,{onReplyDiscuss:oi,onPlusDiscuss:ii,onSetActiveDiscussIndex:Hi,onSetActionType:Rr,data:Qn,index:Fi,user:ft,activeDiscussIndex:gi}))),ci>10?ce.createElement("div",{className:"pagination-container mt10 mb10"},ce.createElement(dt.Z,{showQuickJumper:!0,onChange:yi,current:Mn,total:ci,showTotal:Qn=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},Qn),"\u6761\u6570\u636E")})):null),ce.createElement(Kn,{user_praise:St.user_praise,praise_count:St.praises_count,praisePlus:Yn,discuss_count:St.comments_count,onCreateDiscuss:Di}),ce.createElement(oe.Z,null,ce.createElement(le.default,{centered:!0,title:"\u63D0\u793A",open:!!Lr,onOk:ki,onCancel:Wi},ce.createElement("p",null,Lr?Lr.message:"")),ce.createElement(jn.Z,null)))},kt={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"},Nt={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"},nn=Object.defineProperty,An=Object.getOwnPropertySymbols,Vn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,wt=(ft,_t,St)=>_t in ft?nn(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,dn=(ft,_t)=>{for(var St in _t||(_t={}))Vn.call(_t,St)&&wt(ft,St,_t[St]);if(An)for(var St of An(_t))At.call(_t,St)&&wt(ft,St,_t[St]);return ft};const Gt=ft=>React.createElement("svg",dn({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},ft),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 Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",Ht=Object.defineProperty,on=Object.getOwnPropertySymbols,sn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable,Wt=(ft,_t,St)=>_t in ft?Ht(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Cn=(ft,_t)=>{for(var St in _t||(_t={}))sn.call(_t,St)&&Wt(ft,St,_t[St]);if(on)for(var St of on(_t))yn.call(_t,St)&&Wt(ft,St,_t[St]);return ft};const Vt=ft=>React.createElement("svg",Cn({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),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 Pn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",bn=Object.defineProperty,zn=Object.getOwnPropertySymbols,Bn=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,cr=(ft,_t,St)=>_t in ft?bn(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,pr=(ft,_t)=>{for(var St in _t||(_t={}))Bn.call(_t,St)&&cr(ft,St,_t[St]);if(zn)for(var St of zn(_t))er.call(_t,St)&&cr(ft,St,_t[St]);return ft};const Nr=ft=>React.createElement("svg",pr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),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 Br="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",ei=Object.defineProperty,xr=Object.getOwnPropertySymbols,Tr=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Xr=(ft,_t,St)=>_t in ft?ei(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,hi=(ft,_t)=>{for(var St in _t||(_t={}))Tr.call(_t,St)&&Xr(ft,St,_t[St]);if(xr)for(var St of xr(_t))Pr.call(_t,St)&&Xr(ft,St,_t[St]);return ft};const bi=ft=>React.createElement("svg",hi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),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==",Kr=Object.defineProperty,Ti=Object.getOwnPropertySymbols,Ei=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable,br=(ft,_t,St)=>_t in ft?Kr(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,kr=(ft,_t)=>{for(var St in _t||(_t={}))Ei.call(_t,St)&&br(ft,St,_t[St]);if(Ti)for(var St of Ti(_t))tr.call(_t,St)&&br(ft,St,_t[St]);return ft};const ti=ft=>React.createElement("svg",kr({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},ft),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 ni="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Ri=({style:ft={},onClick:_t,onAssist:St,onHide:Yn,data:Tn,active:mn,showLine:xn})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:mn===(Tn==null?void 0:Tn.id)?`${Nt.list} ${Nt.active}`:Nt.list,style:ft,onClick:()=>_t(Tn)},(Tn==null?void 0:Tn.video)&&ce.createElement("div",{className:Nt.left},ce.createElement("img",{src:Tn==null?void 0:Tn.video_cover}),ce.createElement("div",null,ce.createElement("img",{src:Et}),ce.createElement("span",null,Tn==null?void 0:Tn.video_duration)),ce.createElement("div",{className:Nt.mask})),ce.createElement("div",{className:Nt.right},ce.createElement("div",{className:Nt.name},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(Tn==null?void 0:Tn.image_url),width:30,height:30}),ce.createElement("div",{title:Tn==null?void 0:Tn.name,className:Nt.title},Tn==null?void 0:Tn.name),(Tn==null?void 0:Tn.is_authority)&&ce.createElement("div",{className:Nt.b},"\u5B98\u65B9"),(Tn==null?void 0:Tn.is_excellent)&&ce.createElement("div",{className:Nt.a},"\u7CBE\u9009")),ce.createElement("div",{className:Nt.des},ce.createElement(Le.Z,{showLines:2,showTextOnly:!0,value:(Tn==null?void 0:Tn.content)||"\u6682\u65E0\u5185\u5BB9"})),ce.createElement("div",{className:Nt.tag},ce.createElement("span",{className:"current",onClick:wn=>{wn.stopPropagation(),St(Tn)}},ce.createElement("img",{src:Tn!=null&&Tn.user_liker?Br:Pn}),ce.createElement("span",{style:{color:Tn!=null&&Tn.user_liker?"#0152d9":"#656f87"}},Tn==null?void 0:Tn.praises_count)),ce.createElement("span",null,ce.createElement("img",{src:Si}),ce.createElement("span",null,Tn==null?void 0:Tn.discusses_count)),ce.createElement("span",null,ce.createElement("img",{src:ni}),ce.createElement("span",null,Tn==null?void 0:Tn.viewed_count)),(0,Gn.Ny)()&&ce.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:wn=>{wn.stopPropagation(),Yn(Tn)}},Tn!=null&&Tn.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),xn&&ce.createElement("div",{className:Nt.line})),Tt={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"},en=Se(25399),Yt=Se(12975),rn=Object.defineProperty,hn=Object.getOwnPropertySymbols,vn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,En=(ft,_t,St)=>_t in ft?rn(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,_n=(ft,_t)=>{for(var St in _t||(_t={}))vn.call(_t,St)&&En(ft,St,_t[St]);if(hn)for(var St of hn(_t))On.call(_t,St)&&En(ft,St,_t[St]);return ft};const Kt=ft=>React.createElement("svg",_n({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},ft),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 fn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",zt=Object.defineProperty,jt=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Fn=(ft,_t,St)=>_t in ft?zt(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Wn=(ft,_t)=>{for(var St in _t||(_t={}))Xt.call(_t,St)&&Fn(ft,St,_t[St]);if(jt)for(var St of jt(_t))cn.call(_t,St)&&Fn(ft,St,_t[St]);return ft};const nr=ft=>React.createElement("svg",Wn({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ft),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 ar="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",$n=Object.defineProperty,mr=Object.getOwnPropertySymbols,dr=Object.prototype.hasOwnProperty,jr=Object.prototype.propertyIsEnumerable,qr=(ft,_t,St)=>_t in ft?$n(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,$r=(ft,_t)=>{for(var St in _t||(_t={}))dr.call(_t,St)&&qr(ft,St,_t[St]);if(mr)for(var St of mr(_t))jr.call(_t,St)&&qr(ft,St,_t[St]);return ft};const Gr=ft=>React.createElement("svg",$r({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},ft),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 ri="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",Jr=Object.defineProperty,Wr=Object.getOwnPropertySymbols,Vr=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,or=(ft,_t,St)=>_t in ft?Jr(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,fr=(ft,_t)=>{for(var St in _t||(_t={}))Vr.call(_t,St)&&or(ft,St,_t[St]);if(Wr)for(var St of Wr(_t))ir.call(_t,St)&&or(ft,St,_t[St]);return ft},Ar=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())});const Yr=(ft,_t)=>{var St,Yn,Tn;const{uploadInfo:mn={}}=_t.payload;switch(_t.type){case"addVideo":return{videoList:[...ft.videoList,{name:mn.file.name,size:mn.file.size,type:mn.file.type,fileHash:mn.fileHash,state:mn.state,video_id:mn.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:ft.videoList.filter(xn=>xn.name!==_t.payload.name)};case"replaceVideo":return{videoList:_t.payload};case"removeAll":return[];case"updateProgress":return{videoList:ft.videoList.map(xn=>xn.name===_t.payload.uploadInfo.file.name?fr(fr({},xn),{loaded:_t.payload.progressPercent,video_id:mn.videoId,fileHash:mn.fileHash}):xn)};case"updateTitle":return{videoList:(St=ft.videoList)==null?void 0:St.map(xn=>xn.name===_t.payload.item.name?fr(fr({},xn),{title:_t.payload.title}):xn)};case"updateImg":return{videoList:(Yn=ft.videoList)==null?void 0:Yn.map(xn=>xn.name===_t.payload.item.name?fr(fr({},xn),{attachment_id:_t.payload.attachment_id}):xn)};case"updateImg":return{videoList:(Tn=ft.videoList)==null?void 0:Tn.map(xn=>xn.name===_t.payload.item.name?fr(fr({},xn),{attachment_id:_t.payload.attachment_id}):xn)};default:return[]}};var Or=({onClose:ft,onOk:_t,identifier:St,active:Yn})=>{var Tn,mn;const[xn]=ze.default.useForm(),[wn,Mn]=(0,ce.useState)({}),[Xn,ci]=(0,ce.useState)(!1),[Lr,gi]=(0,ce.useState)(!1),[Cr,yi]=(0,ce.useReducer)(Yr,{videoList:[]}),Rr=(0,Gn.eY)(),Hi=(0,ue.useParams)(),ii=(0,ce.useRef)();(0,ce.useEffect)(()=>{Yn&&ki()},[Yn]);const ki=()=>Ar(void 0,null,function*(){var Ir,mi,Er,qo,oo,oa,os,aa,ga,ai;const Ai=yield(0,E.M3)(St,{active:Yn});if((Ai==null?void 0:Ai.status)===0){const io={name:(Ir=Ai==null?void 0:Ai.data)==null?void 0:Ir.name,content:(mi=Ai==null?void 0:Ai.data)==null?void 0:mi.content};xn.setFieldsValue(io),Mn(io),(qo=(Er=Ai==null?void 0:Ai.data)==null?void 0:Er.videos)!=null&&qo[0]&&yi({type:"replaceVideo",payload:[{video_id:(os=(oa=(oo=Ai==null?void 0:Ai.data)==null?void 0:oo.videos)==null?void 0:oa[0])==null?void 0:os.video_id,name:(ai=(ga=(aa=Ai==null?void 0:Ai.data)==null?void 0:aa.videos)==null?void 0:ga[0])==null?void 0:ai.title,loaded:100}]})}}),Wi=(Ir,mi)=>{Mn(fr({},mi))},oi=Ir=>Ar(void 0,null,function*(){const mi={videos:Cr.videoList,articles:Ir};gi(!0);let Er;Yn?(mi.active=Yn,Er=yield(0,E.gu)(St,mi)):Er=yield(0,E.bx)(St,mi),(Er==null?void 0:Er.status)===0&&(console.log(Yn||(Er==null?void 0:Er.id),44),_t(Yn||(Er==null?void 0:Er.id))),gi(!1)}),Di=()=>{const Ir=document.getElementById("fileUpload");Ir.value=""},Qn=Ir=>{var mi='{"Vod":{}}';if(ci(!0),ii.current){ii.current.addFile(Ir,null,null,null,mi);return}(0,Yt.o)(Rr==null?void 0:Rr.login,"",{create:!ii,addFileSuccess:Er=>{yi({type:"addVideo",payload:{uploadInfo:Er}})},onUploadProgress:(Er,qo,oo)=>{const oa=Math.ceil(oo*100);yi({type:"updateProgress",payload:{uploadInfo:Er,progressPercent:oa}}),Di()},onUploadFailed:Er=>{te.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Er=>{ci(!1)},onUploadSucceed:Er=>{ci(!1)},onUploadError:Er=>{ci(!1)},gotUploader:Er=>{Er.addFile(Ir,null,null,null,mi),ii.current=Er}})},Fi=Ir=>{var mi;const qo=Ir.target.files[0];if(!qo){Di();return}let oo=qo.name.toLowerCase();if(oo&&oo.indexOf(".avi")==-1&&oo.indexOf(".flv")==-1&&oo.indexOf(".f4v")==-1&&oo.indexOf(".m4v")==-1&&oo.indexOf(".mov")==-1&&oo.indexOf(".mp4")==-1&&oo.indexOf(".rmvb")==-1&&oo.indexOf(".swf")==-1&&oo.indexOf(".webm")==-1&&oo.indexOf(".wmv")==-1){te.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Di();return}if(qo.size>1024*1024*1024){te.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Di();return}if((mi=Cr.videoList)!=null&&mi.find(oa=>oa.name===qo.name)){te.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}Qn(qo)},_i=(Ir,mi)=>{le.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:ce.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:Ir}})}})},Mi=()=>ce.createElement("label",{htmlFor:"fileUpload",className:Tt.main},ce.createElement("img",{src:fn,alt:""}),ce.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),Po=Ir=>ce.createElement("div",{className:Tt.mainLoading},ce.createElement("div",{className:Tt.proWarp},ce.createElement("div",{className:Tt.pro},ce.createElement("div",{style:{width:Ir}})),ce.createElement("span",null,Ir||0,"%")),ce.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),ce.createElement("div",{className:Tt.tip},ce.createElement(en.Z,{getPopupContainer:mi=>mi.parentNode,title:ce.createElement("div",null,ce.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ce.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"),ce.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ce.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ce.createElement("img",{src:ri,alt:""})))),vr=Ir=>ce.createElement("div",{className:Tt.mainSucceed},ce.createElement("img",{src:ar,alt:""}),ce.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),ce.createElement("div",{className:Tt.tip},ce.createElement(en.Z,{getPopupContainer:mi=>mi.parentNode,title:ce.createElement("div",null,ce.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ce.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"),ce.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ce.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ce.createElement("img",{src:ri,alt:""}))),ce.createElement("div",{className:Tt.del,onClick:()=>_i(Ir.name,Ir.loaded==100)},ce.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Zi=()=>{var Ir;return ce.createElement(ce.Fragment,null,(Ir=Cr.videoList)==null?void 0:Ir.map((mi,Er)=>ce.createElement(ce.Fragment,{key:Er},mi.loaded==100?vr(mi):Po(mi.loaded))))},li=()=>{le.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:ft})},Sr=(Tn=Cr.videoList)==null?void 0:Tn.length;return ce.createElement("div",{className:Tt.listForm},ce.createElement("header",null,Yn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),ce.createElement("section",{className:Tt.scroll,id:"sss"},ce.createElement("div",{className:Tt.formWrap}," ",ce.createElement(ze.default,{form:xn,scrollToFirstError:!0,layout:"vertical",onValuesChange:Wi,onFinish:oi},ce.createElement(ze.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"}]},ce.createElement(Ge.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((mn=wn.name)==null?void 0:mn.length)||0}/60`})),ce.createElement(ze.default.Item,{name:"content",label:"\u5185\u5BB9:"},ce.createElement(Nn.Z,{defaultValue:wn.content||"",watch:!0})))),ce.createElement("div",{className:Tt.upload},Sr?Zi():Mi(),ce.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Fi,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),ce.createElement("div",{className:Tt.btns},ce.createElement(Ve.ZP,{onClick:li,type:"primary",ghost:!0},"\u5173\u95ED"),ce.createElement(Ve.ZP,{loading:Lr,disabled:Xn,onClick:()=>xn.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"},lo=Se(458),uo=Object.defineProperty,zo=Object.getOwnPropertySymbols,wo=Object.prototype.hasOwnProperty,Ni=Object.prototype.propertyIsEnumerable,Ii=(ft,_t,St)=>_t in ft?uo(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Pi=(ft,_t)=>{for(var St in _t||(_t={}))wo.call(_t,St)&&Ii(ft,St,_t[St]);if(zo)for(var St of zo(_t))Ni.call(_t,St)&&Ii(ft,St,_t[St]);return ft};const po=ft=>React.createElement("svg",Pi({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},ft),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 ji="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Gi=Object.defineProperty,Ui=Object.getOwnPropertySymbols,yr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Fr=(ft,_t,St)=>_t in ft?Gi(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Hr=(ft,_t)=>{for(var St in _t||(_t={}))yr.call(_t,St)&&Fr(ft,St,_t[St]);if(Ui)for(var St of Ui(_t))Ur.call(_t,St)&&Fr(ft,St,_t[St]);return ft};const xi=ft=>React.createElement("svg",Hr({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ft),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==",Lo=Object.defineProperty,Yi=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,to=(ft,_t,St)=>_t in ft?Lo(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,Ro=(ft,_t)=>{for(var St in _t||(_t={}))Xi.call(_t,St)&&to(ft,St,_t[St]);if(Yi)for(var St of Yi(_t))ui.call(_t,St)&&to(ft,St,_t[St]);return ft};const zi=ft=>React.createElement("svg",Ro({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},ft),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=",xo={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"},Io=Se(77019),Ki=Se(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=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())});const Yo=({id:ft,cb:_t})=>{const[St,Yn]=(0,ce.useState)("");return ce.createElement("aside",{className:"mt10"},ce.createElement(Nn.Z,{defaultValue:St,id:"writeForumsReviewId",onChange:Tn=>{Yn(Tn)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ce.createElement(Io.Z,null,ce.createElement(Ki.Z,{flex:"1"}),ce.createElement(Ki.Z,null,ce.createElement(Ve.ZP,{type:"primary",size:"middle",onClick:()=>za(void 0,null,function*(){St===""?te.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):_t(ft,St)})},"\u53D1\u9001"))))},la=({data:ft})=>{var _t;return ce.createElement("div",{className:Wo.thirdlyLevelDiscuss},ce.createElement("span",{className:"c-grey-333"},ce.createElement("span",{className:"font 14 c-light-primary"},(_t=ft==null?void 0:ft.author)==null?void 0:_t.name),"@",ce.createElement("span",{className:"font 14 c-light-primary"},ft==null?void 0:ft.parent_name),":"),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}))},Zo=({data:ft,onReplyDiscuss:_t,thirdlyReply:St,setThirdlyReply:Yn})=>{var Tn,mn,xn,wn;const Mn=(0,Gn.eY)();return console.log(Mn,"user"),ce.createElement("div",{className:Wo.list},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((Tn=ft==null?void 0:ft.author)==null?void 0:Tn.image_url)}),ce.createElement("div",{className:Wo.wrap},ce.createElement("div",{className:"font14",style:{marginBottom:6}},ce.createElement("span",{className:"c-grey-333"},(mn=ft==null?void 0:ft.author)==null?void 0:mn.name),(Mn==null?void 0:Mn.login)!==((xn=ft==null?void 0:ft.author)==null?void 0:xn.login)&&ce.createElement("span",{onClick:()=>Yn(ft==null?void 0:ft.id),className:"c-grey-999 current",style:{float:"right"}},ce.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),ce.createElement("span",null,"\u56DE\u590D"))),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}),(wn=ft==null?void 0:ft.children)==null?void 0:wn.map(Xn=>ce.createElement(la,{key:Xn.id,data:Xn})),St===(ft==null?void 0:ft.id)&&ce.createElement("div",null,ce.createElement(Yo,{id:ft==null?void 0:ft.id,cb:_t}),ce.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Yn(null),className:"c-light-primary current"},ce.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),ce.createElement("div",{className:Wo.line})))};var qa=({data:ft,onReplyDiscuss:_t,secondReply:St,setSecondReply:Yn,thirdlyReply:Tn,setThirdlyReply:mn,onPlusDiscuss:xn})=>{var wn,Mn,Xn,ci;const[Lr,gi]=(0,ce.useState)(!1);return console.log(ft,"data"),ce.createElement("div",{className:Wo.discussItem},ce.createElement("div",{className:Wo.list},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((wn=ft==null?void 0:ft.author)==null?void 0:wn.image_url)}),ce.createElement("div",{className:Wo.wrap},ce.createElement("div",{className:"font14",style:{marginBottom:6}},ce.createElement("span",{className:"c-grey-333 mr30"},(Mn=ft==null?void 0:ft.author)==null?void 0:Mn.name),ce.createElement("span",{className:"c-grey-999"},ft==null?void 0:ft.time)),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}),ce.createElement("div",{className:Wo.btns},ce.createElement("div",{onClick:()=>xn(ft==null?void 0:ft.id),className:ft!=null&&ft.user_praise?"c-light-primary":"c-grey-999"},ce.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),ce.createElement("span",null,ft==null?void 0:ft.praise_count)),ce.createElement("div",{onClick:()=>{var Cr;((Cr=ft==null?void 0:ft.children)==null?void 0:Cr.length)!==0&&(Yn(null),gi(!Lr))},style:{color:Lr?"#0152d9":"#999999"}},ce.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),ce.createElement("span",null,Lr?"\u6536\u8D77\u8BC4\u8BBA":(Xn=ft==null?void 0:ft.children)==null?void 0:Xn.length)),ce.createElement("div",{onClick:()=>{gi(!1),Yn(St===(ft==null?void 0:ft.id)?null:ft==null?void 0:ft.id)},style:{color:St===(ft==null?void 0:ft.id)?"#0152d9":"#999999"}},ce.createElement("i",{className:"iconfont icon-huifu3 mr3"}),ce.createElement("span",null,St===(ft==null?void 0:ft.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),St===(ft==null?void 0:ft.id)&&ce.createElement(Yo,{id:ft==null?void 0:ft.id,cb:(Cr,yi)=>{_t(Cr,yi),gi(!0)}}),Lr&&ce.createElement("div",{className:Wo.secondLevelDiscuss},(ci=ft==null?void 0:ft.children)==null?void 0:ci.map(Cr=>ce.createElement(Zo,{thirdlyReply:Tn,setThirdlyReply:mn,key:Cr.id,data:Cr,onReplyDiscuss:_t}))))))},ba=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())}),Ma=({identifier:ft,active:_t,onOk:St})=>{const[Yn,Tn]=(0,ce.useState)(""),[mn,xn]=(0,ce.useState)(1),[wn,Mn]=(0,ce.useState)([]),[Xn,ci]=(0,ce.useState)(0),[Lr,gi]=(0,ce.useState)(null),[Cr,yi]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{Rr(1),xn(1)},[_t]);const Rr=oi=>ba(void 0,null,function*(){const Di=yield Lt({container_type:"QuestionSolutionArticle",container_identifier:_t,limit:5,page:oi});Di!=null&&Di.comments&&(Mn((Di==null?void 0:Di.comments)||[]),xn(oi),ci(Di==null?void 0:Di.disscuss_count))}),Hi=()=>ba(void 0,null,function*(){if(Yn===""){te.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const oi=yield Sn({comments:{content:Yn},container_type:"QuestionSolutionArticle",container_identifier:_t});oi!=null&&oi.discuss&&(Tn(""),Rr(mn),St())}),ii=(oi,Di,Qn)=>ba(void 0,null,function*(){const Fi=yield un({container_type:"QuestionSolutionArticle",container_identifier:_t,comments:{content:Di,parent_id:oi}});gi(null),yi(null),Rr(mn)}),ki=oi=>ba(void 0,null,function*(){const Di=yield qt(oi);Rr(mn)}),Wi=oi=>{xn(oi),Rr(oi)};return ce.createElement("div",{className:xo.discuss},ce.createElement("aside",{className:xo.reply,style:{borderWidth:Xn?1:0}},ce.createElement(Nn.Z,{defaultValue:Yn,id:"writeForumsReviewId",onChange:oi=>{Tn(oi)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ce.createElement(Io.Z,null,ce.createElement(Ki.Z,{flex:"1"}),ce.createElement(Ki.Z,null,ce.createElement(Ve.ZP,{type:"primary",size:"middle",onClick:()=>Hi()},"\u53D1\u9001")))),wn==null?void 0:wn.map(oi=>ce.createElement(qa,{secondReply:Lr,setSecondReply:gi,thirdlyReply:Cr,setThirdlyReply:yi,key:oi.id,data:oi,onReplyDiscuss:ii,onPlusDiscuss:ki})),ce.createElement(dt.Z,{className:xo.pagination,showTotal:oi=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},oi),"\u6761\u6570\u636E"),current:mn,onChange:Wi,total:Xn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Ha=Se(93152),Ra=Object.defineProperty,pa=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Ja=Object.prototype.propertyIsEnumerable,Sa=(ft,_t,St)=>_t in ft?Ra(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,wa=(ft,_t)=>{for(var St in _t||(_t={}))Wa.call(_t,St)&&Sa(ft,St,_t[St]);if(pa)for(var St of pa(_t))Ja.call(_t,St)&&Sa(ft,St,_t[St]);return ft},ua=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())}),qi=({active:ft,identifier:_t,onAssist:St,onEdit:Yn,onArticlesSkip:Tn,onClose:mn,onOk:xn,onDelete:wn,detailsIndex:Mn,btnShowStatus:Xn})=>{var ci,Lr,gi,Cr,yi,Rr,Hi,ii,ki,Wi;const[oi,Di]=(0,ce.useState)(!0),[Qn,Fi]=(0,ce.useState)({});(0,ce.useEffect)(()=>{ft&&_i()},[ft,Mn]);const _i=(li=!0)=>ua(void 0,null,function*(){li&&Di(!0);const Sr=yield(0,E.wO)(_t,{active:ft});(Sr==null?void 0:Sr.status)===0&&Fi((Sr==null?void 0:Sr.data)||{}),Di(!1)}),Mi=li=>ua(void 0,null,function*(){const Sr=yield(0,E.qe)(_t,wa({active:ft},li));(Sr==null?void 0:Sr.status)===0&&(_i(!1),xn())}),Po=li=>ua(void 0,null,function*(){(yield(0,E.Rg)(_t,{active:li==null?void 0:li.id})).status===0&&(_i(!1),xn())}),vr=li=>{le.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:()=>wn(li)})},Zi=()=>{_i(!1),xn()};return ce.createElement("div",{className:di.listDetails},ce.createElement(lo.Z,{className:"pt20 pl20 pr20",loading:oi,active:!0,paragraph:{rows:5}},ce.createElement("div",{className:di.head},ce.createElement("div",{className:di.name},ce.createElement("div",{title:Qn==null?void 0:Qn.name,className:di.title},Qn==null?void 0:Qn.name),(Qn==null?void 0:Qn.is_authority)&&ce.createElement("div",{className:di.b},"\u5B98\u65B9"),(Qn==null?void 0:Qn.is_excellent)&&ce.createElement("div",{className:di.a},"\u7CBE\u9009")),ce.createElement("div",{className:di.tag},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(Qn==null?void 0:Qn.image_url)}),ce.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},Qn==null?void 0:Qn.username),ce.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ae()(Qn==null?void 0:Qn.created_at).format("YYYY-MM-DD")),ce.createElement("span",null,ce.createElement("img",{src:Pn}),ce.createElement("span",null,Qn==null?void 0:Qn.praises_count)),ce.createElement("span",null,ce.createElement("img",{src:Si}),ce.createElement("span",null,Qn==null?void 0:Qn.discusses_count)),ce.createElement("span",null,ce.createElement("img",{src:ni}),ce.createElement("span",null,Qn==null?void 0:Qn.viewed_count)),ce.createElement("div",{className:di.btn},((0,Gn.Ny)()||(Qn==null?void 0:Qn.is_self))&&ce.createElement(ce.Fragment,null,ce.createElement(Ve.ZP,{onClick:()=>vr(Qn),type:"primary",ghost:!0},"\u5220\u9664"),ce.createElement(Ve.ZP,{onClick:()=>Yn(Qn),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Gn.Ny)()&&ce.createElement(Ve.ZP,{onClick:()=>Mi({is_authority:!(Qn!=null&&Qn.is_authority)}),type:"primary"},ce.createElement("img",{src:Oi}),Qn!=null&&Qn.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Gn.Ny)()&&ce.createElement(Ve.ZP,{onClick:()=>Mi({is_excellent:!(Qn!=null&&Qn.is_excellent)}),type:"primary"},ce.createElement("img",{src:ji}),Qn!=null&&Qn.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),ce.createElement("div",{className:di.scroll},((Lr=(ci=Qn==null?void 0:Qn.videos)==null?void 0:ci[0])==null?void 0:Lr.id)&&ce.createElement("div",{className:di.video},ce.createElement(ee.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Cr=(gi=Qn==null?void 0:Qn.videos)==null?void 0:gi[0])!=null&&Cr.transcoded)},ce.createElement(Ha.Z,{poster:(Rr=(yi=Qn==null?void 0:Qn.videos)==null?void 0:yi[0])==null?void 0:Rr.cover_url,src:((ii=(Hi=Qn==null?void 0:Qn.videos)==null?void 0:Hi[0])==null?void 0:ii.play_url)||"",videoId:(Wi=(ki=Qn==null?void 0:Qn.videos)==null?void 0:ki[0])==null?void 0:Wi.id,logWatchHistory:()=>{}}))),ce.createElement(Le.Z,{className:di.html,value:(Qn==null?void 0:Qn.content)||""}),ce.createElement("div",{onClick:()=>Po(Qn),className:di.g},ce.createElement("img",{className:"mr10",src:(Qn!=null&&Qn.user_liker,Ho)}),ce.createElement("span",null,Qn==null?void 0:Qn.praises_count)),ce.createElement(Ma,{onOk:Zi,active:ft,identifier:_t})),ce.createElement("div",{className:di.btns},ce.createElement(Ve.ZP,{onClick:()=>mn(),type:"primary",ghost:!0},"\u5173\u95ED"),Xn[0]&&ce.createElement(Ve.ZP,{onClick:li=>Tn(li,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Xn[1]&&ce.createElement(Ve.ZP,{onClick:li=>Tn(li,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},vi=Object.defineProperty,si=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,Ji=Object.prototype.propertyIsEnumerable,ro=(ft,_t,St)=>_t in ft?vi(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,co=(ft,_t)=>{for(var St in _t||(_t={}))no.call(_t,St)&&ro(ft,St,_t[St]);if(si)for(var St of si(_t))Ji.call(_t,St)&&ro(ft,St,_t[St]);return ft};const na=ft=>React.createElement("svg",co({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ft),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=Se(59477),Qi=Se(89489),vo=Object.defineProperty,Bo=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,Ia=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,da=(ft,_t,St)=>_t in ft?vo(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,go=(ft,_t)=>{for(var St in _t||(_t={}))ds.call(_t,St)&&da(ft,St,_t[St]);if(Ia)for(var St of Ia(_t))fs.call(_t,St)&&da(ft,St,_t[St]);return ft},Co=(ft,_t)=>Bo(ft,Xo(_t)),Eo=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())}),Qa=({identifier:ft,tabStatus:_t,setFilterListTotal:St,setListStatus:Yn})=>{const Tn={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[mn,xn]=(0,ce.useState)(go({},Tn));const[wn,Mn]=(0,ce.useState)(!1),[Xn,ci]=(0,ce.useState)(0),[Lr,gi]=(0,ce.useState)(1),[Cr,yi]=(0,ce.useState)(null),[Rr,Hi]=(0,ce.useState)([]),[ii,ki]=(0,ce.useState)([!0,!0]),[Wi,oi]=(0,ce.useState)(0),Di=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{Ir()},[_t]),(0,ce.useEffect)(()=>{Qn()},[Cr]),(0,ce.useEffect)(()=>{_i(go({},Tn)),Ir()},[ft]),(0,ce.useEffect)(()=>(window.addEventListener("resize",Fi),Yn(Wi),()=>{window.removeEventListener("resize",Fi)}),[Wi]);const Qn=()=>Eo(void 0,null,function*(){if(!Cr){ki([!0,!0]);return}const ai=[!0,!0],Ai=Rr==null?void 0:Rr.findIndex(io=>io.id===Cr);Ai===0&&mn.page===1&&(ai[0]=!1),(mn.page-1)*mn.limit+(Ai+1)===mn.total&&(ai[1]=!1),ki(ai)}),Fi=()=>{var ai;if(Wi){const Ai=window.innerWidth-((ai=Di.current)==null?void 0:ai.clientWidth);ci(Ai)}},_i=ai=>Eo(void 0,null,function*(){var Ai,io,Ba;Mn(!0);const Fo=yield(0,E.WH)(ft,ai);return(Fo==null?void 0:Fo.status)===0&&(Hi(((Ai=Fo==null?void 0:Fo.data)==null?void 0:Ai.articles)||[]),xn(Co(go({},ai),{total:(io=Fo==null?void 0:Fo.data)==null?void 0:io.articles_count})),St((Ba=Fo==null?void 0:Fo.data)==null?void 0:Ba.articles_count)),Mn(!1),Fo}),Mi=()=>{(mn==null?void 0:mn.sort_direction)===null?mn.sort_direction="asc":(mn==null?void 0:mn.sort_direction)==="asc"?mn.sort_direction="desc":(mn==null?void 0:mn.sort_direction)==="desc"&&(mn.sort_direction=null),mn.page=1,Ir(),xn(go({},mn)),_i(mn)},Po=()=>{mn.page=1,mn.search=mn==null?void 0:mn.save_search,Ir(),xn(go({},mn)),_i(mn)},vr=()=>{var ai;const Ai=document.getElementsByClassName("btn-resize");Ai[0].style.visibility="hidden";const io=window.innerWidth-((ai=Di.current)==null?void 0:ai.clientWidth);ci(io)},Zi=()=>{vr(),oi(1)},li=ai=>{vr(),yi(ai==null?void 0:ai.id),oi(3)},Sr=ai=>{vr(),yi(ai==null?void 0:ai.id),oi(2)},Ir=()=>{const ai=document.getElementsByClassName("btn-resize");ai[0].style.visibility="visible",ci(0),oi(0),yi(null)},mi=ai=>{oi(3),yi(ai),mn.page=1,xn(go({},mn)),_i(mn)},Er=ai=>{oi(3),yi(ai),xn(go({},mn)),_i(mn)},qo=ai=>{xn(go({},mn)),_i(mn)},oo=ai=>Eo(void 0,null,function*(){(yield(0,E.Rg)(ft,{active:ai==null?void 0:ai.id})).status===0&&(_i(mn),gi(Lr+1))}),oa=ai=>Eo(void 0,null,function*(){(yield(0,E.rL)(ft,{active:ai==null?void 0:ai.id})).status===0&&(_i(mn),gi(Lr+1))}),os=ai=>Eo(void 0,null,function*(){(yield(0,E.de)(ft,{active:ai==null?void 0:ai.id})).status===0&&(Ir(),_i(mn))}),aa=ai=>{mn.page=ai,xn(go({},mn)),_i(mn)},ga=(ai,Ai)=>Eo(void 0,null,function*(){var io,Ba,Fo,Cs;const Jo=Rr==null?void 0:Rr.findIndex(ao=>ao.id===Cr);if(console.log(Jo,Ai,22),Ai==="prev"){if(Jo===void 0){te.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo===0){if(mn.page===1){te.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(mn.page!==1){mn.page=mn.page-1,xn(go({},mn));const ao=yield _i(mn);if((ao==null?void 0:ao.status)===0){const Fa=(Fo=ao==null?void 0:ao.data)==null?void 0:Fo.articles[((Ba=(io=ao==null?void 0:ao.data)==null?void 0:io.articles)==null?void 0:Ba.length)-1];yi(Fa==null?void 0:Fa.id),console.log(ai.target,555)}}}else{const ao=Rr[Jo-1];yi(ao==null?void 0:ao.id)}}if(Ai==="next"){if(Jo===void 0){te.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((mn.page-1)*mn.limit+(Jo+1)===mn.total){te.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo+1===mn.limit){mn.page=mn.page+1,xn(go({},mn));const ao=yield _i(mn);if((ao==null?void 0:ao.status)===0){const Fa=(Cs=ao==null?void 0:ao.data)==null?void 0:Cs.articles[0];yi(Fa==null?void 0:Fa.id)}}else{const ao=Rr[Jo+1];yi(ao==null?void 0:ao.id)}}});return ce.createElement("div",{className:kt.wrap,ref:Di},ce.createElement("div",{className:kt.head},ce.createElement("div",{className:kt.sort,onClick:Mi},ce.createElement("span",null,"\u6700\u65B0"),ce.createElement("aside",null,ce.createElement(ca.Z,{style:{color:(mn==null?void 0:mn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),ce.createElement(Qi.Z,{style:{color:(mn==null?void 0:mn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),ce.createElement(Ge.default.Search,{value:mn.save_search,className:kt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:ai=>{mn.save_search=ai.target.value,xn(go({},mn))},onSearch:Po}),ce.createElement("div",{onClick:Zi,className:kt.btn},ce.createElement("img",{src:Go}),"\u5199\u9898\u89E3")),ce.createElement("div",{className:kt.listWarp},ce.createElement(ee.Z,{spinning:wn,className:"mt20"},Rr==null?void 0:Rr.map((ai,Ai)=>{let io=!0;return Ai+1===Rr.length&&Ai!==0&&(io=!1),ce.createElement(Ri,{active:Cr,key:ai.id,data:ai,showLine:io,onClick:li,onAssist:oo,onHide:oa})}),(Rr==null?void 0:Rr.length)===0&&ce.createElement(Ke.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),ce.createElement(dt.Z,{className:kt.pagination,showTotal:ai=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},ai),"\u6761\u6570\u636E"),total:mn.total,showSizeChanger:!1,current:mn==null?void 0:mn.page,onChange:aa,hideOnSinglePage:!0,showQuickJumper:!0}),Wi>0&&ce.createElement("div",{className:kt.fixedRight,style:{width:Xn}},Wi===1&&ce.createElement(Or,{identifier:ft,onClose:Ir,onOk:mi}),Wi===2&&ce.createElement(Or,{active:Cr,identifier:ft,onClose:Ir,onOk:Er}),Wi===3&&ce.createElement(qi,{btnShowStatus:ii,onArticlesSkip:ga,detailsIndex:Lr,active:Cr,identifier:ft,onClose:Ir,onOk:qo,onEdit:Sr,onAssist:oo,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=(ft,_t,St)=>_t in ft?_s(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,ra=(ft,_t)=>{for(var St in _t||(_t={}))Ca.call(_t,St)&&es(ft,St,_t[St]);if($a)for(var St of $a(_t))Ss.call(_t,St)&&es(ft,St,_t[St]);return ft},Za=(ft,_t)=>Oa(ft,bs(_t)),Ea=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())}),ts=({visible:ft,onVisible:_t,value:St,onChange:Yn,setIndex:Tn})=>{var mn;const xn={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[wn,Mn]=(0,ce.useState)(xn);const[Xn,ci]=(0,ce.useState)([]),[Lr,gi]=(0,ce.useState)([]),[Cr,yi]=(0,ce.useState)(!1),Rr=(0,ce.useRef)([]),Hi=(0,ce.useRef)(null),ii=(0,ue.useParams)();(0,ce.useEffect)(()=>(ii!=null&&ii.id&&(Hi.current=setInterval(()=>{ki(30)},3e4)),()=>{clearInterval(Hi.current)}),[]);const ki=vr=>Ea(void 0,null,function*(){const Zi=yield(0,E.uc)(ii==null?void 0:ii.id,{practice_time:vr})});(0,ce.useEffect)(()=>{_i(wn),Qn()},[]),(0,ce.useEffect)(()=>(window.addEventListener("click",oi),()=>{window.removeEventListener("click",oi)}),[ii==null?void 0:ii.save_identifier,ft]),(0,ce.useEffect)(()=>{const vr=Rr.current.findIndex(mi=>mi.identifier===(ii==null?void 0:ii.save_identifier)),Zi=Rr.current[vr-1],li=Rr.current[vr+1],Sr=document.getElementById("oj-prev"),Ir=document.getElementById("oj-next");Zi?Sr.style.display="block":Sr.style.display="none",li?Ir.style.display="block":Ir.style.display="none"},[ii==null?void 0:ii.save_identifier,Rr.current]);const Wi=(vr,Zi)=>{if(vr.id===Zi)return vr;for(let li=0,Sr=vr;Sr=Sr.parentNode;li++){if(Sr.id===Zi)return Sr;if(Sr==document.documentElement)return!1}},oi=vr=>Ea(void 0,null,function*(){!Wi(vr.target,"oj-drawer")&&ft&&_t(!1);const Zi=Rr.current.findIndex(Ir=>Ir.identifier===(ii==null?void 0:ii.save_identifier)),li=Rr.current[Zi-1],Sr=Rr.current[Zi+1];if(vr.target.id==="oj-prev"){if(!li||Zi===-1){te.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}vr.target.style.pointerEvents="none",vr.target.style.cursor="not-allowed",yield Mi(li==null?void 0:li.identifier),Tn("0"),setTimeout(()=>{vr.target.style.pointerEvents="auto",vr.target.style.cursor="pointer"},400)}if(vr.target.id==="oj-next"||vr.target.id==="oj-modal-next"){if(!Sr||Zi===-1){te.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}vr.target.style.pointerEvents="none",vr.target.style.cursor="not-allowed",yield Mi(Sr==null?void 0:Sr.identifier),Tn("0"),setTimeout(()=>{vr.target.style.pointerEvents="auto",vr.target.style.cursor="pointer"},400)}});(0,ce.useEffect)(()=>{Yn(ii==null?void 0:ii.save_identifier);const vr=Lr.findIndex(Zi=>Zi.some(li=>li.identifier===(ii==null?void 0:ii.save_identifier)));Mn(vr===-1?Za(ra({},wn),{page:1}):Za(ra({},wn),{page:vr+1}))},[ii==null?void 0:ii.save_identifier,Lr]);const Di=vr=>{wn.page=1,wn.tag_discipline_id=vr,Mn(ra({},wn)),_i(wn)},Qn=()=>Ea(void 0,null,function*(){const vr=yield(0,Qt.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ci(vr.tag_disciplines||[])}),Fi=vr=>{wn.page=1,wn.difficulty=typeof vr=="number"?vr:null,Mn(ra({},wn)),_i(wn)},_i=vr=>Ea(void 0,null,function*(){var Zi,li;yi(!0);const Sr=yield(0,E.KC)(vr);if(Sr!=null&&Sr.practices_list){for(var Ir=(Zi=Sr==null?void 0:Sr.practices_list)==null?void 0:Zi.length,mi=[],Er=0;Er<Ir;Er+=wn==null?void 0:wn.per_page)mi.push((li=Sr==null?void 0:Sr.practices_list)==null?void 0:li.slice(Er,Er+(wn==null?void 0:wn.per_page)));Mn(Za(ra({},wn),{total:Sr==null?void 0:Sr.practices_count})),Rr.current=(Sr==null?void 0:Sr.practices_list)||[],gi(mi)}yi(!1)}),Mi=(vr,Zi)=>Ea(void 0,null,function*(){const li=yield(0,Qt.ZP)(`/api/practices/${vr}/start`,{method:"get"});(li==null?void 0:li.status)===0&&ue.history.push(`/problems/${li==null?void 0:li.identifier}/oj/${vr}`)}),Po=vr=>{wn.page=vr,Mn(ra({},wn))};return ce.createElement("div",{className:xa.wrap,id:"oj-drawer",style:{left:ft?0:-700}},ce.createElement("div",{className:xa.head},ce.createElement("div",{className:xa.title},"\u9898\u76EE\u5217\u8868"),ce.createElement(Ge.default.Search,{value:wn==null?void 0:wn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:vr=>{wn.save_search=vr.target.value,Mn(ra({},wn))},onSearch:()=>{wn.page=1,wn.search=wn.save_search,Mn(ra({},wn)),_i(wn)}}),ce.createElement(ne.default,{value:wn==null?void 0:wn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:vr=>vr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Di},Xn.map(vr=>ce.createElement(ne.default.Option,{key:vr.id,value:vr.id},vr.name))),ce.createElement(ne.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:vr=>vr.parentNode,value:wn==null?void 0:wn.difficulty,onChange:Fi},ce.createElement(ne.default.Option,{value:1},"\u7B80\u5355"),ce.createElement(ne.default.Option,{value:2},"\u9002\u4E2D"),ce.createElement(ne.default.Option,{value:3},"\u56F0\u96BE"))),ce.createElement("div",{className:xa.content},ce.createElement(ee.Z,{spinning:Cr},(mn=Lr==null?void 0:Lr[wn.page-1])==null?void 0:mn.map(vr=>ce.createElement("div",{key:vr.identifier,className:xa.list,onClick:Zi=>Mi(vr.identifier,Zi)},ce.createElement("i",{style:{visibility:St===vr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),ce.createElement("span",{style:{fontWeight:St===vr.identifier?"bold":400,color:St===vr.identifier?"#ffffff":"#bac4cd"},title:vr==null?void 0:vr.name},vr.name),(vr==null?void 0:vr.difficulty)===1&&ce.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(vr==null?void 0:vr.difficulty)===2&&ce.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(vr==null?void 0:vr.difficulty)===3&&ce.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),ce.createElement("div",{className:xa.footer},ce.createElement(dt.Z,{showTotal:vr=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},vr),"\u6761\u6570\u636E"),total:wn.total,pageSize:wn==null?void 0:wn.per_page,current:wn==null?void 0:wn.page,showSizeChanger:!1,onChange:Po,showQuickJumper:!0,hideOnSinglePage:!0})))},hs=({hack:ft,onTriggerPraise:_t,topicId:St,page:Yn,onPageChange:Tn,user:mn,submitRecords:xn,submitting:wn,submitResult:Mn})=>{const[Xn]=(0,ue.useSearchParams)(),ci=(0,ue.useLocation)(),[Lr,gi]=(0,ce.useState)(Xn.get("tab")||"0"),[Cr,yi]=(0,ce.useState)(0),[Rr,Hi]=(0,ce.useState)(0),[ii,ki]=(0,ce.useState)(0),[Wi,oi]=(0,ce.useState)(),[Di,Qn]=(0,ce.useState)(!1);function Fi(Mi){const Po=Mi.target.id;if(Lr==="3"&&Po!==Lr&&(Rr===1||Rr===2)){le.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,ce.useEffect)(()=>tt.Z.subscribe("to-commit-info",()=>{gi("1")}),[]);function _i(){gi("2")}return ce.createElement("div",{className:pt["left-panel"]},ce.createElement("ul",{className:`${pt["s-navs"]} ${pt["bg-white"]} ${pt.b1}`},ce.createElement("li",{className:"mr40 current"},ce.createElement("img",{onClick:()=>Qn(!0),src:gt})),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Lr==="0"?pt.active:"",id:"0",onClick:Fi},"\u4EFB\u52A1\u63CF\u8FF0")),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Lr==="3"?pt.active:"",id:"3",onClick:Fi},"\u9898\u89E3",ii?`(${ii})`:"")),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Lr==="2"?pt.active:"",id:"2",onClick:Fi},"\u8BC4\u8BBA",Cr?`(${Cr})`:"")),ce.createElement("li",null,ce.createElement("a",{className:Lr==="1"?pt.active:"",id:"1",onClick:Fi},"\u63D0\u4EA4\u8BB0\u5F55"))),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Lr==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},ce.createElement(Re,{hack:ft,onTriggerPraise:_t,toDiscuss:_i})),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Lr==="1"?"":"hide"}`},xn!=null&&xn.records_count?ce.createElement(Be,{page:Yn,onPageChange:Tn,topicId:St,submitting:wn,submitRecords:xn,submitResult:Mn}):ce.createElement(Ke.Z,null)),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Lr==="2"?"":"hide"}`,style:{padding:0}},ce.createElement(Bt,{setDiscussTotal:yi,user:mn,identifier:ft.identifier,hack:ft,onTriggerPraise:_t})),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Lr==="3"?"":"hide"}`,style:{padding:0}},ce.createElement(Qa,{setListStatus:Hi,setFilterListTotal:ki,tabStatus:Lr,identifier:ft.identifier})),ce.createElement(ts,{visible:Di,setIndex:gi,onVisible:Mi=>Qn(Mi),value:Wi,onChange:Mi=>oi(Mi)}))},ka=Se(38273),ps=Se(62522),ms=Se(60515),ws=Se(88977),ns=Se(89392),rs=Se.n(ns),La=Se(56102),Dr=Se(59301),xs=Object.defineProperty,Pa=Object.defineProperties,vs=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,pi=(ft,_t,St)=>_t in ft?xs(ft,_t,{enumerable:!0,configurable:!0,writable:!0,value:St}):ft[_t]=St,_r=(ft,_t)=>{for(var St in _t||(_t={}))is.call(_t,St)&&pi(ft,St,_t[St]);if(ia)for(var St of ia(_t))ma.call(_t,St)&&pi(ft,St,_t[St]);return ft},Ci=(ft,_t)=>Pa(ft,vs(_t)),_o=(ft,_t)=>{var St={};for(var Yn in ft)is.call(ft,Yn)&&_t.indexOf(Yn)<0&&(St[Yn]=ft[Yn]);if(ft!=null&&ia)for(var Yn of ia(ft))_t.indexOf(Yn)<0&&ma.call(ft,Yn)&&(St[Yn]=ft[Yn]);return St},Bi=(ft,_t,St)=>new Promise((Yn,Tn)=>{var mn=Mn=>{try{wn(St.next(Mn))}catch(Xn){Tn(Xn)}},xn=Mn=>{try{wn(St.throw(Mn))}catch(Xn){Tn(Xn)}},wn=Mn=>Mn.done?Yn(Mn.value):Promise.resolve(Mn.value).then(mn,xn);wn((St=St.apply(ft,_t)).next())});const{Countdown:Na}=se.default,va={Java:"java",C:"c",Python:"py","C++":"c"};var Aa=(ft=>(ft[ft.SET_LOADING=0]="SET_LOADING",ft[ft.GET_DATA=1]="GET_DATA",ft[ft.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",ft[ft.SET_DATA=3]="SET_DATA",ft[ft.SET_DEBUGING=4]="SET_DEBUGING",ft[ft.SET_SUBMITING=5]="SET_SUBMITING",ft[ft.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",ft[ft.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",ft[ft.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",ft[ft.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",ft[ft.SET_PAGE=10]="SET_PAGE",ft[ft.GET_LANGUAGE=11]="GET_LANGUAGE",ft[ft.GET_DRAWER=12]="GET_DRAWER",ft))(Aa||{});function Oo(){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(ft,_t){switch(_t.type){case 1:return _r(_r({},ft),_t.payload);case 3:return Ci(_r({},ft),{data:_t.payload});case 0:return Ci(_r({},ft),{loading:_t.payload});case 11:return Ci(_r({},ft),{languageList:_t.payload});case 12:return Ci(_r({},ft),{drawerData:_t.payload});case 9:return Ci(_r({},ft),{showNote:_t.payload});case 4:return Ci(_r({},ft),{debuging:_t.payload});case 5:return Ci(_r({},ft),{submitting:_t.payload});case 2:return Ci(_r({},ft),{submitRecords:_t.payload});case 10:return Ci(_r({},ft),{submitRecordPage:_t.payload});case 6:return Ci(_r({},ft),{executingMessage:_t.payload});case 7:return _r(_r({},ft),_t.payload);case 8:return _r(_r({},ft),_t.payload);default:throw new Error}}var ll=({children:ft})=>{var _t,St,Yn,Tn;const[mn,xn]=(0,ce.useReducer)(sl,fa),{id:wn}=(0,ue.useParams)(),Mn=(0,ue.useLocation)(),[Xn]=(0,ue.useSearchParams)(),{languageValue:ci,languageList:Lr,loading:gi,data:Cr,debugResult:yi,submitResult:Rr,submitRecords:Hi,submitRecordPage:ii,showNote:ki,debuging:Wi,submitting:oi,executingMessage:Di}=mn,[Qn,Fi]=(0,ce.useState)("#FFF"),[_i,Mi]=(0,ce.useState)(null),[Po,vr]=(0,ce.useState)({}),[Zi,li]=(0,ce.useState)(!1),Sr=(0,ce.useRef)(null),Ir=(0,ce.useRef)(null),mi=Cr==null?void 0:Cr.user,Er=Cr==null?void 0:Cr.hack;(0,ce.useEffect)(()=>((0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ce.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,ce.useEffect)(()=>{var fi;if(Zi){const $i=document.getElementById("oj-next"),To=document.getElementById("oj-modal-next");((fi=$i==null?void 0:$i.style)==null?void 0:fi.display)==="none"?To.style.display="none":To.style.display="block"}},[Zi]),(0,ce.useEffect)(()=>{function fi(){return Bi(this,null,function*(){var $i,To,ya;const fo=yield(0,E.fu)(wn);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)),Ir.current=rs().cloneDeep(fo),Ir.current.language=(To=fo==null?void 0:fo.hack)==null?void 0:To.language,xn({type:1,payload:{loading:!1,data:fo}}),xn({type:8,payload:{languageValue:(ya=fo==null?void 0:fo.hack)==null?void 0:ya.language}})}})}wn&&fi()},[wn]),(0,ce.useEffect)(()=>{xn({type:8,payload:{debugResult:void 0}}),oa(),li(!1)},[wn]),(0,ce.useEffect)(()=>{clearTimeout(Sr.current)},[wn]),(0,ce.useEffect)(()=>{oo()},[wn,ii]);const qo=()=>{window.parent.postMessage("backExercise","*")};function oo(){return Bi(this,null,function*(){try{const fi=yield(0,E.zO)(wn,{limit:15,page:ii});xn({type:2,payload:fi})}catch(fi){console.log(fi)}})}function oa(){return Bi(this,null,function*(){try{const fi=yield(0,E.dd)(wn);xn({type:11,payload:fi==null?void 0:fi.data})}catch(fi){console.log(fi)}})}function os(fi){xn({type:10,payload:fi})}function aa(fi){return Bi(this,null,function*(){var $i,To,ya;const fo=((ya=(To=($i=window==null?void 0:window.location)==null?void 0:$i.pathname)==null?void 0:To.split("/"))==null?void 0:ya[2])||wn;return yield(0,E.n4)(fo,fi||{code:rt.Base64.encode(Er.code),language:ci})})}function ga(){return Bi(this,null,function*(){var fi;if(!Er.code||((fi=Er.code)==null?void 0:fi.trim())===""){te.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(!oi){xn({type:5,payload:!0});try{if(tt.Z.publish("to-commit-info"),(yield aa()).status===0){let Ka=function(){return Bi(this,null,function*(){const{status:Va,data:ja}=yield(0,E.rX)(wn,"submit"),as=Oo()-ha>(fo*_a+3)*1e3;if(Va!==0&&!as&&setTimeout(Ka,1e3),as){le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),xn({type:5,payload:!1});return}if(Va===0){ja.status===2&&le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const hl=yield(0,E.zO)(wn,{limit:15,page:ii});xn({type:8,payload:Ci(_r({},mn),{submitResult:ja,submitting:!1,submitRecords:hl})}),(ja==null?void 0:ja.status)===0&&li(!0)}})},To={};if((yield(0,E.bM)(wn,To)).status===-1&&Xn.get("exercisesId")){window.parent.location.href=`/classrooms/${Xn.get("coursesId")}/exercise/${Xn.get("exercisesId")}/detail`;return}const{time_limit:fo,test_case_size:_a}=Er,ha=Oo();Ka()}}catch($i){xn({type:5,payload:!1})}}})}function ai(){return Bi(this,null,function*(){var fi;if(!Er.code||((fi=Er.code)==null?void 0:fi.trim())===""){te.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}mn.debuging=!0,xn({type:4,payload:!0});try{if((yield aa()).status===0){let ha=function(){return Bi(this,null,function*(){const{status:Ka,message:Va,data:ja}=yield(0,E.rX)(wn,"debug"),as=Oo()-_a>(To+3)*1e3;if(Ka!==0&&!as&&(xn({type:6,payload:Va}),setTimeout(ha,1e3)),as){le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),xn({type:4,payload:!1});return}Ka===0&&(xn({type:4,payload:!1}),ja.status===2&&le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),xn({type:7,payload:Ci(_r({},mn),{debugResult:ja,debuging:!1})}))})};const{time_limit:To}=Er;let ya={input:encodeURIComponent(Cr.test_case.input)};if((yield(0,E.MU)(wn,ya)).status===-1&&Xn.get("exercisesId")){window.parent.location.href=`/classrooms/${Xn.get("coursesId")}/exercise/${Xn.get("exercisesId")}/detail`;return}const _a=Oo();ha()}else xn({type:4,payload:!1})}catch($i){console.log($i)}finally{}})}function Ai(fi){var $i;clearTimeout(Sr.current),Sr.current=setTimeout(()=>{var To;aa({code:rt.Base64.encode(fi),language:(To=Ir==null?void 0:Ir.current)==null?void 0:To.language})},2e3),xn({type:3,payload:Ci(_r({},Ir==null?void 0:Ir.current),{hack:Ci(_r({},($i=Ir==null?void 0:Ir.current)==null?void 0:$i.hack),{code:fi})})})}function io(fi){let $i=fi.target.value;xn({type:3,payload:Ci(_r({},Cr),{test_case:{input:$i}})})}const Ba=fi=>Bi(void 0,null,function*(){var $i;if(xn({type:0,payload:!0}),(yield aa()).status===0){xn({type:8,payload:{languageValue:fi}}),Ir.current.language=fi;const ya=`${mi==null?void 0:mi.login}-language`;localStorage.setItem(ya,fi);const fo=yield(0,E.dd)(wn);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(()=>{xn({type:0,payload:!1})},300)});function Fo(){return Bi(this,null,function*(){try{const fi=yield(0,E.H7)(wn,{language:ci});fi.status===401?ue.history.replace("/login",{from:Mn.pathname}):(Ai(rt.Base64.decode(fi.code)),oa())}catch(fi){console.log(fi)}})}function Cs(){le.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Dr.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Dr.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return Bi(this,null,function*(){const fi=yield(0,E.fi)(wn,{language:ci});fi.status===401?ue.history.replace("/login",{from:Mn.pathname}):Ai(rt.Base64.decode(fi.code))})}})}function Jo(){xn({type:9,payload:!0})}function ao(){xn({type:9,payload:!1})}function Fa(fi){return Bi(this,null,function*(){yield(0,E.MK)(wn,fi),xn({type:1,payload:{showNote:!1,data:Ci(_r({},Cr),{hack:Ci(_r({},Er),{notes:fi.notes})})}})})}const dl={input:(_t=Cr==null?void 0:Cr.test_case)==null?void 0:_t.input,is_file:(St=Cr==null?void 0:Cr.test_case)==null?void 0:St.is_file,language:((Yn=Ir.current)==null?void 0:Yn.language)||(Er==null?void 0:Er.language),code:Er==null?void 0:Er.code,title:"main."+va[Er==null?void 0:Er.language],modify_code:Er==null?void 0:Er.modify_code,notes:Er==null?void 0:Er.notes,debugResult:yi,debuging:Wi,submitting:oi,executingMessage:Di,id:wn,languageValue:ci,languageList:Lr,onChangeLanguage:Ba,onCancelNote:ao,onAddNote:Fa,showNote:ki,onShowNote:Jo,onSubmitCode:ga,onChangeCode:Ai,onChangeInput:io,onDebugCode:ai,onResetCode:Fo,onSyncCode:Cs,onUpdateCode:aa};function Xs(){return Bi(this,null,function*(){const{praise_count:fi}=yield(0,E.vl)(Er.id,{container_type:"Hack",type:1});let $i=Ci(_r({},Cr),{hack:Ci(_r({},Er),{praises_count:fi,user_praise:!Er.user_praise})});xn({type:3,payload:$i})})}const fl={topicId:wn,submitResult:Rr,submitRecords:Hi,submitting:oi,page:ii,onPageChange:os,hack:Er,user:Cr==null?void 0:Cr.user,onTriggerPraise:Xs};return console.log(Cr,Ir==null?void 0:Ir.current,"data--------"),Dr.createElement(Dr.Fragment,null,Dr.createElement(ee.Z,{className:"oj-custom-large-spin",size:"large",spinning:gi},Cr?Dr.createElement("div",{className:"oj-custom-warp"},Dr.createElement("header",{className:Ye.Z.header,style:{minWidth:1200}},Dr.createElement("div",null,Dr.createElement("img",{src:`${z.Z.IMG_SERVER}/images/${mi.image_url}`,alt:"user",width:30}),Dr.createElement("span",null,mi.name)),Dr.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Dr.createElement("div",null,Er.name),Dr.createElement(ka.Z,{onChange:fi=>{},className:"font12 c-grey-999"})),Dr.createElement(La.CopyToClipboard,{text:`${(Tn=window.location)==null?void 0:Tn.origin}/problems/${Er.identifier}/share`,onCopy:()=>te.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Dr.createElement("span",{className:Ye.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Dr.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Er.edit_privilege?Dr.createElement(ue.Link,{className:Ye.Z.btn_back,to:`/problems/${Er.identifier}/ojedit`,style:{marginRight:10}}," ",Dr.createElement(ie.Z,null)," \u7F16\u8F91"):null,Dr.createElement(ue.Link,{className:Ye.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Dr.createElement(Ce.Z,null),"\u9000\u51FA")),Dr.createElement(b.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Dr.createElement(hs,_r({},fl)),rightChild:Dr.createElement(cl,_r({},dl))})):null),Dr.createElement(le.default,{centered:!0,closable:!1,width:680,footer:null,open:Zi,className:"oj-modal"},Dr.createElement("section",{className:"oj-modal-content"},Dr.createElement("div",{className:"oj-modal-head"},Dr.createElement("img",{src:ps,alt:""}),Dr.createElement("i",{onClick:()=>li(!1),className:"iconfont icon-guanbi1"})),Dr.createElement("aside",null,Dr.createElement("img",{className:"mr30",src:ws.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Dr.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Rr==null?void 0:Rr.execute_time,"s"),"\u4F18\u4E8E",Dr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Rr==null?void 0:Rr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Dr.createElement("aside",{className:"mb50"},Dr.createElement("img",{src:ms.Z,className:"mr30"}),Dr.createElement("span",{className:"oj-modal-tt"},Dr.createElement("span",null,Dr.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Dr.createElement("span",{className:"c-light-primary"},Rr==null?void 0:Rr.execute_memory,"mb")),Dr.createElement("span",null,Dr.createElement("span",null))),"\u4F18\u4E8E",Dr.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Rr==null?void 0:Rr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Dr.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function ul({languageValue:ft,languageList:_t,onChangeLanguage:St,title:Yn,modify_code:Tn,onSyncCode:mn,onShowCodeSetting:xn,onResetCode:wn}){const Mn=(0,ue.useLocation)(),Xn=()=>{le.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Dr.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:wn})};return Dr.createElement("div",{className:"action-bar"},Dr.createElement(ne.default,{className:"oj-select",value:ft,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:St},_t==null?void 0:_t.map(ci=>Dr.createElement(ne.default.Option,{key:ci.language,value:ci.language},ci.language))),Dr.createElement("span",null),Dr.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Xn},Dr.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Dr.createElement("a",{onClick:xn},Dr.createElement("i",{className:"iconfont icon-shezhi"})))}function cl(ft){var _t=ft,{id:St,input:Yn,is_file:Tn,showNote:mn,onShowNote:xn,notes:wn,onCancelNote:Mn,onAddNote:Xn,debugResult:ci,language:Lr,debuging:gi,submitting:Cr,executingMessage:yi,code:Rr,onSubmitCode:Hi,onDebugCode:ii,onChangeCode:ki,onChangeInput:Wi,onUpdateCode:oi}=_t,Di=_o(_t,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function Qn(_i){return Dr.createElement(ul,Ci(_r({},Di),{onShowCodeSetting:_i}))}const Fi={id:St,input:Yn,debugResult:ci,debuging:gi,is_file:Tn,submitting:Cr,executingMessage:yi,onDebugCode:ii,onChangeCode:ki,onSubmitCode:Hi,onChangeInput:Wi};return Dr.createElement("div",{className:"right-panel"},Dr.createElement(ot,{onUpdateCode:()=>{},language:Lr,value:Rr,onChange:ki,ActionBarRender:Qn}),Dr.createElement("div",{className:`note-form-area ${mn?"active":""}`},Dr.createElement(et,{onCancel:Mn,notes:wn,callback:Xn})),Dr.createElement(ut.ZP,_r({},Fi)))}},49162:function($t,Dt,Se){"use strict";Se.d(Dt,{h:function(){return ce}});var ce=(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))(ce||{})},59205:function($t,Dt,Se){"use strict";Se.d(Dt,{H7:function(){return ne},KC:function(){return re},M3:function(){return ye},MK:function(){return ee},MU:function(){return ue},Rg:function(){return _e},WH:function(){return ae},X6:function(){return te},bM:function(){return Ce},bx:function(){return oe},dd:function(){return z},de:function(){return pe},fi:function(){return E},fu:function(){return ie},gu:function(){return ve},n4:function(){return b},qe:function(){return ge},rL:function(){return he},rX:function(){return le},uc:function(){return ke},vl:function(){return x},wO:function(){return me},zO:function(){return se}});var ce=Se(82093);function ie(Te){return(0,ce.U2)(`mypractices/${Te}.json`,{hidePopLogin:!0})}function Ce(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/code_submit.json`,Ee)}function ue(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/code_debug.json`,Ee)}function se(Te,Ee){return Ee.language&&(Ee.language=encodeURIComponent(Ee.language)),(0,ce.U2)(`mypractices/${Te}/submit_records.json`,Ee)}function te(Te){return(0,ce.U2)("mypractices/record_detail.json",{id:Te})}function le(Te,Ee){return(0,ce.U2)(`mypractices/${Te}/result.json`,{mode:Ee})}function ee(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/add_notes.json`,Ee)}function ne(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/restore_initial_code.json`,Ee)}function E(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/sync_code.json`,Ee)}function b(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/update_code.json`,Ee)}function z(Te){return(0,ce.v_)(`mypractices/${Te}/initial_codes.json`)}function x(Te,Ee){return(0,ce.v_)(`discusses/${Te}/plus.json`,Ee)}function re(Te){return(0,ce.U2)("practices/practices_list.json",Te)}function ae(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles`,Ee)}function oe(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles`,Ee)}function ve(Te,Ee){return(0,ce.gz)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ye(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/edit`,Ee)}function me(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ge(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/set_authority_or_excellent`,Ee)}function _e(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/praise_or_treads`,Ee)}function he(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/hide`)}function pe(Te,Ee){return(0,ce.IV)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ke(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/update_practice_time_sum`,Ee)}},46541:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return x}});var ce=Se(59301),ie=Se(6767),Ce=Se(25399),ue=Se(29787),se=Se(77019),te=Se(5269),le=Se(13747),ee=Se(99571),ne=Se(2978),E=Se(82093),b=Se(38394),z=(ae,oe,ve)=>new Promise((ye,me)=>{var ge=pe=>{try{he(ve.next(pe))}catch(ke){me(ke)}},_e=pe=>{try{he(ve.throw(pe))}catch(ke){me(ke)}},he=pe=>pe.done?ye(pe.value):Promise.resolve(pe.value).then(ge,_e);he((ve=ve.apply(ae,oe)).next())}),x=({id:ae,activeDiscussIndex:oe,onReplyDiscuss:ve,adminOrOperator:ye})=>{const[me,ge]=(0,ce.useState)(""),[_e,he]=(0,ce.useState)(!1);function pe(Te){ge(Te)}function ke(){if(!me){ie.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}ve(ae,me),ge("")}return(0,ce.useEffect)(()=>{oe!=ae&&he(!1)},[oe]),ce.createElement("div",{key:ae,className:"discuss-item-editor",style:{display:oe===ae?"block":"none",width:"100%"}},ce.createElement(ne.Z,{miniToolbar:!0,startInit:oe===ae,defaultValue:me,id:ae,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:pe,extraUse:ye&&ce.createElement(Ce.Z,{color:"#fff",open:_e,destroyTooltipOnHide:!0,title:re({id:ae,isOpen:_e,activeDiscussIndex:oe,onChange:pe,setIsOpen:he}),overlayStyle:{maxWidth:600}},ce.createElement("a",{title:_e?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>he(!_e)},ce.createElement("i",{className:"iconfont icon-dianzan11"})))}),ce.createElement("a",{onClick:ke,className:"btn-send"},"\u53D1\u9001"))};const re=ae=>{const[oe,ve]=(0,ce.useState)(!1),[ye,me]=(0,ce.useState)([]),[ge,_e]=(0,ce.useState)(1);(0,ce.useEffect)(()=>{ae!=null&&ae.isOpen?he():(_e(1),me([]))},[ae==null?void 0:ae.isOpen]);const he=()=>z(void 0,null,function*(){ve(!0);const pe=yield(0,E.ZP)(`/api/discusses/${ae==null?void 0:ae.id}/recommend_answer.json`,{method:"get"});(pe==null?void 0:pe.status)==0&&me(pe==null?void 0:pe.answer),ve(!1)});return ce.createElement(ue.Z,{spinning:oe},ce.createElement("div",{style:{color:"#000"}},ce.createElement(b.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ye==null?void 0:ye[ge-1])||""}),ce.createElement(se.Z,{justify:"end",align:"middle"},ce.createElement(te.Z,null,ce.createElement(le.Z,{simple:!0,current:ge,pageSize:1,total:(ye==null?void 0:ye.length)||0,onChange:pe=>{_e(pe)}})),ce.createElement(te.Z,null,ce.createElement(ee.ZP,{onClick:()=>z(void 0,null,function*(){ae==null||ae.onChange(ye==null?void 0:ye[ge-1]),ae==null||ae.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},12975:function($t,Dt,Se){"use strict";Se.d(Dt,{o:function(){return ne}});var ce=Se(82093),ie=Se(93125),Ce=Se.n(ie);let ue="",se,te="";function le(E){ee(E)}function ee(E){se=new(Ce()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(b){console.log("addFileSuccess: "+b.file.name),E.addFileSuccess&&E.addFileSuccess(b),se.startUpload()},onUploadstarted:function(b){const z=b.file.name;if(b.videoId){var re=`/api/users/${ue}/video_auths.json`;(0,ce.ZP)(re,{method:"put",body:{video_id:b.videoId,title:z,file_name:z,virtual_classroom_id:te}}).then(ae=>{if(ae.status==-1){E.onUploadError&&E.onUploadError(b);return}const oe=ae.data;var ve=oe.UploadAuth,ye=oe.UploadAddress,me=oe.VideoId;se.setUploadAuthAndAddress(b,ve,ye)}).catch(ae=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(ae)})}else{var x=`/api/users/${ue}/video_auths.json`;const ae="";(0,ce.ZP)(x,{method:"Post",body:{title:ae+z,file_name:ae+z,virtual_classroom_id:te}}).then(oe=>{if(oe){const ge=oe.data;var ve=ge.UploadAuth,ye=ge.UploadAddress,me=ge.VideoId;se.setUploadAuthAndAddress(b,ve,ye,me)}}).catch(oe=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(oe)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(b){E.onUploadSucceed&&E.onUploadSucceed(b),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(b,z,x){E.onUploadFailed&&E.onUploadFailed(b),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(b,z,x){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(b,z,x){E.onUploadProgress&&E.onUploadProgress(b,z,x);var re=Math.ceil(x*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(b){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var z=`/api/users/${ue}/video_auths.json`;(0,ce.ZP)(z,{method:"put",body:{video_id:b.videoId}}).then(x=>{var ae=x.data.UploadAuth;se.resumeUploadWithAuth(ae)}).catch(x=>{console.log(x)})},onUploadEnd:function(b){E.onUploadEnd&&E.onUploadEnd(b),console.log("onUploadEnd: uploaded all the files")}}),E.gotUploader&&E.gotUploader(se)}function ne(E,b,z){E&&(ue=E),b&&(te=b),le(z)}},2610:function($t,Dt,Se){"use strict";Se.d(Dt,{BU:function(){return ie},Dj:function(){return ce},gH:function(){return Ce},vp:function(){return ue}});function ce(se){try{se.mozRequestFullScreen?se.mozRequestFullScreen():se.webkitRequestFullScreen&&se.webkitRequestFullScreen()}catch(te){console.log(te,":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 Ce=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function ue(){var se=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,te=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",se),window.isFullScreen?window.isFullScreen:se!=null}},90290:function($t,Dt,Se){"use strict";Se.d(Dt,{AL:function(){return _e},Iy:function(){return b},Qv:function(){return re},ez:function(){return ge},jb:function(){return z}});var ce=Se(32834),ie=Se.n(ce),Ce=Se(11690),ue=Se.n(Ce);let se=1;function te(Ee,Oe){const je=Ee.match(/^(\s+)(?:```)/);if(je===null)return Oe;const Pe=je[1];return Oe.split(`
`).map(Qe=>{const Xe=Qe.match(/^\s+/);if(Xe===null)return Qe;const[ot]=Xe;return ot.length>=Pe.length?Qe.slice(Pe.length):Qe}).join(`
`)}let le=[],ee=["<ul>"];const ne=new(ie()).Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){le.length=0,ee=["<ul>"]}const z={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(Ee,Oe,je,Pe){if(Oe>=Ee.length||Ee[Oe].level<=je)return Oe;var Qe=Ee[Oe];Pe.push("<li><a href='#"+se+Qe.anchor+"'>"+Qe.text+"</a>"),Oe++;var Xe=[];return Oe=x(Ee,Oe,Qe.level,Xe),Xe.length>0&&(Pe.push("<ul>"),Xe.forEach(function(ot){Pe.push(ot)}),Pe.push("</ul>")),Pe.push("</li>"),Oe=x(Ee,Oe,je,Pe),Oe}function re(){return x(le,0,0,ee),ee.push("</ul>"),ee.join("")}const ae={heading(Ee){const Oe=E.exec(Ee);if(se+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Ee){const Oe=this.rules.block.fences.exec(Ee);if(Oe){const je=Oe[0];let Pe=te(je,Oe[3]||"");const Qe=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Xe=ye(),ot=Pe;Pe=Xe,me[Xe]={type:"block",expression:ot}}return{type:"code",raw:je,lang:Qe,text:Pe}}}},oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ve=0;const ye=()=>`__special_katext_id_${ve++}__`;let me={};function ge(){return me}function _e(){ve=0,me={}}function he(Ee){return Ee=Ee.replace(oe,(Oe,je)=>{const Pe=ye();return me[Pe]={type:"inline",expression:je},Pe}),Ee}const pe=ne.listitem;ne.listitem=function(Ee){return pe(he(Ee))};const ke=ne.paragraph;ne.paragraph=function(Ee){return ke(he(Ee))};const Te=ne.tablecell;ne.tablecell=function(Ee,Oe){return Te(he(Ee),Oe)},ne.code=function(Ee,Oe,je){const Pe=(Oe||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Ee}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${je?Ee:(0,Ce.escape)(Ee,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(je?Ee:(0,Ce.escape)(Ee,!0))+"</code></pre>"},ne.heading=function(Ee,Oe,je){let Pe=this.options.headerPrefix+je.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return le.push({anchor:Pe,level:Oe,text:Ee}),"<h"+Oe+' id="'+se+Pe+'">'+Ee+"</h"+Oe+">"},ie().setOptions({silent:!0,gfm:!0,pedantic:!1}),ie().use({tokenizer:ae,renderer:ne}),Dt.ZP=ie()},89613:function($t,Dt,Se){"use strict";Se.d(Dt,{G:function(){return se},t:function(){return ue}});var ce=Se(7062),ie=Se.n(ce);const Ce=null;function ue(te,le){let ee=ie().get("__ec");ee||(ee={}),ee[te]=le,ie().set("__ec",ee)}function se(te,le){let ee=ie().get("__ec");return ee?ee[te]===void 0?le:ee[te]:le}},60513:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return Mr}});class ce{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ie,Ze){return Ie.__proto__=Ze,Ie},Object.assign=Object.assign||function(Ie){if(Ie==null)throw new TypeError("Cannot convert undefined or null to object");let Ze=Object(Ie);for(let qe=1;qe<arguments.length;qe++){let st=arguments[qe];if(st!=null)for(let mt in st)st.hasOwnProperty(mt)&&(Ze[mt]=st[mt])}return Ze},typeof self.Promise!="function"&&Se(3867).polyfill()}}ce.install();var ie=ce,Ce=Se(86204),ue=Se.n(Ce);class se{static e(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","error",qe),se.ENABLE_ERROR&&(console.error?console.error(qe):console.warn?console.warn(qe):console.log(qe))}static i(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","info",qe),se.ENABLE_INFO&&(console.info?console.info(qe):console.log(qe))}static w(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","warn",qe),se.ENABLE_WARN&&(console.warn?console.warn(qe):console.log(qe))}static d(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","debug",qe),se.ENABLE_DEBUG&&(console.debug?console.debug(qe):console.log(qe))}static v(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","verbose",qe),se.ENABLE_VERBOSE&&console.log(qe)}}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(ue());var te=se;class le{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(Ie){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ie,this._totalBytes+=Ie):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ie,this._totalBytes+=Ie):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ie,this._totalBytes+=Ie,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ie=(this._now()-this._lastCheckpoint)/1e3;return Ie==0&&(Ie=1),this._intervalBytes/Ie/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ie=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ie/1024}}var ee=le;class ne{constructor(Ie){this._message=Ie}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class E extends ne{constructor(Ie){super(Ie)}get name(){return"IllegalStateException"}}class b extends ne{constructor(Ie){super(Ie)}get name(){return"InvalidArgumentException"}}class z extends ne{constructor(Ie){super(Ie)}get name(){return"NotImplementedException"}}const x={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},re={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ae{constructor(Ie){this._type=Ie||"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(Ie){this._onContentLengthKnown=Ie}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ie){this._onURLRedirect=Ie}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ie){this._onDataArrival=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onComplete(){return this._onComplete}set onComplete(Ie){this._onComplete=Ie}open(Ie,Ze){throw new z("Unimplemented abstract function!")}abort(){throw new z("Unimplemented abstract function!")}}let oe={};function ve(){let an=self.navigator.userAgent.toLowerCase(),Ie=/(edge)\/([\w.]+)/.exec(an)||/(opr)[\/]([\w.]+)/.exec(an)||/(chrome)[ \/]([\w.]+)/.exec(an)||/(iemobile)[\/]([\w.]+)/.exec(an)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(an)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(an)||/(webkit)[ \/]([\w.]+)/.exec(an)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(an)||/(msie) ([\w.]+)/.exec(an)||an.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(an)||an.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(an)||[],Ze=/(ipad)/.exec(an)||/(ipod)/.exec(an)||/(windows phone)/.exec(an)||/(iphone)/.exec(an)||/(kindle)/.exec(an)||/(android)/.exec(an)||/(windows)/.exec(an)||/(mac)/.exec(an)||/(linux)/.exec(an)||/(cros)/.exec(an)||[],qe={browser:Ie[5]||Ie[3]||Ie[1]||"",version:Ie[2]||Ie[4]||"0",majorVersion:Ie[4]||Ie[2]||"0",platform:Ze[0]||""},st={};if(qe.browser){st[qe.browser]=!0;let mt=qe.majorVersion.split(".");st.version={major:parseInt(qe.majorVersion,10),string:qe.version},mt.length>1&&(st.version.minor=parseInt(mt[1],10)),mt.length>2&&(st.version.build=parseInt(mt[2],10))}if(qe.platform&&(st[qe.platform]=!0),(st.chrome||st.opr||st.safari)&&(st.webkit=!0),st.rv||st.iemobile){st.rv&&delete st.rv;let mt="msie";qe.browser=mt,st[mt]=!0}if(st.edge){delete st.edge;let mt="msedge";qe.browser=mt,st[mt]=!0}if(st.opr){let mt="opera";qe.browser=mt,st[mt]=!0}if(st.safari&&st.android){let mt="android";qe.browser=mt,st[mt]=!0}st.name=qe.browser,st.platform=qe.platform;for(let mt in oe)oe.hasOwnProperty(mt)&&delete oe[mt];Object.assign(oe,st)}ve();var ye=oe;class me extends ae{static isSupported(){try{let Ie=ye.msedge&&ye.version.minor>=15048,Ze=ye.msedge?Ie:!0;return self.fetch&&self.ReadableStream&&Ze}catch(Ie){return!1}}constructor(Ie,Ze){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ie,this._config=Ze,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ie,Ze){this._dataSource=Ie,this._range=Ze;let qe=Ie.url;this._config.reuseRedirectedURL&&Ie.redirectedURL!=null&&(qe=Ie.redirectedURL);let st=this._seekHandler.getConfig(qe,Ze),mt=new self.Headers;if(typeof st.headers=="object"){let kt=st.headers;for(let Nt in kt)kt.hasOwnProperty(Nt)&&mt.append(Nt,kt[Nt])}let Bt={method:"GET",headers:mt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let kt in this._config.headers)mt.append(kt,this._config.headers[kt]);Ie.cors===!1&&(Bt.mode="same-origin"),Ie.withCredentials&&(Bt.credentials="include"),Ie.referrerPolicy&&(Bt.referrerPolicy=Ie.referrerPolicy),this._status=x.kConnecting,self.fetch(st.url,Bt).then(kt=>{if(this._requestAbort){this._requestAbort=!1,this._status=x.kIdle;return}if(kt.ok&&kt.status>=200&&kt.status<=299){if(kt.url!==st.url&&this._onURLRedirect){let nn=this._seekHandler.removeURLParameters(kt.url);this._onURLRedirect(nn)}let Nt=kt.headers.get("Content-Length");return Nt!=null&&(this._contentLength=parseInt(Nt),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,kt.body.getReader())}else if(this._status=x.kError,this._onError)this._onError(re.HTTP_STATUS_CODE_INVALID,{code:kt.status,msg:kt.statusText});else throw new ne("FetchStreamLoader: Http code invalid, "+kt.status+" "+kt.statusText)}).catch(kt=>{if(this._status=x.kError,this._onError)this._onError(re.EXCEPTION,{code:-1,msg:kt.message});else throw kt})}abort(){this._requestAbort=!0}_pump(Ie){return Ie.read().then(Ze=>{if(Ze.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=x.kError;let qe=re.EARLY_EOF,st={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(qe,st);else throw new ne(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,Ie.cancel();this._status=x.kBuffering;let qe=Ze.value.buffer,st=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,st,this._receivedLength),this._pump(Ie)}}).catch(Ze=>{if(Ze.code===11&&ye.msedge)return;this._status=x.kError;let qe=0,st=null;if((Ze.code===19||Ze.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(qe=re.EARLY_EOF,st={code:Ze.code,msg:"Fetch stream meet Early-EOF"}):(qe=re.EXCEPTION,st={code:Ze.code,msg:Ze.message}),this._onError)this._onError(qe,st);else throw new ne(st.msg)})}}var ge=me;class _e extends ae{static isSupported(){try{let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="moz-chunked-arraybuffer",Ie.responseType==="moz-chunked-arraybuffer"}catch(Ie){return te.w("MozChunkedLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ie,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(Ie,Ze){this._dataSource=Ie,this._range=Ze;let qe=Ie.url;this._config.reuseRedirectedURL&&Ie.redirectedURL!=null&&(qe=Ie.redirectedURL);let st=this._seekHandler.getConfig(qe,Ze);this._requestURL=st.url;let mt=this._xhr=new XMLHttpRequest;if(mt.open("GET",st.url,!0),mt.responseType="moz-chunked-arraybuffer",mt.onreadystatechange=this._onReadyStateChange.bind(this),mt.onprogress=this._onProgress.bind(this),mt.onloadend=this._onLoadEnd.bind(this),mt.onerror=this._onXhrError.bind(this),Ie.withCredentials&&(mt.withCredentials=!0),typeof st.headers=="object"){let Bt=st.headers;for(let kt in Bt)Bt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Bt[kt])}if(typeof this._config.headers=="object"){let Bt=this._config.headers;for(let kt in Bt)Bt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Bt[kt])}this._status=x.kConnecting,mt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=x.kComplete}_onReadyStateChange(Ie){let Ze=Ie.target;if(Ze.readyState===2){if(Ze.responseURL!=null&&Ze.responseURL!==this._requestURL&&this._onURLRedirect){let qe=this._seekHandler.removeURLParameters(Ze.responseURL);this._onURLRedirect(qe)}if(Ze.status!==0&&(Ze.status<200||Ze.status>299))if(this._status=x.kError,this._onError)this._onError(re.HTTP_STATUS_CODE_INVALID,{code:Ze.status,msg:Ze.statusText});else throw new ne("MozChunkedLoader: Http code invalid, "+Ze.status+" "+Ze.statusText);else this._status=x.kBuffering}}_onProgress(Ie){if(this._status===x.kError)return;this._contentLength===null&&Ie.total!==null&&Ie.total!==0&&(this._contentLength=Ie.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Ze=Ie.target.response,qe=this._range.from+this._receivedLength;this._receivedLength+=Ze.byteLength,this._onDataArrival&&this._onDataArrival(Ze,qe,this._receivedLength)}_onLoadEnd(Ie){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(Ie){this._status=x.kError;let Ze=0,qe=null;if(this._contentLength&&Ie.loaded<this._contentLength?(Ze=re.EARLY_EOF,qe={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Ze=re.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new ne(qe.msg)}}var he=_e;class pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="ms-stream",Ie.responseType==="ms-stream"}catch(Ie){return Log.w("MSStreamLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ie,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(Ie,Ze){this._internalOpen(Ie,Ze,!1)}_internalOpen(Ie,Ze,qe){this._dataSource=Ie,qe?this._currentRange=Ze:this._totalRange=Ze;let st=Ie.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?st=this._currentRedirectedURL:Ie.redirectedURL!=null&&(st=Ie.redirectedURL));let mt=this._seekHandler.getConfig(st,Ze);this._currentRequestURL=mt.url;let Bt=this._reader=new self.MSStreamReader;Bt.onprogress=this._msrOnProgress.bind(this),Bt.onload=this._msrOnLoad.bind(this),Bt.onerror=this._msrOnError.bind(this);let kt=this._xhr=new XMLHttpRequest;if(kt.open("GET",mt.url,!0),kt.responseType="ms-stream",kt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),kt.onerror=this._xhrOnError.bind(this),Ie.withCredentials&&(kt.withCredentials=!0),typeof mt.headers=="object"){let Nt=mt.headers;for(let nn in Nt)Nt.hasOwnProperty(nn)&&kt.setRequestHeader(nn,Nt[nn])}if(typeof this._config.headers=="object"){let Nt=this._config.headers;for(let nn in Nt)Nt.hasOwnProperty(nn)&&kt.setRequestHeader(nn,Nt[nn])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,kt.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(Ie){let Ze=Ie.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 qe=Ze.getResponseHeader("Content-Length");if(qe!=null&&this._contentLength==null){let st=parseInt(qe);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 qe=Ze.response;this._reader.readAsArrayBuffer(qe)}}_xhrOnError(Ie){this._status=LoaderStatus.kError;let Ze=LoaderErrors.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type};if(this._onError)this._onError(Ze,qe);else throw new RuntimeException(qe.msg)}_msrOnProgress(Ie){let qe=Ie.target.result;if(qe==null){this._doReconnectIfNeeded();return}let st=qe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=qe.byteLength;let mt=this._totalRange.from+this._receivedLength;this._receivedLength+=st.byteLength,this._onDataArrival&&this._onDataArrival(st,mt,this._receivedLength),qe.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${mt+st.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ie={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ie,!0)}}_msrOnLoad(Ie){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ie){this._status=LoaderStatus.kError;let Ze=0,qe=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Ze=LoaderErrors.EARLY_EOF,qe={code:-1,msg:"MSStream meet Early-Eof"}):(Ze=LoaderErrors.EARLY_EOF,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new RuntimeException(qe.msg)}}var ke=null;class Te extends ae{static isSupported(){try{let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="arraybuffer",Ie.responseType==="arraybuffer"}catch(Ie){return te.w("RangeLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ie,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(Ie,Ze){this._dataSource=Ie,this._range=Ze,this._status=x.kConnecting;let qe=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(qe=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!qe?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ie=this._currentChunkSizeKB*1024,Ze=this._range.from+this._receivedLength,qe=Ze+Ie;this._contentLength!=null&&qe-this._range.from>=this._contentLength&&(qe=this._range.from+this._contentLength-1),this._currentRequestRange={from:Ze,to:qe},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ie,Ze){this._lastTimeLoaded=0;let qe=Ie.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?qe=this._currentRedirectedURL:Ie.redirectedURL!=null&&(qe=Ie.redirectedURL));let st=this._seekHandler.getConfig(qe,Ze);this._currentRequestURL=st.url;let mt=this._xhr=new XMLHttpRequest;if(mt.open("GET",st.url,!0),mt.responseType="arraybuffer",mt.onreadystatechange=this._onReadyStateChange.bind(this),mt.onprogress=this._onProgress.bind(this),mt.onload=this._onLoad.bind(this),mt.onerror=this._onXhrError.bind(this),Ie.withCredentials&&(mt.withCredentials=!0),typeof st.headers=="object"){let Bt=st.headers;for(let kt in Bt)Bt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Bt[kt])}if(typeof this._config.headers=="object"){let Bt=this._config.headers;for(let kt in Bt)Bt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Bt[kt])}mt.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(Ie){let Ze=Ie.target;if(Ze.readyState===2){if(Ze.responseURL!=null){let qe=this._seekHandler.removeURLParameters(Ze.responseURL);Ze.responseURL!==this._currentRequestURL&&qe!==this._currentRedirectedURL&&(this._currentRedirectedURL=qe,this._onURLRedirect&&this._onURLRedirect(qe))}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(re.HTTP_STATUS_CODE_INVALID,{code:Ze.status,msg:Ze.statusText});else throw new ne("RangeLoader: Http code invalid, "+Ze.status+" "+Ze.statusText)}}_onProgress(Ie){if(this._status===x.kError)return;if(this._contentLength===null){let qe=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,qe=!0;let st=Ie.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,qe){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let Ze=Ie.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ie.loaded,this._speedSampler.addBytes(Ze)}_normalizeSpeed(Ie){let Ze=this._chunkSizeKBList,qe=Ze.length-1,st=0,mt=0,Bt=qe;if(Ie<Ze[0])return Ze[0];for(;mt<=Bt;){if(st=mt+Math.floor((Bt-mt)/2),st===qe||Ie>=Ze[st]&&Ie<Ze[st+1])return Ze[st];Ze[st]<Ie?mt=st+1:Bt=st-1}}_onLoad(Ie){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 Bt=this._normalizeSpeed(Ze);this._currentSpeedNormalized!==Bt&&(this._currentSpeedNormalized=Bt,this._currentChunkSizeKB=Bt)}let qe=Ie.target.response,st=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength;let mt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():mt=!0,this._onDataArrival&&this._onDataArrival(qe,st,this._receivedLength),mt&&(this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ie){this._status=x.kError;let Ze=0,qe=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Ze=re.EARLY_EOF,qe={code:-1,msg:"RangeLoader meet Early-Eof"}):(Ze=re.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new ne(qe.msg)}}var Ee=Te;class Oe extends ae{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ie){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(Ie){try{let Ze=this._ws=new self.WebSocket(Ie.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 qe={code:Ze.code,msg:Ze.message};if(this._onError)this._onError(re.EXCEPTION,qe);else throw new ne(qe.msg)}}abort(){let Ie=this._ws;Ie&&(Ie.readyState===0||Ie.readyState===1)&&(this._requestAbort=!0,Ie.close()),this._ws=null,this._status=x.kComplete}_onWebSocketOpen(Ie){this._status=x.kBuffering}_onWebSocketClose(Ie){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=x.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ie){if(Ie.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ie.data);else if(Ie.data instanceof Blob){let Ze=new FileReader;Ze.onload=()=>{this._dispatchArrayBuffer(Ze.result)},Ze.readAsArrayBuffer(Ie.data)}else{this._status=x.kError;let Ze={code:-1,msg:"Unsupported WebSocket message type: "+Ie.data.constructor.name};if(this._onError)this._onError(re.EXCEPTION,Ze);else throw new ne(Ze.msg)}}_dispatchArrayBuffer(Ie){let Ze=Ie,qe=this._receivedLength;this._receivedLength+=Ze.byteLength,this._onDataArrival&&this._onDataArrival(Ze,qe,this._receivedLength)}_onWebSocketError(Ie){this._status=x.kError;let Ze={code:Ie.code,msg:Ie.message};if(this._onError)this._onError(re.EXCEPTION,Ze);else throw new ne(Ze.msg)}}var je=Oe;class Pe{constructor(Ie){this._zeroStart=Ie||!1}getConfig(Ie,Ze){let qe={};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()}-`,qe.Range=st}else this._zeroStart&&(qe.Range="bytes=0-");return{url:Ie,headers:qe}}removeURLParameters(Ie){return Ie}}var Qe=Pe;class Xe{constructor(Ie,Ze){this._startName=Ie,this._endName=Ze}getConfig(Ie,Ze){let qe=Ie;if(Ze.from!==0||Ze.to!==-1){let st=!0;qe.indexOf("?")===-1&&(qe+="?",st=!1),st&&(qe+="&"),qe+=`${this._startName}=${Ze.from.toString()}`,Ze.to!==-1&&(qe+=`&${this._endName}=${Ze.to.toString()}`)}return{url:qe,headers:{}}}removeURLParameters(Ie){let Ze=Ie.split("?")[0],qe,st=Ie.indexOf("?");st!==-1&&(qe=Ie.substring(st+1));let mt="";if(qe!=null&&qe.length>0){let Bt=qe.split("&");for(let kt=0;kt<Bt.length;kt++){let Nt=Bt[kt].split("="),nn=kt>0;Nt[0]!==this._startName&&Nt[0]!==this._endName&&(nn&&(mt+="&"),mt+=Bt[kt])}}return mt.length===0?Ze:Ze+"?"+mt}}var ot=Xe;class We{constructor(Ie,Ze,qe){this.TAG="IOController",this._config=Ze,this._extraData=qe,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=Ie,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ie.url),this._refTotalLength=Ie.filesize?Ie.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(Ie){this._extraData=Ie}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ie){this._onDataArrival=Ie}get onSeeked(){return this._onSeeked}set onSeeked(Ie){this._onSeeked=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onComplete(){return this._onComplete}set onComplete(Ie){this._onComplete=Ie}get onRedirect(){return this._onRedirect}set onRedirect(Ie){this._onRedirect=Ie}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ie){this._onRecoveredEarlyEof=Ie}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===Ee?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ie=this._config;if(Ie.seekType==="range")this._seekHandler=new Qe(this._config.rangeLoadZeroStart);else if(Ie.seekType==="param"){let Ze=Ie.seekParamStart||"bstart",qe=Ie.seekParamEnd||"bend";this._seekHandler=new ot(Ze,qe)}else if(Ie.seekType==="custom"){if(typeof Ie.customSeekHandler!="function")throw new b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ie.customSeekHandler}else throw new b(`Invalid seekType in config: ${Ie.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=je;else if(ge.isSupported())this._loaderClass=ge;else if(he.isSupported())this._loaderClass=he;else if(Ee.isSupported())this._loaderClass=Ee;else throw new ne("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(Ie){this._currentRange={from:0,to:-1},Ie&&(this._currentRange.from=Ie),this._speedSampler.reset(),Ie||(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 Ie=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ie,!0)}}seek(Ie){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ie,!0)}_internalSeek(Ie,Ze){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Ze),this._loader.destroy(),this._loader=null;let qe={from:Ie,to:-1};this._currentRange={from:qe.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,qe),this._onSeeked&&this._onSeeked()}updateUrl(Ie){if(!Ie||typeof Ie!="string"||Ie.length===0)throw new b("Url must be a non-empty string!");this._dataSource.url=Ie}_expandBuffer(Ie){let Ze=this._stashSize;for(;Ze+1024*1024*1<Ie;)Ze*=2;if(Ze+=1024*1024*1,Ze===this._bufferSize)return;let qe=new ArrayBuffer(Ze);if(this._stashUsed>0){let st=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(qe,0,Ze).set(st,0)}this._stashBuffer=qe,this._bufferSize=Ze}_normalizeSpeed(Ie){let Ze=this._speedNormalizeList,qe=Ze.length-1,st=0,mt=0,Bt=qe;if(Ie<Ze[0])return Ze[0];for(;mt<=Bt;){if(st=mt+Math.floor((Bt-mt)/2),st===qe||Ie>=Ze[st]&&Ie<Ze[st+1])return Ze[st];Ze[st]<Ie?mt=st+1:Bt=st-1}}_adjustStashSize(Ie){let Ze=0;this._config.isLive||Ie<512?Ze=Ie:Ie>=512&&Ie<=1024?Ze=Math.floor(Ie*1.5):Ze=Ie*2,Ze>8192&&(Ze=8192);let qe=Ze*1024+1024*1024*1;this._bufferSize<qe&&this._expandBuffer(qe),this._stashSize=Ze*1024}_dispatchChunks(Ie,Ze){return this._currentRange.to=Ze+Ie.byteLength-1,this._onDataArrival(Ie,Ze)}_onURLRedirect(Ie){this._redirectedURL=Ie,this._onRedirect&&this._onRedirect(Ie)}_onContentLengthKnown(Ie){Ie&&this._fullRequestFlag&&(this._totalLength=Ie,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ie,Ze,qe){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(Ie.byteLength);let st=this._speedSampler.lastSecondKBps;if(st!==0){let mt=this._normalizeSpeed(st);this._speedNormalized!==mt&&(this._speedNormalized=mt,this._adjustStashSize(mt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Ze),this._stashUsed+Ie.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength;else{let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Bt=this._stashBuffer.slice(0,this._stashUsed),kt=this._dispatchChunks(Bt,this._stashByteStart);if(kt<Bt.byteLength){if(kt>0){let Nt=new Uint8Array(Bt,kt);mt.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=kt}}else this._stashUsed=0,this._stashByteStart+=kt;this._stashUsed+Ie.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ie.byteLength),mt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),mt.set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength}else{let Bt=this._dispatchChunks(Ie,Ze);if(Bt<Ie.byteLength){let kt=Ie.byteLength-Bt;kt>this._bufferSize&&(this._expandBuffer(kt),mt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),mt.set(new Uint8Array(Ie,Bt),0),this._stashUsed+=kt,this._stashByteStart=Ze+Bt}}}else if(this._stashUsed===0){let mt=this._dispatchChunks(Ie,Ze);if(mt<Ie.byteLength){let Bt=Ie.byteLength-mt;Bt>this._bufferSize&&this._expandBuffer(Bt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ie,mt),0),this._stashUsed+=Bt,this._stashByteStart=Ze+mt}}else{this._stashUsed+Ie.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ie.byteLength);let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize);mt.set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength;let Bt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Bt<this._stashUsed&&Bt>0){let kt=new Uint8Array(this._stashBuffer,Bt);mt.set(kt,0)}this._stashUsed-=Bt,this._stashByteStart+=Bt}}_flushStashBuffer(Ie){if(this._stashUsed>0){let Ze=this._stashBuffer.slice(0,this._stashUsed),qe=this._dispatchChunks(Ze,this._stashByteStart),st=Ze.byteLength-qe;if(qe<Ze.byteLength)if(Ie)te.w(this.TAG,`${st} bytes unconsumed data remain when flush buffer, dropped`);else{if(qe>0){let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize),Bt=new Uint8Array(Ze,qe);mt.set(Bt,0),this._stashUsed=Bt.byteLength,this._stashByteStart+=qe}return 0}return this._stashUsed=0,this._stashByteStart=0,st}return 0}_onLoaderComplete(Ie,Ze){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ie,Ze){switch(te.e(this.TAG,`Loader error, code = ${Ze.code}, msg = ${Ze.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ie=re.UNRECOVERABLE_EARLY_EOF),Ie){case re.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let qe=this._currentRange.to+1;qe<this._totalLength&&(te.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(qe,!1));return}Ie=re.UNRECOVERABLE_EARLY_EOF;break}case re.UNRECOVERABLE_EARLY_EOF:case re.CONNECTING_TIMEOUT:case re.HTTP_STATUS_CODE_INVALID:case re.EXCEPTION:break}if(this._onError)this._onError(Ie,Ze);else throw new ne("IOException: "+Ze.msg)}}var rt=We;const Ye={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 ut(){return Object.assign({},Ye)}class Ge{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ie=new rt({},ut()),Ze=Ie.loaderType;return Ie.destroy(),Ze=="fetch-stream-loader"||Ze=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ie=new rt({},ut()),Ze=Ie.loaderType;return Ie.destroy(),Ze}static supportNativeMediaPlayback(Ie){Ge.videoElement==null&&(Ge.videoElement=window.document.createElement("video"));let Ze=Ge.videoElement.canPlayType(Ie);return Ze==="probably"||Ze=="maybe"}static getFeatureList(){let Ie={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ie.mseFlvPlayback=Ge.supportMSEH264Playback(),Ie.networkStreamIO=Ge.supportNetworkStreamIO(),Ie.networkLoaderName=Ge.getNetworkLoaderTypeName(),Ie.mseLiveFlvPlayback=Ie.mseFlvPlayback&&Ie.networkStreamIO,Ie.nativeMP4H264Playback=Ge.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ie.nativeWebmVP8Playback=Ge.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ie.nativeWebmVP9Playback=Ge.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ie}}var ze=Ge,$e={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 nt{static get forceGlobalTag(){return te.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ie){te.FORCE_GLOBAL_TAG=Ie,nt._notifyChange()}static get globalTag(){return te.GLOBAL_TAG}static set globalTag(Ie){te.GLOBAL_TAG=Ie,nt._notifyChange()}static get enableAll(){return te.ENABLE_VERBOSE&&te.ENABLE_DEBUG&&te.ENABLE_INFO&&te.ENABLE_WARN&&te.ENABLE_ERROR}static set enableAll(Ie){te.ENABLE_VERBOSE=Ie,te.ENABLE_DEBUG=Ie,te.ENABLE_INFO=Ie,te.ENABLE_WARN=Ie,te.ENABLE_ERROR=Ie,nt._notifyChange()}static get enableDebug(){return te.ENABLE_DEBUG}static set enableDebug(Ie){te.ENABLE_DEBUG=Ie,nt._notifyChange()}static get enableVerbose(){return te.ENABLE_VERBOSE}static set enableVerbose(Ie){te.ENABLE_VERBOSE=Ie,nt._notifyChange()}static get enableInfo(){return te.ENABLE_INFO}static set enableInfo(Ie){te.ENABLE_INFO=Ie,nt._notifyChange()}static get enableWarn(){return te.ENABLE_WARN}static set enableWarn(Ie){te.ENABLE_WARN=Ie,nt._notifyChange()}static get enableError(){return te.ENABLE_ERROR}static set enableError(Ie){te.ENABLE_ERROR=Ie,nt._notifyChange()}static getConfig(){return{globalTag:te.GLOBAL_TAG,forceGlobalTag:te.FORCE_GLOBAL_TAG,enableVerbose:te.ENABLE_VERBOSE,enableDebug:te.ENABLE_DEBUG,enableInfo:te.ENABLE_INFO,enableWarn:te.ENABLE_WARN,enableError:te.ENABLE_ERROR,enableCallback:te.ENABLE_CALLBACK}}static applyConfig(Ie){te.GLOBAL_TAG=Ie.globalTag,te.FORCE_GLOBAL_TAG=Ie.forceGlobalTag,te.ENABLE_VERBOSE=Ie.enableVerbose,te.ENABLE_DEBUG=Ie.enableDebug,te.ENABLE_INFO=Ie.enableInfo,te.ENABLE_WARN=Ie.enableWarn,te.ENABLE_ERROR=Ie.enableError,te.ENABLE_CALLBACK=Ie.enableCallback}static _notifyChange(){let Ie=nt.emitter;if(Ie.listenerCount("change")>0){let Ze=nt.getConfig();Ie.emit("change",Ze)}}static registerListener(Ie){nt.emitter.addListener("change",Ie)}static removeListener(Ie){nt.emitter.removeListener("change",Ie)}static addLogListener(Ie){te.emitter.addListener("log",Ie),te.emitter.listenerCount("log")>0&&(te.ENABLE_CALLBACK=!0,nt._notifyChange())}static removeLogListener(Ie){te.emitter.removeListener("log",Ie),te.emitter.listenerCount("log")===0&&(te.ENABLE_CALLBACK=!1,nt._notifyChange())}}nt.emitter=new(ue());var et=nt;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 Ie=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&&Ie&&Ze}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ie){if(this.keyframesIndex==null)return null;let Ze=this.keyframesIndex,qe=this._search(Ze.times,Ie);return{index:qe,milliseconds:Ze.times[qe],fileposition:Ze.filepositions[qe]}}_search(Ie,Ze){let qe=0,st=Ie.length-1,mt=0,Bt=0,kt=st;for(Ze<Ie[0]&&(qe=0,Bt=kt+1);Bt<=kt;)if(mt=Bt+Math.floor((kt-Bt)/2),mt===st||Ze>=Ie[mt]&&Ze<Ie[mt+1]){qe=mt;break}else Ie[mt]<Ze?Bt=mt+1:kt=mt-1;return qe}}var ct=pt;function Rt(an,Ie,Ze){let qe=an;if(Ie+Ze<qe.length){for(;Ze--;)if((qe[++Ie]&192)!==128)return!1;return!0}else return!1}function dt(an){let Ie=[],Ze=an,qe=0,st=an.length;for(;qe<st;){if(Ze[qe]<128){Ie.push(String.fromCharCode(Ze[qe])),++qe;continue}else if(!(Ze[qe]<192)){if(Ze[qe]<224){if(Rt(Ze,qe,1)){let mt=(Ze[qe]&31)<<6|Ze[qe+1]&63;if(mt>=128){Ie.push(String.fromCharCode(mt&65535)),qe+=2;continue}}}else if(Ze[qe]<240){if(Rt(Ze,qe,2)){let mt=(Ze[qe]&15)<<12|(Ze[qe+1]&63)<<6|Ze[qe+2]&63;if(mt>=2048&&(mt&63488)!==55296){Ie.push(String.fromCharCode(mt&65535)),qe+=3;continue}}}else if(Ze[qe]<248&&Rt(Ze,qe,3)){let mt=(Ze[qe]&7)<<18|(Ze[qe+1]&63)<<12|(Ze[qe+2]&63)<<6|Ze[qe+3]&63;if(mt>65536&&mt<1114112){mt-=65536,Ie.push(String.fromCharCode(mt>>>10|55296)),Ie.push(String.fromCharCode(mt&1023|56320)),qe+=4;continue}}}Ie.push("\uFFFD"),++qe}return Ie.join("")}var Mt=dt;let xt=function(){let an=new ArrayBuffer(2);return new DataView(an).setInt16(0,256,!0),new Int16Array(an)[0]===256}();class yt{static parseScriptData(Ie,Ze,qe){let st={};try{let mt=yt.parseValue(Ie,Ze,qe),Bt=yt.parseValue(Ie,Ze+mt.size,qe-mt.size);st[mt.data]=Bt.data}catch(mt){te.e("AMF",mt.toString())}return st}static parseObject(Ie,Ze,qe){if(qe<3)throw new E("Data not enough when parse ScriptDataObject");let st=yt.parseString(Ie,Ze,qe),mt=yt.parseValue(Ie,Ze+st.size,qe-st.size),Bt=mt.objectEnd;return{data:{name:st.data,value:mt.data},size:st.size+mt.size,objectEnd:Bt}}static parseVariable(Ie,Ze,qe){return yt.parseObject(Ie,Ze,qe)}static parseString(Ie,Ze,qe){if(qe<2)throw new E("Data not enough when parse String");let mt=new DataView(Ie,Ze,qe).getUint16(0,!xt),Bt;return mt>0?Bt=Mt(new Uint8Array(Ie,Ze+2,mt)):Bt="",{data:Bt,size:2+mt}}static parseLongString(Ie,Ze,qe){if(qe<4)throw new E("Data not enough when parse LongString");let mt=new DataView(Ie,Ze,qe).getUint32(0,!xt),Bt;return mt>0?Bt=Mt(new Uint8Array(Ie,Ze+4,mt)):Bt="",{data:Bt,size:4+mt}}static parseDate(Ie,Ze,qe){if(qe<10)throw new E("Data size invalid when parse Date");let st=new DataView(Ie,Ze,qe),mt=st.getFloat64(0,!xt),Bt=st.getInt16(8,!xt);return mt+=Bt*60*1e3,{data:new Date(mt),size:10}}static parseValue(Ie,Ze,qe){if(qe<1)throw new E("Data not enough when parse Value");let st=new DataView(Ie,Ze,qe),mt=1,Bt=st.getUint8(0),kt,Nt=!1;try{switch(Bt){case 0:kt=st.getFloat64(1,!xt),mt+=8;break;case 1:{kt=!!st.getUint8(1),mt+=1;break}case 2:{let nn=yt.parseString(Ie,Ze+1,qe-1);kt=nn.data,mt+=nn.size;break}case 3:{kt={};let nn=0;for((st.getUint32(qe-4,!xt)&16777215)===9&&(nn=3);mt<qe-4;){let An=yt.parseObject(Ie,Ze+mt,qe-mt-nn);if(An.objectEnd)break;kt[An.data.name]=An.data.value,mt+=An.size}mt<=qe-3&&(st.getUint32(mt-1,!xt)&16777215)===9&&(mt+=3);break}case 8:{kt={},mt+=4;let nn=0;for((st.getUint32(qe-4,!xt)&16777215)===9&&(nn=3);mt<qe-8;){let An=yt.parseVariable(Ie,Ze+mt,qe-mt-nn);if(An.objectEnd)break;kt[An.data.name]=An.data.value,mt+=An.size}mt<=qe-3&&(st.getUint32(mt-1,!xt)&16777215)===9&&(mt+=3);break}case 9:kt=void 0,mt=1,Nt=!0;break;case 10:{kt=[];let nn=st.getUint32(1,!xt);mt+=4;for(let An=0;An<nn;An++){let Vn=yt.parseValue(Ie,Ze+mt,qe-mt);kt.push(Vn.data),mt+=Vn.size}break}case 11:{let nn=yt.parseDate(Ie,Ze+1,qe-1);kt=nn.data,mt+=nn.size;break}case 12:{let nn=yt.parseString(Ie,Ze+1,qe-1);kt=nn.data,mt+=nn.size;break}default:mt=qe,te.w("AMF","Unsupported AMF value type "+Bt)}}catch(nn){te.e("AMF",nn.toString())}return{data:kt,size:mt,objectEnd:Nt}}}var bt=yt;class He{constructor(Ie){this.TAG="ExpGolomb",this._buffer=Ie,this._buffer_index=0,this._total_bytes=Ie.byteLength,this._total_bits=Ie.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ie=this._total_bytes-this._buffer_index;if(Ie<=0)throw new E("ExpGolomb: _fillCurrentWord() but no bytes available");let Ze=Math.min(4,Ie),qe=new Uint8Array(4);qe.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Ze)),this._current_word=new DataView(qe.buffer).getUint32(0,!1),this._buffer_index+=Ze,this._current_word_bits_left=Ze*8}readBits(Ie){if(Ie>32)throw new b("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ie<=this._current_word_bits_left){let Bt=this._current_word>>>32-Ie;return this._current_word<<=Ie,this._current_word_bits_left-=Ie,Bt}let Ze=this._current_word_bits_left?this._current_word:0;Ze=Ze>>>32-this._current_word_bits_left;let qe=Ie-this._current_word_bits_left;this._fillCurrentWord();let st=Math.min(qe,this._current_word_bits_left),mt=this._current_word>>>32-st;return this._current_word<<=st,this._current_word_bits_left-=st,Ze=Ze<<st|mt,Ze}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ie;for(Ie=0;Ie<this._current_word_bits_left;Ie++)if(this._current_word&2147483648>>>Ie)return this._current_word<<=Ie,this._current_word_bits_left-=Ie,Ie;return this._fillCurrentWord(),Ie+this._skipLeadingZero()}readUEG(){let Ie=this._skipLeadingZero();return this.readBits(Ie+1)-1}readSEG(){let Ie=this.readUEG();return Ie&1?Ie+1>>>1:-1*(Ie>>>1)}}var Ae=He;class be{static _ebsp2rbsp(Ie){let Ze=Ie,qe=Ze.byteLength,st=new Uint8Array(qe),mt=0;for(let Bt=0;Bt<qe;Bt++)Bt>=2&&Ze[Bt]===3&&Ze[Bt-1]===0&&Ze[Bt-2]===0||(st[mt]=Ze[Bt],mt++);return new Uint8Array(st.buffer,0,mt)}static parseSPS(Ie){let Ze=be._ebsp2rbsp(Ie),qe=new Ae(Ze);qe.readByte();let st=qe.readByte();qe.readByte();let mt=qe.readByte();qe.readUEG();let Bt=be.getProfileString(st),kt=be.getLevelString(mt),Nt=1,nn=420,An=[0,420,422,444],Vn=8;if((st===100||st===110||st===122||st===244||st===44||st===83||st===86||st===118||st===128||st===138||st===144)&&(Nt=qe.readUEG(),Nt===3&&qe.readBits(1),Nt<=3&&(nn=An[Nt]),Vn=qe.readUEG()+8,qe.readUEG(),qe.readBits(1),qe.readBool())){let Tr=Nt!==3?8:12;for(let Pr=0;Pr<Tr;Pr++)qe.readBool()&&(Pr<6?be._skipScalingList(qe,16):be._skipScalingList(qe,64))}qe.readUEG();let At=qe.readUEG();if(At===0)qe.readUEG();else if(At===1){qe.readBits(1),qe.readSEG(),qe.readSEG();let Tr=qe.readUEG();for(let Pr=0;Pr<Tr;Pr++)qe.readSEG()}let wt=qe.readUEG();qe.readBits(1);let dn=qe.readUEG(),Gt=qe.readUEG(),Et=qe.readBits(1);Et===0&&qe.readBits(1),qe.readBits(1);let Ht=0,on=0,sn=0,yn=0;qe.readBool()&&(Ht=qe.readUEG(),on=qe.readUEG(),sn=qe.readUEG(),yn=qe.readUEG());let Cn=1,Vt=1,Pn=0,bn=!0,zn=0,Bn=0;if(qe.readBool()){if(qe.readBool()){let Tr=qe.readByte(),Pr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Xr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Tr>0&&Tr<16?(Cn=Pr[Tr-1],Vt=Xr[Tr-1]):Tr===255&&(Cn=qe.readByte()<<8|qe.readByte(),Vt=qe.readByte()<<8|qe.readByte())}if(qe.readBool()&&qe.readBool(),qe.readBool()&&(qe.readBits(4),qe.readBool()&&qe.readBits(24)),qe.readBool()&&(qe.readUEG(),qe.readUEG()),qe.readBool()){let Tr=qe.readBits(32),Pr=qe.readBits(32);bn=qe.readBool(),zn=Pr,Bn=Tr*2,Pn=zn/Bn}}let cr=1;(Cn!==1||Vt!==1)&&(cr=Cn/Vt);let pr=0,Nr=0;if(Nt===0)pr=1,Nr=2-Et;else{let Tr=Nt===3?1:2,Pr=Nt===1?2:1;pr=Tr,Nr=Pr*(2-Et)}let Br=(dn+1)*16,ei=(2-Et)*((Gt+1)*16);Br-=(Ht+on)*pr,ei-=(sn+yn)*Nr;let xr=Math.ceil(Br*cr);return qe.destroy(),qe=null,{profile_string:Bt,level_string:kt,bit_depth:Vn,ref_frames:wt,chroma_format:nn,chroma_format_string:be.getChromaFormatString(nn),frame_rate:{fixed:bn,fps:Pn,fps_den:Bn,fps_num:zn},sar_ratio:{width:Cn,height:Vt},codec_size:{width:Br,height:ei},present_size:{width:xr,height:ei}}}static _skipScalingList(Ie,Ze){let qe=8,st=8,mt=0;for(let Bt=0;Bt<Ze;Bt++)st!==0&&(mt=Ie.readSEG(),st=(qe+mt+256)%256),qe=st===0?qe:st}static getProfileString(Ie){switch(Ie){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(Ie){return(Ie/10).toFixed(1)}static getChromaFormatString(Ie){switch(Ie){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Be=be,Ne={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function De(an){return an>>>8&255|(an&255)<<8}function we(an){return(an&4278190080)>>>24|(an&16711680)>>>8|(an&65280)<<8|(an&255)<<24}function Le(an,Ie){return an[Ie]<<24|an[Ie+1]<<16|an[Ie+2]<<8|an[Ie+3]}class Ue{constructor(Ie,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=Ie.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ie.hasAudioTrack,this._hasVideo=Ie.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new ct,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 qe=new ArrayBuffer(2);return new DataView(qe).setInt16(0,256,!0),new Int16Array(qe)[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(Ie){let Ze=new Uint8Array(Ie),qe={match:!1};if(Ze[0]!==70||Ze[1]!==76||Ze[2]!==86||Ze[3]!==1)return qe;let st=(Ze[4]&4)>>>2!==0,mt=(Ze[4]&1)!==0,Bt=Le(Ze,5);return Bt<9?qe:{match:!0,consumed:Bt,dataOffset:Bt,hasAudioTrack:st,hasVideoTrack:mt}}bindDataSource(Ie){return Ie.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ie){this._onTrackMetadata=Ie}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ie){this._onMediaInfo=Ie}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ie){this._onMetaDataArrived=Ie}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ie){this._onScriptDataArrived=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ie){this._onDataAvailable=Ie}get timestampBase(){return this._timestampBase}set timestampBase(Ie){this._timestampBase=Ie}get overridedDuration(){return this._duration}set overridedDuration(Ie){this._durationOverrided=!0,this._duration=Ie,this._mediaInfo.duration=Ie}set overridedHasAudio(Ie){this._hasAudioFlagOverrided=!0,this._hasAudio=Ie,this._mediaInfo.hasAudio=Ie}set overridedHasVideo(Ie){this._hasVideoFlagOverrided=!0,this._hasVideo=Ie,this._mediaInfo.hasVideo=Ie}resetMediaInfo(){this._mediaInfo=new ct}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ie,Ze){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new E("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let qe=0,st=this._littleEndian;if(Ze===0)if(Ie.byteLength>13)qe=Ue.probe(Ie).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Ze+qe!==this._dataOffset&&te.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ie,qe).getUint32(0,!st)!==0&&te.w(this.TAG,"PrevTagSize0 !== 0 !!!"),qe+=4);qe<Ie.byteLength;){this._dispatch=!0;let mt=new DataView(Ie,qe);if(qe+11+4>Ie.byteLength)break;let Bt=mt.getUint8(0),kt=mt.getUint32(0,!st)&16777215;if(qe+11+kt+4>Ie.byteLength)break;if(Bt!==8&&Bt!==9&&Bt!==18){te.w(this.TAG,`Unsupported tag type ${Bt}, skipped`),qe+=11+kt+4;continue}let Nt=mt.getUint8(4),nn=mt.getUint8(5),An=mt.getUint8(6),Vn=mt.getUint8(7),At=An|nn<<8|Nt<<16|Vn<<24;(mt.getUint32(7,!st)&16777215)!==0&&te.w(this.TAG,"Meet tag which has StreamID != 0!");let dn=qe+11;switch(Bt){case 8:this._parseAudioData(Ie,dn,kt,At);break;case 9:this._parseVideoData(Ie,dn,kt,At,Ze+qe);break;case 18:this._parseScriptData(Ie,dn,kt);break}let Gt=mt.getUint32(11+kt,!st);Gt!==11+kt&&te.w(this.TAG,`Invalid PrevTagSize ${Gt}`),qe+=11+kt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),qe}_parseScriptData(Ie,Ze,qe){let st=bt.parseScriptData(Ie,Ze,qe);if(st.hasOwnProperty("onMetaData")){if(st.onMetaData==null||typeof st.onMetaData!="object"){te.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&te.w(this.TAG,"Found another onMetaData tag!"),this._metadata=st;let mt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},mt)),typeof mt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=mt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof mt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=mt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof mt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=mt.audiodatarate),typeof mt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=mt.videodatarate),typeof mt.width=="number"&&(this._mediaInfo.width=mt.width),typeof mt.height=="number"&&(this._mediaInfo.height=mt.height),typeof mt.duration=="number"){if(!this._durationOverrided){let Bt=Math.floor(mt.duration*this._timescale);this._duration=Bt,this._mediaInfo.duration=Bt}}else this._mediaInfo.duration=0;if(typeof mt.framerate=="number"){let Bt=Math.floor(mt.framerate*1e3);if(Bt>0){let kt=Bt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=kt,this._referenceFrameRate.fps_num=Bt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=kt}}if(typeof mt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Bt=mt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Bt),mt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=mt,te.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(Ie){let Ze=[],qe=[];for(let st=1;st<Ie.times.length;st++){let mt=this._timestampBase+Math.floor(Ie.times[st]*1e3);Ze.push(mt),qe.push(Ie.filepositions[st])}return{times:Ze,filepositions:qe}}_parseAudioData(Ie,Ze,qe,st){if(qe<=1){te.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let mt=this._littleEndian,kt=new DataView(Ie,Ze,qe).getUint8(0),Nt=kt>>>4;if(Nt!==2&&Nt!==10){this._onError(Ne.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Nt);return}let nn=0,An=(kt&12)>>>2;if(An>=0&&An<=4)nn=this._flvSoundRateTable[An];else{this._onError(Ne.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+An);return}let Vn=(kt&2)>>>1,At=kt&1,wt=this._audioMetadata,dn=this._audioTrack;if(wt||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),wt=this._audioMetadata={},wt.type="audio",wt.id=dn.id,wt.timescale=this._timescale,wt.duration=this._duration,wt.audioSampleRate=nn,wt.channelCount=At===0?1:2),Nt===10){let Gt=this._parseAACAudioData(Ie,Ze+1,qe-1);if(Gt==null)return;if(Gt.packetType===0){wt.config&&te.w(this.TAG,"Found another AudioSpecificConfig!");let Et=Gt.data;wt.audioSampleRate=Et.samplingRate,wt.channelCount=Et.channelCount,wt.codec=Et.codec,wt.originalCodec=Et.originalCodec,wt.config=Et.config,wt.refSampleDuration=1024/wt.audioSampleRate*wt.timescale,te.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",wt);let Ht=this._mediaInfo;Ht.audioCodec=wt.originalCodec,Ht.audioSampleRate=wt.audioSampleRate,Ht.audioChannelCount=wt.channelCount,Ht.hasVideo?Ht.videoCodec!=null&&(Ht.mimeType='video/x-flv; codecs="'+Ht.videoCodec+","+Ht.audioCodec+'"'):Ht.mimeType='video/x-flv; codecs="'+Ht.audioCodec+'"',Ht.isComplete()&&this._onMediaInfo(Ht)}else if(Gt.packetType===1){let Et=this._timestampBase+st,Ht={unit:Gt.data,length:Gt.data.byteLength,dts:Et,pts:Et};dn.samples.push(Ht),dn.length+=Gt.data.length}else te.e(this.TAG,`Flv: Unsupported AAC data type ${Gt.packetType}`)}else if(Nt===2){if(!wt.codec){let on=this._parseMP3AudioData(Ie,Ze+1,qe-1,!0);if(on==null)return;wt.audioSampleRate=on.samplingRate,wt.channelCount=on.channelCount,wt.codec=on.codec,wt.originalCodec=on.originalCodec,wt.refSampleDuration=1152/wt.audioSampleRate*wt.timescale,te.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",wt);let sn=this._mediaInfo;sn.audioCodec=wt.codec,sn.audioSampleRate=wt.audioSampleRate,sn.audioChannelCount=wt.channelCount,sn.audioDataRate=on.bitRate,sn.hasVideo?sn.videoCodec!=null&&(sn.mimeType='video/x-flv; codecs="'+sn.videoCodec+","+sn.audioCodec+'"'):sn.mimeType='video/x-flv; codecs="'+sn.audioCodec+'"',sn.isComplete()&&this._onMediaInfo(sn)}let Gt=this._parseMP3AudioData(Ie,Ze+1,qe-1,!1);if(Gt==null)return;let Et=this._timestampBase+st,Ht={unit:Gt,length:Gt.byteLength,dts:Et,pts:Et};dn.samples.push(Ht),dn.length+=Gt.length}}_parseAACAudioData(Ie,Ze,qe){if(qe<=1){te.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let st={},mt=new Uint8Array(Ie,Ze,qe);return st.packetType=mt[0],mt[0]===0?st.data=this._parseAACAudioSpecificConfig(Ie,Ze+1,qe-1):st.data=mt.subarray(1),st}_parseAACAudioSpecificConfig(Ie,Ze,qe){let st=new Uint8Array(Ie,Ze,qe),mt=null,Bt=0,kt=0,Nt=null,nn=0,An=null;if(Bt=kt=st[0]>>>3,nn=(st[0]&7)<<1|st[1]>>>7,nn<0||nn>=this._mpegSamplingRates.length){this._onError(Ne.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Vn=this._mpegSamplingRates[nn],At=(st[1]&120)>>>3;if(At<0||At>=8){this._onError(Ne.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Bt===5&&(An=(st[1]&7)<<1|st[2]>>>7,Nt=(st[2]&124)>>>2);let wt=self.navigator.userAgent.toLowerCase();return wt.indexOf("firefox")!==-1?nn>=6?(Bt=5,mt=new Array(4),An=nn-3):(Bt=2,mt=new Array(2),An=nn):wt.indexOf("android")!==-1?(Bt=2,mt=new Array(2),An=nn):(Bt=5,An=nn,mt=new Array(4),nn>=6?An=nn-3:At===1&&(Bt=2,mt=new Array(2),An=nn)),mt[0]=Bt<<3,mt[0]|=(nn&15)>>>1,mt[1]=(nn&15)<<7,mt[1]|=(At&15)<<3,Bt===5&&(mt[1]|=(An&15)>>>1,mt[2]=(An&1)<<7,mt[2]|=8,mt[3]=0),{config:mt,samplingRate:Vn,channelCount:At,codec:"mp4a.40."+Bt,originalCodec:"mp4a.40."+kt}}_parseMP3AudioData(Ie,Ze,qe,st){if(qe<4){te.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let mt=this._littleEndian,Bt=new Uint8Array(Ie,Ze,qe),kt=null;if(st){if(Bt[0]!==255)return;let Nt=Bt[1]>>>3&3,nn=(Bt[1]&6)>>1,An=(Bt[2]&240)>>>4,Vn=(Bt[2]&12)>>>2,wt=(Bt[3]>>>6&3)!==3?2:1,dn=0,Gt=0,Et=34,Ht="mp3";switch(Nt){case 0:dn=this._mpegAudioV25SampleRateTable[Vn];break;case 2:dn=this._mpegAudioV20SampleRateTable[Vn];break;case 3:dn=this._mpegAudioV10SampleRateTable[Vn];break}switch(nn){case 1:Et=34,An<this._mpegAudioL3BitRateTable.length&&(Gt=this._mpegAudioL3BitRateTable[An]);break;case 2:Et=33,An<this._mpegAudioL2BitRateTable.length&&(Gt=this._mpegAudioL2BitRateTable[An]);break;case 3:Et=32,An<this._mpegAudioL1BitRateTable.length&&(Gt=this._mpegAudioL1BitRateTable[An]);break}kt={bitRate:Gt,samplingRate:dn,channelCount:wt,codec:Ht,originalCodec:Ht}}else kt=Bt;return kt}_parseVideoData(Ie,Ze,qe,st,mt){if(qe<=1){te.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Bt=new Uint8Array(Ie,Ze,qe)[0],kt=(Bt&240)>>>4,Nt=Bt&15;if(Nt!==7){this._onError(Ne.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${Nt}`);return}this._parseAVCVideoPacket(Ie,Ze+1,qe-1,st,mt,kt)}_parseAVCVideoPacket(Ie,Ze,qe,st,mt,Bt){if(qe<4){te.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let kt=this._littleEndian,Nt=new DataView(Ie,Ze,qe),nn=Nt.getUint8(0),Vn=(Nt.getUint32(0,!kt)&16777215)<<8>>8;if(nn===0)this._parseAVCDecoderConfigurationRecord(Ie,Ze+4,qe-4);else if(nn===1)this._parseAVCVideoData(Ie,Ze+4,qe-4,st,mt,Bt,Vn);else if(nn!==2){this._onError(Ne.FORMAT_ERROR,`Flv: Invalid video packet type ${nn}`);return}}_parseAVCDecoderConfigurationRecord(Ie,Ze,qe){if(qe<7){te.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let st=this._videoMetadata,mt=this._videoTrack,Bt=this._littleEndian,kt=new DataView(Ie,Ze,qe);st?typeof st.avcc!="undefined"&&te.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=mt.id,st.timescale=this._timescale,st.duration=this._duration);let Nt=kt.getUint8(0),nn=kt.getUint8(1),An=kt.getUint8(2),Vn=kt.getUint8(3);if(Nt!==1||nn===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(kt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Ne.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let At=kt.getUint8(5)&31;if(At===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else At>1&&te.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${At}`);let wt=6;for(let Gt=0;Gt<At;Gt++){let Et=kt.getUint16(wt,!Bt);if(wt+=2,Et===0)continue;let Ht=new Uint8Array(Ie,Ze+wt,Et);wt+=Et;let on=Be.parseSPS(Ht);if(Gt!==0)continue;st.codecWidth=on.codec_size.width,st.codecHeight=on.codec_size.height,st.presentWidth=on.present_size.width,st.presentHeight=on.present_size.height,st.profile=on.profile_string,st.level=on.level_string,st.bitDepth=on.bit_depth,st.chromaFormat=on.chroma_format,st.sarRatio=on.sar_ratio,st.frameRate=on.frame_rate,(on.frame_rate.fixed===!1||on.frame_rate.fps_num===0||on.frame_rate.fps_den===0)&&(st.frameRate=this._referenceFrameRate);let sn=st.frameRate.fps_den,yn=st.frameRate.fps_num;st.refSampleDuration=st.timescale*(sn/yn);let Wt=Ht.subarray(1,4),Cn="avc1.";for(let Pn=0;Pn<3;Pn++){let bn=Wt[Pn].toString(16);bn.length<2&&(bn="0"+bn),Cn+=bn}st.codec=Cn;let Vt=this._mediaInfo;Vt.width=st.codecWidth,Vt.height=st.codecHeight,Vt.fps=st.frameRate.fps,Vt.profile=st.profile,Vt.level=st.level,Vt.refFrames=on.ref_frames,Vt.chromaFormat=on.chroma_format_string,Vt.sarNum=st.sarRatio.width,Vt.sarDen=st.sarRatio.height,Vt.videoCodec=Cn,Vt.hasAudio?Vt.audioCodec!=null&&(Vt.mimeType='video/x-flv; codecs="'+Vt.videoCodec+","+Vt.audioCodec+'"'):Vt.mimeType='video/x-flv; codecs="'+Vt.videoCodec+'"',Vt.isComplete()&&this._onMediaInfo(Vt)}let dn=kt.getUint8(wt);if(dn===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else dn>1&&te.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${dn}`);wt++;for(let Gt=0;Gt<dn;Gt++){let Et=kt.getUint16(wt,!Bt);wt+=2,Et!==0&&(wt+=Et)}st.avcc=new Uint8Array(qe),st.avcc.set(new Uint8Array(Ie,Ze,qe),0),te.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(Ie,Ze,qe,st,mt,Bt,kt){let Nt=this._littleEndian,nn=new DataView(Ie,Ze,qe),An=[],Vn=0,At=0;const wt=this._naluLengthSize;let dn=this._timestampBase+st,Gt=Bt===1;for(;At<qe;){if(At+4>=qe){te.w(this.TAG,`Malformed Nalu near timestamp ${dn}, offset = ${At}, dataSize = ${qe}`);break}let Et=nn.getUint32(At,!Nt);if(wt===3&&(Et>>>=8),Et>qe-wt){te.w(this.TAG,`Malformed Nalus near timestamp ${dn}, NaluSize > DataSize!`);return}let Ht=nn.getUint8(At+wt)&31;Ht===5&&(Gt=!0);let on=new Uint8Array(Ie,Ze+At,wt+Et),sn={type:Ht,data:on};An.push(sn),Vn+=on.byteLength,At+=wt+Et}if(An.length){let Et=this._videoTrack,Ht={units:An,length:Vn,isKeyframe:Gt,dts:dn,cts:kt,pts:dn+kt};Gt&&(Ht.fileposition=mt),Et.samples.push(Ht),Et.length+=Vn}}}var Me=Ue;class Re{static init(){Re.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 Re.types)Re.types.hasOwnProperty(Ze)&&(Re.types[Ze]=[Ze.charCodeAt(0),Ze.charCodeAt(1),Ze.charCodeAt(2),Ze.charCodeAt(3)]);let Ie=Re.constants={};Ie.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ie.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ie.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ie.STSC=Ie.STCO=Ie.STTS,Ie.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ie.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]),Ie.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]),Ie.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ie.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ie.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ie){let Ze=8,qe=null,st=Array.prototype.slice.call(arguments,1),mt=st.length;for(let kt=0;kt<mt;kt++)Ze+=st[kt].byteLength;qe=new Uint8Array(Ze),qe[0]=Ze>>>24&255,qe[1]=Ze>>>16&255,qe[2]=Ze>>>8&255,qe[3]=Ze&255,qe.set(Ie,4);let Bt=8;for(let kt=0;kt<mt;kt++)qe.set(st[kt],Bt),Bt+=st[kt].byteLength;return qe}static generateInitSegment(Ie){let Ze=Re.box(Re.types.ftyp,Re.constants.FTYP),qe=Re.moov(Ie),st=new Uint8Array(Ze.byteLength+qe.byteLength);return st.set(Ze,0),st.set(qe,Ze.byteLength),st}static moov(Ie){let Ze=Re.mvhd(Ie.timescale,Ie.duration),qe=Re.trak(Ie),st=Re.mvex(Ie);return Re.box(Re.types.moov,Ze,qe,st)}static mvhd(Ie,Ze){return Re.box(Re.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&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(Ie){return Re.box(Re.types.trak,Re.tkhd(Ie),Re.mdia(Ie))}static tkhd(Ie){let Ze=Ie.id,qe=Ie.duration,st=Ie.presentWidth,mt=Ie.presentHeight;return Re.box(Re.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,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&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,mt>>>8&255,mt&255,0,0]))}static mdia(Ie){return Re.box(Re.types.mdia,Re.mdhd(Ie),Re.hdlr(Ie),Re.minf(Ie))}static mdhd(Ie){let Ze=Ie.timescale,qe=Ie.duration;return Re.box(Re.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,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,85,196,0,0]))}static hdlr(Ie){let Ze=null;return Ie.type==="audio"?Ze=Re.constants.HDLR_AUDIO:Ze=Re.constants.HDLR_VIDEO,Re.box(Re.types.hdlr,Ze)}static minf(Ie){let Ze=null;return Ie.type==="audio"?Ze=Re.box(Re.types.smhd,Re.constants.SMHD):Ze=Re.box(Re.types.vmhd,Re.constants.VMHD),Re.box(Re.types.minf,Ze,Re.dinf(),Re.stbl(Ie))}static dinf(){return Re.box(Re.types.dinf,Re.box(Re.types.dref,Re.constants.DREF))}static stbl(Ie){return Re.box(Re.types.stbl,Re.stsd(Ie),Re.box(Re.types.stts,Re.constants.STTS),Re.box(Re.types.stsc,Re.constants.STSC),Re.box(Re.types.stsz,Re.constants.STSZ),Re.box(Re.types.stco,Re.constants.STCO))}static stsd(Ie){return Ie.type==="audio"?Ie.codec==="mp3"?Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.mp3(Ie)):Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.mp4a(Ie)):Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.avc1(Ie))}static mp3(Ie){let Ze=Ie.channelCount,qe=Ie.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,qe>>>8&255,qe&255,0,0]);return Re.box(Re.types[".mp3"],st)}static mp4a(Ie){let Ze=Ie.channelCount,qe=Ie.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,qe>>>8&255,qe&255,0,0]);return Re.box(Re.types.mp4a,st,Re.esds(Ie))}static esds(Ie){let Ze=Ie.config||[],qe=Ze.length,st=new Uint8Array([0,0,0,0,3,23+qe,0,1,0,4,15+qe,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([qe]).concat(Ze).concat([6,1,2]));return Re.box(Re.types.esds,st)}static avc1(Ie){let Ze=Ie.avcc,qe=Ie.codecWidth,st=Ie.codecHeight,mt=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,qe>>>8&255,qe&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 Re.box(Re.types.avc1,mt,Re.box(Re.types.avcC,Ze))}static mvex(Ie){return Re.box(Re.types.mvex,Re.trex(Ie))}static trex(Ie){let Ze=Ie.id,qe=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 Re.box(Re.types.trex,qe)}static moof(Ie,Ze){return Re.box(Re.types.moof,Re.mfhd(Ie.sequenceNumber),Re.traf(Ie,Ze))}static mfhd(Ie){let Ze=new Uint8Array([0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255]);return Re.box(Re.types.mfhd,Ze)}static traf(Ie,Ze){let qe=Ie.id,st=Re.box(Re.types.tfhd,new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255])),mt=Re.box(Re.types.tfdt,new Uint8Array([0,0,0,0,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255])),Bt=Re.sdtp(Ie),kt=Re.trun(Ie,Bt.byteLength+16+16+8+16+8+8);return Re.box(Re.types.traf,st,mt,kt,Bt)}static sdtp(Ie){let Ze=Ie.samples||[],qe=Ze.length,st=new Uint8Array(4+qe);for(let mt=0;mt<qe;mt++){let Bt=Ze[mt].flags;st[mt+4]=Bt.isLeading<<6|Bt.dependsOn<<4|Bt.isDependedOn<<2|Bt.hasRedundancy}return Re.box(Re.types.sdtp,st)}static trun(Ie,Ze){let qe=Ie.samples||[],st=qe.length,mt=12+16*st,Bt=new Uint8Array(mt);Ze+=8+mt,Bt.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 kt=0;kt<st;kt++){let Nt=qe[kt].duration,nn=qe[kt].size,An=qe[kt].flags,Vn=qe[kt].cts;Bt.set([Nt>>>24&255,Nt>>>16&255,Nt>>>8&255,Nt&255,nn>>>24&255,nn>>>16&255,nn>>>8&255,nn&255,An.isLeading<<2|An.dependsOn,An.isDependedOn<<6|An.hasRedundancy<<4|An.isNonSync,0,0,Vn>>>24&255,Vn>>>16&255,Vn>>>8&255,Vn&255],12+16*kt)}return Re.box(Re.types.trun,Bt)}static mdat(Ie){return Re.box(Re.types.mdat,Ie)}}Re.init();var tt=Re;class lt{static getSilentFrame(Ie,Ze){if(Ie==="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 Pt=lt;class Ct{constructor(Ie,Ze,qe,st,mt){this.dts=Ie,this.pts=Ze,this.duration=qe,this.originalDts=st,this.isSyncPoint=mt,this.fileposition=null}}class vt{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(Ie){Ie.isSyncPoint=!0,this.syncPoints.push(Ie)}}class Ot{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ie){let Ze=this._list;Ie.length!==0&&(Ze.length>0&&Ie[0].originalDts<Ze[Ze.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Ze,Ie))}getLastSyncPointBeforeDts(Ie){if(this._list.length==0)return null;let Ze=this._list,qe=0,st=Ze.length-1,mt=0,Bt=0,kt=st;for(Ie<Ze[0].dts&&(qe=0,Bt=kt+1);Bt<=kt;)if(mt=Bt+Math.floor((kt-Bt)/2),mt===st||Ie>=Ze[mt].dts&&Ie<Ze[mt+1].dts){qe=mt;break}else Ze[mt].dts<Ie?Bt=mt+1:kt=mt-1;return this._list[qe]}}class Zt{constructor(Ie){this._type=Ie,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(Ie){let Ze=this._list;if(Ze.length===0)return-2;let qe=Ze.length-1,st=0,mt=0,Bt=qe,kt=0;if(Ie<Ze[0].originalBeginDts)return kt=-1,kt;for(;mt<=Bt;)if(st=mt+Math.floor((Bt-mt)/2),st===qe||Ie>Ze[st].lastSample.originalDts&&Ie<Ze[st+1].originalBeginDts){kt=st;break}else Ze[st].originalBeginDts<Ie?mt=st+1:Bt=st-1;return kt}_searchNearestSegmentAfter(Ie){return this._searchNearestSegmentBefore(Ie)+1}append(Ie){let Ze=this._list,qe=Ie,st=this._lastAppendLocation,mt=0;st!==-1&&st<Ze.length&&qe.originalBeginDts>=Ze[st].lastSample.originalDts&&(st===Ze.length-1||st<Ze.length-1&&qe.originalBeginDts<Ze[st+1].originalBeginDts)?mt=st+1:Ze.length>0&&(mt=this._searchNearestSegmentBefore(qe.originalBeginDts)+1),this._lastAppendLocation=mt,this._list.splice(mt,0,qe)}getLastSegmentBefore(Ie){let Ze=this._searchNearestSegmentBefore(Ie);return Ze>=0?this._list[Ze]:null}getLastSampleBefore(Ie){let Ze=this.getLastSegmentBefore(Ie);return Ze!=null?Ze.lastSample:null}getLastSyncPointBefore(Ie){let Ze=this._searchNearestSegmentBefore(Ie),qe=this._list[Ze].syncPoints;for(;qe.length===0&&Ze>0;)Ze--,qe=this._list[Ze].syncPoints;return qe.length>0?qe[qe.length-1]:null}}class Ut{constructor(Ie){this.TAG="MP4Remuxer",this._config=Ie,this._isLive=Ie.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 Zt("audio"),this._videoSegmentInfoList=new Zt("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ye.chrome&&(ye.version.major<50||ye.version.major===50&&ye.version.build<2661)),this._fillSilentAfterSeek=ye.msedge||ye.msie,this._mp3UseMpegAudio=!ye.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(Ie){return Ie.onDataAvailable=this.remux.bind(this),Ie.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ie){this._onInitSegment=Ie}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ie){this._onMediaSegment=Ie}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ie){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ie,Ze){if(!this._onMediaSegment)throw new E("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ie,Ze),this._remuxVideo(Ze),this._remuxAudio(Ie)}_onTrackMetadataReceived(Ie,Ze){let qe=null,st="mp4",mt=Ze.codec;if(Ie==="audio")this._audioMeta=Ze,Ze.codec==="mp3"&&this._mp3UseMpegAudio?(st="mpeg",mt="",qe=new Uint8Array):qe=tt.generateInitSegment(Ze);else if(Ie==="video")this._videoMeta=Ze,qe=tt.generateInitSegment(Ze);else return;if(!this._onInitSegment)throw new E("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ie,{type:Ie,data:qe.buffer,codec:mt,container:`${Ie}/${st}`,mediaDuration:Ze.duration})}_calculateDtsBase(Ie,Ze){this._dtsBaseInited||(Ie.samples&&Ie.samples.length&&(this._audioDtsBase=Ie.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 Ie=this._videoStashedLastSample,Ze=this._audioStashedLastSample,qe={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ie!=null&&(qe.samples.push(Ie),qe.length=Ie.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(qe,!0),this._remuxAudio(st,!0)}_remuxAudio(Ie,Ze){if(this._audioMeta==null)return;let qe=Ie,st=qe.samples,mt,Bt=-1,kt=-1,Nt=-1,nn=this._audioMeta.refSampleDuration,An=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Vn=this._dtsBaseInited&&this._audioNextDts===void 0,At=!1;if(!st||st.length===0||st.length===1&&!Ze)return;let wt=0,dn=null,Gt=0;An?(wt=0,Gt=qe.length):(wt=8,Gt=8+qe.length);let Et=null;if(st.length>1&&(Et=st.pop(),Gt-=Et.length),this._audioStashedLastSample!=null){let Vt=this._audioStashedLastSample;this._audioStashedLastSample=null,st.unshift(Vt),Gt+=Vt.length}Et!=null&&(this._audioStashedLastSample=Et);let Ht=st[0].dts-this._dtsBase;if(this._audioNextDts)mt=Ht-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())mt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(At=!0);else{let Vt=this._audioSegmentInfoList.getLastSampleBefore(Ht);if(Vt!=null){let Pn=Ht-(Vt.originalDts+Vt.duration);Pn<=3&&(Pn=0);let bn=Vt.dts+Vt.duration+Pn;mt=Ht-bn}else mt=0}if(At){let Vt=Ht-mt,Pn=this._videoSegmentInfoList.getLastSegmentBefore(Ht);if(Pn!=null&&Pn.beginDts<Vt){let bn=Pt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(bn){let zn=Pn.beginDts,Bn=Vt-Pn.beginDts;te.v(this.TAG,`InsertPrefixSilentAudio: dts: ${zn}, duration: ${Bn}`),st.unshift({unit:bn,dts:zn,pts:zn}),Gt+=bn.byteLength}}else At=!1}let on=[];for(let Vt=0;Vt<st.length;Vt++){let Pn=st[Vt],bn=Pn.unit,zn=Pn.dts-this._dtsBase,Bn=zn-mt;Bt===-1&&(Bt=Bn);let er=0;Vt!==st.length-1?er=st[Vt+1].dts-this._dtsBase-mt-Bn:Et!=null?er=Et.dts-this._dtsBase-mt-Bn:on.length>=1?er=on[on.length-1].duration:er=Math.floor(nn);let cr=!1,pr=null;if(er>nn*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ye.safari){cr=!0;let Nr=Math.abs(er-nn),Br=Math.ceil(Nr/nn),ei=Bn+nn;te.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
dts: ${Bn+er} ms, expected: ${Bn+Math.round(nn)} ms, delta: ${Math.round(Nr)} ms, generate: ${Br} frames`);let xr=Pt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);xr==null&&(te.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),xr=bn),pr=[];for(let Pr=0;Pr<Br;Pr++){let Xr=Math.round(ei);if(pr.length>0){let bi=pr[pr.length-1];bi.duration=Xr-bi.dts}let hi={dts:Xr,pts:Xr,cts:0,unit:xr,size:xr.byteLength,duration:0,originalDts:zn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};pr.push(hi),Gt+=hi.size,ei+=nn}let Tr=pr[pr.length-1];Tr.duration=Bn+er-Tr.dts,er=Math.round(nn)}on.push({dts:Bn,pts:Bn,cts:0,unit:Pn.unit,size:Pn.unit.byteLength,duration:er,originalDts:zn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),cr&&on.push.apply(on,pr)}An?dn=new Uint8Array(Gt):(dn=new Uint8Array(Gt),dn[0]=Gt>>>24&255,dn[1]=Gt>>>16&255,dn[2]=Gt>>>8&255,dn[3]=Gt&255,dn.set(tt.types.mdat,4));for(let Vt=0;Vt<on.length;Vt++){let Pn=on[Vt].unit;dn.set(Pn,wt),wt+=Pn.byteLength}let sn=on[on.length-1];kt=sn.dts+sn.duration,this._audioNextDts=kt;let yn=new vt;yn.beginDts=Bt,yn.endDts=kt,yn.beginPts=Bt,yn.endPts=kt,yn.originalBeginDts=on[0].originalDts,yn.originalEndDts=sn.originalDts+sn.duration,yn.firstSample=new Ct(on[0].dts,on[0].pts,on[0].duration,on[0].originalDts,!1),yn.lastSample=new Ct(sn.dts,sn.pts,sn.duration,sn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(yn),qe.samples=on,qe.sequenceNumber++;let Wt=null;An?Wt=new Uint8Array:Wt=tt.moof(qe,Bt),qe.samples=[],qe.length=0;let Cn={type:"audio",data:this._mergeBoxes(Wt,dn).buffer,sampleCount:on.length,info:yn};An&&Vn&&(Cn.timestampOffset=Bt),this._onMediaSegment("audio",Cn)}_remuxVideo(Ie,Ze){if(this._videoMeta==null)return;let qe=Ie,st=qe.samples,mt,Bt=-1,kt=-1,Nt=-1,nn=-1;if(!st||st.length===0||st.length===1&&!Ze)return;let An=8,Vn=null,At=8+Ie.length,wt=null;if(st.length>1&&(wt=st.pop(),At-=wt.length),this._videoStashedLastSample!=null){let sn=this._videoStashedLastSample;this._videoStashedLastSample=null,st.unshift(sn),At+=sn.length}wt!=null&&(this._videoStashedLastSample=wt);let dn=st[0].dts-this._dtsBase;if(this._videoNextDts)mt=dn-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())mt=0;else{let sn=this._videoSegmentInfoList.getLastSampleBefore(dn);if(sn!=null){let yn=dn-(sn.originalDts+sn.duration);yn<=3&&(yn=0);let Wt=sn.dts+sn.duration+yn;mt=dn-Wt}else mt=0}let Gt=new vt,Et=[];for(let sn=0;sn<st.length;sn++){let yn=st[sn],Wt=yn.dts-this._dtsBase,Cn=yn.isKeyframe,Vt=Wt-mt,Pn=yn.cts,bn=Vt+Pn;Bt===-1&&(Bt=Vt,Nt=bn);let zn=0;if(sn!==st.length-1?zn=st[sn+1].dts-this._dtsBase-mt-Vt:wt!=null?zn=wt.dts-this._dtsBase-mt-Vt:Et.length>=1?zn=Et[Et.length-1].duration:zn=Math.floor(this._videoMeta.refSampleDuration),Cn){let Bn=new Ct(Vt,bn,zn,yn.dts,!0);Bn.fileposition=yn.fileposition,Gt.appendSyncPoint(Bn)}Et.push({dts:Vt,pts:bn,cts:Pn,units:yn.units,size:yn.length,isKeyframe:Cn,duration:zn,originalDts:Wt,flags:{isLeading:0,dependsOn:Cn?2:1,isDependedOn:Cn?1:0,hasRedundancy:0,isNonSync:Cn?0:1}})}Vn=new Uint8Array(At),Vn[0]=At>>>24&255,Vn[1]=At>>>16&255,Vn[2]=At>>>8&255,Vn[3]=At&255,Vn.set(tt.types.mdat,4);for(let sn=0;sn<Et.length;sn++){let yn=Et[sn].units;for(;yn.length;){let Cn=yn.shift().data;Vn.set(Cn,An),An+=Cn.byteLength}}let Ht=Et[Et.length-1];if(kt=Ht.dts+Ht.duration,nn=Ht.pts+Ht.duration,this._videoNextDts=kt,Gt.beginDts=Bt,Gt.endDts=kt,Gt.beginPts=Nt,Gt.endPts=nn,Gt.originalBeginDts=Et[0].originalDts,Gt.originalEndDts=Ht.originalDts+Ht.duration,Gt.firstSample=new Ct(Et[0].dts,Et[0].pts,Et[0].duration,Et[0].originalDts,Et[0].isKeyframe),Gt.lastSample=new Ct(Ht.dts,Ht.pts,Ht.duration,Ht.originalDts,Ht.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Gt),qe.samples=Et,qe.sequenceNumber++,this._forceFirstIDR){let sn=Et[0].flags;sn.dependsOn=2,sn.isNonSync=0}let on=tt.moof(qe,Bt);qe.samples=[],qe.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(on,Vn).buffer,sampleCount:Et.length,info:Gt})}_mergeBoxes(Ie,Ze){let qe=new Uint8Array(Ie.byteLength+Ze.byteLength);return qe.set(Ie,0),qe.set(Ze,Ie.byteLength),qe}}var gt=Ut,Lt={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 qt{constructor(Ie,Ze){this.TAG="TransmuxingController",this._emitter=new(ue()),this._config=Ze,Ie.segments||(Ie.segments=[{duration:Ie.duration,filesize:Ie.filesize,url:Ie.url}]),typeof Ie.cors!="boolean"&&(Ie.cors=!0),typeof Ie.withCredentials!="boolean"&&(Ie.withCredentials=!1),this._mediaDataSource=Ie,this._currentSegmentIndex=0;let qe=0;this._mediaDataSource.segments.forEach(st=>{st.timestampBase=qe,qe+=st.duration,st.cors=Ie.cors,st.withCredentials=Ie.withCredentials,Ze.referrerPolicy&&(st.referrerPolicy=Ze.referrerPolicy)}),!isNaN(qe)&&this._mediaDataSource.duration!==qe&&(this._mediaDataSource.duration=qe),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(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ie,Ze){this._currentSegmentIndex=Ie;let qe=this._mediaDataSource.segments[Ie],st=this._ioctl=new rt(qe,this._config,Ie);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(Ie){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Ze=this._searchSegmentIndexContains(Ie);if(Ze===this._currentSegmentIndex){let qe=this._mediaInfo.segments[Ze];if(qe==null)this._pendingSeekTime=Ie;else{let st=qe.getNearestKeyframe(Ie);this._remuxer.seek(st.milliseconds),this._ioctl.seek(st.fileposition),this._pendingResolveSeekPoint=st.milliseconds}}else{let qe=this._mediaInfo.segments[Ze];if(qe==null)this._pendingSeekTime=Ie,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Ze);else{let st=qe.getNearestKeyframe(Ie);this._internalAbort(),this._remuxer.seek(Ie),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(Ie){let Ze=this._mediaDataSource.segments,qe=Ze.length-1;for(let st=0;st<Ze.length;st++)if(Ie<Ze[st].timestampBase){qe=st-1;break}return qe}_onInitChunkArrival(Ie,Ze){let qe=null,st=0;if(Ze>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,st=this._demuxer.parseChunks(Ie,Ze);else if((qe=Me.probe(Ie)).match){this._demuxer=new Me(qe,this._config),this._remuxer||(this._remuxer=new gt(this._config));let mt=this._mediaDataSource;mt.duration!=null&&!isNaN(mt.duration)&&(this._demuxer.overridedDuration=mt.duration),typeof mt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=mt.hasAudio),typeof mt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=mt.hasVideo),this._demuxer.timestampBase=mt.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(Ie,Ze)}else qe=null,te.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Lt.DEMUX_ERROR,Ne.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),st=0;return st}_onMediaInfo(Ie){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ie),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,ct.prototype));let Ze=Object.assign({},Ie);Object.setPrototypeOf(Ze,ct.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Ze,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let qe=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(qe)})}_onMetaDataArrived(Ie){this._emitter.emit(Lt.METADATA_ARRIVED,Ie)}_onScriptDataArrived(Ie){this._emitter.emit(Lt.SCRIPTDATA_ARRIVED,Ie)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ie){let qe=Ie+1;qe<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(qe)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Lt.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ie){let Ze=this._ioctl.extraData;this._mediaDataSource.segments[Ze].redirectedURL=Ie}_onIORecoveredEarlyEof(){this._emitter.emit(Lt.RECOVERED_EARLY_EOF)}_onIOException(Ie,Ze){te.e(this.TAG,`IOException: type = ${Ie}, code = ${Ze.code}, msg = ${Ze.msg}`),this._emitter.emit(Lt.IO_ERROR,Ie,Ze),this._disableStatisticsReporter()}_onDemuxException(Ie,Ze){te.e(this.TAG,`DemuxException: type = ${Ie}, info = ${Ze}`),this._emitter.emit(Lt.DEMUX_ERROR,Ie,Ze)}_onRemuxerInitSegmentArrival(Ie,Ze){this._emitter.emit(Lt.INIT_SEGMENT,Ie,Ze)}_onRemuxerMediaSegmentArrival(Ie,Ze){if(this._pendingSeekTime==null&&(this._emitter.emit(Lt.MEDIA_SEGMENT,Ie,Ze),this._pendingResolveSeekPoint!=null&&Ie==="video")){let qe=Ze.info.syncPoints,st=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ye.safari&&qe.length>0&&qe[0].originalDts===st&&(st=qe[0].pts),this._emitter.emit(Lt.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(Ie){let Ze=this._mediaInfo.segments[Ie],qe=Object.assign({},Ze);qe.duration=this._mediaInfo.duration,qe.segmentCount=this._mediaInfo.segmentCount,delete qe.segments,delete qe.keyframesIndex,this._emitter.emit(Lt.MEDIA_INFO,qe)}_reportStatisticsInfo(){let Ie={};Ie.url=this._ioctl.currentURL,Ie.hasRedirect=this._ioctl.hasRedirect,Ie.hasRedirect&&(Ie.redirectedURL=this._ioctl.currentRedirectedURL),Ie.speed=this._ioctl.currentSpeed,Ie.loaderType=this._ioctl.loaderType,Ie.currentSegmentIndex=this._currentSegmentIndex,Ie.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Lt.STATISTICS_INFO,Ie)}}var un=qt,Jt=function(an){let Ie="TransmuxingWorker",Ze=null,qe=Gt.bind(this);ie.install(),an.addEventListener("message",function(Et){switch(Et.data.cmd){case"init":Ze=new un(Et.data.param[0],Et.data.param[1]),Ze.on(Lt.IO_ERROR,At.bind(this)),Ze.on(Lt.DEMUX_ERROR,wt.bind(this)),Ze.on(Lt.INIT_SEGMENT,st.bind(this)),Ze.on(Lt.MEDIA_SEGMENT,mt.bind(this)),Ze.on(Lt.LOADING_COMPLETE,Bt.bind(this)),Ze.on(Lt.RECOVERED_EARLY_EOF,kt.bind(this)),Ze.on(Lt.MEDIA_INFO,Nt.bind(this)),Ze.on(Lt.METADATA_ARRIVED,nn.bind(this)),Ze.on(Lt.SCRIPTDATA_ARRIVED,An.bind(this)),Ze.on(Lt.STATISTICS_INFO,Vn.bind(this)),Ze.on(Lt.RECOMMEND_SEEKPOINT,dn.bind(this));break;case"destroy":Ze&&(Ze.destroy(),Ze=null),an.postMessage({msg:"destroyed"});break;case"start":Ze.start();break;case"stop":Ze.stop();break;case"seek":Ze.seek(Et.data.param);break;case"pause":Ze.pause();break;case"resume":Ze.resume();break;case"logging_config":{let Ht=Et.data.param;et.applyConfig(Ht),Ht.enableCallback===!0?et.addLogListener(qe):et.removeLogListener(qe);break}}});function st(Et,Ht){let on={msg:Lt.INIT_SEGMENT,data:{type:Et,data:Ht}};an.postMessage(on,[Ht.data])}function mt(Et,Ht){let on={msg:Lt.MEDIA_SEGMENT,data:{type:Et,data:Ht}};an.postMessage(on,[Ht.data])}function Bt(){let Et={msg:Lt.LOADING_COMPLETE};an.postMessage(Et)}function kt(){let Et={msg:Lt.RECOVERED_EARLY_EOF};an.postMessage(Et)}function Nt(Et){let Ht={msg:Lt.MEDIA_INFO,data:Et};an.postMessage(Ht)}function nn(Et){let Ht={msg:Lt.METADATA_ARRIVED,data:Et};an.postMessage(Ht)}function An(Et){let Ht={msg:Lt.SCRIPTDATA_ARRIVED,data:Et};an.postMessage(Ht)}function Vn(Et){let Ht={msg:Lt.STATISTICS_INFO,data:Et};an.postMessage(Ht)}function At(Et,Ht){an.postMessage({msg:Lt.IO_ERROR,data:{type:Et,info:Ht}})}function wt(Et,Ht){an.postMessage({msg:Lt.DEMUX_ERROR,data:{type:Et,info:Ht}})}function dn(Et){an.postMessage({msg:Lt.RECOMMEND_SEEKPOINT,data:Et})}function Gt(Et,Ht){an.postMessage({msg:"logcat_callback",data:{type:Et,logcat:Ht}})}};class Ln{constructor(Ie,Ze){if(this.TAG="Transmuxer",this._emitter=new(ue()),Ze.enableWorker&&typeof Worker!="undefined")try{let qe=Se(82059);this._worker=qe(Jt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ie,Ze]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},et.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:et.getConfig()})}catch(qe){te.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new un(Ie,Ze)}else this._controller=new un(Ie,Ze);if(this._controller){let qe=this._controller;qe.on(Lt.IO_ERROR,this._onIOError.bind(this)),qe.on(Lt.DEMUX_ERROR,this._onDemuxError.bind(this)),qe.on(Lt.INIT_SEGMENT,this._onInitSegment.bind(this)),qe.on(Lt.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),qe.on(Lt.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),qe.on(Lt.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),qe.on(Lt.MEDIA_INFO,this._onMediaInfo.bind(this)),qe.on(Lt.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),qe.on(Lt.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),qe.on(Lt.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),qe.on(Lt.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),et.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,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(Ie){this._worker?this._worker.postMessage({cmd:"seek",param:Ie}):this._controller.seek(Ie)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.INIT_SEGMENT,Ie,Ze)})}_onMediaSegment(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.MEDIA_SEGMENT,Ie,Ze)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Lt.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Lt.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.MEDIA_INFO,Ie)})}_onMetaDataArrived(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.METADATA_ARRIVED,Ie)})}_onScriptDataArrived(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.SCRIPTDATA_ARRIVED,Ie)})}_onStatisticsInfo(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.STATISTICS_INFO,Ie)})}_onIOError(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.IO_ERROR,Ie,Ze)})}_onDemuxError(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.DEMUX_ERROR,Ie,Ze)})}_onRecommendSeekpoint(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.RECOMMEND_SEEKPOINT,Ie)})}_onLoggingConfigChanged(Ie){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ie})}_onWorkerMessage(Ie){let Ze=Ie.data,qe=Ze.data;if(Ze.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Ze.msg){case Lt.INIT_SEGMENT:case Lt.MEDIA_SEGMENT:this._emitter.emit(Ze.msg,qe.type,qe.data);break;case Lt.LOADING_COMPLETE:case Lt.RECOVERED_EARLY_EOF:this._emitter.emit(Ze.msg);break;case Lt.MEDIA_INFO:Object.setPrototypeOf(qe,ct.prototype),this._emitter.emit(Ze.msg,qe);break;case Lt.METADATA_ARRIVED:case Lt.SCRIPTDATA_ARRIVED:case Lt.STATISTICS_INFO:this._emitter.emit(Ze.msg,qe);break;case Lt.IO_ERROR:case Lt.DEMUX_ERROR:this._emitter.emit(Ze.msg,qe.type,qe.info);break;case Lt.RECOMMEND_SEEKPOINT:this._emitter.emit(Ze.msg,qe);break;case"logcat_callback":te.emitter.emit("log",qe.type,qe.logcat);break;default:break}}}var Zn=Ln,Jn={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class hr{constructor(Ie){this.TAG="MSEController",this._config=Ie,this._emitter=new(ue()),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 Ot}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){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=Ie,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ie.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ie=this._mediaSource;for(let Ze in this._sourceBuffers){let qe=this._pendingSegments[Ze];qe.splice(0,qe.length),this._pendingSegments[Ze]=null,this._pendingRemoveRanges[Ze]=null,this._lastInitSegments[Ze]=null;let st=this._sourceBuffers[Ze];if(st){if(Ie.readyState!=="closed"){try{Ie.removeSourceBuffer(st)}catch(mt){te.e(this.TAG,mt.message)}st.removeEventListener("error",this.e.onSourceBufferError),st.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Ze]=null,this._sourceBuffers[Ze]=null}}if(Ie.readyState==="open")try{Ie.endOfStream()}catch(Ze){te.e(this.TAG,Ze.message)}Ie.removeEventListener("sourceopen",this.e.onSourceOpen),Ie.removeEventListener("sourceended",this.e.onSourceEnded),Ie.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(Ie,Ze){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ie),this._pendingSegments[Ie.type].push(Ie);return}let qe=Ie,st=`${qe.container}`;qe.codec&&qe.codec.length>0&&(st+=`;codecs=${qe.codec}`);let mt=!1;if(te.v(this.TAG,"Received Initialization Segment, mimeType: "+st),this._lastInitSegments[qe.type]=qe,st!==this._mimeTypes[qe.type]){if(this._mimeTypes[qe.type])te.v(this.TAG,`Notice: ${qe.type} mimeType changed, origin: ${this._mimeTypes[qe.type]}, target: ${st}`);else{mt=!0;try{let Bt=this._sourceBuffers[qe.type]=this._mediaSource.addSourceBuffer(st);Bt.addEventListener("error",this.e.onSourceBufferError),Bt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Bt){te.e(this.TAG,Bt.message),this._emitter.emit(Jn.ERROR,{code:Bt.code,msg:Bt.message});return}}this._mimeTypes[qe.type]=st}Ze||this._pendingSegments[qe.type].push(qe),mt||this._sourceBuffers[qe.type]&&!this._sourceBuffers[qe.type].updating&&this._doAppendSegments(),ye.safari&&qe.container==="audio/mpeg"&&qe.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=qe.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ie){let Ze=Ie;this._pendingSegments[Ze.type].push(Ze),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let qe=this._sourceBuffers[Ze.type];qe&&!qe.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ie){for(let Ze in this._sourceBuffers){if(!this._sourceBuffers[Ze])continue;let qe=this._sourceBuffers[Ze];if(this._mediaSource.readyState==="open")try{qe.abort()}catch(mt){te.e(this.TAG,mt.message)}this._idrList.clear();let st=this._pendingSegments[Ze];if(st.splice(0,st.length),this._mediaSource.readyState!=="closed"){for(let mt=0;mt<qe.buffered.length;mt++){let Bt=qe.buffered.start(mt),kt=qe.buffered.end(mt);this._pendingRemoveRanges[Ze].push({start:Bt,end:kt})}if(qe.updating||this._doRemoveRanges(),ye.safari){let mt=this._lastInitSegments[Ze];mt&&(this._pendingSegments[Ze].push(mt),qe.updating||this._doAppendSegments())}}}}endOfStream(){let Ie=this._mediaSource,Ze=this._sourceBuffers;if(!Ie||Ie.readyState!=="open"){Ie&&Ie.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Ze.video&&Ze.video.updating||Ze.audio&&Ze.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ie.endOfStream())}getNearestKeyframe(Ie){return this._idrList.getLastSyncPointBeforeDts(Ie)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ie=this._mediaElement.currentTime;for(let Ze in this._sourceBuffers){let qe=this._sourceBuffers[Ze];if(qe){let st=qe.buffered;if(st.length>=1&&Ie-st.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ie=this._mediaElement.currentTime;for(let Ze in this._sourceBuffers){let qe=this._sourceBuffers[Ze];if(qe){let st=qe.buffered,mt=!1;for(let Bt=0;Bt<st.length;Bt++){let kt=st.start(Bt),Nt=st.end(Bt);if(kt<=Ie&&Ie<Nt+3){if(Ie-kt>=this._config.autoCleanupMaxBackwardDuration){mt=!0;let nn=Ie-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Ze].push({start:kt,end:nn})}}else Nt<Ie&&(mt=!0,this._pendingRemoveRanges[Ze].push({start:kt,end:Nt}))}mt&&!qe.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ie=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ie.video&&Ie.video.updating||Ie.audio&&Ie.audio.updating)return;let Ze=this._mediaSource.duration,qe=this._pendingMediaDuration;qe>0&&(isNaN(Ze)||qe>Ze)&&(te.v(this.TAG,`Update MediaSource duration from ${Ze} to ${qe}`),this._mediaSource.duration=qe),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ie in this._pendingRemoveRanges){if(!this._sourceBuffers[Ie]||this._sourceBuffers[Ie].updating)continue;let Ze=this._sourceBuffers[Ie],qe=this._pendingRemoveRanges[Ie];for(;qe.length&&!Ze.updating;){let st=qe.shift();Ze.remove(st.start,st.end)}}}_doAppendSegments(){let Ie=this._pendingSegments;for(let Ze in Ie)if(!(!this._sourceBuffers[Ze]||this._sourceBuffers[Ze].updating)&&Ie[Ze].length>0){let qe=Ie[Ze].shift();if(qe.timestampOffset){let st=this._sourceBuffers[Ze].timestampOffset,mt=qe.timestampOffset/1e3;Math.abs(st-mt)>.1&&(te.v(this.TAG,`Update MPEG audio timestampOffset from ${st} to ${mt}`),this._sourceBuffers[Ze].timestampOffset=mt),delete qe.timestampOffset}if(!qe.data||qe.data.byteLength===0)continue;try{this._sourceBuffers[Ze].appendBuffer(qe.data),this._isBufferFull=!1,Ze==="video"&&qe.hasOwnProperty("info")&&this._idrList.appendArray(qe.info.syncPoints)}catch(st){this._pendingSegments[Ze].unshift(qe),st.code===22?(this._isBufferFull||this._emitter.emit(Jn.BUFFER_FULL),this._isBufferFull=!0):(te.e(this.TAG,st.message),this._emitter.emit(Jn.ERROR,{code:st.code,msg:st.message}))}}}_onSourceOpen(){if(te.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ie=this._pendingSourceBufferInit;for(;Ie.length;){let Ze=Ie.shift();this.appendInitSegment(Ze,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Jn.SOURCE_OPEN)}_onSourceEnded(){te.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){te.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 Ie=this._pendingSegments;return Ie.video.length>0||Ie.audio.length>0}_hasPendingRemoveRanges(){let Ie=this._pendingRemoveRanges;return Ie.video.length>0||Ie.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(Ie){te.e(this.TAG,`SourceBuffer Error: ${Ie}`)}}var ur=hr;const jn={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Nn={NETWORK_EXCEPTION:re.EXCEPTION,NETWORK_STATUS_CODE_INVALID:re.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:re.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:re.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Ne.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ne.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ne.CODEC_UNSUPPORTED};class rr{constructor(Ie,Ze){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ue()),this._config=ut(),typeof Ze=="object"&&Object.assign(this._config,Ze),Ie.type.toLowerCase()!=="flv")throw new b("FlvPlayer requires an flv MediaDataSource input!");Ie.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=Ie,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 qe=ye.chrome&&(ye.version.major<50||ye.version.major===50&&ye.version.build<2661);this._alwaysSeekKeyframe=!!(qe||ye.msedge||ye.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(Ie,Ze){Ie===$e.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}):Ie===$e.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){if(this._mediaElement=Ie,Ie.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ie.addEventListener("seeking",this.e.onvSeeking),Ie.addEventListener("canplay",this.e.onvCanPlay),Ie.addEventListener("stalled",this.e.onvStalled),Ie.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($e.ERROR,jn.MEDIA_ERROR,Nn.MEDIA_MSE_ERROR,Ze)}),this._msectl.attachMediaElement(Ie),this._pendingSeekTime!=null)try{Ie.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 Zn(this._mediaDataSource,this._config),this._transmuxer.on(Lt.INIT_SEGMENT,(Ie,Ze)=>{this._msectl.appendInitSegment(Ze)}),this._transmuxer.on(Lt.MEDIA_SEGMENT,(Ie,Ze)=>{if(this._msectl.appendMediaSegment(Ze),this._config.lazyLoad&&!this._config.isLive){let qe=this._mediaElement.currentTime;Ze.info.endDts>=(qe+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(te.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Lt.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit($e.LOADING_COMPLETE)}),this._transmuxer.on(Lt.RECOVERED_EARLY_EOF,()=>{this._emitter.emit($e.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Lt.IO_ERROR,(Ie,Ze)=>{this._emitter.emit($e.ERROR,jn.NETWORK_ERROR,Ie,Ze)}),this._transmuxer.on(Lt.DEMUX_ERROR,(Ie,Ze)=>{this._emitter.emit($e.ERROR,jn.MEDIA_ERROR,Ie,{code:-1,msg:Ze})}),this._transmuxer.on(Lt.MEDIA_INFO,Ie=>{this._mediaInfo=Ie,this._emitter.emit($e.MEDIA_INFO,Object.assign({},Ie))}),this._transmuxer.on(Lt.METADATA_ARRIVED,Ie=>{this._emitter.emit($e.METADATA_ARRIVED,Ie)}),this._transmuxer.on(Lt.SCRIPTDATA_ARRIVED,Ie=>{this._emitter.emit($e.SCRIPTDATA_ARRIVED,Ie)}),this._transmuxer.on(Lt.STATISTICS_INFO,Ie=>{this._statisticsInfo=this._fillStatisticsInfo(Ie),this._emitter.emit($e.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Lt.RECOMMEND_SEEKPOINT,Ie=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie/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(Ie){this._mediaElement.volume=Ie}get muted(){return this._mediaElement.muted}set muted(Ie){this._mediaElement.muted=Ie}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ie){this._mediaElement?this._internalSeek(Ie):this._pendingSeekTime=Ie}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(Ie){if(Ie.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ie;let Ze=!0,qe=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let mt=this._mediaElement.getVideoPlaybackQuality();qe=mt.totalVideoFrames,st=mt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(qe=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):Ze=!1;return Ze&&(Ie.decodedFrames=qe,Ie.droppedFrames=st),Ie}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ie=this._mediaElement.buffered,Ze=this._mediaElement.currentTime,qe=0,st=0;for(let mt=0;mt<Ie.length;mt++){let Bt=Ie.start(mt),kt=Ie.end(mt);if(Bt<=Ze&&Ze<kt){qe=Bt,st=kt;break}}st>=Ze+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(te.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){te.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 Ie=this._mediaElement.currentTime,Ze=this._mediaElement.buffered,qe=!1;for(let st=0;st<Ze.length;st++){let mt=Ze.start(st),Bt=Ze.end(st);if(Ie>=mt&&Ie<Bt){Ie>=Bt-this._config.lazyLoadRecoverDuration&&(qe=!0);break}}qe&&(window.clearInterval(this._progressChecker),this._progressChecker=null,qe&&(te.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ie){let Ze=this._mediaElement.buffered;for(let qe=0;qe<Ze.length;qe++){let st=Ze.start(qe),mt=Ze.end(qe);if(Ie>=st&&Ie<mt)return!0}return!1}_internalSeek(Ie){let Ze=this._isTimepointBuffered(Ie),qe=!1,st=0;if(Ie<1&&this._mediaElement.buffered.length>0){let mt=this._mediaElement.buffered.start(0);(mt<1&&Ie<mt||ye.safari)&&(qe=!0,st=ye.safari?.1:mt)}if(qe)this._requestSetTime=!0,this._mediaElement.currentTime=st;else if(Ze){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ie;else{let mt=this._msectl.getNearestKeyframe(Math.floor(Ie*1e3));this._requestSetTime=!0,mt!=null?this._mediaElement.currentTime=mt.dts/1e3:this._mediaElement.currentTime=Ie}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ie),this._transmuxer.seek(Math.floor(Ie*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ie=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ie)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ie),this._transmuxer.seek(Math.floor(Ie*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ie){let Ze=this._mediaElement;if(Ie||!this._receivedCanPlay||Ze.readyState<2){let qe=Ze.buffered;qe.length>0&&Ze.currentTime<qe.start(0)&&(te.w(this.TAG,`Playback seems stuck at ${Ze.currentTime}, seek to ${qe.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=qe.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ie){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ie){let Ze=this._mediaElement.currentTime,qe=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Ze<1&&qe.length>0){let st=qe.start(0);if(st<1&&Ze<st||ye.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ye.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(Ie){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ie){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ie){this._checkAndResumeStuckPlayback()}}var Kn=rr;class In{constructor(Ie,Ze){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ue()),this._config=ut(),typeof Ze=="object"&&Object.assign(this._config,Ze),Ie.type.toLowerCase()==="flv")throw new b("NativePlayer does't support flv MediaDataSource input!");if(Ie.hasOwnProperty("segments"))throw new b(`NativePlayer(${Ie.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ie,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){Ie===$e.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}):Ie===$e.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){if(this._mediaElement=Ie,Ie.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ie.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(Ie){this._mediaElement.volume=Ie}get muted(){return this._mediaElement.muted}set muted(Ie){this._mediaElement.muted=Ie}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ie){this._mediaElement?this._mediaElement.currentTime=Ie:this._pendingSeekTime=Ie}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 Ie={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ie;let Ze=!0,qe=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let mt=this._mediaElement.getVideoPlaybackQuality();qe=mt.totalVideoFrames,st=mt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(qe=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):Ze=!1;return Ze&&(Ie.decodedFrames=qe,Ie.droppedFrames=st),Ie}_onvLoadedMetadata(Ie){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}}var gn=In;ie.install();function pn(an,Ie){let Ze=an;if(Ze==null||typeof Ze!="object")throw new b("MediaDataSource must be an javascript object!");if(!Ze.hasOwnProperty("type"))throw new b("MediaDataSource must has type field to indicate video file type!");switch(Ze.type){case"flv":return new Kn(Ze,Ie);default:return new gn(Ze,Ie)}}function Dn(){return ze.supportMSEH264Playback()}function Rn(){return ze.getFeatureList()}let Un={};Un.createPlayer=pn,Un.isSupported=Dn,Un.getFeatureList=Rn,Un.BaseLoader=ae,Un.LoaderStatus=x,Un.LoaderErrors=re,Un.Events=$e,Un.ErrorTypes=jn,Un.ErrorDetails=Nn,Un.FlvPlayer=Kn,Un.NativePlayer=gn,Un.LoggingControl=et,Object.defineProperty(Un,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Mr=Un},93125:function($t,Dt,Se){(function(ce){if(1)window.OSS=ce(),$t.exports=ce();else var ie})(function(){var ce;return function(){function ie(Ce,ue,se){function te(ne,E){if(!ue[ne]){if(!Ce[ne]){var b=void 0;if(!E&&b)return require(ne,!0);if(le)return le(ne,!0);var z=new Error("Cannot find module '"+ne+"'");throw z.code="MODULE_NOT_FOUND",z}var x=ue[ne]={exports:{}};Ce[ne][0].call(x.exports,function(re){return te(Ce[ne][1][re]||re)},x,x.exports,ie,Ce,ue,se)}return ue[ne].exports}for(var le=void 0,ee=0;ee<se.length;ee++)te(se[ee]);return te}return ie}()({1:[function(ie,Ce,ue){"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,Ce.exports=se},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(ie,Ce,ue){(function(se,te){"use strict";function le(ze){return ze&&ze.__esModule?ze:{default:ze}}function ee(ze,Ve){return ze[Ve]||ze[Ve.toLowerCase()]}function ne(ze,Ve){var $e=Ee.parse(ze);if(!$e.protocol){var nt=Ve?"https://":"http://";$e=Ee.parse(nt+ze)}if($e.protocol!=="http:"&&$e.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return $e}function E(ze,Ve,$e){var nt=$e?"https://":"http://",et=Ve?"-internal.aliyuncs.com":".aliyuncs.com";return ze.substr(0,14)==="vpc100-oss-cn-"&&(et=".aliyuncs.com"),Ee.parse(nt+ze+et)}function b(){return document&&document.location&&document.location.protocol==="https:"}function z(ze,Ve){if(!(this instanceof z))return new z(ze,Ve);ze&&ze.inited?this.options=ze:this.options=z.initOptions(ze),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=Qe,this.agent=this.options.agent||ut),this.ctx=Ve,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var x=ie("babel-runtime/regenerator"),re=le(x),ae=ie("babel-runtime/core-js/object/keys"),oe=le(ae),ve=ie("debug")("ali-oss"),ye=ie("./../../shims/crypto/crypto.js"),me=ie("path"),ge=ie("copy-to"),_e=ie("mime"),he=ie("xml2js"),pe=ie("humanize-ms"),ke=ie("agentkeepalive"),Te=ie("merge-descriptors"),Ee=ie("url"),Oe=ie("is-type-of"),je=ie("platform"),Pe=ie("utility"),Qe=ie("urllib"),Xe=ie("./version"),ot=ie("dateformat"),We=ie("bowser"),rt=ie("../common/signUtils"),Ye=ie("../common/utils"),ut=new ke;Ce.exports=z,z.initOptions=function(ze){if(!ze||!ze.accessKeyId||!ze.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var Ve=b(),$e={region:"oss-cn-hangzhou",internal:!1,secure:Ve,bucket:null,endpoint:null,cname:!1};if((0,oe.default)(ze).forEach(function(nt){ze[nt]!==void 0&&($e[nt]=ze[nt])}),$e.accessKeyId=$e.accessKeyId.trim(),$e.accessKeySecret=$e.accessKeySecret.trim(),$e.timeout&&($e.timeout=pe($e.timeout)),$e.endpoint)$e.endpoint=ne($e.endpoint,$e.secure);else{if(!$e.region)throw new Error("require options.endpoint or options.region");$e.endpoint=E($e.region,$e.internal,$e.secure)}return $e.inited=!0,$e};var Ge=z.prototype;Te(Ge,ie("./object")),Te(Ge,ie("./managed_upload")),Te(Ge,ie("../common/multipart")),Te(Ge,ie("../common/thunkpool.js")),z.Wrapper=ie("./wrapper"),Ge.signature=function(ze){return ve("authorization stringToSign: %s",ze),rt.computeSignature(this.options.accessKeySecret,ze)},Ge.authorization=function(ze,Ve,$e,nt){var et=rt.buildCanonicalString(ze.toUpperCase(),Ve,{headers:nt,parameters:$e});return rt.authorization(this.options.accessKeyId,this.options.accessKeySecret,et)},Ge.createRequest=function(ze){var Ve={"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&&(Ve["x-oss-security-token"]=this.options.stsToken),ge(ze.headers).to(Ve),ee(Ve,"Content-Type")||(ze.mime===_e.default_type&&(ze.mime=""),ze.mime&&ze.mime.indexOf("/")>0?Ve["Content-Type"]=ze.mime:Ve["Content-Type"]=_e.getType(ze.mime||me.extname(ze.object||""))||"application/octet-stream"),ze.content&&(Ve["Content-Md5"]=ye.createHash("md5").update(new te(ze.content,"utf8")).digest("base64"),Ve["Content-Length"]||(Ve["Content-Length"]=ze.content.length));var $e=this._getResource(ze);Ve.authorization=this.authorization(ze.method,$e,ze.subres,Ve);var nt=this._getReqUrl(ze);ve("request %s %s, with headers %j, !!stream: %s",ze.method,nt,Ve,!!ze.stream);var et=ze.timeout||this.options.timeout;return{url:nt,params:{agent:this.agent,method:ze.method,content:ze.content,stream:ze.stream,headers:Ve,timeout:et,writeStream:ze.writeStream,customResponse:ze.customResponse,ctx:ze.ctx||this.ctx}}},Ge.request=re.default.mark(function ze(Ve){var $e,nt,et,pt;return re.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return $e=this.createRequest(Ve),nt=void 0,et=void 0,ct.prev=3,ct.next=6,this.urllib.request($e.url,$e.params);case 6:nt=ct.sent,ve("response %s %s, got %s, headers: %j",Ve.method,$e.url,nt.status,nt.headers),ct.next=13;break;case 10:ct.prev=10,ct.t0=ct.catch(3),et=ct.t0;case 13:if(pt=void 0,!nt||!Ve.successStatuses||Ve.successStatuses.indexOf(nt.status)!==-1){ct.next=26;break}return ct.next=17,this.requestError(nt);case 17:if(pt=ct.sent,pt.code!=="RequestTimeTooSkewed"){ct.next=23;break}return this.options.amendTimeSkewed=+new Date(pt.serverTime)-new Date,ct.next=22,this.request(Ve);case 22:return ct.abrupt("return",ct.sent);case 23:pt.params=Ve,ct.next=30;break;case 26:if(!et){ct.next=30;break}return ct.next=29,this.requestError(et);case 29:pt=ct.sent;case 30:if(!pt){ct.next=32;break}throw pt;case 32:if(!Ve.xmlResponse){ct.next=36;break}return ct.next=35,this.parseXML(nt.data);case 35:nt.data=ct.sent;case 36:return ct.abrupt("return",nt);case 37:case"end":return ct.stop()}},ze,this,[[3,10]])}),Ge._getResource=function(ze){var Ve="/";return ze.bucket&&(Ve+=ze.bucket+"/"),ze.object&&(Ve+=ze.object),Ve},Ge._isIP=function(ze){return Ye._isIP(ze)},Ge._escape=function(ze){return Pe.encodeURIComponent(ze).replace(/%2F/g,"/")},Ge._getReqUrl=function(ze){var Ve={};ge(this.options.endpoint).to(Ve);var $e=this._isIP(Ve.hostname),nt=this.options.cname;!ze.bucket||nt||$e||(Ve.host=ze.bucket+"."+Ve.host);var et="/";ze.bucket&&$e&&(et+=ze.bucket+"/"),ze.object&&(et+=this._escape(ze.object).replace(/\+/g,"%2B")),Ve.pathname=et;var pt={};if(ze.query&&Te(pt,ze.query),ze.subres){var ct={};Oe.string(ze.subres)?ct[ze.subres]="":Oe.array(ze.subres)?ze.subres.forEach(function(Rt){ct[Rt]=""}):ct=ze.subres,Te(pt,ct)}return Ve.query=pt,Ee.format(Ve)},Ge._getUserAgent=function(){var ze=se&&se.browser?"js":"nodejs",Ve="aliyun-sdk-"+ze+"/"+Xe.version,$e=je.description;return!$e&&se&&($e="Node.js "+se.version.slice(1)+" on "+se.platform+" "+se.arch),this._checkUserAgent(Ve+" "+$e)},Ge._checkUserAgent=function(ze){return ze.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},Ge.checkBrowserAndVersion=function(ze,Ve){return We.name===ze&&We.version.split(".")[0]===Ve},Ge.parseXML=function(ze){return function(Ve){te.isBuffer(ze)&&(ze=ze.toString()),he.parseString(ze,{explicitRoot:!1,explicitArray:!1},Ve)}},Ge.requestError=re.default.mark(function ze(Ve){var $e,nt,et,pt;return re.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if($e=null,Ve.data&&Ve.data.length){ct.next=5;break}Ve.status===-1||Ve.status===-2?($e=new Error(Ve.message),$e.name=Ve.name,$e.status=Ve.status,$e.code=Ve.name):(Ve.status===404?($e=new Error("Object not exists"),$e.name="NoSuchKeyError",$e.status=404,$e.code="NoSuchKey"):Ve.status===412?($e=new Error("Pre condition failed"),$e.name="PreconditionFailedError",$e.status=412,$e.code="PreconditionFailed"):($e=new Error("Unknow error, status: "+Ve.status),$e.name="UnknowError",$e.status=Ve.status),$e.requestId=Ve.headers["x-oss-request-id"],$e.host=""),ct.next=30;break;case 5:return nt=String(Ve.data),ve("request response error data: %s",nt),et=void 0,ct.prev=8,ct.next=11,this.parseXML(nt)||{};case 11:et=ct.sent,ct.next=21;break;case 14:return ct.prev=14,ct.t0=ct.catch(8),ve(nt),ct.t0.message+=`
raw xml: `+nt,ct.t0.status=Ve.status,ct.t0.requestId=Ve.headers["x-oss-request-id"],ct.abrupt("return",ct.t0);case 21:pt=et.Message||"unknow request error, status: "+Ve.status,et.Condition&&(pt+=" (condition: "+et.Condition+")"),$e=new Error(pt),$e.name=et.Code?et.Code+"Error":"UnknowError",$e.status=Ve.status,$e.code=et.Code,$e.requestId=et.RequestId,$e.hostId=et.HostId,$e.serverTime=et.ServerTime;case 30:return ve("generate error %j",$e),ct.abrupt("return",$e);case 32:case"end":return ct.stop()}},ze,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,Ce,ue){(function(se){"use strict";function te(ge){return ge&&ge.__esModule?ge:{default:ge}}function le(ge,_e){if(!(this instanceof le))return new le(ge,_e);me.call(this,_e),this.file=ge,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ee=ie("babel-runtime/core-js/array/from"),ne=te(ee),E=ie("babel-runtime/regenerator"),b=te(E),z=ie("is-type-of"),x=ie("util"),re=ie("path"),ae=ie("mime"),oe=ie("copy-to"),ve=ue;ve.multipartUpload=b.default.mark(function ge(_e,he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot;return b.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(this.resetCancelFlag(),pe=pe||{},!pe.checkpoint||!pe.checkpoint.uploadId){We.next=6;break}return We.next=5,this._resumeMultipart(pe.checkpoint,pe);case 5:return We.abrupt("return",We.sent);case 6:return ke=102400,pe.mime||(z.file(he)?pe.mime=ae.getType(re.extname(he.name)):z.blob(he)?pe.mime=he.type:pe.mime=ae.getType(re.extname(he))),pe.headers=pe.headers||{},this._convertMetaToHeaders(pe.meta,pe.headers),We.next=12,this._getFileSize(he);case 12:if(!((Te=We.sent)<ke)){We.next=25;break}return Ee=this._createStream(he,0,Te),pe.contentLength=Te,We.next=18,this.putStream(_e,Ee,pe);case 18:if(Oe=We.sent,!pe||!pe.progress){We.next=22;break}return We.next=22,pe.progress(1);case 22:return je={res:Oe.res,bucket:this.options.bucket,name:_e,etag:Oe.res.headers.etag},(pe.headers&&pe.headers["x-oss-callback"]||pe.callback)&&(je.data=Oe.data),We.abrupt("return",je);case 25:if(!(pe.partSize&&pe.partSize<ke)){We.next=27;break}throw new Error("partSize must not be smaller than "+ke);case 27:return We.next=29,this.initMultipartUpload(_e,pe);case 29:if(Pe=We.sent,Qe=Pe.uploadId,Xe=this._getPartSize(Te,pe.partSize),ot={file:he,name:_e,fileSize:Te,partSize:Xe,uploadId:Qe,doneParts:[]},!pe||!pe.progress){We.next=36;break}return We.next=36,pe.progress(0,ot,Pe.res);case 36:return We.next=38,this._resumeMultipart(ot,pe);case 38:return We.abrupt("return",We.sent);case 39:case"end":return We.stop()}},ge,this)}),ve._resumeMultipart=b.default.mark(function ge(_e,he){var pe,ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot,We,rt,Ye,ut,Ge,ze,Ve,$e,nt,et,pt;return b.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(!this.isCancel()){ct.next=2;break}throw this._makeCancelEvent();case 2:if(pe=_e.file,ke=_e.fileSize,Te=_e.partSize,Ee=_e.uploadId,Oe=_e.doneParts,je=_e.name,Pe=[],Oe.length>0&&oe(Oe).to(Pe),Qe=this._divideParts(ke,Te),Xe=Qe.length,ot=!1,We=b.default.mark(function Rt(dt,Mt){var xt,yt,bt;return b.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(dt.isCancel()){He.next=21;break}return He.prev=1,xt=Qe[Mt-1],yt={stream:dt._createStream(pe,xt.start,xt.end),size:xt.end-xt.start},He.next=6,dt._uploadPart(je,Ee,Mt,yt);case 6:if(bt=He.sent,dt.isCancel()||ot){He.next=13;break}if(_e.doneParts.push({number:Mt,etag:bt.res.headers.etag}),Pe.push({number:Mt,etag:bt.res.headers.etag}),!he||!he.progress){He.next=13;break}return He.next=13,he.progress(Oe.length/Xe,_e,bt.res);case 13:He.next=21;break;case 15:if(He.prev=15,He.t0=He.catch(1),dt.isCancel()){He.next=21;break}throw dt.cancel(),He.t0.partNum=Mt,He.t0;case 21:case"end":return He.stop()}},Rt,this,[[1,15]])}),rt=(0,ne.default)(new Array(Xe),function(Rt,dt){return dt+1}),Ye=Pe.map(function(Rt){return Rt.number}),ut=rt.filter(function(Rt){return Ye.indexOf(Rt)<0}),Ge=5,ze=he.parallel||Ge,!this.checkBrowserAndVersion("Internet Explorer","10")&&ze!==1){ct.next=26;break}Ve=0;case 16:if(!(Ve<ut.length)){ct.next=24;break}if(!this.isCancel()){ct.next=19;break}throw this._makeCancelEvent();case 19:return ct.next=21,We(this,ut[Ve]);case 21:Ve++,ct.next=16;break;case 24:ct.next=40;break;case 26:for($e=[],nt=0;nt<ut.length;nt++)$e.push(We(this,ut[nt]));return ct.next=30,this._thunkPool($e,ze);case 30:if(et=ct.sent,ot=!0,!(et&&et.length>0)){ct.next=37;break}throw this.resetCancelFlag(),pt=et[0],pt.message="Failed to upload some parts with error: "+pt.toString()+" part_num: "+pt.partNum,pt;case 37:if(!this.isCancel()){ct.next=40;break}throw $e=null,this._makeCancelEvent();case 40:return ct.next=42,this.completeMultipartUpload(je,Ee,Pe,he);case 42:return ct.abrupt("return",ct.sent);case 43:case"end":return ct.stop()}},ge,this)}),z.file=function(ge){return typeof File!="undefined"&&ge instanceof File},z.blob=function(ge){return typeof Blob!="undefined"&&ge instanceof Blob},ve._getFileSize=b.default.mark(function ge(_e){var he;return b.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!z.buffer(_e)){pe.next=4;break}return pe.abrupt("return",_e.length);case 4:if(!z.blob(_e)&&!z.file(_e)){pe.next=6;break}return pe.abrupt("return",_e.size);case 6:if(!z.string(_e)){pe.next=11;break}return pe.next=9,this._statFile(_e);case 9:return he=pe.sent,pe.abrupt("return",he.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return pe.stop()}},ge,this)});var ye=ie("stream"),me=ye.Readable;x.inherits(le,me),le.prototype.readFileAndPush=function(ge){if(this.fileBuffer)for(var _e=!0;_e&&this.fileBuffer&&this.start<this.fileBuffer.length;){var he=this.start,pe=he+ge;pe=pe>this.fileBuffer.length?this.fileBuffer.length:pe,this.start=pe,_e=this.push(this.fileBuffer.slice(he,pe))}},le.prototype._read=function(ge){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);ge=ge||16384;var _e=this;this.reader.onload=function(he){_e.fileBuffer=new se(new Uint8Array(he.target.result)),_e.file=null,_e.readFileAndPush(ge)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(ge)},ve._createStream=function(ge,_e,he){if(z.blob(ge)||z.file(ge))return new le(ge.slice(_e,he));throw new Error("_createStream requires File/String.")},ve._getPartSize=function(ge,_e){return _e?Math.max(Math.ceil(ge/1e4),_e):1048576},ve._divideParts=function(ge,_e){for(var he=Math.ceil(ge/_e),pe=[],ke=0;ke<he;ke++){var Te=_e*ke,Ee=Math.min(Te+_e,ge);pe.push({start:Te,end:Ee})}return pe},ve._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,Ce,ue){"use strict";function se(_e){return _e&&_e.__esModule?_e:{default:_e}}var te=ie("babel-runtime/core-js/object/keys"),le=se(te),ee=ie("babel-runtime/regenerator"),ne=se(ee),E=ie("debug")("ali-oss:object"),b=ie("utility"),z=ie("fs"),x=ie("is-type-of"),re=ie("url"),ae=ie("copy-to"),oe=ie("path"),ve=ie("mime"),ye=ie("../common/callback"),me=ie("../common/signUtils"),ge=ue;ge.append=ne.default.mark(function _e(he,pe,ke){var Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ke=ke||{},ke.position===void 0&&(ke.position="0"),ke.subres={append:"",position:ke.position},ke.method="POST",Ee.next=6,this.put(he,pe,ke);case 6:return Te=Ee.sent,Te.nextAppendPosition=Te.res.headers["x-oss-next-append-position"],Ee.abrupt("return",Te);case 9:case"end":return Ee.stop()}},_e,this)}),ge.put=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je,Pe,Qe;return ne.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Te=void 0,ke=ke||{},!x.buffer(pe)){Xe.next=6;break}Te=pe,Xe.next=18;break;case 6:if(!x.blob(pe)&&!x.file(pe)){Xe.next=17;break}return ke.mime||(x.file(pe)?ke.mime=ve.getType(oe.extname(pe.name)):ke.mime=pe.type),Ee=this._createStream(pe,0,pe.size),Xe.next=11,this._getFileSize(pe);case 11:return ke.contentLength=Xe.sent,Xe.next=14,this.putStream(he,Ee,ke);case 14:return Xe.abrupt("return",Xe.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return ke.headers=ke.headers||{},this._convertMetaToHeaders(ke.meta,ke.headers),Oe=ke.method||"PUT",je=this._objectRequestParams(Oe,he,ke),ye.encodeCallback(je,ke),je.mime=ke.mime,je.content=Te,je.successStatuses=[200],Xe.next=28,this.request(je);case 28:return Pe=Xe.sent,Qe={name:he,url:this._objectUrl(he),res:Pe.res},je.headers&&je.headers["x-oss-callback"]&&(Qe.data=JSON.parse(Pe.data.toString())),Xe.abrupt("return",Qe);case 32:case"end":return Xe.stop()}},_e,this)}),ge.putStream=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},ke.contentLength?ke.headers["Content-Length"]=ke.contentLength:ke.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(ke.meta,ke.headers),Te=ke.method||"PUT",Ee=this._objectRequestParams(Te,he,ke),ye.encodeCallback(Ee,ke),Ee.mime=ke.mime,Ee.stream=pe,Ee.successStatuses=[200],Pe.next=12,this.request(Ee);case 12:return Oe=Pe.sent,je={name:he,url:this._objectUrl(he),res:Oe.res},Ee.headers&&Ee.headers["x-oss-callback"]&&(je.data=JSON.parse(Oe.data.toString())),Pe.abrupt("return",je);case 16:case"end":return Pe.stop()}},_e,this)}),ge.head=ne.default.mark(function _e(he,pe){var ke,Te,Ee;return ne.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ke=this._objectRequestParams("HEAD",he,pe),ke.successStatuses=[200,304],Oe.next=4,this.request(ke);case 4:return Te=Oe.sent,Ee={meta:null,res:Te.res,status:Te.status},Te.status===200&&(0,le.default)(Te.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(Ee.meta||(Ee.meta={}),Ee.meta[je.substring(11)]=Te.headers[je])}),Oe.abrupt("return",Ee);case 8:case"end":return Oe.stop()}},_e,this)}),ge.get=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Te=null,Ee=!1,x.writableStream(pe)?Te=pe:x.string(pe)?(Te=z.createWriteStream(pe),Ee=!0):ke=pe,ke=ke||{},ke.process&&(ke.subres=ke.subres||{},ke.subres["x-oss-process"]=ke.process),Oe=void 0,Pe.prev=6,je=this._objectRequestParams("GET",he,ke),je.writeStream=Te,je.successStatuses=[200,206,304],Pe.next=12,this.request(je);case 12:Oe=Pe.sent,Ee&&Te.destroy(),Pe.next=24;break;case 16:if(Pe.prev=16,Pe.t0=Pe.catch(6),!Ee){Pe.next=23;break}return Te.destroy(),E("get error: %s, delete the exists file %s",Pe.t0,pe),Pe.next=23,this._deleteFileSafe(pe);case 23:throw Pe.t0;case 24:return Pe.abrupt("return",{res:Oe.res,content:Oe.data});case 25:case"end":return Pe.stop()}},_e,this,[[6,16]])}),ge.getStream=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},ke=this._objectRequestParams("GET",he,pe),ke.customResponse=!0,ke.successStatuses=[200,206,304],Ee.next=6,this.request(ke);case 6:return Te=Ee.sent,Ee.abrupt("return",{stream:Te.res,res:{status:Te.status,headers:Te.headers}});case 8:case"end":return Ee.stop()}},_e,this)}),ge.delete=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ke=this._objectRequestParams("DELETE",he,pe),ke.successStatuses=[204],Ee.next=4,this.request(ke);case 4:return Te=Ee.sent,Ee.abrupt("return",{res:Te.res});case 6:case"end":return Ee.stop()}},_e,this)}),ge.deleteMulti=ne.default.mark(function _e(he,pe){var ke,Te,Ee,Oe,je,Pe;return ne.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:for(pe=pe||{},ke=`<?xml version="1.0" encoding="UTF-8"?>
<Delete>
`,pe.quiet?ke+=` <Quiet>true</Quiet>
`:ke+=` <Quiet>false</Quiet>
`,Te=0;Te<he.length;Te++)ke+=" <Object><Key>"+b.escape(this._objectName(he[Te]))+`</Key></Object>
`;return ke+="</Delete>",E("delete multi objects: %s",ke),pe.subres="delete",Ee=this._objectRequestParams("POST","",pe),Ee.mime="xml",Ee.content=ke,Ee.xmlResponse=!0,Ee.successStatuses=[200],Qe.next=14,this.request(Ee);case 14:return Oe=Qe.sent,je=Oe.data,Pe=je&&je.Deleted||null,Pe&&(Array.isArray(Pe)||(Pe=[Pe]),Pe=Pe.map(function(Xe){return Xe.Key})),Qe.abrupt("return",{res:Oe.res,deleted:Pe});case 19:case"end":return Qe.stop()}},_e,this)}),ge.copy=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe;return ne.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},(0,le.default)(ke.headers).forEach(function(Pe){ke.headers["x-oss-copy-source-"+Pe.toLowerCase()]=ke.headers[Pe]}),ke.meta&&(ke.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ke.meta,ke.headers),pe=pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(pe):"/"+encodeURIComponent(pe.slice(1)),ke.headers["x-oss-copy-source"]=pe,Te=this._objectRequestParams("PUT",he,ke),Te.xmlResponse=!0,Te.successStatuses=[200,304],je.next=12,this.request(Te);case 12:return Ee=je.sent,Oe=Ee.data,Oe&&(Oe={etag:Oe.ETag,lastModified:Oe.LastModified}),je.abrupt("return",{data:Oe,res:Ee.res});case 16:case"end":return je.stop()}},_e,this)}),ge.putMeta=ne.default.mark(function _e(he,pe,ke){return ne.default.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.next=2,this.copy(he,he,{meta:pe||{},timeout:ke&&ke.timeout,ctx:ke&&ke.ctx});case 2:return Te.abrupt("return",Te.sent);case 3:case"end":return Te.stop()}},_e,this)}),ge.list=ne.default.mark(function _e(he,pe){var ke,Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ke=this._objectRequestParams("GET","",pe),ke.query=he,ke.xmlResponse=!0,ke.successStatuses=[200],Pe.next=6,this.request(ke);case 6:return Te=Pe.sent,Ee=Te.data.Contents,Oe=this,Ee&&(Array.isArray(Ee)||(Ee=[Ee]),Ee=Ee.map(function(Qe){return{name:Qe.Key,url:Oe._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}}})),je=Te.data.CommonPrefixes||null,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Qe){return Qe.Prefix})),Pe.abrupt("return",{res:Te.res,objects:Ee,prefixes:je,nextMarker:Te.data.NextMarker||null,isTruncated:Te.data.IsTruncated==="true"});case 13:case"end":return Pe.stop()}},_e,this)}),ge.putACL=ne.default.mark(function _e(he,pe,ke){var Te,Ee;return ne.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ke=ke||{},ke.subres="acl",ke.headers=ke.headers||{},ke.headers["x-oss-object-acl"]=pe,he=this._objectName(he),Te=this._objectRequestParams("PUT",he,ke),Te.successStatuses=[200],Oe.next=9,this.request(Te);case 9:return Ee=Oe.sent,Oe.abrupt("return",{res:Ee.res});case 11:case"end":return Oe.stop()}},_e,this)}),ge.getACL=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},pe.subres="acl",he=this._objectName(he),ke=this._objectRequestParams("GET",he,pe),ke.successStatuses=[200],ke.xmlResponse=!0,Ee.next=8,this.request(ke);case 8:return Te=Ee.sent,Ee.abrupt("return",{acl:Te.data.AccessControlList.Grant,owner:{id:Te.data.Owner.ID,displayName:Te.data.Owner.DisplayName},res:Te.res});case 10:case"end":return Ee.stop()}},_e,this)}),ge.restore=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},pe.subres="restore",ke=this._objectRequestParams("POST",he,pe),ke.successStatuses=[202],Ee.next=6,this.request(ke);case 6:return Te=Ee.sent,Ee.abrupt("return",{res:Te.res});case 8:case"end":return Ee.stop()}},_e,this)}),ge.signatureUrl=function(_e,he){he=he||{},_e=this._objectName(_e),he.method=he.method||"GET";var pe=b.timestamp()+(he.expires||1800),ke={bucket:this.options.bucket,object:_e},Te=this._getResource(ke);this.options.stsToken&&(he["security-token"]=this.options.stsToken);var Ee=me._signatureForURL(this.options.accessKeySecret,he,Te,pe),Oe=re.parse(this._getReqUrl(ke));return Oe.query={OSSAccessKeyId:this.options.accessKeyId,Expires:pe,Signature:Ee.Signature},ae(Ee.subResource).to(Oe.query),Oe.format()},ge.getObjectUrl=function(_e,he){return he?he[he.length-1]!=="/"&&(he+="/"):he=this.options.endpoint.format(),he+this._escape(this._objectName(_e))},ge._objectUrl=function(_e){return this._getReqUrl({bucket:this.options.bucket,object:_e})},ge.generateObjectUrl=function(_e,he){if(he)he[he.length-1]!=="/"&&(he+="/");else{he=this.options.endpoint.format();var pe=re.parse(he),ke=this.options.bucket;pe.hostname=ke+"."+pe.hostname,pe.host=ke+"."+pe.host,he=pe.format()}return he+this._escape(this._objectName(_e))},ge._objectRequestParams=function(_e,he,pe){if(!this.options.bucket)throw new Error("Please create a bucket first");pe=pe||{},he=this._objectName(he);var ke={object:he,bucket:this.options.bucket,method:_e,subres:pe&&pe.subres,timeout:pe&&pe.timeout,ctx:pe&&pe.ctx};return pe.headers&&(ke.headers={},ae(pe.headers).to(ke.headers)),ke},ge._objectName=function(_e){return _e.replace(/^\/+/,"")},ge._statFile=function(_e){return function(he){z.stat(_e,he)}},ge._convertMetaToHeaders=function(_e,he){_e&&(0,le.default)(_e).forEach(function(pe){he["x-oss-meta-"+pe]=_e[pe]})},ge._deleteFileSafe=function(_e){return function(he){z.exists(_e,function(pe){pe?z.unlink(_e,function(ke){ke&&E("unlink %j error: %s",_e,ke),he()}):he()})}}},{"../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,Ce,ue){"use strict";ue.version="5.3.1"},{}],6:[function(ie,Ce,ue){"use strict";function se(oe){return oe&&oe.__esModule?oe:{default:oe}}function te(oe){return oe&&typeof oe.next=="function"&&typeof oe.throw=="function"}function le(oe){if(!oe)return!1;var ve=oe.constructor;return!!ve&&(ve.name==="GeneratorFunction"||ve.displayName==="GeneratorFunction"||te(ve.prototype)||te(oe.prototype))}function ee(oe,ve){var ye=new oe(ve),me=(0,x.default)(ye),ge=(0,x.default)((0,b.default)(ye));me.concat(ge).forEach(function(_e){le(ye[_e])?this[_e]=re.wrap(ye[_e]).bind(ye):this[_e]=ye[_e]},this)}function ne(oe){if(!(this instanceof ne))return new ne(oe);ee.call(this,ae,oe)}var E=ie("babel-runtime/core-js/object/get-prototype-of"),b=se(E),z=ie("babel-runtime/core-js/object/keys"),x=se(z),re=ie("co"),ae=ie("./client");Ce.exports=ne,ne.STS=function oe(ve){if(!(this instanceof oe))return new oe(ve);ee.call(this,ae.STS,ve)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(ie,Ce,ue){(function(se){"use strict";function te(b){return b&&b.__esModule?b:{default:b}}var le=ie("babel-runtime/core-js/object/keys"),ee=te(le),ne=ie("babel-runtime/core-js/json/stringify"),E=te(ne);ue.encodeCallback=function(b,z){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.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 re=new se((0,E.default)(x)).toString("base64");if(b.headers["x-oss-callback"]=re,z.callback.customValue){var ae={};(0,ee.default)(z.callback.customValue).forEach(function(oe){ae["x:"+oe]=z.callback.customValue[oe]}),b.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,Ce,ue){"use strict";var se=ie("babel-runtime/regenerator"),te=function(E){return E&&E.__esModule?E:{default:E}}(se),le=ie("copy-to"),ee=ie("./callback"),ne=ue;ne.listUploads=te.default.mark(function E(b,z){var x,re,ae,oe;return te.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return z=z||{},x={},le(z).to(x),x.subres="uploads",re=this._objectRequestParams("GET","",x),re.query=b,re.xmlResponse=!0,re.successStatuses=[200],ve.next=10,this.request(re);case 10:return ae=ve.sent,oe=ae.data.Upload||[],Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(ye){return{name:ye.Key,uploadId:ye.UploadId,initiated:ye.Initiated}}),ve.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 ve.stop()}},E,this)}),ne.listParts=te.default.mark(function E(b,z,x,re){var ae,oe,ve;return te.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return re=re||{},ae={},le(re).to(ae),ae.subres={uploadId:z},oe=this._objectRequestParams("GET",b,ae),oe.query=x,oe.xmlResponse=!0,oe.successStatuses=[200],ye.next=10,this.request(oe);case 10:return ve=ye.sent,ye.abrupt("return",{res:ve.res,uploadId:ve.data.UploadId,bucket:ve.data.Bucket,name:ve.data.Key,partNumberMarker:ve.data.PartNumberMarker,nextPartNumberMarker:ve.data.NextPartNumberMarker,maxParts:ve.data.MaxParts,isTruncated:ve.data.IsTruncated,parts:ve.data.Part||[]});case 12:case"end":return ye.stop()}},E,this)}),ne.abortMultipartUpload=te.default.mark(function E(b,z,x){var re,ae,oe;return te.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return this.cancel(),x=x||{},re={},le(x).to(re),re.subres={uploadId:z},ae=this._objectRequestParams("DELETE",b,re),ae.successStatuses=[204],ve.next=9,this.request(ae);case 9:return oe=ve.sent,ve.abrupt("return",{res:oe.res});case 11:case"end":return ve.stop()}},E,this)}),ne.initMultipartUpload=te.default.mark(function E(b,z){var x,re,ae;return te.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return z=z||{},x={},le(z).to(x),x.headers=x.headers||{},this._convertMetaToHeaders(z.meta,x.headers),x.subres="uploads",re=this._objectRequestParams("POST",b,x),re.mime=z.mime,re.xmlResponse=!0,re.successStatuses=[200],oe.next=12,this.request(re);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)}),ne.uploadPart=te.default.mark(function E(b,z,x,re,ae,oe,ve){var ye;return te.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ye={stream:this._createStream(re,ae,oe),size:oe-ae},me.next=3,this._uploadPart(b,z,x,ye,ve);case 3:return me.abrupt("return",me.sent);case 4:case"end":return me.stop()}},E,this)}),ne.completeMultipartUpload=te.default.mark(function E(b,z,x,re){var ae,oe,ve,ye,me,ge,_e,he;return te.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:for(ae=x.concat().sort(function(ke,Te){return ke.number-Te.number}).filter(function(ke,Te,Ee){return!Te||ke.number!==Ee[Te-1].number}),oe=`<?xml version="1.0" encoding="UTF-8"?>
<CompleteMultipartUpload>
`,ve=0;ve<ae.length;ve++)ye=ae[ve],oe+=`<Part>
`,oe+="<PartNumber>"+ye.number+`</PartNumber>
`,oe+="<ETag>"+ye.etag+`</ETag>
`,oe+=`</Part>
`;return oe+="</CompleteMultipartUpload>",re=re||{},me={},le(re).to(me),me.subres={uploadId:z},ge=this._objectRequestParams("POST",b,me),ee.encodeCallback(ge,me),ge.mime="xml",ge.content=oe,ge.headers&&ge.headers["x-oss-callback"]||(ge.xmlResponse=!0),ge.successStatuses=[200],pe.next=16,this.request(ge);case 16:return _e=pe.sent,he={res:_e.res,bucket:ge.bucket,name:b,etag:_e.res.headers.etag},ge.headers&&ge.headers["x-oss-callback"]&&(he.data=JSON.parse(_e.data.toString())),pe.abrupt("return",he);case 20:case"end":return pe.stop()}},E,this)}),ne._uploadPart=te.default.mark(function E(b,z,x,re,ae){var oe,ve,ye;return te.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ae=ae||{},oe={},le(ae).to(oe),oe.headers={"Content-Length":re.size},oe.subres={partNumber:x,uploadId:z},ve=this._objectRequestParams("PUT",b,oe),ve.mime=oe.mime,ve.stream=re.stream,ve.successStatuses=[200],me.next=11,this.request(ve);case 11:return ye=me.sent,re.stream=null,ve.stream=null,me.abrupt("return",{name:b,etag:ye.res.headers.etag,res:ye.res});case 15:case"end":return me.stop()}},E,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(ie,Ce,ue){(function(se){"use strict";function te(x){return x&&x.__esModule?x:{default:x}}var le=ie("babel-runtime/core-js/json/stringify"),ee=te(le),ne=ie("babel-runtime/core-js/object/keys"),E=te(ne),b=ie("./../../shims/crypto/crypto.js"),z=ie("is-type-of");ue.buildCanonicalizedResource=function(x,re){var ae=""+x,oe="?";if(z.string(re)&&re.trim()!=="")ae+=oe+re;else if(z.array(re))re.sort(),ae+=oe+re.join("&");else if(re){var ve=function(me,ge){return me[0]>ge[0]?1:me[0]<ge[0]?-1:0},ye=function(me){ae+=oe+me,re[me]&&(ae+="="+re[me]),oe="&"};(0,E.default)(re).sort(ve).forEach(ye)}return ae},ue.buildCanonicalString=function(x,re,ae,oe){ae=ae||{};var ve=ae.headers||{},ye=[],me={},ge=[x.toUpperCase(),ve["Content-Md5"]||"",ve["Content-Type"]||ve["Content-Type".toLowerCase()],oe||ve["x-oss-date"]];return(0,E.default)(ve).forEach(function(_e){var he=_e.toLowerCase();he.indexOf("x-oss-")===0&&(me[he]=String(ve[_e]).trim())}),(0,E.default)(me).sort().forEach(function(_e){ye.push(_e+":"+me[_e])}),ge=ge.concat(ye),ge.push(this.buildCanonicalizedResource(re,ae.parameters)),ge.join(`
`)},ue.computeSignature=function(x,re){return b.createHmac("sha1",x).update(new se(re,"utf8")).digest("base64")},ue.authorization=function(x,re,ae){return"OSS "+x+":"+this.computeSignature(re,ae)},ue._signatureForURL=function(x,re,ae,oe){var ve={},ye={};if(re.process&&(ye["x-oss-process"]=re.process),re.response&&(0,E.default)(re.response).forEach(function(he){var pe="response-"+he.toLowerCase();ye[pe]=re.response[he]}),(0,E.default)(re).forEach(function(he){var pe=he.toLowerCase(),ke=re[he];pe.indexOf("x-oss-")===0?ve[pe]=ke:pe.indexOf("content-md5")===0||pe.indexOf("content-type")===0?ve[he]=ke:pe!=="expires"&&pe!=="response"&&pe!=="process"&&pe!=="method"&&(ye[pe]=ke)}),Object.prototype.hasOwnProperty.call(re,"security-token")&&(ye["security-token"]=re["security-token"]),Object.prototype.hasOwnProperty.call(re,"callback")){var me={callbackUrl:encodeURI(re.callback.url),callbackBody:re.callback.body};if(re.callback.host&&(me.callbackHost=re.callback.host),re.callback.contentType&&(me.callbackBodyType=re.callback.contentType),ye.callback=new se((0,ee.default)(me)).toString("base64"),re.callback.customValue){var ge={};(0,E.default)(re.callback.customValue).forEach(function(he){ge["x:"+he]=re.callback.customValue[he]}),ye["callback-var"]=new se((0,ee.default)(ge)).toString("base64")}}var _e=this.buildCanonicalString(re.method,ae,{headers:ve,parameters:ye},oe.toString());return{Signature:this.computeSignature(x,_e),subResource:ye}}}).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,Ce,ue){"use strict";var se=ie("babel-runtime/regenerator"),te=function(b){return b&&b.__esModule?b:{default:b}}(se),le=ie("co"),ee=ie("co-priority-queue"),ne=ie("any-promise"),E=ue;E._thunkPool=function(b,z){function x(ye,me){++oe===ye.length&&me(ve)}function re(ye,me){function ge(){var Ee;return te.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:Ee=void 0;case 1:if(ae.isCancel()){Oe.next=9;break}return Oe.next=4,pe.next();case 4:return Ee=Oe.sent,Oe.next=7,Ee();case 7:Oe.next=1;break;case 9:ke+=1,ke===ye&&(pe.fns=[],pe.buffer=[],me(ve));case 11:case"end":return Oe.stop()}},he,this)}function _e(Ee){console.error(Ee.stack)}for(var he=te.default.mark(ge),pe=new ee,ke=0,Te=0;Te<ye;Te++)le(ge).catch(_e);return function(Ee,Oe){return function(je){pe.push(te.default.mark(function Pe(){return te.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.prev=0,Qe.t0=je,Qe.next=4,Ee;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),je(Qe.t2);case 11:case"end":return Qe.stop()}},Pe,this,[[0,8]])}),Oe)}}}var ae=this,oe=0,ve=[];return new ne(function(ye){function me(ke){return te.default.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.next=2,he(b[ke]);case 2:x(b,ye);case 3:case"end":return Te.stop()}},_e,this)}function ge(ke){ve.push(ke),x(b,ye)}for(var _e=te.default.mark(me),he=new re(z,ye),pe=0;pe<b.length;pe++)le(me(pe)).catch(ge)})},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,Ce,ue){"use strict";ue._isIP=function(se){var te=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,le=/^\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 te.test(se)||le.test(se)}},{}],12:[function(ie,Ce,ue){function se(){}Ce.exports=se,Ce.exports.HttpsAgent=se},{}],13:[function(ie,Ce,ue){Ce.exports=ie("./register")().Promise},{"./register":15}],14:[function(ie,Ce,ue){"use strict";var se=null;Ce.exports=function(te,le){return function(ee,ne){ee=ee||null,ne=ne||{};var E=ne.global!==!1;if(se===null&&E&&(se=te["@@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&&ne.Promise!==void 0?{Promise:ne.Promise,implementation:ee}:le(ee),E&&(te["@@any-promise/REGISTRATION"]=se)),se}}},{}],15:[function(ie,Ce,ue){"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"}}Ce.exports=ie("./loader")(window,se)},{"./loader":14}],16:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(ie,Ce,ue){Ce.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,Ce,ue){Ce.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,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(ie,Ce,ue){Ce.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,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(ie,Ce,ue){"use strict";ue.__esModule=!0,ue.default=function(se,te){if(!(se instanceof te))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(ie,Ce,ue){"use strict";ue.__esModule=!0;var se=ie("../core-js/object/define-property"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);ue.default=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),(0,te.default)(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}()},{"../core-js/object/define-property":20}],32:[function(ie,Ce,ue){"use strict";function se(b){return b&&b.__esModule?b:{default:b}}ue.__esModule=!0;var te=ie("../core-js/symbol/iterator"),le=se(te),ee=ie("../core-js/symbol"),ne=se(ee),E=typeof ne.default=="function"&&typeof le.default=="symbol"?function(b){return typeof b}:function(b){return b&&typeof ne.default=="function"&&b.constructor===ne.default&&b!==ne.default.prototype?"symbol":typeof b};ue.default=typeof ne.default=="function"&&E(le.default)==="symbol"?function(b){return b===void 0?"undefined":E(b)}:function(b){return b&&typeof ne.default=="function"&&b.constructor===ne.default&&b!==ne.default.prototype?"symbol":b===void 0?"undefined":E(b)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(ie,Ce,ue){Ce.exports=ie("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(ie,Ce,ue){"use strict";function se(ye){var me=ye.length;if(me%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ge=ye.indexOf("=");return ge===-1&&(ge=me),[ge,ge===me?0:4-ge%4]}function te(ye){var me=se(ye),ge=me[0],_e=me[1];return 3*(ge+_e)/4-_e}function le(ye,me,ge){return 3*(me+ge)/4-ge}function ee(ye){for(var me,ge=se(ye),_e=ge[0],he=ge[1],pe=new re(le(ye,_e,he)),ke=0,Te=he>0?_e-4:_e,Ee=0;Ee<Te;Ee+=4)me=x[ye.charCodeAt(Ee)]<<18|x[ye.charCodeAt(Ee+1)]<<12|x[ye.charCodeAt(Ee+2)]<<6|x[ye.charCodeAt(Ee+3)],pe[ke++]=me>>16&255,pe[ke++]=me>>8&255,pe[ke++]=255&me;return he===2&&(me=x[ye.charCodeAt(Ee)]<<2|x[ye.charCodeAt(Ee+1)]>>4,pe[ke++]=255&me),he===1&&(me=x[ye.charCodeAt(Ee)]<<10|x[ye.charCodeAt(Ee+1)]<<4|x[ye.charCodeAt(Ee+2)]>>2,pe[ke++]=me>>8&255,pe[ke++]=255&me),pe}function ne(ye){return z[ye>>18&63]+z[ye>>12&63]+z[ye>>6&63]+z[63&ye]}function E(ye,me,ge){for(var _e,he=[],pe=me;pe<ge;pe+=3)_e=(ye[pe]<<16&16711680)+(ye[pe+1]<<8&65280)+(255&ye[pe+2]),he.push(ne(_e));return he.join("")}function b(ye){for(var me,ge=ye.length,_e=ge%3,he=[],pe=0,ke=ge-_e;pe<ke;pe+=16383)he.push(E(ye,pe,pe+16383>ke?ke:pe+16383));return _e===1?(me=ye[ge-1],he.push(z[me>>2]+z[me<<4&63]+"==")):_e===2&&(me=(ye[ge-2]<<8)+ye[ge-1],he.push(z[me>>10]+z[me>>4&63]+z[me<<2&63]+"=")),he.join("")}ue.byteLength=te,ue.toByteArray=ee,ue.fromByteArray=b;for(var z=[],x=[],re=typeof Uint8Array!="undefined"?Uint8Array:Array,ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oe=0,ve=ae.length;oe<ve;++oe)z[oe]=ae[oe],x[ae.charCodeAt(oe)]=oe;x[45]=62,x[95]=63},{}],35:[function(ie,Ce,ue){(function(se,te,le){Ce!==void 0&&Ce.exports?Ce.exports=le():typeof ce=="function"&&ce.amd?ce("bowser",le):se.bowser=le()})(this,0,function(){function se(x){function re(ze){var Ve=x.match(ze);return Ve&&Ve.length>1&&Ve[1]||""}function ae(ze){var Ve=x.match(ze);return Ve&&Ve.length>1&&Ve[2]||""}var oe,ve=re(/(ipod|iphone|ipad)/i).toLowerCase(),ye=/like android/i.test(x),me=!ye&&/android/i.test(x),ge=/nexus\s*[0-6]\s*/i.test(x),_e=!ge&&/nexus\s*[0-9]+/i.test(x),he=/CrOS/.test(x),pe=/silk/i.test(x),ke=/sailfish/i.test(x),Te=/tizen/i.test(x),Ee=/(web|hpw)os/i.test(x),Oe=/windows phone/i.test(x),je=(/SamsungBrowser/i.test(x),!Oe&&/windows/i.test(x)),Pe=!ve&&!pe&&/macintosh/i.test(x),Qe=!me&&!ke&&!Te&&!Ee&&/linux/i.test(x),Xe=ae(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=re(/version\/(\d+(\.\d+)?)/i),We=/tablet/i.test(x)&&!/tablet pc/i.test(x),rt=!We&&/[^-]mobi/i.test(x),Ye=/xbox/i.test(x);/opera/i.test(x)?oe={name:"Opera",opera:b,version:ot||re(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(x)?oe={name:"Opera",opera:b,version:re(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(x)?oe={name:"Samsung Internet for Android",samsungBrowser:b,version:ot||re(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(x)?oe={name:"Opera Coast",coast:b,version:ot||re(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(x)?oe={name:"Yandex Browser",yandexbrowser:b,version:ot||re(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(x)?oe={name:"UC Browser",ucbrowser:b,version:re(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(x)?oe={name:"Maxthon",maxthon:b,version:re(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(x)?oe={name:"Epiphany",epiphany:b,version:re(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(x)?oe={name:"Puffin",puffin:b,version:re(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(x)?oe={name:"Sleipnir",sleipnir:b,version:re(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(x)?oe={name:"K-Meleon",kMeleon:b,version:re(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Oe?(oe={name:"Windows Phone",osname:"Windows Phone",windowsphone:b},Xe?(oe.msedge=b,oe.version=Xe):(oe.msie=b,oe.version=re(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(x)?oe={name:"Internet Explorer",msie:b,version:re(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:he?oe={name:"Chrome",osname:"Chrome OS",chromeos:b,chromeBook:b,chrome:b,version:re(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(x)?oe={name:"Microsoft Edge",msedge:b,version:Xe}:/vivaldi/i.test(x)?oe={name:"Vivaldi",vivaldi:b,version:re(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:ke?oe={name:"Sailfish",osname:"Sailfish OS",sailfish:b,version:re(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(x)?oe={name:"SeaMonkey",seamonkey:b,version:re(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(x)?(oe={name:"Firefox",firefox:b,version:re(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(x)&&(oe.firefoxos=b,oe.osname="Firefox OS")):pe?oe={name:"Amazon Silk",silk:b,version:re(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(x)?oe={name:"PhantomJS",phantom:b,version:re(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(x)?oe={name:"SlimerJS",slimer:b,version:re(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(x)||/rim\stablet/i.test(x)?oe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:b,version:ot||re(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ee?(oe={name:"WebOS",osname:"WebOS",webos:b,version:ot||re(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(x)&&(oe.touchpad=b)):/bada/i.test(x)?oe={name:"Bada",osname:"Bada",bada:b,version:re(/dolfin\/(\d+(\.\d+)?)/i)}:Te?oe={name:"Tizen",osname:"Tizen",tizen:b,version:re(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(x)?oe={name:"QupZilla",qupzilla:b,version:re(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(x)?oe={name:"Chromium",chromium:b,version:re(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(x)?oe={name:"Chrome",chrome:b,version:re(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:me?oe={name:"Android",version:ot}:/safari|applewebkit/i.test(x)?(oe={name:"Safari",safari:b},ot&&(oe.version=ot)):ve?(oe={name:ve=="iphone"?"iPhone":ve=="ipad"?"iPad":"iPod"},ot&&(oe.version=ot)):oe=/googlebot/i.test(x)?{name:"Googlebot",googlebot:b,version:re(/googlebot\/(\d+(\.\d+))/i)||ot}:{name:re(/^(.*)\/(.*) /),version:ae(/^(.*)\/(.*) /)},!oe.msedge&&/(apple)?webkit/i.test(x)?(/(apple)?webkit\/537\.36/i.test(x)?(oe.name=oe.name||"Blink",oe.blink=b):(oe.name=oe.name||"Webkit",oe.webkit=b),!oe.version&&ot&&(oe.version=ot)):!oe.opera&&/gecko\//i.test(x)&&(oe.name=oe.name||"Gecko",oe.gecko=b,oe.version=oe.version||re(/gecko\/(\d+(\.\d+)?)/i)),oe.windowsphone||!me&&!oe.silk?!oe.windowsphone&&ve?(oe[ve]=b,oe.ios=b,oe.osname="iOS"):Pe?(oe.mac=b,oe.osname="macOS"):Ye?(oe.xbox=b,oe.osname="Xbox"):je?(oe.windows=b,oe.osname="Windows"):Qe&&(oe.linux=b,oe.osname="Linux"):(oe.android=b,oe.osname="Android");var ut="";oe.windows?ut=function(ze){switch(ze){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}}(re(/Windows ((NT|XP)( \d\d?.\d)?)/i)):oe.windowsphone?ut=re(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):oe.mac?(ut=re(/Mac OS X (\d+([_\.\s]\d+)*)/i),ut=ut.replace(/[_\s]/g,".")):ve?(ut=re(/os (\d+([_\s]\d+)*) like mac os x/i),ut=ut.replace(/[_\s]/g,".")):me?ut=re(/android[ \/-](\d+(\.\d+)*)/i):oe.webos?ut=re(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):oe.blackberry?ut=re(/rim\stablet\sos\s(\d+(\.\d+)*)/i):oe.bada?ut=re(/bada\/(\d+(\.\d+)*)/i):oe.tizen&&(ut=re(/tizen[\/\s](\d+(\.\d+)*)/i)),ut&&(oe.osversion=ut);var Ge=!oe.windows&&ut.split(".")[0];return We||_e||ve=="ipad"||me&&(Ge==3||Ge>=4&&!rt)||oe.silk?oe.tablet=b:(rt||ve=="iphone"||ve=="ipod"||me||ge||oe.blackberry||oe.webos||oe.bada)&&(oe.mobile=b),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=b: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=b:oe.x=b,oe}function te(x){return x.split(".").length}function le(x,re){var ae,oe=[];if(Array.prototype.map)return Array.prototype.map.call(x,re);for(ae=0;ae<x.length;ae++)oe.push(re(x[ae]));return oe}function ee(x){for(var re=Math.max(te(x[0]),te(x[1])),ae=le(x,function(oe){var ve=re-te(oe);return oe+=new Array(ve+1).join(".0"),le(oe.split("."),function(ye){return new Array(20-ye.length).join("0")+ye}).reverse()});--re>=0;){if(ae[0][re]>ae[1][re])return 1;if(ae[0][re]!==ae[1][re])return-1;if(re===0)return 0}}function ne(x,re,ae){var oe=z;typeof re=="string"&&(ae=re,re=void 0),re===void 0&&(re=!1),ae&&(oe=se(ae));var ve=""+oe.version;for(var ye in x)if(x.hasOwnProperty(ye)&&oe[ye]){if(typeof x[ye]!="string")throw new Error("Browser version in the minVersion map should be a string: "+ye+": "+String(x));return ee([ve,x[ye]])<0}return re}function E(x,re,ae){return!ne(x,re,ae)}var b=!0,z=se(typeof navigator!="undefined"&&navigator.userAgent||"");return z.test=function(x){for(var re=0;re<x.length;++re){var ae=x[re];if(typeof ae=="string"&&ae in z)return!0}return!1},z.isUnsupportedBrowser=ne,z.compareVersions=ee,z.check=E,z._detect=se,z.detect=se,z})},{}],36:[function(ie,Ce,ue){},{}],37:[function(ie,Ce,ue){function se(z){if(z&&!E(z))throw new Error("Unknown encoding: "+z)}function te(z){return z.toString(this.encoding)}function le(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 ne=ie("buffer").Buffer,E=ne.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}},b=ue.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=le;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ee;break;default:return void(this.write=te)}this.charBuffer=new ne(6),this.charReceived=0,this.charLength=0};b.prototype.write=function(z){for(var x="";this.charLength;){var re=z.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:z.length;if(z.copy(this.charBuffer,this.charReceived,0,re),this.charReceived+=re,this.charReceived<this.charLength)return"";z=z.slice(re,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 ve=this.surrogateSize;return this.charLength+=ve,this.charReceived+=ve,this.charBuffer.copy(this.charBuffer,ve,0,ve),z.copy(this.charBuffer,0,0,ve),x.substring(0,ae)}return x},b.prototype.detectIncompleteChar=function(z){for(var x=z.length>=3?3:z.length;x>0;x--){var re=z[z.length-x];if(x==1&&re>>5==6){this.charLength=2;break}if(x<=2&&re>>4==14){this.charLength=3;break}if(x<=3&&re>>3==30){this.charLength=4;break}}this.charReceived=x},b.prototype.end=function(z){var x="";if(z&&z.length&&(x=this.write(z)),this.charReceived){var re=this.charReceived,ae=this.charBuffer,oe=this.encoding;x+=ae.slice(0,re).toString(oe)}return x}},{buffer:38}],38:[function(ie,Ce,ue){(function(se){"use strict";function te(){return ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function le(we,Le){if(te()<Le)throw new RangeError("Invalid typed array length");return ee.TYPED_ARRAY_SUPPORT?(we=new Uint8Array(Le),we.__proto__=ee.prototype):(we===null&&(we=new ee(Le)),we.length=Le),we}function ee(we,Le,Ue){if(!(ee.TYPED_ARRAY_SUPPORT||this instanceof ee))return new ee(we,Le,Ue);if(typeof we=="number"){if(typeof Le=="string")throw new Error("If encoding is specified then the first argument must be a string");return z(this,we)}return ne(this,we,Le,Ue)}function ne(we,Le,Ue,Me){if(typeof Le=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Le instanceof ArrayBuffer?ae(we,Le,Ue,Me):typeof Le=="string"?x(we,Le,Ue):oe(we,Le)}function E(we){if(typeof we!="number")throw new TypeError('"size" argument must be a number');if(we<0)throw new RangeError('"size" argument must not be negative')}function b(we,Le,Ue,Me){return E(Le),Le<=0?le(we,Le):Ue!==void 0?typeof Me=="string"?le(we,Le).fill(Ue,Me):le(we,Le).fill(Ue):le(we,Le)}function z(we,Le){if(E(Le),we=le(we,Le<0?0:0|ve(Le)),!ee.TYPED_ARRAY_SUPPORT)for(var Ue=0;Ue<Le;++Ue)we[Ue]=0;return we}function x(we,Le,Ue){if(typeof Ue=="string"&&Ue!==""||(Ue="utf8"),!ee.isEncoding(Ue))throw new TypeError('"encoding" must be a valid string encoding');var Me=0|me(Le,Ue);we=le(we,Me);var Re=we.write(Le,Ue);return Re!==Me&&(we=we.slice(0,Re)),we}function re(we,Le){var Ue=Le.length<0?0:0|ve(Le.length);we=le(we,Ue);for(var Me=0;Me<Ue;Me+=1)we[Me]=255&Le[Me];return we}function ae(we,Le,Ue,Me){if(Le.byteLength,Ue<0||Le.byteLength<Ue)throw new RangeError("'offset' is out of bounds");if(Le.byteLength<Ue+(Me||0))throw new RangeError("'length' is out of bounds");return Le=Ue===void 0&&Me===void 0?new Uint8Array(Le):Me===void 0?new Uint8Array(Le,Ue):new Uint8Array(Le,Ue,Me),ee.TYPED_ARRAY_SUPPORT?(we=Le,we.__proto__=ee.prototype):we=re(we,Le),we}function oe(we,Le){if(ee.isBuffer(Le)){var Ue=0|ve(Le.length);return we=le(we,Ue),we.length===0||Le.copy(we,0,0,Ue),we}if(Le){if(typeof ArrayBuffer!="undefined"&&Le.buffer instanceof ArrayBuffer||"length"in Le)return typeof Le.length!="number"||Ae(Le.length)?le(we,0):re(we,Le);if(Le.type==="Buffer"&&Ke(Le.data))return re(we,Le.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ve(we){if(we>=te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+te().toString(16)+" bytes");return 0|we}function ye(we){return+we!=we&&(we=0),ee.alloc(+we)}function me(we,Le){if(ee.isBuffer(we))return we.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(we)||we instanceof ArrayBuffer))return we.byteLength;typeof we!="string"&&(we=""+we);var Ue=we.length;if(Ue===0)return 0;for(var Me=!1;;)switch(Le){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":case void 0:return Mt(we).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ue;case"hex":return Ue>>>1;case"base64":return bt(we).length;default:if(Me)return Mt(we).length;Le=(""+Le).toLowerCase(),Me=!0}}function ge(we,Le,Ue){var Me=!1;if((Le===void 0||Le<0)&&(Le=0),Le>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Le>>>=0,Ue<=Le))return"";for(we||(we="utf8");;)switch(we){case"hex":return Ye(this,Le,Ue);case"utf8":case"utf-8":return Xe(this,Le,Ue);case"ascii":return We(this,Le,Ue);case"latin1":case"binary":return rt(this,Le,Ue);case"base64":return Qe(this,Le,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,Le,Ue);default:if(Me)throw new TypeError("Unknown encoding: "+we);we=(we+"").toLowerCase(),Me=!0}}function _e(we,Le,Ue){var Me=we[Le];we[Le]=we[Ue],we[Ue]=Me}function he(we,Le,Ue,Me,Re){if(we.length===0)return-1;if(typeof Ue=="string"?(Me=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,isNaN(Ue)&&(Ue=Re?0:we.length-1),Ue<0&&(Ue=we.length+Ue),Ue>=we.length){if(Re)return-1;Ue=we.length-1}else if(Ue<0){if(!Re)return-1;Ue=0}if(typeof Le=="string"&&(Le=ee.from(Le,Me)),ee.isBuffer(Le))return Le.length===0?-1:pe(we,Le,Ue,Me,Re);if(typeof Le=="number")return Le&=255,ee.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Re?Uint8Array.prototype.indexOf.call(we,Le,Ue):Uint8Array.prototype.lastIndexOf.call(we,Le,Ue):pe(we,[Le],Ue,Me,Re);throw new TypeError("val must be string, number or Buffer")}function pe(we,Le,Ue,Me,Re){function tt(gt,Qt){return lt===1?gt[Qt]:gt.readUInt16BE(Qt*lt)}var lt=1,Pt=we.length,Ct=Le.length;if(Me!==void 0&&((Me=String(Me).toLowerCase())==="ucs2"||Me==="ucs-2"||Me==="utf16le"||Me==="utf-16le")){if(we.length<2||Le.length<2)return-1;lt=2,Pt/=2,Ct/=2,Ue/=2}var vt;if(Re){var Ot=-1;for(vt=Ue;vt<Pt;vt++)if(tt(we,vt)===tt(Le,Ot===-1?0:vt-Ot)){if(Ot===-1&&(Ot=vt),vt-Ot+1===Ct)return Ot*lt}else Ot!==-1&&(vt-=vt-Ot),Ot=-1}else for(Ue+Ct>Pt&&(Ue=Pt-Ct),vt=Ue;vt>=0;vt--){for(var Zt=!0,Ut=0;Ut<Ct;Ut++)if(tt(we,vt+Ut)!==tt(Le,Ut)){Zt=!1;break}if(Zt)return vt}return-1}function ke(we,Le,Ue,Me){Ue=Number(Ue)||0;var Re=we.length-Ue;Me?(Me=Number(Me))>Re&&(Me=Re):Me=Re;var tt=Le.length;if(tt%2!=0)throw new TypeError("Invalid hex string");Me>tt/2&&(Me=tt/2);for(var lt=0;lt<Me;++lt){var Pt=parseInt(Le.substr(2*lt,2),16);if(isNaN(Pt))return lt;we[Ue+lt]=Pt}return lt}function Te(we,Le,Ue,Me){return He(Mt(Le,we.length-Ue),we,Ue,Me)}function Ee(we,Le,Ue,Me){return He(xt(Le),we,Ue,Me)}function Oe(we,Le,Ue,Me){return Ee(we,Le,Ue,Me)}function je(we,Le,Ue,Me){return He(bt(Le),we,Ue,Me)}function Pe(we,Le,Ue,Me){return He(yt(Le,we.length-Ue),we,Ue,Me)}function Qe(we,Le,Ue){return Le===0&&Ue===we.length?be.fromByteArray(we):be.fromByteArray(we.slice(Le,Ue))}function Xe(we,Le,Ue){Ue=Math.min(we.length,Ue);for(var Me=[],Re=Le;Re<Ue;){var tt=we[Re],lt=null,Pt=tt>239?4:tt>223?3:tt>191?2:1;if(Re+Pt<=Ue){var Ct,vt,Ot,Zt;switch(Pt){case 1:tt<128&&(lt=tt);break;case 2:Ct=we[Re+1],(192&Ct)==128&&(Zt=(31&tt)<<6|63&Ct)>127&&(lt=Zt);break;case 3:Ct=we[Re+1],vt=we[Re+2],(192&Ct)==128&&(192&vt)==128&&(Zt=(15&tt)<<12|(63&Ct)<<6|63&vt)>2047&&(Zt<55296||Zt>57343)&&(lt=Zt);break;case 4:Ct=we[Re+1],vt=we[Re+2],Ot=we[Re+3],(192&Ct)==128&&(192&vt)==128&&(192&Ot)==128&&(Zt=(15&tt)<<18|(63&Ct)<<12|(63&vt)<<6|63&Ot)>65535&&Zt<1114112&&(lt=Zt)}}lt===null?(lt=65533,Pt=1):lt>65535&&(lt-=65536,Me.push(lt>>>10&1023|55296),lt=56320|1023&lt),Me.push(lt),Re+=Pt}return ot(Me)}function ot(we){var Le=we.length;if(Le<=Ne)return String.fromCharCode.apply(String,we);for(var Ue="",Me=0;Me<Le;)Ue+=String.fromCharCode.apply(String,we.slice(Me,Me+=Ne));return Ue}function We(we,Le,Ue){var Me="";Ue=Math.min(we.length,Ue);for(var Re=Le;Re<Ue;++Re)Me+=String.fromCharCode(127&we[Re]);return Me}function rt(we,Le,Ue){var Me="";Ue=Math.min(we.length,Ue);for(var Re=Le;Re<Ue;++Re)Me+=String.fromCharCode(we[Re]);return Me}function Ye(we,Le,Ue){var Me=we.length;(!Le||Le<0)&&(Le=0),(!Ue||Ue<0||Ue>Me)&&(Ue=Me);for(var Re="",tt=Le;tt<Ue;++tt)Re+=dt(we[tt]);return Re}function ut(we,Le,Ue){for(var Me=we.slice(Le,Ue),Re="",tt=0;tt<Me.length;tt+=2)Re+=String.fromCharCode(Me[tt]+256*Me[tt+1]);return Re}function Ge(we,Le,Ue){if(we%1!=0||we<0)throw new RangeError("offset is not uint");if(we+Le>Ue)throw new RangeError("Trying to access beyond buffer length")}function ze(we,Le,Ue,Me,Re,tt){if(!ee.isBuffer(we))throw new TypeError('"buffer" argument must be a Buffer instance');if(Le>Re||Le<tt)throw new RangeError('"value" argument is out of bounds');if(Ue+Me>we.length)throw new RangeError("Index out of range")}function Ve(we,Le,Ue,Me){Le<0&&(Le=65535+Le+1);for(var Re=0,tt=Math.min(we.length-Ue,2);Re<tt;++Re)we[Ue+Re]=(Le&255<<8*(Me?Re:1-Re))>>>8*(Me?Re:1-Re)}function $e(we,Le,Ue,Me){Le<0&&(Le=4294967295+Le+1);for(var Re=0,tt=Math.min(we.length-Ue,4);Re<tt;++Re)we[Ue+Re]=Le>>>8*(Me?Re:3-Re)&255}function nt(we,Le,Ue,Me,Re,tt){if(Ue+Me>we.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function et(we,Le,Ue,Me,Re){return Re||nt(we,Le,Ue,4,34028234663852886e22,-34028234663852886e22),Be.write(we,Le,Ue,Me,23,4),Ue+4}function pt(we,Le,Ue,Me,Re){return Re||nt(we,Le,Ue,8,17976931348623157e292,-17976931348623157e292),Be.write(we,Le,Ue,Me,52,8),Ue+8}function ct(we){if(we=Rt(we).replace(De,""),we.length<2)return"";for(;we.length%4!=0;)we+="=";return we}function Rt(we){return we.trim?we.trim():we.replace(/^\s+|\s+$/g,"")}function dt(we){return we<16?"0"+we.toString(16):we.toString(16)}function Mt(we,Le){Le=Le||1/0;for(var Ue,Me=we.length,Re=null,tt=[],lt=0;lt<Me;++lt){if((Ue=we.charCodeAt(lt))>55295&&Ue<57344){if(!Re){if(Ue>56319){(Le-=3)>-1&&tt.push(239,191,189);continue}if(lt+1===Me){(Le-=3)>-1&&tt.push(239,191,189);continue}Re=Ue;continue}if(Ue<56320){(Le-=3)>-1&&tt.push(239,191,189),Re=Ue;continue}Ue=65536+(Re-55296<<10|Ue-56320)}else Re&&(Le-=3)>-1&&tt.push(239,191,189);if(Re=null,Ue<128){if((Le-=1)<0)break;tt.push(Ue)}else if(Ue<2048){if((Le-=2)<0)break;tt.push(Ue>>6|192,63&Ue|128)}else if(Ue<65536){if((Le-=3)<0)break;tt.push(Ue>>12|224,Ue>>6&63|128,63&Ue|128)}else{if(!(Ue<1114112))throw new Error("Invalid code point");if((Le-=4)<0)break;tt.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,63&Ue|128)}}return tt}function xt(we){for(var Le=[],Ue=0;Ue<we.length;++Ue)Le.push(255&we.charCodeAt(Ue));return Le}function yt(we,Le){for(var Ue,Me,Re,tt=[],lt=0;lt<we.length&&!((Le-=2)<0);++lt)Ue=we.charCodeAt(lt),Me=Ue>>8,Re=Ue%256,tt.push(Re),tt.push(Me);return tt}function bt(we){return be.toByteArray(ct(we))}function He(we,Le,Ue,Me){for(var Re=0;Re<Me&&!(Re+Ue>=Le.length||Re>=we.length);++Re)Le[Re+Ue]=we[Re];return Re}function Ae(we){return we!==we}var be=ie("base64-js"),Be=ie("ieee754"),Ke=ie("isarray");ue.Buffer=ee,ue.SlowBuffer=ye,ue.INSPECT_MAX_BYTES=50,ee.TYPED_ARRAY_SUPPORT=se.TYPED_ARRAY_SUPPORT!==void 0?se.TYPED_ARRAY_SUPPORT:function(){try{var we=new Uint8Array(1);return we.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},we.foo()===42&&typeof we.subarray=="function"&&we.subarray(1,1).byteLength===0}catch(Le){return!1}}(),ue.kMaxLength=te(),ee.poolSize=8192,ee._augment=function(we){return we.__proto__=ee.prototype,we},ee.from=function(we,Le,Ue){return ne(null,we,Le,Ue)},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(we,Le,Ue){return b(null,we,Le,Ue)},ee.allocUnsafe=function(we){return z(null,we)},ee.allocUnsafeSlow=function(we){return z(null,we)},ee.isBuffer=function(we){return!(we==null||!we._isBuffer)},ee.compare=function(we,Le){if(!ee.isBuffer(we)||!ee.isBuffer(Le))throw new TypeError("Arguments must be Buffers");if(we===Le)return 0;for(var Ue=we.length,Me=Le.length,Re=0,tt=Math.min(Ue,Me);Re<tt;++Re)if(we[Re]!==Le[Re]){Ue=we[Re],Me=Le[Re];break}return Ue<Me?-1:Me<Ue?1:0},ee.isEncoding=function(we){switch(String(we).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(we,Le){if(!Ke(we))throw new TypeError('"list" argument must be an Array of Buffers');if(we.length===0)return ee.alloc(0);var Ue;if(Le===void 0)for(Le=0,Ue=0;Ue<we.length;++Ue)Le+=we[Ue].length;var Me=ee.allocUnsafe(Le),Re=0;for(Ue=0;Ue<we.length;++Ue){var tt=we[Ue];if(!ee.isBuffer(tt))throw new TypeError('"list" argument must be an Array of Buffers');tt.copy(Me,Re),Re+=tt.length}return Me},ee.byteLength=me,ee.prototype._isBuffer=!0,ee.prototype.swap16=function(){var we=this.length;if(we%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;Le<we;Le+=2)_e(this,Le,Le+1);return this},ee.prototype.swap32=function(){var we=this.length;if(we%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Le=0;Le<we;Le+=4)_e(this,Le,Le+3),_e(this,Le+1,Le+2);return this},ee.prototype.swap64=function(){var we=this.length;if(we%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Le=0;Le<we;Le+=8)_e(this,Le,Le+7),_e(this,Le+1,Le+6),_e(this,Le+2,Le+5),_e(this,Le+3,Le+4);return this},ee.prototype.toString=function(){var we=0|this.length;return we===0?"":arguments.length===0?Xe(this,0,we):ge.apply(this,arguments)},ee.prototype.equals=function(we){if(!ee.isBuffer(we))throw new TypeError("Argument must be a Buffer");return this===we||ee.compare(this,we)===0},ee.prototype.inspect=function(){var we="",Le=ue.INSPECT_MAX_BYTES;return this.length>0&&(we=this.toString("hex",0,Le).match(/.{2}/g).join(" "),this.length>Le&&(we+=" ... ")),"<Buffer "+we+">"},ee.prototype.compare=function(we,Le,Ue,Me,Re){if(!ee.isBuffer(we))throw new TypeError("Argument must be a Buffer");if(Le===void 0&&(Le=0),Ue===void 0&&(Ue=we?we.length:0),Me===void 0&&(Me=0),Re===void 0&&(Re=this.length),Le<0||Ue>we.length||Me<0||Re>this.length)throw new RangeError("out of range index");if(Me>=Re&&Le>=Ue)return 0;if(Me>=Re)return-1;if(Le>=Ue)return 1;if(Le>>>=0,Ue>>>=0,Me>>>=0,Re>>>=0,this===we)return 0;for(var tt=Re-Me,lt=Ue-Le,Pt=Math.min(tt,lt),Ct=this.slice(Me,Re),vt=we.slice(Le,Ue),Ot=0;Ot<Pt;++Ot)if(Ct[Ot]!==vt[Ot]){tt=Ct[Ot],lt=vt[Ot];break}return tt<lt?-1:lt<tt?1:0},ee.prototype.includes=function(we,Le,Ue){return this.indexOf(we,Le,Ue)!==-1},ee.prototype.indexOf=function(we,Le,Ue){return he(this,we,Le,Ue,!0)},ee.prototype.lastIndexOf=function(we,Le,Ue){return he(this,we,Le,Ue,!1)},ee.prototype.write=function(we,Le,Ue,Me){if(Le===void 0)Me="utf8",Ue=this.length,Le=0;else if(Ue===void 0&&typeof Le=="string")Me=Le,Ue=this.length,Le=0;else{if(!isFinite(Le))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Le|=0,isFinite(Ue)?(Ue|=0,Me===void 0&&(Me="utf8")):(Me=Ue,Ue=void 0)}var Re=this.length-Le;if((Ue===void 0||Ue>Re)&&(Ue=Re),we.length>0&&(Ue<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Me||(Me="utf8");for(var tt=!1;;)switch(Me){case"hex":return ke(this,we,Le,Ue);case"utf8":case"utf-8":return Te(this,we,Le,Ue);case"ascii":return Ee(this,we,Le,Ue);case"latin1":case"binary":return Oe(this,we,Le,Ue);case"base64":return je(this,we,Le,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,we,Le,Ue);default:if(tt)throw new TypeError("Unknown encoding: "+Me);Me=(""+Me).toLowerCase(),tt=!0}},ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ne=4096;ee.prototype.slice=function(we,Le){var Ue=this.length;we=~~we,Le=Le===void 0?Ue:~~Le,we<0?(we+=Ue)<0&&(we=0):we>Ue&&(we=Ue),Le<0?(Le+=Ue)<0&&(Le=0):Le>Ue&&(Le=Ue),Le<we&&(Le=we);var Me;if(ee.TYPED_ARRAY_SUPPORT)Me=this.subarray(we,Le),Me.__proto__=ee.prototype;else{var Re=Le-we;Me=new ee(Re,void 0);for(var tt=0;tt<Re;++tt)Me[tt]=this[tt+we]}return Me},ee.prototype.readUIntLE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we],Re=1,tt=0;++tt<Le&&(Re*=256);)Me+=this[we+tt]*Re;return Me},ee.prototype.readUIntBE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we+--Le],Re=1;Le>0&&(Re*=256);)Me+=this[we+--Le]*Re;return Me},ee.prototype.readUInt8=function(we,Le){return Le||Ge(we,1,this.length),this[we]},ee.prototype.readUInt16LE=function(we,Le){return Le||Ge(we,2,this.length),this[we]|this[we+1]<<8},ee.prototype.readUInt16BE=function(we,Le){return Le||Ge(we,2,this.length),this[we]<<8|this[we+1]},ee.prototype.readUInt32LE=function(we,Le){return Le||Ge(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+16777216*this[we+3]},ee.prototype.readUInt32BE=function(we,Le){return Le||Ge(we,4,this.length),16777216*this[we]+(this[we+1]<<16|this[we+2]<<8|this[we+3])},ee.prototype.readIntLE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we],Re=1,tt=0;++tt<Le&&(Re*=256);)Me+=this[we+tt]*Re;return Re*=128,Me>=Re&&(Me-=Math.pow(2,8*Le)),Me},ee.prototype.readIntBE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=Le,Re=1,tt=this[we+--Me];Me>0&&(Re*=256);)tt+=this[we+--Me]*Re;return Re*=128,tt>=Re&&(tt-=Math.pow(2,8*Le)),tt},ee.prototype.readInt8=function(we,Le){return Le||Ge(we,1,this.length),128&this[we]?-1*(255-this[we]+1):this[we]},ee.prototype.readInt16LE=function(we,Le){Le||Ge(we,2,this.length);var Ue=this[we]|this[we+1]<<8;return 32768&Ue?4294901760|Ue:Ue},ee.prototype.readInt16BE=function(we,Le){Le||Ge(we,2,this.length);var Ue=this[we+1]|this[we]<<8;return 32768&Ue?4294901760|Ue:Ue},ee.prototype.readInt32LE=function(we,Le){return Le||Ge(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},ee.prototype.readInt32BE=function(we,Le){return Le||Ge(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},ee.prototype.readFloatLE=function(we,Le){return Le||Ge(we,4,this.length),Be.read(this,we,!0,23,4)},ee.prototype.readFloatBE=function(we,Le){return Le||Ge(we,4,this.length),Be.read(this,we,!1,23,4)},ee.prototype.readDoubleLE=function(we,Le){return Le||Ge(we,8,this.length),Be.read(this,we,!0,52,8)},ee.prototype.readDoubleBE=function(we,Le){return Le||Ge(we,8,this.length),Be.read(this,we,!1,52,8)},ee.prototype.writeUIntLE=function(we,Le,Ue,Me){we=+we,Le|=0,Ue|=0,!Me&&ze(this,we,Le,Ue,Math.pow(2,8*Ue)-1,0);var Re=1,tt=0;for(this[Le]=255&we;++tt<Ue&&(Re*=256);)this[Le+tt]=we/Re&255;return Le+Ue},ee.prototype.writeUIntBE=function(we,Le,Ue,Me){we=+we,Le|=0,Ue|=0,!Me&&ze(this,we,Le,Ue,Math.pow(2,8*Ue)-1,0);var Re=Ue-1,tt=1;for(this[Le+Re]=255&we;--Re>=0&&(tt*=256);)this[Le+Re]=we/tt&255;return Le+Ue},ee.prototype.writeUInt8=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,1,255,0),ee.TYPED_ARRAY_SUPPORT||(we=Math.floor(we)),this[Le]=255&we,Le+1},ee.prototype.writeUInt16LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8):Ve(this,we,Le,!0),Le+2},ee.prototype.writeUInt16BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>8,this[Le+1]=255&we):Ve(this,we,Le,!1),Le+2},ee.prototype.writeUInt32LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=255&we):$e(this,we,Le,!0),Le+4},ee.prototype.writeUInt32BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=255&we):$e(this,we,Le,!1),Le+4},ee.prototype.writeIntLE=function(we,Le,Ue,Me){if(we=+we,Le|=0,!Me){var Re=Math.pow(2,8*Ue-1);ze(this,we,Le,Ue,Re-1,-Re)}var tt=0,lt=1,Pt=0;for(this[Le]=255&we;++tt<Ue&&(lt*=256);)we<0&&Pt===0&&this[Le+tt-1]!==0&&(Pt=1),this[Le+tt]=(we/lt>>0)-Pt&255;return Le+Ue},ee.prototype.writeIntBE=function(we,Le,Ue,Me){if(we=+we,Le|=0,!Me){var Re=Math.pow(2,8*Ue-1);ze(this,we,Le,Ue,Re-1,-Re)}var tt=Ue-1,lt=1,Pt=0;for(this[Le+tt]=255&we;--tt>=0&&(lt*=256);)we<0&&Pt===0&&this[Le+tt+1]!==0&&(Pt=1),this[Le+tt]=(we/lt>>0)-Pt&255;return Le+Ue},ee.prototype.writeInt8=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,1,127,-128),ee.TYPED_ARRAY_SUPPORT||(we=Math.floor(we)),we<0&&(we=255+we+1),this[Le]=255&we,Le+1},ee.prototype.writeInt16LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8):Ve(this,we,Le,!0),Le+2},ee.prototype.writeInt16BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>8,this[Le+1]=255&we):Ve(this,we,Le,!1),Le+2},ee.prototype.writeInt32LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,2147483647,-2147483648),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24):$e(this,we,Le,!0),Le+4},ee.prototype.writeInt32BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=255&we):$e(this,we,Le,!1),Le+4},ee.prototype.writeFloatLE=function(we,Le,Ue){return et(this,we,Le,!0,Ue)},ee.prototype.writeFloatBE=function(we,Le,Ue){return et(this,we,Le,!1,Ue)},ee.prototype.writeDoubleLE=function(we,Le,Ue){return pt(this,we,Le,!0,Ue)},ee.prototype.writeDoubleBE=function(we,Le,Ue){return pt(this,we,Le,!1,Ue)},ee.prototype.copy=function(we,Le,Ue,Me){if(Ue||(Ue=0),Me||Me===0||(Me=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Me>0&&Me<Ue&&(Me=Ue),Me===Ue||we.length===0||this.length===0)return 0;if(Le<0)throw new RangeError("targetStart out of bounds");if(Ue<0||Ue>=this.length)throw new RangeError("sourceStart out of bounds");if(Me<0)throw new RangeError("sourceEnd out of bounds");Me>this.length&&(Me=this.length),we.length-Le<Me-Ue&&(Me=we.length-Le+Ue);var Re,tt=Me-Ue;if(this===we&&Ue<Le&&Le<Me)for(Re=tt-1;Re>=0;--Re)we[Re+Le]=this[Re+Ue];else if(tt<1e3||!ee.TYPED_ARRAY_SUPPORT)for(Re=0;Re<tt;++Re)we[Re+Le]=this[Re+Ue];else Uint8Array.prototype.set.call(we,this.subarray(Ue,Ue+tt),Le);return tt},ee.prototype.fill=function(we,Le,Ue,Me){if(typeof we=="string"){if(typeof Le=="string"?(Me=Le,Le=0,Ue=this.length):typeof Ue=="string"&&(Me=Ue,Ue=this.length),we.length===1){var Re=we.charCodeAt(0);Re<256&&(we=Re)}if(Me!==void 0&&typeof Me!="string")throw new TypeError("encoding must be a string");if(typeof Me=="string"&&!ee.isEncoding(Me))throw new TypeError("Unknown encoding: "+Me)}else typeof we=="number"&&(we&=255);if(Le<0||this.length<Le||this.length<Ue)throw new RangeError("Out of range index");if(Ue<=Le)return this;Le>>>=0,Ue=Ue===void 0?this.length:Ue>>>0,we||(we=0);var tt;if(typeof we=="number")for(tt=Le;tt<Ue;++tt)this[tt]=we;else{var lt=ee.isBuffer(we)?we:Mt(new ee(we,Me).toString()),Pt=lt.length;for(tt=0;tt<Ue-Le;++tt)this[tt+Le]=lt[tt%Pt]}return this};var De=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(ie,Ce,ue){Ce.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,Ce,ue){"use strict";var se=function(){this.buffer=[],this.fns=[]};se.prototype.push=function(le,ee){if(this.fns.length)return this.fns.shift()(null,le);var ne={data:le,priority:ee},E=te(this.buffer,ne,function(b){return b.priority});this.buffer.splice(E,0,ne)},se.prototype.next=function(){var le=this;return function(ee){if(le.buffer.length)return ee(null,le.buffer.pop().data);le.fns.push(ee)}};var te=function(le,ee,ne){ee=ne(ee);for(var E=0,b=le?le.length:E;E<b;){var z=E+b>>>1;ne(le[z])<ee?E=z+1:b=z}return E};Ce.exports=se},{}],41:[function(ie,Ce,ue){function se(ae){var oe=this,ve=re.call(arguments,1);return new Promise(function(ye,me){function ge(pe){var ke;try{ke=ae.next(pe)}catch(Te){return me(Te)}he(ke)}function _e(pe){var ke;try{ke=ae.throw(pe)}catch(Te){return me(Te)}he(ke)}function he(pe){if(pe.done)return ye(pe.value);var ke=te.call(oe,pe.value);return ke&&E(ke)?ke.then(ge,_e):_e(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(pe.value)+'"'))}if(typeof ae=="function"&&(ae=ae.apply(oe,ve)),!ae||typeof ae.next!="function")return ye(ae);ge()})}function te(ae){return ae&&(E(ae)?ae:z(ae)||b(ae)?se.call(this,ae):typeof ae=="function"?le.call(this,ae):Array.isArray(ae)?ee.call(this,ae):x(ae)?ne.call(this,ae):ae)}function le(ae){var oe=this;return new Promise(function(ve,ye){ae.call(oe,function(me,ge){if(me)return ye(me);arguments.length>2&&(ge=re.call(arguments,1)),ve(ge)})})}function ee(ae){return Promise.all(ae.map(te,this))}function ne(ae){for(var oe=new ae.constructor,ve=Object.keys(ae),ye=[],me=0;me<ve.length;me++){var ge=ve[me],_e=te.call(this,ae[ge]);_e&&E(_e)?function(he,pe){oe[pe]=void 0,ye.push(he.then(function(ke){oe[pe]=ke}))}(_e,ge):oe[ge]=ae[ge]}return Promise.all(ye).then(function(){return oe})}function E(ae){return typeof ae.then=="function"}function b(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"||b(oe.prototype))}function x(ae){return Object==ae.constructor}var re=Array.prototype.slice;Ce.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,Ce,ue){Ce.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,Ce,ue){"use strict";function se(ee,ne){if(!(this instanceof se))return new se(ee,ne);this.src=ee,this._withAccess=ne}function te(ee,ne){return ee[ne]===void 0&&ee.__lookupGetter__(ne)===void 0&&ee.__lookupSetter__(ne)===void 0}var le=Array.prototype.slice;Ce.exports=se,se.prototype.withAccess=function(ee){return this._withAccess=ee!==!1,this},se.prototype.pick=function(ee){return Array.isArray(ee)||(ee=le.call(arguments)),ee.length&&(this.keys=ee),this},se.prototype.to=function(ee){if(ee=ee||{},!this.src)return ee;var ne=this.keys||Object.keys(this.src);if(!this._withAccess){for(var E=0;E<ne.length;E++)b=ne[E],ee[b]===void 0&&(ee[b]=this.src[b]);return ee}for(var E=0;E<ne.length;E++){var b=ne[E];if(te(ee,b)){var z=this.src.__lookupGetter__(b),x=this.src.__lookupSetter__(b);z&&ee.__defineGetter__(b,z),x&&ee.__defineSetter__(b,x),z||x||(ee[b]=this.src[b])}}return ee},se.prototype.toCover=function(ee){for(var ne=this.keys||Object.keys(this.src),E=0;E<ne.length;E++){var b=ne[E];delete ee[b];var z=this.src.__lookupGetter__(b),x=this.src.__lookupSetter__(b);z&&ee.__defineGetter__(b,z),x&&ee.__defineSetter__(b,x),z||x||(ee[b]=this.src[b])}},se.prototype.override=se.prototype.toCover,se.prototype.and=function(ee){var ne={};return this.to(ne),this.src=ee,this.to(ne),this.src=ne,this}},{}],44:[function(ie,Ce,ue){ie("../../modules/es6.string.iterator"),ie("../../modules/es6.array.from"),Ce.exports=ie("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(ie,Ce,ue){var se=ie("../../modules/_core"),te=se.JSON||(se.JSON={stringify:JSON.stringify});Ce.exports=function(le){return te.stringify.apply(te,arguments)}},{"../../modules/_core":65}],46:[function(ie,Ce,ue){ie("../../modules/es6.object.assign"),Ce.exports=ie("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(ie,Ce,ue){ie("../../modules/es6.object.create");var se=ie("../../modules/_core").Object;Ce.exports=function(te,le){return se.create(te,le)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(ie,Ce,ue){ie("../../modules/es6.object.define-property");var se=ie("../../modules/_core").Object;Ce.exports=function(te,le,ee){return se.defineProperty(te,le,ee)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(ie,Ce,ue){ie("../../modules/es6.object.get-own-property-names");var se=ie("../../modules/_core").Object;Ce.exports=function(te){return se.getOwnPropertyNames(te)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(ie,Ce,ue){ie("../../modules/es6.object.get-prototype-of"),Ce.exports=ie("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(ie,Ce,ue){ie("../../modules/es6.object.keys"),Ce.exports=ie("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(ie,Ce,ue){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"),Ce.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,Ce,ue){ie("../modules/web.immediate"),Ce.exports=ie("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(ie,Ce,ue){ie("../../modules/es6.string.from-code-point"),Ce.exports=ie("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(ie,Ce,ue){ie("../../modules/es6.function.has-instance"),Ce.exports=ie("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(ie,Ce,ue){ie("../../modules/es6.symbol"),ie("../../modules/es6.object.to-string"),ie("../../modules/es7.symbol.async-iterator"),ie("../../modules/es7.symbol.observable"),Ce.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,Ce,ue){ie("../../modules/es6.string.iterator"),ie("../../modules/web.dom.iterable"),Ce.exports=ie("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(ie,Ce,ue){Ce.exports=function(se){if(typeof se!="function")throw TypeError(se+" is not a function!");return se}},{}],59:[function(ie,Ce,ue){Ce.exports=function(){}},{}],60:[function(ie,Ce,ue){Ce.exports=function(se,te,le,ee){if(!(se instanceof te)||ee!==void 0&&ee in se)throw TypeError(le+": incorrect invocation!");return se}},{}],61:[function(ie,Ce,ue){var se=ie("./_is-object");Ce.exports=function(te){if(!se(te))throw TypeError(te+" is not an object!");return te}},{"./_is-object":85}],62:[function(ie,Ce,ue){var se=ie("./_to-iobject"),te=ie("./_to-length"),le=ie("./_to-absolute-index");Ce.exports=function(ee){return function(ne,E,b){var z,x=se(ne),re=te(x.length),ae=le(b,re);if(ee&&E!=E){for(;re>ae;)if((z=x[ae++])!=z)return!0}else for(;re>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,Ce,ue){var se=ie("./_cof"),te=ie("./_wks")("toStringTag"),le=se(function(){return arguments}())=="Arguments",ee=function(ne,E){try{return ne[E]}catch(b){}};Ce.exports=function(ne){var E,b,z;return ne===void 0?"Undefined":ne===null?"Null":typeof(b=ee(E=Object(ne),te))=="string"?b:le?se(E):(z=se(E))=="Object"&&typeof E.callee=="function"?"Arguments":z}},{"./_cof":64,"./_wks":131}],64:[function(ie,Ce,ue){var se={}.toString;Ce.exports=function(te){return se.call(te).slice(8,-1)}},{}],65:[function(ie,Ce,ue){var se=Ce.exports={version:"2.5.7"};typeof __e=="number"&&(__e=se)},{}],66:[function(ie,Ce,ue){"use strict";var se=ie("./_object-dp"),te=ie("./_property-desc");Ce.exports=function(le,ee,ne){ee in le?se.f(le,ee,te(0,ne)):le[ee]=ne}},{"./_object-dp":98,"./_property-desc":111}],67:[function(ie,Ce,ue){var se=ie("./_a-function");Ce.exports=function(te,le,ee){if(se(te),le===void 0)return te;switch(ee){case 1:return function(ne){return te.call(le,ne)};case 2:return function(ne,E){return te.call(le,ne,E)};case 3:return function(ne,E,b){return te.call(le,ne,E,b)}}return function(){return te.apply(le,arguments)}}},{"./_a-function":58}],68:[function(ie,Ce,ue){Ce.exports=function(se){if(se==null)throw TypeError("Can't call method on "+se);return se}},{}],69:[function(ie,Ce,ue){Ce.exports=!ie("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(ie,Ce,ue){var se=ie("./_is-object"),te=ie("./_global").document,le=se(te)&&se(te.createElement);Ce.exports=function(ee){return le?te.createElement(ee):{}}},{"./_global":76,"./_is-object":85}],71:[function(ie,Ce,ue){Ce.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(ie,Ce,ue){var se=ie("./_object-keys"),te=ie("./_object-gops"),le=ie("./_object-pie");Ce.exports=function(ee){var ne=se(ee),E=te.f;if(E)for(var b,z=E(ee),x=le.f,re=0;z.length>re;)x.call(ee,b=z[re++])&&ne.push(b);return ne}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_core"),le=ie("./_ctx"),ee=ie("./_hide"),ne=ie("./_has"),E=function(b,z,x){var re,ae,oe,ve=b&E.F,ye=b&E.G,me=b&E.S,ge=b&E.P,_e=b&E.B,he=b&E.W,pe=ye?te:te[z]||(te[z]={}),ke=pe.prototype,Te=ye?se:me?se[z]:(se[z]||{}).prototype;ye&&(x=z);for(re in x)(ae=!ve&&Te&&Te[re]!==void 0)&&ne(pe,re)||(oe=ae?Te[re]:x[re],pe[re]=ye&&typeof Te[re]!="function"?x[re]:_e&&ae?le(oe,se):he&&Te[re]==oe?function(Ee){var Oe=function(je,Pe,Qe){if(this instanceof Ee){switch(arguments.length){case 0:return new Ee;case 1:return new Ee(je);case 2:return new Ee(je,Pe)}return new Ee(je,Pe,Qe)}return Ee.apply(this,arguments)};return Oe.prototype=Ee.prototype,Oe}(oe):ge&&typeof oe=="function"?le(Function.call,oe):oe,ge&&((pe.virtual||(pe.virtual={}))[re]=oe,b&E.R&&ke&&!ke[re]&&ee(ke,re,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,Ce.exports=E},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(ie,Ce,ue){Ce.exports=function(se){try{return!!se()}catch(te){return!0}}},{}],75:[function(ie,Ce,x){var se=ie("./_ctx"),te=ie("./_iter-call"),le=ie("./_is-array-iter"),ee=ie("./_an-object"),ne=ie("./_to-length"),E=ie("./core.get-iterator-method"),b={},z={},x=Ce.exports=function(re,ae,oe,ve,ye){var me,ge,_e,he,pe=ye?function(){return re}:E(re),ke=se(oe,ve,ae?2:1),Te=0;if(typeof pe!="function")throw TypeError(re+" is not iterable!");if(le(pe)){for(me=ne(re.length);me>Te;Te++)if((he=ae?ke(ee(ge=re[Te])[0],ge[1]):ke(re[Te]))===b||he===z)return he}else for(_e=pe.call(re);!(ge=_e.next()).done;)if((he=te(_e,ke,ge.value,ae))===b||he===z)return he};x.BREAK=b,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,Ce,ue){var se=Ce.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,Ce,ue){var se={}.hasOwnProperty;Ce.exports=function(te,le){return se.call(te,le)}},{}],78:[function(ie,Ce,ue){var se=ie("./_object-dp"),te=ie("./_property-desc");Ce.exports=ie("./_descriptors")?function(le,ee,ne){return se.f(le,ee,te(1,ne))}:function(le,ee,ne){return le[ee]=ne,le}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(ie,Ce,ue){var se=ie("./_global").document;Ce.exports=se&&se.documentElement},{"./_global":76}],80:[function(ie,Ce,ue){Ce.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,Ce,ue){Ce.exports=function(se,te,le){var ee=le===void 0;switch(te.length){case 0:return ee?se():se.call(le);case 1:return ee?se(te[0]):se.call(le,te[0]);case 2:return ee?se(te[0],te[1]):se.call(le,te[0],te[1]);case 3:return ee?se(te[0],te[1],te[2]):se.call(le,te[0],te[1],te[2]);case 4:return ee?se(te[0],te[1],te[2],te[3]):se.call(le,te[0],te[1],te[2],te[3])}return se.apply(le,te)}},{}],82:[function(ie,Ce,ue){var se=ie("./_cof");Ce.exports=Object("z").propertyIsEnumerable(0)?Object:function(te){return se(te)=="String"?te.split(""):Object(te)}},{"./_cof":64}],83:[function(ie,Ce,ue){var se=ie("./_iterators"),te=ie("./_wks")("iterator"),le=Array.prototype;Ce.exports=function(ee){return ee!==void 0&&(se.Array===ee||le[te]===ee)}},{"./_iterators":91,"./_wks":131}],84:[function(ie,Ce,ue){var se=ie("./_cof");Ce.exports=Array.isArray||function(te){return se(te)=="Array"}},{"./_cof":64}],85:[function(ie,Ce,ue){Ce.exports=function(se){return typeof se=="object"?se!==null:typeof se=="function"}},{}],86:[function(ie,Ce,ue){var se=ie("./_an-object");Ce.exports=function(te,le,ee,ne){try{return ne?le(se(ee)[0],ee[1]):le(ee)}catch(b){var E=te.return;throw E!==void 0&&se(E.call(te)),b}}},{"./_an-object":61}],87:[function(ie,Ce,ue){"use strict";var se=ie("./_object-create"),te=ie("./_property-desc"),le=ie("./_set-to-string-tag"),ee={};ie("./_hide")(ee,ie("./_wks")("iterator"),function(){return this}),Ce.exports=function(ne,E,b){ne.prototype=se(ee,{next:te(1,b)}),le(ne,E+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(ie,Ce,ue){"use strict";var se=ie("./_library"),te=ie("./_export"),le=ie("./_redefine"),ee=ie("./_hide"),ne=ie("./_iterators"),E=ie("./_iter-create"),b=ie("./_set-to-string-tag"),z=ie("./_object-gpo"),x=ie("./_wks")("iterator"),re=!([].keys&&"next"in[].keys()),ae=function(){return this};Ce.exports=function(oe,ve,ye,me,ge,_e,he){E(ye,ve,me);var pe,ke,Te,Ee=function(Ye){if(!re&&Ye in Qe)return Qe[Ye];switch(Ye){case"keys":case"values":return function(){return new ye(this,Ye)}}return function(){return new ye(this,Ye)}},Oe=ve+" Iterator",je=ge=="values",Pe=!1,Qe=oe.prototype,Xe=Qe[x]||Qe["@@iterator"]||ge&&Qe[ge],ot=Xe||Ee(ge),We=ge?je?Ee("entries"):ot:void 0,rt=ve=="Array"&&Qe.entries||Xe;if(rt&&(Te=z(rt.call(new oe)))!==Object.prototype&&Te.next&&(b(Te,Oe,!0),se||typeof Te[x]=="function"||ee(Te,x,ae)),je&&Xe&&Xe.name!=="values"&&(Pe=!0,ot=function(){return Xe.call(this)}),se&&!he||!re&&!Pe&&Qe[x]||ee(Qe,x,ot),ne[ve]=ot,ne[Oe]=ae,ge)if(pe={values:je?ot:Ee("values"),keys:_e?ot:Ee("keys"),entries:We},he)for(ke in pe)ke in Qe||le(Qe,ke,pe[ke]);else te(te.P+te.F*(re||Pe),ve,pe);return pe}},{"./_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,Ce,ue){var se=ie("./_wks")("iterator"),te=!1;try{var le=[7][se]();le.return=function(){te=!0},Array.from(le,function(){throw 2})}catch(ee){}Ce.exports=function(ee,ne){if(!ne&&!te)return!1;var E=!1;try{var b=[7],z=b[se]();z.next=function(){return{done:E=!0}},b[se]=function(){return z},ee(b)}catch(x){}return E}},{"./_wks":131}],90:[function(ie,Ce,ue){Ce.exports=function(se,te){return{value:te,done:!!se}}},{}],91:[function(ie,Ce,ue){Ce.exports={}},{}],92:[function(ie,Ce,ue){Ce.exports=!0},{}],93:[function(ie,Ce,ue){var se=ie("./_uid")("meta"),te=ie("./_is-object"),le=ie("./_has"),ee=ie("./_object-dp").f,ne=0,E=Object.isExtensible||function(){return!0},b=!ie("./_fails")(function(){return E(Object.preventExtensions({}))}),z=function(ve){ee(ve,se,{value:{i:"O"+ ++ne,w:{}}})},x=function(ve,ye){if(!te(ve))return typeof ve=="symbol"?ve:(typeof ve=="string"?"S":"P")+ve;if(!le(ve,se)){if(!E(ve))return"F";if(!ye)return"E";z(ve)}return ve[se].i},re=function(ve,ye){if(!le(ve,se)){if(!E(ve))return!0;if(!ye)return!1;z(ve)}return ve[se].w},ae=function(ve){return b&&oe.NEED&&E(ve)&&!le(ve,se)&&z(ve),ve},oe=Ce.exports={KEY:se,NEED:!1,fastKey:x,getWeak:re,onFreeze:ae}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_task").set,le=se.MutationObserver||se.WebKitMutationObserver,ee=se.process,ne=se.Promise,E=ie("./_cof")(ee)=="process";Ce.exports=function(){var b,z,x,re=function(){var ye,me;for(E&&(ye=ee.domain)&&ye.exit();b;){me=b.fn,b=b.next;try{me()}catch(ge){throw b?x():z=void 0,ge}}z=void 0,ye&&ye.enter()};if(E)x=function(){ee.nextTick(re)};else if(!le||se.navigator&&se.navigator.standalone)if(ne&&ne.resolve){var ae=ne.resolve(void 0);x=function(){ae.then(re)}}else x=function(){te.call(se,re)};else{var oe=!0,ve=document.createTextNode("");new le(re).observe(ve,{characterData:!0}),x=function(){ve.data=oe=!oe}}return function(ye){var me={fn:ye,next:void 0};z&&(z.next=me),b||(b=me,x()),z=me}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(ie,Ce,ue){"use strict";function se(le){var ee,ne;this.promise=new le(function(E,b){if(ee!==void 0||ne!==void 0)throw TypeError("Bad Promise constructor");ee=E,ne=b}),this.resolve=te(ee),this.reject=te(ne)}var te=ie("./_a-function");Ce.exports.f=function(le){return new se(le)}},{"./_a-function":58}],96:[function(ie,Ce,ue){"use strict";var se=ie("./_object-keys"),te=ie("./_object-gops"),le=ie("./_object-pie"),ee=ie("./_to-object"),ne=ie("./_iobject"),E=Object.assign;Ce.exports=!E||ie("./_fails")(function(){var b={},z={},x=Symbol(),re="abcdefghijklmnopqrst";return b[x]=7,re.split("").forEach(function(ae){z[ae]=ae}),E({},b)[x]!=7||Object.keys(E({},z)).join("")!=re})?function(b,z){for(var x=ee(b),re=arguments.length,ae=1,oe=te.f,ve=le.f;re>ae;)for(var ye,me=ne(arguments[ae++]),ge=oe?se(me).concat(oe(me)):se(me),_e=ge.length,he=0;_e>he;)ve.call(me,ye=ge[he++])&&(x[ye]=me[ye]);return x}:E},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_object-dps"),le=ie("./_enum-bug-keys"),ee=ie("./_shared-key")("IE_PROTO"),ne=function(){},E=function(){var b,z=ie("./_dom-create")("iframe"),x=le.length;for(z.style.display="none",ie("./_html").appendChild(z),z.src="javascript:",b=z.contentWindow.document,b.open(),b.write("<script>document.F=Object<\/script>"),b.close(),E=b.F;x--;)delete E.prototype[le[x]];return E()};Ce.exports=Object.create||function(b,z){var x;return b!==null?(ne.prototype=se(b),x=new ne,ne.prototype=null,x[ee]=b):x=E(),z===void 0?x:te(x,z)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_ie8-dom-define"),le=ie("./_to-primitive"),ee=Object.defineProperty;ue.f=ie("./_descriptors")?Object.defineProperty:function(ne,E,b){if(se(ne),E=le(E,!0),se(b),te)try{return ee(ne,E,b)}catch(z){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(ne[E]=b.value),ne}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(ie,Ce,ue){var se=ie("./_object-dp"),te=ie("./_an-object"),le=ie("./_object-keys");Ce.exports=ie("./_descriptors")?Object.defineProperties:function(ee,ne){te(ee);for(var E,b=le(ne),z=b.length,x=0;z>x;)se.f(ee,E=b[x++],ne[E]);return ee}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(ie,Ce,ue){var se=ie("./_object-pie"),te=ie("./_property-desc"),le=ie("./_to-iobject"),ee=ie("./_to-primitive"),ne=ie("./_has"),E=ie("./_ie8-dom-define"),b=Object.getOwnPropertyDescriptor;ue.f=ie("./_descriptors")?b:function(z,x){if(z=le(z),x=ee(x,!0),E)try{return b(z,x)}catch(re){}if(ne(z,x))return te(!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,Ce,ue){var se=ie("./_to-iobject"),te=ie("./_object-gopn").f,le={}.toString,ee=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ne=function(E){try{return te(E)}catch(b){return ee.slice()}};Ce.exports.f=function(E){return ee&&le.call(E)=="[object Window]"?ne(E):te(se(E))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(ie,Ce,ue){var se=ie("./_object-keys-internal"),te=ie("./_enum-bug-keys").concat("length","prototype");ue.f=Object.getOwnPropertyNames||function(le){return se(le,te)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(ie,Ce,ue){ue.f=Object.getOwnPropertySymbols},{}],104:[function(ie,Ce,ue){var se=ie("./_has"),te=ie("./_to-object"),le=ie("./_shared-key")("IE_PROTO"),ee=Object.prototype;Ce.exports=Object.getPrototypeOf||function(ne){return ne=te(ne),se(ne,le)?ne[le]:typeof ne.constructor=="function"&&ne instanceof ne.constructor?ne.constructor.prototype:ne instanceof Object?ee:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(ie,Ce,ue){var se=ie("./_has"),te=ie("./_to-iobject"),le=ie("./_array-includes")(!1),ee=ie("./_shared-key")("IE_PROTO");Ce.exports=function(ne,E){var b,z=te(ne),x=0,re=[];for(b in z)b!=ee&&se(z,b)&&re.push(b);for(;E.length>x;)se(z,b=E[x++])&&(~le(re,b)||re.push(b));return re}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(ie,Ce,ue){var se=ie("./_object-keys-internal"),te=ie("./_enum-bug-keys");Ce.exports=Object.keys||function(le){return se(le,te)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(ie,Ce,ue){ue.f={}.propertyIsEnumerable},{}],108:[function(ie,Ce,ue){var se=ie("./_export"),te=ie("./_core"),le=ie("./_fails");Ce.exports=function(ee,ne){var E=(te.Object||{})[ee]||Object[ee],b={};b[ee]=ne(E),se(se.S+se.F*le(function(){E(1)}),"Object",b)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(ie,Ce,ue){Ce.exports=function(se){try{return{e:!1,v:se()}}catch(te){return{e:!0,v:te}}}},{}],110:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_is-object"),le=ie("./_new-promise-capability");Ce.exports=function(ee,ne){if(se(ee),te(ne)&&ne.constructor===ee)return ne;var E=le.f(ee);return(0,E.resolve)(ne),E.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(ie,Ce,ue){Ce.exports=function(se,te){return{enumerable:!(1&se),configurable:!(2&se),writable:!(4&se),value:te}}},{}],112:[function(ie,Ce,ue){var se=ie("./_hide");Ce.exports=function(te,le,ee){for(var ne in le)ee&&te[ne]?te[ne]=le[ne]:se(te,ne,le[ne]);return te}},{"./_hide":78}],113:[function(ie,Ce,ue){Ce.exports=ie("./_hide")},{"./_hide":78}],114:[function(ie,Ce,ue){"use strict";var se=ie("./_global"),te=ie("./_core"),le=ie("./_object-dp"),ee=ie("./_descriptors"),ne=ie("./_wks")("species");Ce.exports=function(E){var b=typeof te[E]=="function"?te[E]:se[E];ee&&b&&!b[ne]&&le.f(b,ne,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(ie,Ce,ue){var se=ie("./_object-dp").f,te=ie("./_has"),le=ie("./_wks")("toStringTag");Ce.exports=function(ee,ne,E){ee&&!te(ee=E?ee:ee.prototype,le)&&se(ee,le,{configurable:!0,value:ne})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(ie,Ce,ue){var se=ie("./_shared")("keys"),te=ie("./_uid");Ce.exports=function(le){return se[le]||(se[le]=te(le))}},{"./_shared":117,"./_uid":127}],117:[function(ie,Ce,ue){var se=ie("./_core"),te=ie("./_global"),le=te["__core-js_shared__"]||(te["__core-js_shared__"]={});(Ce.exports=function(ee,ne){return le[ee]||(le[ee]=ne!==void 0?ne:{})})("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,Ce,ue){var se=ie("./_an-object"),te=ie("./_a-function"),le=ie("./_wks")("species");Ce.exports=function(ee,ne){var E,b=se(ee).constructor;return b===void 0||(E=se(b)[le])==null?ne:te(E)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=ie("./_defined");Ce.exports=function(le){return function(ee,ne){var E,b,z=String(te(ee)),x=se(ne),re=z.length;return x<0||x>=re?le?"":void 0:(E=z.charCodeAt(x),E<55296||E>56319||x+1===re||(b=z.charCodeAt(x+1))<56320||b>57343?le?z.charAt(x):E:le?z.slice(x,x+2):b-56320+(E-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(ie,Ce,ue){var se,te,le,ee=ie("./_ctx"),ne=ie("./_invoke"),E=ie("./_html"),b=ie("./_dom-create"),z=ie("./_global"),x=z.process,re=z.setImmediate,ae=z.clearImmediate,oe=z.MessageChannel,ve=z.Dispatch,ye=0,me={},ge=function(){var he=+this;if(me.hasOwnProperty(he)){var pe=me[he];delete me[he],pe()}},_e=function(he){ge.call(he.data)};re&&ae||(re=function(he){for(var pe=[],ke=1;arguments.length>ke;)pe.push(arguments[ke++]);return me[++ye]=function(){ne(typeof he=="function"?he:Function(he),pe)},se(ye),ye},ae=function(he){delete me[he]},ie("./_cof")(x)=="process"?se=function(he){x.nextTick(ee(ge,he,1))}:ve&&ve.now?se=function(he){ve.now(ee(ge,he,1))}:oe?(te=new oe,le=te.port2,te.port1.onmessage=_e,se=ee(le.postMessage,le,1)):z.addEventListener&&typeof postMessage=="function"&&!z.importScripts?(se=function(he){z.postMessage(he+"","*")},z.addEventListener("message",_e,!1)):se="onreadystatechange"in b("script")?function(he){E.appendChild(b("script")).onreadystatechange=function(){E.removeChild(this),ge.call(he)}}:function(he){setTimeout(ee(ge,he,1),0)}),Ce.exports={set:re,clear:ae}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=Math.max,le=Math.min;Ce.exports=function(ee,ne){return ee=se(ee),ee<0?te(ee+ne,0):le(ee,ne)}},{"./_to-integer":122}],122:[function(ie,Ce,ue){var se=Math.ceil,te=Math.floor;Ce.exports=function(le){return isNaN(le=+le)?0:(le>0?te:se)(le)}},{}],123:[function(ie,Ce,ue){var se=ie("./_iobject"),te=ie("./_defined");Ce.exports=function(le){return se(te(le))}},{"./_defined":68,"./_iobject":82}],124:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=Math.min;Ce.exports=function(le){return le>0?te(se(le),9007199254740991):0}},{"./_to-integer":122}],125:[function(ie,Ce,ue){var se=ie("./_defined");Ce.exports=function(te){return Object(se(te))}},{"./_defined":68}],126:[function(ie,Ce,ue){var se=ie("./_is-object");Ce.exports=function(te,le){if(!se(te))return te;var ee,ne;if(le&&typeof(ee=te.toString)=="function"&&!se(ne=ee.call(te))||typeof(ee=te.valueOf)=="function"&&!se(ne=ee.call(te))||!le&&typeof(ee=te.toString)=="function"&&!se(ne=ee.call(te)))return ne;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(ie,Ce,ue){var se=0,te=Math.random();Ce.exports=function(le){return"Symbol(".concat(le===void 0?"":le,")_",(++se+te).toString(36))}},{}],128:[function(ie,Ce,ue){var se=ie("./_global"),te=se.navigator;Ce.exports=te&&te.userAgent||""},{"./_global":76}],129:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_core"),le=ie("./_library"),ee=ie("./_wks-ext"),ne=ie("./_object-dp").f;Ce.exports=function(E){var b=te.Symbol||(te.Symbol=le?{}:se.Symbol||{});E.charAt(0)=="_"||E in b||ne(b,E,{value:ee.f(E)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(ie,Ce,ue){ue.f=ie("./_wks")},{"./_wks":131}],131:[function(ie,Ce,ue){var se=ie("./_shared")("wks"),te=ie("./_uid"),le=ie("./_global").Symbol,ee=typeof le=="function";(Ce.exports=function(ne){return se[ne]||(se[ne]=ee&&le[ne]||(ee?le:te)("Symbol."+ne))}).store=se},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(ie,Ce,ue){var se=ie("./_classof"),te=ie("./_wks")("iterator"),le=ie("./_iterators");Ce.exports=ie("./_core").getIteratorMethod=function(ee){if(ee!=null)return ee[te]||ee["@@iterator"]||le[se(ee)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(ie,Ce,ue){"use strict";var se=ie("./_ctx"),te=ie("./_export"),le=ie("./_to-object"),ee=ie("./_iter-call"),ne=ie("./_is-array-iter"),E=ie("./_to-length"),b=ie("./_create-property"),z=ie("./core.get-iterator-method");te(te.S+te.F*!ie("./_iter-detect")(function(x){Array.from(x)}),"Array",{from:function(x){var re,ae,oe,ve,ye=le(x),me=typeof this=="function"?this:Array,ge=arguments.length,_e=ge>1?arguments[1]:void 0,he=_e!==void 0,pe=0,ke=z(ye);if(he&&(_e=se(_e,ge>2?arguments[2]:void 0,2)),ke==null||me==Array&&ne(ke))for(re=E(ye.length),ae=new me(re);re>pe;pe++)b(ae,pe,he?_e(ye[pe],pe):ye[pe]);else for(ve=ke.call(ye),ae=new me;!(oe=ve.next()).done;pe++)b(ae,pe,he?ee(ve,_e,[oe.value,pe],!0):oe.value);return ae.length=pe,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,Ce,ue){"use strict";var se=ie("./_add-to-unscopables"),te=ie("./_iter-step"),le=ie("./_iterators"),ee=ie("./_to-iobject");Ce.exports=ie("./_iter-define")(Array,"Array",function(ne,E){this._t=ee(ne),this._i=0,this._k=E},function(){var ne=this._t,E=this._k,b=this._i++;return!ne||b>=ne.length?(this._t=void 0,te(1)):E=="keys"?te(0,b):E=="values"?te(0,ne[b]):te(0,[b,ne[b]])},"values"),le.Arguments=le.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,Ce,ue){"use strict";var se=ie("./_is-object"),te=ie("./_object-gpo"),le=ie("./_wks")("hasInstance"),ee=Function.prototype;le in ee||ie("./_object-dp").f(ee,le,{value:function(ne){if(typeof this!="function"||!se(ne))return!1;if(!se(this.prototype))return ne instanceof this;for(;ne=te(ne);)if(this.prototype===ne)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(ie,Ce,ue){var se=ie("./_export");se(se.S+se.F,"Object",{assign:ie("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(ie,Ce,ue){var se=ie("./_export");se(se.S,"Object",{create:ie("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(ie,Ce,ue){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,Ce,ue){ie("./_object-sap")("getOwnPropertyNames",function(){return ie("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(ie,Ce,ue){var se=ie("./_to-object"),te=ie("./_object-gpo");ie("./_object-sap")("getPrototypeOf",function(){return function(le){return te(se(le))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(ie,Ce,ue){var se=ie("./_to-object"),te=ie("./_object-keys");ie("./_object-sap")("keys",function(){return function(le){return te(se(le))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(ie,Ce,ue){arguments[4][36][0].apply(ue,arguments)},{dup:36}],143:[function(ie,Ce,ue){"use strict";var se,te,le,ee,ne=ie("./_library"),E=ie("./_global"),b=ie("./_ctx"),z=ie("./_classof"),x=ie("./_export"),re=ie("./_is-object"),ae=ie("./_a-function"),oe=ie("./_an-instance"),ve=ie("./_for-of"),ye=ie("./_species-constructor"),me=ie("./_task").set,ge=ie("./_microtask")(),_e=ie("./_new-promise-capability"),he=ie("./_perform"),pe=ie("./_user-agent"),ke=ie("./_promise-resolve"),Te=E.TypeError,Ee=E.process,Oe=Ee&&Ee.versions,je=Oe&&Oe.v8||"",Pe=E.Promise,Qe=z(Ee)=="process",Xe=function(){},ot=te=_e.f,We=!!function(){try{var nt=Pe.resolve(1),et=(nt.constructor={})[ie("./_wks")("species")]=function(pt){pt(Xe,Xe)};return(Qe||typeof PromiseRejectionEvent=="function")&&nt.then(Xe)instanceof et&&je.indexOf("6.6")!==0&&pe.indexOf("Chrome/66")===-1}catch(pt){}}(),rt=function(nt){var et;return!(!re(nt)||typeof(et=nt.then)!="function")&&et},Ye=function(nt,et){if(!nt._n){nt._n=!0;var pt=nt._c;ge(function(){for(var ct=nt._v,Rt=nt._s==1,dt=0;pt.length>dt;)(function(Mt){var xt,yt,bt,He=Rt?Mt.ok:Mt.fail,Ae=Mt.resolve,be=Mt.reject,Be=Mt.domain;try{He?(Rt||(nt._h==2&&ze(nt),nt._h=1),He===!0?xt=ct:(Be&&Be.enter(),xt=He(ct),Be&&(Be.exit(),bt=!0)),xt===Mt.promise?be(Te("Promise-chain cycle")):(yt=rt(xt))?yt.call(xt,Ae,be):Ae(xt)):be(ct)}catch(Ke){Be&&!bt&&Be.exit(),be(Ke)}})(pt[dt++]);nt._c=[],nt._n=!1,et&&!nt._h&&ut(nt)})}},ut=function(nt){me.call(E,function(){var et,pt,ct,Rt=nt._v,dt=Ge(nt);if(dt&&(et=he(function(){Qe?Ee.emit("unhandledRejection",Rt,nt):(pt=E.onunhandledrejection)?pt({promise:nt,reason:Rt}):(ct=E.console)&&ct.error&&ct.error("Unhandled promise rejection",Rt)}),nt._h=Qe||Ge(nt)?2:1),nt._a=void 0,dt&&et.e)throw et.v})},Ge=function(nt){return nt._h!==1&&(nt._a||nt._c).length===0},ze=function(nt){me.call(E,function(){var et;Qe?Ee.emit("rejectionHandled",nt):(et=E.onrejectionhandled)&&et({promise:nt,reason:nt._v})})},Ve=function(nt){var et=this;et._d||(et._d=!0,et=et._w||et,et._v=nt,et._s=2,et._a||(et._a=et._c.slice()),Ye(et,!0))},$e=function(nt){var et,pt=this;if(!pt._d){pt._d=!0,pt=pt._w||pt;try{if(pt===nt)throw Te("Promise can't be resolved itself");(et=rt(nt))?ge(function(){var ct={_w:pt,_d:!1};try{et.call(nt,b($e,ct,1),b(Ve,ct,1))}catch(Rt){Ve.call(ct,Rt)}}):(pt._v=nt,pt._s=1,Ye(pt,!1))}catch(ct){Ve.call({_w:pt,_d:!1},ct)}}};We||(Pe=function(nt){oe(this,Pe,"Promise","_h"),ae(nt),se.call(this);try{nt(b($e,this,1),b(Ve,this,1))}catch(et){Ve.call(this,et)}},se=function(nt){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(nt,et){var pt=ot(ye(this,Pe));return pt.ok=typeof nt!="function"||nt,pt.fail=typeof et=="function"&&et,pt.domain=Qe?Ee.domain:void 0,this._c.push(pt),this._a&&this._a.push(pt),this._s&&Ye(this,!1),pt.promise},catch:function(nt){return this.then(void 0,nt)}}),le=function(){var nt=new se;this.promise=nt,this.resolve=b($e,nt,1),this.reject=b(Ve,nt,1)},_e.f=ot=function(nt){return nt===Pe||nt===ee?new le(nt):te(nt)}),x(x.G+x.W+x.F*!We,{Promise:Pe}),ie("./_set-to-string-tag")(Pe,"Promise"),ie("./_set-species")("Promise"),ee=ie("./_core").Promise,x(x.S+x.F*!We,"Promise",{reject:function(nt){var et=ot(this);return(0,et.reject)(nt),et.promise}}),x(x.S+x.F*(ne||!We),"Promise",{resolve:function(nt){return ke(ne&&this===ee?Pe:this,nt)}}),x(x.S+x.F*!(We&&ie("./_iter-detect")(function(nt){Pe.all(nt).catch(Xe)})),"Promise",{all:function(nt){var et=this,pt=ot(et),ct=pt.resolve,Rt=pt.reject,dt=he(function(){var Mt=[],xt=0,yt=1;ve(nt,!1,function(bt){var He=xt++,Ae=!1;Mt.push(void 0),yt++,et.resolve(bt).then(function(be){Ae||(Ae=!0,Mt[He]=be,--yt||ct(Mt))},Rt)}),--yt||ct(Mt)});return dt.e&&Rt(dt.v),pt.promise},race:function(nt){var et=this,pt=ot(et),ct=pt.reject,Rt=he(function(){ve(nt,!1,function(dt){et.resolve(dt).then(pt.resolve,ct)})});return Rt.e&&ct(Rt.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,Ce,ue){var se=ie("./_export"),te=ie("./_to-absolute-index"),le=String.fromCharCode,ee=String.fromCodePoint;se(se.S+se.F*(!!ee&&ee.length!=1),"String",{fromCodePoint:function(ne){for(var E,b=[],z=arguments.length,x=0;z>x;){if(E=+arguments[x++],te(E,1114111)!==E)throw RangeError(E+" is not a valid code point");b.push(E<65536?le(E):le(55296+((E-=65536)>>10),E%1024+56320))}return b.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(ie,Ce,ue){"use strict";var se=ie("./_string-at")(!0);ie("./_iter-define")(String,"String",function(te){this._t=String(te),this._i=0},function(){var te,le=this._t,ee=this._i;return ee>=le.length?{value:void 0,done:!0}:(te=se(le,ee),this._i+=te.length,{value:te,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(ie,Ce,ue){"use strict";var se=ie("./_global"),te=ie("./_has"),le=ie("./_descriptors"),ee=ie("./_export"),ne=ie("./_redefine"),E=ie("./_meta").KEY,b=ie("./_fails"),z=ie("./_shared"),x=ie("./_set-to-string-tag"),re=ie("./_uid"),ae=ie("./_wks"),oe=ie("./_wks-ext"),ve=ie("./_wks-define"),ye=ie("./_enum-keys"),me=ie("./_is-array"),ge=ie("./_an-object"),_e=ie("./_is-object"),he=ie("./_to-iobject"),pe=ie("./_to-primitive"),ke=ie("./_property-desc"),Te=ie("./_object-create"),Ee=ie("./_object-gopn-ext"),Oe=ie("./_object-gopd"),je=ie("./_object-dp"),Pe=ie("./_object-keys"),Qe=Oe.f,Xe=je.f,ot=Ee.f,We=se.Symbol,rt=se.JSON,Ye=rt&&rt.stringify,ut=ae("_hidden"),Ge=ae("toPrimitive"),ze={}.propertyIsEnumerable,Ve=z("symbol-registry"),$e=z("symbols"),nt=z("op-symbols"),et=Object.prototype,pt=typeof We=="function",ct=se.QObject,Rt=!ct||!ct.prototype||!ct.prototype.findChild,dt=le&&b(function(){return Te(Xe({},"a",{get:function(){return Xe(this,"a",{value:7}).a}})).a!=7})?function(Ue,Me,Re){var tt=Qe(et,Me);tt&&delete et[Me],Xe(Ue,Me,Re),tt&&Ue!==et&&Xe(et,Me,tt)}:Xe,Mt=function(Ue){var Me=$e[Ue]=Te(We.prototype);return Me._k=Ue,Me},xt=pt&&typeof We.iterator=="symbol"?function(Ue){return typeof Ue=="symbol"}:function(Ue){return Ue instanceof We},yt=function(Ue,Me,Re){return Ue===et&&yt(nt,Me,Re),ge(Ue),Me=pe(Me,!0),ge(Re),te($e,Me)?(Re.enumerable?(te(Ue,ut)&&Ue[ut][Me]&&(Ue[ut][Me]=!1),Re=Te(Re,{enumerable:ke(0,!1)})):(te(Ue,ut)||Xe(Ue,ut,ke(1,{})),Ue[ut][Me]=!0),dt(Ue,Me,Re)):Xe(Ue,Me,Re)},bt=function(Ue,Me){ge(Ue);for(var Re,tt=ye(Me=he(Me)),lt=0,Pt=tt.length;Pt>lt;)yt(Ue,Re=tt[lt++],Me[Re]);return Ue},He=function(Ue,Me){return Me===void 0?Te(Ue):bt(Te(Ue),Me)},Ae=function(Ue){var Me=ze.call(this,Ue=pe(Ue,!0));return!(this===et&&te($e,Ue)&&!te(nt,Ue))&&(!(Me||!te(this,Ue)||!te($e,Ue)||te(this,ut)&&this[ut][Ue])||Me)},be=function(Ue,Me){if(Ue=he(Ue),Me=pe(Me,!0),Ue!==et||!te($e,Me)||te(nt,Me)){var Re=Qe(Ue,Me);return!Re||!te($e,Me)||te(Ue,ut)&&Ue[ut][Me]||(Re.enumerable=!0),Re}},Be=function(Ue){for(var Me,Re=ot(he(Ue)),tt=[],lt=0;Re.length>lt;)te($e,Me=Re[lt++])||Me==ut||Me==E||tt.push(Me);return tt},Ke=function(Ue){for(var Me,Re=Ue===et,tt=ot(Re?nt:he(Ue)),lt=[],Pt=0;tt.length>Pt;)!te($e,Me=tt[Pt++])||Re&&!te(et,Me)||lt.push($e[Me]);return lt};pt||(We=function(){if(this instanceof We)throw TypeError("Symbol is not a constructor!");var Ue=re(arguments.length>0?arguments[0]:void 0),Me=function(Re){this===et&&Me.call(nt,Re),te(this,ut)&&te(this[ut],Ue)&&(this[ut][Ue]=!1),dt(this,Ue,ke(1,Re))};return le&&Rt&&dt(et,Ue,{configurable:!0,set:Me}),Mt(Ue)},ne(We.prototype,"toString",function(){return this._k}),Oe.f=be,je.f=yt,ie("./_object-gopn").f=Ee.f=Be,ie("./_object-pie").f=Ae,ie("./_object-gops").f=Ke,le&&!ie("./_library")&&ne(et,"propertyIsEnumerable",Ae,!0),oe.f=function(Ue){return Mt(ae(Ue))}),ee(ee.G+ee.W+ee.F*!pt,{Symbol:We});for(var Ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),De=0;Ne.length>De;)ae(Ne[De++]);for(var we=Pe(ae.store),Le=0;we.length>Le;)ve(we[Le++]);ee(ee.S+ee.F*!pt,"Symbol",{for:function(Ue){return te(Ve,Ue+="")?Ve[Ue]:Ve[Ue]=We(Ue)},keyFor:function(Ue){if(!xt(Ue))throw TypeError(Ue+" is not a symbol!");for(var Me in Ve)if(Ve[Me]===Ue)return Me},useSetter:function(){Rt=!0},useSimple:function(){Rt=!1}}),ee(ee.S+ee.F*!pt,"Object",{create:He,defineProperty:yt,defineProperties:bt,getOwnPropertyDescriptor:be,getOwnPropertyNames:Be,getOwnPropertySymbols:Ke}),rt&&ee(ee.S+ee.F*(!pt||b(function(){var Ue=We();return Ye([Ue])!="[null]"||Ye({a:Ue})!="{}"||Ye(Object(Ue))!="{}"})),"JSON",{stringify:function(Ue){for(var Me,Re,tt=[Ue],lt=1;arguments.length>lt;)tt.push(arguments[lt++]);if(Re=Me=tt[1],(_e(Me)||Ue!==void 0)&&!xt(Ue))return me(Me)||(Me=function(Pt,Ct){if(typeof Re=="function"&&(Ct=Re.call(this,Pt,Ct)),!xt(Ct))return Ct}),tt[1]=Me,Ye.apply(rt,tt)}}),We.prototype[Ge]||ie("./_hide")(We.prototype,Ge,We.prototype.valueOf),x(We,"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,Ce,ue){"use strict";var se=ie("./_export"),te=ie("./_core"),le=ie("./_global"),ee=ie("./_species-constructor"),ne=ie("./_promise-resolve");se(se.P+se.R,"Promise",{finally:function(E){var b=ee(this,te.Promise||le.Promise),z=typeof E=="function";return this.then(z?function(x){return ne(b,E()).then(function(){return x})}:E,z?function(x){return ne(b,E()).then(function(){throw x})}:E)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(ie,Ce,ue){"use strict";var se=ie("./_export"),te=ie("./_new-promise-capability"),le=ie("./_perform");se(se.S,"Promise",{try:function(ee){var ne=te.f(this),E=le(ee);return(E.e?ne.reject:ne.resolve)(E.v),ne.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(ie,Ce,ue){ie("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(ie,Ce,ue){ie("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(ie,Ce,ue){ie("./es6.array.iterator");for(var se=ie("./_global"),te=ie("./_hide"),le=ie("./_iterators"),ee=ie("./_wks")("toStringTag"),ne="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<ne.length;E++){var b=ne[E],z=se[b],x=z&&z.prototype;x&&!x[ee]&&te(x,ee,b),le[b]=le.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(ie,Ce,ue){var se=ie("./_export"),te=ie("./_task");se(se.G+se.B,{setImmediate:te.set,clearImmediate:te.clear})},{"./_export":73,"./_task":120}],153:[function(ie,Ce,ue){(function(se){"use strict";function te(pe){return Array.isArray?Array.isArray(pe):ge(pe)==="[object Array]"}function le(pe){return typeof pe=="boolean"}function ee(pe){return pe===null}function ne(pe){return pe==null}function E(pe){return typeof pe=="number"}function b(pe){return typeof pe=="string"}function z(pe){return(pe===void 0?"undefined":(0,he.default)(pe))==="symbol"}function x(pe){return pe===void 0}function re(pe){return ge(pe)==="[object RegExp]"}function ae(pe){return(pe===void 0?"undefined":(0,he.default)(pe))==="object"&&pe!==null}function oe(pe){return ge(pe)==="[object Date]"}function ve(pe){return ge(pe)==="[object Error]"||pe instanceof Error}function ye(pe){return typeof pe=="function"}function me(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||(pe===void 0?"undefined":(0,he.default)(pe))==="symbol"||pe===void 0}function ge(pe){return Object.prototype.toString.call(pe)}var _e=ie("babel-runtime/helpers/typeof"),he=function(pe){return pe&&pe.__esModule?pe:{default:pe}}(_e);ue.isArray=te,ue.isBoolean=le,ue.isNull=ee,ue.isNullOrUndefined=ne,ue.isNumber=E,ue.isString=b,ue.isSymbol=z,ue.isUndefined=x,ue.isRegExp=re,ue.isObject=ae,ue.isDate=oe,ue.isError=ve,ue.isFunction=ye,ue.isPrimitive=me,ue.isBuffer=se.isBuffer}).call(this,{isBuffer:ie("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/helpers/typeof"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(le){function ee(x,re){for(x=String(x),re=re||2;x.length<re;)x="0"+x;return x}function ne(x){var re=new Date(x.getFullYear(),x.getMonth(),x.getDate());re.setDate(re.getDate()-(re.getDay()+6)%7+3);var ae=new Date(re.getFullYear(),0,4);ae.setDate(ae.getDate()-(ae.getDay()+6)%7+3);var oe=re.getTimezoneOffset()-ae.getTimezoneOffset();re.setHours(re.getHours()-oe);var ve=(re-ae)/6048e5;return 1+Math.floor(ve)}function E(x){var re=x.getDay();return re===0&&(re=7),re}function b(x){return x===null?"null":x===void 0?"undefined":(x===void 0?"undefined":(0,te.default)(x))!=="object"?x===void 0?"undefined":(0,te.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,re=/\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,ve,ye,me){if(arguments.length!==1||b(oe)!=="string"||/\d/.test(oe)||(ve=oe,oe=void 0),oe=oe||new Date,oe instanceof Date||(oe=new Date(oe)),isNaN(oe))throw TypeError("Invalid date");ve=String(z.masks[ve]||ve||z.masks.default);var ge=ve.slice(0,4);ge!=="UTC:"&&ge!=="GMT:"||(ve=ve.slice(4),ye=!0,ge==="GMT:"&&(me=!0));var _e=ye?"getUTC":"get",he=oe[_e+"Date"](),pe=oe[_e+"Day"](),ke=oe[_e+"Month"](),Te=oe[_e+"FullYear"](),Ee=oe[_e+"Hours"](),Oe=oe[_e+"Minutes"](),je=oe[_e+"Seconds"](),Pe=oe[_e+"Milliseconds"](),Qe=ye?0:oe.getTimezoneOffset(),Xe=ne(oe),ot=E(oe),We={d:he,dd:ee(he),ddd:z.i18n.dayNames[pe],dddd:z.i18n.dayNames[pe+7],m:ke+1,mm:ee(ke+1),mmm:z.i18n.monthNames[ke],mmmm:z.i18n.monthNames[ke+12],yy:String(Te).slice(2),yyyy:Te,h:Ee%12||12,hh:ee(Ee%12||12),H:Ee,HH:ee(Ee),M:Oe,MM:ee(Oe),s:je,ss:ee(je),l:ee(Pe,3),L:ee(Math.round(Pe/10)),t:Ee<12?"a":"p",tt:Ee<12?"am":"pm",T:Ee<12?"A":"P",TT:Ee<12?"AM":"PM",Z:me?"GMT":ye?"UTC":(String(oe).match(re)||[""]).pop().replace(ae,""),o:(Qe>0?"-":"+")+ee(100*Math.floor(Math.abs(Qe)/60)+Math.abs(Qe)%60,4),S:["th","st","nd","rd"][he%10>3?0:(he%100-he%10!=10)*he%10],W:Xe,N:ot};return ve.replace(x,function(rt){return rt in We?We[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 ce=="function"&&ce.amd?ce(function(){return z}):(ue===void 0?"undefined":(0,te.default)(ue))==="object"?Ce.exports=z:le.dateFormat=z})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(ie,Ce,ue){(function(se){function te(){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 le(b){var z=this.useColors;if(b[0]=(z?"%c":"")+this.namespace+(z?" %c":" ")+b[0]+(z?"%c ":" ")+"+"+ue.humanize(this.diff),z){var x="color: "+this.color;b.splice(1,0,x,"color: inherit");var re=0,ae=0;b[0].replace(/%[a-zA-Z%]/g,function(oe){oe!=="%%"&&(re++,oe==="%c"&&(ae=re))}),b.splice(ae,0,x)}}function ee(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ne(b){try{b==null?ue.storage.removeItem("debug"):ue.storage.debug=b}catch(z){}}function E(){var b;try{b=ue.storage.debug}catch(z){}return!b&&se!==void 0&&"env"in se&&(b=se.env.DEBUG),b}ue=Ce.exports=ie("./debug"),ue.log=ee,ue.formatArgs=le,ue.save=ne,ue.load=E,ue.useColors=te,ue.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(b){}}(),ue.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],ue.formatters.j=function(b){try{return JSON.stringify(b)}catch(z){return"[UnexpectedJSONParseError]: "+z.message}},ue.enable(E())}).call(this,ie("_process"))},{"./debug":156,_process:173}],156:[function(ie,Ce,ue){function se(z){var x,re=0;for(x in z)re=(re<<5)-re+z.charCodeAt(x),re|=0;return ue.colors[Math.abs(re)%ue.colors.length]}function te(z){function x(){if(x.enabled){var re=x,ae=+new Date,oe=ae-(b||ae);re.diff=oe,re.prev=b,re.curr=ae,b=ae;for(var ve=new Array(arguments.length),ye=0;ye<ve.length;ye++)ve[ye]=arguments[ye];ve[0]=ue.coerce(ve[0]),typeof ve[0]!="string"&&ve.unshift("%O");var me=0;ve[0]=ve[0].replace(/%([a-zA-Z%])/g,function(ge,_e){if(ge==="%%")return ge;me++;var he=ue.formatters[_e];if(typeof he=="function"){var pe=ve[me];ge=he.call(re,pe),ve.splice(me,1),me--}return ge}),ue.formatArgs.call(re,ve),(x.log||ue.log||console.log.bind(console)).apply(re,ve)}}return x.namespace=z,x.enabled=ue.enabled(z),x.useColors=ue.useColors(),x.color=se(z),typeof ue.init=="function"&&ue.init(x),x}function le(z){ue.save(z),ue.names=[],ue.skips=[];for(var x=(typeof z=="string"?z:"").split(/[\s,]+/),re=x.length,ae=0;ae<re;ae++)x[ae]&&(z=x[ae].replace(/\*/g,".*?"),z[0]==="-"?ue.skips.push(new RegExp("^"+z.substr(1)+"$")):ue.names.push(new RegExp("^"+z+"$")))}function ee(){ue.enable("")}function ne(z){var x,re;for(x=0,re=ue.skips.length;x<re;x++)if(ue.skips[x].test(z))return!1;for(x=0,re=ue.names.length;x<re;x++)if(ue.names[x].test(z))return!0;return!1}function E(z){return z instanceof Error?z.stack||z.message:z}ue=Ce.exports=te.debug=te.default=te,ue.coerce=E,ue.disable=ee,ue.enable=le,ue.enabled=ne,ue.humanize=ie("ms"),ue.names=[],ue.skips=[],ue.formatters={};var b},{ms:169}],157:[function(ie,Ce,ue){"use strict";function se(le){var ee=""+le,ne=te.exec(ee);if(!ne)return ee;var E,b="",z=0,x=0;for(z=ne.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&&(b+=ee.substring(x,z)),x=z+1,b+=E}return x!==z?b+ee.substring(x,z):b}var te=/["'&<>]/;Ce.exports=se},{}],158:[function(ie,Ce,ue){function se(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function te(E){return typeof E=="function"}function le(E){return typeof E=="number"}function ee(E){return typeof E=="object"&&E!==null}function ne(E){return E===void 0}Ce.exports=se,se.EventEmitter=se,se.prototype._events=void 0,se.prototype._maxListeners=void 0,se.defaultMaxListeners=10,se.prototype.setMaxListeners=function(E){if(!le(E)||E<0||isNaN(E))throw TypeError("n must be a positive number");return this._maxListeners=E,this},se.prototype.emit=function(E){var b,z,x,re,ae,oe;if(this._events||(this._events={}),E==="error"&&(!this._events.error||ee(this._events.error)&&!this._events.error.length)){if((b=arguments[1])instanceof Error)throw b;var ve=new Error('Uncaught, unspecified "error" event. ('+b+")");throw ve.context=b,ve}if(z=this._events[E],ne(z))return!1;if(te(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:re=Array.prototype.slice.call(arguments,1),z.apply(this,re)}else if(ee(z))for(re=Array.prototype.slice.call(arguments,1),oe=z.slice(),x=oe.length,ae=0;ae<x;ae++)oe[ae].apply(this,re);return!0},se.prototype.addListener=function(E,b){var z;if(!te(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",E,te(b.listener)?b.listener:b),this._events[E]?ee(this._events[E])?this._events[E].push(b):this._events[E]=[this._events[E],b]:this._events[E]=b,ee(this._events[E])&&!this._events[E].warned&&(z=ne(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,b){function z(){this.removeListener(E,z),x||(x=!0,b.apply(this,arguments))}if(!te(b))throw TypeError("listener must be a function");var x=!1;return z.listener=b,this.on(E,z),this},se.prototype.removeListener=function(E,b){var z,x,re,ae;if(!te(b))throw TypeError("listener must be a function");if(!this._events||!this._events[E])return this;if(z=this._events[E],re=z.length,x=-1,z===b||te(z.listener)&&z.listener===b)delete this._events[E],this._events.removeListener&&this.emit("removeListener",E,b);else if(ee(z)){for(ae=re;ae-- >0;)if(z[ae]===b||z[ae].listener&&z[ae].listener===b){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,b)}return this},se.prototype.removeAllListeners=function(E){var b,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(b in this._events)b!=="removeListener"&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(z=this._events[E],te(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]?te(this._events[E])?[this._events[E]]:this._events[E].slice():[]},se.prototype.listenerCount=function(E){if(this._events){var b=this._events[E];if(te(b))return 1;if(b)return b.length}return 0},se.listenerCount=function(E,b){return E.listenerCount(b)}},{}],159:[function(ie,Ce,ue){var se=ie("http"),te=Ce.exports;for(var le in se)se.hasOwnProperty(le)&&(te[le]=se[le]);te.request=function(ee,ne){return ee||(ee={}),ee.scheme="https",ee.protocol="https:",se.request.call(this,ee,ne)}},{http:196}],160:[function(ie,Ce,ue){"use strict";var se=ie("util"),te=ie("ms");Ce.exports=function(le){if(typeof le=="number")return le;var ee=te(le);if(ee===void 0){var ne=new Error(se.format("humanize-ms(%j) result undefined",le));console.warn(ne.stack)}return ee}},{ms:169,util:207}],161:[function(ie,Ce,ue){ue.read=function(se,te,le,ee,ne){var E,b,z=8*ne-ee-1,x=(1<<z)-1,re=x>>1,ae=-7,oe=le?ne-1:0,ve=le?-1:1,ye=se[te+oe];for(oe+=ve,E=ye&(1<<-ae)-1,ye>>=-ae,ae+=z;ae>0;E=256*E+se[te+oe],oe+=ve,ae-=8);for(b=E&(1<<-ae)-1,E>>=-ae,ae+=ee;ae>0;b=256*b+se[te+oe],oe+=ve,ae-=8);if(E===0)E=1-re;else{if(E===x)return b?NaN:1/0*(ye?-1:1);b+=Math.pow(2,ee),E-=re}return(ye?-1:1)*b*Math.pow(2,E-ee)},ue.write=function(se,te,le,ee,ne,E){var b,z,x,re=8*E-ne-1,ae=(1<<re)-1,oe=ae>>1,ve=ne===23?Math.pow(2,-24)-Math.pow(2,-77):0,ye=ee?0:E-1,me=ee?1:-1,ge=te<0||te===0&&1/te<0?1:0;for(te=Math.abs(te),isNaN(te)||te===1/0?(z=isNaN(te)?1:0,b=ae):(b=Math.floor(Math.log(te)/Math.LN2),te*(x=Math.pow(2,-b))<1&&(b--,x*=2),te+=b+oe>=1?ve/x:ve*Math.pow(2,1-oe),te*x>=2&&(b++,x/=2),b+oe>=ae?(z=0,b=ae):b+oe>=1?(z=(te*x-1)*Math.pow(2,ne),b+=oe):(z=te*Math.pow(2,oe-1)*Math.pow(2,ne),b=0));ne>=8;se[le+ye]=255&z,ye+=me,z/=256,ne-=8);for(b=b<<ne|z,re+=ne;re>0;se[le+ye]=255&b,ye+=me,b/=256,re-=8);se[le+ye-me]|=128*ge}},{}],162:[function(ie,Ce,ue){typeof Object.create=="function"?Ce.exports=function(se,te){se.super_=te,se.prototype=Object.create(te.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}})}:Ce.exports=function(se,te){se.super_=te;var le=function(){};le.prototype=te.prototype,se.prototype=new le,se.prototype.constructor=se}},{}],163:[function(ie,Ce,ue){function se(le){return!!le.constructor&&typeof le.constructor.isBuffer=="function"&&le.constructor.isBuffer(le)}function te(le){return typeof le.readFloatLE=="function"&&typeof le.slice=="function"&&se(le.slice(0,0))}Ce.exports=function(le){return le!=null&&(se(le)||te(le)||!!le._isBuffer)}},{}],164:[function(ie,Ce,ue){(function(se){function te(ne){return ee.call(ne).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function le(ne){return typeof ne=="function"&&(/^class(\s|\{\}$)/.test(ee.call(ne))||/^.*classCallCheck\(/.test(te(ne)))}var ee=Function.prototype.toString;ue!==void 0?(Ce!==void 0&&Ce.exports&&(ue=Ce.exports=le),ue.isClass=le):typeof ce=="function"&&ce.amd?ce([],function(){return le}):se.isClass=le})(this)},{}],165:[function(ie,Ce,ue){"use strict";function se(E){var b=E.slice(2);return b=b[0].toLowerCase()+b.slice(1)}var te=ie("core-util-is"),le=ie("isstream"),ee=ie("is-class");Object.keys(te).map(function(E){ue[se(E)]=te[E]}),ue.stream=le,ue.readableStream=le.isReadable,ue.writableStream=le.isWritable,ue.duplexStream=le.isDuplex,ue.class=ee,ue.finite=function(E){return Number.isFinite(E)},ue.NaN=function(E){return Number.isNaN(E)},ue.generator=function(E){return E&&typeof E.next=="function"&&typeof E.throw=="function"},ue.generatorFunction=function(E){return E&&E.constructor&&E.constructor.name==="GeneratorFunction"},ue.asyncFunction=function(E){return E&&E.constructor&&E.constructor.name==="AsyncFunction"},ue.promise=function(E){return E&&typeof E.then=="function"};var ne=Math.pow(2,31);ue.int=function(E){return te.isNumber(E)&&E%1==0},ue.int32=function(E){return ue.int(E)&&E<ne&&E>=-ne},ue.long=function(E){return ue.int(E)&&(E>=ne||E<-ne)},ue.Long=function(E){return ue.object(E)&&ue.number(E.high)&&ue.number(E.low)},ue.double=function(E){return te.isNumber(E)&&!isNaN(E)&&E%1!=0},ue.date=function(E){return E instanceof Date},ue.regExp=function(E){return E instanceof RegExp},ue.regexp=ue.regExp,ue.error=function(E){return E instanceof Error},ue.array=function(E){return Array.isArray(E)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(ie,Ce,ue){var se={}.toString;Ce.exports=Array.isArray||function(te){return se.call(te)=="[object Array]"}},{}],167:[function(ie,Ce,ue){function se(E){return E instanceof ne.Stream}function te(E){return se(E)&&typeof E._read=="function"&&typeof E._readableState=="object"}function le(E){return se(E)&&typeof E._write=="function"&&typeof E._writableState=="object"}function ee(E){return te(E)&&le(E)}var ne=ie("stream");Ce.exports=se,Ce.exports.isReadable=te,Ce.exports.isWritable=le,Ce.exports.isDuplex=ee},{stream:195}],168:[function(ie,Ce,ue){"use strict";function se(le,ee,ne){if(!le)throw new TypeError("argument dest is required");if(!ee)throw new TypeError("argument src is required");return ne===void 0&&(ne=!0),Object.getOwnPropertyNames(ee).forEach(function(E){if(ne||!te.call(le,E)){var b=Object.getOwnPropertyDescriptor(ee,E);Object.defineProperty(le,E,b)}}),le}Ce.exports=se;var te=Object.prototype.hasOwnProperty},{}],169:[function(ie,Ce,ue){function se(re){if(re=String(re),!(re.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(re);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*b;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*ne;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return oe;default:return}}}}function te(re){return re>=z?Math.round(re/z)+"d":re>=b?Math.round(re/b)+"h":re>=E?Math.round(re/E)+"m":re>=ne?Math.round(re/ne)+"s":re+"ms"}function le(re){return ee(re,z,"day")||ee(re,b,"hour")||ee(re,E,"minute")||ee(re,ne,"second")||re+" ms"}function ee(re,ae,oe){if(!(re<ae))return re<1.5*ae?Math.floor(re/ae)+" "+oe:Math.ceil(re/ae)+" "+oe+"s"}var ne=1e3,E=60*ne,b=60*E,z=24*b,x=365.25*z;Ce.exports=function(re,ae){ae=ae||{};var oe=typeof re;if(oe==="string"&&re.length>0)return se(re);if(oe==="number"&&isNaN(re)===!1)return ae.long?le(re):te(re);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(re))}},{}],170:[function(ie,Ce,ue){(function(se){function te(E,b){for(var z=0,x=E.length-1;x>=0;x--){var re=E[x];re==="."?E.splice(x,1):re===".."?(E.splice(x,1),z++):z&&(E.splice(x,1),z--)}if(b)for(;z--;z)E.unshift("..");return E}function le(E){typeof E!="string"&&(E+="");var b,z=0,x=-1,re=!0;for(b=E.length-1;b>=0;--b)if(E.charCodeAt(b)===47){if(!re){z=b+1;break}}else x===-1&&(re=!1,x=b+1);return x===-1?"":E.slice(z,x)}function ee(E,b){if(E.filter)return E.filter(b);for(var z=[],x=0;x<E.length;x++)b(E[x],x,E)&&z.push(E[x]);return z}ue.resolve=function(){for(var E="",b=!1,z=arguments.length-1;z>=-1&&!b;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,b=x.charAt(0)==="/")}return E=te(ee(E.split("/"),function(re){return!!re}),!b).join("/"),(b?"/":"")+E||"."},ue.normalize=function(E){var b=ue.isAbsolute(E),z=ne(E,-1)==="/";return E=te(ee(E.split("/"),function(x){return!!x}),!b).join("/"),E||b||(E="."),E&&z&&(E+="/"),(b?"/":"")+E},ue.isAbsolute=function(E){return E.charAt(0)==="/"},ue.join=function(){var E=Array.prototype.slice.call(arguments,0);return ue.normalize(ee(E,function(b,z){if(typeof b!="string")throw new TypeError("Arguments to path.join must be strings");return b}).join("/"))},ue.relative=function(E,b){function z(me){for(var ge=0;ge<me.length&&me[ge]==="";ge++);for(var _e=me.length-1;_e>=0&&me[_e]==="";_e--);return ge>_e?[]:me.slice(ge,_e-ge+1)}E=ue.resolve(E).substr(1),b=ue.resolve(b).substr(1);for(var x=z(E.split("/")),re=z(b.split("/")),ae=Math.min(x.length,re.length),oe=ae,ve=0;ve<ae;ve++)if(x[ve]!==re[ve]){oe=ve;break}for(var ye=[],ve=oe;ve<x.length;ve++)ye.push("..");return ye=ye.concat(re.slice(oe)),ye.join("/")},ue.sep="/",ue.delimiter=":",ue.dirname=function(E){if(typeof E!="string"&&(E+=""),E.length===0)return".";for(var b=E.charCodeAt(0),z=b===47,x=-1,re=!0,ae=E.length-1;ae>=1;--ae)if((b=E.charCodeAt(ae))===47){if(!re){x=ae;break}}else re=!1;return x===-1?z?"/":".":z&&x===1?"/":E.slice(0,x)},ue.basename=function(E,b){var z=le(E);return b&&z.substr(-1*b.length)===b&&(z=z.substr(0,z.length-b.length)),z},ue.extname=function(E){typeof E!="string"&&(E+="");for(var b=-1,z=0,x=-1,re=!0,ae=0,oe=E.length-1;oe>=0;--oe){var ve=E.charCodeAt(oe);if(ve!==47)x===-1&&(re=!1,x=oe+1),ve===46?b===-1?b=oe:ae!==1&&(ae=1):b!==-1&&(ae=-1);else if(!re){z=oe+1;break}}return b===-1||x===-1||ae===0||ae===1&&b===x-1&&b===z+1?"":E.slice(b,x)};var ne=function(E,b,z){return E.substr(b,z)}}).call(this,ie("_process"))},{_process:173}],171:[function(ie,Ce,ue){(function(se){(function(){"use strict";function te(je){return je=String(je),je.charAt(0).toUpperCase()+je.slice(1)}function le(je,Pe,Qe){var Xe={"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(je)&&!/^Windows Phone /i.test(je)&&(Xe=Xe[/[\d.]+$/.exec(je)])&&(je="Windows "+Xe),je=String(je),Pe&&Qe&&(je=je.replace(RegExp(Pe,"i"),Qe)),je=ne(je.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(je,Pe){var Qe=-1,Xe=je?je.length:0;if(typeof Xe=="number"&&Xe>-1&&Xe<=he)for(;++Qe<Xe;)Pe(je[Qe],Qe,je);else E(je,Pe)}function ne(je){return je=ae(je),/^(?:webOS|i(?:OS|P))/.test(je)?je:te(je)}function E(je,Pe){for(var Qe in je)Te.call(je,Qe)&&Pe(je[Qe],Qe,je)}function b(je){return je==null?te(je):Ee.call(je).slice(8,-1)}function z(je,Pe){var Qe=je!=null?typeof je[Pe]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(Qe)||Qe=="object"&&!je[Pe])}function x(je){return String(je).replace(/([ -])(?!$)/g,"$1?")}function re(je,Pe){var Qe=null;return ee(je,function(Xe,ot){Qe=Pe(Qe,Xe,ot,je)}),Qe}function ae(je){return String(je).replace(/^ +| +$/g,"")}function oe(je){function Pe(Ue){return re(Ue,function(Me,Re){var tt=Re.pattern||x(Re);return!Me&&(Me=RegExp("\\b"+tt+" *\\d+[.\\w_]*","i").exec(je)||RegExp("\\b"+tt+" *\\w+-[\\w]*","i").exec(je)||RegExp("\\b"+tt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(je))&&((Me=String(Re.label&&!RegExp(tt,"i").test(Re.label)?Re.label:Me).split("/"))[1]&&!/[\d.]+/.test(Me[0])&&(Me[0]+=" "+Me[1]),Re=Re.label||Re,Me=ne(Me[0].replace(RegExp(tt,"i"),Re).replace(RegExp("; *(?:"+Re+"[_-])?","i")," ").replace(RegExp("("+Re+")[-_.]?(\\w)","i"),"$1 $2"))),Me})}function Qe(){return this.description||""}var Xe=ye,ot=je&&typeof je=="object"&&b(je)!="String";ot&&(Xe=je,je=null);var We=Xe.navigator||{},rt=We.userAgent||"";je||(je=rt);var Ye,ut,Ge=ot?!!We.likeChrome:/\bChrome\b/.test(je)&&!/internal|\n/i.test(Ee.toString()),ze=ot?"Object":"ScriptBridgingProxyObject",Ve=ot?"Object":"Environment",$e=ot&&Xe.java?"JavaPackage":b(Xe.java),nt=ot?"Object":"RuntimeObject",et=/\bJava/.test($e)&&Xe.java,pt=et&&b(Xe.environment)==Ve,ct=et?"a":"\u4F2A",Rt=et?"b":"\u5C3E",dt=Xe.document||{},Mt=Xe.operamini||Xe.opera,xt=pe.test(xt=ot&&Mt?Mt["[[Class]]"]:b(Mt))?xt:Mt=null,yt=je,bt=[],He=null,Ae=je==rt,be=Ae&&Mt&&typeof Mt.version=="function"&&Mt.version(),Be=function(Ue){return re(Ue,function(Me,Re){return Me||RegExp("\\b"+(Re.pattern||x(Re))+"\\b","i").exec(je)&&(Re.label||Re)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ke=function(Ue){return re(Ue,function(Me,Re){return Me||RegExp("\\b"+(Re.pattern||x(Re))+"\\b","i").exec(je)&&(Re.label||Re)})}(["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"]),Ne=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"]),De=function(Ue){return re(Ue,function(Me,Re,tt){return Me||(Re[Ne]||Re[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ne)]||RegExp("\\b"+x(tt)+"(?:\\b|\\w*\\d)","i").exec(je))&&tt})}({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}}),we=function(Ue){return re(Ue,function(Me,Re){var tt=Re.pattern||x(Re);return!Me&&(Me=RegExp("\\b"+tt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(je))&&(Me=le(Me,tt,Re.label||Re)),Me})}(["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(Be&&(Be=[Be]),De&&!Ne&&(Ne=Pe([De])),(Ye=/\bGoogle TV\b/.exec(Ne))&&(Ne=Ye[0]),/\bSimulator\b/i.test(je)&&(Ne=(Ne?Ne+" ":"")+"Simulator"),Ke=="Opera Mini"&&/\bOPiOS\b/.test(je)&&bt.push("running in Turbo/Uncompressed mode"),Ke=="IE"&&/\blike iPhone OS\b/.test(je)?(Ye=oe(je.replace(/like iPhone OS/,"")),De=Ye.manufacturer,Ne=Ye.product):/^iP/.test(Ne)?(Ke||(Ke="Safari"),we="iOS"+((Ye=/ OS ([\d_]+)/i.exec(je))?" "+Ye[1].replace(/_/g,"."):"")):Ke!="Konqueror"||/buntu/i.test(we)?De&&De!="Google"&&(/Chrome/.test(Ke)&&!/\bMobile Safari\b/i.test(je)||/\bVita\b/.test(Ne))||/\bAndroid\b/.test(we)&&/^Chrome/.test(Ke)&&/\bVersion\//i.test(je)?(Ke="Android Browser",we=/\bAndroid\b/.test(we)?we:"Android"):Ke=="Silk"?(/\bMobi/i.test(je)||(we="Android",bt.unshift("desktop mode")),/Accelerated *= *true/i.test(je)&&bt.unshift("accelerated")):Ke=="PaleMoon"&&(Ye=/\bFirefox\/([\d.]+)\b/.exec(je))?bt.push("identifying as Firefox "+Ye[1]):Ke=="Firefox"&&(Ye=/\b(Mobile|Tablet|TV)\b/i.exec(je))?(we||(we="Firefox OS"),Ne||(Ne=Ye[1])):!Ke||(Ye=!/\bMinefield\b/i.test(je)&&/\b(?:Firefox|Safari)\b/.exec(Ke))?(Ke&&!Ne&&/[\/,]|^[^(]+?\)/.test(je.slice(je.indexOf(Ye+"/")+8))&&(Ke=null),(Ye=Ne||De||we)&&(Ne||De||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(we))&&(Ke=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(we)?we:Ye)+" Browser")):Ke=="Electron"&&(Ye=(/\bChrome\/([\d.]+)\b/.exec(je)||0)[1])&&bt.push("Chromium "+Ye):we="Kubuntu",be||(be=function(Ue){return re(Ue,function(Me,Re){return Me||(RegExp(Re+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(je)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(Ke),"(?:Firefox|Minefield|NetFront)"])),(Ye=Be=="iCab"&&parseFloat(be)>3&&"WebKit"||/\bOpera\b/.test(Ke)&&(/\bOPR\b/.test(je)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(je)&&!/^(?:Trident|EdgeHTML)$/.test(Be)&&"WebKit"||!Be&&/\bMSIE\b/i.test(je)&&(we=="Mac OS"?"Tasman":"Trident")||Be=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ke)&&"NetFront")&&(Be=[Ye]),Ke=="IE"&&(Ye=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(je)||0)[1])?(Ke+=" Mobile",we="Windows Phone "+(/\+$/.test(Ye)?Ye:Ye+".x"),bt.unshift("desktop mode")):/\bWPDesktop\b/i.test(je)?(Ke="IE Mobile",we="Windows Phone 8.x",bt.unshift("desktop mode"),be||(be=(/\brv:([\d.]+)/.exec(je)||0)[1])):Ke!="IE"&&Be=="Trident"&&(Ye=/\brv:([\d.]+)/.exec(je))&&(Ke&&bt.push("identifying as "+Ke+(be?" "+be:"")),Ke="IE",be=Ye[1]),Ae){if(z(Xe,"global"))if(et&&(Ye=et.lang.System,yt=Ye.getProperty("os.arch"),we=we||Ye.getProperty("os.name")+" "+Ye.getProperty("os.version")),pt){try{be=Xe.require("ringo/engine").version.join("."),Ke="RingoJS"}catch(Ue){(Ye=Xe.system)&&Ye.global.system==Xe.system&&(Ke="Narwhal",we||(we=Ye[0].os||null))}Ke||(Ke="Rhino")}else typeof Xe.process=="object"&&!Xe.process.browser&&(Ye=Xe.process)&&(typeof Ye.versions=="object"&&(typeof Ye.versions.electron=="string"?(bt.push("Node "+Ye.versions.node),Ke="Electron",be=Ye.versions.electron):typeof Ye.versions.nw=="string"&&(bt.push("Chromium "+be,"Node "+Ye.versions.node),Ke="NW.js",be=Ye.versions.nw)),Ke||(Ke="Node.js",yt=Ye.arch,we=Ye.platform,be=/[\d.]+/.exec(Ye.version),be=be?be[0]:null));else b(Ye=Xe.runtime)==ze?(Ke="Adobe AIR",we=Ye.flash.system.Capabilities.os):b(Ye=Xe.phantom)==nt?(Ke="PhantomJS",be=(Ye=Ye.version||null)&&Ye.major+"."+Ye.minor+"."+Ye.patch):typeof dt.documentMode=="number"&&(Ye=/\bTrident\/(\d+)/i.exec(je))?(be=[be,dt.documentMode],(Ye=+Ye[1]+4)!=be[1]&&(bt.push("IE "+be[1]+" mode"),Be&&(Be[1]=""),be[1]=Ye),be=Ke=="IE"?String(be[1].toFixed(1)):be[0]):typeof dt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ke)&&(bt.push("masking as "+Ke+" "+be),Ke="IE",be="11.0",Be=["Trident"],we="Windows");we=we&&ne(we)}if(be&&(Ye=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(be)||/(?:alpha|beta)(?: ?\d)?/i.exec(je+";"+(Ae&&We.appMinorVersion))||/\bMinefield\b/i.test(je)&&"a")&&(He=/b/i.test(Ye)?"beta":"alpha",be=be.replace(RegExp(Ye+"\\+?$"),"")+(He=="beta"?Rt:ct)+(/\d+\+?/.exec(Ye)||"")),Ke=="Fennec"||Ke=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(we))Ke="Firefox Mobile";else if(Ke=="Maxthon"&&be)be=be.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ne))Ne=="Xbox 360"&&(we=null),Ne=="Xbox 360"&&/\bIEMobile\b/.test(je)&&bt.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ke)&&(!Ke||Ne||/Browser|Mobi/.test(Ke))||we!="Windows CE"&&!/Mobi/i.test(je))if(Ke=="IE"&&Ae)try{Xe.external===null&&bt.unshift("platform preview")}catch(Ue){bt.unshift("embedded")}else(/\bBlackBerry\b/.test(Ne)||/\bBB10\b/.test(je))&&(Ye=(RegExp(Ne.replace(/ +/g," *")+"/([.\\d]+)","i").exec(je)||0)[1]||be)?(Ye=[Ye,/BB10/.test(je)],we=(Ye[1]?(Ne=null,De="BlackBerry"):"Device Software")+" "+Ye[0],be=null):this!=E&&Ne!="Wii"&&(Ae&&Mt||/Opera/.test(Ke)&&/\b(?:MSIE|Firefox)\b/i.test(je)||Ke=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(we)||Ke=="IE"&&(we&&!/^Win/.test(we)&&be>5.5||/\bWindows XP\b/.test(we)&&be>8||be==8&&!/\bTrident\b/.test(je)))&&!pe.test(Ye=oe.call(E,je.replace(pe,"")+";"))&&Ye.name&&(Ye="ing as "+Ye.name+((Ye=Ye.version)?" "+Ye:""),pe.test(Ke)?(/\bIE\b/.test(Ye)&&we=="Mac OS"&&(we=null),Ye="identify"+Ye):(Ye="mask"+Ye,Ke=xt?ne(xt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(Ye)&&(we=null),Ae||(be=null)),Be=["Presto"],bt.push(Ye));else Ke+=" Mobile";(Ye=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(je)||0)[1])&&(Ye=[parseFloat(Ye.replace(/\.(\d)$/,".0$1")),Ye],Ke=="Safari"&&Ye[1].slice(-1)=="+"?(Ke="WebKit Nightly",He="alpha",be=Ye[1].slice(0,-1)):be!=Ye[1]&&be!=(Ye[2]=(/\bSafari\/([\d.]+\+?)/i.exec(je)||0)[1])||(be=null),Ye[1]=(/\bChrome\/([\d.]+)/i.exec(je)||0)[1],Ye[0]==537.36&&Ye[2]==537.36&&parseFloat(Ye[1])>=28&&Be=="WebKit"&&(Be=["Blink"]),Ae&&(Ge||Ye[1])?(Be&&(Be[1]="like Chrome"),Ye=Ye[1]||(Ye=Ye[0],Ye<530?1:Ye<532?2:Ye<532.05?3:Ye<533?4:Ye<534.03?5:Ye<534.07?6:Ye<534.1?7:Ye<534.13?8:Ye<534.16?9:Ye<534.24?10:Ye<534.3?11:Ye<535.01?12:Ye<535.02?"13+":Ye<535.07?15:Ye<535.11?16:Ye<535.19?17:Ye<536.05?18:Ye<536.1?19:Ye<537.01?20:Ye<537.11?"21+":Ye<537.13?23:Ye<537.18?24:Ye<537.24?25:Ye<537.36?26:Be!="Blink"?"27":"28")):(Be&&(Be[1]="like Safari"),Ye=Ye[0],Ye=Ye<400?1:Ye<500?2:Ye<526?3:Ye<533?4:Ye<534?"4+":Ye<535?5:Ye<537?6:Ye<538?7:Ye<601?8:"8"),Be&&(Be[1]+=" "+(Ye+=typeof Ye=="number"?".x":/[.+]/.test(Ye)?"":"+")),Ke=="Safari"&&(!be||parseInt(be)>45)&&(be=Ye)),Ke=="Opera"&&(Ye=/\bzbov|zvav$/.exec(we))?(Ke+=" ",bt.unshift("desktop mode"),Ye=="zvav"?(Ke+="Mini",be=null):Ke+="Mobile",we=we.replace(RegExp(" *"+Ye+"$"),"")):Ke=="Safari"&&/\bChrome\b/.exec(Be&&Be[1])&&(bt.unshift("desktop mode"),Ke="Chrome Mobile",be=null,/\bOS X\b/.test(we)?(De="Apple",we="iOS 4.3+"):we=null),be&&be.indexOf(Ye=/[\d.]+$/.exec(we))==0&&je.indexOf("/"+Ye+"-")>-1&&(we=ae(we.replace(Ye,""))),Be&&!/\b(?:Avant|Nook)\b/.test(Ke)&&(/Browser|Lunascape|Maxthon/.test(Ke)||Ke!="Safari"&&/^iOS/.test(we)&&/\bSafari\b/.test(Be[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ke)&&Be[1])&&(Ye=Be[Be.length-1])&&bt.push(Ye),bt.length&&(bt=["("+bt.join("; ")+")"]),De&&Ne&&Ne.indexOf(De)<0&&bt.push("on "+De),Ne&&bt.push((/^on /.test(bt[bt.length-1])?"":"on ")+Ne),we&&(Ye=/ ([\d.+]+)$/.exec(we),ut=Ye&&we.charAt(we.length-Ye[0].length-1)=="/",we={architecture:32,family:Ye&&!ut?we.replace(Ye[0],""):we,version:Ye?Ye[1]:null,toString:function(){var Ue=this.version;return this.family+(Ue&&!ut?" "+Ue:"")+(this.architecture==64?" 64-bit":"")}}),(Ye=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(yt))&&!/\bi686\b/i.test(yt)?(we&&(we.architecture=64,we.family=we.family.replace(RegExp(" *"+Ye),"")),Ke&&(/\bWOW64\b/i.test(je)||Ae&&/\w(?:86|32)$/.test(We.cpuClass||We.platform)&&!/\bWin64; x64\b/i.test(je))&&bt.unshift("32-bit")):we&&/^OS X/.test(we.family)&&Ke=="Chrome"&&parseFloat(be)>=39&&(we.architecture=64),je||(je=null);var Le={};return Le.description=je,Le.layout=Be&&Be[0],Le.manufacturer=De,Le.name=Ke,Le.prerelease=He,Le.product=Ne,Le.ua=je,Le.version=Ke&&be,Le.os=we||{architecture:null,family:null,version:null,toString:function(){return"null"}},Le.parse=oe,Le.toString=Qe,Le.version&&bt.unshift(be),Le.name&&bt.unshift(Ke),we&&Ke&&(we!=String(we).split(" ")[0]||we!=Ke.split(" ")[0]&&!Ne)&&bt.push(Ne?"("+we+")":"on "+we),bt.length&&(Le.description=bt.join(" ")),Le}var ve={function:!0,object:!0},ye=ve[typeof window]&&window||this,me=ve[typeof ue]&&ue,ge=ve[typeof Ce]&&Ce&&!Ce.nodeType&&Ce,_e=me&&ge&&typeof se=="object"&&se;!_e||_e.global!==_e&&_e.window!==_e&&_e.self!==_e||(ye=_e);var he=Math.pow(2,53)-1,pe=/\bOpera/,ke=Object.prototype,Te=ke.hasOwnProperty,Ee=ke.toString,Oe=oe();typeof ce=="function"&&typeof ce.amd=="object"&&ce.amd?(ye.platform=Oe,ce(function(){return Oe})):me&&ge?E(Oe,function(je,Pe){me[Pe]=je}):ye.platform=Oe}).call(this)}).call(this,typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(ie,Ce,ue){(function(se){"use strict";function te(le,ee,ne,E){if(typeof le!="function")throw new TypeError('"callback" argument must be a function');var b,z,x=arguments.length;switch(x){case 0:case 1:return se.nextTick(le);case 2:return se.nextTick(function(){le.call(null,ee)});case 3:return se.nextTick(function(){le.call(null,ee,ne)});case 4:return se.nextTick(function(){le.call(null,ee,ne,E)});default:for(b=new Array(x-1),z=0;z<b.length;)b[z++]=arguments[z];return se.nextTick(function(){le.apply(null,b)})}}!se.version||se.version.indexOf("v0.")===0||se.version.indexOf("v1.")===0&&se.version.indexOf("v1.8.")!==0?Ce.exports={nextTick:te}:Ce.exports=se}).call(this,ie("_process"))},{_process:173}],173:[function(ie,Ce,ue){function se(){throw new Error("setTimeout has not been defined")}function te(){throw new Error("clearTimeout has not been defined")}function le(ge){if(x===setTimeout)return setTimeout(ge,0);if((x===se||!x)&&setTimeout)return x=setTimeout,setTimeout(ge,0);try{return x(ge,0)}catch(_e){try{return x.call(null,ge,0)}catch(he){return x.call(this,ge,0)}}}function ee(ge){if(re===clearTimeout)return clearTimeout(ge);if((re===te||!re)&&clearTimeout)return re=clearTimeout,clearTimeout(ge);try{return re(ge)}catch(_e){try{return re.call(null,ge)}catch(he){return re.call(this,ge)}}}function ne(){ye&&oe&&(ye=!1,oe.length?ve=oe.concat(ve):me=-1,ve.length&&E())}function E(){if(!ye){var ge=le(ne);ye=!0;for(var _e=ve.length;_e;){for(oe=ve,ve=[];++me<_e;)oe&&oe[me].run();me=-1,_e=ve.length}oe=null,ye=!1,ee(ge)}}function b(ge,_e){this.fun=ge,this.array=_e}function z(){}var x,re,ae=Ce.exports={};(function(){try{x=typeof setTimeout=="function"?setTimeout:se}catch(ge){x=se}try{re=typeof clearTimeout=="function"?clearTimeout:te}catch(ge){re=te}})();var oe,ve=[],ye=!1,me=-1;ae.nextTick=function(ge){var _e=new Array(arguments.length-1);if(arguments.length>1)for(var he=1;he<arguments.length;he++)_e[he-1]=arguments[he];ve.push(new b(ge,_e)),ve.length!==1||ye||le(E)},b.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(ge){return[]},ae.binding=function(ge){throw new Error("process.binding is not supported")},ae.cwd=function(){return"/"},ae.chdir=function(ge){throw new Error("process.chdir is not supported")},ae.umask=function(){return 0}},{}],174:[function(ie,Ce,ue){(function(se){(function(te){function le($e){throw new RangeError(ut[$e])}function ee($e,nt){for(var et=$e.length,pt=[];et--;)pt[et]=nt($e[et]);return pt}function ne($e,nt){var et=$e.split("@"),pt="";return et.length>1&&(pt=et[0]+"@",$e=et[1]),$e=$e.replace(Ye,"."),pt+ee($e.split("."),nt).join(".")}function E($e){for(var nt,et,pt=[],ct=0,Rt=$e.length;ct<Rt;)nt=$e.charCodeAt(ct++),nt>=55296&&nt<=56319&&ct<Rt?(et=$e.charCodeAt(ct++),(64512&et)==56320?pt.push(((1023&nt)<<10)+(1023&et)+65536):(pt.push(nt),ct--)):pt.push(nt);return pt}function b($e){return ee($e,function(nt){var et="";return nt>65535&&(nt-=65536,et+=Ve(nt>>>10&1023|55296),nt=56320|1023&nt),et+=Ve(nt)}).join("")}function z($e){return $e-48<10?$e-22:$e-65<26?$e-65:$e-97<26?$e-97:Te}function x($e,nt){return $e+22+75*($e<26)-((nt!=0)<<5)}function re($e,nt,et){var pt=0;for($e=et?ze($e/Pe):$e>>1,$e+=ze($e/nt);$e>Ge*Oe>>1;pt+=Te)$e=ze($e/Ge);return ze(pt+(Ge+1)*$e/($e+je))}function ae($e){var nt,et,pt,ct,Rt,dt,Mt,xt,yt,bt,He=[],Ae=$e.length,be=0,Be=Xe,Ke=Qe;for(et=$e.lastIndexOf(ot),et<0&&(et=0),pt=0;pt<et;++pt)$e.charCodeAt(pt)>=128&&le("not-basic"),He.push($e.charCodeAt(pt));for(ct=et>0?et+1:0;ct<Ae;){for(Rt=be,dt=1,Mt=Te;ct>=Ae&&le("invalid-input"),xt=z($e.charCodeAt(ct++)),(xt>=Te||xt>ze((ke-be)/dt))&&le("overflow"),be+=xt*dt,yt=Mt<=Ke?Ee:Mt>=Ke+Oe?Oe:Mt-Ke,!(xt<yt);Mt+=Te)bt=Te-yt,dt>ze(ke/bt)&&le("overflow"),dt*=bt;nt=He.length+1,Ke=re(be-Rt,nt,Rt==0),ze(be/nt)>ke-Be&&le("overflow"),Be+=ze(be/nt),be%=nt,He.splice(be++,0,Be)}return b(He)}function oe($e){var nt,et,pt,ct,Rt,dt,Mt,xt,yt,bt,He,Ae,be,Be,Ke,Ne=[];for($e=E($e),Ae=$e.length,nt=Xe,et=0,Rt=Qe,dt=0;dt<Ae;++dt)(He=$e[dt])<128&&Ne.push(Ve(He));for(pt=ct=Ne.length,ct&&Ne.push(ot);pt<Ae;){for(Mt=ke,dt=0;dt<Ae;++dt)(He=$e[dt])>=nt&&He<Mt&&(Mt=He);for(be=pt+1,Mt-nt>ze((ke-et)/be)&&le("overflow"),et+=(Mt-nt)*be,nt=Mt,dt=0;dt<Ae;++dt)if(He=$e[dt],He<nt&&++et>ke&&le("overflow"),He==nt){for(xt=et,yt=Te;bt=yt<=Rt?Ee:yt>=Rt+Oe?Oe:yt-Rt,!(xt<bt);yt+=Te)Ke=xt-bt,Be=Te-bt,Ne.push(Ve(x(bt+Ke%Be,0))),xt=ze(Ke/Be);Ne.push(Ve(x(xt,0))),Rt=re(et,be,pt==ct),et=0,++pt}++et,++nt}return Ne.join("")}function ve($e){return ne($e,function(nt){return We.test(nt)?ae(nt.slice(4).toLowerCase()):nt})}function ye($e){return ne($e,function(nt){return rt.test(nt)?"xn--"+oe(nt):nt})}var me=typeof ue=="object"&&ue&&!ue.nodeType&&ue,ge=typeof Ce=="object"&&Ce&&!Ce.nodeType&&Ce,_e=typeof se=="object"&&se;_e.global!==_e&&_e.window!==_e&&_e.self!==_e||(te=_e);var he,pe,ke=2147483647,Te=36,Ee=1,Oe=26,je=38,Pe=700,Qe=72,Xe=128,ot="-",We=/^xn--/,rt=/[^\x20-\x7E]/,Ye=/[\x2E\u3002\uFF0E\uFF61]/g,ut={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ge=Te-Ee,ze=Math.floor,Ve=String.fromCharCode;if(he={version:"1.4.1",ucs2:{decode:E,encode:b},decode:ae,encode:oe,toASCII:ye,toUnicode:ve},typeof ce=="function"&&typeof ce.amd=="object"&&ce.amd)ce("punycode",function(){return he});else if(me&&ge)if(Ce.exports==me)ge.exports=he;else for(pe in he)he.hasOwnProperty(pe)&&(me[pe]=he[pe]);else te.punycode=he})(this)}).call(this,typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(ie,Ce,ue){"use strict";function se(le,ee){return Object.prototype.hasOwnProperty.call(le,ee)}Ce.exports=function(le,ee,ne,E){ee=ee||"&",ne=ne||"=";var b={};if(typeof le!="string"||le.length===0)return b;var z=/\+/g;le=le.split(ee);var x=1e3;E&&typeof E.maxKeys=="number"&&(x=E.maxKeys);var re=le.length;x>0&&re>x&&(re=x);for(var ae=0;ae<re;++ae){var oe,ve,ye,me,ge=le[ae].replace(z,"%20"),_e=ge.indexOf(ne);_e>=0?(oe=ge.substr(0,_e),ve=ge.substr(_e+1)):(oe=ge,ve=""),ye=decodeURIComponent(oe),me=decodeURIComponent(ve),se(b,ye)?te(b[ye])?b[ye].push(me):b[ye]=[b[ye],me]:b[ye]=me}return b};var te=Array.isArray||function(le){return Object.prototype.toString.call(le)==="[object Array]"}},{}],176:[function(ie,Ce,ue){"use strict";function se(ne,E){if(ne.map)return ne.map(E);for(var b=[],z=0;z<ne.length;z++)b.push(E(ne[z],z));return b}var te=function(ne){switch(typeof ne){case"string":return ne;case"boolean":return ne?"true":"false";case"number":return isFinite(ne)?ne:"";default:return""}};Ce.exports=function(ne,E,b,z){return E=E||"&",b=b||"=",ne===null&&(ne=void 0),typeof ne=="object"?se(ee(ne),function(x){var re=encodeURIComponent(te(x))+b;return le(ne[x])?se(ne[x],function(ae){return re+encodeURIComponent(te(ae))}).join(E):re+encodeURIComponent(te(ne[x]))}).join(E):z?encodeURIComponent(te(z))+b+encodeURIComponent(te(ne)):""};var le=Array.isArray||function(ne){return Object.prototype.toString.call(ne)==="[object Array]"},ee=Object.keys||function(ne){var E=[];for(var b in ne)Object.prototype.hasOwnProperty.call(ne,b)&&E.push(b);return E}},{}],177:[function(ie,Ce,ue){"use strict";ue.decode=ue.parse=ie("./decode"),ue.encode=ue.stringify=ie("./encode")},{"./decode":175,"./encode":176}],178:[function(ie,Ce,ue){Ce.exports=ie("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(ie,Ce,ue){"use strict";function se(ye){if(!(this instanceof se))return new se(ye);x.call(this,ye),re.call(this,ye),ye&&ye.readable===!1&&(this.readable=!1),ye&&ye.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ye&&ye.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",te)}function te(){this.allowHalfOpen||this._writableState.ended||E.nextTick(le,this)}function le(ye){ye.end()}var ee=ie("babel-runtime/core-js/object/keys"),ne=function(ye){return ye&&ye.__esModule?ye:{default:ye}}(ee),E=ie("process-nextick-args"),b=ne.default||function(ye){var me=[];for(var ge in ye)me.push(ge);return me};Ce.exports=se;var z=ie("core-util-is");z.inherits=ie("inherits");var x=ie("./_stream_readable"),re=ie("./_stream_writable");z.inherits(se,x);for(var ae=b(re.prototype),oe=0;oe<ae.length;oe++){var ve=ae[oe];se.prototype[ve]||(se.prototype[ve]=re.prototype[ve])}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(ye){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=ye,this._writableState.destroyed=ye)}}),se.prototype._destroy=function(ye,me){this.push(null),this.end(),E.nextTick(me,ye)}},{"./_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,Ce,ue){"use strict";function se(ee){if(!(this instanceof se))return new se(ee);te.call(this,ee)}Ce.exports=se;var te=ie("./_stream_transform"),le=ie("core-util-is");le.inherits=ie("inherits"),le.inherits(se,te),se.prototype._transform=function(ee,ne,E){E(null,ee)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(ie,Ce,ue){(function(se,te){"use strict";function le(Ae){return et.from(Ae)}function ee(Ae){return et.isBuffer(Ae)||Ae instanceof pt}function ne(Ae,be,Be){if(typeof Ae.prependListener=="function")return Ae.prependListener(be,Be);Ae._events&&Ae._events[be]?Ve(Ae._events[be])?Ae._events[be].unshift(Be):Ae._events[be]=[Be,Ae._events[be]]:Ae.on(be,Be)}function E(Ae,be){ze=ze||ie("./_stream_duplex"),Ae=Ae||{};var Be=be instanceof ze;this.objectMode=!!Ae.objectMode,Be&&(this.objectMode=this.objectMode||!!Ae.readableObjectMode);var Ke=Ae.highWaterMark,Ne=Ae.readableHighWaterMark,De=this.objectMode?16:16384;this.highWaterMark=Ke||Ke===0?Ke:Be&&(Ne||Ne===0)?Ne:De,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new xt,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=Ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ae.encoding&&(Mt||(Mt=ie("string_decoder/").StringDecoder),this.decoder=new Mt(Ae.encoding),this.encoding=Ae.encoding)}function b(Ae){if(ze=ze||ie("./_stream_duplex"),!(this instanceof b))return new b(Ae);this._readableState=new E(Ae,this),this.readable=!0,Ae&&(typeof Ae.read=="function"&&(this._read=Ae.read),typeof Ae.destroy=="function"&&(this._destroy=Ae.destroy)),nt.call(this)}function z(Ae,be,Be,Ke,Ne){var De=Ae._readableState;if(be===null)De.reading=!1,ye(Ae,De);else{var we;Ne||(we=re(De,be)),we?Ae.emit("error",we):De.objectMode||be&&be.length>0?(typeof be=="string"||De.objectMode||(0,ut.default)(be)===et.prototype||(be=le(be)),Ke?De.endEmitted?Ae.emit("error",new Error("stream.unshift() after end event")):x(Ae,De,be,!0):De.ended?Ae.emit("error",new Error("stream.push() after EOF")):(De.reading=!1,De.decoder&&!Be?(be=De.decoder.write(be),De.objectMode||be.length!==0?x(Ae,De,be,!1):_e(Ae,De)):x(Ae,De,be,!1))):Ke||(De.reading=!1)}return ae(De)}function x(Ae,be,Be,Ke){be.flowing&&be.length===0&&!be.sync?(Ae.emit("data",Be),Ae.read(0)):(be.length+=be.objectMode?1:Be.length,Ke?be.buffer.unshift(Be):be.buffer.push(Be),be.needReadable&&me(Ae)),_e(Ae,be)}function re(Ae,be){var Be;return ee(be)||typeof be=="string"||be===void 0||Ae.objectMode||(Be=new TypeError("Invalid non-string/buffer chunk")),Be}function ae(Ae){return!Ae.ended&&(Ae.needReadable||Ae.length<Ae.highWaterMark||Ae.length===0)}function oe(Ae){return Ae>=He?Ae=He:(Ae--,Ae|=Ae>>>1,Ae|=Ae>>>2,Ae|=Ae>>>4,Ae|=Ae>>>8,Ae|=Ae>>>16,Ae++),Ae}function ve(Ae,be){return Ae<=0||be.length===0&&be.ended?0:be.objectMode?1:Ae!==Ae?be.flowing&&be.length?be.buffer.head.data.length:be.length:(Ae>be.highWaterMark&&(be.highWaterMark=oe(Ae)),Ae<=be.length?Ae:be.ended?be.length:(be.needReadable=!0,0))}function ye(Ae,be){if(!be.ended){if(be.decoder){var Be=be.decoder.end();Be&&Be.length&&(be.buffer.push(Be),be.length+=be.objectMode?1:Be.length)}be.ended=!0,me(Ae)}}function me(Ae){var be=Ae._readableState;be.needReadable=!1,be.emittedReadable||(dt("emitReadable",be.flowing),be.emittedReadable=!0,be.sync?Ge.nextTick(ge,Ae):ge(Ae))}function ge(Ae){dt("emit readable"),Ae.emit("readable"),Oe(Ae)}function _e(Ae,be){be.readingMore||(be.readingMore=!0,Ge.nextTick(he,Ae,be))}function he(Ae,be){for(var Be=be.length;!be.reading&&!be.flowing&&!be.ended&&be.length<be.highWaterMark&&(dt("maybeReadMore read 0"),Ae.read(0),Be!==be.length);)Be=be.length;be.readingMore=!1}function pe(Ae){return function(){var be=Ae._readableState;dt("pipeOnDrain",be.awaitDrain),be.awaitDrain&&be.awaitDrain--,be.awaitDrain===0&&$e(Ae,"data")&&(be.flowing=!0,Oe(Ae))}}function ke(Ae){dt("readable nexttick read 0"),Ae.read(0)}function Te(Ae,be){be.resumeScheduled||(be.resumeScheduled=!0,Ge.nextTick(Ee,Ae,be))}function Ee(Ae,be){be.reading||(dt("resume read 0"),Ae.read(0)),be.resumeScheduled=!1,be.awaitDrain=0,Ae.emit("resume"),Oe(Ae),be.flowing&&!be.reading&&Ae.read(0)}function Oe(Ae){var be=Ae._readableState;for(dt("flow",be.flowing);be.flowing&&Ae.read()!==null;);}function je(Ae,be){if(be.length===0)return null;var Be;return be.objectMode?Be=be.buffer.shift():!Ae||Ae>=be.length?(Be=be.decoder?be.buffer.join(""):be.buffer.length===1?be.buffer.head.data:be.buffer.concat(be.length),be.buffer.clear()):Be=Pe(Ae,be.buffer,be.decoder),Be}function Pe(Ae,be,Be){var Ke;return Ae<be.head.data.length?(Ke=be.head.data.slice(0,Ae),be.head.data=be.head.data.slice(Ae)):Ke=Ae===be.head.data.length?be.shift():Be?Qe(Ae,be):Xe(Ae,be),Ke}function Qe(Ae,be){var Be=be.head,Ke=1,Ne=Be.data;for(Ae-=Ne.length;Be=Be.next;){var De=Be.data,we=Ae>De.length?De.length:Ae;if(we===De.length?Ne+=De:Ne+=De.slice(0,Ae),(Ae-=we)===0){we===De.length?(++Ke,Be.next?be.head=Be.next:be.head=be.tail=null):(be.head=Be,Be.data=De.slice(we));break}++Ke}return be.length-=Ke,Ne}function Xe(Ae,be){var Be=et.allocUnsafe(Ae),Ke=be.head,Ne=1;for(Ke.data.copy(Be),Ae-=Ke.data.length;Ke=Ke.next;){var De=Ke.data,we=Ae>De.length?De.length:Ae;if(De.copy(Be,Be.length-Ae,0,we),(Ae-=we)===0){we===De.length?(++Ne,Ke.next?be.head=Ke.next:be.head=be.tail=null):(be.head=Ke,Ke.data=De.slice(we));break}++Ne}return be.length-=Ne,Be}function ot(Ae){var be=Ae._readableState;if(be.length>0)throw new Error('"endReadable()" called on non-empty stream');be.endEmitted||(be.ended=!0,Ge.nextTick(We,be,Ae))}function We(Ae,be){Ae.endEmitted||Ae.length!==0||(Ae.endEmitted=!0,be.readable=!1,be.emit("end"))}function rt(Ae,be){for(var Be=0,Ke=Ae.length;Be<Ke;Be++)if(Ae[Be]===be)return Be;return-1}var Ye=ie("babel-runtime/core-js/object/get-prototype-of"),ut=function(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}(Ye),Ge=ie("process-nextick-args");Ce.exports=b;var ze,Ve=ie("isarray");b.ReadableState=E;var $e=(ie("events").EventEmitter,function(Ae,be){return Ae.listeners(be).length}),nt=ie("./internal/streams/stream"),et=ie("safe-buffer").Buffer,pt=te.Uint8Array||function(){},ct=ie("core-util-is");ct.inherits=ie("inherits");var Rt=ie("util"),dt=void 0;dt=Rt&&Rt.debuglog?Rt.debuglog("stream"):function(){};var Mt,xt=ie("./internal/streams/BufferList"),yt=ie("./internal/streams/destroy");ct.inherits(b,nt);var bt=["error","close","destroy","pause","resume"];Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Ae){this._readableState&&(this._readableState.destroyed=Ae)}}),b.prototype.destroy=yt.destroy,b.prototype._undestroy=yt.undestroy,b.prototype._destroy=function(Ae,be){this.push(null),be(Ae)},b.prototype.push=function(Ae,be){var Be,Ke=this._readableState;return Ke.objectMode?Be=!0:typeof Ae=="string"&&(be=be||Ke.defaultEncoding,be!==Ke.encoding&&(Ae=et.from(Ae,be),be=""),Be=!0),z(this,Ae,be,!1,Be)},b.prototype.unshift=function(Ae){return z(this,Ae,null,!0,!1)},b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(Ae){return Mt||(Mt=ie("string_decoder/").StringDecoder),this._readableState.decoder=new Mt(Ae),this._readableState.encoding=Ae,this};var He=8388608;b.prototype.read=function(Ae){dt("read",Ae),Ae=parseInt(Ae,10);var be=this._readableState,Be=Ae;if(Ae!==0&&(be.emittedReadable=!1),Ae===0&&be.needReadable&&(be.length>=be.highWaterMark||be.ended))return dt("read: emitReadable",be.length,be.ended),be.length===0&&be.ended?ot(this):me(this),null;if((Ae=ve(Ae,be))===0&&be.ended)return be.length===0&&ot(this),null;var Ke=be.needReadable;dt("need readable",Ke),(be.length===0||be.length-Ae<be.highWaterMark)&&(Ke=!0,dt("length less than watermark",Ke)),be.ended||be.reading?(Ke=!1,dt("reading or ended",Ke)):Ke&&(dt("do read"),be.reading=!0,be.sync=!0,be.length===0&&(be.needReadable=!0),this._read(be.highWaterMark),be.sync=!1,be.reading||(Ae=ve(Be,be)));var Ne;return Ne=Ae>0?je(Ae,be):null,Ne===null?(be.needReadable=!0,Ae=0):be.length-=Ae,be.length===0&&(be.ended||(be.needReadable=!0),Be!==Ae&&be.ended&&ot(this)),Ne!==null&&this.emit("data",Ne),Ne},b.prototype._read=function(Ae){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(Ae,be){function Be(Zt,Ut){dt("onunpipe"),Zt===Re&&Ut&&Ut.hasUnpiped===!1&&(Ut.hasUnpiped=!0,Ne())}function Ke(){dt("onend"),Ae.end()}function Ne(){dt("cleanup"),Ae.removeListener("close",Le),Ae.removeListener("finish",Ue),Ae.removeListener("drain",Ct),Ae.removeListener("error",we),Ae.removeListener("unpipe",Be),Re.removeListener("end",Ke),Re.removeListener("end",Me),Re.removeListener("data",De),vt=!0,!tt.awaitDrain||Ae._writableState&&!Ae._writableState.needDrain||Ct()}function De(Zt){dt("ondata"),Ot=!1,Ae.write(Zt)!==!1||Ot||((tt.pipesCount===1&&tt.pipes===Ae||tt.pipesCount>1&&rt(tt.pipes,Ae)!==-1)&&!vt&&(dt("false write response, pause",Re._readableState.awaitDrain),Re._readableState.awaitDrain++,Ot=!0),Re.pause())}function we(Zt){dt("onerror",Zt),Me(),Ae.removeListener("error",we),$e(Ae,"error")===0&&Ae.emit("error",Zt)}function Le(){Ae.removeListener("finish",Ue),Me()}function Ue(){dt("onfinish"),Ae.removeListener("close",Le),Me()}function Me(){dt("unpipe"),Re.unpipe(Ae)}var Re=this,tt=this._readableState;switch(tt.pipesCount){case 0:tt.pipes=Ae;break;case 1:tt.pipes=[tt.pipes,Ae];break;default:tt.pipes.push(Ae)}tt.pipesCount+=1,dt("pipe count=%d opts=%j",tt.pipesCount,be);var lt=(!be||be.end!==!1)&&Ae!==se.stdout&&Ae!==se.stderr,Pt=lt?Ke:Me;tt.endEmitted?Ge.nextTick(Pt):Re.once("end",Pt),Ae.on("unpipe",Be);var Ct=pe(Re);Ae.on("drain",Ct);var vt=!1,Ot=!1;return Re.on("data",De),ne(Ae,"error",we),Ae.once("close",Le),Ae.once("finish",Ue),Ae.emit("pipe",Re),tt.flowing||(dt("pipe resume"),Re.resume()),Ae},b.prototype.unpipe=function(Ae){var be=this._readableState,Be={hasUnpiped:!1};if(be.pipesCount===0)return this;if(be.pipesCount===1)return Ae&&Ae!==be.pipes?this:(Ae||(Ae=be.pipes),be.pipes=null,be.pipesCount=0,be.flowing=!1,Ae&&Ae.emit("unpipe",this,Be),this);if(!Ae){var Ke=be.pipes,Ne=be.pipesCount;be.pipes=null,be.pipesCount=0,be.flowing=!1;for(var De=0;De<Ne;De++)Ke[De].emit("unpipe",this,Be);return this}var we=rt(be.pipes,Ae);return we===-1?this:(be.pipes.splice(we,1),be.pipesCount-=1,be.pipesCount===1&&(be.pipes=be.pipes[0]),Ae.emit("unpipe",this,Be),this)},b.prototype.on=function(Ae,be){var Be=nt.prototype.on.call(this,Ae,be);if(Ae==="data")this._readableState.flowing!==!1&&this.resume();else if(Ae==="readable"){var Ke=this._readableState;Ke.endEmitted||Ke.readableListening||(Ke.readableListening=Ke.needReadable=!0,Ke.emittedReadable=!1,Ke.reading?Ke.length&&me(this):Ge.nextTick(ke,this))}return Be},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var Ae=this._readableState;return Ae.flowing||(dt("resume"),Ae.flowing=!0,Te(this,Ae)),this},b.prototype.pause=function(){return dt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(dt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(Ae){var be=this,Be=this._readableState,Ke=!1;Ae.on("end",function(){if(dt("wrapped end"),Be.decoder&&!Be.ended){var we=Be.decoder.end();we&&we.length&&be.push(we)}be.push(null)}),Ae.on("data",function(we){dt("wrapped data"),Be.decoder&&(we=Be.decoder.write(we)),(!Be.objectMode||we!=null)&&(Be.objectMode||we&&we.length)&&(be.push(we)||(Ke=!0,Ae.pause()))});for(var Ne in Ae)this[Ne]===void 0&&typeof Ae[Ne]=="function"&&(this[Ne]=function(we){return function(){return Ae[we].apply(Ae,arguments)}}(Ne));for(var De=0;De<bt.length;De++)Ae.on(bt[De],this.emit.bind(this,bt[De]));return this._read=function(we){dt("wrapped _read",we),Ke&&(Ke=!1,Ae.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=je}).call(this,ie("_process"),typeof Se.g!="undefined"?Se.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,Ce,ue){"use strict";function se(b,z){var x=this._transformState;x.transforming=!1;var re=x.writecb;if(!re)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,z!=null&&this.push(z),re(b);var ae=this._readableState;ae.reading=!1,(ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}function te(b){if(!(this instanceof te))return new te(b);ne.call(this,b),this._transformState={afterTransform:se.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,b&&(typeof b.transform=="function"&&(this._transform=b.transform),typeof b.flush=="function"&&(this._flush=b.flush)),this.on("prefinish",le)}function le(){var b=this;typeof this._flush=="function"?this._flush(function(z,x){ee(b,z,x)}):ee(this,null,null)}function ee(b,z,x){if(z)return b.emit("error",z);if(x!=null&&b.push(x),b._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(b._transformState.transforming)throw new Error("Calling transform done when still transforming");return b.push(null)}Ce.exports=te;var ne=ie("./_stream_duplex"),E=ie("core-util-is");E.inherits=ie("inherits"),E.inherits(te,ne),te.prototype.push=function(b,z){return this._transformState.needTransform=!1,ne.prototype.push.call(this,b,z)},te.prototype._transform=function(b,z,x){throw new Error("_transform() is not implemented")},te.prototype._write=function(b,z,x){var re=this._transformState;if(re.writecb=x,re.writechunk=b,re.writeencoding=z,!re.transforming){var ae=this._readableState;(re.needTransform||ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}},te.prototype._read=function(b){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},te.prototype._destroy=function(b,z){var x=this;ne.prototype._destroy.call(this,b,function(re){z(re),x.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(ie,Ce,ue){(function(se,te){"use strict";function le(yt){return yt&&yt.__esModule?yt:{default:yt}}function ee(yt){var bt=this;this.next=null,this.entry=null,this.finish=function(){Qe(bt,yt)}}function ne(yt){return Rt.from(yt)}function E(yt){return Rt.isBuffer(yt)||yt instanceof dt}function b(){}function z(yt,bt){$e=$e||ie("./_stream_duplex"),yt=yt||{};var He=bt instanceof $e;this.objectMode=!!yt.objectMode,He&&(this.objectMode=this.objectMode||!!yt.writableObjectMode);var Ae=yt.highWaterMark,be=yt.writableHighWaterMark,Be=this.objectMode?16:16384;this.highWaterMark=Ae||Ae===0?Ae:He&&(be||be===0)?be:Be,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 Ke=yt.decodeStrings===!1;this.decodeStrings=!Ke,this.defaultEncoding=yt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ne){_e(bt,Ne)},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(yt){if($e=$e||ie("./_stream_duplex"),!(xt.call(x,this)||this instanceof $e))return new x(yt);this._writableState=new z(yt,this),this.writable=!0,yt&&(typeof yt.write=="function"&&(this._write=yt.write),typeof yt.writev=="function"&&(this._writev=yt.writev),typeof yt.destroy=="function"&&(this._destroy=yt.destroy),typeof yt.final=="function"&&(this._final=yt.final)),ct.call(this)}function re(yt,bt){var He=new Error("write after end");yt.emit("error",He),Ve.nextTick(bt,He)}function ae(yt,bt,He,Ae){var be=!0,Be=!1;return He===null?Be=new TypeError("May not write null values to stream"):typeof He=="string"||He===void 0||bt.objectMode||(Be=new TypeError("Invalid non-string/buffer chunk")),Be&&(yt.emit("error",Be),Ve.nextTick(Ae,Be),be=!1),be}function oe(yt,bt,He){return yt.objectMode||yt.decodeStrings===!1||typeof bt!="string"||(bt=Rt.from(bt,He)),bt}function ve(yt,bt,He,Ae,be,Be){if(!He){var Ke=oe(bt,Ae,be);Ae!==Ke&&(He=!0,be="buffer",Ae=Ke)}var Ne=bt.objectMode?1:Ae.length;bt.length+=Ne;var De=bt.length<bt.highWaterMark;if(De||(bt.needDrain=!0),bt.writing||bt.corked){var we=bt.lastBufferedRequest;bt.lastBufferedRequest={chunk:Ae,encoding:be,isBuf:He,callback:Be,next:null},we?we.next=bt.lastBufferedRequest:bt.bufferedRequest=bt.lastBufferedRequest,bt.bufferedRequestCount+=1}else ye(yt,bt,!1,Ne,Ae,be,Be);return De}function ye(yt,bt,He,Ae,be,Be,Ke){bt.writelen=Ae,bt.writecb=Ke,bt.writing=!0,bt.sync=!0,He?yt._writev(be,bt.onwrite):yt._write(be,Be,bt.onwrite),bt.sync=!1}function me(yt,bt,He,Ae,be){--bt.pendingcb,He?(Ve.nextTick(be,Ae),Ve.nextTick(je,yt,bt),yt._writableState.errorEmitted=!0,yt.emit("error",Ae)):(be(Ae),yt._writableState.errorEmitted=!0,yt.emit("error",Ae),je(yt,bt))}function ge(yt){yt.writing=!1,yt.writecb=null,yt.length-=yt.writelen,yt.writelen=0}function _e(yt,bt){var He=yt._writableState,Ae=He.sync,be=He.writecb;if(ge(He),bt)me(yt,He,Ae,bt,be);else{var Be=Te(He);Be||He.corked||He.bufferProcessing||!He.bufferedRequest||ke(yt,He),Ae?nt(he,yt,He,Be,be):he(yt,He,Be,be)}}function he(yt,bt,He,Ae){He||pe(yt,bt),bt.pendingcb--,Ae(),je(yt,bt)}function pe(yt,bt){bt.length===0&&bt.needDrain&&(bt.needDrain=!1,yt.emit("drain"))}function ke(yt,bt){bt.bufferProcessing=!0;var He=bt.bufferedRequest;if(yt._writev&&He&&He.next){var Ae=bt.bufferedRequestCount,be=new Array(Ae),Be=bt.corkedRequestsFree;Be.entry=He;for(var Ke=0,Ne=!0;He;)be[Ke]=He,He.isBuf||(Ne=!1),He=He.next,Ke+=1;be.allBuffers=Ne,ye(yt,bt,!0,bt.length,be,"",Be.finish),bt.pendingcb++,bt.lastBufferedRequest=null,Be.next?(bt.corkedRequestsFree=Be.next,Be.next=null):bt.corkedRequestsFree=new ee(bt),bt.bufferedRequestCount=0}else{for(;He;){var De=He.chunk,we=He.encoding,Le=He.callback;if(ye(yt,bt,!1,bt.objectMode?1:De.length,De,we,Le),He=He.next,bt.bufferedRequestCount--,bt.writing)break}He===null&&(bt.lastBufferedRequest=null)}bt.bufferedRequest=He,bt.bufferProcessing=!1}function Te(yt){return yt.ending&&yt.length===0&&yt.bufferedRequest===null&&!yt.finished&&!yt.writing}function Ee(yt,bt){yt._final(function(He){bt.pendingcb--,He&&yt.emit("error",He),bt.prefinished=!0,yt.emit("prefinish"),je(yt,bt)})}function Oe(yt,bt){bt.prefinished||bt.finalCalled||(typeof yt._final=="function"?(bt.pendingcb++,bt.finalCalled=!0,Ve.nextTick(Ee,yt,bt)):(bt.prefinished=!0,yt.emit("prefinish")))}function je(yt,bt){var He=Te(bt);return He&&(Oe(yt,bt),bt.pendingcb===0&&(bt.finished=!0,yt.emit("finish"))),He}function Pe(yt,bt,He){bt.ending=!0,je(yt,bt),He&&(bt.finished?Ve.nextTick(He):yt.once("finish",He)),bt.ended=!0,yt.writable=!1}function Qe(yt,bt,He){var Ae=yt.entry;for(yt.entry=null;Ae;){var be=Ae.callback;bt.pendingcb--,be(He),Ae=Ae.next}bt.corkedRequestsFree?bt.corkedRequestsFree.next=yt:bt.corkedRequestsFree=yt}var Xe=ie("babel-runtime/core-js/object/define-property"),ot=le(Xe),We=ie("babel-runtime/core-js/symbol/has-instance"),rt=le(We),Ye=ie("babel-runtime/core-js/symbol"),ut=le(Ye),Ge=ie("babel-runtime/core-js/set-immediate"),ze=le(Ge),Ve=ie("process-nextick-args");Ce.exports=x;var $e,nt=!se.browser&&["v0.10","v0.9."].indexOf(se.version.slice(0,5))>-1?ze.default:Ve.nextTick;x.WritableState=z;var et=ie("core-util-is");et.inherits=ie("inherits");var pt={deprecate:ie("util-deprecate")},ct=ie("./internal/streams/stream"),Rt=ie("safe-buffer").Buffer,dt=te.Uint8Array||function(){},Mt=ie("./internal/streams/destroy");et.inherits(x,ct),z.prototype.getBuffer=function(){for(var yt=this.bufferedRequest,bt=[];yt;)bt.push(yt),yt=yt.next;return bt},function(){try{Object.defineProperty(z.prototype,"buffer",{get:pt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(yt){}}();var xt;typeof ut.default=="function"&&rt.default&&typeof Function.prototype[rt.default]=="function"?(xt=Function.prototype[rt.default],(0,ot.default)(x,rt.default,{value:function(yt){return!!xt.call(this,yt)||this===x&&yt&&yt._writableState instanceof z}})):xt=function(yt){return yt instanceof this},x.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},x.prototype.write=function(yt,bt,He){var Ae=this._writableState,be=!1,Be=!Ae.objectMode&&E(yt);return Be&&!Rt.isBuffer(yt)&&(yt=ne(yt)),typeof bt=="function"&&(He=bt,bt=null),Be?bt="buffer":bt||(bt=Ae.defaultEncoding),typeof He!="function"&&(He=b),Ae.ended?re(this,He):(Be||ae(this,Ae,yt,He))&&(Ae.pendingcb++,be=ve(this,Ae,Be,yt,bt,He)),be},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var yt=this._writableState;yt.corked&&(yt.corked--,yt.writing||yt.corked||yt.finished||yt.bufferProcessing||!yt.bufferedRequest||ke(this,yt))},x.prototype.setDefaultEncoding=function(yt){if(typeof yt=="string"&&(yt=yt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((yt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+yt);return this._writableState.defaultEncoding=yt,this},Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(yt,bt,He){He(new Error("_write() is not implemented"))},x.prototype._writev=null,x.prototype.end=function(yt,bt,He){var Ae=this._writableState;typeof yt=="function"?(He=yt,yt=null,bt=null):typeof bt=="function"&&(He=bt,bt=null),yt!=null&&this.write(yt,bt),Ae.corked&&(Ae.corked=1,this.uncork()),Ae.ending||Ae.finished||Pe(this,Ae,He)},Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(yt){this._writableState&&(this._writableState.destroyed=yt)}}),x.prototype.destroy=Mt.destroy,x.prototype._undestroy=Mt.undestroy,x.prototype._destroy=function(yt,bt){this.end(),bt(yt)}}).call(this,ie("_process"),typeof Se.g!="undefined"?Se.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,Ce,ue){"use strict";function se(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}function te(ne,E,b){ne.copy(E,b)}var le=ie("safe-buffer").Buffer,ee=ie("util");Ce.exports=function(){function ne(){se(this,ne),this.head=null,this.tail=null,this.length=0}return ne.prototype.push=function(E){var b={data:E,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},ne.prototype.unshift=function(E){var b={data:E,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},ne.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}},ne.prototype.clear=function(){this.head=this.tail=null,this.length=0},ne.prototype.join=function(E){if(this.length===0)return"";for(var b=this.head,z=""+b.data;b=b.next;)z+=E+b.data;return z},ne.prototype.concat=function(E){if(this.length===0)return le.alloc(0);if(this.length===1)return this.head.data;for(var b=le.allocUnsafe(E>>>0),z=this.head,x=0;z;)te(z.data,b,x),x+=z.data.length,z=z.next;return b},ne}(),ee&&ee.inspect&&ee.inspect.custom&&(Ce.exports.prototype[ee.inspect.custom]=function(){var ne=ee.inspect({length:this.length});return this.constructor.name+" "+ne})},{"safe-buffer":193,util:36}],185:[function(ie,Ce,ue){"use strict";function se(ne,E){var b=this,z=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;return z||x?(E?E(ne):!ne||this._writableState&&this._writableState.errorEmitted||ee.nextTick(le,this,ne),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ne||null,function(re){!E&&re?(ee.nextTick(le,b,re),b._writableState&&(b._writableState.errorEmitted=!0)):E&&E(re)}),this)}function te(){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 le(ne,E){ne.emit("error",E)}var ee=ie("process-nextick-args");Ce.exports={destroy:se,undestroy:te}},{"process-nextick-args":172}],186:[function(ie,Ce,ue){"use strict";Ce.exports=ie("events").EventEmitter},{events:158}],187:[function(ie,Ce,ue){Ce.exports=ie("./readable").PassThrough},{"./readable":188}],188:[function(ie,Ce,ue){ue=Ce.exports=ie("./lib/_stream_readable.js"),ue.Stream=ue,ue.Readable=ue,ue.Writable=ie("./lib/_stream_writable.js"),ue.Duplex=ie("./lib/_stream_duplex.js"),ue.Transform=ie("./lib/_stream_transform.js"),ue.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,Ce,ue){Ce.exports=ie("./readable").Transform},{"./readable":188}],190:[function(ie,Ce,ue){Ce.exports=ie("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(ie,Ce,ue){var se=function(){return this}()||Function("return this")(),te=se.regeneratorRuntime&&Object.getOwnPropertyNames(se).indexOf("regeneratorRuntime")>=0,le=te&&se.regeneratorRuntime;if(se.regeneratorRuntime=void 0,Ce.exports=ie("./runtime"),te)se.regeneratorRuntime=le;else try{delete se.regeneratorRuntime}catch(ee){se.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(ie,Ce,ue){(function(se){"use strict";function te(ze,Ve,$e,nt){var et=Ve&&Ve.prototype instanceof ee?Ve:ee,pt=Object.create(et.prototype),ct=new ve(nt||[]);return pt._invoke=x(ze,$e,ct),pt}function le(ze,Ve,$e){try{return{type:"normal",arg:ze.call(Ve,$e)}}catch(nt){return{type:"throw",arg:nt}}}function ee(){}function ne(){}function E(){}function b(ze){["next","throw","return"].forEach(function(Ve){ze[Ve]=function($e){return this._invoke(Ve,$e)}})}function z(ze){function Ve(et,pt,ct,Rt){var dt=le(ze[et],ze,pt);if(dt.type!=="throw"){var Mt=dt.arg,xt=Mt.value;return xt&&typeof xt=="object"&&he.call(xt,"__await")?Promise.resolve(xt.__await).then(function(yt){Ve("next",yt,ct,Rt)},function(yt){Ve("throw",yt,ct,Rt)}):Promise.resolve(xt).then(function(yt){Mt.value=yt,ct(Mt)},Rt)}Rt(dt.arg)}function $e(et,pt){function ct(){return new Promise(function(Rt,dt){Ve(et,pt,Rt,dt)})}return nt=nt?nt.then(ct,ct):ct()}var nt;this._invoke=$e}function x(ze,Ve,$e){var nt=Pe;return function(et,pt){if(nt===Xe)throw new Error("Generator is already running");if(nt===ot){if(et==="throw")throw pt;return me()}for($e.method=et,$e.arg=pt;;){var ct=$e.delegate;if(ct){var Rt=re(ct,$e);if(Rt){if(Rt===We)continue;return Rt}}if($e.method==="next")$e.sent=$e._sent=$e.arg;else if($e.method==="throw"){if(nt===Pe)throw nt=ot,$e.arg;$e.dispatchException($e.arg)}else $e.method==="return"&&$e.abrupt("return",$e.arg);nt=Xe;var dt=le(ze,Ve,$e);if(dt.type==="normal"){if(nt=$e.done?ot:Qe,dt.arg===We)continue;return{value:dt.arg,done:$e.done}}dt.type==="throw"&&(nt=ot,$e.method="throw",$e.arg=dt.arg)}}}function re(ze,Ve){var $e=ze.iterator[Ve.method];if($e===ge){if(Ve.delegate=null,Ve.method==="throw"){if(ze.iterator.return&&(Ve.method="return",Ve.arg=ge,re(ze,Ve),Ve.method==="throw"))return We;Ve.method="throw",Ve.arg=new TypeError("The iterator does not provide a 'throw' method")}return We}var nt=le($e,ze.iterator,Ve.arg);if(nt.type==="throw")return Ve.method="throw",Ve.arg=nt.arg,Ve.delegate=null,We;var et=nt.arg;return et?et.done?(Ve[ze.resultName]=et.value,Ve.next=ze.nextLoc,Ve.method!=="return"&&(Ve.method="next",Ve.arg=ge),Ve.delegate=null,We):et:(Ve.method="throw",Ve.arg=new TypeError("iterator result is not an object"),Ve.delegate=null,We)}function ae(ze){var Ve={tryLoc:ze[0]};1 in ze&&(Ve.catchLoc=ze[1]),2 in ze&&(Ve.finallyLoc=ze[2],Ve.afterLoc=ze[3]),this.tryEntries.push(Ve)}function oe(ze){var Ve=ze.completion||{};Ve.type="normal",delete Ve.arg,ze.completion=Ve}function ve(ze){this.tryEntries=[{tryLoc:"root"}],ze.forEach(ae,this),this.reset(!0)}function ye(ze){if(ze){var Ve=ze[ke];if(Ve)return Ve.call(ze);if(typeof ze.next=="function")return ze;if(!isNaN(ze.length)){var $e=-1,nt=function et(){for(;++$e<ze.length;)if(he.call(ze,$e))return et.value=ze[$e],et.done=!1,et;return et.value=ge,et.done=!0,et};return nt.next=nt}}return{next:me}}function me(){return{value:ge,done:!0}}var ge,_e=Object.prototype,he=_e.hasOwnProperty,pe=typeof Symbol=="function"?Symbol:{},ke=pe.iterator||"@@iterator",Te=pe.asyncIterator||"@@asyncIterator",Ee=pe.toStringTag||"@@toStringTag",Oe=typeof Ce=="object",je=se.regeneratorRuntime;if(je)return void(Oe&&(Ce.exports=je));je=se.regeneratorRuntime=Oe?Ce.exports:{},je.wrap=te;var Pe="suspendedStart",Qe="suspendedYield",Xe="executing",ot="completed",We={},rt={};rt[ke]=function(){return this};var Ye=Object.getPrototypeOf,ut=Ye&&Ye(Ye(ye([])));ut&&ut!==_e&&he.call(ut,ke)&&(rt=ut);var Ge=E.prototype=ee.prototype=Object.create(rt);ne.prototype=Ge.constructor=E,E.constructor=ne,E[Ee]=ne.displayName="GeneratorFunction",je.isGeneratorFunction=function(ze){var Ve=typeof ze=="function"&&ze.constructor;return!!Ve&&(Ve===ne||(Ve.displayName||Ve.name)==="GeneratorFunction")},je.mark=function(ze){return Object.setPrototypeOf?Object.setPrototypeOf(ze,E):(ze.__proto__=E,Ee in ze||(ze[Ee]="GeneratorFunction")),ze.prototype=Object.create(Ge),ze},je.awrap=function(ze){return{__await:ze}},b(z.prototype),z.prototype[Te]=function(){return this},je.AsyncIterator=z,je.async=function(ze,Ve,$e,nt){var et=new z(te(ze,Ve,$e,nt));return je.isGeneratorFunction(Ve)?et:et.next().then(function(pt){return pt.done?pt.value:et.next()})},b(Ge),Ge[Ee]="Generator",Ge[ke]=function(){return this},Ge.toString=function(){return"[object Generator]"},je.keys=function(ze){var Ve=[];for(var $e in ze)Ve.push($e);return Ve.reverse(),function nt(){for(;Ve.length;){var et=Ve.pop();if(et in ze)return nt.value=et,nt.done=!1,nt}return nt.done=!0,nt}},je.values=ye,ve.prototype={constructor:ve,reset:function(ze){if(this.prev=0,this.next=0,this.sent=this._sent=ge,this.done=!1,this.delegate=null,this.method="next",this.arg=ge,this.tryEntries.forEach(oe),!ze)for(var Ve in this)Ve.charAt(0)==="t"&&he.call(this,Ve)&&!isNaN(+Ve.slice(1))&&(this[Ve]=ge)},stop:function(){this.done=!0;var ze=this.tryEntries[0],Ve=ze.completion;if(Ve.type==="throw")throw Ve.arg;return this.rval},dispatchException:function(ze){function Ve(dt,Mt){return pt.type="throw",pt.arg=ze,$e.next=dt,Mt&&($e.method="next",$e.arg=ge),!!Mt}if(this.done)throw ze;for(var $e=this,nt=this.tryEntries.length-1;nt>=0;--nt){var et=this.tryEntries[nt],pt=et.completion;if(et.tryLoc==="root")return Ve("end");if(et.tryLoc<=this.prev){var ct=he.call(et,"catchLoc"),Rt=he.call(et,"finallyLoc");if(ct&&Rt){if(this.prev<et.catchLoc)return Ve(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Ve(et.finallyLoc)}else if(ct){if(this.prev<et.catchLoc)return Ve(et.catchLoc,!0)}else{if(!Rt)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Ve(et.finallyLoc)}}}},abrupt:function(ze,Ve){for(var $e=this.tryEntries.length-1;$e>=0;--$e){var nt=this.tryEntries[$e];if(nt.tryLoc<=this.prev&&he.call(nt,"finallyLoc")&&this.prev<nt.finallyLoc){var et=nt;break}}et&&(ze==="break"||ze==="continue")&&et.tryLoc<=Ve&&Ve<=et.finallyLoc&&(et=null);var pt=et?et.completion:{};return pt.type=ze,pt.arg=Ve,et?(this.method="next",this.next=et.finallyLoc,We):this.complete(pt)},complete:function(ze,Ve){if(ze.type==="throw")throw ze.arg;return ze.type==="break"||ze.type==="continue"?this.next=ze.arg:ze.type==="return"?(this.rval=this.arg=ze.arg,this.method="return",this.next="end"):ze.type==="normal"&&Ve&&(this.next=Ve),We},finish:function(ze){for(var Ve=this.tryEntries.length-1;Ve>=0;--Ve){var $e=this.tryEntries[Ve];if($e.finallyLoc===ze)return this.complete($e.completion,$e.afterLoc),oe($e),We}},catch:function(ze){for(var Ve=this.tryEntries.length-1;Ve>=0;--Ve){var $e=this.tryEntries[Ve];if($e.tryLoc===ze){var nt=$e.completion;if(nt.type==="throw"){var et=nt.arg;oe($e)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(ze,Ve,$e){return this.delegate={iterator:ye(ze),resultName:Ve,nextLoc:$e},this.method==="next"&&(this.arg=ge),We}}})(function(){return this}()||Function("return this")())},{}],193:[function(ie,Ce,ue){function se(ne,E){for(var b in ne)E[b]=ne[b]}function te(ne,E,b){return ee(ne,E,b)}var le=ie("buffer"),ee=le.Buffer;ee.from&&ee.alloc&&ee.allocUnsafe&&ee.allocUnsafeSlow?Ce.exports=le:(se(le,ue),ue.Buffer=te),se(ee,te),te.from=function(ne,E,b){if(typeof ne=="number")throw new TypeError("Argument must not be a number");return ee(ne,E,b)},te.alloc=function(ne,E,b){if(typeof ne!="number")throw new TypeError("Argument must be a number");var z=ee(ne);return E!==void 0?typeof b=="string"?z.fill(E,b):z.fill(E):z.fill(0),z},te.allocUnsafe=function(ne){if(typeof ne!="number")throw new TypeError("Argument must be a number");return ee(ne)},te.allocUnsafeSlow=function(ne){if(typeof ne!="number")throw new TypeError("Argument must be a number");return le.SlowBuffer(ne)}},{buffer:38}],194:[function(ie,Ce,ue){(function(se){"use strict";function te(me){return me&&me.__esModule?me:{default:me}}var le=ie("babel-runtime/core-js/string/from-code-point"),ee=te(le),ne=ie("babel-runtime/core-js/json/stringify"),E=te(ne),b=ie("babel-runtime/helpers/typeof"),z=te(b),x=ie("babel-runtime/core-js/object/define-property"),re=te(x),ae=ie("babel-runtime/core-js/object/keys"),oe=te(ae),ve=ie("babel-runtime/core-js/object/create"),ye=te(ve);(function(me){function ge(Me,Re){if(!(this instanceof ge))return new ge(Me,Re);var tt=this;he(tt),tt.q=tt.c="",tt.bufferCheckPosition=me.MAX_BUFFER_LENGTH,tt.opt=Re||{},tt.opt.lowercase=tt.opt.lowercase||tt.opt.lowercasetags,tt.looseCase=tt.opt.lowercase?"toLowerCase":"toUpperCase",tt.tags=[],tt.closed=tt.closedRoot=tt.sawRoot=!1,tt.tag=tt.error=null,tt.strict=!!Me,tt.noscript=!(!Me&&!tt.opt.noscript),tt.state=Le.BEGIN,tt.strictEntities=tt.opt.strictEntities,tt.ENTITIES=tt.strictEntities?(0,ye.default)(me.XML_ENTITIES):(0,ye.default)(me.ENTITIES),tt.attribList=[],tt.opt.xmlns&&(tt.ns=(0,ye.default)(Be)),tt.trackPosition=tt.opt.position!==!1,tt.trackPosition&&(tt.position=tt.line=tt.column=0),Xe(tt,"onready")}function _e(Me){for(var Re=Math.max(me.MAX_BUFFER_LENGTH,10),tt=0,lt=0,Pt=Mt.length;lt<Pt;lt++){var Ct=Me[Mt[lt]].length;if(Ct>Re)switch(Mt[lt]){case"textNode":We(Me);break;case"cdata":ot(Me,"oncdata",Me.cdata),Me.cdata="";break;case"script":ot(Me,"onscript",Me.script),Me.script="";break;default:Ye(Me,"Max buffer length exceeded: "+Mt[lt])}tt=Math.max(tt,Ct)}var vt=me.MAX_BUFFER_LENGTH-tt;Me.bufferCheckPosition=vt+Me.position}function he(Me){for(var Re=0,tt=Mt.length;Re<tt;Re++)Me[Mt[Re]]=""}function pe(Me){We(Me),Me.cdata!==""&&(ot(Me,"oncdata",Me.cdata),Me.cdata=""),Me.script!==""&&(ot(Me,"onscript",Me.script),Me.script="")}function ke(Me,Re){return new Te(Me,Re)}function Te(Me,Re){if(!(this instanceof Te))return new Te(Me,Re);xt.apply(this),this._parser=new ge(Me,Re),this.writable=!0,this.readable=!0;var tt=this;this._parser.onend=function(){tt.emit("end")},this._parser.onerror=function(lt){tt.emit("error",lt),tt._parser.error=null},this._decoder=null,yt.forEach(function(lt){(0,re.default)(tt,"on"+lt,{get:function(){return tt._parser["on"+lt]},set:function(Pt){if(!Pt)return tt.removeAllListeners(lt),tt._parser["on"+lt]=Pt,Pt;tt.on(lt,Pt)},enumerable:!0,configurable:!1})})}function Ee(Me){return Me===" "||Me===`
`||Me==="\r"||Me===" "}function Oe(Me){return Me==='"'||Me==="'"}function je(Me){return Me===">"||Ee(Me)}function Pe(Me,Re){return Me.test(Re)}function Qe(Me,Re){return!Pe(Me,Re)}function Xe(Me,Re,tt){Me[Re]&&Me[Re](tt)}function ot(Me,Re,tt){Me.textNode&&We(Me),Xe(Me,Re,tt)}function We(Me){Me.textNode=rt(Me.opt,Me.textNode),Me.textNode&&Xe(Me,"ontext",Me.textNode),Me.textNode=""}function rt(Me,Re){return Me.trim&&(Re=Re.trim()),Me.normalize&&(Re=Re.replace(/\s+/g," ")),Re}function Ye(Me,Re){return We(Me),Me.trackPosition&&(Re+=`
Line: `+Me.line+`
Column: `+Me.column+`
Char: `+Me.c),Re=new Error(Re),Me.error=Re,Xe(Me,"onerror",Re),Me}function ut(Me){return Me.sawRoot&&!Me.closedRoot&&Ge(Me,"Unclosed root tag"),Me.state!==Le.BEGIN&&Me.state!==Le.BEGIN_WHITESPACE&&Me.state!==Le.TEXT&&Ye(Me,"Unexpected end"),We(Me),Me.c="",Me.closed=!0,Xe(Me,"onend"),ge.call(Me,Me.strict,Me.opt),Me}function Ge(Me,Re){if((Me===void 0?"undefined":(0,z.default)(Me))!=="object"||!(Me instanceof ge))throw new Error("bad call to strictFail");Me.strict&&Ye(Me,Re)}function ze(Me){Me.strict||(Me.tagName=Me.tagName[Me.looseCase]());var Re=Me.tags[Me.tags.length-1]||Me,tt=Me.tag={name:Me.tagName,attributes:{}};Me.opt.xmlns&&(tt.ns=Re.ns),Me.attribList.length=0,ot(Me,"onopentagstart",tt)}function Ve(Me,Re){var tt=Me.indexOf(":"),lt=tt<0?["",Me]:Me.split(":"),Pt=lt[0],Ct=lt[1];return Re&&Me==="xmlns"&&(Pt="xmlns",Ct=""),{prefix:Pt,local:Ct}}function $e(Me){if(Me.strict||(Me.attribName=Me.attribName[Me.looseCase]()),Me.attribList.indexOf(Me.attribName)!==-1||Me.tag.attributes.hasOwnProperty(Me.attribName))return void(Me.attribName=Me.attribValue="");if(Me.opt.xmlns){var Re=Ve(Me.attribName,!0),tt=Re.prefix,lt=Re.local;if(tt==="xmlns")if(lt==="xml"&&Me.attribValue!==Ae)Ge(Me,"xml: prefix must be bound to "+Ae+`
Actual: `+Me.attribValue);else if(lt==="xmlns"&&Me.attribValue!==be)Ge(Me,"xmlns: prefix must be bound to "+be+`
Actual: `+Me.attribValue);else{var Pt=Me.tag,Ct=Me.tags[Me.tags.length-1]||Me;Pt.ns===Ct.ns&&(Pt.ns=(0,ye.default)(Ct.ns)),Pt.ns[lt]=Me.attribValue}Me.attribList.push([Me.attribName,Me.attribValue])}else Me.tag.attributes[Me.attribName]=Me.attribValue,ot(Me,"onattribute",{name:Me.attribName,value:Me.attribValue});Me.attribName=Me.attribValue=""}function nt(Me,Re){if(Me.opt.xmlns){var tt=Me.tag,lt=Ve(Me.tagName);tt.prefix=lt.prefix,tt.local=lt.local,tt.uri=tt.ns[lt.prefix]||"",tt.prefix&&!tt.uri&&(Ge(Me,"Unbound namespace prefix: "+(0,E.default)(Me.tagName)),tt.uri=lt.prefix);var Pt=Me.tags[Me.tags.length-1]||Me;tt.ns&&Pt.ns!==tt.ns&&(0,oe.default)(tt.ns).forEach(function(Sn){ot(Me,"onopennamespace",{prefix:Sn,uri:tt.ns[Sn]})});for(var Ct=0,vt=Me.attribList.length;Ct<vt;Ct++){var Ot=Me.attribList[Ct],Zt=Ot[0],Ut=Ot[1],gt=Ve(Zt,!0),Qt=gt.prefix,Lt=gt.local,qt=Qt===""?"":tt.ns[Qt]||"",un={name:Zt,value:Ut,prefix:Qt,local:Lt,uri:qt};Qt&&Qt!=="xmlns"&&!qt&&(Ge(Me,"Unbound namespace prefix: "+(0,E.default)(Qt)),un.uri=Qt),Me.tag.attributes[Zt]=un,ot(Me,"onattribute",un)}Me.attribList.length=0}Me.tag.isSelfClosing=!!Re,Me.sawRoot=!0,Me.tags.push(Me.tag),ot(Me,"onopentag",Me.tag),Re||(Me.noscript||Me.tagName.toLowerCase()!=="script"?Me.state=Le.TEXT:Me.state=Le.SCRIPT,Me.tag=null,Me.tagName=""),Me.attribName=Me.attribValue="",Me.attribList.length=0}function et(Me){if(!Me.tagName)return Ge(Me,"Weird empty close tag."),Me.textNode+="</>",void(Me.state=Le.TEXT);if(Me.script){if(Me.tagName!=="script")return Me.script+="</"+Me.tagName+">",Me.tagName="",void(Me.state=Le.SCRIPT);ot(Me,"onscript",Me.script),Me.script=""}var Re=Me.tags.length,tt=Me.tagName;Me.strict||(tt=tt[Me.looseCase]());for(var lt=tt;Re--&&Me.tags[Re].name!==lt;)Ge(Me,"Unexpected close tag");if(Re<0)return Ge(Me,"Unmatched closing tag: "+Me.tagName),Me.textNode+="</"+Me.tagName+">",void(Me.state=Le.TEXT);Me.tagName=tt;for(var Pt=Me.tags.length;Pt-- >Re;){var Ct=Me.tag=Me.tags.pop();Me.tagName=Me.tag.name,ot(Me,"onclosetag",Me.tagName);var vt={};for(var Ot in Ct.ns)vt[Ot]=Ct.ns[Ot];var Zt=Me.tags[Me.tags.length-1]||Me;Me.opt.xmlns&&Ct.ns!==Zt.ns&&(0,oe.default)(Ct.ns).forEach(function(Ut){var gt=Ct.ns[Ut];ot(Me,"onclosenamespace",{prefix:Ut,uri:gt})})}Re===0&&(Me.closedRoot=!0),Me.tagName=Me.attribValue=Me.attribName="",Me.attribList.length=0,Me.state=Le.TEXT}function pt(Me){var Re,tt=Me.entity,lt=tt.toLowerCase(),Pt="";return Me.ENTITIES[tt]?Me.ENTITIES[tt]:Me.ENTITIES[lt]?Me.ENTITIES[lt]:(tt=lt,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),Re=parseInt(tt,16),Pt=Re.toString(16)):(tt=tt.slice(1),Re=parseInt(tt,10),Pt=Re.toString(10))),tt=tt.replace(/^0+/,""),isNaN(Re)||Pt.toLowerCase()!==tt?(Ge(Me,"Invalid character entity"),"&"+Me.entity+";"):(0,ee.default)(Re))}function ct(Me,Re){Re==="<"?(Me.state=Le.OPEN_WAKA,Me.startTagPosition=Me.position):Ee(Re)||(Ge(Me,"Non-whitespace before first tag."),Me.textNode=Re,Me.state=Le.TEXT)}function Rt(Me,Re){var tt="";return Re<Me.length&&(tt=Me.charAt(Re)),tt}function dt(Me){var Re=this;if(this.error)throw this.error;if(Re.closed)return Ye(Re,"Cannot write after close. Assign an onready handler.");if(Me===null)return ut(Re);(Me===void 0?"undefined":(0,z.default)(Me))==="object"&&(Me=Me.toString());for(var tt=0,lt="";lt=Rt(Me,tt++),Re.c=lt,!!lt;)switch(Re.trackPosition&&(Re.position++,lt===`
`?(Re.line++,Re.column=0):Re.column++),Re.state){case Le.BEGIN:if(Re.state=Le.BEGIN_WHITESPACE,lt==="\uFEFF")continue;ct(Re,lt);continue;case Le.BEGIN_WHITESPACE:ct(Re,lt);continue;case Le.TEXT:if(Re.sawRoot&&!Re.closedRoot){for(var Pt=tt-1;lt&&lt!=="<"&&lt!=="&";)(lt=Rt(Me,tt++))&&Re.trackPosition&&(Re.position++,lt===`
`?(Re.line++,Re.column=0):Re.column++);Re.textNode+=Me.substring(Pt,tt-1)}lt!=="<"||Re.sawRoot&&Re.closedRoot&&!Re.strict?(Ee(lt)||Re.sawRoot&&!Re.closedRoot||Ge(Re,"Text data outside of root node."),lt==="&"?Re.state=Le.TEXT_ENTITY:Re.textNode+=lt):(Re.state=Le.OPEN_WAKA,Re.startTagPosition=Re.position);continue;case Le.SCRIPT:lt==="<"?Re.state=Le.SCRIPT_ENDING:Re.script+=lt;continue;case Le.SCRIPT_ENDING:lt==="/"?Re.state=Le.CLOSE_TAG:(Re.script+="<"+lt,Re.state=Le.SCRIPT);continue;case Le.OPEN_WAKA:if(lt==="!")Re.state=Le.SGML_DECL,Re.sgmlDecl="";else if(!Ee(lt))if(Pe(Ke,lt))Re.state=Le.OPEN_TAG,Re.tagName=lt;else if(lt==="/")Re.state=Le.CLOSE_TAG,Re.tagName="";else if(lt==="?")Re.state=Le.PROC_INST,Re.procInstName=Re.procInstBody="";else{if(Ge(Re,"Unencoded <"),Re.startTagPosition+1<Re.position){var Ct=Re.position-Re.startTagPosition;lt=new Array(Ct).join(" ")+lt}Re.textNode+="<"+lt,Re.state=Le.TEXT}continue;case Le.SGML_DECL:(Re.sgmlDecl+lt).toUpperCase()===bt?(ot(Re,"onopencdata"),Re.state=Le.CDATA,Re.sgmlDecl="",Re.cdata=""):Re.sgmlDecl+lt==="--"?(Re.state=Le.COMMENT,Re.comment="",Re.sgmlDecl=""):(Re.sgmlDecl+lt).toUpperCase()===He?(Re.state=Le.DOCTYPE,(Re.doctype||Re.sawRoot)&&Ge(Re,"Inappropriately located doctype declaration"),Re.doctype="",Re.sgmlDecl=""):lt===">"?(ot(Re,"onsgmldeclaration",Re.sgmlDecl),Re.sgmlDecl="",Re.state=Le.TEXT):(Oe(lt)&&(Re.state=Le.SGML_DECL_QUOTED),Re.sgmlDecl+=lt);continue;case Le.SGML_DECL_QUOTED:lt===Re.q&&(Re.state=Le.SGML_DECL,Re.q=""),Re.sgmlDecl+=lt;continue;case Le.DOCTYPE:lt===">"?(Re.state=Le.TEXT,ot(Re,"ondoctype",Re.doctype),Re.doctype=!0):(Re.doctype+=lt,lt==="["?Re.state=Le.DOCTYPE_DTD:Oe(lt)&&(Re.state=Le.DOCTYPE_QUOTED,Re.q=lt));continue;case Le.DOCTYPE_QUOTED:Re.doctype+=lt,lt===Re.q&&(Re.q="",Re.state=Le.DOCTYPE);continue;case Le.DOCTYPE_DTD:Re.doctype+=lt,lt==="]"?Re.state=Le.DOCTYPE:Oe(lt)&&(Re.state=Le.DOCTYPE_DTD_QUOTED,Re.q=lt);continue;case Le.DOCTYPE_DTD_QUOTED:Re.doctype+=lt,lt===Re.q&&(Re.state=Le.DOCTYPE_DTD,Re.q="");continue;case Le.COMMENT:lt==="-"?Re.state=Le.COMMENT_ENDING:Re.comment+=lt;continue;case Le.COMMENT_ENDING:lt==="-"?(Re.state=Le.COMMENT_ENDED,Re.comment=rt(Re.opt,Re.comment),Re.comment&&ot(Re,"oncomment",Re.comment),Re.comment=""):(Re.comment+="-"+lt,Re.state=Le.COMMENT);continue;case Le.COMMENT_ENDED:lt!==">"?(Ge(Re,"Malformed comment"),Re.comment+="--"+lt,Re.state=Le.COMMENT):Re.state=Le.TEXT;continue;case Le.CDATA:lt==="]"?Re.state=Le.CDATA_ENDING:Re.cdata+=lt;continue;case Le.CDATA_ENDING:lt==="]"?Re.state=Le.CDATA_ENDING_2:(Re.cdata+="]"+lt,Re.state=Le.CDATA);continue;case Le.CDATA_ENDING_2:lt===">"?(Re.cdata&&ot(Re,"oncdata",Re.cdata),ot(Re,"onclosecdata"),Re.cdata="",Re.state=Le.TEXT):lt==="]"?Re.cdata+="]":(Re.cdata+="]]"+lt,Re.state=Le.CDATA);continue;case Le.PROC_INST:lt==="?"?Re.state=Le.PROC_INST_ENDING:Ee(lt)?Re.state=Le.PROC_INST_BODY:Re.procInstName+=lt;continue;case Le.PROC_INST_BODY:if(!Re.procInstBody&&Ee(lt))continue;lt==="?"?Re.state=Le.PROC_INST_ENDING:Re.procInstBody+=lt;continue;case Le.PROC_INST_ENDING:lt===">"?(ot(Re,"onprocessinginstruction",{name:Re.procInstName,body:Re.procInstBody}),Re.procInstName=Re.procInstBody="",Re.state=Le.TEXT):(Re.procInstBody+="?"+lt,Re.state=Le.PROC_INST_BODY);continue;case Le.OPEN_TAG:Pe(Ne,lt)?Re.tagName+=lt:(ze(Re),lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:(Ee(lt)||Ge(Re,"Invalid character in tag name"),Re.state=Le.ATTRIB));continue;case Le.OPEN_TAG_SLASH:lt===">"?(nt(Re,!0),et(Re)):(Ge(Re,"Forward-slash in opening tag not followed by >"),Re.state=Le.ATTRIB);continue;case Le.ATTRIB:if(Ee(lt))continue;lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:Pe(Ke,lt)?(Re.attribName=lt,Re.attribValue="",Re.state=Le.ATTRIB_NAME):Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_NAME:lt==="="?Re.state=Le.ATTRIB_VALUE:lt===">"?(Ge(Re,"Attribute without value"),Re.attribValue=Re.attribName,$e(Re),nt(Re)):Ee(lt)?Re.state=Le.ATTRIB_NAME_SAW_WHITE:Pe(Ne,lt)?Re.attribName+=lt:Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_NAME_SAW_WHITE:if(lt==="=")Re.state=Le.ATTRIB_VALUE;else{if(Ee(lt))continue;Ge(Re,"Attribute without value"),Re.tag.attributes[Re.attribName]="",Re.attribValue="",ot(Re,"onattribute",{name:Re.attribName,value:""}),Re.attribName="",lt===">"?nt(Re):Pe(Ke,lt)?(Re.attribName=lt,Re.state=Le.ATTRIB_NAME):(Ge(Re,"Invalid attribute name"),Re.state=Le.ATTRIB)}continue;case Le.ATTRIB_VALUE:if(Ee(lt))continue;Oe(lt)?(Re.q=lt,Re.state=Le.ATTRIB_VALUE_QUOTED):(Ge(Re,"Unquoted attribute value"),Re.state=Le.ATTRIB_VALUE_UNQUOTED,Re.attribValue=lt);continue;case Le.ATTRIB_VALUE_QUOTED:if(lt!==Re.q){lt==="&"?Re.state=Le.ATTRIB_VALUE_ENTITY_Q:Re.attribValue+=lt;continue}$e(Re),Re.q="",Re.state=Le.ATTRIB_VALUE_CLOSED;continue;case Le.ATTRIB_VALUE_CLOSED:Ee(lt)?Re.state=Le.ATTRIB:lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:Pe(Ke,lt)?(Ge(Re,"No whitespace between attributes"),Re.attribName=lt,Re.attribValue="",Re.state=Le.ATTRIB_NAME):Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_VALUE_UNQUOTED:if(!je(lt)){lt==="&"?Re.state=Le.ATTRIB_VALUE_ENTITY_U:Re.attribValue+=lt;continue}$e(Re),lt===">"?nt(Re):Re.state=Le.ATTRIB;continue;case Le.CLOSE_TAG:if(Re.tagName)lt===">"?et(Re):Pe(Ne,lt)?Re.tagName+=lt:Re.script?(Re.script+="</"+Re.tagName,Re.tagName="",Re.state=Le.SCRIPT):(Ee(lt)||Ge(Re,"Invalid tagname in closing tag"),Re.state=Le.CLOSE_TAG_SAW_WHITE);else{if(Ee(lt))continue;Qe(Ke,lt)?Re.script?(Re.script+="</"+lt,Re.state=Le.SCRIPT):Ge(Re,"Invalid tagname in closing tag."):Re.tagName=lt}continue;case Le.CLOSE_TAG_SAW_WHITE:if(Ee(lt))continue;lt===">"?et(Re):Ge(Re,"Invalid characters in closing tag");continue;case Le.TEXT_ENTITY:case Le.ATTRIB_VALUE_ENTITY_Q:case Le.ATTRIB_VALUE_ENTITY_U:var vt,Ot;switch(Re.state){case Le.TEXT_ENTITY:vt=Le.TEXT,Ot="textNode";break;case Le.ATTRIB_VALUE_ENTITY_Q:vt=Le.ATTRIB_VALUE_QUOTED,Ot="attribValue";break;case Le.ATTRIB_VALUE_ENTITY_U:vt=Le.ATTRIB_VALUE_UNQUOTED,Ot="attribValue"}lt===";"?(Re[Ot]+=pt(Re),Re.entity="",Re.state=vt):Pe(Re.entity.length?we:De,lt)?Re.entity+=lt:(Ge(Re,"Invalid character in entity name"),Re[Ot]+="&"+Re.entity+lt,Re.entity="",Re.state=vt);continue;default:throw new Error(Re,"Unknown state: "+Re.state)}return Re.position>=Re.bufferCheckPosition&&_e(Re),Re}me.parser=function(Me,Re){return new ge(Me,Re)},me.SAXParser=ge,me.SAXStream=Te,me.createStream=ke,me.MAX_BUFFER_LENGTH=65536;var Mt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];me.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],ye.default||(Object.create=function(Me){function Re(){}return Re.prototype=Me,new Re}),oe.default||(Object.keys=function(Me){var Re=[];for(var tt in Me)Me.hasOwnProperty(tt)&&Re.push(tt);return Re}),ge.prototype={end:function(){ut(this)},write:dt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){pe(this)}};var xt;try{xt=ie("stream").Stream}catch(Me){xt=function(){}}var yt=me.EVENTS.filter(function(Me){return Me!=="error"&&Me!=="end"});Te.prototype=(0,ye.default)(xt.prototype,{constructor:{value:Te}}),Te.prototype.write=function(Me){if(typeof se=="function"&&typeof se.isBuffer=="function"&&se.isBuffer(Me)){if(!this._decoder){var Re=ie("string_decoder").StringDecoder;this._decoder=new Re("utf8")}Me=this._decoder.write(Me)}return this._parser.write(Me.toString()),this.emit("data",Me),!0},Te.prototype.end=function(Me){return Me&&Me.length&&this.write(Me),this._parser.end(),!0},Te.prototype.on=function(Me,Re){var tt=this;return tt._parser["on"+Me]||yt.indexOf(Me)===-1||(tt._parser["on"+Me]=function(){var lt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);lt.splice(0,0,Me),tt.emit.apply(tt,lt)}),xt.prototype.on.call(tt,Me,Re)};var bt="[CDATA[",He="DOCTYPE",Ae="http://www.w3.org/XML/1998/namespace",be="http://www.w3.org/2000/xmlns/",Be={xml:Ae,xmlns:be},Ke=/[:_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]/,Ne=/[:_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-]/,De=/[#:_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]/,we=/[#:_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-]/,Le=0;me.STATE={BEGIN:Le++,BEGIN_WHITESPACE:Le++,TEXT:Le++,TEXT_ENTITY:Le++,OPEN_WAKA:Le++,SGML_DECL:Le++,SGML_DECL_QUOTED:Le++,DOCTYPE:Le++,DOCTYPE_QUOTED:Le++,DOCTYPE_DTD:Le++,DOCTYPE_DTD_QUOTED:Le++,COMMENT_STARTING:Le++,COMMENT:Le++,COMMENT_ENDING:Le++,COMMENT_ENDED:Le++,CDATA:Le++,CDATA_ENDING:Le++,CDATA_ENDING_2:Le++,PROC_INST:Le++,PROC_INST_BODY:Le++,PROC_INST_ENDING:Le++,OPEN_TAG:Le++,OPEN_TAG_SLASH:Le++,ATTRIB:Le++,ATTRIB_NAME:Le++,ATTRIB_NAME_SAW_WHITE:Le++,ATTRIB_VALUE:Le++,ATTRIB_VALUE_QUOTED:Le++,ATTRIB_VALUE_CLOSED:Le++,ATTRIB_VALUE_UNQUOTED:Le++,ATTRIB_VALUE_ENTITY_Q:Le++,ATTRIB_VALUE_ENTITY_U:Le++,CLOSE_TAG:Le++,CLOSE_TAG_SAW_WHITE:Le++,SCRIPT:Le++,SCRIPT_ENDING:Le++},me.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},me.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)(me.ENTITIES).forEach(function(Me){var Re=me.ENTITIES[Me],tt=typeof Re=="number"?String.fromCharCode(Re):Re;me.ENTITIES[Me]=tt});for(var Ue in me.STATE)me.STATE[me.STATE[Ue]]=Ue;Le=me.STATE,ee.default||function(){var Me=String.fromCharCode,Re=Math.floor,tt=function(){var lt,Pt,Ct=[],vt=-1,Ot=arguments.length;if(!Ot)return"";for(var Zt="";++vt<Ot;){var Ut=Number(arguments[vt]);if(!isFinite(Ut)||Ut<0||Ut>1114111||Re(Ut)!==Ut)throw RangeError("Invalid code point: "+Ut);Ut<=65535?Ct.push(Ut):(Ut-=65536,lt=55296+(Ut>>10),Pt=Ut%1024+56320,Ct.push(lt,Pt)),(vt+1===Ot||Ct.length>16384)&&(Zt+=Me.apply(null,Ct),Ct.length=0)}return Zt};re.default?Object.defineProperty(String,"fromCodePoint",{value:tt,configurable:!0,writable:!0}):String.fromCodePoint=tt}()})(ue===void 0?(void 0).sax={}:ue)}).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,Ce,ue){function se(){te.call(this)}Ce.exports=se;var te=ie("events").EventEmitter;ie("inherits")(se,te),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(le,ee){function ne(ve){le.writable&&le.write(ve)===!1&&ae.pause&&ae.pause()}function E(){ae.readable&&ae.resume&&ae.resume()}function b(){oe||(oe=!0,le.end())}function z(){oe||(oe=!0,typeof le.destroy=="function"&&le.destroy())}function x(ve){if(re(),te.listenerCount(this,"error")===0)throw ve}function re(){ae.removeListener("data",ne),le.removeListener("drain",E),ae.removeListener("end",b),ae.removeListener("close",z),ae.removeListener("error",x),le.removeListener("error",x),ae.removeListener("end",re),ae.removeListener("close",re),le.removeListener("close",re)}var ae=this;ae.on("data",ne),le.on("drain",E),le._isStdio||ee&&ee.end===!1||(ae.on("end",b),ae.on("close",z));var oe=!1;return ae.on("error",x),le.on("error",x),ae.on("end",re),ae.on("close",re),le.on("close",re),le.emit("pipe",ae),le}},{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,Ce,ue){(function(se){var te=ie("./lib/request"),le=ie("./lib/response"),ee=ie("xtend"),ne=ie("builtin-status-codes"),E=ie("url"),b=ue;b.request=function(z,x){z=typeof z=="string"?E.parse(z):ee(z);var re=se.location.protocol.search(/^https?:$/)===-1?"http:":"",ae=z.protocol||re,oe=z.hostname||z.host,ve=z.port,ye=z.path||"/";oe&&oe.indexOf(":")!==-1&&(oe="["+oe+"]"),z.url=(oe?ae+"//"+oe:"")+(ve?":"+ve:"")+ye,z.method=(z.method||"GET").toUpperCase(),z.headers=z.headers||{};var me=new te(z);return x&&me.on("response",x),me},b.get=function(z,x){var re=b.request(z,x);return re.end(),re},b.ClientRequest=te,b.IncomingMessage=le.IncomingMessage,b.Agent=function(){},b.Agent.defaultMaxSockets=4,b.globalAgent=new b.Agent,b.STATUS_CODES=ne,b.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 Se.g!="undefined"?Se.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,Ce,ue){(function(se){"use strict";function te(){if(ne!==void 0)return ne;if(se.XMLHttpRequest){ne=new se.XMLHttpRequest;try{ne.open("GET",se.XDomainRequest?"/":"https://example.com")}catch(z){ne=null}}else ne=null;return ne}function le(z){var x=te();if(!x)return!1;try{return x.responseType=z,x.responseType===z}catch(re){}return!1}function ee(z){return typeof z=="function"}ue.fetch=ee(se.fetch)&&ee(se.ReadableStream),ue.writableStream=ee(se.WritableStream),ue.abortController=ee(se.AbortController),ue.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ue.blobConstructor=!0}catch(z){}var ne,E=se.ArrayBuffer!==void 0,b=E&&ee(se.ArrayBuffer.prototype.slice);ue.arraybuffer=ue.fetch||E&&le("arraybuffer"),ue.msstream=!ue.fetch&&b&&le("ms-stream"),ue.mozchunkedarraybuffer=!ue.fetch&&E&&le("moz-chunked-arraybuffer"),ue.overrideMimeType=ue.fetch||!!te()&&ee(te().overrideMimeType),ue.vbArray=ee(se.VBArray),ne=null}).call(this,typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(ie,Ce,ue){(function(se,te,le){"use strict";function ee(_e,he){return z.fetch&&he?"fetch":z.mozchunkedarraybuffer?"moz-chunked-arraybuffer":z.msstream?"ms-stream":z.arraybuffer&&_e?"arraybuffer":z.vbArray&&_e?"text:vbarray":"text"}function ne(_e){try{var he=_e.status;return he!==null&&he!==0}catch(pe){return!1}}var E=ie("babel-runtime/core-js/object/keys"),b=function(_e){return _e&&_e.__esModule?_e:{default:_e}}(E),z=ie("./capability"),x=ie("inherits"),re=ie("./response"),ae=ie("readable-stream"),oe=ie("to-arraybuffer"),ve=re.IncomingMessage,ye=re.readyStates,me=Ce.exports=function(_e){var he=this;ae.Writable.call(he),he._opts=_e,he._body=[],he._headers={},_e.auth&&he.setHeader("Authorization","Basic "+new le(_e.auth).toString("base64")),(0,b.default)(_e.headers).forEach(function(Te){he.setHeader(Te,_e.headers[Te])});var pe,ke=!0;if(_e.mode==="disable-fetch"||"requestTimeout"in _e&&!z.abortController)ke=!1,pe=!0;else if(_e.mode==="prefer-streaming")pe=!1;else if(_e.mode==="allow-wrong-content-type")pe=!z.overrideMimeType;else{if(_e.mode&&_e.mode!=="default"&&_e.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");pe=!0}he._mode=ee(pe,ke),he._fetchTimer=null,he.on("finish",function(){he._onFinish()})};x(me,ae.Writable),me.prototype.setHeader=function(_e,he){var pe=this,ke=_e.toLowerCase();ge.indexOf(ke)===-1&&(pe._headers[ke]={name:_e,value:he})},me.prototype.getHeader=function(_e){var he=this._headers[_e.toLowerCase()];return he?he.value:null},me.prototype.removeHeader=function(_e){delete this._headers[_e.toLowerCase()]},me.prototype._onFinish=function(){var _e=this;if(!_e._destroyed){var he=_e._opts,pe=_e._headers,ke=null;he.method!=="GET"&&he.method!=="HEAD"&&(ke=z.arraybuffer?oe(le.concat(_e._body)):z.blobConstructor?new te.Blob(_e._body.map(function(Pe){return oe(Pe)}),{type:(pe["content-type"]||{}).value||""}):le.concat(_e._body).toString());var Te=[];if((0,b.default)(pe).forEach(function(Pe){var Qe=pe[Pe].name,Xe=pe[Pe].value;Array.isArray(Xe)?Xe.forEach(function(ot){Te.push([Qe,ot])}):Te.push([Qe,Xe])}),_e._mode==="fetch"){var Ee=null;if(z.abortController){var Oe=new AbortController;Ee=Oe.signal,_e._fetchAbortController=Oe,"requestTimeout"in he&&he.requestTimeout!==0&&(_e._fetchTimer=te.setTimeout(function(){_e.emit("requestTimeout"),_e._fetchAbortController&&_e._fetchAbortController.abort()},he.requestTimeout))}te.fetch(_e._opts.url,{method:_e._opts.method,headers:Te,body:ke||void 0,mode:"cors",credentials:he.withCredentials?"include":"same-origin",signal:Ee}).then(function(Pe){_e._fetchResponse=Pe,_e._connect()},function(Pe){te.clearTimeout(_e._fetchTimer),_e._destroyed||_e.emit("error",Pe)})}else{var je=_e._xhr=new te.XMLHttpRequest;try{je.open(_e._opts.method,_e._opts.url,!0)}catch(Pe){return void se.nextTick(function(){_e.emit("error",Pe)})}"responseType"in je&&(je.responseType=_e._mode.split(":")[0]),"withCredentials"in je&&(je.withCredentials=!!he.withCredentials),_e._mode==="text"&&"overrideMimeType"in je&&je.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in he&&(je.timeout=he.requestTimeout,je.ontimeout=function(){_e.emit("requestTimeout")}),Te.forEach(function(Pe){je.setRequestHeader(Pe[0],Pe[1])}),_e._response=null,je.onreadystatechange=function(){switch(je.readyState){case ye.LOADING:case ye.DONE:_e._onXHRProgress()}},_e._mode==="moz-chunked-arraybuffer"&&(je.onprogress=function(){_e._onXHRProgress()}),je.onerror=function(){_e._destroyed||_e.emit("error",new Error("XHR error"))};try{je.send(ke)}catch(Pe){return void se.nextTick(function(){_e.emit("error",Pe)})}}}},me.prototype._onXHRProgress=function(){var _e=this;ne(_e._xhr)&&!_e._destroyed&&(_e._response||_e._connect(),_e._response._onXHRProgress())},me.prototype._connect=function(){var _e=this;_e._destroyed||(_e._response=new ve(_e._xhr,_e._fetchResponse,_e._mode,_e._fetchTimer),_e._response.on("error",function(he){_e.emit("error",he)}),_e.emit("response",_e._response))},me.prototype._write=function(_e,he,pe){this._body.push(_e),pe()},me.prototype.abort=me.prototype.destroy=function(){var _e=this;_e._destroyed=!0,te.clearTimeout(_e._fetchTimer),_e._response&&(_e._response._destroyed=!0),_e._xhr?_e._xhr.abort():_e._fetchAbortController&&_e._fetchAbortController.abort()},me.prototype.end=function(_e,he,pe){var ke=this;typeof _e=="function"&&(pe=_e,_e=void 0),ae.Writable.prototype.end.call(ke,_e,he,pe)},me.prototype.flushHeaders=function(){},me.prototype.setTimeout=function(){},me.prototype.setNoDelay=function(){},me.prototype.setSocketKeepAlive=function(){};var ge=["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 Se.g!="undefined"?Se.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,Ce,ue){(function(se,te,le){"use strict";var ee=ie("babel-runtime/core-js/promise"),ne=function(ae){return ae&&ae.__esModule?ae:{default:ae}}(ee),E=ie("./capability"),b=ie("inherits"),z=ie("readable-stream"),x=ue.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},re=ue.IncomingMessage=function(ae,oe,ve,ye){var me=this;if(z.Readable.call(me),me._mode=ve,me.headers={},me.rawHeaders=[],me.trailers={},me.rawTrailers=[],me.on("end",function(){se.nextTick(function(){me.emit("close")})}),ve==="fetch"){if(me._fetchResponse=oe,me.url=oe.url,me.statusCode=oe.status,me.statusMessage=oe.statusText,oe.headers.forEach(function(ke,Te){me.headers[Te.toLowerCase()]=ke,me.rawHeaders.push(Te,ke)}),E.writableStream){var ge=new WritableStream({write:function(ke){return new ne.default(function(Te,Ee){me._destroyed?Ee():me.push(new le(ke))?Te():me._resumeFetch=Te})},close:function(){te.clearTimeout(ye),me._destroyed||me.push(null)},abort:function(ke){me._destroyed||me.emit("error",ke)}});try{return void oe.body.pipeTo(ge).catch(function(ke){te.clearTimeout(ye),me._destroyed||me.emit("error",ke)})}catch(ke){}}var _e=oe.body.getReader();(function ke(){_e.read().then(function(Te){if(!me._destroyed){if(Te.done)return te.clearTimeout(ye),void me.push(null);me.push(new le(Te.value)),ke()}}).catch(function(Te){te.clearTimeout(ye),me._destroyed||me.emit("error",Te)})})()}else if(me._xhr=ae,me._pos=0,me.url=ae.responseURL,me.statusCode=ae.status,me.statusMessage=ae.statusText,ae.getAllResponseHeaders().split(/\r?\n/).forEach(function(ke){var Te=ke.match(/^([^:]+):\s*(.*)/);if(Te){var Ee=Te[1].toLowerCase();Ee==="set-cookie"?(me.headers[Ee]===void 0&&(me.headers[Ee]=[]),me.headers[Ee].push(Te[2])):me.headers[Ee]!==void 0?me.headers[Ee]+=", "+Te[2]:me.headers[Ee]=Te[2],me.rawHeaders.push(Te[1],Te[2])}}),me._charset="x-user-defined",!E.overrideMimeType){var he=me.rawHeaders["mime-type"];if(he){var pe=he.match(/;\s*charset=([^;])(;|$)/);pe&&(me._charset=pe[1].toLowerCase())}me._charset||(me._charset="utf-8")}};b(re,z.Readable),re.prototype._read=function(){var ae=this,oe=ae._resumeFetch;oe&&(ae._resumeFetch=null,oe())},re.prototype._onXHRProgress=function(){var ae=this,oe=ae._xhr,ve=null;switch(ae._mode){case"text:vbarray":if(oe.readyState!==x.DONE)break;try{ve=new te.VBArray(oe.responseBody).toArray()}catch(he){}if(ve!==null){ae.push(new le(ve));break}case"text":try{ve=oe.responseText}catch(he){ae._mode="text:vbarray";break}if(ve.length>ae._pos){var ye=ve.substr(ae._pos);if(ae._charset==="x-user-defined"){for(var me=new le(ye.length),ge=0;ge<ye.length;ge++)me[ge]=255&ye.charCodeAt(ge);ae.push(me)}else ae.push(ye,ae._charset);ae._pos=ve.length}break;case"arraybuffer":if(oe.readyState!==x.DONE||!oe.response)break;ve=oe.response,ae.push(new le(new Uint8Array(ve)));break;case"moz-chunked-arraybuffer":if(ve=oe.response,oe.readyState!==x.LOADING||!ve)break;ae.push(new le(new Uint8Array(ve)));break;case"ms-stream":if(ve=oe.response,oe.readyState!==x.LOADING)break;var _e=new te.MSStreamReader;_e.onprogress=function(){_e.result.byteLength>ae._pos&&(ae.push(new le(new Uint8Array(_e.result.slice(ae._pos)))),ae._pos=_e.result.byteLength)},_e.onload=function(){ae.push(null)},_e.readAsArrayBuffer(ve)}ae._xhr.readyState===x.DONE&&ae._mode!=="ms-stream"&&ae.push(null)}}).call(this,ie("_process"),typeof Se.g!="undefined"?Se.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,Ce,ue){"use strict";function se(he){if(!he)return"utf8";for(var pe;;)switch(he){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 he;default:if(pe)return;he=(""+he).toLowerCase(),pe=!0}}function te(he){var pe=se(he);if(typeof pe!="string"&&(ge.isEncoding===_e||!_e(he)))throw new Error("Unknown encoding: "+he);return pe||he}function le(he){this.encoding=te(he);var pe;switch(this.encoding){case"utf16le":this.text=re,this.end=ae,pe=4;break;case"utf8":this.fillLast=b,pe=4;break;case"base64":this.text=oe,this.end=ve,pe=3;break;default:return this.write=ye,void(this.end=me)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ge.allocUnsafe(pe)}function ee(he){return he<=127?0:he>>5==6?2:he>>4==14?3:he>>3==30?4:he>>6==2?-1:-2}function ne(he,pe,ke){var Te=pe.length-1;if(Te<ke)return 0;var Ee=ee(pe[Te]);return Ee>=0?(Ee>0&&(he.lastNeed=Ee-1),Ee):--Te<ke||Ee===-2?0:(Ee=ee(pe[Te]))>=0?(Ee>0&&(he.lastNeed=Ee-2),Ee):--Te<ke||Ee===-2?0:(Ee=ee(pe[Te]),Ee>=0?(Ee>0&&(Ee===2?Ee=0:he.lastNeed=Ee-3),Ee):0)}function E(he,pe,ke){if((192&pe[0])!=128)return he.lastNeed=0,"\u951F\uFFFD";if(he.lastNeed>1&&pe.length>1){if((192&pe[1])!=128)return he.lastNeed=1,"\u951F\uFFFD";if(he.lastNeed>2&&pe.length>2&&(192&pe[2])!=128)return he.lastNeed=2,"\u951F\uFFFD"}}function b(he){var pe=this.lastTotal-this.lastNeed,ke=E(this,he,pe);return ke!==void 0?ke:this.lastNeed<=he.length?(he.copy(this.lastChar,pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(he.copy(this.lastChar,pe,0,he.length),void(this.lastNeed-=he.length))}function z(he,pe){var ke=ne(this,he,pe);if(!this.lastNeed)return he.toString("utf8",pe);this.lastTotal=ke;var Te=he.length-(ke-this.lastNeed);return he.copy(this.lastChar,0,Te),he.toString("utf8",pe,Te)}function x(he){var pe=he&&he.length?this.write(he):"";return this.lastNeed?pe+"\u951F\uFFFD":pe}function re(he,pe){if((he.length-pe)%2==0){var ke=he.toString("utf16le",pe);if(ke){var Te=ke.charCodeAt(ke.length-1);if(Te>=55296&&Te<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=he[he.length-2],this.lastChar[1]=he[he.length-1],ke.slice(0,-1)}return ke}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=he[he.length-1],he.toString("utf16le",pe,he.length-1)}function ae(he){var pe=he&&he.length?this.write(he):"";if(this.lastNeed){var ke=this.lastTotal-this.lastNeed;return pe+this.lastChar.toString("utf16le",0,ke)}return pe}function oe(he,pe){var ke=(he.length-pe)%3;return ke===0?he.toString("base64",pe):(this.lastNeed=3-ke,this.lastTotal=3,ke===1?this.lastChar[0]=he[he.length-1]:(this.lastChar[0]=he[he.length-2],this.lastChar[1]=he[he.length-1]),he.toString("base64",pe,he.length-ke))}function ve(he){var pe=he&&he.length?this.write(he):"";return this.lastNeed?pe+this.lastChar.toString("base64",0,3-this.lastNeed):pe}function ye(he){return he.toString(this.encoding)}function me(he){return he&&he.length?this.write(he):""}var ge=ie("safe-buffer").Buffer,_e=ge.isEncoding||function(he){switch((he=""+he)&&he.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}};ue.StringDecoder=le,le.prototype.write=function(he){if(he.length===0)return"";var pe,ke;if(this.lastNeed){if((pe=this.fillLast(he))===void 0)return"";ke=this.lastNeed,this.lastNeed=0}else ke=0;return ke<he.length?pe?pe+this.text(he,ke):this.text(he,ke):pe||""},le.prototype.end=x,le.prototype.text=z,le.prototype.fillLast=function(he){if(this.lastNeed<=he.length)return he.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);he.copy(this.lastChar,this.lastTotal-this.lastNeed,0,he.length),this.lastNeed-=he.length}},{"safe-buffer":193}],201:[function(ie,Ce,ue){(function(se,te){function le(x,re){this._id=x,this._clearFn=re}var ee=ie("process/browser.js").nextTick,ne=Function.prototype.apply,E=Array.prototype.slice,b={},z=0;ue.setTimeout=function(){return new le(ne.call(setTimeout,window,arguments),clearTimeout)},ue.setInterval=function(){return new le(ne.call(setInterval,window,arguments),clearInterval)},ue.clearTimeout=ue.clearInterval=function(x){x.close()},le.prototype.unref=le.prototype.ref=function(){},le.prototype.close=function(){this._clearFn.call(window,this._id)},ue.enroll=function(x,re){clearTimeout(x._idleTimeoutId),x._idleTimeout=re},ue.unenroll=function(x){clearTimeout(x._idleTimeoutId),x._idleTimeout=-1},ue._unrefActive=ue.active=function(x){clearTimeout(x._idleTimeoutId);var re=x._idleTimeout;re>=0&&(x._idleTimeoutId=setTimeout(function(){x._onTimeout&&x._onTimeout()},re))},ue.setImmediate=typeof se=="function"?se:function(x){var re=z++,ae=!(arguments.length<2)&&E.call(arguments,1);return b[re]=!0,ee(function(){b[re]&&(ae?x.apply(null,ae):x.call(null),ue.clearImmediate(re))}),re},ue.clearImmediate=typeof te=="function"?te:function(x){delete b[x]}}).call(this,ie("timers").setImmediate,ie("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(ie,Ce,ue){var se=ie("buffer").Buffer;Ce.exports=function(te){if(te instanceof Uint8Array){if(te.byteOffset===0&&te.byteLength===te.buffer.byteLength)return te.buffer;if(typeof te.buffer.slice=="function")return te.buffer.slice(te.byteOffset,te.byteOffset+te.byteLength)}if(se.isBuffer(te)){for(var le=new Uint8Array(te.length),ee=te.length,ne=0;ne<ee;ne++)le[ne]=te[ne];return le.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(ie,Ce,ue){"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 te(Ee,Oe,je){if(Ee&&b.isObject(Ee)&&Ee instanceof se)return Ee;var Pe=new se;return Pe.parse(Ee,Oe,je),Pe}function le(Ee){return b.isString(Ee)&&(Ee=te(Ee)),Ee instanceof se?Ee.format():se.prototype.format.call(Ee)}function ee(Ee,Oe){return te(Ee,!1,!0).resolve(Oe)}function ne(Ee,Oe){return Ee?te(Ee,!1,!0).resolveObject(Oe):Oe}var E=ie("punycode"),b=ie("./util");ue.parse=te,ue.resolve=ee,ue.resolveObject=ne,ue.format=le,ue.Url=se;var z=/^([a-z0-9.+-]+:)/i,x=/:[0-9]*$/,re=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ae=["<",">",'"',"`"," ","\r",`
`," "],oe=["{","}","|","\\","^","`"].concat(ae),ve=["'"].concat(oe),ye=["%","/","?",";","#"].concat(ve),me=["/","?","#"],ge=/^[+a-z0-9A-Z_-]{0,63}$/,_e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,he={javascript:!0,"javascript:":!0},pe={javascript:!0,"javascript:":!0},ke={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Te=ie("querystring");se.prototype.parse=function(Ee,Oe,je){if(!b.isString(Ee))throw new TypeError("Parameter 'url' must be a string, not "+typeof Ee);var Pe=Ee.indexOf("?"),Qe=Pe!==-1&&Pe<Ee.indexOf("#")?"?":"#",Xe=Ee.split(Qe),ot=/\\/g;Xe[0]=Xe[0].replace(ot,"/"),Ee=Xe.join(Qe);var We=Ee;if(We=We.trim(),!je&&Ee.split("#").length===1){var rt=re.exec(We);if(rt)return this.path=We,this.href=We,this.pathname=rt[1],rt[2]?(this.search=rt[2],this.query=Oe?Te.parse(this.search.substr(1)):this.search.substr(1)):Oe&&(this.search="",this.query={}),this}var Ye=z.exec(We);if(Ye){Ye=Ye[0];var ut=Ye.toLowerCase();this.protocol=ut,We=We.substr(Ye.length)}if(je||Ye||We.match(/^\/\/[^@\/]+@[^@\/]+/)){var Ge=We.substr(0,2)==="//";!Ge||Ye&&pe[Ye]||(We=We.substr(2),this.slashes=!0)}if(!pe[Ye]&&(Ge||Ye&&!ke[Ye])){for(var ze=-1,Ve=0;Ve<me.length;Ve++){var $e=We.indexOf(me[Ve]);$e!==-1&&(ze===-1||$e<ze)&&(ze=$e)}var nt,et;et=ze===-1?We.lastIndexOf("@"):We.lastIndexOf("@",ze),et!==-1&&(nt=We.slice(0,et),We=We.slice(et+1),this.auth=decodeURIComponent(nt)),ze=-1;for(var Ve=0;Ve<ye.length;Ve++){var $e=We.indexOf(ye[Ve]);$e!==-1&&(ze===-1||$e<ze)&&(ze=$e)}ze===-1&&(ze=We.length),this.host=We.slice(0,ze),We=We.slice(ze),this.parseHost(),this.hostname=this.hostname||"";var pt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pt)for(var ct=this.hostname.split(/\./),Ve=0,Rt=ct.length;Ve<Rt;Ve++){var dt=ct[Ve];if(dt&&!dt.match(ge)){for(var Mt="",xt=0,yt=dt.length;xt<yt;xt++)dt.charCodeAt(xt)>127?Mt+="x":Mt+=dt[xt];if(!Mt.match(ge)){var bt=ct.slice(0,Ve),He=ct.slice(Ve+1),Ae=dt.match(_e);Ae&&(bt.push(Ae[1]),He.unshift(Ae[2])),He.length&&(We="/"+He.join(".")+We),this.hostname=bt.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),pt||(this.hostname=E.toASCII(this.hostname));var be=this.port?":"+this.port:"",Be=this.hostname||"";this.host=Be+be,this.href+=this.host,pt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),We[0]!=="/"&&(We="/"+We))}if(!he[ut])for(var Ve=0,Rt=ve.length;Ve<Rt;Ve++){var Ke=ve[Ve];if(We.indexOf(Ke)!==-1){var Ne=encodeURIComponent(Ke);Ne===Ke&&(Ne=escape(Ke)),We=We.split(Ke).join(Ne)}}var De=We.indexOf("#");De!==-1&&(this.hash=We.substr(De),We=We.slice(0,De));var we=We.indexOf("?");if(we!==-1?(this.search=We.substr(we),this.query=We.substr(we+1),Oe&&(this.query=Te.parse(this.query)),We=We.slice(0,we)):Oe&&(this.search="",this.query={}),We&&(this.pathname=We),ke[ut]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var be=this.pathname||"",Le=this.search||"";this.path=be+Le}return this.href=this.format(),this},se.prototype.format=function(){var Ee=this.auth||"";Ee&&(Ee=encodeURIComponent(Ee),Ee=Ee.replace(/%3A/i,":"),Ee+="@");var Oe=this.protocol||"",je=this.pathname||"",Pe=this.hash||"",Qe=!1,Xe="";this.host?Qe=Ee+this.host:this.hostname&&(Qe=Ee+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Qe+=":"+this.port)),this.query&&b.isObject(this.query)&&Object.keys(this.query).length&&(Xe=Te.stringify(this.query));var ot=this.search||Xe&&"?"+Xe||"";return Oe&&Oe.substr(-1)!==":"&&(Oe+=":"),this.slashes||(!Oe||ke[Oe])&&Qe!==!1?(Qe="//"+(Qe||""),je&&je.charAt(0)!=="/"&&(je="/"+je)):Qe||(Qe=""),Pe&&Pe.charAt(0)!=="#"&&(Pe="#"+Pe),ot&&ot.charAt(0)!=="?"&&(ot="?"+ot),je=je.replace(/[?#]/g,function(We){return encodeURIComponent(We)}),ot=ot.replace("#","%23"),Oe+Qe+je+ot+Pe},se.prototype.resolve=function(Ee){return this.resolveObject(te(Ee,!1,!0)).format()},se.prototype.resolveObject=function(Ee){if(b.isString(Ee)){var Oe=new se;Oe.parse(Ee,!1,!0),Ee=Oe}for(var je=new se,Pe=Object.keys(this),Qe=0;Qe<Pe.length;Qe++){var Xe=Pe[Qe];je[Xe]=this[Xe]}if(je.hash=Ee.hash,Ee.href==="")return je.href=je.format(),je;if(Ee.slashes&&!Ee.protocol){for(var ot=Object.keys(Ee),We=0;We<ot.length;We++){var rt=ot[We];rt!=="protocol"&&(je[rt]=Ee[rt])}return ke[je.protocol]&&je.hostname&&!je.pathname&&(je.path=je.pathname="/"),je.href=je.format(),je}if(Ee.protocol&&Ee.protocol!==je.protocol){if(!ke[Ee.protocol]){for(var Ye=Object.keys(Ee),ut=0;ut<Ye.length;ut++){var Ge=Ye[ut];je[Ge]=Ee[Ge]}return je.href=je.format(),je}if(je.protocol=Ee.protocol,Ee.host||pe[Ee.protocol])je.pathname=Ee.pathname;else{for(var Rt=(Ee.pathname||"").split("/");Rt.length&&!(Ee.host=Rt.shift()););Ee.host||(Ee.host=""),Ee.hostname||(Ee.hostname=""),Rt[0]!==""&&Rt.unshift(""),Rt.length<2&&Rt.unshift(""),je.pathname=Rt.join("/")}if(je.search=Ee.search,je.query=Ee.query,je.host=Ee.host||"",je.auth=Ee.auth,je.hostname=Ee.hostname||Ee.host,je.port=Ee.port,je.pathname||je.search){var ze=je.pathname||"",Ve=je.search||"";je.path=ze+Ve}return je.slashes=je.slashes||Ee.slashes,je.href=je.format(),je}var $e=je.pathname&&je.pathname.charAt(0)==="/",nt=Ee.host||Ee.pathname&&Ee.pathname.charAt(0)==="/",et=nt||$e||je.host&&Ee.pathname,pt=et,ct=je.pathname&&je.pathname.split("/")||[],Rt=Ee.pathname&&Ee.pathname.split("/")||[],dt=je.protocol&&!ke[je.protocol];if(dt&&(je.hostname="",je.port=null,je.host&&(ct[0]===""?ct[0]=je.host:ct.unshift(je.host)),je.host="",Ee.protocol&&(Ee.hostname=null,Ee.port=null,Ee.host&&(Rt[0]===""?Rt[0]=Ee.host:Rt.unshift(Ee.host)),Ee.host=null),et=et&&(Rt[0]===""||ct[0]==="")),nt)je.host=Ee.host||Ee.host===""?Ee.host:je.host,je.hostname=Ee.hostname||Ee.hostname===""?Ee.hostname:je.hostname,je.search=Ee.search,je.query=Ee.query,ct=Rt;else if(Rt.length)ct||(ct=[]),ct.pop(),ct=ct.concat(Rt),je.search=Ee.search,je.query=Ee.query;else if(!b.isNullOrUndefined(Ee.search)){if(dt){je.hostname=je.host=ct.shift();var Mt=!!(je.host&&je.host.indexOf("@")>0)&&je.host.split("@");Mt&&(je.auth=Mt.shift(),je.host=je.hostname=Mt.shift())}return je.search=Ee.search,je.query=Ee.query,b.isNull(je.pathname)&&b.isNull(je.search)||(je.path=(je.pathname?je.pathname:"")+(je.search?je.search:"")),je.href=je.format(),je}if(!ct.length)return je.pathname=null,je.search?je.path="/"+je.search:je.path=null,je.href=je.format(),je;for(var xt=ct.slice(-1)[0],yt=(je.host||Ee.host||ct.length>1)&&(xt==="."||xt==="..")||xt==="",bt=0,He=ct.length;He>=0;He--)xt=ct[He],xt==="."?ct.splice(He,1):xt===".."?(ct.splice(He,1),bt++):bt&&(ct.splice(He,1),bt--);if(!et&&!pt)for(;bt--;bt)ct.unshift("..");!et||ct[0]===""||ct[0]&&ct[0].charAt(0)==="/"||ct.unshift(""),yt&&ct.join("/").substr(-1)!=="/"&&ct.push("");var Ae=ct[0]===""||ct[0]&&ct[0].charAt(0)==="/";if(dt){je.hostname=je.host=Ae?"":ct.length?ct.shift():"";var Mt=!!(je.host&&je.host.indexOf("@")>0)&&je.host.split("@");Mt&&(je.auth=Mt.shift(),je.host=je.hostname=Mt.shift())}return et=et||je.host&&ct.length,et&&!Ae&&ct.unshift(""),ct.length?je.pathname=ct.join("/"):(je.pathname=null,je.path=null),b.isNull(je.pathname)&&b.isNull(je.search)||(je.path=(je.pathname?je.pathname:"")+(je.search?je.search:"")),je.auth=Ee.auth||je.auth,je.slashes=je.slashes||Ee.slashes,je.href=je.format(),je},se.prototype.parseHost=function(){var Ee=this.host,Oe=x.exec(Ee);Oe&&(Oe=Oe[0],Oe!==":"&&(this.port=Oe.substr(1)),Ee=Ee.substr(0,Ee.length-Oe.length)),Ee&&(this.hostname=Ee)}},{"./util":204,punycode:174,querystring:177}],204:[function(ie,Ce,ue){"use strict";Ce.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,Ce,ue){(function(se){function te(ee,ne){function E(){if(!b){if(le("throwDeprecation"))throw new Error(ne);le("traceDeprecation")?console.trace(ne):console.warn(ne),b=!0}return ee.apply(this,arguments)}if(le("noDeprecation"))return ee;var b=!1;return E}function le(ee){try{if(!se.localStorage)return!1}catch(E){return!1}var ne=se.localStorage[ee];return ne!=null&&String(ne).toLowerCase()==="true"}Ce.exports=te}).call(this,typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(ie,Ce,ue){Ce.exports=function(se){return se&&typeof se=="object"&&typeof se.copy=="function"&&typeof se.fill=="function"&&typeof se.readUInt8=="function"}},{}],207:[function(ie,Ce,ue){(function(se,te){function le(Ve,$e){var nt={seen:[],stylize:ne};return arguments.length>=3&&(nt.depth=arguments[2]),arguments.length>=4&&(nt.colors=arguments[3]),ye($e)?nt.showHidden=$e:$e&&ue._extend(nt,$e),ke(nt.showHidden)&&(nt.showHidden=!1),ke(nt.depth)&&(nt.depth=2),ke(nt.colors)&&(nt.colors=!1),ke(nt.customInspect)&&(nt.customInspect=!0),nt.colors&&(nt.stylize=ee),b(nt,Ve,nt.depth)}function ee(Ve,$e){var nt=le.styles[$e];return nt?"\x1B["+le.colors[nt][0]+"m"+Ve+"\x1B["+le.colors[nt][1]+"m":Ve}function ne(Ve,$e){return Ve}function E(Ve){var $e={};return Ve.forEach(function(nt,et){$e[nt]=!0}),$e}function b(Ve,$e,nt){if(Ve.customInspect&&$e&&Pe($e.inspect)&&$e.inspect!==ue.inspect&&(!$e.constructor||$e.constructor.prototype!==$e)){var et=$e.inspect(nt,Ve);return he(et)||(et=b(Ve,et,nt)),et}var pt=z(Ve,$e);if(pt)return pt;var ct=Object.keys($e),Rt=E(ct);if(Ve.showHidden&&(ct=Object.getOwnPropertyNames($e)),je($e)&&(ct.indexOf("message")>=0||ct.indexOf("description")>=0))return x($e);if(ct.length===0){if(Pe($e)){var dt=$e.name?": "+$e.name:"";return Ve.stylize("[Function"+dt+"]","special")}if(Te($e))return Ve.stylize(RegExp.prototype.toString.call($e),"regexp");if(Oe($e))return Ve.stylize(Date.prototype.toString.call($e),"date");if(je($e))return x($e)}var Mt="",xt=!1,yt=["{","}"];if(ve($e)&&(xt=!0,yt=["[","]"]),Pe($e)&&(Mt=" [Function"+($e.name?": "+$e.name:"")+"]"),Te($e)&&(Mt=" "+RegExp.prototype.toString.call($e)),Oe($e)&&(Mt=" "+Date.prototype.toUTCString.call($e)),je($e)&&(Mt=" "+x($e)),ct.length===0&&(!xt||$e.length==0))return yt[0]+Mt+yt[1];if(nt<0)return Te($e)?Ve.stylize(RegExp.prototype.toString.call($e),"regexp"):Ve.stylize("[Object]","special");Ve.seen.push($e);var bt;return bt=xt?re(Ve,$e,nt,Rt,ct):ct.map(function(He){return ae(Ve,$e,nt,Rt,He,xt)}),Ve.seen.pop(),oe(bt,Mt,yt)}function z(Ve,$e){if(ke($e))return Ve.stylize("undefined","undefined");if(he($e)){var nt="'"+JSON.stringify($e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Ve.stylize(nt,"string")}return _e($e)?Ve.stylize(""+$e,"number"):ye($e)?Ve.stylize(""+$e,"boolean"):me($e)?Ve.stylize("null","null"):void 0}function x(Ve){return"["+Error.prototype.toString.call(Ve)+"]"}function re(Ve,$e,nt,et,pt){for(var ct=[],Rt=0,dt=$e.length;Rt<dt;++Rt)rt($e,String(Rt))?ct.push(ae(Ve,$e,nt,et,String(Rt),!0)):ct.push("");return pt.forEach(function(Mt){Mt.match(/^\d+$/)||ct.push(ae(Ve,$e,nt,et,Mt,!0))}),ct}function ae(Ve,$e,nt,et,pt,ct){var Rt,dt,Mt;if(Mt=Object.getOwnPropertyDescriptor($e,pt)||{value:$e[pt]},Mt.get?dt=Mt.set?Ve.stylize("[Getter/Setter]","special"):Ve.stylize("[Getter]","special"):Mt.set&&(dt=Ve.stylize("[Setter]","special")),rt(et,pt)||(Rt="["+pt+"]"),dt||(Ve.seen.indexOf(Mt.value)<0?(dt=me(nt)?b(Ve,Mt.value,null):b(Ve,Mt.value,nt-1),dt.indexOf(`
`)>-1&&(dt=ct?dt.split(`
`).map(function(xt){return" "+xt}).join(`
`).substr(2):`
`+dt.split(`
`).map(function(xt){return" "+xt}).join(`
`))):dt=Ve.stylize("[Circular]","special")),ke(Rt)){if(ct&&pt.match(/^\d+$/))return dt;Rt=JSON.stringify(""+pt),Rt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(Rt=Rt.substr(1,Rt.length-2),Rt=Ve.stylize(Rt,"name")):(Rt=Rt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),Rt=Ve.stylize(Rt,"string"))}return Rt+": "+dt}function oe(Ve,$e,nt){var et=0;return Ve.reduce(function(pt,ct){return et++,ct.indexOf(`
`)>=0&&et++,pt+ct.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?nt[0]+($e===""?"":$e+`
`)+" "+Ve.join(`,
`)+" "+nt[1]:nt[0]+$e+" "+Ve.join(", ")+" "+nt[1]}function ve(Ve){return Array.isArray(Ve)}function ye(Ve){return typeof Ve=="boolean"}function me(Ve){return Ve===null}function ge(Ve){return Ve==null}function _e(Ve){return typeof Ve=="number"}function he(Ve){return typeof Ve=="string"}function pe(Ve){return typeof Ve=="symbol"}function ke(Ve){return Ve===void 0}function Te(Ve){return Ee(Ve)&&Xe(Ve)==="[object RegExp]"}function Ee(Ve){return typeof Ve=="object"&&Ve!==null}function Oe(Ve){return Ee(Ve)&&Xe(Ve)==="[object Date]"}function je(Ve){return Ee(Ve)&&(Xe(Ve)==="[object Error]"||Ve instanceof Error)}function Pe(Ve){return typeof Ve=="function"}function Qe(Ve){return Ve===null||typeof Ve=="boolean"||typeof Ve=="number"||typeof Ve=="string"||typeof Ve=="symbol"||Ve===void 0}function Xe(Ve){return Object.prototype.toString.call(Ve)}function ot(Ve){return Ve<10?"0"+Ve.toString(10):Ve.toString(10)}function We(){var Ve=new Date,$e=[ot(Ve.getHours()),ot(Ve.getMinutes()),ot(Ve.getSeconds())].join(":");return[Ve.getDate(),ze[Ve.getMonth()],$e].join(" ")}function rt(Ve,$e){return Object.prototype.hasOwnProperty.call(Ve,$e)}var Ye=/%[sdj%]/g;ue.format=function(Ve){if(!he(Ve)){for(var $e=[],nt=0;nt<arguments.length;nt++)$e.push(le(arguments[nt]));return $e.join(" ")}for(var nt=1,et=arguments,pt=et.length,ct=String(Ve).replace(Ye,function(Mt){if(Mt==="%%")return"%";if(nt>=pt)return Mt;switch(Mt){case"%s":return String(et[nt++]);case"%d":return Number(et[nt++]);case"%j":try{return JSON.stringify(et[nt++])}catch(xt){return"[Circular]"}default:return Mt}}),Rt=et[nt];nt<pt;Rt=et[++nt])me(Rt)||!Ee(Rt)?ct+=" "+Rt:ct+=" "+le(Rt);return ct},ue.deprecate=function(Ve,$e){function nt(){if(!et){if(se.throwDeprecation)throw new Error($e);se.traceDeprecation?console.trace($e):console.error($e),et=!0}return Ve.apply(this,arguments)}if(ke(te.process))return function(){return ue.deprecate(Ve,$e).apply(this,arguments)};if(se.noDeprecation===!0)return Ve;var et=!1;return nt};var ut,Ge={};ue.debuglog=function(Ve){if(ke(ut)&&(ut=se.env.NODE_DEBUG||""),Ve=Ve.toUpperCase(),!Ge[Ve])if(new RegExp("\\b"+Ve+"\\b","i").test(ut)){var $e=se.pid;Ge[Ve]=function(){var nt=ue.format.apply(ue,arguments);console.error("%s %d: %s",Ve,$e,nt)}}else Ge[Ve]=function(){};return Ge[Ve]},ue.inspect=le,le.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]},le.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ue.isArray=ve,ue.isBoolean=ye,ue.isNull=me,ue.isNullOrUndefined=ge,ue.isNumber=_e,ue.isString=he,ue.isSymbol=pe,ue.isUndefined=ke,ue.isRegExp=Te,ue.isObject=Ee,ue.isDate=Oe,ue.isError=je,ue.isFunction=Pe,ue.isPrimitive=Qe,ue.isBuffer=ie("./support/isBuffer");var ze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ue.log=function(){console.log("%s - %s",We(),ue.format.apply(ue,arguments))},ue.inherits=ie("inherits"),ue._extend=function(Ve,$e){if(!$e||!Ee($e))return Ve;for(var nt=Object.keys($e),et=nt.length;et--;)Ve[nt[et]]=$e[nt[et]];return Ve}}).call(this,ie("_process"),typeof Se.g!="undefined"?Se.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(ie,Ce,ue){"use strict";(function(){ue.stripBOM=function(se){return se[0]==="\uFEFF"?se.substring(1):se}}).call(void 0)},{}],209:[function(ie,Ce,ue){"use strict";function se(E){return E&&E.__esModule?E:{default:E}}var te=ie("babel-runtime/helpers/typeof"),le=se(te),ee=ie("babel-runtime/core-js/object/keys"),ne=se(ee);(function(){var E,b,z,x,re,ae={}.hasOwnProperty;E=ie("xmlbuilder"),b=ie("./defaults").defaults,x=function(oe){return typeof oe=="string"&&(oe.indexOf("&")>=0||oe.indexOf(">")>=0||oe.indexOf("<")>=0)},re=function(oe){return"<![CDATA["+z(oe)+"]]>"},z=function(oe){return oe.replace("]]>","]]]]><![CDATA[>")},ue.Builder=function(){function oe(ve){var ye,me,ge;this.options={},me=b[.2];for(ye in me)ae.call(me,ye)&&(ge=me[ye],this.options[ye]=ge);for(ye in ve)ae.call(ve,ye)&&(ge=ve[ye],this.options[ye]=ge)}return oe.prototype.buildObject=function(ve){var ye,me,ge,_e,he;return ye=this.options.attrkey,me=this.options.charkey,(0,ne.default)(ve).length===1&&this.options.rootName===b[.2].rootName?(he=(0,ne.default)(ve)[0],ve=ve[he]):he=this.options.rootName,ge=function(pe){return function(ke,Te){var Ee,Oe,je,Pe,Qe,Xe;if((Te===void 0?"undefined":(0,le.default)(Te))!=="object")pe.options.cdata&&x(Te)?ke.raw(re(Te)):ke.txt(Te);else if(Array.isArray(Te)){for(Pe in Te)if(ae.call(Te,Pe)){Oe=Te[Pe];for(Qe in Oe)je=Oe[Qe],ke=ge(ke.ele(Qe),je).up()}}else for(Qe in Te)if(ae.call(Te,Qe))if(Oe=Te[Qe],Qe===ye){if((Oe===void 0?"undefined":(0,le.default)(Oe))==="object")for(Ee in Oe)Xe=Oe[Ee],ke=ke.att(Ee,Xe)}else if(Qe===me)ke=pe.options.cdata&&x(Oe)?ke.raw(re(Oe)):ke.txt(Oe);else if(Array.isArray(Oe))for(Pe in Oe)ae.call(Oe,Pe)&&(je=Oe[Pe],ke=typeof je=="string"?pe.options.cdata&&x(je)?ke.ele(Qe).raw(re(je)).up():ke.ele(Qe,je).up():ge(ke.ele(Qe),je).up());else(Oe===void 0?"undefined":(0,le.default)(Oe))==="object"?ke=ge(ke.ele(Qe),Oe).up():typeof Oe=="string"&&pe.options.cdata&&x(Oe)?ke=ke.ele(Qe).raw(re(Oe)).up():(Oe==null&&(Oe=""),ke=ke.ele(Qe,Oe.toString()).up());return ke}}(this),_e=E.create(he,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ge(_e,ve).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,Ce,ue){"use strict";(function(){ue.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,Ce,ue){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var te=ie("babel-runtime/core-js/object/get-own-property-names"),le=se(te),ee=ie("babel-runtime/core-js/object/keys"),ne=se(ee),E=ie("babel-runtime/helpers/typeof"),b=se(E);(function(){var z,x,re,ae,oe,ve,ye,me,ge=function(pe,ke){return function(){return pe.apply(ke,arguments)}},_e=function(pe,ke){function Te(){this.constructor=pe}for(var Ee in ke)he.call(ke,Ee)&&(pe[Ee]=ke[Ee]);return Te.prototype=ke.prototype,pe.prototype=new Te,pe.__super__=ke.prototype,pe},he={}.hasOwnProperty;ye=ie("sax"),re=ie("events"),z=ie("./bom"),ve=ie("./processors"),me=ie("timers").setImmediate,x=ie("./defaults").defaults,ae=function(pe){return(pe===void 0?"undefined":(0,b.default)(pe))==="object"&&pe!=null&&(0,ne.default)(pe).length===0},oe=function(pe,ke,Te){var Ee,Oe,je;for(Ee=0,Oe=pe.length;Ee<Oe;Ee++)je=pe[Ee],ke=je(ke,Te);return ke},ue.Parser=function(pe){function ke(Te){this.parseString=ge(this.parseString,this),this.reset=ge(this.reset,this),this.assignOrPush=ge(this.assignOrPush,this),this.processAsync=ge(this.processAsync,this);var Ee,Oe,je;if(!(this instanceof ue.Parser))return new ue.Parser(Te);this.options={},Oe=x[.2];for(Ee in Oe)he.call(Oe,Ee)&&(je=Oe[Ee],this.options[Ee]=je);for(Ee in Te)he.call(Te,Ee)&&(je=Te[Ee],this.options[Ee]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ve.normalize)),this.reset()}return _e(ke,pe),ke.prototype.processAsync=function(){var Te,Ee;try{return this.remaining.length<=this.options.chunkSize?(Te=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Te),this.saxParser.close()):(Te=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Te),me(this.processAsync))}catch(Oe){if(Ee=Oe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Ee)}},ke.prototype.assignOrPush=function(Te,Ee,Oe){return Ee in Te?(Te[Ee]instanceof Array||(Te[Ee]=[Te[Ee]]),Te[Ee].push(Oe)):this.options.explicitArray?Te[Ee]=[Oe]:Te[Ee]=Oe},ke.prototype.reset=function(){var Te,Ee,Oe,je;return this.removeAllListeners(),this.saxParser=ye.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,je=[],Te=this.options.attrkey,Ee=this.options.charkey,this.saxParser.onopentag=function(Pe){return function(Qe){var Xe,ot,We,rt,Ye;if(We={},We[Ee]="",!Pe.options.ignoreAttrs){Ye=Qe.attributes;for(Xe in Ye)he.call(Ye,Xe)&&(Te in We||Pe.options.mergeAttrs||(We[Te]={}),ot=Pe.options.attrValueProcessors?oe(Pe.options.attrValueProcessors,Qe.attributes[Xe],Xe):Qe.attributes[Xe],rt=Pe.options.attrNameProcessors?oe(Pe.options.attrNameProcessors,Xe):Xe,Pe.options.mergeAttrs?Pe.assignOrPush(We,rt,ot):We[Te][rt]=ot)}return We["#name"]=Pe.options.tagNameProcessors?oe(Pe.options.tagNameProcessors,Qe.name):Qe.name,Pe.options.xmlns&&(We[Pe.options.xmlnskey]={uri:Qe.uri,local:Qe.local}),je.push(We)}}(this),this.saxParser.onclosetag=function(Pe){return function(){var Qe,Xe,ot,We,rt,Ye,ut,Ge,ze,Ve;if(Ye=je.pop(),rt=Ye["#name"],Pe.options.explicitChildren&&Pe.options.preserveChildrenOrder||delete Ye["#name"],Ye.cdata===!0&&(Qe=Ye.cdata,delete Ye.cdata),ze=je[je.length-1],Ye[Ee].match(/^\s*$/)&&!Qe?(Xe=Ye[Ee],delete Ye[Ee]):(Pe.options.trim&&(Ye[Ee]=Ye[Ee].trim()),Pe.options.normalize&&(Ye[Ee]=Ye[Ee].replace(/\s{2,}/g," ").trim()),Ye[Ee]=Pe.options.valueProcessors?oe(Pe.options.valueProcessors,Ye[Ee],rt):Ye[Ee],(0,ne.default)(Ye).length===1&&Ee in Ye&&!Pe.EXPLICIT_CHARKEY&&(Ye=Ye[Ee])),ae(Ye)&&(Ye=Pe.options.emptyTag!==""?Pe.options.emptyTag:Xe),Pe.options.validator!=null&&(Ve="/"+function(){var $e,nt,et;for(et=[],$e=0,nt=je.length;$e<nt;$e++)We=je[$e],et.push(We["#name"]);return et}().concat(rt).join("/"),function(){var $e;try{Ye=Pe.options.validator(Ve,ze&&ze[rt],Ye)}catch(nt){return $e=nt,Pe.emit("error",$e)}}()),Pe.options.explicitChildren&&!Pe.options.mergeAttrs&&(Ye===void 0?"undefined":(0,b.default)(Ye))==="object")if(Pe.options.preserveChildrenOrder){if(ze){ze[Pe.options.childkey]=ze[Pe.options.childkey]||[],ut={};for(ot in Ye)he.call(Ye,ot)&&(ut[ot]=Ye[ot]);ze[Pe.options.childkey].push(ut),delete Ye["#name"],(0,ne.default)(Ye).length===1&&Ee in Ye&&!Pe.EXPLICIT_CHARKEY&&(Ye=Ye[Ee])}}else We={},Pe.options.attrkey in Ye&&(We[Pe.options.attrkey]=Ye[Pe.options.attrkey],delete Ye[Pe.options.attrkey]),!Pe.options.charsAsChildren&&Pe.options.charkey in Ye&&(We[Pe.options.charkey]=Ye[Pe.options.charkey],delete Ye[Pe.options.charkey]),(0,le.default)(Ye).length>0&&(We[Pe.options.childkey]=Ye),Ye=We;return je.length>0?Pe.assignOrPush(ze,rt,Ye):(Pe.options.explicitRoot&&(Ge=Ye,Ye={},Ye[rt]=Ge),Pe.resultObject=Ye,Pe.saxParser.ended=!0,Pe.emit("end",Pe.resultObject))}}(this),Oe=function(Pe){return function(Qe){var Xe,ot;if(ot=je[je.length-1])return ot[Ee]+=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]||[],Xe={"#name":"__text__"},Xe[Ee]=Qe,Pe.options.normalize&&(Xe[Ee]=Xe[Ee].replace(/\s{2,}/g," ").trim()),ot[Pe.options.childkey].push(Xe)),ot}}(this),this.saxParser.ontext=Oe,this.saxParser.oncdata=function(Pe){return function(Qe){var Xe;if(Xe=Oe(Qe))return Xe.cdata=!0}}()},ke.prototype.parseString=function(Te,Ee){var Oe;Ee!=null&&typeof Ee=="function"&&(this.on("end",function(je){return this.reset(),Ee(null,je)}),this.on("error",function(je){return this.reset(),Ee(je)}));try{return Te=Te.toString(),Te.trim()===""?(this.emit("end",null),!0):(Te=z.stripBOM(Te),this.options.async?(this.remaining=Te,me(this.processAsync),this.saxParser):this.saxParser.write(Te).close())}catch(je){if(Oe=je,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Oe),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Oe}},ke}(re.EventEmitter),ue.parseString=function(pe,ke,Te){var Ee,Oe,je;return Te!=null?(typeof Te=="function"&&(Ee=Te),(ke===void 0?"undefined":(0,b.default)(ke))==="object"&&(Oe=ke)):(typeof ke=="function"&&(Ee=ke),Oe={}),je=new ue.Parser(Oe),je.parseString(pe,Ee)}}).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,Ce,ue){"use strict";(function(){var se;se=new RegExp(/(?!xmlns)^.*:/),ue.normalize=function(te){return te.toLowerCase()},ue.firstCharLowerCase=function(te){return te.charAt(0).toLowerCase()+te.slice(1)},ue.stripPrefix=function(te){return te.replace(se,"")},ue.parseNumbers=function(te){return isNaN(te)||(te=te%1==0?parseInt(te,10):parseFloat(te)),te},ue.parseBooleans=function(te){return/^(?:true|false)$/i.test(te)&&(te=te.toLowerCase()==="true"),te}}).call(void 0)},{}],213:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne=function(b,z){function x(){this.constructor=b}for(var re in z)E.call(z,re)&&(b[re]=z[re]);return x.prototype=z.prototype,b.prototype=new x,b.__super__=z.prototype,b},E={}.hasOwnProperty;te=ie("./defaults"),se=ie("./builder"),le=ie("./parser"),ee=ie("./processors"),ue.defaults=te.defaults,ue.processors=ee,ue.ValidationError=function(b){function z(x){this.message=x}return ne(z,b),z}(Error),ue.Builder=se.Builder,ue.Parser=le.Parser,ue.parseString=le.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(ie,Ce,ue){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var te=ie("babel-runtime/core-js/object/get-prototype-of"),le=se(te),ee=ie("babel-runtime/helpers/typeof"),ne=se(ee),E=ie("babel-runtime/core-js/object/assign"),b=se(E);(function(){var z,x,re,ae,oe,ve,ye=[].slice,me={}.hasOwnProperty;z=function(){var ge,_e,he,pe,ke,Te;if(Te=arguments[0],ke=2<=arguments.length?ye.call(arguments,1):[],ae(b.default))b.default.apply(null,arguments);else for(ge=0,he=ke.length;ge<he;ge++)if((pe=ke[ge])!=null)for(_e in pe)me.call(pe,_e)&&(Te[_e]=pe[_e]);return Te},ae=function(ge){return!!ge&&Object.prototype.toString.call(ge)==="[object Function]"},oe=function(ge){var _e;return!!ge&&((_e=ge===void 0?"undefined":(0,ne.default)(ge))==="function"||_e==="object")},x=function(ge){return ae(Array.isArray)?Array.isArray(ge):Object.prototype.toString.call(ge)==="[object Array]"},re=function(ge){var _e;if(x(ge))return!ge.length;for(_e in ge)if(me.call(ge,_e))return!1;return!0},ve=function(ge){var _e,he;return oe(ge)&&(he=(0,le.default)(ge))&&(_e=he.constructor)&&typeof _e=="function"&&_e instanceof _e&&Function.prototype.toString.call(_e)===Function.prototype.toString.call(Object)},Ce.exports.assign=z,Ce.exports.isFunction=ae,Ce.exports.isObject=oe,Ce.exports.isArray=x,Ce.exports.isEmpty=re,Ce.exports.isPlainObject=ve}).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,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){Ce.exports=function(){function le(ee,ne,E){if(this.options=ee.options,this.stringify=ee.stringify,ne==null)throw new Error("Missing attribute name of element "+ee.name);if(E==null)throw new Error("Missing attribute value for attribute "+ne+" of element "+ee.name);this.name=this.stringify.attName(ne),this.value=this.stringify.attValue(E)}return le.prototype.clone=function(){return(0,te.default)(this)},le.prototype.toString=function(ee){return this.options.writer.set(ee).attribute(this)},le}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).cdata(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing comment text");this.text=this.stringify.comment(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).comment(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z,x,re,ae){if(ne.__super__.constructor.call(this,E),b==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(!re)throw new Error("Missing DTD attribute default");if(re.indexOf("#")!==0&&(re="#"+re),!re.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(ae&&!re.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(b),this.attributeName=this.stringify.attName(z),this.attributeType=this.stringify.dtdAttType(x),this.defaultValue=this.stringify.dtdAttDefault(ae),this.defaultValueType=re}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdAttList(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],219:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z){if(ne.__super__.constructor.call(this,E),b==null)throw new Error("Missing DTD element name");z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.eleName(b),this.value=this.stringify.dtdElementValue(z)}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdElement(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],220:[function(ie,Ce,ue){"use strict";(function(){var se,te,le=function(ne,E){function b(){this.constructor=ne}for(var z in E)ee.call(E,z)&&(ne[z]=E[z]);return b.prototype=E.prototype,ne.prototype=new b,ne.__super__=E.prototype,ne},ee={}.hasOwnProperty;te=ie("./Utility").isObject,se=ie("./XMLNode"),Ce.exports=function(ne){function E(b,z,x,re){if(E.__super__.constructor.call(this,b),x==null)throw new Error("Missing entity name");if(re==null)throw new Error("Missing entity value");if(this.pe=!!z,this.name=this.stringify.eleName(x),te(re)){if(!re.pubID&&!re.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(re.pubID&&!re.sysID)throw new Error("System identifier is required for a public external entity");if(re.pubID!=null&&(this.pubID=this.stringify.dtdPubID(re.pubID)),re.sysID!=null&&(this.sysID=this.stringify.dtdSysID(re.sysID)),re.nData!=null&&(this.nData=this.stringify.dtdNData(re.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(re)}return le(E,ne),E.prototype.toString=function(b){return this.options.writer.set(b).dtdEntity(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z){if(ne.__super__.constructor.call(this,E),b==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(b),z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdNotation(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],222:[function(ie,Ce,ue){"use strict";(function(){var se,te,le=function(ne,E){function b(){this.constructor=ne}for(var z in E)ee.call(E,z)&&(ne[z]=E[z]);return b.prototype=E.prototype,ne.prototype=new b,ne.__super__=E.prototype,ne},ee={}.hasOwnProperty;te=ie("./Utility").isObject,se=ie("./XMLNode"),Ce.exports=function(ne){function E(b,z,x,re){var ae;E.__super__.constructor.call(this,b),te(z)&&(ae=z,z=ae.version,x=ae.encoding,re=ae.standalone),z||(z="1.0"),this.version=this.stringify.xmlVersion(z),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),re!=null&&(this.standalone=this.stringify.xmlStandalone(re))}return le(E,ne),E.prototype.toString=function(b){return this.options.writer.set(b).declaration(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b=function(x,re){function ae(){this.constructor=x}for(var oe in re)z.call(re,oe)&&(x[oe]=re[oe]);return ae.prototype=re.prototype,x.prototype=new ae,x.__super__=re.prototype,x},z={}.hasOwnProperty;E=ie("./Utility").isObject,ne=ie("./XMLNode"),se=ie("./XMLDTDAttList"),le=ie("./XMLDTDEntity"),te=ie("./XMLDTDElement"),ee=ie("./XMLDTDNotation"),Ce.exports=function(x){function re(ae,oe,ve){var ye,me;re.__super__.constructor.call(this,ae),this.documentObject=ae,E(oe)&&(ye=oe,oe=ye.pubID,ve=ye.sysID),ve==null&&(me=[oe,ve],ve=me[0],oe=me[1]),oe!=null&&(this.pubID=this.stringify.dtdPubID(oe)),ve!=null&&(this.sysID=this.stringify.dtdSysID(ve))}return b(re,x),re.prototype.element=function(ae,oe){var ve;return ve=new te(this,ae,oe),this.children.push(ve),this},re.prototype.attList=function(ae,oe,ve,ye,me){var ge;return ge=new se(this,ae,oe,ve,ye,me),this.children.push(ge),this},re.prototype.entity=function(ae,oe){var ve;return ve=new le(this,!1,ae,oe),this.children.push(ve),this},re.prototype.pEntity=function(ae,oe){var ve;return ve=new le(this,!0,ae,oe),this.children.push(ve),this},re.prototype.notation=function(ae,oe){var ve;return ve=new ee(this,ae,oe),this.children.push(ve),this},re.prototype.toString=function(ae){return this.options.writer.set(ae).docType(this)},re.prototype.ele=function(ae,oe){return this.element(ae,oe)},re.prototype.att=function(ae,oe,ve,ye,me){return this.attList(ae,oe,ve,ye,me)},re.prototype.ent=function(ae,oe){return this.entity(ae,oe)},re.prototype.pent=function(ae,oe){return this.pEntity(ae,oe)},re.prototype.not=function(ae,oe){return this.notation(ae,oe)},re.prototype.up=function(){return this.root()||this.documentObject},re}(ne)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne=function(b,z){function x(){this.constructor=b}for(var re in z)E.call(z,re)&&(b[re]=z[re]);return x.prototype=z.prototype,b.prototype=new x,b.__super__=z.prototype,b},E={}.hasOwnProperty;ee=ie("./Utility").isPlainObject,se=ie("./XMLNode"),le=ie("./XMLStringifier"),te=ie("./XMLStringWriter"),Ce.exports=function(b){function z(x){z.__super__.constructor.call(this,null),x||(x={}),x.writer||(x.writer=new te),this.options=x,this.stringify=new le(x),this.isDocument=!0}return ne(z,b),z.prototype.end=function(x){var re;return x?ee(x)&&(re=x,x=this.options.writer.set(re)):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,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye,me,ge,_e,he,pe,ke={}.hasOwnProperty;pe=ie("./Utility"),_e=pe.isObject,ge=pe.isFunction,he=pe.isPlainObject,re=ie("./XMLElement"),te=ie("./XMLCData"),le=ie("./XMLComment"),oe=ie("./XMLRaw"),me=ie("./XMLText"),ae=ie("./XMLProcessingInstruction"),z=ie("./XMLDeclaration"),x=ie("./XMLDocType"),ee=ie("./XMLDTDAttList"),E=ie("./XMLDTDEntity"),ne=ie("./XMLDTDElement"),b=ie("./XMLDTDNotation"),se=ie("./XMLAttribute"),ye=ie("./XMLStringifier"),ve=ie("./XMLStringWriter"),Ce.exports=function(){function Te(Ee,Oe,je){var Pe;Ee||(Ee={}),Ee.writer?he(Ee.writer)&&(Pe=Ee.writer,Ee.writer=new ve(Pe)):Ee.writer=new ve(Ee),this.options=Ee,this.writer=Ee.writer,this.stringify=new ye(Ee),this.onDataCallback=Oe||function(){},this.onEndCallback=je||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Te.prototype.node=function(Ee,Oe,je){var Pe;if(Ee==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(),Ee=Ee.valueOf(),Oe==null&&(Oe={}),Oe=Oe.valueOf(),_e(Oe)||(Pe=[Oe,je],je=Pe[0],Oe=Pe[1]),this.currentNode=new re(this,Ee,Oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,je!=null&&this.text(je),this},Te.prototype.element=function(Ee,Oe,je){return this.currentNode&&this.currentNode instanceof x?this.dtdElement.apply(this,arguments):this.node(Ee,Oe,je)},Te.prototype.attribute=function(Ee,Oe){var je,Pe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Ee!=null&&(Ee=Ee.valueOf()),_e(Ee))for(je in Ee)ke.call(Ee,je)&&(Pe=Ee[je],this.attribute(je,Pe));else ge(Oe)&&(Oe=Oe.apply()),this.options.skipNullAttributes&&Oe==null||(this.currentNode.attributes[Ee]=new se(this,Ee,Oe));return this},Te.prototype.text=function(Ee){var Oe;return this.openCurrent(),Oe=new me(this,Ee),this.onData(this.writer.text(Oe,this.currentLevel+1)),this},Te.prototype.cdata=function(Ee){var Oe;return this.openCurrent(),Oe=new te(this,Ee),this.onData(this.writer.cdata(Oe,this.currentLevel+1)),this},Te.prototype.comment=function(Ee){var Oe;return this.openCurrent(),Oe=new le(this,Ee),this.onData(this.writer.comment(Oe,this.currentLevel+1)),this},Te.prototype.raw=function(Ee){var Oe;return this.openCurrent(),Oe=new oe(this,Ee),this.onData(this.writer.raw(Oe,this.currentLevel+1)),this},Te.prototype.instruction=function(Ee,Oe){var je,Pe,Qe,Xe,ot;if(this.openCurrent(),Ee!=null&&(Ee=Ee.valueOf()),Oe!=null&&(Oe=Oe.valueOf()),Array.isArray(Ee))for(je=0,Xe=Ee.length;je<Xe;je++)Pe=Ee[je],this.instruction(Pe);else if(_e(Ee))for(Pe in Ee)ke.call(Ee,Pe)&&(Qe=Ee[Pe],this.instruction(Pe,Qe));else ge(Oe)&&(Oe=Oe.apply()),ot=new ae(this,Ee,Oe),this.onData(this.writer.processingInstruction(ot,this.currentLevel+1));return this},Te.prototype.declaration=function(Ee,Oe,je){var Pe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Pe=new z(this,Ee,Oe,je),this.onData(this.writer.declaration(Pe,this.currentLevel+1)),this},Te.prototype.doctype=function(Ee,Oe,je){if(this.openCurrent(),Ee==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,Oe,je),this.currentNode.rootNodeName=Ee,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Te.prototype.dtdElement=function(Ee,Oe){var je;return this.openCurrent(),je=new ne(this,Ee,Oe),this.onData(this.writer.dtdElement(je,this.currentLevel+1)),this},Te.prototype.attList=function(Ee,Oe,je,Pe,Qe){var Xe;return this.openCurrent(),Xe=new ee(this,Ee,Oe,je,Pe,Qe),this.onData(this.writer.dtdAttList(Xe,this.currentLevel+1)),this},Te.prototype.entity=function(Ee,Oe){var je;return this.openCurrent(),je=new E(this,!1,Ee,Oe),this.onData(this.writer.dtdEntity(je,this.currentLevel+1)),this},Te.prototype.pEntity=function(Ee,Oe){var je;return this.openCurrent(),je=new E(this,!0,Ee,Oe),this.onData(this.writer.dtdEntity(je,this.currentLevel+1)),this},Te.prototype.notation=function(Ee,Oe){var je;return this.openCurrent(),je=new b(this,Ee,Oe),this.onData(this.writer.dtdNotation(je,this.currentLevel+1)),this},Te.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},Te.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Te.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Te.prototype.openNode=function(Ee){if(!Ee.isOpen)return!this.root&&this.currentLevel===0&&Ee instanceof re&&(this.root=Ee),this.onData(this.writer.openNode(Ee,this.currentLevel)),Ee.isOpen=!0},Te.prototype.closeNode=function(Ee){if(!Ee.isClosed)return this.onData(this.writer.closeNode(Ee,this.currentLevel)),Ee.isClosed=!0},Te.prototype.onData=function(Ee){return this.documentStarted=!0,this.onDataCallback(Ee)},Te.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Te.prototype.ele=function(){return this.element.apply(this,arguments)},Te.prototype.nod=function(Ee,Oe,je){return this.node(Ee,Oe,je)},Te.prototype.txt=function(Ee){return this.text(Ee)},Te.prototype.dat=function(Ee){return this.cdata(Ee)},Te.prototype.com=function(Ee){return this.comment(Ee)},Te.prototype.ins=function(Ee,Oe){return this.instruction(Ee,Oe)},Te.prototype.dec=function(Ee,Oe,je){return this.declaration(Ee,Oe,je)},Te.prototype.dtd=function(Ee,Oe,je){return this.doctype(Ee,Oe,je)},Te.prototype.e=function(Ee,Oe,je){return this.element(Ee,Oe,je)},Te.prototype.n=function(Ee,Oe,je){return this.node(Ee,Oe,je)},Te.prototype.t=function(Ee){return this.text(Ee)},Te.prototype.d=function(Ee){return this.cdata(Ee)},Te.prototype.c=function(Ee){return this.comment(Ee)},Te.prototype.r=function(Ee){return this.raw(Ee)},Te.prototype.i=function(Ee,Oe){return this.instruction(Ee,Oe)},Te.prototype.att=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Te.prototype.a=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Te.prototype.ent=function(Ee,Oe){return this.entity(Ee,Oe)},Te.prototype.pent=function(Ee,Oe){return this.pEntity(Ee,Oe)},Te.prototype.not=function(Ee,Oe){return this.notation(Ee,Oe)},Te}()}).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,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee,ne,E,b,z=function(re,ae){function oe(){this.constructor=re}for(var ve in ae)x.call(ae,ve)&&(re[ve]=ae[ve]);return oe.prototype=ae.prototype,re.prototype=new oe,re.__super__=ae.prototype,re},x={}.hasOwnProperty;b=ie("./Utility"),E=b.isObject,ne=b.isFunction,ee=ie("./XMLNode"),le=ie("./XMLAttribute"),Ce.exports=function(re){function ae(oe,ve,ye){if(ae.__super__.constructor.call(this,oe),ve==null)throw new Error("Missing element name");this.name=this.stringify.eleName(ve),this.attributes={},ye!=null&&this.attribute(ye),oe.isDocument&&(this.isRoot=!0,this.documentObject=oe,oe.rootObject=this)}return z(ae,re),ae.prototype.clone=function(){var oe,ve,ye,me;ye=(0,te.default)(this),ye.isRoot&&(ye.documentObject=null),ye.attributes={},me=this.attributes;for(ve in me)x.call(me,ve)&&(oe=me[ve],ye.attributes[ve]=oe.clone());return ye.children=[],this.children.forEach(function(ge){var _e;return _e=ge.clone(),_e.parent=ye,ye.children.push(_e)}),ye},ae.prototype.attribute=function(oe,ve){var ye,me;if(oe!=null&&(oe=oe.valueOf()),E(oe))for(ye in oe)x.call(oe,ye)&&(me=oe[ye],this.attribute(ye,me));else ne(ve)&&(ve=ve.apply()),this.options.skipNullAttributes&&ve==null||(this.attributes[oe]=new le(this,oe,ve));return this},ae.prototype.removeAttribute=function(oe){var ve,ye,me;if(oe==null)throw new Error("Missing attribute name");if(oe=oe.valueOf(),Array.isArray(oe))for(ye=0,me=oe.length;ye<me;ye++)ve=oe[ye],delete this.attributes[ve];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,ve){return this.attribute(oe,ve)},ae.prototype.a=function(oe,ve){return this.attribute(oe,ve)},ae}(ee)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve={}.hasOwnProperty;oe=ie("./Utility"),ae=oe.isObject,re=oe.isFunction,x=oe.isEmpty,ne=null,se=null,te=null,le=null,ee=null,b=null,z=null,E=null,Ce.exports=function(){function ye(me){this.parent=me,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],ne||(ne=ie("./XMLElement"),se=ie("./XMLCData"),te=ie("./XMLComment"),le=ie("./XMLDeclaration"),ee=ie("./XMLDocType"),b=ie("./XMLRaw"),z=ie("./XMLText"),E=ie("./XMLProcessingInstruction"))}return ye.prototype.element=function(me,ge,_e){var he,pe,ke,Te,Ee,Oe,je,Pe,Qe,Xe;if(Oe=null,ge==null&&(ge={}),ge=ge.valueOf(),ae(ge)||(Qe=[ge,_e],_e=Qe[0],ge=Qe[1]),me!=null&&(me=me.valueOf()),Array.isArray(me))for(ke=0,je=me.length;ke<je;ke++)pe=me[ke],Oe=this.element(pe);else if(re(me))Oe=this.element(me.apply());else if(ae(me)){for(Ee in me)if(ve.call(me,Ee))if(Xe=me[Ee],re(Xe)&&(Xe=Xe.apply()),ae(Xe)&&x(Xe)&&(Xe=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Ee.indexOf(this.stringify.convertAttKey)===0)Oe=this.attribute(Ee.substr(this.stringify.convertAttKey.length),Xe);else if(!this.options.separateArrayItems&&Array.isArray(Xe))for(Te=0,Pe=Xe.length;Te<Pe;Te++)pe=Xe[Te],he={},he[Ee]=pe,Oe=this.element(he);else ae(Xe)?(Oe=this.element(Ee),Oe.element(Xe)):Oe=this.element(Ee,Xe)}else Oe=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&me.indexOf(this.stringify.convertTextKey)===0?this.text(_e):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&me.indexOf(this.stringify.convertCDataKey)===0?this.cdata(_e):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&me.indexOf(this.stringify.convertCommentKey)===0?this.comment(_e):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&me.indexOf(this.stringify.convertRawKey)===0?this.raw(_e):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&me.indexOf(this.stringify.convertPIKey)===0?this.instruction(me.substr(this.stringify.convertPIKey.length),_e):this.node(me,ge,_e);if(Oe==null)throw new Error("Could not create any elements with: "+me);return Oe},ye.prototype.insertBefore=function(me,ge,_e){var he,pe,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return pe=this.parent.children.indexOf(this),ke=this.parent.children.splice(pe),he=this.parent.element(me,ge,_e),Array.prototype.push.apply(this.parent.children,ke),he},ye.prototype.insertAfter=function(me,ge,_e){var he,pe,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return pe=this.parent.children.indexOf(this),ke=this.parent.children.splice(pe+1),he=this.parent.element(me,ge,_e),Array.prototype.push.apply(this.parent.children,ke),he},ye.prototype.remove=function(){var me;if(this.isRoot)throw new Error("Cannot remove the root element");return me=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[me,me-me+1].concat([])),this.parent},ye.prototype.node=function(me,ge,_e){var he,pe;return me!=null&&(me=me.valueOf()),ge||(ge={}),ge=ge.valueOf(),ae(ge)||(pe=[ge,_e],_e=pe[0],ge=pe[1]),he=new ne(this,me,ge),_e!=null&&he.text(_e),this.children.push(he),he},ye.prototype.text=function(me){var ge;return ge=new z(this,me),this.children.push(ge),this},ye.prototype.cdata=function(me){var ge;return ge=new se(this,me),this.children.push(ge),this},ye.prototype.comment=function(me){var ge;return ge=new te(this,me),this.children.push(ge),this},ye.prototype.commentBefore=function(me){var ge,_e;return ge=this.parent.children.indexOf(this),_e=this.parent.children.splice(ge),this.parent.comment(me),Array.prototype.push.apply(this.parent.children,_e),this},ye.prototype.commentAfter=function(me){var ge,_e;return ge=this.parent.children.indexOf(this),_e=this.parent.children.splice(ge+1),this.parent.comment(me),Array.prototype.push.apply(this.parent.children,_e),this},ye.prototype.raw=function(me){var ge;return ge=new b(this,me),this.children.push(ge),this},ye.prototype.instruction=function(me,ge){var _e,he,pe,ke,Te;if(me!=null&&(me=me.valueOf()),ge!=null&&(ge=ge.valueOf()),Array.isArray(me))for(ke=0,Te=me.length;ke<Te;ke++)_e=me[ke],this.instruction(_e);else if(ae(me))for(_e in me)ve.call(me,_e)&&(he=me[_e],this.instruction(_e,he));else re(ge)&&(ge=ge.apply()),pe=new E(this,me,ge),this.children.push(pe);return this},ye.prototype.instructionBefore=function(me,ge){var _e,he;return _e=this.parent.children.indexOf(this),he=this.parent.children.splice(_e),this.parent.instruction(me,ge),Array.prototype.push.apply(this.parent.children,he),this},ye.prototype.instructionAfter=function(me,ge){var _e,he;return _e=this.parent.children.indexOf(this),he=this.parent.children.splice(_e+1),this.parent.instruction(me,ge),Array.prototype.push.apply(this.parent.children,he),this},ye.prototype.declaration=function(me,ge,_e){var he,pe;return he=this.document(),pe=new le(he,me,ge,_e),he.children[0]instanceof le?he.children[0]=pe:he.children.unshift(pe),he.root()||he},ye.prototype.doctype=function(me,ge){var _e,he,pe,ke,Te,Ee,Oe,je,Pe,Qe;for(he=this.document(),pe=new ee(he,me,ge),Pe=he.children,ke=Te=0,Oe=Pe.length;Te<Oe;ke=++Te)if((_e=Pe[ke])instanceof ee)return he.children[ke]=pe,pe;for(Qe=he.children,ke=Ee=0,je=Qe.length;Ee<je;ke=++Ee)if(_e=Qe[ke],_e.isRoot)return he.children.splice(ke,0,pe),pe;return he.children.push(pe),pe},ye.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},ye.prototype.root=function(){var me;for(me=this;me;){if(me.isDocument)return me.rootObject;if(me.isRoot)return me;me=me.parent}},ye.prototype.document=function(){var me;for(me=this;me;){if(me.isDocument)return me;me=me.parent}},ye.prototype.end=function(me){return this.document().end(me)},ye.prototype.prev=function(){var me;if((me=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[me-1]},ye.prototype.next=function(){var me;if((me=this.parent.children.indexOf(this))===-1||me===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[me+1]},ye.prototype.importDocument=function(me){var ge;return ge=me.root().clone(),ge.parent=this,ge.isRoot=!1,this.children.push(ge),this},ye.prototype.ele=function(me,ge,_e){return this.element(me,ge,_e)},ye.prototype.nod=function(me,ge,_e){return this.node(me,ge,_e)},ye.prototype.txt=function(me){return this.text(me)},ye.prototype.dat=function(me){return this.cdata(me)},ye.prototype.com=function(me){return this.comment(me)},ye.prototype.ins=function(me,ge){return this.instruction(me,ge)},ye.prototype.doc=function(){return this.document()},ye.prototype.dec=function(me,ge,_e){return this.declaration(me,ge,_e)},ye.prototype.dtd=function(me,ge){return this.doctype(me,ge)},ye.prototype.e=function(me,ge,_e){return this.element(me,ge,_e)},ye.prototype.n=function(me,ge,_e){return this.node(me,ge,_e)},ye.prototype.t=function(me){return this.text(me)},ye.prototype.d=function(me){return this.cdata(me)},ye.prototype.c=function(me){return this.comment(me)},ye.prototype.r=function(me){return this.raw(me)},ye.prototype.i=function(me,ge){return this.instruction(me,ge)},ye.prototype.u=function(){return this.up()},ye.prototype.importXMLBuilder=function(me){return this.importDocument(me)},ye}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x,re){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(x),re&&(this.value=this.stringify.insValue(re))}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).processingInstruction(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing raw text");this.value=this.stringify.raw(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).raw(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye=function(ge,_e){function he(){this.constructor=ge}for(var pe in _e)me.call(_e,pe)&&(ge[pe]=_e[pe]);return he.prototype=_e.prototype,ge.prototype=new he,ge.__super__=_e.prototype,ge},me={}.hasOwnProperty;b=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),te=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),re=ie("./XMLProcessingInstruction"),le=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),ne=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ve=ie("./XMLWriterBase"),Ce.exports=function(ge){function _e(he,pe){_e.__super__.constructor.call(this,pe),this.stream=he}return ye(_e,ge),_e.prototype.document=function(he){var pe,ke,Te,Ee,Oe,je,Pe,Qe;for(je=he.children,ke=0,Ee=je.length;ke<Ee;ke++)pe=je[ke],pe.isLastRootNode=!1;for(he.children[he.children.length-1].isLastRootNode=!0,Pe=he.children,Qe=[],Te=0,Oe=Pe.length;Te<Oe;Te++)switch(pe=Pe[Te],!1){case!(pe instanceof b):Qe.push(this.declaration(pe));break;case!(pe instanceof z):Qe.push(this.docType(pe));break;case!(pe instanceof te):Qe.push(this.comment(pe));break;case!(pe instanceof re):Qe.push(this.processingInstruction(pe));break;default:Qe.push(this.element(pe))}return Qe},_e.prototype.attribute=function(he){return this.stream.write(" "+he.name+'="'+he.value+'"')},_e.prototype.cdata=function(he,pe){return this.stream.write(this.space(pe)+"<![CDATA["+he.text+"]]>"+this.endline(he))},_e.prototype.comment=function(he,pe){return this.stream.write(this.space(pe)+"<!-- "+he.text+" -->"+this.endline(he))},_e.prototype.declaration=function(he,pe){return this.stream.write(this.space(pe)),this.stream.write('<?xml version="'+he.version+'"'),he.encoding!=null&&this.stream.write(' encoding="'+he.encoding+'"'),he.standalone!=null&&this.stream.write(' standalone="'+he.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(he))},_e.prototype.docType=function(he,pe){var ke,Te,Ee,Oe;if(pe||(pe=0),this.stream.write(this.space(pe)),this.stream.write("<!DOCTYPE "+he.root().name),he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),he.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(he)),Oe=he.children,Te=0,Ee=Oe.length;Te<Ee;Te++)switch(ke=Oe[Te],!1){case!(ke instanceof le):this.dtdAttList(ke,pe+1);break;case!(ke instanceof ee):this.dtdElement(ke,pe+1);break;case!(ke instanceof ne):this.dtdEntity(ke,pe+1);break;case!(ke instanceof E):this.dtdNotation(ke,pe+1);break;case!(ke instanceof se):this.cdata(ke,pe+1);break;case!(ke instanceof te):this.comment(ke,pe+1);break;case!(ke instanceof re):this.processingInstruction(ke,pe+1);break;default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(he))},_e.prototype.element=function(he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe;pe||(pe=0),Xe=this.space(pe),this.stream.write(Xe+"<"+he.name),Pe=he.attributes;for(je in Pe)me.call(Pe,je)&&(ke=Pe[je],this.attribute(ke));if(he.children.length===0||he.children.every(function(ot){return ot.value===""}))this.allowEmpty?this.stream.write("></"+he.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&he.children.length===1&&he.children[0].value!=null)this.stream.write(">"),this.stream.write(he.children[0].value),this.stream.write("</"+he.name+">");else{for(this.stream.write(">"+this.newline),Qe=he.children,Ee=0,Oe=Qe.length;Ee<Oe;Ee++)switch(Te=Qe[Ee],!1){case!(Te instanceof se):this.cdata(Te,pe+1);break;case!(Te instanceof te):this.comment(Te,pe+1);break;case!(Te instanceof x):this.element(Te,pe+1);break;case!(Te instanceof ae):this.raw(Te,pe+1);break;case!(Te instanceof oe):this.text(Te,pe+1);break;case!(Te instanceof re):this.processingInstruction(Te,pe+1);break;default:throw new Error("Unknown XML node type: "+Te.constructor.name)}this.stream.write(Xe+"</"+he.name+">")}return this.stream.write(this.endline(he))},_e.prototype.processingInstruction=function(he,pe){return this.stream.write(this.space(pe)+"<?"+he.target),he.value&&this.stream.write(" "+he.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(he))},_e.prototype.raw=function(he,pe){return this.stream.write(this.space(pe)+he.value+this.endline(he))},_e.prototype.text=function(he,pe){return this.stream.write(this.space(pe)+he.value+this.endline(he))},_e.prototype.dtdAttList=function(he,pe){return this.stream.write(this.space(pe)+"<!ATTLIST "+he.elementName+" "+he.attributeName+" "+he.attributeType),he.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+he.defaultValueType),he.defaultValue&&this.stream.write(' "'+he.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdElement=function(he,pe){return this.stream.write(this.space(pe)+"<!ELEMENT "+he.name+" "+he.value),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdEntity=function(he,pe){return this.stream.write(this.space(pe)+"<!ENTITY"),he.pe&&this.stream.write(" %"),this.stream.write(" "+he.name),he.value?this.stream.write(' "'+he.value+'"'):(he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),he.nData&&this.stream.write(" NDATA "+he.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdNotation=function(he,pe){return this.stream.write(this.space(pe)+"<!NOTATION "+he.name),he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.pubID?this.stream.write(' PUBLIC "'+he.pubID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.endline=function(he){return he.isLastRootNode?"":this.newline},_e}(ve)}).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,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye=function(ge,_e){function he(){this.constructor=ge}for(var pe in _e)me.call(_e,pe)&&(ge[pe]=_e[pe]);return he.prototype=_e.prototype,ge.prototype=new he,ge.__super__=_e.prototype,ge},me={}.hasOwnProperty;b=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),te=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),re=ie("./XMLProcessingInstruction"),le=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),ne=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ve=ie("./XMLWriterBase"),Ce.exports=function(ge){function _e(he){_e.__super__.constructor.call(this,he)}return ye(_e,ge),_e.prototype.document=function(he){var pe,ke,Te,Ee,Oe;for(this.textispresent=!1,Ee="",Oe=he.children,ke=0,Te=Oe.length;ke<Te;ke++)pe=Oe[ke],Ee+=function(){switch(!1){case!(pe instanceof b):return this.declaration(pe);case!(pe instanceof z):return this.docType(pe);case!(pe instanceof te):return this.comment(pe);case!(pe instanceof re):return this.processingInstruction(pe);default:return this.element(pe,0)}}.call(this);return this.pretty&&Ee.slice(-this.newline.length)===this.newline&&(Ee=Ee.slice(0,-this.newline.length)),Ee},_e.prototype.attribute=function(he){return" "+he.name+'="'+he.value+'"'},_e.prototype.cdata=function(he,pe){return this.space(pe)+"<![CDATA["+he.text+"]]>"+this.newline},_e.prototype.comment=function(he,pe){return this.space(pe)+"<!-- "+he.text+" -->"+this.newline},_e.prototype.declaration=function(he,pe){var ke;return ke=this.space(pe),ke+='<?xml version="'+he.version+'"',he.encoding!=null&&(ke+=' encoding="'+he.encoding+'"'),he.standalone!=null&&(ke+=' standalone="'+he.standalone+'"'),ke+=this.spacebeforeslash+"?>",ke+=this.newline},_e.prototype.docType=function(he,pe){var ke,Te,Ee,Oe,je;if(pe||(pe=0),Oe=this.space(pe),Oe+="<!DOCTYPE "+he.root().name,he.pubID&&he.sysID?Oe+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(Oe+=' SYSTEM "'+he.sysID+'"'),he.children.length>0){for(Oe+=" [",Oe+=this.newline,je=he.children,Te=0,Ee=je.length;Te<Ee;Te++)ke=je[Te],Oe+=function(){switch(!1){case!(ke instanceof le):return this.dtdAttList(ke,pe+1);case!(ke instanceof ee):return this.dtdElement(ke,pe+1);case!(ke instanceof ne):return this.dtdEntity(ke,pe+1);case!(ke instanceof E):return this.dtdNotation(ke,pe+1);case!(ke instanceof se):return this.cdata(ke,pe+1);case!(ke instanceof te):return this.comment(ke,pe+1);case!(ke instanceof re):return this.processingInstruction(ke,pe+1);default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}}.call(this);Oe+="]"}return Oe+=this.spacebeforeslash+">",Oe+=this.newline},_e.prototype.element=function(he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot,We,rt,Ye,ut;pe||(pe=0),ut=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Ye=this.space(pe),Xe="",Xe+=Ye+"<"+he.name,ot=he.attributes;for(Qe in ot)me.call(ot,Qe)&&(ke=ot[Qe],Xe+=this.attribute(ke));if(he.children.length===0||he.children.every(function(Ge){return Ge.value===""}))this.allowEmpty?Xe+="></"+he.name+">"+this.newline:Xe+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&he.children.length===1&&he.children[0].value!=null)Xe+=">",Xe+=he.children[0].value,Xe+="</"+he.name+">"+this.newline;else{if(this.dontprettytextnodes){for(We=he.children,Ee=0,je=We.length;Ee<je;Ee++)if(Te=We[Ee],Te.value!=null){this.textispresent++,ut=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,Ye=this.space(pe)),Xe+=">"+this.newline,rt=he.children,Oe=0,Pe=rt.length;Oe<Pe;Oe++)Te=rt[Oe],Xe+=function(){switch(!1){case!(Te instanceof se):return this.cdata(Te,pe+1);case!(Te instanceof te):return this.comment(Te,pe+1);case!(Te instanceof x):return this.element(Te,pe+1);case!(Te instanceof ae):return this.raw(Te,pe+1);case!(Te instanceof oe):return this.text(Te,pe+1);case!(Te instanceof re):return this.processingInstruction(Te,pe+1);default:throw new Error("Unknown XML node type: "+Te.constructor.name)}}.call(this);ut&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Xe+=Ye+"</"+he.name+">"+this.newline}return Xe},_e.prototype.processingInstruction=function(he,pe){var ke;return ke=this.space(pe)+"<?"+he.target,he.value&&(ke+=" "+he.value),ke+=this.spacebeforeslash+"?>"+this.newline},_e.prototype.raw=function(he,pe){return this.space(pe)+he.value+this.newline},_e.prototype.text=function(he,pe){return this.space(pe)+he.value+this.newline},_e.prototype.dtdAttList=function(he,pe){var ke;return ke=this.space(pe)+"<!ATTLIST "+he.elementName+" "+he.attributeName+" "+he.attributeType,he.defaultValueType!=="#DEFAULT"&&(ke+=" "+he.defaultValueType),he.defaultValue&&(ke+=' "'+he.defaultValue+'"'),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.dtdElement=function(he,pe){return this.space(pe)+"<!ELEMENT "+he.name+" "+he.value+this.spacebeforeslash+">"+this.newline},_e.prototype.dtdEntity=function(he,pe){var ke;return ke=this.space(pe)+"<!ENTITY",he.pe&&(ke+=" %"),ke+=" "+he.name,he.value?ke+=' "'+he.value+'"':(he.pubID&&he.sysID?ke+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(ke+=' SYSTEM "'+he.sysID+'"'),he.nData&&(ke+=" NDATA "+he.nData)),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.dtdNotation=function(he,pe){var ke;return ke=this.space(pe)+"<!NOTATION "+he.name,he.pubID&&he.sysID?ke+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.pubID?ke+=' PUBLIC "'+he.pubID+'"':he.sysID&&(ke+=' SYSTEM "'+he.sysID+'"'),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.openNode=function(he,pe){var ke,Te,Ee,Oe;if(pe||(pe=0),he instanceof x){Ee=this.space(pe)+"<"+he.name,Oe=he.attributes;for(Te in Oe)me.call(Oe,Te)&&(ke=Oe[Te],Ee+=this.attribute(ke));return Ee+=(he.children?">":"/>")+this.newline}return Ee=this.space(pe)+"<!DOCTYPE "+he.rootNodeName,he.pubID&&he.sysID?Ee+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(Ee+=' SYSTEM "'+he.sysID+'"'),Ee+=(he.children?" [":">")+this.newline},_e.prototype.closeNode=function(he,pe){switch(pe||(pe=0),!1){case!(he instanceof x):return this.space(pe)+"</"+he.name+">"+this.newline;case!(he instanceof z):return this.space(pe)+"]>"+this.newline}},_e}(ve)}).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,Ce,ue){"use strict";(function(){var se=function(le,ee){return function(){return le.apply(ee,arguments)}},te={}.hasOwnProperty;Ce.exports=function(){function le(ee){this.assertLegalChar=se(this.assertLegalChar,this);var ne,E,b;ee||(ee={}),this.noDoubleEncoding=ee.noDoubleEncoding,E=ee.stringify||{};for(ne in E)te.call(E,ne)&&(b=E[ne],this[ne]=b)}return le.prototype.eleName=function(ee){return ee=""+ee||"",this.assertLegalChar(ee)},le.prototype.eleText=function(ee){return ee=""+ee||"",this.assertLegalChar(this.elEscape(ee))},le.prototype.cdata=function(ee){return ee=""+ee||"",ee=ee.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ee)},le.prototype.comment=function(ee){if(ee=""+ee||"",ee.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ee);return this.assertLegalChar(ee)},le.prototype.raw=function(ee){return""+ee||""},le.prototype.attName=function(ee){return ee=""+ee||""},le.prototype.attValue=function(ee){return ee=""+ee||"",this.attEscape(ee)},le.prototype.insTarget=function(ee){return""+ee||""},le.prototype.insValue=function(ee){if(ee=""+ee||"",ee.match(/\?>/))throw new Error("Invalid processing instruction value: "+ee);return ee},le.prototype.xmlVersion=function(ee){if(ee=""+ee||"",!ee.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ee);return ee},le.prototype.xmlEncoding=function(ee){if(ee=""+ee||"",!ee.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ee);return ee},le.prototype.xmlStandalone=function(ee){return ee?"yes":"no"},le.prototype.dtdPubID=function(ee){return""+ee||""},le.prototype.dtdSysID=function(ee){return""+ee||""},le.prototype.dtdElementValue=function(ee){return""+ee||""},le.prototype.dtdAttType=function(ee){return""+ee||""},le.prototype.dtdAttDefault=function(ee){return ee!=null?""+ee||"":ee},le.prototype.dtdEntityValue=function(ee){return""+ee||""},le.prototype.dtdNData=function(ee){return""+ee||""},le.prototype.convertAttKey="@",le.prototype.convertPIKey="?",le.prototype.convertTextKey="#text",le.prototype.convertCDataKey="#cdata",le.prototype.convertCommentKey="#comment",le.prototype.convertRawKey="#raw",le.prototype.assertLegalChar=function(ee){var ne;if(ne=ee.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ee+" at index "+ne.index);return ee},le.prototype.elEscape=function(ee){var ne;return ne=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(ne,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},le.prototype.attEscape=function(ee){var ne;return ne=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(ne,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},le}()}).call(void 0)},{}],233:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing element text");this.value=this.stringify.eleText(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).text(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(ie,Ce,ue){"use strict";(function(){var se={}.hasOwnProperty;Ce.exports=function(){function te(le){var ee,ne,E,b,z,x,re,ae,oe;le||(le={}),this.pretty=le.pretty||!1,this.allowEmpty=(ne=le.allowEmpty)!=null&&ne,this.pretty?(this.indent=(E=le.indent)!=null?E:" ",this.newline=(b=le.newline)!=null?b:`
`,this.offset=(z=le.offset)!=null?z:0,this.dontprettytextnodes=(x=le.dontprettytextnodes)!=null?x:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(re=le.spacebeforeslash)!=null?re:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ae=le.writer||{};for(ee in ae)se.call(ae,ee)&&(oe=ae[ee],this[ee]=oe)}return te.prototype.set=function(le){var ee,ne,E;le||(le={}),"pretty"in le&&(this.pretty=le.pretty),"allowEmpty"in le&&(this.allowEmpty=le.allowEmpty),this.pretty?(this.indent="indent"in le?le.indent:" ",this.newline="newline"in le?le.newline:`
`,this.offset="offset"in le?le.offset:0,this.dontprettytextnodes="dontprettytextnodes"in le?le.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in le?le.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ne=le.writer||{};for(ee in ne)se.call(ne,ee)&&(E=ne[ee],this[ee]=E);return this},te.prototype.space=function(le){var ee;return this.pretty?(ee=(le||0)+this.offset+1,ee>0?new Array(ee).join(this.indent):""):""},te}()}).call(void 0)},{}],235:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b;b=ie("./Utility"),ne=b.assign,E=b.isFunction,se=ie("./XMLDocument"),te=ie("./XMLDocumentCB"),ee=ie("./XMLStringWriter"),le=ie("./XMLStreamWriter"),Ce.exports.create=function(z,x,re,ae){var oe,ve;if(z==null)throw new Error("Root element needs a name");return ae=ne({},x,re,ae),oe=new se(ae),ve=oe.element(z),ae.headless||(oe.declaration(ae),ae.pubID==null&&ae.sysID==null||oe.doctype(ae)),ve},Ce.exports.begin=function(z,x,re){var ae;return E(z)&&(ae=[z,x],x=ae[0],re=ae[1],z={}),x?new te(z,x,re):new se(z)},Ce.exports.stringWriter=function(z){return new ee(z)},Ce.exports.streamWriter=function(z,x){return new le(z,x)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(ie,Ce,ue){function se(){for(var le={},ee=0;ee<arguments.length;ee++){var ne=arguments[ee];for(var E in ne)te.call(ne,E)&&(le[E]=ne[E])}return le}Ce.exports=se;var te=Object.prototype.hasOwnProperty},{}],237:[function(ie,Ce,ue){"use strict";function se(ae,oe,ve){ee.isBuffer(oe)||(oe=new ee(oe)),ee.isBuffer(ve)||(ve=new ee(ve)),oe.length>x?oe=ae(oe):oe.length<x&&(oe=ee.concat([oe,re],x));for(var ye=new ee(x),me=new ee(x),ge=0;ge<x;ge++)ye[ge]=54^oe[ge],me[ge]=92^oe[ge];var _e=ae(ee.concat([ye,ve]));return ae(ee.concat([me,_e]))}function te(ae,oe){ae=ae||"sha1";var ve=z[ae],ye=[],me=0;return ve||le("algorithm:",ae,"is not yet supported"),{update:function(ge){return ee.isBuffer(ge)||(ge=new ee(ge)),ye.push(ge),me+=ge.length,this},digest:function(ge){var _e=ee.concat(ye),he=oe?se(ve,oe,_e):ve(_e);return ye=null,ge?he.toString(ge):he}}}function le(){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,ne=ie("./sha"),E=ie("./sha256"),b=ie("./md5"),z={sha1:ne,sha256:E,md5:b},x=64,re=new ee(x);re.fill(0),ue.createHash=function(ae){return te(ae)},ue.createHmac=function(ae,oe){return te(ae,oe)},function(ae,oe){for(var ve in ae)oe(ae[ve],ve)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(ae){ue[ae]=function(){le("sorry,",ae,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(ie,Ce,ue){"use strict";function se(z,x){if(z.length%ne!=0){var re=z.length+(ne-z.length%ne);z=ee.concat([z,E],re)}for(var ae=[],oe=x?z.readInt32BE:z.readInt32LE,ve=0;ve<z.length;ve+=ne)ae.push(oe.call(z,ve));return ae}function te(z,x,re){for(var ae=new ee(x),oe=re?ae.writeInt32BE:ae.writeInt32LE,ve=0;ve<z.length;ve++)oe.call(ae,z[ve],4*ve,!0);return ae}function le(z,x,re,ae){return ee.isBuffer(z)||(z=new ee(z)),te(x(se(z,ae),z.length*b),re,ae)}var ee=ie("buffer").Buffer,ne=4,E=new ee(ne);E.fill(0);var b=8;Ce.exports={hash:le}},{buffer:38}],239:[function(ie,Ce,ue){"use strict";function se(re,ae){re[ae>>5]|=128<<ae%32,re[14+(ae+64>>>9<<4)]=ae;for(var oe=1732584193,ve=-271733879,ye=-1732584194,me=271733878,ge=0;ge<re.length;ge+=16){var _e=oe,he=ve,pe=ye,ke=me;oe=le(oe,ve,ye,me,re[ge+0],7,-680876936),me=le(me,oe,ve,ye,re[ge+1],12,-389564586),ye=le(ye,me,oe,ve,re[ge+2],17,606105819),ve=le(ve,ye,me,oe,re[ge+3],22,-1044525330),oe=le(oe,ve,ye,me,re[ge+4],7,-176418897),me=le(me,oe,ve,ye,re[ge+5],12,1200080426),ye=le(ye,me,oe,ve,re[ge+6],17,-1473231341),ve=le(ve,ye,me,oe,re[ge+7],22,-45705983),oe=le(oe,ve,ye,me,re[ge+8],7,1770035416),me=le(me,oe,ve,ye,re[ge+9],12,-1958414417),ye=le(ye,me,oe,ve,re[ge+10],17,-42063),ve=le(ve,ye,me,oe,re[ge+11],22,-1990404162),oe=le(oe,ve,ye,me,re[ge+12],7,1804603682),me=le(me,oe,ve,ye,re[ge+13],12,-40341101),ye=le(ye,me,oe,ve,re[ge+14],17,-1502002290),ve=le(ve,ye,me,oe,re[ge+15],22,1236535329),oe=ee(oe,ve,ye,me,re[ge+1],5,-165796510),me=ee(me,oe,ve,ye,re[ge+6],9,-1069501632),ye=ee(ye,me,oe,ve,re[ge+11],14,643717713),ve=ee(ve,ye,me,oe,re[ge+0],20,-373897302),oe=ee(oe,ve,ye,me,re[ge+5],5,-701558691),me=ee(me,oe,ve,ye,re[ge+10],9,38016083),ye=ee(ye,me,oe,ve,re[ge+15],14,-660478335),ve=ee(ve,ye,me,oe,re[ge+4],20,-405537848),oe=ee(oe,ve,ye,me,re[ge+9],5,568446438),me=ee(me,oe,ve,ye,re[ge+14],9,-1019803690),ye=ee(ye,me,oe,ve,re[ge+3],14,-187363961),ve=ee(ve,ye,me,oe,re[ge+8],20,1163531501),oe=ee(oe,ve,ye,me,re[ge+13],5,-1444681467),me=ee(me,oe,ve,ye,re[ge+2],9,-51403784),ye=ee(ye,me,oe,ve,re[ge+7],14,1735328473),ve=ee(ve,ye,me,oe,re[ge+12],20,-1926607734),oe=ne(oe,ve,ye,me,re[ge+5],4,-378558),me=ne(me,oe,ve,ye,re[ge+8],11,-2022574463),ye=ne(ye,me,oe,ve,re[ge+11],16,1839030562),ve=ne(ve,ye,me,oe,re[ge+14],23,-35309556),oe=ne(oe,ve,ye,me,re[ge+1],4,-1530992060),me=ne(me,oe,ve,ye,re[ge+4],11,1272893353),ye=ne(ye,me,oe,ve,re[ge+7],16,-155497632),ve=ne(ve,ye,me,oe,re[ge+10],23,-1094730640),oe=ne(oe,ve,ye,me,re[ge+13],4,681279174),me=ne(me,oe,ve,ye,re[ge+0],11,-358537222),ye=ne(ye,me,oe,ve,re[ge+3],16,-722521979),ve=ne(ve,ye,me,oe,re[ge+6],23,76029189),oe=ne(oe,ve,ye,me,re[ge+9],4,-640364487),me=ne(me,oe,ve,ye,re[ge+12],11,-421815835),ye=ne(ye,me,oe,ve,re[ge+15],16,530742520),ve=ne(ve,ye,me,oe,re[ge+2],23,-995338651),oe=E(oe,ve,ye,me,re[ge+0],6,-198630844),me=E(me,oe,ve,ye,re[ge+7],10,1126891415),ye=E(ye,me,oe,ve,re[ge+14],15,-1416354905),ve=E(ve,ye,me,oe,re[ge+5],21,-57434055),oe=E(oe,ve,ye,me,re[ge+12],6,1700485571),me=E(me,oe,ve,ye,re[ge+3],10,-1894986606),ye=E(ye,me,oe,ve,re[ge+10],15,-1051523),ve=E(ve,ye,me,oe,re[ge+1],21,-2054922799),oe=E(oe,ve,ye,me,re[ge+8],6,1873313359),me=E(me,oe,ve,ye,re[ge+15],10,-30611744),ye=E(ye,me,oe,ve,re[ge+6],15,-1560198380),ve=E(ve,ye,me,oe,re[ge+13],21,1309151649),oe=E(oe,ve,ye,me,re[ge+4],6,-145523070),me=E(me,oe,ve,ye,re[ge+11],10,-1120210379),ye=E(ye,me,oe,ve,re[ge+2],15,718787259),ve=E(ve,ye,me,oe,re[ge+9],21,-343485551),oe=b(oe,_e),ve=b(ve,he),ye=b(ye,pe),me=b(me,ke)}return Array(oe,ve,ye,me)}function te(re,ae,oe,ve,ye,me){return b(z(b(b(ae,re),b(ve,me)),ye),oe)}function le(re,ae,oe,ve,ye,me,ge){return te(ae&oe|~ae&ve,re,ae,ye,me,ge)}function ee(re,ae,oe,ve,ye,me,ge){return te(ae&ve|oe&~ve,re,ae,ye,me,ge)}function ne(re,ae,oe,ve,ye,me,ge){return te(ae^oe^ve,re,ae,ye,me,ge)}function E(re,ae,oe,ve,ye,me,ge){return te(oe^(ae|~ve),re,ae,ye,me,ge)}function b(re,ae){var oe=(65535&re)+(65535&ae);return(re>>16)+(ae>>16)+(oe>>16)<<16|65535&oe}function z(re,ae){return re<<ae|re>>>32-ae}var x=ie("./helpers");Ce.exports=function(re){return x.hash(re,se,16)}},{"./helpers":238}],240:[function(ie,Ce,ue){"use strict";function se(b,z){b[z>>5]|=128<<24-z%32,b[15+(z+64>>9<<4)]=z;for(var x=Array(80),re=1732584193,ae=-271733879,oe=-1732584194,ve=271733878,ye=-1009589776,me=0;me<b.length;me+=16){for(var ge=re,_e=ae,he=oe,pe=ve,ke=ye,Te=0;Te<80;Te++){x[Te]=Te<16?b[me+Te]:ne(x[Te-3]^x[Te-8]^x[Te-14]^x[Te-16],1);var Ee=ee(ee(ne(re,5),te(Te,ae,oe,ve)),ee(ee(ye,x[Te]),le(Te)));ye=ve,ve=oe,oe=ne(ae,30),ae=re,re=Ee}re=ee(re,ge),ae=ee(ae,_e),oe=ee(oe,he),ve=ee(ve,pe),ye=ee(ye,ke)}return Array(re,ae,oe,ve,ye)}function te(b,z,x,re){return b<20?z&x|~z&re:b<40?z^x^re:b<60?z&x|z&re|x&re:z^x^re}function le(b){return b<20?1518500249:b<40?1859775393:b<60?-1894007588:-899497514}function ee(b,z){var x=(65535&b)+(65535&z);return(b>>16)+(z>>16)+(x>>16)<<16|65535&x}function ne(b,z){return b<<z|b>>>32-z}var E=ie("./helpers");Ce.exports=function(b){return E.hash(b,se,20,!0)}},{"./helpers":238}],241:[function(ie,Ce,ue){"use strict";var se=ie("./helpers"),te=function(oe,ve){var ye=(65535&oe)+(65535&ve);return(oe>>16)+(ve>>16)+(ye>>16)<<16|65535&ye},le=function(oe,ve){return oe>>>ve|oe<<32-ve},ee=function(oe,ve){return oe>>>ve},ne=function(oe,ve,ye){return oe&ve^~oe&ye},E=function(oe,ve,ye){return oe&ve^oe&ye^ve&ye},b=function(oe){return le(oe,2)^le(oe,13)^le(oe,22)},z=function(oe){return le(oe,6)^le(oe,11)^le(oe,25)},x=function(oe){return le(oe,7)^le(oe,18)^ee(oe,3)},re=function(oe){return le(oe,17)^le(oe,19)^ee(oe,10)},ae=function(oe,ve){var ye,me,ge,_e,he,pe,ke,Te,Ee,Oe,je,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),Xe=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),ot=new Array(64);oe[ve>>5]|=128<<24-ve%32,oe[15+(ve+64>>9<<4)]=ve;for(var Ee=0;Ee<oe.length;Ee+=16){ye=Xe[0],me=Xe[1],ge=Xe[2],_e=Xe[3],he=Xe[4],pe=Xe[5],ke=Xe[6],Te=Xe[7];for(var Oe=0;Oe<64;Oe++)ot[Oe]=Oe<16?oe[Oe+Ee]:te(te(te(re(ot[Oe-2]),ot[Oe-7]),x(ot[Oe-15])),ot[Oe-16]),je=te(te(te(te(Te,z(he)),ne(he,pe,ke)),Qe[Oe]),ot[Oe]),Pe=te(b(ye),E(ye,me,ge)),Te=ke,ke=pe,pe=he,he=te(_e,je),_e=ge,ge=me,me=ye,ye=te(je,Pe);Xe[0]=te(ye,Xe[0]),Xe[1]=te(me,Xe[1]),Xe[2]=te(ge,Xe[2]),Xe[3]=te(_e,Xe[3]),Xe[4]=te(he,Xe[4]),Xe[5]=te(pe,Xe[5]),Xe[6]=te(ke,Xe[6]),Xe[7]=te(Te,Xe[7])}return Xe};Ce.exports=function(oe){return se.hash(oe,ae,32,!0)}},{"./helpers":238}],242:[function(ie,Ce,ue){(function(se){"use strict";function te(ae){return ae&&ae.__esModule?ae:{default:ae}}var le=ie("babel-runtime/core-js/object/create"),ee=te(le),ne=ie("babel-runtime/helpers/classCallCheck"),E=te(ne),b=ie("babel-runtime/helpers/createClass"),z=te(b),x=ie("babel-runtime/helpers/typeof"),re=te(x);(function(ae){if((ue===void 0?"undefined":(0,re.default)(ue))==="object"&&Ce!==void 0)Ce.exports=ae();else if(typeof ce=="function"&&ce.amd)ce([],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,ve,ye){function me(he,pe){if(!ve[he]){if(!oe[he]){var ke=typeof ie=="function"&&ie;if(!pe&&ke)return ke(he,!0);if(ge)return ge(he,!0);var Te=new Error("Cannot find module '"+he+"'");throw Te.code="MODULE_NOT_FOUND",Te}var Ee=ve[he]={exports:{}};oe[he][0].call(Ee.exports,function(Oe){var je=oe[he][1][Oe];return me(je||Oe)},Ee,Ee.exports,ae,oe,ve,ye)}return ve[he].exports}for(var ge=typeof ie=="function"&&ie,_e=0;_e<ye.length;_e++)me(ye[_e]);return me}({1:[function(ae,oe,ve){var ye=function(){function me(){(0,E.default)(this,me),this._types=(0,ee.default)(null),this._extensions=(0,ee.default)(null);for(var ge=0;ge<arguments.length;ge++)this.define(arguments[ge])}return(0,z.default)(me,[{key:"define",value:function(ge,_e){for(var he in ge){for(var pe=ge[he],ke=0;ke<pe.length;ke++){var Te=pe[ke];if(!_e&&Te in this._types)throw new Error('Attempt to change mapping for "'+Te+'" extension from "'+this._types[Te]+'" to "'+he+'". Pass `force=true` to allow this, otherwise remove "'+Te+'" from the list of extensions for "'+he+'".');this._types[Te]=he}!_e&&this._extensions[he]||(this._extensions[he]=pe[0])}}},{key:"getType",value:function(ge){ge=String(ge);var _e=ge.replace(/^.*[\/\\]/,"").toLowerCase(),he=_e.replace(/^.*\./,"").toLowerCase(),pe=_e.length<ge.length;return(he.length<_e.length-1||!pe)&&this._types[he]||null}},{key:"getExtension",value:function(ge){return(ge=/^\s*([^;\s]*)/.test(ge)&&RegExp.$1)&&this._extensions[ge.toLowerCase()]||null}}]),me}();oe.exports=ye},{}],2:[function(ae,oe,ve){var ye=ae("./Mime");oe.exports=new ye(ae("./types/standard"),ae("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(ae,oe,ve){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,ve){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 Se.g!="undefined"?Se.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,Ce,ue){"use strict";ue.encodeURIComponent=function(se){try{return encodeURIComponent(se)}catch(te){return se}},ue.escape=ie("escape-html"),ue.timestamp=function(se){if(se){var te=se;return typeof te=="string"&&(te=Number(te)),String(se).length===10&&(te*=1e3),new Date(te)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(ie,Ce,ue){(function(se,te){"use strict";function le(Te){return Te&&Te.__esModule?Te:{default:Te}}function ee(Te,Ee){return Te===void 0?Ee:Te}function ne(Te,Ee){return function(Oe,je,Pe){if(Oe)return Ee(Oe);Te({data:je,status:Pe.statusCode,headers:Pe.headers,res:Pe})}}var E,b=ie("babel-runtime/core-js/json/stringify"),z=le(b),x=ie("babel-runtime/helpers/typeof"),re=le(x),ae=ie("util"),oe=ie("url"),ve=ie("http"),ye=ie("https"),me=ie("debug")("urllib"),ge=ie("humanize-ms"),_e=0,he=Math.pow(2,31)-10,pe=/^https?:\/\//i;ue.TIMEOUTS=[ge("300s"),ge("300s")];var ke=["json","text"];ue.request=function(Te,Ee,Oe){return arguments.length===2&&typeof Ee=="function"&&(Oe=Ee,Ee=null),typeof Oe=="function"?ue.requestWithCallback(Te,Ee,Oe):(E||(E=ie("any-promise")),new E(function(je,Pe){ue.requestWithCallback(Te,Ee,ne(je,Pe))}))},ue.requestWithCallback=function(Te,Ee,Oe){function je(){Ne&&(clearTimeout(Ne),Ne=null)}function Pe(){De&&(clearTimeout(De),De=null)}function Qe(gt,Qt,Lt){if(Pe(),!Oe)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Ge,se.pid,dt.method,Te),void(gt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
stack: %s`,Date(),Ge,se.pid,gt.name,gt.message,gt.stack));var qt=Oe;Oe=null;var un={};if(Lt&&(Re=Lt.statusCode,un=Lt.headers),Re===401&&un["www-authenticate"]&&(!Ee.headers||!Ee.headers.Authorization)&&Ee.digestAuth){var Sn=un["www-authenticate"];if(Sn.indexOf("Digest ")>=0)return me("Request#%d %s: got digest auth header WWW-Authenticate: %s",Ge,Te,Sn),Ee.headers=Ee.headers||{},Ee.headers.Authorization=digestAuthHeader(dt.method,dt.path,Sn,Ee.digestAuth),me("Request#%d %s: auth with digest header: %s",Ge,Te,Ee.headers.Authorization),Lt.headers["set-cookie"]&&(Ee.headers.Cookie=Lt.headers["set-cookie"].join(";")),ue.requestWithCallback(Te,Ee,qt)}var Jt=Date.now()-$e;Ct&&(Ct.contentDownload=Jt),me("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Jt,Me,Re,dt.method,dt.host,dt.path,Ue,Ct);var Ln={status:Re,statusCode:Re,headers:un,size:Me,aborted:tt,rt:Jt,keepAliveSocket:Ue,data:Qt,requestUrls:Ee.requestUrls,timing:Ct,remoteAddress:lt,remotePort:Pt};if(gt){var Zn="";ct&&typeof ct.getCurrentStatus=="function"&&(Zn=", agent status: "+(0,z.default)(ct.getCurrentStatus())),gt.message+=", "+dt.method+" "+Te+" "+Re+" (connected: "+Le+", keepalive socket: "+Ue+Zn+`)
headers: `+(0,z.default)(un),gt.data=Qt,gt.path=dt.path,gt.status=Re,gt.headers=un,gt.res=Ln}qt(gt,Qt,Ee.streaming?Lt:Ln),Ee.emitter&&(ze.url=Te,ze.socket=Ut&&Ut.connection,ze.options=dt,ze.size=Be,Ee.emitter.emit("response",{requestId:Ge,error:gt,ctx:Ee.ctx,req:ze,res:Ln}))}function Xe(gt){var Qt=null;if(Ee.followRedirect&&statuses.redirect[gt.statusCode]){Ee._followRedirectCount=(Ee._followRedirectCount||0)+1;var Lt=gt.headers.location;if(Lt){if(!(Ee._followRedirectCount>Ee.maxRedirects)){var qt=Ee.formatRedirectUrl?Ee.formatRedirectUrl(Te,Lt):oe.resolve(Te,Lt);me("Request#%d %s: `redirected` from %s to %s",Ge,dt.path,Te,qt),Pe(),Ee.headers&&Ee.headers.Host&&pe.test(Lt)&&(Ee.headers.Host=null);var un=Oe;return Oe=null,ue.requestWithCallback(qt,Ee,un),{redirect:!0,error:null}}Qt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Te),Qt.name="MaxRedirectError"}else Qt=new Error("Got statusCode "+gt.statusCode+" but cannot resolve next location from headers"),Qt.name="FollowRedirectError"}return{redirect:!1,error:Qt}}function ot(gt,Qt,Lt){return Lt(null,Qt,gt.headers["content-encoding"])}function We(gt){if(Ct&&(Ct.waiting=Date.now()-$e),me("Request#%d %s `req response` event emit: status %d, headers: %j",Ge,Te,gt.statusCode,gt.headers),Ee.streaming){var Qt=Xe(gt);return Qt.redirect?void gt.resume():Qt.error?(gt.resume(),Qe(Qt.error,null,gt)):Qe(null,null,gt)}if(gt.on("close",function(){me("Request#%d %s: `res close` event emit, total size %d",Ge,Te,Me)}),gt.on("error",function(){me("Request#%d %s: `res error` event emit, total size %d",Ge,Te,Me)}),gt.on("aborted",function(){tt=!0,me("Request#%d %s: `res aborted` event emit, total size %d",Ge,Te,Me)}),vt){var Qt=Xe(gt);return Qt.redirect?void gt.resume():Qt.error?(gt.resume(),vt.end(),Qe(Qt.error,null,gt)):(Ee.consumeWriteStream===!1?gt.on("end",Qe.bind(null,null,null,gt)):isNode010||isNode012?first([[vt,"close"],[gt,"aborted"]],function(un,Sn,Jt){me("Request#%d %s: writeStream or res %s event emitted",Ge,Te,Jt),Qe(we||null,null,gt)}):vt.on("close",function(){me("Request#%d %s: writeStream close event emitted",Ge,Te),Qe(we||null,null,gt)}),gt.pipe(vt))}var Lt=[];gt.on("data",function(qt){me("Request#%d %s: `res data` event emit, size %d",Ge,Te,qt.length),Me+=qt.length,Lt.push(qt)}),gt.on("end",function(){var qt=te.concat(Lt,Me);if(me("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Ge,Te,Me,gt._dumped),we)return Qe(we,qt,gt);var un=Xe(gt);if(un.error)return Qe(un.error,qt,gt);un.redirect||ot(gt,qt,function(Sn,Jt,Ln){if(Sn)return Qe(Sn,qt,gt);if(!Ln&&ke.indexOf(Ee.dataType)>=0){try{Jt=decodeBodyByCharset(Jt,gt)}catch(Gn){return me("decodeBodyByCharset error: %s",Gn),Qe(null,Jt,gt)}if(Ee.dataType==="json")if(Me===0)Jt=null;else{var Zn=parseJSON(Jt,Rt);Zn.error?Sn=Zn.error:Jt=Zn.data}}tt&&me("Request#%d %s: Remote socket was terminated before `response.end()` was called",Ge,Te),Qe(Sn,Jt,gt)})})}function rt(){me("Response timer ticking, timeout: %d",Zt),De=setTimeout(function(){De=null;var gt="Response timeout for "+Zt+"ms";we=new Error(gt),we.name="ResponseTimeoutError",we.requestId=Ge,me("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Ge,Te,we.name,gt,Le),Ye()},Zt)}function Ye(){me("Request#%d %s abort, connected: %s",Ge,Te,Le),Ut.socket||(we.noSocket=!0,Qe(we)),Ut.abort()}if(!Te||typeof Te!="string"&&(Te===void 0?"undefined":(0,re.default)(Te))!=="object"){var ut=ae.format("expect request url to be a string or a http request options, but got %j",Te);throw new Error(ut)}arguments.length===2&&typeof Ee=="function"&&(Oe=Ee,Ee=null),Ee=Ee||{},_e>=he&&(_e=0);var Ge=++_e;Ee.requestUrls=Ee.requestUrls||[];var ze={requestId:Ge,url:Te,args:Ee,ctx:Ee.ctx};Ee.emitter&&Ee.emitter.emit("request",ze),Ee.timeout=Ee.timeout||ue.TIMEOUTS,Ee.maxRedirects=Ee.maxRedirects||10,Ee.streaming=Ee.streaming||Ee.customResponse;var Ve,$e=Date.now();typeof Te=="string"?(pe.test(Te)||(Te="http://"+Te),Ve=oe.parse(Te)):Ve=Te;var nt=(Ee.type||Ee.method||Ve.method||"GET").toUpperCase(),et=Ve.port||80,pt=ve,ct=ee(Ee.agent,ue.agent),Rt=Ee.fixJSONCtlChars;Ve.protocol==="https:"&&(pt=ye,ct=ee(Ee.httpsAgent,ue.httpsAgent),Ve.port||(et=443));var dt={host:Ve.hostname||Ve.host||"localhost",path:Ve.path||"/",method:nt,port:et,agent:ct,headers:Ee.headers||{},lookup:Ee.lookup};Array.isArray(Ee.timeout)?dt.requestTimeout=Ee.timeout[Ee.timeout.length-1]:Ee.timeout!==void 0&&(dt.requestTimeout=Ee.timeout);for(var Mt=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],xt=0;xt<Mt.length;xt++){var yt=Mt[xt];Ee.hasOwnProperty(yt)&&(dt[yt]=Ee[yt])}dt.rejectUnauthorized!==!1||dt.hasOwnProperty("secureOptions")||(dt.secureOptions=ie("constants").SSL_OP_NO_TLSv1_2);var bt=Ee.auth||Ve.auth;bt&&(dt.auth=bt);var He=Ee.content||Ee.data,Ae=nt==="GET"||nt==="HEAD"||Ee.dataAsQueryString;if(!Ee.content&&He&&typeof He!="string"&&!te.isBuffer(He))if(Ae)He=Ee.nestedQuerystring?qs.stringify(He):querystring.stringify(He);else{var be=dt.headers["Content-Type"]||dt.headers["content-type"];be||(be=Ee.contentType==="json"?"application/json":"application/x-www-form-urlencoded",dt.headers["Content-Type"]=be),He=parseContentType(be).type==="application/json"?(0,z.default)(He):Ee.nestedQuerystring?qs.stringify(He):querystring.stringify(He)}Ae&&He&&(dt.path+=(Ve.query?"&":"?")+He,He=null);var Be=0;if(He){var Ke=He.length;te.isBuffer(He)||(Ke=te.byteLength(He)),Be=dt.headers["Content-Length"]=Ke}Ee.dataType==="json"&&(dt.headers.Accept="application/json"),typeof Ee.beforeRequest=="function"&&Ee.beforeRequest(dt);var Ne=null,De=null,we=null,Le=!1,Ue=!1,Me=0,Re=-1,tt=!1,lt="",Pt="",Ct=null;Ee.timing&&(Ct={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),dt.headers["User-Agent"]||dt.headers["user-agent"]||(dt.headers["User-Agent"]=navigator.userAgent),Ee.gzip&&(dt.headers["Accept-Encoding"]||dt.headers["accept-encoding"]||(dt.headers["Accept-Encoding"]="gzip"));var vt=Ee.writeStream;me("Request#%d %s %s with headers %j, options.path: %s",Ge,nt,Te,dt.headers,dt.path),Ee.requestUrls.push(Te);var Ot,Zt;Array.isArray(Ee.timeout)?(Ot=ge(Ee.timeout[0]),Zt=ge(Ee.timeout[1])):Ot=Zt=ge(Ee.timeout),me("ConnectTimeout: %d, ResponseTimeout: %d",Ot,Zt);var Ut;try{Ut=pt.request(dt,We)}catch(gt){return Qe(gt)}return typeof window=="undefined"?function(){me("Connect timer ticking, timeout: %d",Ot),Ne=setTimeout(function(){Ne=null,Re===-1&&(Re=-2);var gt="Connect timeout for "+Ot+"ms",Qt="ConnectionTimeoutError";Ut.socket||(Qt="SocketAssignTimeoutError",gt+=", working sockets is full"),we=new Error(gt),we.name=Qt,we.requestId=Ge,me("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Ge,Te,we.name,gt,Le),Ye()},Ot)}():Ut.on("requestTimeout",function(){Re===-1&&(Re=-2);var gt="Connect timeout for "+Ot+"ms";we=new Error(gt),we.name="ConnectionTimeoutError",we.requestId=Ge,Ye()}),Ct&&Ut.on("finish",function(){Ct.requestSent=Date.now()-$e}),Ut.once("socket",function(gt){Ct&&(Ct.queuing=Date.now()-$e),isNode010&&gt.socket&&(gt=gt.socket);var Qt=gt.readyState;if(Qt==="opening")return gt.once("lookup",function(Lt,qt,un){me("Request#%d %s lookup: %s, %s, %s",Ge,Te,Lt,qt,un),Ct&&(Ct.dnslookup=Date.now()-$e),qt&&(lt=qt)}),void gt.once("connect",function(){Ct&&(Ct.connected=Date.now()-$e),je(),rt(),me("Request#%d %s new socket connected",Ge,Te),Le=!0,lt||(lt=gt.remoteAddress),Pt=gt.remotePort});me("Request#%d %s reuse socket connected, readyState: %s",Ge,Te,Qt),Le=!0,Ue=!0,lt||(lt=gt.remoteAddress),Pt=gt.remotePort,je(),rt()}),Ut.on("error",function(gt){gt.name!=="Error"&&gt.name!=="TypeError"||(gt.name=Le?"ResponseError":"RequestError"),gt.message+=' (req "error")',me("Request#%d %s `req error` event emit, %s: %s",Ge,Te,gt.name,gt.message),Qe(we||gt)}),vt&&vt.once("error",function(gt){gt.message+=' (writeStream "error")',we=gt,me("Request#%d %s `writeStream error` event emit, %s: %s",Ge,Te,gt.name,gt.message),Ye()}),Ee.stream?(Ee.stream.pipe(Ut),Ee.stream.once("error",function(gt){gt.message+=' (stream "error")',we=gt,me("Request#%d %s `readStream error` event emit, %s: %s",Ge,Te,gt.name,gt.message),Ye()})):Ut.end(He),Ut.requestId=Ge,Ut}}).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(ce){function ie(ue){if(Ce[ue])return Ce[ue].exports;var se=Ce[ue]={i:ue,l:!1,exports:{}};return ce[ue].call(se.exports,se,se.exports,ie),se.l=!0,se.exports}var Ce={};ie.m=ce,ie.c=Ce,ie.d=function(ue,se,te){ie.o(ue,se)||Object.defineProperty(ue,se,{configurable:!1,enumerable:!0,get:te})},ie.n=function(ue){var se=ue&&ue.__esModule?function(){return ue.default}:function(){return ue};return ie.d(se,"a",se),se},ie.o=function(ue,se){return Object.prototype.hasOwnProperty.call(ue,se)},ie.p="",ie(ie.s=12)}([function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se()})(0,function(){var ue=ue||function(se,te){var le=Object.create||function(){function ye(){}return function(me){var ge;return ye.prototype=me,ge=new ye,ye.prototype=null,ge}}(),ee={},ne=ee.lib={},E=ne.Base=function(){return{extend:function(ye){var me=le(this);return ye&&me.mixIn(ye),me.hasOwnProperty("init")&&this.init!==me.init||(me.init=function(){me.$super.init.apply(this,arguments)}),me.init.prototype=me,me.$super=this,me},create:function(){var ye=this.extend();return ye.init.apply(ye,arguments),ye},init:function(){},mixIn:function(ye){for(var me in ye)ye.hasOwnProperty(me)&&(this[me]=ye[me]);ye.hasOwnProperty("toString")&&(this.toString=ye.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),b=ne.WordArray=E.extend({init:function(ye,me){ye=this.words=ye||[],this.sigBytes=me!=null?me:4*ye.length},toString:function(ye){return(ye||x).stringify(this)},concat:function(ye){var me=this.words,ge=ye.words,_e=this.sigBytes,he=ye.sigBytes;if(this.clamp(),_e%4)for(var pe=0;pe<he;pe++){var ke=ge[pe>>>2]>>>24-pe%4*8&255;me[_e+pe>>>2]|=ke<<24-(_e+pe)%4*8}else for(var pe=0;pe<he;pe+=4)me[_e+pe>>>2]=ge[pe>>>2];return this.sigBytes+=he,this},clamp:function(){var ye=this.words,me=this.sigBytes;ye[me>>>2]&=4294967295<<32-me%4*8,ye.length=se.ceil(me/4)},clone:function(){var ye=E.clone.call(this);return ye.words=this.words.slice(0),ye},random:function(ye){for(var me,ge=[],_e=0;_e<ye;_e+=4){var he=function(ke){var ke=ke,Te=987654321,Ee=4294967295;return function(){Te=36969*(65535&Te)+(Te>>16)&Ee,ke=18e3*(65535&ke)+(ke>>16)&Ee;var Oe=(Te<<16)+ke&Ee;return Oe/=4294967296,(Oe+=.5)*(se.random()>.5?1:-1)}}(4294967296*(me||se.random()));me=987654071*he(),ge.push(4294967296*he()|0)}return new b.init(ge,ye)}}),z=ee.enc={},x=z.Hex={stringify:function(ye){for(var me=ye.words,ge=ye.sigBytes,_e=[],he=0;he<ge;he++){var pe=me[he>>>2]>>>24-he%4*8&255;_e.push((pe>>>4).toString(16)),_e.push((15&pe).toString(16))}return _e.join("")},parse:function(ye){for(var me=ye.length,ge=[],_e=0;_e<me;_e+=2)ge[_e>>>3]|=parseInt(ye.substr(_e,2),16)<<24-_e%8*4;return new b.init(ge,me/2)}},re=z.Latin1={stringify:function(ye){for(var me=ye.words,ge=ye.sigBytes,_e=[],he=0;he<ge;he++){var pe=me[he>>>2]>>>24-he%4*8&255;_e.push(String.fromCharCode(pe))}return _e.join("")},parse:function(ye){for(var me=ye.length,ge=[],_e=0;_e<me;_e++)ge[_e>>>2]|=(255&ye.charCodeAt(_e))<<24-_e%4*8;return new b.init(ge,me)}},ae=z.Utf8={stringify:function(ye){try{return decodeURIComponent(escape(re.stringify(ye)))}catch(me){throw new Error("Malformed UTF-8 data")}},parse:function(ye){return re.parse(unescape(encodeURIComponent(ye)))}},oe=ne.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new b.init,this._nDataBytes=0},_append:function(ye){typeof ye=="string"&&(ye=ae.parse(ye)),this._data.concat(ye),this._nDataBytes+=ye.sigBytes},_process:function(ye){var me=this._data,ge=me.words,_e=me.sigBytes,he=this.blockSize,pe=4*he,ke=_e/pe;ke=ye?se.ceil(ke):se.max((0|ke)-this._minBufferSize,0);var Te=ke*he,Ee=se.min(4*Te,_e);if(Te){for(var Oe=0;Oe<Te;Oe+=he)this._doProcessBlock(ge,Oe);var je=ge.splice(0,Te);me.sigBytes-=Ee}return new b.init(je,Ee)},clone:function(){var ye=E.clone.call(this);return ye._data=this._data.clone(),ye},_minBufferSize:0}),ve=(ne.Hasher=oe.extend({cfg:E.extend(),init:function(ye){this.cfg=this.cfg.extend(ye),this.reset()},reset:function(){oe.reset.call(this),this._doReset()},update:function(ye){return this._append(ye),this._process(),this},finalize:function(ye){return ye&&this._append(ye),this._doFinalize()},blockSize:16,_createHelper:function(ye){return function(me,ge){return new ye.init(ge).finalize(me)}},_createHmacHelper:function(ye){return function(me,ge){return new ve.HMAC.init(ye,ge).finalize(me)}}}),ee.algo={});return ee}(Math);return ue})},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"detectIEVersion",value:function(){for(var ee=4,ne=document.createElement("div"),E=ne.getElementsByTagName("i");ne.innerHTML="<!--[if gt IE "+ee+"]><i></i><![endif]-->",E[0];)ee++;return ee>4&&ee}},{key:"extend",value:function(ee,ne){for(var E in ne)Object.prototype.hasOwnProperty.call(ne,E)&&ne[E]&&(ee[E]=ne[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 ne(E){return E<10?"0"+E:E}return ee.getUTCFullYear()+"-"+ne(ee.getUTCMonth()+1)+"-"+ne(ee.getUTCDate())+"T"+ne(ee.getUTCHours())+":"+ne(ee.getUTCMinutes())+":"+ne(ee.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ee){return!!/^\d+$/.test(ee)}}]),le}();ie.default=te},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(se){function te(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye&me|~ye&ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function le(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye&ge|me&~ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function ee(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye^me^ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function ne(ve,ye,me,ge,_e,he,pe){var ke=ve+(me^(ye|~ge))+_e+pe;return(ke<<he|ke>>>32-he)+ye}var E=ue,b=E.lib,z=b.WordArray,x=b.Hasher,re=E.algo,ae=[];(function(){for(var ve=0;ve<64;ve++)ae[ve]=4294967296*se.abs(se.sin(ve+1))|0})();var oe=re.MD5=x.extend({_doReset:function(){this._hash=new z.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(ve,ye){for(var me=0;me<16;me++){var ge=ye+me,_e=ve[ge];ve[ge]=16711935&(_e<<8|_e>>>24)|4278255360&(_e<<24|_e>>>8)}var he=this._hash.words,pe=ve[ye+0],ke=ve[ye+1],Te=ve[ye+2],Ee=ve[ye+3],Oe=ve[ye+4],je=ve[ye+5],Pe=ve[ye+6],Qe=ve[ye+7],Xe=ve[ye+8],ot=ve[ye+9],We=ve[ye+10],rt=ve[ye+11],Ye=ve[ye+12],ut=ve[ye+13],Ge=ve[ye+14],ze=ve[ye+15],Ve=he[0],$e=he[1],nt=he[2],et=he[3];Ve=te(Ve,$e,nt,et,pe,7,ae[0]),et=te(et,Ve,$e,nt,ke,12,ae[1]),nt=te(nt,et,Ve,$e,Te,17,ae[2]),$e=te($e,nt,et,Ve,Ee,22,ae[3]),Ve=te(Ve,$e,nt,et,Oe,7,ae[4]),et=te(et,Ve,$e,nt,je,12,ae[5]),nt=te(nt,et,Ve,$e,Pe,17,ae[6]),$e=te($e,nt,et,Ve,Qe,22,ae[7]),Ve=te(Ve,$e,nt,et,Xe,7,ae[8]),et=te(et,Ve,$e,nt,ot,12,ae[9]),nt=te(nt,et,Ve,$e,We,17,ae[10]),$e=te($e,nt,et,Ve,rt,22,ae[11]),Ve=te(Ve,$e,nt,et,Ye,7,ae[12]),et=te(et,Ve,$e,nt,ut,12,ae[13]),nt=te(nt,et,Ve,$e,Ge,17,ae[14]),$e=te($e,nt,et,Ve,ze,22,ae[15]),Ve=le(Ve,$e,nt,et,ke,5,ae[16]),et=le(et,Ve,$e,nt,Pe,9,ae[17]),nt=le(nt,et,Ve,$e,rt,14,ae[18]),$e=le($e,nt,et,Ve,pe,20,ae[19]),Ve=le(Ve,$e,nt,et,je,5,ae[20]),et=le(et,Ve,$e,nt,We,9,ae[21]),nt=le(nt,et,Ve,$e,ze,14,ae[22]),$e=le($e,nt,et,Ve,Oe,20,ae[23]),Ve=le(Ve,$e,nt,et,ot,5,ae[24]),et=le(et,Ve,$e,nt,Ge,9,ae[25]),nt=le(nt,et,Ve,$e,Ee,14,ae[26]),$e=le($e,nt,et,Ve,Xe,20,ae[27]),Ve=le(Ve,$e,nt,et,ut,5,ae[28]),et=le(et,Ve,$e,nt,Te,9,ae[29]),nt=le(nt,et,Ve,$e,Qe,14,ae[30]),$e=le($e,nt,et,Ve,Ye,20,ae[31]),Ve=ee(Ve,$e,nt,et,je,4,ae[32]),et=ee(et,Ve,$e,nt,Xe,11,ae[33]),nt=ee(nt,et,Ve,$e,rt,16,ae[34]),$e=ee($e,nt,et,Ve,Ge,23,ae[35]),Ve=ee(Ve,$e,nt,et,ke,4,ae[36]),et=ee(et,Ve,$e,nt,Oe,11,ae[37]),nt=ee(nt,et,Ve,$e,Qe,16,ae[38]),$e=ee($e,nt,et,Ve,We,23,ae[39]),Ve=ee(Ve,$e,nt,et,ut,4,ae[40]),et=ee(et,Ve,$e,nt,pe,11,ae[41]),nt=ee(nt,et,Ve,$e,Ee,16,ae[42]),$e=ee($e,nt,et,Ve,Pe,23,ae[43]),Ve=ee(Ve,$e,nt,et,ot,4,ae[44]),et=ee(et,Ve,$e,nt,Ye,11,ae[45]),nt=ee(nt,et,Ve,$e,ze,16,ae[46]),$e=ee($e,nt,et,Ve,Te,23,ae[47]),Ve=ne(Ve,$e,nt,et,pe,6,ae[48]),et=ne(et,Ve,$e,nt,Qe,10,ae[49]),nt=ne(nt,et,Ve,$e,Ge,15,ae[50]),$e=ne($e,nt,et,Ve,je,21,ae[51]),Ve=ne(Ve,$e,nt,et,Ye,6,ae[52]),et=ne(et,Ve,$e,nt,Ee,10,ae[53]),nt=ne(nt,et,Ve,$e,We,15,ae[54]),$e=ne($e,nt,et,Ve,ke,21,ae[55]),Ve=ne(Ve,$e,nt,et,Xe,6,ae[56]),et=ne(et,Ve,$e,nt,ze,10,ae[57]),nt=ne(nt,et,Ve,$e,Pe,15,ae[58]),$e=ne($e,nt,et,Ve,ut,21,ae[59]),Ve=ne(Ve,$e,nt,et,Oe,6,ae[60]),et=ne(et,Ve,$e,nt,rt,10,ae[61]),nt=ne(nt,et,Ve,$e,Te,15,ae[62]),$e=ne($e,nt,et,Ve,ot,21,ae[63]),he[0]=he[0]+Ve|0,he[1]=he[1]+$e|0,he[2]=he[2]+nt|0,he[3]=he[3]+et|0},_doFinalize:function(){var ve=this._data,ye=ve.words,me=8*this._nDataBytes,ge=8*ve.sigBytes;ye[ge>>>5]|=128<<24-ge%32;var _e=se.floor(me/4294967296),he=me;ye[15+(ge+64>>>9<<4)]=16711935&(_e<<8|_e>>>24)|4278255360&(_e<<24|_e>>>8),ye[14+(ge+64>>>9<<4)]=16711935&(he<<8|he>>>24)|4278255360&(he<<24|he>>>8),ve.sigBytes=4*(ye.length+1),this._process();for(var pe=this._hash,ke=pe.words,Te=0;Te<4;Te++){var Ee=ke[Te];ke[Te]=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8)}return pe},clone:function(){var ve=x.clone.call(this);return ve._hash=this._hash.clone(),ve}});E.MD5=x._createHelper(oe),E.HmacMD5=x._createHmacHelper(oe)}(Math),ue.MD5})},function(ce,ie,Ce){"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(ce,ie,Ce){"use strict";function ue(oe){return oe&&oe.__esModule?oe:{default:oe}}function se(oe,ve){if(!(oe instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function oe(ve,ye){for(var me=0;me<ye.length;me++){var ge=ye[me];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(ve,ge.key,ge)}}return function(ve,ye,me){return ye&&oe(ve.prototype,ye),me&&oe(ve,me),ve}}(),le=Ce(5),ee=ue(le),ne=Ce(25),E=ue(ne),b=Ce(6),z=ue(b),x=Ce(7),re=ue(x),ae=function(){function oe(ve){se(this,oe);var ye=re.default.os.name,me=re.default.os.version||"",ge=re.default.browser.name,_e=re.default.browser.version||"",he=window.location.href,pe="";he&&(pe=re.default.getHost(he));var ke="pc";re.default.os.ipad?ke="pad":(re.default.os.iphone||re.default.os.android)&&(ke="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:ye,ov:me,et:ge,ev:_e,uat:navigator.userAgent,app_n:pe,tt:ke,dm:"h5",ut:""}}return te(oe,[{key:"log",value:function(ve,ye){ye&&ye.ri?(this._ri=ye.ri,delete ye.ri):this._ri=ee.default.create(),ye&&ye.ut&&(this.initParam.ut=ye.ut,delete ye.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=ve=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=ve;var me=[];if(ye)for(var ge in ye)me.push(ge+"="+ye[ge]);var _e=me.join("&");this.initParam.args=encodeURIComponent(_e==""?"0":_e);var he=[];for(var ge in this.initParam)he.push(ge+"="+this.initParam[ge]);var pe=he.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+pe}}],[{key:"getUuid",value:function(){var ve=E.default.get("p_h5_upload_u");return ve||(ve=ee.default.create(),E.default.set("p_h5_upload_u",ve,730)),ve}},{key:"getClientId",value:function(){return E.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(ve){return ve||(ve=ee.default.create()),E.default.set("p_h5_upload_clientId",ve,730),ve}}]),oe}();ie.default=ae},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"create",value:function(ee,ne){var E,b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),z=[];if(ne=ne||b.length,ee)for(E=0;E<ee;E++)z[E]=b[0|Math.random()*ne];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]=b[E==19?3&x|8:x])}return z.join("")}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var ue={version:"1.5.0"};ie.default=ue},function(ce,ie,Ce){"use strict";function ue(b,z){if(!(b instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function b(z,x){for(var re=0;re<x.length;re++){var ae=x[re];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,re){return x&&b(z.prototype,x),re&&b(z,re),z}}(),te=function(b){var z=navigator.userAgent,x="other";if(b.ios)return"iOS";if(b.android)return"android";if(z.indexOf("Baiduspider")>-1)return"Baiduspider";if(z.indexOf("PlayStation")>-1)return"PS4";var re=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"&&!re&&!ae&&(x="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(x="Linux"),re?"windows":x},le=function(){var b=navigator.userAgent,z="";return(b.indexOf("Windows NT 5.0")>-1||b.indexOf("Windows 2000")>-1)&&(z="2000"),(b.indexOf("Windows NT 5.1")>-1||b.indexOf("Windows XP")>-1)&&(z="XP"),(b.indexOf("Windows NT 5.2")>-1||b.indexOf("Windows 2003")>-1)&&(z="2003"),(b.indexOf("Windows NT 6.0")>-1||b.indexOf("Windows Vista")>-1)&&(z="Vista"),(b.indexOf("Windows NT 6.1")>-1||b.indexOf("Windows 7")>-1)&&(z="7"),(b.indexOf("Windows NT 6.2")>-1||b.indexOf("Windows 8")>-1)&&(z="8"),(b.indexOf("Windows NT 6.3")>-1||b.indexOf("Windows 8.1")>-1)&&(z="8.1"),(b.indexOf("Windows NT 10")>-1||b.indexOf("Windows 10")>-1)&&(z="10"),z},ee=function(b){var z=navigator.userAgent.toLowerCase();return b.chrome?"Chrome":b.firefox?"Firefox":b.safari?"Safari":b.webview?"webview":b.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},ne=function(){var b={},z={},x=navigator.userAgent,re=navigator.platform,ae=x.match(/Web[kK]it[\/]{0,1}([\d.]+)/),oe=x.match(/(Android);?[\s\/]+([\d.]+)?/),ve=!!x.match(/\(Macintosh\; Intel /),ye=x.match(/(iPad).*OS\s([\d_]+)/),me=x.match(/(iPod)(.*OS\s([\d_]+))?/),ge=!ye&&x.match(/(iPhone\sOS)\s([\d_]+)/),_e=x.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),he=/Win\d{2}|Windows/.test(re),pe=x.match(/Windows Phone ([\d.]+)/),ke=_e&&x.match(/TouchPad/),Te=x.match(/Kindle\/([\d.]+)/),Ee=x.match(/Silk\/([\d._]+)/),Oe=x.match(/(BlackBerry).*Version\/([\d.]+)/),je=x.match(/(BB10).*Version\/([\d.]+)/),Pe=x.match(/(RIM\sTablet\sOS)\s([\d.]+)/),Qe=x.match(/PlayBook/),Xe=x.match(/Chrome\/([\d.]+)/)||x.match(/CriOS\/([\d.]+)/),ot=x.match(/Firefox\/([\d.]+)/),We=x.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),rt=x.match(/MSIE\s([\d.]+)/)||x.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),Ye=!Xe&&x.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),ut=Ye||x.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((z.webkit=!!ae)&&(z.version=ae[1]),oe&&(b.android=!0,b.version=oe[2]),ge&&!me&&(b.ios=b.iphone=!0,b.version=ge[2].replace(/_/g,".")),ye&&(b.ios=b.ipad=!0,b.version=ye[2].replace(/_/g,".")),me&&(b.ios=b.ipod=!0,b.version=me[3]?me[3].replace(/_/g,"."):null),pe&&(b.wp=!0,b.version=pe[1]),_e&&(b.webos=!0,b.version=_e[2]),ke&&(b.touchpad=!0),Oe&&(b.blackberry=!0,b.version=Oe[2]),je&&(b.bb10=!0,b.version=je[2]),Pe&&(b.rimtabletos=!0,b.version=Pe[2]),Qe&&(z.playbook=!0),Te&&(b.kindle=!0,b.version=Te[1]),Ee&&(z.silk=!0,z.version=Ee[1]),!Ee&&b.android&&x.match(/Kindle Fire/)&&(z.silk=!0),Xe&&(z.chrome=!0,z.version=Xe[1]),ot&&(z.firefox=!0,z.version=ot[1]),We&&(b.firefoxos=!0,b.version=We[1]),rt&&(z.ie=!0,z.version=rt[1]),ut&&(ve||b.ios||he||oe)&&(z.safari=!0,b.ios||(z.version=ut[1])),Ye&&(z.webview=!0),ve){var Ge=x.match(/[\d]*_[\d]*_[\d]*/);Ge&&Ge.length>0&&Ge[0]&&(b.version=Ge[0].replace(/_/g,"."))}return b.tablet=!!(ye||Qe||oe&&!x.match(/Mobile/)||ot&&x.match(/Tablet/)||rt&&!x.match(/Phone/)&&x.match(/Touch/)),b.phone=!(b.tablet||b.ipod||!(oe||ge||_e||Oe||je||Xe&&x.match(/Android/)||Xe&&x.match(/CriOS\/([\d.]+)/)||ot&&x.match(/Mobile/)||rt&&x.match(/Touch/))),b.pc=!b.tablet&&!b.phone,ve?b.name="macOS":he?(b.name="windows",b.version=le()):b.name=te(b),z.name=ee(z),{os:b,browser:z}}(),E=function(){function b(){ue(this,b)}return se(b,null,[{key:"getHost",value:function(z){var ae="";if(z===void 0||z==null||z=="")return"";var x=z.indexOf("//"),re=z;x>-1&&(re=z.substring(x+2));var ae=re,oe=re.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 ne.os}},{key:"browser",get:function(){var z=ne.browser;return z.name||(z.name=ee()),z}}]),b}();ie.default=E},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"get",value:function(ee,ne,E,b,z){var x;E=E||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(re){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(re){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(re){}throw new Error("This browser does not support XMLHttpRequest.")}),x=new XMLHttpRequest,x.onreadystatechange=function(){x.readyState===4&&(x.status===200?ne(x.responseText):E(x.responseText))};try{b===void 0&&(b=!0),x.open("GET",ee,b),z&&(x.withCredentials=!0)}catch(re){return void E(re)}try{x.send()}catch(re){E(re)}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ne(E,b){for(var z=0;z<b.length;z++){var x=b[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,b,z){return b&&ne(E.prototype,b),z&&ne(E,z),E}}(),te=Ce(27),le=Ce(30),ee=(Ce(10),function(){function ne(){ue(this,ne)}return se(ne,null,[{key:"randomUUID",value:function(){for(var E=[],b="0123456789abcdef",z=0;z<36;z++)E[z]=b.substr(Math.floor(16*Math.random()),1);return E[14]="4",E[19]=b.substr(3&E[19]|8,1),E[8]=E[13]=E[18]=E[23]="-",E.join("")}},{key:"aliyunEncodeURI",value:function(E){var b=encodeURIComponent(E);return b=b.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,b,z){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");var x=[];for(var re in E)x.push(re);for(var ae=x.sort(),oe="",ve=ae.length,re=0;re<ve;re++){var ye=ne.aliyunEncodeURI(ae[re]),me=ne.aliyunEncodeURI(E[ae[re]]);oe==""?oe=ye+b+me:oe+=z+ye+b+me}return oe}},{key:"makeChangeSiga",value:function(E,b){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");return le.stringify(te("GET&"+ne.aliyunEncodeURI("/")+"&"+ne.aliyunEncodeURI(ne.makeUTF8sort(E,"=","&")),b+"&"))}}]),ne}());ie.default=ee},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Utf8})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Hex})},function(ce,ie,Ce){ce.exports=Ce(13)},function(ce,ie,Ce){"use strict";var ue,se,te=Ce(14),le=function(ne){return ne&&ne.__esModule?ne:{default:ne}}(te),ee={Vod:le.default};ue=[],(se=function(){return ee}.apply(ie,ue))!==void 0&&(ce.exports=se),window.AliyunUpload=ee,$t.exports=AliyunUpload},function(ce,ie,Ce){"use strict";function ue(je){return je&&je.__esModule?je:{default:je}}function se(je,Pe){if(!(je instanceof Pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function je(Pe,Qe){for(var Xe=0;Xe<Qe.length;Xe++){var ot=Qe[Xe];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(Pe,ot.key,ot)}}return function(Pe,Qe,Xe){return Qe&&je(Pe.prototype,Qe),Xe&&je(Pe,Xe),Pe}}(),le=Ce(15),ee=Ce(3),ne=Ce(16),E=ue(ne),b=Ce(18),z=ue(b),x=Ce(24),re=ue(x),ae=Ce(4),oe=ue(ae),ve=Ce(1),ye=ue(ve),me=Ce(5),ge=ue(me),_e=Ce(26),he=ue(_e),pe=Ce(31),ke=ue(pe),Te=Ce(32),Ee=ue(Te),Oe=(Ce(2),function(){function je(Pe){se(this,je),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=le.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=le.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return te(je,[{key:"init",value:function(Pe,Qe,Xe,ot){return this._retryCount=0,!(Xe&&!ot||!Xe&&ot)&&!(Pe&&!Qe||!Pe&&Qe)&&(this._ossCreditor.accessKeyId=Pe,this._ossCreditor.accessKeySecret=Qe,this._ossCreditor.securityToken=Xe,this._ossCreditor.expireTime=ot,!0)}},{key:"addFile",value:function(Pe,Qe,Xe,ot,We,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(ze){console.log(ze)}for(var Ye=(this.options,0);Ye<this._uploadList.length;Ye++)if(this._uploadList[Ye].file==Pe)return!1;var ut=new Object;if(ut.file=Pe,ut._endpoint=Qe,ut._bucket=Xe,ut._object=ot,ut.state=le.UPLOADSTATE.INIT,ut.isImage=ye.default.isImage(Pe.name),!ut.isImage&&this.options.enableUploadProgress){var Ge=this;Ee.default.getMd5(Pe,function(ze){ut.fileHash=ze;var Ve=Ge._getCheckoutpoint(ut);Ge.options.localCheckpoint||Ve||Ge._getCheckoutpointFromCloud(ut,function($e){if($e.UploadPoint){var nt=JSON.parse($e.UploadPoint);nt.loaded!=1&&(ut.checkpoint=nt.checkpoint,ut.loaded=nt.loaded,ut.videoId=$e.VideoId,Ge._saveCheckoutpoint(ut,nt.checkpoint))}},function($e){try{if(($e=JSON.parse($e))&&$e.Code=="InvalidParameter"&&$e.Message.indexOf("UserId")>0){Ge._invalidUserId=!0;var nt=$e.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(nt)}}catch(et){console.log(et)}})})}We&&(ut.videoInfo=We?JSON.parse(We).Vod:{},ut.userData=z.default.encode(We)),ut.ri=ge.default.create(),this._uploadList.push(ut),this._reportLog("20001",ut,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(ut)}catch(ze){console.log(ze)}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==le.UPLOADSTATE.UPLOADING){Qe.state=le.UPLOADSTATE.CANCELED;var Xe=this._getCheckoutpoint(Qe);Xe&&Xe.checkpoint&&(Xe=Xe.checkpoint),Xe&&this._ossUpload.abort(Qe),this._removeCheckoutpoint(Qe),this.nextUpload()}else Qe.state!=le.UPLOADSTATE.SUCCESS&&(Qe.state=le.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==le.UPLOADSTATE.CANCELED&&(Qe.state=le.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==le.VODSTATE.START||this._state==le.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=le.VODSTATE.END);var Qe=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(Qe),this._state=le.VODSTATE.START}},{key:"nextUpload",value:function(){var Pe=this.options;if(this._state==le.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=le.VODSTATE.END;try{Pe.onUploadEnd&&Pe.onUploadEnd(Qe)}catch(Xe){console.log(Xe)}}}},{key:"clear",value:function(Pe){for(var Qe=this.options,Xe=0,ot=0;ot<this._uploadList.length;ot++)Qe.uploadList[ot].state==le.UPLOADSTATE.SUCCESS&&Xe++,this._uploadList[ot].state==Pe&&(Qe.uploadList.splice(ot,1),ot--);Qe.onClear&&Qe.onClear(Qe.uploadList.length,Xe)}},{key:"stopUpload",value:function(){if((this._state==le.VODSTATE.START||this._state==le.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Pe=this._uploadList[this._curIndex];this._state=le.VODSTATE.STOP,Pe.state=le.UPLOADSTATE.STOPED,this._changeState(Pe,le.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Pe){var Qe=this;if(!Pe)return!1;var Xe=JSON.parse(z.default.decode(Pe));return!!(Xe.AccessKeyId&&Xe.AccessKeySecret&&Xe.SecurityToken&&Xe.Expiration)&&Qe.resumeUploadWithToken(Xe.AccessKeyId,Xe.AccessKeySecret,Xe.SecurityToken,Xe.Expiration)}},{key:"resumeUploadWithToken",value:function(Pe,Qe,Xe,ot){if(this.options,!(Pe&&Qe&&Xe&&ot)||this._state!=le.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var We="";return this._uploadList.length>this._curIndex&&(We=this._uploadList[this._curIndex]),We&&(this.init(Pe,Qe,Xe,ot),this._state=le.VODSTATE.START,this._ossUpload=null,this._uploadCore(We,We.retry),We.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Pe,Qe,Xe){if(this._curIndex==-1||this._state!=le.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var ot=this._uploadList[this._curIndex];ot.object?this._refreshSTSTokenUpload(ot,Pe,Qe,Xe):this.setSTSToken(ot,Pe,Qe,Xe)}}},{key:"setSTSTokenDirectlyUpload",value:function(Pe,Qe,Xe,ot,We){if(!(Qe&&Xe&&ot&&We))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var rt=Pe;this.init(Qe,Xe,ot,We),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,Xe,ot){if(!Qe||!Xe||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var We=Pe.videoInfo,rt={accessKeyId:Qe,securityToken:ot,accessKeySecret:Xe,fileName:Pe.file.name,title:We.Title,requestId:Pe.ri,region:this.options.region};We.ImageType&&(rt.imageType=We.ImageType),We.ImageExt&&(rt.imageExt=We.ImageExt),We.FileSize&&(rt.fileSize=We.FileSize),We.Description&&(rt.description=We.Description),We.CateId&&(rt.cateId=We.CateId),We.Tags&&(rt.tags=We.Tags),We.TemplateGroupId&&(rt.templateGroupId=We.TemplateGroupId),We.StorageLocation&&(rt.storageLocation=We.StorageLocation),We.CoverURL&&(rt.coverUrl=We.CoverURL),We.TransCodeMode&&(rt.transCodeMode=We.TransCodeMode),We.UserData&&(rt.userData=We.UserData);var Ye=this,ut="getUploadAuth";Pe.videoId?(rt.videoId=Pe.videoId,ut="refreshUploadAuth"):Pe.isImage&&(ut="getImageUploadAuth"),he.default[ut](rt,function(Ge){Pe.videoId=Ge.VideoId?Ge.VideoId:Pe.videoId,Ye.setUploadAuthAndAddress(Pe,Ge.UploadAuth,Ge.UploadAddress),Ye._state=le.VODSTATE.START},function(Ge){Ye._error(Pe,{name:Ge.Code,code:Ge.Code,message:Ge.Message,requestId:Ge.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Pe,Qe,Xe,ot){if(!Pe||!Qe||!Xe)return!1;var We=JSON.parse(z.default.decode(Qe));if(!(We.AccessKeyId&&We.AccessKeySecret&&We.SecurityToken&&We.Expiration))return console.error("uploadauth is invalid"),!1;var rt={},Ye=Pe;if(Xe){if(rt=JSON.parse(z.default.decode(Xe)),!rt.Endpoint||!rt.Bucket||!rt.FileName)return console.error("uploadAddress is invalid"),!1}else rt.Endpoint=Ye.endpoint,rt.Bucket=Ye.bucket,rt.FileName=Ye.object;this._ut="vod",this._uploadWay="vod",this.options.region=We.Region||this.options.region,this.init(We.AccessKeyId,We.AccessKeySecret,We.SecurityToken,We.Expiration),Ye.endpoint=Ye._endpoint?Ye._endpoint:rt.Endpoint,Ye.bucket=Ye._bucket?Ye._bucket:rt.Bucket,Ye.object=Ye._object?Ye._object:rt.FileName,Ye.region=this.options.region,ot&&(Ye.videoId=ot),this._ossUpload=null,this._uploadCore(Ye,Pe.retry),Pe.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Pe,Qe,Xe,ot){if(!Qe||!Xe||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var We={accessKeyId:Qe,securityToken:ot,accessKeySecret:Xe,videoId:Pe.object,requestId:Pe.ri,region:this.options.region},rt=this,Ye="refreshUploadAuth";Pe.isImage&&(Ye="getImageUploadAuth"),he.default[Ye](We,function(ut){rt.setUploadAuthAndAddress(Pe,ut.UploadAuth,UploadAddress),rt._state=le.VODSTATE.START},function(ut){rt._error(Pe,{name:ut.Code,code:ut.Code,message:ut.Message,requestId:ut.RequestId})})}},{key:"_upload",value:function(Pe){var Qe=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Xe=this.options;if(Pe.retry=Qe,Xe.onUploadstarted&&!Qe)try{var ot=this._getCheckoutpoint(Pe);ot&&ot.state!=le.UPLOADSTATE.UPLOADING&&(Pe.checkpoint=ot,Pe.videoId=ot.videoId),Xe.onUploadstarted(Pe)}catch(We){console.log(We)}}},{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=le.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(Ge,ze){Qe._error.call(Qe,Ge,ze)},oncomplete:function(Ge,ze){Qe._complete.call(Qe,Ge,ze)},onprogress:function(Ge,ze,Ve){Qe._progress.call(Qe,Ge,ze,Ve)}})}var Xe=ye.default.getFileType(Pe.file.name),ot=this._getCheckoutpoint(Pe),We="",rt="";ot&&ot.checkpoint&&(rt=ot.state,We=ot.videoId,ot=ot.checkpoint),ot&&We==Pe.videoId&&rt!=le.UPLOADSTATE.UPLOADING&&(ot.file=Pe.file,Pe.checkpoint=ot,ot.uploadId);var Ye=this._adjustPartSize(Pe);this._reportLog("20002",Pe,{ft:Xe,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,vid:Pe.videoId||"",fn:Pe.file.name,fw:null,fh:null,ps:Ye});var ut={headers:{"x-oss-notification":Pe.userData?Pe.userData:""},partSize:Ye,parallel:this.options.parallel};this._ossUpload.upload(Pe,ut)}},{key:"_findUploadIndex",value:function(){for(var Pe=-1,Qe=0;Qe<this._uploadList.length;Qe++)if(this._uploadList[Qe].state==le.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=le.VODSTATE.EXPIRE,Pe.state=le.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 Xe=this;return setTimeout(function(){Xe._uploadCore(Pe,!0)},1e3*Xe._retryDuration),void this._retryCount++}Qe.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Pe),this._handleError(Pe,Qe)}}},{key:"_handleError",value:function(Pe,Qe){var Xe=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],ot=le.UPLOADSTATE.FAIlURE;if(Pe.state!=le.UPLOADSTATE.CANCELED&&(Pe.state=le.UPLOADSTATE.FAIlURE,this._state=le.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(Xe&&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=ge.default.create(),this._findUploadIndex()!=-1){var We=this;this._state=le.VODSTATE.START,setTimeout(function(){We.nextUpload()},100)}}},{key:"_complete",value:function(Pe,Qe){if(Pe.state=le.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Pe)}catch(We){console.log(We)}var Xe=0;Qe&&Qe.res&&Qe.res.headers&&(Xe=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:Xe})}},{key:"_progress",value:function(Pe,Qe,Xe){if(this.options.onUploadProgress)try{Pe.loaded=Qe.loaded,this.options.onUploadProgress(Pe,Qe.total,Qe.loaded)}catch(ze){console.log(ze)}var ot=Qe.checkpoint,We=0;ot&&(Pe.checkpoint=ot,this._saveCheckoutpoint(Pe,ot,le.UPLOADSTATE.UPLOADING),We=ot.uploadId),this._retryCount=0;var rt=this._getPortNumber(ot),Ye=0;if(Xe&&Xe.headers&&(Ye=Xe.headers["x-oss-request-id"]),Qe.loaded!=0&&this._reportLog("20007",Pe,{pn:rt,requestId:Ye}),Qe.loaded!=1&&this._reportLog("20005",Pe,{UploadId:We,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 ut={file:Pe.file,checkpoint:Qe,userId:this.options.userId,videoId:Pe.videoId,region:this.options.region,fileHash:Pe.fileHash};try{var Ge=this;ke.default.upload(ut,function(){},function(ze){if((ze=JSON.parse(ze))&&ze.Code=="InvalidParameter"&&ze.Message.indexOf("UserId")>0){Ge._invalidUserId=!0;var Ve=ze.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Ve)}})}catch(ze){console.log(ze)}}}},{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);re.default.remove(Qe)}},{key:"_getCheckoutpoint",value:function(Pe){var Qe=this._getCheckoutpointKey(Pe),Xe=re.default.get(Qe);if(Xe)try{return JSON.parse(Xe)}catch(ot){}return""}},{key:"_saveCheckoutpoint",value:function(Pe,Qe,Xe){if(Qe){var ot=this._getCheckoutpointKey(Pe),We=Pe.file,rt={fileName:We.name,lastModified:We.lastModified,size:We.size,object:Pe.object,videoId:Pe.videoId,bucket:Pe.bucket,endpoint:Pe.endpoint,checkpoint:Qe,loaded:Pe.loaded,state:Xe};re.default.set(ot,JSON.stringify(rt))}}},{key:"_changeState",value:function(Pe,Qe){var Xe=this._getCheckoutpoint(Pe);Xe&&((this._onbeforeunload=!0)&&(Qe=le.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Pe,Xe.checkpoint,Qe))}},{key:"_getCheckoutpointKey",value:function(Pe){return"upload_"+Pe.file.lastModified+"_"+Pe.file.name+"_"+Pe.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Pe,Qe,Xe){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};ke.default.get(ot,function(We){Qe(We)},Xe)}},{key:"_reportLog",value:function(Pe,Qe,Xe){Xe||(Xe={}),Xe.ri=Qe.ri,this._ut&&(Xe.ut=this._ut),this._log.log(Pe,Xe)}},{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 Xe=Pe._uploadList[Pe._curIndex];Pe._changeState(Xe,le.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Pe=0;Pe<this._uploadList.length;Pe++){var Qe=this._uploadList[Pe];Qe.state!=le.UPLOADSTATE.FAIlURE&&Qe.state!=le.UPLOADSTATE.STOPED||(Qe.state=le.UPLOADSTATE.INIT)}this._state=le.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Pe){return Pe.file.size/this.options.partSize>1e4?Pe.file.size/9999:this.options.partSize}}]),je}());ie.default=Oe},function(ce,ie,Ce){"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(ce,ie,Ce){"use strict";function ue(b){return b&&b.__esModule?b:{default:b}}function se(b,z){if(!(b instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function b(z,x){for(var re=0;re<x.length;re++){var ae=x[re];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,re){return x&&b(z.prototype,x),re&&b(z,re),z}}(),le=Ce(3),ee=Ce(17),ne=(ue(ee),Ce(1)),E=(ue(ne),function(){function b(z,x){if(se(this,b),z){this._config=z,this.create(this._config),this._uploadInfo=null,this._callback={};var re=function(){};this._callback.onerror=x.onerror||re,this._callback.oncomplete=x.oncomplete||re,this._callback.onprogress=x.onprogress||re}}return te(b,[{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 re=this,ae=function(ve,ye,me){return function(ge){re._progress(ve,ye,me),ge()}},oe={parallel:x.parallel||this._config.parallel||le.UPLOADDEFAULT.PARALLEL,partSize:x.partSize||this._config.partSize||le.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(ve,ye){re._complete(ve)}).catch(function(ve){re.oss.cancel&&(re.oss&&re.oss.isCancel()?console.log("oss is cancel as error"):re.oss.cancel()),re._error(ve)})}},{key:"header",value:function(z,x,re){this.oss.get(z.object).then(function(ae){x(ae)}).catch(function(ae){re(ae)})}},{key:"_progress",value:function(z,x,re){this._callback.onprogress(this._uploadInfo,{loaded:z,total:this._uploadInfo.file.size,checkpoint:x},re)}},{key:"_error",value:function(z){this._callback.onerror(this._uploadInfo,z)}},{key:"_complete",value:function(z){this._callback.oncomplete(this._uploadInfo,z)}}]),b}());ie.default=E},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"format",value:function(ee){if(arguments.length<2)return null;for(var ne=arguments[1],E=1;E<arguments.length;E++){var b=new RegExp("\\{"+(E-1)+"\\}","gm");ne=ne.replace(b,arguments[E+1])}return{code:ee,message:ne}}},{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."}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";(function(ue){function se(ee,ne){if(!(ee instanceof ne))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function ee(ne,E){for(var b=0;b<E.length;b++){var z=E[b];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ne,z.key,z)}}return function(ne,E,b){return E&&ee(ne.prototype,E),b&&ee(ne,b),ne}}(),le=function(){function ee(){se(this,ee)}return te(ee,null,[{key:"encode",value:function(ne){return new ue(ne).toString("base64")}},{key:"decode",value:function(ne){return new ue(ne,"base64").toString()}}]),ee}();ie.default=le}).call(ie,Ce(19).Buffer)},function(ce,ie,Ce){"use strict";(function(ue){function se(){return le.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(De,we){if(se()<we)throw new RangeError("Invalid typed array length");return le.TYPED_ARRAY_SUPPORT?(De=new Uint8Array(we),De.__proto__=le.prototype):(De===null&&(De=new le(we)),De.length=we),De}function le(De,we,Le){if(!(le.TYPED_ARRAY_SUPPORT||this instanceof le))return new le(De,we,Le);if(typeof De=="number"){if(typeof we=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,De)}return ee(this,De,we,Le)}function ee(De,we,Le,Ue){if(typeof we=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&we instanceof ArrayBuffer?re(De,we,Le,Ue):typeof we=="string"?z(De,we,Le):ae(De,we)}function ne(De){if(typeof De!="number")throw new TypeError('"size" argument must be a number');if(De<0)throw new RangeError('"size" argument must not be negative')}function E(De,we,Le,Ue){return ne(we),we<=0?te(De,we):Le!==void 0?typeof Ue=="string"?te(De,we).fill(Le,Ue):te(De,we).fill(Le):te(De,we)}function b(De,we){if(ne(we),De=te(De,we<0?0:0|oe(we)),!le.TYPED_ARRAY_SUPPORT)for(var Le=0;Le<we;++Le)De[Le]=0;return De}function z(De,we,Le){if(typeof Le=="string"&&Le!==""||(Le="utf8"),!le.isEncoding(Le))throw new TypeError('"encoding" must be a valid string encoding');var Ue=0|ye(we,Le);De=te(De,Ue);var Me=De.write(we,Le);return Me!==Ue&&(De=De.slice(0,Me)),De}function x(De,we){var Le=we.length<0?0:0|oe(we.length);De=te(De,Le);for(var Ue=0;Ue<Le;Ue+=1)De[Ue]=255&we[Ue];return De}function re(De,we,Le,Ue){if(we.byteLength,Le<0||we.byteLength<Le)throw new RangeError("'offset' is out of bounds");if(we.byteLength<Le+(Ue||0))throw new RangeError("'length' is out of bounds");return we=Le===void 0&&Ue===void 0?new Uint8Array(we):Ue===void 0?new Uint8Array(we,Le):new Uint8Array(we,Le,Ue),le.TYPED_ARRAY_SUPPORT?(De=we,De.__proto__=le.prototype):De=x(De,we),De}function ae(De,we){if(le.isBuffer(we)){var Le=0|oe(we.length);return De=te(De,Le),De.length===0||we.copy(De,0,0,Le),De}if(we){if(typeof ArrayBuffer!="undefined"&&we.buffer instanceof ArrayBuffer||"length"in we)return typeof we.length!="number"||He(we.length)?te(De,0):x(De,we);if(we.type==="Buffer"&&Be(we.data))return x(De,we.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(De){if(De>=se())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+se().toString(16)+" bytes");return 0|De}function ve(De){return+De!=De&&(De=0),le.alloc(+De)}function ye(De,we){if(le.isBuffer(De))return De.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(De)||De instanceof ArrayBuffer))return De.byteLength;typeof De!="string"&&(De=""+De);var Le=De.length;if(Le===0)return 0;for(var Ue=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":case void 0:return dt(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Le;case"hex":return Le>>>1;case"base64":return yt(De).length;default:if(Ue)return dt(De).length;we=(""+we).toLowerCase(),Ue=!0}}function me(De,we,Le){var Ue=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(De||(De="utf8");;)switch(De){case"hex":return rt(this,we,Le);case"utf8":case"utf-8":return Qe(this,we,Le);case"ascii":return ot(this,we,Le);case"latin1":case"binary":return We(this,we,Le);case"base64":return Pe(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ye(this,we,Le);default:if(Ue)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),Ue=!0}}function ge(De,we,Le){var Ue=De[we];De[we]=De[Le],De[Le]=Ue}function _e(De,we,Le,Ue,Me){if(De.length===0)return-1;if(typeof Le=="string"?(Ue=Le,Le=0):Le>2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,isNaN(Le)&&(Le=Me?0:De.length-1),Le<0&&(Le=De.length+Le),Le>=De.length){if(Me)return-1;Le=De.length-1}else if(Le<0){if(!Me)return-1;Le=0}if(typeof we=="string"&&(we=le.from(we,Ue)),le.isBuffer(we))return we.length===0?-1:he(De,we,Le,Ue,Me);if(typeof we=="number")return we&=255,le.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(De,we,Le):Uint8Array.prototype.lastIndexOf.call(De,we,Le):he(De,[we],Le,Ue,Me);throw new TypeError("val must be string, number or Buffer")}function he(De,we,Le,Ue,Me){function Re(Ut,gt){return tt===1?Ut[gt]:Ut.readUInt16BE(gt*tt)}var tt=1,lt=De.length,Pt=we.length;if(Ue!==void 0&&((Ue=String(Ue).toLowerCase())==="ucs2"||Ue==="ucs-2"||Ue==="utf16le"||Ue==="utf-16le")){if(De.length<2||we.length<2)return-1;tt=2,lt/=2,Pt/=2,Le/=2}var Ct;if(Me){var vt=-1;for(Ct=Le;Ct<lt;Ct++)if(Re(De,Ct)===Re(we,vt===-1?0:Ct-vt)){if(vt===-1&&(vt=Ct),Ct-vt+1===Pt)return vt*tt}else vt!==-1&&(Ct-=Ct-vt),vt=-1}else for(Le+Pt>lt&&(Le=lt-Pt),Ct=Le;Ct>=0;Ct--){for(var Ot=!0,Zt=0;Zt<Pt;Zt++)if(Re(De,Ct+Zt)!==Re(we,Zt)){Ot=!1;break}if(Ot)return Ct}return-1}function pe(De,we,Le,Ue){Le=Number(Le)||0;var Me=De.length-Le;Ue?(Ue=Number(Ue))>Me&&(Ue=Me):Ue=Me;var Re=we.length;if(Re%2!=0)throw new TypeError("Invalid hex string");Ue>Re/2&&(Ue=Re/2);for(var tt=0;tt<Ue;++tt){var lt=parseInt(we.substr(2*tt,2),16);if(isNaN(lt))return tt;De[Le+tt]=lt}return tt}function ke(De,we,Le,Ue){return bt(dt(we,De.length-Le),De,Le,Ue)}function Te(De,we,Le,Ue){return bt(Mt(we),De,Le,Ue)}function Ee(De,we,Le,Ue){return Te(De,we,Le,Ue)}function Oe(De,we,Le,Ue){return bt(yt(we),De,Le,Ue)}function je(De,we,Le,Ue){return bt(xt(we,De.length-Le),De,Le,Ue)}function Pe(De,we,Le){return we===0&&Le===De.length?Ae.fromByteArray(De):Ae.fromByteArray(De.slice(we,Le))}function Qe(De,we,Le){Le=Math.min(De.length,Le);for(var Ue=[],Me=we;Me<Le;){var Re=De[Me],tt=null,lt=Re>239?4:Re>223?3:Re>191?2:1;if(Me+lt<=Le){var Pt,Ct,vt,Ot;switch(lt){case 1:Re<128&&(tt=Re);break;case 2:Pt=De[Me+1],(192&Pt)==128&&(Ot=(31&Re)<<6|63&Pt)>127&&(tt=Ot);break;case 3:Pt=De[Me+1],Ct=De[Me+2],(192&Pt)==128&&(192&Ct)==128&&(Ot=(15&Re)<<12|(63&Pt)<<6|63&Ct)>2047&&(Ot<55296||Ot>57343)&&(tt=Ot);break;case 4:Pt=De[Me+1],Ct=De[Me+2],vt=De[Me+3],(192&Pt)==128&&(192&Ct)==128&&(192&vt)==128&&(Ot=(15&Re)<<18|(63&Pt)<<12|(63&Ct)<<6|63&vt)>65535&&Ot<1114112&&(tt=Ot)}}tt===null?(tt=65533,lt=1):tt>65535&&(tt-=65536,Ue.push(tt>>>10&1023|55296),tt=56320|1023&tt),Ue.push(tt),Me+=lt}return Xe(Ue)}function Xe(De){var we=De.length;if(we<=Ke)return String.fromCharCode.apply(String,De);for(var Le="",Ue=0;Ue<we;)Le+=String.fromCharCode.apply(String,De.slice(Ue,Ue+=Ke));return Le}function ot(De,we,Le){var Ue="";Le=Math.min(De.length,Le);for(var Me=we;Me<Le;++Me)Ue+=String.fromCharCode(127&De[Me]);return Ue}function We(De,we,Le){var Ue="";Le=Math.min(De.length,Le);for(var Me=we;Me<Le;++Me)Ue+=String.fromCharCode(De[Me]);return Ue}function rt(De,we,Le){var Ue=De.length;(!we||we<0)&&(we=0),(!Le||Le<0||Le>Ue)&&(Le=Ue);for(var Me="",Re=we;Re<Le;++Re)Me+=Rt(De[Re]);return Me}function Ye(De,we,Le){for(var Ue=De.slice(we,Le),Me="",Re=0;Re<Ue.length;Re+=2)Me+=String.fromCharCode(Ue[Re]+256*Ue[Re+1]);return Me}function ut(De,we,Le){if(De%1!=0||De<0)throw new RangeError("offset is not uint");if(De+we>Le)throw new RangeError("Trying to access beyond buffer length")}function Ge(De,we,Le,Ue,Me,Re){if(!le.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Me||we<Re)throw new RangeError('"value" argument is out of bounds');if(Le+Ue>De.length)throw new RangeError("Index out of range")}function ze(De,we,Le,Ue){we<0&&(we=65535+we+1);for(var Me=0,Re=Math.min(De.length-Le,2);Me<Re;++Me)De[Le+Me]=(we&255<<8*(Ue?Me:1-Me))>>>8*(Ue?Me:1-Me)}function Ve(De,we,Le,Ue){we<0&&(we=4294967295+we+1);for(var Me=0,Re=Math.min(De.length-Le,4);Me<Re;++Me)De[Le+Me]=we>>>8*(Ue?Me:3-Me)&255}function $e(De,we,Le,Ue,Me,Re){if(Le+Ue>De.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function nt(De,we,Le,Ue,Me){return Me||$e(De,we,Le,4,34028234663852886e22,-34028234663852886e22),be.write(De,we,Le,Ue,23,4),Le+4}function et(De,we,Le,Ue,Me){return Me||$e(De,we,Le,8,17976931348623157e292,-17976931348623157e292),be.write(De,we,Le,Ue,52,8),Le+8}function pt(De){if(De=ct(De).replace(Ne,""),De.length<2)return"";for(;De.length%4!=0;)De+="=";return De}function ct(De){return De.trim?De.trim():De.replace(/^\s+|\s+$/g,"")}function Rt(De){return De<16?"0"+De.toString(16):De.toString(16)}function dt(De,we){we=we||1/0;for(var Le,Ue=De.length,Me=null,Re=[],tt=0;tt<Ue;++tt){if((Le=De.charCodeAt(tt))>55295&&Le<57344){if(!Me){if(Le>56319){(we-=3)>-1&&Re.push(239,191,189);continue}if(tt+1===Ue){(we-=3)>-1&&Re.push(239,191,189);continue}Me=Le;continue}if(Le<56320){(we-=3)>-1&&Re.push(239,191,189),Me=Le;continue}Le=65536+(Me-55296<<10|Le-56320)}else Me&&(we-=3)>-1&&Re.push(239,191,189);if(Me=null,Le<128){if((we-=1)<0)break;Re.push(Le)}else if(Le<2048){if((we-=2)<0)break;Re.push(Le>>6|192,63&Le|128)}else if(Le<65536){if((we-=3)<0)break;Re.push(Le>>12|224,Le>>6&63|128,63&Le|128)}else{if(!(Le<1114112))throw new Error("Invalid code point");if((we-=4)<0)break;Re.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,63&Le|128)}}return Re}function Mt(De){for(var we=[],Le=0;Le<De.length;++Le)we.push(255&De.charCodeAt(Le));return we}function xt(De,we){for(var Le,Ue,Me,Re=[],tt=0;tt<De.length&&!((we-=2)<0);++tt)Le=De.charCodeAt(tt),Ue=Le>>8,Me=Le%256,Re.push(Me),Re.push(Ue);return Re}function yt(De){return Ae.toByteArray(pt(De))}function bt(De,we,Le,Ue){for(var Me=0;Me<Ue&&!(Me+Le>=we.length||Me>=De.length);++Me)we[Me+Le]=De[Me];return Me}function He(De){return De!==De}var Ae=Ce(21),be=Ce(22),Be=Ce(23);ie.Buffer=le,ie.SlowBuffer=ve,ie.INSPECT_MAX_BYTES=50,le.TYPED_ARRAY_SUPPORT=ue.TYPED_ARRAY_SUPPORT!==void 0?ue.TYPED_ARRAY_SUPPORT:function(){try{var De=new Uint8Array(1);return De.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},De.foo()===42&&typeof De.subarray=="function"&&De.subarray(1,1).byteLength===0}catch(we){return!1}}(),ie.kMaxLength=se(),le.poolSize=8192,le._augment=function(De){return De.__proto__=le.prototype,De},le.from=function(De,we,Le){return ee(null,De,we,Le)},le.TYPED_ARRAY_SUPPORT&&(le.prototype.__proto__=Uint8Array.prototype,le.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&le[Symbol.species]===le&&Object.defineProperty(le,Symbol.species,{value:null,configurable:!0})),le.alloc=function(De,we,Le){return E(null,De,we,Le)},le.allocUnsafe=function(De){return b(null,De)},le.allocUnsafeSlow=function(De){return b(null,De)},le.isBuffer=function(De){return!(De==null||!De._isBuffer)},le.compare=function(De,we){if(!le.isBuffer(De)||!le.isBuffer(we))throw new TypeError("Arguments must be Buffers");if(De===we)return 0;for(var Le=De.length,Ue=we.length,Me=0,Re=Math.min(Le,Ue);Me<Re;++Me)if(De[Me]!==we[Me]){Le=De[Me],Ue=we[Me];break}return Le<Ue?-1:Ue<Le?1:0},le.isEncoding=function(De){switch(String(De).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}},le.concat=function(De,we){if(!Be(De))throw new TypeError('"list" argument must be an Array of Buffers');if(De.length===0)return le.alloc(0);var Le;if(we===void 0)for(we=0,Le=0;Le<De.length;++Le)we+=De[Le].length;var Ue=le.allocUnsafe(we),Me=0;for(Le=0;Le<De.length;++Le){var Re=De[Le];if(!le.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(Ue,Me),Me+=Re.length}return Ue},le.byteLength=ye,le.prototype._isBuffer=!0,le.prototype.swap16=function(){var De=this.length;if(De%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var we=0;we<De;we+=2)ge(this,we,we+1);return this},le.prototype.swap32=function(){var De=this.length;if(De%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var we=0;we<De;we+=4)ge(this,we,we+3),ge(this,we+1,we+2);return this},le.prototype.swap64=function(){var De=this.length;if(De%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var we=0;we<De;we+=8)ge(this,we,we+7),ge(this,we+1,we+6),ge(this,we+2,we+5),ge(this,we+3,we+4);return this},le.prototype.toString=function(){var De=0|this.length;return De===0?"":arguments.length===0?Qe(this,0,De):me.apply(this,arguments)},le.prototype.equals=function(De){if(!le.isBuffer(De))throw new TypeError("Argument must be a Buffer");return this===De||le.compare(this,De)===0},le.prototype.inspect=function(){var De="",we=ie.INSPECT_MAX_BYTES;return this.length>0&&(De=this.toString("hex",0,we).match(/.{2}/g).join(" "),this.length>we&&(De+=" ... ")),"<Buffer "+De+">"},le.prototype.compare=function(De,we,Le,Ue,Me){if(!le.isBuffer(De))throw new TypeError("Argument must be a Buffer");if(we===void 0&&(we=0),Le===void 0&&(Le=De?De.length:0),Ue===void 0&&(Ue=0),Me===void 0&&(Me=this.length),we<0||Le>De.length||Ue<0||Me>this.length)throw new RangeError("out of range index");if(Ue>=Me&&we>=Le)return 0;if(Ue>=Me)return-1;if(we>=Le)return 1;if(we>>>=0,Le>>>=0,Ue>>>=0,Me>>>=0,this===De)return 0;for(var Re=Me-Ue,tt=Le-we,lt=Math.min(Re,tt),Pt=this.slice(Ue,Me),Ct=De.slice(we,Le),vt=0;vt<lt;++vt)if(Pt[vt]!==Ct[vt]){Re=Pt[vt],tt=Ct[vt];break}return Re<tt?-1:tt<Re?1:0},le.prototype.includes=function(De,we,Le){return this.indexOf(De,we,Le)!==-1},le.prototype.indexOf=function(De,we,Le){return _e(this,De,we,Le,!0)},le.prototype.lastIndexOf=function(De,we,Le){return _e(this,De,we,Le,!1)},le.prototype.write=function(De,we,Le,Ue){if(we===void 0)Ue="utf8",Le=this.length,we=0;else if(Le===void 0&&typeof we=="string")Ue=we,Le=this.length,we=0;else{if(!isFinite(we))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");we|=0,isFinite(Le)?(Le|=0,Ue===void 0&&(Ue="utf8")):(Ue=Le,Le=void 0)}var Me=this.length-we;if((Le===void 0||Le>Me)&&(Le=Me),De.length>0&&(Le<0||we<0)||we>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ue||(Ue="utf8");for(var Re=!1;;)switch(Ue){case"hex":return pe(this,De,we,Le);case"utf8":case"utf-8":return ke(this,De,we,Le);case"ascii":return Te(this,De,we,Le);case"latin1":case"binary":return Ee(this,De,we,Le);case"base64":return Oe(this,De,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return je(this,De,we,Le);default:if(Re)throw new TypeError("Unknown encoding: "+Ue);Ue=(""+Ue).toLowerCase(),Re=!0}},le.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ke=4096;le.prototype.slice=function(De,we){var Le=this.length;De=~~De,we=we===void 0?Le:~~we,De<0?(De+=Le)<0&&(De=0):De>Le&&(De=Le),we<0?(we+=Le)<0&&(we=0):we>Le&&(we=Le),we<De&&(we=De);var Ue;if(le.TYPED_ARRAY_SUPPORT)Ue=this.subarray(De,we),Ue.__proto__=le.prototype;else{var Me=we-De;Ue=new le(Me,void 0);for(var Re=0;Re<Me;++Re)Ue[Re]=this[Re+De]}return Ue},le.prototype.readUIntLE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De],Me=1,Re=0;++Re<we&&(Me*=256);)Ue+=this[De+Re]*Me;return Ue},le.prototype.readUIntBE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De+--we],Me=1;we>0&&(Me*=256);)Ue+=this[De+--we]*Me;return Ue},le.prototype.readUInt8=function(De,we){return we||ut(De,1,this.length),this[De]},le.prototype.readUInt16LE=function(De,we){return we||ut(De,2,this.length),this[De]|this[De+1]<<8},le.prototype.readUInt16BE=function(De,we){return we||ut(De,2,this.length),this[De]<<8|this[De+1]},le.prototype.readUInt32LE=function(De,we){return we||ut(De,4,this.length),(this[De]|this[De+1]<<8|this[De+2]<<16)+16777216*this[De+3]},le.prototype.readUInt32BE=function(De,we){return we||ut(De,4,this.length),16777216*this[De]+(this[De+1]<<16|this[De+2]<<8|this[De+3])},le.prototype.readIntLE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De],Me=1,Re=0;++Re<we&&(Me*=256);)Ue+=this[De+Re]*Me;return Me*=128,Ue>=Me&&(Ue-=Math.pow(2,8*we)),Ue},le.prototype.readIntBE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=we,Me=1,Re=this[De+--Ue];Ue>0&&(Me*=256);)Re+=this[De+--Ue]*Me;return Me*=128,Re>=Me&&(Re-=Math.pow(2,8*we)),Re},le.prototype.readInt8=function(De,we){return we||ut(De,1,this.length),128&this[De]?-1*(255-this[De]+1):this[De]},le.prototype.readInt16LE=function(De,we){we||ut(De,2,this.length);var Le=this[De]|this[De+1]<<8;return 32768&Le?4294901760|Le:Le},le.prototype.readInt16BE=function(De,we){we||ut(De,2,this.length);var Le=this[De+1]|this[De]<<8;return 32768&Le?4294901760|Le:Le},le.prototype.readInt32LE=function(De,we){return we||ut(De,4,this.length),this[De]|this[De+1]<<8|this[De+2]<<16|this[De+3]<<24},le.prototype.readInt32BE=function(De,we){return we||ut(De,4,this.length),this[De]<<24|this[De+1]<<16|this[De+2]<<8|this[De+3]},le.prototype.readFloatLE=function(De,we){return we||ut(De,4,this.length),be.read(this,De,!0,23,4)},le.prototype.readFloatBE=function(De,we){return we||ut(De,4,this.length),be.read(this,De,!1,23,4)},le.prototype.readDoubleLE=function(De,we){return we||ut(De,8,this.length),be.read(this,De,!0,52,8)},le.prototype.readDoubleBE=function(De,we){return we||ut(De,8,this.length),be.read(this,De,!1,52,8)},le.prototype.writeUIntLE=function(De,we,Le,Ue){De=+De,we|=0,Le|=0,!Ue&&Ge(this,De,we,Le,Math.pow(2,8*Le)-1,0);var Me=1,Re=0;for(this[we]=255&De;++Re<Le&&(Me*=256);)this[we+Re]=De/Me&255;return we+Le},le.prototype.writeUIntBE=function(De,we,Le,Ue){De=+De,we|=0,Le|=0,!Ue&&Ge(this,De,we,Le,Math.pow(2,8*Le)-1,0);var Me=Le-1,Re=1;for(this[we+Me]=255&De;--Me>=0&&(Re*=256);)this[we+Me]=De/Re&255;return we+Le},le.prototype.writeUInt8=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,1,255,0),le.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),this[we]=255&De,we+1},le.prototype.writeUInt16LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,65535,0),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8):ze(this,De,we,!0),we+2},le.prototype.writeUInt16BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,65535,0),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>8,this[we+1]=255&De):ze(this,De,we,!1),we+2},le.prototype.writeUInt32LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,4294967295,0),le.TYPED_ARRAY_SUPPORT?(this[we+3]=De>>>24,this[we+2]=De>>>16,this[we+1]=De>>>8,this[we]=255&De):Ve(this,De,we,!0),we+4},le.prototype.writeUInt32BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,4294967295,0),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>24,this[we+1]=De>>>16,this[we+2]=De>>>8,this[we+3]=255&De):Ve(this,De,we,!1),we+4},le.prototype.writeIntLE=function(De,we,Le,Ue){if(De=+De,we|=0,!Ue){var Me=Math.pow(2,8*Le-1);Ge(this,De,we,Le,Me-1,-Me)}var Re=0,tt=1,lt=0;for(this[we]=255&De;++Re<Le&&(tt*=256);)De<0&&lt===0&&this[we+Re-1]!==0&&(lt=1),this[we+Re]=(De/tt>>0)-lt&255;return we+Le},le.prototype.writeIntBE=function(De,we,Le,Ue){if(De=+De,we|=0,!Ue){var Me=Math.pow(2,8*Le-1);Ge(this,De,we,Le,Me-1,-Me)}var Re=Le-1,tt=1,lt=0;for(this[we+Re]=255&De;--Re>=0&&(tt*=256);)De<0&&lt===0&&this[we+Re+1]!==0&&(lt=1),this[we+Re]=(De/tt>>0)-lt&255;return we+Le},le.prototype.writeInt8=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,1,127,-128),le.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),De<0&&(De=255+De+1),this[we]=255&De,we+1},le.prototype.writeInt16LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,32767,-32768),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8):ze(this,De,we,!0),we+2},le.prototype.writeInt16BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,32767,-32768),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>8,this[we+1]=255&De):ze(this,De,we,!1),we+2},le.prototype.writeInt32LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,2147483647,-2147483648),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8,this[we+2]=De>>>16,this[we+3]=De>>>24):Ve(this,De,we,!0),we+4},le.prototype.writeInt32BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,2147483647,-2147483648),De<0&&(De=4294967295+De+1),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>24,this[we+1]=De>>>16,this[we+2]=De>>>8,this[we+3]=255&De):Ve(this,De,we,!1),we+4},le.prototype.writeFloatLE=function(De,we,Le){return nt(this,De,we,!0,Le)},le.prototype.writeFloatBE=function(De,we,Le){return nt(this,De,we,!1,Le)},le.prototype.writeDoubleLE=function(De,we,Le){return et(this,De,we,!0,Le)},le.prototype.writeDoubleBE=function(De,we,Le){return et(this,De,we,!1,Le)},le.prototype.copy=function(De,we,Le,Ue){if(Le||(Le=0),Ue||Ue===0||(Ue=this.length),we>=De.length&&(we=De.length),we||(we=0),Ue>0&&Ue<Le&&(Ue=Le),Ue===Le||De.length===0||this.length===0)return 0;if(we<0)throw new RangeError("targetStart out of bounds");if(Le<0||Le>=this.length)throw new RangeError("sourceStart out of bounds");if(Ue<0)throw new RangeError("sourceEnd out of bounds");Ue>this.length&&(Ue=this.length),De.length-we<Ue-Le&&(Ue=De.length-we+Le);var Me,Re=Ue-Le;if(this===De&&Le<we&&we<Ue)for(Me=Re-1;Me>=0;--Me)De[Me+we]=this[Me+Le];else if(Re<1e3||!le.TYPED_ARRAY_SUPPORT)for(Me=0;Me<Re;++Me)De[Me+we]=this[Me+Le];else Uint8Array.prototype.set.call(De,this.subarray(Le,Le+Re),we);return Re},le.prototype.fill=function(De,we,Le,Ue){if(typeof De=="string"){if(typeof we=="string"?(Ue=we,we=0,Le=this.length):typeof Le=="string"&&(Ue=Le,Le=this.length),De.length===1){var Me=De.charCodeAt(0);Me<256&&(De=Me)}if(Ue!==void 0&&typeof Ue!="string")throw new TypeError("encoding must be a string");if(typeof Ue=="string"&&!le.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue)}else typeof De=="number"&&(De&=255);if(we<0||this.length<we||this.length<Le)throw new RangeError("Out of range index");if(Le<=we)return this;we>>>=0,Le=Le===void 0?this.length:Le>>>0,De||(De=0);var Re;if(typeof De=="number")for(Re=we;Re<Le;++Re)this[Re]=De;else{var tt=le.isBuffer(De)?De:dt(new le(De,Ue).toString()),lt=tt.length;for(Re=0;Re<Le-we;++Re)this[Re+we]=tt[Re%lt]}return this};var Ne=/[^+\/0-9A-Za-z-_]/g}).call(ie,Ce(20))},function(ce,ie){var Ce;Ce=function(){return this}();try{Ce=Ce||Function("return this")()||(0,eval)("this")}catch(ue){typeof window=="object"&&(Ce=window)}ce.exports=Ce},function(ce,ie,Ce){"use strict";function ue(oe){var ve=oe.length;if(ve%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return oe[ve-2]==="="?2:oe[ve-1]==="="?1:0}function se(oe){return 3*oe.length/4-ue(oe)}function te(oe){var ve,ye,me,ge,_e,he=oe.length;ge=ue(oe),_e=new z(3*he/4-ge),ye=ge>0?he-4:he;var pe=0;for(ve=0;ve<ye;ve+=4)me=b[oe.charCodeAt(ve)]<<18|b[oe.charCodeAt(ve+1)]<<12|b[oe.charCodeAt(ve+2)]<<6|b[oe.charCodeAt(ve+3)],_e[pe++]=me>>16&255,_e[pe++]=me>>8&255,_e[pe++]=255&me;return ge===2?(me=b[oe.charCodeAt(ve)]<<2|b[oe.charCodeAt(ve+1)]>>4,_e[pe++]=255&me):ge===1&&(me=b[oe.charCodeAt(ve)]<<10|b[oe.charCodeAt(ve+1)]<<4|b[oe.charCodeAt(ve+2)]>>2,_e[pe++]=me>>8&255,_e[pe++]=255&me),_e}function le(oe){return E[oe>>18&63]+E[oe>>12&63]+E[oe>>6&63]+E[63&oe]}function ee(oe,ve,ye){for(var me,ge=[],_e=ve;_e<ye;_e+=3)me=(oe[_e]<<16)+(oe[_e+1]<<8)+oe[_e+2],ge.push(le(me));return ge.join("")}function ne(oe){for(var ve,ye=oe.length,me=ye%3,ge="",_e=[],he=0,pe=ye-me;he<pe;he+=16383)_e.push(ee(oe,he,he+16383>pe?pe:he+16383));return me===1?(ve=oe[ye-1],ge+=E[ve>>2],ge+=E[ve<<4&63],ge+="=="):me===2&&(ve=(oe[ye-2]<<8)+oe[ye-1],ge+=E[ve>>10],ge+=E[ve>>4&63],ge+=E[ve<<2&63],ge+="="),_e.push(ge),_e.join("")}ie.byteLength=se,ie.toByteArray=te,ie.fromByteArray=ne;for(var E=[],b=[],z=typeof Uint8Array!="undefined"?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",re=0,ae=x.length;re<ae;++re)E[re]=x[re],b[x.charCodeAt(re)]=re;b[45]=62,b[95]=63},function(ce,ie){ie.read=function(Ce,ue,se,te,le){var ee,ne,E=8*le-te-1,b=(1<<E)-1,z=b>>1,x=-7,re=se?le-1:0,ae=se?-1:1,oe=Ce[ue+re];for(re+=ae,ee=oe&(1<<-x)-1,oe>>=-x,x+=E;x>0;ee=256*ee+Ce[ue+re],re+=ae,x-=8);for(ne=ee&(1<<-x)-1,ee>>=-x,x+=te;x>0;ne=256*ne+Ce[ue+re],re+=ae,x-=8);if(ee===0)ee=1-z;else{if(ee===b)return ne?NaN:1/0*(oe?-1:1);ne+=Math.pow(2,te),ee-=z}return(oe?-1:1)*ne*Math.pow(2,ee-te)},ie.write=function(Ce,ue,se,te,le,ee){var ne,E,b,z=8*ee-le-1,x=(1<<z)-1,re=x>>1,ae=le===23?Math.pow(2,-24)-Math.pow(2,-77):0,oe=te?0:ee-1,ve=te?1:-1,ye=ue<0||ue===0&&1/ue<0?1:0;for(ue=Math.abs(ue),isNaN(ue)||ue===1/0?(E=isNaN(ue)?1:0,ne=x):(ne=Math.floor(Math.log(ue)/Math.LN2),ue*(b=Math.pow(2,-ne))<1&&(ne--,b*=2),ue+=ne+re>=1?ae/b:ae*Math.pow(2,1-re),ue*b>=2&&(ne++,b/=2),ne+re>=x?(E=0,ne=x):ne+re>=1?(E=(ue*b-1)*Math.pow(2,le),ne+=re):(E=ue*Math.pow(2,re-1)*Math.pow(2,le),ne=0));le>=8;Ce[se+oe]=255&E,oe+=ve,E/=256,le-=8);for(ne=ne<<le|E,z+=le;z>0;Ce[se+oe]=255&ne,oe+=ve,ne/=256,z-=8);Ce[se+oe-ve]|=128*ye}},function(ce,ie){var Ce={}.toString;ce.exports=Array.isArray||function(ue){return Ce.call(ue)=="[object Array]"}},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"set",value:function(ee,ne){try{window.localStorage&&localStorage.setItem(ee,ne)}catch(E){window[ee+"_localStorage"]=ne}}},{key:"get",value:function(ee){try{if(window.localStorage)return localStorage.getItem(ee)}catch(ne){return window[ee+"_localStorage"]}return""}},{key:"remove",value:function(ee){try{window.localStorage&&localStorage.removeItem(ee)}catch(ne){delete window[ee+"_localStorage"]}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"get",value:function(ee){for(var ne=ee+"",E=document.cookie.split(";"),b=0;b<E.length;b++){var z=E[b].trim();if(z.indexOf(ne)==0)return unescape(z.substring(ne.length+1,z.length))}return""}},{key:"set",value:function(ee,ne,E){var b=new Date;b.setTime(b.getTime()+24*E*60*60*1e3);var z="expires="+b.toGMTString();document.cookie=ee+"="+escape(ne)+"; "+z}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(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 te=function(){function z(x,re){for(var ae=0;ae<re.length;ae++){var oe=re[ae];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(x,oe.key,oe)}}return function(x,re,ae){return re&&z(x.prototype,re),ae&&z(x,ae),x}}(),le=Ce(8),ee=ue(le),ne=Ce(9),E=ue(ne),b=function(){function z(){se(this,z)}return te(z,null,[{key:"refreshUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={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},ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(_e){var _e=JSON.parse(_e);re&&re(_e)},function(ge){if(ae){var _e=JSON.parse(ge);ae(_e)}})}},{key:"getUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={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&&(ve.FileSize=x.fileSize),x.description&&(ve.Description=x.description),x.cateId&&(ve.CateId=x.cateId),x.tags&&(ve.Tags=x.tags),x.templateGroupId&&(ve.TemplateGroupId=x.templateGroupId),x.storageLocation&&(ve.StorageLocation=x.storageLocation),x.coverUrl&&(ve.CoverURL=x.coverUrl),x.transCodeMode&&(ve.TransCodeMode=x.transCodeMode),x.userData&&(ve.UserData=JSON.stringify(x.userData));var ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(ge){try{ge=JSON.parse(ge)}catch(_e){if(ae)return void ae({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}re&&re(ge)},function(ge){if(ae){var _e={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{_e=JSON.parse(ge)}catch(he){}ae(_e)}})}},{key:"getImageUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={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&&(ve.Title=x.title),x.imageExt&&(ve.ImageExt=x.imageExt),x.tags&&(ve.Tags=x.tags),x.storageLocation&&(ve.StorageLocation=x.storageLocation);var ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(ge){ge=JSON.parse(ge),re&&re(ge)},function(ge){if(ae){var _e=JSON.parse(ge);ae(_e)}})}}]),z}();ie.default=b},function(ce,ie,Ce){(function(ue,se,te){ce.exports=ie=se(Ce(0),Ce(28),Ce(29))})(0,function(ue){return ue.HmacSHA1})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(){var se=ue,te=se.lib,le=te.WordArray,ee=te.Hasher,ne=se.algo,E=[],b=ne.SHA1=ee.extend({_doReset:function(){this._hash=new le.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,x){for(var re=this._hash.words,ae=re[0],oe=re[1],ve=re[2],ye=re[3],me=re[4],ge=0;ge<80;ge++){if(ge<16)E[ge]=0|z[x+ge];else{var _e=E[ge-3]^E[ge-8]^E[ge-14]^E[ge-16];E[ge]=_e<<1|_e>>>31}var he=(ae<<5|ae>>>27)+me+E[ge];he+=ge<20?1518500249+(oe&ve|~oe&ye):ge<40?1859775393+(oe^ve^ye):ge<60?(oe&ve|oe&ye|ve&ye)-1894007588:(oe^ve^ye)-899497514,me=ye,ye=ve,ve=oe<<30|oe>>>2,oe=ae,ae=he}re[0]=re[0]+ae|0,re[1]=re[1]+oe|0,re[2]=re[2]+ve|0,re[3]=re[3]+ye|0,re[4]=re[4]+me|0},_doFinalize:function(){var z=this._data,x=z.words,re=8*this._nDataBytes,ae=8*z.sigBytes;return x[ae>>>5]|=128<<24-ae%32,x[14+(ae+64>>>9<<4)]=Math.floor(re/4294967296),x[15+(ae+64>>>9<<4)]=re,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(b),se.HmacSHA1=ee._createHmacHelper(b)}(),ue.SHA1})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){(function(){var se=ue,te=se.lib,le=te.Base,ee=se.enc,ne=ee.Utf8,E=se.algo;E.HMAC=le.extend({init:function(b,z){b=this._hasher=new b.init,typeof z=="string"&&(z=ne.parse(z));var x=b.blockSize,re=4*x;z.sigBytes>re&&(z=b.finalize(z)),z.clamp();for(var ae=this._oKey=z.clone(),oe=this._iKey=z.clone(),ve=ae.words,ye=oe.words,me=0;me<x;me++)ve[me]^=1549556828,ye[me]^=909522486;ae.sigBytes=oe.sigBytes=re,this.reset()},reset:function(){var b=this._hasher;b.reset(),b.update(this._iKey)},update:function(b){return this._hasher.update(b),this},finalize:function(b){var z=this._hasher,x=z.finalize(b);return z.reset(),z.finalize(this._oKey.clone().concat(x))}})})()})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(){function se(E,b,z){for(var x=[],re=0,ae=0;ae<b;ae++)if(ae%4){var oe=z[E.charCodeAt(ae-1)]<<ae%4*2,ve=z[E.charCodeAt(ae)]>>>6-ae%4*2;x[re>>>2]|=(oe|ve)<<24-re%4*8,re++}return ee.create(x,re)}var te=ue,le=te.lib,ee=le.WordArray,ne=te.enc;ne.Base64={stringify:function(E){var b=E.words,z=E.sigBytes,x=this._map;E.clamp();for(var re=[],ae=0;ae<z;ae+=3)for(var oe=b[ae>>>2]>>>24-ae%4*8&255,ve=b[ae+1>>>2]>>>24-(ae+1)%4*8&255,ye=b[ae+2>>>2]>>>24-(ae+2)%4*8&255,me=oe<<16|ve<<8|ye,ge=0;ge<4&&ae+.75*ge<z;ge++)re.push(x.charAt(me>>>6*(3-ge)&63));var _e=x.charAt(64);if(_e)for(;re.length%4;)re.push(_e);return re.join("")},parse:function(E){var b=E.length,z=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var re=0;re<z.length;re++)x[z.charCodeAt(re)]=re}var ae=z.charAt(64);if(ae){var oe=E.indexOf(ae);oe!==-1&&(b=oe)}return se(E,b,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ue.enc.Base64})},function(ce,ie,Ce){"use strict";function ue(pe){return pe&&pe.__esModule?pe:{default:pe}}function se(pe,ke){if(!(pe instanceof ke))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function pe(ke,Te){for(var Ee=0;Ee<Te.length;Ee++){var Oe=Te[Ee];Oe.enumerable=Oe.enumerable||!1,Oe.configurable=!0,"value"in Oe&&(Oe.writable=!0),Object.defineProperty(ke,Oe.key,Oe)}}return function(ke,Te,Ee){return Te&&pe(ke.prototype,Te),Ee&&pe(ke,Ee),ke}}(),le=Ce(8),ee=ue(le),ne=Ce(7),E=ue(ne),b=Ce(4),z=ue(b),x=Ce(6),re=ue(x),ae=Ce(1),oe=ue(ae),ve=Ce(9),ye=ue(ve),me=Ce(2),ge=Ce(11),_e=Ce(10),he=function(){function pe(){se(this,pe)}return te(pe,null,[{key:"getAuthInfo",value:function(ke,Te,Ee){var Oe=ke+"|f#Ylm&^1TppeRhLg|"+Ee;return Te&&(Oe=ke+"|"+Te+"|f#Ylm&^1TppeRhLg|"+Ee),me(_e.parse(Oe)).toString(ge)}},{key:"upload",value:function(ke,Te,Ee){var Oe=oe.default.ISODateString(new Date),je=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId();Pe=z.default.setClientId(Pe);var Qe=pe.getAuthInfo(ke.userId,Pe,je),Xe=ye.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:re.default.version,AuthTimestamp:je,Timestamp:Oe,AuthInfo:Qe,FileName:ke.file.name,FileSize:ke.file.size,FileCreateTime:ke.file.lastModified,FileHash:ke.fileHash,UploadId:ke.checkpoint.checkpoint.uploadId,PartSize:ke.checkpoint.checkpoint.partSize,DonePartsCount:ke.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(ke.checkpoint),UploadRatio:ke.checkpoint.loaded,UserId:ke.userId,VideoId:ke.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Xe};Pe&&(ot.ClientId=Pe);var We=ye.default.makeUTF8sort(ot,"=","&")+"&Signature="+ye.default.aliyunEncodeURI(ye.default.makeChangeSiga(ot,ke.accessKeySecret)),rt="https://vod."+ke.region+".aliyuncs.com/?"+We;ee.default.get(rt,function(Ye){Te&&Te()},function(Ye){Ye&&(Ee(Ye),console.log(Ye))})}},{key:"get",value:function(ke,Te,Ee){var Oe=oe.default.ISODateString(new Date),je=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId(),Qe=pe.getAuthInfo(ke.userId,Pe,je),Xe=ye.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:re.default.version,AuthTimestamp:je,Timestamp:Oe,AuthInfo:Qe,UserId:ke.userId,UploadInfoList:JSON.stringify(ke.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Xe};Pe&&(ot.ClientId=Pe);var We=ye.default.makeUTF8sort(ot,"=","&")+"&Signature="+ye.default.aliyunEncodeURI(ye.default.makeChangeSiga(ot,ke.accessKeySecret)),rt="https://vod."+ke.region+".aliyuncs.com/?"+We;ee.default.get(rt,function(Ye){var ut={},Ge=Pe;Ye=Ye?JSON.parse(Ye):{},Ye.UploadProgress&&Ye.UploadProgress.UploadProgressList&&Ye.UploadProgress.UploadProgressList.length>0&&(ut=Ye.UploadProgress.UploadProgressList[0],Ge=ut.ClientId),z.default.setClientId(Ge),Te&&Te(ut)},function(Ye){Ye&&(Ee(Ye),console.log(Ye))})}}]),pe}();ie.default=he},function(ce,ie,Ce){"use strict";function ue(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ne(E,b){for(var z=0;z<b.length;z++){var x=b[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,b,z){return b&&ne(E.prototype,b),z&&ne(E,z),E}}(),te=Ce(2),le=Ce(33),ee=(Ce(11),function(){function ne(){ue(this,ne)}return se(ne,null,[{key:"getMd5",value:function(E,b,z){var x=new FileReader;x.onload=function(oe){try{if(oe&&oe.target){var ve=te(le.parse(oe.target.result)),ye=ve.toString();b(ye)}}catch(me){console.log(me)}},x.onerror=function(oe){console.log(oe),errorCallback(oe)};var re=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ae=re.call(E,0,1024);x.readAsBinaryString(ae)}}]),ne}());ie.default=ee},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Latin1})}])},99498:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){ce.defineOption("placeholder","",function(ee,ne,E){var b=E&&E!=ce.Init;if(ne&&!b)ee.on("blur",se),ee.on("change",te),ee.on("swapDoc",te),ce.on(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose=function(){ue(ee)}),te(ee);else if(!ne&&b){ee.off("blur",se),ee.off("change",te),ee.off("swapDoc",te),ce.off(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose),ie(ee);var z=ee.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}ne&&!ee.hasFocus()&&se(ee)});function ie(ee){ee.state.placeholder&&(ee.state.placeholder.parentNode.removeChild(ee.state.placeholder),ee.state.placeholder=null)}function Ce(ee){ie(ee);var ne=ee.state.placeholder=document.createElement("pre");ne.style.cssText="height: 0; overflow: visible",ne.style.direction=ee.getOption("direction"),ne.className="CodeMirror-placeholder CodeMirror-line-like";var E=ee.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),ne.appendChild(E),ee.display.lineSpace.insertBefore(ne,ee.display.lineSpace.firstChild)}function ue(ee){setTimeout(function(){var ne=!1,E=ee.getInputField();E.nodeName=="TEXTAREA"?ne=!E.value:ee.lineCount()==1&&(ne=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),ne?Ce(ee):ie(ee)},20)}function se(ee){le(ee)&&Ce(ee)}function te(ee){var ne=ee.getWrapperElement(),E=le(ee);ne.className=ne.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?Ce(ee):ie(ee)}function le(ee){return ee.lineCount()===1&&ee.getLine(0)===""}})},25717:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){var ie={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ce=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(ae,oe,ve){ve&&ve!=ce.Init&&(ae.removeKeyMap(se),ae.state.closeBrackets=null),oe&&(te(ue(oe,"pairs")),ae.state.closeBrackets=oe,ae.addKeyMap(se))});function ue(ae,oe){return oe=="pairs"&&typeof ae=="string"?ae:typeof ae=="object"&&ae[oe]!=null?ae[oe]:ie[oe]}var se={Backspace:ne,Enter:E};function te(ae){for(var oe=0;oe<ae.length;oe++){var ve=ae.charAt(oe),ye="'"+ve+"'";se[ye]||(se[ye]=le(ve))}}te(ie.pairs+"`");function le(ae){return function(oe){return z(oe,ae)}}function ee(ae){var oe=ae.state.closeBrackets;if(!oe||oe.override)return oe;var ve=ae.getModeAt(ae.getCursor());return ve.closeBrackets||oe}function ne(ae){var oe=ee(ae);if(!oe||ae.getOption("disableInput"))return ce.Pass;for(var ve=ue(oe,"pairs"),ye=ae.listSelections(),me=0;me<ye.length;me++){if(!ye[me].empty())return ce.Pass;var ge=x(ae,ye[me].head);if(!ge||ve.indexOf(ge)%2!=0)return ce.Pass}for(var me=ye.length-1;me>=0;me--){var _e=ye[me].head;ae.replaceRange("",Ce(_e.line,_e.ch-1),Ce(_e.line,_e.ch+1),"+delete")}}function E(ae){var oe=ee(ae),ve=oe&&ue(oe,"explode");if(!ve||ae.getOption("disableInput"))return ce.Pass;for(var ye=ae.listSelections(),me=0;me<ye.length;me++){if(!ye[me].empty())return ce.Pass;var ge=x(ae,ye[me].head);if(!ge||ve.indexOf(ge)%2!=0)return ce.Pass}ae.operation(function(){var _e=ae.lineSeparator()||`
`;ae.replaceSelection(_e+_e,null),ae.execCommand("goCharLeft"),ye=ae.listSelections();for(var he=0;he<ye.length;he++){var pe=ye[he].head.line;ae.indentLine(pe,null,!0),ae.indentLine(pe+1,null,!0)}})}function b(ae){var oe=ce.cmpPos(ae.anchor,ae.head)>0;return{anchor:new Ce(ae.anchor.line,ae.anchor.ch+(oe?-1:1)),head:new Ce(ae.head.line,ae.head.ch+(oe?1:-1))}}function z(ae,oe){var ve=ee(ae);if(!ve||ae.getOption("disableInput"))return ce.Pass;var ye=ue(ve,"pairs"),me=ye.indexOf(oe);if(me==-1)return ce.Pass;for(var ge=ue(ve,"closeBefore"),_e=ue(ve,"triples"),he=ye.charAt(me+1)==oe,pe=ae.listSelections(),ke=me%2==0,Te,Ee=0;Ee<pe.length;Ee++){var Oe=pe[Ee],je=Oe.head,Pe,Qe=ae.getRange(je,Ce(je.line,je.ch+1));if(ke&&!Oe.empty())Pe="surround";else if((he||!ke)&&Qe==oe)he&&re(ae,je)?Pe="both":_e.indexOf(oe)>=0&&ae.getRange(je,Ce(je.line,je.ch+3))==oe+oe+oe?Pe="skipThree":Pe="skip";else if(he&&je.ch>1&&_e.indexOf(oe)>=0&&ae.getRange(Ce(je.line,je.ch-2),je)==oe+oe){if(je.ch>2&&/\bstring/.test(ae.getTokenTypeAt(Ce(je.line,je.ch-2))))return ce.Pass;Pe="addFour"}else if(he){var Xe=je.ch==0?" ":ae.getRange(Ce(je.line,je.ch-1),je);if(!ce.isWordChar(Qe)&&Xe!=oe&&!ce.isWordChar(Xe))Pe="both";else return ce.Pass}else if(ke&&(Qe.length===0||/\s/.test(Qe)||ge.indexOf(Qe)>-1))Pe="both";else return ce.Pass;if(!Te)Te=Pe;else if(Te!=Pe)return ce.Pass}var ot=me%2?ye.charAt(me-1):oe,We=me%2?oe:ye.charAt(me+1);ae.operation(function(){if(Te=="skip")ae.execCommand("goCharRight");else if(Te=="skipThree")for(var rt=0;rt<3;rt++)ae.execCommand("goCharRight");else if(Te=="surround"){for(var Ye=ae.getSelections(),rt=0;rt<Ye.length;rt++)Ye[rt]=ot+Ye[rt]+We;ae.replaceSelections(Ye,"around"),Ye=ae.listSelections().slice();for(var rt=0;rt<Ye.length;rt++)Ye[rt]=b(Ye[rt]);ae.setSelections(Ye)}else Te=="both"?(ae.replaceSelection(ot+We,null),ae.triggerElectric(ot+We),ae.execCommand("goCharLeft")):Te=="addFour"&&(ae.replaceSelection(ot+ot+ot+ot,"before"),ae.execCommand("goCharRight"))})}function x(ae,oe){var ve=ae.getRange(Ce(oe.line,oe.ch-1),Ce(oe.line,oe.ch+1));return ve.length==2?ve:null}function re(ae,oe){var ve=ae.getTokenAt(Ce(oe.line,oe.ch+1));return/\bstring/.test(ve.type)&&ve.start==oe.ch&&(oe.ch==0||!/\bstring/.test(ae.getTokenTypeAt(oe)))}})},6313:function($t,Dt,Se){(function(ce){ce(Se(89780),Se(32855))})(function(ce){ce.defineOption("autoCloseTags",!1,function(ne,E,b){if(b!=ce.Init&&b&&ne.removeKeyMap("autoCloseTags"),!!E){var z={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(z["'/'"]=function(x){return te(x)}),(typeof E!="object"||E.whenOpening!==!1)&&(z["'>'"]=function(x){return ue(x)}),ne.addKeyMap(z)}});var ie=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ce=["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 ue(ne){if(ne.getOption("disableInput"))return ce.Pass;for(var E=ne.listSelections(),b=[],z=ne.getOption("autoCloseTags"),x=0;x<E.length;x++){if(!E[x].empty())return ce.Pass;var re=E[x].head,ae=ne.getTokenAt(re),oe=ce.innerMode(ne.getMode(),ae.state),ve=oe.state,ye=oe.mode.xmlCurrentTag&&oe.mode.xmlCurrentTag(ve),me=ye&&ye.name;if(!me)return ce.Pass;var ge=oe.mode.configuration=="html",_e=typeof z=="object"&&z.dontCloseTags||ge&&ie,he=typeof z=="object"&&z.indentTags||ge&&Ce;ae.end>re.ch&&(me=me.slice(0,me.length-ae.end+re.ch));var pe=me.toLowerCase();if(!me||ae.type=="string"&&(ae.end!=re.ch||!/[\"\']/.test(ae.string.charAt(ae.string.length-1))||ae.string.length==1)||ae.type=="tag"&&ye.close||ae.string.indexOf("/")==re.ch-ae.start-1||_e&&le(_e,pe)>-1||ee(ne,oe.mode.xmlCurrentContext&&oe.mode.xmlCurrentContext(ve)||[],me,re,!0))return ce.Pass;var ke=typeof z=="object"&&z.emptyTags;if(ke&&le(ke,me)>-1){b[x]={text:"/>",newPos:ce.Pos(re.line,re.ch+2)};continue}var Te=he&&le(he,pe)>-1;b[x]={indent:Te,text:">"+(Te?`
`:"")+"</"+me+">",newPos:Te?ce.Pos(re.line+1,0):ce.Pos(re.line,re.ch+1)}}for(var Ee=typeof z=="object"&&z.dontIndentOnAutoClose,x=E.length-1;x>=0;x--){var Oe=b[x];ne.replaceRange(Oe.text,E[x].head,E[x].anchor,"+insert");var je=ne.listSelections().slice(0);je[x]={head:Oe.newPos,anchor:Oe.newPos},ne.setSelections(je),!Ee&&Oe.indent&&(ne.indentLine(Oe.newPos.line,null,!0),ne.indentLine(Oe.newPos.line+1,null,!0))}}function se(ne,E){for(var b=ne.listSelections(),z=[],x=E?"/":"</",re=ne.getOption("autoCloseTags"),ae=typeof re=="object"&&re.dontIndentOnSlash,oe=0;oe<b.length;oe++){if(!b[oe].empty())return ce.Pass;var ve=b[oe].head,ye=ne.getTokenAt(ve),me=ce.innerMode(ne.getMode(),ye.state),ge=me.state;if(E&&(ye.type=="string"||ye.string.charAt(0)!="<"||ye.start!=ve.ch-1))return ce.Pass;var _e,he=me.mode.name!="xml"&&ne.getMode().name=="htmlmixed";if(he&&me.mode.name=="javascript")_e=x+"script";else if(he&&me.mode.name=="css")_e=x+"style";else{var pe=me.mode.xmlCurrentContext&&me.mode.xmlCurrentContext(ge);if(!pe||pe.length&&ee(ne,pe,pe[pe.length-1],ve))return ce.Pass;_e=x+pe[pe.length-1]}ne.getLine(ve.line).charAt(ye.end)!=">"&&(_e+=">"),z[oe]=_e}if(ne.replaceSelections(z),b=ne.listSelections(),!ae)for(var oe=0;oe<b.length;oe++)(oe==b.length-1||b[oe].head.line<b[oe+1].head.line)&&ne.indentLine(b[oe].head.line)}function te(ne){return ne.getOption("disableInput")?ce.Pass:se(ne,!0)}ce.commands.closeTag=function(ne){return se(ne)};function le(ne,E){if(ne.indexOf)return ne.indexOf(E);for(var b=0,z=ne.length;b<z;++b)if(ne[b]==E)return b;return-1}function ee(ne,E,b,z,x){if(!ce.scanForClosingTag)return!1;var re=Math.min(ne.lastLine()+1,z.line+500),ae=ce.scanForClosingTag(ne,z,null,re);if(!ae||ae.tag!=b)return!1;for(var oe=x?1:0,ve=E.length-1;ve>=0&&E[ve]==b;ve--)++oe;z=ae.to;for(var ve=1;ve<oe;ve++){var ye=ce.scanForClosingTag(ne,z,null,re);if(!ye||ye.tag!=b)return!1;z=ye.to}return!0}})},32855:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){"use strict";var ie=ce.Pos;function Ce(ve,ye){return ve.line-ye.line||ve.ch-ye.ch}var ue="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=ue+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",te=new RegExp("<(/?)(["+ue+"]["+se+"]*)","g");function le(ve,ye,me,ge){this.line=ye,this.ch=me,this.cm=ve,this.text=ve.getLine(ye),this.min=ge?Math.max(ge.from,ve.firstLine()):ve.firstLine(),this.max=ge?Math.min(ge.to-1,ve.lastLine()):ve.lastLine()}function ee(ve,ye){var me=ve.cm.getTokenTypeAt(ie(ve.line,ye));return me&&/\btag\b/.test(me)}function ne(ve){if(!(ve.line>=ve.max))return ve.ch=0,ve.text=ve.cm.getLine(++ve.line),!0}function E(ve){if(!(ve.line<=ve.min))return ve.text=ve.cm.getLine(--ve.line),ve.ch=ve.text.length,!0}function b(ve){for(;;){var ye=ve.text.indexOf(">",ve.ch);if(ye==-1){if(ne(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye+1;continue}var me=ve.text.lastIndexOf("/",ye),ge=me>-1&&!/\S/.test(ve.text.slice(me+1,ye));return ve.ch=ye+1,ge?"selfClose":"regular"}}function z(ve){for(;;){var ye=ve.ch?ve.text.lastIndexOf("<",ve.ch-1):-1;if(ye==-1){if(E(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye;continue}te.lastIndex=ye,ve.ch=ye;var me=te.exec(ve.text);if(me&&me.index==ye)return me}}function x(ve){for(;;){te.lastIndex=ve.ch;var ye=te.exec(ve.text);if(!ye){if(ne(ve))continue;return}if(!ee(ve,ye.index+1)){ve.ch=ye.index+1;continue}return ve.ch=ye.index+ye[0].length,ye}}function re(ve){for(;;){var ye=ve.ch?ve.text.lastIndexOf(">",ve.ch-1):-1;if(ye==-1){if(E(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye;continue}var me=ve.text.lastIndexOf("/",ye),ge=me>-1&&!/\S/.test(ve.text.slice(me+1,ye));return ve.ch=ye+1,ge?"selfClose":"regular"}}function ae(ve,ye){for(var me=[];;){var ge=x(ve),_e,he=ve.line,pe=ve.ch-(ge?ge[0].length:0);if(!ge||!(_e=b(ve)))return;if(_e!="selfClose")if(ge[1]){for(var ke=me.length-1;ke>=0;--ke)if(me[ke]==ge[2]){me.length=ke;break}if(ke<0&&(!ye||ye==ge[2]))return{tag:ge[2],from:ie(he,pe),to:ie(ve.line,ve.ch)}}else me.push(ge[2])}}function oe(ve,ye){for(var me=[];;){var ge=re(ve);if(!ge)return;if(ge=="selfClose"){z(ve);continue}var _e=ve.line,he=ve.ch,pe=z(ve);if(!pe)return;if(pe[1])me.push(pe[2]);else{for(var ke=me.length-1;ke>=0;--ke)if(me[ke]==pe[2]){me.length=ke;break}if(ke<0&&(!ye||ye==pe[2]))return{tag:pe[2],from:ie(ve.line,ve.ch),to:ie(_e,he)}}}}ce.registerHelper("fold","xml",function(ve,ye){for(var me=new le(ve,ye.line,0);;){var ge=x(me);if(!ge||me.line!=ye.line)return;var _e=b(me);if(!_e)return;if(!ge[1]&&_e!="selfClose"){var he=ie(me.line,me.ch),pe=ae(me,ge[2]);return pe&&Ce(pe.from,he)>0?{from:he,to:pe.from}:null}}}),ce.findMatchingTag=function(ve,ye,me){var ge=new le(ve,ye.line,ye.ch,me);if(!(ge.text.indexOf(">")==-1&&ge.text.indexOf("<")==-1)){var _e=b(ge),he=_e&&ie(ge.line,ge.ch),pe=_e&&z(ge);if(!(!_e||!pe||Ce(ge,ye)>0)){var ke={from:ie(ge.line,ge.ch),to:he,tag:pe[2]};return _e=="selfClose"?{open:ke,close:null,at:"open"}:pe[1]?{open:oe(ge,pe[2]),close:ke,at:"close"}:(ge=new le(ve,he.line,he.ch,me),{open:ke,close:ae(ge,pe[2]),at:"open"})}}},ce.findEnclosingTag=function(ve,ye,me,ge){for(var _e=new le(ve,ye.line,ye.ch,me);;){var he=oe(_e,ge);if(!he)break;var pe=new le(ve,ye.line,ye.ch,me),ke=ae(pe,he.tag);if(ke)return{open:he,close:ke}}},ce.scanForClosingTag=function(ve,ye,me,ge){var _e=new le(ve,ye.line,ye.ch,ge?{from:0,to:ge}:null);return ae(_e,me)}})},89780:function($t){(function(Dt,Se){$t.exports=Se()})(this,function(){"use strict";var Dt=navigator.userAgent,Se=navigator.platform,ce=/gecko\/\d/i.test(Dt),ie=/MSIE \d/.test(Dt),Ce=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dt),ue=/Edge\/(\d+)/.exec(Dt),se=ie||Ce||ue,te=se&&(ie?document.documentMode||6:+(ue||Ce)[1]),le=!ue&&/WebKit\//.test(Dt),ee=le&&/Qt\/\d+\.\d+/.test(Dt),ne=!ue&&/Chrome\//.test(Dt),E=/Opera\//.test(Dt),b=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Dt),x=/PhantomJS/.test(Dt),re=!ue&&/AppleWebKit/.test(Dt)&&/Mobile\/\w+/.test(Dt),ae=/Android/.test(Dt),oe=re||ae||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Dt),ve=re||/Mac/.test(Se),ye=/\bCrOS\b/.test(Dt),me=/win/i.test(Se),ge=E&&Dt.match(/Version\/(\d*\.\d*)/);ge&&(ge=Number(ge[1])),ge&&ge>=15&&(E=!1,le=!0);var _e=ve&&(ee||E&&(ge==null||ge<12.11)),he=ce||se&&te>=9;function pe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ke=function(a,y){var fe=a.className,de=pe(y).exec(fe);if(de){var xe=fe.slice(de.index+de[0].length);a.className=fe.slice(0,de.index)+(xe?de[1]+xe:"")}};function Te(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ee(a,y){return Te(a).appendChild(y)}function Oe(a,y,fe,de){var xe=document.createElement(a);if(fe&&(xe.className=fe),de&&(xe.style.cssText=de),typeof y=="string")xe.appendChild(document.createTextNode(y));else if(y)for(var Fe=0;Fe<y.length;++Fe)xe.appendChild(y[Fe]);return xe}function je(a,y,fe,de){var xe=Oe(a,y,fe,de);return xe.setAttribute("role","presentation"),xe}var Pe;document.createRange?Pe=function(a,y,fe,de){var xe=document.createRange();return xe.setEnd(de||a,fe),xe.setStart(a,y),xe}:Pe=function(a,y,fe){var de=document.body.createTextRange();try{de.moveToElementText(a.parentNode)}catch(xe){return de}return de.collapse(!0),de.moveEnd("character",fe),de.moveStart("character",y),de};function Qe(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Xe(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function ot(a,y){var fe=a.className;pe(y).test(fe)||(a.className+=(fe?" ":"")+y)}function We(a,y){for(var fe=a.split(" "),de=0;de<fe.length;de++)fe[de]&&!pe(fe[de]).test(y)&&(y+=" "+fe[de]);return y}var rt=function(a){a.select()};re?rt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:se&&(rt=function(a){try{a.select()}catch(y){}});function Ye(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function ut(a,y,fe){y||(y={});for(var de in a)a.hasOwnProperty(de)&&(fe!==!1||!y.hasOwnProperty(de))&&(y[de]=a[de]);return y}function Ge(a,y,fe,de,xe){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var Fe=de||0,Je=xe||0;;){var it=a.indexOf(" ",Fe);if(it<0||it>=y)return Je+(y-Fe);Je+=it-Fe,Je+=fe-Je%fe,Fe=it+1}}var ze=function(){this.id=null,this.f=null,this.time=0,this.handler=Ye(this.onTimeout,this)};ze.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ze.prototype.set=function(a,y){this.f=y;var fe=+new Date+a;(!this.id||fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=fe)};function Ve(a,y){for(var fe=0;fe<a.length;++fe)if(a[fe]==y)return fe;return-1}var $e=50,nt={toString:function(){return"CodeMirror.Pass"}},et={scroll:!1},pt={origin:"*mouse"},ct={origin:"+move"};function Rt(a,y,fe){for(var de=0,xe=0;;){var Fe=a.indexOf(" ",de);Fe==-1&&(Fe=a.length);var Je=Fe-de;if(Fe==a.length||xe+Je>=y)return de+Math.min(Je,y-xe);if(xe+=Fe-de,xe+=fe-xe%fe,de=Fe+1,xe>=y)return de}}var dt=[""];function Mt(a){for(;dt.length<=a;)dt.push(xt(dt)+" ");return dt[a]}function xt(a){return a[a.length-1]}function yt(a,y){for(var fe=[],de=0;de<a.length;de++)fe[de]=y(a[de],de);return fe}function bt(a,y,fe){for(var de=0,xe=fe(y);de<a.length&&fe(a[de])<=xe;)de++;a.splice(de,0,y)}function He(){}function Ae(a,y){var fe;return Object.create?fe=Object.create(a):(He.prototype=a,fe=new He),y&&ut(y,fe),fe}var be=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Be(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||be.test(a))}function Ke(a,y){return y?y.source.indexOf("\\w")>-1&&Be(a)?!0:y.test(a):Be(a)}function Ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var De=/[\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 we(a){return a.charCodeAt(0)>=768&&De.test(a)}function Le(a,y,fe){for(;(fe<0?y>0:y<a.length)&&we(a.charAt(y));)y+=fe;return y}function Ue(a,y,fe){for(var de=y>fe?-1:1;;){if(y==fe)return y;var xe=(y+fe)/2,Fe=de<0?Math.ceil(xe):Math.floor(xe);if(Fe==y)return a(Fe)?y:fe;a(Fe)?fe=Fe:y=Fe+de}}function Me(a,y,fe,de){if(!a)return de(y,fe,"ltr",0);for(var xe=!1,Fe=0;Fe<a.length;++Fe){var Je=a[Fe];(Je.from<fe&&Je.to>y||y==fe&&Je.to==y)&&(de(Math.max(Je.from,y),Math.min(Je.to,fe),Je.level==1?"rtl":"ltr",Fe),xe=!0)}xe||de(y,fe,"ltr")}var Re=null;function tt(a,y,fe){var de;Re=null;for(var xe=0;xe<a.length;++xe){var Fe=a[xe];if(Fe.from<y&&Fe.to>y)return xe;Fe.to==y&&(Fe.from!=Fe.to&&fe=="before"?de=xe:Re=xe),Fe.from==y&&(Fe.from!=Fe.to&&fe!="before"?de=xe:Re=xe)}return de!=null?de:Re}var lt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function fe(ht){return ht<=247?a.charAt(ht):1424<=ht&&ht<=1524?"R":1536<=ht&&ht<=1785?y.charAt(ht-1536):1774<=ht&&ht<=2220?"r":8192<=ht&&ht<=8203?"w":ht==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,xe=/[stwN]/,Fe=/[LRr]/,Je=/[Lb1n]/,it=/[1n]/;function at(ht,It,Ft){this.level=ht,this.from=It,this.to=Ft}return function(ht,It){var Ft=It=="ltr"?"L":"R";if(ht.length==0||It=="ltr"&&!de.test(ht))return!1;for(var ln=ht.length,tn=[],kn=0;kn<ln;++kn)tn.push(fe(ht.charCodeAt(kn)));for(var Hn=0,qn=Ft;Hn<ln;++Hn){var sr=tn[Hn];sr=="m"?tn[Hn]=qn:qn=sr}for(var gr=0,lr=Ft;gr<ln;++gr){var wr=tn[gr];wr=="1"&&lr=="r"?tn[gr]="n":Fe.test(wr)&&(lr=wr,wr=="r"&&(tn[gr]="R"))}for(var Qr=1,zr=tn[0];Qr<ln-1;++Qr){var Li=tn[Qr];Li=="+"&&zr=="1"&&tn[Qr+1]=="1"?tn[Qr]="1":Li==","&&zr==tn[Qr+1]&&(zr=="1"||zr=="n")&&(tn[Qr]=zr),zr=Li}for(var eo=0;eo<ln;++eo){var Do=tn[eo];if(Do==",")tn[eo]="N";else if(Do=="%"){var ho=void 0;for(ho=eo+1;ho<ln&&tn[ho]=="%";++ho);for(var sa=eo&&tn[eo-1]=="!"||ho<ln&&tn[ho]=="1"?"1":"N",$o=eo;$o<ho;++$o)tn[$o]=sa;eo=ho-1}}for(var bo=0,ea=Ft;bo<ln;++bo){var No=tn[bo];ea=="L"&&No=="1"?tn[bo]="L":Fe.test(No)&&(ea=No)}for(var ko=0;ko<ln;++ko)if(xe.test(tn[ko])){var So=void 0;for(So=ko+1;So<ln&&xe.test(tn[So]);++So);for(var mo=(ko?tn[ko-1]:Ft)=="L",ta=(So<ln?tn[So]:Ft)=="L",Is=mo==ta?mo?"L":"R":Ft,us=ko;us<So;++us)tn[us]=Is;ko=So-1}for(var Uo=[],Ua,Mo=0;Mo<ln;)if(Je.test(tn[Mo])){var xl=Mo;for(++Mo;Mo<ln&&Je.test(tn[Mo]);++Mo);Uo.push(new at(0,xl,Mo))}else{var Xa=Mo,gs=Uo.length,ys=It=="rtl"?1:0;for(++Mo;Mo<ln&&tn[Mo]!="L";++Mo);for(var Vo=Xa;Vo<Mo;)if(it.test(tn[Vo])){Xa<Vo&&(Uo.splice(gs,0,new at(1,Xa,Vo)),gs+=ys);var Os=Vo;for(++Vo;Vo<Mo&&it.test(tn[Vo]);++Vo);Uo.splice(gs,0,new at(2,Os,Vo)),gs+=ys,Xa=Vo}else++Vo;Xa<Mo&&Uo.splice(gs,0,new at(1,Xa,Mo))}return It=="ltr"&&(Uo[0].level==1&&(Ua=ht.match(/^\s+/))&&(Uo[0].from=Ua[0].length,Uo.unshift(new at(0,0,Ua[0].length))),xt(Uo).level==1&&(Ua=ht.match(/\s+$/))&&(xt(Uo).to-=Ua[0].length,Uo.push(new at(0,ln-Ua[0].length,ln)))),It=="rtl"?Uo.reverse():Uo}}();function Pt(a,y){var fe=a.order;return fe==null&&(fe=a.order=lt(a.text,y)),fe}var Ct=[],vt=function(a,y,fe){if(a.addEventListener)a.addEventListener(y,fe,!1);else if(a.attachEvent)a.attachEvent("on"+y,fe);else{var de=a._handlers||(a._handlers={});de[y]=(de[y]||Ct).concat(fe)}};function Ot(a,y){return a._handlers&&a._handlers[y]||Ct}function Zt(a,y,fe){if(a.removeEventListener)a.removeEventListener(y,fe,!1);else if(a.detachEvent)a.detachEvent("on"+y,fe);else{var de=a._handlers,xe=de&&de[y];if(xe){var Fe=Ve(xe,fe);Fe>-1&&(de[y]=xe.slice(0,Fe).concat(xe.slice(Fe+1)))}}}function Ut(a,y){var fe=Ot(a,y);if(fe.length)for(var de=Array.prototype.slice.call(arguments,2),xe=0;xe<fe.length;++xe)fe[xe].apply(null,de)}function gt(a,y,fe){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Ut(a,fe||y.type,a,y),Jt(y)||y.codemirrorIgnore}function Qt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var fe=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),de=0;de<y.length;++de)Ve(fe,y[de])==-1&&fe.push(y[de])}function Lt(a,y){return Ot(a,y).length>0}function qt(a){a.prototype.on=function(y,fe){vt(this,y,fe)},a.prototype.off=function(y,fe){Zt(this,y,fe)}}function un(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Sn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Jt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function Ln(a){un(a),Sn(a)}function Zn(a){return a.target||a.srcElement}function Gn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),ve&&a.ctrlKey&&y==1&&(y=3),y}var Jn=function(){if(se&&te<9)return!1;var a=Oe("div");return"draggable"in a||"dragDrop"in a}(),hr;function ur(a){if(hr==null){var y=Oe("span","\u200B");Ee(a,Oe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(hr=y.offsetWidth<=1&&y.offsetHeight>2&&!(se&&te<8))}var fe=hr?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return fe.setAttribute("cm-text",""),fe}var jn;function Nn(a){if(jn!=null)return jn;var y=Ee(a,document.createTextNode("A\u062EA")),fe=Pe(y,0,1).getBoundingClientRect(),de=Pe(y,1,2).getBoundingClientRect();return Te(a),!fe||fe.left==fe.right?!1:jn=de.right-fe.right<3}var rr=`
b`.split(/\n/).length!=3?function(a){for(var y=0,fe=[],de=a.length;y<=de;){var xe=a.indexOf(`
`,y);xe==-1&&(xe=a.length);var Fe=a.slice(y,a.charAt(xe-1)=="\r"?xe-1:xe),Je=Fe.indexOf("\r");Je!=-1?(fe.push(Fe.slice(0,Je)),y+=Je+1):(fe.push(Fe),y=xe+1)}return fe}:function(a){return a.split(/\r\n?|\n/)},Kn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(fe){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},In=function(){var a=Oe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),gn=null;function pn(a){if(gn!=null)return gn;var y=Ee(a,Oe("span","x")),fe=y.getBoundingClientRect(),de=Pe(y,0,1).getBoundingClientRect();return gn=Math.abs(fe.left-de.left)>1}var Dn={},Rn={};function Un(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),Dn[a]=y}function Mr(a,y){Rn[a]=y}function an(a){if(typeof a=="string"&&Rn.hasOwnProperty(a))a=Rn[a];else if(a&&typeof a.name=="string"&&Rn.hasOwnProperty(a.name)){var y=Rn[a.name];typeof y=="string"&&(y={name:y}),a=Ae(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return an("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return an("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Ie(a,y){y=an(y);var fe=Dn[y.name];if(!fe)return Ie(a,"text/plain");var de=fe(a,y);if(Ze.hasOwnProperty(y.name)){var xe=Ze[y.name];for(var Fe in xe)xe.hasOwnProperty(Fe)&&(de.hasOwnProperty(Fe)&&(de["_"+Fe]=de[Fe]),de[Fe]=xe[Fe])}if(de.name=y.name,y.helperType&&(de.helperType=y.helperType),y.modeProps)for(var Je in y.modeProps)de[Je]=y.modeProps[Je];return de}var Ze={};function qe(a,y){var fe=Ze.hasOwnProperty(a)?Ze[a]:Ze[a]={};ut(y,fe)}function st(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var fe={};for(var de in y){var xe=y[de];xe instanceof Array&&(xe=xe.concat([])),fe[de]=xe}return fe}function mt(a,y){for(var fe;a.innerMode&&(fe=a.innerMode(y),!(!fe||fe.mode==a));)y=fe.state,a=fe.mode;return fe||{mode:a,state:y}}function Bt(a,y,fe){return a.startState?a.startState(y,fe):!0}var kt=function(a,y,fe){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=fe};kt.prototype.eol=function(){return this.pos>=this.string.length},kt.prototype.sol=function(){return this.pos==this.lineStart},kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},kt.prototype.eat=function(a){var y=this.string.charAt(this.pos),fe;if(typeof a=="string"?fe=y==a:fe=y&&(a.test?a.test(y):a(y)),fe)return++this.pos,y},kt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},kt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},kt.prototype.skipToEnd=function(){this.pos=this.string.length},kt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},kt.prototype.backUp=function(a){this.pos-=a},kt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},kt.prototype.indentation=function(){return Ge(this.string,null,this.tabSize)-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},kt.prototype.match=function(a,y,fe){if(typeof a=="string"){var de=function(Je){return fe?Je.toLowerCase():Je},xe=this.string.substr(this.pos,a.length);if(de(xe)==de(a))return y!==!1&&(this.pos+=a.length),!0}else{var Fe=this.string.slice(this.pos).match(a);return Fe&&Fe.index>0?null:(Fe&&y!==!1&&(this.pos+=Fe[0].length),Fe)}},kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},kt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},kt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},kt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Nt(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var fe=a;!fe.lines;)for(var de=0;;++de){var xe=fe.children[de],Fe=xe.chunkSize();if(y<Fe){fe=xe;break}y-=Fe}return fe.lines[y]}function nn(a,y,fe){var de=[],xe=y.line;return a.iter(y.line,fe.line+1,function(Fe){var Je=Fe.text;xe==fe.line&&(Je=Je.slice(0,fe.ch)),xe==y.line&&(Je=Je.slice(y.ch)),de.push(Je),++xe}),de}function An(a,y,fe){var de=[];return a.iter(y,fe,function(xe){de.push(xe.text)}),de}function Vn(a,y){var fe=y-a.height;if(fe)for(var de=a;de;de=de.parent)de.height+=fe}function At(a){if(a.parent==null)return null;for(var y=a.parent,fe=Ve(y.lines,a),de=y.parent;de;y=de,de=de.parent)for(var xe=0;de.children[xe]!=y;++xe)fe+=de.children[xe].chunkSize();return fe+y.first}function wt(a,y){var fe=a.first;e:do{for(var de=0;de<a.children.length;++de){var xe=a.children[de],Fe=xe.height;if(y<Fe){a=xe;continue e}y-=Fe,fe+=xe.chunkSize()}return fe}while(!a.lines);for(var Je=0;Je<a.lines.length;++Je){var it=a.lines[Je],at=it.height;if(y<at)break;y-=at}return fe+Je}function dn(a,y){return y>=a.first&&y<a.first+a.size}function Gt(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Et(a,y,fe){if(fe===void 0&&(fe=null),!(this instanceof Et))return new Et(a,y,fe);this.line=a,this.ch=y,this.sticky=fe}function Ht(a,y){return a.line-y.line||a.ch-y.ch}function on(a,y){return a.sticky==y.sticky&&Ht(a,y)==0}function sn(a){return Et(a.line,a.ch)}function yn(a,y){return Ht(a,y)<0?y:a}function Wt(a,y){return Ht(a,y)<0?a:y}function Cn(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Vt(a,y){if(y.line<a.first)return Et(a.first,0);var fe=a.first+a.size-1;return y.line>fe?Et(fe,Nt(a,fe).text.length):Pn(y,Nt(a,y.line).text.length)}function Pn(a,y){var fe=a.ch;return fe==null||fe>y?Et(a.line,y):fe<0?Et(a.line,0):a}function bn(a,y){for(var fe=[],de=0;de<y.length;de++)fe[de]=Vt(a,y[de]);return fe}var zn=function(a,y){this.state=a,this.lookAhead=y},Bn=function(a,y,fe,de){this.state=y,this.doc=a,this.line=fe,this.maxLookAhead=de||0,this.baseTokens=null,this.baseTokenPos=1};Bn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Bn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},Bn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Bn.fromSaved=function(a,y,fe){return y instanceof zn?new Bn(a,st(a.mode,y.state),fe,y.lookAhead):new Bn(a,st(a.mode,y),fe)},Bn.prototype.save=function(a){var y=a!==!1?st(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new zn(y,this.maxLookAhead):y};function er(a,y,fe,de){var xe=[a.state.modeGen],Fe={};Xr(a,y.text,a.doc.mode,fe,function(ht,It){return xe.push(ht,It)},Fe,de);for(var Je=fe.state,it=function(ht){fe.baseTokens=xe;var It=a.state.overlays[ht],Ft=1,ln=0;fe.state=!0,Xr(a,y.text,It.mode,fe,function(tn,kn){for(var Hn=Ft;ln<tn;){var qn=xe[Ft];qn>tn&&xe.splice(Ft,1,tn,xe[Ft+1],qn),Ft+=2,ln=Math.min(tn,qn)}if(kn)if(It.opaque)xe.splice(Hn,Ft-Hn,tn,"overlay "+kn),Ft=Hn+2;else for(;Hn<Ft;Hn+=2){var sr=xe[Hn+1];xe[Hn+1]=(sr?sr+" ":"")+"overlay "+kn}},Fe),fe.state=Je,fe.baseTokens=null,fe.baseTokenPos=1},at=0;at<a.state.overlays.length;++at)it(at);return{styles:xe,classes:Fe.bgClass||Fe.textClass?Fe:null}}function cr(a,y,fe){if(!y.styles||y.styles[0]!=a.state.modeGen){var de=pr(a,At(y)),xe=y.text.length>a.options.maxHighlightLength&&st(a.doc.mode,de.state),Fe=er(a,y,de);xe&&(de.state=xe),y.stateAfter=de.save(!xe),y.styles=Fe.styles,Fe.classes?y.styleClasses=Fe.classes:y.styleClasses&&(y.styleClasses=null),fe===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function pr(a,y,fe){var de=a.doc,xe=a.display;if(!de.mode.startState)return new Bn(de,!0,y);var Fe=hi(a,y,fe),Je=Fe>de.first&&Nt(de,Fe-1).stateAfter,it=Je?Bn.fromSaved(de,Je,Fe):new Bn(de,Bt(de.mode),Fe);return de.iter(Fe,y,function(at){Nr(a,at.text,it);var ht=it.line;at.stateAfter=ht==y-1||ht%5==0||ht>=xe.viewFrom&&ht<xe.viewTo?it.save():null,it.nextLine()}),fe&&(de.modeFrontier=it.line),it}function Nr(a,y,fe,de){var xe=a.doc.mode,Fe=new kt(y,a.options.tabSize,fe);for(Fe.start=Fe.pos=de||0,y==""&&Br(xe,fe.state);!Fe.eol();)ei(xe,Fe,fe.state),Fe.start=Fe.pos}function Br(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var fe=mt(a,y);if(fe.mode.blankLine)return fe.mode.blankLine(fe.state)}}function ei(a,y,fe,de){for(var xe=0;xe<10;xe++){de&&(de[0]=mt(a,fe).mode);var Fe=a.token(y,fe);if(y.pos>y.start)return Fe}throw new Error("Mode "+a.name+" failed to advance stream.")}var xr=function(a,y,fe){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=fe};function Tr(a,y,fe,de){var xe=a.doc,Fe=xe.mode,Je;y=Vt(xe,y);var it=Nt(xe,y.line),at=pr(a,y.line,fe),ht=new kt(it.text,a.options.tabSize,at),It;for(de&&(It=[]);(de||ht.pos<y.ch)&&!ht.eol();)ht.start=ht.pos,Je=ei(Fe,ht,at.state),de&&It.push(new xr(ht,Je,st(xe.mode,at.state)));return de?It:new xr(ht,Je,at.state)}function Pr(a,y){if(a)for(;;){var fe=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fe)break;a=a.slice(0,fe.index)+a.slice(fe.index+fe[0].length);var de=fe[1]?"bgClass":"textClass";y[de]==null?y[de]=fe[2]:new RegExp("(?:^|\\s)"+fe[2]+"(?:$|\\s)").test(y[de])||(y[de]+=" "+fe[2])}return a}function Xr(a,y,fe,de,xe,Fe,Je){var it=fe.flattenSpans;it==null&&(it=a.options.flattenSpans);var at=0,ht=null,It=new kt(y,a.options.tabSize,de),Ft,ln=a.options.addModeClass&&[null];for(y==""&&Pr(Br(fe,de.state),Fe);!It.eol();){if(It.pos>a.options.maxHighlightLength?(it=!1,Je&&Nr(a,y,de,It.pos),It.pos=y.length,Ft=null):Ft=Pr(ei(fe,It,de.state,ln),Fe),ln){var tn=ln[0].name;tn&&(Ft="m-"+(Ft?tn+" "+Ft:tn))}if(!it||ht!=Ft){for(;at<It.start;)at=Math.min(It.start,at+5e3),xe(at,ht);ht=Ft}It.start=It.pos}for(;at<It.pos;){var kn=Math.min(It.pos,at+5e3);xe(kn,ht),at=kn}}function hi(a,y,fe){for(var de,xe,Fe=a.doc,Je=fe?-1:y-(a.doc.mode.innerMode?1e3:100),it=y;it>Je;--it){if(it<=Fe.first)return Fe.first;var at=Nt(Fe,it-1),ht=at.stateAfter;if(ht&&(!fe||it+(ht instanceof zn?ht.lookAhead:0)<=Fe.modeFrontier))return it;var It=Ge(at.text,null,a.options.tabSize);(xe==null||de>It)&&(xe=it-1,de=It)}return xe}function bi(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var fe=a.first,de=y-1;de>fe;de--){var xe=Nt(a,de).stateAfter;if(xe&&(!(xe instanceof zn)||de+xe.lookAhead<y)){fe=de+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,fe)}}var Si=!1,Kr=!1;function Ti(){Si=!0}function Ei(){Kr=!0}function tr(a,y,fe){this.marker=a,this.from=y,this.to=fe}function br(a,y){if(a)for(var fe=0;fe<a.length;++fe){var de=a[fe];if(de.marker==y)return de}}function kr(a,y){for(var fe,de=0;de<a.length;++de)a[de]!=y&&(fe||(fe=[])).push(a[de]);return fe}function ti(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function ni(a,y,fe){var de;if(a)for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=Fe.marker,it=Fe.from==null||(Je.inclusiveLeft?Fe.from<=y:Fe.from<y);if(it||Fe.from==y&&Je.type=="bookmark"&&(!fe||!Fe.marker.insertLeft)){var at=Fe.to==null||(Je.inclusiveRight?Fe.to>=y:Fe.to>y);(de||(de=[])).push(new tr(Je,Fe.from,at?null:Fe.to))}}return de}function wi(a,y,fe){var de;if(a)for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=Fe.marker,it=Fe.to==null||(Je.inclusiveRight?Fe.to>=y:Fe.to>y);if(it||Fe.from==y&&Je.type=="bookmark"&&(!fe||Fe.marker.insertLeft)){var at=Fe.from==null||(Je.inclusiveLeft?Fe.from<=y:Fe.from<y);(de||(de=[])).push(new tr(Je,at?null:Fe.from-y,Fe.to==null?null:Fe.to-y))}}return de}function Ri(a,y){if(y.full)return null;var fe=dn(a,y.from.line)&&Nt(a,y.from.line).markedSpans,de=dn(a,y.to.line)&&Nt(a,y.to.line).markedSpans;if(!fe&&!de)return null;var xe=y.from.ch,Fe=y.to.ch,Je=Ht(y.from,y.to)==0,it=ni(fe,xe,Je),at=wi(de,Fe,Je),ht=y.text.length==1,It=xt(y.text).length+(ht?xe:0);if(it)for(var Ft=0;Ft<it.length;++Ft){var ln=it[Ft];if(ln.to==null){var tn=br(at,ln.marker);tn?ht&&(ln.to=tn.to==null?null:tn.to+It):ln.to=xe}}if(at)for(var kn=0;kn<at.length;++kn){var Hn=at[kn];if(Hn.to!=null&&(Hn.to+=It),Hn.from==null){var qn=br(it,Hn.marker);qn||(Hn.from=It,ht&&(it||(it=[])).push(Hn))}else Hn.from+=It,ht&&(it||(it=[])).push(Hn)}it&&(it=Tt(it)),at&&at!=it&&(at=Tt(at));var sr=[it];if(!ht){var gr=y.text.length-2,lr;if(gr>0&&it)for(var wr=0;wr<it.length;++wr)it[wr].to==null&&(lr||(lr=[])).push(new tr(it[wr].marker,null,null));for(var Qr=0;Qr<gr;++Qr)sr.push(lr);sr.push(at)}return sr}function Tt(a){for(var y=0;y<a.length;++y){var fe=a[y];fe.from!=null&&fe.from==fe.to&&fe.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function en(a,y,fe){var de=null;if(a.iter(y.line,fe.line+1,function(tn){if(tn.markedSpans)for(var kn=0;kn<tn.markedSpans.length;++kn){var Hn=tn.markedSpans[kn].marker;Hn.readOnly&&(!de||Ve(de,Hn)==-1)&&(de||(de=[])).push(Hn)}}),!de)return null;for(var xe=[{from:y,to:fe}],Fe=0;Fe<de.length;++Fe)for(var Je=de[Fe],it=Je.find(0),at=0;at<xe.length;++at){var ht=xe[at];if(!(Ht(ht.to,it.from)<0||Ht(ht.from,it.to)>0)){var It=[at,1],Ft=Ht(ht.from,it.from),ln=Ht(ht.to,it.to);(Ft<0||!Je.inclusiveLeft&&!Ft)&&It.push({from:ht.from,to:it.from}),(ln>0||!Je.inclusiveRight&&!ln)&&It.push({from:it.to,to:ht.to}),xe.splice.apply(xe,It),at+=It.length-3}}return xe}function Yt(a){var y=a.markedSpans;if(y){for(var fe=0;fe<y.length;++fe)y[fe].marker.detachLine(a);a.markedSpans=null}}function rn(a,y){if(y){for(var fe=0;fe<y.length;++fe)y[fe].marker.attachLine(a);a.markedSpans=y}}function hn(a){return a.inclusiveLeft?-1:0}function vn(a){return a.inclusiveRight?1:0}function On(a,y){var fe=a.lines.length-y.lines.length;if(fe!=0)return fe;var de=a.find(),xe=y.find(),Fe=Ht(de.from,xe.from)||hn(a)-hn(y);if(Fe)return-Fe;var Je=Ht(de.to,xe.to)||vn(a)-vn(y);return Je||y.id-a.id}function En(a,y){var fe=Kr&&a.markedSpans,de;if(fe)for(var xe=void 0,Fe=0;Fe<fe.length;++Fe)xe=fe[Fe],xe.marker.collapsed&&(y?xe.from:xe.to)==null&&(!de||On(de,xe.marker)<0)&&(de=xe.marker);return de}function _n(a){return En(a,!0)}function Kt(a){return En(a,!1)}function fn(a,y){var fe=Kr&&a.markedSpans,de;if(fe)for(var xe=0;xe<fe.length;++xe){var Fe=fe[xe];Fe.marker.collapsed&&(Fe.from==null||Fe.from<y)&&(Fe.to==null||Fe.to>y)&&(!de||On(de,Fe.marker)<0)&&(de=Fe.marker)}return de}function zt(a,y,fe,de,xe){var Fe=Nt(a,y),Je=Kr&&Fe.markedSpans;if(Je)for(var it=0;it<Je.length;++it){var at=Je[it];if(at.marker.collapsed){var ht=at.marker.find(0),It=Ht(ht.from,fe)||hn(at.marker)-hn(xe),Ft=Ht(ht.to,de)||vn(at.marker)-vn(xe);if(!(It>=0&&Ft<=0||It<=0&&Ft>=0)&&(It<=0&&(at.marker.inclusiveRight&&xe.inclusiveLeft?Ht(ht.to,fe)>=0:Ht(ht.to,fe)>0)||It>=0&&(at.marker.inclusiveRight&&xe.inclusiveLeft?Ht(ht.from,de)<=0:Ht(ht.from,de)<0)))return!0}}}function jt(a){for(var y;y=_n(a);)a=y.find(-1,!0).line;return a}function Xt(a){for(var y;y=Kt(a);)a=y.find(1,!0).line;return a}function cn(a){for(var y,fe;y=Kt(a);)a=y.find(1,!0).line,(fe||(fe=[])).push(a);return fe}function Fn(a,y){var fe=Nt(a,y),de=jt(fe);return fe==de?y:At(de)}function Wn(a,y){if(y>a.lastLine())return y;var fe=Nt(a,y),de;if(!nr(a,fe))return y;for(;de=Kt(fe);)fe=de.find(1,!0).line;return At(fe)+1}function nr(a,y){var fe=Kr&&y.markedSpans;if(fe){for(var de=void 0,xe=0;xe<fe.length;++xe)if(de=fe[xe],!!de.marker.collapsed){if(de.from==null)return!0;if(!de.marker.widgetNode&&de.from==0&&de.marker.inclusiveLeft&&ar(a,y,de))return!0}}}function ar(a,y,fe){if(fe.to==null){var de=fe.marker.find(1,!0);return ar(a,de.line,br(de.line.markedSpans,fe.marker))}if(fe.marker.inclusiveRight&&fe.to==y.text.length)return!0;for(var xe=void 0,Fe=0;Fe<y.markedSpans.length;++Fe)if(xe=y.markedSpans[Fe],xe.marker.collapsed&&!xe.marker.widgetNode&&xe.from==fe.to&&(xe.to==null||xe.to!=fe.from)&&(xe.marker.inclusiveLeft||fe.marker.inclusiveRight)&&ar(a,y,xe))return!0}function $n(a){a=jt(a);for(var y=0,fe=a.parent,de=0;de<fe.lines.length;++de){var xe=fe.lines[de];if(xe==a)break;y+=xe.height}for(var Fe=fe.parent;Fe;fe=Fe,Fe=fe.parent)for(var Je=0;Je<Fe.children.length;++Je){var it=Fe.children[Je];if(it==fe)break;y+=it.height}return y}function mr(a){if(a.height==0)return 0;for(var y=a.text.length,fe,de=a;fe=_n(de);){var xe=fe.find(0,!0);de=xe.from.line,y+=xe.from.ch-xe.to.ch}for(de=a;fe=Kt(de);){var Fe=fe.find(0,!0);y-=de.text.length-Fe.from.ch,de=Fe.to.line,y+=de.text.length-Fe.to.ch}return y}function dr(a){var y=a.display,fe=a.doc;y.maxLine=Nt(fe,fe.first),y.maxLineLength=mr(y.maxLine),y.maxLineChanged=!0,fe.iter(function(de){var xe=mr(de);xe>y.maxLineLength&&(y.maxLineLength=xe,y.maxLine=de)})}var jr=function(a,y,fe){this.text=a,rn(this,y),this.height=fe?fe(this):1};jr.prototype.lineNo=function(){return At(this)},qt(jr);function qr(a,y,fe,de){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Yt(a),rn(a,fe);var xe=de?de(a):1;xe!=a.height&&Vn(a,xe)}function $r(a){a.parent=null,Yt(a)}var Gr={},ri={};function Jr(a,y){if(!a||/^\s*$/.test(a))return null;var fe=y.addModeClass?ri:Gr;return fe[a]||(fe[a]=a.replace(/\S+/g,"cm-$&"))}function Wr(a,y){var fe=je("span",null,null,le?"padding-right: .1px":null),de={pre:je("pre",[fe],"CodeMirror-line"),content:fe,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var xe=0;xe<=(y.rest?y.rest.length:0);xe++){var Fe=xe?y.rest[xe-1]:y.line,Je=void 0;de.pos=0,de.addToken=ir,Nn(a.display.measure)&&(Je=Pt(Fe,a.doc.direction))&&(de.addToken=fr(de.addToken,Je)),de.map=[];var it=y!=a.display.externalMeasured&&At(Fe);Yr(Fe,de,cr(a,Fe,it)),Fe.styleClasses&&(Fe.styleClasses.bgClass&&(de.bgClass=We(Fe.styleClasses.bgClass,de.bgClass||"")),Fe.styleClasses.textClass&&(de.textClass=We(Fe.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(ur(a.display.measure))),xe==0?(y.measure.map=de.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(de.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(le){var at=de.content.lastChild;(/\bcm-tab\b/.test(at.className)||at.querySelector&&at.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return Ut(a,"renderLine",a,y.line,de.pre),de.pre.className&&(de.textClass=We(de.pre.className,de.textClass||"")),de}function Vr(a){var y=Oe("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function ir(a,y,fe,de,xe,Fe,Je){if(y){var it=a.splitSpaces?or(y,a.trailingSpace):y,at=a.cm.state.specialChars,ht=!1,It;if(!at.test(y))a.col+=y.length,It=document.createTextNode(it),a.map.push(a.pos,a.pos+y.length,It),se&&te<9&&(ht=!0),a.pos+=y.length;else{It=document.createDocumentFragment();for(var Ft=0;;){at.lastIndex=Ft;var ln=at.exec(y),tn=ln?ln.index-Ft:y.length-Ft;if(tn){var kn=document.createTextNode(it.slice(Ft,Ft+tn));se&&te<9?It.appendChild(Oe("span",[kn])):It.appendChild(kn),a.map.push(a.pos,a.pos+tn,kn),a.col+=tn,a.pos+=tn}if(!ln)break;Ft+=tn+1;var Hn=void 0;if(ln[0]==" "){var qn=a.cm.options.tabSize,sr=qn-a.col%qn;Hn=It.appendChild(Oe("span",Mt(sr),"cm-tab")),Hn.setAttribute("role","presentation"),Hn.setAttribute("cm-text"," "),a.col+=sr}else ln[0]=="\r"||ln[0]==`
`?(Hn=It.appendChild(Oe("span",ln[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Hn.setAttribute("cm-text",ln[0]),a.col+=1):(Hn=a.cm.options.specialCharPlaceholder(ln[0]),Hn.setAttribute("cm-text",ln[0]),se&&te<9?It.appendChild(Oe("span",[Hn])):It.appendChild(Hn),a.col+=1);a.map.push(a.pos,a.pos+1,Hn),a.pos++}}if(a.trailingSpace=it.charCodeAt(y.length-1)==32,fe||de||xe||ht||Fe||Je){var gr=fe||"";de&&(gr+=de),xe&&(gr+=xe);var lr=Oe("span",[It],gr,Fe);if(Je)for(var wr in Je)Je.hasOwnProperty(wr)&&wr!="style"&&wr!="class"&&lr.setAttribute(wr,Je[wr]);return a.content.appendChild(lr)}a.content.appendChild(It)}}function or(a,y){if(a.length>1&&!/ /.test(a))return a;for(var fe=y,de="",xe=0;xe<a.length;xe++){var Fe=a.charAt(xe);Fe==" "&&fe&&(xe==a.length-1||a.charCodeAt(xe+1)==32)&&(Fe="\xA0"),de+=Fe,fe=Fe==" "}return de}function fr(a,y){return function(fe,de,xe,Fe,Je,it,at){xe=xe?xe+" cm-force-border":"cm-force-border";for(var ht=fe.pos,It=ht+de.length;;){for(var Ft=void 0,ln=0;ln<y.length&&(Ft=y[ln],!(Ft.to>ht&&Ft.from<=ht));ln++);if(Ft.to>=It)return a(fe,de,xe,Fe,Je,it,at);a(fe,de.slice(0,Ft.to-ht),xe,Fe,null,it,at),Fe=null,de=de.slice(Ft.to-ht),ht=Ft.to}}}function Ar(a,y,fe,de){var xe=!de&&fe.widgetNode;xe&&a.map.push(a.pos,a.pos+y,xe),!de&&a.cm.display.input.needsContentAttribute&&(xe||(xe=a.content.appendChild(document.createElement("span"))),xe.setAttribute("cm-marker",fe.id)),xe&&(a.cm.display.input.setUneditable(xe),a.content.appendChild(xe)),a.pos+=y,a.trailingSpace=!1}function Yr(a,y,fe){var de=a.markedSpans,xe=a.text,Fe=0;if(!de){for(var Je=1;Je<fe.length;Je+=2)y.addToken(y,xe.slice(Fe,Fe=fe[Je]),Jr(fe[Je+1],y.cm.options));return}for(var it=xe.length,at=0,ht=1,It="",Ft,ln,tn=0,kn,Hn,qn,sr,gr;;){if(tn==at){kn=Hn=qn=ln="",gr=null,sr=null,tn=1/0;for(var lr=[],wr=void 0,Qr=0;Qr<de.length;++Qr){var zr=de[Qr],Li=zr.marker;if(Li.type=="bookmark"&&zr.from==at&&Li.widgetNode)lr.push(Li);else if(zr.from<=at&&(zr.to==null||zr.to>at||Li.collapsed&&zr.to==at&&zr.from==at)){if(zr.to!=null&&zr.to!=at&&tn>zr.to&&(tn=zr.to,Hn=""),Li.className&&(kn+=" "+Li.className),Li.css&&(ln=(ln?ln+";":"")+Li.css),Li.startStyle&&zr.from==at&&(qn+=" "+Li.startStyle),Li.endStyle&&zr.to==tn&&(wr||(wr=[])).push(Li.endStyle,zr.to),Li.title&&((gr||(gr={})).title=Li.title),Li.attributes)for(var eo in Li.attributes)(gr||(gr={}))[eo]=Li.attributes[eo];Li.collapsed&&(!sr||On(sr.marker,Li)<0)&&(sr=zr)}else zr.from>at&&tn>zr.from&&(tn=zr.from)}if(wr)for(var Do=0;Do<wr.length;Do+=2)wr[Do+1]==tn&&(Hn+=" "+wr[Do]);if(!sr||sr.from==at)for(var ho=0;ho<lr.length;++ho)Ar(y,0,lr[ho]);if(sr&&(sr.from||0)==at){if(Ar(y,(sr.to==null?it+1:sr.to)-at,sr.marker,sr.from==null),sr.to==null)return;sr.to==at&&(sr=!1)}}if(at>=it)break;for(var sa=Math.min(it,tn);;){if(It){var $o=at+It.length;if(!sr){var bo=$o>sa?It.slice(0,sa-at):It;y.addToken(y,bo,Ft?Ft+kn:kn,qn,at+bo.length==tn?Hn:"",ln,gr)}if($o>=sa){It=It.slice(sa-at),at=sa;break}at=$o,qn=""}It=xe.slice(Fe,Fe=fe[ht++]),Ft=Jr(fe[ht++],y.cm.options)}}}function Zr(a,y,fe){this.line=y,this.rest=cn(y),this.size=this.rest?At(xt(this.rest))-fe+1:1,this.node=this.text=null,this.hidden=nr(a,y)}function Or(a,y,fe){for(var de=[],xe,Fe=y;Fe<fe;Fe=xe){var Je=new Zr(a.doc,Nt(a.doc,Fe),Fe);xe=Fe+Je.size,de.push(Je)}return de}var di=null;function lo(a){di?di.ops.push(a):a.ownsGroup=di={ops:[a],delayedCallbacks:[]}}function uo(a){var y=a.delayedCallbacks,fe=0;do{for(;fe<y.length;fe++)y[fe].call(null);for(var de=0;de<a.ops.length;de++){var xe=a.ops[de];if(xe.cursorActivityHandlers)for(;xe.cursorActivityCalled<xe.cursorActivityHandlers.length;)xe.cursorActivityHandlers[xe.cursorActivityCalled++].call(null,xe.cm)}}while(fe<y.length)}function zo(a,y){var fe=a.ownsGroup;if(fe)try{uo(fe)}finally{di=null,y(fe)}}var wo=null;function Ni(a,y){var fe=Ot(a,y);if(fe.length){var de=Array.prototype.slice.call(arguments,2),xe;di?xe=di.delayedCallbacks:wo?xe=wo:(xe=wo=[],setTimeout(Ii,0));for(var Fe=function(it){xe.push(function(){return fe[it].apply(null,de)})},Je=0;Je<fe.length;++Je)Fe(Je)}}function Ii(){var a=wo;wo=null;for(var y=0;y<a.length;++y)a[y]()}function Pi(a,y,fe,de){for(var xe=0;xe<y.changes.length;xe++){var Fe=y.changes[xe];Fe=="text"?Ui(a,y):Fe=="gutter"?Ur(a,y,fe,de):Fe=="class"?yr(a,y):Fe=="widget"&&Fr(a,y,de)}y.changes=null}function po(a){return a.node==a.text&&(a.node=Oe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),se&&te<8&&(a.node.style.zIndex=2)),a.node}function ji(a,y){var fe=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(fe&&(fe+=" CodeMirror-linebackground"),y.background)fe?y.background.className=fe:(y.background.parentNode.removeChild(y.background),y.background=null);else if(fe){var de=po(y);y.background=de.insertBefore(Oe("div",null,fe),de.firstChild),a.display.input.setUneditable(y.background)}}function Gi(a,y){var fe=a.display.externalMeasured;return fe&&fe.line==y.line?(a.display.externalMeasured=null,y.measure=fe.measure,fe.built):Wr(a,y)}function Ui(a,y){var fe=y.text.className,de=Gi(a,y);y.text==y.node&&(y.node=de.pre),y.text.parentNode.replaceChild(de.pre,y.text),y.text=de.pre,de.bgClass!=y.bgClass||de.textClass!=y.textClass?(y.bgClass=de.bgClass,y.textClass=de.textClass,yr(a,y)):fe&&(y.text.className=fe)}function yr(a,y){ji(a,y),y.line.wrapClass?po(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var fe=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=fe||""}function Ur(a,y,fe,de){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var xe=po(y);y.gutterBackground=Oe("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px; width: "+de.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),xe.insertBefore(y.gutterBackground,y.text)}var Fe=y.line.gutterMarkers;if(a.options.lineNumbers||Fe){var Je=po(y),it=y.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px");if(a.display.input.setUneditable(it),Je.insertBefore(it,y.text),y.line.gutterClass&&(it.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!Fe||!Fe["CodeMirror-linenumbers"])&&(y.lineNumber=it.appendChild(Oe("div",Gt(a.options,fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+de.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),Fe)for(var at=0;at<a.display.gutterSpecs.length;++at){var ht=a.display.gutterSpecs[at].className,It=Fe.hasOwnProperty(ht)&&Fe[ht];It&&it.appendChild(Oe("div",[It],"CodeMirror-gutter-elt","left: "+de.gutterLeft[ht]+"px; width: "+de.gutterWidth[ht]+"px"))}}}function Fr(a,y,fe){y.alignable&&(y.alignable=null);for(var de=pe("CodeMirror-linewidget"),xe=y.node.firstChild,Fe=void 0;xe;xe=Fe)Fe=xe.nextSibling,de.test(xe.className)&&y.node.removeChild(xe);xi(a,y,fe)}function Hr(a,y,fe,de){var xe=Gi(a,y);return y.text=y.node=xe.pre,xe.bgClass&&(y.bgClass=xe.bgClass),xe.textClass&&(y.textClass=xe.textClass),yr(a,y),Ur(a,y,fe,de),xi(a,y,de),y.node}function xi(a,y,fe){if(Oi(a,y.line,y,fe,!0),y.rest)for(var de=0;de<y.rest.length;de++)Oi(a,y.rest[de],y,fe,!1)}function Oi(a,y,fe,de,xe){if(y.widgets)for(var Fe=po(fe),Je=0,it=y.widgets;Je<it.length;++Je){var at=it[Je],ht=Oe("div",[at.node],"CodeMirror-linewidget"+(at.className?" "+at.className:""));at.handleMouseEvents||ht.setAttribute("cm-ignore-events","true"),Lo(at,ht,fe,de),a.display.input.setUneditable(ht),xe&&at.above?Fe.insertBefore(ht,fe.gutter||fe.text):Fe.appendChild(ht),Ni(at,"redraw")}}function Lo(a,y,fe,de){if(a.noHScroll){(fe.alignable||(fe.alignable=[])).push(y);var xe=de.wrapperWidth;y.style.left=de.fixedPos+"px",a.coverGutter||(xe-=de.gutterTotalWidth,y.style.paddingLeft=de.gutterTotalWidth+"px"),y.style.width=xe+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-de.gutterTotalWidth+"px"))}function Yi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Qe(document.body,a.node)){var fe="position: relative;";a.coverGutter&&(fe+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(fe+="width: "+y.display.wrapper.clientWidth+"px;"),Ee(y.display.measure,Oe("div",[a.node],null,fe))}return a.height=a.node.parentNode.offsetHeight}function Xi(a,y){for(var fe=Zn(y);fe!=a.wrapper;fe=fe.parentNode)if(!fe||fe.nodeType==1&&fe.getAttribute("cm-ignore-events")=="true"||fe.parentNode==a.sizer&&fe!=a.mover)return!0}function ui(a){return a.lineSpace.offsetTop}function to(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ro(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ee(a.measure,Oe("pre","x","CodeMirror-line-like")),fe=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,de={left:parseInt(fe.paddingLeft),right:parseInt(fe.paddingRight)};return!isNaN(de.left)&&!isNaN(de.right)&&(a.cachedPaddingH=de),de}function zi(a){return $e-a.display.nativeBarWidth}function Ho(a){return a.display.scroller.clientWidth-zi(a)-a.display.barWidth}function xo(a){return a.display.scroller.clientHeight-zi(a)-a.display.barHeight}function Io(a,y,fe){var de=a.options.lineWrapping,xe=de&&Ho(a);if(!y.measure.heights||de&&y.measure.width!=xe){var Fe=y.measure.heights=[];if(de){y.measure.width=xe;for(var Je=y.text.firstChild.getClientRects(),it=0;it<Je.length-1;it++){var at=Je[it],ht=Je[it+1];Math.abs(at.bottom-ht.bottom)>2&&Fe.push((at.bottom+ht.top)/2-fe.top)}}Fe.push(fe.bottom-fe.top)}}function Ki(a,y,fe){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var de=0;de<a.rest.length;de++)if(a.rest[de]==y)return{map:a.measure.maps[de],cache:a.measure.caches[de]};for(var xe=0;xe<a.rest.length;xe++)if(At(a.rest[xe])>fe)return{map:a.measure.maps[xe],cache:a.measure.caches[xe],before:!0}}function Wo(a,y){y=jt(y);var fe=At(y),de=a.display.externalMeasured=new Zr(a.doc,y,fe);de.lineN=fe;var xe=de.built=Wr(a,de);return de.text=xe.pre,Ee(a.display.lineMeasure,xe.pre),de}function za(a,y,fe,de){return Zo(a,la(a,y),fe,de)}function Yo(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[go(a,y)];var fe=a.display.externalMeasured;if(fe&&y>=fe.lineN&&y<fe.lineN+fe.size)return fe}function la(a,y){var fe=At(y),de=Yo(a,fe);de&&!de.text?de=null:de&&de.changes&&(Pi(a,de,fe,Xo(a)),a.curOp.forceUpdate=!0),de||(de=Wo(a,y));var xe=Ki(de,y,fe);return{line:y,view:de,rect:null,map:xe.map,cache:xe.cache,before:xe.before,hasHeights:!1}}function Zo(a,y,fe,de,xe){y.before&&(fe=-1);var Fe=fe+(de||""),Je;return y.cache.hasOwnProperty(Fe)?Je=y.cache[Fe]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Io(a,y.view,y.rect),y.hasHeights=!0),Je=cs(a,y,fe,de),Je.bogus||(y.cache[Fe]=Je)),{left:Je.left,right:Je.right,top:xe?Je.rtop:Je.top,bottom:xe?Je.rbottom:Je.bottom}}var Da={left:0,right:0,top:0,bottom:0};function qa(a,y,fe){for(var de,xe,Fe,Je,it,at,ht=0;ht<a.length;ht+=3)if(it=a[ht],at=a[ht+1],y<it?(xe=0,Fe=1,Je="left"):y<at?(xe=y-it,Fe=xe+1):(ht==a.length-3||y==at&&a[ht+3]>y)&&(Fe=at-it,xe=Fe-1,y>=at&&(Je="right")),xe!=null){if(de=a[ht+2],it==at&&fe==(de.insertLeft?"left":"right")&&(Je=fe),fe=="left"&&xe==0)for(;ht&&a[ht-2]==a[ht-3]&&a[ht-1].insertLeft;)de=a[(ht-=3)+2],Je="left";if(fe=="right"&&xe==at-it)for(;ht<a.length-3&&a[ht+3]==a[ht+4]&&!a[ht+5].insertLeft;)de=a[(ht+=3)+2],Je="right";break}return{node:de,start:xe,end:Fe,collapse:Je,coverStart:it,coverEnd:at}}function ba(a,y){var fe=Da;if(y=="left")for(var de=0;de<a.length&&(fe=a[de]).left==fe.right;de++);else for(var xe=a.length-1;xe>=0&&(fe=a[xe]).left==fe.right;xe--);return fe}function cs(a,y,fe,de){var xe=qa(y.map,fe,de),Fe=xe.node,Je=xe.start,it=xe.end,at=xe.collapse,ht;if(Fe.nodeType==3){for(var It=0;It<4;It++){for(;Je&&we(y.line.text.charAt(xe.coverStart+Je));)--Je;for(;xe.coverStart+it<xe.coverEnd&&we(y.line.text.charAt(xe.coverStart+it));)++it;if(se&&te<9&&Je==0&&it==xe.coverEnd-xe.coverStart?ht=Fe.parentNode.getBoundingClientRect():ht=ba(Pe(Fe,Je,it).getClientRects(),de),ht.left||ht.right||Je==0)break;it=Je,Je=Je-1,at="right"}se&&te<11&&(ht=Ma(a.display.measure,ht))}else{Je>0&&(at=de="right");var Ft;a.options.lineWrapping&&(Ft=Fe.getClientRects()).length>1?ht=Ft[de=="right"?Ft.length-1:0]:ht=Fe.getBoundingClientRect()}if(se&&te<9&&!Je&&(!ht||!ht.left&&!ht.right)){var ln=Fe.parentNode.getClientRects()[0];ln?ht={left:ln.left,right:ln.left+Bo(a.display),top:ln.top,bottom:ln.bottom}:ht=Da}for(var tn=ht.top-y.rect.top,kn=ht.bottom-y.rect.top,Hn=(tn+kn)/2,qn=y.view.measure.heights,sr=0;sr<qn.length-1&&!(Hn<qn[sr]);sr++);var gr=sr?qn[sr-1]:0,lr=qn[sr],wr={left:(at=="right"?ht.right:ht.left)-y.rect.left,right:(at=="left"?ht.left:ht.right)-y.rect.left,top:gr,bottom:lr};return!ht.left&&!ht.right&&(wr.bogus=!0),a.options.singleCursorHeightPerLine||(wr.rtop=tn,wr.rbottom=kn),wr}function Ma(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!pn(a))return y;var fe=screen.logicalXDPI/screen.deviceXDPI,de=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*fe,right:y.right*fe,top:y.top*de,bottom:y.bottom*de}}function Ha(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function Ra(a){a.display.externalMeasure=null,Te(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ha(a.display.view[y])}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 ne&&ae?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ja(){return ne&&ae?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Sa(a){var y=0;if(a.widgets)for(var fe=0;fe<a.widgets.length;++fe)a.widgets[fe].above&&(y+=Yi(a.widgets[fe]));return y}function wa(a,y,fe,de,xe){if(!xe){var Fe=Sa(y);fe.top+=Fe,fe.bottom+=Fe}if(de=="line")return fe;de||(de="local");var Je=$n(y);if(de=="local"?Je+=ui(a.display):Je-=a.display.viewOffset,de=="page"||de=="window"){var it=a.display.lineSpace.getBoundingClientRect();Je+=it.top+(de=="window"?0:Ja());var at=it.left+(de=="window"?0:Wa());fe.left+=at,fe.right+=at}return fe.top+=Je,fe.bottom+=Je,fe}function ua(a,y,fe){if(fe=="div")return y;var de=y.left,xe=y.top;if(fe=="page")de-=Wa(),xe-=Ja();else if(fe=="local"||!fe){var Fe=a.display.sizer.getBoundingClientRect();de+=Fe.left,xe+=Fe.top}var Je=a.display.lineSpace.getBoundingClientRect();return{left:de-Je.left,top:xe-Je.top}}function Ao(a,y,fe,de,xe){return de||(de=Nt(a.doc,y.line)),wa(a,de,za(a,de,y.ch,xe),fe)}function qi(a,y,fe,de,xe,Fe){de=de||Nt(a.doc,y.line),xe||(xe=la(a,de));function Je(kn,Hn){var qn=Zo(a,xe,kn,Hn?"right":"left",Fe);return Hn?qn.left=qn.right:qn.right=qn.left,wa(a,de,qn,fe)}var it=Pt(de,a.doc.direction),at=y.ch,ht=y.sticky;if(at>=de.text.length?(at=de.text.length,ht="before"):at<=0&&(at=0,ht="after"),!it)return Je(ht=="before"?at-1:at,ht=="before");function It(kn,Hn,qn){var sr=it[Hn],gr=sr.level==1;return Je(qn?kn-1:kn,gr!=qn)}var Ft=tt(it,at,ht),ln=Re,tn=It(at,Ft,ht=="before");return ln!=null&&(tn.other=It(at,ln,ht!="before")),tn}function vi(a,y){var fe=0;y=Vt(a.doc,y),a.options.lineWrapping||(fe=Bo(a.display)*y.ch);var de=Nt(a.doc,y.line),xe=$n(de)+ui(a.display);return{left:fe,right:fe,top:xe,bottom:xe+de.height}}function si(a,y,fe,de,xe){var Fe=Et(a,y,fe);return Fe.xRel=xe,de&&(Fe.outside=de),Fe}function no(a,y,fe){var de=a.doc;if(fe+=a.display.viewOffset,fe<0)return si(de.first,0,null,-1,-1);var xe=wt(de,fe),Fe=de.first+de.size-1;if(xe>Fe)return si(de.first+de.size-1,Nt(de,Fe).text.length,null,1,1);y<0&&(y=0);for(var Je=Nt(de,xe);;){var it=na(a,Je,xe,y,fe),at=fn(Je,it.ch+(it.xRel>0||it.outside>0?1:0));if(!at)return it;var ht=at.find(1);if(ht.line==xe)return ht;Je=Nt(de,xe=ht.line)}}function Ji(a,y,fe,de){de-=Sa(y);var xe=y.text.length,Fe=Ue(function(Je){return Zo(a,fe,Je-1).bottom<=de},xe,0);return xe=Ue(function(Je){return Zo(a,fe,Je).top>de},Fe,xe),{begin:Fe,end:xe}}function ro(a,y,fe,de){fe||(fe=la(a,y));var xe=wa(a,y,Zo(a,fe,de),"line").top;return Ji(a,y,fe,xe)}function co(a,y,fe,de){return a.bottom<=fe?!1:a.top>fe?!0:(de?a.left:a.right)>y}function na(a,y,fe,de,xe){xe-=$n(y);var Fe=la(a,y),Je=Sa(y),it=0,at=y.text.length,ht=!0,It=Pt(y,a.doc.direction);if(It){var Ft=(a.options.lineWrapping?ca:Go)(a,y,fe,Fe,It,de,xe);ht=Ft.level!=1,it=ht?Ft.from:Ft.to-1,at=ht?Ft.to:Ft.from-1}var ln=null,tn=null,kn=Ue(function(Qr){var zr=Zo(a,Fe,Qr);return zr.top+=Je,zr.bottom+=Je,co(zr,de,xe,!1)?(zr.top<=xe&&zr.left<=de&&(ln=Qr,tn=zr),!0):!1},it,at),Hn,qn,sr=!1;if(tn){var gr=de-tn.left<tn.right-de,lr=gr==ht;kn=ln+(lr?0:1),qn=lr?"after":"before",Hn=gr?tn.left:tn.right}else{!ht&&(kn==at||kn==it)&&kn++,qn=kn==0?"after":kn==y.text.length?"before":Zo(a,Fe,kn-(ht?1:0)).bottom+Je<=xe==ht?"after":"before";var wr=qi(a,Et(fe,kn,qn),"line",y,Fe);Hn=wr.left,sr=xe<wr.top?-1:xe>=wr.bottom?1:0}return kn=Le(y.text,kn,1),si(fe,kn,qn,sr,de-Hn)}function Go(a,y,fe,de,xe,Fe,Je){var it=Ue(function(Ft){var ln=xe[Ft],tn=ln.level!=1;return co(qi(a,Et(fe,tn?ln.to:ln.from,tn?"before":"after"),"line",y,de),Fe,Je,!0)},0,xe.length-1),at=xe[it];if(it>0){var ht=at.level!=1,It=qi(a,Et(fe,ht?at.from:at.to,ht?"after":"before"),"line",y,de);co(It,Fe,Je,!0)&&It.top>Je&&(at=xe[it-1])}return at}function ca(a,y,fe,de,xe,Fe,Je){var it=Ji(a,y,de,Je),at=it.begin,ht=it.end;/\s/.test(y.text.charAt(ht-1))&&ht--;for(var It=null,Ft=null,ln=0;ln<xe.length;ln++){var tn=xe[ln];if(!(tn.from>=ht||tn.to<=at)){var kn=tn.level!=1,Hn=Zo(a,de,kn?Math.min(ht,tn.to)-1:Math.max(at,tn.from)).right,qn=Hn<Fe?Fe-Hn+1e9:Hn-Fe;(!It||Ft>qn)&&(It=tn,Ft=qn)}}return It||(It=xe[xe.length-1]),It.from<at&&(It={from:at,to:It.to,level:It.level}),It.to>ht&&(It={from:It.from,to:ht,level:It.level}),It}var Qi;function vo(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Qi==null){Qi=Oe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Qi.appendChild(document.createTextNode("x")),Qi.appendChild(Oe("br"));Qi.appendChild(document.createTextNode("x"))}Ee(a.measure,Qi);var fe=Qi.offsetHeight/50;return fe>3&&(a.cachedTextHeight=fe),Te(a.measure),fe||1}function Bo(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Oe("span","xxxxxxxxxx"),fe=Oe("pre",[y],"CodeMirror-line-like");Ee(a.measure,fe);var de=y.getBoundingClientRect(),xe=(de.right-de.left)/10;return xe>2&&(a.cachedCharWidth=xe),xe||10}function Xo(a){for(var y=a.display,fe={},de={},xe=y.gutters.clientLeft,Fe=y.gutters.firstChild,Je=0;Fe;Fe=Fe.nextSibling,++Je){var it=a.display.gutterSpecs[Je].className;fe[it]=Fe.offsetLeft+Fe.clientLeft+xe,de[it]=Fe.clientWidth}return{fixedPos:Ia(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:fe,gutterWidth:de,wrapperWidth:y.wrapper.clientWidth}}function Ia(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ds(a){var y=vo(a.display),fe=a.options.lineWrapping,de=fe&&Math.max(5,a.display.scroller.clientWidth/Bo(a.display)-3);return function(xe){if(nr(a.doc,xe))return 0;var Fe=0;if(xe.widgets)for(var Je=0;Je<xe.widgets.length;Je++)xe.widgets[Je].height&&(Fe+=xe.widgets[Je].height);return fe?Fe+(Math.ceil(xe.text.length/de)||1)*y:Fe+y}}function fs(a){var y=a.doc,fe=ds(a);y.iter(function(de){var xe=fe(de);xe!=de.height&&Vn(de,xe)})}function da(a,y,fe,de){var xe=a.display;if(!fe&&Zn(y).getAttribute("cm-not-content")=="true")return null;var Fe,Je,it=xe.lineSpace.getBoundingClientRect();try{Fe=y.clientX-it.left,Je=y.clientY-it.top}catch(Ft){return null}var at=no(a,Fe,Je),ht;if(de&&at.xRel>0&&(ht=Nt(a.doc,at.line).text).length==at.ch){var It=Ge(ht,ht.length,a.options.tabSize)-ht.length;at=Et(at.line,Math.max(0,Math.round((Fe-Ro(a.display).left)/Bo(a.display))-It))}return at}function go(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var fe=a.display.view,de=0;de<fe.length;de++)if(y-=fe[de].size,y<0)return de}function Co(a,y,fe,de){y==null&&(y=a.doc.first),fe==null&&(fe=a.doc.first+a.doc.size),de||(de=0);var xe=a.display;if(de&&fe<xe.viewTo&&(xe.updateLineNumbers==null||xe.updateLineNumbers>y)&&(xe.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=xe.viewTo)Kr&&Fn(a.doc,y)<xe.viewTo&&Ko(a);else if(fe<=xe.viewFrom)Kr&&Wn(a.doc,fe+de)>xe.viewFrom?Ko(a):(xe.viewFrom+=de,xe.viewTo+=de);else if(y<=xe.viewFrom&&fe>=xe.viewTo)Ko(a);else if(y<=xe.viewFrom){var Fe=Qa(a,fe,fe+de,1);Fe?(xe.view=xe.view.slice(Fe.index),xe.viewFrom=Fe.lineN,xe.viewTo+=de):Ko(a)}else if(fe>=xe.viewTo){var Je=Qa(a,y,y,-1);Je?(xe.view=xe.view.slice(0,Je.index),xe.viewTo=Je.lineN):Ko(a)}else{var it=Qa(a,y,y,-1),at=Qa(a,fe,fe+de,1);it&&at?(xe.view=xe.view.slice(0,it.index).concat(Or(a,it.lineN,at.lineN)).concat(xe.view.slice(at.index)),xe.viewTo+=de):Ko(a)}var ht=xe.externalMeasured;ht&&(fe<ht.lineN?ht.lineN+=de:y<ht.lineN+ht.size&&(xe.externalMeasured=null))}function Eo(a,y,fe){a.curOp.viewChanged=!0;var de=a.display,xe=a.display.externalMeasured;if(xe&&y>=xe.lineN&&y<xe.lineN+xe.size&&(de.externalMeasured=null),!(y<de.viewFrom||y>=de.viewTo)){var Fe=de.view[go(a,y)];if(Fe.node!=null){var Je=Fe.changes||(Fe.changes=[]);Ve(Je,fe)==-1&&Je.push(fe)}}}function Ko(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Qa(a,y,fe,de){var xe=go(a,y),Fe,Je=a.display.view;if(!Kr||fe==a.doc.first+a.doc.size)return{index:xe,lineN:fe};for(var it=a.display.viewFrom,at=0;at<xe;at++)it+=Je[at].size;if(it!=y){if(de>0){if(xe==Je.length-1)return null;Fe=it+Je[xe].size-y,xe++}else Fe=it-y;y+=Fe,fe+=Fe}for(;Fn(a.doc,fe)!=fe;){if(xe==(de<0?0:Je.length-1))return null;fe+=de*Je[xe-(de<0?1:0)].size,xe+=de}return{index:xe,lineN:fe}}function xa(a,y,fe){var de=a.display,xe=de.view;xe.length==0||y>=de.viewTo||fe<=de.viewFrom?(de.view=Or(a,y,fe),de.viewFrom=y):(de.viewFrom>y?de.view=Or(a,y,de.viewFrom).concat(de.view):de.viewFrom<y&&(de.view=de.view.slice(go(a,y))),de.viewFrom=y,de.viewTo<fe?de.view=de.view.concat(Or(a,de.viewTo,fe)):de.viewTo>fe&&(de.view=de.view.slice(0,go(a,fe)))),de.viewTo=fe}function _s(a){for(var y=a.display.view,fe=0,de=0;de<y.length;de++){var xe=y[de];!xe.hidden&&(!xe.node||xe.changes)&&++fe}return fe}function Oa(a){a.display.input.showSelection(a.display.input.prepareSelection())}function bs(a,y){y===void 0&&(y=!0);for(var fe=a.doc,de={},xe=de.cursors=document.createDocumentFragment(),Fe=de.selection=document.createDocumentFragment(),Je=0;Je<fe.sel.ranges.length;Je++)if(!(!y&&Je==fe.sel.primIndex)){var it=fe.sel.ranges[Je];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,xe),at||Ss(a,it,Fe)}}return de}function $a(a,y,fe){var de=qi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),xe=fe.appendChild(Oe("div","\xA0","CodeMirror-cursor"));if(xe.style.left=de.left+"px",xe.style.top=de.top+"px",xe.style.height=Math.max(0,de.bottom-de.top)*a.options.cursorHeight+"px",de.other){var Fe=fe.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Fe.style.display="",Fe.style.left=de.other.left+"px",Fe.style.top=de.other.top+"px",Fe.style.height=(de.other.bottom-de.other.top)*.85+"px"}}function Ca(a,y){return a.top-y.top||a.left-y.left}function Ss(a,y,fe){var de=a.display,xe=a.doc,Fe=document.createDocumentFragment(),Je=Ro(a.display),it=Je.left,at=Math.max(de.sizerWidth,Ho(a)-de.sizer.offsetLeft)-Je.right,ht=xe.direction=="ltr";function It(lr,wr,Qr,zr){wr<0&&(wr=0),wr=Math.round(wr),zr=Math.round(zr),Fe.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+lr+`px;
top: `+wr+"px; width: "+(Qr==null?at-lr:Qr)+`px;
height: `+(zr-wr)+"px"))}function Ft(lr,wr,Qr){var zr=Nt(xe,lr),Li=zr.text.length,eo,Do;function ho(bo,ea){return Ao(a,Et(lr,bo),"div",zr,ea)}function sa(bo,ea,No){var ko=ro(a,zr,null,bo),So=ea=="ltr"==(No=="after")?"left":"right",mo=No=="after"?ko.begin:ko.end-(/\s/.test(zr.text.charAt(ko.end-1))?2:1);return ho(mo,So)[So]}var $o=Pt(zr,xe.direction);return Me($o,wr||0,Qr==null?Li:Qr,function(bo,ea,No,ko){var So=No=="ltr",mo=ho(bo,So?"left":"right"),ta=ho(ea-1,So?"right":"left"),Is=wr==null&&bo==0,us=Qr==null&&ea==Li,Uo=ko==0,Ua=!$o||ko==$o.length-1;if(ta.top-mo.top<=3){var Mo=(ht?Is:us)&&Uo,xl=(ht?us:Is)&&Ua,Xa=Mo?it:(So?mo:ta).left,gs=xl?at:(So?ta:mo).right;It(Xa,mo.top,gs-Xa,mo.bottom)}else{var ys,Vo,Os,Cl;So?(ys=ht&&Is&&Uo?it:mo.left,Vo=ht?at:sa(bo,No,"before"),Os=ht?it:sa(ea,No,"after"),Cl=ht&&us&&Ua?at:ta.right):(ys=ht?sa(bo,No,"before"):it,Vo=!ht&&Is&&Uo?at:mo.right,Os=!ht&&us&&Ua?it:ta.left,Cl=ht?sa(ea,No,"after"):at),It(ys,mo.top,Vo-ys,mo.bottom),mo.bottom<ta.top&&It(it,mo.bottom,null,ta.top),It(Os,ta.top,Cl-Os,ta.bottom)}(!eo||Ca(mo,eo)<0)&&(eo=mo),Ca(ta,eo)<0&&(eo=ta),(!Do||Ca(mo,Do)<0)&&(Do=mo),Ca(ta,Do)<0&&(Do=ta)}),{start:eo,end:Do}}var ln=y.from(),tn=y.to();if(ln.line==tn.line)Ft(ln.line,ln.ch,tn.ch);else{var kn=Nt(xe,ln.line),Hn=Nt(xe,tn.line),qn=jt(kn)==jt(Hn),sr=Ft(ln.line,ln.ch,qn?kn.text.length+1:null).end,gr=Ft(tn.line,qn?0:null,tn.ch).start;qn&&(sr.top<gr.top-2?(It(sr.right,sr.top,null,sr.bottom),It(it,gr.top,gr.left,gr.bottom)):It(sr.right,sr.top,gr.left-sr.right,sr.bottom)),sr.bottom<gr.top&&It(it,sr.bottom,null,gr.top)}fe.appendChild(Fe)}function es(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var fe=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ga(a),y.cursorDiv.style.visibility=(fe=!fe)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.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,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ut(a,"focus",a,y),a.state.focused=!0,ot(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),le&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),es(a))}function Ga(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ut(a,"blur",a,y),a.state.focused=!1,ke(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function ts(a){for(var y=a.display,fe=y.lineDiv.offsetTop,de=0;de<y.view.length;de++){var xe=y.view[de],Fe=a.options.lineWrapping,Je=void 0,it=0;if(!xe.hidden){if(se&&te<8){var at=xe.node.offsetTop+xe.node.offsetHeight;Je=at-fe,fe=at}else{var ht=xe.node.getBoundingClientRect();Je=ht.bottom-ht.top,!Fe&&xe.text.firstChild&&(it=xe.text.firstChild.getBoundingClientRect().right-ht.left-1)}var It=xe.line.height-Je;if((It>.005||It<-.005)&&(Vn(xe.line,Je),hs(xe.line),xe.rest))for(var Ft=0;Ft<xe.rest.length;Ft++)hs(xe.rest[Ft]);if(it>a.display.sizerWidth){var ln=Math.ceil(it/Bo(a.display));ln>a.display.maxLineLength&&(a.display.maxLineLength=ln,a.display.maxLine=xe.line,a.display.maxLineChanged=!0)}}}}function hs(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var fe=a.widgets[y],de=fe.node.parentNode;de&&(fe.height=de.offsetHeight)}}function ka(a,y,fe){var de=fe&&fe.top!=null?Math.max(0,fe.top):a.scroller.scrollTop;de=Math.floor(de-ui(a));var xe=fe&&fe.bottom!=null?fe.bottom:de+a.wrapper.clientHeight,Fe=wt(y,de),Je=wt(y,xe);if(fe&&fe.ensure){var it=fe.ensure.from.line,at=fe.ensure.to.line;it<Fe?(Fe=it,Je=wt(y,$n(Nt(y,it))+a.wrapper.clientHeight)):Math.min(at,y.lastLine())>=Je&&(Fe=wt(y,$n(Nt(y,at))-a.wrapper.clientHeight),Je=at)}return{from:Fe,to:Math.max(Je,Fe+1)}}function ps(a,y){if(!gt(a,"scrollCursorIntoView")){var fe=a.display,de=fe.sizer.getBoundingClientRect(),xe=null;if(y.top+de.top<0?xe=!0:y.bottom+de.top>(window.innerHeight||document.documentElement.clientHeight)&&(xe=!1),xe!=null&&!x){var Fe=Oe("div","\u200B",null,`position: absolute;
top: `+(y.top-fe.viewOffset-ui(a.display))+`px;
height: `+(y.bottom-y.top+zi(a)+fe.barHeight)+`px;
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(Fe),Fe.scrollIntoView(xe),a.display.lineSpace.removeChild(Fe)}}}function ms(a,y,fe,de){de==null&&(de=0);var xe;!a.options.lineWrapping&&y==fe&&(y=y.ch?Et(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,fe=y.sticky=="before"?Et(y.line,y.ch+1,"before"):y);for(var Fe=0;Fe<5;Fe++){var Je=!1,it=qi(a,y),at=!fe||fe==y?it:qi(a,fe);xe={left:Math.min(it.left,at.left),top:Math.min(it.top,at.top)-de,right:Math.max(it.left,at.left),bottom:Math.max(it.bottom,at.bottom)+de};var ht=ns(a,xe),It=a.doc.scrollTop,Ft=a.doc.scrollLeft;if(ht.scrollTop!=null&&(ia(a,ht.scrollTop),Math.abs(a.doc.scrollTop-It)>1&&(Je=!0)),ht.scrollLeft!=null&&(ma(a,ht.scrollLeft),Math.abs(a.doc.scrollLeft-Ft)>1&&(Je=!0)),!Je)break}return xe}function ws(a,y){var fe=ns(a,y);fe.scrollTop!=null&&ia(a,fe.scrollTop),fe.scrollLeft!=null&&ma(a,fe.scrollLeft)}function ns(a,y){var fe=a.display,de=vo(a.display);y.top<0&&(y.top=0);var xe=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:fe.scroller.scrollTop,Fe=xo(a),Je={};y.bottom-y.top>Fe&&(y.bottom=y.top+Fe);var it=a.doc.height+to(fe),at=y.top<de,ht=y.bottom>it-de;if(y.top<xe)Je.scrollTop=at?0:y.top;else if(y.bottom>xe+Fe){var It=Math.min(y.top,(ht?it:y.bottom)-Fe);It!=xe&&(Je.scrollTop=It)}var Ft=a.options.fixedGutter?0:fe.gutters.offsetWidth,ln=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:fe.scroller.scrollLeft-Ft,tn=Ho(a)-fe.gutters.offsetWidth,kn=y.right-y.left>tn;return kn&&(y.right=y.left+tn),y.left<10?Je.scrollLeft=0:y.left<ln?Je.scrollLeft=Math.max(0,y.left+Ft-(kn?0:10)):y.right>tn+ln-3&&(Je.scrollLeft=y.right+(kn?0:10)-tn),Je}function rs(a,y){y!=null&&(Pa(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function La(a){Pa(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Dr(a,y,fe){(y!=null||fe!=null)&&Pa(a),y!=null&&(a.curOp.scrollLeft=y),fe!=null&&(a.curOp.scrollTop=fe)}function xs(a,y){Pa(a),a.curOp.scrollToPos=y}function Pa(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var fe=vi(a,y.from),de=vi(a,y.to);vs(a,fe,de,y.margin)}}function vs(a,y,fe,de){var xe=ns(a,{left:Math.min(y.left,fe.left),top:Math.min(y.top,fe.top)-de,right:Math.max(y.right,fe.right),bottom:Math.max(y.bottom,fe.bottom)+de});Dr(a,xe.scrollLeft,xe.scrollTop)}function ia(a,y){Math.abs(a.doc.scrollTop-y)<2||(ce||yi(a,{top:y}),is(a,y,!0),ce&&yi(a),xn(a,100))}function is(a,y,fe){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!fe)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ma(a,y,fe,de){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((fe?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!de)&&(a.doc.scrollLeft=y,ki(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function pi(a){var y=a.display,fe=y.gutters.offsetWidth,de=Math.round(a.doc.height+to(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?fe:0,docHeight:de,scrollHeight:de+zi(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:fe}}var _r=function(a,y,fe){this.cm=fe;var de=this.vert=Oe("div",[Oe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),xe=this.horiz=Oe("div",[Oe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=xe.tabIndex=-1,a(de),a(xe),vt(de,"scroll",function(){de.clientHeight&&y(de.scrollTop,"vertical")}),vt(xe,"scroll",function(){xe.clientWidth&&y(xe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,se&&te<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_r.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,fe=a.scrollHeight>a.clientHeight+1,de=a.nativeBarWidth;if(fe){this.vert.style.display="block",this.vert.style.bottom=y?de+"px":"0";var xe=a.viewHeight-(y?de:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+xe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=fe?de+"px":"0",this.horiz.style.left=a.barLeft+"px";var Fe=a.viewWidth-a.barLeft-(fe?de:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+Fe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(de==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:fe?de:0,bottom:y?de:0}},_r.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_r.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_r.prototype.zeroWidthHack=function(){var a=ve&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ze,this.disableVert=new ze},_r.prototype.enableZeroWidthBar=function(a,y,fe){a.style.pointerEvents="auto";function de(){var xe=a.getBoundingClientRect(),Fe=fe=="vert"?document.elementFromPoint(xe.right-1,(xe.top+xe.bottom)/2):document.elementFromPoint((xe.right+xe.left)/2,xe.bottom-1);Fe!=a?a.style.pointerEvents="none":y.set(1e3,de)}y.set(1e3,de)},_r.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 _o(a,y){y||(y=pi(a));var fe=a.display.barWidth,de=a.display.barHeight;Bi(a,y);for(var xe=0;xe<4&&fe!=a.display.barWidth||de!=a.display.barHeight;xe++)fe!=a.display.barWidth&&a.options.lineWrapping&&ts(a),Bi(a,pi(a)),fe=a.display.barWidth,de=a.display.barHeight}function Bi(a,y){var fe=a.display,de=fe.scrollbars.update(y);fe.sizer.style.paddingRight=(fe.barWidth=de.right)+"px",fe.sizer.style.paddingBottom=(fe.barHeight=de.bottom)+"px",fe.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(fe.scrollbarFiller.style.display="block",fe.scrollbarFiller.style.height=de.bottom+"px",fe.scrollbarFiller.style.width=de.right+"px"):fe.scrollbarFiller.style.display="",de.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(fe.gutterFiller.style.display="block",fe.gutterFiller.style.height=de.bottom+"px",fe.gutterFiller.style.width=y.gutterWidth+"px"):fe.gutterFiller.style.display=""}var Na={native:_r,null:Ci};function va(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ke(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Na[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),vt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,fe){fe=="horizontal"?ma(a,y):ia(a,y)},a),a.display.scrollbars.addClass&&ot(a.display.wrapper,a.display.scrollbars.addClass)}var Aa=0;function Oo(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},lo(a.curOp)}function fa(a){var y=a.curOp;y&&zo(y,function(fe){for(var de=0;de<fe.ops.length;de++)fe.ops[de].cm.curOp=null;sl(fe)})}function sl(a){for(var y=a.ops,fe=0;fe<y.length;fe++)ll(y[fe]);for(var de=0;de<y.length;de++)ul(y[de]);for(var xe=0;xe<y.length;xe++)cl(y[xe]);for(var Fe=0;Fe<y.length;Fe++)ft(y[Fe]);for(var Je=0;Je<y.length;Je++)_t(y[Je])}function ll(a){var y=a.cm,fe=y.display;Xn(y),a.updateMaxLine&&dr(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<fe.viewFrom||a.scrollToPos.to.line>=fe.viewTo)||fe.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Mn(y,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 y=a.cm,fe=y.display;a.updatedDisplay&&ts(y),a.barMeasure=pi(y),fe.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=za(y,fe.maxLine,fe.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(fe.scroller.clientWidth,fe.sizer.offsetLeft+a.adjustWidthTo+zi(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,fe.sizer.offsetLeft+a.adjustWidthTo-Ho(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=fe.input.prepareSelection())}function ft(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ma(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var fe=a.focus&&a.focus==Xe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,fe),(a.updatedDisplay||a.startHeight!=y.doc.height)&&_o(y,a.barMeasure),a.updatedDisplay&&ii(y,a.barMeasure),a.selectionChanged&&es(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),fe&&ra(a.cm)}function _t(a){var y=a.cm,fe=y.display,de=y.doc;if(a.updatedDisplay&&Cr(y,a.update),fe.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(fe.wheelStartX=fe.wheelStartY=null),a.scrollTop!=null&&is(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ma(y,a.scrollLeft,!0,!0),a.scrollToPos){var xe=ms(y,Vt(de,a.scrollToPos.from),Vt(de,a.scrollToPos.to),a.scrollToPos.margin);ps(y,xe)}var Fe=a.maybeHiddenMarkers,Je=a.maybeUnhiddenMarkers;if(Fe)for(var it=0;it<Fe.length;++it)Fe[it].lines.length||Ut(Fe[it],"hide");if(Je)for(var at=0;at<Je.length;++at)Je[at].lines.length&&Ut(Je[at],"unhide");fe.wrapper.offsetHeight&&(de.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Ut(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function St(a,y){if(a.curOp)return y();Oo(a);try{return y()}finally{fa(a)}}function Yn(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Oo(a);try{return y.apply(a,arguments)}finally{fa(a)}}}function Tn(a){return function(){if(this.curOp)return a.apply(this,arguments);Oo(this);try{return a.apply(this,arguments)}finally{fa(this)}}}function mn(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Oo(y);try{return a.apply(this,arguments)}finally{fa(y)}}}function xn(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Ye(wn,a))}function wn(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var fe=+new Date+a.options.workTime,de=pr(a,y.highlightFrontier),xe=[];y.iter(de.line,Math.min(y.first+y.size,a.display.viewTo+500),function(Fe){if(de.line>=a.display.viewFrom){var Je=Fe.styles,it=Fe.text.length>a.options.maxHighlightLength?st(y.mode,de.state):null,at=er(a,Fe,de,!0);it&&(de.state=it),Fe.styles=at.styles;var ht=Fe.styleClasses,It=at.classes;It?Fe.styleClasses=It:ht&&(Fe.styleClasses=null);for(var Ft=!Je||Je.length!=Fe.styles.length||ht!=It&&(!ht||!It||ht.bgClass!=It.bgClass||ht.textClass!=It.textClass),ln=0;!Ft&&ln<Je.length;++ln)Ft=Je[ln]!=Fe.styles[ln];Ft&&xe.push(de.line),Fe.stateAfter=de.save(),de.nextLine()}else Fe.text.length<=a.options.maxHighlightLength&&Nr(a,Fe.text,de),Fe.stateAfter=de.line%5==0?de.save():null,de.nextLine();if(+new Date>fe)return xn(a,a.options.workDelay),!0}),y.highlightFrontier=de.line,y.modeFrontier=Math.max(y.modeFrontier,de.line),xe.length&&St(a,function(){for(var Fe=0;Fe<xe.length;Fe++)Eo(a,xe[Fe],"text")})}}var Mn=function(a,y,fe){var de=a.display;this.viewport=y,this.visible=ka(de,a.doc,y),this.editorIsHidden=!de.wrapper.offsetWidth,this.wrapperHeight=de.wrapper.clientHeight,this.wrapperWidth=de.wrapper.clientWidth,this.oldDisplayWidth=Ho(a),this.force=fe,this.dims=Xo(a),this.events=[]};Mn.prototype.signal=function(a,y){Lt(a,y)&&this.events.push(arguments)},Mn.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ut.apply(null,this.events[a])};function Xn(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=zi(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=zi(a)+"px",y.scrollbarsClipped=!0)}function ci(a){if(a.hasFocus())return null;var y=Xe();if(!y||!Qe(a.display.lineDiv,y))return null;var fe={activeElt:y};if(window.getSelection){var de=window.getSelection();de.anchorNode&&de.extend&&Qe(a.display.lineDiv,de.anchorNode)&&(fe.anchorNode=de.anchorNode,fe.anchorOffset=de.anchorOffset,fe.focusNode=de.focusNode,fe.focusOffset=de.focusOffset)}return fe}function Lr(a){if(!(!a||!a.activeElt||a.activeElt==Xe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Qe(document.body,a.anchorNode)&&Qe(document.body,a.focusNode))){var y=window.getSelection(),fe=document.createRange();fe.setEnd(a.anchorNode,a.anchorOffset),fe.collapse(!1),y.removeAllRanges(),y.addRange(fe),y.extend(a.focusNode,a.focusOffset)}}function gi(a,y){var fe=a.display,de=a.doc;if(y.editorIsHidden)return Ko(a),!1;if(!y.force&&y.visible.from>=fe.viewFrom&&y.visible.to<=fe.viewTo&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo)&&fe.renderedView==fe.view&&_s(a)==0)return!1;Wi(a)&&(Ko(a),y.dims=Xo(a));var xe=de.first+de.size,Fe=Math.max(y.visible.from-a.options.viewportMargin,de.first),Je=Math.min(xe,y.visible.to+a.options.viewportMargin);fe.viewFrom<Fe&&Fe-fe.viewFrom<20&&(Fe=Math.max(de.first,fe.viewFrom)),fe.viewTo>Je&&fe.viewTo-Je<20&&(Je=Math.min(xe,fe.viewTo)),Kr&&(Fe=Fn(a.doc,Fe),Je=Wn(a.doc,Je));var it=Fe!=fe.viewFrom||Je!=fe.viewTo||fe.lastWrapHeight!=y.wrapperHeight||fe.lastWrapWidth!=y.wrapperWidth;xa(a,Fe,Je),fe.viewOffset=$n(Nt(a.doc,fe.viewFrom)),a.display.mover.style.top=fe.viewOffset+"px";var at=_s(a);if(!it&&at==0&&!y.force&&fe.renderedView==fe.view&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo))return!1;var ht=ci(a);return at>4&&(fe.lineDiv.style.display="none"),Rr(a,fe.updateLineNumbers,y.dims),at>4&&(fe.lineDiv.style.display=""),fe.renderedView=fe.view,Lr(ht),Te(fe.cursorDiv),Te(fe.selectionDiv),fe.gutters.style.height=fe.sizer.style.minHeight=0,it&&(fe.lastWrapHeight=y.wrapperHeight,fe.lastWrapWidth=y.wrapperWidth,xn(a,400)),fe.updateLineNumbers=null,!0}function Cr(a,y){for(var fe=y.viewport,de=!0;;de=!1){if(!de||!a.options.lineWrapping||y.oldDisplayWidth==Ho(a)){if(fe&&fe.top!=null&&(fe={top:Math.min(a.doc.height+to(a.display)-xo(a),fe.top)}),y.visible=ka(a.display,a.doc,fe),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else de&&(y.visible=ka(a.display,a.doc,fe));if(!gi(a,y))break;ts(a);var xe=pi(a);Oa(a),_o(a,xe),ii(a,xe),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function yi(a,y){var fe=new Mn(a,y);if(gi(a,fe)){ts(a),Cr(a,fe);var de=pi(a);Oa(a),_o(a,de),ii(a,de),fe.finish()}}function Rr(a,y,fe){var de=a.display,xe=a.options.lineNumbers,Fe=de.lineDiv,Je=Fe.firstChild;function it(kn){var Hn=kn.nextSibling;return le&&ve&&a.display.currentWheelTarget==kn?kn.style.display="none":kn.parentNode.removeChild(kn),Hn}for(var at=de.view,ht=de.viewFrom,It=0;It<at.length;It++){var Ft=at[It];if(!Ft.hidden)if(!Ft.node||Ft.node.parentNode!=Fe){var ln=Hr(a,Ft,ht,fe);Fe.insertBefore(ln,Je)}else{for(;Je!=Ft.node;)Je=it(Je);var tn=xe&&y!=null&&y<=ht&&Ft.lineNumber;Ft.changes&&(Ve(Ft.changes,"gutter")>-1&&(tn=!1),Pi(a,Ft,ht,fe)),tn&&(Te(Ft.lineNumber),Ft.lineNumber.appendChild(document.createTextNode(Gt(a.options,ht)))),Je=Ft.node.nextSibling}ht+=Ft.size}for(;Je;)Je=it(Je)}function Hi(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ii(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+zi(a)+"px"}function ki(a){var y=a.display,fe=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var de=Ia(y)-y.scroller.scrollLeft+a.doc.scrollLeft,xe=y.gutters.offsetWidth,Fe=de+"px",Je=0;Je<fe.length;Je++)if(!fe[Je].hidden){a.options.fixedGutter&&(fe[Je].gutter&&(fe[Je].gutter.style.left=Fe),fe[Je].gutterBackground&&(fe[Je].gutterBackground.style.left=Fe));var it=fe[Je].alignable;if(it)for(var at=0;at<it.length;at++)it[at].style.left=Fe}a.options.fixedGutter&&(y.gutters.style.left=de+xe+"px")}}function Wi(a){if(!a.options.lineNumbers)return!1;var y=a.doc,fe=Gt(a.options,y.first+y.size-1),de=a.display;if(fe.length!=de.lineNumChars){var xe=de.measure.appendChild(Oe("div",[Oe("div",fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Fe=xe.firstChild.offsetWidth,Je=xe.offsetWidth-Fe;return de.lineGutter.style.width="",de.lineNumInnerWidth=Math.max(Fe,de.lineGutter.offsetWidth-Je)+1,de.lineNumWidth=de.lineNumInnerWidth+Je,de.lineNumChars=de.lineNumInnerWidth?fe.length:-1,de.lineGutter.style.width=de.lineNumWidth+"px",Hi(a.display),!0}return!1}function oi(a,y){for(var fe=[],de=!1,xe=0;xe<a.length;xe++){var Fe=a[xe],Je=null;if(typeof Fe!="string"&&(Je=Fe.style,Fe=Fe.className),Fe=="CodeMirror-linenumbers")if(y)de=!0;else continue;fe.push({className:Fe,style:Je})}return y&&!de&&fe.push({className:"CodeMirror-linenumbers",style:null}),fe}function Di(a){var y=a.gutters,fe=a.gutterSpecs;Te(y),a.lineGutter=null;for(var de=0;de<fe.length;++de){var xe=fe[de],Fe=xe.className,Je=xe.style,it=y.appendChild(Oe("div",null,"CodeMirror-gutter "+Fe));Je&&(it.style.cssText=Je),Fe=="CodeMirror-linenumbers"&&(a.lineGutter=it,it.style.width=(a.lineNumWidth||1)+"px")}y.style.display=fe.length?"":"none",Hi(a)}function Qn(a){Di(a.display),Co(a),ki(a)}function Fi(a,y,fe,de){var xe=this;this.input=fe,xe.scrollbarFiller=Oe("div",null,"CodeMirror-scrollbar-filler"),xe.scrollbarFiller.setAttribute("cm-not-content","true"),xe.gutterFiller=Oe("div",null,"CodeMirror-gutter-filler"),xe.gutterFiller.setAttribute("cm-not-content","true"),xe.lineDiv=je("div",null,"CodeMirror-code"),xe.selectionDiv=Oe("div",null,null,"position: relative; z-index: 1"),xe.cursorDiv=Oe("div",null,"CodeMirror-cursors"),xe.measure=Oe("div",null,"CodeMirror-measure"),xe.lineMeasure=Oe("div",null,"CodeMirror-measure"),xe.lineSpace=je("div",[xe.measure,xe.lineMeasure,xe.selectionDiv,xe.cursorDiv,xe.lineDiv],null,"position: relative; outline: none");var Fe=je("div",[xe.lineSpace],"CodeMirror-lines");xe.mover=Oe("div",[Fe],null,"position: relative"),xe.sizer=Oe("div",[xe.mover],"CodeMirror-sizer"),xe.sizerWidth=null,xe.heightForcer=Oe("div",null,null,"position: absolute; height: "+$e+"px; width: 1px;"),xe.gutters=Oe("div",null,"CodeMirror-gutters"),xe.lineGutter=null,xe.scroller=Oe("div",[xe.sizer,xe.heightForcer,xe.gutters],"CodeMirror-scroll"),xe.scroller.setAttribute("tabIndex","-1"),xe.wrapper=Oe("div",[xe.scrollbarFiller,xe.gutterFiller,xe.scroller],"CodeMirror"),se&&te<8&&(xe.gutters.style.zIndex=-1,xe.scroller.style.paddingRight=0),!le&&!(ce&&oe)&&(xe.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(xe.wrapper):a(xe.wrapper)),xe.viewFrom=xe.viewTo=y.first,xe.reportedViewFrom=xe.reportedViewTo=y.first,xe.view=[],xe.renderedView=null,xe.externalMeasured=null,xe.viewOffset=0,xe.lastWrapHeight=xe.lastWrapWidth=0,xe.updateLineNumbers=null,xe.nativeBarWidth=xe.barHeight=xe.barWidth=0,xe.scrollbarsClipped=!1,xe.lineNumWidth=xe.lineNumInnerWidth=xe.lineNumChars=null,xe.alignWidgets=!1,xe.cachedCharWidth=xe.cachedTextHeight=xe.cachedPaddingH=null,xe.maxLine=null,xe.maxLineLength=0,xe.maxLineChanged=!1,xe.wheelDX=xe.wheelDY=xe.wheelStartX=xe.wheelStartY=null,xe.shift=!1,xe.selForContextMenu=null,xe.activeTouch=null,xe.gutterSpecs=oi(de.gutters,de.lineNumbers),Di(xe),fe.init(xe)}var _i=0,Mi=null;se?Mi=-.53:ce?Mi=15:ne?Mi=-.7:b&&(Mi=-1/3);function Po(a){var y=a.wheelDeltaX,fe=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),fe==null&&a.detail&&a.axis==a.VERTICAL_AXIS?fe=a.detail:fe==null&&(fe=a.wheelDelta),{x:y,y:fe}}function vr(a){var y=Po(a);return y.x*=Mi,y.y*=Mi,y}function Zi(a,y){var fe=Po(y),de=fe.x,xe=fe.y,Fe=a.display,Je=Fe.scroller,it=Je.scrollWidth>Je.clientWidth,at=Je.scrollHeight>Je.clientHeight;if(de&&it||xe&&at){if(xe&&ve&&le){e:for(var ht=y.target,It=Fe.view;ht!=Je;ht=ht.parentNode)for(var Ft=0;Ft<It.length;Ft++)if(It[Ft].node==ht){a.display.currentWheelTarget=ht;break e}}if(de&&!ce&&!E&&Mi!=null){xe&&at&&ia(a,Math.max(0,Je.scrollTop+xe*Mi)),ma(a,Math.max(0,Je.scrollLeft+de*Mi)),(!xe||xe&&at)&&un(y),Fe.wheelStartX=null;return}if(xe&&Mi!=null){var ln=xe*Mi,tn=a.doc.scrollTop,kn=tn+Fe.wrapper.clientHeight;ln<0?tn=Math.max(0,tn+ln-50):kn=Math.min(a.doc.height,kn+ln+50),yi(a,{top:tn,bottom:kn})}_i<20&&(Fe.wheelStartX==null?(Fe.wheelStartX=Je.scrollLeft,Fe.wheelStartY=Je.scrollTop,Fe.wheelDX=de,Fe.wheelDY=xe,setTimeout(function(){if(Fe.wheelStartX!=null){var Hn=Je.scrollLeft-Fe.wheelStartX,qn=Je.scrollTop-Fe.wheelStartY,sr=qn&&Fe.wheelDY&&qn/Fe.wheelDY||Hn&&Fe.wheelDX&&Hn/Fe.wheelDX;Fe.wheelStartX=Fe.wheelStartY=null,sr&&(Mi=(Mi*_i+sr)/(_i+1),++_i)}},200)):(Fe.wheelDX+=de,Fe.wheelDY+=xe))}}var li=function(a,y){this.ranges=a,this.primIndex=y};li.prototype.primary=function(){return this.ranges[this.primIndex]},li.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var fe=this.ranges[y],de=a.ranges[y];if(!on(fe.anchor,de.anchor)||!on(fe.head,de.head))return!1}return!0},li.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new Sr(sn(this.ranges[y].anchor),sn(this.ranges[y].head));return new li(a,this.primIndex)},li.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},li.prototype.contains=function(a,y){y||(y=a);for(var fe=0;fe<this.ranges.length;fe++){var de=this.ranges[fe];if(Ht(y,de.from())>=0&&Ht(a,de.to())<=0)return fe}return-1};var Sr=function(a,y){this.anchor=a,this.head=y};Sr.prototype.from=function(){return Wt(this.anchor,this.head)},Sr.prototype.to=function(){return yn(this.anchor,this.head)},Sr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Ir(a,y,fe){var de=a&&a.options.selectionsMayTouch,xe=y[fe];y.sort(function(ln,tn){return Ht(ln.from(),tn.from())}),fe=Ve(y,xe);for(var Fe=1;Fe<y.length;Fe++){var Je=y[Fe],it=y[Fe-1],at=Ht(it.to(),Je.from());if(de&&!Je.empty()?at>0:at>=0){var ht=Wt(it.from(),Je.from()),It=yn(it.to(),Je.to()),Ft=it.empty()?Je.from()==Je.head:it.from()==it.head;Fe<=fe&&--fe,y.splice(--Fe,2,new Sr(Ft?It:ht,Ft?ht:It))}}return new li(y,fe)}function mi(a,y){return new li([new Sr(a,y||a)],0)}function Er(a){return a.text?Et(a.from.line+a.text.length-1,xt(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function qo(a,y){if(Ht(a,y.from)<0)return a;if(Ht(a,y.to)<=0)return Er(y);var fe=a.line+y.text.length-(y.to.line-y.from.line)-1,de=a.ch;return a.line==y.to.line&&(de+=Er(y).ch-y.to.ch),Et(fe,de)}function oo(a,y){for(var fe=[],de=0;de<a.sel.ranges.length;de++){var xe=a.sel.ranges[de];fe.push(new Sr(qo(xe.anchor,y),qo(xe.head,y)))}return Ir(a.cm,fe,a.sel.primIndex)}function oa(a,y,fe){return a.line==y.line?Et(fe.line,a.ch-y.ch+fe.ch):Et(fe.line+(a.line-y.line),a.ch)}function os(a,y,fe){for(var de=[],xe=Et(a.first,0),Fe=xe,Je=0;Je<y.length;Je++){var it=y[Je],at=oa(it.from,xe,Fe),ht=oa(Er(it),xe,Fe);if(xe=it.to,Fe=ht,fe=="around"){var It=a.sel.ranges[Je],Ft=Ht(It.head,It.anchor)<0;de[Je]=new Sr(Ft?ht:at,Ft?at:ht)}else de[Je]=new Sr(at,at)}return new li(de,a.sel.primIndex)}function aa(a){a.doc.mode=Ie(a.options,a.doc.modeOption),ga(a)}function ga(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,xn(a,100),a.state.modeGen++,a.curOp&&Co(a)}function ai(a,y){return y.from.ch==0&&y.to.ch==0&&xt(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Ai(a,y,fe,de){function xe(gr){return fe?fe[gr]:null}function Fe(gr,lr,wr){qr(gr,lr,wr,de),Ni(gr,"change",gr,y)}function Je(gr,lr){for(var wr=[],Qr=gr;Qr<lr;++Qr)wr.push(new jr(ht[Qr],xe(Qr),de));return wr}var it=y.from,at=y.to,ht=y.text,It=Nt(a,it.line),Ft=Nt(a,at.line),ln=xt(ht),tn=xe(ht.length-1),kn=at.line-it.line;if(y.full)a.insert(0,Je(0,ht.length)),a.remove(ht.length,a.size-ht.length);else if(ai(a,y)){var Hn=Je(0,ht.length-1);Fe(Ft,Ft.text,tn),kn&&a.remove(it.line,kn),Hn.length&&a.insert(it.line,Hn)}else if(It==Ft)if(ht.length==1)Fe(It,It.text.slice(0,it.ch)+ln+It.text.slice(at.ch),tn);else{var qn=Je(1,ht.length-1);qn.push(new jr(ln+It.text.slice(at.ch),tn,de)),Fe(It,It.text.slice(0,it.ch)+ht[0],xe(0)),a.insert(it.line+1,qn)}else if(ht.length==1)Fe(It,It.text.slice(0,it.ch)+ht[0]+Ft.text.slice(at.ch),xe(0)),a.remove(it.line+1,kn);else{Fe(It,It.text.slice(0,it.ch)+ht[0],xe(0)),Fe(Ft,ln+Ft.text.slice(at.ch),tn);var sr=Je(1,ht.length-1);kn>1&&a.remove(it.line+1,kn-1),a.insert(it.line+1,sr)}Ni(a,"change",a,y)}function io(a,y,fe){function de(xe,Fe,Je){if(xe.linked)for(var it=0;it<xe.linked.length;++it){var at=xe.linked[it];if(at.doc!=Fe){var ht=Je&&at.sharedHist;fe&&!ht||(y(at.doc,ht),de(at.doc,xe,ht))}}}de(a,null,!0)}function Ba(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,fs(a),aa(a),Fo(a),a.options.lineWrapping||dr(a),a.options.mode=y.modeOption,Co(a)}function Fo(a){(a.doc.direction=="rtl"?ot:ke)(a.display.lineDiv,"CodeMirror-rtl")}function Cs(a){St(a,function(){Fo(a),Co(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 ao(a,y){var fe={from:sn(y.from),to:Er(y),text:nn(a,y.from,y.to)};return To(a,fe,y.from.line,y.to.line+1),io(a,function(de){return To(de,fe,y.from.line,y.to.line+1)},!0),fe}function Fa(a){for(;a.length;){var y=xt(a);if(y.ranges)a.pop();else break}}function dl(a,y){if(y)return Fa(a.done),xt(a.done);if(a.done.length&&!xt(a.done).ranges)return xt(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),xt(a.done)}function Xs(a,y,fe,de){var xe=a.history;xe.undone.length=0;var Fe=+new Date,Je,it;if((xe.lastOp==de||xe.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&xe.lastModTime>Fe-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(Je=dl(xe,xe.lastOp==de)))it=xt(Je.changes),Ht(y.from,y.to)==0&&Ht(y.from,it.to)==0?it.to=Er(y):Je.changes.push(ao(a,y));else{var at=xt(xe.done);for((!at||!at.ranges)&&$i(a.sel,xe.done),Je={changes:[ao(a,y)],generation:xe.generation},xe.done.push(Je);xe.done.length>xe.undoDepth;)xe.done.shift(),xe.done[0].ranges||xe.done.shift()}xe.done.push(fe),xe.generation=++xe.maxGeneration,xe.lastModTime=xe.lastSelTime=Fe,xe.lastOp=xe.lastSelOp=de,xe.lastOrigin=xe.lastSelOrigin=y.origin,it||Ut(a,"historyAdded")}function fl(a,y,fe,de){var xe=y.charAt(0);return xe=="*"||xe=="+"&&fe.ranges.length==de.ranges.length&&fe.somethingSelected()==de.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function fi(a,y,fe,de){var xe=a.history,Fe=de&&de.origin;fe==xe.lastSelOp||Fe&&xe.lastSelOrigin==Fe&&(xe.lastModTime==xe.lastSelTime&&xe.lastOrigin==Fe||fl(a,Fe,xt(xe.done),y))?xe.done[xe.done.length-1]=y:$i(y,xe.done),xe.lastSelTime=+new Date,xe.lastSelOrigin=Fe,xe.lastSelOp=fe,de&&de.clearRedo!==!1&&Fa(xe.undone)}function $i(a,y){var fe=xt(y);fe&&fe.ranges&&fe.equals(a)||y.push(a)}function To(a,y,fe,de){var xe=y["spans_"+a.id],Fe=0;a.iter(Math.max(a.first,fe),Math.min(a.first+a.size,de),function(Je){Je.markedSpans&&((xe||(xe=y["spans_"+a.id]={}))[Fe]=Je.markedSpans),++Fe})}function ya(a){if(!a)return null;for(var y,fe=0;fe<a.length;++fe)a[fe].marker.explicitlyCleared?y||(y=a.slice(0,fe)):y&&y.push(a[fe]);return y?y.length?y:null:a}function fo(a,y){var fe=y["spans_"+a.id];if(!fe)return null;for(var de=[],xe=0;xe<y.text.length;++xe)de.push(ya(fe[xe]));return de}function _a(a,y){var fe=fo(a,y),de=Ri(a,y);if(!fe)return de;if(!de)return fe;for(var xe=0;xe<fe.length;++xe){var Fe=fe[xe],Je=de[xe];if(Fe&&Je)e:for(var it=0;it<Je.length;++it){for(var at=Je[it],ht=0;ht<Fe.length;++ht)if(Fe[ht].marker==at.marker)continue e;Fe.push(at)}else Je&&(fe[xe]=Je)}return fe}function ha(a,y,fe){for(var de=[],xe=0;xe<a.length;++xe){var Fe=a[xe];if(Fe.ranges){de.push(fe?li.prototype.deepCopy.call(Fe):Fe);continue}var Je=Fe.changes,it=[];de.push({changes:it});for(var at=0;at<Je.length;++at){var ht=Je[at],It=void 0;if(it.push({from:ht.from,to:ht.to,text:ht.text}),y)for(var Ft in ht)(It=Ft.match(/^spans_(\d+)$/))&&Ve(y,Number(It[1]))>-1&&(xt(it)[Ft]=ht[Ft],delete ht[Ft])}}return de}function Ka(a,y,fe,de){if(de){var xe=a.anchor;if(fe){var Fe=Ht(y,xe)<0;Fe!=Ht(fe,xe)<0?(xe=y,y=fe):Fe!=Ht(y,fe)<0&&(y=fe)}return new Sr(xe,y)}else return new Sr(fe||y,y)}function Va(a,y,fe,de,xe){xe==null&&(xe=a.cm&&(a.cm.display.shift||a.extend)),jo(a,new li([Ka(a.sel.primary(),y,fe,xe)],0),de)}function ja(a,y,fe){for(var de=[],xe=a.cm&&(a.cm.display.shift||a.extend),Fe=0;Fe<a.sel.ranges.length;Fe++)de[Fe]=Ka(a.sel.ranges[Fe],y[Fe],null,xe);var Je=Ir(a.cm,de,a.sel.primIndex);jo(a,Je,fe)}function Ps(a,y,fe,de){var xe=a.sel.ranges.slice(0);xe[y]=fe,jo(a,Ir(a.cm,xe,a.sel.primIndex),de)}function as(a,y,fe,de){jo(a,mi(y,fe),de)}function hl(a,y,fe){var de={ranges:y.ranges,update:function(xe){this.ranges=[];for(var Fe=0;Fe<xe.length;Fe++)this.ranges[Fe]=new Sr(Vt(a,xe[Fe].anchor),Vt(a,xe[Fe].head))},origin:fe&&fe.origin};return Ut(a,"beforeSelectionChange",a,de),a.cm&&Ut(a.cm,"beforeSelectionChange",a.cm,de),de.ranges!=y.ranges?Ir(a.cm,de.ranges,de.ranges.length-1):y}function El(a,y,fe){var de=a.history.done,xe=xt(de);xe&&xe.ranges?(de[de.length-1]=y,Js(a,y,fe)):jo(a,y,fe)}function jo(a,y,fe){Js(a,y,fe),fi(a,a.sel,a.cm?a.cm.curOp.id:NaN,fe)}function Js(a,y,fe){(Lt(a,"beforeSelectionChange")||a.cm&&Lt(a.cm,"beforeSelectionChange"))&&(y=hl(a,y,fe));var de=fe&&fe.bias||(Ht(y.primary().head,a.sel.primary().head)<0?-1:1);kl(a,Al(a,y,de,!0)),!(fe&&fe.scroll===!1)&&a.cm&&La(a.cm)}function kl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Qt(a.cm)),Ni(a,"cursorActivity",a))}function Ll(a){kl(a,Al(a,a.sel,null,!1))}function Al(a,y,fe,de){for(var xe,Fe=0;Fe<y.ranges.length;Fe++){var Je=y.ranges[Fe],it=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[Fe],at=Qs(a,Je.anchor,it&&it.anchor,fe,de),ht=Qs(a,Je.head,it&&it.head,fe,de);(xe||at!=Je.anchor||ht!=Je.head)&&(xe||(xe=y.ranges.slice(0,Fe)),xe[Fe]=new Sr(at,ht))}return xe?Ir(a.cm,xe,y.primIndex):y}function Es(a,y,fe,de,xe){var Fe=Nt(a,y.line);if(Fe.markedSpans)for(var Je=0;Je<Fe.markedSpans.length;++Je){var it=Fe.markedSpans[Je],at=it.marker,ht="selectLeft"in at?!at.selectLeft:at.inclusiveLeft,It="selectRight"in at?!at.selectRight:at.inclusiveRight;if((it.from==null||(ht?it.from<=y.ch:it.from<y.ch))&&(it.to==null||(It?it.to>=y.ch:it.to>y.ch))){if(xe&&(Ut(at,"beforeCursorEnter"),at.explicitlyCleared))if(Fe.markedSpans){--Je;continue}else break;if(!at.atomic)continue;if(fe){var Ft=at.find(de<0?1:-1),ln=void 0;if((de<0?It:ht)&&(Ft=Tl(a,Ft,-de,Ft&&Ft.line==y.line?Fe:null)),Ft&&Ft.line==y.line&&(ln=Ht(Ft,fe))&&(de<0?ln<0:ln>0))return Es(a,Ft,y,de,xe)}var tn=at.find(de<0?-1:1);return(de<0?ht:It)&&(tn=Tl(a,tn,de,tn.line==y.line?Fe:null)),tn?Es(a,tn,y,de,xe):null}}return y}function Qs(a,y,fe,de,xe){var Fe=de||1,Je=Es(a,y,fe,Fe,xe)||!xe&&Es(a,y,fe,Fe,!0)||Es(a,y,fe,-Fe,xe)||!xe&&Es(a,y,fe,-Fe,!0);return Je||(a.cantEdit=!0,Et(a.first,0))}function Tl(a,y,fe,de){return fe<0&&y.ch==0?y.line>a.first?Vt(a,Et(y.line-1)):null:fe>0&&y.ch==(de||Nt(a,y.line)).text.length?y.line<a.first+a.size-1?Et(y.line+1,0):null:new Et(y.line,y.ch+fe)}function Dl(a){a.setSelection(Et(a.firstLine(),0),Et(a.lastLine()),et)}function Ml(a,y,fe){var de={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return de.canceled=!0}};return fe&&(de.update=function(xe,Fe,Je,it){xe&&(de.from=Vt(a,xe)),Fe&&(de.to=Vt(a,Fe)),Je&&(de.text=Je),it!==void 0&&(de.origin=it)}),Ut(a,"beforeChange",a,de),a.cm&&Ut(a.cm,"beforeChange",a.cm,de),de.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:de.from,to:de.to,text:de.text,origin:de.origin}}function ks(a,y,fe){if(a.cm){if(!a.cm.curOp)return Yn(a.cm,ks)(a,y,fe);if(a.cm.state.suppressEdits)return}if(!((Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"))&&(y=Ml(a,y,!0),!y))){var de=Si&&!fe&&en(a,y.from,y.to);if(de)for(var xe=de.length-1;xe>=0;--xe)Rl(a,{from:de[xe].from,to:de[xe].to,text:xe?[""]:y.text,origin:y.origin});else Rl(a,y)}}function Rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Ht(y.from,y.to)==0)){var fe=oo(a,y);Xs(a,y,fe,a.cm?a.cm.curOp.id:NaN),Ns(a,y,fe,Ri(a,y));var de=[];io(a,function(xe,Fe){!Fe&&Ve(de,xe.history)==-1&&(Nl(xe.history,y),de.push(xe.history)),Ns(xe,y,null,Ri(xe,y))})}}function $s(a,y,fe){var de=a.cm&&a.cm.state.suppressEdits;if(!(de&&!fe)){for(var xe=a.history,Fe,Je=a.sel,it=y=="undo"?xe.done:xe.undone,at=y=="undo"?xe.undone:xe.done,ht=0;ht<it.length&&(Fe=it[ht],!(fe?Fe.ranges&&!Fe.equals(a.sel):!Fe.ranges));ht++);if(ht!=it.length){for(xe.lastOrigin=xe.lastSelOrigin=null;;)if(Fe=it.pop(),Fe.ranges){if($i(Fe,at),fe&&!Fe.equals(a.sel)){jo(a,Fe,{clearRedo:!1});return}Je=Fe}else if(de){it.push(Fe);return}else break;var It=[];$i(Je,at),at.push({changes:It,generation:xe.generation}),xe.generation=Fe.generation||++xe.maxGeneration;for(var Ft=Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"),ln=function(Hn){var qn=Fe.changes[Hn];if(qn.origin=y,Ft&&!Ml(a,qn,!1))return it.length=0,{};It.push(ao(a,qn));var sr=Hn?oo(a,qn):xt(it);Ns(a,qn,sr,_a(a,qn)),!Hn&&a.cm&&a.cm.scrollIntoView({from:qn.from,to:Er(qn)});var gr=[];io(a,function(lr,wr){!wr&&Ve(gr,lr.history)==-1&&(Nl(lr.history,qn),gr.push(lr.history)),Ns(lr,qn,null,_a(lr,qn))})},tn=Fe.changes.length-1;tn>=0;--tn){var kn=ln(tn);if(kn)return kn.v}}}}function Il(a,y){if(y!=0&&(a.first+=y,a.sel=new li(yt(a.sel.ranges,function(xe){return new Sr(Et(xe.anchor.line+y,xe.anchor.ch),Et(xe.head.line+y,xe.head.ch))}),a.sel.primIndex),a.cm)){Co(a.cm,a.first,a.first-y,y);for(var fe=a.cm.display,de=fe.viewFrom;de<fe.viewTo;de++)Eo(a.cm,de,"gutter")}}function Ns(a,y,fe,de){if(a.cm&&!a.cm.curOp)return Yn(a.cm,Ns)(a,y,fe,de);if(y.to.line<a.first){Il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var xe=y.text.length-1-(a.first-y.from.line);Il(a,xe),y={from:Et(a.first,0),to:Et(y.to.line+xe,y.to.ch),text:[xt(y.text)],origin:y.origin}}var Fe=a.lastLine();y.to.line>Fe&&(y={from:y.from,to:Et(Fe,Nt(a,Fe).text.length),text:[y.text[0]],origin:y.origin}),y.removed=nn(a,y.from,y.to),fe||(fe=oo(a,y)),a.cm?pu(a.cm,y,de):Ai(a,y,de),Js(a,fe,et),a.cantEdit&&Qs(a,Et(a.firstLine(),0))&&(a.cantEdit=!1)}}function pu(a,y,fe){var de=a.doc,xe=a.display,Fe=y.from,Je=y.to,it=!1,at=Fe.line;a.options.lineWrapping||(at=At(jt(Nt(de,Fe.line))),de.iter(at,Je.line+1,function(tn){if(tn==xe.maxLine)return it=!0,!0})),de.sel.contains(y.from,y.to)>-1&&Qt(a),Ai(de,y,fe,ds(a)),a.options.lineWrapping||(de.iter(at,Fe.line+y.text.length,function(tn){var kn=mr(tn);kn>xe.maxLineLength&&(xe.maxLine=tn,xe.maxLineLength=kn,xe.maxLineChanged=!0,it=!1)}),it&&(a.curOp.updateMaxLine=!0)),bi(de,Fe.line),xn(a,400);var ht=y.text.length-(Je.line-Fe.line)-1;y.full?Co(a):Fe.line==Je.line&&y.text.length==1&&!ai(a.doc,y)?Eo(a,Fe.line,"text"):Co(a,Fe.line,Je.line+1,ht);var It=Lt(a,"changes"),Ft=Lt(a,"change");if(Ft||It){var ln={from:Fe,to:Je,text:y.text,removed:y.removed,origin:y.origin};Ft&&Ni(a,"change",a,ln),It&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(ln)}a.display.selForContextMenu=null}function Ls(a,y,fe,de,xe){var Fe;de||(de=fe),Ht(de,fe)<0&&(Fe=[de,fe],fe=Fe[0],de=Fe[1]),typeof y=="string"&&(y=a.splitLines(y)),ks(a,{from:fe,to:de,text:y,origin:xe})}function Ol(a,y,fe,de){fe<a.line?a.line+=de:y<a.line&&(a.line=y,a.ch=0)}function Pl(a,y,fe,de){for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=!0;if(Fe.ranges){Fe.copied||(Fe=a[xe]=Fe.deepCopy(),Fe.copied=!0);for(var it=0;it<Fe.ranges.length;it++)Ol(Fe.ranges[it].anchor,y,fe,de),Ol(Fe.ranges[it].head,y,fe,de);continue}for(var at=0;at<Fe.changes.length;++at){var ht=Fe.changes[at];if(fe<ht.from.line)ht.from=Et(ht.from.line+de,ht.from.ch),ht.to=Et(ht.to.line+de,ht.to.ch);else if(y<=ht.to.line){Je=!1;break}}Je||(a.splice(0,xe+1),xe=0)}}function Nl(a,y){var fe=y.from.line,de=y.to.line,xe=y.text.length-(de-fe)-1;Pl(a.done,fe,de,xe),Pl(a.undone,fe,de,xe)}function Bs(a,y,fe,de){var xe=y,Fe=y;return typeof y=="number"?Fe=Nt(a,Cn(a,y)):xe=At(y),xe==null?null:(de(Fe,xe)&&a.cm&&Eo(a.cm,xe,fe),Fe)}function Fs(a){this.lines=a,this.parent=null;for(var y=0,fe=0;fe<a.length;++fe)a[fe].parent=this,y+=a[fe].height;this.height=y}Fs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var fe=a,de=a+y;fe<de;++fe){var xe=this.lines[fe];this.height-=xe.height,$r(xe),Ni(xe,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,fe){this.height+=fe,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var de=0;de<y.length;++de)y[de].parent=this},iterN:function(a,y,fe){for(var de=a+y;a<de;++a)if(fe(this.lines[a]))return!0}};function js(a){this.children=a;for(var y=0,fe=0,de=0;de<a.length;++de){var xe=a[de];y+=xe.chunkSize(),fe+=xe.height,xe.parent=this}this.size=y,this.height=fe,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var fe=0;fe<this.children.length;++fe){var de=this.children[fe],xe=de.chunkSize();if(a<xe){var Fe=Math.min(y,xe-a),Je=de.height;if(de.removeInner(a,Fe),this.height-=Je-de.height,xe==Fe&&(this.children.splice(fe--,1),de.parent=null),(y-=Fe)==0)break;a=0}else a-=xe}if(this.size-y<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 y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,fe){this.size+=y.length,this.height+=fe;for(var de=0;de<this.children.length;++de){var xe=this.children[de],Fe=xe.chunkSize();if(a<=Fe){if(xe.insertInner(a,y,fe),xe.lines&&xe.lines.length>50){for(var Je=xe.lines.length%25+25,it=Je;it<xe.lines.length;){var at=new Fs(xe.lines.slice(it,it+=25));xe.height-=at.height,this.children.splice(++de,0,at),at.parent=this}xe.lines=xe.lines.slice(0,Je),this.maybeSpill()}break}a-=Fe}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),fe=new js(y);if(a.parent){a.size-=fe.size,a.height-=fe.height;var xe=Ve(a.parent.children,a);a.parent.children.splice(xe+1,0,fe)}else{var de=new js(a.children);de.parent=a,a.children=[de,fe],a=de}fe.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,fe){for(var de=0;de<this.children.length;++de){var xe=this.children[de],Fe=xe.chunkSize();if(a<Fe){var Je=Math.min(y,Fe-a);if(xe.iterN(a,Je,fe))return!0;if((y-=Je)==0)break;a=0}else a-=Fe}}};var Us=function(a,y,fe){if(fe)for(var de in fe)fe.hasOwnProperty(de)&&(this[de]=fe[de]);this.doc=a,this.node=y};Us.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,fe=this.line,de=At(fe);if(!(de==null||!y)){for(var xe=0;xe<y.length;++xe)y[xe]==this&&y.splice(xe--,1);y.length||(fe.widgets=null);var Fe=Yi(this);Vn(fe,Math.max(0,fe.height-Fe)),a&&(St(a,function(){Bl(a,fe,-Fe),Eo(a,de,"widget")}),Ni(a,"lineWidgetCleared",a,this,de))}},Us.prototype.changed=function(){var a=this,y=this.height,fe=this.doc.cm,de=this.line;this.height=null;var xe=Yi(this)-y;xe&&(nr(this.doc,de)||Vn(de,de.height+xe),fe&&St(fe,function(){fe.curOp.forceUpdate=!0,Bl(fe,de,xe),Ni(fe,"lineWidgetChanged",fe,a,At(de))}))},qt(Us);function Bl(a,y,fe){$n(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&rs(a,fe)}function mu(a,y,fe,de){var xe=new Us(a,fe,de),Fe=a.cm;return Fe&&xe.noHScroll&&(Fe.display.alignWidgets=!0),Bs(a,y,"widget",function(Je){var it=Je.widgets||(Je.widgets=[]);if(xe.insertAt==null?it.push(xe):it.splice(Math.min(it.length-1,Math.max(0,xe.insertAt)),0,xe),xe.line=Je,Fe&&!nr(a,Je)){var at=$n(Je)<a.scrollTop;Vn(Je,Je.height+Yi(xe)),at&&rs(Fe,xe.height),Fe.curOp.forceUpdate=!0}return!0}),Fe&&Ni(Fe,"lineWidgetAdded",Fe,xe,typeof y=="number"?y:At(y)),xe}var Fl=0,ss=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++Fl};ss.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Oo(a),Lt(this,"clear")){var fe=this.find();fe&&Ni(this,"clear",fe.from,fe.to)}for(var de=null,xe=null,Fe=0;Fe<this.lines.length;++Fe){var Je=this.lines[Fe],it=br(Je.markedSpans,this);a&&!this.collapsed?Eo(a,At(Je),"text"):a&&(it.to!=null&&(xe=At(Je)),it.from!=null&&(de=At(Je))),Je.markedSpans=kr(Je.markedSpans,it),it.from==null&&this.collapsed&&!nr(this.doc,Je)&&a&&Vn(Je,vo(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var at=0;at<this.lines.length;++at){var ht=jt(this.lines[at]),It=mr(ht);It>a.display.maxLineLength&&(a.display.maxLine=ht,a.display.maxLineLength=It,a.display.maxLineChanged=!0)}de!=null&&a&&this.collapsed&&Co(a,de,xe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ll(a.doc)),a&&Ni(a,"markerCleared",a,this,de,xe),y&&fa(a),this.parent&&this.parent.clear()}},ss.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var fe,de,xe=0;xe<this.lines.length;++xe){var Fe=this.lines[xe],Je=br(Fe.markedSpans,this);if(Je.from!=null&&(fe=Et(y?Fe:At(Fe),Je.from),a==-1))return fe;if(Je.to!=null&&(de=Et(y?Fe:At(Fe),Je.to),a==1))return de}return fe&&{from:fe,to:de}},ss.prototype.changed=function(){var a=this,y=this.find(-1,!0),fe=this,de=this.doc.cm;!y||!de||St(de,function(){var xe=y.line,Fe=At(y.line),Je=Yo(de,Fe);if(Je&&(Ha(Je),de.curOp.selectionChanged=de.curOp.forceUpdate=!0),de.curOp.updateMaxLine=!0,!nr(fe.doc,xe)&&fe.height!=null){var it=fe.height;fe.height=null;var at=Yi(fe)-it;at&&Vn(xe,xe.height+at)}Ni(de,"markerChanged",de,a)})},ss.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ve(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ss.prototype.detachLine=function(a){if(this.lines.splice(Ve(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},qt(ss);function As(a,y,fe,de,xe){if(de&&de.shared)return vu(a,y,fe,de,xe);if(a.cm&&!a.cm.curOp)return Yn(a.cm,As)(a,y,fe,de,xe);var Fe=new ss(a,xe),Je=Ht(y,fe);if(de&&ut(de,Fe,!1),Je>0||Je==0&&Fe.clearWhenEmpty!==!1)return Fe;if(Fe.replacedWith&&(Fe.collapsed=!0,Fe.widgetNode=je("span",[Fe.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Fe.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Fe.widgetNode.insertLeft=!0)),Fe.collapsed){if(zt(a,y.line,y,fe,Fe)||y.line!=fe.line&&zt(a,fe.line,y,fe,Fe))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ei()}Fe.addToHistory&&Xs(a,{from:y,to:fe,origin:"markText"},a.sel,NaN);var it=y.line,at=a.cm,ht;if(a.iter(it,fe.line+1,function(Ft){at&&Fe.collapsed&&!at.options.lineWrapping&&jt(Ft)==at.display.maxLine&&(ht=!0),Fe.collapsed&&it!=y.line&&Vn(Ft,0),ti(Ft,new tr(Fe,it==y.line?y.ch:null,it==fe.line?fe.ch:null)),++it}),Fe.collapsed&&a.iter(y.line,fe.line+1,function(Ft){nr(a,Ft)&&Vn(Ft,0)}),Fe.clearOnEnter&&vt(Fe,"beforeCursorEnter",function(){return Fe.clear()}),Fe.readOnly&&(Ti(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),Fe.collapsed&&(Fe.id=++Fl,Fe.atomic=!0),at){if(ht&&(at.curOp.updateMaxLine=!0),Fe.collapsed)Co(at,y.line,fe.line+1);else if(Fe.className||Fe.startStyle||Fe.endStyle||Fe.css||Fe.attributes||Fe.title)for(var It=y.line;It<=fe.line;It++)Eo(at,It,"text");Fe.atomic&&Ll(at.doc),Ni(at,"markerAdded",at,Fe)}return Fe}var zs=function(a,y){this.markers=a,this.primary=y;for(var fe=0;fe<a.length;++fe)a[fe].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();Ni(this,"clear")}},zs.prototype.find=function(a,y){return this.primary.find(a,y)},qt(zs);function vu(a,y,fe,de,xe){de=ut(de),de.shared=!1;var Fe=[As(a,y,fe,de,xe)],Je=Fe[0],it=de.widgetNode;return io(a,function(at){it&&(de.widgetNode=it.cloneNode(!0)),Fe.push(As(at,Vt(at,y),Vt(at,fe),de,xe));for(var ht=0;ht<at.linked.length;++ht)if(at.linked[ht].isParent)return;Je=xt(Fe)}),new zs(Fe,Je)}function jl(a){return a.findMarks(Et(a.first,0),a.clipPos(Et(a.lastLine())),function(y){return y.parent})}function gu(a,y){for(var fe=0;fe<y.length;fe++){var de=y[fe],xe=de.find(),Fe=a.clipPos(xe.from),Je=a.clipPos(xe.to);if(Ht(Fe,Je)){var it=As(a,Fe,Je,de.primary,de.primary.type);de.markers.push(it),it.parent=de}}}function yu(a){for(var y=function(de){var xe=a[de],Fe=[xe.primary.doc];io(xe.primary.doc,function(at){return Fe.push(at)});for(var Je=0;Je<xe.markers.length;Je++){var it=xe.markers[Je];Ve(Fe,it.doc)==-1&&(it.parent=null,xe.markers.splice(Je--,1))}},fe=0;fe<a.length;fe++)y(fe)}var _u=0,Qo=function(a,y,fe,de,xe){if(!(this instanceof Qo))return new Qo(a,y,fe,de,xe);fe==null&&(fe=0),js.call(this,[new Fs([new jr("",null)])]),this.first=fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=fe;var Fe=Et(fe,0);this.sel=mi(Fe),this.history=new Jo(null),this.id=++_u,this.modeOption=y,this.lineSep=de,this.direction=xe=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),Ai(this,{from:Fe,to:Fe,text:a}),jo(this,mi(Fe),et)};Qo.prototype=Ae(js.prototype,{constructor:Qo,iter:function(a,y,fe){fe?this.iterN(a-this.first,y-a,fe):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var fe=0,de=0;de<y.length;++de)fe+=y[de].height;this.insertInner(a-this.first,y,fe)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=An(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:mn(function(a){var y=Et(this.first,0),fe=this.first+this.size-1;ks(this,{from:y,to:Et(fe,Nt(this,fe).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Dr(this.cm,0,0),jo(this,mi(y),et)}),replaceRange:function(a,y,fe,de){y=Vt(this,y),fe=fe?Vt(this,fe):y,Ls(this,a,y,fe,de)},getRange:function(a,y,fe){var de=nn(this,Vt(this,a),Vt(this,y));return fe===!1?de:de.join(fe||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(dn(this,a))return Nt(this,a)},getLineNumber:function(a){return At(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Nt(this,a)),jt(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Vt(this,a)},getCursor:function(a){var y=this.sel.primary(),fe;return a==null||a=="head"?fe=y.head:a=="anchor"?fe=y.anchor:a=="end"||a=="to"||a===!1?fe=y.to():fe=y.from(),fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:mn(function(a,y,fe){as(this,Vt(this,typeof a=="number"?Et(a,y||0):a),null,fe)}),setSelection:mn(function(a,y,fe){as(this,Vt(this,a),Vt(this,y||a),fe)}),extendSelection:mn(function(a,y,fe){Va(this,Vt(this,a),y&&Vt(this,y),fe)}),extendSelections:mn(function(a,y){ja(this,bn(this,a),y)}),extendSelectionsBy:mn(function(a,y){var fe=yt(this.sel.ranges,a);ja(this,bn(this,fe),y)}),setSelections:mn(function(a,y,fe){if(a.length){for(var de=[],xe=0;xe<a.length;xe++)de[xe]=new Sr(Vt(this,a[xe].anchor),Vt(this,a[xe].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),jo(this,Ir(this.cm,de,y),fe)}}),addSelection:mn(function(a,y,fe){var de=this.sel.ranges.slice(0);de.push(new Sr(Vt(this,a),Vt(this,y||a))),jo(this,Ir(this.cm,de,de.length-1),fe)}),getSelection:function(a){for(var y=this.sel.ranges,fe,de=0;de<y.length;de++){var xe=nn(this,y[de].from(),y[de].to());fe=fe?fe.concat(xe):xe}return a===!1?fe:fe.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],fe=this.sel.ranges,de=0;de<fe.length;de++){var xe=nn(this,fe[de].from(),fe[de].to());a!==!1&&(xe=xe.join(a||this.lineSeparator())),y[de]=xe}return y},replaceSelection:function(a,y,fe){for(var de=[],xe=0;xe<this.sel.ranges.length;xe++)de[xe]=a;this.replaceSelections(de,y,fe||"+input")},replaceSelections:mn(function(a,y,fe){for(var de=[],xe=this.sel,Fe=0;Fe<xe.ranges.length;Fe++){var Je=xe.ranges[Fe];de[Fe]={from:Je.from(),to:Je.to(),text:this.splitLines(a[Fe]),origin:fe}}for(var it=y&&y!="end"&&os(this,de,y),at=de.length-1;at>=0;at--)ks(this,de[at]);it?El(this,it):this.cm&&La(this.cm)}),undo:mn(function(){$s(this,"undo")}),redo:mn(function(){$s(this,"redo")}),undoSelection:mn(function(){$s(this,"undo",!0)}),redoSelection:mn(function(){$s(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,fe=0,de=0;de<a.done.length;de++)a.done[de].ranges||++y;for(var xe=0;xe<a.undone.length;xe++)a.undone[xe].ranges||++fe;return{undo:y,redo:fe}},clearHistory:function(){var a=this;this.history=new Jo(this.history.maxGeneration),io(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ha(this.history.done),undone:ha(this.history.undone)}},setHistory:function(a){var y=this.history=new Jo(this.history.maxGeneration);y.done=ha(a.done.slice(0),null,!0),y.undone=ha(a.undone.slice(0),null,!0)},setGutterMarker:mn(function(a,y,fe){return Bs(this,a,"gutter",function(de){var xe=de.gutterMarkers||(de.gutterMarkers={});return xe[y]=fe,!fe&&Ne(xe)&&(de.gutterMarkers=null),!0})}),clearGutter:mn(function(a){var y=this;this.iter(function(fe){fe.gutterMarkers&&fe.gutterMarkers[a]&&Bs(y,fe,"gutter",function(){return fe.gutterMarkers[a]=null,Ne(fe.gutterMarkers)&&(fe.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!dn(this,a)||(y=a,a=Nt(this,a),!a))return null}else if(y=At(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:mn(function(a,y,fe){return Bs(this,a,y=="gutter"?"gutter":"class",function(de){var xe=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!de[xe])de[xe]=fe;else{if(pe(fe).test(de[xe]))return!1;de[xe]+=" "+fe}return!0})}),removeLineClass:mn(function(a,y,fe){return Bs(this,a,y=="gutter"?"gutter":"class",function(de){var xe=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",Fe=de[xe];if(Fe)if(fe==null)de[xe]=null;else{var Je=Fe.match(pe(fe));if(!Je)return!1;var it=Je.index+Je[0].length;de[xe]=Fe.slice(0,Je.index)+(!Je.index||it==Fe.length?"":" ")+Fe.slice(it)||null}else return!1;return!0})}),addLineWidget:mn(function(a,y,fe){return mu(this,a,y,fe)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,fe){return As(this,Vt(this,a),Vt(this,y),fe,fe&&fe.type||"range")},setBookmark:function(a,y){var fe={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Vt(this,a),As(this,a,a,fe,"bookmark")},findMarksAt:function(a){a=Vt(this,a);var y=[],fe=Nt(this,a.line).markedSpans;if(fe)for(var de=0;de<fe.length;++de){var xe=fe[de];(xe.from==null||xe.from<=a.ch)&&(xe.to==null||xe.to>=a.ch)&&y.push(xe.marker.parent||xe.marker)}return y},findMarks:function(a,y,fe){a=Vt(this,a),y=Vt(this,y);var de=[],xe=a.line;return this.iter(a.line,y.line+1,function(Fe){var Je=Fe.markedSpans;if(Je)for(var it=0;it<Je.length;it++){var at=Je[it];!(at.to!=null&&xe==a.line&&a.ch>=at.to||at.from==null&&xe!=a.line||at.from!=null&&xe==y.line&&at.from>=y.ch)&&(!fe||fe(at.marker))&&de.push(at.marker.parent||at.marker)}++xe}),de},getAllMarks:function(){var a=[];return this.iter(function(y){var fe=y.markedSpans;if(fe)for(var de=0;de<fe.length;++de)fe[de].from!=null&&a.push(fe[de].marker)}),a},posFromIndex:function(a){var y,fe=this.first,de=this.lineSeparator().length;return this.iter(function(xe){var Fe=xe.text.length+de;if(Fe>a)return y=a,!0;a-=Fe,++fe}),Vt(this,Et(fe,y))},indexFromPos:function(a){a=Vt(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var fe=this.lineSeparator().length;return this.iter(this.first,a.line,function(de){y+=de.text.length+fe}),y},copy:function(a){var y=new Qo(An(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,fe=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<fe&&(fe=a.to);var de=new Qo(An(this,y,fe),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(de.history=this.history),(this.linked||(this.linked=[])).push({doc:de,sharedHist:a.sharedHist}),de.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],gu(de,jl(this)),de},unlinkDoc:function(a){if(a instanceof so&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var fe=this.linked[y];if(fe.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),yu(jl(this));break}}if(a.history==this.history){var de=[a.id];io(a,function(xe){return de.push(xe.id)},!0),a.history=new Jo(null),a.history.done=ha(this.history.done,de),a.history.undone=ha(this.history.undone,de)}},iterLinkedDocs:function(a){io(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):rr(a)},lineSeparator:function(){return this.lineSep||`
`},setDirection:mn(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&Cs(this.cm))})}),Qo.prototype.eachLine=Qo.prototype.iter;var Ul=0;function bu(a){var y=this;if(zl(y),!(gt(y,a)||Xi(y.display,a))){un(a),se&&(Ul=+new Date);var fe=da(y,a,!0),de=a.dataTransfer.files;if(!(!fe||y.isReadOnly()))if(de&&de.length&&window.FileReader&&window.File)for(var xe=de.length,Fe=Array(xe),Je=0,it=function(){++Je==xe&&Yn(y,function(){fe=Vt(y.doc,fe);var tn={from:fe,to:fe,text:y.doc.splitLines(Fe.filter(function(kn){return kn!=null}).join(y.doc.lineSeparator())),origin:"paste"};ks(y.doc,tn),El(y.doc,mi(Vt(y.doc,fe),Vt(y.doc,Er(tn))))})()},at=function(tn,kn){if(y.options.allowDropFileTypes&&Ve(y.options.allowDropFileTypes,tn.type)==-1){it();return}var Hn=new FileReader;Hn.onerror=function(){return it()},Hn.onload=function(){var qn=Hn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(qn)){it();return}Fe[kn]=qn,it()},Hn.readAsText(tn)},ht=0;ht<de.length;ht++)at(de[ht],ht);else{if(y.state.draggingText&&y.doc.sel.contains(fe)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var It=a.dataTransfer.getData("Text");if(It){var Ft;if(y.state.draggingText&&!y.state.draggingText.copy&&(Ft=y.listSelections()),Js(y.doc,mi(fe,fe)),Ft)for(var ln=0;ln<Ft.length;++ln)Ls(y.doc,"",Ft[ln].anchor,Ft[ln].head,"drag");y.replaceSelection(It,"around","paste"),y.display.input.focus()}}catch(tn){}}}}function Su(a,y){if(se&&(!a.state.draggingText||+new Date-Ul<100)){Ln(y);return}if(!(gt(a,y)||Xi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!b)){var fe=Oe("img",null,null,"position: fixed; left: 0; top: 0;");fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(fe.width=fe.height=1,a.display.wrapper.appendChild(fe),fe._top=fe.offsetTop),y.dataTransfer.setDragImage(fe,0,0),E&&fe.parentNode.removeChild(fe)}}function wu(a,y){var fe=da(a,y);if(fe){var de=document.createDocumentFragment();$a(a,fe,de),a.display.dragCursor||(a.display.dragCursor=Oe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ee(a.display.dragCursor,de)}}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 y=document.getElementsByClassName("CodeMirror"),fe=[],de=0;de<y.length;de++){var xe=y[de].CodeMirror;xe&&fe.push(xe)}fe.length&&fe[0].operation(function(){for(var Fe=0;Fe<fe.length;Fe++)a(fe[Fe])})}}var Wl=!1;function xu(){Wl||(Cu(),Wl=!0)}function Cu(){var a;vt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,Hl(Eu)},100))}),vt(window,"blur",function(){return Hl(Ga)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.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=ve?Ya.macDefault:Ya.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var fe,de,xe,Fe,Je=0;Je<y.length-1;Je++){var it=y[Je];if(/^(cmd|meta|m)$/i.test(it))Fe=!0;else if(/^a(lt)?$/i.test(it))fe=!0;else if(/^(c|ctrl|control)$/i.test(it))de=!0;else if(/^s(hift)?$/i.test(it))xe=!0;else throw new Error("Unrecognized modifier name: "+it)}return fe&&(a="Alt-"+a),de&&(a="Ctrl-"+a),Fe&&(a="Cmd-"+a),xe&&(a="Shift-"+a),a}function Lu(a){var y={};for(var fe in a)if(a.hasOwnProperty(fe)){var de=a[fe];if(/^(name|fallthrough|(de|at)tach)$/.test(fe))continue;if(de=="..."){delete a[fe];continue}for(var xe=yt(fe.split(" "),ku),Fe=0;Fe<xe.length;Fe++){var Je=void 0,it=void 0;Fe==xe.length-1?(it=xe.join(" "),Je=de):(it=xe.slice(0,Fe+1).join(" "),Je="...");var at=y[it];if(!at)y[it]=Je;else if(at!=Je)throw new Error("Inconsistent bindings for "+it)}delete a[fe]}for(var ht in y)a[ht]=y[ht];return a}function Ts(a,y,fe,de){y=tl(y);var xe=y.call?y.call(a,de):y[a];if(xe===!1)return"nothing";if(xe==="...")return"multi";if(xe!=null&&fe(xe))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return Ts(a,y.fallthrough,fe,de);for(var Fe=0;Fe<y.fallthrough.length;Fe++){var Je=Ts(a,y.fallthrough[Fe],fe,de);if(Je)return Je}}}function Zl(a){var y=typeof a=="string"?a:ls[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function Gl(a,y,fe){var de=a;return y.altKey&&de!="Alt"&&(a="Alt-"+a),(_e?y.metaKey:y.ctrlKey)&&de!="Ctrl"&&(a="Ctrl-"+a),(_e?y.ctrlKey:y.metaKey)&&de!="Mod"&&(a="Cmd-"+a),!fe&&y.shiftKey&&de!="Shift"&&(a="Shift-"+a),a}function Kl(a,y){if(E&&a.keyCode==34&&a.char)return!1;var fe=ls[a.keyCode];return fe==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(fe=a.code),Gl(fe,a,y))}function tl(a){return typeof a=="string"?Ya[a]:a}function Ds(a,y){for(var fe=a.doc.sel.ranges,de=[],xe=0;xe<fe.length;xe++){for(var Fe=y(fe[xe]);de.length&&Ht(Fe.from,xt(de).to)<=0;){var Je=de.pop();if(Ht(Je.from,Fe.from)<0){Fe.from=Je.from;break}}de.push(Fe)}St(a,function(){for(var it=de.length-1;it>=0;it--)Ls(a.doc,"",de[it].from,de[it].to,"+delete");La(a)})}function pl(a,y,fe){var de=Le(a.text,y+fe,fe);return de<0||de>a.text.length?null:de}function ml(a,y,fe){var de=pl(a,y.ch,fe);return de==null?null:new Et(y.line,de,fe<0?"after":"before")}function vl(a,y,fe,de,xe){if(a){y.doc.direction=="rtl"&&(xe=-xe);var Fe=Pt(fe,y.doc.direction);if(Fe){var Je=xe<0?xt(Fe):Fe[0],it=xe<0==(Je.level==1),at=it?"after":"before",ht;if(Je.level>0||y.doc.direction=="rtl"){var It=la(y,fe);ht=xe<0?fe.text.length-1:0;var Ft=Zo(y,It,ht).top;ht=Ue(function(ln){return Zo(y,It,ln).top==Ft},xe<0==(Je.level==1)?Je.from:Je.to-1,ht),at=="before"&&(ht=pl(fe,ht,1))}else ht=xe<0?Je.to:Je.from;return new Et(de,ht,at)}}return new Et(de,xe<0?fe.text.length:0,xe<0?"before":"after")}function Au(a,y,fe,de){var xe=Pt(y,a.doc.direction);if(!xe)return ml(y,fe,de);fe.ch>=y.text.length?(fe.ch=y.text.length,fe.sticky="before"):fe.ch<=0&&(fe.ch=0,fe.sticky="after");var Fe=tt(xe,fe.ch,fe.sticky),Je=xe[Fe];if(a.doc.direction=="ltr"&&Je.level%2==0&&(de>0?Je.to>fe.ch:Je.from<fe.ch))return ml(y,fe,de);var it=function(sr,gr){return pl(y,sr instanceof Et?sr.ch:sr,gr)},at,ht=function(sr){return a.options.lineWrapping?(at=at||la(a,y),ro(a,y,at,sr)):{begin:0,end:y.text.length}},It=ht(fe.sticky=="before"?it(fe,-1):fe.ch);if(a.doc.direction=="rtl"||Je.level==1){var Ft=Je.level==1==de<0,ln=it(fe,Ft?1:-1);if(ln!=null&&(Ft?ln<=Je.to&&ln<=It.end:ln>=Je.from&&ln>=It.begin)){var tn=Ft?"before":"after";return new Et(fe.line,ln,tn)}}var kn=function(sr,gr,lr){for(var wr=function(eo,Do){return Do?new Et(fe.line,it(eo,1),"before"):new Et(fe.line,eo,"after")};sr>=0&&sr<xe.length;sr+=gr){var Qr=xe[sr],zr=gr>0==(Qr.level!=1),Li=zr?lr.begin:it(lr.end,-1);if(Qr.from<=Li&&Li<Qr.to||(Li=zr?Qr.from:it(Qr.to,-1),lr.begin<=Li&&Li<lr.end))return wr(Li,zr)}},Hn=kn(Fe+de,de,It);if(Hn)return Hn;var qn=de>0?It.end:it(It.begin,-1);return qn!=null&&!(de>0&&qn==y.text.length)&&(Hn=kn(de>0?0:xe.length-1,de,ht(qn)),Hn)?Hn:null}var Zs={selectAll:Dl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),et)},killLine:function(a){return Ds(a,function(y){if(y.empty()){var fe=Nt(a.doc,y.head.line).text.length;return y.head.ch==fe&&y.head.line<a.lastLine()?{from:y.head,to:Et(y.head.line+1,0)}:{from:y.head,to:Et(y.head.line,fe)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Ds(a,function(y){return{from:Et(y.from().line,0),to:Vt(a.doc,Et(y.to().line+1,0))}})},delLineLeft:function(a){return Ds(a,function(y){return{from:Et(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Ds(a,function(y){var fe=a.charCoords(y.head,"div").top+5,de=a.coordsChar({left:0,top:fe},"div");return{from:de,to:y.from()}})},delWrappedLineRight:function(a){return Ds(a,function(y){var fe=a.charCoords(y.head,"div").top+5,de=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:fe},"div");return{from:y.from(),to:de}})},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(Et(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Et(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return Vl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return Yl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Tu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:fe},"div")},ct)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:fe},"div")},ct)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5,de=a.coordsChar({left:0,top:fe},"div");return de.ch<a.getLine(de.line).search(/\S/)?Yl(a,y.head):de},ct)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],fe=a.listSelections(),de=a.options.tabSize,xe=0;xe<fe.length;xe++){var Fe=fe[xe].from(),Je=Ge(a.getLine(Fe.line),Fe.ch,de);y.push(Mt(de-Je%de))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return St(a,function(){for(var y=a.listSelections(),fe=[],de=0;de<y.length;de++)if(y[de].empty()){var xe=y[de].head,Fe=Nt(a.doc,xe.line).text;if(Fe){if(xe.ch==Fe.length&&(xe=new Et(xe.line,xe.ch-1)),xe.ch>0)xe=new Et(xe.line,xe.ch+1),a.replaceRange(Fe.charAt(xe.ch-1)+Fe.charAt(xe.ch-2),Et(xe.line,xe.ch-2),xe,"+transpose");else if(xe.line>a.doc.first){var Je=Nt(a.doc,xe.line-1).text;Je&&(xe=new Et(xe.line,1),a.replaceRange(Fe.charAt(0)+a.doc.lineSeparator()+Je.charAt(Je.length-1),Et(xe.line-1,Je.length-1),xe,"+transpose"))}}fe.push(new Sr(xe,xe))}a.setSelections(fe)})},newlineAndIndent:function(a){return St(a,function(){for(var y=a.listSelections(),fe=y.length-1;fe>=0;fe--)a.replaceRange(a.doc.lineSeparator(),y[fe].anchor,y[fe].head,"+input");y=a.listSelections();for(var de=0;de<y.length;de++)a.indentLine(y[de].from().line,null,!0);La(a)})},openLine:function(a){return a.replaceSelection(`
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function Vl(a,y){var fe=Nt(a.doc,y),de=jt(fe);return de!=fe&&(y=At(de)),vl(!0,a,de,y,1)}function Tu(a,y){var fe=Nt(a.doc,y),de=Xt(fe);return de!=fe&&(y=At(de)),vl(!0,a,fe,y,-1)}function Yl(a,y){var fe=Vl(a,y.line),de=Nt(a.doc,fe.line),xe=Pt(de,a.doc.direction);if(!xe||xe[0].level==0){var Fe=Math.max(fe.ch,de.text.search(/\S/)),Je=y.line==fe.line&&y.ch<=Fe&&y.ch;return Et(fe.line,Je?0:Fe,fe.sticky)}return fe}function nl(a,y,fe){if(typeof y=="string"&&(y=Zs[y],!y))return!1;a.display.input.ensurePolled();var de=a.display.shift,xe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),fe&&(a.display.shift=!1),xe=y(a)!=nt}finally{a.display.shift=de,a.state.suppressEdits=!1}return xe}function Du(a,y,fe){for(var de=0;de<a.state.keyMaps.length;de++){var xe=Ts(y,a.state.keyMaps[de],fe,a);if(xe)return xe}return a.options.extraKeys&&Ts(y,a.options.extraKeys,fe,a)||Ts(y,a.options.keyMap,fe,a)}var Mu=new ze;function Gs(a,y,fe,de){var xe=a.state.keySeq;if(xe){if(Zl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==xe&&(a.state.keySeq=null,a.display.input.reset())}),Xl(a,xe+" "+y,fe,de))return!0}return Xl(a,y,fe,de)}function Xl(a,y,fe,de){var xe=Du(a,y,de);return xe=="multi"&&(a.state.keySeq=y),xe=="handled"&&Ni(a,"keyHandled",a,y,fe),(xe=="handled"||xe=="multi")&&(un(fe),es(a)),!!xe}function ql(a,y){var fe=Kl(y,!0);return fe?y.shiftKey&&!a.state.keySeq?Gs(a,"Shift-"+fe,y,function(de){return nl(a,de,!0)})||Gs(a,fe,y,function(de){if(typeof de=="string"?/^go[A-Z]/.test(de):de.motion)return nl(a,de)}):Gs(a,fe,y,function(de){return nl(a,de)}):!1}function Ru(a,y,fe){return Gs(a,"'"+fe+"'",y,function(de){return nl(a,de,!0)})}var gl=null;function Jl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Xe(),!gt(y,a))){se&&te<11&&a.keyCode==27&&(a.returnValue=!1);var fe=a.keyCode;y.display.shift=fe==16||a.shiftKey;var de=ql(y,a);E&&(gl=de?fe:null,!de&&fe==88&&!In&&(ve?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ce&&!ve&&!de&&fe==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),fe==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Iu(y)}}function Iu(a){var y=a.display.lineDiv;ot(y,"CodeMirror-crosshair");function fe(de){(de.keyCode==18||!de.altKey)&&(ke(y,"CodeMirror-crosshair"),Zt(document,"keyup",fe),Zt(document,"mouseover",fe))}vt(document,"keyup",fe),vt(document,"mouseover",fe)}function Ql(a){a.keyCode==16&&(this.doc.sel.shift=!1),gt(this,a)}function $l(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(Xi(y.display,a)||gt(y,a)||a.ctrlKey&&!a.altKey||ve&&a.metaKey)){var fe=a.keyCode,de=a.charCode;if(E&&fe==gl){gl=null,un(a);return}if(!(E&&(!a.which||a.which<10)&&ql(y,a))){var xe=String.fromCharCode(de==null?fe:de);xe!="\b"&&(Ru(y,a,xe)||y.display.input.onKeyPress(a))}}}var Ou=400,yl=function(a,y,fe){this.time=a,this.pos=y,this.button=fe};yl.prototype.compare=function(a,y,fe){return this.time+Ou>a&&Ht(y,this.pos)==0&&fe==this.button};var Ks,Vs;function Pu(a,y){var fe=+new Date;return Vs&&Vs.compare(fe,a,y)?(Ks=Vs=null,"triple"):Ks&&Ks.compare(fe,a,y)?(Vs=new yl(fe,a,y),Ks=null,"double"):(Ks=new yl(fe,a,y),Vs=null,"single")}function eu(a){var y=this,fe=y.display;if(!(gt(y,a)||fe.activeTouch&&fe.input.supportsTouch())){if(fe.input.ensurePolled(),fe.shift=a.shiftKey,Xi(fe,a)){le||(fe.scroller.draggable=!1,setTimeout(function(){return fe.scroller.draggable=!0},100));return}if(!_l(y,a)){var de=da(y,a),xe=Gn(a),Fe=de?Pu(de,xe):"single";window.focus(),xe==1&&y.state.selectingText&&y.state.selectingText(a),!(de&&Nu(y,xe,de,Fe,a))&&(xe==1?de?Fu(y,de,Fe,a):Zn(a)==fe.scroller&&un(a):xe==2?(de&&Va(y.doc,de),setTimeout(function(){return fe.input.focus()},20)):xe==3&&(he?y.display.input.onContextMenu(a):Za(y)))}}}function Nu(a,y,fe,de,xe){var Fe="Click";return de=="double"?Fe="Double"+Fe:de=="triple"&&(Fe="Triple"+Fe),Fe=(y==1?"Left":y==2?"Middle":"Right")+Fe,Gs(a,Gl(Fe,xe),xe,function(Je){if(typeof Je=="string"&&(Je=Zs[Je]),!Je)return!1;var it=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),it=Je(a,fe)!=nt}finally{a.state.suppressEdits=!1}return it})}function Bu(a,y,fe){var de=a.getOption("configureMouse"),xe=de?de(a,y,fe):{};if(xe.unit==null){var Fe=ye?fe.shiftKey&&fe.metaKey:fe.altKey;xe.unit=Fe?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(xe.extend==null||a.doc.extend)&&(xe.extend=a.doc.extend||fe.shiftKey),xe.addNew==null&&(xe.addNew=ve?fe.metaKey:fe.ctrlKey),xe.moveOnDrag==null&&(xe.moveOnDrag=!(ve?fe.altKey:fe.ctrlKey)),xe}function Fu(a,y,fe,de){se?setTimeout(Ye(ra,a),0):a.curOp.focus=Xe();var xe=Bu(a,fe,de),Fe=a.doc.sel,Je;a.options.dragDrop&&Jn&&!a.isReadOnly()&&fe=="single"&&(Je=Fe.contains(y))>-1&&(Ht((Je=Fe.ranges[Je]).from(),y)<0||y.xRel>0)&&(Ht(Je.to(),y)>0||y.xRel<0)?ju(a,de,y,xe):Uu(a,de,y,xe)}function ju(a,y,fe,de){var xe=a.display,Fe=!1,Je=Yn(a,function(ht){le&&(xe.scroller.draggable=!1),a.state.draggingText=!1,Zt(xe.wrapper.ownerDocument,"mouseup",Je),Zt(xe.wrapper.ownerDocument,"mousemove",it),Zt(xe.scroller,"dragstart",at),Zt(xe.scroller,"drop",Je),Fe||(un(ht),de.addNew||Va(a.doc,fe,null,null,de.extend),le&&!b||se&&te==9?setTimeout(function(){xe.wrapper.ownerDocument.body.focus({preventScroll:!0}),xe.input.focus()},20):xe.input.focus())}),it=function(ht){Fe=Fe||Math.abs(y.clientX-ht.clientX)+Math.abs(y.clientY-ht.clientY)>=10},at=function(){return Fe=!0};le&&(xe.scroller.draggable=!0),a.state.draggingText=Je,Je.copy=!de.moveOnDrag,xe.scroller.dragDrop&&xe.scroller.dragDrop(),vt(xe.wrapper.ownerDocument,"mouseup",Je),vt(xe.wrapper.ownerDocument,"mousemove",it),vt(xe.scroller,"dragstart",at),vt(xe.scroller,"drop",Je),Za(a),setTimeout(function(){return xe.input.focus()},20)}function tu(a,y,fe){if(fe=="char")return new Sr(y,y);if(fe=="word")return a.findWordAt(y);if(fe=="line")return new Sr(Et(y.line,0),Vt(a.doc,Et(y.line+1,0)));var de=fe(a,y);return new Sr(de.from,de.to)}function Uu(a,y,fe,de){var xe=a.display,Fe=a.doc;un(y);var Je,it,at=Fe.sel,ht=at.ranges;if(de.addNew&&!de.extend?(it=Fe.sel.contains(fe),it>-1?Je=ht[it]:Je=new Sr(fe,fe)):(Je=Fe.sel.primary(),it=Fe.sel.primIndex),de.unit=="rectangle")de.addNew||(Je=new Sr(fe,fe)),fe=da(a,y,!0,!0),it=-1;else{var It=tu(a,fe,de.unit);de.extend?Je=Ka(Je,It.anchor,It.head,de.extend):Je=It}de.addNew?it==-1?(it=ht.length,jo(Fe,Ir(a,ht.concat([Je]),it),{scroll:!1,origin:"*mouse"})):ht.length>1&&ht[it].empty()&&de.unit=="char"&&!de.extend?(jo(Fe,Ir(a,ht.slice(0,it).concat(ht.slice(it+1)),0),{scroll:!1,origin:"*mouse"}),at=Fe.sel):Ps(Fe,it,Je,pt):(it=0,jo(Fe,new li([Je],0),pt),at=Fe.sel);var Ft=fe;function ln(lr){if(Ht(Ft,lr)!=0)if(Ft=lr,de.unit=="rectangle"){for(var wr=[],Qr=a.options.tabSize,zr=Ge(Nt(Fe,fe.line).text,fe.ch,Qr),Li=Ge(Nt(Fe,lr.line).text,lr.ch,Qr),eo=Math.min(zr,Li),Do=Math.max(zr,Li),ho=Math.min(fe.line,lr.line),sa=Math.min(a.lastLine(),Math.max(fe.line,lr.line));ho<=sa;ho++){var $o=Nt(Fe,ho).text,bo=Rt($o,eo,Qr);eo==Do?wr.push(new Sr(Et(ho,bo),Et(ho,bo))):$o.length>bo&&wr.push(new Sr(Et(ho,bo),Et(ho,Rt($o,Do,Qr))))}wr.length||wr.push(new Sr(fe,fe)),jo(Fe,Ir(a,at.ranges.slice(0,it).concat(wr),it),{origin:"*mouse",scroll:!1}),a.scrollIntoView(lr)}else{var ea=Je,No=tu(a,lr,de.unit),ko=ea.anchor,So;Ht(No.anchor,ko)>0?(So=No.head,ko=Wt(ea.from(),No.anchor)):(So=No.anchor,ko=yn(ea.to(),No.head));var mo=at.ranges.slice(0);mo[it]=zu(a,new Sr(Vt(Fe,ko),So)),jo(Fe,Ir(a,mo,it),pt)}}var tn=xe.wrapper.getBoundingClientRect(),kn=0;function Hn(lr){var wr=++kn,Qr=da(a,lr,!0,de.unit=="rectangle");if(Qr)if(Ht(Qr,Ft)!=0){a.curOp.focus=Xe(),ln(Qr);var zr=ka(xe,Fe);(Qr.line>=zr.to||Qr.line<zr.from)&&setTimeout(Yn(a,function(){kn==wr&&Hn(lr)}),150)}else{var Li=lr.clientY<tn.top?-20:lr.clientY>tn.bottom?20:0;Li&&setTimeout(Yn(a,function(){kn==wr&&(xe.scroller.scrollTop+=Li,Hn(lr))}),50)}}function qn(lr){a.state.selectingText=!1,kn=1/0,lr&&(un(lr),xe.input.focus()),Zt(xe.wrapper.ownerDocument,"mousemove",sr),Zt(xe.wrapper.ownerDocument,"mouseup",gr),Fe.history.lastSelOrigin=null}var sr=Yn(a,function(lr){lr.buttons===0||!Gn(lr)?qn(lr):Hn(lr)}),gr=Yn(a,qn);a.state.selectingText=gr,vt(xe.wrapper.ownerDocument,"mousemove",sr),vt(xe.wrapper.ownerDocument,"mouseup",gr)}function zu(a,y){var fe=y.anchor,de=y.head,xe=Nt(a.doc,fe.line);if(Ht(fe,de)==0&&fe.sticky==de.sticky)return y;var Fe=Pt(xe);if(!Fe)return y;var Je=tt(Fe,fe.ch,fe.sticky),it=Fe[Je];if(it.from!=fe.ch&&it.to!=fe.ch)return y;var at=Je+(it.from==fe.ch==(it.level!=1)?0:1);if(at==0||at==Fe.length)return y;var ht;if(de.line!=fe.line)ht=(de.line-fe.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var It=tt(Fe,de.ch,de.sticky),Ft=It-Je||(de.ch-fe.ch)*(it.level==1?-1:1);It==at-1||It==at?ht=Ft<0:ht=Ft>0}var ln=Fe[at+(ht?-1:0)],tn=ht==(ln.level==1),kn=tn?ln.from:ln.to,Hn=tn?"after":"before";return fe.ch==kn&&fe.sticky==Hn?y:new Sr(new Et(fe.line,kn,Hn),de)}function nu(a,y,fe,de){var xe,Fe;if(y.touches)xe=y.touches[0].clientX,Fe=y.touches[0].clientY;else try{xe=y.clientX,Fe=y.clientY}catch(ln){return!1}if(xe>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;de&&un(y);var Je=a.display,it=Je.lineDiv.getBoundingClientRect();if(Fe>it.bottom||!Lt(a,fe))return Jt(y);Fe-=it.top-Je.viewOffset;for(var at=0;at<a.display.gutterSpecs.length;++at){var ht=Je.gutters.childNodes[at];if(ht&&ht.getBoundingClientRect().right>=xe){var It=wt(a.doc,Fe),Ft=a.display.gutterSpecs[at];return Ut(a,fe,a,It,Ft.className,y),Jt(y)}}}function _l(a,y){return nu(a,y,"gutterClick",!0)}function ru(a,y){Xi(a.display,y)||Hu(a,y)||gt(a,y,"contextmenu")||he||a.display.input.onContextMenu(y)}function Hu(a,y){return Lt(a,"gutterContextMenu")?nu(a,y,"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 y=a.optionHandlers;function fe(de,xe,Fe,Je){a.defaults[de]=xe,Fe&&(y[de]=Je?function(it,at,ht){ht!=Ms&&Fe(it,at,ht)}:Fe)}a.defineOption=fe,a.Init=Ms,fe("value","",function(de,xe){return de.setValue(xe)},!0),fe("mode",null,function(de,xe){de.doc.modeOption=xe,aa(de)},!0),fe("indentUnit",2,aa,!0),fe("indentWithTabs",!1),fe("smartIndent",!0),fe("tabSize",4,function(de){ga(de),pa(de),Co(de)},!0),fe("lineSeparator",null,function(de,xe){if(de.doc.lineSep=xe,!!xe){var Fe=[],Je=de.doc.first;de.doc.iter(function(at){for(var ht=0;;){var It=at.text.indexOf(xe,ht);if(It==-1)break;ht=It+xe.length,Fe.push(Et(Je,It))}Je++});for(var it=Fe.length-1;it>=0;it--)Ls(de.doc,xe,Fe[it],Et(Fe[it].line,Fe[it].ch+xe.length))}}),fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,xe,Fe){de.state.specialChars=new RegExp(xe.source+(xe.test(" ")?"":"| "),"g"),Fe!=Ms&&de.refresh()}),fe("specialCharPlaceholder",Vr,function(de){return de.refresh()},!0),fe("electricChars",!0),fe("inputStyle",oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),fe("spellcheck",!1,function(de,xe){return de.getInputField().spellcheck=xe},!0),fe("autocorrect",!1,function(de,xe){return de.getInputField().autocorrect=xe},!0),fe("autocapitalize",!1,function(de,xe){return de.getInputField().autocapitalize=xe},!0),fe("rtlMoveVisually",!me),fe("wholeLineUpdateBefore",!0),fe("theme","default",function(de){iu(de),Qn(de)},!0),fe("keyMap","default",function(de,xe,Fe){var Je=tl(xe),it=Fe!=Ms&&tl(Fe);it&&it.detach&&it.detach(de,Je),Je.attach&&Je.attach(de,it||null)}),fe("extraKeys",null),fe("configureMouse",null),fe("lineWrapping",!1,Gu,!0),fe("gutters",[],function(de,xe){de.display.gutterSpecs=oi(xe,de.options.lineNumbers),Qn(de)},!0),fe("fixedGutter",!0,function(de,xe){de.display.gutters.style.left=xe?Ia(de.display)+"px":"0",de.refresh()},!0),fe("coverGutterNextToScrollbar",!1,function(de){return _o(de)},!0),fe("scrollbarStyle","native",function(de){va(de),_o(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),fe("lineNumbers",!1,function(de,xe){de.display.gutterSpecs=oi(de.options.gutters,xe),Qn(de)},!0),fe("firstLineNumber",1,Qn,!0),fe("lineNumberFormatter",function(de){return de},Qn,!0),fe("showCursorWhenSelecting",!1,Oa,!0),fe("resetSelectionOnContextMenu",!0),fe("lineWiseCopyCut",!0),fe("pasteLinesPerSelection",!0),fe("selectionsMayTouch",!1),fe("readOnly",!1,function(de,xe){xe=="nocursor"&&(Ga(de),de.display.input.blur()),de.display.input.readOnlyChanged(xe)}),fe("screenReaderLabel",null,function(de,xe){xe=xe===""?null:xe,de.display.input.screenReaderLabelChanged(xe)}),fe("disableInput",!1,function(de,xe){xe||de.display.input.reset()},!0),fe("dragDrop",!0,Zu),fe("allowDropFileTypes",null),fe("cursorBlinkRate",530),fe("cursorScrollMargin",0),fe("cursorHeight",1,Oa,!0),fe("singleCursorHeightPerLine",!0,Oa,!0),fe("workTime",100),fe("workDelay",100),fe("flattenSpans",!0,ga,!0),fe("addModeClass",!1,ga,!0),fe("pollInterval",100),fe("undoDepth",200,function(de,xe){return de.doc.history.undoDepth=xe}),fe("historyEventDelay",1250),fe("viewportMargin",10,function(de){return de.refresh()},!0),fe("maxHighlightLength",1e4,ga,!0),fe("moveInputWithCursor",!0,function(de,xe){xe||de.display.input.resetPosition()}),fe("tabindex",null,function(de,xe){return de.display.input.getField().tabIndex=xe||""}),fe("autofocus",null),fe("direction","ltr",function(de,xe){return de.doc.setDirection(xe)},!0),fe("phrases",null)}function Zu(a,y,fe){var de=fe&&fe!=Ms;if(!y!=!de){var xe=a.display.dragFunctions,Fe=y?vt:Zt;Fe(a.display.scroller,"dragstart",xe.start),Fe(a.display.scroller,"dragenter",xe.enter),Fe(a.display.scroller,"dragover",xe.over),Fe(a.display.scroller,"dragleave",xe.leave),Fe(a.display.scroller,"drop",xe.drop)}}function Gu(a){a.options.lineWrapping?(ot(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ke(a.display.wrapper,"CodeMirror-wrap"),dr(a)),fs(a),Co(a),pa(a),setTimeout(function(){return _o(a)},100)}function so(a,y){var fe=this;if(!(this instanceof so))return new so(a,y);this.options=y=y?ut(y):{},ut(ou,y,!1);var de=y.value;typeof de=="string"?de=new Qo(de,y.mode,null,y.lineSeparator,y.direction):y.mode&&(de.modeOption=y.mode),this.doc=de;var xe=new so.inputStyles[y.inputStyle](this),Fe=this.display=new Fi(a,de,xe,y);Fe.wrapper.CodeMirror=this,iu(this),y.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 ze,keySeq:null,specialChars:null},y.autofocus&&!oe&&Fe.input.focus(),se&&te<11&&setTimeout(function(){return fe.display.input.reset(!0)},20),Ku(this),xu(),Oo(this),this.curOp.forceUpdate=!0,Ba(this,de),y.autofocus&&!oe||this.hasFocus()?setTimeout(function(){fe.hasFocus()&&!fe.state.focused&&Ea(fe)},20):Ga(this);for(var Je in rl)rl.hasOwnProperty(Je)&&rl[Je](this,y[Je],Ms);Wi(this),y.finishInit&&y.finishInit(this);for(var it=0;it<bl.length;++it)bl[it](this);fa(this),le&&y.lineWrapping&&getComputedStyle(Fe.lineDiv).textRendering=="optimizelegibility"&&(Fe.lineDiv.style.textRendering="auto")}so.defaults=ou,so.optionHandlers=rl;function Ku(a){var y=a.display;vt(y.scroller,"mousedown",Yn(a,eu)),se&&te<11?vt(y.scroller,"dblclick",Yn(a,function(at){if(!gt(a,at)){var ht=da(a,at);if(!(!ht||_l(a,at)||Xi(a.display,at))){un(at);var It=a.findWordAt(ht);Va(a.doc,It.anchor,It.head)}}})):vt(y.scroller,"dblclick",function(at){return gt(a,at)||un(at)}),vt(y.scroller,"contextmenu",function(at){return ru(a,at)}),vt(y.input.getField(),"contextmenu",function(at){y.scroller.contains(at.target)||ru(a,at)});var fe,de={end:0};function xe(){y.activeTouch&&(fe=setTimeout(function(){return y.activeTouch=null},1e3),de=y.activeTouch,de.end=+new Date)}function Fe(at){if(at.touches.length!=1)return!1;var ht=at.touches[0];return ht.radiusX<=1&&ht.radiusY<=1}function Je(at,ht){if(ht.left==null)return!0;var It=ht.left-at.left,Ft=ht.top-at.top;return It*It+Ft*Ft>20*20}vt(y.scroller,"touchstart",function(at){if(!gt(a,at)&&!Fe(at)&&!_l(a,at)){y.input.ensurePolled(),clearTimeout(fe);var ht=+new Date;y.activeTouch={start:ht,moved:!1,prev:ht-de.end<=300?de:null},at.touches.length==1&&(y.activeTouch.left=at.touches[0].pageX,y.activeTouch.top=at.touches[0].pageY)}}),vt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),vt(y.scroller,"touchend",function(at){var ht=y.activeTouch;if(ht&&!Xi(y,at)&&ht.left!=null&&!ht.moved&&new Date-ht.start<300){var It=a.coordsChar(y.activeTouch,"page"),Ft;!ht.prev||Je(ht,ht.prev)?Ft=new Sr(It,It):!ht.prev.prev||Je(ht,ht.prev.prev)?Ft=a.findWordAt(It):Ft=new Sr(Et(It.line,0),Vt(a.doc,Et(It.line+1,0))),a.setSelection(Ft.anchor,Ft.head),a.focus(),un(at)}xe()}),vt(y.scroller,"touchcancel",xe),vt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(ia(a,y.scroller.scrollTop),ma(a,y.scroller.scrollLeft,!0),Ut(a,"scroll",a))}),vt(y.scroller,"mousewheel",function(at){return Zi(a,at)}),vt(y.scroller,"DOMMouseScroll",function(at){return Zi(a,at)}),vt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(at){gt(a,at)||Ln(at)},over:function(at){gt(a,at)||(wu(a,at),Ln(at))},start:function(at){return Su(a,at)},drop:Yn(a,bu),leave:function(at){gt(a,at)||zl(a)}};var it=y.input.getField();vt(it,"keyup",function(at){return Ql.call(a,at)}),vt(it,"keydown",Yn(a,Jl)),vt(it,"keypress",Yn(a,$l)),vt(it,"focus",function(at){return Ea(a,at)}),vt(it,"blur",function(at){return Ga(a,at)})}var bl=[];so.defineInitHook=function(a){return bl.push(a)};function Ys(a,y,fe,de){var xe=a.doc,Fe;fe==null&&(fe="add"),fe=="smart"&&(xe.mode.indent?Fe=pr(a,y).state:fe="prev");var Je=a.options.tabSize,it=Nt(xe,y),at=Ge(it.text,null,Je);it.stateAfter&&(it.stateAfter=null);var ht=it.text.match(/^\s*/)[0],It;if(!de&&!/\S/.test(it.text))It=0,fe="not";else if(fe=="smart"&&(It=xe.mode.indent(Fe,it.text.slice(ht.length),it.text),It==nt||It>150)){if(!de)return;fe="prev"}fe=="prev"?y>xe.first?It=Ge(Nt(xe,y-1).text,null,Je):It=0:fe=="add"?It=at+a.options.indentUnit:fe=="subtract"?It=at-a.options.indentUnit:typeof fe=="number"&&(It=at+fe),It=Math.max(0,It);var Ft="",ln=0;if(a.options.indentWithTabs)for(var tn=Math.floor(It/Je);tn;--tn)ln+=Je,Ft+=" ";if(ln<It&&(Ft+=Mt(It-ln)),Ft!=ht)return Ls(xe,Ft,Et(y,0),Et(y,ht.length),"+input"),it.stateAfter=null,!0;for(var kn=0;kn<xe.sel.ranges.length;kn++){var Hn=xe.sel.ranges[kn];if(Hn.head.line==y&&Hn.head.ch<ht.length){var qn=Et(y,ht.length);Ps(xe,kn,new Sr(qn,qn));break}}}var Ta=null;function il(a){Ta=a}function Sl(a,y,fe,de,xe){var Fe=a.doc;a.display.shift=!1,de||(de=Fe.sel);var Je=+new Date-200,it=xe=="paste"||a.state.pasteIncoming>Je,at=rr(y),ht=null;if(it&&de.ranges.length>1)if(Ta&&Ta.text.join(`
`)==y){if(de.ranges.length%Ta.text.length==0){ht=[];for(var It=0;It<Ta.text.length;It++)ht.push(Fe.splitLines(Ta.text[It]))}}else at.length==de.ranges.length&&a.options.pasteLinesPerSelection&&(ht=yt(at,function(sr){return[sr]}));for(var Ft=a.curOp.updateInput,ln=de.ranges.length-1;ln>=0;ln--){var tn=de.ranges[ln],kn=tn.from(),Hn=tn.to();tn.empty()&&(fe&&fe>0?kn=Et(kn.line,kn.ch-fe):a.state.overwrite&&!it?Hn=Et(Hn.line,Math.min(Nt(Fe,Hn.line).text.length,Hn.ch+xt(at).length)):it&&Ta&&Ta.lineWise&&Ta.text.join(`
`)==at.join(`
`)&&(kn=Hn=Et(kn.line,0)));var qn={from:kn,to:Hn,text:ht?ht[ln%ht.length]:at,origin:xe||(it?"paste":a.state.cutIncoming>Je?"cut":"+input")};ks(a.doc,qn),Ni(a,"inputRead",a,qn)}y&&!it&&su(a,y),La(a),a.curOp.updateInput<2&&(a.curOp.updateInput=Ft),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function au(a,y){var fe=a.clipboardData&&a.clipboardData.getData("Text");if(fe)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&St(y,function(){return Sl(y,fe,0,null,"paste")}),!0}function su(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var fe=a.doc.sel,de=fe.ranges.length-1;de>=0;de--){var xe=fe.ranges[de];if(!(xe.head.ch>100||de&&fe.ranges[de-1].head.line==xe.head.line)){var Fe=a.getModeAt(xe.head),Je=!1;if(Fe.electricChars){for(var it=0;it<Fe.electricChars.length;it++)if(y.indexOf(Fe.electricChars.charAt(it))>-1){Je=Ys(a,xe.head.line,"smart");break}}else Fe.electricInput&&Fe.electricInput.test(Nt(a.doc,xe.head.line).text.slice(0,xe.head.ch))&&(Je=Ys(a,xe.head.line,"smart"));Je&&Ni(a,"electricInput",a,xe.head.line)}}}function lu(a){for(var y=[],fe=[],de=0;de<a.doc.sel.ranges.length;de++){var xe=a.doc.sel.ranges[de].head.line,Fe={anchor:Et(xe,0),head:Et(xe+1,0)};fe.push(Fe),y.push(a.getRange(Fe.anchor,Fe.head))}return{text:y,ranges:fe}}function uu(a,y,fe,de){a.setAttribute("autocorrect",fe?"":"off"),a.setAttribute("autocapitalize",de?"":"off"),a.setAttribute("spellcheck",!!y)}function cu(){var a=Oe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Oe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return le?a.style.width="1000px":a.setAttribute("wrap","off"),re&&(a.style.border="1px solid black"),uu(a),y}function Vu(a){var y=a.optionHandlers,fe=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(de,xe){var Fe=this.options,Je=Fe[de];Fe[de]==xe&&de!="mode"||(Fe[de]=xe,y.hasOwnProperty(de)&&Yn(this,y[de])(this,xe,Je),Ut(this,"optionChange",this,de))},getOption:function(de){return this.options[de]},getDoc:function(){return this.doc},addKeyMap:function(de,xe){this.state.keyMaps[xe?"push":"unshift"](tl(de))},removeKeyMap:function(de){for(var xe=this.state.keyMaps,Fe=0;Fe<xe.length;++Fe)if(xe[Fe]==de||xe[Fe].name==de)return xe.splice(Fe,1),!0},addOverlay:Tn(function(de,xe){var Fe=de.token?de:a.getMode(this.options,de);if(Fe.startState)throw new Error("Overlays may not be stateful.");bt(this.state.overlays,{mode:Fe,modeSpec:de,opaque:xe&&xe.opaque,priority:xe&&xe.priority||0},function(Je){return Je.priority}),this.state.modeGen++,Co(this)}),removeOverlay:Tn(function(de){for(var xe=this.state.overlays,Fe=0;Fe<xe.length;++Fe){var Je=xe[Fe].modeSpec;if(Je==de||typeof de=="string"&&Je.name==de){xe.splice(Fe,1),this.state.modeGen++,Co(this);return}}}),indentLine:Tn(function(de,xe,Fe){typeof xe!="string"&&typeof xe!="number"&&(xe==null?xe=this.options.smartIndent?"smart":"prev":xe=xe?"add":"subtract"),dn(this.doc,de)&&Ys(this,de,xe,Fe)}),indentSelection:Tn(function(de){for(var xe=this.doc.sel.ranges,Fe=-1,Je=0;Je<xe.length;Je++){var it=xe[Je];if(it.empty())it.head.line>Fe&&(Ys(this,it.head.line,de,!0),Fe=it.head.line,Je==this.doc.sel.primIndex&&La(this));else{var at=it.from(),ht=it.to(),It=Math.max(Fe,at.line);Fe=Math.min(this.lastLine(),ht.line-(ht.ch?0:1))+1;for(var Ft=It;Ft<Fe;++Ft)Ys(this,Ft,de);var ln=this.doc.sel.ranges;at.ch==0&&xe.length==ln.length&&ln[Je].from().ch>0&&Ps(this.doc,Je,new Sr(at,ln[Je].to()),et)}}}),getTokenAt:function(de,xe){return Tr(this,de,xe)},getLineTokens:function(de,xe){return Tr(this,Et(de),xe,!0)},getTokenTypeAt:function(de){de=Vt(this.doc,de);var xe=cr(this,Nt(this.doc,de.line)),Fe=0,Je=(xe.length-1)/2,it=de.ch,at;if(it==0)at=xe[2];else for(;;){var ht=Fe+Je>>1;if((ht?xe[ht*2-1]:0)>=it)Je=ht;else if(xe[ht*2+1]<it)Fe=ht+1;else{at=xe[ht*2+2];break}}var It=at?at.indexOf("overlay "):-1;return It<0?at:It==0?null:at.slice(0,It-1)},getModeAt:function(de){var xe=this.doc.mode;return xe.innerMode?a.innerMode(xe,this.getTokenAt(de).state).mode:xe},getHelper:function(de,xe){return this.getHelpers(de,xe)[0]},getHelpers:function(de,xe){var Fe=[];if(!fe.hasOwnProperty(xe))return Fe;var Je=fe[xe],it=this.getModeAt(de);if(typeof it[xe]=="string")Je[it[xe]]&&Fe.push(Je[it[xe]]);else if(it[xe])for(var at=0;at<it[xe].length;at++){var ht=Je[it[xe][at]];ht&&Fe.push(ht)}else it.helperType&&Je[it.helperType]?Fe.push(Je[it.helperType]):Je[it.name]&&Fe.push(Je[it.name]);for(var It=0;It<Je._global.length;It++){var Ft=Je._global[It];Ft.pred(it,this)&&Ve(Fe,Ft.val)==-1&&Fe.push(Ft.val)}return Fe},getStateAfter:function(de,xe){var Fe=this.doc;return de=Cn(Fe,de==null?Fe.first+Fe.size-1:de),pr(this,de+1,xe).state},cursorCoords:function(de,xe){var Fe,Je=this.doc.sel.primary();return de==null?Fe=Je.head:typeof de=="object"?Fe=Vt(this.doc,de):Fe=de?Je.from():Je.to(),qi(this,Fe,xe||"page")},charCoords:function(de,xe){return Ao(this,Vt(this.doc,de),xe||"page")},coordsChar:function(de,xe){return de=ua(this,de,xe||"page"),no(this,de.left,de.top)},lineAtHeight:function(de,xe){return de=ua(this,{top:de,left:0},xe||"page").top,wt(this.doc,de+this.display.viewOffset)},heightAtLine:function(de,xe,Fe){var Je=!1,it;if(typeof de=="number"){var at=this.doc.first+this.doc.size-1;de<this.doc.first?de=this.doc.first:de>at&&(de=at,Je=!0),it=Nt(this.doc,de)}else it=de;return wa(this,it,{top:0,left:0},xe||"page",Fe||Je).top+(Je?this.doc.height-$n(it):0)},defaultTextHeight:function(){return vo(this.display)},defaultCharWidth:function(){return Bo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(de,xe,Fe,Je,it){var at=this.display;de=qi(this,Vt(this.doc,de));var ht=de.bottom,It=de.left;if(xe.style.position="absolute",xe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(xe),at.sizer.appendChild(xe),Je=="over")ht=de.top;else if(Je=="above"||Je=="near"){var Ft=Math.max(at.wrapper.clientHeight,this.doc.height),ln=Math.max(at.sizer.clientWidth,at.lineSpace.clientWidth);(Je=="above"||de.bottom+xe.offsetHeight>Ft)&&de.top>xe.offsetHeight?ht=de.top-xe.offsetHeight:de.bottom+xe.offsetHeight<=Ft&&(ht=de.bottom),It+xe.offsetWidth>ln&&(It=ln-xe.offsetWidth)}xe.style.top=ht+"px",xe.style.left=xe.style.right="",it=="right"?(It=at.sizer.clientWidth-xe.offsetWidth,xe.style.right="0px"):(it=="left"?It=0:it=="middle"&&(It=(at.sizer.clientWidth-xe.offsetWidth)/2),xe.style.left=It+"px"),Fe&&ws(this,{left:It,top:ht,right:It+xe.offsetWidth,bottom:ht+xe.offsetHeight})},triggerOnKeyDown:Tn(Jl),triggerOnKeyPress:Tn($l),triggerOnKeyUp:Ql,triggerOnMouseDown:Tn(eu),execCommand:function(de){if(Zs.hasOwnProperty(de))return Zs[de].call(null,this)},triggerElectric:Tn(function(de){su(this,de)}),findPosH:function(de,xe,Fe,Je){var it=1;xe<0&&(it=-1,xe=-xe);for(var at=Vt(this.doc,de),ht=0;ht<xe&&(at=wl(this.doc,at,it,Fe,Je),!at.hitSide);++ht);return at},moveH:Tn(function(de,xe){var Fe=this;this.extendSelectionsBy(function(Je){return Fe.display.shift||Fe.doc.extend||Je.empty()?wl(Fe.doc,Je.head,de,xe,Fe.options.rtlMoveVisually):de<0?Je.from():Je.to()},ct)}),deleteH:Tn(function(de,xe){var Fe=this.doc.sel,Je=this.doc;Fe.somethingSelected()?Je.replaceSelection("",null,"+delete"):Ds(this,function(it){var at=wl(Je,it.head,de,xe,!1);return de<0?{from:at,to:it.head}:{from:it.head,to:at}})}),findPosV:function(de,xe,Fe,Je){var it=1,at=Je;xe<0&&(it=-1,xe=-xe);for(var ht=Vt(this.doc,de),It=0;It<xe;++It){var Ft=qi(this,ht,"div");if(at==null?at=Ft.left:Ft.left=at,ht=du(this,Ft,it,Fe),ht.hitSide)break}return ht},moveV:Tn(function(de,xe){var Fe=this,Je=this.doc,it=[],at=!this.display.shift&&!Je.extend&&Je.sel.somethingSelected();if(Je.extendSelectionsBy(function(It){if(at)return de<0?It.from():It.to();var Ft=qi(Fe,It.head,"div");It.goalColumn!=null&&(Ft.left=It.goalColumn),it.push(Ft.left);var ln=du(Fe,Ft,de,xe);return xe=="page"&&It==Je.sel.primary()&&rs(Fe,Ao(Fe,ln,"div").top-Ft.top),ln},ct),it.length)for(var ht=0;ht<Je.sel.ranges.length;ht++)Je.sel.ranges[ht].goalColumn=it[ht]}),findWordAt:function(de){var xe=this.doc,Fe=Nt(xe,de.line).text,Je=de.ch,it=de.ch;if(Fe){var at=this.getHelper(de,"wordChars");(de.sticky=="before"||it==Fe.length)&&Je?--Je:++it;for(var ht=Fe.charAt(Je),It=Ke(ht,at)?function(Ft){return Ke(Ft,at)}:/\s/.test(ht)?function(Ft){return/\s/.test(Ft)}:function(Ft){return!/\s/.test(Ft)&&!Ke(Ft)};Je>0&&It(Fe.charAt(Je-1));)--Je;for(;it<Fe.length&&It(Fe.charAt(it));)++it}return new Sr(Et(de.line,Je),Et(de.line,it))},toggleOverwrite:function(de){de!=null&&de==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ot(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),Ut(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Xe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Tn(function(de,xe){Dr(this,de,xe)}),getScrollInfo:function(){var de=this.display.scroller;return{left:de.scrollLeft,top:de.scrollTop,height:de.scrollHeight-zi(this)-this.display.barHeight,width:de.scrollWidth-zi(this)-this.display.barWidth,clientHeight:xo(this),clientWidth:Ho(this)}},scrollIntoView:Tn(function(de,xe){de==null?(de={from:this.doc.sel.primary().head,to:null},xe==null&&(xe=this.options.cursorScrollMargin)):typeof de=="number"?de={from:Et(de,0),to:null}:de.from==null&&(de={from:de,to:null}),de.to||(de.to=de.from),de.margin=xe||0,de.from.line!=null?xs(this,de):vs(this,de.from,de.to,de.margin)}),setSize:Tn(function(de,xe){var Fe=this,Je=function(at){return typeof at=="number"||/^\d+$/.test(String(at))?at+"px":at};de!=null&&(this.display.wrapper.style.width=Je(de)),xe!=null&&(this.display.wrapper.style.height=Je(xe)),this.options.lineWrapping&&Ra(this);var it=this.display.viewFrom;this.doc.iter(it,this.display.viewTo,function(at){if(at.widgets){for(var ht=0;ht<at.widgets.length;ht++)if(at.widgets[ht].noHScroll){Eo(Fe,it,"widget");break}}++it}),this.curOp.forceUpdate=!0,Ut(this,"refresh",this)}),operation:function(de){return St(this,de)},startOperation:function(){return Oo(this)},endOperation:function(){return fa(this)},refresh:Tn(function(){var de=this.display.cachedTextHeight;Co(this),this.curOp.forceUpdate=!0,pa(this),Dr(this,this.doc.scrollLeft,this.doc.scrollTop),Hi(this.display),(de==null||Math.abs(de-vo(this.display))>.5||this.options.lineWrapping)&&fs(this),Ut(this,"refresh",this)}),swapDoc:Tn(function(de){var xe=this.doc;return xe.cm=null,this.state.selectingText&&this.state.selectingText(),Ba(this,de),pa(this),this.display.input.reset(),Dr(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,Ni(this,"swapDoc",this,xe),xe}),phrase:function(de){var xe=this.options.phrases;return xe&&Object.prototype.hasOwnProperty.call(xe,de)?xe[de]:de},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},qt(a),a.registerHelper=function(de,xe,Fe){fe.hasOwnProperty(de)||(fe[de]=a[de]={_global:[]}),fe[de][xe]=Fe},a.registerGlobalHelper=function(de,xe,Fe,Je){a.registerHelper(de,xe,Je),fe[de]._global.push({pred:Fe,val:Je})}}function wl(a,y,fe,de,xe){var Fe=y,Je=fe,it=Nt(a,y.line),at=xe&&a.direction=="rtl"?-fe:fe;function ht(){var gr=y.line+at;return gr<a.first||gr>=a.first+a.size?!1:(y=new Et(gr,y.ch,y.sticky),it=Nt(a,gr))}function It(gr){var lr;if(de=="codepoint"){var wr=it.text.charCodeAt(y.ch+(de>0?0:-1));isNaN(wr)?lr=null:lr=new Et(y.line,Math.max(0,Math.min(it.text.length,y.ch+fe*(wr>=55296&&wr<56320?2:1))),-fe)}else xe?lr=Au(a.cm,it,y,fe):lr=ml(it,y,fe);if(lr==null)if(!gr&&ht())y=vl(xe,a.cm,it,y.line,at);else return!1;else y=lr;return!0}if(de=="char"||de=="codepoint")It();else if(de=="column")It(!0);else if(de=="word"||de=="group")for(var Ft=null,ln=de=="group",tn=a.cm&&a.cm.getHelper(y,"wordChars"),kn=!0;!(fe<0&&!It(!kn));kn=!1){var Hn=it.text.charAt(y.ch)||`
`,qn=Ke(Hn,tn)?"w":ln&&Hn==`
`?"n":!ln||/\s/.test(Hn)?null:"p";if(ln&&!kn&&!qn&&(qn="s"),Ft&&Ft!=qn){fe<0&&(fe=1,It(),y.sticky="after");break}if(qn&&(Ft=qn),fe>0&&!It(!kn))break}var sr=Qs(a,y,Fe,Je,!0);return on(Fe,sr)&&(sr.hitSide=!0),sr}function du(a,y,fe,de){var xe=a.doc,Fe=y.left,Je;if(de=="page"){var it=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),at=Math.max(it-.5*vo(a.display),3);Je=(fe>0?y.bottom:y.top)+fe*at}else de=="line"&&(Je=fe>0?y.bottom+3:y.top-3);for(var ht;ht=no(a,Fe,Je),!!ht.outside;){if(fe<0?Je<=0:Je>=xe.height){ht.hitSide=!0;break}Je+=fe*5}return ht}var Vi=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ze,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vi.prototype.init=function(a){var y=this,fe=this,de=fe.cm,xe=fe.div=a.lineDiv;uu(xe,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Fe(it){for(var at=it.target;at;at=at.parentNode){if(at==xe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(at.className))break}return!1}vt(xe,"paste",function(it){!Fe(it)||gt(de,it)||au(it,de)||te<=11&&setTimeout(Yn(de,function(){return y.updateFromDOM()}),20)}),vt(xe,"compositionstart",function(it){y.composing={data:it.data,done:!1}}),vt(xe,"compositionupdate",function(it){y.composing||(y.composing={data:it.data,done:!1})}),vt(xe,"compositionend",function(it){y.composing&&(it.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),vt(xe,"touchstart",function(){return fe.forceCompositionEnd()}),vt(xe,"input",function(){y.composing||y.readFromDOMSoon()});function Je(it){if(!(!Fe(it)||gt(de,it))){if(de.somethingSelected())il({lineWise:!1,text:de.getSelections()}),it.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var at=lu(de);il({lineWise:!0,text:at.text}),it.type=="cut"&&de.operation(function(){de.setSelections(at.ranges,0,et),de.replaceSelection("",null,"cut")})}else return;if(it.clipboardData){it.clipboardData.clearData();var ht=Ta.text.join(`
`);if(it.clipboardData.setData("Text",ht),it.clipboardData.getData("Text")==ht){it.preventDefault();return}}var It=cu(),Ft=It.firstChild;de.display.lineSpace.insertBefore(It,de.display.lineSpace.firstChild),Ft.value=Ta.text.join(`
`);var ln=document.activeElement;rt(Ft),setTimeout(function(){de.display.lineSpace.removeChild(It),ln.focus(),ln==xe&&fe.showPrimarySelection()},50)}}vt(xe,"copy",Je),vt(xe,"cut",Je)},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,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Vi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vi.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,fe=y.doc.sel.primary(),de=fe.from(),xe=fe.to();if(y.display.viewTo==y.display.viewFrom||de.line>=y.display.viewTo||xe.line<y.display.viewFrom){a.removeAllRanges();return}var Fe=ol(y,a.anchorNode,a.anchorOffset),Je=ol(y,a.focusNode,a.focusOffset);if(!(Fe&&!Fe.bad&&Je&&!Je.bad&&Ht(Wt(Fe,Je),de)==0&&Ht(yn(Fe,Je),xe)==0)){var it=y.display.view,at=de.line>=y.display.viewFrom&&fu(y,de)||{node:it[0].measure.map[2],offset:0},ht=xe.line<y.display.viewTo&&fu(y,xe);if(!ht){var It=it[it.length-1].measure,Ft=It.maps?It.maps[It.maps.length-1]:It.map;ht={node:Ft[Ft.length-1],offset:Ft[Ft.length-2]-Ft[Ft.length-3]}}if(!at||!ht){a.removeAllRanges();return}var ln=a.rangeCount&&a.getRangeAt(0),tn;try{tn=Pe(at.node,at.offset,ht.offset,ht.node)}catch(kn){}tn&&(!ce&&y.state.focused?(a.collapse(at.node,at.offset),tn.collapsed||(a.removeAllRanges(),a.addRange(tn))):(a.removeAllRanges(),a.addRange(tn)),ln&&a.anchorNode==null?a.addRange(ln):ce&&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){Ee(this.cm.display.cursorDiv,a.cursors),Ee(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 y=a.getRangeAt(0).commonAncestorContainer;return Qe(this.div,y)},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():St(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},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(),y=this.cm;if(ae&&ne&&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 fe=ol(y,a.anchorNode,a.anchorOffset),de=ol(y,a.focusNode,a.focusOffset);fe&&de&&St(y,function(){jo(y.doc,mi(fe,de),et),(fe.bad||de.bad)&&(y.curOp.selectionChanged=!0)})}}},Vi.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,fe=a.doc.sel.primary(),de=fe.from(),xe=fe.to();if(de.ch==0&&de.line>a.firstLine()&&(de=Et(de.line-1,Nt(a.doc,de.line-1).length)),xe.ch==Nt(a.doc,xe.line).text.length&&xe.line<a.lastLine()&&(xe=Et(xe.line+1,0)),de.line<y.viewFrom||xe.line>y.viewTo-1)return!1;var Fe,Je,it;de.line==y.viewFrom||(Fe=go(a,de.line))==0?(Je=At(y.view[0].line),it=y.view[0].node):(Je=At(y.view[Fe].line),it=y.view[Fe-1].node.nextSibling);var at=go(a,xe.line),ht,It;if(at==y.view.length-1?(ht=y.viewTo-1,It=y.lineDiv.lastChild):(ht=At(y.view[at+1].line)-1,It=y.view[at+1].node.previousSibling),!it)return!1;for(var Ft=a.doc.splitLines(Xu(a,it,It,Je,ht)),ln=nn(a.doc,Et(Je,0),Et(ht,Nt(a.doc,ht).text.length));Ft.length>1&&ln.length>1;)if(xt(Ft)==xt(ln))Ft.pop(),ln.pop(),ht--;else if(Ft[0]==ln[0])Ft.shift(),ln.shift(),Je++;else break;for(var tn=0,kn=0,Hn=Ft[0],qn=ln[0],sr=Math.min(Hn.length,qn.length);tn<sr&&Hn.charCodeAt(tn)==qn.charCodeAt(tn);)++tn;for(var gr=xt(Ft),lr=xt(ln),wr=Math.min(gr.length-(Ft.length==1?tn:0),lr.length-(ln.length==1?tn:0));kn<wr&&gr.charCodeAt(gr.length-kn-1)==lr.charCodeAt(lr.length-kn-1);)++kn;if(Ft.length==1&&ln.length==1&&Je==de.line)for(;tn&&tn>de.ch&&gr.charCodeAt(gr.length-kn-1)==lr.charCodeAt(lr.length-kn-1);)tn--,kn++;Ft[Ft.length-1]=gr.slice(0,gr.length-kn).replace(/^\u200b+/,""),Ft[0]=Ft[0].slice(tn).replace(/\u200b+$/,"");var Qr=Et(Je,tn),zr=Et(ht,ln.length?xt(ln).length-kn:0);if(Ft.length>1||Ft[0]||Ht(Qr,zr))return Ls(a.doc,Ft,Qr,zr,"+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())&&St(this.cm,function(){return Co(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()||Yn(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,y){var fe=Yo(a,y.line);if(!fe||fe.hidden)return null;var de=Nt(a.doc,y.line),xe=Ki(fe,de,y.line),Fe=Pt(de,a.doc.direction),Je="left";if(Fe){var it=tt(Fe,y.ch);Je=it%2?"right":"left"}var at=qa(xe.map,y.ch,Je);return at.offset=at.collapse=="right"?at.end:at.start,at}function Yu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Rs(a,y){return y&&(a.bad=!0),a}function Xu(a,y,fe,de,xe){var Fe="",Je=!1,it=a.doc.lineSeparator(),at=!1;function ht(tn){return function(kn){return kn.id==tn}}function It(){Je&&(Fe+=it,at&&(Fe+=it),Je=at=!1)}function Ft(tn){tn&&(It(),Fe+=tn)}function ln(tn){if(tn.nodeType==1){var kn=tn.getAttribute("cm-text");if(kn){Ft(kn);return}var Hn=tn.getAttribute("cm-marker"),qn;if(Hn){var sr=a.findMarks(Et(de,0),Et(xe+1,0),ht(+Hn));sr.length&&(qn=sr[0].find(0))&&Ft(nn(a.doc,qn.from,qn.to).join(it));return}if(tn.getAttribute("contenteditable")=="false")return;var gr=/^(pre|div|p|li|table|br)$/i.test(tn.nodeName);if(!/^br$/i.test(tn.nodeName)&&tn.textContent.length==0)return;gr&&It();for(var lr=0;lr<tn.childNodes.length;lr++)ln(tn.childNodes[lr]);/^(pre|p)$/i.test(tn.nodeName)&&(at=!0),gr&&(Je=!0)}else tn.nodeType==3&&Ft(tn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;ln(y),y!=fe;)y=y.nextSibling,at=!1;return Fe}function ol(a,y,fe){var de;if(y==a.display.lineDiv){if(de=a.display.lineDiv.childNodes[fe],!de)return Rs(a.clipPos(Et(a.display.viewTo-1)),!0);y=null,fe=0}else for(de=y;;de=de.parentNode){if(!de||de==a.display.lineDiv)return null;if(de.parentNode&&de.parentNode==a.display.lineDiv)break}for(var xe=0;xe<a.display.view.length;xe++){var Fe=a.display.view[xe];if(Fe.node==de)return qu(Fe,y,fe)}}function qu(a,y,fe){var de=a.text.firstChild,xe=!1;if(!y||!Qe(de,y))return Rs(Et(At(a.line),0),!0);if(y==de&&(xe=!0,y=de.childNodes[fe],fe=0,!y)){var Fe=a.rest?xt(a.rest):a.line;return Rs(Et(At(Fe),Fe.text.length),xe)}var Je=y.nodeType==3?y:null,it=y;for(!Je&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(Je=y.firstChild,fe&&(fe=Je.nodeValue.length));it.parentNode!=de;)it=it.parentNode;var at=a.measure,ht=at.maps;function It(qn,sr,gr){for(var lr=-1;lr<(ht?ht.length:0);lr++)for(var wr=lr<0?at.map:ht[lr],Qr=0;Qr<wr.length;Qr+=3){var zr=wr[Qr+2];if(zr==qn||zr==sr){var Li=At(lr<0?a.line:a.rest[lr]),eo=wr[Qr]+gr;return(gr<0||zr!=qn)&&(eo=wr[Qr+(gr?1:0)]),Et(Li,eo)}}}var Ft=It(Je,it,fe);if(Ft)return Rs(Ft,xe);for(var ln=it.nextSibling,tn=Je?Je.nodeValue.length-fe:0;ln;ln=ln.nextSibling){if(Ft=It(ln,ln.firstChild,0),Ft)return Rs(Et(Ft.line,Ft.ch-tn),xe);tn+=ln.textContent.length}for(var kn=it.previousSibling,Hn=fe;kn;kn=kn.previousSibling){if(Ft=It(kn,kn.firstChild,-1),Ft)return Rs(Et(Ft.line,Ft.ch+Hn),xe);Hn+=kn.textContent.length}}var yo=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ze,this.hasSelection=!1,this.composing=null};yo.prototype.init=function(a){var y=this,fe=this,de=this.cm;this.createField(a);var xe=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),re&&(xe.style.width="0px"),vt(xe,"input",function(){se&&te>=9&&y.hasSelection&&(y.hasSelection=null),fe.poll()}),vt(xe,"paste",function(Je){gt(de,Je)||au(Je,de)||(de.state.pasteIncoming=+new Date,fe.fastPoll())});function Fe(Je){if(!gt(de,Je)){if(de.somethingSelected())il({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var it=lu(de);il({lineWise:!0,text:it.text}),Je.type=="cut"?de.setSelections(it.ranges,null,et):(fe.prevInput="",xe.value=it.text.join(`
`),rt(xe))}else return;Je.type=="cut"&&(de.state.cutIncoming=+new Date)}}vt(xe,"cut",Fe),vt(xe,"copy",Fe),vt(a.scroller,"paste",function(Je){if(!(Xi(a,Je)||gt(de,Je))){if(!xe.dispatchEvent){de.state.pasteIncoming=+new Date,fe.focus();return}var it=new Event("paste");it.clipboardData=Je.clipboardData,xe.dispatchEvent(it)}}),vt(a.lineSpace,"selectstart",function(Je){Xi(a,Je)||un(Je)}),vt(xe,"compositionstart",function(){var Je=de.getCursor("from");fe.composing&&fe.composing.range.clear(),fe.composing={start:Je,range:de.markText(Je,de.getCursor("to"),{className:"CodeMirror-composing"})}}),vt(xe,"compositionend",function(){fe.composing&&(fe.poll(),fe.composing.range.clear(),fe.composing=null)})},yo.prototype.createField=function(a){this.wrapper=cu(),this.textarea=this.wrapper.firstChild},yo.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},yo.prototype.prepareSelection=function(){var a=this.cm,y=a.display,fe=a.doc,de=bs(a);if(a.options.moveInputWithCursor){var xe=qi(a,fe.sel.primary().head,"div"),Fe=y.wrapper.getBoundingClientRect(),Je=y.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,xe.top+Je.top-Fe.top)),de.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,xe.left+Je.left-Fe.left))}return de},yo.prototype.showSelection=function(a){var y=this.cm,fe=y.display;Ee(fe.cursorDiv,a.cursors),Ee(fe.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},yo.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var fe=y.getSelection();this.textarea.value=fe,y.state.focused&&rt(this.textarea),se&&te>=9&&(this.hasSelection=fe)}else a||(this.prevInput=this.textarea.value="",se&&te>=9&&(this.hasSelection=null))}},yo.prototype.getField=function(){return this.textarea},yo.prototype.supportsTouch=function(){return!1},yo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!oe||Xe()!=this.textarea))try{this.textarea.focus()}catch(a){}},yo.prototype.blur=function(){this.textarea.blur()},yo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},yo.prototype.receivedFocus=function(){this.slowPoll()},yo.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},yo.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function fe(){var de=y.poll();!de&&!a?(a=!0,y.polling.set(60,fe)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,fe)},yo.prototype.poll=function(){var a=this,y=this.cm,fe=this.textarea,de=this.prevInput;if(this.contextMenuPending||!y.state.focused||Kn(fe)&&!de&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var xe=fe.value;if(xe==de&&!y.somethingSelected())return!1;if(se&&te>=9&&this.hasSelection===xe||ve&&/[\uf700-\uf7ff]/.test(xe))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var Fe=xe.charCodeAt(0);if(Fe==8203&&!de&&(de="\u200B"),Fe==8666)return this.reset(),this.cm.execCommand("undo")}for(var Je=0,it=Math.min(de.length,xe.length);Je<it&&de.charCodeAt(Je)==xe.charCodeAt(Je);)++Je;return St(y,function(){Sl(y,xe.slice(Je),de.length-Je,null,a.composing?"*compose":null),xe.length>1e3||xe.indexOf(`
`)>-1?fe.value=a.prevInput="":a.prevInput=xe,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},yo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},yo.prototype.onKeyPress=function(){se&&te>=9&&(this.hasSelection=null),this.fastPoll()},yo.prototype.onContextMenu=function(a){var y=this,fe=y.cm,de=fe.display,xe=y.textarea;y.contextMenuPending&&y.contextMenuPending();var Fe=da(fe,a),Je=de.scroller.scrollTop;if(!Fe||E)return;var it=fe.options.resetSelectionOnContextMenu;it&&fe.doc.sel.contains(Fe)==-1&&Yn(fe,jo)(fe.doc,mi(Fe),et);var at=xe.style.cssText,ht=y.wrapper.style.cssText,It=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",xe.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(a.clientY-It.top-5)+"px; left: "+(a.clientX-It.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 Ft;le&&(Ft=window.scrollY),de.input.focus(),le&&window.scrollTo(null,Ft),de.input.reset(),fe.somethingSelected()||(xe.value=y.prevInput=" "),y.contextMenuPending=tn,de.selForContextMenu=fe.doc.sel,clearTimeout(de.detectingSelectAll);function ln(){if(xe.selectionStart!=null){var Hn=fe.somethingSelected(),qn="\u200B"+(Hn?xe.value:"");xe.value="\u21DA",xe.value=qn,y.prevInput=Hn?"":"\u200B",xe.selectionStart=1,xe.selectionEnd=qn.length,de.selForContextMenu=fe.doc.sel}}function tn(){if(y.contextMenuPending==tn&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ht,xe.style.cssText=at,se&&te<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=Je),xe.selectionStart!=null)){(!se||se&&te<9)&&ln();var Hn=0,qn=function(){de.selForContextMenu==fe.doc.sel&&xe.selectionStart==0&&xe.selectionEnd>0&&y.prevInput=="\u200B"?Yn(fe,Dl)(fe):Hn++<10?de.detectingSelectAll=setTimeout(qn,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(qn,200)}}if(se&&te>=9&&ln(),he){Ln(a);var kn=function(){Zt(window,"mouseup",kn),setTimeout(tn,20)};vt(window,"mouseup",kn)}else setTimeout(tn,50)},yo.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},yo.prototype.setUneditable=function(){},yo.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?ut(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var fe=Xe();y.autofocus=fe==a||a.getAttribute("autofocus")!=null&&fe==document.body}function de(){a.value=it.getValue()}var xe;if(a.form&&(vt(a.form,"submit",de),!y.leaveSubmitMethodAlone)){var Fe=a.form;xe=Fe.submit;try{var Je=Fe.submit=function(){de(),Fe.submit=xe,Fe.submit(),Fe.submit=Je}}catch(at){}}y.finishInit=function(at){at.save=de,at.getTextArea=function(){return a},at.toTextArea=function(){at.toTextArea=isNaN,de(),a.parentNode.removeChild(at.getWrapperElement()),a.style.display="",a.form&&(Zt(a.form,"submit",de),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=xe))}},a.style.display="none";var it=so(function(at){return a.parentNode.insertBefore(at,a.nextSibling)},y);return it}function Qu(a){a.off=Zt,a.on=vt,a.wheelEventPixels=vr,a.Doc=Qo,a.splitLines=rr,a.countColumn=Ge,a.findColumn=Rt,a.isWordChar=Be,a.Pass=nt,a.signal=Ut,a.Line=jr,a.changeEnd=Er,a.scrollbarModel=Na,a.Pos=Et,a.cmpPos=Ht,a.modes=Dn,a.mimeModes=Rn,a.resolveMode=an,a.getMode=Ie,a.modeExtensions=Ze,a.extendMode=qe,a.copyState=st,a.startState=Bt,a.innerMode=mt,a.commands=Zs,a.keyMap=Ya,a.keyName=Kl,a.isModifierKey=Zl,a.lookupKey=Ts,a.normalizeKeyMap=Lu,a.StringStream=kt,a.SharedTextMarker=zs,a.TextMarker=ss,a.LineWidget=Us,a.e_preventDefault=un,a.e_stopPropagation=Sn,a.e_stop=Ln,a.addClass=ot,a.contains=Qe,a.rmClass=ke,a.keyNames=ls}Wu(so),Vu(so);var $u="iter insert remove copy getEditor constructor".split(" ");for(var al in Qo.prototype)Qo.prototype.hasOwnProperty(al)&&Ve($u,al)<0&&(so.prototype[al]=function(a){return function(){return a.apply(this.doc,arguments)}}(Qo.prototype[al]));return qt(Qo),so.inputStyles={textarea:yo,contenteditable:Vi},so.defineMode=function(a){!so.defaults.mode&&a!="null"&&(so.defaults.mode=a),Un.apply(this,arguments)},so.defineMIME=Mr,so.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),so.defineMIME("text/plain","null"),so.defineExtension=function(a,y){so.prototype[a]=y},so.defineDocExtension=function(a,y){Qo.prototype[a]=y},so.fromTextArea=Ju,Qu(so),so.version="5.58.2",so})},25419:function($t,Dt,Se){(function(ce){ce(Se(89780),Se(15525),Se(98101))})(function(ce){"use strict";ce.defineMode("markdown",function(ie,Ce){var ue=ce.getMode(ie,"text/html"),se=ue.name=="null";function te(Ge){if(ce.findModeByName){var ze=ce.findModeByName(Ge);ze&&(Ge=ze.mime||ze.mimes[0])}var Ve=ce.getMode(ie,Ge);return Ve.name=="null"?null:Ve}Ce.highlightFormatting===void 0&&(Ce.highlightFormatting=!1),Ce.maxBlockquoteDepth===void 0&&(Ce.maxBlockquoteDepth=0),Ce.taskLists===void 0&&(Ce.taskLists=!1),Ce.strikethrough===void 0&&(Ce.strikethrough=!1),Ce.emoji===void 0&&(Ce.emoji=!1),Ce.fencedCodeBlockHighlighting===void 0&&(Ce.fencedCodeBlockHighlighting=!0),Ce.fencedCodeBlockDefaultMode===void 0&&(Ce.fencedCodeBlockDefaultMode="text/plain"),Ce.xml===void 0&&(Ce.xml=!0),Ce.tokenTypeOverrides===void 0&&(Ce.tokenTypeOverrides={});var le={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 le)le.hasOwnProperty(ee)&&Ce.tokenTypeOverrides[ee]&&(le[ee]=Ce.tokenTypeOverrides[ee]);var ne=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,b=/^\[(x| )\](?=\s)/i,z=Ce.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,x=/^ {0,3}(?:\={1,}|-{2,})\s*$/,re=/^[^#!\[\]*_\\<>` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,oe=/^\s*\[[^\]]+?\]:.*$/,ve=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ye=" ";function me(Ge,ze,Ve){return ze.f=ze.inline=Ve,Ve(Ge,ze)}function ge(Ge,ze,Ve){return ze.f=ze.block=Ve,Ve(Ge,ze)}function _e(Ge){return!Ge||!/\S/.test(Ge.string)}function he(Ge){if(Ge.linkTitle=!1,Ge.linkHref=!1,Ge.linkText=!1,Ge.em=!1,Ge.strong=!1,Ge.strikethrough=!1,Ge.quote=0,Ge.indentedCode=!1,Ge.f==ke){var ze=se;if(!ze){var Ve=ce.innerMode(ue,Ge.htmlState);ze=Ve.mode.name=="xml"&&Ve.state.tagStart===null&&!Ve.state.context&&Ve.state.tokenize.isInText}ze&&(Ge.f=je,Ge.block=pe,Ge.htmlState=null)}return Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:null},null}function pe(Ge,ze){var Ve=Ge.column()===ze.indentation,$e=_e(ze.prevLine.stream),nt=ze.indentedCode,et=ze.prevLine.hr,pt=ze.list!==!1,ct=(ze.listStack[ze.listStack.length-1]||0)+3;ze.indentedCode=!1;var Rt=ze.indentation;if(ze.indentationDiff===null&&(ze.indentationDiff=ze.indentation,pt)){for(ze.list=null;Rt<ze.listStack[ze.listStack.length-1];)ze.listStack.pop(),ze.listStack.length?ze.indentation=ze.listStack[ze.listStack.length-1]:ze.list=!1;ze.list!==!1&&(ze.indentationDiff=Rt-ze.listStack[ze.listStack.length-1])}var dt=!$e&&!et&&!ze.prevLine.header&&(!pt||!nt)&&!ze.prevLine.fencedCodeEnd,Mt=(ze.list===!1||et||$e)&&ze.indentation<=ct&&Ge.match(ne),xt=null;if(ze.indentationDiff>=4&&(nt||ze.prevLine.fencedCodeEnd||ze.prevLine.header||$e))return Ge.skipToEnd(),ze.indentedCode=!0,le.code;if(Ge.eatSpace())return null;if(Ve&&ze.indentation<=ct&&(xt=Ge.match(z))&&xt[1].length<=6)return ze.quote=0,ze.header=xt[1].length,ze.thisLine.header=!0,Ce.highlightFormatting&&(ze.formatting="header"),ze.f=ze.inline,Ee(ze);if(ze.indentation<=ct&&Ge.eat(">"))return ze.quote=Ve?1:ze.quote+1,Ce.highlightFormatting&&(ze.formatting="quote"),Ge.eatSpace(),Ee(ze);if(!Mt&&!ze.setext&&Ve&&ze.indentation<=ct&&(xt=Ge.match(E))){var yt=xt[1]?"ol":"ul";return ze.indentation=Rt+Ge.current().length,ze.list=!0,ze.quote=0,ze.listStack.push(ze.indentation),ze.em=!1,ze.strong=!1,ze.code=!1,ze.strikethrough=!1,Ce.taskLists&&Ge.match(b,!1)&&(ze.taskList=!0),ze.f=ze.inline,Ce.highlightFormatting&&(ze.formatting=["list","list-"+yt]),Ee(ze)}else{if(Ve&&ze.indentation<=ct&&(xt=Ge.match(ae,!0)))return ze.quote=0,ze.fencedEndRE=new RegExp(xt[1]+"+ *$"),ze.localMode=Ce.fencedCodeBlockHighlighting&&te(xt[2]||Ce.fencedCodeBlockDefaultMode),ze.localMode&&(ze.localState=ce.startState(ze.localMode)),ze.f=ze.block=Te,Ce.highlightFormatting&&(ze.formatting="code-block"),ze.code=-1,Ee(ze);if(ze.setext||(!dt||!pt)&&!ze.quote&&ze.list===!1&&!ze.code&&!Mt&&!oe.test(Ge.string)&&(xt=Ge.lookAhead(1))&&(xt=xt.match(x)))return ze.setext?(ze.header=ze.setext,ze.setext=0,Ge.skipToEnd(),Ce.highlightFormatting&&(ze.formatting="header")):(ze.header=xt[0].charAt(0)=="="?1:2,ze.setext=ze.header),ze.thisLine.header=!0,ze.f=ze.inline,Ee(ze);if(Mt)return Ge.skipToEnd(),ze.hr=!0,ze.thisLine.hr=!0,le.hr;if(Ge.peek()==="[")return me(Ge,ze,We)}return me(Ge,ze,ze.inline)}function ke(Ge,ze){var Ve=ue.token(Ge,ze.htmlState);if(!se){var $e=ce.innerMode(ue,ze.htmlState);($e.mode.name=="xml"&&$e.state.tagStart===null&&!$e.state.context&&$e.state.tokenize.isInText||ze.md_inside&&Ge.current().indexOf(">")>-1)&&(ze.f=je,ze.block=pe,ze.htmlState=null)}return Ve}function Te(Ge,ze){var Ve=ze.listStack[ze.listStack.length-1]||0,$e=ze.indentation<Ve,nt=Ve+3;if(ze.fencedEndRE&&ze.indentation<=nt&&($e||Ge.match(ze.fencedEndRE))){Ce.highlightFormatting&&(ze.formatting="code-block");var et;return $e||(et=Ee(ze)),ze.localMode=ze.localState=null,ze.block=pe,ze.f=je,ze.fencedEndRE=null,ze.code=0,ze.thisLine.fencedCodeEnd=!0,$e?ge(Ge,ze,ze.block):et}else return ze.localMode?ze.localMode.token(Ge,ze.localState):(Ge.skipToEnd(),le.code)}function Ee(Ge){var ze=[];if(Ge.formatting){ze.push(le.formatting),typeof Ge.formatting=="string"&&(Ge.formatting=[Ge.formatting]);for(var Ve=0;Ve<Ge.formatting.length;Ve++)ze.push(le.formatting+"-"+Ge.formatting[Ve]),Ge.formatting[Ve]==="header"&&ze.push(le.formatting+"-"+Ge.formatting[Ve]+"-"+Ge.header),Ge.formatting[Ve]==="quote"&&(!Ce.maxBlockquoteDepth||Ce.maxBlockquoteDepth>=Ge.quote?ze.push(le.formatting+"-"+Ge.formatting[Ve]+"-"+Ge.quote):ze.push("error"))}if(Ge.taskOpen)return ze.push("meta"),ze.length?ze.join(" "):null;if(Ge.taskClosed)return ze.push("property"),ze.length?ze.join(" "):null;if(Ge.linkHref?ze.push(le.linkHref,"url"):(Ge.strong&&ze.push(le.strong),Ge.em&&ze.push(le.em),Ge.strikethrough&&ze.push(le.strikethrough),Ge.emoji&&ze.push(le.emoji),Ge.linkText&&ze.push(le.linkText),Ge.code&&ze.push(le.code),Ge.image&&ze.push(le.image),Ge.imageAltText&&ze.push(le.imageAltText,"link"),Ge.imageMarker&&ze.push(le.imageMarker)),Ge.header&&ze.push(le.header,le.header+"-"+Ge.header),Ge.quote&&(ze.push(le.quote),!Ce.maxBlockquoteDepth||Ce.maxBlockquoteDepth>=Ge.quote?ze.push(le.quote+"-"+Ge.quote):ze.push(le.quote+"-"+Ce.maxBlockquoteDepth)),Ge.list!==!1){var $e=(Ge.listStack.length-1)%3;$e?$e===1?ze.push(le.list2):ze.push(le.list3):ze.push(le.list1)}return Ge.trailingSpaceNewLine?ze.push("trailing-space-new-line"):Ge.trailingSpace&&ze.push("trailing-space-"+(Ge.trailingSpace%2?"a":"b")),ze.length?ze.join(" "):null}function Oe(Ge,ze){if(Ge.match(re,!0))return Ee(ze)}function je(Ge,ze){var Ve=ze.text(Ge,ze);if(typeof Ve!="undefined")return Ve;if(ze.list)return ze.list=null,Ee(ze);if(ze.taskList){var $e=Ge.match(b,!0)[1]===" ";return $e?ze.taskOpen=!0:ze.taskClosed=!0,Ce.highlightFormatting&&(ze.formatting="task"),ze.taskList=!1,Ee(ze)}if(ze.taskOpen=!1,ze.taskClosed=!1,ze.header&&Ge.match(/^#+$/,!0))return Ce.highlightFormatting&&(ze.formatting="header"),Ee(ze);var nt=Ge.next();if(ze.linkTitle){ze.linkTitle=!1;var et=nt;nt==="("&&(et=")"),et=(et+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pt="^\\s*(?:[^"+et+"\\\\]+|\\\\\\\\|\\\\.)"+et;if(Ge.match(new RegExp(pt),!0))return le.linkHref}if(nt==="`"){var ct=ze.formatting;Ce.highlightFormatting&&(ze.formatting="code"),Ge.eatWhile("`");var Rt=Ge.current().length;if(ze.code==0&&(!ze.quote||Rt==1))return ze.code=Rt,Ee(ze);if(Rt==ze.code){var dt=Ee(ze);return ze.code=0,dt}else return ze.formatting=ct,Ee(ze)}else if(ze.code)return Ee(ze);if(nt==="\\"&&(Ge.next(),Ce.highlightFormatting)){var Mt=Ee(ze),xt=le.formatting+"-escape";return Mt?Mt+" "+xt:xt}if(nt==="!"&&Ge.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ze.imageMarker=!0,ze.image=!0,Ce.highlightFormatting&&(ze.formatting="image"),Ee(ze);if(nt==="["&&ze.imageMarker&&Ge.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ze.imageMarker=!1,ze.imageAltText=!0,Ce.highlightFormatting&&(ze.formatting="image"),Ee(ze);if(nt==="]"&&ze.imageAltText){Ce.highlightFormatting&&(ze.formatting="image");var Mt=Ee(ze);return ze.imageAltText=!1,ze.image=!1,ze.inline=ze.f=Qe,Mt}if(nt==="["&&!ze.image)return ze.linkText&&Ge.match(/^.*?\]/)||(ze.linkText=!0,Ce.highlightFormatting&&(ze.formatting="link")),Ee(ze);if(nt==="]"&&ze.linkText){Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return ze.linkText=!1,ze.inline=ze.f=Ge.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:je,Mt}if(nt==="<"&&Ge.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ze.f=ze.inline=Pe,Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return Mt?Mt+=" ":Mt="",Mt+le.linkInline}if(nt==="<"&&Ge.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ze.f=ze.inline=Pe,Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return Mt?Mt+=" ":Mt="",Mt+le.linkEmail}if(Ce.xml&&nt==="<"&&Ge.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var yt=Ge.string.indexOf(">",Ge.pos);if(yt!=-1){var bt=Ge.string.substring(Ge.start,yt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(bt)&&(ze.md_inside=!0)}return Ge.backUp(1),ze.htmlState=ce.startState(ue),ge(Ge,ze,ke)}if(Ce.xml&&nt==="<"&&Ge.match(/^\/\w*?>/))return ze.md_inside=!1,"tag";if(nt==="*"||nt==="_"){for(var He=1,Ae=Ge.pos==1?" ":Ge.string.charAt(Ge.pos-2);He<3&&Ge.eat(nt);)He++;var be=Ge.peek()||" ",Be=!/\s/.test(be)&&(!ve.test(be)||/\s/.test(Ae)||ve.test(Ae)),Ke=!/\s/.test(Ae)&&(!ve.test(Ae)||/\s/.test(be)||ve.test(be)),Ne=null,De=null;if(He%2&&(!ze.em&&Be&&(nt==="*"||!Ke||ve.test(Ae))?Ne=!0:ze.em==nt&&Ke&&(nt==="*"||!Be||ve.test(be))&&(Ne=!1)),He>1&&(!ze.strong&&Be&&(nt==="*"||!Ke||ve.test(Ae))?De=!0:ze.strong==nt&&Ke&&(nt==="*"||!Be||ve.test(be))&&(De=!1)),De!=null||Ne!=null){Ce.highlightFormatting&&(ze.formatting=Ne==null?"strong":De==null?"em":"strong em"),Ne===!0&&(ze.em=nt),De===!0&&(ze.strong=nt);var dt=Ee(ze);return Ne===!1&&(ze.em=!1),De===!1&&(ze.strong=!1),dt}}else if(nt===" "&&(Ge.eat("*")||Ge.eat("_"))){if(Ge.peek()===" ")return Ee(ze);Ge.backUp(1)}if(Ce.strikethrough){if(nt==="~"&&Ge.eatWhile(nt)){if(ze.strikethrough){Ce.highlightFormatting&&(ze.formatting="strikethrough");var dt=Ee(ze);return ze.strikethrough=!1,dt}else if(Ge.match(/^[^\s]/,!1))return ze.strikethrough=!0,Ce.highlightFormatting&&(ze.formatting="strikethrough"),Ee(ze)}else if(nt===" "&&Ge.match(/^~~/,!0)){if(Ge.peek()===" ")return Ee(ze);Ge.backUp(2)}}if(Ce.emoji&&nt===":"&&Ge.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ze.emoji=!0,Ce.highlightFormatting&&(ze.formatting="emoji");var we=Ee(ze);return ze.emoji=!1,we}return nt===" "&&(Ge.match(/^ +$/,!1)?ze.trailingSpace++:ze.trailingSpace&&(ze.trailingSpaceNewLine=!0)),Ee(ze)}function Pe(Ge,ze){var Ve=Ge.next();if(Ve===">"){ze.f=ze.inline=je,Ce.highlightFormatting&&(ze.formatting="link");var $e=Ee(ze);return $e?$e+=" ":$e="",$e+le.linkInline}return Ge.match(/^[^>]+/,!0),le.linkInline}function Qe(Ge,ze){if(Ge.eatSpace())return null;var Ve=Ge.next();return Ve==="("||Ve==="["?(ze.f=ze.inline=ot(Ve==="("?")":"]"),Ce.highlightFormatting&&(ze.formatting="link-string"),ze.linkHref=!0,Ee(ze)):"error"}var Xe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ot(Ge){return function(ze,Ve){var $e=ze.next();if($e===Ge){Ve.f=Ve.inline=je,Ce.highlightFormatting&&(Ve.formatting="link-string");var nt=Ee(Ve);return Ve.linkHref=!1,nt}return ze.match(Xe[Ge]),Ve.linkHref=!0,Ee(Ve)}}function We(Ge,ze){return Ge.match(/^([^\]\\]|\\.)*\]:/,!1)?(ze.f=rt,Ge.next(),Ce.highlightFormatting&&(ze.formatting="link"),ze.linkText=!0,Ee(ze)):me(Ge,ze,je)}function rt(Ge,ze){if(Ge.match(/^\]:/,!0)){ze.f=ze.inline=Ye,Ce.highlightFormatting&&(ze.formatting="link");var Ve=Ee(ze);return ze.linkText=!1,Ve}return Ge.match(/^([^\]\\]|\\.)+/,!0),le.linkText}function Ye(Ge,ze){return Ge.eatSpace()?null:(Ge.match(/^[^\s]+/,!0),Ge.peek()===void 0?ze.linkTitle=!0:Ge.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ze.f=ze.inline=je,le.linkHref+" url")}var ut={startState:function(){return{f:pe,prevLine:{stream:null},thisLine:{stream:null},block:pe,htmlState:null,indentation:0,inline:je,text:Oe,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(Ge){return{f:Ge.f,prevLine:Ge.prevLine,thisLine:Ge.thisLine,block:Ge.block,htmlState:Ge.htmlState&&ce.copyState(ue,Ge.htmlState),indentation:Ge.indentation,localMode:Ge.localMode,localState:Ge.localMode?ce.copyState(Ge.localMode,Ge.localState):null,inline:Ge.inline,text:Ge.text,formatting:!1,linkText:Ge.linkText,linkTitle:Ge.linkTitle,linkHref:Ge.linkHref,code:Ge.code,em:Ge.em,strong:Ge.strong,strikethrough:Ge.strikethrough,emoji:Ge.emoji,header:Ge.header,setext:Ge.setext,hr:Ge.hr,taskList:Ge.taskList,list:Ge.list,listStack:Ge.listStack.slice(0),quote:Ge.quote,indentedCode:Ge.indentedCode,trailingSpace:Ge.trailingSpace,trailingSpaceNewLine:Ge.trailingSpaceNewLine,md_inside:Ge.md_inside,fencedEndRE:Ge.fencedEndRE}},token:function(Ge,ze){if(ze.formatting=!1,Ge!=ze.thisLine.stream){if(ze.header=0,ze.hr=!1,Ge.match(/^\s*$/,!0))return he(ze),null;if(ze.prevLine=ze.thisLine,ze.thisLine={stream:Ge},ze.taskList=!1,ze.trailingSpace=0,ze.trailingSpaceNewLine=!1,!ze.localState&&(ze.f=ze.block,ze.f!=ke)){var Ve=Ge.match(/^\s*/,!0)[0].replace(/\t/g,ye).length;if(ze.indentation=Ve,ze.indentationDiff=null,Ve>0)return null}}return ze.f(Ge,ze)},innerMode:function(Ge){return Ge.block==ke?{state:Ge.htmlState,mode:ue}:Ge.localState?{state:Ge.localState,mode:Ge.localMode}:{state:Ge,mode:ut}},indent:function(Ge,ze,Ve){return Ge.block==ke&&ue.indent?ue.indent(Ge.htmlState,ze,Ve):Ge.localState&&Ge.localMode.indent?Ge.localMode.indent(Ge.localState,ze,Ve):ce.Pass},blankLine:he,getType:Ee,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ut},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},98101:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){"use strict";ce.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<ce.modeInfo.length;ie++){var Ce=ce.modeInfo[ie];Ce.mimes&&(Ce.mime=Ce.mimes[0])}ce.findModeByMIME=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.mime==ue)return te;if(te.mimes){for(var le=0;le<te.mimes.length;le++)if(te.mimes[le]==ue)return te}}if(/\+xml$/.test(ue))return ce.findModeByMIME("application/xml");if(/\+json$/.test(ue))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.ext){for(var le=0;le<te.ext.length;le++)if(te.ext[le]==ue)return te}}},ce.findModeByFileName=function(ue){for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.file&&te.file.test(ue))return te}var le=ue.lastIndexOf("."),ee=le>-1&&ue.substring(le+1,ue.length);if(ee)return ce.findModeByExtension(ee)},ce.findModeByName=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.name.toLowerCase()==ue)return te;if(te.alias){for(var le=0;le<te.alias.length;le++)if(te.alias[le].toLowerCase()==ue)return te}}}})},67549:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){"use strict";ce.defineMode("stex",function(ie,Ce){"use strict";function ue(re,ae){re.cmdState.push(ae)}function se(re){return re.cmdState.length>0?re.cmdState[re.cmdState.length-1]:null}function te(re){var ae=re.cmdState.pop();ae&&ae.closeBracket()}function le(re){for(var ae=re.cmdState,oe=ae.length-1;oe>=0;oe--){var ve=ae[oe];if(ve.name!="DEFAULT")return ve}return{styleIdentifier:function(){return null}}}function ee(re,ae,oe){return function(){this.name=re,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 ne={};ne.importmodule=ee("importmodule","tag",["string","builtin"]),ne.documentclass=ee("documentclass","tag",["","atom"]),ne.usepackage=ee("usepackage","tag",["atom"]),ne.begin=ee("begin","tag",["atom"]),ne.end=ee("end","tag",["atom"]),ne.label=ee("label","tag",["atom"]),ne.ref=ee("ref","tag",["atom"]),ne.eqref=ee("eqref","tag",["atom"]),ne.cite=ee("cite","tag",["atom"]),ne.bibitem=ee("bibitem","tag",["atom"]),ne.Bibitem=ee("Bibitem","tag",["atom"]),ne.RBibitem=ee("RBibitem","tag",["atom"]),ne.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(re,ae){re.f=ae}function b(re,ae){var oe;if(re.match(/^\\[a-zA-Z@]+/)){var ve=re.current().slice(1);return oe=ne.hasOwnProperty(ve)?ne[ve]:ne.DEFAULT,oe=new oe,ue(ae,oe),E(ae,x),oe.style}if(re.match(/^\\[$&%#{}_]/)||re.match(/^\\[,;!\/\\]/))return"tag";if(re.match("\\["))return E(ae,function(me,ge){return z(me,ge,"\\]")}),"keyword";if(re.match("\\("))return E(ae,function(me,ge){return z(me,ge,"\\)")}),"keyword";if(re.match("$$"))return E(ae,function(me,ge){return z(me,ge,"$$")}),"keyword";if(re.match("$"))return E(ae,function(me,ge){return z(me,ge,"$")}),"keyword";var ye=re.next();if(ye=="%")return re.skipToEnd(),"comment";if(ye=="}"||ye=="]"){if(oe=se(ae),oe)oe.closeBracket(ye),E(ae,x);else return"error";return"bracket"}else return ye=="{"||ye=="["?(oe=ne.DEFAULT,oe=new oe,ue(ae,oe),"bracket"):/\d/.test(ye)?(re.eatWhile(/[\w.%]/),"atom"):(re.eatWhile(/[\w\-_]/),oe=le(ae),oe.name=="begin"&&(oe.argument=re.current()),oe.styleIdentifier())}function z(re,ae,oe){if(re.eatSpace())return null;if(oe&&re.match(oe))return E(ae,b),"keyword";if(re.match(/^\\[a-zA-Z@]+/))return"tag";if(re.match(/^[a-zA-Z]+/))return"variable-2";if(re.match(/^\\[$&%#{}_]/)||re.match(/^\\[,;!\/]/)||re.match(/^[\^_&]/))return"tag";if(re.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(re.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ve=re.next();return ve=="{"||ve=="}"||ve=="["||ve=="]"||ve=="("||ve==")"?"bracket":ve=="%"?(re.skipToEnd(),"comment"):"error"}function x(re,ae){var oe=re.peek(),ve;return oe=="{"||oe=="["?(ve=se(ae),ve.openBracket(oe),re.eat(oe),E(ae,b),"bracket"):/[ \t\r]/.test(oe)?(re.eat(oe),null):(E(ae,b),te(ae),b(re,ae))}return{startState:function(){var re=Ce.inMathMode?function(ae,oe){return z(ae,oe)}:b;return{cmdState:[],f:re}},copyState:function(re){return{cmdState:re.cmdState.slice(),f:re.f}},token:function(re,ae){return ae.f(re,ae)},blankLine:function(re){re.f=b,re.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},15525:function($t,Dt,Se){(function(ce){ce(Se(89780))})(function(ce){"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},Ce={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(ue,se){var te=ue.indentUnit,le={},ee=se.htmlMode?ie:Ce;for(var ne in ee)le[ne]=ee[ne];for(var ne in se)le[ne]=se[ne];var E,b;function z(Pe,Qe){function Xe(rt){return Qe.tokenize=rt,rt(Pe,Qe)}var ot=Pe.next();if(ot=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Xe(ae("atom","]]>")):null:Pe.match("--")?Xe(ae("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Xe(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 We;return Pe.eat("#")?Pe.eat("x")?We=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):We=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):We=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),We?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}z.isInText=!0;function x(Pe,Qe){var Xe=Pe.next();if(Xe==">"||Xe=="/"&&Pe.eat(">"))return Qe.tokenize=z,E=Xe==">"?"endTag":"selfcloseTag","tag bracket";if(Xe=="=")return E="equals",null;if(Xe=="<"){Qe.tokenize=z,Qe.state=ge,Qe.tagName=Qe.tagStart=null;var ot=Qe.tokenize(Pe,Qe);return ot?ot+" tag error":"tag error"}else return/[\'\"]/.test(Xe)?(Qe.tokenize=re(Xe),Qe.stringStartCol=Pe.column(),Qe.tokenize(Pe,Qe)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(Pe){var Qe=function(Xe,ot){for(;!Xe.eol();)if(Xe.next()==Pe){ot.tokenize=x;break}return"string"};return Qe.isInAttribute=!0,Qe}function ae(Pe,Qe){return function(Xe,ot){for(;!Xe.eol();){if(Xe.match(Qe)){ot.tokenize=z;break}Xe.next()}return Pe}}function oe(Pe){return function(Qe,Xe){for(var ot;(ot=Qe.next())!=null;){if(ot=="<")return Xe.tokenize=oe(Pe+1),Xe.tokenize(Qe,Xe);if(ot==">")if(Pe==1){Xe.tokenize=z;break}else return Xe.tokenize=oe(Pe-1),Xe.tokenize(Qe,Xe)}return"meta"}}function ve(Pe,Qe,Xe){this.prev=Pe.context,this.tagName=Qe,this.indent=Pe.indented,this.startOfLine=Xe,(le.doNotIndent.hasOwnProperty(Qe)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function ye(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function me(Pe,Qe){for(var Xe;;){if(!Pe.context||(Xe=Pe.context.tagName,!le.contextGrabbers.hasOwnProperty(Xe)||!le.contextGrabbers[Xe].hasOwnProperty(Qe)))return;ye(Pe)}}function ge(Pe,Qe,Xe){return Pe=="openTag"?(Xe.tagStart=Qe.column(),_e):Pe=="closeTag"?he:ge}function _e(Pe,Qe,Xe){return Pe=="word"?(Xe.tagName=Qe.current(),b="tag",Te):le.allowMissingTagName&&Pe=="endTag"?(b="tag bracket",Te(Pe,Qe,Xe)):(b="error",_e)}function he(Pe,Qe,Xe){if(Pe=="word"){var ot=Qe.current();return Xe.context&&Xe.context.tagName!=ot&&le.implicitlyClosed.hasOwnProperty(Xe.context.tagName)&&ye(Xe),Xe.context&&Xe.context.tagName==ot||le.matchClosing===!1?(b="tag",pe):(b="tag error",ke)}else return le.allowMissingTagName&&Pe=="endTag"?(b="tag bracket",pe(Pe,Qe,Xe)):(b="error",ke)}function pe(Pe,Qe,Xe){return Pe!="endTag"?(b="error",pe):(ye(Xe),ge)}function ke(Pe,Qe,Xe){return b="error",pe(Pe,Qe,Xe)}function Te(Pe,Qe,Xe){if(Pe=="word")return b="attribute",Ee;if(Pe=="endTag"||Pe=="selfcloseTag"){var ot=Xe.tagName,We=Xe.tagStart;return Xe.tagName=Xe.tagStart=null,Pe=="selfcloseTag"||le.autoSelfClosers.hasOwnProperty(ot)?me(Xe,ot):(me(Xe,ot),Xe.context=new ve(Xe,ot,We==Xe.indented)),ge}return b="error",Te}function Ee(Pe,Qe,Xe){return Pe=="equals"?Oe:(le.allowMissing||(b="error"),Te(Pe,Qe,Xe))}function Oe(Pe,Qe,Xe){return Pe=="string"?je:Pe=="word"&&le.allowUnquoted?(b="string",Te):(b="error",Te(Pe,Qe,Xe))}function je(Pe,Qe,Xe){return Pe=="string"?je:Te(Pe,Qe,Xe)}return{startState:function(Pe){var Qe={tokenize:z,state:ge,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 Xe=Qe.tokenize(Pe,Qe);return(Xe||E)&&Xe!="comment"&&(b=null,Qe.state=Qe.state(E||Xe,Pe,Qe),b&&(Xe=b=="error"?Xe+" error":b)),Xe},indent:function(Pe,Qe,Xe){var ot=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+te;if(ot&&ot.noIndent)return ce.Pass;if(Pe.tokenize!=x&&Pe.tokenize!=z)return Xe?Xe.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return le.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+te*(le.multilineTagIndentFactor||1);if(le.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var We=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(We&&We[1])for(;ot;)if(ot.tagName==We[2]){ot=ot.prev;break}else if(le.implicitlyClosed.hasOwnProperty(ot.tagName))ot=ot.prev;else break;else if(We)for(;ot;){var rt=le.contextGrabbers[ot.tagName];if(rt&&rt.hasOwnProperty(We[2]))ot=ot.prev;else break}for(;ot&&ot.prev&&!ot.startOfLine;)ot=ot.prev;return ot?ot.indent+te:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:le.htmlMode?"html":"xml",helperType:le.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Oe&&(Pe.state=Te)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var Qe=[],Xe=Pe.context;Xe;Xe=Xe.prev)Xe.tagName&&Qe.push(Xe.tagName);return Qe.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function($t,Dt,Se){var ce=Se(97671);(function(ie,Ce){$t.exports=Ce()})(this,function(){"use strict";function ie(Le){var Ue=typeof Le;return Le!==null&&(Ue==="object"||Ue==="function")}function Ce(Le){return typeof Le=="function"}var ue=void 0;Array.isArray?ue=Array.isArray:ue=function(Le){return Object.prototype.toString.call(Le)==="[object Array]"};var se=ue,te=0,le=void 0,ee=void 0,ne=function(Ue,Me){he[te]=Ue,he[te+1]=Me,te+=2,te===2&&(ee?ee(pe):Te())};function E(Le){ee=Le}function b(Le){ne=Le}var z=typeof window!="undefined"?window:void 0,x=z||{},re=x.MutationObserver||x.WebKitMutationObserver,ae=typeof self=="undefined"&&typeof ce!="undefined"&&{}.toString.call(ce)==="[object process]",oe=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function ve(){return function(){return ce.nextTick(pe)}}function ye(){return typeof le!="undefined"?function(){le(pe)}:_e()}function me(){var Le=0,Ue=new re(pe),Me=document.createTextNode("");return Ue.observe(Me,{characterData:!0}),function(){Me.data=Le=++Le%2}}function ge(){var Le=new MessageChannel;return Le.port1.onmessage=pe,function(){return Le.port2.postMessage(0)}}function _e(){var Le=setTimeout;return function(){return Le(pe,1)}}var he=new Array(1e3);function pe(){for(var Le=0;Le<te;Le+=2){var Ue=he[Le],Me=he[Le+1];Ue(Me),he[Le]=void 0,he[Le+1]=void 0}te=0}function ke(){try{var Le=Function("return this")().require("vertx");return le=Le.runOnLoop||Le.runOnContext,ye()}catch(Ue){return _e()}}var Te=void 0;ae?Te=ve():re?Te=me():oe?Te=ge():z===void 0?Te=ke():Te=_e();function Ee(Le,Ue){var Me=this,Re=new this.constructor(Pe);Re[je]===void 0&&yt(Re);var tt=Me._state;if(tt){var lt=arguments[tt-1];ne(function(){return Rt(tt,Re,lt,Me._result)})}else pt(Me,Re,Le,Ue);return Re}function Oe(Le){var Ue=this;if(Le&&typeof Le=="object"&&Le.constructor===Ue)return Le;var Me=new Ue(Pe);return Ve(Me,Le),Me}var je=Math.random().toString(36).substring(2);function Pe(){}var Qe=void 0,Xe=1,ot=2;function We(){return new TypeError("You cannot resolve a promise with itself")}function rt(){return new TypeError("A promises callback cannot return that same promise.")}function Ye(Le,Ue,Me,Re){try{Le.call(Ue,Me,Re)}catch(tt){return tt}}function ut(Le,Ue,Me){ne(function(Re){var tt=!1,lt=Ye(Me,Ue,function(Pt){tt||(tt=!0,Ue!==Pt?Ve(Re,Pt):nt(Re,Pt))},function(Pt){tt||(tt=!0,et(Re,Pt))},"Settle: "+(Re._label||" unknown promise"));!tt&&lt&&(tt=!0,et(Re,lt))},Le)}function Ge(Le,Ue){Ue._state===Xe?nt(Le,Ue._result):Ue._state===ot?et(Le,Ue._result):pt(Ue,void 0,function(Me){return Ve(Le,Me)},function(Me){return et(Le,Me)})}function ze(Le,Ue,Me){Ue.constructor===Le.constructor&&Me===Ee&&Ue.constructor.resolve===Oe?Ge(Le,Ue):Me===void 0?nt(Le,Ue):Ce(Me)?ut(Le,Ue,Me):nt(Le,Ue)}function Ve(Le,Ue){if(Le===Ue)et(Le,We());else if(ie(Ue)){var Me=void 0;try{Me=Ue.then}catch(Re){et(Le,Re);return}ze(Le,Ue,Me)}else nt(Le,Ue)}function $e(Le){Le._onerror&&Le._onerror(Le._result),ct(Le)}function nt(Le,Ue){Le._state===Qe&&(Le._result=Ue,Le._state=Xe,Le._subscribers.length!==0&&ne(ct,Le))}function et(Le,Ue){Le._state===Qe&&(Le._state=ot,Le._result=Ue,ne($e,Le))}function pt(Le,Ue,Me,Re){var tt=Le._subscribers,lt=tt.length;Le._onerror=null,tt[lt]=Ue,tt[lt+Xe]=Me,tt[lt+ot]=Re,lt===0&&Le._state&&ne(ct,Le)}function ct(Le){var Ue=Le._subscribers,Me=Le._state;if(Ue.length!==0){for(var Re=void 0,tt=void 0,lt=Le._result,Pt=0;Pt<Ue.length;Pt+=3)Re=Ue[Pt],tt=Ue[Pt+Me],Re?Rt(Me,Re,tt,lt):tt(lt);Le._subscribers.length=0}}function Rt(Le,Ue,Me,Re){var tt=Ce(Me),lt=void 0,Pt=void 0,Ct=!0;if(tt){try{lt=Me(Re)}catch(vt){Ct=!1,Pt=vt}if(Ue===lt){et(Ue,rt());return}}else lt=Re;Ue._state!==Qe||(tt&&Ct?Ve(Ue,lt):Ct===!1?et(Ue,Pt):Le===Xe?nt(Ue,lt):Le===ot&&et(Ue,lt))}function dt(Le,Ue){try{Ue(function(Re){Ve(Le,Re)},function(Re){et(Le,Re)})}catch(Me){et(Le,Me)}}var Mt=0;function xt(){return Mt++}function yt(Le){Le[je]=Mt++,Le._state=void 0,Le._result=void 0,Le._subscribers=[]}function bt(){return new Error("Array Methods must be provided an Array")}var He=function(){function Le(Ue,Me){this._instanceConstructor=Ue,this.promise=new Ue(Pe),this.promise[je]||yt(this.promise),se(Me)?(this.length=Me.length,this._remaining=Me.length,this._result=new Array(this.length),this.length===0?nt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Me),this._remaining===0&&nt(this.promise,this._result))):et(this.promise,bt())}return Le.prototype._enumerate=function(Me){for(var Re=0;this._state===Qe&&Re<Me.length;Re++)this._eachEntry(Me[Re],Re)},Le.prototype._eachEntry=function(Me,Re){var tt=this._instanceConstructor,lt=tt.resolve;if(lt===Oe){var Pt=void 0,Ct=void 0,vt=!1;try{Pt=Me.then}catch(Zt){vt=!0,Ct=Zt}if(Pt===Ee&&Me._state!==Qe)this._settledAt(Me._state,Re,Me._result);else if(typeof Pt!="function")this._remaining--,this._result[Re]=Me;else if(tt===De){var Ot=new tt(Pe);vt?et(Ot,Ct):ze(Ot,Me,Pt),this._willSettleAt(Ot,Re)}else this._willSettleAt(new tt(function(Zt){return Zt(Me)}),Re)}else this._willSettleAt(lt(Me),Re)},Le.prototype._settledAt=function(Me,Re,tt){var lt=this.promise;lt._state===Qe&&(this._remaining--,Me===ot?et(lt,tt):this._result[Re]=tt),this._remaining===0&&nt(lt,this._result)},Le.prototype._willSettleAt=function(Me,Re){var tt=this;pt(Me,void 0,function(lt){return tt._settledAt(Xe,Re,lt)},function(lt){return tt._settledAt(ot,Re,lt)})},Le}();function Ae(Le){return new He(this,Le).promise}function be(Le){var Ue=this;return se(Le)?new Ue(function(Me,Re){for(var tt=Le.length,lt=0;lt<tt;lt++)Ue.resolve(Le[lt]).then(Me,Re)}):new Ue(function(Me,Re){return Re(new TypeError("You must pass an array to race."))})}function Be(Le){var Ue=this,Me=new Ue(Pe);return et(Me,Le),Me}function Ke(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var De=function(){function Le(Ue){this[je]=xt(),this._result=this._state=void 0,this._subscribers=[],Pe!==Ue&&(typeof Ue!="function"&&Ke(),this instanceof Le?dt(this,Ue):Ne())}return Le.prototype.catch=function(Me){return this.then(null,Me)},Le.prototype.finally=function(Me){var Re=this,tt=Re.constructor;return Ce(Me)?Re.then(function(lt){return tt.resolve(Me()).then(function(){return lt})},function(lt){return tt.resolve(Me()).then(function(){throw lt})}):Re.then(Me,Me)},Le}();De.prototype.then=Ee,De.all=Ae,De.race=be,De.resolve=Oe,De.reject=Be,De._setScheduler=E,De._setAsap=b,De._asap=ne;function we(){var Le=void 0;if(typeof Se.g!="undefined")Le=Se.g;else if(typeof self!="undefined")Le=self;else try{Le=Function("return this")()}catch(Re){throw new Error("polyfill failed because global object is unavailable in this environment")}var Ue=Le.Promise;if(Ue){var Me=null;try{Me=Object.prototype.toString.call(Ue.resolve())}catch(Re){}if(Me==="[object Promise]"&&!Ue.cast)return}Le.Promise=De}return De.polyfill=we,De.Promise=De,De})},86204:function($t){"use strict";var Dt=typeof Reflect=="object"?Reflect:null,Se=Dt&&typeof Dt.apply=="function"?Dt.apply:function(ge,_e,he){return Function.prototype.apply.call(ge,_e,he)},ce;Dt&&typeof Dt.ownKeys=="function"?ce=Dt.ownKeys:Object.getOwnPropertySymbols?ce=function(ge){return Object.getOwnPropertyNames(ge).concat(Object.getOwnPropertySymbols(ge))}:ce=function(ge){return Object.getOwnPropertyNames(ge)};function ie(me){console&&console.warn&&console.warn(me)}var Ce=Number.isNaN||function(ge){return ge!==ge};function ue(){ue.init.call(this)}$t.exports=ue,$t.exports.once=oe,ue.EventEmitter=ue,ue.prototype._events=void 0,ue.prototype._eventsCount=0,ue.prototype._maxListeners=void 0;var se=10;function te(me){if(typeof me!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof me)}Object.defineProperty(ue,"defaultMaxListeners",{enumerable:!0,get:function(){return se},set:function(me){if(typeof me!="number"||me<0||Ce(me))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+me+".");se=me}}),ue.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},ue.prototype.setMaxListeners=function(ge){if(typeof ge!="number"||ge<0||Ce(ge))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ge+".");return this._maxListeners=ge,this};function le(me){return me._maxListeners===void 0?ue.defaultMaxListeners:me._maxListeners}ue.prototype.getMaxListeners=function(){return le(this)},ue.prototype.emit=function(ge){for(var _e=[],he=1;he<arguments.length;he++)_e.push(arguments[he]);var pe=ge==="error",ke=this._events;if(ke!==void 0)pe=pe&&ke.error===void 0;else if(!pe)return!1;if(pe){var Te;if(_e.length>0&&(Te=_e[0]),Te instanceof Error)throw Te;var Ee=new Error("Unhandled error."+(Te?" ("+Te.message+")":""));throw Ee.context=Te,Ee}var Oe=ke[ge];if(Oe===void 0)return!1;if(typeof Oe=="function")Se(Oe,this,_e);else for(var je=Oe.length,Pe=x(Oe,je),he=0;he<je;++he)Se(Pe[he],this,_e);return!0};function ee(me,ge,_e,he){var pe,ke,Te;if(te(_e),ke=me._events,ke===void 0?(ke=me._events=Object.create(null),me._eventsCount=0):(ke.newListener!==void 0&&(me.emit("newListener",ge,_e.listener?_e.listener:_e),ke=me._events),Te=ke[ge]),Te===void 0)Te=ke[ge]=_e,++me._eventsCount;else if(typeof Te=="function"?Te=ke[ge]=he?[_e,Te]:[Te,_e]:he?Te.unshift(_e):Te.push(_e),pe=le(me),pe>0&&Te.length>pe&&!Te.warned){Te.warned=!0;var Ee=new Error("Possible EventEmitter memory leak detected. "+Te.length+" "+String(ge)+" listeners added. Use emitter.setMaxListeners() to increase limit");Ee.name="MaxListenersExceededWarning",Ee.emitter=me,Ee.type=ge,Ee.count=Te.length,ie(Ee)}return me}ue.prototype.addListener=function(ge,_e){return ee(this,ge,_e,!1)},ue.prototype.on=ue.prototype.addListener,ue.prototype.prependListener=function(ge,_e){return ee(this,ge,_e,!0)};function ne(){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(me,ge,_e){var he={fired:!1,wrapFn:void 0,target:me,type:ge,listener:_e},pe=ne.bind(he);return pe.listener=_e,he.wrapFn=pe,pe}ue.prototype.once=function(ge,_e){return te(_e),this.on(ge,E(this,ge,_e)),this},ue.prototype.prependOnceListener=function(ge,_e){return te(_e),this.prependListener(ge,E(this,ge,_e)),this},ue.prototype.removeListener=function(ge,_e){var he,pe,ke,Te,Ee;if(te(_e),pe=this._events,pe===void 0)return this;if(he=pe[ge],he===void 0)return this;if(he===_e||he.listener===_e)--this._eventsCount===0?this._events=Object.create(null):(delete pe[ge],pe.removeListener&&this.emit("removeListener",ge,he.listener||_e));else if(typeof he!="function"){for(ke=-1,Te=he.length-1;Te>=0;Te--)if(he[Te]===_e||he[Te].listener===_e){Ee=he[Te].listener,ke=Te;break}if(ke<0)return this;ke===0?he.shift():re(he,ke),he.length===1&&(pe[ge]=he[0]),pe.removeListener!==void 0&&this.emit("removeListener",ge,Ee||_e)}return this},ue.prototype.off=ue.prototype.removeListener,ue.prototype.removeAllListeners=function(ge){var _e,he,pe;if(he=this._events,he===void 0)return this;if(he.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):he[ge]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete he[ge]),this;if(arguments.length===0){var ke=Object.keys(he),Te;for(pe=0;pe<ke.length;++pe)Te=ke[pe],Te!=="removeListener"&&this.removeAllListeners(Te);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_e=he[ge],typeof _e=="function")this.removeListener(ge,_e);else if(_e!==void 0)for(pe=_e.length-1;pe>=0;pe--)this.removeListener(ge,_e[pe]);return this};function b(me,ge,_e){var he=me._events;if(he===void 0)return[];var pe=he[ge];return pe===void 0?[]:typeof pe=="function"?_e?[pe.listener||pe]:[pe]:_e?ae(pe):x(pe,pe.length)}ue.prototype.listeners=function(ge){return b(this,ge,!0)},ue.prototype.rawListeners=function(ge){return b(this,ge,!1)},ue.listenerCount=function(me,ge){return typeof me.listenerCount=="function"?me.listenerCount(ge):z.call(me,ge)},ue.prototype.listenerCount=z;function z(me){var ge=this._events;if(ge!==void 0){var _e=ge[me];if(typeof _e=="function")return 1;if(_e!==void 0)return _e.length}return 0}ue.prototype.eventNames=function(){return this._eventsCount>0?ce(this._events):[]};function x(me,ge){for(var _e=new Array(ge),he=0;he<ge;++he)_e[he]=me[he];return _e}function re(me,ge){for(;ge+1<me.length;ge++)me[ge]=me[ge+1];me.pop()}function ae(me){for(var ge=new Array(me.length),_e=0;_e<ge.length;++_e)ge[_e]=me[_e].listener||me[_e];return ge}function oe(me,ge){return new Promise(function(_e,he){function pe(Te){me.removeListener(ge,ke),he(Te)}function ke(){typeof me.removeListener=="function"&&me.removeListener("error",pe),_e([].slice.call(arguments))}ye(me,ge,ke,{once:!0}),ge!=="error"&&ve(me,pe,{once:!0})})}function ve(me,ge,_e){typeof me.on=="function"&&ye(me,"error",ge,_e)}function ye(me,ge,_e,he){if(typeof me.on=="function")he.once?me.once(ge,_e):me.on(ge,_e);else if(typeof me.addEventListener=="function")me.addEventListener(ge,function pe(ke){he.once&&me.removeEventListener(ge,pe),_e(ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof me)}},24334:function($t,Dt,Se){var ce,ie;(function(Ce,ue){$t.exports=ue(Ce)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Se.g!="undefined"?Se.g:this,function(Ce){"use strict";Ce=Ce||{};var ue=Ce.Base64,se="2.6.4",te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",le=function(Xe){for(var ot={},We=0,rt=Xe.length;We<rt;We++)ot[Xe.charAt(We)]=We;return ot}(te),ee=String.fromCharCode,ne=function(Xe){if(Xe.length<2){var ot=Xe.charCodeAt(0);return ot<128?Xe: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+(Xe.charCodeAt(0)-55296)*1024+(Xe.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,b=function(Xe){return Xe.replace(E,ne)},z=function(Xe){var ot=[0,2,1][Xe.length%3],We=Xe.charCodeAt(0)<<16|(Xe.length>1?Xe.charCodeAt(1):0)<<8|(Xe.length>2?Xe.charCodeAt(2):0),rt=[te.charAt(We>>>18),te.charAt(We>>>12&63),ot>=2?"=":te.charAt(We>>>6&63),ot>=1?"=":te.charAt(We&63)];return rt.join("")},x=Ce.btoa&&typeof Ce.btoa=="function"?function(Xe){return Ce.btoa(Xe)}:function(Xe){if(Xe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Xe.replace(/[\s\S]{1,3}/g,z)},re=function(Xe){return x(b(String(Xe)))},ae=function(Xe){return Xe.replace(/[+\/]/g,function(ot){return ot=="+"?"-":"_"}).replace(/=/g,"")},oe=function(Xe,ot){return ot?ae(re(Xe)):re(Xe)},ve=function(Xe){return oe(Xe,!0)},ye;Ce.Uint8Array&&(ye=function(Xe,ot){for(var We="",rt=0,Ye=Xe.length;rt<Ye;rt+=3){var ut=Xe[rt],Ge=Xe[rt+1],ze=Xe[rt+2],Ve=ut<<16|Ge<<8|ze;We+=te.charAt(Ve>>>18)+te.charAt(Ve>>>12&63)+(typeof Ge!="undefined"?te.charAt(Ve>>>6&63):"=")+(typeof ze!="undefined"?te.charAt(Ve&63):"=")}return ot?ae(We):We});var me=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ge=function(Xe){switch(Xe.length){case 4:var ot=(7&Xe.charCodeAt(0))<<18|(63&Xe.charCodeAt(1))<<12|(63&Xe.charCodeAt(2))<<6|63&Xe.charCodeAt(3),We=ot-65536;return ee((We>>>10)+55296)+ee((We&1023)+56320);case 3:return ee((15&Xe.charCodeAt(0))<<12|(63&Xe.charCodeAt(1))<<6|63&Xe.charCodeAt(2));default:return ee((31&Xe.charCodeAt(0))<<6|63&Xe.charCodeAt(1))}},_e=function(Xe){return Xe.replace(me,ge)},he=function(Xe){var ot=Xe.length,We=ot%4,rt=(ot>0?le[Xe.charAt(0)]<<18:0)|(ot>1?le[Xe.charAt(1)]<<12:0)|(ot>2?le[Xe.charAt(2)]<<6:0)|(ot>3?le[Xe.charAt(3)]:0),Ye=[ee(rt>>>16),ee(rt>>>8&255),ee(rt&255)];return Ye.length-=[0,0,2,1][We],Ye.join("")},pe=Ce.atob&&typeof Ce.atob=="function"?function(Xe){return Ce.atob(Xe)}:function(Xe){return Xe.replace(/\S{1,4}/g,he)},ke=function(Xe){return pe(String(Xe).replace(/[^A-Za-z0-9\+\/]/g,""))},Te=function(Xe){return _e(pe(Xe))},Ee=function(Xe){return String(Xe).replace(/[-_]/g,function(ot){return ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Oe=function(Xe){return Te(Ee(Xe))},je;Ce.Uint8Array&&(je=function(Xe){return Uint8Array.from(ke(Ee(Xe)),function(ot){return ot.charCodeAt(0)})});var Pe=function(){var Xe=Ce.Base64;return Ce.Base64=ue,Xe};if(Ce.Base64={VERSION:se,atob:ke,btoa:x,fromBase64:Oe,toBase64:oe,utob:b,encode:oe,encodeURI:ve,btou:_e,decode:Oe,noConflict:Pe,fromUint8Array:ye,toUint8Array:je},typeof Object.defineProperty=="function"){var Qe=function(Xe){return{value:Xe,enumerable:!1,writable:!0,configurable:!0}};Ce.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Qe(function(){return Oe(this)})),Object.defineProperty(String.prototype,"toBase64",Qe(function(Xe){return oe(this,Xe)})),Object.defineProperty(String.prototype,"toBase64URI",Qe(function(){return oe(this,!0)}))}}return Ce.Meteor&&(Base64=Ce.Base64),$t.exports?$t.exports.Base64=Ce.Base64:(ce=[],ie=function(){return Ce.Base64}.apply(Dt,ce),ie!==void 0&&($t.exports=ie)),{Base64:Ce.Base64}})},2859:function($t,Dt,Se){"use strict";Se.d(Dt,{hP:function(){return bt}});var ce=function(He,Ae){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(be,Be){be.__proto__=Be}||function(be,Be){for(var Ke in Be)Object.prototype.hasOwnProperty.call(Be,Ke)&&(be[Ke]=Be[Ke])})(He,Ae)};function ie(He,Ae){function be(){this.constructor=He}ce(He,Ae),He.prototype=Ae===null?Object.create(Ae):(be.prototype=Ae.prototype,new be)}function Ce(He,Ae,be,Be){return new(be||(be=Promise))(function(Ke,Ne){function De(Ue){try{Le(Be.next(Ue))}catch(Me){Ne(Me)}}function we(Ue){try{Le(Be.throw(Ue))}catch(Me){Ne(Me)}}function Le(Ue){var Me;Ue.done?Ke(Ue.value):(Me=Ue.value,Me instanceof be?Me:new be(function(Re){Re(Me)})).then(De,we)}Le((Be=Be.apply(He,Ae||[])).next())})}function ue(He,Ae){var be,Be,Ke,Ne,De={label:0,sent:function(){if(1&Ke[0])throw Ke[1];return Ke[1]},trys:[],ops:[]};return Ne={next:we(0),throw:we(1),return:we(2)},typeof Symbol=="function"&&(Ne[Symbol.iterator]=function(){return this}),Ne;function we(Le){return function(Ue){return function(Me){if(be)throw new TypeError("Generator is already executing.");for(;De;)try{if(be=1,Be&&(Ke=2&Me[0]?Be.return:Me[0]?Be.throw||((Ke=Be.return)&&Ke.call(Be),0):Be.next)&&!(Ke=Ke.call(Be,Me[1])).done)return Ke;switch(Be=0,Ke&&(Me=[2&Me[0],Ke.value]),Me[0]){case 0:case 1:Ke=Me;break;case 4:return De.label++,{value:Me[1],done:!1};case 5:De.label++,Be=Me[1],Me=[0];continue;case 7:Me=De.ops.pop(),De.trys.pop();continue;default:if(Ke=De.trys,!((Ke=Ke.length>0&&Ke[Ke.length-1])||Me[0]!==6&&Me[0]!==2)){De=0;continue}if(Me[0]===3&&(!Ke||Me[1]>Ke[0]&&Me[1]<Ke[3])){De.label=Me[1];break}if(Me[0]===6&&De.label<Ke[1]){De.label=Ke[1],Ke=Me;break}if(Ke&&De.label<Ke[2]){De.label=Ke[2],De.ops.push(Me);break}Ke[2]&&De.ops.pop(),De.trys.pop();continue}Me=Ae.call(He,De)}catch(Re){Me=[6,Re],Be=0}finally{be=Ke=0}if(5&Me[0])throw Me[1];return{value:Me[0]?Me[1]:void 0,done:!0}}([Le,Ue])}}}function se(){for(var He=0,Ae=0,be=arguments.length;Ae<be;Ae++)He+=arguments[Ae].length;var Be=Array(He),Ke=0;for(Ae=0;Ae<be;Ae++)for(var Ne=arguments[Ae],De=0,we=Ne.length;De<we;De++,Ke++)Be[Ke]=Ne[De];return Be}var te=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(Ae,be){for(var Be=0,Ke=be;Be<Ke.length;Be++){var Ne=Ke[Be],De=Ne[0],we=Ne[1];Ae.setAttribute(De,we)}},He.createRect=function(Ae,be,Be){var Ke=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ke.setAttribute("width",Ae.toString()),Ke.setAttribute("height",be.toString()),Be&&He.setAttributes(Ke,Be),Ke},He.createLine=function(Ae,be,Be,Ke,Ne){var De=document.createElementNS("http://www.w3.org/2000/svg","line");return De.setAttribute("x1",Ae.toString()),De.setAttribute("y1",be.toString()),De.setAttribute("x2",Be.toString()),De.setAttribute("y2",Ke.toString()),Ne&&He.setAttributes(De,Ne),De},He.createPolygon=function(Ae,be){var Be=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Be.setAttribute("points",Ae),be&&He.setAttributes(Be,be),Be},He.createCircle=function(Ae,be){var Be=document.createElementNS("http://www.w3.org/2000/svg","circle");return Be.setAttribute("cx",(Ae/2).toString()),Be.setAttribute("cy",(Ae/2).toString()),Be.setAttribute("r",Ae.toString()),be&&He.setAttributes(Be,be),Be},He.createEllipse=function(Ae,be,Be){var Ke=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ke.setAttribute("cx",(Ae/2).toString()),Ke.setAttribute("cy",(be/2).toString()),Ke.setAttribute("rx",(Ae/2).toString()),Ke.setAttribute("ry",(be/2).toString()),Be&&He.setAttributes(Ke,Be),Ke},He.createGroup=function(Ae){var be=document.createElementNS("http://www.w3.org/2000/svg","g");return Ae&&He.setAttributes(be,Ae),be},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(Ae,be,Be,Ke,Ne,De,we){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(Le,[["id",Ae],["orient",be],["markerWidth",Be.toString()],["markerHeight",Ke.toString()],["refX",Ne.toString()],["refY",De.toString()]]),Le.appendChild(we),Le},He.createText=function(Ae){var be=document.createElementNS("http://www.w3.org/2000/svg","text");return be.setAttribute("x","0"),be.setAttribute("y","0"),Ae&&He.setAttributes(be,Ae),be},He.createTSpan=function(Ae,be){var Be=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Be.textContent=Ae,be&&He.setAttributes(Be,be),Be},He.createImage=function(Ae){var be=document.createElementNS("http://www.w3.org/2000/svg","image");return Ae&&He.setAttributes(be,Ae),be},He.createPoint=function(Ae,be){var Be=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Be.x=Ae,Be.y=be,Be},He.createPath=function(Ae,be){var Be=document.createElementNS("http://www.w3.org/2000/svg","path");return Be.setAttribute("d",Ae),be&&He.setAttributes(Be,be),Be},He}(),le=function(){function He(){}return He.addKey=function(Ae){He.key=Ae},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),ee=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(Ae,be,Be){var Ke=this;return new Promise(function(Ne){var De=Be!==void 0?Be:document.createElement("canvas");Ae===null&&(Ke.markersOnly=!0,Ke.naturalSize=!1);var we=document.createElementNS("http://www.w3.org/2000/svg","svg");we.setAttribute("xmlns","http://www.w3.org/2000/svg"),we.setAttribute("width",be.width.baseVal.valueAsString),we.setAttribute("height",be.height.baseVal.valueAsString),we.setAttribute("viewBox","0 0 "+be.viewBox.baseVal.width.toString()+" "+be.viewBox.baseVal.height.toString()),we.innerHTML=be.innerHTML,Ke.naturalSize===!0?(we.width.baseVal.value=Ae.naturalWidth,we.height.baseVal.value=Ae.naturalHeight):Ke.width!==void 0&&Ke.height!==void 0&&(we.width.baseVal.value=Ke.width,we.height.baseVal.value=Ke.height),De.width=we.width.baseVal.value,De.height=we.height.baseVal.value;var Le=we.outerHTML,Ue=De.getContext("2d");Ke.markersOnly!==!0&&Ue.drawImage(Ae,0,0,De.width,De.height);var Me=window.URL,Re=new Image(De.width,De.height);Re.setAttribute("crossOrigin","anonymous");var tt=new Blob([Le],{type:"image/svg+xml"}),lt=Me.createObjectURL(tt);Re.onload=function(){Ue.drawImage(Re,0,0),Me.revokeObjectURL(lt);var Pt=De.toDataURL(Ke.imageType,Ke.imageQuality);Ne(Pt)},Re.src=lt})},He}(),ne=function(){},E=function(){function He(Ae){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ae+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.prototype.addClass=function(Ae){return this.styleSheet===void 0&&this.addStyleSheet(),Ae.name=""+this.classNamePrefix+Ae.localName,this.classes.push(Ae),this.styleSheet.sheet.insertRule("."+Ae.name+" {"+Ae.style+"}",this.styleSheet.sheet.cssRules.length),Ae},He.prototype.addRule=function(Ae){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ae),this.styleSheet.sheet.insertRule(Ae.selector+" {"+Ae.style+"}",this.styleSheet.sheet.cssRules.length)},He.prototype.addStyleSheet=function(){var Ae;this.styleSheet=document.createElement("style"),((Ae=this.styleSheetRoot)!==null&&Ae!==void 0?Ae:document.head).appendChild(this.styleSheet),this.addRule(new b("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new b("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new b("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new z("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new z("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},He.prototype.removeStyleSheet=function(){var Ae;this.styleSheet&&(((Ae=this.styleSheetRoot)!==null&&Ae!==void 0?Ae:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),b=function(He,Ae){this.selector=He,this.style=Ae},z=function(He,Ae){this.localName=He,this.style=Ae},x=function(){function He(Ae,be,Be,Ke,Ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ae,this.displayMode=be,this.markerItems=Be,this.uiStyleSettings=Ke,this.styles=Ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(Ae){var be=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ae,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Be=document.createElement("div");Be.className=this.toolbarBlockStyleClass.name,Be.style.whiteSpace="nowrap",this.uiContainer.appendChild(Be),this.addActionButton(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<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(Be,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Ne){var De=document.createElement("div");De.className=""+be.toolbarButtonStyleClass.name,De.setAttribute("data-type-name",Ne.typeName),De.innerHTML=Ne.icon,De.addEventListener("click",function(){be.markerToolbarButtonClicked(De,Ne)}),be.buttons.push(De),be.markerButtons.push(De)}),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 Ke=document.createElement("div");Ke.className=this.toolbarBlockStyleClass.name,Ke.style.whiteSpace="nowrap",Ke.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ke),this.addActionButton(Ke,'<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(Ke,'<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()},He.prototype.addButtonClickListener=function(Ae){this.buttonClickListeners.push(Ae)},He.prototype.removeButtonClickListener=function(Ae){this.buttonClickListeners.indexOf(Ae)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ae),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ae=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var be=0;be<this.markerButtons.length;be++)be<Ae||be===Ae&&this.markerButtons.length-1===Ae?this.markerButtonBlock.appendChild(this.markerButtons[be]):(be===Ae&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[be]))}},He.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")},He.prototype.resetButtonStyles=function(){var Ae=this;this.buttons.forEach(function(be){be.className=be.className.replace(Ae.uiStyleSettings.toolbarButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarButtonStyleColorsClassName:Ae.toolbarButtonStyleColorsClass.name,"").trim(),be.className=be.className.replace(Ae.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ae.toolbarActiveButtonStyleColorsClass.name,"").trim(),be.className+=" "+(Ae.uiStyleSettings.toolbarButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarButtonStyleColorsClassName:Ae.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(Ae,be,Be){var Ke=this,Ne=document.createElement("div");switch(Ne.className=""+this.toolbarButtonStyleClass.name,Ne.innerHTML=be,Ne.setAttribute("data-action",Be),Ne.addEventListener("click",function(){Ke.actionToolbarButtonClicked(Ne,Be)}),Be){case"select":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ne.style.fill=this.uiStyleSettings.closeButtonColor}Ae.appendChild(Ne),this.buttons.push(Ne)},He.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new z("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 z("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new z("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new z("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 z("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ae=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new z("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ae)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ae)+`px;
padding: `+Ae+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new z("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new z("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new b("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new b("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},He.prototype.markerToolbarButtonClicked=function(Ae,be){this.setActiveButton(Ae),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("marker",be)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(Ae,be){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("action",be)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.prototype.setActiveButton=function(Ae){this.resetButtonStyles(),Ae.className=Ae.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ae.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},He.prototype.setActiveMarkerButton=function(Ae){var be=this.markerButtons.find(function(Be){return Be.getAttribute("data-type-name")===Ae});be&&this.setActiveButton(be)},He.prototype.setCurrentMarker=function(Ae){var be=this;this.currentMarker=Ae,this.buttons.filter(function(Be){return/delete|notes/.test(Be.getAttribute("data-action"))}).forEach(function(Be){be.currentMarker===void 0?(Be.style.fillOpacity="0.4",Be.style.pointerEvents="none"):(Be.style.fillOpacity="1",Be.style.pointerEvents="all")})},He}(),re=function(){function He(Ae,be,Be,Ke){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ae,this.displayMode=be,this.uiStyleSettings=Be,this.styles=Ke,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.prototype.addStyles=function(){var Ae;this.toolboxStyleClass=this.styles.addClass(new z("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 z("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new z("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new z("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new z("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 z("toolbox-panel-row_colors",`
background-color: `+((Ae=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ae!==void 0?Ae:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new z("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
padding: `+be+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new z("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new z("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new b("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new b("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},He.prototype.show=function(Ae){var be;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ae,this.uiContainer.className=this.toolboxStyleClass.name+" "+((be=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&be!==void 0?be:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(Ae){var be,Be,Ke=this;this.panels=Ae,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((be=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&be!==void 0?be:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ne){var De;Ne.uiStyleSettings=Ke.uiStyleSettings;var we=document.createElement("div");we.className=Ke.toolboxButtonStyleClass.name+" "+((De=Ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&De!==void 0?De:Ke.toolboxButtonStyleColorsClass.name),we.innerHTML=Ne.icon,we.title=Ne.title,we.addEventListener("click",function(){Ke.panelButtonClick(Ne)}),Ke.panelButtons.push(we),Ke.buttonRow.appendChild(we)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(Ae){var be=this,Be=-1;if(Ae!==this.activePanel){Be=this.panels.indexOf(Ae),this.panelRow.innerHTML="";var Ke=Ae.getUi();Ke.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ke),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=Ae}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){be.displayMode==="inline"?be.panelRow.style.display="none":be.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ne,De){var we,Le;Ne.className=be.toolboxButtonStyleClass.name+" "+(De===Be?""+((we=be.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&we!==void 0?we:be.toolboxActiveButtonStyleColorsClass.name):""+((Le=be.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Le!==void 0?Le:be.toolboxButtonStyleColorsClass.name))})},He}(),ae=function(He,Ae){this.title=He,this.icon=Ae},oe=function(He){function Ae(be,Be,Ke,Ne){var De=He.call(this,be,Ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return De.colors=[],De.addTransparent=!1,De.colorBoxes=[],De.colors=Be,De.currentColor=Ke,De.setCurrentColor=De.setCurrentColor.bind(De),De.getColorBox=De.getColorBox.bind(De),De}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.whiteSpace="nowrap",this.colors.forEach(function(Ke){var Ne=be.getColorBox(Ke);Be.appendChild(Ne),be.colorBoxes.push(Ne)}),Be},Ae.prototype.getColorBox=function(be){var Be=this,Ke=this.uiStyleSettings.toolbarHeight/4,Ne=this.uiStyleSettings.toolbarHeight-Ke,De=document.createElement("div");De.style.display="inline-block",De.style.boxSizing="content-box",De.style.width=Ne-2+"px",De.style.height=Ne-2+"px",De.style.padding="1px",De.style.marginRight="2px",De.style.marginBottom="2px",De.style.borderWidth="2px",De.style.borderStyle="solid",De.style.borderRadius=(Ne+2)/2+"px",De.style.borderColor=be===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",De.addEventListener("click",function(){Be.setCurrentColor(be,De)});var we=document.createElement("div");return we.style.display="inline-block",we.style.width=Ne-2+"px",we.style.height=Ne-2+"px",we.style.backgroundColor=be,we.style.borderRadius=Ne/2+"px",be==="transparent"&&(we.style.fill=this.uiStyleSettings.toolboxAccentColor,we.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>`),De.appendChild(we),De},Ae.prototype.setCurrentColor=function(be,Be){var Ke=this;this.currentColor=be,this.colorBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(be)},Ae}(ae),ve=function(){function He(Ae,be,Be){this._state="new",this._isSelected=!1,this._container=Ae,this._overlayContainer=be,this.globalSettings=Be,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(Ae){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(Ae,be){},He.prototype.dblClick=function(Ae,be){},He.prototype.manipulate=function(Ae){},He.prototype.pointerUp=function(Ae){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(Ae){this.container.childNodes.length>0?this.container.insertBefore(Ae,this.container.childNodes[0]):this.container.appendChild(Ae)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(Ae){this._state=Ae.state,this.notes=Ae.notes},He.prototype.scale=function(Ae,be){},He.prototype.colorChanged=function(Ae){this.onColorChanged&&this.onColorChanged(Ae),this.stateChanged()},He.prototype.fillColorChanged=function(Ae){this.onFillColorChanged&&this.onFillColorChanged(Ae),this.stateChanged()},He.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ae=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ae.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ae)&&this.onStateChanged(this)}},He.typeName="MarkerBase",He}(),ye=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.prototype.findGripByVisual=function(Ae){return this.topLeft.ownsTarget(Ae)?this.topLeft:this.topCenter.ownsTarget(Ae)?this.topCenter:this.topRight.ownsTarget(Ae)?this.topRight:this.centerLeft.ownsTarget(Ae)?this.centerLeft:this.centerRight.ownsTarget(Ae)?this.centerRight:this.bottomLeft.ownsTarget(Ae)?this.bottomLeft:this.bottomCenter.ownsTarget(Ae)?this.bottomCenter:this.bottomRight.ownsTarget(Ae)?this.bottomRight:void 0},He}(),me=function(){function He(){this.GRIP_SIZE=10,this.visual=te.createGroup(),this.visual.appendChild(te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return He.prototype.ownsTarget=function(Ae){return Ae===this.visual||Ae===this.visual.childNodes[0]||Ae===this.visual.childNodes[1]},He}(),ge=function(){function He(){}return He.toITransformMatrix=function(Ae){return{a:Ae.a,b:Ae.b,c:Ae.c,d:Ae.d,e:Ae.e,f:Ae.f}},He.toSVGMatrix=function(Ae,be){return Ae.a=be.a,Ae.b=be.b,Ae.c=be.c,Ae.d=be.d,Ae.e=be.e,Ae.f=be.f,Ae},He}(),_e=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.left=0,Ne.top=0,Ne.width=0,Ne.height=0,Ne.defaultSize={x:50,y:20},Ne.offsetX=0,Ne.offsetY=0,Ne.rotationAngle=0,Ne.CB_DISTANCE=10,Ne._suppressMarkerCreateEvent=!1,Ne.container.transform.baseVal.appendItem(te.createTransform()),Ne.setupControlBox(),Ne}return ie(Ae,He),Object.defineProperty(Ae.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"visual",{get:function(){return this._visual},set:function(be){this._visual=be;var Be=te.createTransform();this._visual.transform.baseVal.appendItem(Be)},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(be){return!!He.prototype.ownsTarget.call(this,be)||!!(this.controlGrips.findGripByVisual(be)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(be))},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="new"&&(this.left=be.x,this.top=be.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ke=this.unrotatePoint(be);if(this.manipulationStartX=Ke.x,this.manipulationStartY=Ke.y,this.offsetX=Ke.x-this.left,this.offsetY=Ke.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Be),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be)){this.activeGrip=this.rotatorGrip;var Ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ne.x-this.width/2,this.top=Ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var De=this.container.transform.baseVal.getItem(0);De.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(De,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ae.prototype.pointerUp=function(be){var Be=this.state;He.prototype.pointerUp.call(this,be),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(be),this._state="select",Be==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ae.prototype.moveVisual=function(be){this.visual.style.transform="translate("+be.x+"px, "+be.y+"px)"},Ae.prototype.manipulate=function(be){var Be=this.unrotatePoint(be);this.state==="creating"?this.resize(be):this.state==="move"?(this.left=this.manipulationStartLeft+(Be.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Be.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Be):this.state==="rotate"&&this.rotate(be)},Ae.prototype.resize=function(be){var Be=this.manipulationStartLeft,Ke=this.manipulationStartWidth,Ne=this.manipulationStartTop,De=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Be=this.manipulationStartLeft+be.x-this.manipulationStartX,Ke=this.manipulationStartWidth+this.manipulationStartLeft-Be;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ke=this.manipulationStartWidth+be.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ne=this.manipulationStartTop+be.y-this.manipulationStartY,De=this.manipulationStartHeight+this.manipulationStartTop-Ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:De=this.manipulationStartHeight+be.y-this.manipulationStartY}Ke>=0?(this.left=Be,this.width=Ke):(this.left=Be+Ke,this.width=-Ke),De>=0?(this.top=Ne,this.height=De):(this.top=Ne+De,this.height=-De),this.setSize()},Ae.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ae.prototype.rotate=function(be){if(Math.abs(be.x-this.centerX)>.1){var Be=Math.sign(be.x-this.centerX);this.rotationAngle=180*Math.atan((be.y-this.centerY)/(be.x-this.centerX))/Math.PI+90*Be,this.applyRotation()}},Ae.prototype.applyRotation=function(){var be=this.container.transform.baseVal.getItem(0);be.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(be,0)},Ae.prototype.rotatePoint=function(be){if(this.rotationAngle===0)return be;var Be=this.container.getCTM(),Ke=te.createPoint(be.x,be.y);return{x:(Ke=Ke.matrixTransform(Be)).x,y:Ke.y}},Ae.prototype.unrotatePoint=function(be){if(this.rotationAngle===0)return be;var Be=this.container.getCTM();Be=Be.inverse();var Ke=te.createPoint(be.x,be.y);return{x:(Ke=Ke.matrixTransform(Be)).x,y:Ke.y}},Ae.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ae.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Ae.prototype.setupControlBox=function(){this.controlBox=te.createGroup();var be=te.createTransform();be.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(be),this.container.appendChild(this.controlBox),this.controlRect=te.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=te.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 ye,this.addControlGrips(),this.controlBox.style.display="none"},Ae.prototype.adjustControlBox=function(){var be=this.controlBox.transform.baseVal.getItem(0);be.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(be,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()},Ae.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()},Ae.prototype.createGrip=function(){var be=new me;return be.visual.transform.baseVal.appendItem(te.createTransform()),this.controlBox.appendChild(be.visual),be},Ae.prototype.positionGrips=function(){var be=this.controlGrips.topLeft.GRIP_SIZE,Be=-be/2,Ke=Be,Ne=(this.width+this.CB_DISTANCE)/2-be/2,De=(this.height+this.CB_DISTANCE)/2-be/2,we=this.height+this.CB_DISTANCE-be/2,Le=this.width+this.CB_DISTANCE-be/2;this.positionGrip(this.controlGrips.topLeft.visual,Be,Ke),this.positionGrip(this.controlGrips.topCenter.visual,Ne,Ke),this.positionGrip(this.controlGrips.topRight.visual,Le,Ke),this.positionGrip(this.controlGrips.centerLeft.visual,Be,De),this.positionGrip(this.controlGrips.centerRight.visual,Le,De),this.positionGrip(this.controlGrips.bottomLeft.visual,Be,we),this.positionGrip(this.controlGrips.bottomCenter.visual,Ne,we),this.positionGrip(this.controlGrips.bottomRight.visual,Le,we),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ne,Ke-3*this.CB_DISTANCE)},Ae.prototype.positionGrip=function(be,Be,Ke){var Ne=be.transform.baseVal.getItem(0);Ne.setTranslate(Be,Ke),be.transform.baseVal.replaceItem(Ne,0)},Ae.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ae.prototype.showControlBox=function(){this.controlBox.style.display=""},Ae.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be);var Be=be;this.left=Be.left,this.top=Be.top,this.width=Be.width,this.height=Be.height,this.rotationAngle=Be.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Be.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Be.containerTransformMatrix))},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be);var Ke=this.rotatePoint({x:this.left,y:this.top}),Ne=this.unrotatePoint({x:Ke.x*be,y:Ke.y*Be});this.left=Ne.x,this.top=Ne.y,this.width=this.width*be,this.height=this.height*Be,this.adjustControlBox()},Ae}(ve),he=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual)},Ae.prototype.createVisual=function(){this.visual=te.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)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(be),this._state="creating")},Ae.prototype.manipulate=function(be){He.prototype.manipulate.call(this,be)},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),this.setSize()},Ae.prototype.setSize=function(){He.prototype.setSize.call(this),te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ae.prototype.pointerUp=function(be){He.prototype.pointerUp.call(this,be),this.setSize()},Ae.prototype.setStrokeColor=function(be){this.strokeColor=be,this.visual&&te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(be),this.stateChanged()},Ae.prototype.setFillColor=function(be){this.fillColor=be,this.visual&&te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ae.prototype.setStrokeWidth=function(be){this.strokeWidth=be,this.visual&&te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(be){this.strokeDasharray=be,this.visual&&te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ae.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},Ae.prototype.restoreState=function(be){var Be=be;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),He.prototype.restoreState.call(this,be),this.setSize()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.setSize()},Ae.title="Rectangle marker",Ae}(_e),pe=function(He){function Ae(be,Be,Ke,Ne){var De=He.call(this,be,Ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return De.widths=[],De.widthBoxes=[],De.widths=Be,De.currentWidth=Ke,De.setCurrentWidth=De.setCurrentWidth.bind(De),De}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.widths.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.flexGrow="2",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=Ke===be.currentWidth?be.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){be.setCurrentWidth(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.innerText=Ke.toString(),De.style.marginRight="5px",Ne.appendChild(De);var we=document.createElement("div");we.style.minHeight="20px",we.style.flexGrow="2",we.style.display="flex",we.style.alignItems="center";var Le=document.createElement("hr");Le.style.minWidth="20px",Le.style.border="0px",Le.style.borderTop=Ke+"px solid "+be.uiStyleSettings.toolboxColor,Le.style.flexGrow="2",we.appendChild(Le),Ne.appendChild(we),be.widthBoxes.push(Ne)}),Be},Ae.prototype.setCurrentWidth=function(be,Be){var Ke=this;this.currentWidth=be,this.widthBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ae}(ae),ke=function(He){function Ae(be,Be,Ke,Ne){var De=He.call(this,be,Ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return De.styles=[],De.styleBoxes=[],De.styles=Be,De.currentStyle=Ke,De.setCurrentStyle=De.setCurrentStyle.bind(De),De}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.styles.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/be.styles.length-5+"%",Ne.style.borderColor=Ke===be.currentStyle?be.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){be.setCurrentStyle(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.overflow="hidden";var we=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+be.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ke!==""?'stroke-dasharray="'+Ke+'"':"")+` />
</svg>`;De.innerHTML=we,Ne.appendChild(De),be.styleBoxes.push(Ne)}),Be},Ae.prototype.setCurrentStyle=function(be,Be){var Ke=this;this.currentStyle=be,this.styleBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ae}(ae),Te=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,He),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=He.prototype.getState.call(this);return be.typeName=Ae.typeName,be},Ae.typeName="FrameMarker",Ae.title="Frame marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ae}(he),Ee=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"},Oe=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.x1=0,Ne.y1=0,Ne.x2=0,Ne.y2=0,Ne.defaultLength=50,Ne.manipulationStartX=0,Ne.manipulationStartY=0,Ne.manipulationStartX1=0,Ne.manipulationStartY1=0,Ne.manipulationStartX2=0,Ne.manipulationStartY2=0,Ne.setupControlBox(),Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!!He.prototype.ownsTarget.call(this,be)||!(!this.grip1.ownsTarget(be)&&!this.grip2.ownsTarget(be))},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.manipulationStartX=be.x,this.manipulationStartY=be.y,this.state==="new"&&(this.x1=be.x,this.y1=be.y,this.x2=be.x,this.y2=be.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(Be)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Be)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ae.prototype.pointerUp=function(be){var Be=this.state;He.prototype.pointerUp.call(this,be),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(be),this._state="select",Be==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ae.prototype.adjustVisual=function(){},Ae.prototype.manipulate=function(be){this.state==="creating"?this.resize(be):this.state==="move"?(this.x1=this.manipulationStartX1+be.x-this.manipulationStartX,this.y1=this.manipulationStartY1+be.y-this.manipulationStartY,this.x2=this.manipulationStartX2+be.x-this.manipulationStartX,this.y2=this.manipulationStartY2+be.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(be)},Ae.prototype.resize=function(be){switch(this.activeGrip){case this.grip1:this.x1=be.x,this.y1=be.y;break;case this.grip2:case void 0:this.x2=be.x,this.y2=be.y}this.adjustVisual(),this.adjustControlBox()},Ae.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ae.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Ae.prototype.setupControlBox=function(){this.controlBox=te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ae.prototype.adjustControlBox=function(){this.positionGrips()},Ae.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ae.prototype.createGrip=function(){var be=new me;return be.visual.transform.baseVal.appendItem(te.createTransform()),this.controlBox.appendChild(be.visual),be},Ae.prototype.positionGrips=function(){var be=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-be/2,this.y1-be/2),this.positionGrip(this.grip2.visual,this.x2-be/2,this.y2-be/2)},Ae.prototype.positionGrip=function(be,Be,Ke){var Ne=be.transform.baseVal.getItem(0);Ne.setTranslate(Be,Ke),be.transform.baseVal.replaceItem(Ne,0)},Ae.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be);var Be=be;this.x1=Be.x1,this.y1=Be.y1,this.x2=Be.x2,this.y2=Be.y2},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.x1=this.x1*be,this.y1=this.y1*Be,this.x2=this.x2*be,this.y2=this.y2*Be,this.adjustVisual(),this.adjustControlBox()},Ae}(ve),je=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual&&be!==this.selectorLine&&be!==this.visibleLine)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.selectorLine=te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=te.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)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ae.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()),te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ae.prototype.setStrokeColor=function(be){this.strokeColor=be,this.adjustVisual(),this.colorChanged(be)},Ae.prototype.setStrokeWidth=function(be){this.strokeWidth=be,this.adjustVisual()},Ae.prototype.setStrokeDasharray=function(be){this.strokeDasharray=be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be);var Be=be;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.createVisual(),this.adjustVisual()},Ae.typeName="LineMarker",Ae.title="Line marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ae}(Oe),Pe=function(He){function Ae(be,Be,Ke,Ne){var De=He.call(this,be,Ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return De.fonts=[],De.fontBoxes=[],De.fonts=Be,De.currentFont=Ke,De.setCurrentFont=De.setCurrentFont.bind(De),De}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.flexGrow="2",this.fonts.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="inline-block",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/be.fonts.length-5+"%",Ne.style.borderColor=Ke===be.currentFont?be.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){be.setCurrentFont(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.style.display="flex",De.style.minHeight="20px",De.style.flexGrow="2",De.style.fontFamily=Ke,De.style.overflow="hidden";var we=document.createElement("div");we.style.whiteSpace="nowrap",we.style.overflow="hidden",we.style.textOverflow="ellipsis",we.innerHTML="The quick brown fox jumps over the lazy dog",De.appendChild(we),Ne.appendChild(De),be.fontBoxes.push(Ne)}),Be},Ae.prototype.setCurrentFont=function(be,Be){var Ke=this;this.currentFont=be,this.fontBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ae}(ae),Qe=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.color="transparent",Ne.padding=5,Ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ne.text=Ne.DEFAULT_TEXT,Ne.isMoved=!1,Ne.color=Ke.defaultColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setColor=Ne.setColor.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.renderText=Ne.renderText.bind(Ne),Ne.sizeText=Ne.sizeText.bind(Ne),Ne.textEditDivClicked=Ne.textEditDivClicked.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.setSize=Ne.setSize.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.colorPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){if(He.prototype.ownsTarget.call(this,be)||be===this.visual||be===this.textElement||be===this.bgRectangle)return!0;var Be=!1;return this.textElement.childNodes.forEach(function(Ke){Ke===be&&(Be=!0)}),Be},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.bgRectangle=te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(te.createTransform()),this.textElement.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.isMoved=!1,this.pointerDownPoint=be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(be),this._state="creating")},Ae.prototype.renderText=function(){var be=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(Be){be.textElement.appendChild(te.createTSpan(Be.trim()===""?" ":Be.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ae.prototype.getTextScale=function(){var be=this.textElement.getBBox(),Be=1;if(be.width>0&&be.height>0){var Ke=(1*this.width-this.width*this.padding*2/100)/be.width,Ne=(1*this.height-this.height*this.padding*2/100)/be.height;Be=Math.min(Ke,Ne)}return Be},Ae.prototype.getTextPosition=function(be){var Be=this.textElement.getBBox(),Ke=0,Ne=0;return Be.width>0&&Be.height>0&&(Ke=(this.width-Be.width*be)/2,Ne=this.height/2-Be.height*be/2),{x:Ke,y:Ne}},Ae.prototype.sizeText=function(){var be=this.textElement.getBBox(),Be=this.getTextScale(),Ke=this.getTextPosition(Be);Ke.y-=be.y*Be,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ke.x+"px, "+Ke.y+"px) scale("+Be+", "+Be+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ke.x,Ke.y),this.textElement.transform.baseVal.getItem(1).setScale(Be,Be))},Ae.prototype.manipulate=function(be){He.prototype.manipulate.call(this,be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(be.x-this.pointerDownPoint.x)>5||Math.abs(be.y-this.pointerDownPoint.y)>5)},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),this.isMoved=!0,this.setSize(),this.sizeText()},Ae.prototype.setSize=function(){He.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ae.prototype.pointerUp=function(be){var Be=this.state;Be==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,be),this.setSize(),(Be==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ae.prototype.showTextEditor=function(){var be=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(Be){Be.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Be=Number.parseFloat(be.textEditor.style.fontSize);be.textEditor.clientWidth>=Number.parseInt(be.textEditor.style.maxWidth)&&Be>.9;)Be-=.1,be.textEditor.style.fontSize=Math.max(Be,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Be){if(Be.clipboardData){var Ke=Be.clipboardData.getData("text"),Ne=window.getSelection();if(!Ne.rangeCount)return!1;Ne.deleteFromDocument(),Ne.getRangeAt(0).insertNode(document.createTextNode(Ke)),Be.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){be.textEditDivClicked(be.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ae.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var be=this.getTextScale(),Be=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ke=this.textElement.getBBox(),Ne={x:Ke.width*be,y:Ke.height*be};Be.x-=Ne.x/2,Be.y-=Ne.y/2,this.textEditor.style.top=Be.y+"px",this.textEditor.style.left=Be.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Be.x+"px",this.textEditor.style.fontSize=Math.max(16*be,12)+"px",this.textElement.style.display="none"}},Ae.prototype.textEditDivClicked=function(be){this.text=be.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ae.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ae.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},Ae.prototype.dblClick=function(be,Be){He.prototype.dblClick.call(this,be,Be),this.showTextEditor()},Ae.prototype.setColor=function(be){this.textElement&&te.setAttributes(this.textElement,[["fill",be]]),this.color=be,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(be)},Ae.prototype.setFont=function(be){this.textElement&&te.setAttributes(this.textElement,[["font-family",be]]),this.fontFamily=be,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ae.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ae.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){var Be=be;this.color=Be.color,this.fontFamily=Be.fontFamily,this.padding=Be.padding,this.text=Be.text,this.createVisual(),He.prototype.restoreState.call(this,be),this.setSize()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.setSize(),this.sizeText(),this.positionTextEditor()},Ae.typeName="TextMarker",Ae.title="Text marker",Ae.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>',Ae}(_e),Xe=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.color="transparent",Ne.lineWidth=3,Ne.drawing=!1,Ne.pixelRatio=1,Ne.color=Ke.defaultColor,Ne.lineWidth=Ke.defaultStrokeWidth,Ne.pixelRatio=Ke.freehandPixelRatio,Ne.setColor=Ne.setColor.bind(Ne),Ne.addCanvas=Ne.addCanvas.bind(Ne),Ne.finishCreation=Ne.finishCreation.bind(Ne),Ne.setLineWidth=Ne.setLineWidth.bind(Ne),Ne.colorPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.lineWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.lineWidthPanel.onWidthChanged=Ne.setLineWidth,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual&&be!==this.drawingImage)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.drawingImage=te.createImage(),this.visual.appendChild(this.drawingImage);var be=te.createTransform();this.visual.transform.baseVal.appendItem(be),this.addMarkerVisualToContainer(this.visual)},Ae.prototype.pointerDown=function(be,Be){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(be.x,be.y),this.drawing=!0):He.prototype.pointerDown.call(this,be,Be)},Ae.prototype.manipulate=function(be){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(be.x,be.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,be)},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ae.prototype.pointerUp=function(be){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,be)},Ae.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)},Ae.prototype.select=function(){this.state==="creating"&&this.finishCreation(),He.prototype.select.call(this)},Ae.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},Ae.prototype.finishCreation=function(){for(var be=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Be=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ke=Be[0],Ne=Be[1],De=Be[2],we=Be[3],Le=!1,Ue=0;Ue<this.canvasElement.height;Ue++)for(var Me=0;Me<this.canvasElement.width;Me++)be.data[Ue*this.canvasElement.width*4+4*Me+3]>0&&(Le=!0,Ue<Ne&&(Ne=Ue),Me<Ke&&(Ke=Me),Ue>we&&(we=Ue),Me>De&&(De=Me));if(Le){this.left=Ke/this.pixelRatio,this.top=Ne/this.pixelRatio,this.width=(De-Ke)/this.pixelRatio,this.height=(we-Ne)/this.pixelRatio;var Re=document.createElement("canvas");Re.width=De-Ke,Re.height=we-Ne,Re.getContext("2d").putImageData(this.canvasContext.getImageData(Ke,Ne,De-Ke,we-Ne),0,0),this.drawingImgUrl=Re.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ae.prototype.setDrawingImage=function(){te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ae.prototype.setColor=function(be){this.color=be,this.colorChanged(be)},Ae.prototype.setLineWidth=function(be){this.lineWidth=be},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){this.createVisual(),He.prototype.restoreState.call(this,be),this.drawingImgUrl=be.drawingImgUrl,this.setDrawingImage()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.setDrawingImage()},Ae.typeName="FreehandMarker",Ae.title="Freehand marker",Ae.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>',Ae}(_e),ot=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Ke||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ne.typeBoxes=[],Ne.currentType=Be,Ne.setCurrentType=Ne.setCurrentType.bind(Ne),Ne}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2";for(var Ke=function(we){var Le="both";switch(we){case 0:Le="both";break;case 1:Le="start";break;case 2:Le="end";break;case 3:Le="none"}var Ue=document.createElement("div");if(Ue.style.display="flex",Ue.style.flexGrow="2",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=Le===Ne.currentType?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){be.setCurrentType(Le,Ue)}),Be.appendChild(Ue),Le==="both"||Le==="start"){var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Me.style.marginLeft="5px",Ue.appendChild(Me)}var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.style.flexGrow="2";var tt=document.createElement("hr");if(tt.style.minWidth="20px",tt.style.border="0px",tt.style.borderTop="3px solid "+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee"),tt.style.flexGrow="2",Re.appendChild(tt),Ue.appendChild(Re),Le==="both"||Le==="end"){var lt=document.createElement("div");lt.style.display="flex",lt.style.alignItems="center",lt.style.minHeight="20px",lt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,lt.style.marginRight="5px",Ue.appendChild(lt)}Ne.typeBoxes.push(Ue)},Ne=this,De=0;De<4;De++)Ke(De);return Be},Ae.prototype.setCurrentType=function(be,Be){var Ke=this;this.currentType=be,this.typeBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings!==void 0?Ke.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ae}(ae),We=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.arrowType="end",Ne.arrowBaseHeight=10,Ne.arrowBaseWidth=10,Ne.getArrowPoints=Ne.getArrowPoints.bind(Ne),Ne.setArrowType=Ne.setArrowType.bind(Ne),Ne.arrowTypePanel=new ot("Arrow type","end"),Ne.arrowTypePanel.onArrowTypeChanged=Ne.setArrowType,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.arrow1&&be!==this.arrow2)},Ae.prototype.getArrowPoints=function(be,Be){var Ke=this.arrowBaseWidth+2*this.strokeWidth,Ne=this.arrowBaseHeight+2*this.strokeWidth;return be-Ke/2+","+(Be+Ne/2)+" "+be+","+(Be-Ne/2)+" "+(be+Ke/2)+","+(Be+Ne/2)},Ae.prototype.createTips=function(){this.arrow1=te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.arrow2)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="creating"&&this.createTips()},Ae.prototype.adjustVisual=function(){if(He.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",te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var be=0;Math.abs(this.x1-this.x2)>.1&&(be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Be=this.arrow1.transform.baseVal.getItem(0);Be.setRotate(be,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Be,0);var Ke=this.arrow2.transform.baseVal.getItem(0);Ke.setRotate(be+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ke,0)}},Ae.prototype.setArrowType=function(be){this.arrowType=be,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be);var Be=be;this.arrowType=Be.arrowType,this.createTips(),this.adjustVisual()},Ae.typeName="ArrowMarker",Ae.title="Arrow marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ae}(je),rt=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.fillColor=Ke.defaultFillColor,Ne.strokeWidth=0,Ne.fillPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultFillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne}return ie(Ae,He),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=He.prototype.getState.call(this);return be.typeName=Ae.typeName,be},Ae.typeName="CoverMarker",Ae.title="Cover marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ae}(he),Ye=function(He){function Ae(be,Be,Ke,Ne){var De=He.call(this,be,Ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return De.opacities=[],De.opacityBoxes=[],De.opacities=Be,De.currentOpacity=Ke,De.setCurrentOpacity=De.setCurrentOpacity.bind(De),De}return ie(Ae,He),Ae.prototype.getUi=function(){var be=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",Be.style.justifyContent="space-between",this.opacities.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="center",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=Ke===be.currentOpacity?be.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){be.setCurrentOpacity(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.innerText=100*Ke+"%",Ne.appendChild(De),be.opacityBoxes.push(Ne)}),Be},Ae.prototype.setCurrentOpacity=function(be,Be){var Ke=this;this.currentOpacity=be,this.opacityBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ae}(ae),ut=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.fillColor=Ke.defaultHighlightColor,Ne.strokeWidth=0,Ne.opacity=Ke.defaultHighlightOpacity,Ne.fillPanel=new oe("Color",Ke.defaultColorSet,Ne.fillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.opacityPanel=new Ye("Opacity",Ke.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return ie(Ae,He),Ae.prototype.setOpacity=function(be){this.opacity=be,this.visual&&te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=He.prototype.getState.call(this);return be.typeName=Ae.typeName,be},Ae.typeName="HighlightMarker",Ae.title="Highlight marker",Ae.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>',Ae}(rt),Ge='<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>',ze='<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>',Ve=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.bgColor="transparent",Ne.tipPosition={x:0,y:0},Ne.tipBase1Position={x:0,y:0},Ne.tipBase2Position={x:0,y:0},Ne.tipMoving=!1,Ne.color=Ke.defaultStrokeColor,Ne.bgColor=Ke.defaultFillColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setBgColor=Ne.setBgColor.bind(Ne),Ne.getTipPoints=Ne.getTipPoints.bind(Ne),Ne.positionTip=Ne.positionTip.bind(Ne),Ne.setTipPoints=Ne.setTipPoints.bind(Ne),Ne.colorPanel=new oe("Text color",Ke.defaultColorSet,Ne.color,Ge),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.bgColorPanel=new oe("Fill color",Ke.defaultColorSet,Ne.bgColor,ze),Ne.bgColorPanel.onColorChanged=Ne.setBgColor,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.tipGrip=new me,Ne.tipGrip.visual.transform.baseVal.appendItem(te.createTransform()),Ne.controlBox.appendChild(Ne.tipGrip.visual),Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return He.prototype.ownsTarget.call(this,be)||this.tipGrip.ownsTarget(be)||this.tip===be},Ae.prototype.createTip=function(){te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ae.prototype.pointerDown=function(be,Be){this.state==="new"&&He.prototype.pointerDown.call(this,be,Be),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Be)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,be,Be)},Ae.prototype.pointerUp=function(be){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,be);else{var Be=this.state==="creating";He.prototype.pointerUp.call(this,be),this.setTipPoints(Be),this.positionTip()}},Ae.prototype.manipulate=function(be){if(this.tipMoving){var Be=this.unrotatePoint(be);this.tipPosition={x:Be.x-this.manipulationStartLeft,y:Be.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,be)},Ae.prototype.setBgColor=function(be){this.bgRectangle&&this.tip&&(te.setAttributes(this.bgRectangle,[["fill",be]]),te.setAttributes(this.tip,[["fill",be]])),this.bgColor=be,this.fillColorChanged(be)},Ae.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},Ae.prototype.setTipPoints=function(be){be===void 0&&(be=!1);var Be=Math.min(this.height/2,15),Ke=this.height/5;be&&(this.tipPosition={x:Be+Ke/2,y:this.height+20});var Ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:0},this.tipBase2Position={x:Be+Ke,y:0}):(this.tipBase1Position={x:0,y:Be},this.tipBase2Position={x:0,y:Be+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ke,y:0},this.tipBase2Position={x:this.width-Be,y:0}):(this.tipBase1Position={x:this.width,y:Be},this.tipBase2Position={x:this.width,y:Be+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ke,y:this.height},this.tipBase2Position={x:this.width-Be,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Be-Ke},this.tipBase2Position={x:this.width,y:this.height-Be}):Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:this.height},this.tipBase2Position={x:Be+Ke,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Be},this.tipBase2Position={x:0,y:this.height-Be-Ke})},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),this.positionTip()},Ae.prototype.positionTip=function(){te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var be=this.tipGrip.visual.transform.baseVal.getItem(0);be.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(be,0)},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ae.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},Ae.prototype.getState=function(){var be=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){var Be=be;this.bgColor=Be.bgColor,this.tipPosition=Be.tipPosition,He.prototype.restoreState.call(this,be),this.createTip(),this.setTipPoints()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.tipPosition={x:this.tipPosition.x*be,y:this.tipPosition.y*Be},this.positionTip()},Ae.typeName="CalloutMarker",Ae.title="Callout marker",Ae.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>',Ae}(Qe),$e=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.fillColor=Ke.defaultFillColor,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.strokePanel=new oe("Line color",se(Ke.defaultColorSet,["transparent"]),Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new oe("Fill color",se(Ke.defaultColorSet,["transparent"]),Ne.fillColor,ze),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.opacityPanel=new Ye("Opacity",Ke.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual)},Ae.prototype.createVisual=function(){this.visual=te.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)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(be),this._state="creating")},Ae.prototype.manipulate=function(be){He.prototype.manipulate.call(this,be)},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),this.setSize()},Ae.prototype.setSize=function(){He.prototype.setSize.call(this),te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ae.prototype.pointerUp=function(be){He.prototype.pointerUp.call(this,be),this.setSize()},Ae.prototype.setStrokeColor=function(be){this.strokeColor=be,this.visual&&te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(be),this.stateChanged()},Ae.prototype.setFillColor=function(be){this.fillColor=be,this.visual&&te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(be),this.stateChanged()},Ae.prototype.setStrokeWidth=function(be){this.strokeWidth=be,this.visual&&te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(be){this.strokeDasharray=be,this.visual&&te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ae.prototype.setOpacity=function(be){this.opacity=be,this.visual&&te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){var Be=be;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),He.prototype.restoreState.call(this,be),this.setSize()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.setSize()},Ae.typeName="EllipseMarker",Ae.title="Ellipse marker",Ae.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>',Ae}(_e),nt=function(He){function Ae(be,Be,Ke){return He.call(this,be,Be,Ke)||this}return ie(Ae,He),Object.defineProperty(Ae.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.tip1&&be!==this.tip2)},Ae.prototype.createTips=function(){this.tip1=te.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(te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=te.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(te.createTransform()),this.visual.appendChild(this.tip2)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.state==="creating"&&this.createTips()},Ae.prototype.adjustVisual=function(){if(He.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(te.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()]]),te.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 be=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Be=this.tip1.transform.baseVal.getItem(0);Be.setRotate(be,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Be,0);var Ke=this.tip2.transform.baseVal.getItem(0);Ke.setRotate(be+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ke,0)}},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=He.prototype.getState.call(this);return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be),this.createTips(),this.adjustVisual()},Ae.typeName="MeasurementMarker",Ae.title="Measurement marker",Ae.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>',Ae}(je),et=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.strokePanel.colors=Ke.defaultColorSet,Ne.fillColor="transparent",Ne}return ie(Ae,He),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=He.prototype.getState.call(this);return be.typeName=Ae.typeName,be},Ae.typeName="EllipseFrameMarker",Ae.title="Ellipse frame marker",Ae.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>',Ae}($e),pt=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.prototype.addUndoStep=function(Ae){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ae)||(this.undoStack.push(Ae),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ae)&&this.redoStack.splice(0,this.redoStack.length))},He.prototype.replaceLastUndoStep=function(Ae){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ae)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.prototype.undo=function(){if(this.undoStack.length>1){var Ae=this.undoStack.pop();return Ae!==void 0&&this.redoStack.push(Ae),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),ct=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.curveX=0,Ne.curveY=0,Ne.manipulationStartCurveX=0,Ne.manipulationStartCurveY=0,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.positionGrips=Ne.positionGrips.bind(Ne),Ne.addControlGrips=Ne.addControlGrips.bind(Ne),Ne.adjustVisual=Ne.adjustVisual.bind(Ne),Ne.setupControlBox=Ne.setupControlBox.bind(Ne),Ne.resize=Ne.resize.bind(Ne),Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual&&be!==this.selectorCurve&&be!==this.visibleCurve&&!this.curveGrip.ownsTarget(be))},Ae.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.selectorCurve=te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=te.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)},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=be.x,this.curveY=be.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Be)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ae.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ae.prototype.setupControlBox=function(){He.prototype.setupControlBox.call(this),this.curveControlLine1=te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=te.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)},Ae.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,He.prototype.addControlGrips.call(this)},Ae.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var be=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-be/2,this.curveY-be/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()))},Ae.prototype.manipulate=function(be){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+be.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+be.y-this.manipulationStartY),He.prototype.manipulate.call(this,be)},Ae.prototype.resize=function(be){this.activeGrip===this.curveGrip&&(this.curveX=be.x,this.curveY=be.y),He.prototype.resize.call(this,be),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ae.prototype.setStrokeColor=function(be){this.strokeColor=be,this.adjustVisual(),this.colorChanged(be)},Ae.prototype.setStrokeWidth=function(be){this.strokeWidth=be,this.adjustVisual()},Ae.prototype.setStrokeDasharray=function(be){this.strokeDasharray=be,this.adjustVisual()},Ae.prototype.scale=function(be,Be){this.curveX=this.curveX*be,this.curveY=this.curveY*Be,He.prototype.scale.call(this,be,Be)},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return be.typeName=Ae.typeName,be},Ae.prototype.restoreState=function(be){He.prototype.restoreState.call(this,be);var Be=be;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.curveX=Be.curveX,this.curveY=Be.curveY,this.createVisual(),this.adjustVisual()},Ae.typeName="CurveMarker",Ae.title="Curve marker",Ae.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>',Ae}(Oe),Rt=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.textColor="transparent",Ne.fontSize="1rem",Ne.isMoved=!1,Ne.captionText="Caption",Ne.PADDING=5,Ne.captionBoxWidth=0,Ne.captionBoxHeight=0,Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.fillColor=Ke.defaultFillColor,Ne.textColor=Ke.defaultStrokeColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.fontSize=Ke.defaultCaptionFontSize,Ne.captionText=Ke.defaultCaptionText,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.sizeCaption=Ne.sizeCaption.bind(Ne),Ne.setCaptionText=Ne.setCaptionText.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.finishTextEditing=Ne.finishTextEditing.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.setTextColor=Ne.setTextColor.bind(Ne),Ne.strokePanel=new oe("Line color",se(Ke.defaultColorSet,["transparent"]),Ne.strokeColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new oe("Fill color",se(Ke.defaultColorSet,["transparent"]),Ne.fillColor,ze),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.textColorPanel=new oe("Text color",Ke.defaultColorSet,Ne.textColor,Ge),Ne.textColorPanel.onColorChanged=Ne.setTextColor,Ne}return ie(Ae,He),Ae.prototype.ownsTarget=function(be){return!(!He.prototype.ownsTarget.call(this,be)&&be!==this.visual&&be!==this.frame&&be!==this.captionBg&&be!==this.captionElement)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=te.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=te.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()},Ae.prototype.setCaptionText=function(be){this.captionText=be,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ae.prototype.pointerDown=function(be,Be){He.prototype.pointerDown.call(this,be,Be),this.isMoved=!1,this.pointerDownPoint=be,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(be),this._state="creating")},Ae.prototype.manipulate=function(be){He.prototype.manipulate.call(this,be),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(be.x-this.pointerDownPoint.x)>5||Math.abs(be.y-this.pointerDownPoint.y)>5)},Ae.prototype.resize=function(be){He.prototype.resize.call(this,be),this.setSize()},Ae.prototype.sizeCaption=function(){var be=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=be.width+2*this.PADDING,this.captionBoxHeight=be.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),te.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')"]]),te.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')"]])},Ae.prototype.showTextEditor=function(){var be=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(Be){Be.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Be){Be.key==="Enter"&&be.finishTextEditing(be.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){be.finishTextEditing(be.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){be.finishTextEditing(be.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ae.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"))},Ae.prototype.finishTextEditing=function(be){this.setCaptionText(be.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ae.prototype.setFont=function(be){this.captionElement&&te.setAttributes(this.captionElement,[["font-family",be]]),this.fontFamily=be,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ae.prototype.setTextColor=function(be){this.captionElement&&te.setAttributes(this.captionElement,[["fill",be]]),this.textColor=be,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ae.prototype.setSize=function(){He.prototype.setSize.call(this),te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ae.prototype.pointerUp=function(be){He.prototype.pointerUp.call(this,be),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ae.prototype.dblClick=function(be,Be){He.prototype.dblClick.call(this,be,Be),this.showTextEditor()},Ae.prototype.setStrokeColor=function(be){this.strokeColor=be,this.frame&&te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(be),this.stateChanged()},Ae.prototype.setFillColor=function(be){this.fillColor=be,this.captionBg&&te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(be),this.stateChanged()},Ae.prototype.setStrokeWidth=function(be){this.strokeWidth=be,this.frame&&te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(be){this.strokeDasharray=be,this.frame&&te.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var be=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},He.prototype.getState.call(this));return be.typeName=this.typeName,be},Ae.prototype.restoreState=function(be){var Be=be;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.textColor=Be.textColor,this.fontFamily=Be.fontFamily,this.captionText=Be.captionText,this.fontSize=Be.fontSize,this.createVisual(),He.prototype.restoreState.call(this,be),this.setSize()},Ae.prototype.scale=function(be,Be){He.prototype.scale.call(this,be,Be),this.setSize()},Ae.typeName="CaptionFrameMarker",Ae.title="Caption frame marker",Ae.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>',Ae}(_e),dt=function(){function He(Ae,be){be===void 0&&(be=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ae,this.cancelable=be}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Mt=function(He){function Ae(be,Be,Ke){var Ne=He.call(this,be,!1)||this;return Ne.dataUrl=Be,Ne.state=Ke,Ne}return ie(Ae,He),Ae}(dt),xt=function(He){function Ae(be,Be,Ke){Ke===void 0&&(Ke=!1);var Ne=He.call(this,be,Ke)||this;return Ne.marker=Be,Ne}return ie(Ae,He),Ae}(dt),yt=function(){function He(){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 He.prototype.addEventListener=function(Ae,be){this[Ae].push(be)},He.prototype.removeEventListener=function(Ae,be){var Be=this[Ae].indexOf(be);Be>-1&&this[Ae].splice(Be,1)},He}(),bt=function(){function He(Ae){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ee,this._isOpen=!1,this.undoRedoManager=new pt,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 yt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.instanceCounter++,this.styles=new E(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ae,this.targetRoot=document.body,this.width=Ae.clientWidth,this.height=Ae.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[Te,Xe,We,Qe,et,$e,ut,Ve,nt,rt,je,ct,Rt]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Te,Xe,We,Qe,$e,ut,Ve]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Te,Xe,We,Qe,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ae){var be=this;this._availableMarkerTypes.splice(0),Ae.forEach(function(Be){if(typeof Be=="string"){var Ke=be.ALL_MARKER_TYPES.find(function(Ne){return Ne.typeName===Be});Ke!==void 0&&be._availableMarkerTypes.push(Ke)}else be._availableMarkerTypes.push(Be)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ae){this._zoomLevel=Ae,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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},He.prototype.show=function(){var Ae=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(be){return be(new dt(Ae))})},He.prototype.render=function(){return Ce(this,void 0,void 0,function(){var Ae;return ue(this,function(be){switch(be.label){case 0:return this.setCurrentMarker(),(Ae=new ee).naturalSize=this.renderAtNaturalSize,Ae.imageType=this.renderImageType,Ae.imageQuality=this.renderImageQuality,Ae.markersOnly=this.renderMarkersOnly,Ae.width=this.renderWidth,Ae.height=this.renderHeight,[4,Ae.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return be.sent(),[4,Ae.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,be.sent()]}})})},He.prototype.close=function(Ae){var be=this;if(Ae===void 0&&(Ae=!1),this.isOpen){var Be=!1;Ae||this.eventListeners.beforeclose.forEach(function(Ke){var Ne=new dt(be,!0);Ke(Ne),Ne.defaultPrevented&&(Be=!0)}),Be||(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(Ke){return Ke(new dt(be))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var Ae,be=[],Be=0;Be<arguments.length;Be++)be[Be]=arguments[Be];(Ae=this._availableMarkerTypes).push.apply(Ae,be)},He.prototype.addRenderEventListener=function(Ae){this.addEventListener("render",function(be){Ae(be.dataUrl,be.state)})},He.prototype.removeRenderEventListener=function(Ae){},He.prototype.addCloseEventListener=function(Ae){this.addEventListener("close",function(){Ae()})},He.prototype.removeCloseEventListener=function(Ae){},He.prototype.setupResizeObserver=function(){var Ae=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ae.resize(Ae.target.clientWidth,Ae.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ae.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},He.prototype.onPopupTargetResize=function(){var Ae=1*this.target.clientWidth/this.target.clientHeight,be=this.editorCanvas.clientWidth/Ae>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ae:this.editorCanvas.clientWidth,Be=be<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ae;this.resize(be,Be)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(Ae,be){this._isResizing=!0;var Be=Ae/this.imageWidth,Ke=be/this.imageHeight;this.imageWidth=Math.round(Ae),this.imageHeight=Math.round(be),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(Be,Ke),this._isResizing=!1},He.prototype.scaleMarkers=function(Ae,be){var Be,Ke=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(Ae,be):(Be=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ne){Ne!==Ke._currentMarker&&Ne.scale(Ae,be)}),Be!==void 0&&this.setCurrentMarker(Be)},He.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"},He.prototype.setTopLeft=function(){var Ae=this.editingTarget.getBoundingClientRect(),be=this.editorCanvas.getBoundingClientRect();this.left=Ae.left-be.left,this.top=Ae.top-be.top},He.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)},He.prototype.addDefs=function(){for(var Ae,be=[],Be=0;Be<arguments.length;Be++)be[Be]=arguments[Be];this.defs=te.createDefs(),this.addDefsToImage(),(Ae=this.defs).append.apply(Ae,be)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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 Ae=document.createElement("a");Ae.href="https://markerjs.com/",Ae.target="_blank",Ae.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>',Ae.title="Powered by marker.js",Ae.style.display="grid",Ae.style.alignItems="center",Ae.style.justifyItems="center",Ae.style.padding="3px",Ae.style.width="20px",Ae.style.height="20px",this.logoUI.appendChild(Ae),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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 Ae=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=Ae+"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 x(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 re(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(Ae){this.markerImage.removeChild(Ae.container),this.markers.indexOf(Ae)>-1&&this.markers.splice(this.markers.indexOf(Ae),1),Ae.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(Ae,be){if(Ae==="marker"&&be!==void 0)this.createNewMarker(be);else if(Ae==="action")switch(be){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()}},He.prototype.deleteSelectedMarker=function(){var Ae=this;if(this._currentMarker!==void 0){var be=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ne=new xt(Ae,Ae._currentMarker,!0);Ke(Ne),Ne.defaultPrevented&&(be=!0)}),!be){var Be=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(Ke){return Ke(new xt(Ae,Be))})}}},He.prototype.clear=function(){var Ae=this,be=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(De){var we=new xt(Ae,void 0,!0);De(we),we.defaultPrevented&&(be=!0)}),!be)){this.setCurrentMarker();for(var Be=function(De){var we=Ke.markers[De];Ke.setCurrentMarker(Ke.markers[De]),Ke._currentMarker.dispose(),Ke.markerImage.removeChild(Ke._currentMarker.container),Ke.markers.splice(Ke.markers.indexOf(Ke._currentMarker),1),Ke.eventListeners.markerdelete.forEach(function(Le){return Le(new xt(Ae,we))})},Ke=this,Ne=this.markers.length-1;Ne>=0;Ne--)Be(Ne);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.prototype.showNotesEditor=function(){var Ae;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=(Ae=this._currentMarker.notes)!==null&&Ae!==void 0?Ae:"",this.overlayContainer.appendChild(this.notesArea))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var Ae=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var be=this.getState(),Be=this.undoRedoManager.getLastUndoStep();if(!Be||Be.width===be.width&&Be.height===be.height){var Ke=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(be),Ke<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(Ae))})}else this.undoRedoManager.replaceLastUndoStep(be),this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(Ae))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var Ae=this,be=this.undoRedoManager.undo();be!==void 0&&(this.restoreState(be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new dt(Ae))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var Ae=this,be=this.undoRedoManager.redo();be!==void 0&&(this.restoreState(be),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new dt(Ae))}))},He.prototype.stepZoom=function(){var Ae=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ae<this.zoomSteps.length-1?this.zoomSteps[Ae+1]:this.zoomSteps[0]},He.prototype.panTo=function(Ae){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ae.x,top:this.prevPanPoint.y-Ae.y}),this.prevPanPoint=Ae},He.prototype.startRenderAndClose=function(){return Ce(this,void 0,void 0,function(){var Ae,be,Be=this;return ue(this,function(Ke){switch(Ke.label){case 0:return[4,this.render()];case 1:return Ae=Ke.sent(),be=this.getState(),this.eventListeners.render.forEach(function(Ne){return Ne(new Mt(Be,Ae,be))}),this.close(!0),[2]}})})},He.prototype.getState=function(Ae){Ae===!0&&this.setCurrentMarker();var be={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Be){return be.markers.push(Be.getState())}),be},He.prototype.restoreState=function(Ae){var be=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ae.markers.forEach(function(Be){var Ke=be._availableMarkerTypes.find(function(De){return De.typeName===Be.typeName});if(Ke!==void 0){var Ne=be.addNewMarker(Ke);Ne.restoreState(Be),be.markers.push(Ne)}}),Ae.width&&Ae.height&&(Ae.width!==this.imageWidth||Ae.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ae.width,this.imageHeight/Ae.height),this.eventListeners.restorestate.forEach(function(Be){return Be(new dt(be))})},He.prototype.addNewMarker=function(Ae){var be=te.createGroup();return this.markerImage.appendChild(be),new Ae(be,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(Ae){var be,Be=this;(be=typeof Ae=="string"?this._availableMarkerTypes.find(function(Ke){return Ke.typeName===Ae}):Ae)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(be),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(be.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ke){return Ke(new xt(Be,Be._currentMarker))}))},He.prototype.markerCreated=function(Ae){var be=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ae),this.setCurrentMarker(Ae),Ae instanceof Xe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Xe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Be){return Be(new xt(be,be._currentMarker))})},He.prototype.colorChanged=function(Ae){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ae,this.settings.defaultStrokeColor=Ae)},He.prototype.fillColorChanged=function(Ae){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ae)},He.prototype.markerStateChanged=function(Ae){var be=this;this.eventListeners.markerchange.forEach(function(Be){return Be(new xt(be,Ae))})},He.prototype.setCurrentMarker=function(Ae){var be=this;this._currentMarker!==Ae&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Be){return Be(new xt(be,be._currentMarker))})),this._currentMarker=Ae,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(Be){return Be(new xt(be,be._currentMarker))}))},He.prototype.onPointerDown=function(Ae){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ae.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var be=this.markers.find(function(Be){return Be.ownsTarget(Ae.target)});be!==void 0?(this.setCurrentMarker(be),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY),Ae.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ae.clientX,y:Ae.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY))},He.prototype.onDblClick=function(Ae){if(this._isFocused||this.focus(),this.mode==="select"){var be=this.markers.find(function(Be){return Be.ownsTarget(Ae.target)});be!==void 0&&be!==this._currentMarker&&this.setCurrentMarker(be),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY),Ae.target):this.setCurrentMarker()}},He.prototype.onPointerMove=function(Ae){this.touchPoints!==1&&Ae.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ae.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY)):this.zoomLevel>1&&this.panTo({x:Ae.clientX,y:Ae.clientY}))},He.prototype.onPointerUp=function(Ae){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY)),this.isDragging=!1,this.addUndoStep()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(Ae){this._currentMarker===void 0||this.notesArea!==void 0||Ae.key!=="Delete"&&Ae.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(Ae,be){var Be=this.markerImage.getBoundingClientRect();return{x:(Ae-Be.left)/this.zoomLevel,y:(be-Be.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ae=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ae+"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()},He.prototype.addLicenseKey=function(Ae){le.addKey(Ae)},He.prototype.addEventListener=function(Ae,be){this.eventListeners.addEventListener(Ae,be)},He.prototype.removeEventListener=function(Ae,be){this.eventListeners.removeEventListener(Ae,be)},He.prototype.renderState=function(Ae){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ae),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.prototype.focus=function(){var Ae=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(be){return be(new dt(Ae))}))},He.prototype.blur=function(){var Ae=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(be){return be(new dt(Ae))}))},He.instanceCounter=0,He}()},66042:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return Qe}});var ce=Se(98506),ie=Se(16886),Ce=Se(43403),ue=Se(34280),se=Se(59301),te=se.createContext(null),le=se.createContext({}),ee=te,ne=Se(52873),E=Se(67711),b=Se(92310),z=Se.n(b),x=Se(77900),re=Se(10228),ae=Se(26112),oe=Se(33346),ve=Se(8654),ye=["prefixCls","className","containerRef"],me=function(ot){var We=ot.prefixCls,rt=ot.className,Ye=ot.containerRef,ut=(0,oe.Z)(ot,ye),Ge=se.useContext(le),ze=Ge.panel,Ve=(0,ve.x1)(ze,Ye);return se.createElement("div",(0,E.Z)({className:z()("".concat(We,"-content"),rt),role:"dialog",ref:Ve},(0,ae.Z)(ot,{aria:!0}),{"aria-modal":"true"},ut))},ge=me,_e=Se(48736);function he(Xe){return typeof Xe=="string"&&String(Number(Xe))===Xe?((0,_e.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Xe)):Xe}function pe(Xe){warning(!("wrapperClassName"in Xe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Xe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ke={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Te(Xe,ot){var We,rt,Ye,ut=Xe.prefixCls,Ge=Xe.open,ze=Xe.placement,Ve=Xe.inline,$e=Xe.push,nt=Xe.forceRender,et=Xe.autoFocus,pt=Xe.keyboard,ct=Xe.classNames,Rt=Xe.rootClassName,dt=Xe.rootStyle,Mt=Xe.zIndex,xt=Xe.className,yt=Xe.id,bt=Xe.style,He=Xe.motion,Ae=Xe.width,be=Xe.height,Be=Xe.children,Ke=Xe.mask,Ne=Xe.maskClosable,De=Xe.maskMotion,we=Xe.maskClassName,Le=Xe.maskStyle,Ue=Xe.afterOpenChange,Me=Xe.onClose,Re=Xe.onMouseEnter,tt=Xe.onMouseOver,lt=Xe.onMouseLeave,Pt=Xe.onClick,Ct=Xe.onKeyDown,vt=Xe.onKeyUp,Ot=Xe.styles,Zt=Xe.drawerRender,Ut=se.useRef(),gt=se.useRef(),Qt=se.useRef();se.useImperativeHandle(ot,function(){return Ut.current});var Lt=function(gn){var pn=gn.keyCode,Dn=gn.shiftKey;switch(pn){case re.Z.TAB:{if(pn===re.Z.TAB){if(!Dn&&document.activeElement===Qt.current){var Rn;(Rn=gt.current)===null||Rn===void 0||Rn.focus({preventScroll:!0})}else if(Dn&&document.activeElement===gt.current){var Un;(Un=Qt.current)===null||Un===void 0||Un.focus({preventScroll:!0})}}break}case re.Z.ESC:{Me&&pt&&(gn.stopPropagation(),Me(gn));break}}};se.useEffect(function(){if(Ge&&et){var In;(In=Ut.current)===null||In===void 0||In.focus({preventScroll:!0})}},[Ge]);var qt=se.useState(!1),un=(0,ie.Z)(qt,2),Sn=un[0],Jt=un[1],Ln=se.useContext(ee),Zn;typeof $e=="boolean"?Zn=$e?{}:{distance:0}:Zn=$e||{};var Gn=(We=(rt=(Ye=Zn)===null||Ye===void 0?void 0:Ye.distance)!==null&&rt!==void 0?rt:Ln==null?void 0:Ln.pushDistance)!==null&&We!==void 0?We:180,Jn=se.useMemo(function(){return{pushDistance:Gn,push:function(){Jt(!0)},pull:function(){Jt(!1)}}},[Gn]);se.useEffect(function(){if(Ge){var In;Ln==null||(In=Ln.push)===null||In===void 0||In.call(Ln)}else{var gn;Ln==null||(gn=Ln.pull)===null||gn===void 0||gn.call(Ln)}},[Ge]),se.useEffect(function(){return function(){var In;Ln==null||(In=Ln.pull)===null||In===void 0||In.call(Ln)}},[]);var hr=Ke&&se.createElement(x.default,(0,E.Z)({key:"mask"},De,{visible:Ge}),function(In,gn){var pn=In.className,Dn=In.style;return se.createElement("div",{className:z()("".concat(ut,"-mask"),pn,ct==null?void 0:ct.mask,we),style:(0,ce.Z)((0,ce.Z)((0,ce.Z)({},Dn),Le),Ot==null?void 0:Ot.mask),onClick:Ne&&Ge?Me:void 0,ref:gn})}),ur=typeof He=="function"?He(ze):He,jn={};if(Sn&&Gn)switch(ze){case"top":jn.transform="translateY(".concat(Gn,"px)");break;case"bottom":jn.transform="translateY(".concat(-Gn,"px)");break;case"left":jn.transform="translateX(".concat(Gn,"px)");break;default:jn.transform="translateX(".concat(-Gn,"px)");break}ze==="left"||ze==="right"?jn.width=he(Ae):jn.height=he(be);var Nn={onMouseEnter:Re,onMouseOver:tt,onMouseLeave:lt,onClick:Pt,onKeyDown:Ct,onKeyUp:vt},rr=se.createElement(x.default,(0,E.Z)({key:"panel"},ur,{visible:Ge,forceRender:nt,onVisibleChanged:function(gn){Ue==null||Ue(gn)},removeOnLeave:!1,leavedClassName:"".concat(ut,"-content-wrapper-hidden")}),function(In,gn){var pn=In.className,Dn=In.style,Rn=se.createElement(ge,(0,E.Z)({id:yt,containerRef:gn,prefixCls:ut,className:z()(xt,ct==null?void 0:ct.content),style:(0,ce.Z)((0,ce.Z)({},bt),Ot==null?void 0:Ot.content)},(0,ae.Z)(Xe,{aria:!0}),Nn),Be);return se.createElement("div",(0,E.Z)({className:z()("".concat(ut,"-content-wrapper"),ct==null?void 0:ct.wrapper,pn),style:(0,ce.Z)((0,ce.Z)((0,ce.Z)({},jn),Dn),Ot==null?void 0:Ot.wrapper)},(0,ae.Z)(Xe,{data:!0})),Zt?Zt(Rn):Rn)}),Kn=(0,ce.Z)({},dt);return Mt&&(Kn.zIndex=Mt),se.createElement(ee.Provider,{value:Jn},se.createElement("div",{className:z()(ut,"".concat(ut,"-").concat(ze),Rt,(0,ne.Z)((0,ne.Z)({},"".concat(ut,"-open"),Ge),"".concat(ut,"-inline"),Ve)),style:Kn,tabIndex:-1,ref:Ut,onKeyDown:Lt},hr,se.createElement("div",{tabIndex:0,ref:gt,style:ke,"aria-hidden":"true","data-sentinel":"start"}),rr,se.createElement("div",{tabIndex:0,ref:Qt,style:ke,"aria-hidden":"true","data-sentinel":"end"})))}var Ee=se.forwardRef(Te),Oe=Ee,je=function(ot){var We=ot.open,rt=We===void 0?!1:We,Ye=ot.prefixCls,ut=Ye===void 0?"rc-drawer":Ye,Ge=ot.placement,ze=Ge===void 0?"right":Ge,Ve=ot.autoFocus,$e=Ve===void 0?!0:Ve,nt=ot.keyboard,et=nt===void 0?!0:nt,pt=ot.width,ct=pt===void 0?378:pt,Rt=ot.mask,dt=Rt===void 0?!0:Rt,Mt=ot.maskClosable,xt=Mt===void 0?!0:Mt,yt=ot.getContainer,bt=ot.forceRender,He=ot.afterOpenChange,Ae=ot.destroyOnClose,be=ot.onMouseEnter,Be=ot.onMouseOver,Ke=ot.onMouseLeave,Ne=ot.onClick,De=ot.onKeyDown,we=ot.onKeyUp,Le=ot.panelRef,Ue=se.useState(!1),Me=(0,ie.Z)(Ue,2),Re=Me[0],tt=Me[1],lt=se.useState(!1),Pt=(0,ie.Z)(lt,2),Ct=Pt[0],vt=Pt[1];(0,ue.Z)(function(){vt(!0)},[]);var Ot=Ct?rt:!1,Zt=se.useRef(),Ut=se.useRef();(0,ue.Z)(function(){Ot&&(Ut.current=document.activeElement)},[Ot]);var gt=function(Sn){var Jt;if(tt(Sn),He==null||He(Sn),!Sn&&Ut.current&&!((Jt=Zt.current)!==null&&Jt!==void 0&&Jt.contains(Ut.current))){var Ln;(Ln=Ut.current)===null||Ln===void 0||Ln.focus({preventScroll:!0})}},Qt=se.useMemo(function(){return{panel:Le}},[Le]);if(!bt&&!Re&&!Ot&&Ae)return null;var Lt={onMouseEnter:be,onMouseOver:Be,onMouseLeave:Ke,onClick:Ne,onKeyDown:De,onKeyUp:we},qt=(0,ce.Z)((0,ce.Z)({},ot),{},{open:Ot,prefixCls:ut,placement:ze,autoFocus:$e,keyboard:et,width:ct,mask:dt,maskClosable:xt,inline:yt===!1,afterOpenChange:gt,ref:Zt},Lt);return se.createElement(le.Provider,{value:Qt},se.createElement(Ce.Z,{open:Ot||bt||Re,autoDestroy:!1,getContainer:yt,autoLock:dt&&(Ot||Re)},se.createElement(Oe,qt)))},Pe=je,Qe=Pe},91574:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return Pt}});var ce=Se(67711),ie=Se(98506),Ce=Se(52873),ue=Se(16886),se=Se(26420),te=Se(33346),le=Se(92310),ee=Se.n(le),ne=/margin|padding|width|height|max|min|offset/,E={left:!0,top:!0},b={cssFloat:1,styleFloat:1,float:1};function z(Ct){return Ct.nodeType===1?Ct.ownerDocument.defaultView.getComputedStyle(Ct,null):{}}function x(Ct,vt,Ot){if(vt=vt.toLowerCase(),Ot==="auto"){if(vt==="height")return Ct.offsetHeight;if(vt==="width")return Ct.offsetWidth}return vt in E||(E[vt]=ne.test(vt)),E[vt]?parseFloat(Ot)||0:Ot}function re(Ct,vt){var Ot=arguments.length,Zt=z(Ct);return vt=b[vt]?"cssFloat"in Ct.style?"cssFloat":"styleFloat":vt,Ot===1?Zt:x(Ct,vt,Zt[vt]||Ct.style[vt])}function ae(Ct,vt,Ot){var Zt=arguments.length;if(vt=b[vt]?"cssFloat"in Ct.style?"cssFloat":"styleFloat":vt,Zt===3)return typeof Ot=="number"&&ne.test(vt)&&(Ot="".concat(Ot,"px")),Ct.style[vt]=Ot,Ot;for(var Ut in vt)vt.hasOwnProperty(Ut)&&ae(Ct,Ut,vt[Ut]);return z(Ct)}function oe(Ct){return Ct===document.body?document.documentElement.clientWidth:Ct.offsetWidth}function ve(Ct){return Ct===document.body?window.innerHeight||document.documentElement.clientHeight:Ct.offsetHeight}function ye(){var Ct=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),vt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ct,height:vt}}function me(){var Ct=document.documentElement.clientWidth,vt=window.innerHeight||document.documentElement.clientHeight;return{width:Ct,height:vt}}function ge(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function _e(Ct){var vt=Ct.getBoundingClientRect(),Ot=document.documentElement;return{left:vt.left+(window.pageXOffset||Ot.scrollLeft)-(Ot.clientLeft||document.body.clientLeft||0),top:vt.top+(window.pageYOffset||Ot.scrollTop)-(Ot.clientTop||document.body.clientTop||0)}}var he=Se(18929),pe=Se(59301),ke=Se(55311),Te=Se(8224),Ee=Se(10228),Oe=Se(43403),je=Se(77900),Pe=pe.createContext(null),Qe=function(vt){var Ot=vt.visible,Zt=vt.maskTransitionName,Ut=vt.getContainer,gt=vt.prefixCls,Qt=vt.rootClassName,Lt=vt.icons,qt=vt.countRender,un=vt.showSwitch,Sn=vt.showProgress,Jt=vt.current,Ln=vt.transform,Zn=vt.count,Gn=vt.scale,Jn=vt.minScale,hr=vt.maxScale,ur=vt.closeIcon,jn=vt.onActive,Nn=vt.onClose,rr=vt.onZoomIn,Kn=vt.onZoomOut,In=vt.onRotateRight,gn=vt.onRotateLeft,pn=vt.onFlipX,Dn=vt.onFlipY,Rn=vt.onReset,Un=vt.toolbarRender,Mr=vt.zIndex,an=vt.image,Ie=(0,pe.useContext)(Pe),Ze=Lt.rotateLeft,qe=Lt.rotateRight,st=Lt.zoomIn,mt=Lt.zoomOut,Bt=Lt.close,kt=Lt.left,Nt=Lt.right,nn=Lt.flipX,An=Lt.flipY,Vn="".concat(gt,"-operations-operation");pe.useEffect(function(){var Vt=function(bn){bn.keyCode===Ee.Z.ESC&&Nn()};return Ot&&window.addEventListener("keydown",Vt),function(){window.removeEventListener("keydown",Vt)}},[Ot]);var At=function(Pn,bn){Pn.preventDefault(),Pn.stopPropagation(),jn(bn)},wt=pe.useCallback(function(Vt){var Pn=Vt.type,bn=Vt.disabled,zn=Vt.onClick,Bn=Vt.icon;return pe.createElement("div",{key:Pn,className:ee()(Vn,"".concat(gt,"-operations-operation-").concat(Pn),(0,Ce.Z)({},"".concat(gt,"-operations-operation-disabled"),!!bn)),onClick:zn},Bn)},[Vn,gt]),dn=un?wt({icon:kt,onClick:function(Pn){return At(Pn,-1)},type:"prev",disabled:Jt===0}):void 0,Gt=un?wt({icon:Nt,onClick:function(Pn){return At(Pn,1)},type:"next",disabled:Jt===Zn-1}):void 0,Et=wt({icon:An,onClick:Dn,type:"flipY"}),Ht=wt({icon:nn,onClick:pn,type:"flipX"}),on=wt({icon:Ze,onClick:gn,type:"rotateLeft"}),sn=wt({icon:qe,onClick:In,type:"rotateRight"}),yn=wt({icon:mt,onClick:Kn,type:"zoomOut",disabled:Gn<=Jn}),Wt=wt({icon:st,onClick:rr,type:"zoomIn",disabled:Gn===hr}),Cn=pe.createElement("div",{className:"".concat(gt,"-operations")},Et,Ht,on,sn,yn,Wt);return pe.createElement(je.default,{visible:Ot,motionName:Zt},function(Vt){var Pn=Vt.className,bn=Vt.style;return pe.createElement(Oe.Z,{open:!0,getContainer:Ut!=null?Ut:document.body},pe.createElement("div",{className:ee()("".concat(gt,"-operations-wrapper"),Pn,Qt),style:(0,ie.Z)((0,ie.Z)({},bn),{},{zIndex:Mr})},ur===null?null:pe.createElement("button",{className:"".concat(gt,"-close"),onClick:Nn},ur||Bt),un&&pe.createElement(pe.Fragment,null,pe.createElement("div",{className:ee()("".concat(gt,"-switch-left"),(0,Ce.Z)({},"".concat(gt,"-switch-left-disabled"),Jt===0)),onClick:function(Bn){return At(Bn,-1)}},kt),pe.createElement("div",{className:ee()("".concat(gt,"-switch-right"),(0,Ce.Z)({},"".concat(gt,"-switch-right-disabled"),Jt===Zn-1)),onClick:function(Bn){return At(Bn,1)}},Nt)),pe.createElement("div",{className:"".concat(gt,"-footer")},Sn&&pe.createElement("div",{className:"".concat(gt,"-progress")},qt?qt(Jt+1,Zn):"".concat(Jt+1," / ").concat(Zn)),Un?Un(Cn,(0,ie.Z)((0,ie.Z)({icons:{prevIcon:dn,nextIcon:Gt,flipYIcon:Et,flipXIcon:Ht,rotateLeftIcon:on,rotateRightIcon:sn,zoomOutIcon:yn,zoomInIcon:Wt},actions:{onActive:jn,onFlipY:Dn,onFlipX:pn,onRotateLeft:gn,onRotateRight:In,onZoomOut:Kn,onZoomIn:rr,onReset:Rn,onClose:Nn},transform:Ln},Ie?{current:Jt,total:Zn}:{}),{},{image:an})):Cn)))})},Xe=Qe,ot=Se(13697),We=Se(16089),rt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Ye(Ct,vt,Ot,Zt){var Ut=(0,pe.useRef)(null),gt=(0,pe.useRef)([]),Qt=(0,pe.useState)(rt),Lt=(0,ue.Z)(Qt,2),qt=Lt[0],un=Lt[1],Sn=function(Gn){un(rt),(0,ot.Z)(rt,qt)||Zt==null||Zt({transform:rt,action:Gn})},Jt=function(Gn,Jn){Ut.current===null&&(gt.current=[],Ut.current=(0,We.Z)(function(){un(function(hr){var ur=hr;return gt.current.forEach(function(jn){ur=(0,ie.Z)((0,ie.Z)({},ur),jn)}),Ut.current=null,Zt==null||Zt({transform:ur,action:Jn}),ur})})),gt.current.push((0,ie.Z)((0,ie.Z)({},qt),Gn))},Ln=function(Gn,Jn,hr,ur,jn){var Nn=Ct.current,rr=Nn.width,Kn=Nn.height,In=Nn.offsetWidth,gn=Nn.offsetHeight,pn=Nn.offsetLeft,Dn=Nn.offsetTop,Rn=Gn,Un=qt.scale*Gn;Un>Ot?(Un=Ot,Rn=Ot/qt.scale):Un<vt&&(Un=jn?Un:vt,Rn=Un/qt.scale);var Mr=hr!=null?hr:innerWidth/2,an=ur!=null?ur:innerHeight/2,Ie=Rn-1,Ze=Ie*rr*.5,qe=Ie*Kn*.5,st=Ie*(Mr-qt.x-pn),mt=Ie*(an-qt.y-Dn),Bt=qt.x-(st-Ze),kt=qt.y-(mt-qe);if(Gn<1&&Un===1){var Nt=In*Un,nn=gn*Un,An=me(),Vn=An.width,At=An.height;Nt<=Vn&&nn<=At&&(Bt=0,kt=0)}Jt({x:Bt,y:kt,scale:Un},Jn)};return{transform:qt,resetTransform:Sn,updateTransform:Jt,dispatchZoomChange:Ln}}var ut=Se(48736);function Ge(Ct,vt,Ot,Zt){var Ut=vt+Ot,gt=(Ot-Zt)/2;if(Ot>Zt){if(vt>0)return(0,Ce.Z)({},Ct,gt);if(vt<0&&Ut<Zt)return(0,Ce.Z)({},Ct,-gt)}else if(vt<0||Ut>Zt)return(0,Ce.Z)({},Ct,vt<0?gt:-gt);return{}}function ze(Ct,vt,Ot,Zt){var Ut=me(),gt=Ut.width,Qt=Ut.height,Lt=null;return Ct<=gt&&vt<=Qt?Lt={x:0,y:0}:(Ct>gt||vt>Qt)&&(Lt=(0,ie.Z)((0,ie.Z)({},Ge("x",Ot,Ct,gt)),Ge("y",Zt,vt,Qt))),Lt}var Ve=1,$e=1;function nt(Ct,vt,Ot,Zt,Ut,gt,Qt){var Lt=Ut.rotate,qt=Ut.scale,un=Ut.x,Sn=Ut.y,Jt=(0,pe.useState)(!1),Ln=(0,ue.Z)(Jt,2),Zn=Ln[0],Gn=Ln[1],Jn=(0,pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),hr=function(Kn){!vt||Kn.button!==0||(Kn.preventDefault(),Kn.stopPropagation(),Jn.current={diffX:Kn.pageX-un,diffY:Kn.pageY-Sn,transformX:un,transformY:Sn},Gn(!0))},ur=function(Kn){Ot&&Zn&&gt({x:Kn.pageX-Jn.current.diffX,y:Kn.pageY-Jn.current.diffY},"move")},jn=function(){if(Ot&&Zn){Gn(!1);var Kn=Jn.current,In=Kn.transformX,gn=Kn.transformY,pn=un!==In&&Sn!==gn;if(!pn)return;var Dn=Ct.current.offsetWidth*qt,Rn=Ct.current.offsetHeight*qt,Un=Ct.current.getBoundingClientRect(),Mr=Un.left,an=Un.top,Ie=Lt%180!==0,Ze=ze(Ie?Rn:Dn,Ie?Dn:Rn,Mr,an);Ze&&gt((0,ie.Z)({},Ze),"dragRebound")}},Nn=function(Kn){if(!(!Ot||Kn.deltaY==0)){var In=Math.abs(Kn.deltaY/100),gn=Math.min(In,$e),pn=Ve+gn*Zt;Kn.deltaY>0&&(pn=Ve/pn),Qt(pn,"wheel",Kn.clientX,Kn.clientY)}};return(0,pe.useEffect)(function(){var rr,Kn,In,gn;if(vt){In=(0,Te.Z)(window,"mouseup",jn,!1),gn=(0,Te.Z)(window,"mousemove",ur,!1);try{window.top!==window.self&&(rr=(0,Te.Z)(window.top,"mouseup",jn,!1),Kn=(0,Te.Z)(window.top,"mousemove",ur,!1))}catch(pn){(0,ut.Kp)(!1,"[rc-image] ".concat(pn))}}return function(){var pn,Dn,Rn,Un;(pn=In)===null||pn===void 0||pn.remove(),(Dn=gn)===null||Dn===void 0||Dn.remove(),(Rn=rr)===null||Rn===void 0||Rn.remove(),(Un=Kn)===null||Un===void 0||Un.remove()}},[Ot,Zn,un,Sn,Lt,vt]),{isMoving:Zn,onMouseDown:hr,onMouseMove:ur,onMouseUp:jn,onWheel:Nn}}function et(Ct){return new Promise(function(vt){if(!Ct){vt(!1);return}var Ot=document.createElement("img");Ot.onerror=function(){return vt(!1)},Ot.onload=function(){return vt(!0)},Ot.src=Ct})}function pt(Ct){var vt=Ct.src,Ot=Ct.isCustomPlaceholder,Zt=Ct.fallback,Ut=(0,pe.useState)(Ot?"loading":"normal"),gt=(0,ue.Z)(Ut,2),Qt=gt[0],Lt=gt[1],qt=(0,pe.useRef)(!1),un=Qt==="error";(0,pe.useEffect)(function(){var Zn=!0;return et(vt).then(function(Gn){!Gn&&Zn&&Lt("error")}),function(){Zn=!1}},[vt]),(0,pe.useEffect)(function(){Ot&&!qt.current?Lt("loading"):un&&Lt("normal")},[vt]);var Sn=function(){Lt("normal")},Jt=function(Gn){qt.current=!1,Qt==="loading"&&Gn!==null&&Gn!==void 0&&Gn.complete&&(Gn.naturalWidth||Gn.naturalHeight)&&(qt.current=!0,Sn())},Ln=un&&Zt?{src:Zt}:{onLoad:Sn,src:vt};return[Jt,Ln,Qt]}function ct(Ct,vt){var Ot=Ct.x-vt.x,Zt=Ct.y-vt.y;return Math.hypot(Ot,Zt)}function Rt(Ct,vt,Ot,Zt){var Ut=ct(Ct,Ot),gt=ct(vt,Zt);if(Ut===0&&gt===0)return[Ct.x,Ct.y];var Qt=Ut/(Ut+gt),Lt=Ct.x+Qt*(vt.x-Ct.x),qt=Ct.y+Qt*(vt.y-Ct.y);return[Lt,qt]}function dt(Ct,vt,Ot,Zt,Ut,gt,Qt){var Lt=Ut.rotate,qt=Ut.scale,un=Ut.x,Sn=Ut.y,Jt=(0,pe.useState)(!1),Ln=(0,ue.Z)(Jt,2),Zn=Ln[0],Gn=Ln[1],Jn=(0,pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),hr=function(Kn){Jn.current=(0,ie.Z)((0,ie.Z)({},Jn.current),Kn)},ur=function(Kn){if(vt){Kn.stopPropagation(),Gn(!0);var In=Kn.touches,gn=In===void 0?[]:In;gn.length>1?hr({point1:{x:gn[0].clientX,y:gn[0].clientY},point2:{x:gn[1].clientX,y:gn[1].clientY},eventType:"touchZoom"}):hr({point1:{x:gn[0].clientX-un,y:gn[0].clientY-Sn},eventType:"move"})}},jn=function(Kn){var In=Kn.touches,gn=In===void 0?[]:In,pn=Jn.current,Dn=pn.point1,Rn=pn.point2,Un=pn.eventType;if(gn.length>1&&Un==="touchZoom"){var Mr={x:gn[0].clientX,y:gn[0].clientY},an={x:gn[1].clientX,y:gn[1].clientY},Ie=Rt(Dn,Rn,Mr,an),Ze=(0,ue.Z)(Ie,2),qe=Ze[0],st=Ze[1],mt=ct(Mr,an)/ct(Dn,Rn);Qt(mt,"touchZoom",qe,st,!0),hr({point1:Mr,point2:an,eventType:"touchZoom"})}else Un==="move"&&(gt({x:gn[0].clientX-Dn.x,y:gn[0].clientY-Dn.y},"move"),hr({eventType:"move"}))},Nn=function(){if(Ot){if(Zn&&Gn(!1),hr({eventType:"none"}),Zt>qt)return gt({x:0,y:0,scale:Zt},"touchZoom");var Kn=Ct.current.offsetWidth*qt,In=Ct.current.offsetHeight*qt,gn=Ct.current.getBoundingClientRect(),pn=gn.left,Dn=gn.top,Rn=Lt%180!==0,Un=ze(Rn?In:Kn,Rn?Kn:In,pn,Dn);Un&&gt((0,ie.Z)({},Un),"dragRebound")}};return(0,pe.useEffect)(function(){var rr;return Ot&&vt&&(rr=(0,Te.Z)(window,"touchmove",function(Kn){return Kn.preventDefault()},{passive:!1})),function(){var Kn;(Kn=rr)===null||Kn===void 0||Kn.remove()}},[Ot,vt]),{isTouching:Zn,onTouchStart:ur,onTouchMove:jn,onTouchEnd:Nn}}var Mt=["fallback","src","imgRef"],xt=["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"],yt=function(vt){var Ot=vt.fallback,Zt=vt.src,Ut=vt.imgRef,gt=(0,te.Z)(vt,Mt),Qt=pt({src:Zt,fallback:Ot}),Lt=(0,ue.Z)(Qt,2),qt=Lt[0],un=Lt[1];return pe.createElement("img",(0,ce.Z)({ref:function(Jt){Ut.current=Jt,qt(Jt)}},gt,un))},bt=function(vt){var Ot=vt.prefixCls,Zt=vt.src,Ut=vt.alt,gt=vt.imageInfo,Qt=vt.fallback,Lt=vt.movable,qt=Lt===void 0?!0:Lt,un=vt.onClose,Sn=vt.visible,Jt=vt.icons,Ln=Jt===void 0?{}:Jt,Zn=vt.rootClassName,Gn=vt.closeIcon,Jn=vt.getContainer,hr=vt.current,ur=hr===void 0?0:hr,jn=vt.count,Nn=jn===void 0?1:jn,rr=vt.countRender,Kn=vt.scaleStep,In=Kn===void 0?.5:Kn,gn=vt.minScale,pn=gn===void 0?1:gn,Dn=vt.maxScale,Rn=Dn===void 0?50:Dn,Un=vt.transitionName,Mr=Un===void 0?"zoom":Un,an=vt.maskTransitionName,Ie=an===void 0?"fade":an,Ze=vt.imageRender,qe=vt.imgCommonProps,st=vt.toolbarRender,mt=vt.onTransform,Bt=vt.onChange,kt=(0,te.Z)(vt,xt),Nt=(0,pe.useRef)(),nn=(0,pe.useContext)(Pe),An=nn&&Nn>1,Vn=nn&&Nn>=1,At=(0,pe.useState)(!0),wt=(0,ue.Z)(At,2),dn=wt[0],Gt=wt[1],Et=Ye(Nt,pn,Rn,mt),Ht=Et.transform,on=Et.resetTransform,sn=Et.updateTransform,yn=Et.dispatchZoomChange,Wt=nt(Nt,qt,Sn,In,Ht,sn,yn),Cn=Wt.isMoving,Vt=Wt.onMouseDown,Pn=Wt.onWheel,bn=dt(Nt,qt,Sn,pn,Ht,sn,yn),zn=bn.isTouching,Bn=bn.onTouchStart,er=bn.onTouchMove,cr=bn.onTouchEnd,pr=Ht.rotate,Nr=Ht.scale,Br=ee()((0,Ce.Z)({},"".concat(Ot,"-moving"),Cn));(0,pe.useEffect)(function(){dn||Gt(!0)},[dn]);var ei=function(){on("close")},xr=function(){yn(Ve+In,"zoomIn")},Tr=function(){yn(Ve/(Ve+In),"zoomOut")},Pr=function(){sn({rotate:pr+90},"rotateRight")},Xr=function(){sn({rotate:pr-90},"rotateLeft")},hi=function(){sn({flipX:!Ht.flipX},"flipX")},bi=function(){sn({flipY:!Ht.flipY},"flipY")},Si=function(){on("reset")},Kr=function(ti){var ni=ur+ti;!Number.isInteger(ni)||ni<0||ni>Nn-1||(Gt(!1),on(ti<0?"prev":"next"),Bt==null||Bt(ni,ur))},Ti=function(ti){!Sn||!An||(ti.keyCode===Ee.Z.LEFT?Kr(-1):ti.keyCode===Ee.Z.RIGHT&&Kr(1))},Ei=function(ti){Sn&&(Nr!==1?sn({x:0,y:0,scale:1},"doubleClick"):yn(Ve+In,"doubleClick",ti.clientX,ti.clientY))};(0,pe.useEffect)(function(){var kr=(0,Te.Z)(window,"keydown",Ti,!1);return function(){kr.remove()}},[Sn,An,ur]);var tr=pe.createElement(yt,(0,ce.Z)({},qe,{width:vt.width,height:vt.height,imgRef:Nt,className:"".concat(Ot,"-img"),alt:Ut,style:{transform:"translate3d(".concat(Ht.x,"px, ").concat(Ht.y,"px, 0) scale3d(").concat(Ht.flipX?"-":"").concat(Nr,", ").concat(Ht.flipY?"-":"").concat(Nr,", 1) rotate(").concat(pr,"deg)"),transitionDuration:(!dn||zn)&&"0s"},fallback:Qt,src:Zt,onWheel:Pn,onMouseDown:Vt,onDoubleClick:Ei,onTouchStart:Bn,onTouchMove:er,onTouchEnd:cr,onTouchCancel:cr})),br=(0,ie.Z)({url:Zt,alt:Ut},gt);return pe.createElement(pe.Fragment,null,pe.createElement(ke.Z,(0,ce.Z)({transitionName:Mr,maskTransitionName:Ie,closable:!1,keyboard:!0,prefixCls:Ot,onClose:un,visible:Sn,classNames:{wrapper:Br},rootClassName:Zn,getContainer:Jn},kt,{afterClose:ei}),pe.createElement("div",{className:"".concat(Ot,"-img-wrapper")},Ze?Ze(tr,(0,ie.Z)({transform:Ht,image:br},nn?{current:ur}:{})):tr)),pe.createElement(Xe,{visible:Sn,transform:Ht,maskTransitionName:Ie,closeIcon:Gn,getContainer:Jn,prefixCls:Ot,rootClassName:Zn,icons:Ln,countRender:rr,showSwitch:An,showProgress:Vn,current:ur,count:Nn,scale:Nr,minScale:pn,maxScale:Rn,toolbarRender:st,onActive:Kr,onZoomIn:xr,onZoomOut:Tr,onRotateRight:Pr,onRotateLeft:Xr,onFlipX:hi,onFlipY:bi,onClose:un,onReset:Si,zIndex:kt.zIndex!==void 0?kt.zIndex+1:void 0,image:br}))},He=bt,Ae=Se(15142),be=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function Be(Ct){var vt=pe.useState({}),Ot=(0,ue.Z)(vt,2),Zt=Ot[0],Ut=Ot[1],gt=pe.useCallback(function(Lt,qt){return Ut(function(un){return(0,ie.Z)((0,ie.Z)({},un),{},(0,Ce.Z)({},Lt,qt))}),function(){Ut(function(un){var Sn=(0,ie.Z)({},un);return delete Sn[Lt],Sn})}},[]),Qt=pe.useMemo(function(){return Ct?Ct.map(function(Lt){if(typeof Lt=="string")return{data:{src:Lt}};var qt={};return Object.keys(Lt).forEach(function(un){["src"].concat((0,Ae.Z)(be)).includes(un)&&(qt[un]=Lt[un])}),{data:qt}}):Object.keys(Zt).reduce(function(Lt,qt){var un=Zt[qt],Sn=un.canPreview,Jt=un.data;return Sn&&Lt.push({data:Jt,id:qt}),Lt},[])},[Ct,Zt]);return[Qt,gt,!!Ct]}var Ke=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ne=["src"],De=function(vt){var Ot,Zt=vt.previewPrefixCls,Ut=Zt===void 0?"rc-image-preview":Zt,gt=vt.children,Qt=vt.icons,Lt=Qt===void 0?{}:Qt,qt=vt.items,un=vt.preview,Sn=vt.fallback,Jt=(0,se.Z)(un)==="object"?un:{},Ln=Jt.visible,Zn=Jt.onVisibleChange,Gn=Jt.getContainer,Jn=Jt.current,hr=Jt.movable,ur=Jt.minScale,jn=Jt.maxScale,Nn=Jt.countRender,rr=Jt.closeIcon,Kn=Jt.onChange,In=Jt.onTransform,gn=Jt.toolbarRender,pn=Jt.imageRender,Dn=(0,te.Z)(Jt,Ke),Rn=Be(qt),Un=(0,ue.Z)(Rn,3),Mr=Un[0],an=Un[1],Ie=Un[2],Ze=(0,he.Z)(0,{value:Jn}),qe=(0,ue.Z)(Ze,2),st=qe[0],mt=qe[1],Bt=(0,pe.useState)(!1),kt=(0,ue.Z)(Bt,2),Nt=kt[0],nn=kt[1],An=((Ot=Mr[st])===null||Ot===void 0?void 0:Ot.data)||{},Vn=An.src,At=(0,te.Z)(An,Ne),wt=(0,he.Z)(!!Ln,{value:Ln,onChange:function(zn,Bn){Zn==null||Zn(zn,Bn,st)}}),dn=(0,ue.Z)(wt,2),Gt=dn[0],Et=dn[1],Ht=(0,pe.useState)(null),on=(0,ue.Z)(Ht,2),sn=on[0],yn=on[1],Wt=pe.useCallback(function(bn,zn,Bn,er){var cr=Ie?Mr.findIndex(function(pr){return pr.data.src===zn}):Mr.findIndex(function(pr){return pr.id===bn});mt(cr<0?0:cr),Et(!0),yn({x:Bn,y:er}),nn(!0)},[Mr,Ie]);pe.useEffect(function(){Gt?Nt||mt(0):nn(!1)},[Gt]);var Cn=function(zn,Bn){mt(zn),Kn==null||Kn(zn,Bn)},Vt=function(){Et(!1),yn(null)},Pn=pe.useMemo(function(){return{register:an,onPreview:Wt}},[an,Wt]);return pe.createElement(Pe.Provider,{value:Pn},gt,pe.createElement(He,(0,ce.Z)({"aria-hidden":!Gt,movable:hr,visible:Gt,prefixCls:Ut,closeIcon:rr,onClose:Vt,mousePosition:sn,imgCommonProps:At,src:Vn,fallback:Sn,icons:Lt,minScale:ur,maxScale:jn,getContainer:Gn,current:st,count:Mr.length,countRender:Nn,onTransform:In,toolbarRender:gn,imageRender:pn,onChange:Cn},Dn)))},we=De,Le=0;function Ue(Ct,vt){var Ot=pe.useState(function(){return Le+=1,String(Le)}),Zt=(0,ue.Z)(Ot,1),Ut=Zt[0],gt=pe.useContext(Pe),Qt={data:vt,canPreview:Ct};return pe.useEffect(function(){if(gt)return gt.register(Ut,Qt)},[]),pe.useEffect(function(){gt&&gt.register(Ut,Qt)},[Ct,vt]),Ut}var Me=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Re=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],tt=function(vt){var Ot=vt.src,Zt=vt.alt,Ut=vt.onPreviewClose,gt=vt.prefixCls,Qt=gt===void 0?"rc-image":gt,Lt=vt.previewPrefixCls,qt=Lt===void 0?"".concat(Qt,"-preview"):Lt,un=vt.placeholder,Sn=vt.fallback,Jt=vt.width,Ln=vt.height,Zn=vt.style,Gn=vt.preview,Jn=Gn===void 0?!0:Gn,hr=vt.className,ur=vt.onClick,jn=vt.onError,Nn=vt.wrapperClassName,rr=vt.wrapperStyle,Kn=vt.rootClassName,In=(0,te.Z)(vt,Me),gn=un&&un!==!0,pn=(0,se.Z)(Jn)==="object"?Jn:{},Dn=pn.src,Rn=pn.visible,Un=Rn===void 0?void 0:Rn,Mr=pn.onVisibleChange,an=Mr===void 0?Ut:Mr,Ie=pn.getContainer,Ze=Ie===void 0?void 0:Ie,qe=pn.mask,st=pn.maskClassName,mt=pn.movable,Bt=pn.icons,kt=pn.scaleStep,Nt=pn.minScale,nn=pn.maxScale,An=pn.imageRender,Vn=pn.toolbarRender,At=(0,te.Z)(pn,Re),wt=Dn!=null?Dn:Ot,dn=(0,he.Z)(!!Un,{value:Un,onChange:an}),Gt=(0,ue.Z)(dn,2),Et=Gt[0],Ht=Gt[1],on=pt({src:Ot,isCustomPlaceholder:gn,fallback:Sn}),sn=(0,ue.Z)(on,3),yn=sn[0],Wt=sn[1],Cn=sn[2],Vt=(0,pe.useState)(null),Pn=(0,ue.Z)(Vt,2),bn=Pn[0],zn=Pn[1],Bn=(0,pe.useContext)(Pe),er=!!Jn,cr=function(){Ht(!1),zn(null)},pr=ee()(Qt,Nn,Kn,(0,Ce.Z)({},"".concat(Qt,"-error"),Cn==="error")),Nr=(0,pe.useMemo)(function(){var Tr={};return be.forEach(function(Pr){vt[Pr]!==void 0&&(Tr[Pr]=vt[Pr])}),Tr},be.map(function(Tr){return vt[Tr]})),Br=(0,pe.useMemo)(function(){return(0,ie.Z)((0,ie.Z)({},Nr),{},{src:wt})},[wt,Nr]),ei=Ue(er,Br),xr=function(Pr){var Xr=_e(Pr.target),hi=Xr.left,bi=Xr.top;Bn?Bn.onPreview(ei,wt,hi,bi):(zn({x:hi,y:bi}),Ht(!0)),ur==null||ur(Pr)};return pe.createElement(pe.Fragment,null,pe.createElement("div",(0,ce.Z)({},In,{className:pr,onClick:er?xr:ur,style:(0,ie.Z)({width:Jt,height:Ln},rr)}),pe.createElement("img",(0,ce.Z)({},Nr,{className:ee()("".concat(Qt,"-img"),(0,Ce.Z)({},"".concat(Qt,"-img-placeholder"),un===!0),hr),style:(0,ie.Z)({height:Ln},Zn),ref:yn},Wt,{width:Jt,height:Ln,onError:jn})),Cn==="loading"&&pe.createElement("div",{"aria-hidden":"true",className:"".concat(Qt,"-placeholder")},un),qe&&er&&pe.createElement("div",{className:ee()("".concat(Qt,"-mask"),st),style:{display:(Zn==null?void 0:Zn.display)==="none"?"none":void 0}},qe)),!Bn&&er&&pe.createElement(He,(0,ce.Z)({"aria-hidden":!Et,visible:Et,prefixCls:qt,onClose:cr,mousePosition:bn,src:wt,alt:Zt,imageInfo:{width:Jt,height:Ln},fallback:Sn,getContainer:Ze,icons:Bt,movable:mt,scaleStep:kt,minScale:Nt,maxScale:nn,rootClassName:Kn,imageRender:An,imgCommonProps:Nr,toolbarRender:Vn},At)))};tt.PreviewGroup=we;var lt=tt,Pt=lt},23425:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ke}});var ce=Se(52873),ie=Se(67711),Ce=Se(26420),ue=Se(98506),se=Se(16886),te=Se(92310),le=Se.n(te),ee=Se(18929),ne=Se(10228),E=Se(26112),b=Se(48736),z=Se(59301),x=Se(17119),re=[10,20,50,100],ae=function(Ee){var Oe=Ee.pageSizeOptions,je=Oe===void 0?re:Oe,Pe=Ee.locale,Qe=Ee.changeSize,Xe=Ee.pageSize,ot=Ee.goButton,We=Ee.quickGo,rt=Ee.rootPrefixCls,Ye=Ee.disabled,ut=Ee.buildOptionText,Ge=Ee.showSizeChanger,ze=Ee.sizeChangerRender,Ve=z.useState(""),$e=(0,se.Z)(Ve,2),nt=$e[0],et=$e[1],pt=function(){return!nt||Number.isNaN(nt)?void 0:Number(nt)},ct=typeof ut=="function"?ut:function(be){return"".concat(be," ").concat(Pe.items_per_page)},Rt=function(Be){et(Be.target.value)},dt=function(Be){ot||nt===""||(et(""),!(Be.relatedTarget&&(Be.relatedTarget.className.indexOf("".concat(rt,"-item-link"))>=0||Be.relatedTarget.className.indexOf("".concat(rt,"-item"))>=0))&&(We==null||We(pt())))},Mt=function(Be){nt!==""&&(Be.keyCode===ne.Z.ENTER||Be.type==="click")&&(et(""),We==null||We(pt()))},xt=function(){return je.some(function(Be){return Be.toString()===Xe.toString()})?je:je.concat([Xe]).sort(function(Be,Ke){var Ne=Number.isNaN(Number(Be))?0:Number(Be),De=Number.isNaN(Number(Ke))?0:Number(Ke);return Ne-De})},yt="".concat(rt,"-options");if(!Ge&&!We)return null;var bt=null,He=null,Ae=null;return Ge&&ze&&(bt=ze({disabled:Ye,size:Xe,onSizeChange:function(Be){Qe==null||Qe(Number(Be))},"aria-label":Pe.page_size,className:"".concat(yt,"-size-changer"),options:xt().map(function(be){return{label:ct(be),value:be}})})),We&&(ot&&(Ae=typeof ot=="boolean"?z.createElement("button",{type:"button",onClick:Mt,onKeyUp:Mt,disabled:Ye,className:"".concat(yt,"-quick-jumper-button")},Pe.jump_to_confirm):z.createElement("span",{onClick:Mt,onKeyUp:Mt},ot)),He=z.createElement("div",{className:"".concat(yt,"-quick-jumper")},Pe.jump_to,z.createElement("input",{disabled:Ye,type:"text",value:nt,onChange:Rt,onKeyUp:Mt,onBlur:dt,"aria-label":Pe.page}),Pe.page,Ae)),z.createElement("li",{className:yt},bt,He)},oe=ae,ve=function(Ee){var Oe=Ee.rootPrefixCls,je=Ee.page,Pe=Ee.active,Qe=Ee.className,Xe=Ee.showTitle,ot=Ee.onClick,We=Ee.onKeyPress,rt=Ee.itemRender,Ye="".concat(Oe,"-item"),ut=le()(Ye,"".concat(Ye,"-").concat(je),(0,ce.Z)((0,ce.Z)({},"".concat(Ye,"-active"),Pe),"".concat(Ye,"-disabled"),!je),Qe),Ge=function(){ot(je)},ze=function(nt){We(nt,ot,je)},Ve=rt(je,"page",z.createElement("a",{rel:"nofollow"},je));return Ve?z.createElement("li",{title:Xe?String(je):null,className:ut,onClick:Ge,onKeyDown:ze,tabIndex:0},Ve):null},ye=ve,me=function(Ee,Oe,je){return je};function ge(){}function _e(Te){var Ee=Number(Te);return typeof Ee=="number"&&!Number.isNaN(Ee)&&isFinite(Ee)&&Math.floor(Ee)===Ee}function he(Te,Ee,Oe){var je=typeof Te=="undefined"?Ee:Te;return Math.floor((Oe-1)/je)+1}var pe=function(Ee){var Oe=Ee.prefixCls,je=Oe===void 0?"rc-pagination":Oe,Pe=Ee.selectPrefixCls,Qe=Pe===void 0?"rc-select":Pe,Xe=Ee.className,ot=Ee.current,We=Ee.defaultCurrent,rt=We===void 0?1:We,Ye=Ee.total,ut=Ye===void 0?0:Ye,Ge=Ee.pageSize,ze=Ee.defaultPageSize,Ve=ze===void 0?10:ze,$e=Ee.onChange,nt=$e===void 0?ge:$e,et=Ee.hideOnSinglePage,pt=Ee.align,ct=Ee.showPrevNextJumpers,Rt=ct===void 0?!0:ct,dt=Ee.showQuickJumper,Mt=Ee.showLessItems,xt=Ee.showTitle,yt=xt===void 0?!0:xt,bt=Ee.onShowSizeChange,He=bt===void 0?ge:bt,Ae=Ee.locale,be=Ae===void 0?x.Z:Ae,Be=Ee.style,Ke=Ee.totalBoundaryShowSizeChanger,Ne=Ke===void 0?50:Ke,De=Ee.disabled,we=Ee.simple,Le=Ee.showTotal,Ue=Ee.showSizeChanger,Me=Ue===void 0?ut>Ne:Ue,Re=Ee.sizeChangerRender,tt=Ee.pageSizeOptions,lt=Ee.itemRender,Pt=lt===void 0?me:lt,Ct=Ee.jumpPrevIcon,vt=Ee.jumpNextIcon,Ot=Ee.prevIcon,Zt=Ee.nextIcon,Ut=z.useRef(null),gt=(0,ee.Z)(10,{value:Ge,defaultValue:Ve}),Qt=(0,se.Z)(gt,2),Lt=Qt[0],qt=Qt[1],un=(0,ee.Z)(1,{value:ot,defaultValue:rt,postState:function(br){return Math.max(1,Math.min(br,he(void 0,Lt,ut)))}}),Sn=(0,se.Z)(un,2),Jt=Sn[0],Ln=Sn[1],Zn=z.useState(Jt),Gn=(0,se.Z)(Zn,2),Jn=Gn[0],hr=Gn[1];(0,z.useEffect)(function(){hr(Jt)},[Jt]);var ur=nt!==ge,jn="current"in Ee,Nn=Math.max(1,Jt-(Mt?3:5)),rr=Math.min(he(void 0,Lt,ut),Jt+(Mt?3:5));function Kn(tr,br){var kr=tr||z.createElement("button",{type:"button","aria-label":br,className:"".concat(je,"-item-link")});return typeof tr=="function"&&(kr=z.createElement(tr,(0,ue.Z)({},Ee))),kr}function In(tr){var br=tr.target.value,kr=he(void 0,Lt,ut),ti;return br===""?ti=br:Number.isNaN(Number(br))?ti=Jn:br>=kr?ti=kr:ti=Number(br),ti}function gn(tr){return _e(tr)&&tr!==Jt&&_e(ut)&&ut>0}var pn=ut>Lt?dt:!1;function Dn(tr){(tr.keyCode===ne.Z.UP||tr.keyCode===ne.Z.DOWN)&&tr.preventDefault()}function Rn(tr){var br=In(tr);switch(br!==Jn&&hr(br),tr.keyCode){case ne.Z.ENTER:an(br);break;case ne.Z.UP:an(br-1);break;case ne.Z.DOWN:an(br+1);break;default:break}}function Un(tr){an(In(tr))}function Mr(tr){var br=he(tr,Lt,ut),kr=Jt>br&&br!==0?br:Jt;qt(tr),hr(kr),He==null||He(Jt,tr),Ln(kr),nt==null||nt(kr,tr)}function an(tr){if(gn(tr)&&!De){var br=he(void 0,Lt,ut),kr=tr;return tr>br?kr=br:tr<1&&(kr=1),kr!==Jn&&hr(kr),Ln(kr),nt==null||nt(kr,Lt),kr}return Jt}var Ie=Jt>1,Ze=Jt<he(void 0,Lt,ut);function qe(){Ie&&an(Jt-1)}function st(){Ze&&an(Jt+1)}function mt(){an(Nn)}function Bt(){an(rr)}function kt(tr,br){if(tr.key==="Enter"||tr.charCode===ne.Z.ENTER||tr.keyCode===ne.Z.ENTER){for(var kr=arguments.length,ti=new Array(kr>2?kr-2:0),ni=2;ni<kr;ni++)ti[ni-2]=arguments[ni];br.apply(void 0,ti)}}function Nt(tr){kt(tr,qe)}function nn(tr){kt(tr,st)}function An(tr){kt(tr,mt)}function Vn(tr){kt(tr,Bt)}function At(tr){var br=Pt(tr,"prev",Kn(Ot,"prev page"));return z.isValidElement(br)?z.cloneElement(br,{disabled:!Ie}):br}function wt(tr){var br=Pt(tr,"next",Kn(Zt,"next page"));return z.isValidElement(br)?z.cloneElement(br,{disabled:!Ze}):br}function dn(tr){(tr.type==="click"||tr.keyCode===ne.Z.ENTER)&&an(Jn)}var Gt=null,Et=(0,E.Z)(Ee,{aria:!0,data:!0}),Ht=Le&&z.createElement("li",{className:"".concat(je,"-total-text")},Le(ut,[ut===0?0:(Jt-1)*Lt+1,Jt*Lt>ut?ut:Jt*Lt])),on=null,sn=he(void 0,Lt,ut);if(et&&ut<=Lt)return null;var yn=[],Wt={rootPrefixCls:je,onClick:an,onKeyPress:kt,showTitle:yt,itemRender:Pt,page:-1},Cn=Jt-1>0?Jt-1:0,Vt=Jt+1<sn?Jt+1:sn,Pn=dt&&dt.goButton,bn=(0,Ce.Z)(we)==="object"?we.readOnly:!we,zn=Pn,Bn=null;we&&(Pn&&(typeof Pn=="boolean"?zn=z.createElement("button",{type:"button",onClick:dn,onKeyUp:dn},be.jump_to_confirm):zn=z.createElement("span",{onClick:dn,onKeyUp:dn},Pn),zn=z.createElement("li",{title:yt?"".concat(be.jump_to).concat(Jt,"/").concat(sn):null,className:"".concat(je,"-simple-pager")},zn)),Bn=z.createElement("li",{title:yt?"".concat(Jt,"/").concat(sn):null,className:"".concat(je,"-simple-pager")},bn?Jn:z.createElement("input",{type:"text","aria-label":be.jump_to,value:Jn,disabled:De,onKeyDown:Dn,onKeyUp:Rn,onChange:Rn,onBlur:Un,size:3}),z.createElement("span",{className:"".concat(je,"-slash")},"/"),sn));var er=Mt?1:2;if(sn<=3+er*2){sn||yn.push(z.createElement(ye,(0,ie.Z)({},Wt,{key:"noPager",page:1,className:"".concat(je,"-item-disabled")})));for(var cr=1;cr<=sn;cr+=1)yn.push(z.createElement(ye,(0,ie.Z)({},Wt,{key:cr,page:cr,active:Jt===cr})))}else{var pr=Mt?be.prev_3:be.prev_5,Nr=Mt?be.next_3:be.next_5,Br=Pt(Nn,"jump-prev",Kn(Ct,"prev page")),ei=Pt(rr,"jump-next",Kn(vt,"next page"));Rt&&(Gt=Br?z.createElement("li",{title:yt?pr:null,key:"prev",onClick:mt,tabIndex:0,onKeyDown:An,className:le()("".concat(je,"-jump-prev"),(0,ce.Z)({},"".concat(je,"-jump-prev-custom-icon"),!!Ct))},Br):null,on=ei?z.createElement("li",{title:yt?Nr:null,key:"next",onClick:Bt,tabIndex:0,onKeyDown:Vn,className:le()("".concat(je,"-jump-next"),(0,ce.Z)({},"".concat(je,"-jump-next-custom-icon"),!!vt))},ei):null);var xr=Math.max(1,Jt-er),Tr=Math.min(Jt+er,sn);Jt-1<=er&&(Tr=1+er*2),sn-Jt<=er&&(xr=sn-er*2);for(var Pr=xr;Pr<=Tr;Pr+=1)yn.push(z.createElement(ye,(0,ie.Z)({},Wt,{key:Pr,page:Pr,active:Jt===Pr})));if(Jt-1>=er*2&&Jt!==3&&(yn[0]=z.cloneElement(yn[0],{className:le()("".concat(je,"-item-after-jump-prev"),yn[0].props.className)}),yn.unshift(Gt)),sn-Jt>=er*2&&Jt!==sn-2){var Xr=yn[yn.length-1];yn[yn.length-1]=z.cloneElement(Xr,{className:le()("".concat(je,"-item-before-jump-next"),Xr.props.className)}),yn.push(on)}xr!==1&&yn.unshift(z.createElement(ye,(0,ie.Z)({},Wt,{key:1,page:1}))),Tr!==sn&&yn.push(z.createElement(ye,(0,ie.Z)({},Wt,{key:sn,page:sn})))}var hi=At(Cn);if(hi){var bi=!Ie||!sn;hi=z.createElement("li",{title:yt?be.prev_page:null,onClick:qe,tabIndex:bi?null:0,onKeyDown:Nt,className:le()("".concat(je,"-prev"),(0,ce.Z)({},"".concat(je,"-disabled"),bi)),"aria-disabled":bi},hi)}var Si=wt(Vt);if(Si){var Kr,Ti;we?(Kr=!Ze,Ti=Ie?0:null):(Kr=!Ze||!sn,Ti=Kr?null:0),Si=z.createElement("li",{title:yt?be.next_page:null,onClick:st,tabIndex:Ti,onKeyDown:nn,className:le()("".concat(je,"-next"),(0,ce.Z)({},"".concat(je,"-disabled"),Kr)),"aria-disabled":Kr},Si)}var Ei=le()(je,Xe,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(je,"-start"),pt==="start"),"".concat(je,"-center"),pt==="center"),"".concat(je,"-end"),pt==="end"),"".concat(je,"-simple"),we),"".concat(je,"-disabled"),De));return z.createElement("ul",(0,ie.Z)({className:Ei,style:Be,ref:Ut},Et),Ht,hi,we?Bn:yn,Si,z.createElement(oe,{locale:be,rootPrefixCls:je,disabled:De,selectPrefixCls:Qe,changeSize:Mr,pageSize:Lt,pageSizeOptions:tt,quickGo:pn?an:null,goButton:zn,showSizeChanger:Me,sizeChangerRender:Re}))},ke=pe},6551:function($t,Dt,Se){"use strict";Se.d(Dt,{ZP:function(){return le}});var ce=Se(16886),ie=Se(59301),Ce=Se(47273),ue=0,se=(0,Ce.Z)();function te(){var ee;return se?(ee=ue,ue+=1):ee="TEST_OR_SSR",ee}function le(ee){var ne=ie.useState(),E=(0,ce.Z)(ne,2),b=E[0],z=E[1];return ie.useEffect(function(){z("rc_select_".concat(te()))},[]),ee||b}},37463:function($t,Dt,Se){"use strict";Se.d(Dt,{Ac:function(){return gt},Xo:function(){return Lt},Wx:function(){return un},ZP:function(){return Vn},lk:function(){return ge}});var ce=Se(67711),ie=Se(15142),Ce=Se(52873),ue=Se(98506),se=Se(16886),te=Se(33346),le=Se(26420),ee=Se(18929),ne=Se(48736),E=Se(59301),b=Se(92310),z=Se.n(b),x=Se(34280),re=Se(49658),ae=Se(8654),oe=function(wt){var dn=wt.className,Gt=wt.customizeIcon,Et=wt.customizeIconProps,Ht=wt.children,on=wt.onMouseDown,sn=wt.onClick,yn=typeof Gt=="function"?Gt(Et):Gt;return E.createElement("span",{className:dn,onMouseDown:function(Cn){Cn.preventDefault(),on==null||on(Cn)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:sn,"aria-hidden":!0},yn!==void 0?yn:E.createElement("span",{className:z()(dn.split(/\s+/).map(function(Wt){return"".concat(Wt,"-icon")}))},Ht))},ve=oe,ye=function(wt,dn,Gt,Et,Ht){var on=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,sn=arguments.length>6?arguments[6]:void 0,yn=arguments.length>7?arguments[7]:void 0,Wt=E.useMemo(function(){if((0,le.Z)(Et)==="object")return Et.clearIcon;if(Ht)return Ht},[Et,Ht]),Cn=E.useMemo(function(){return!!(!on&&Et&&(Gt.length||sn)&&!(yn==="combobox"&&sn===""))},[Et,on,Gt.length,sn,yn]);return{allowClear:Cn,clearIcon:E.createElement(ve,{className:"".concat(wt,"-clear"),onMouseDown:dn,customizeIcon:Wt},"\xD7")}},me=E.createContext(null);function ge(){return E.useContext(me)}function _e(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,wt=E.useState(!1),dn=(0,se.Z)(wt,2),Gt=dn[0],Et=dn[1],Ht=E.useRef(null),on=function(){window.clearTimeout(Ht.current)};E.useEffect(function(){return on},[]);var sn=function(Wt,Cn){on(),Ht.current=window.setTimeout(function(){Et(Wt),Cn&&Cn()},At)};return[Gt,sn,on]}function he(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,wt=E.useRef(null),dn=E.useRef(null);E.useEffect(function(){return function(){window.clearTimeout(dn.current)}},[]);function Gt(Et){(Et||wt.current===null)&&(wt.current=Et),window.clearTimeout(dn.current),dn.current=window.setTimeout(function(){wt.current=null},At)}return[function(){return wt.current},Gt]}function pe(At,wt,dn,Gt){var Et=E.useRef(null);Et.current={open:wt,triggerOpen:dn,customizedTrigger:Gt},E.useEffect(function(){function Ht(on){var sn;if(!((sn=Et.current)!==null&&sn!==void 0&&sn.customizedTrigger)){var yn=on.target;yn.shadowRoot&&on.composed&&(yn=on.composedPath()[0]||yn),Et.current.open&&At().filter(function(Wt){return Wt}).every(function(Wt){return!Wt.contains(yn)&&Wt!==yn})&&Et.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ht),function(){return window.removeEventListener("mousedown",Ht)}},[])}var ke=Se(10228);function Te(At){return At&&![ke.Z.ESC,ke.Z.SHIFT,ke.Z.BACKSPACE,ke.Z.TAB,ke.Z.WIN_KEY,ke.Z.ALT,ke.Z.META,ke.Z.WIN_KEY_RIGHT,ke.Z.CTRL,ke.Z.SEMICOLON,ke.Z.EQUALS,ke.Z.CAPS_LOCK,ke.Z.CONTEXT_MENU,ke.Z.F1,ke.Z.F2,ke.Z.F3,ke.Z.F4,ke.Z.F5,ke.Z.F6,ke.Z.F7,ke.Z.F8,ke.Z.F9,ke.Z.F10,ke.Z.F11,ke.Z.F12].includes(At)}var Ee=Se(26112),Oe=Se(11780);function je(At,wt,dn){var Gt=(0,ue.Z)((0,ue.Z)({},At),dn?wt:{});return Object.keys(wt).forEach(function(Et){var Ht=wt[Et];typeof Ht=="function"&&(Gt[Et]=function(){for(var on,sn=arguments.length,yn=new Array(sn),Wt=0;Wt<sn;Wt++)yn[Wt]=arguments[Wt];return Ht.apply(void 0,yn),(on=At[Et])===null||on===void 0?void 0:on.call.apply(on,[At].concat(yn))})}),Gt}var Pe=je,Qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Xe=function(wt,dn){var Gt=wt.prefixCls,Et=wt.id,Ht=wt.inputElement,on=wt.autoFocus,sn=wt.autoComplete,yn=wt.editable,Wt=wt.activeDescendantId,Cn=wt.value,Vt=wt.open,Pn=wt.attrs,bn=(0,te.Z)(wt,Qe),zn=Ht||E.createElement("input",null),Bn=zn,er=Bn.ref,cr=Bn.props;return(0,ne.Kp)(!("maxLength"in zn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),zn=E.cloneElement(zn,(0,ue.Z)((0,ue.Z)((0,ue.Z)({type:"search"},Pe(bn,cr,!0)),{},{id:Et,ref:(0,ae.sQ)(dn,er),autoComplete:sn||"off",autoFocus:on,className:z()("".concat(Gt,"-selection-search-input"),cr==null?void 0:cr.className),role:"combobox","aria-expanded":Vt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Et,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Et,"_list"),"aria-activedescendant":Vt?Wt:void 0},Pn),{},{value:yn?Cn:"",readOnly:!yn,unselectable:yn?null:"on",style:(0,ue.Z)((0,ue.Z)({},cr.style),{},{opacity:yn?null:0})})),zn},ot=E.forwardRef(Xe),We=ot;function rt(At){return Array.isArray(At)?At:At!==void 0?[At]:[]}var Ye=typeof window!="undefined"&&window.document&&window.document.documentElement,ut=Ye;function Ge(At){return At!=null}function ze(At){return!At&&At!==0}function Ve(At){return["string","number"].includes((0,le.Z)(At))}function $e(At){var wt=void 0;return At&&(Ve(At.title)?wt=At.title.toString():Ve(At.label)&&(wt=At.label.toString())),wt}function nt(At,wt){ut?E.useLayoutEffect(At,wt):E.useEffect(At,wt)}function et(At){var wt;return(wt=At.key)!==null&&wt!==void 0?wt:At.value}var pt=function(wt){wt.preventDefault(),wt.stopPropagation()},ct=function(wt){var dn=wt.id,Gt=wt.prefixCls,Et=wt.values,Ht=wt.open,on=wt.searchValue,sn=wt.autoClearSearchValue,yn=wt.inputRef,Wt=wt.placeholder,Cn=wt.disabled,Vt=wt.mode,Pn=wt.showSearch,bn=wt.autoFocus,zn=wt.autoComplete,Bn=wt.activeDescendantId,er=wt.tabIndex,cr=wt.removeIcon,pr=wt.maxTagCount,Nr=wt.maxTagTextLength,Br=wt.maxTagPlaceholder,ei=Br===void 0?function(zt){return"+ ".concat(zt.length," ...")}:Br,xr=wt.tagRender,Tr=wt.onToggleOpen,Pr=wt.onRemove,Xr=wt.onInputChange,hi=wt.onInputPaste,bi=wt.onInputKeyDown,Si=wt.onInputMouseDown,Kr=wt.onInputCompositionStart,Ti=wt.onInputCompositionEnd,Ei=wt.onInputBlur,tr=E.useRef(null),br=(0,E.useState)(0),kr=(0,se.Z)(br,2),ti=kr[0],ni=kr[1],wi=(0,E.useState)(!1),Ri=(0,se.Z)(wi,2),Tt=Ri[0],en=Ri[1],Yt="".concat(Gt,"-selection"),rn=Ht||Vt==="multiple"&&sn===!1||Vt==="tags"?on:"",hn=Vt==="tags"||Vt==="multiple"&&sn===!1||Pn&&(Ht||Tt);nt(function(){ni(tr.current.scrollWidth)},[rn]);var vn=function(jt,Xt,cn,Fn,Wn){return E.createElement("span",{title:$e(jt),className:z()("".concat(Yt,"-item"),(0,Ce.Z)({},"".concat(Yt,"-item-disabled"),cn))},E.createElement("span",{className:"".concat(Yt,"-item-content")},Xt),Fn&&E.createElement(ve,{className:"".concat(Yt,"-item-remove"),onMouseDown:pt,onClick:Wn,customizeIcon:cr},"\xD7"))},On=function(jt,Xt,cn,Fn,Wn,nr){var ar=function(mr){pt(mr),Tr(!Ht)};return E.createElement("span",{onMouseDown:ar},xr({label:Xt,value:jt,disabled:cn,closable:Fn,onClose:Wn,isMaxTag:!!nr}))},En=function(jt){var Xt=jt.disabled,cn=jt.label,Fn=jt.value,Wn=!Cn&&!Xt,nr=cn;if(typeof Nr=="number"&&(typeof cn=="string"||typeof cn=="number")){var ar=String(nr);ar.length>Nr&&(nr="".concat(ar.slice(0,Nr),"..."))}var $n=function(dr){dr&&dr.stopPropagation(),Pr(jt)};return typeof xr=="function"?On(Fn,nr,Xt,Wn,$n):vn(jt,nr,Xt,Wn,$n)},_n=function(jt){if(!Et.length)return null;var Xt=typeof ei=="function"?ei(jt):ei;return typeof xr=="function"?On(void 0,Xt,!1,!1,void 0,!0):vn({title:Xt},Xt,!1)},Kt=E.createElement("div",{className:"".concat(Yt,"-search"),style:{width:ti},onFocus:function(){en(!0)},onBlur:function(){en(!1)}},E.createElement(We,{ref:yn,open:Ht,prefixCls:Gt,id:dn,inputElement:null,disabled:Cn,autoFocus:bn,autoComplete:zn,editable:hn,activeDescendantId:Bn,value:rn,onKeyDown:bi,onMouseDown:Si,onChange:Xr,onPaste:hi,onCompositionStart:Kr,onCompositionEnd:Ti,onBlur:Ei,tabIndex:er,attrs:(0,Ee.Z)(wt,!0)}),E.createElement("span",{ref:tr,className:"".concat(Yt,"-search-mirror"),"aria-hidden":!0},rn,"\xA0")),fn=E.createElement(Oe.Z,{prefixCls:"".concat(Yt,"-overflow"),data:Et,renderItem:En,renderRest:_n,suffix:Kt,itemKey:et,maxCount:pr});return E.createElement("span",{className:"".concat(Yt,"-wrap")},fn,!Et.length&&!rn&&E.createElement("span",{className:"".concat(Yt,"-placeholder")},Wt))},Rt=ct,dt=function(wt){var dn=wt.inputElement,Gt=wt.prefixCls,Et=wt.id,Ht=wt.inputRef,on=wt.disabled,sn=wt.autoFocus,yn=wt.autoComplete,Wt=wt.activeDescendantId,Cn=wt.mode,Vt=wt.open,Pn=wt.values,bn=wt.placeholder,zn=wt.tabIndex,Bn=wt.showSearch,er=wt.searchValue,cr=wt.activeValue,pr=wt.maxLength,Nr=wt.onInputKeyDown,Br=wt.onInputMouseDown,ei=wt.onInputChange,xr=wt.onInputPaste,Tr=wt.onInputCompositionStart,Pr=wt.onInputCompositionEnd,Xr=wt.onInputBlur,hi=wt.title,bi=E.useState(!1),Si=(0,se.Z)(bi,2),Kr=Si[0],Ti=Si[1],Ei=Cn==="combobox",tr=Ei||Bn,br=Pn[0],kr=er||"";Ei&&cr&&!Kr&&(kr=cr),E.useEffect(function(){Ei&&Ti(!1)},[Ei,cr]);var ti=Cn!=="combobox"&&!Vt&&!Bn?!1:!!kr,ni=hi===void 0?$e(br):hi,wi=E.useMemo(function(){return br?null:E.createElement("span",{className:"".concat(Gt,"-selection-placeholder"),style:ti?{visibility:"hidden"}:void 0},bn)},[br,ti,bn,Gt]);return E.createElement("span",{className:"".concat(Gt,"-selection-wrap")},E.createElement("span",{className:"".concat(Gt,"-selection-search")},E.createElement(We,{ref:Ht,prefixCls:Gt,id:Et,open:Vt,inputElement:dn,disabled:on,autoFocus:sn,autoComplete:yn,editable:tr,activeDescendantId:Wt,value:kr,onKeyDown:Nr,onMouseDown:Br,onChange:function(Tt){Ti(!0),ei(Tt)},onPaste:xr,onCompositionStart:Tr,onCompositionEnd:Pr,onBlur:Xr,tabIndex:zn,attrs:(0,Ee.Z)(wt,!0),maxLength:Ei?pr:void 0})),!Ei&&br?E.createElement("span",{className:"".concat(Gt,"-selection-item"),title:ni,style:ti?{visibility:"hidden"}:void 0},br.label):null,wi)},Mt=dt,xt=function(wt,dn){var Gt=(0,E.useRef)(null),Et=(0,E.useRef)(!1),Ht=wt.prefixCls,on=wt.open,sn=wt.mode,yn=wt.showSearch,Wt=wt.tokenWithEnter,Cn=wt.disabled,Vt=wt.prefix,Pn=wt.autoClearSearchValue,bn=wt.onSearch,zn=wt.onSearchSubmit,Bn=wt.onToggleOpen,er=wt.onInputKeyDown,cr=wt.onInputBlur,pr=wt.domRef;E.useImperativeHandle(dn,function(){return{focus:function(ni){Gt.current.focus(ni)},blur:function(){Gt.current.blur()}}});var Nr=he(0),Br=(0,se.Z)(Nr,2),ei=Br[0],xr=Br[1],Tr=function(ni){var wi=ni.which,Ri=Gt.current instanceof HTMLTextAreaElement;!Ri&&on&&(wi===ke.Z.UP||wi===ke.Z.DOWN)&&ni.preventDefault(),er&&er(ni),wi===ke.Z.ENTER&&sn==="tags"&&!Et.current&&!on&&(zn==null||zn(ni.target.value)),!(Ri&&!on&&~[ke.Z.UP,ke.Z.DOWN,ke.Z.LEFT,ke.Z.RIGHT].indexOf(wi))&&Te(wi)&&Bn(!0)},Pr=function(){xr(!0)},Xr=(0,E.useRef)(null),hi=function(ni){bn(ni,!0,Et.current)!==!1&&Bn(!0)},bi=function(){Et.current=!0},Si=function(ni){Et.current=!1,sn!=="combobox"&&hi(ni.target.value)},Kr=function(ni){var wi=ni.target.value;if(Wt&&Xr.current&&/[\r\n]/.test(Xr.current)){var Ri=Xr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");wi=wi.replace(Ri,Xr.current)}Xr.current=null,hi(wi)},Ti=function(ni){var wi=ni.clipboardData,Ri=wi==null?void 0:wi.getData("text");Xr.current=Ri||""},Ei=function(ni){var wi=ni.target;if(wi!==Gt.current){var Ri=document.body.style.msTouchAction!==void 0;Ri?setTimeout(function(){Gt.current.focus()}):Gt.current.focus()}},tr=function(ni){var wi=ei();ni.target!==Gt.current&&!wi&&!(sn==="combobox"&&Cn)&&ni.preventDefault(),(sn!=="combobox"&&(!yn||!wi)||!on)&&(on&&Pn!==!1&&bn("",!0,!1),Bn())},br={inputRef:Gt,onInputKeyDown:Tr,onInputMouseDown:Pr,onInputChange:Kr,onInputPaste:Ti,onInputCompositionStart:bi,onInputCompositionEnd:Si,onInputBlur:cr},kr=sn==="multiple"||sn==="tags"?E.createElement(Rt,(0,ce.Z)({},wt,br)):E.createElement(Mt,(0,ce.Z)({},wt,br));return E.createElement("div",{ref:pr,className:"".concat(Ht,"-selector"),onClick:Ei,onMouseDown:tr},Vt&&E.createElement("div",{className:"".concat(Ht,"-prefix")},Vt),kr)},yt=E.forwardRef(xt),bt=yt,He=Se(65030),Ae=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],be=function(wt){var dn=wt===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:dn,adjustY:1},htmlRegion:"scroll"}}},Be=function(wt,dn){var Gt=wt.prefixCls,Et=wt.disabled,Ht=wt.visible,on=wt.children,sn=wt.popupElement,yn=wt.animation,Wt=wt.transitionName,Cn=wt.dropdownStyle,Vt=wt.dropdownClassName,Pn=wt.direction,bn=Pn===void 0?"ltr":Pn,zn=wt.placement,Bn=wt.builtinPlacements,er=wt.dropdownMatchSelectWidth,cr=wt.dropdownRender,pr=wt.dropdownAlign,Nr=wt.getPopupContainer,Br=wt.empty,ei=wt.getTriggerDOMNode,xr=wt.onPopupVisibleChange,Tr=wt.onPopupMouseEnter,Pr=(0,te.Z)(wt,Ae),Xr="".concat(Gt,"-dropdown"),hi=sn;cr&&(hi=cr(sn));var bi=E.useMemo(function(){return Bn||be(er)},[Bn,er]),Si=yn?"".concat(Xr,"-").concat(yn):Wt,Kr=typeof er=="number",Ti=E.useMemo(function(){return Kr?null:er===!1?"minWidth":"width"},[er,Kr]),Ei=Cn;Kr&&(Ei=(0,ue.Z)((0,ue.Z)({},Ei),{},{width:er}));var tr=E.useRef(null);return E.useImperativeHandle(dn,function(){return{getPopupElement:function(){var kr;return(kr=tr.current)===null||kr===void 0?void 0:kr.popupElement}}}),E.createElement(He.Z,(0,ce.Z)({},Pr,{showAction:xr?["click"]:[],hideAction:xr?["click"]:[],popupPlacement:zn||(bn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:bi,prefixCls:Xr,popupTransitionName:Si,popup:E.createElement("div",{onMouseEnter:Tr},hi),ref:tr,stretch:Ti,popupAlign:pr,popupVisible:Ht,getPopupContainer:Nr,popupClassName:z()(Vt,(0,Ce.Z)({},"".concat(Xr,"-empty"),Br)),popupStyle:Ei,getTriggerDOMNode:ei,onPopupVisibleChange:xr}),on)},Ke=E.forwardRef(Be),Ne=Ke,De=Se(57879);function we(At,wt){var dn=At.key,Gt;return"value"in At&&(Gt=At.value),dn!=null?dn:Gt!==void 0?Gt:"rc-index-key-".concat(wt)}function Le(At){return typeof At!="undefined"&&!Number.isNaN(At)}function Ue(At,wt){var dn=At||{},Gt=dn.label,Et=dn.value,Ht=dn.options,on=dn.groupLabel,sn=Gt||(wt?"children":"label");return{label:sn,value:Et||"value",options:Ht||"options",groupLabel:on||sn}}function Me(At){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},dn=wt.fieldNames,Gt=wt.childrenAsData,Et=[],Ht=Ue(dn,!1),on=Ht.label,sn=Ht.value,yn=Ht.options,Wt=Ht.groupLabel;function Cn(Vt,Pn){Array.isArray(Vt)&&Vt.forEach(function(bn){if(Pn||!(yn in bn)){var zn=bn[sn];Et.push({key:we(bn,Et.length),groupOption:Pn,data:bn,label:bn[on],value:zn})}else{var Bn=bn[Wt];Bn===void 0&&Gt&&(Bn=bn.label),Et.push({key:we(bn,Et.length),group:!0,data:bn,label:Bn}),Cn(bn[yn],!0)}})}return Cn(At,!1),Et}function Re(At){var wt=(0,ue.Z)({},At);return"props"in wt||Object.defineProperty(wt,"props",{get:function(){return(0,ne.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),wt}}),wt}var tt=function(wt,dn,Gt){if(!dn||!dn.length)return null;var Et=!1,Ht=function sn(yn,Wt){var Cn=(0,De.Z)(Wt),Vt=Cn[0],Pn=Cn.slice(1);if(!Vt)return[yn];var bn=yn.split(Vt);return Et=Et||bn.length>1,bn.reduce(function(zn,Bn){return[].concat((0,ie.Z)(zn),(0,ie.Z)(sn(Bn,Pn)))},[]).filter(Boolean)},on=Ht(wt,dn);return Et?typeof Gt!="undefined"?on.slice(0,Gt):on:null},lt=E.createContext(null),Pt=lt;function Ct(At){var wt=At.visible,dn=At.values;if(!wt)return null;var Gt=50;return E.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(dn.slice(0,Gt).map(function(Et){var Ht=Et.label,on=Et.value;return["number","string"].includes((0,le.Z)(Ht))?Ht:on}).join(", ")),dn.length>Gt?", ...":null)}var vt=["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"],Ot=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Zt=function(wt){return wt==="tags"||wt==="multiple"},Ut=E.forwardRef(function(At,wt){var dn,Gt=At.id,Et=At.prefixCls,Ht=At.className,on=At.showSearch,sn=At.tagRender,yn=At.direction,Wt=At.omitDomProps,Cn=At.displayValues,Vt=At.onDisplayValuesChange,Pn=At.emptyOptions,bn=At.notFoundContent,zn=bn===void 0?"Not Found":bn,Bn=At.onClear,er=At.mode,cr=At.disabled,pr=At.loading,Nr=At.getInputElement,Br=At.getRawInputElement,ei=At.open,xr=At.defaultOpen,Tr=At.onDropdownVisibleChange,Pr=At.activeValue,Xr=At.onActiveValueChange,hi=At.activeDescendantId,bi=At.searchValue,Si=At.autoClearSearchValue,Kr=At.onSearch,Ti=At.onSearchSplit,Ei=At.tokenSeparators,tr=At.allowClear,br=At.prefix,kr=At.suffixIcon,ti=At.clearIcon,ni=At.OptionList,wi=At.animation,Ri=At.transitionName,Tt=At.dropdownStyle,en=At.dropdownClassName,Yt=At.dropdownMatchSelectWidth,rn=At.dropdownRender,hn=At.dropdownAlign,vn=At.placement,On=At.builtinPlacements,En=At.getPopupContainer,_n=At.showAction,Kt=_n===void 0?[]:_n,fn=At.onFocus,zt=At.onBlur,jt=At.onKeyUp,Xt=At.onKeyDown,cn=At.onMouseDown,Fn=(0,te.Z)(At,vt),Wn=Zt(er),nr=(on!==void 0?on:Wn)||er==="combobox",ar=(0,ue.Z)({},Fn);Ot.forEach(function(vi){delete ar[vi]}),Wt==null||Wt.forEach(function(vi){delete ar[vi]});var $n=E.useState(!1),mr=(0,se.Z)($n,2),dr=mr[0],jr=mr[1];E.useEffect(function(){jr((0,re.Z)())},[]);var qr=E.useRef(null),$r=E.useRef(null),Gr=E.useRef(null),ri=E.useRef(null),Jr=E.useRef(null),Wr=E.useRef(!1),Vr=_e(),ir=(0,se.Z)(Vr,3),or=ir[0],fr=ir[1],Ar=ir[2];E.useImperativeHandle(wt,function(){var vi,si;return{focus:(vi=ri.current)===null||vi===void 0?void 0:vi.focus,blur:(si=ri.current)===null||si===void 0?void 0:si.blur,scrollTo:function(Ji){var ro;return(ro=Jr.current)===null||ro===void 0?void 0:ro.scrollTo(Ji)},nativeElement:qr.current||$r.current}});var Yr=E.useMemo(function(){var vi;if(er!=="combobox")return bi;var si=(vi=Cn[0])===null||vi===void 0?void 0:vi.value;return typeof si=="string"||typeof si=="number"?String(si):""},[bi,er,Cn]),Zr=er==="combobox"&&typeof Nr=="function"&&Nr()||null,Or=typeof Br=="function"&&Br(),di=(0,ae.x1)($r,Or==null||(dn=Or.props)===null||dn===void 0?void 0:dn.ref),lo=E.useState(!1),uo=(0,se.Z)(lo,2),zo=uo[0],wo=uo[1];(0,x.Z)(function(){wo(!0)},[]);var Ni=(0,ee.Z)(!1,{defaultValue:xr,value:ei}),Ii=(0,se.Z)(Ni,2),Pi=Ii[0],po=Ii[1],ji=zo?Pi:!1,Gi=!zn&&Pn;(cr||Gi&&ji&&er==="combobox")&&(ji=!1);var Ui=Gi?!1:ji,yr=E.useCallback(function(vi){var si=vi!==void 0?vi:!ji;cr||(po(si),ji!==si&&(Tr==null||Tr(si)))},[cr,ji,po,Tr]),Ur=E.useMemo(function(){return(Ei||[]).some(function(vi){return[`
`,`\r
`].includes(vi)})},[Ei]),Fr=E.useContext(Pt)||{},Hr=Fr.maxCount,xi=Fr.rawValues,Oi=function(si,no,Ji){if(!(Wn&&Le(Hr)&&(xi==null?void 0:xi.size)>=Hr)){var ro=!0,co=si;Xr==null||Xr(null);var na=tt(si,Ei,Le(Hr)?Hr-xi.size:void 0),Go=Ji?null:na;return er!=="combobox"&&Go&&(co="",Ti==null||Ti(Go),yr(!1),ro=!1),Kr&&Yr!==co&&Kr(co,{source:no?"typing":"effect"}),ro}},Lo=function(si){!si||!si.trim()||Kr(si,{source:"submit"})};E.useEffect(function(){!ji&&!Wn&&er!=="combobox"&&Oi("",!1,!1)},[ji]),E.useEffect(function(){Pi&&cr&&po(!1),cr&&!Wr.current&&fr(!1)},[cr]);var Yi=he(),Xi=(0,se.Z)(Yi,2),ui=Xi[0],to=Xi[1],Ro=E.useRef(!1),zi=function(si){var no=ui(),Ji=si.key,ro=Ji==="Enter";if(ro&&(er!=="combobox"&&si.preventDefault(),ji||yr(!0)),to(!!Yr),Ji==="Backspace"&&!no&&Wn&&!Yr&&Cn.length){for(var co=(0,ie.Z)(Cn),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&&Vt(co,{type:"remove",values:[na]})}for(var Qi=arguments.length,vo=new Array(Qi>1?Qi-1:0),Bo=1;Bo<Qi;Bo++)vo[Bo-1]=arguments[Bo];if(ji&&(!ro||!Ro.current)){var Xo;ro&&(Ro.current=!0),(Xo=Jr.current)===null||Xo===void 0||Xo.onKeyDown.apply(Xo,[si].concat(vo))}Xt==null||Xt.apply(void 0,[si].concat(vo))},Ho=function(si){for(var no=arguments.length,Ji=new Array(no>1?no-1:0),ro=1;ro<no;ro++)Ji[ro-1]=arguments[ro];if(ji){var co;(co=Jr.current)===null||co===void 0||co.onKeyUp.apply(co,[si].concat(Ji))}si.key==="Enter"&&(Ro.current=!1),jt==null||jt.apply(void 0,[si].concat(Ji))},xo=function(si){var no=Cn.filter(function(Ji){return Ji!==si});Vt(no,{type:"remove",values:[si]})},Io=function(){Ro.current=!1},Ki=E.useRef(!1),Wo=function(){fr(!0),cr||(fn&&!Ki.current&&fn.apply(void 0,arguments),Kt.includes("focus")&&yr(!0)),Ki.current=!0},za=function(){Wr.current=!0,fr(!1,function(){Ki.current=!1,Wr.current=!1,yr(!1)}),!cr&&(Yr&&(er==="tags"?Kr(Yr,{source:"submit"}):er==="multiple"&&Kr("",{source:"blur"})),zt&&zt.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(si){var no,Ji=si.target,ro=(no=Gr.current)===null||no===void 0?void 0:no.getPopupElement();if(ro&&ro.contains(Ji)){var co=setTimeout(function(){var Qi=Yo.indexOf(co);if(Qi!==-1&&Yo.splice(Qi,1),Ar(),!dr&&!ro.contains(document.activeElement)){var vo;(vo=ri.current)===null||vo===void 0||vo.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];cn==null||cn.apply(void 0,[si].concat(Go))},Zo=E.useState({}),Da=(0,se.Z)(Zo,2),qa=Da[1];function ba(){qa({})}var cs;Or&&(cs=function(si){yr(si)}),pe(function(){var vi;return[qr.current,(vi=Gr.current)===null||vi===void 0?void 0:vi.getPopupElement()]},Ui,yr,!!Or);var Ma=E.useMemo(function(){return(0,ue.Z)((0,ue.Z)({},At),{},{notFoundContent:zn,open:ji,triggerOpen:Ui,id:Gt,showSearch:nr,multiple:Wn,toggleOpen:yr})},[At,zn,Ui,ji,Gt,nr,Wn,yr]),Ha=!!kr||pr,Ra;Ha&&(Ra=E.createElement(ve,{className:z()("".concat(Et,"-arrow"),(0,Ce.Z)({},"".concat(Et,"-arrow-loading"),pr)),customizeIcon:kr,customizeIconProps:{loading:pr,searchValue:Yr,open:ji,focused:or,showSearch:nr}}));var pa=function(){var si;Bn==null||Bn(),(si=ri.current)===null||si===void 0||si.focus(),Vt([],{type:"clear",values:Cn}),Oi("",!1,!1)},Wa=ye(Et,pa,Cn,tr,ti,cr,Yr,er),Ja=Wa.allowClear,Sa=Wa.clearIcon,wa=E.createElement(ni,{ref:Jr}),ua=z()(Et,Ht,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Et,"-focused"),or),"".concat(Et,"-multiple"),Wn),"".concat(Et,"-single"),!Wn),"".concat(Et,"-allow-clear"),tr),"".concat(Et,"-show-arrow"),Ha),"".concat(Et,"-disabled"),cr),"".concat(Et,"-loading"),pr),"".concat(Et,"-open"),ji),"".concat(Et,"-customize-input"),Zr),"".concat(Et,"-show-search"),nr)),Ao=E.createElement(Ne,{ref:Gr,disabled:cr,prefixCls:Et,visible:Ui,popupElement:wa,animation:wi,transitionName:Ri,dropdownStyle:Tt,dropdownClassName:en,direction:yn,dropdownMatchSelectWidth:Yt,dropdownRender:rn,dropdownAlign:hn,placement:vn,builtinPlacements:On,getPopupContainer:En,empty:Pn,getTriggerDOMNode:function(si){return $r.current||si},onPopupVisibleChange:cs,onPopupMouseEnter:ba},Or?E.cloneElement(Or,{ref:di}):E.createElement(bt,(0,ce.Z)({},At,{domRef:$r,prefixCls:Et,inputElement:Zr,ref:ri,id:Gt,prefix:br,showSearch:nr,autoClearSearchValue:Si,mode:er,activeDescendantId:hi,tagRender:sn,values:Cn,open:ji,onToggleOpen:yr,activeValue:Pr,searchValue:Yr,onSearch:Oi,onSearchSubmit:Lo,onRemove:xo,tokenWithEnter:Ur,onInputBlur:Io}))),qi;return Or?qi=Ao:qi=E.createElement("div",(0,ce.Z)({className:ua},ar,{ref:qr,onMouseDown:la,onKeyDown:zi,onKeyUp:Ho,onFocus:Wo,onBlur:za}),E.createElement(Ct,{visible:or&&!ji,values:Cn}),Ao,Ra,Ja&&Sa),E.createElement(me.Provider,{value:Ma},qi)}),gt=Ut,Qt=function(){return null};Qt.isSelectOptGroup=!0;var Lt=Qt,qt=function(){return null};qt.isSelectOption=!0;var un=qt,Sn=Se(80547),Jt=Se(2738),Ln=Se(6790);function Zn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gn=["disabled","title","children","style","className"];function Jn(At){return typeof At=="string"||typeof At=="number"}var hr=function(wt,dn){var Gt=ge(),Et=Gt.prefixCls,Ht=Gt.id,on=Gt.open,sn=Gt.multiple,yn=Gt.mode,Wt=Gt.searchValue,Cn=Gt.toggleOpen,Vt=Gt.notFoundContent,Pn=Gt.onPopupScroll,bn=E.useContext(Pt),zn=bn.maxCount,Bn=bn.flattenOptions,er=bn.onActiveValue,cr=bn.defaultActiveFirstOption,pr=bn.onSelect,Nr=bn.menuItemSelectedIcon,Br=bn.rawValues,ei=bn.fieldNames,xr=bn.virtual,Tr=bn.direction,Pr=bn.listHeight,Xr=bn.listItemHeight,hi=bn.optionRender,bi="".concat(Et,"-item"),Si=(0,Sn.Z)(function(){return Bn},[on,Bn],function(_n,Kt){return Kt[0]&&_n[1]!==Kt[1]}),Kr=E.useRef(null),Ti=E.useMemo(function(){return sn&&Le(zn)&&(Br==null?void 0:Br.size)>=zn},[sn,zn,Br==null?void 0:Br.size]),Ei=function(Kt){Kt.preventDefault()},tr=function(Kt){var fn;(fn=Kr.current)===null||fn===void 0||fn.scrollTo(typeof Kt=="number"?{index:Kt}:Kt)},br=E.useCallback(function(_n){return yn==="combobox"?!1:Br.has(_n)},[yn,(0,ie.Z)(Br).toString(),Br.size]),kr=function(Kt){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,zt=Si.length,jt=0;jt<zt;jt+=1){var Xt=(Kt+jt*fn+zt)%zt,cn=Si[Xt]||{},Fn=cn.group,Wn=cn.data;if(!Fn&&!(Wn!=null&&Wn.disabled)&&(br(Wn.value)||!Ti))return Xt}return-1},ti=E.useState(function(){return kr(0)}),ni=(0,se.Z)(ti,2),wi=ni[0],Ri=ni[1],Tt=function(Kt){var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ri(Kt);var zt={source:fn?"keyboard":"mouse"},jt=Si[Kt];if(!jt){er(null,-1,zt);return}er(jt.value,Kt,zt)};(0,E.useEffect)(function(){Tt(cr!==!1?kr(0):-1)},[Si.length,Wt]);var en=E.useCallback(function(_n){return yn==="combobox"?String(_n).toLowerCase()===Wt.toLowerCase():Br.has(_n)},[yn,Wt,(0,ie.Z)(Br).toString(),Br.size]);(0,E.useEffect)(function(){var _n=setTimeout(function(){if(!sn&&on&&Br.size===1){var fn=Array.from(Br)[0],zt=Si.findIndex(function(jt){var Xt=jt.data;return Wt?String(Xt.value).startsWith(Wt):Xt.value===fn});zt!==-1&&(Tt(zt),tr(zt))}});if(on){var Kt;(Kt=Kr.current)===null||Kt===void 0||Kt.scrollTo(void 0)}return function(){return clearTimeout(_n)}},[on,Wt]);var Yt=function(Kt){Kt!==void 0&&pr(Kt,{selected:!Br.has(Kt)}),sn||Cn(!1)};if(E.useImperativeHandle(dn,function(){return{onKeyDown:function(Kt){var fn=Kt.which,zt=Kt.ctrlKey;switch(fn){case ke.Z.N:case ke.Z.P:case ke.Z.UP:case ke.Z.DOWN:{var jt=0;if(fn===ke.Z.UP?jt=-1:fn===ke.Z.DOWN?jt=1:Zn()&&zt&&(fn===ke.Z.N?jt=1:fn===ke.Z.P&&(jt=-1)),jt!==0){var Xt=kr(wi+jt,jt);tr(Xt),Tt(Xt,!0)}break}case ke.Z.TAB:case ke.Z.ENTER:{var cn,Fn=Si[wi];Fn&&!(Fn!=null&&(cn=Fn.data)!==null&&cn!==void 0&&cn.disabled)&&!Ti?Yt(Fn.value):Yt(void 0),on&&Kt.preventDefault();break}case ke.Z.ESC:Cn(!1),on&&Kt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Kt){tr(Kt)}}}),Si.length===0)return E.createElement("div",{role:"listbox",id:"".concat(Ht,"_list"),className:"".concat(bi,"-empty"),onMouseDown:Ei},Vt);var rn=Object.keys(ei).map(function(_n){return ei[_n]}),hn=function(Kt){return Kt.label};function vn(_n,Kt){var fn=_n.group;return{role:fn?"presentation":"option",id:"".concat(Ht,"_list_").concat(Kt)}}var On=function(Kt){var fn=Si[Kt];if(!fn)return null;var zt=fn.data||{},jt=zt.value,Xt=fn.group,cn=(0,Ee.Z)(zt,!0),Fn=hn(fn);return fn?E.createElement("div",(0,ce.Z)({"aria-label":typeof Fn=="string"&&!Xt?Fn:null},cn,{key:Kt},vn(fn,Kt),{"aria-selected":en(jt)}),jt):null},En={role:"listbox",id:"".concat(Ht,"_list")};return E.createElement(E.Fragment,null,xr&&E.createElement("div",(0,ce.Z)({},En,{style:{height:0,width:0,overflow:"hidden"}}),On(wi-1),On(wi),On(wi+1)),E.createElement(Ln.Z,{itemKey:"key",ref:Kr,data:Si,height:Pr,itemHeight:Xr,fullHeight:!1,onMouseDown:Ei,onScroll:Pn,virtual:xr,direction:Tr,innerProps:xr?null:En},function(_n,Kt){var fn=_n.group,zt=_n.groupOption,jt=_n.data,Xt=_n.label,cn=_n.value,Fn=jt.key;if(fn){var Wn,nr=(Wn=jt.title)!==null&&Wn!==void 0?Wn:Jn(Xt)?Xt.toString():void 0;return E.createElement("div",{className:z()(bi,"".concat(bi,"-group"),jt.className),title:nr},Xt!==void 0?Xt:Fn)}var ar=jt.disabled,$n=jt.title,mr=jt.children,dr=jt.style,jr=jt.className,qr=(0,te.Z)(jt,Gn),$r=(0,Jt.Z)(qr,rn),Gr=br(cn),ri=ar||!Gr&&Ti,Jr="".concat(bi,"-option"),Wr=z()(bi,Jr,jr,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Jr,"-grouped"),zt),"".concat(Jr,"-active"),wi===Kt&&!ri),"".concat(Jr,"-disabled"),ri),"".concat(Jr,"-selected"),Gr)),Vr=hn(_n),ir=!Nr||typeof Nr=="function"||Gr,or=typeof Vr=="number"?Vr:Vr||cn,fr=Jn(or)?or.toString():void 0;return $n!==void 0&&(fr=$n),E.createElement("div",(0,ce.Z)({},(0,Ee.Z)($r),xr?{}:vn(_n,Kt),{"aria-selected":en(cn),className:Wr,title:fr,onMouseMove:function(){wi===Kt||ri||Tt(Kt)},onClick:function(){ri||Yt(cn)},style:dr}),E.createElement("div",{className:"".concat(Jr,"-content")},typeof hi=="function"?hi(_n,{index:Kt}):or),E.isValidElement(Nr)||Gr,ir&&E.createElement(ve,{className:"".concat(bi,"-option-state"),customizeIcon:Nr,customizeIconProps:{value:cn,disabled:ri,isSelected:Gr}},Gr?"\u2713":null))}))},ur=E.forwardRef(hr),jn=ur,Nn=function(At,wt){var dn=E.useRef({values:new Map,options:new Map}),Gt=E.useMemo(function(){var Ht=dn.current,on=Ht.values,sn=Ht.options,yn=At.map(function(Vt){if(Vt.label===void 0){var Pn;return(0,ue.Z)((0,ue.Z)({},Vt),{},{label:(Pn=on.get(Vt.value))===null||Pn===void 0?void 0:Pn.label})}return Vt}),Wt=new Map,Cn=new Map;return yn.forEach(function(Vt){Wt.set(Vt.value,Vt),Cn.set(Vt.value,wt.get(Vt.value)||sn.get(Vt.value))}),dn.current.values=Wt,dn.current.options=Cn,yn},[At,wt]),Et=E.useCallback(function(Ht){return wt.get(Ht)||dn.current.options.get(Ht)},[wt]);return[Gt,Et]};function rr(At,wt){return rt(At).join("").toUpperCase().includes(wt)}var Kn=function(At,wt,dn,Gt,Et){return E.useMemo(function(){if(!dn||Gt===!1)return At;var Ht=wt.options,on=wt.label,sn=wt.value,yn=[],Wt=typeof Gt=="function",Cn=dn.toUpperCase(),Vt=Wt?Gt:function(bn,zn){return Et?rr(zn[Et],Cn):zn[Ht]?rr(zn[on!=="children"?on:"label"],Cn):rr(zn[sn],Cn)},Pn=Wt?function(bn){return Re(bn)}:function(bn){return bn};return At.forEach(function(bn){if(bn[Ht]){var zn=Vt(dn,Pn(bn));if(zn)yn.push(bn);else{var Bn=bn[Ht].filter(function(er){return Vt(dn,Pn(er))});Bn.length&&yn.push((0,ue.Z)((0,ue.Z)({},bn),{},(0,Ce.Z)({},Ht,Bn)))}return}Vt(dn,Pn(bn))&&yn.push(bn)}),yn},[At,Gt,Et,dn,wt])},In=Se(6551),gn=Se(11592),pn=["children","value"],Dn=["children"];function Rn(At){var wt=At,dn=wt.key,Gt=wt.props,Et=Gt.children,Ht=Gt.value,on=(0,te.Z)(Gt,pn);return(0,ue.Z)({key:dn,value:Ht!==void 0?Ht:dn,children:Et},on)}function Un(At){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,gn.Z)(At).map(function(dn,Gt){if(!E.isValidElement(dn)||!dn.type)return null;var Et=dn,Ht=Et.type.isSelectOptGroup,on=Et.key,sn=Et.props,yn=sn.children,Wt=(0,te.Z)(sn,Dn);return wt||!Ht?Rn(dn):(0,ue.Z)((0,ue.Z)({key:"__RC_SELECT_GRP__".concat(on===null?Gt:on,"__"),label:on},Wt),{},{options:Un(yn)})}).filter(function(dn){return dn})}var Mr=function(wt,dn,Gt,Et,Ht){return E.useMemo(function(){var on=wt,sn=!wt;sn&&(on=Un(dn));var yn=new Map,Wt=new Map,Cn=function(bn,zn,Bn){Bn&&typeof Bn=="string"&&bn.set(zn[Bn],zn)},Vt=function Pn(bn){for(var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bn=0;Bn<bn.length;Bn+=1){var er=bn[Bn];!er[Gt.options]||zn?(yn.set(er[Gt.value],er),Cn(Wt,er,Gt.label),Cn(Wt,er,Et),Cn(Wt,er,Ht)):Pn(er[Gt.options],!0)}};return Vt(on),{options:on,valueOptions:yn,labelOptions:Wt}},[wt,dn,Gt,Et,Ht])},an=Mr;function Ie(At){var wt=E.useRef();wt.current=At;var dn=E.useCallback(function(){return wt.current.apply(wt,arguments)},[]);return dn}function Ze(At){var wt=At.mode,dn=At.options,Gt=At.children,Et=At.backfill,Ht=At.allowClear,on=At.placeholder,sn=At.getInputElement,yn=At.showSearch,Wt=At.onSearch,Cn=At.defaultOpen,Vt=At.autoFocus,Pn=At.labelInValue,bn=At.value,zn=At.inputValue,Bn=At.optionLabelProp,er=isMultiple(wt),cr=yn!==void 0?yn:er||wt==="combobox",pr=dn||convertChildrenToData(Gt);if(warning(wt!=="tags"||pr.every(function(xr){return!xr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),wt==="tags"||wt==="combobox"){var Nr=pr.some(function(xr){return xr.options?xr.options.some(function(Tr){return typeof("value"in Tr?Tr.value:Tr.key)=="number"}):typeof("value"in xr?xr.value:xr.key)=="number"});warning(!Nr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(wt!=="combobox"||!Bn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(wt==="combobox"||!Et,"`backfill` only works with `combobox` mode."),warning(wt==="combobox"||!sn,"`getInputElement` only work with `combobox` mode."),noteOnce(wt!=="combobox"||!sn||!Ht||!on,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Wt&&!cr&&wt!=="combobox"&&wt!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Cn||Vt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),bn!=null){var Br=toArray(bn);warning(!Pn||Br.every(function(xr){return _typeof(xr)==="object"&&("key"in xr||"value"in xr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!er||Array.isArray(bn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Gt){var ei=null;toNodeArray(Gt).some(function(xr){if(!React.isValidElement(xr)||!xr.type)return!1;var Tr=xr,Pr=Tr.type;if(Pr.isSelectOption)return!1;if(Pr.isSelectOptGroup){var Xr=toNodeArray(xr.props.children).every(function(hi){return!React.isValidElement(hi)||!xr.type||hi.type.isSelectOption?!0:(ei=hi.type,!1)});return!Xr}return ei=Pr,!0}),ei&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ei.displayName||ei.name||ei,"`.")),warning(zn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function qe(At,wt){if(At){var dn=function Gt(Et){for(var Ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,on=0;on<Et.length;on++){var sn=Et[on];if(sn[wt==null?void 0:wt.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ht&&Array.isArray(sn[wt==null?void 0:wt.options])&&Gt(sn[wt==null?void 0:wt.options],!0))break}};dn(At)}}var st=null,mt=["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"],Bt=["inputValue"];function kt(At){return!At||(0,le.Z)(At)!=="object"}var Nt=E.forwardRef(function(At,wt){var dn=At.id,Gt=At.mode,Et=At.prefixCls,Ht=Et===void 0?"rc-select":Et,on=At.backfill,sn=At.fieldNames,yn=At.inputValue,Wt=At.searchValue,Cn=At.onSearch,Vt=At.autoClearSearchValue,Pn=Vt===void 0?!0:Vt,bn=At.onSelect,zn=At.onDeselect,Bn=At.dropdownMatchSelectWidth,er=Bn===void 0?!0:Bn,cr=At.filterOption,pr=At.filterSort,Nr=At.optionFilterProp,Br=At.optionLabelProp,ei=At.options,xr=At.optionRender,Tr=At.children,Pr=At.defaultActiveFirstOption,Xr=At.menuItemSelectedIcon,hi=At.virtual,bi=At.direction,Si=At.listHeight,Kr=Si===void 0?200:Si,Ti=At.listItemHeight,Ei=Ti===void 0?20:Ti,tr=At.labelRender,br=At.value,kr=At.defaultValue,ti=At.labelInValue,ni=At.onChange,wi=At.maxCount,Ri=(0,te.Z)(At,mt),Tt=(0,In.ZP)(dn),en=Zt(Gt),Yt=!!(!ei&&Tr),rn=E.useMemo(function(){return cr===void 0&&Gt==="combobox"?!1:cr},[cr,Gt]),hn=E.useMemo(function(){return Ue(sn,Yt)},[JSON.stringify(sn),Yt]),vn=(0,ee.Z)("",{value:Wt!==void 0?Wt:yn,postState:function(Ur){return Ur||""}}),On=(0,se.Z)(vn,2),En=On[0],_n=On[1],Kt=an(ei,Tr,hn,Nr,Br),fn=Kt.valueOptions,zt=Kt.labelOptions,jt=Kt.options,Xt=E.useCallback(function(yr){var Ur=rt(yr);return Ur.map(function(Fr){var Hr,xi,Oi,Lo,Yi;if(kt(Fr))Hr=Fr;else{var Xi;Oi=Fr.key,xi=Fr.label,Hr=(Xi=Fr.value)!==null&&Xi!==void 0?Xi:Oi}var ui=fn.get(Hr);if(ui){var to;if(xi===void 0&&(xi=ui==null?void 0:ui[Br||hn.label]),Oi===void 0&&(Oi=(to=ui==null?void 0:ui.key)!==null&&to!==void 0?to:Hr),Lo=ui==null?void 0:ui.disabled,Yi=ui==null?void 0:ui.title,0)var Ro}return{label:xi,value:Hr,key:Oi,disabled:Lo,title:Yi}})},[hn,Br,fn]),cn=(0,ee.Z)(kr,{value:br}),Fn=(0,se.Z)(cn,2),Wn=Fn[0],nr=Fn[1],ar=E.useMemo(function(){var yr,Ur=en&&Wn===null?[]:Wn,Fr=Xt(Ur);return Gt==="combobox"&&ze((yr=Fr[0])===null||yr===void 0?void 0:yr.value)?[]:Fr},[Wn,Xt,Gt,en]),$n=Nn(ar,fn),mr=(0,se.Z)($n,2),dr=mr[0],jr=mr[1],qr=E.useMemo(function(){if(!Gt&&dr.length===1){var yr=dr[0];if(yr.value===null&&(yr.label===null||yr.label===void 0))return[]}return dr.map(function(Ur){var Fr;return(0,ue.Z)((0,ue.Z)({},Ur),{},{label:(Fr=typeof tr=="function"?tr(Ur):Ur.label)!==null&&Fr!==void 0?Fr:Ur.value})})},[Gt,dr,tr]),$r=E.useMemo(function(){return new Set(dr.map(function(yr){return yr.value}))},[dr]);E.useEffect(function(){if(Gt==="combobox"){var yr,Ur=(yr=dr[0])===null||yr===void 0?void 0:yr.value;_n(Ge(Ur)?String(Ur):"")}},[dr]);var Gr=Ie(function(yr,Ur){var Fr=Ur!=null?Ur:yr;return(0,Ce.Z)((0,Ce.Z)({},hn.value,yr),hn.label,Fr)}),ri=E.useMemo(function(){if(Gt!=="tags")return jt;var yr=(0,ie.Z)(jt),Ur=function(Hr){return fn.has(Hr)};return(0,ie.Z)(dr).sort(function(Fr,Hr){return Fr.value<Hr.value?-1:1}).forEach(function(Fr){var Hr=Fr.value;Ur(Hr)||yr.push(Gr(Hr,Fr.label))}),yr},[Gr,jt,fn,dr,Gt]),Jr=Kn(ri,hn,En,rn,Nr),Wr=E.useMemo(function(){return Gt!=="tags"||!En||Jr.some(function(yr){return yr[Nr||"value"]===En})||Jr.some(function(yr){return yr[hn.value]===En})?Jr:[Gr(En)].concat((0,ie.Z)(Jr))},[Gr,Nr,Gt,Jr,En,hn]),Vr=function yr(Ur){var Fr=(0,ie.Z)(Ur).sort(function(Hr,xi){return pr(Hr,xi,{searchValue:En})});return Fr.map(function(Hr){return Array.isArray(Hr.options)?(0,ue.Z)((0,ue.Z)({},Hr),{},{options:Hr.options.length>0?yr(Hr.options):Hr.options}):Hr})},ir=E.useMemo(function(){return pr?Vr(Wr):Wr},[Wr,pr,En]),or=E.useMemo(function(){return Me(ir,{fieldNames:hn,childrenAsData:Yt})},[ir,hn,Yt]),fr=function(Ur){var Fr=Xt(Ur);if(nr(Fr),ni&&(Fr.length!==dr.length||Fr.some(function(Oi,Lo){var Yi;return((Yi=dr[Lo])===null||Yi===void 0?void 0:Yi.value)!==(Oi==null?void 0:Oi.value)}))){var Hr=ti?Fr:Fr.map(function(Oi){return Oi.value}),xi=Fr.map(function(Oi){return Re(jr(Oi.value))});ni(en?Hr:Hr[0],en?xi:xi[0])}},Ar=E.useState(null),Yr=(0,se.Z)(Ar,2),Zr=Yr[0],Or=Yr[1],di=E.useState(0),lo=(0,se.Z)(di,2),uo=lo[0],zo=lo[1],wo=Pr!==void 0?Pr:Gt!=="combobox",Ni=E.useCallback(function(yr,Ur){var Fr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Hr=Fr.source,xi=Hr===void 0?"keyboard":Hr;zo(Ur),on&&Gt==="combobox"&&yr!==null&&xi==="keyboard"&&Or(String(yr))},[on,Gt]),Ii=function(Ur,Fr,Hr){var xi=function(){var xo,Io=jr(Ur);return[ti?{label:Io==null?void 0:Io[hn.label],value:Ur,key:(xo=Io==null?void 0:Io.key)!==null&&xo!==void 0?xo:Ur}:Ur,Re(Io)]};if(Fr&&bn){var Oi=xi(),Lo=(0,se.Z)(Oi,2),Yi=Lo[0],Xi=Lo[1];bn(Yi,Xi)}else if(!Fr&&zn&&Hr!=="clear"){var ui=xi(),to=(0,se.Z)(ui,2),Ro=to[0],zi=to[1];zn(Ro,zi)}},Pi=Ie(function(yr,Ur){var Fr,Hr=en?Ur.selected:!0;Hr?Fr=en?[].concat((0,ie.Z)(dr),[yr]):[yr]:Fr=dr.filter(function(xi){return xi.value!==yr}),fr(Fr),Ii(yr,Hr),Gt==="combobox"?Or(""):(!Zt||Pn)&&(_n(""),Or(""))}),po=function(Ur,Fr){fr(Ur);var Hr=Fr.type,xi=Fr.values;(Hr==="remove"||Hr==="clear")&&xi.forEach(function(Oi){Ii(Oi.value,!1,Hr)})},ji=function(Ur,Fr){if(_n(Ur),Or(null),Fr.source==="submit"){var Hr=(Ur||"").trim();if(Hr){var xi=Array.from(new Set([].concat((0,ie.Z)($r),[Hr])));fr(xi),Ii(Hr,!0),_n("")}return}Fr.source!=="blur"&&(Gt==="combobox"&&fr(Ur),Cn==null||Cn(Ur))},Gi=function(Ur){var Fr=Ur;Gt!=="tags"&&(Fr=Ur.map(function(xi){var Oi=zt.get(xi);return Oi==null?void 0:Oi.value}).filter(function(xi){return xi!==void 0}));var Hr=Array.from(new Set([].concat((0,ie.Z)($r),(0,ie.Z)(Fr))));fr(Hr),Hr.forEach(function(xi){Ii(xi,!0)})},Ui=E.useMemo(function(){var yr=hi!==!1&&er!==!1;return(0,ue.Z)((0,ue.Z)({},Kt),{},{flattenOptions:or,onActiveValue:Ni,defaultActiveFirstOption:wo,onSelect:Pi,menuItemSelectedIcon:Xr,rawValues:$r,fieldNames:hn,virtual:yr,direction:bi,listHeight:Kr,listItemHeight:Ei,childrenAsData:Yt,maxCount:wi,optionRender:xr})},[wi,Kt,or,Ni,wo,Pi,Xr,$r,hn,hi,er,bi,Kr,Ei,Yt,xr]);return E.createElement(Pt.Provider,{value:Ui},E.createElement(gt,(0,ce.Z)({},Ri,{id:Tt,prefixCls:Ht,ref:wt,omitDomProps:Bt,mode:Gt,displayValues:qr,onDisplayValuesChange:po,direction:bi,searchValue:En,onSearch:ji,autoClearSearchValue:Pn,onSearchSplit:Gi,dropdownMatchSelectWidth:er,OptionList:jn,emptyOptions:!or.length,activeValue:Zr,activeDescendantId:"".concat(Tt,"_list_").concat(uo)})))}),nn=Nt;nn.Option=un,nn.OptGroup=Lt;var An=nn,Vn=An},63158:function($t,Dt,Se){"use strict";var ce=Se(67711),ie=Se(52873),Ce=Se(16886),ue=Se(33346),se=Se(59301),te=Se(92310),le=Se.n(te),ee=Se(18929),ne=Se(10228),E=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],b=se.forwardRef(function(z,x){var re,ae=z.prefixCls,oe=ae===void 0?"rc-switch":ae,ve=z.className,ye=z.checked,me=z.defaultChecked,ge=z.disabled,_e=z.loadingIcon,he=z.checkedChildren,pe=z.unCheckedChildren,ke=z.onClick,Te=z.onChange,Ee=z.onKeyDown,Oe=(0,ue.Z)(z,E),je=(0,ee.Z)(!1,{value:ye,defaultValue:me}),Pe=(0,Ce.Z)(je,2),Qe=Pe[0],Xe=Pe[1];function ot(ut,Ge){var ze=Qe;return ge||(ze=ut,Xe(ze),Te==null||Te(ze,Ge)),ze}function We(ut){ut.which===ne.Z.LEFT?ot(!1,ut):ut.which===ne.Z.RIGHT&&ot(!0,ut),Ee==null||Ee(ut)}function rt(ut){var Ge=ot(!Qe,ut);ke==null||ke(Ge,ut)}var Ye=le()(oe,ve,(re={},(0,ie.Z)(re,"".concat(oe,"-checked"),Qe),(0,ie.Z)(re,"".concat(oe,"-disabled"),ge),re));return se.createElement("button",(0,ce.Z)({},Oe,{type:"button",role:"switch","aria-checked":Qe,disabled:ge,className:Ye,ref:x,onKeyDown:We,onClick:rt}),_e,se.createElement("span",{className:"".concat(oe,"-inner")},se.createElement("span",{className:"".concat(oe,"-inner-checked")},he),se.createElement("span",{className:"".concat(oe,"-inner-unchecked")},pe)))});b.displayName="Switch",Dt.Z=b},86351:function($t,Dt,Se){"use strict";Se.d(Dt,{R:function(){return ie},w:function(){return ce}});var ce={},ie="rc-table-internal-hook"},97347:function($t,Dt,Se){"use strict";Se.d(Dt,{L:function(){return oe},Z:function(){return _e}});var ce=Se(16886),ie=Se(52873),Ce=Se(15142),ue=Se(26420),se=Se(98506),te=Se(33346),le=Se(11592),ee=Se(48736),ne=Se(59301),E=Se(86351),b=Se(54451);function z(he){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof pe=="number"?pe:pe.endsWith("%")?he*parseFloat(pe)/100:null}function x(he,pe,ke){return ne.useMemo(function(){if(pe&&pe>0){var Te=0,Ee=0;he.forEach(function(rt){var Ye=z(pe,rt.width);Ye?Te+=Ye:Ee+=1});var Oe=Math.max(pe,ke),je=Math.max(Oe-Te,Ee),Pe=Ee,Qe=je/Ee,Xe=0,ot=he.map(function(rt){var Ye=(0,se.Z)({},rt),ut=z(pe,Ye.width);if(ut)Ye.width=ut;else{var Ge=Math.floor(Qe);Ye.width=Pe===1?je:Ge,je-=Ge,Pe-=1}return Xe+=Ye.width,Ye});if(Xe<Oe){var We=Oe/Xe;je=Oe,ot.forEach(function(rt,Ye){var ut=Math.floor(rt.width*We);rt.width=Ye===ot.length-1?je:ut,je-=ut})}return[ot,Math.max(Xe,Oe)]}return[he,pe]},[he,pe,ke])}var re=["children"],ae=["fixed"];function oe(he){return(0,le.Z)(he).filter(function(pe){return ne.isValidElement(pe)}).map(function(pe){var ke=pe.key,Te=pe.props,Ee=Te.children,Oe=(0,te.Z)(Te,re),je=(0,se.Z)({key:ke},Oe);return Ee&&(je.children=oe(Ee)),je})}function ve(he){return he.filter(function(pe){return pe&&(0,ue.Z)(pe)==="object"&&!pe.hidden}).map(function(pe){var ke=pe.children;return ke&&ke.length>0?(0,se.Z)((0,se.Z)({},pe),{},{children:ve(ke)}):pe})}function ye(he){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return he.filter(function(ke){return ke&&(0,ue.Z)(ke)==="object"}).reduce(function(ke,Te,Ee){var Oe=Te.fixed,je=Oe===!0?"left":Oe,Pe="".concat(pe,"-").concat(Ee),Qe=Te.children;return Qe&&Qe.length>0?[].concat((0,Ce.Z)(ke),(0,Ce.Z)(ye(Qe,Pe).map(function(Xe){return(0,se.Z)({fixed:je},Xe)}))):[].concat((0,Ce.Z)(ke),[(0,se.Z)((0,se.Z)({key:Pe},Te),{},{fixed:je})])},[])}function me(he){return he.map(function(pe){var ke=pe.fixed,Te=(0,te.Z)(pe,ae),Ee=ke;return ke==="left"?Ee="right":ke==="right"&&(Ee="left"),(0,se.Z)({fixed:Ee},Te)})}function ge(he,pe){var ke=he.prefixCls,Te=he.columns,Ee=he.children,Oe=he.expandable,je=he.expandedKeys,Pe=he.columnTitle,Qe=he.getRowKey,Xe=he.onTriggerExpand,ot=he.expandIcon,We=he.rowExpandable,rt=he.expandIconColumnIndex,Ye=he.direction,ut=he.expandRowByClick,Ge=he.columnWidth,ze=he.fixed,Ve=he.scrollWidth,$e=he.clientWidth,nt=ne.useMemo(function(){var bt=Te||oe(Ee)||[];return ve(bt.slice())},[Te,Ee]),et=ne.useMemo(function(){if(Oe){var bt=nt.slice();if(!bt.includes(E.w)){var He=rt||0;He>=0&&(He||ze==="left"||!ze)&&bt.splice(He,0,E.w),ze==="right"&&bt.splice(nt.length,0,E.w)}var Ae=bt.indexOf(E.w);bt=bt.filter(function(Ne,De){return Ne!==E.w||De===Ae});var be=nt[Ae],Be;ze?Be=ze:Be=be?be.fixed:null;var Ke=(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},b.v,{className:"".concat(ke,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Pe),"fixed",Be),"className","".concat(ke,"-row-expand-icon-cell")),"width",Ge),"render",function(De,we,Le){var Ue=Qe(we,Le),Me=je.has(Ue),Re=We?We(we):!0,tt=ot({prefixCls:ke,expanded:Me,expandable:Re,record:we,onExpand:Xe});return ut?ne.createElement("span",{onClick:function(Pt){return Pt.stopPropagation()}},tt):tt});return bt.map(function(Ne){return Ne===E.w?Ke:Ne})}return nt.filter(function(Ne){return Ne!==E.w})},[Oe,nt,Qe,je,ot,Ye]),pt=ne.useMemo(function(){var bt=et;return pe&&(bt=pe(bt)),bt.length||(bt=[{render:function(){return null}}]),bt},[pe,et,Ye]),ct=ne.useMemo(function(){return Ye==="rtl"?me(ye(pt)):ye(pt)},[pt,Ye,Ve]),Rt=ne.useMemo(function(){for(var bt=-1,He=ct.length-1;He>=0;He-=1){var Ae=ct[He].fixed;if(Ae==="left"||Ae===!0){bt=He;break}}if(bt>=0)for(var be=0;be<=bt;be+=1){var Be=ct[be].fixed;if(Be!=="left"&&Be!==!0)return!0}var Ke=ct.findIndex(function(we){var Le=we.fixed;return Le==="right"});if(Ke>=0)for(var Ne=Ke;Ne<ct.length;Ne+=1){var De=ct[Ne].fixed;if(De!=="right")return!0}return!1},[ct]),dt=x(ct,Ve,$e),Mt=(0,ce.Z)(dt,2),xt=Mt[0],yt=Mt[1];return[pt,xt,yt,Rt]}var _e=ge},4030:function($t,Dt,Se){"use strict";Se.d(Dt,{w2:function(){return ce.w},vP:function(){return Jn.v},RQ:function(){return ce.R},ER:function(){return Ue},Q$:function(){return cr},TN:function(){return ni}});var ce=Se(86351),ie=Se(16886),Ce=Se(6089),ue=Se(34280),se=Se(13697),te=Se(59301),le=Se(4676);function ee(Tt){var en=te.createContext(void 0),Yt=function(hn){var vn=hn.value,On=hn.children,En=te.useRef(vn);En.current=vn;var _n=te.useState(function(){return{getValue:function(){return En.current},listeners:new Set}}),Kt=(0,ie.Z)(_n,1),fn=Kt[0];return(0,ue.Z)(function(){(0,le.unstable_batchedUpdates)(function(){fn.listeners.forEach(function(zt){zt(vn)})})},[vn]),te.createElement(en.Provider,{value:fn},On)};return{Context:en,Provider:Yt,defaultValue:Tt}}function ne(Tt,en){var Yt=(0,Ce.Z)(typeof en=="function"?en:function(zt){if(en===void 0)return zt;if(!Array.isArray(en))return zt[en];var jt={};return en.forEach(function(Xt){jt[Xt]=zt[Xt]}),jt}),rn=te.useContext(Tt==null?void 0:Tt.Context),hn=rn||{},vn=hn.listeners,On=hn.getValue,En=te.useRef();En.current=Yt(rn?On():Tt==null?void 0:Tt.defaultValue);var _n=te.useState({}),Kt=(0,ie.Z)(_n,2),fn=Kt[1];return(0,ue.Z)(function(){if(!rn)return;function zt(jt){var Xt=Yt(jt);(0,se.Z)(En.current,Xt,!0)||fn({})}return vn.add(zt),function(){vn.delete(zt)}},[rn]),En.current}var E=Se(67711),b=Se(8654);function z(){var Tt=te.createContext(null);function en(){return te.useContext(Tt)}function Yt(hn,vn){var On=(0,b.Yr)(hn),En=function(Kt,fn){var zt=On?{ref:fn}:{},jt=te.useRef(0),Xt=te.useRef(Kt),cn=en();return cn!==null?te.createElement(hn,(0,E.Z)({},Kt,zt)):((!vn||vn(Xt.current,Kt))&&(jt.current+=1),Xt.current=Kt,te.createElement(Tt.Provider,{value:jt.current},te.createElement(hn,(0,E.Z)({},Kt,zt))))};return On?te.forwardRef(En):En}function rn(hn,vn){var On=(0,b.Yr)(hn),En=function(Kt,fn){var zt=On?{ref:fn}:{};return en(),te.createElement(hn,(0,E.Z)({},Kt,zt))};return On?te.memo(te.forwardRef(En),vn):te.memo(En,vn)}return{makeImmutable:Yt,responseImmutable:rn,useImmutableMark:en}}var x=z(),re=x.makeImmutable,ae=x.responseImmutable,oe=x.useImmutableMark,ve=z(),ye=ve.makeImmutable,me=ve.responseImmutable,ge=ve.useImmutableMark,_e=ee(),he=_e;function pe(Tt,en){var Yt=React.useRef(0);Yt.current+=1;var rn=React.useRef(Tt),hn=[];Object.keys(Tt||{}).map(function(On){var En;(Tt==null?void 0:Tt[On])!==((En=rn.current)===null||En===void 0?void 0:En[On])&&hn.push(On)}),rn.current=Tt;var vn=React.useRef([]);return hn.length&&(vn.current=hn),React.useDebugValue(Yt.current),React.useDebugValue(vn.current.join(", ")),en&&console.log("".concat(en,":"),Yt.current,vn.current),Yt.current}var ke=null,Te=null,Ee=Se(26420),Oe=Se(98506),je=Se(52873),Pe=Se(92310),Qe=Se.n(Pe),Xe=Se(80547),ot=Se(97938),We=Se(48736),rt=te.createContext({renderWithProps:!1}),Ye=rt,ut="RC_TABLE_KEY";function Ge(Tt){return Tt==null?[]:Array.isArray(Tt)?Tt:[Tt]}function ze(Tt){var en=[],Yt={};return Tt.forEach(function(rn){for(var hn=rn||{},vn=hn.key,On=hn.dataIndex,En=vn||Ge(On).join("-")||ut;Yt[En];)En="".concat(En,"_next");Yt[En]=!0,en.push(En)}),en}function Ve(Tt){return Tt!=null}function $e(Tt){return typeof Tt=="number"&&!Number.isNaN(Tt)}function nt(Tt){return Tt&&(0,Ee.Z)(Tt)==="object"&&!Array.isArray(Tt)&&!te.isValidElement(Tt)}function et(Tt,en,Yt,rn,hn,vn){var On=te.useContext(Ye),En=ge(),_n=(0,Xe.Z)(function(){if(Ve(rn))return[rn];var Kt=en==null||en===""?[]:Array.isArray(en)?en:[en],fn=(0,ot.Z)(Tt,Kt),zt=fn,jt=void 0;if(hn){var Xt=hn(fn,Tt,Yt);nt(Xt)?(zt=Xt.children,jt=Xt.props,On.renderWithProps=!0):zt=Xt}return[zt,jt]},[En,Tt,rn,en,hn,Yt],function(Kt,fn){if(vn){var zt=(0,ie.Z)(Kt,2),jt=zt[1],Xt=(0,ie.Z)(fn,2),cn=Xt[1];return vn(cn,jt)}return On.renderWithProps?!0:!(0,se.Z)(Kt,fn,!0)});return _n}function pt(Tt,en,Yt,rn){var hn=Tt+en-1;return Tt<=rn&&hn>=Yt}function ct(Tt,en){return ne(he,function(Yt){var rn=pt(Tt,en||1,Yt.hoverStartRow,Yt.hoverEndRow);return[rn,Yt.onHover]})}var Rt=Se(70425),dt=function(en){var Yt=en.ellipsis,rn=en.rowType,hn=en.children,vn,On=Yt===!0?{showTitle:!0}:Yt;return On&&(On.showTitle||rn==="header")&&(typeof hn=="string"||typeof hn=="number"?vn=hn.toString():te.isValidElement(hn)&&typeof hn.props.children=="string"&&(vn=hn.props.children)),vn};function Mt(Tt){var en,Yt,rn,hn,vn,On,En,_n,Kt=Tt.component,fn=Tt.children,zt=Tt.ellipsis,jt=Tt.scope,Xt=Tt.prefixCls,cn=Tt.className,Fn=Tt.align,Wn=Tt.record,nr=Tt.render,ar=Tt.dataIndex,$n=Tt.renderIndex,mr=Tt.shouldCellUpdate,dr=Tt.index,jr=Tt.rowType,qr=Tt.colSpan,$r=Tt.rowSpan,Gr=Tt.fixLeft,ri=Tt.fixRight,Jr=Tt.firstFixLeft,Wr=Tt.lastFixLeft,Vr=Tt.firstFixRight,ir=Tt.lastFixRight,or=Tt.appendNode,fr=Tt.additionalProps,Ar=fr===void 0?{}:fr,Yr=Tt.isSticky,Zr="".concat(Xt,"-cell"),Or=ne(he,["supportSticky","allColumnsFixedLeft","rowHoverable"]),di=Or.supportSticky,lo=Or.allColumnsFixedLeft,uo=Or.rowHoverable,zo=et(Wn,ar,$n,fn,nr,mr),wo=(0,ie.Z)(zo,2),Ni=wo[0],Ii=wo[1],Pi={},po=typeof Gr=="number"&&di,ji=typeof ri=="number"&&di;po&&(Pi.position="sticky",Pi.left=Gr),ji&&(Pi.position="sticky",Pi.right=ri);var Gi=(en=(Yt=(rn=Ii==null?void 0:Ii.colSpan)!==null&&rn!==void 0?rn:Ar.colSpan)!==null&&Yt!==void 0?Yt:qr)!==null&&en!==void 0?en:1,Ui=(hn=(vn=(On=Ii==null?void 0:Ii.rowSpan)!==null&&On!==void 0?On:Ar.rowSpan)!==null&&vn!==void 0?vn:$r)!==null&&hn!==void 0?hn:1,yr=ct(dr,Ui),Ur=(0,ie.Z)(yr,2),Fr=Ur[0],Hr=Ur[1],xi=(0,Rt.zX)(function(Ro){var zi;Wn&&Hr(dr,dr+Ui-1),Ar==null||(zi=Ar.onMouseEnter)===null||zi===void 0||zi.call(Ar,Ro)}),Oi=(0,Rt.zX)(function(Ro){var zi;Wn&&Hr(-1,-1),Ar==null||(zi=Ar.onMouseLeave)===null||zi===void 0||zi.call(Ar,Ro)});if(Gi===0||Ui===0)return null;var Lo=(En=Ar.title)!==null&&En!==void 0?En:dt({rowType:jr,ellipsis:zt,children:Ni}),Yi=Qe()(Zr,cn,(_n={},(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)(_n,"".concat(Zr,"-fix-left"),po&&di),"".concat(Zr,"-fix-left-first"),Jr&&di),"".concat(Zr,"-fix-left-last"),Wr&&di),"".concat(Zr,"-fix-left-all"),Wr&&lo&&di),"".concat(Zr,"-fix-right"),ji&&di),"".concat(Zr,"-fix-right-first"),Vr&&di),"".concat(Zr,"-fix-right-last"),ir&&di),"".concat(Zr,"-ellipsis"),zt),"".concat(Zr,"-with-append"),or),"".concat(Zr,"-fix-sticky"),(po||ji)&&Yr&&di),(0,je.Z)(_n,"".concat(Zr,"-row-hover"),!Ii&&Fr)),Ar.className,Ii==null?void 0:Ii.className),Xi={};Fn&&(Xi.textAlign=Fn);var ui=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},Ii==null?void 0:Ii.style),Pi),Xi),Ar.style),to=Ni;return(0,Ee.Z)(to)==="object"&&!Array.isArray(to)&&!te.isValidElement(to)&&(to=null),zt&&(Wr||Vr)&&(to=te.createElement("span",{className:"".concat(Zr,"-content")},to)),te.createElement(Kt,(0,E.Z)({},Ii,Ar,{className:Yi,style:ui,title:Lo,scope:jt,onMouseEnter:uo?xi:void 0,onMouseLeave:uo?Oi:void 0,colSpan:Gi!==1?Gi:null,rowSpan:Ui!==1?Ui:null}),or,to)}var xt=te.memo(Mt);function yt(Tt,en,Yt,rn,hn){var vn=Yt[Tt]||{},On=Yt[en]||{},En,_n;vn.fixed==="left"?En=rn.left[hn==="rtl"?en:Tt]:On.fixed==="right"&&(_n=rn.right[hn==="rtl"?Tt:en]);var Kt=!1,fn=!1,zt=!1,jt=!1,Xt=Yt[en+1],cn=Yt[Tt-1],Fn=Xt&&!Xt.fixed||cn&&!cn.fixed||Yt.every(function(mr){return mr.fixed==="left"});if(hn==="rtl"){if(En!==void 0){var Wn=cn&&cn.fixed==="left";jt=!Wn&&Fn}else if(_n!==void 0){var nr=Xt&&Xt.fixed==="right";zt=!nr&&Fn}}else if(En!==void 0){var ar=Xt&&Xt.fixed==="left";Kt=!ar&&Fn}else if(_n!==void 0){var $n=cn&&cn.fixed==="right";fn=!$n&&Fn}return{fixLeft:En,fixRight:_n,lastFixLeft:Kt,firstFixRight:fn,lastFixRight:zt,firstFixLeft:jt,isSticky:rn.isSticky}}var bt=te.createContext({}),He=bt;function Ae(Tt){var en=Tt.className,Yt=Tt.index,rn=Tt.children,hn=Tt.colSpan,vn=hn===void 0?1:hn,On=Tt.rowSpan,En=Tt.align,_n=ne(he,["prefixCls","direction"]),Kt=_n.prefixCls,fn=_n.direction,zt=te.useContext(He),jt=zt.scrollColumnIndex,Xt=zt.stickyOffsets,cn=zt.flattenColumns,Fn=Yt+vn-1,Wn=Fn+1===jt?vn+1:vn,nr=yt(Yt,Yt+Wn-1,cn,Xt,fn);return te.createElement(xt,(0,E.Z)({className:en,index:Yt,component:"td",prefixCls:Kt,record:null,dataIndex:null,align:En,colSpan:Wn,rowSpan:On,render:function(){return rn}},nr))}var be=Se(33346),Be=["children"];function Ke(Tt){var en=Tt.children,Yt=(0,be.Z)(Tt,Be);return te.createElement("tr",Yt,en)}function Ne(Tt){var en=Tt.children;return en}Ne.Row=Ke,Ne.Cell=Ae;var De=Ne;function we(Tt){var en=Tt.children,Yt=Tt.stickyOffsets,rn=Tt.flattenColumns,hn=ne(he,"prefixCls"),vn=rn.length-1,On=rn[vn],En=te.useMemo(function(){return{stickyOffsets:Yt,flattenColumns:rn,scrollColumnIndex:On!=null&&On.scrollbar?vn:null}},[On,rn,vn,Yt]);return te.createElement(He.Provider,{value:En},te.createElement("tfoot",{className:"".concat(hn,"-summary")},en))}var Le=me(we),Ue=De,Me=Se(29301),Re=Se(24514),tt=Se(75152),lt=Se(26112);function Pt(Tt,en,Yt,rn,hn,vn,On){Tt.push({record:en,indent:Yt,index:On});var En=vn(en),_n=hn==null?void 0:hn.has(En);if(en&&Array.isArray(en[rn])&&_n)for(var Kt=0;Kt<en[rn].length;Kt+=1)Pt(Tt,en[rn][Kt],Yt+1,rn,hn,vn,Kt)}function Ct(Tt,en,Yt,rn){var hn=te.useMemo(function(){if(Yt!=null&&Yt.size){for(var vn=[],On=0;On<(Tt==null?void 0:Tt.length);On+=1){var En=Tt[On];Pt(vn,En,0,en,Yt,rn,On)}return vn}return Tt==null?void 0:Tt.map(function(_n,Kt){return{record:_n,indent:0,index:Kt}})},[Tt,en,Yt,rn]);return hn}function vt(Tt,en,Yt,rn){var hn=ne(he,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),vn=hn.flattenColumns,On=hn.expandableType,En=hn.expandedKeys,_n=hn.childrenColumnName,Kt=hn.onTriggerExpand,fn=hn.rowExpandable,zt=hn.onRow,jt=hn.expandRowByClick,Xt=hn.rowClassName,cn=On==="nest",Fn=On==="row"&&(!fn||fn(Tt)),Wn=Fn||cn,nr=En&&En.has(en),ar=_n&&Tt&&Tt[_n],$n=(0,Rt.zX)(Kt),mr=zt==null?void 0:zt(Tt,Yt),dr=mr==null?void 0:mr.onClick,jr=function(ri){jt&&Wn&&Kt(Tt,ri);for(var Jr=arguments.length,Wr=new Array(Jr>1?Jr-1:0),Vr=1;Vr<Jr;Vr++)Wr[Vr-1]=arguments[Vr];dr==null||dr.apply(void 0,[ri].concat(Wr))},qr;typeof Xt=="string"?qr=Xt:typeof Xt=="function"&&(qr=Xt(Tt,Yt,rn));var $r=ze(vn);return(0,Oe.Z)((0,Oe.Z)({},hn),{},{columnsKey:$r,nestExpandable:cn,expanded:nr,hasNestChildren:ar,record:Tt,onTriggerExpand:$n,rowSupportExpand:Fn,expandable:Wn,rowProps:(0,Oe.Z)((0,Oe.Z)({},mr),{},{className:Qe()(qr,mr==null?void 0:mr.className),onClick:jr})})}function Ot(Tt){var en=Tt.prefixCls,Yt=Tt.children,rn=Tt.component,hn=Tt.cellComponent,vn=Tt.className,On=Tt.expanded,En=Tt.colSpan,_n=Tt.isEmpty,Kt=ne(he,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),fn=Kt.scrollbarSize,zt=Kt.fixHeader,jt=Kt.fixColumn,Xt=Kt.componentWidth,cn=Kt.horizonScroll,Fn=Yt;return(_n?cn&&Xt:jt)&&(Fn=te.createElement("div",{style:{width:Xt-(zt&&!_n?fn:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(en,"-expanded-row-fixed")},Fn)),te.createElement(rn,{className:vn,style:{display:On?null:"none"}},te.createElement(xt,{component:hn,prefixCls:en,colSpan:En},Fn))}var Zt=Ot;function Ut(Tt){var en=Tt.prefixCls,Yt=Tt.record,rn=Tt.onExpand,hn=Tt.expanded,vn=Tt.expandable,On="".concat(en,"-row-expand-icon");if(!vn)return te.createElement("span",{className:Qe()(On,"".concat(en,"-row-spaced"))});var En=function(Kt){rn(Yt,Kt),Kt.stopPropagation()};return te.createElement("span",{className:Qe()(On,(0,je.Z)((0,je.Z)({},"".concat(en,"-row-expanded"),hn),"".concat(en,"-row-collapsed"),!hn)),onClick:En})}function gt(Tt,en,Yt){var rn=[];function hn(vn){(vn||[]).forEach(function(On,En){rn.push(en(On,En)),hn(On[Yt])})}return hn(Tt),rn}function Qt(Tt,en,Yt,rn){return typeof Tt=="string"?Tt:typeof Tt=="function"?Tt(en,Yt,rn):""}function Lt(Tt,en,Yt,rn,hn){var vn=Tt.record,On=Tt.prefixCls,En=Tt.columnsKey,_n=Tt.fixedInfoList,Kt=Tt.expandIconColumnIndex,fn=Tt.nestExpandable,zt=Tt.indentSize,jt=Tt.expandIcon,Xt=Tt.expanded,cn=Tt.hasNestChildren,Fn=Tt.onTriggerExpand,Wn=En[Yt],nr=_n[Yt],ar;Yt===(Kt||0)&&fn&&(ar=te.createElement(te.Fragment,null,te.createElement("span",{style:{paddingLeft:"".concat(zt*rn,"px")},className:"".concat(On,"-row-indent indent-level-").concat(rn)}),jt({prefixCls:On,expanded:Xt,expandable:cn,record:vn,onExpand:Fn})));var $n;return en.onCell&&($n=en.onCell(vn,hn)),{key:Wn,fixedInfo:nr,appendCellNode:ar,additionalCellProps:$n||{}}}function qt(Tt){var en=Tt.className,Yt=Tt.style,rn=Tt.record,hn=Tt.index,vn=Tt.renderIndex,On=Tt.rowKey,En=Tt.indent,_n=En===void 0?0:En,Kt=Tt.rowComponent,fn=Tt.cellComponent,zt=Tt.scopeCellComponent,jt=vt(rn,On,hn,_n),Xt=jt.prefixCls,cn=jt.flattenColumns,Fn=jt.expandedRowClassName,Wn=jt.expandedRowRender,nr=jt.rowProps,ar=jt.expanded,$n=jt.rowSupportExpand,mr=te.useRef(!1);mr.current||(mr.current=ar);var dr=Qt(Fn,rn,hn,_n),jr=te.createElement(Kt,(0,E.Z)({},nr,{"data-row-key":On,className:Qe()(en,"".concat(Xt,"-row"),"".concat(Xt,"-row-level-").concat(_n),nr==null?void 0:nr.className,(0,je.Z)({},dr,_n>=1)),style:(0,Oe.Z)((0,Oe.Z)({},Yt),nr==null?void 0:nr.style)}),cn.map(function(Gr,ri){var Jr=Gr.render,Wr=Gr.dataIndex,Vr=Gr.className,ir=Lt(jt,Gr,ri,_n,hn),or=ir.key,fr=ir.fixedInfo,Ar=ir.appendCellNode,Yr=ir.additionalCellProps;return te.createElement(xt,(0,E.Z)({className:Vr,ellipsis:Gr.ellipsis,align:Gr.align,scope:Gr.rowScope,component:Gr.rowScope?zt:fn,prefixCls:Xt,key:or,record:rn,index:hn,renderIndex:vn,dataIndex:Wr,render:Jr,shouldCellUpdate:Gr.shouldCellUpdate},fr,{appendNode:Ar,additionalProps:Yr}))})),qr;if($n&&(mr.current||ar)){var $r=Wn(rn,hn,_n+1,ar);qr=te.createElement(Zt,{expanded:ar,className:Qe()("".concat(Xt,"-expanded-row"),"".concat(Xt,"-expanded-row-level-").concat(_n+1),dr),prefixCls:Xt,component:Kt,cellComponent:fn,colSpan:cn.length,isEmpty:!1},$r)}return te.createElement(te.Fragment,null,jr,qr)}var un=me(qt);function Sn(Tt){var en=Tt.columnKey,Yt=Tt.onColumnResize,rn=te.useRef();return(0,ue.Z)(function(){rn.current&&Yt(en,rn.current.offsetWidth)},[]),te.createElement(Me.Z,{data:en},te.createElement("td",{ref:rn,style:{padding:0,border:0,height:0}},te.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Jt=Se(29194);function Ln(Tt){var en=Tt.prefixCls,Yt=Tt.columnsKey,rn=Tt.onColumnResize,hn=te.useRef(null);return te.createElement("tr",{"aria-hidden":"true",className:"".concat(en,"-measure-row"),style:{height:0,fontSize:0},ref:hn},te.createElement(Me.Z.Collection,{onBatchResize:function(On){(0,Jt.Z)(hn.current)&&On.forEach(function(En){var _n=En.data,Kt=En.size;rn(_n,Kt.offsetWidth)})}},Yt.map(function(vn){return te.createElement(Sn,{key:vn,columnKey:vn,onColumnResize:rn})})))}function Zn(Tt){var en=Tt.data,Yt=Tt.measureColumnWidth,rn=ne(he,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),hn=rn.prefixCls,vn=rn.getComponent,On=rn.onColumnResize,En=rn.flattenColumns,_n=rn.getRowKey,Kt=rn.expandedKeys,fn=rn.childrenColumnName,zt=rn.emptyNode,jt=Ct(en,fn,Kt,_n),Xt=te.useRef({renderWithProps:!1}),cn=vn(["body","wrapper"],"tbody"),Fn=vn(["body","row"],"tr"),Wn=vn(["body","cell"],"td"),nr=vn(["body","cell"],"th"),ar;en.length?ar=jt.map(function(mr,dr){var jr=mr.record,qr=mr.indent,$r=mr.index,Gr=_n(jr,dr);return te.createElement(un,{key:Gr,rowKey:Gr,record:jr,index:dr,renderIndex:$r,rowComponent:Fn,cellComponent:Wn,scopeCellComponent:nr,indent:qr})}):ar=te.createElement(Zt,{expanded:!0,className:"".concat(hn,"-placeholder"),prefixCls:hn,component:Fn,cellComponent:Wn,colSpan:En.length,isEmpty:!0},zt);var $n=ze(En);return te.createElement(Ye.Provider,{value:Xt.current},te.createElement(cn,{className:"".concat(hn,"-tbody")},Yt&&te.createElement(Ln,{prefixCls:hn,columnsKey:$n,onColumnResize:On}),ar))}var Gn=me(Zn),Jn=Se(54451),hr=["columnType"];function ur(Tt){for(var en=Tt.colWidths,Yt=Tt.columns,rn=Tt.columCount,hn=ne(he,["tableLayout"]),vn=hn.tableLayout,On=[],En=rn||Yt.length,_n=!1,Kt=En-1;Kt>=0;Kt-=1){var fn=en[Kt],zt=Yt&&Yt[Kt],jt=void 0,Xt=void 0;if(zt&&(jt=zt[Jn.v],vn==="auto"&&(Xt=zt.minWidth)),fn||Xt||jt||_n){var cn=jt||{},Fn=cn.columnType,Wn=(0,be.Z)(cn,hr);On.unshift(te.createElement("col",(0,E.Z)({key:Kt,style:{width:fn,minWidth:Xt}},Wn))),_n=!0}}return te.createElement("colgroup",null,On)}var jn=ur,Nn=Se(15142),rr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Kn(Tt,en){return(0,te.useMemo)(function(){for(var Yt=[],rn=0;rn<en;rn+=1){var hn=Tt[rn];if(hn!==void 0)Yt[rn]=hn;else return null}return Yt},[Tt.join("_"),en])}var In=te.forwardRef(function(Tt,en){var Yt=Tt.className,rn=Tt.noData,hn=Tt.columns,vn=Tt.flattenColumns,On=Tt.colWidths,En=Tt.columCount,_n=Tt.stickyOffsets,Kt=Tt.direction,fn=Tt.fixHeader,zt=Tt.stickyTopOffset,jt=Tt.stickyBottomOffset,Xt=Tt.stickyClassName,cn=Tt.onScroll,Fn=Tt.maxContentScroll,Wn=Tt.children,nr=(0,be.Z)(Tt,rr),ar=ne(he,["prefixCls","scrollbarSize","isSticky","getComponent"]),$n=ar.prefixCls,mr=ar.scrollbarSize,dr=ar.isSticky,jr=ar.getComponent,qr=jr(["header","table"],"table"),$r=dr&&!fn?0:mr,Gr=te.useRef(null),ri=te.useCallback(function(Yr){(0,b.mH)(en,Yr),(0,b.mH)(Gr,Yr)},[]);te.useEffect(function(){var Yr;function Zr(Or){var di=Or,lo=di.currentTarget,uo=di.deltaX;uo&&(cn({currentTarget:lo,scrollLeft:lo.scrollLeft+uo}),Or.preventDefault())}return(Yr=Gr.current)===null||Yr===void 0||Yr.addEventListener("wheel",Zr,{passive:!1}),function(){var Or;(Or=Gr.current)===null||Or===void 0||Or.removeEventListener("wheel",Zr)}},[]);var Jr=te.useMemo(function(){return vn.every(function(Yr){return Yr.width})},[vn]),Wr=vn[vn.length-1],Vr={fixed:Wr?Wr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat($n,"-cell-scrollbar")}}},ir=(0,te.useMemo)(function(){return $r?[].concat((0,Nn.Z)(hn),[Vr]):hn},[$r,hn]),or=(0,te.useMemo)(function(){return $r?[].concat((0,Nn.Z)(vn),[Vr]):vn},[$r,vn]),fr=(0,te.useMemo)(function(){var Yr=_n.right,Zr=_n.left;return(0,Oe.Z)((0,Oe.Z)({},_n),{},{left:Kt==="rtl"?[].concat((0,Nn.Z)(Zr.map(function(Or){return Or+$r})),[0]):Zr,right:Kt==="rtl"?Yr:[].concat((0,Nn.Z)(Yr.map(function(Or){return Or+$r})),[0]),isSticky:dr})},[$r,_n,dr]),Ar=Kn(On,En);return te.createElement("div",{style:(0,Oe.Z)({overflow:"hidden"},dr?{top:zt,bottom:jt}:{}),ref:ri,className:Qe()(Yt,(0,je.Z)({},Xt,!!Xt))},te.createElement(qr,{style:{tableLayout:"fixed",visibility:rn||Ar?null:"hidden"}},(!rn||!Fn||Jr)&&te.createElement(jn,{colWidths:Ar?[].concat((0,Nn.Z)(Ar),[$r]):[],columCount:En+1,columns:or}),Wn((0,Oe.Z)((0,Oe.Z)({},nr),{},{stickyOffsets:fr,columns:ir,flattenColumns:or}))))}),gn=te.memo(In),pn=function(en){var Yt=en.cells,rn=en.stickyOffsets,hn=en.flattenColumns,vn=en.rowComponent,On=en.cellComponent,En=en.onHeaderRow,_n=en.index,Kt=ne(he,["prefixCls","direction"]),fn=Kt.prefixCls,zt=Kt.direction,jt;En&&(jt=En(Yt.map(function(cn){return cn.column}),_n));var Xt=ze(Yt.map(function(cn){return cn.column}));return te.createElement(vn,jt,Yt.map(function(cn,Fn){var Wn=cn.column,nr=yt(cn.colStart,cn.colEnd,hn,rn,zt),ar;return Wn&&Wn.onHeaderCell&&(ar=cn.column.onHeaderCell(Wn)),te.createElement(xt,(0,E.Z)({},cn,{scope:Wn.title?cn.colSpan>1?"colgroup":"col":null,ellipsis:Wn.ellipsis,align:Wn.align,component:On,prefixCls:fn,key:Xt[Fn]},nr,{additionalProps:ar,rowType:"header"}))}))},Dn=pn;function Rn(Tt){var en=[];function Yt(On,En){var _n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;en[_n]=en[_n]||[];var Kt=En,fn=On.filter(Boolean).map(function(zt){var jt={key:zt.key,className:zt.className||"",children:zt.title,column:zt,colStart:Kt},Xt=1,cn=zt.children;return cn&&cn.length>0&&(Xt=Yt(cn,Kt,_n+1).reduce(function(Fn,Wn){return Fn+Wn},0),jt.hasSubColumns=!0),"colSpan"in zt&&(Xt=zt.colSpan),"rowSpan"in zt&&(jt.rowSpan=zt.rowSpan),jt.colSpan=Xt,jt.colEnd=jt.colStart+Xt-1,en[_n].push(jt),Kt+=Xt,Xt});return fn}Yt(Tt,0);for(var rn=en.length,hn=function(En){en[En].forEach(function(_n){!("rowSpan"in _n)&&!_n.hasSubColumns&&(_n.rowSpan=rn-En)})},vn=0;vn<rn;vn+=1)hn(vn);return en}var Un=function(en){var Yt=en.stickyOffsets,rn=en.columns,hn=en.flattenColumns,vn=en.onHeaderRow,On=ne(he,["prefixCls","getComponent"]),En=On.prefixCls,_n=On.getComponent,Kt=te.useMemo(function(){return Rn(rn)},[rn]),fn=_n(["header","wrapper"],"thead"),zt=_n(["header","row"],"tr"),jt=_n(["header","cell"],"th");return te.createElement(fn,{className:"".concat(En,"-thead")},Kt.map(function(Xt,cn){var Fn=te.createElement(Dn,{key:cn,flattenColumns:hn,cells:Xt,stickyOffsets:Yt,rowComponent:zt,cellComponent:jt,onHeaderRow:vn,index:cn});return Fn}))},Mr=me(Un),an=Se(97347);function Ie(Tt,en,Yt){var rn=(0,Jn.g)(Tt),hn=rn.expandIcon,vn=rn.expandedRowKeys,On=rn.defaultExpandedRowKeys,En=rn.defaultExpandAllRows,_n=rn.expandedRowRender,Kt=rn.onExpand,fn=rn.onExpandedRowsChange,zt=rn.childrenColumnName,jt=hn||Ut,Xt=zt||"children",cn=te.useMemo(function(){return _n?"row":Tt.expandable&&Tt.internalHooks===ce.R&&Tt.expandable.__PARENT_RENDER_ICON__||en.some(function(dr){return dr&&(0,Ee.Z)(dr)==="object"&&dr[Xt]})?"nest":!1},[!!_n,en]),Fn=te.useState(function(){return On||(En?gt(en,Yt,Xt):[])}),Wn=(0,ie.Z)(Fn,2),nr=Wn[0],ar=Wn[1],$n=te.useMemo(function(){return new Set(vn||nr||[])},[vn,nr]),mr=te.useCallback(function(dr){var jr=Yt(dr,en.indexOf(dr)),qr,$r=$n.has(jr);$r?($n.delete(jr),qr=(0,Nn.Z)($n)):qr=[].concat((0,Nn.Z)($n),[jr]),ar(qr),Kt&&Kt(!$r,dr),fn&&fn(qr)},[Yt,$n,en,Kt,fn]);return[rn,cn,$n,jt,Xt,mr]}function Ze(Tt,en,Yt){var rn=Tt.map(function(hn,vn){return yt(vn,vn,Tt,en,Yt)});return(0,Xe.Z)(function(){return rn},[rn],function(hn,vn){return!(0,se.Z)(hn,vn)})}function qe(Tt){var en=(0,te.useRef)(Tt),Yt=(0,te.useState)({}),rn=(0,ie.Z)(Yt,2),hn=rn[1],vn=(0,te.useRef)(null),On=(0,te.useRef)([]);function En(_n){On.current.push(_n);var Kt=Promise.resolve();vn.current=Kt,Kt.then(function(){if(vn.current===Kt){var fn=On.current,zt=en.current;On.current=[],fn.forEach(function(jt){en.current=jt(en.current)}),vn.current=null,zt!==en.current&&hn({})}})}return(0,te.useEffect)(function(){return function(){vn.current=null}},[]),[en.current,En]}function st(Tt){var en=(0,te.useRef)(Tt||null),Yt=(0,te.useRef)();function rn(){window.clearTimeout(Yt.current)}function hn(On){en.current=On,rn(),Yt.current=window.setTimeout(function(){en.current=null,Yt.current=void 0},100)}function vn(){return en.current}return(0,te.useEffect)(function(){return rn},[]),[hn,vn]}function mt(){var Tt=te.useState(-1),en=(0,ie.Z)(Tt,2),Yt=en[0],rn=en[1],hn=te.useState(-1),vn=(0,ie.Z)(hn,2),On=vn[0],En=vn[1],_n=te.useCallback(function(Kt,fn){rn(Kt),En(fn)},[]);return[Yt,On,_n]}var Bt=Se(47273),kt=(0,Bt.Z)()?window:null;function Nt(Tt,en){var Yt=(0,Ee.Z)(Tt)==="object"?Tt:{},rn=Yt.offsetHeader,hn=rn===void 0?0:rn,vn=Yt.offsetSummary,On=vn===void 0?0:vn,En=Yt.offsetScroll,_n=En===void 0?0:En,Kt=Yt.getContainer,fn=Kt===void 0?function(){return kt}:Kt,zt=fn()||kt,jt=!!Tt;return te.useMemo(function(){return{isSticky:jt,stickyClassName:jt?"".concat(en,"-sticky-holder"):"",offsetHeader:hn,offsetSummary:On,offsetScroll:_n,container:zt}},[jt,_n,hn,On,en,zt])}function nn(Tt,en,Yt){var rn=(0,te.useMemo)(function(){var hn=en.length,vn=function(Kt,fn,zt){for(var jt=[],Xt=0,cn=Kt;cn!==fn;cn+=zt)jt.push(Xt),en[cn].fixed&&(Xt+=Tt[cn]||0);return jt},On=vn(0,hn,1),En=vn(hn-1,-1,-1).reverse();return Yt==="rtl"?{left:En,right:On}:{left:On,right:En}},[Tt,en,Yt]);return rn}var An=nn;function Vn(Tt){var en=Tt.className,Yt=Tt.children;return te.createElement("div",{className:en},Yt)}var At=Vn,wt=Se(8224),dn=Se(16089),Gt=Se(76846);function Et(Tt){var en=(0,Gt.bn)(Tt),Yt=en.getBoundingClientRect(),rn=document.documentElement;return{left:Yt.left+(window.pageXOffset||rn.scrollLeft)-(rn.clientLeft||document.body.clientLeft||0),top:Yt.top+(window.pageYOffset||rn.scrollTop)-(rn.clientTop||document.body.clientTop||0)}}var Ht=function(en,Yt){var rn,hn,vn=en.scrollBodyRef,On=en.onScroll,En=en.offsetScroll,_n=en.container,Kt=en.direction,fn=ne(he,"prefixCls"),zt=((rn=vn.current)===null||rn===void 0?void 0:rn.scrollWidth)||0,jt=((hn=vn.current)===null||hn===void 0?void 0:hn.clientWidth)||0,Xt=zt&&jt*(jt/zt),cn=te.useRef(),Fn=qe({scrollLeft:0,isHiddenScrollBar:!0}),Wn=(0,ie.Z)(Fn,2),nr=Wn[0],ar=Wn[1],$n=te.useRef({delta:0,x:0}),mr=te.useState(!1),dr=(0,ie.Z)(mr,2),jr=dr[0],qr=dr[1],$r=te.useRef(null);te.useEffect(function(){return function(){dn.Z.cancel($r.current)}},[]);var Gr=function(){qr(!1)},ri=function(or){or.persist(),$n.current.delta=or.pageX-nr.scrollLeft,$n.current.x=0,qr(!0),or.preventDefault()},Jr=function(or){var fr,Ar=or||((fr=window)===null||fr===void 0?void 0:fr.event),Yr=Ar.buttons;if(!jr||Yr===0){jr&&qr(!1);return}var Zr=$n.current.x+or.pageX-$n.current.x-$n.current.delta,Or=Kt==="rtl";Zr=Math.max(Or?Xt-jt:0,Math.min(Or?0:jt-Xt,Zr));var di=!Or||Math.abs(Zr)+Math.abs(Xt)<jt;di&&(On({scrollLeft:Zr/jt*(zt+2)}),$n.current.x=or.pageX)},Wr=function(){dn.Z.cancel($r.current),$r.current=(0,dn.Z)(function(){if(vn.current){var or=Et(vn.current).top,fr=or+vn.current.offsetHeight,Ar=_n===window?document.documentElement.scrollTop+window.innerHeight:Et(_n).top+_n.clientHeight;fr-(0,tt.Z)()<=Ar||or>=Ar-En?ar(function(Yr){return(0,Oe.Z)((0,Oe.Z)({},Yr),{},{isHiddenScrollBar:!0})}):ar(function(Yr){return(0,Oe.Z)((0,Oe.Z)({},Yr),{},{isHiddenScrollBar:!1})})}})},Vr=function(or){ar(function(fr){return(0,Oe.Z)((0,Oe.Z)({},fr),{},{scrollLeft:or/zt*jt||0})})};return te.useImperativeHandle(Yt,function(){return{setScrollLeft:Vr,checkScrollBarVisible:Wr}}),te.useEffect(function(){var ir=(0,wt.Z)(document.body,"mouseup",Gr,!1),or=(0,wt.Z)(document.body,"mousemove",Jr,!1);return Wr(),function(){ir.remove(),or.remove()}},[Xt,jr]),te.useEffect(function(){if(vn.current){for(var ir=[],or=(0,Gt.bn)(vn.current);or;)ir.push(or),or=or.parentElement;return ir.forEach(function(fr){return fr.addEventListener("scroll",Wr,!1)}),window.addEventListener("resize",Wr,!1),window.addEventListener("scroll",Wr,!1),_n.addEventListener("scroll",Wr,!1),function(){ir.forEach(function(fr){return fr.removeEventListener("scroll",Wr)}),window.removeEventListener("resize",Wr),window.removeEventListener("scroll",Wr),_n.removeEventListener("scroll",Wr)}}},[_n]),te.useEffect(function(){nr.isHiddenScrollBar||ar(function(ir){var or=vn.current;return or?(0,Oe.Z)((0,Oe.Z)({},ir),{},{scrollLeft:or.scrollLeft/or.scrollWidth*or.clientWidth}):ir})},[nr.isHiddenScrollBar]),zt<=jt||!Xt||nr.isHiddenScrollBar?null:te.createElement("div",{style:{height:(0,tt.Z)(),width:jt,bottom:En},className:"".concat(fn,"-sticky-scroll")},te.createElement("div",{onMouseDown:ri,ref:cn,className:Qe()("".concat(fn,"-sticky-scroll-bar"),(0,je.Z)({},"".concat(fn,"-sticky-scroll-bar-active"),jr)),style:{width:"".concat(Xt,"px"),transform:"translate3d(".concat(nr.scrollLeft,"px, 0, 0)")}}))},on=te.forwardRef(Ht);function sn(Tt){return null}var yn=sn;function Wt(Tt){return null}var Cn=Wt,Vt="rc-table",Pn=[],bn={};function zn(){return"No Data"}function Bn(Tt,en){var Yt=(0,Oe.Z)({rowKey:"key",prefixCls:Vt,emptyText:zn},Tt),rn=Yt.prefixCls,hn=Yt.className,vn=Yt.rowClassName,On=Yt.style,En=Yt.data,_n=Yt.rowKey,Kt=Yt.scroll,fn=Yt.tableLayout,zt=Yt.direction,jt=Yt.title,Xt=Yt.footer,cn=Yt.summary,Fn=Yt.caption,Wn=Yt.id,nr=Yt.showHeader,ar=Yt.components,$n=Yt.emptyText,mr=Yt.onRow,dr=Yt.onHeaderRow,jr=Yt.onScroll,qr=Yt.internalHooks,$r=Yt.transformColumns,Gr=Yt.internalRefs,ri=Yt.tailor,Jr=Yt.getContainerWidth,Wr=Yt.sticky,Vr=Yt.rowHoverable,ir=Vr===void 0?!0:Vr,or=En||Pn,fr=!!or.length,Ar=qr===ce.R,Yr=te.useCallback(function(pi,_r){return(0,ot.Z)(ar,pi)||_r},[ar]),Zr=te.useMemo(function(){return typeof _n=="function"?_n:function(pi){var _r=pi&&pi[_n];return _r}},[_n]),Or=Yr(["body"]),di=mt(),lo=(0,ie.Z)(di,3),uo=lo[0],zo=lo[1],wo=lo[2],Ni=Ie(Yt,or,Zr),Ii=(0,ie.Z)(Ni,6),Pi=Ii[0],po=Ii[1],ji=Ii[2],Gi=Ii[3],Ui=Ii[4],yr=Ii[5],Ur=Kt==null?void 0:Kt.x,Fr=te.useState(0),Hr=(0,ie.Z)(Fr,2),xi=Hr[0],Oi=Hr[1],Lo=(0,an.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},Yt),Pi),{},{expandable:!!Pi.expandedRowRender,columnTitle:Pi.columnTitle,expandedKeys:ji,getRowKey:Zr,onTriggerExpand:yr,expandIcon:Gi,expandIconColumnIndex:Pi.expandIconColumnIndex,direction:zt,scrollWidth:Ar&&ri&&typeof Ur=="number"?Ur:null,clientWidth:xi}),Ar?$r:null),Yi=(0,ie.Z)(Lo,4),Xi=Yi[0],ui=Yi[1],to=Yi[2],Ro=Yi[3],zi=to!=null?to:Ur,Ho=te.useMemo(function(){return{columns:Xi,flattenColumns:ui}},[Xi,ui]),xo=te.useRef(),Io=te.useRef(),Ki=te.useRef(),Wo=te.useRef();te.useImperativeHandle(en,function(){return{nativeElement:xo.current,scrollTo:function(_r){var Ci;if(Ki.current instanceof HTMLElement){var _o=_r.index,Bi=_r.top,Na=_r.key;if($e(Bi)){var va;(va=Ki.current)===null||va===void 0||va.scrollTo({top:Bi})}else{var Aa,Oo=Na!=null?Na:Zr(or[_o]);(Aa=Ki.current.querySelector('[data-row-key="'.concat(Oo,'"]')))===null||Aa===void 0||Aa.scrollIntoView()}}else(Ci=Ki.current)!==null&&Ci!==void 0&&Ci.scrollTo&&Ki.current.scrollTo(_r)}}});var za=te.useRef(),Yo=te.useState(!1),la=(0,ie.Z)(Yo,2),Zo=la[0],Da=la[1],qa=te.useState(!1),ba=(0,ie.Z)(qa,2),cs=ba[0],Ma=ba[1],Ha=te.useState(new Map),Ra=(0,ie.Z)(Ha,2),pa=Ra[0],Wa=Ra[1],Ja=ze(ui),Sa=Ja.map(function(pi){return pa.get(pi)}),wa=te.useMemo(function(){return Sa},[Sa.join("_")]),ua=An(wa,ui,zt),Ao=Kt&&Ve(Kt.y),qi=Kt&&Ve(zi)||!!Pi.fixed,vi=qi&&ui.some(function(pi){var _r=pi.fixed;return _r}),si=te.useRef(),no=Nt(Wr,rn),Ji=no.isSticky,ro=no.offsetHeader,co=no.offsetSummary,na=no.offsetScroll,Go=no.stickyClassName,ca=no.container,Qi=te.useMemo(function(){return cn==null?void 0:cn(or)},[cn,or]),vo=(Ao||Ji)&&te.isValidElement(Qi)&&Qi.type===De&&Qi.props.fixed,Bo,Xo,Ia;Ao&&(Xo={overflowY:fr?"scroll":"auto",maxHeight:Kt.y}),qi&&(Bo={overflowX:"auto"},Ao||(Xo={overflowY:"hidden"}),Ia={width:zi===!0?"auto":zi,minWidth:"100%"});var ds=te.useCallback(function(pi,_r){Wa(function(Ci){if(Ci.get(pi)!==_r){var _o=new Map(Ci);return _o.set(pi,_r),_o}return Ci})},[]),fs=st(null),da=(0,ie.Z)(fs,2),go=da[0],Co=da[1];function Eo(pi,_r){_r&&(typeof _r=="function"?_r(pi):_r.scrollLeft!==pi&&(_r.scrollLeft=pi,_r.scrollLeft!==pi&&setTimeout(function(){_r.scrollLeft=pi},0)))}var Ko=(0,Ce.Z)(function(pi){var _r=pi.currentTarget,Ci=pi.scrollLeft,_o=zt==="rtl",Bi=typeof Ci=="number"?Ci:_r.scrollLeft,Na=_r||bn;if(!Co()||Co()===Na){var va;go(Na),Eo(Bi,Io.current),Eo(Bi,Ki.current),Eo(Bi,za.current),Eo(Bi,(va=si.current)===null||va===void 0?void 0:va.setScrollLeft)}var Aa=_r||Io.current;if(Aa){var Oo=Ar&&ri&&typeof zi=="number"?zi:Aa.scrollWidth,fa=Aa.clientWidth;if(Oo===fa){Da(!1),Ma(!1);return}_o?(Da(-Bi<Oo-fa),Ma(-Bi>0)):(Da(Bi>0),Ma(Bi<Oo-fa))}}),Qa=(0,Ce.Z)(function(pi){Ko(pi),jr==null||jr(pi)}),xa=function(){if(qi&&Ki.current){var _r;Ko({currentTarget:(0,Gt.bn)(Ki.current),scrollLeft:(_r=Ki.current)===null||_r===void 0?void 0:_r.scrollLeft})}else Da(!1),Ma(!1)},_s=function(_r){var Ci,_o=_r.width;(Ci=si.current)===null||Ci===void 0||Ci.checkScrollBarVisible();var Bi=xo.current?xo.current.offsetWidth:_o;Ar&&Jr&&xo.current&&(Bi=Jr(xo.current,Bi)||Bi),Bi!==xi&&(xa(),Oi(Bi))},Oa=te.useRef(!1);te.useEffect(function(){Oa.current&&xa()},[qi,En,Xi.length]),te.useEffect(function(){Oa.current=!0},[]);var bs=te.useState(0),$a=(0,ie.Z)(bs,2),Ca=$a[0],Ss=$a[1],es=te.useState(!0),ra=(0,ie.Z)(es,2),Za=ra[0],Ea=ra[1];(0,ue.Z)(function(){(!ri||!Ar)&&(Ki.current instanceof Element?Ss((0,tt.o)(Ki.current).width):Ss((0,tt.o)(Wo.current).width)),Ea((0,Re.G)("position","sticky"))},[]),te.useEffect(function(){Ar&&Gr&&(Gr.body.current=Ki.current)});var Ga=te.useCallback(function(pi){return te.createElement(te.Fragment,null,te.createElement(Mr,pi),vo==="top"&&te.createElement(Le,pi,Qi))},[vo,Qi]),ts=te.useCallback(function(pi){return te.createElement(Le,pi,Qi)},[Qi]),hs=Yr(["table"],"table"),ka=te.useMemo(function(){return fn||(vi?zi==="max-content"?"auto":"fixed":Ao||Ji||ui.some(function(pi){var _r=pi.ellipsis;return _r})?"fixed":"auto")},[Ao,vi,ui,fn,Ji]),ps,ms={colWidths:wa,columCount:ui.length,stickyOffsets:ua,onHeaderRow:dr,fixHeader:Ao,scroll:Kt},ws=te.useMemo(function(){return fr?null:typeof $n=="function"?$n():$n},[fr,$n]),ns=te.createElement(Gn,{data:or,measureColumnWidth:Ao||qi||Ji}),rs=te.createElement(jn,{colWidths:ui.map(function(pi){var _r=pi.width;return _r}),columns:ui}),La=Fn!=null?te.createElement("caption",{className:"".concat(rn,"-caption")},Fn):void 0,Dr=(0,lt.Z)(Yt,{data:!0}),xs=(0,lt.Z)(Yt,{aria:!0});if(Ao||Ji){var Pa;typeof Or=="function"?(Pa=Or(or,{scrollbarSize:Ca,ref:Ki,onScroll:Ko}),ms.colWidths=ui.map(function(pi,_r){var Ci=pi.width,_o=_r===ui.length-1?Ci-Ca:Ci;return typeof _o=="number"&&!Number.isNaN(_o)?_o:0})):Pa=te.createElement("div",{style:(0,Oe.Z)((0,Oe.Z)({},Bo),Xo),onScroll:Qa,ref:Ki,className:Qe()("".concat(rn,"-body"))},te.createElement(hs,(0,E.Z)({style:(0,Oe.Z)((0,Oe.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,ns,!vo&&Qi&&te.createElement(Le,{stickyOffsets:ua,flattenColumns:ui},Qi)));var vs=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({noData:!or.length,maxContentScroll:qi&&zi==="max-content"},ms),Ho),{},{direction:zt,stickyClassName:Go,onScroll:Ko});ps=te.createElement(te.Fragment,null,nr!==!1&&te.createElement(gn,(0,E.Z)({},vs,{stickyTopOffset:ro,className:"".concat(rn,"-header"),ref:Io}),Ga),Pa,vo&&vo!=="top"&&te.createElement(gn,(0,E.Z)({},vs,{stickyBottomOffset:co,className:"".concat(rn,"-summary"),ref:za}),ts),Ji&&Ki.current&&Ki.current instanceof Element&&te.createElement(on,{ref:si,offsetScroll:na,scrollBodyRef:Ki,onScroll:Ko,container:ca,direction:zt}))}else ps=te.createElement("div",{style:(0,Oe.Z)((0,Oe.Z)({},Bo),Xo),className:Qe()("".concat(rn,"-content")),onScroll:Ko,ref:Ki},te.createElement(hs,(0,E.Z)({style:(0,Oe.Z)((0,Oe.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,nr!==!1&&te.createElement(Mr,(0,E.Z)({},ms,Ho)),ns,Qi&&te.createElement(Le,{stickyOffsets:ua,flattenColumns:ui},Qi)));var ia=te.createElement("div",(0,E.Z)({className:Qe()(rn,hn,(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(rn,"-rtl"),zt==="rtl"),"".concat(rn,"-ping-left"),Zo),"".concat(rn,"-ping-right"),cs),"".concat(rn,"-layout-fixed"),fn==="fixed"),"".concat(rn,"-fixed-header"),Ao),"".concat(rn,"-fixed-column"),vi),"".concat(rn,"-fixed-column-gapped"),vi&&Ro),"".concat(rn,"-scroll-horizontal"),qi),"".concat(rn,"-has-fix-left"),ui[0]&&ui[0].fixed),"".concat(rn,"-has-fix-right"),ui[ui.length-1]&&ui[ui.length-1].fixed==="right")),style:On,id:Wn,ref:xo},Dr),jt&&te.createElement(At,{className:"".concat(rn,"-title")},jt(or)),te.createElement("div",{ref:Wo,className:"".concat(rn,"-container")},ps),Xt&&te.createElement(At,{className:"".concat(rn,"-footer")},Xt(or)));qi&&(ia=te.createElement(Me.Z,{onResize:_s},ia));var is=Ze(ui,ua,zt),ma=te.useMemo(function(){return{scrollX:zi,prefixCls:rn,getComponent:Yr,scrollbarSize:Ca,direction:zt,fixedInfoList:is,isSticky:Ji,supportSticky:Za,componentWidth:xi,fixHeader:Ao,fixColumn:vi,horizonScroll:qi,tableLayout:ka,rowClassName:vn,expandedRowClassName:Pi.expandedRowClassName,expandIcon:Gi,expandableType:po,expandRowByClick:Pi.expandRowByClick,expandedRowRender:Pi.expandedRowRender,onTriggerExpand:yr,expandIconColumnIndex:Pi.expandIconColumnIndex,indentSize:Pi.indentSize,allColumnsFixedLeft:ui.every(function(pi){return pi.fixed==="left"}),emptyNode:ws,columns:Xi,flattenColumns:ui,onColumnResize:ds,hoverStartRow:uo,hoverEndRow:zo,onHover:wo,rowExpandable:Pi.rowExpandable,onRow:mr,getRowKey:Zr,expandedKeys:ji,childrenColumnName:Ui,rowHoverable:ir}},[zi,rn,Yr,Ca,zt,is,Ji,Za,xi,Ao,vi,qi,ka,vn,Pi.expandedRowClassName,Gi,po,Pi.expandRowByClick,Pi.expandedRowRender,yr,Pi.expandIconColumnIndex,Pi.indentSize,ws,Xi,ui,ds,uo,zo,wo,Pi.rowExpandable,mr,Zr,ji,Ui,ir]);return te.createElement(he.Provider,{value:ma},ia)}var er=te.forwardRef(Bn);function cr(Tt){return ye(er,Tt)}var pr=cr();pr.EXPAND_COLUMN=ce.w,pr.INTERNAL_HOOKS=ce.R,pr.Column=yn,pr.ColumnGroup=Cn,pr.Summary=Ue;var Nr=pr,Br=Se(6790),ei=ee(null),xr=ee(null);function Tr(Tt,en,Yt){var rn=en||1;return Yt[Tt+rn]-(Yt[Tt]||0)}function Pr(Tt){var en=Tt.rowInfo,Yt=Tt.column,rn=Tt.colIndex,hn=Tt.indent,vn=Tt.index,On=Tt.component,En=Tt.renderIndex,_n=Tt.record,Kt=Tt.style,fn=Tt.className,zt=Tt.inverse,jt=Tt.getHeight,Xt=Yt.render,cn=Yt.dataIndex,Fn=Yt.className,Wn=Yt.width,nr=ne(xr,["columnsOffset"]),ar=nr.columnsOffset,$n=Lt(en,Yt,rn,hn,vn),mr=$n.key,dr=$n.fixedInfo,jr=$n.appendCellNode,qr=$n.additionalCellProps,$r=qr.style,Gr=qr.colSpan,ri=Gr===void 0?1:Gr,Jr=qr.rowSpan,Wr=Jr===void 0?1:Jr,Vr=rn-1,ir=Tr(Vr,ri,ar),or=ri>1?Wn-ir:0,fr=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},$r),Kt),{},{flex:"0 0 ".concat(ir,"px"),width:"".concat(ir,"px"),marginRight:or,pointerEvents:"auto"}),Ar=te.useMemo(function(){return zt?Wr<=1:ri===0||Wr===0||Wr>1},[Wr,ri,zt]);Ar?fr.visibility="hidden":zt&&(fr.height=jt==null?void 0:jt(Wr));var Yr=Ar?function(){return null}:Xt,Zr={};return(Wr===0||ri===0)&&(Zr.rowSpan=1,Zr.colSpan=1),te.createElement(xt,(0,E.Z)({className:Qe()(Fn,fn),ellipsis:Yt.ellipsis,align:Yt.align,scope:Yt.rowScope,component:On,prefixCls:en.prefixCls,key:mr,record:_n,index:vn,renderIndex:En,dataIndex:cn,render:Yr,shouldCellUpdate:Yt.shouldCellUpdate},dr,{appendNode:jr,additionalProps:(0,Oe.Z)((0,Oe.Z)({},qr),{},{style:fr},Zr)}))}var Xr=Pr,hi=["data","index","className","rowKey","style","extra","getHeight"],bi=te.forwardRef(function(Tt,en){var Yt=Tt.data,rn=Tt.index,hn=Tt.className,vn=Tt.rowKey,On=Tt.style,En=Tt.extra,_n=Tt.getHeight,Kt=(0,be.Z)(Tt,hi),fn=Yt.record,zt=Yt.indent,jt=Yt.index,Xt=ne(he,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),cn=Xt.scrollX,Fn=Xt.flattenColumns,Wn=Xt.prefixCls,nr=Xt.fixColumn,ar=Xt.componentWidth,$n=ne(ei,["getComponent"]),mr=$n.getComponent,dr=vt(fn,vn,rn,zt),jr=mr(["body","row"],"div"),qr=mr(["body","cell"],"div"),$r=dr.rowSupportExpand,Gr=dr.expanded,ri=dr.rowProps,Jr=dr.expandedRowRender,Wr=dr.expandedRowClassName,Vr;if($r&&Gr){var ir=Jr(fn,rn,zt+1,Gr),or=Qt(Wr,fn,rn,zt),fr={};nr&&(fr={style:(0,je.Z)({},"--virtual-width","".concat(ar,"px"))});var Ar="".concat(Wn,"-expanded-row-cell");Vr=te.createElement(jr,{className:Qe()("".concat(Wn,"-expanded-row"),"".concat(Wn,"-expanded-row-level-").concat(zt+1),or)},te.createElement(xt,{component:qr,prefixCls:Wn,className:Qe()(Ar,(0,je.Z)({},"".concat(Ar,"-fixed"),nr)),additionalProps:fr},ir))}var Yr=(0,Oe.Z)((0,Oe.Z)({},On),{},{width:cn});En&&(Yr.position="absolute",Yr.pointerEvents="none");var Zr=te.createElement(jr,(0,E.Z)({},ri,Kt,{"data-row-key":vn,ref:$r?null:en,className:Qe()(hn,"".concat(Wn,"-row"),ri==null?void 0:ri.className,(0,je.Z)({},"".concat(Wn,"-row-extra"),En)),style:(0,Oe.Z)((0,Oe.Z)({},Yr),ri==null?void 0:ri.style)}),Fn.map(function(Or,di){return te.createElement(Xr,{key:di,component:qr,rowInfo:dr,column:Or,colIndex:di,indent:zt,index:rn,renderIndex:jt,record:fn,inverse:En,getHeight:_n})}));return $r?te.createElement("div",{ref:en},Zr,Vr):Zr}),Si=me(bi),Kr=Si,Ti=te.forwardRef(function(Tt,en){var Yt=Tt.data,rn=Tt.onScroll,hn=ne(he,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),vn=hn.flattenColumns,On=hn.onColumnResize,En=hn.getRowKey,_n=hn.expandedKeys,Kt=hn.prefixCls,fn=hn.childrenColumnName,zt=hn.scrollX,jt=hn.direction,Xt=ne(ei),cn=Xt.sticky,Fn=Xt.scrollY,Wn=Xt.listItemHeight,nr=Xt.getComponent,ar=Xt.onScroll,$n=te.useRef(),mr=Ct(Yt,fn,_n,En),dr=te.useMemo(function(){var Vr=0;return vn.map(function(ir){var or=ir.width,fr=ir.key;return Vr+=or,[fr,or,Vr]})},[vn]),jr=te.useMemo(function(){return dr.map(function(Vr){return Vr[2]})},[dr]);te.useEffect(function(){dr.forEach(function(Vr){var ir=(0,ie.Z)(Vr,2),or=ir[0],fr=ir[1];On(or,fr)})},[dr]),te.useImperativeHandle(en,function(){var Vr,ir={scrollTo:function(fr){var Ar;(Ar=$n.current)===null||Ar===void 0||Ar.scrollTo(fr)},nativeElement:(Vr=$n.current)===null||Vr===void 0?void 0:Vr.nativeElement};return Object.defineProperty(ir,"scrollLeft",{get:function(){var fr;return((fr=$n.current)===null||fr===void 0?void 0:fr.getScrollInfo().x)||0},set:function(fr){var Ar;(Ar=$n.current)===null||Ar===void 0||Ar.scrollTo({left:fr})}}),ir});var qr=function(ir,or){var fr,Ar=(fr=mr[or])===null||fr===void 0?void 0:fr.record,Yr=ir.onCell;if(Yr){var Zr,Or=Yr(Ar,or);return(Zr=Or==null?void 0:Or.rowSpan)!==null&&Zr!==void 0?Zr:1}return 1},$r=function(ir){var or=ir.start,fr=ir.end,Ar=ir.getSize,Yr=ir.offsetY;if(fr<0)return null;for(var Zr=vn.filter(function(Gi){return qr(Gi,or)===0}),Or=or,di=function(Ui){if(Zr=Zr.filter(function(yr){return qr(yr,Ui)===0}),!Zr.length)return Or=Ui,1},lo=or;lo>=0&&!di(lo);lo-=1);for(var uo=vn.filter(function(Gi){return qr(Gi,fr)!==1}),zo=fr,wo=function(Ui){if(uo=uo.filter(function(yr){return qr(yr,Ui)!==1}),!uo.length)return zo=Math.max(Ui-1,fr),1},Ni=fr;Ni<mr.length&&!wo(Ni);Ni+=1);for(var Ii=[],Pi=function(Ui){var yr=mr[Ui];if(!yr)return 1;vn.some(function(Ur){return qr(Ur,Ui)>1})&&Ii.push(Ui)},po=Or;po<=zo;po+=1)Pi(po);var ji=Ii.map(function(Gi){var Ui=mr[Gi],yr=En(Ui.record,Gi),Ur=function(xi){var Oi=Gi+xi-1,Lo=En(mr[Oi].record,Oi),Yi=Ar(yr,Lo);return Yi.bottom-Yi.top},Fr=Ar(yr);return te.createElement(Kr,{key:Gi,data:Ui,rowKey:yr,index:Gi,style:{top:-Yr+Fr.top},extra:!0,getHeight:Ur})});return ji},Gr=te.useMemo(function(){return{columnsOffset:jr}},[jr]),ri="".concat(Kt,"-tbody"),Jr=nr(["body","wrapper"]),Wr={};return cn&&(Wr.position="sticky",Wr.bottom=0,(0,Ee.Z)(cn)==="object"&&cn.offsetScroll&&(Wr.bottom=cn.offsetScroll)),te.createElement(xr.Provider,{value:Gr},te.createElement(Br.Z,{fullHeight:!1,ref:$n,prefixCls:"".concat(ri,"-virtual"),styles:{horizontalScrollBar:Wr},className:ri,height:Fn,itemHeight:Wn||24,data:mr,itemKey:function(ir){return En(ir.record)},component:Jr,scrollWidth:zt,direction:jt,onVirtualScroll:function(ir){var or,fr=ir.x;rn({currentTarget:(or=$n.current)===null||or===void 0?void 0:or.nativeElement,scrollLeft:fr})},onScroll:ar,extraRender:$r},function(Vr,ir,or){var fr=En(Vr.record,ir);return te.createElement(Kr,{data:Vr,rowKey:fr,index:ir,style:or.style})}))}),Ei=me(Ti),tr=Ei,br=function(en,Yt){var rn=Yt.ref,hn=Yt.onScroll;return te.createElement(tr,{ref:rn,data:en,onScroll:hn})};function kr(Tt,en){var Yt=Tt.data,rn=Tt.columns,hn=Tt.scroll,vn=Tt.sticky,On=Tt.prefixCls,En=On===void 0?Vt:On,_n=Tt.className,Kt=Tt.listItemHeight,fn=Tt.components,zt=Tt.onScroll,jt=hn||{},Xt=jt.x,cn=jt.y;typeof Xt!="number"&&(Xt=1),typeof cn!="number"&&(cn=500);var Fn=(0,Rt.zX)(function(ar,$n){return(0,ot.Z)(fn,ar)||$n}),Wn=(0,Rt.zX)(zt),nr=te.useMemo(function(){return{sticky:vn,scrollY:cn,listItemHeight:Kt,getComponent:Fn,onScroll:Wn}},[vn,cn,Kt,Fn,Wn]);return te.createElement(ei.Provider,{value:nr},te.createElement(Nr,(0,E.Z)({},Tt,{className:Qe()(_n,"".concat(En,"-virtual")),scroll:(0,Oe.Z)((0,Oe.Z)({},hn),{},{x:Xt}),components:(0,Oe.Z)((0,Oe.Z)({},fn),{},{body:Yt!=null&&Yt.length?br:void 0}),columns:rn,internalHooks:ce.R,tailor:!0,ref:en})))}var ti=te.forwardRef(kr);function ni(Tt){return ye(ti,Tt)}var wi=ni(),Ri=null},54451:function($t,Dt,Se){"use strict";Se.d(Dt,{g:function(){return te},v:function(){return se}});var ce=Se(98506),ie=Se(33346),Ce=Se(48736),ue=["expandable"],se="RC_TABLE_INTERNAL_COL_DEFINE";function te(le){var ee=le.expandable,ne=(0,ie.Z)(le,ue),E;return"expandable"in le?E=(0,ce.Z)((0,ce.Z)({},ne),ee):E=ne,E.showExpandColumn===!1&&(E.expandIconColumnIndex=-1),E}},22711:function($t,Dt,Se){"use strict";Se.r(Dt),Se.d(Dt,{ResizableTextArea:function(){return Pe},default:function(){return We}});var ce=Se(67711),ie=Se(52873),Ce=Se(98506),ue=Se(15142),se=Se(16886),te=Se(33346),le=Se(92310),ee=Se.n(le),ne=Se(36901),E=Se(66003),b=Se(30292),z=Se(18929),x=Se(59301),re=Se(26420),ae=Se(29301),oe=Se(34280),ve=Se(16089),ye=`
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;
`,me=["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"],ge={},_e;function he(rt){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=rt.getAttribute("id")||rt.getAttribute("data-reactid")||rt.getAttribute("name");if(Ye&&ge[ut])return ge[ut];var Ge=window.getComputedStyle(rt),ze=Ge.getPropertyValue("box-sizing")||Ge.getPropertyValue("-moz-box-sizing")||Ge.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(Ge.getPropertyValue("padding-bottom"))+parseFloat(Ge.getPropertyValue("padding-top")),$e=parseFloat(Ge.getPropertyValue("border-bottom-width"))+parseFloat(Ge.getPropertyValue("border-top-width")),nt=me.map(function(pt){return"".concat(pt,":").concat(Ge.getPropertyValue(pt))}).join(";"),et={sizingStyle:nt,paddingSize:Ve,borderSize:$e,boxSizing:ze};return Ye&&ut&&(ge[ut]=et),et}function pe(rt){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;_e||(_e=document.createElement("textarea"),_e.setAttribute("tab-index","-1"),_e.setAttribute("aria-hidden","true"),_e.setAttribute("name","hiddenTextarea"),document.body.appendChild(_e)),rt.getAttribute("wrap")?_e.setAttribute("wrap",rt.getAttribute("wrap")):_e.removeAttribute("wrap");var ze=he(rt,Ye),Ve=ze.paddingSize,$e=ze.borderSize,nt=ze.boxSizing,et=ze.sizingStyle;_e.setAttribute("style","".concat(et,";").concat(ye)),_e.value=rt.value||rt.placeholder||"";var pt=void 0,ct=void 0,Rt,dt=_e.scrollHeight;if(nt==="border-box"?dt+=$e:nt==="content-box"&&(dt-=Ve),ut!==null||Ge!==null){_e.value=" ";var Mt=_e.scrollHeight-Ve;ut!==null&&(pt=Mt*ut,nt==="border-box"&&(pt=pt+Ve+$e),dt=Math.max(pt,dt)),Ge!==null&&(ct=Mt*Ge,nt==="border-box"&&(ct=ct+Ve+$e),Rt=dt>ct?"":"hidden",dt=Math.min(ct,dt))}var xt={height:dt,overflowY:Rt,resize:"none"};return pt&&(xt.minHeight=pt),ct&&(xt.maxHeight=ct),xt}var ke=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Te=0,Ee=1,Oe=2,je=x.forwardRef(function(rt,Ye){var ut=rt,Ge=ut.prefixCls,ze=ut.defaultValue,Ve=ut.value,$e=ut.autoSize,nt=ut.onResize,et=ut.className,pt=ut.style,ct=ut.disabled,Rt=ut.onChange,dt=ut.onInternalAutoSize,Mt=(0,te.Z)(ut,ke),xt=(0,z.Z)(ze,{value:Ve,postState:function(un){return un!=null?un:""}}),yt=(0,se.Z)(xt,2),bt=yt[0],He=yt[1],Ae=function(un){He(un.target.value),Rt==null||Rt(un)},be=x.useRef();x.useImperativeHandle(Ye,function(){return{textArea:be.current}});var Be=x.useMemo(function(){return $e&&(0,re.Z)($e)==="object"?[$e.minRows,$e.maxRows]:[]},[$e]),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=!!$e,Le=function(){try{if(document.activeElement===be.current){var un=be.current,Sn=un.selectionStart,Jt=un.selectionEnd,Ln=un.scrollTop;be.current.setSelectionRange(Sn,Jt),be.current.scrollTop=Ln}}catch(Zn){}},Ue=x.useState(Oe),Me=(0,se.Z)(Ue,2),Re=Me[0],tt=Me[1],lt=x.useState(),Pt=(0,se.Z)(lt,2),Ct=Pt[0],vt=Pt[1],Ot=function(){tt(Te)};(0,oe.Z)(function(){we&&Ot()},[Ve,Ne,De,we]),(0,oe.Z)(function(){if(Re===Te)tt(Ee);else if(Re===Ee){var qt=pe(be.current,!1,Ne,De);tt(Oe),vt(qt)}else Le()},[Re]);var Zt=x.useRef(),Ut=function(){ve.Z.cancel(Zt.current)},gt=function(un){Re===Oe&&(nt==null||nt(un),$e&&(Ut(),Zt.current=(0,ve.Z)(function(){Ot()})))};x.useEffect(function(){return Ut},[]);var Qt=we?Ct:null,Lt=(0,Ce.Z)((0,Ce.Z)({},pt),Qt);return(Re===Te||Re===Ee)&&(Lt.overflowY="hidden",Lt.overflowX="hidden"),x.createElement(ae.Z,{onResize:gt,disabled:!($e||nt)},x.createElement("textarea",(0,ce.Z)({},Mt,{ref:be,style:Lt,className:ee()(Ge,et,(0,ie.Z)({},"".concat(Ge,"-disabled"),ct)),disabled:ct,value:bt,onChange:Ae})))}),Pe=je,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"],Xe=x.forwardRef(function(rt,Ye){var ut,Ge=rt.defaultValue,ze=rt.value,Ve=rt.onFocus,$e=rt.onBlur,nt=rt.onChange,et=rt.allowClear,pt=rt.maxLength,ct=rt.onCompositionStart,Rt=rt.onCompositionEnd,dt=rt.suffix,Mt=rt.prefixCls,xt=Mt===void 0?"rc-textarea":Mt,yt=rt.showCount,bt=rt.count,He=rt.className,Ae=rt.style,be=rt.disabled,Be=rt.hidden,Ke=rt.classNames,Ne=rt.styles,De=rt.onResize,we=rt.onClear,Le=rt.onPressEnter,Ue=rt.readOnly,Me=rt.autoSize,Re=rt.onKeyDown,tt=(0,te.Z)(rt,Qe),lt=(0,z.Z)(Ge,{value:ze,defaultValue:Ge}),Pt=(0,se.Z)(lt,2),Ct=Pt[0],vt=Pt[1],Ot=Ct==null?"":String(Ct),Zt=x.useState(!1),Ut=(0,se.Z)(Zt,2),gt=Ut[0],Qt=Ut[1],Lt=x.useRef(!1),qt=x.useState(null),un=(0,se.Z)(qt,2),Sn=un[0],Jt=un[1],Ln=(0,x.useRef)(null),Zn=(0,x.useRef)(null),Gn=function(){var nn;return(nn=Zn.current)===null||nn===void 0?void 0:nn.textArea},Jn=function(){Gn().focus()};(0,x.useImperativeHandle)(Ye,function(){var Nt;return{resizableTextArea:Zn.current,focus:Jn,blur:function(){Gn().blur()},nativeElement:((Nt=Ln.current)===null||Nt===void 0?void 0:Nt.nativeElement)||Gn()}}),(0,x.useEffect)(function(){Qt(function(Nt){return!be&&Nt})},[be]);var hr=x.useState(null),ur=(0,se.Z)(hr,2),jn=ur[0],Nn=ur[1];x.useEffect(function(){if(jn){var Nt;(Nt=Gn()).setSelectionRange.apply(Nt,(0,ue.Z)(jn))}},[jn]);var rr=(0,E.Z)(bt,yt),Kn=(ut=rr.max)!==null&&ut!==void 0?ut:pt,In=Number(Kn)>0,gn=rr.strategy(Ot),pn=!!Kn&&gn>Kn,Dn=function(nn,An){var Vn=An;!Lt.current&&rr.exceedFormatter&&rr.max&&rr.strategy(An)>rr.max&&(Vn=rr.exceedFormatter(An,{max:rr.max}),An!==Vn&&Nn([Gn().selectionStart||0,Gn().selectionEnd||0])),vt(Vn),(0,b.rJ)(nn.currentTarget,nn,nt,Vn)},Rn=function(nn){Lt.current=!0,ct==null||ct(nn)},Un=function(nn){Lt.current=!1,Dn(nn,nn.currentTarget.value),Rt==null||Rt(nn)},Mr=function(nn){Dn(nn,nn.target.value)},an=function(nn){nn.key==="Enter"&&Le&&Le(nn),Re==null||Re(nn)},Ie=function(nn){Qt(!0),Ve==null||Ve(nn)},Ze=function(nn){Qt(!1),$e==null||$e(nn)},qe=function(nn){vt(""),Jn(),(0,b.rJ)(Gn(),nn,nt)},st=dt,mt;rr.show&&(rr.showFormatter?mt=rr.showFormatter({value:Ot,count:gn,maxLength:Kn}):mt="".concat(gn).concat(In?" / ".concat(Kn):""),st=x.createElement(x.Fragment,null,st,x.createElement("span",{className:ee()("".concat(xt,"-data-count"),Ke==null?void 0:Ke.count),style:Ne==null?void 0:Ne.count},mt)));var Bt=function(nn){var An;De==null||De(nn),(An=Gn())!==null&&An!==void 0&&An.style.height&&Jt(!0)},kt=!Me&&!yt&&!et;return x.createElement(ne.BaseInput,{ref:Ln,value:Ot,allowClear:et,handleReset:qe,suffix:st,prefixCls:xt,classNames:(0,Ce.Z)((0,Ce.Z)({},Ke),{},{affixWrapper:ee()(Ke==null?void 0:Ke.affixWrapper,(0,ie.Z)((0,ie.Z)({},"".concat(xt,"-show-count"),yt),"".concat(xt,"-textarea-allow-clear"),et))}),disabled:be,focused:gt,className:ee()(He,pn&&"".concat(xt,"-out-of-range")),style:(0,Ce.Z)((0,Ce.Z)({},Ae),Sn&&!kt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof mt=="string"?mt:void 0}},hidden:Be,readOnly:Ue,onClear:we},x.createElement(Pe,(0,ce.Z)({},tt,{autoSize:Me,maxLength:pt,onKeyDown:an,onChange:Mr,onFocus:Ie,onBlur:Ze,onCompositionStart:Rn,onCompositionEnd:Un,className:ee()(Ke==null?void 0:Ke.textarea),style:(0,Ce.Z)((0,Ce.Z)({},Ne==null?void 0:Ne.textarea),{},{resize:Ae==null?void 0:Ae.resize}),disabled:be,prefixCls:xt,onResize:Bt,ref:Zn,readOnly:Ue})))}),ot=Xe,We=ot},639:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ge}});var ce=Se(67711),ie=Se(52873),Ce=Se(98506),ue=Se(16886),se=Se(33346),te=Se(59301),le=Se(92310),ee=Se.n(le),ne=Se(26112),E=Se(30699),b=function(he){for(var pe=he.prefixCls,ke=he.level,Te=he.isStart,Ee=he.isEnd,Oe="".concat(pe,"-indent-unit"),je=[],Pe=0;Pe<ke;Pe+=1)je.push(te.createElement("span",{key:Pe,className:ee()(Oe,(0,ie.Z)((0,ie.Z)({},"".concat(Oe,"-start"),Te[Pe]),"".concat(Oe,"-end"),Ee[Pe]))}));return te.createElement("span",{"aria-hidden":"true",className:"".concat(pe,"-indent")},je)},z=te.memo(b),x=Se(65065),re=Se(34061),ae=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],oe="open",ve="close",ye="---",me=function(he){var pe,ke,Te,Ee=he.eventKey,Oe=he.className,je=he.style,Pe=he.dragOver,Qe=he.dragOverGapTop,Xe=he.dragOverGapBottom,ot=he.isLeaf,We=he.isStart,rt=he.isEnd,Ye=he.expanded,ut=he.selected,Ge=he.checked,ze=he.halfChecked,Ve=he.loading,$e=he.domRef,nt=he.active,et=he.data,pt=he.onMouseMove,ct=he.selectable,Rt=(0,se.Z)(he,ae),dt=te.useContext(E.k),Mt=te.useContext(E.y),xt=te.useRef(null),yt=te.useState(!1),bt=(0,ue.Z)(yt,2),He=bt[0],Ae=bt[1],be=!!(dt.disabled||he.disabled||(pe=Mt.nodeDisabled)!==null&&pe!==void 0&&pe.call(Mt,et)),Be=te.useMemo(function(){return!dt.checkable||he.checkable===!1?!1:dt.checkable},[dt.checkable,he.checkable]),Ke=function(gn){be||dt.onNodeSelect(gn,(0,re.F)(he))},Ne=function(gn){be||!Be||he.disableCheckbox||dt.onNodeCheck(gn,(0,re.F)(he),!Ge)},De=te.useMemo(function(){return typeof ct=="boolean"?ct:dt.selectable},[ct,dt.selectable]),we=function(gn){dt.onNodeClick(gn,(0,re.F)(he)),De?Ke(gn):Ne(gn)},Le=function(gn){dt.onNodeDoubleClick(gn,(0,re.F)(he))},Ue=function(gn){dt.onNodeMouseEnter(gn,(0,re.F)(he))},Me=function(gn){dt.onNodeMouseLeave(gn,(0,re.F)(he))},Re=function(gn){dt.onNodeContextMenu(gn,(0,re.F)(he))},tt=te.useMemo(function(){return!!(dt.draggable&&(!dt.draggable.nodeDraggable||dt.draggable.nodeDraggable(et)))},[dt.draggable,et]),lt=function(gn){gn.stopPropagation(),Ae(!0),dt.onNodeDragStart(gn,he);try{gn.dataTransfer.setData("text/plain","")}catch(pn){}},Pt=function(gn){gn.preventDefault(),gn.stopPropagation(),dt.onNodeDragEnter(gn,he)},Ct=function(gn){gn.preventDefault(),gn.stopPropagation(),dt.onNodeDragOver(gn,he)},vt=function(gn){gn.stopPropagation(),dt.onNodeDragLeave(gn,he)},Ot=function(gn){gn.stopPropagation(),Ae(!1),dt.onNodeDragEnd(gn,he)},Zt=function(gn){gn.preventDefault(),gn.stopPropagation(),Ae(!1),dt.onNodeDrop(gn,he)},Ut=function(gn){Ve||dt.onNodeExpand(gn,(0,re.F)(he))},gt=te.useMemo(function(){var In=(0,x.Z)(dt.keyEntities,Ee)||{},gn=In.children;return!!(gn||[]).length},[dt.keyEntities,Ee]),Qt=te.useMemo(function(){return ot===!1?!1:ot||!dt.loadData&&!gt||dt.loadData&&he.loaded&&!gt},[ot,dt.loadData,gt,he.loaded]);te.useEffect(function(){Ve||typeof dt.loadData=="function"&&Ye&&!Qt&&!he.loaded&&dt.onNodeLoad((0,re.F)(he))},[Ve,dt.loadData,dt.onNodeLoad,Ye,Qt,he]);var Lt=te.useMemo(function(){var In;return(In=dt.draggable)!==null&&In!==void 0&&In.icon?te.createElement("span",{className:"".concat(dt.prefixCls,"-draggable-icon")},dt.draggable.icon):null},[dt.draggable]),qt=function(gn){var pn=he.switcherIcon||dt.switcherIcon;return typeof pn=="function"?pn((0,Ce.Z)((0,Ce.Z)({},he),{},{isLeaf:gn})):pn},un=function(){if(Qt){var gn=qt(!0);return gn!==!1?te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher-noop"))},gn):null}var pn=qt(!1);return pn!==!1?te.createElement("span",{onClick:Ut,className:ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher_").concat(Ye?oe:ve))},pn):null},Sn=te.useMemo(function(){if(!Be)return null;var In=typeof Be!="boolean"?Be:null;return te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-checkbox"),(0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(dt.prefixCls,"-checkbox-checked"),Ge),"".concat(dt.prefixCls,"-checkbox-indeterminate"),!Ge&&ze),"".concat(dt.prefixCls,"-checkbox-disabled"),be||he.disableCheckbox)),onClick:Ne,role:"checkbox","aria-checked":ze?"mixed":Ge,"aria-disabled":be||he.disableCheckbox,"aria-label":"Select ".concat(typeof he.title=="string"?he.title:"tree node")},In)},[Be,Ge,ze,be,he.disableCheckbox,he.title]),Jt=te.useMemo(function(){return Qt?null:Ye?oe:ve},[Qt,Ye]),Ln=te.useMemo(function(){return te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__").concat(Jt||"docu"),(0,ie.Z)({},"".concat(dt.prefixCls,"-icon_loading"),Ve))})},[dt.prefixCls,Jt,Ve]),Zn=te.useMemo(function(){var In=!!dt.draggable,gn=!he.disabled&&In&&dt.dragOverNodeKey===Ee;return gn?dt.dropIndicatorRender({dropPosition:dt.dropPosition,dropLevelOffset:dt.dropLevelOffset,indent:dt.indent,prefixCls:dt.prefixCls,direction:dt.direction}):null},[dt.dropPosition,dt.dropLevelOffset,dt.indent,dt.prefixCls,dt.direction,dt.draggable,dt.dragOverNodeKey,dt.dropIndicatorRender]),Gn=te.useMemo(function(){var In=he.title,gn=In===void 0?ye:In,pn="".concat(dt.prefixCls,"-node-content-wrapper"),Dn;if(dt.showIcon){var Rn=he.icon||dt.icon;Dn=Rn?te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__customize"))},typeof Rn=="function"?Rn(he):Rn):Ln}else dt.loadData&&Ve&&(Dn=Ln);var Un;return typeof gn=="function"?Un=gn(et):dt.titleRender?Un=dt.titleRender(et):Un=gn,te.createElement("span",{ref:xt,title:typeof gn=="string"?gn:"",className:ee()(pn,"".concat(pn,"-").concat(Jt||"normal"),(0,ie.Z)({},"".concat(dt.prefixCls,"-node-selected"),!be&&(ut||He))),onMouseEnter:Ue,onMouseLeave:Me,onContextMenu:Re,onClick:we,onDoubleClick:Le},Dn,te.createElement("span",{className:"".concat(dt.prefixCls,"-title")},Un),Zn)},[dt.prefixCls,dt.showIcon,he,dt.icon,Ln,dt.titleRender,et,Jt,Ue,Me,Re,we,Le]),Jn=(0,ne.Z)(Rt,{aria:!0,data:!0}),hr=(0,x.Z)(dt.keyEntities,Ee)||{},ur=hr.level,jn=rt[rt.length-1],Nn=!be&&tt,rr=dt.draggingNodeKey===Ee,Kn=ct!==void 0?{"aria-selected":!!ct}:void 0;return te.createElement("div",(0,ce.Z)({ref:$e,role:"treeitem","aria-expanded":ot?void 0:Ye,className:ee()(Oe,"".concat(dt.prefixCls,"-treenode"),(Te={},(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)(Te,"".concat(dt.prefixCls,"-treenode-disabled"),be),"".concat(dt.prefixCls,"-treenode-switcher-").concat(Ye?"open":"close"),!ot),"".concat(dt.prefixCls,"-treenode-checkbox-checked"),Ge),"".concat(dt.prefixCls,"-treenode-checkbox-indeterminate"),ze),"".concat(dt.prefixCls,"-treenode-selected"),ut),"".concat(dt.prefixCls,"-treenode-loading"),Ve),"".concat(dt.prefixCls,"-treenode-active"),nt),"".concat(dt.prefixCls,"-treenode-leaf-last"),jn),"".concat(dt.prefixCls,"-treenode-draggable"),tt),"dragging",rr),(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)(Te,"drop-target",dt.dropTargetKey===Ee),"drop-container",dt.dropContainerKey===Ee),"drag-over",!be&&Pe),"drag-over-gap-top",!be&&Qe),"drag-over-gap-bottom",!be&&Xe),"filter-node",(ke=dt.filterTreeNode)===null||ke===void 0?void 0:ke.call(dt,(0,re.F)(he))),"".concat(dt.prefixCls,"-treenode-leaf"),Qt))),style:je,draggable:Nn,onDragStart:Nn?lt:void 0,onDragEnter:tt?Pt:void 0,onDragOver:tt?Ct:void 0,onDragLeave:tt?vt:void 0,onDrop:tt?Zt:void 0,onDragEnd:tt?Ot:void 0,onMouseMove:pt},Kn,Jn),te.createElement(z,{prefixCls:dt.prefixCls,level:ur,isStart:We,isEnd:rt}),Lt,un(),Sn,Gn)};me.isTreeNode=1;var ge=me},30699:function($t,Dt,Se){"use strict";Se.d(Dt,{k:function(){return ie},y:function(){return Ce}});var ce=Se(59301),ie=ce.createContext(null),Ce=ce.createContext({})},71598:function($t,Dt,Se){"use strict";Se.d(Dt,{OF:function(){return Ee.Z},y6:function(){return ve.y},ZP:function(){return be}});var ce=Se(67711),ie=Se(26420),Ce=Se(98506),ue=Se(15142),se=Se(42573),te=Se(58698),le=Se(62437),ee=Se(74700),ne=Se(45080),E=Se(52873),b=Se(92310),z=Se.n(b),x=Se(10228),re=Se(26112),ae=Se(48736),oe=Se(59301),ve=Se(30699),ye=function(Ke){var Ne=Ke.dropPosition,De=Ke.dropLevelOffset,we=Ke.indent,Le={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ne){case-1:Le.top=0,Le.left=-De*we;break;case 1:Le.bottom=0,Le.left=-De*we;break;case 0:Le.bottom=0,Le.left=we;break}return oe.createElement("div",{style:Le})},me=ye;function ge(Be){if(Be==null)throw new TypeError("Cannot destructure "+Be)}var _e=Se(16886),he=Se(33346),pe=Se(34280),ke=Se(6790),Te=Se(77900),Ee=Se(639);function Oe(Be,Ke){var Ne=oe.useState(!1),De=(0,_e.Z)(Ne,2),we=De[0],Le=De[1];(0,pe.Z)(function(){if(we)return Be(),function(){Ke()}},[we]),(0,pe.Z)(function(){return Le(!0),function(){Le(!1)}},[])}var je=Oe,Pe=Se(34061),Qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Xe=oe.forwardRef(function(Be,Ke){var Ne=Be.className,De=Be.style,we=Be.motion,Le=Be.motionNodes,Ue=Be.motionType,Me=Be.onMotionStart,Re=Be.onMotionEnd,tt=Be.active,lt=Be.treeNodeRequiredProps,Pt=(0,he.Z)(Be,Qe),Ct=oe.useState(!0),vt=(0,_e.Z)(Ct,2),Ot=vt[0],Zt=vt[1],Ut=oe.useContext(ve.k),gt=Ut.prefixCls,Qt=Le&&Ue!=="hide";(0,pe.Z)(function(){Le&&Qt!==Ot&&Zt(Qt)},[Le]);var Lt=function(){Le&&Me()},qt=oe.useRef(!1),un=function(){Le&&!qt.current&&(qt.current=!0,Re())};je(Lt,un);var Sn=function(Ln){Qt===Ln&&un()};return Le?oe.createElement(Te.default,(0,ce.Z)({ref:Ke,visible:Ot},we,{motionAppear:Ue==="show",onVisibleChanged:Sn}),function(Jt,Ln){var Zn=Jt.className,Gn=Jt.style;return oe.createElement("div",{ref:Ln,className:z()("".concat(gt,"-treenode-motion"),Zn),style:Gn},Le.map(function(Jn){var hr=Object.assign({},(ge(Jn.data),Jn.data)),ur=Jn.title,jn=Jn.key,Nn=Jn.isStart,rr=Jn.isEnd;delete hr.children;var Kn=(0,Pe.H8)(jn,lt);return oe.createElement(Ee.Z,(0,ce.Z)({},hr,Kn,{title:ur,active:tt,data:Jn.data,key:jn,isStart:Nn,isEnd:rr}))}))}):oe.createElement(Ee.Z,(0,ce.Z)({domRef:Ke,className:Ne,style:De},Pt,{active:tt}))}),ot=Xe;function We(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ne=Be.length,De=Ke.length;if(Math.abs(Ne-De)!==1)return{add:!1,key:null};function we(Le,Ue){var Me=new Map;Le.forEach(function(tt){Me.set(tt,!0)});var Re=Ue.filter(function(tt){return!Me.has(tt)});return Re.length===1?Re[0]:null}return Ne<De?{add:!0,key:we(Be,Ke)}:{add:!1,key:we(Ke,Be)}}function rt(Be,Ke,Ne){var De=Be.findIndex(function(Me){return Me.key===Ne}),we=Be[De+1],Le=Ke.findIndex(function(Me){return Me.key===Ne});if(we){var Ue=Ke.findIndex(function(Me){return Me.key===we.key});return Ke.slice(Le+1,Ue)}return Ke.slice(Le+1)}var Ye=["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"],ut={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ge=function(){},ze="RC_TREE_MOTION_".concat(Math.random()),Ve={key:ze},$e={key:ze,level:0,index:0,pos:"0",node:Ve,nodes:[Ve]},nt={parent:null,children:[],pos:$e.pos,data:Ve,title:null,key:ze,isStart:[],isEnd:[]};function et(Be,Ke,Ne,De){return Ke===!1||!Ne?Be:Be.slice(0,Math.ceil(Ne/De)+1)}function pt(Be){var Ke=Be.key,Ne=Be.pos;return(0,Pe.km)(Ke,Ne)}function ct(Be){for(var Ke=String(Be.data.key),Ne=Be;Ne.parent;)Ne=Ne.parent,Ke="".concat(Ne.data.key," > ").concat(Ke);return Ke}var Rt=oe.forwardRef(function(Be,Ke){var Ne=Be.prefixCls,De=Be.data,we=Be.selectable,Le=Be.checkable,Ue=Be.expandedKeys,Me=Be.selectedKeys,Re=Be.checkedKeys,tt=Be.loadedKeys,lt=Be.loadingKeys,Pt=Be.halfCheckedKeys,Ct=Be.keyEntities,vt=Be.disabled,Ot=Be.dragging,Zt=Be.dragOverNodeKey,Ut=Be.dropPosition,gt=Be.motion,Qt=Be.height,Lt=Be.itemHeight,qt=Be.virtual,un=Be.scrollWidth,Sn=Be.focusable,Jt=Be.activeItem,Ln=Be.focused,Zn=Be.tabIndex,Gn=Be.onKeyDown,Jn=Be.onFocus,hr=Be.onBlur,ur=Be.onActiveChange,jn=Be.onListChangeStart,Nn=Be.onListChangeEnd,rr=(0,he.Z)(Be,Ye),Kn=oe.useRef(null),In=oe.useRef(null);oe.useImperativeHandle(Ke,function(){return{scrollTo:function(sn){Kn.current.scrollTo(sn)},getIndentWidth:function(){return In.current.offsetWidth}}});var gn=oe.useState(Ue),pn=(0,_e.Z)(gn,2),Dn=pn[0],Rn=pn[1],Un=oe.useState(De),Mr=(0,_e.Z)(Un,2),an=Mr[0],Ie=Mr[1],Ze=oe.useState(De),qe=(0,_e.Z)(Ze,2),st=qe[0],mt=qe[1],Bt=oe.useState([]),kt=(0,_e.Z)(Bt,2),Nt=kt[0],nn=kt[1],An=oe.useState(null),Vn=(0,_e.Z)(An,2),At=Vn[0],wt=Vn[1],dn=oe.useRef(De);dn.current=De;function Gt(){var on=dn.current;Ie(on),mt(on),nn([]),wt(null),Nn()}(0,pe.Z)(function(){Rn(Ue);var on=We(Dn,Ue);if(on.key!==null)if(on.add){var sn=an.findIndex(function(bn){var zn=bn.key;return zn===on.key}),yn=et(rt(an,De,on.key),qt,Qt,Lt),Wt=an.slice();Wt.splice(sn+1,0,nt),mt(Wt),nn(yn),wt("show")}else{var Cn=De.findIndex(function(bn){var zn=bn.key;return zn===on.key}),Vt=et(rt(De,an,on.key),qt,Qt,Lt),Pn=De.slice();Pn.splice(Cn+1,0,nt),mt(Pn),nn(Vt),wt("hide")}else an!==De&&(Ie(De),mt(De))},[Ue,De]),oe.useEffect(function(){Ot||Gt()},[Ot]);var Et=gt?st:De,Ht={expandedKeys:Ue,selectedKeys:Me,loadedKeys:tt,loadingKeys:lt,checkedKeys:Re,halfCheckedKeys:Pt,dragOverNodeKey:Zt,dropPosition:Ut,keyEntities:Ct};return oe.createElement(oe.Fragment,null,Ln&&Jt&&oe.createElement("span",{style:ut,"aria-live":"assertive"},ct(Jt)),oe.createElement("div",null,oe.createElement("input",{style:ut,disabled:Sn===!1||vt,tabIndex:Sn!==!1?Zn:null,onKeyDown:Gn,onFocus:Jn,onBlur:hr,value:"",onChange:Ge,"aria-label":"for screen reader"})),oe.createElement("div",{className:"".concat(Ne,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},oe.createElement("div",{className:"".concat(Ne,"-indent")},oe.createElement("div",{ref:In,className:"".concat(Ne,"-indent-unit")}))),oe.createElement(ke.Z,(0,ce.Z)({},rr,{data:Et,itemKey:pt,height:Qt,fullHeight:!1,virtual:qt,itemHeight:Lt,scrollWidth:un,prefixCls:"".concat(Ne,"-list"),ref:Kn,role:"tree",onVisibleChange:function(sn){sn.every(function(yn){return pt(yn)!==ze})&&Gt()}}),function(on){var sn=on.pos,yn=Object.assign({},(ge(on.data),on.data)),Wt=on.title,Cn=on.key,Vt=on.isStart,Pn=on.isEnd,bn=(0,Pe.km)(Cn,sn);delete yn.key,delete yn.children;var zn=(0,Pe.H8)(bn,Ht);return oe.createElement(ot,(0,ce.Z)({},yn,zn,{title:Wt,active:!!Jt&&Cn===Jt.key,pos:sn,data:on.data,isStart:Vt,isEnd:Pn,motion:gt,motionNodes:Cn===ze?Nt:null,motionType:At,onMotionStart:jn,onMotionEnd:Gt,treeNodeRequiredProps:Ht,onMouseMove:function(){ur(null)}}))}))}),dt=Rt,Mt=Se(82661),xt=Se(34643),yt=Se(65065),bt=10,He=function(Be){(0,ee.Z)(Ne,Be);var Ke=(0,ne.Z)(Ne);function Ne(){var De;(0,se.Z)(this,Ne);for(var we=arguments.length,Le=new Array(we),Ue=0;Ue<we;Ue++)Le[Ue]=arguments[Ue];return De=Ke.call.apply(Ke,[this].concat(Le)),(0,E.Z)((0,le.Z)(De),"destroyed",!1),(0,E.Z)((0,le.Z)(De),"delayedDragEnterLogic",void 0),(0,E.Z)((0,le.Z)(De),"loadingRetryTimes",{}),(0,E.Z)((0,le.Z)(De),"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,le.Z)(De),"dragStartMousePosition",null),(0,E.Z)((0,le.Z)(De),"dragNodeProps",null),(0,E.Z)((0,le.Z)(De),"currentMouseOverDroppableNodeKey",null),(0,E.Z)((0,le.Z)(De),"listRef",oe.createRef()),(0,E.Z)((0,le.Z)(De),"onNodeDragStart",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.keyEntities,Ct=De.props.onDragStart,vt=Re.eventKey;De.dragNodeProps=Re,De.dragStartMousePosition={x:Me.clientX,y:Me.clientY};var Ot=(0,Mt._5)(lt,vt);De.setState({draggingNodeKey:vt,dragChildrenKeys:(0,Mt.wA)(vt,Pt),indent:De.listRef.current.getIndentWidth()}),De.setExpandedKeys(Ot),window.addEventListener("dragend",De.onWindowDragEnd),Ct==null||Ct({event:Me,node:(0,Pe.F)(Re)})}),(0,E.Z)((0,le.Z)(De),"onNodeDragEnter",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.keyEntities,Ct=tt.dragChildrenKeys,vt=tt.flattenNodes,Ot=tt.indent,Zt=De.props,Ut=Zt.onDragEnter,gt=Zt.onExpand,Qt=Zt.allowDrop,Lt=Zt.direction,qt=Re.pos,un=Re.eventKey;if(De.currentMouseOverDroppableNodeKey!==un&&(De.currentMouseOverDroppableNodeKey=un),!De.dragNodeProps){De.resetDragState();return}var Sn=(0,Mt.OM)(Me,De.dragNodeProps,Re,Ot,De.dragStartMousePosition,Qt,vt,Pt,lt,Lt),Jt=Sn.dropPosition,Ln=Sn.dropLevelOffset,Zn=Sn.dropTargetKey,Gn=Sn.dropContainerKey,Jn=Sn.dropTargetPos,hr=Sn.dropAllowed,ur=Sn.dragOverNodeKey;if(Ct.includes(Zn)||!hr){De.resetDragState();return}if(De.delayedDragEnterLogic||(De.delayedDragEnterLogic={}),Object.keys(De.delayedDragEnterLogic).forEach(function(jn){clearTimeout(De.delayedDragEnterLogic[jn])}),De.dragNodeProps.eventKey!==Re.eventKey&&(Me.persist(),De.delayedDragEnterLogic[qt]=window.setTimeout(function(){if(De.state.draggingNodeKey!==null){var jn=(0,ue.Z)(lt),Nn=(0,yt.Z)(Pt,Re.eventKey);Nn&&(Nn.children||[]).length&&(jn=(0,Mt.L0)(lt,Re.eventKey)),De.props.hasOwnProperty("expandedKeys")||De.setExpandedKeys(jn),gt==null||gt(jn,{node:(0,Pe.F)(Re),expanded:!0,nativeEvent:Me.nativeEvent})}},800)),De.dragNodeProps.eventKey===Zn&&Ln===0){De.resetDragState();return}De.setState({dragOverNodeKey:ur,dropPosition:Jt,dropLevelOffset:Ln,dropTargetKey:Zn,dropContainerKey:Gn,dropTargetPos:Jn,dropAllowed:hr}),Ut==null||Ut({event:Me,node:(0,Pe.F)(Re),expandedKeys:lt})}),(0,E.Z)((0,le.Z)(De),"onNodeDragOver",function(Me,Re){var tt=De.state,lt=tt.dragChildrenKeys,Pt=tt.flattenNodes,Ct=tt.keyEntities,vt=tt.expandedKeys,Ot=tt.indent,Zt=De.props,Ut=Zt.onDragOver,gt=Zt.allowDrop,Qt=Zt.direction;if(De.dragNodeProps){var Lt=(0,Mt.OM)(Me,De.dragNodeProps,Re,Ot,De.dragStartMousePosition,gt,Pt,Ct,vt,Qt),qt=Lt.dropPosition,un=Lt.dropLevelOffset,Sn=Lt.dropTargetKey,Jt=Lt.dropContainerKey,Ln=Lt.dropTargetPos,Zn=Lt.dropAllowed,Gn=Lt.dragOverNodeKey;lt.includes(Sn)||!Zn||(De.dragNodeProps.eventKey===Sn&&un===0?De.state.dropPosition===null&&De.state.dropLevelOffset===null&&De.state.dropTargetKey===null&&De.state.dropContainerKey===null&&De.state.dropTargetPos===null&&De.state.dropAllowed===!1&&De.state.dragOverNodeKey===null||De.resetDragState():qt===De.state.dropPosition&&un===De.state.dropLevelOffset&&Sn===De.state.dropTargetKey&&Jt===De.state.dropContainerKey&&Ln===De.state.dropTargetPos&&Zn===De.state.dropAllowed&&Gn===De.state.dragOverNodeKey||De.setState({dropPosition:qt,dropLevelOffset:un,dropTargetKey:Sn,dropContainerKey:Jt,dropTargetPos:Ln,dropAllowed:Zn,dragOverNodeKey:Gn}),Ut==null||Ut({event:Me,node:(0,Pe.F)(Re)}))}}),(0,E.Z)((0,le.Z)(De),"onNodeDragLeave",function(Me,Re){De.currentMouseOverDroppableNodeKey===Re.eventKey&&!Me.currentTarget.contains(Me.relatedTarget)&&(De.resetDragState(),De.currentMouseOverDroppableNodeKey=null);var tt=De.props.onDragLeave;tt==null||tt({event:Me,node:(0,Pe.F)(Re)})}),(0,E.Z)((0,le.Z)(De),"onWindowDragEnd",function(Me){De.onNodeDragEnd(Me,null,!0),window.removeEventListener("dragend",De.onWindowDragEnd)}),(0,E.Z)((0,le.Z)(De),"onNodeDragEnd",function(Me,Re){var tt=De.props.onDragEnd;De.setState({dragOverNodeKey:null}),De.cleanDragState(),tt==null||tt({event:Me,node:(0,Pe.F)(Re)}),De.dragNodeProps=null,window.removeEventListener("dragend",De.onWindowDragEnd)}),(0,E.Z)((0,le.Z)(De),"onNodeDrop",function(Me,Re){var tt,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pt=De.state,Ct=Pt.dragChildrenKeys,vt=Pt.dropPosition,Ot=Pt.dropTargetKey,Zt=Pt.dropTargetPos,Ut=Pt.dropAllowed;if(Ut){var gt=De.props.onDrop;if(De.setState({dragOverNodeKey:null}),De.cleanDragState(),Ot!==null){var Qt=(0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(Ot,De.getTreeNodeRequiredProps())),{},{active:((tt=De.getActiveItem())===null||tt===void 0?void 0:tt.key)===Ot,data:(0,yt.Z)(De.state.keyEntities,Ot).node}),Lt=Ct.includes(Ot);(0,ae.ZP)(!Lt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var qt=(0,Mt.yx)(Zt),un={event:Me,node:(0,Pe.F)(Qt),dragNode:De.dragNodeProps?(0,Pe.F)(De.dragNodeProps):null,dragNodesKeys:[De.dragNodeProps.eventKey].concat(Ct),dropToGap:vt!==0,dropPosition:vt+Number(qt[qt.length-1])};lt||gt==null||gt(un),De.dragNodeProps=null}}}),(0,E.Z)((0,le.Z)(De),"cleanDragState",function(){var Me=De.state.draggingNodeKey;Me!==null&&De.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),De.dragStartMousePosition=null,De.currentMouseOverDroppableNodeKey=null}),(0,E.Z)((0,le.Z)(De),"triggerExpandActionExpand",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.flattenNodes,Ct=Re.expanded,vt=Re.key,Ot=Re.isLeaf;if(!(Ot||Me.shiftKey||Me.metaKey||Me.ctrlKey)){var Zt=Pt.filter(function(gt){return gt.key===vt})[0],Ut=(0,Pe.F)((0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(vt,De.getTreeNodeRequiredProps())),{},{data:Zt.data}));De.setExpandedKeys(Ct?(0,Mt._5)(lt,vt):(0,Mt.L0)(lt,vt)),De.onNodeExpand(Me,Ut)}}),(0,E.Z)((0,le.Z)(De),"onNodeClick",function(Me,Re){var tt=De.props,lt=tt.onClick,Pt=tt.expandAction;Pt==="click"&&De.triggerExpandActionExpand(Me,Re),lt==null||lt(Me,Re)}),(0,E.Z)((0,le.Z)(De),"onNodeDoubleClick",function(Me,Re){var tt=De.props,lt=tt.onDoubleClick,Pt=tt.expandAction;Pt==="doubleClick"&&De.triggerExpandActionExpand(Me,Re),lt==null||lt(Me,Re)}),(0,E.Z)((0,le.Z)(De),"onNodeSelect",function(Me,Re){var tt=De.state.selectedKeys,lt=De.state,Pt=lt.keyEntities,Ct=lt.fieldNames,vt=De.props,Ot=vt.onSelect,Zt=vt.multiple,Ut=Re.selected,gt=Re[Ct.key],Qt=!Ut;Qt?Zt?tt=(0,Mt.L0)(tt,gt):tt=[gt]:tt=(0,Mt._5)(tt,gt);var Lt=tt.map(function(qt){var un=(0,yt.Z)(Pt,qt);return un?un.node:null}).filter(Boolean);De.setUncontrolledState({selectedKeys:tt}),Ot==null||Ot(tt,{event:"select",selected:Qt,node:Re,selectedNodes:Lt,nativeEvent:Me.nativeEvent})}),(0,E.Z)((0,le.Z)(De),"onNodeCheck",function(Me,Re,tt){var lt=De.state,Pt=lt.keyEntities,Ct=lt.checkedKeys,vt=lt.halfCheckedKeys,Ot=De.props,Zt=Ot.checkStrictly,Ut=Ot.onCheck,gt=Re.key,Qt,Lt={event:"check",node:Re,checked:tt,nativeEvent:Me.nativeEvent};if(Zt){var qt=tt?(0,Mt.L0)(Ct,gt):(0,Mt._5)(Ct,gt),un=(0,Mt._5)(vt,gt);Qt={checked:qt,halfChecked:un},Lt.checkedNodes=qt.map(function(Jn){return(0,yt.Z)(Pt,Jn)}).filter(Boolean).map(function(Jn){return Jn.node}),De.setUncontrolledState({checkedKeys:qt})}else{var Sn=(0,xt.S)([].concat((0,ue.Z)(Ct),[gt]),!0,Pt),Jt=Sn.checkedKeys,Ln=Sn.halfCheckedKeys;if(!tt){var Zn=new Set(Jt);Zn.delete(gt);var Gn=(0,xt.S)(Array.from(Zn),{checked:!1,halfCheckedKeys:Ln},Pt);Jt=Gn.checkedKeys,Ln=Gn.halfCheckedKeys}Qt=Jt,Lt.checkedNodes=[],Lt.checkedNodesPositions=[],Lt.halfCheckedKeys=Ln,Jt.forEach(function(Jn){var hr=(0,yt.Z)(Pt,Jn);if(hr){var ur=hr.node,jn=hr.pos;Lt.checkedNodes.push(ur),Lt.checkedNodesPositions.push({node:ur,pos:jn})}}),De.setUncontrolledState({checkedKeys:Jt},!1,{halfCheckedKeys:Ln})}Ut==null||Ut(Qt,Lt)}),(0,E.Z)((0,le.Z)(De),"onNodeLoad",function(Me){var Re,tt=Me.key,lt=De.state.keyEntities,Pt=(0,yt.Z)(lt,tt);if(!(Pt!=null&&(Re=Pt.children)!==null&&Re!==void 0&&Re.length)){var Ct=new Promise(function(vt,Ot){De.setState(function(Zt){var Ut=Zt.loadedKeys,gt=Ut===void 0?[]:Ut,Qt=Zt.loadingKeys,Lt=Qt===void 0?[]:Qt,qt=De.props,un=qt.loadData,Sn=qt.onLoad;if(!un||gt.includes(tt)||Lt.includes(tt))return null;var Jt=un(Me);return Jt.then(function(){var Ln=De.state.loadedKeys,Zn=(0,Mt.L0)(Ln,tt);Sn==null||Sn(Zn,{event:"load",node:Me}),De.setUncontrolledState({loadedKeys:Zn}),De.setState(function(Gn){return{loadingKeys:(0,Mt._5)(Gn.loadingKeys,tt)}}),vt()}).catch(function(Ln){if(De.setState(function(Gn){return{loadingKeys:(0,Mt._5)(Gn.loadingKeys,tt)}}),De.loadingRetryTimes[tt]=(De.loadingRetryTimes[tt]||0)+1,De.loadingRetryTimes[tt]>=bt){var Zn=De.state.loadedKeys;(0,ae.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),De.setUncontrolledState({loadedKeys:(0,Mt.L0)(Zn,tt)}),vt()}Ot(Ln)}),{loadingKeys:(0,Mt.L0)(Lt,tt)}})});return Ct.catch(function(){}),Ct}}),(0,E.Z)((0,le.Z)(De),"onNodeMouseEnter",function(Me,Re){var tt=De.props.onMouseEnter;tt==null||tt({event:Me,node:Re})}),(0,E.Z)((0,le.Z)(De),"onNodeMouseLeave",function(Me,Re){var tt=De.props.onMouseLeave;tt==null||tt({event:Me,node:Re})}),(0,E.Z)((0,le.Z)(De),"onNodeContextMenu",function(Me,Re){var tt=De.props.onRightClick;tt&&(Me.preventDefault(),tt({event:Me,node:Re}))}),(0,E.Z)((0,le.Z)(De),"onFocus",function(){var Me=De.props.onFocus;De.setState({focused:!0});for(var Re=arguments.length,tt=new Array(Re),lt=0;lt<Re;lt++)tt[lt]=arguments[lt];Me==null||Me.apply(void 0,tt)}),(0,E.Z)((0,le.Z)(De),"onBlur",function(){var Me=De.props.onBlur;De.setState({focused:!1}),De.onActiveChange(null);for(var Re=arguments.length,tt=new Array(Re),lt=0;lt<Re;lt++)tt[lt]=arguments[lt];Me==null||Me.apply(void 0,tt)}),(0,E.Z)((0,le.Z)(De),"getTreeNodeRequiredProps",function(){var Me=De.state,Re=Me.expandedKeys,tt=Me.selectedKeys,lt=Me.loadedKeys,Pt=Me.loadingKeys,Ct=Me.checkedKeys,vt=Me.halfCheckedKeys,Ot=Me.dragOverNodeKey,Zt=Me.dropPosition,Ut=Me.keyEntities;return{expandedKeys:Re||[],selectedKeys:tt||[],loadedKeys:lt||[],loadingKeys:Pt||[],checkedKeys:Ct||[],halfCheckedKeys:vt||[],dragOverNodeKey:Ot,dropPosition:Zt,keyEntities:Ut}}),(0,E.Z)((0,le.Z)(De),"setExpandedKeys",function(Me){var Re=De.state,tt=Re.treeData,lt=Re.fieldNames,Pt=(0,Pe.oH)(tt,Me,lt);De.setUncontrolledState({expandedKeys:Me,flattenNodes:Pt},!0)}),(0,E.Z)((0,le.Z)(De),"onNodeExpand",function(Me,Re){var tt=De.state.expandedKeys,lt=De.state,Pt=lt.listChanging,Ct=lt.fieldNames,vt=De.props,Ot=vt.onExpand,Zt=vt.loadData,Ut=Re.expanded,gt=Re[Ct.key];if(!Pt){var Qt=tt.includes(gt),Lt=!Ut;if((0,ae.ZP)(Ut&&Qt||!Ut&&!Qt,"Expand state not sync with index check"),tt=Lt?(0,Mt.L0)(tt,gt):(0,Mt._5)(tt,gt),De.setExpandedKeys(tt),Ot==null||Ot(tt,{node:Re,expanded:Lt,nativeEvent:Me.nativeEvent}),Lt&&Zt){var qt=De.onNodeLoad(Re);qt&&qt.then(function(){var un=(0,Pe.oH)(De.state.treeData,tt,Ct);De.setUncontrolledState({flattenNodes:un})}).catch(function(){var un=De.state.expandedKeys,Sn=(0,Mt._5)(un,gt);De.setExpandedKeys(Sn)})}}}),(0,E.Z)((0,le.Z)(De),"onListChangeStart",function(){De.setUncontrolledState({listChanging:!0})}),(0,E.Z)((0,le.Z)(De),"onListChangeEnd",function(){setTimeout(function(){De.setUncontrolledState({listChanging:!1})})}),(0,E.Z)((0,le.Z)(De),"onActiveChange",function(Me){var Re=De.state.activeKey,tt=De.props,lt=tt.onActiveChange,Pt=tt.itemScrollOffset,Ct=Pt===void 0?0:Pt;Re!==Me&&(De.setState({activeKey:Me}),Me!==null&&De.scrollTo({key:Me,offset:Ct}),lt==null||lt(Me))}),(0,E.Z)((0,le.Z)(De),"getActiveItem",function(){var Me=De.state,Re=Me.activeKey,tt=Me.flattenNodes;return Re===null?null:tt.find(function(lt){var Pt=lt.key;return Pt===Re})||null}),(0,E.Z)((0,le.Z)(De),"offsetActiveKey",function(Me){var Re=De.state,tt=Re.flattenNodes,lt=Re.activeKey,Pt=tt.findIndex(function(Ot){var Zt=Ot.key;return Zt===lt});Pt===-1&&Me<0&&(Pt=tt.length),Pt=(Pt+Me+tt.length)%tt.length;var Ct=tt[Pt];if(Ct){var vt=Ct.key;De.onActiveChange(vt)}else De.onActiveChange(null)}),(0,E.Z)((0,le.Z)(De),"onKeyDown",function(Me){var Re=De.state,tt=Re.activeKey,lt=Re.expandedKeys,Pt=Re.checkedKeys,Ct=Re.fieldNames,vt=De.props,Ot=vt.onKeyDown,Zt=vt.checkable,Ut=vt.selectable;switch(Me.which){case x.Z.UP:{De.offsetActiveKey(-1),Me.preventDefault();break}case x.Z.DOWN:{De.offsetActiveKey(1),Me.preventDefault();break}}var gt=De.getActiveItem();if(gt&&gt.data){var Qt=De.getTreeNodeRequiredProps(),Lt=gt.data.isLeaf===!1||!!(gt.data[Ct.children]||[]).length,qt=(0,Pe.F)((0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(tt,Qt)),{},{data:gt.data,active:!0}));switch(Me.which){case x.Z.LEFT:{Lt&&lt.includes(tt)?De.onNodeExpand({},qt):gt.parent&&De.onActiveChange(gt.parent.key),Me.preventDefault();break}case x.Z.RIGHT:{Lt&&!lt.includes(tt)?De.onNodeExpand({},qt):gt.children&&gt.children.length&&De.onActiveChange(gt.children[0].key),Me.preventDefault();break}case x.Z.ENTER:case x.Z.SPACE:{Zt&&!qt.disabled&&qt.checkable!==!1&&!qt.disableCheckbox?De.onNodeCheck({},qt,!Pt.includes(tt)):!Zt&&Ut&&!qt.disabled&&qt.selectable!==!1&&De.onNodeSelect({},qt);break}}}Ot==null||Ot(Me)}),(0,E.Z)((0,le.Z)(De),"setUncontrolledState",function(Me){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!De.destroyed){var lt=!1,Pt=!0,Ct={};Object.keys(Me).forEach(function(vt){if(De.props.hasOwnProperty(vt)){Pt=!1;return}lt=!0,Ct[vt]=Me[vt]}),lt&&(!Re||Pt)&&De.setState((0,Ce.Z)((0,Ce.Z)({},Ct),tt))}}),(0,E.Z)((0,le.Z)(De),"scrollTo",function(Me){De.listRef.current.scrollTo(Me)}),De}return(0,te.Z)(Ne,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var we=this.props,Le=we.activeKey,Ue=we.itemScrollOffset,Me=Ue===void 0?0:Ue;Le!==void 0&&Le!==this.state.activeKey&&(this.setState({activeKey:Le}),Le!==null&&this.scrollTo({key:Le,offset:Me}))}},{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 we=this.state,Le=we.focused,Ue=we.flattenNodes,Me=we.keyEntities,Re=we.draggingNodeKey,tt=we.activeKey,lt=we.dropLevelOffset,Pt=we.dropContainerKey,Ct=we.dropTargetKey,vt=we.dropPosition,Ot=we.dragOverNodeKey,Zt=we.indent,Ut=this.props,gt=Ut.prefixCls,Qt=Ut.className,Lt=Ut.style,qt=Ut.showLine,un=Ut.focusable,Sn=Ut.tabIndex,Jt=Sn===void 0?0:Sn,Ln=Ut.selectable,Zn=Ut.showIcon,Gn=Ut.icon,Jn=Ut.switcherIcon,hr=Ut.draggable,ur=Ut.checkable,jn=Ut.checkStrictly,Nn=Ut.disabled,rr=Ut.motion,Kn=Ut.loadData,In=Ut.filterTreeNode,gn=Ut.height,pn=Ut.itemHeight,Dn=Ut.scrollWidth,Rn=Ut.virtual,Un=Ut.titleRender,Mr=Ut.dropIndicatorRender,an=Ut.onContextMenu,Ie=Ut.onScroll,Ze=Ut.direction,qe=Ut.rootClassName,st=Ut.rootStyle,mt=(0,re.Z)(this.props,{aria:!0,data:!0}),Bt;hr&&((0,ie.Z)(hr)==="object"?Bt=hr:typeof hr=="function"?Bt={nodeDraggable:hr}:Bt={});var kt={prefixCls:gt,selectable:Ln,showIcon:Zn,icon:Gn,switcherIcon:Jn,draggable:Bt,draggingNodeKey:Re,checkable:ur,checkStrictly:jn,disabled:Nn,keyEntities:Me,dropLevelOffset:lt,dropContainerKey:Pt,dropTargetKey:Ct,dropPosition:vt,dragOverNodeKey:Ot,indent:Zt,direction:Ze,dropIndicatorRender:Mr,loadData:Kn,filterTreeNode:In,titleRender:Un,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(ve.k.Provider,{value:kt},oe.createElement("div",{className:z()(gt,Qt,qe,(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(gt,"-show-line"),qt),"".concat(gt,"-focused"),Le),"".concat(gt,"-active-focused"),tt!==null)),style:st},oe.createElement(dt,(0,ce.Z)({ref:this.listRef,prefixCls:gt,style:Lt,data:Ue,disabled:Nn,selectable:Ln,checkable:!!ur,motion:rr,dragging:Re!==null,height:gn,itemHeight:pn,virtual:Rn,focusable:un,focused:Le,tabIndex:Jt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:an,onScroll:Ie,scrollWidth:Dn},this.getTreeNodeRequiredProps(),mt))))}}],[{key:"getDerivedStateFromProps",value:function(we,Le){var Ue=Le.prevProps,Me={prevProps:we};function Re(Jt){return!Ue&&we.hasOwnProperty(Jt)||Ue&&Ue[Jt]!==we[Jt]}var tt,lt=Le.fieldNames;if(Re("fieldNames")&&(lt=(0,Pe.w$)(we.fieldNames),Me.fieldNames=lt),Re("treeData")?tt=we.treeData:Re("children")&&((0,ae.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),tt=(0,Pe.zn)(we.children)),tt){Me.treeData=tt;var Pt=(0,Pe.I8)(tt,{fieldNames:lt});Me.keyEntities=(0,Ce.Z)((0,E.Z)({},ze,$e),Pt.keyEntities)}var Ct=Me.keyEntities||Le.keyEntities;if(Re("expandedKeys")||Ue&&Re("autoExpandParent"))Me.expandedKeys=we.autoExpandParent||!Ue&&we.defaultExpandParent?(0,Mt.r7)(we.expandedKeys,Ct):we.expandedKeys;else if(!Ue&&we.defaultExpandAll){var vt=(0,Ce.Z)({},Ct);delete vt[ze];var Ot=[];Object.keys(vt).forEach(function(Jt){var Ln=vt[Jt];Ln.children&&Ln.children.length&&Ot.push(Ln.key)}),Me.expandedKeys=Ot}else!Ue&&we.defaultExpandedKeys&&(Me.expandedKeys=we.autoExpandParent||we.defaultExpandParent?(0,Mt.r7)(we.defaultExpandedKeys,Ct):we.defaultExpandedKeys);if(Me.expandedKeys||delete Me.expandedKeys,tt||Me.expandedKeys){var Zt=(0,Pe.oH)(tt||Le.treeData,Me.expandedKeys||Le.expandedKeys,lt);Me.flattenNodes=Zt}if(we.selectable&&(Re("selectedKeys")?Me.selectedKeys=(0,Mt.BT)(we.selectedKeys,we):!Ue&&we.defaultSelectedKeys&&(Me.selectedKeys=(0,Mt.BT)(we.defaultSelectedKeys,we))),we.checkable){var Ut;if(Re("checkedKeys")?Ut=(0,Mt.E6)(we.checkedKeys)||{}:!Ue&&we.defaultCheckedKeys?Ut=(0,Mt.E6)(we.defaultCheckedKeys)||{}:tt&&(Ut=(0,Mt.E6)(we.checkedKeys)||{checkedKeys:Le.checkedKeys,halfCheckedKeys:Le.halfCheckedKeys}),Ut){var gt=Ut,Qt=gt.checkedKeys,Lt=Qt===void 0?[]:Qt,qt=gt.halfCheckedKeys,un=qt===void 0?[]:qt;if(!we.checkStrictly){var Sn=(0,xt.S)(Lt,!0,Ct);Lt=Sn.checkedKeys,un=Sn.halfCheckedKeys}Me.checkedKeys=Lt,Me.halfCheckedKeys=un}}return Re("loadedKeys")&&(Me.loadedKeys=we.loadedKeys),Me}}]),Ne}(oe.Component);(0,E.Z)(He,"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:me,allowDrop:function(){return!0},expandAction:!1}),(0,E.Z)(He,"TreeNode",Ee.Z);var Ae=He,be=Ae},82661:function($t,Dt,Se){"use strict";Se.d(Dt,{BT:function(){return oe},E6:function(){return me},L0:function(){return E},OM:function(){return ae},_5:function(){return ne},r7:function(){return ge},wA:function(){return z},yx:function(){return b}});var ce=Se(15142),ie=Se(26420),Ce=Se(48736),ue=Se(59301),se=Se(639),te=Se(65065),le=Se(34061),ee=null;function ne(_e,he){if(!_e)return[];var pe=_e.slice(),ke=pe.indexOf(he);return ke>=0&&pe.splice(ke,1),pe}function E(_e,he){var pe=(_e||[]).slice();return pe.indexOf(he)===-1&&pe.push(he),pe}function b(_e){return _e.split("-")}function z(_e,he){var pe=[],ke=(0,te.Z)(he,_e);function Te(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ee.forEach(function(Oe){var je=Oe.key,Pe=Oe.children;pe.push(je),Te(Pe)})}return Te(ke.children),pe}function x(_e){if(_e.parent){var he=b(_e.pos);return Number(he[he.length-1])===_e.parent.children.length-1}return!1}function re(_e){var he=b(_e.pos);return Number(he[he.length-1])===0}function ae(_e,he,pe,ke,Te,Ee,Oe,je,Pe,Qe){var Xe,ot=_e.clientX,We=_e.clientY,rt=_e.target.getBoundingClientRect(),Ye=rt.top,ut=rt.height,Ge=(Qe==="rtl"?-1:1)*(((Te==null?void 0:Te.x)||0)-ot),ze=(Ge-12)/ke,Ve=Pe.filter(function(be){var Be;return(Be=je[be])===null||Be===void 0||(Be=Be.children)===null||Be===void 0?void 0:Be.length}),$e=(0,te.Z)(je,pe.eventKey);if(We<Ye+ut/2){var nt=Oe.findIndex(function(be){return be.key===$e.key}),et=nt<=0?0:nt-1,pt=Oe[et].key;$e=(0,te.Z)(je,pt)}var ct=$e.key,Rt=$e,dt=$e.key,Mt=0,xt=0;if(!Ve.includes(ct))for(var yt=0;yt<ze&&x($e);yt+=1)$e=$e.parent,xt+=1;var bt=he.data,He=$e.node,Ae=!0;return re($e)&&$e.level===0&&We<Ye+ut/2&&Ee({dragNode:bt,dropNode:He,dropPosition:-1})&&$e.key===pe.eventKey?Mt=-1:(Rt.children||[]).length&&Ve.includes(dt)?Ee({dragNode:bt,dropNode:He,dropPosition:0})?Mt=0:Ae=!1:xt===0?ze>-1.5?Ee({dragNode:bt,dropNode:He,dropPosition:1})?Mt=1:Ae=!1:Ee({dragNode:bt,dropNode:He,dropPosition:0})?Mt=0:Ee({dragNode:bt,dropNode:He,dropPosition:1})?Mt=1:Ae=!1:Ee({dragNode:bt,dropNode:He,dropPosition:1})?Mt=1:Ae=!1,{dropPosition:Mt,dropLevelOffset:xt,dropTargetKey:$e.key,dropTargetPos:$e.pos,dragOverNodeKey:dt,dropContainerKey:Mt===0?null:((Xe=$e.parent)===null||Xe===void 0?void 0:Xe.key)||null,dropAllowed:Ae}}function oe(_e,he){if(_e){var pe=he.multiple;return pe?_e.slice():_e.length?[_e[0]]:_e}}var ve=function(he){return he};function ye(_e,he){if(!_e)return[];var pe=he||{},ke=pe.processProps,Te=ke===void 0?ve:ke,Ee=Array.isArray(_e)?_e:[_e];return Ee.map(function(Oe){var je=Oe.children,Pe=_objectWithoutProperties(Oe,ee),Qe=ye(je,he);return React.createElement(TreeNode,_extends({key:Pe.key},Te(Pe)),Qe)})}function me(_e){if(!_e)return null;var he;if(Array.isArray(_e))he={checkedKeys:_e,halfCheckedKeys:void 0};else if((0,ie.Z)(_e)==="object")he={checkedKeys:_e.checked||void 0,halfCheckedKeys:_e.halfChecked||void 0};else return(0,Ce.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return he}function ge(_e,he){var pe=new Set;function ke(Te){if(!pe.has(Te)){var Ee=(0,te.Z)(he,Te);if(Ee){pe.add(Te);var Oe=Ee.parent,je=Ee.node;je.disabled||Oe&&ke(Oe.key)}}}return(_e||[]).forEach(function(Te){ke(Te)}),(0,ce.Z)(pe)}},34643:function($t,Dt,Se){"use strict";Se.d(Dt,{S:function(){return le}});var ce=Se(48736),ie=Se(65065);function Ce(ee,ne){var E=new Set;return ee.forEach(function(b){ne.has(b)||E.add(b)}),E}function ue(ee){var ne=ee||{},E=ne.disabled,b=ne.disableCheckbox,z=ne.checkable;return!!(E||b)||z===!1}function se(ee,ne,E,b){for(var z=new Set(ee),x=new Set,re=0;re<=E;re+=1){var ae=ne.get(re)||new Set;ae.forEach(function(me){var ge=me.key,_e=me.node,he=me.children,pe=he===void 0?[]:he;z.has(ge)&&!b(_e)&&pe.filter(function(ke){return!b(ke.node)}).forEach(function(ke){z.add(ke.key)})})}for(var oe=new Set,ve=E;ve>=0;ve-=1){var ye=ne.get(ve)||new Set;ye.forEach(function(me){var ge=me.parent,_e=me.node;if(!(b(_e)||!me.parent||oe.has(me.parent.key))){if(b(me.parent.node)){oe.add(ge.key);return}var he=!0,pe=!1;(ge.children||[]).filter(function(ke){return!b(ke.node)}).forEach(function(ke){var Te=ke.key,Ee=z.has(Te);he&&!Ee&&(he=!1),!pe&&(Ee||x.has(Te))&&(pe=!0)}),he&&z.add(ge.key),pe&&x.add(ge.key),oe.add(ge.key)}})}return{checkedKeys:Array.from(z),halfCheckedKeys:Array.from(Ce(x,z))}}function te(ee,ne,E,b,z){for(var x=new Set(ee),re=new Set(ne),ae=0;ae<=b;ae+=1){var oe=E.get(ae)||new Set;oe.forEach(function(ge){var _e=ge.key,he=ge.node,pe=ge.children,ke=pe===void 0?[]:pe;!x.has(_e)&&!re.has(_e)&&!z(he)&&ke.filter(function(Te){return!z(Te.node)}).forEach(function(Te){x.delete(Te.key)})})}re=new Set;for(var ve=new Set,ye=b;ye>=0;ye-=1){var me=E.get(ye)||new Set;me.forEach(function(ge){var _e=ge.parent,he=ge.node;if(!(z(he)||!ge.parent||ve.has(ge.parent.key))){if(z(ge.parent.node)){ve.add(_e.key);return}var pe=!0,ke=!1;(_e.children||[]).filter(function(Te){return!z(Te.node)}).forEach(function(Te){var Ee=Te.key,Oe=x.has(Ee);pe&&!Oe&&(pe=!1),!ke&&(Oe||re.has(Ee))&&(ke=!0)}),pe||x.delete(_e.key),ke&&re.add(_e.key),ve.add(_e.key)}})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(Ce(re,x))}}function le(ee,ne,E,b){var z=[],x;b?x=b:x=ue;var re=new Set(ee.filter(function(ye){var me=!!(0,ie.Z)(E,ye);return me||z.push(ye),me})),ae=new Map,oe=0;Object.keys(E).forEach(function(ye){var me=E[ye],ge=me.level,_e=ae.get(ge);_e||(_e=new Set,ae.set(ge,_e)),_e.add(me),oe=Math.max(oe,ge)}),(0,ce.ZP)(!z.length,"Tree missing follow keys: ".concat(z.slice(0,100).map(function(ye){return"'".concat(ye,"'")}).join(", ")));var ve;return ne===!0?ve=se(re,ae,oe,x):ve=te(re,ne.halfCheckedKeys,ae,oe,x),ve}},65065:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ce}});function ce(ie,Ce){return ie[Ce]}},34061:function($t,Dt,Se){"use strict";Se.d(Dt,{F:function(){return ge},H8:function(){return me},I8:function(){return ye},km:function(){return z},oH:function(){return oe},w$:function(){return x},zn:function(){return ae}});var ce=Se(26420),ie=Se(15142),Ce=Se(98506),ue=Se(33346),se=Se(11592),te=Se(2738),le=Se(48736),ee=Se(65065),ne=["children"];function E(_e,he){return"".concat(_e,"-").concat(he)}function b(_e){return _e&&_e.type&&_e.type.isTreeNode}function z(_e,he){return _e!=null?_e:he}function x(_e){var he=_e||{},pe=he.title,ke=he._title,Te=he.key,Ee=he.children,Oe=pe||"title";return{title:Oe,_title:ke||[Oe],key:Te||"key",children:Ee||"children"}}function re(_e,he){var pe=new Map;function ke(Te){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Te||[]).forEach(function(Oe){var je=Oe[he.key],Pe=Oe[he.children];warning(je!=null,"Tree node must have a certain key: [".concat(Ee).concat(je,"]"));var Qe=String(je);warning(!pe.has(Qe)||je===null||je===void 0,"Same 'key' exist in the Tree: ".concat(Qe)),pe.set(Qe,!0),ke(Pe,"".concat(Ee).concat(Qe," > "))})}ke(_e)}function ae(_e){function he(pe){var ke=(0,se.Z)(pe);return ke.map(function(Te){if(!b(Te))return(0,le.ZP)(!Te,"Tree/TreeNode can only accept TreeNode as children."),null;var Ee=Te.key,Oe=Te.props,je=Oe.children,Pe=(0,ue.Z)(Oe,ne),Qe=(0,Ce.Z)({key:Ee},Pe),Xe=he(je);return Xe.length&&(Qe.children=Xe),Qe}).filter(function(Te){return Te})}return he(_e)}function oe(_e,he,pe){var ke=x(pe),Te=ke._title,Ee=ke.key,Oe=ke.children,je=new Set(he===!0?[]:he),Pe=[];function Qe(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Xe.map(function(We,rt){for(var Ye=E(ot?ot.pos:"0",rt),ut=z(We[Ee],Ye),Ge,ze=0;ze<Te.length;ze+=1){var Ve=Te[ze];if(We[Ve]!==void 0){Ge=We[Ve];break}}var $e=Object.assign((0,te.Z)(We,[].concat((0,ie.Z)(Te),[Ee,Oe])),{title:Ge,key:ut,parent:ot,pos:Ye,children:null,data:We,isStart:[].concat((0,ie.Z)(ot?ot.isStart:[]),[rt===0]),isEnd:[].concat((0,ie.Z)(ot?ot.isEnd:[]),[rt===Xe.length-1])});return Pe.push($e),he===!0||je.has(ut)?$e.children=Qe(We[Oe]||[],$e):$e.children=[],$e})}return Qe(_e),Pe}function ve(_e,he,pe){var ke={};(0,ce.Z)(pe)==="object"?ke=pe:ke={externalGetKey:pe},ke=ke||{};var Te=ke,Ee=Te.childrenPropName,Oe=Te.externalGetKey,je=Te.fieldNames,Pe=x(je),Qe=Pe.key,Xe=Pe.children,ot=Ee||Xe,We;Oe?typeof Oe=="string"?We=function(ut){return ut[Oe]}:typeof Oe=="function"&&(We=function(ut){return Oe(ut)}):We=function(ut,Ge){return z(ut[Qe],Ge)};function rt(Ye,ut,Ge,ze){var Ve=Ye?Ye[ot]:_e,$e=Ye?E(Ge.pos,ut):"0",nt=Ye?[].concat((0,ie.Z)(ze),[Ye]):[];if(Ye){var et=We(Ye,$e),pt={node:Ye,index:ut,pos:$e,key:et,parentPos:Ge.node?Ge.pos:null,level:Ge.level+1,nodes:nt};he(pt)}Ve&&Ve.forEach(function(ct,Rt){rt(ct,Rt,{node:Ye,pos:$e,level:Ge?Ge.level+1:-1},nt)})}rt(null)}function ye(_e){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=he.initWrapper,ke=he.processEntity,Te=he.onProcessFinished,Ee=he.externalGetKey,Oe=he.childrenPropName,je=he.fieldNames,Pe=arguments.length>2?arguments[2]:void 0,Qe=Ee||Pe,Xe={},ot={},We={posEntities:Xe,keyEntities:ot};return pe&&(We=pe(We)||We),ve(_e,function(rt){var Ye=rt.node,ut=rt.index,Ge=rt.pos,ze=rt.key,Ve=rt.parentPos,$e=rt.level,nt=rt.nodes,et={node:Ye,nodes:nt,index:ut,key:ze,pos:Ge,level:$e},pt=z(ze,Ge);Xe[Ge]=et,ot[pt]=et,et.parent=Xe[Ve],et.parent&&(et.parent.children=et.parent.children||[],et.parent.children.push(et)),ke&&ke(et,We)},{externalGetKey:Qe,childrenPropName:Oe,fieldNames:je}),Te&&Te(We),We}function me(_e,he){var pe=he.expandedKeys,ke=he.selectedKeys,Te=he.loadedKeys,Ee=he.loadingKeys,Oe=he.checkedKeys,je=he.halfCheckedKeys,Pe=he.dragOverNodeKey,Qe=he.dropPosition,Xe=he.keyEntities,ot=(0,ee.Z)(Xe,_e),We={eventKey:_e,expanded:pe.indexOf(_e)!==-1,selected:ke.indexOf(_e)!==-1,loaded:Te.indexOf(_e)!==-1,loading:Ee.indexOf(_e)!==-1,checked:Oe.indexOf(_e)!==-1,halfChecked:je.indexOf(_e)!==-1,pos:String(ot?ot.pos:""),dragOver:Pe===_e&&Qe===0,dragOverGapTop:Pe===_e&&Qe===-1,dragOverGapBottom:Pe===_e&&Qe===1};return We}function ge(_e){var he=_e.data,pe=_e.expanded,ke=_e.selected,Te=_e.checked,Ee=_e.loaded,Oe=_e.loading,je=_e.halfChecked,Pe=_e.dragOver,Qe=_e.dragOverGapTop,Xe=_e.dragOverGapBottom,ot=_e.pos,We=_e.active,rt=_e.eventKey,Ye=(0,Ce.Z)((0,Ce.Z)({},he),{},{expanded:pe,selected:ke,checked:Te,loaded:Ee,loading:Oe,halfChecked:je,dragOver:Pe,dragOverGapTop:Qe,dragOverGapBottom:Xe,pos:ot,active:We,key:rt});return"props"in Ye||Object.defineProperty(Ye,"props",{get:function(){return(0,le.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),_e}}),Ye}},8224:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ie}});var ce=Se(4676);function ie(Ce,ue,se,te){var le=ce.unstable_batchedUpdates?function(ne){ce.unstable_batchedUpdates(se,ne)}:se;return Ce!=null&&Ce.addEventListener&&Ce.addEventListener(ue,le,te),{remove:function(){Ce!=null&&Ce.removeEventListener&&Ce.removeEventListener(ue,le,te)}}}},24514:function($t,Dt,Se){"use strict";Se.d(Dt,{G:function(){return ue}});var ce=Se(47273),ie=function(te){if((0,ce.Z)()&&window.document.documentElement){var le=Array.isArray(te)?te:[te],ee=window.document.documentElement;return le.some(function(ne){return ne in ee.style})}return!1},Ce=function(te,le){if(!ie(te))return!1;var ee=document.createElement("div"),ne=ee.style[te];return ee.style[te]=le,ee.style[te]!==ne};function ue(se,te){return!Array.isArray(se)&&te!==void 0?Ce(se,te):ie(se)}},6790:function($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return bt}});var ce=Se(67711),ie=Se(26420),Ce=Se(98506),ue=Se(52873),se=Se(16886),te=Se(33346),le=Se(92310),ee=Se.n(le),ne=Se(29301),E=Se(70425),b=Se(34280),z=Se(59301),x=Se(4676),re=z.forwardRef(function(He,Ae){var be=He.height,Be=He.offsetY,Ke=He.offsetX,Ne=He.children,De=He.prefixCls,we=He.onInnerResize,Le=He.innerProps,Ue=He.rtl,Me=He.extra,Re={},tt={display:"flex",flexDirection:"column"};return Be!==void 0&&(Re={height:be,position:"relative",overflow:"hidden"},tt=(0,Ce.Z)((0,Ce.Z)({},tt),{},(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({transform:"translateY(".concat(Be,"px)")},Ue?"marginRight":"marginLeft",-Ke),"position","absolute"),"left",0),"right",0),"top",0))),z.createElement("div",{style:Re},z.createElement(ne.Z,{onResize:function(Pt){var Ct=Pt.offsetHeight;Ct&&we&&we()}},z.createElement("div",(0,ce.Z)({style:tt,className:ee()((0,ue.Z)({},"".concat(De,"-holder-inner"),De)),ref:Ae},Le),Ne,Me)))});re.displayName="Filler";var ae=re;function oe(He){var Ae=He.children,be=He.setRef,Be=z.useCallback(function(Ke){be(Ke)},[]);return z.cloneElement(Ae,{ref:Be})}function ve(He,Ae,be,Be,Ke,Ne,De,we){var Le=we.getKey;return He.slice(Ae,be+1).map(function(Ue,Me){var Re=Ae+Me,tt=De(Ue,Re,{style:{width:Be},offsetX:Ke}),lt=Le(Ue);return z.createElement(oe,{key:lt,setRef:function(Ct){return Ne(Ue,Ct)}},tt)})}function ye(He,Ae,be,Be){var Ke=be-He,Ne=Ae-be,De=Math.min(Ke,Ne)*2;if(Be<=De){var we=Math.floor(Be/2);return Be%2?be+we+1:be-we}return Ke>Ne?be-(Be-Ne):be+(Be-Ke)}function me(He,Ae,be){var Be=He.length,Ke=Ae.length,Ne,De;if(Be===0&&Ke===0)return null;Be<Ke?(Ne=He,De=Ae):(Ne=Ae,De=He);var we={__EMPTY_ITEM__:!0};function Le(Pt){return Pt!==void 0?be(Pt):we}for(var Ue=null,Me=Math.abs(Be-Ke)!==1,Re=0;Re<De.length;Re+=1){var tt=Le(Ne[Re]),lt=Le(De[Re]);if(tt!==lt){Ue=Re,Me=Me||tt!==Le(De[Re+1]);break}}return Ue===null?null:{index:Ue,multiple:Me}}function ge(He,Ae,be){var Be=z.useState(He),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=z.useState(null),Le=(0,se.Z)(we,2),Ue=Le[0],Me=Le[1];return z.useEffect(function(){var Re=me(Ne||[],He||[],Ae);(Re==null?void 0:Re.index)!==void 0&&(be==null||be(Re.index),Me(He[Re.index])),De(He)},[He]),[Ue]}var _e=Se(16089),he=(typeof navigator=="undefined"?"undefined":(0,ie.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),pe=he,ke=function(He,Ae,be,Be){var Ke=(0,z.useRef)(!1),Ne=(0,z.useRef)(null);function De(){clearTimeout(Ne.current),Ke.current=!0,Ne.current=setTimeout(function(){Ke.current=!1},50)}var we=(0,z.useRef)({top:He,bottom:Ae,left:be,right:Be});return we.current.top=He,we.current.bottom=Ae,we.current.left=be,we.current.right=Be,function(Le,Ue){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Re=Le?Ue<0&&we.current.left||Ue>0&&we.current.right:Ue<0&&we.current.top||Ue>0&&we.current.bottom;return Me&&Re?(clearTimeout(Ne.current),Ke.current=!1):(!Re||Ke.current)&&De(),!Ke.current&&Re}};function Te(He,Ae,be,Be,Ke,Ne,De){var we=(0,z.useRef)(0),Le=(0,z.useRef)(null),Ue=(0,z.useRef)(null),Me=(0,z.useRef)(!1),Re=ke(Ae,be,Be,Ke);function tt(Zt,Ut){if(_e.Z.cancel(Le.current),!Re(!1,Ut)){var gt=Zt;if(!gt._virtualHandled)gt._virtualHandled=!0;else return;we.current+=Ut,Ue.current=Ut,pe||gt.preventDefault(),Le.current=(0,_e.Z)(function(){var Qt=Me.current?10:1;De(we.current*Qt,!1),we.current=0})}}function lt(Zt,Ut){De(Ut,!0),pe||Zt.preventDefault()}var Pt=(0,z.useRef)(null),Ct=(0,z.useRef)(null);function vt(Zt){if(He){_e.Z.cancel(Ct.current),Ct.current=(0,_e.Z)(function(){Pt.current=null},2);var Ut=Zt.deltaX,gt=Zt.deltaY,Qt=Zt.shiftKey,Lt=Ut,qt=gt;(Pt.current==="sx"||!Pt.current&&Qt&&gt&&!Ut)&&(Lt=gt,qt=0,Pt.current="sx");var un=Math.abs(Lt),Sn=Math.abs(qt);Pt.current===null&&(Pt.current=Ne&&un>Sn?"x":"y"),Pt.current==="y"?tt(Zt,qt):lt(Zt,Lt)}}function Ot(Zt){He&&(Me.current=Zt.detail===Ue.current)}return[vt,Ot]}function Ee(He,Ae,be,Be){var Ke=z.useMemo(function(){return[new Map,[]]},[He,be.id,Be]),Ne=(0,se.Z)(Ke,2),De=Ne[0],we=Ne[1],Le=function(Me){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Me,tt=De.get(Me),lt=De.get(Re);if(tt===void 0||lt===void 0)for(var Pt=He.length,Ct=we.length;Ct<Pt;Ct+=1){var vt,Ot=He[Ct],Zt=Ae(Ot);De.set(Zt,Ct);var Ut=(vt=be.get(Zt))!==null&&vt!==void 0?vt:Be;if(we[Ct]=(we[Ct-1]||0)+Ut,Zt===Me&&(tt=Ct),Zt===Re&&(lt=Ct),tt!==void 0&&lt!==void 0)break}return{top:we[tt-1]||0,bottom:we[lt]}};return Le}var Oe=Se(42573),je=Se(58698),Pe=function(){function He(){(0,Oe.Z)(this,He),(0,ue.Z)(this,"maps",void 0),(0,ue.Z)(this,"id",0),(0,ue.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,je.Z)(He,[{key:"set",value:function(be,Be){this.diffRecords.set(be,this.maps[be]),this.maps[be]=Be,this.id+=1}},{key:"get",value:function(be){return this.maps[be]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),He}(),Qe=Pe;function Xe(He){var Ae=parseFloat(He);return isNaN(Ae)?0:Ae}function ot(He,Ae,be){var Be=z.useState(0),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=(0,z.useRef)(new Map),Le=(0,z.useRef)(new Qe),Ue=(0,z.useRef)(0);function Me(){Ue.current+=1}function Re(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Me();var Pt=function(){var Ot=!1;we.current.forEach(function(Zt,Ut){if(Zt&&Zt.offsetParent){var gt=Zt.offsetHeight,Qt=getComputedStyle(Zt),Lt=Qt.marginTop,qt=Qt.marginBottom,un=Xe(Lt),Sn=Xe(qt),Jt=gt+un+Sn;Le.current.get(Ut)!==Jt&&(Le.current.set(Ut,Jt),Ot=!0)}}),Ot&&De(function(Zt){return Zt+1})};if(lt)Pt();else{Ue.current+=1;var Ct=Ue.current;Promise.resolve().then(function(){Ct===Ue.current&&Pt()})}}function tt(lt,Pt){var Ct=He(lt),vt=we.current.get(Ct);Pt?(we.current.set(Ct,Pt),Re()):we.current.delete(Ct),!vt!=!Pt&&(Pt?Ae==null||Ae(lt):be==null||be(lt))}return(0,z.useEffect)(function(){return Me},[]),[tt,Re,Le.current,Ne]}var We=14/15;function rt(He,Ae,be){var Be=(0,z.useRef)(!1),Ke=(0,z.useRef)(0),Ne=(0,z.useRef)(0),De=(0,z.useRef)(null),we=(0,z.useRef)(null),Le,Ue=function(lt){if(Be.current){var Pt=Math.ceil(lt.touches[0].pageX),Ct=Math.ceil(lt.touches[0].pageY),vt=Ke.current-Pt,Ot=Ne.current-Ct,Zt=Math.abs(vt)>Math.abs(Ot);Zt?Ke.current=Pt:Ne.current=Ct;var Ut=be(Zt,Zt?vt:Ot,!1,lt);Ut&&lt.preventDefault(),clearInterval(we.current),Ut&&(we.current=setInterval(function(){Zt?vt*=We:Ot*=We;var gt=Math.floor(Zt?vt:Ot);(!be(Zt,gt,!0)||Math.abs(gt)<=.1)&&clearInterval(we.current)},16))}},Me=function(){Be.current=!1,Le()},Re=function(lt){Le(),lt.touches.length===1&&!Be.current&&(Be.current=!0,Ke.current=Math.ceil(lt.touches[0].pageX),Ne.current=Math.ceil(lt.touches[0].pageY),De.current=lt.target,De.current.addEventListener("touchmove",Ue,{passive:!1}),De.current.addEventListener("touchend",Me,{passive:!0}))};Le=function(){De.current&&(De.current.removeEventListener("touchmove",Ue),De.current.removeEventListener("touchend",Me))},(0,b.Z)(function(){return He&&Ae.current.addEventListener("touchstart",Re,{passive:!0}),function(){var tt;(tt=Ae.current)===null||tt===void 0||tt.removeEventListener("touchstart",Re),Le(),clearInterval(we.current)}},[He])}function Ye(He){return Math.floor(Math.pow(He,.5))}function ut(He,Ae){var be="touches"in He?He.touches[0]:He;return be[Ae?"pageX":"pageY"]-window[Ae?"scrollX":"scrollY"]}function Ge(He,Ae,be){z.useEffect(function(){var Be=Ae.current;if(He&&Be){var Ke=!1,Ne,De,we=function(){_e.Z.cancel(Ne)},Le=function tt(){we(),Ne=(0,_e.Z)(function(){be(De),tt()})},Ue=function(lt){if(!(lt.target.draggable||lt.button!==0)){var Pt=lt;Pt._virtualHandled||(Pt._virtualHandled=!0,Ke=!0)}},Me=function(){Ke=!1,we()},Re=function(lt){if(Ke){var Pt=ut(lt,!1),Ct=Be.getBoundingClientRect(),vt=Ct.top,Ot=Ct.bottom;if(Pt<=vt){var Zt=vt-Pt;De=-Ye(Zt),Le()}else if(Pt>=Ot){var Ut=Pt-Ot;De=Ye(Ut),Le()}else we()}};return Be.addEventListener("mousedown",Ue),Be.ownerDocument.addEventListener("mouseup",Me),Be.ownerDocument.addEventListener("mousemove",Re),function(){Be.removeEventListener("mousedown",Ue),Be.ownerDocument.removeEventListener("mouseup",Me),Be.ownerDocument.removeEventListener("mousemove",Re),we()}}},[He])}var ze=10;function Ve(He,Ae,be,Be,Ke,Ne,De,we){var Le=z.useRef(),Ue=z.useState(null),Me=(0,se.Z)(Ue,2),Re=Me[0],tt=Me[1];return(0,b.Z)(function(){if(Re&&Re.times<ze){if(!He.current){tt(function(rr){return(0,Ce.Z)({},rr)});return}Ne();var lt=Re.targetAlign,Pt=Re.originAlign,Ct=Re.index,vt=Re.offset,Ot=He.current.clientHeight,Zt=!1,Ut=lt,gt=null;if(Ot){for(var Qt=lt||Pt,Lt=0,qt=0,un=0,Sn=Math.min(Ae.length-1,Ct),Jt=0;Jt<=Sn;Jt+=1){var Ln=Ke(Ae[Jt]);qt=Lt;var Zn=be.get(Ln);un=qt+(Zn===void 0?Be:Zn),Lt=un}for(var Gn=Qt==="top"?vt:Ot-vt,Jn=Sn;Jn>=0;Jn-=1){var hr=Ke(Ae[Jn]),ur=be.get(hr);if(ur===void 0){Zt=!0;break}if(Gn-=ur,Gn<=0)break}switch(Qt){case"top":gt=qt-vt;break;case"bottom":gt=un-Ot+vt;break;default:{var jn=He.current.scrollTop,Nn=jn+Ot;qt<jn?Ut="top":un>Nn&&(Ut="bottom")}}gt!==null&&De(gt),gt!==Re.lastTop&&(Zt=!0)}Zt&&tt((0,Ce.Z)((0,Ce.Z)({},Re),{},{times:Re.times+1,targetAlign:Ut,lastTop:gt}))}},[Re,He.current]),function(lt){if(lt==null){we();return}if(_e.Z.cancel(Le.current),typeof lt=="number")De(lt);else if(lt&&(0,ie.Z)(lt)==="object"){var Pt,Ct=lt.align;"index"in lt?Pt=lt.index:Pt=Ae.findIndex(function(Zt){return Ke(Zt)===lt.key});var vt=lt.offset,Ot=vt===void 0?0:vt;tt({times:0,index:Pt,offset:Ot,originAlign:Ct})}}}var $e=z.forwardRef(function(He,Ae){var be=He.prefixCls,Be=He.rtl,Ke=He.scrollOffset,Ne=He.scrollRange,De=He.onStartMove,we=He.onStopMove,Le=He.onScroll,Ue=He.horizontal,Me=He.spinSize,Re=He.containerSize,tt=He.style,lt=He.thumbStyle,Pt=He.showScrollBar,Ct=z.useState(!1),vt=(0,se.Z)(Ct,2),Ot=vt[0],Zt=vt[1],Ut=z.useState(null),gt=(0,se.Z)(Ut,2),Qt=gt[0],Lt=gt[1],qt=z.useState(null),un=(0,se.Z)(qt,2),Sn=un[0],Jt=un[1],Ln=!Be,Zn=z.useRef(),Gn=z.useRef(),Jn=z.useState(Pt),hr=(0,se.Z)(Jn,2),ur=hr[0],jn=hr[1],Nn=z.useRef(),rr=function(){Pt===!0||Pt===!1||(clearTimeout(Nn.current),jn(!0),Nn.current=setTimeout(function(){jn(!1)},3e3))},Kn=Ne-Re||0,In=Re-Me||0,gn=z.useMemo(function(){if(Ke===0||Kn===0)return 0;var qe=Ke/Kn;return qe*In},[Ke,Kn,In]),pn=function(st){st.stopPropagation(),st.preventDefault()},Dn=z.useRef({top:gn,dragging:Ot,pageY:Qt,startTop:Sn});Dn.current={top:gn,dragging:Ot,pageY:Qt,startTop:Sn};var Rn=function(st){Zt(!0),Lt(ut(st,Ue)),Jt(Dn.current.top),De(),st.stopPropagation(),st.preventDefault()};z.useEffect(function(){var qe=function(kt){kt.preventDefault()},st=Zn.current,mt=Gn.current;return st.addEventListener("touchstart",qe,{passive:!1}),mt.addEventListener("touchstart",Rn,{passive:!1}),function(){st.removeEventListener("touchstart",qe),mt.removeEventListener("touchstart",Rn)}},[]);var Un=z.useRef();Un.current=Kn;var Mr=z.useRef();Mr.current=In,z.useEffect(function(){if(Ot){var qe,st=function(kt){var Nt=Dn.current,nn=Nt.dragging,An=Nt.pageY,Vn=Nt.startTop;_e.Z.cancel(qe);var At=Zn.current.getBoundingClientRect(),wt=Re/(Ue?At.width:At.height);if(nn){var dn=(ut(kt,Ue)-An)*wt,Gt=Vn;!Ln&&Ue?Gt-=dn:Gt+=dn;var Et=Un.current,Ht=Mr.current,on=Ht?Gt/Ht:0,sn=Math.ceil(on*Et);sn=Math.max(sn,0),sn=Math.min(sn,Et),qe=(0,_e.Z)(function(){Le(sn,Ue)})}},mt=function(){Zt(!1),we()};return window.addEventListener("mousemove",st,{passive:!0}),window.addEventListener("touchmove",st,{passive:!0}),window.addEventListener("mouseup",mt,{passive:!0}),window.addEventListener("touchend",mt,{passive:!0}),function(){window.removeEventListener("mousemove",st),window.removeEventListener("touchmove",st),window.removeEventListener("mouseup",mt),window.removeEventListener("touchend",mt),_e.Z.cancel(qe)}}},[Ot]),z.useEffect(function(){return rr(),function(){clearTimeout(Nn.current)}},[Ke]),z.useImperativeHandle(Ae,function(){return{delayHidden:rr}});var an="".concat(be,"-scrollbar"),Ie={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 Ue?(Object.assign(Ie,{height:8,left:0,right:0,bottom:0}),Object.assign(Ze,(0,ue.Z)({height:"100%",width:Me},Ln?"left":"right",gn))):(Object.assign(Ie,(0,ue.Z)({width:8,top:0,bottom:0},Ln?"right":"left",0)),Object.assign(Ze,{width:"100%",height:Me,top:gn})),z.createElement("div",{ref:Zn,className:ee()(an,(0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat(an,"-horizontal"),Ue),"".concat(an,"-vertical"),!Ue),"".concat(an,"-visible"),ur)),style:(0,Ce.Z)((0,Ce.Z)({},Ie),tt),onMouseDown:pn,onMouseMove:rr},z.createElement("div",{ref:Gn,className:ee()("".concat(an,"-thumb"),(0,ue.Z)({},"".concat(an,"-thumb-moving"),Ot)),style:(0,Ce.Z)((0,Ce.Z)({},Ze),lt),onMouseDown:Rn}))}),nt=$e,et=20;function pt(){var He=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,be=He/Ae*He;return isNaN(be)&&(be=0),be=Math.max(be,et),Math.floor(be)}var ct=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Rt=[],dt={overflowY:"auto",overflowAnchor:"none"};function Mt(He,Ae){var be=He.prefixCls,Be=be===void 0?"rc-virtual-list":be,Ke=He.className,Ne=He.height,De=He.itemHeight,we=He.fullHeight,Le=we===void 0?!0:we,Ue=He.style,Me=He.data,Re=He.children,tt=He.itemKey,lt=He.virtual,Pt=He.direction,Ct=He.scrollWidth,vt=He.component,Ot=vt===void 0?"div":vt,Zt=He.onScroll,Ut=He.onVirtualScroll,gt=He.onVisibleChange,Qt=He.innerProps,Lt=He.extraRender,qt=He.styles,un=He.showScrollBar,Sn=un===void 0?"optional":un,Jt=(0,te.Z)(He,ct),Ln=z.useCallback(function(Kt){return typeof tt=="function"?tt(Kt):Kt==null?void 0:Kt[tt]},[tt]),Zn=ot(Ln,null,null),Gn=(0,se.Z)(Zn,4),Jn=Gn[0],hr=Gn[1],ur=Gn[2],jn=Gn[3],Nn=!!(lt!==!1&&Ne&&De),rr=z.useMemo(function(){return Object.values(ur.maps).reduce(function(Kt,fn){return Kt+fn},0)},[ur.id,ur.maps]),Kn=Nn&&Me&&(Math.max(De*Me.length,rr)>Ne||!!Ct),In=Pt==="rtl",gn=ee()(Be,(0,ue.Z)({},"".concat(Be,"-rtl"),In),Ke),pn=Me||Rt,Dn=(0,z.useRef)(),Rn=(0,z.useRef)(),Un=(0,z.useRef)(),Mr=(0,z.useState)(0),an=(0,se.Z)(Mr,2),Ie=an[0],Ze=an[1],qe=(0,z.useState)(0),st=(0,se.Z)(qe,2),mt=st[0],Bt=st[1],kt=(0,z.useState)(!1),Nt=(0,se.Z)(kt,2),nn=Nt[0],An=Nt[1],Vn=function(){An(!0)},At=function(){An(!1)},wt={getKey:Ln};function dn(Kt){Ze(function(fn){var zt;typeof Kt=="function"?zt=Kt(fn):zt=Kt;var jt=Pr(zt);return Dn.current.scrollTop=jt,jt})}var Gt=(0,z.useRef)({start:0,end:pn.length}),Et=(0,z.useRef)(),Ht=ge(pn,Ln),on=(0,se.Z)(Ht,1),sn=on[0];Et.current=sn;var yn=z.useMemo(function(){if(!Nn)return{scrollHeight:void 0,start:0,end:pn.length-1,offset:void 0};if(!Kn){var Kt;return{scrollHeight:((Kt=Rn.current)===null||Kt===void 0?void 0:Kt.offsetHeight)||0,start:0,end:pn.length-1,offset:void 0}}for(var fn=0,zt,jt,Xt,cn=pn.length,Fn=0;Fn<cn;Fn+=1){var Wn=pn[Fn],nr=Ln(Wn),ar=ur.get(nr),$n=fn+(ar===void 0?De:ar);$n>=Ie&&zt===void 0&&(zt=Fn,jt=fn),$n>Ie+Ne&&Xt===void 0&&(Xt=Fn),fn=$n}return zt===void 0&&(zt=0,jt=0,Xt=Math.ceil(Ne/De)),Xt===void 0&&(Xt=pn.length-1),Xt=Math.min(Xt+1,pn.length-1),{scrollHeight:fn,start:zt,end:Xt,offset:jt}},[Kn,Nn,Ie,pn,jn,Ne]),Wt=yn.scrollHeight,Cn=yn.start,Vt=yn.end,Pn=yn.offset;Gt.current.start=Cn,Gt.current.end=Vt,z.useLayoutEffect(function(){var Kt=ur.getRecord();if(Kt.size===1){var fn=Array.from(Kt.keys())[0],zt=Kt.get(fn),jt=pn[Cn];if(jt&&zt===void 0){var Xt=Ln(jt);if(Xt===fn){var cn=ur.get(fn),Fn=cn-De;dn(function(Wn){return Wn+Fn})}}}ur.resetRecord()},[Wt]);var bn=z.useState({width:0,height:Ne}),zn=(0,se.Z)(bn,2),Bn=zn[0],er=zn[1],cr=function(fn){er({width:fn.offsetWidth,height:fn.offsetHeight})},pr=(0,z.useRef)(),Nr=(0,z.useRef)(),Br=z.useMemo(function(){return pt(Bn.width,Ct)},[Bn.width,Ct]),ei=z.useMemo(function(){return pt(Bn.height,Wt)},[Bn.height,Wt]),xr=Wt-Ne,Tr=(0,z.useRef)(xr);Tr.current=xr;function Pr(Kt){var fn=Kt;return Number.isNaN(Tr.current)||(fn=Math.min(fn,Tr.current)),fn=Math.max(fn,0),fn}var Xr=Ie<=0,hi=Ie>=xr,bi=mt<=0,Si=mt>=Ct,Kr=ke(Xr,hi,bi,Si),Ti=function(){return{x:In?-mt:mt,y:Ie}},Ei=(0,z.useRef)(Ti()),tr=(0,E.zX)(function(Kt){if(Ut){var fn=(0,Ce.Z)((0,Ce.Z)({},Ti()),Kt);(Ei.current.x!==fn.x||Ei.current.y!==fn.y)&&(Ut(fn),Ei.current=fn)}});function br(Kt,fn){var zt=Kt;fn?((0,x.flushSync)(function(){Bt(zt)}),tr()):dn(zt)}function kr(Kt){var fn=Kt.currentTarget.scrollTop;fn!==Ie&&dn(fn),Zt==null||Zt(Kt),tr()}var ti=function(fn){var zt=fn,jt=Ct?Ct-Bn.width:0;return zt=Math.max(zt,0),zt=Math.min(zt,jt),zt},ni=(0,E.zX)(function(Kt,fn){fn?((0,x.flushSync)(function(){Bt(function(zt){var jt=zt+(In?-Kt:Kt);return ti(jt)})}),tr()):dn(function(zt){var jt=zt+Kt;return jt})}),wi=Te(Nn,Xr,hi,bi,Si,!!Ct,ni),Ri=(0,se.Z)(wi,2),Tt=Ri[0],en=Ri[1];rt(Nn,Dn,function(Kt,fn,zt,jt){var Xt=jt;return Kr(Kt,fn,zt)?!1:!Xt||!Xt._virtualHandled?(Xt&&(Xt._virtualHandled=!0),Tt({preventDefault:function(){},deltaX:Kt?fn:0,deltaY:Kt?0:fn}),!0):!1}),Ge(Kn,Dn,function(Kt){dn(function(fn){return fn+Kt})}),(0,b.Z)(function(){function Kt(zt){var jt=Xr&&zt.detail<0,Xt=hi&&zt.detail>0;Nn&&!jt&&!Xt&&zt.preventDefault()}var fn=Dn.current;return fn.addEventListener("wheel",Tt,{passive:!1}),fn.addEventListener("DOMMouseScroll",en,{passive:!0}),fn.addEventListener("MozMousePixelScroll",Kt,{passive:!1}),function(){fn.removeEventListener("wheel",Tt),fn.removeEventListener("DOMMouseScroll",en),fn.removeEventListener("MozMousePixelScroll",Kt)}},[Nn,Xr,hi]),(0,b.Z)(function(){if(Ct){var Kt=ti(mt);Bt(Kt),tr({x:Kt})}},[Bn.width,Ct]);var Yt=function(){var fn,zt;(fn=pr.current)===null||fn===void 0||fn.delayHidden(),(zt=Nr.current)===null||zt===void 0||zt.delayHidden()},rn=Ve(Dn,pn,ur,De,Ln,function(){return hr(!0)},dn,Yt);z.useImperativeHandle(Ae,function(){return{nativeElement:Un.current,getScrollInfo:Ti,scrollTo:function(fn){function zt(jt){return jt&&(0,ie.Z)(jt)==="object"&&("left"in jt||"top"in jt)}zt(fn)?(fn.left!==void 0&&Bt(ti(fn.left)),rn(fn.top)):rn(fn)}}}),(0,b.Z)(function(){if(gt){var Kt=pn.slice(Cn,Vt+1);gt(Kt,pn)}},[Cn,Vt,pn]);var hn=Ee(pn,Ln,ur,De),vn=Lt==null?void 0:Lt({start:Cn,end:Vt,virtual:Kn,offsetX:mt,offsetY:Pn,rtl:In,getSize:hn}),On=ve(pn,Cn,Vt,Ct,mt,Jn,Re,wt),En=null;Ne&&(En=(0,Ce.Z)((0,ue.Z)({},Le?"height":"maxHeight",Ne),dt),Nn&&(En.overflowY="hidden",Ct&&(En.overflowX="hidden"),nn&&(En.pointerEvents="none")));var _n={};return In&&(_n.dir="rtl"),z.createElement("div",(0,ce.Z)({ref:Un,style:(0,Ce.Z)((0,Ce.Z)({},Ue),{},{position:"relative"}),className:gn},_n,Jt),z.createElement(ne.Z,{onResize:cr},z.createElement(Ot,{className:"".concat(Be,"-holder"),style:En,ref:Dn,onScroll:kr,onMouseEnter:Yt},z.createElement(ae,{prefixCls:Be,height:Wt,offsetX:mt,offsetY:Pn,scrollWidth:Ct,onInnerResize:hr,ref:Rn,innerProps:Qt,rtl:In,extra:vn},On))),Kn&&Wt>Ne&&z.createElement(nt,{ref:pr,prefixCls:Be,scrollOffset:Ie,scrollRange:Wt,rtl:In,onScroll:br,onStartMove:Vn,onStopMove:At,spinSize:ei,containerSize:Bn.height,style:qt==null?void 0:qt.verticalScrollBar,thumbStyle:qt==null?void 0:qt.verticalScrollBarThumb,showScrollBar:Sn}),Kn&&Ct>Bn.width&&z.createElement(nt,{ref:Nr,prefixCls:Be,scrollOffset:mt,scrollRange:Ct,rtl:In,onScroll:br,onStartMove:Vn,onStopMove:At,spinSize:Br,containerSize:Bn.width,horizontal:!0,style:qt==null?void 0:qt.horizontalScrollBar,thumbStyle:qt==null?void 0:qt.horizontalScrollBarThumb,showScrollBar:Sn}))}var xt=z.forwardRef(Mt);xt.displayName="List";var yt=xt,bt=yt},7062:function($t,Dt,Se){var ce=Se(19637),ie=Se(97573),Ce=[Se(96627)];$t.exports=ce.createStore(ie,Ce)},96627:function($t,Dt,Se){$t.exports=ce;function ce(){return Se(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($t){return $t<10?"0"+$t:$t}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($t){return rx_escapable.lastIndex=0,rx_escapable.test($t)?'"'+$t.replace(rx_escapable,function(Dt){var Se=meta[Dt];return typeof Se=="string"?Se:"\\u"+("0000"+Dt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+$t+'"'}function str($t,Dt){var Se,ce,ie,Ce,ue=gap,se,te=Dt[$t];switch(te&&typeof te=="object"&&typeof te.toJSON=="function"&&(te=te.toJSON($t)),typeof rep=="function"&&(te=rep.call(Dt,$t,te)),typeof te){case"string":return quote(te);case"number":return isFinite(te)?String(te):"null";case"boolean":case"null":return String(te);case"object":if(!te)return"null";if(gap+=indent,se=[],Object.prototype.toString.apply(te)==="[object Array]"){for(Ce=te.length,Se=0;Se<Ce;Se+=1)se[Se]=str(Se,te)||"null";return ie=se.length===0?"[]":gap?`[
`+gap+se.join(`,
`+gap)+`
`+ue+"]":"["+se.join(",")+"]",gap=ue,ie}if(rep&&typeof rep=="object")for(Ce=rep.length,Se=0;Se<Ce;Se+=1)typeof rep[Se]=="string"&&(ce=rep[Se],ie=str(ce,te),ie&&se.push(quote(ce)+(gap?": ":":")+ie));else for(ce in te)Object.prototype.hasOwnProperty.call(te,ce)&&(ie=str(ce,te),ie&&se.push(quote(ce)+(gap?": ":":")+ie));return ie=se.length===0?"{}":gap?`{
`+gap+se.join(`,
`+gap)+`
`+ue+"}":"{"+se.join(",")+"}",gap=ue,ie}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function($t,Dt,Se){var ce;if(gap="",indent="",typeof Se=="number")for(ce=0;ce<Se;ce+=1)indent+=" ";else typeof Se=="string"&&(indent=Se);if(rep=Dt,Dt&&typeof Dt!="function"&&(typeof Dt!="object"||typeof Dt.length!="number"))throw new Error("JSON.stringify");return str("",{"":$t})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk($t,Dt){var Se,ce,ie=$t[Dt];if(ie&&typeof ie=="object")for(Se in ie)Object.prototype.hasOwnProperty.call(ie,Se)&&(ce=walk(ie,Se),ce!==void 0?ie[Se]=ce:delete ie[Se]);return reviver.call($t,Dt,ie)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function($t){return"\\u"+("0000"+$t.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($t,Dt,Se){var ce=Se(67039),ie=ce.slice,Ce=ce.pluck,ue=ce.each,se=ce.bind,te=ce.create,le=ce.isList,ee=ce.isFunction,ne=ce.isObject;$t.exports={createStore:z};var E={version:"2.0.12",enabled:!1,get:function(x,re){var ae=this.storage.read(this._namespacePrefix+x);return this._deserialize(ae,re)},set:function(x,re){return re===void 0?this.remove(x):(this.storage.write(this._namespacePrefix+x,this._serialize(re)),re)},remove:function(x){this.storage.remove(this._namespacePrefix+x)},each:function(x){var re=this;this.storage.each(function(ae,oe){x.call(re,re._deserialize(ae),(oe||"").replace(re._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 b(){var x=typeof console=="undefined"?null:console;if(x){var re=x.warn?x.warn:x.log;re.apply(x,arguments)}}function z(x,re,ae){ae||(ae=""),x&&!le(x)&&(x=[x]),re&&!le(re)&&(re=[re]);var oe=ae?"__storejs_"+ae+"_":"",ve=ae?new RegExp("^"+oe):null,ye=/^[a-zA-Z0-9_\-]*$/;if(!ye.test(ae))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var me={_namespacePrefix:oe,_namespaceRegexp:ve,_testStorage:function(_e){try{var he="__storejs__test__";_e.write(he,he);var pe=_e.read(he)===he;return _e.remove(he),pe}catch(ke){return!1}},_assignPluginFnProp:function(_e,he){var pe=this[he];this[he]=function(){var Te=ie(arguments,0),Ee=this;function Oe(){if(pe)return ue(arguments,function(Pe,Qe){Te[Qe]=Pe}),pe.apply(Ee,Te)}var je=[Oe].concat(Te);return _e.apply(Ee,je)}},_serialize:function(_e){return JSON.stringify(_e)},_deserialize:function(_e,he){if(!_e)return he;var pe="";try{pe=JSON.parse(_e)}catch(ke){pe=_e}return pe!==void 0?pe:he},_addStorage:function(_e){this.enabled||this._testStorage(_e)&&(this.storage=_e,this.enabled=!0)},_addPlugin:function(_e){var he=this;if(le(_e)){ue(_e,function(Te){he._addPlugin(Te)});return}var pe=Ce(this.plugins,function(Te){return _e===Te});if(!pe){if(this.plugins.push(_e),!ee(_e))throw new Error("Plugins must be function values that return objects");var ke=_e.call(this);if(!ne(ke))throw new Error("Plugins must return an object of function properties");ue(ke,function(Te,Ee){if(!ee(Te))throw new Error("Bad plugin property: "+Ee+" from plugin "+_e.name+". Plugins should only return functions.");he._assignPluginFnProp(Te,Ee)})}},addStorage:function(_e){b("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(_e)}},ge=te(me,E,{plugins:[]});return ge.raw={},ue(ge,function(_e,he){ee(_e)&&(ge.raw[he]=se(ge,_e))}),ue(x,function(_e){ge._addStorage(_e)}),ue(re,function(_e){ge._addPlugin(_e)}),ge}},67039:function($t,Dt,Se){var ce=se(),ie=te(),Ce=le(),ue=typeof window!="undefined"?window:Se.g;$t.exports={assign:ce,create:ie,trim:Ce,bind:ee,slice:ne,each:E,map:b,pluck:z,isList:x,isFunction:re,isObject:ae,Global:ue};function se(){return Object.assign?Object.assign:function(ve,ye,me,ge){for(var _e=1;_e<arguments.length;_e++)E(Object(arguments[_e]),function(he,pe){ve[pe]=he});return ve}}function te(){if(Object.create)return function(ye,me,ge,_e){var he=ne(arguments,1);return ce.apply(this,[Object.create(ye)].concat(he))};{let ve=function(){};var oe=ve;return function(me,ge,_e,he){var pe=ne(arguments,1);return ve.prototype=me,ce.apply(this,[new ve].concat(pe))}}}function le(){return String.prototype.trim?function(ve){return String.prototype.trim.call(ve)}:function(ve){return ve.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ee(oe,ve){return function(){return ve.apply(oe,Array.prototype.slice.call(arguments,0))}}function ne(oe,ve){return Array.prototype.slice.call(oe,ve||0)}function E(oe,ve){z(oe,function(ye,me){return ve(ye,me),!1})}function b(oe,ve){var ye=x(oe)?[]:{};return z(oe,function(me,ge){return ye[ge]=ve(me,ge),!1}),ye}function z(oe,ve){if(x(oe)){for(var ye=0;ye<oe.length;ye++)if(ve(oe[ye],ye))return oe[ye]}else for(var me in oe)if(oe.hasOwnProperty(me)&&ve(oe[me],me))return oe[me]}function x(oe){return oe!=null&&typeof oe!="function"&&typeof oe.length=="number"}function re(oe){return oe&&{}.toString.call(oe)==="[object Function]"}function ae(oe){return oe&&{}.toString.call(oe)==="[object Object]"}},97573:function($t,Dt,Se){$t.exports=[Se(52496),Se(16436),Se(76673),Se(35701),Se(65578),Se(65300)]},35701:function($t,Dt,Se){var ce=Se(67039),ie=ce.Global,Ce=ce.trim;$t.exports={name:"cookieStorage",read:se,write:le,each:te,remove:ee,clearAll:ne};var ue=ie.document;function se(b){if(!b||!E(b))return null;var z="(?:^|.*;\\s*)"+escape(b).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ue.cookie.replace(new RegExp(z),"$1"))}function te(b){for(var z=ue.cookie.split(/; ?/g),x=z.length-1;x>=0;x--)if(Ce(z[x])){var re=z[x].split("="),ae=unescape(re[0]),oe=unescape(re[1]);b(oe,ae)}}function le(b,z){b&&(ue.cookie=escape(b)+"="+escape(z)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ee(b){!b||!E(b)||(ue.cookie=escape(b)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function ne(){te(function(b,z){ee(z)})}function E(b){return new RegExp("(?:^|;\\s*)"+escape(b).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ue.cookie)}},52496:function($t,Dt,Se){var ce=Se(67039),ie=ce.Global;$t.exports={name:"localStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};function Ce(){return ie.localStorage}function ue(ne){return Ce().getItem(ne)}function se(ne,E){return Ce().setItem(ne,E)}function te(ne){for(var E=Ce().length-1;E>=0;E--){var b=Ce().key(E);ne(ue(b),b)}}function le(ne){return Ce().removeItem(ne)}function ee(){return Ce().clear()}},65300:function($t){$t.exports={name:"memoryStorage",read:Se,write:ce,each:ie,remove:Ce,clearAll:ue};var Dt={};function Se(se){return Dt[se]}function ce(se,te){Dt[se]=te}function ie(se){for(var te in Dt)Dt.hasOwnProperty(te)&&se(Dt[te],te)}function Ce(se){delete Dt[se]}function ue(se){Dt={}}},16436:function($t,Dt,Se){var ce=Se(67039),ie=ce.Global;$t.exports={name:"oldFF-globalStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};var Ce=ie.globalStorage;function ue(ne){return Ce[ne]}function se(ne,E){Ce[ne]=E}function te(ne){for(var E=Ce.length-1;E>=0;E--){var b=Ce.key(E);ne(Ce[b],b)}}function le(ne){return Ce.removeItem(ne)}function ee(){te(function(ne,E){delete Ce[ne]})}},76673:function($t,Dt,Se){var ce=Se(67039),ie=ce.Global;$t.exports={name:"oldIE-userDataStorage",write:le,read:ee,each:ne,remove:E,clearAll:b};var Ce="storejs",ue=ie.document,se=re(),te=(ie.navigator?ie.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function le(ae,oe){if(!te){var ve=x(ae);se(function(ye){ye.setAttribute(ve,oe),ye.save(Ce)})}}function ee(ae){if(!te){var oe=x(ae),ve=null;return se(function(ye){ve=ye.getAttribute(oe)}),ve}}function ne(ae){se(function(oe){for(var ve=oe.XMLDocument.documentElement.attributes,ye=ve.length-1;ye>=0;ye--){var me=ve[ye];ae(oe.getAttribute(me.name),me.name)}})}function E(ae){var oe=x(ae);se(function(ve){ve.removeAttribute(oe),ve.save(Ce)})}function b(){se(function(ae){var oe=ae.XMLDocument.documentElement.attributes;ae.load(Ce);for(var ve=oe.length-1;ve>=0;ve--)ae.removeAttribute(oe[ve].name);ae.save(Ce)})}var z=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function x(ae){return ae.replace(/^\d/,"___$&").replace(z,"___")}function re(){if(!ue||!ue.documentElement||!ue.documentElement.addBehavior)return null;var ae="script",oe,ve,ye;try{ve=new ActiveXObject("htmlfile"),ve.open(),ve.write("<"+ae+">document.w=window</"+ae+'><iframe src="/favicon.ico"></iframe>'),ve.close(),oe=ve.w.frames[0].document,ye=oe.createElement("div")}catch(me){ye=ue.createElement("div"),oe=ue.body}return function(me){var ge=[].slice.call(arguments,0);ge.unshift(ye),oe.appendChild(ye),ye.addBehavior("#default#userData"),ye.load(Ce),me.apply(this,ge),oe.removeChild(ye)}}},65578:function($t,Dt,Se){var ce=Se(67039),ie=ce.Global;$t.exports={name:"sessionStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};function Ce(){return ie.sessionStorage}function ue(ne){return Ce().getItem(ne)}function se(ne,E){return Ce().setItem(ne,E)}function te(ne){for(var E=Ce().length-1;E>=0;E--){var b=Ce().key(E);ne(ue(b),b)}}function le(ne){return Ce().removeItem(ne)}function ee(){return Ce().clear()}},82059:function($t){var Dt=arguments[3],Se=arguments[4],ce=arguments[5],ie=JSON.stringify;$t.exports=function(Ce,ue){for(var se,te=Object.keys(ce),le=0,ee=te.length;le<ee;le++){var ne=te[le],E=ce[ne].exports;if(E===Ce||E&&E.default===Ce){se=ne;break}}if(!se){se=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var b={},le=0,ee=te.length;le<ee;le++){var ne=te[le];b[ne]=ne}Se[se]=["function(require,module,exports){"+Ce+"(self); }",b]}var z=Math.floor(Math.pow(16,8)*Math.random()).toString(16),x={};x[se]=se,Se[z]=["function(require,module,exports){var f = require("+ie(se)+");(f.default ? f.default : f)(self);}",x];var re={};ae(z);function ae(_e){re[_e]=!0;for(var he in Se[_e][1]){var pe=Se[_e][1][he];re[pe]||ae(pe)}}var oe="("+Dt+")({"+Object.keys(re).map(function(_e){return ie(_e)+":["+Se[_e][0]+","+ie(Se[_e][1])+"]"}).join(",")+"},{},["+ie(z)+"])",ve=window.URL||window.webkitURL||window.mozURL||window.msURL,ye=new Blob([oe],{type:"text/javascript"});if(ue&&ue.bare)return ye;var me=ve.createObjectURL(ye),ge=new Worker(me);return ge.objectURL=me,ge}},34376:function($t){(function(Dt,Se){if(1)$t.exports=Se();else var ce,ie})(window,function(){return function(Dt){var Se={};function ce(ie){if(Se[ie])return Se[ie].exports;var Ce=Se[ie]={i:ie,l:!1,exports:{}};return Dt[ie].call(Ce.exports,Ce,Ce.exports,ce),Ce.l=!0,Ce.exports}return ce.m=Dt,ce.c=Se,ce.d=function(ie,Ce,ue){ce.o(ie,Ce)||Object.defineProperty(ie,Ce,{enumerable:!0,get:ue})},ce.r=function(ie){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ie,"__esModule",{value:!0})},ce.t=function(ie,Ce){if(1&Ce&&(ie=ce(ie)),8&Ce||4&Ce&&typeof ie=="object"&&ie&&ie.__esModule)return ie;var ue=Object.create(null);if(ce.r(ue),Object.defineProperty(ue,"default",{enumerable:!0,value:ie}),2&Ce&&typeof ie!="string")for(var se in ie)ce.d(ue,se,function(te){return ie[te]}.bind(null,se));return ue},ce.n=function(ie){var Ce=ie&&ie.__esModule?function(){return ie.default}:function(){return ie};return ce.d(Ce,"a",Ce),Ce},ce.o=function(ie,Ce){return Object.prototype.hasOwnProperty.call(ie,Ce)},ce.p="",ce(ce.s=34)}([function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.forwardEvent=Se.EventEmitter=void 0;var ie=function(){function Ce(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Ce.prototype,"event",{get:function(){var ue=this;return this._event||(this._event=function(se){return ue._listeners.push(se),{dispose:function(){if(!ue._disposed){for(var te=0;te<ue._listeners.length;te++)if(ue._listeners[te]===se)return void ue._listeners.splice(te,1)}}}}),this._event},enumerable:!1,configurable:!0}),Ce.prototype.fire=function(ue,se){for(var te=[],le=0;le<this._listeners.length;le++)te.push(this._listeners[le]);for(le=0;le<te.length;le++)te[le].call(void 0,ue,se)},Ce.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Ce}();Se.EventEmitter=ie,Se.forwardEvent=function(Ce,ue){return Ce(function(se){return ue.fire(se)})}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.IUnicodeService=Se.IOptionsService=Se.ILogService=Se.IInstantiationService=Se.IDirtyRowService=Se.ICharsetService=Se.ICoreService=Se.ICoreMouseService=Se.IBufferService=void 0;var ie=ce(14);Se.IBufferService=ie.createDecorator("BufferService"),Se.ICoreMouseService=ie.createDecorator("CoreMouseService"),Se.ICoreService=ie.createDecorator("CoreService"),Se.ICharsetService=ie.createDecorator("CharsetService"),Se.IDirtyRowService=ie.createDecorator("DirtyRowService"),Se.IInstantiationService=ie.createDecorator("InstantiationService"),Se.ILogService=ie.createDecorator("LogService"),Se.IOptionsService=ie.createDecorator("OptionsService"),Se.IUnicodeService=ie.createDecorator("UnicodeService")},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.getDisposeArrayDisposable=Se.disposeArray=Se.Disposable=void 0;var ie=function(){function ue(){this._disposables=[],this._isDisposed=!1}return ue.prototype.dispose=function(){this._isDisposed=!0;for(var se=0,te=this._disposables;se<te.length;se++)te[se].dispose();this._disposables.length=0},ue.prototype.register=function(se){return this._disposables.push(se),se},ue.prototype.unregister=function(se){var te=this._disposables.indexOf(se);te!==-1&&this._disposables.splice(te,1)},ue}();function Ce(ue){for(var se=0,te=ue;se<te.length;se++)te[se].dispose();ue.length=0}Se.Disposable=ie,Se.disposeArray=Ce,Se.getDisposeArrayDisposable=function(ue){return{dispose:function(){return Ce(ue)}}}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.WHITESPACE_CELL_CODE=Se.WHITESPACE_CELL_WIDTH=Se.WHITESPACE_CELL_CHAR=Se.NULL_CELL_CODE=Se.NULL_CELL_WIDTH=Se.NULL_CELL_CHAR=Se.CHAR_DATA_CODE_INDEX=Se.CHAR_DATA_WIDTH_INDEX=Se.CHAR_DATA_CHAR_INDEX=Se.CHAR_DATA_ATTR_INDEX=Se.DEFAULT_ATTR=Se.DEFAULT_COLOR=void 0,Se.DEFAULT_COLOR=256,Se.DEFAULT_ATTR=256|Se.DEFAULT_COLOR<<9,Se.CHAR_DATA_ATTR_INDEX=0,Se.CHAR_DATA_CHAR_INDEX=1,Se.CHAR_DATA_WIDTH_INDEX=2,Se.CHAR_DATA_CODE_INDEX=3,Se.NULL_CELL_CHAR="",Se.NULL_CELL_WIDTH=1,Se.NULL_CELL_CODE=0,Se.WHITESPACE_CELL_CHAR=" ",Se.WHITESPACE_CELL_WIDTH=1,Se.WHITESPACE_CELL_CODE=32},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.CellData=void 0;var ue=ce(8),se=ce(3),te=ce(6),le=function(ee){function ne(){var E=ee!==null&&ee.apply(this,arguments)||this;return E.content=0,E.fg=0,E.bg=0,E.extended=new te.ExtendedAttrs,E.combinedData="",E}return Ce(ne,ee),ne.fromCharData=function(E){var b=new ne;return b.setFromCharData(E),b},ne.prototype.isCombined=function(){return 2097152&this.content},ne.prototype.getWidth=function(){return this.content>>22},ne.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?ue.stringFromCodePoint(2097151&this.content):""},ne.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},ne.prototype.setFromCharData=function(E){this.fg=E[se.CHAR_DATA_ATTR_INDEX],this.bg=0;var b=!1;if(E[se.CHAR_DATA_CHAR_INDEX].length>2)b=!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:b=!0}else b=!0}else this.content=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[se.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=E[se.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[se.CHAR_DATA_WIDTH_INDEX]<<22)},ne.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ne}(te.AttributeData);Se.CellData=le},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.ISoundService=Se.ISelectionService=Se.IRenderService=Se.IMouseService=Se.ICoreBrowserService=Se.ICharSizeService=void 0;var ie=ce(14);Se.ICharSizeService=ie.createDecorator("CharSizeService"),Se.ICoreBrowserService=ie.createDecorator("CoreBrowserService"),Se.IMouseService=ie.createDecorator("MouseService"),Se.IRenderService=ie.createDecorator("RenderService"),Se.ISelectionService=ie.createDecorator("SelectionService"),Se.ISoundService=ie.createDecorator("SoundService")},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.ExtendedAttrs=Se.AttributeData=void 0;var ie=function(){function ue(){this.fg=0,this.bg=0,this.extended=new Ce}return ue.toColorRGB=function(se){return[se>>>16&255,se>>>8&255,255&se]},ue.fromColorRGB=function(se){return(255&se[0])<<16|(255&se[1])<<8|255&se[2]},ue.prototype.clone=function(){var se=new ue;return se.fg=this.fg,se.bg=this.bg,se.extended=this.extended.clone(),se},ue.prototype.isInverse=function(){return 67108864&this.fg},ue.prototype.isBold=function(){return 134217728&this.fg},ue.prototype.isUnderline=function(){return 268435456&this.fg},ue.prototype.isBlink=function(){return 536870912&this.fg},ue.prototype.isInvisible=function(){return 1073741824&this.fg},ue.prototype.isItalic=function(){return 67108864&this.bg},ue.prototype.isDim=function(){return 134217728&this.bg},ue.prototype.getFgColorMode=function(){return 50331648&this.fg},ue.prototype.getBgColorMode=function(){return 50331648&this.bg},ue.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},ue.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},ue.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},ue.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},ue.prototype.isFgDefault=function(){return(50331648&this.fg)==0},ue.prototype.isBgDefault=function(){return(50331648&this.bg)==0},ue.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},ue.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},ue.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},ue.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},ue.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},ue.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()},ue.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},ue.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},ue.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},ue.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},ue.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},ue}();Se.AttributeData=ie;var Ce=function(){function ue(se,te){se===void 0&&(se=0),te===void 0&&(te=-1),this.underlineStyle=se,this.underlineColor=te}return ue.prototype.clone=function(){return new ue(this.underlineStyle,this.underlineColor)},ue.prototype.isEmpty=function(){return this.underlineStyle===0},ue}();Se.ExtendedAttrs=Ce},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.addDisposableDomListener=void 0,Se.addDisposableDomListener=function(ie,Ce,ue,se){ie.addEventListener(Ce,ue,se);var te=!1;return{dispose:function(){te||(te=!0,ie.removeEventListener(Ce,ue,se))}}}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.Utf8ToUtf32=Se.StringToUtf32=Se.utf32ToString=Se.stringFromCodePoint=void 0,Se.stringFromCodePoint=function(ue){return ue>65535?(ue-=65536,String.fromCharCode(55296+(ue>>10))+String.fromCharCode(ue%1024+56320)):String.fromCharCode(ue)},Se.utf32ToString=function(ue,se,te){se===void 0&&(se=0),te===void 0&&(te=ue.length);for(var le="",ee=se;ee<te;++ee){var ne=ue[ee];ne>65535?(ne-=65536,le+=String.fromCharCode(55296+(ne>>10))+String.fromCharCode(ne%1024+56320)):le+=String.fromCharCode(ne)}return le};var ie=function(){function ue(){this._interim=0}return ue.prototype.clear=function(){this._interim=0},ue.prototype.decode=function(se,te){var le=se.length;if(!le)return 0;var ee=0,ne=0;this._interim&&(56320<=(z=se.charCodeAt(ne++))&&z<=57343?te[ee++]=1024*(this._interim-55296)+z-56320+65536:(te[ee++]=this._interim,te[ee++]=z),this._interim=0);for(var E=ne;E<le;++E){var b=se.charCodeAt(E);if(55296<=b&&b<=56319){if(++E>=le)return this._interim=b,ee;var z;56320<=(z=se.charCodeAt(E))&&z<=57343?te[ee++]=1024*(b-55296)+z-56320+65536:(te[ee++]=b,te[ee++]=z)}else te[ee++]=b}return ee},ue}();Se.StringToUtf32=ie;var Ce=function(){function ue(){this.interim=new Uint8Array(3)}return ue.prototype.clear=function(){this.interim.fill(0)},ue.prototype.decode=function(se,te){var le=se.length;if(!le)return 0;var ee,ne,E,b,z=0,x=0,re=0;if(this.interim[0]){var ae=!1,oe=this.interim[0];oe&=(224&oe)==192?31:(240&oe)==224?15:7;for(var ve=0,ye=void 0;(ye=63&this.interim[++ve])&&ve<4;)oe<<=6,oe|=ye;for(var me=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,ge=me-ve;re<ge;){if(re>=le)return 0;if((192&(ye=se[re++]))!=128){re--,ae=!0;break}this.interim[ve++]=ye,oe<<=6,oe|=63&ye}ae||(me===2?oe<128?re--:te[z++]=oe:me===3?oe<2048||oe>=55296&&oe<=57343||(te[z++]=oe):oe<65536||oe>1114111||(te[z++]=oe)),this.interim.fill(0)}for(var _e=le-4,he=re;he<le;){for(;!(!(he<_e)||128&(ee=se[he])||128&(ne=se[he+1])||128&(E=se[he+2])||128&(b=se[he+3]));)te[z++]=ee,te[z++]=ne,te[z++]=E,te[z++]=b,he+=4;if((ee=se[he++])<128)te[z++]=ee;else if((224&ee)==192){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if((x=(31&ee)<<6|63&ne)<128){he--;continue}te[z++]=x}else if((240&ee)==224){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,z;if((192&(E=se[he++]))!=128){he--;continue}if((x=(15&ee)<<12|(63&ne)<<6|63&E)<2048||x>=55296&&x<=57343)continue;te[z++]=x}else if((248&ee)==240){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,z;if((192&(E=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,this.interim[2]=E,z;if((192&(b=se[he++]))!=128){he--;continue}if((x=(7&ee)<<18|(63&ne)<<12|(63&E)<<6|63&b)<65536||x>1114111)continue;te[z++]=x}}return z},ue}();Se.Utf8ToUtf32=Ce},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.CHAR_ATLAS_CELL_SPACING=Se.DIM_OPACITY=Se.INVERTED_DEFAULT_COLOR=void 0,Se.INVERTED_DEFAULT_COLOR=257,Se.DIM_OPACITY=.5,Se.CHAR_ATLAS_CELL_SPACING=1},function(Dt,Se,ce){"use strict";var ie,Ce,ue,se;function te(ee){var ne=ee.toString(16);return ne.length<2?"0"+ne:ne}function le(ee,ne){return ee<ne?(ne+.05)/(ee+.05):(ee+.05)/(ne+.05)}Object.defineProperty(Se,"__esModule",{value:!0}),Se.contrastRatio=Se.toPaddedHex=Se.rgba=Se.rgb=Se.css=Se.color=Se.channels=void 0,function(ee){ee.toCss=function(ne,E,b,z){return z!==void 0?"#"+te(ne)+te(E)+te(b)+te(z):"#"+te(ne)+te(E)+te(b)},ee.toRgba=function(ne,E,b,z){return z===void 0&&(z=255),(ne<<24|E<<16|b<<8|z)>>>0}}(ie=Se.channels||(Se.channels={})),(Ce=Se.color||(Se.color={})).blend=function(ee,ne){var E=(255&ne.rgba)/255;if(E===1)return{css:ne.css,rgba:ne.rgba};var b=ne.rgba>>24&255,z=ne.rgba>>16&255,x=ne.rgba>>8&255,re=ee.rgba>>24&255,ae=ee.rgba>>16&255,oe=ee.rgba>>8&255,ve=re+Math.round((b-re)*E),ye=ae+Math.round((z-ae)*E),me=oe+Math.round((x-oe)*E);return{css:ie.toCss(ve,ye,me),rgba:ie.toRgba(ve,ye,me)}},Ce.isOpaque=function(ee){return(255&ee.rgba)==255},Ce.ensureContrastRatio=function(ee,ne,E){var b=se.ensureContrastRatio(ee.rgba,ne.rgba,E);if(b)return se.toColor(b>>24&255,b>>16&255,b>>8&255)},Ce.opaque=function(ee){var ne=(255|ee.rgba)>>>0,E=se.toChannels(ne),b=E[0],z=E[1],x=E[2];return{css:ie.toCss(b,z,x),rgba:ne}},Ce.opacity=function(ee,ne){var E=Math.round(255*ne),b=se.toChannels(ee.rgba),z=b[0],x=b[1],re=b[2];return{css:ie.toCss(z,x,re,E),rgba:ie.toRgba(z,x,re,E)}},(Se.css||(Se.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 ne(E,b,z){var x=E/255,re=b/255,ae=z/255;return .2126*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.7152*(re<=.03928?re/12.92:Math.pow((re+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:Math.pow((ae+.055)/1.055,2.4))}ee.relativeLuminance=function(E){return ne(E>>16&255,E>>8&255,255&E)},ee.relativeLuminance2=ne}(ue=Se.rgb||(Se.rgb={})),function(ee){function ne(b,z,x){for(var re=b>>24&255,ae=b>>16&255,oe=b>>8&255,ve=z>>24&255,ye=z>>16&255,me=z>>8&255,ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));ge<x&&(ve>0||ye>0||me>0);)ve-=Math.max(0,Math.ceil(.1*ve)),ye-=Math.max(0,Math.ceil(.1*ye)),me-=Math.max(0,Math.ceil(.1*me)),ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));return(ve<<24|ye<<16|me<<8|255)>>>0}function E(b,z,x){for(var re=b>>24&255,ae=b>>16&255,oe=b>>8&255,ve=z>>24&255,ye=z>>16&255,me=z>>8&255,ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));ge<x&&(ve<255||ye<255||me<255);)ve=Math.min(255,ve+Math.ceil(.1*(255-ve))),ye=Math.min(255,ye+Math.ceil(.1*(255-ye))),me=Math.min(255,me+Math.ceil(.1*(255-me))),ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));return(ve<<24|ye<<16|me<<8|255)>>>0}ee.ensureContrastRatio=function(b,z,x){var re=ue.relativeLuminance(b>>8),ae=ue.relativeLuminance(z>>8);if(le(re,ae)<x)return ae<re?ne(b,z,x):E(b,z,x)},ee.reduceLuminance=ne,ee.increaseLuminance=E,ee.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]},ee.toColor=function(b,z,x){return{css:ie.toCss(b,z,x),rgba:ie.toRgba(b,z,x)}}}(se=Se.rgba||(Se.rgba={})),Se.toPaddedHex=te,Se.contrastRatio=le},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.isLinux=Se.isWindows=Se.isIphone=Se.isIpad=Se.isMac=Se.isSafari=Se.isFirefox=void 0;var ie=typeof navigator=="undefined",Ce=ie?"node":navigator.userAgent,ue=ie?"node":navigator.platform;function se(te,le){return te.indexOf(le)>=0}Se.isFirefox=!!~Ce.indexOf("Firefox"),Se.isSafari=/^((?!chrome|android).)*safari/i.test(Ce),Se.isMac=se(["Macintosh","MacIntel","MacPPC","Mac68K"],ue),Se.isIpad=ue==="iPad",Se.isIphone=ue==="iPhone",Se.isWindows=se(["Windows","Win16","Win32","WinCE"],ue),Se.isLinux=ue.indexOf("Linux")>=0},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.C1=Se.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"}(Se.C0||(Se.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"}(Se.C1||(Se.C1={}))},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.BaseRenderLayer=void 0;var ie=ce(3),Ce=ce(9),ue=ce(25),se=ce(6),te=ce(28),le=ce(10),ee=ce(17),ne=function(){function E(b,z,x,re,ae,oe,ve,ye){this._container=b,this._alpha=re,this._colors=ae,this._rendererId=oe,this._bufferService=ve,this._optionsService=ye,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 b;ee.removeElementFromParent(this._canvas),(b=this._charAtlas)===null||b===void 0||b.dispose()},E.prototype._initCanvas=function(){this._ctx=te.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(b,z){},E.prototype.onSelectionChanged=function(b,z,x){x===void 0&&(x=!1)},E.prototype.setColors=function(b){this._refreshCharAtlas(b)},E.prototype._setTransparency=function(b){if(b!==this._alpha){var z=this._canvas;this._alpha=b,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(b){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=ue.acquireCharAtlas(this._optionsService.options,this._rendererId,b,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},E.prototype.resize=function(b){this._scaledCellWidth=b.scaledCellWidth,this._scaledCellHeight=b.scaledCellHeight,this._scaledCharWidth=b.scaledCharWidth,this._scaledCharHeight=b.scaledCharHeight,this._scaledCharLeft=b.scaledCharLeft,this._scaledCharTop=b.scaledCharTop,this._canvas.width=b.scaledCanvasWidth,this._canvas.height=b.scaledCanvasHeight,this._canvas.style.width=b.canvasWidth+"px",this._canvas.style.height=b.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},E.prototype._fillCells=function(b,z,x,re){this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight)},E.prototype._fillBottomLineAtCells=function(b,z,x){x===void 0&&(x=1),this._ctx.fillRect(b*this._scaledCellWidth,(z+1)*this._scaledCellHeight-window.devicePixelRatio-1,x*this._scaledCellWidth,window.devicePixelRatio)},E.prototype._fillLeftLineAtCell=function(b,z,x){this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,window.devicePixelRatio*x,this._scaledCellHeight)},E.prototype._strokeRectAtCell=function(b,z,x,re){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(b*this._scaledCellWidth+window.devicePixelRatio/2,z*this._scaledCellHeight+window.devicePixelRatio/2,x*this._scaledCellWidth-window.devicePixelRatio,re*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(b,z,x,re){this._alpha?this._ctx.clearRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight))},E.prototype._fillCharTrueColor=function(b,z,x){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(x),this._ctx.fillText(b.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},E.prototype._drawChars=function(b,z,x){var re,ae,oe=this._getContrastColor(b);oe||b.isFgRGB()||b.isBgRGB()?this._drawUncachedChars(b,z,x,oe):(b.isInverse()?(re=b.isBgDefault()?Ce.INVERTED_DEFAULT_COLOR:b.getBgColor(),ae=b.isFgDefault()?Ce.INVERTED_DEFAULT_COLOR:b.getFgColor()):(ae=b.isBgDefault()?ie.DEFAULT_COLOR:b.getBgColor(),re=b.isFgDefault()?ie.DEFAULT_COLOR:b.getFgColor()),re+=this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&re<8?8:0,this._currentGlyphIdentifier.chars=b.getChars()||ie.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=b.getCode()||ie.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ae,this._currentGlyphIdentifier.fg=re,this._currentGlyphIdentifier.bold=!!b.isBold(),this._currentGlyphIdentifier.dim=!!b.isDim(),this._currentGlyphIdentifier.italic=!!b.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(b,z,x))},E.prototype._drawUncachedChars=function(b,z,x,re){if(this._ctx.save(),this._ctx.font=this._getFont(!!b.isBold(),!!b.isItalic()),this._ctx.textBaseline="middle",b.isInverse())if(re)this._ctx.fillStyle=re.css;else if(b.isBgDefault())this._ctx.fillStyle=le.color.opaque(this._colors.background).css;else if(b.isBgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(b.getBgColor()).join(",")+")";else{var ae=b.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&ae<8&&(ae+=8),this._ctx.fillStyle=this._colors.ansi[ae].css}else if(re)this._ctx.fillStyle=re.css;else if(b.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(b.isFgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(b.getFgColor()).join(",")+")";else{var oe=b.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&oe<8&&(oe+=8),this._ctx.fillStyle=this._colors.ansi[oe].css}this._clipRow(x),b.isDim()&&(this._ctx.globalAlpha=Ce.DIM_OPACITY),this._ctx.fillText(b.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},E.prototype._clipRow=function(b){this._ctx.beginPath(),this._ctx.rect(0,b*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},E.prototype._getFont=function(b,z){return(z?"italic":"")+" "+(b?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},E.prototype._getContrastColor=function(b){if(this._optionsService.options.minimumContrastRatio!==1){var z=this._colors.contrastCache.getColor(b.bg,b.fg);if(z!==void 0)return z||void 0;var x=b.getFgColor(),re=b.getFgColorMode(),ae=b.getBgColor(),oe=b.getBgColorMode(),ve=!!b.isInverse(),ye=!!b.isInverse();if(ve){var me=x;x=ae,ae=me;var ge=re;re=oe,oe=ge}var _e=this._resolveBackgroundRgba(oe,ae,ve),he=this._resolveForegroundRgba(re,x,ve,ye),pe=le.rgba.ensureContrastRatio(_e,he,this._optionsService.options.minimumContrastRatio);if(pe){var ke={css:le.channels.toCss(pe>>24&255,pe>>16&255,pe>>8&255),rgba:pe};return this._colors.contrastCache.setColor(b.bg,b.fg,ke),ke}this._colors.contrastCache.setColor(b.bg,b.fg,null)}},E.prototype._resolveBackgroundRgba=function(b,z,x){switch(b){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(b,z,x,re){switch(b){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&re&&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}();Se.BaseRenderLayer=ne},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.createDecorator=Se.getServiceDependencies=Se.serviceRegistry=void 0;function ie(Ce,ue,se){ue.di$target===ue?ue.di$dependencies.push({id:Ce,index:se}):(ue.di$dependencies=[{id:Ce,index:se}],ue.di$target=ue)}Se.serviceRegistry=new Map,Se.getServiceDependencies=function(Ce){return Ce.di$dependencies||[]},Se.createDecorator=function(Ce){if(Se.serviceRegistry.has(Ce))return Se.serviceRegistry.get(Ce);var ue=function(se,te,le){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ie(ue,se,le)};return ue.toString=function(){return Ce},Se.serviceRegistry.set(Ce,ue),ue}},function(Dt,Se,ce){"use strict";function ie(Ce,ue,se,te){if(se===void 0&&(se=0),te===void 0&&(te=Ce.length),se>=Ce.length)return Ce;se=(Ce.length+se)%Ce.length,te=te>=Ce.length?Ce.length:(Ce.length+te)%Ce.length;for(var le=se;le<te;++le)Ce[le]=ue;return Ce}Object.defineProperty(Se,"__esModule",{value:!0}),Se.concat=Se.fillFallback=Se.fill=void 0,Se.fill=function(Ce,ue,se,te){return Ce.fill?Ce.fill(ue,se,te):ie(Ce,ue,se,te)},Se.fillFallback=ie,Se.concat=function(Ce,ue){var se=new Ce.constructor(Ce.length+ue.length);return se.set(Ce),se.set(ue,Ce.length),se}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.BufferLine=Se.DEFAULT_ATTR_DATA=void 0;var ie=ce(8),Ce=ce(3),ue=ce(4),se=ce(6);Se.DEFAULT_ATTR_DATA=Object.freeze(new se.AttributeData);var te=function(){function le(ee,ne,E){E===void 0&&(E=!1),this.isWrapped=E,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ee);for(var b=ne||ue.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),z=0;z<ee;++z)this.setCell(z,b);this.length=ee}return le.prototype.get=function(ee){var ne=this._data[3*ee+0],E=2097151&ne;return[this._data[3*ee+1],2097152&ne?this._combined[ee]:E?ie.stringFromCodePoint(E):"",ne>>22,2097152&ne?this._combined[ee].charCodeAt(this._combined[ee].length-1):E]},le.prototype.set=function(ee,ne){this._data[3*ee+1]=ne[Ce.CHAR_DATA_ATTR_INDEX],ne[Ce.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ee]=ne[1],this._data[3*ee+0]=2097152|ee|ne[Ce.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ee+0]=ne[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ne[Ce.CHAR_DATA_WIDTH_INDEX]<<22},le.prototype.getWidth=function(ee){return this._data[3*ee+0]>>22},le.prototype.hasWidth=function(ee){return 12582912&this._data[3*ee+0]},le.prototype.getFg=function(ee){return this._data[3*ee+1]},le.prototype.getBg=function(ee){return this._data[3*ee+2]},le.prototype.hasContent=function(ee){return 4194303&this._data[3*ee+0]},le.prototype.getCodePoint=function(ee){var ne=this._data[3*ee+0];return 2097152&ne?this._combined[ee].charCodeAt(this._combined[ee].length-1):2097151&ne},le.prototype.isCombined=function(ee){return 2097152&this._data[3*ee+0]},le.prototype.getString=function(ee){var ne=this._data[3*ee+0];return 2097152&ne?this._combined[ee]:2097151&ne?ie.stringFromCodePoint(2097151&ne):""},le.prototype.loadCell=function(ee,ne){var E=3*ee;return ne.content=this._data[E+0],ne.fg=this._data[E+1],ne.bg=this._data[E+2],2097152&ne.content&&(ne.combinedData=this._combined[ee]),268435456&ne.bg&&(ne.extended=this._extendedAttrs[ee]),ne},le.prototype.setCell=function(ee,ne){2097152&ne.content&&(this._combined[ee]=ne.combinedData),268435456&ne.bg&&(this._extendedAttrs[ee]=ne.extended),this._data[3*ee+0]=ne.content,this._data[3*ee+1]=ne.fg,this._data[3*ee+2]=ne.bg},le.prototype.setCellFromCodePoint=function(ee,ne,E,b,z,x){268435456&z&&(this._extendedAttrs[ee]=x),this._data[3*ee+0]=ne|E<<22,this._data[3*ee+1]=b,this._data[3*ee+2]=z},le.prototype.addCodepointToCell=function(ee,ne){var E=this._data[3*ee+0];2097152&E?this._combined[ee]+=ie.stringFromCodePoint(ne):(2097151&E?(this._combined[ee]=ie.stringFromCodePoint(2097151&E)+ie.stringFromCodePoint(ne),E&=-2097152,E|=2097152):E=ne|1<<22,this._data[3*ee+0]=E)},le.prototype.insertCells=function(ee,ne,E,b){if((ee%=this.length)&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),ne<this.length-ee){for(var z=new ue.CellData,x=this.length-ee-ne-1;x>=0;--x)this.setCell(ee+ne+x,this.loadCell(ee+x,z));for(x=0;x<ne;++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,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs)},le.prototype.deleteCells=function(ee,ne,E,b){if(ee%=this.length,ne<this.length-ee){for(var z=new ue.CellData,x=0;x<this.length-ee-ne;++x)this.setCell(ee+x,this.loadCell(ee+ne+x,z));for(x=this.length-ne;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,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),this.getWidth(ee)!==0||this.hasContent(ee)||this.setCellFromCodePoint(ee,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs)},le.prototype.replaceCells=function(ee,ne,E,b){for(ee&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),ne<this.length&&this.getWidth(ne-1)===2&&this.setCellFromCodePoint(ne,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs);ee<ne&&ee<this.length;)this.setCell(ee++,E)},le.prototype.resize=function(ee,ne){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 b=this.length;b<ee;++b)this.setCell(b,ne)}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(b=0;b<z.length;b++){var x=parseInt(z[b],10);x>=ee&&delete this._combined[x]}}else this._data=new Uint32Array(0),this._combined={};this.length=ee}},le.prototype.fill=function(ee){this._combined={},this._extendedAttrs={};for(var ne=0;ne<this.length;++ne)this.setCell(ne,ee)},le.prototype.copyFrom=function(ee){for(var ne 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[ne]=ee._combined[ne];for(var ne in this._extendedAttrs={},ee._extendedAttrs)this._extendedAttrs[ne]=ee._extendedAttrs[ne];this.isWrapped=ee.isWrapped},le.prototype.clone=function(){var ee=new le(0);for(var ne in ee._data=new Uint32Array(this._data),ee.length=this.length,this._combined)ee._combined[ne]=this._combined[ne];for(var ne in this._extendedAttrs)ee._extendedAttrs[ne]=this._extendedAttrs[ne];return ee.isWrapped=this.isWrapped,ee},le.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},le.prototype.copyCellsFrom=function(ee,ne,E,b,z){var x=ee._data;if(z)for(var re=b-1;re>=0;re--)for(var ae=0;ae<3;ae++)this._data[3*(E+re)+ae]=x[3*(ne+re)+ae];else for(re=0;re<b;re++)for(ae=0;ae<3;ae++)this._data[3*(E+re)+ae]=x[3*(ne+re)+ae];var oe=Object.keys(ee._combined);for(ae=0;ae<oe.length;ae++){var ve=parseInt(oe[ae],10);ve>=ne&&(this._combined[ve-ne+E]=ee._combined[ve])}},le.prototype.translateToString=function(ee,ne,E){ee===void 0&&(ee=!1),ne===void 0&&(ne=0),E===void 0&&(E=this.length),ee&&(E=Math.min(E,this.getTrimmedLength()));for(var b="";ne<E;){var z=this._data[3*ne+0],x=2097151&z;b+=2097152&z?this._combined[ne]:x?ie.stringFromCodePoint(x):Ce.WHITESPACE_CELL_CHAR,ne+=z>>22||1}return b},le}();Se.BufferLine=te},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.removeElementFromParent=void 0,Se.removeElementFromParent=function(){for(var ie,Ce=[],ue=0;ue<arguments.length;ue++)Ce[ue]=arguments[ue];for(var se=0,te=Ce;se<te.length;se++){var le=te[se];(ie=le==null?void 0:le.parentElement)===null||ie===void 0||ie.removeChild(le)}}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.tooMuchOutput=Se.promptLabel=void 0,Se.promptLabel="Terminal input",Se.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(he,pe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Te){ke.__proto__=Te}||function(ke,Te){for(var Ee in Te)Te.hasOwnProperty(Ee)&&(ke[Ee]=Te[Ee])})(he,pe)},function(he,pe){function ke(){this.constructor=he}ie(he,pe),he.prototype=pe===null?Object.create(pe):(ke.prototype=pe.prototype,new ke)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.InputHandler=Se.WindowsOptionsReportType=void 0;var ue,se=ce(12),te=ce(20),le=ce(39),ee=ce(2),ne=ce(15),E=ce(8),b=ce(16),z=ce(0),x=ce(3),re=ce(4),ae=ce(6),oe=ce(22),ve=ce(24),ye={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function me(he,pe){if(he>24)return pe.setWinLines||!1;switch(he){case 1:return!!pe.restoreWin;case 2:return!!pe.minimizeWin;case 3:return!!pe.setWinPosition;case 4:return!!pe.setWinSizePixels;case 5:return!!pe.raiseWin;case 6:return!!pe.lowerWin;case 7:return!!pe.refreshWin;case 8:return!!pe.setWinSizeChars;case 9:return!!pe.maximizeWin;case 10:return!!pe.fullscreenWin;case 11:return!!pe.getWinState;case 13:return!!pe.getWinPosition;case 14:return!!pe.getWinSizePixels;case 15:return!!pe.getScreenSizePixels;case 16:return!!pe.getCellSizePixels;case 18:return!!pe.getWinSizeChars;case 19:return!!pe.getScreenSizeChars;case 20:return!!pe.getIconTitle;case 21:return!!pe.getWinTitle;case 22:return!!pe.pushTitle;case 23:return!!pe.popTitle;case 24:return!!pe.setWinLines}return!1}(function(he){he[he.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",he[he.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(ue=Se.WindowsOptionsReportType||(Se.WindowsOptionsReportType={}));var ge=function(){function he(pe,ke,Te,Ee){this._bufferService=pe,this._coreService=ke,this._logService=Te,this._optionsService=Ee,this._data=new Uint32Array(0)}return he.prototype.hook=function(pe){this._data=new Uint32Array(0)},he.prototype.put=function(pe,ke,Te){this._data=ne.concat(this._data,pe.subarray(ke,Te))},he.prototype.unhook=function(pe){if(pe){var ke=E.utf32ToString(this._data);switch(this._data=new Uint32Array(0),ke){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 Te=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+Te+se.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r0m"+se.C0.ESC+"\\");case" q":var Ee={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Ee-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+Ee+" q"+se.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",ke),this._coreService.triggerDataEvent(se.C0.ESC+"P0$r"+se.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},he}(),_e=function(he){function pe(ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot){ot===void 0&&(ot=new le.EscapeSequenceParser);var We=he.call(this)||this;We._bufferService=ke,We._charsetService=Te,We._coreService=Ee,We._dirtyRowService=Oe,We._logService=je,We._optionsService=Pe,We._coreMouseService=Qe,We._unicodeService=Xe,We._parser=ot,We._parseBuffer=new Uint32Array(4096),We._stringDecoder=new E.StringToUtf32,We._utf8Decoder=new E.Utf8ToUtf32,We._workCell=new re.CellData,We._windowTitle="",We._iconName="",We._windowTitleStack=[],We._iconNameStack=[],We._curAttrData=b.DEFAULT_ATTR_DATA.clone(),We._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),We._onRequestBell=new z.EventEmitter,We._onRequestRefreshRows=new z.EventEmitter,We._onRequestReset=new z.EventEmitter,We._onRequestScroll=new z.EventEmitter,We._onRequestSyncScrollBar=new z.EventEmitter,We._onRequestWindowsOptionsReport=new z.EventEmitter,We._onA11yChar=new z.EventEmitter,We._onA11yTab=new z.EventEmitter,We._onCursorMove=new z.EventEmitter,We._onLineFeed=new z.EventEmitter,We._onScroll=new z.EventEmitter,We._onTitleChange=new z.EventEmitter,We.register(We._parser),We._parser.setCsiHandlerFallback(function(Ge,ze){We._logService.debug("Unknown CSI code: ",{identifier:We._parser.identToString(Ge),params:ze.toArray()})}),We._parser.setEscHandlerFallback(function(Ge){We._logService.debug("Unknown ESC code: ",{identifier:We._parser.identToString(Ge)})}),We._parser.setExecuteHandlerFallback(function(Ge){We._logService.debug("Unknown EXECUTE code: ",{code:Ge})}),We._parser.setOscHandlerFallback(function(Ge,ze,Ve){We._logService.debug("Unknown OSC code: ",{identifier:Ge,action:ze,data:Ve})}),We._parser.setDcsHandlerFallback(function(Ge,ze,Ve){ze==="HOOK"&&(Ve=Ve.toArray()),We._logService.debug("Unknown DCS code: ",{identifier:We._parser.identToString(Ge),action:ze,payload:Ve})}),We._parser.setPrintHandler(function(Ge,ze,Ve){return We.print(Ge,ze,Ve)}),We._parser.setCsiHandler({final:"@"},function(Ge){return We.insertChars(Ge)}),We._parser.setCsiHandler({intermediates:" ",final:"@"},function(Ge){return We.scrollLeft(Ge)}),We._parser.setCsiHandler({final:"A"},function(Ge){return We.cursorUp(Ge)}),We._parser.setCsiHandler({intermediates:" ",final:"A"},function(Ge){return We.scrollRight(Ge)}),We._parser.setCsiHandler({final:"B"},function(Ge){return We.cursorDown(Ge)}),We._parser.setCsiHandler({final:"C"},function(Ge){return We.cursorForward(Ge)}),We._parser.setCsiHandler({final:"D"},function(Ge){return We.cursorBackward(Ge)}),We._parser.setCsiHandler({final:"E"},function(Ge){return We.cursorNextLine(Ge)}),We._parser.setCsiHandler({final:"F"},function(Ge){return We.cursorPrecedingLine(Ge)}),We._parser.setCsiHandler({final:"G"},function(Ge){return We.cursorCharAbsolute(Ge)}),We._parser.setCsiHandler({final:"H"},function(Ge){return We.cursorPosition(Ge)}),We._parser.setCsiHandler({final:"I"},function(Ge){return We.cursorForwardTab(Ge)}),We._parser.setCsiHandler({final:"J"},function(Ge){return We.eraseInDisplay(Ge)}),We._parser.setCsiHandler({prefix:"?",final:"J"},function(Ge){return We.eraseInDisplay(Ge)}),We._parser.setCsiHandler({final:"K"},function(Ge){return We.eraseInLine(Ge)}),We._parser.setCsiHandler({prefix:"?",final:"K"},function(Ge){return We.eraseInLine(Ge)}),We._parser.setCsiHandler({final:"L"},function(Ge){return We.insertLines(Ge)}),We._parser.setCsiHandler({final:"M"},function(Ge){return We.deleteLines(Ge)}),We._parser.setCsiHandler({final:"P"},function(Ge){return We.deleteChars(Ge)}),We._parser.setCsiHandler({final:"S"},function(Ge){return We.scrollUp(Ge)}),We._parser.setCsiHandler({final:"T"},function(Ge){return We.scrollDown(Ge)}),We._parser.setCsiHandler({final:"X"},function(Ge){return We.eraseChars(Ge)}),We._parser.setCsiHandler({final:"Z"},function(Ge){return We.cursorBackwardTab(Ge)}),We._parser.setCsiHandler({final:"`"},function(Ge){return We.charPosAbsolute(Ge)}),We._parser.setCsiHandler({final:"a"},function(Ge){return We.hPositionRelative(Ge)}),We._parser.setCsiHandler({final:"b"},function(Ge){return We.repeatPrecedingCharacter(Ge)}),We._parser.setCsiHandler({final:"c"},function(Ge){return We.sendDeviceAttributesPrimary(Ge)}),We._parser.setCsiHandler({prefix:">",final:"c"},function(Ge){return We.sendDeviceAttributesSecondary(Ge)}),We._parser.setCsiHandler({final:"d"},function(Ge){return We.linePosAbsolute(Ge)}),We._parser.setCsiHandler({final:"e"},function(Ge){return We.vPositionRelative(Ge)}),We._parser.setCsiHandler({final:"f"},function(Ge){return We.hVPosition(Ge)}),We._parser.setCsiHandler({final:"g"},function(Ge){return We.tabClear(Ge)}),We._parser.setCsiHandler({final:"h"},function(Ge){return We.setMode(Ge)}),We._parser.setCsiHandler({prefix:"?",final:"h"},function(Ge){return We.setModePrivate(Ge)}),We._parser.setCsiHandler({final:"l"},function(Ge){return We.resetMode(Ge)}),We._parser.setCsiHandler({prefix:"?",final:"l"},function(Ge){return We.resetModePrivate(Ge)}),We._parser.setCsiHandler({final:"m"},function(Ge){return We.charAttributes(Ge)}),We._parser.setCsiHandler({final:"n"},function(Ge){return We.deviceStatus(Ge)}),We._parser.setCsiHandler({prefix:"?",final:"n"},function(Ge){return We.deviceStatusPrivate(Ge)}),We._parser.setCsiHandler({intermediates:"!",final:"p"},function(Ge){return We.softReset(Ge)}),We._parser.setCsiHandler({intermediates:" ",final:"q"},function(Ge){return We.setCursorStyle(Ge)}),We._parser.setCsiHandler({final:"r"},function(Ge){return We.setScrollRegion(Ge)}),We._parser.setCsiHandler({final:"s"},function(Ge){return We.saveCursor(Ge)}),We._parser.setCsiHandler({final:"t"},function(Ge){return We.windowOptions(Ge)}),We._parser.setCsiHandler({final:"u"},function(Ge){return We.restoreCursor(Ge)}),We._parser.setCsiHandler({intermediates:"'",final:"}"},function(Ge){return We.insertColumns(Ge)}),We._parser.setCsiHandler({intermediates:"'",final:"~"},function(Ge){return We.deleteColumns(Ge)}),We._parser.setExecuteHandler(se.C0.BEL,function(){return We.bell()}),We._parser.setExecuteHandler(se.C0.LF,function(){return We.lineFeed()}),We._parser.setExecuteHandler(se.C0.VT,function(){return We.lineFeed()}),We._parser.setExecuteHandler(se.C0.FF,function(){return We.lineFeed()}),We._parser.setExecuteHandler(se.C0.CR,function(){return We.carriageReturn()}),We._parser.setExecuteHandler(se.C0.BS,function(){return We.backspace()}),We._parser.setExecuteHandler(se.C0.HT,function(){return We.tab()}),We._parser.setExecuteHandler(se.C0.SO,function(){return We.shiftOut()}),We._parser.setExecuteHandler(se.C0.SI,function(){return We.shiftIn()}),We._parser.setExecuteHandler(se.C1.IND,function(){return We.index()}),We._parser.setExecuteHandler(se.C1.NEL,function(){return We.nextLine()}),We._parser.setExecuteHandler(se.C1.HTS,function(){return We.tabSet()}),We._parser.setOscHandler(0,new oe.OscHandler(function(Ge){We.setTitle(Ge),We.setIconName(Ge)})),We._parser.setOscHandler(1,new oe.OscHandler(function(Ge){return We.setIconName(Ge)})),We._parser.setOscHandler(2,new oe.OscHandler(function(Ge){return We.setTitle(Ge)})),We._parser.setEscHandler({final:"7"},function(){return We.saveCursor()}),We._parser.setEscHandler({final:"8"},function(){return We.restoreCursor()}),We._parser.setEscHandler({final:"D"},function(){return We.index()}),We._parser.setEscHandler({final:"E"},function(){return We.nextLine()}),We._parser.setEscHandler({final:"H"},function(){return We.tabSet()}),We._parser.setEscHandler({final:"M"},function(){return We.reverseIndex()}),We._parser.setEscHandler({final:"="},function(){return We.keypadApplicationMode()}),We._parser.setEscHandler({final:">"},function(){return We.keypadNumericMode()}),We._parser.setEscHandler({final:"c"},function(){return We.fullReset()}),We._parser.setEscHandler({final:"n"},function(){return We.setgLevel(2)}),We._parser.setEscHandler({final:"o"},function(){return We.setgLevel(3)}),We._parser.setEscHandler({final:"|"},function(){return We.setgLevel(3)}),We._parser.setEscHandler({final:"}"},function(){return We.setgLevel(2)}),We._parser.setEscHandler({final:"~"},function(){return We.setgLevel(1)}),We._parser.setEscHandler({intermediates:"%",final:"@"},function(){return We.selectDefaultCharset()}),We._parser.setEscHandler({intermediates:"%",final:"G"},function(){return We.selectDefaultCharset()});var rt=function(Ge){Ye._parser.setEscHandler({intermediates:"(",final:Ge},function(){return We.selectCharset("("+Ge)}),Ye._parser.setEscHandler({intermediates:")",final:Ge},function(){return We.selectCharset(")"+Ge)}),Ye._parser.setEscHandler({intermediates:"*",final:Ge},function(){return We.selectCharset("*"+Ge)}),Ye._parser.setEscHandler({intermediates:"+",final:Ge},function(){return We.selectCharset("+"+Ge)}),Ye._parser.setEscHandler({intermediates:"-",final:Ge},function(){return We.selectCharset("-"+Ge)}),Ye._parser.setEscHandler({intermediates:".",final:Ge},function(){return We.selectCharset("."+Ge)}),Ye._parser.setEscHandler({intermediates:"/",final:Ge},function(){return We.selectCharset("/"+Ge)})},Ye=this;for(var ut in te.CHARSETS)rt(ut);return We._parser.setEscHandler({intermediates:"#",final:"8"},function(){return We.screenAlignmentPattern()}),We._parser.setErrorHandler(function(Ge){return We._logService.error("Parsing error: ",Ge),Ge}),We._parser.setDcsHandler({intermediates:"$",final:"q"},new ge(We._bufferService,We._coreService,We._logService,We._optionsService)),We}return Ce(pe,he),Object.defineProperty(pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),pe.prototype.dispose=function(){he.prototype.dispose.call(this)},pe.prototype.parse=function(ke){var Te=this._bufferService.buffer,Ee=Te.x,Oe=Te.y;if(this._logService.debug("parsing data",ke),this._parseBuffer.length<ke.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(ke.length,131072))),this._dirtyRowService.clearRange(),ke.length>131072)for(var je=0;je<ke.length;je+=131072){var Pe=je+131072<ke.length?je+131072:ke.length,Qe=typeof ke=="string"?this._stringDecoder.decode(ke.substring(je,Pe),this._parseBuffer):this._utf8Decoder.decode(ke.subarray(je,Pe),this._parseBuffer);this._parser.parse(this._parseBuffer,Qe)}else Qe=typeof ke=="string"?this._stringDecoder.decode(ke,this._parseBuffer):this._utf8Decoder.decode(ke,this._parseBuffer),this._parser.parse(this._parseBuffer,Qe);(Te=this._bufferService.buffer).x===Ee&&Te.y===Oe||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},pe.prototype.print=function(ke,Te,Ee){var Oe,je,Pe=this._bufferService.buffer,Qe=this._charsetService.charset,Xe=this._optionsService.options.screenReaderMode,ot=this._bufferService.cols,We=this._coreService.decPrivateModes.wraparound,rt=this._coreService.modes.insertMode,Ye=this._curAttrData,ut=Pe.lines.get(Pe.ybase+Pe.y);this._dirtyRowService.markDirty(Pe.y),Pe.x&&Ee-Te>0&&ut.getWidth(Pe.x-1)===2&&ut.setCellFromCodePoint(Pe.x-1,0,1,Ye.fg,Ye.bg,Ye.extended);for(var Ge=Te;Ge<Ee;++Ge){if(Oe=ke[Ge],je=this._unicodeService.wcwidth(Oe),Oe<127&&Qe){var ze=Qe[String.fromCharCode(Oe)];ze&&(Oe=ze.charCodeAt(0))}if(Xe&&this._onA11yChar.fire(E.stringFromCodePoint(Oe)),je||!Pe.x){if(Pe.x+je-1>=ot){if(We){for(;Pe.x<ot;)ut.setCellFromCodePoint(Pe.x++,0,1,Ye.fg,Ye.bg,Ye.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),ut=Pe.lines.get(Pe.ybase+Pe.y)}else if(Pe.x=ot-1,je===2)continue}if(rt&&(ut.insertCells(Pe.x,je,Pe.getNullCell(Ye),Ye),ut.getWidth(ot-1)===2&&ut.setCellFromCodePoint(ot-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,Ye.fg,Ye.bg,Ye.extended)),ut.setCellFromCodePoint(Pe.x++,Oe,je,Ye.fg,Ye.bg,Ye.extended),je>0)for(;--je;)ut.setCellFromCodePoint(Pe.x++,0,0,Ye.fg,Ye.bg,Ye.extended)}else ut.getWidth(Pe.x-1)?ut.addCodepointToCell(Pe.x-1,Oe):ut.addCodepointToCell(Pe.x-2,Oe)}Ee-Te>0&&(ut.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&&Ee-Te>0&&ut.getWidth(Pe.x)===0&&!ut.hasContent(Pe.x)&&ut.setCellFromCodePoint(Pe.x,0,1,Ye.fg,Ye.bg,Ye.extended),this._dirtyRowService.markDirty(Pe.y)},pe.prototype.addCsiHandler=function(ke,Te){var Ee=this;return ke.final!=="t"||ke.prefix||ke.intermediates?this._parser.addCsiHandler(ke,Te):this._parser.addCsiHandler(ke,function(Oe){return!me(Oe.params[0],Ee._optionsService.options.windowOptions)||Te(Oe)})},pe.prototype.addDcsHandler=function(ke,Te){return this._parser.addDcsHandler(ke,new ve.DcsHandler(Te))},pe.prototype.addEscHandler=function(ke,Te){return this._parser.addEscHandler(ke,Te)},pe.prototype.addOscHandler=function(ke,Te){return this._parser.addOscHandler(ke,new oe.OscHandler(Te))},pe.prototype.bell=function(){this._onRequestBell.fire()},pe.prototype.lineFeed=function(){var ke=this._bufferService.buffer;this._dirtyRowService.markDirty(ke.y),this._optionsService.options.convertEol&&(ke.x=0),ke.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),ke.x>=this._bufferService.cols&&ke.x--,this._dirtyRowService.markDirty(ke.y),this._onLineFeed.fire()},pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},pe.prototype.backspace=function(){var ke,Te=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Te.x>0&&Te.x--);if(this._restrictCursor(this._bufferService.cols),Te.x>0)Te.x--;else if(Te.x===0&&Te.y>Te.scrollTop&&Te.y<=Te.scrollBottom&&(!((ke=Te.lines.get(Te.ybase+Te.y))===null||ke===void 0)&&ke.isWrapped)){Te.lines.get(Te.ybase+Te.y).isWrapped=!1,Te.y--,Te.x=this._bufferService.cols-1;var Ee=Te.lines.get(Te.ybase+Te.y);Ee.hasWidth(Te.x)&&!Ee.hasContent(Te.x)&&Te.x--}this._restrictCursor()},pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var ke=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-ke)}},pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},pe.prototype._restrictCursor=function(ke){ke===void 0&&(ke=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(ke,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)},pe.prototype._setCursor=function(ke,Te){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Te):(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=Te),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},pe.prototype._moveCursor=function(ke,Te){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+ke,this._bufferService.buffer.y+Te)},pe.prototype.cursorUp=function(ke){var Te=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Te>=0?this._moveCursor(0,-Math.min(Te,ke.params[0]||1)):this._moveCursor(0,-(ke.params[0]||1))},pe.prototype.cursorDown=function(ke){var Te=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Te>=0?this._moveCursor(0,Math.min(Te,ke.params[0]||1)):this._moveCursor(0,ke.params[0]||1)},pe.prototype.cursorForward=function(ke){this._moveCursor(ke.params[0]||1,0)},pe.prototype.cursorBackward=function(ke){this._moveCursor(-(ke.params[0]||1),0)},pe.prototype.cursorNextLine=function(ke){this.cursorDown(ke),this._bufferService.buffer.x=0},pe.prototype.cursorPrecedingLine=function(ke){this.cursorUp(ke),this._bufferService.buffer.x=0},pe.prototype.cursorCharAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},pe.prototype.cursorPosition=function(ke){this._setCursor(ke.length>=2?(ke.params[1]||1)-1:0,(ke.params[0]||1)-1)},pe.prototype.charPosAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},pe.prototype.hPositionRelative=function(ke){this._moveCursor(ke.params[0]||1,0)},pe.prototype.linePosAbsolute=function(ke){this._setCursor(this._bufferService.buffer.x,(ke.params[0]||1)-1)},pe.prototype.vPositionRelative=function(ke){this._moveCursor(0,ke.params[0]||1)},pe.prototype.hVPosition=function(ke){this.cursorPosition(ke)},pe.prototype.tabClear=function(ke){var Te=ke.params[0];Te===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Te===3&&(this._bufferService.buffer.tabs={})},pe.prototype.cursorForwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Te=ke.params[0]||1;Te--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},pe.prototype.cursorBackwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.x=Ee.prevStop()},pe.prototype._eraseInBufferLine=function(ke,Te,Ee,Oe){Oe===void 0&&(Oe=!1);var je=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);je.replaceCells(Te,Ee,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Oe&&(je.isWrapped=!1)},pe.prototype._resetBufferLine=function(ke){var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Te.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Te.isWrapped=!1},pe.prototype.eraseInDisplay=function(ke){var Te;switch(this._restrictCursor(),ke.params[0]){case 0:for(Te=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Te),this._eraseInBufferLine(Te++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Te<this._bufferService.rows;Te++)this._resetBufferLine(Te);this._dirtyRowService.markDirty(Te);break;case 1:for(Te=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Te),this._eraseInBufferLine(Te,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Te+1).isWrapped=!1);Te--;)this._resetBufferLine(Te);this._dirtyRowService.markDirty(0);break;case 2:for(Te=this._bufferService.rows,this._dirtyRowService.markDirty(Te-1);Te--;)this._resetBufferLine(Te);this._dirtyRowService.markDirty(0);break;case 3:var Ee=this._bufferService.buffer.lines.length-this._bufferService.rows;Ee>0&&(this._bufferService.buffer.lines.trimStart(Ee),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Ee,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Ee,0),this._onScroll.fire(0))}},pe.prototype.eraseInLine=function(ke){switch(this._restrictCursor(),ke.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)},pe.prototype.insertLines=function(ke){this._restrictCursor();var Te=ke.params[0]||1,Ee=this._bufferService.buffer;if(!(Ee.y>Ee.scrollBottom||Ee.y<Ee.scrollTop)){for(var Oe=Ee.ybase+Ee.y,je=this._bufferService.rows-1-Ee.scrollBottom,Pe=this._bufferService.rows-1+Ee.ybase-je+1;Te--;)Ee.lines.splice(Pe-1,1),Ee.lines.splice(Oe,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.y,Ee.scrollBottom),Ee.x=0}},pe.prototype.deleteLines=function(ke){this._restrictCursor();var Te=ke.params[0]||1,Ee=this._bufferService.buffer;if(!(Ee.y>Ee.scrollBottom||Ee.y<Ee.scrollTop)){var Oe,je=Ee.ybase+Ee.y;for(Oe=this._bufferService.rows-1-Ee.scrollBottom,Oe=this._bufferService.rows-1+Ee.ybase-Oe;Te--;)Ee.lines.splice(je,1),Ee.lines.splice(Oe,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.y,Ee.scrollBottom),Ee.x=0}},pe.prototype.insertChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.insertCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.deleteChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.deleteCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.scrollUp=function(ke){for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.lines.splice(Ee.ybase+Ee.scrollTop,1),Ee.lines.splice(Ee.ybase+Ee.scrollBottom,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.scrollTop,Ee.scrollBottom)},pe.prototype.scrollDown=function(ke){for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.lines.splice(Ee.ybase+Ee.scrollBottom,1),Ee.lines.splice(Ee.ybase+Ee.scrollTop,0,Ee.getBlankLine(b.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Ee.scrollTop,Ee.scrollBottom)},pe.prototype.scrollLeft=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.deleteCells(0,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.scrollRight=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.insertCells(0,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.insertColumns=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=this._bufferService.buffer.lines.get(Te.ybase+Oe);je.insertCells(Te.x,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.deleteColumns=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.deleteCells(Te.x,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.eraseChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(ke.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.repeatPrecedingCharacter=function(ke){if(this._parser.precedingCodepoint){for(var Te=ke.params[0]||1,Ee=new Uint32Array(Te),Oe=0;Oe<Te;++Oe)Ee[Oe]=this._parser.precedingCodepoint;this.print(Ee,0,Ee.length)}},pe.prototype.sendDeviceAttributesPrimary=function(ke){ke.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"))},pe.prototype.sendDeviceAttributesSecondary=function(ke){ke.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(ke.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(se.C0.ESC+"[>83;40003;0c"))},pe.prototype._is=function(ke){return(this._optionsService.options.termName+"").indexOf(ke)===0},pe.prototype.setMode=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 4:this._coreService.modes.insertMode=!0}},pe.prototype.setModePrivate=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,te.DEFAULT_CHARSET),this._charsetService.setgCharset(1,te.DEFAULT_CHARSET),this._charsetService.setgCharset(2,te.DEFAULT_CHARSET),this._charsetService.setgCharset(3,te.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}},pe.prototype.resetMode=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 4:this._coreService.modes.insertMode=!1}},pe.prototype.resetModePrivate=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){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(),ke.params[Te]===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}},pe.prototype._updateAttrColor=function(ke,Te,Ee,Oe,je){return Te===2?(ke|=50331648,ke&=-16777216,ke|=ae.AttributeData.fromColorRGB([Ee,Oe,je])):Te===5&&(ke&=-50331904,ke|=33554432|255&Ee),ke},pe.prototype._extractColor=function(ke,Te,Ee){var Oe=[0,0,-1,0,0,0],je=0,Pe=0;do{if(Oe[Pe+je]=ke.params[Te+Pe],ke.hasSubParams(Te+Pe)){var Qe=ke.getSubParams(Te+Pe),Xe=0;do Oe[1]===5&&(je=1),Oe[Pe+Xe+1+je]=Qe[Xe];while(++Xe<Qe.length&&Xe+Pe+1+je<Oe.length);break}if(Oe[1]===5&&Pe+je>=2||Oe[1]===2&&Pe+je>=5)break;Oe[1]&&(je=1)}while(++Pe+Te<ke.length&&Pe+je<Oe.length);for(Xe=2;Xe<Oe.length;++Xe)Oe[Xe]===-1&&(Oe[Xe]=0);switch(Oe[0]){case 38:Ee.fg=this._updateAttrColor(Ee.fg,Oe[1],Oe[3],Oe[4],Oe[5]);break;case 48:Ee.bg=this._updateAttrColor(Ee.bg,Oe[1],Oe[3],Oe[4],Oe[5]);break;case 58:Ee.extended=Ee.extended.clone(),Ee.extended.underlineColor=this._updateAttrColor(Ee.extended.underlineColor,Oe[1],Oe[3],Oe[4],Oe[5])}return Pe},pe.prototype._processUnderline=function(ke,Te){Te.extended=Te.extended.clone(),(!~ke||ke>5)&&(ke=1),Te.extended.underlineStyle=ke,Te.fg|=268435456,ke===0&&(Te.fg&=-268435457),Te.updateExtended()},pe.prototype.charAttributes=function(ke){if(ke.length===1&&ke.params[0]===0)return this._curAttrData.fg=b.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=b.DEFAULT_ATTR_DATA.bg);for(var Te,Ee=ke.length,Oe=this._curAttrData,je=0;je<Ee;je++)(Te=ke.params[je])>=30&&Te<=37?(Oe.fg&=-50331904,Oe.fg|=16777216|Te-30):Te>=40&&Te<=47?(Oe.bg&=-50331904,Oe.bg|=16777216|Te-40):Te>=90&&Te<=97?(Oe.fg&=-50331904,Oe.fg|=16777224|Te-90):Te>=100&&Te<=107?(Oe.bg&=-50331904,Oe.bg|=16777224|Te-100):Te===0?(Oe.fg=b.DEFAULT_ATTR_DATA.fg,Oe.bg=b.DEFAULT_ATTR_DATA.bg):Te===1?Oe.fg|=134217728:Te===3?Oe.bg|=67108864:Te===4?(Oe.fg|=268435456,this._processUnderline(ke.hasSubParams(je)?ke.getSubParams(je)[0]:1,Oe)):Te===5?Oe.fg|=536870912:Te===7?Oe.fg|=67108864:Te===8?Oe.fg|=1073741824:Te===2?Oe.bg|=134217728:Te===21?this._processUnderline(2,Oe):Te===22?(Oe.fg&=-134217729,Oe.bg&=-134217729):Te===23?Oe.bg&=-67108865:Te===24?Oe.fg&=-268435457:Te===25?Oe.fg&=-536870913:Te===27?Oe.fg&=-67108865:Te===28?Oe.fg&=-1073741825:Te===39?(Oe.fg&=-67108864,Oe.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):Te===49?(Oe.bg&=-67108864,Oe.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):Te===38||Te===48||Te===58?je+=this._extractColor(ke,je,Oe):Te===59?(Oe.extended=Oe.extended.clone(),Oe.extended.underlineColor=-1,Oe.updateExtended()):Te===100?(Oe.fg&=-67108864,Oe.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,Oe.bg&=-67108864,Oe.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Te)},pe.prototype.deviceStatus=function(ke){switch(ke.params[0]){case 5:this._coreService.triggerDataEvent(se.C0.ESC+"[0n");break;case 6:var Te=this._bufferService.buffer.y+1,Ee=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"["+Te+";"+Ee+"R")}},pe.prototype.deviceStatusPrivate=function(ke){switch(ke.params[0]){case 6:var Te=this._bufferService.buffer.y+1,Ee=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"[?"+Te+";"+Ee+"R")}},pe.prototype.softReset=function(ke){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.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},pe.prototype.setCursorStyle=function(ke){var Te=ke.params[0]||1;switch(Te){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 Ee=Te%2==1;this._optionsService.options.cursorBlink=Ee},pe.prototype.setScrollRegion=function(ke){var Te,Ee=ke.params[0]||1;(ke.length<2||(Te=ke.params[1])>this._bufferService.rows||Te===0)&&(Te=this._bufferService.rows),Te>Ee&&(this._bufferService.buffer.scrollTop=Ee-1,this._bufferService.buffer.scrollBottom=Te-1,this._setCursor(0,0))},pe.prototype.windowOptions=function(ke){if(me(ke.params[0],this._optionsService.options.windowOptions)){var Te=ke.length>1?ke.params[1]:0;switch(ke.params[0]){case 14:Te!==2&&this._onRequestWindowsOptionsReport.fire(ue.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(ue.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:Te!==0&&Te!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Te!==0&&Te!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Te!==0&&Te!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Te!==0&&Te!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},pe.prototype.saveCursor=function(ke){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},pe.prototype.restoreCursor=function(ke){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()},pe.prototype.setTitle=function(ke){this._windowTitle=ke,this._onTitleChange.fire(ke)},pe.prototype.setIconName=function(ke){this._iconName=ke},pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,te.DEFAULT_CHARSET)},pe.prototype.selectCharset=function(ke){ke.length===2?ke[0]!=="/"&&this._charsetService.setgCharset(ye[ke[0]],te.CHARSETS[ke[1]]||te.DEFAULT_CHARSET):this.selectDefaultCharset()},pe.prototype.index=function(){this._restrictCursor();var ke=this._bufferService.buffer;this._bufferService.buffer.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),this._restrictCursor()},pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},pe.prototype.reverseIndex=function(){this._restrictCursor();var ke=this._bufferService.buffer;if(ke.y===ke.scrollTop){var Te=ke.scrollBottom-ke.scrollTop;ke.lines.shiftElements(ke.ybase+ke.y,Te,1),ke.lines.set(ke.ybase+ke.y,ke.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)}else ke.y--,this._restrictCursor()},pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},pe.prototype.reset=function(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()},pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},pe.prototype.setgLevel=function(ke){this._charsetService.setgLevel(ke)},pe.prototype.screenAlignmentPattern=function(){var ke=new re.CellData;ke.content=1<<22|69,ke.fg=this._curAttrData.fg,ke.bg=this._curAttrData.bg;var Te=this._bufferService.buffer;this._setCursor(0,0);for(var Ee=0;Ee<this._bufferService.rows;++Ee){var Oe=Te.ybase+Te.y+Ee,je=Te.lines.get(Oe);je&&(je.fill(ke),je.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},pe}(ee.Disposable);Se.InputHandler=_e},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.DEFAULT_CHARSET=Se.CHARSETS=void 0,Se.CHARSETS={},Se.DEFAULT_CHARSET=Se.CHARSETS.B,Se.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"},Se.CHARSETS.A={"#":"\xA3"},Se.CHARSETS.B=void 0,Se.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},Se.CHARSETS.C=Se.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Se.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},Se.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},Se.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},Se.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},Se.CHARSETS.E=Se.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},Se.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},Se.CHARSETS.H=Se.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},Se.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.Params=void 0;var ie=function(){function Ce(ue,se){if(ue===void 0&&(ue=32),se===void 0&&(se=32),this.maxLength=ue,this.maxSubParamsLength=se,se>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ue),this.length=0,this._subParams=new Int32Array(se),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ue),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Ce.fromArray=function(ue){var se=new Ce;if(!ue.length)return se;for(var te=ue[0]instanceof Array?1:0;te<ue.length;++te){var le=ue[te];if(le instanceof Array)for(var ee=0;ee<le.length;++ee)se.addSubParam(le[ee]);else se.addParam(le)}return se},Ce.prototype.clone=function(){var ue=new Ce(this.maxLength,this.maxSubParamsLength);return ue.params.set(this.params),ue.length=this.length,ue._subParams.set(this._subParams),ue._subParamsLength=this._subParamsLength,ue._subParamsIdx.set(this._subParamsIdx),ue._rejectDigits=this._rejectDigits,ue._rejectSubDigits=this._rejectSubDigits,ue._digitIsSub=this._digitIsSub,ue},Ce.prototype.toArray=function(){for(var ue=[],se=0;se<this.length;++se){ue.push(this.params[se]);var te=this._subParamsIdx[se]>>8,le=255&this._subParamsIdx[se];le-te>0&&ue.push(Array.prototype.slice.call(this._subParams,te,le))}return ue},Ce.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Ce.prototype.addParam=function(ue){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(ue<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=ue>2147483647?2147483647:ue}},Ce.prototype.addSubParam=function(ue){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(ue<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=ue>2147483647?2147483647:ue,this._subParamsIdx[this.length-1]++}},Ce.prototype.hasSubParams=function(ue){return(255&this._subParamsIdx[ue])-(this._subParamsIdx[ue]>>8)>0},Ce.prototype.getSubParams=function(ue){var se=this._subParamsIdx[ue]>>8,te=255&this._subParamsIdx[ue];return te-se>0?this._subParams.subarray(se,te):null},Ce.prototype.getSubParamsAll=function(){for(var ue={},se=0;se<this.length;++se){var te=this._subParamsIdx[se]>>8,le=255&this._subParamsIdx[se];le-te>0&&(ue[se]=this._subParams.slice(te,le))}return ue},Ce.prototype.addDigit=function(ue){var se;if(!(this._rejectDigits||!(se=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var te=this._digitIsSub?this._subParams:this.params,le=te[se-1];te[se-1]=~le?Math.min(10*le+ue,2147483647):ue}},Ce}();Se.Params=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.OscHandler=Se.OscParser=void 0;var ie=ce(23),Ce=ce(8),ue=function(){function te(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return te.prototype.addHandler=function(le,ee){this._handlers[le]===void 0&&(this._handlers[le]=[]);var ne=this._handlers[le];return ne.push(ee),{dispose:function(){var E=ne.indexOf(ee);E!==-1&&ne.splice(E,1)}}},te.prototype.setHandler=function(le,ee){this._handlers[le]=[ee]},te.prototype.clearHandler=function(le){this._handlers[le]&&delete this._handlers[le]},te.prototype.setHandlerFallback=function(le){this._handlerFb=le},te.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},te.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},te.prototype._start=function(){var le=this._handlers[this._id];if(le)for(var ee=le.length-1;ee>=0;ee--)le[ee].start();else this._handlerFb(this._id,"START")},te.prototype._put=function(le,ee,ne){var E=this._handlers[this._id];if(E)for(var b=E.length-1;b>=0;b--)E[b].put(le,ee,ne);else this._handlerFb(this._id,"PUT",Ce.utf32ToString(le,ee,ne))},te.prototype._end=function(le){var ee=this._handlers[this._id];if(ee){for(var ne=ee.length-1;ne>=0&&ee[ne].end(le)===!1;ne--);for(ne--;ne>=0;ne--)ee[ne].end(!1)}else this._handlerFb(this._id,"END",le)},te.prototype.start=function(){this.reset(),this._id=-1,this._state=1},te.prototype.put=function(le,ee,ne){if(this._state!==3){if(this._state===1)for(;ee<ne;){var E=le[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&&ne-ee>0&&this._put(le,ee,ne)}},te.prototype.end=function(le){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(le)),this._id=-1,this._state=0)},te}();Se.OscParser=ue;var se=function(){function te(le){this._handler=le,this._data="",this._hitLimit=!1}return te.prototype.start=function(){this._data="",this._hitLimit=!1},te.prototype.put=function(le,ee,ne){this._hitLimit||(this._data+=Ce.utf32ToString(le,ee,ne),this._data.length>ie.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},te.prototype.end=function(le){var ee;return this._hitLimit?ee=!1:le&&(ee=this._handler(this._data)),this._data="",this._hitLimit=!1,ee},te}();Se.OscHandler=se},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.PAYLOAD_LIMIT=void 0,Se.PAYLOAD_LIMIT=1e7},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.DcsHandler=Se.DcsParser=void 0;var ie=ce(8),Ce=ce(21),ue=ce(23),se=[],te=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(ne,E){this._handlers[ne]===void 0&&(this._handlers[ne]=[]);var b=this._handlers[ne];return b.push(E),{dispose:function(){var z=b.indexOf(E);z!==-1&&b.splice(z,1)}}},ee.prototype.setHandler=function(ne,E){this._handlers[ne]=[E]},ee.prototype.clearHandler=function(ne){this._handlers[ne]&&delete this._handlers[ne]},ee.prototype.setHandlerFallback=function(ne){this._handlerFb=ne},ee.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=se,this._ident=0},ee.prototype.hook=function(ne,E){if(this.reset(),this._ident=ne,this._active=this._handlers[ne]||se,this._active.length)for(var b=this._active.length-1;b>=0;b--)this._active[b].hook(E);else this._handlerFb(this._ident,"HOOK",E)},ee.prototype.put=function(ne,E,b){if(this._active.length)for(var z=this._active.length-1;z>=0;z--)this._active[z].put(ne,E,b);else this._handlerFb(this._ident,"PUT",ie.utf32ToString(ne,E,b))},ee.prototype.unhook=function(ne){if(this._active.length){for(var E=this._active.length-1;E>=0&&this._active[E].unhook(ne)===!1;E--);for(E--;E>=0;E--)this._active[E].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",ne);this._active=se,this._ident=0},ee}();Se.DcsParser=te;var le=function(){function ee(ne){this._handler=ne,this._data="",this._hitLimit=!1}return ee.prototype.hook=function(ne){this._params=ne.clone(),this._data="",this._hitLimit=!1},ee.prototype.put=function(ne,E,b){this._hitLimit||(this._data+=ie.utf32ToString(ne,E,b),this._data.length>ue.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ee.prototype.unhook=function(ne){var E;return this._hitLimit?E=!1:ne&&(E=this._handler(this._data,this._params||new Ce.Params)),this._params=void 0,this._data="",this._hitLimit=!1,E},ee}();Se.DcsHandler=le},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.removeTerminalFromCache=Se.acquireCharAtlas=void 0;var ie=ce(26),Ce=ce(43),ue=[];Se.acquireCharAtlas=function(se,te,le,ee,ne){for(var E=ie.generateConfig(ee,ne,se,le),b=0;b<ue.length;b++){var z=(x=ue[b]).ownedBy.indexOf(te);if(z>=0){if(ie.configEquals(x.config,E))return x.atlas;x.ownedBy.length===1?(x.atlas.dispose(),ue.splice(b,1)):x.ownedBy.splice(z,1);break}}for(b=0;b<ue.length;b++){var x=ue[b];if(ie.configEquals(x.config,E))return x.ownedBy.push(te),x.atlas}var re={atlas:new Ce.DynamicCharAtlas(document,E),config:E,ownedBy:[te]};return ue.push(re),re.atlas},Se.removeTerminalFromCache=function(se){for(var te=0;te<ue.length;te++){var le=ue[te].ownedBy.indexOf(se);if(le!==-1){ue[te].ownedBy.length===1?(ue[te].atlas.dispose(),ue.splice(te,1)):ue[te].ownedBy.splice(le,1);break}}}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.is256Color=Se.configEquals=Se.generateConfig=void 0;var ie=ce(3);Se.generateConfig=function(Ce,ue,se,te){var le={foreground:te.foreground,background:te.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:te.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Ce,scaledCharHeight:ue,fontFamily:se.fontFamily,fontSize:se.fontSize,fontWeight:se.fontWeight,fontWeightBold:se.fontWeightBold,allowTransparency:se.allowTransparency,colors:le}},Se.configEquals=function(Ce,ue){for(var se=0;se<Ce.colors.ansi.length;se++)if(Ce.colors.ansi[se].rgba!==ue.colors.ansi[se].rgba)return!1;return Ce.devicePixelRatio===ue.devicePixelRatio&&Ce.fontFamily===ue.fontFamily&&Ce.fontSize===ue.fontSize&&Ce.fontWeight===ue.fontWeight&&Ce.fontWeightBold===ue.fontWeightBold&&Ce.allowTransparency===ue.allowTransparency&&Ce.scaledCharWidth===ue.scaledCharWidth&&Ce.scaledCharHeight===ue.scaledCharHeight&&Ce.colors.foreground===ue.colors.foreground&&Ce.colors.background===ue.colors.background},Se.is256Color=function(Ce){return Ce<ie.DEFAULT_COLOR}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.ColorManager=Se.DEFAULT_ANSI_COLORS=void 0;var ie=ce(10),Ce=ce(45),ue=ie.css.toColor("#ffffff"),se=ie.css.toColor("#000000"),te=ie.css.toColor("#ffffff"),le=ie.css.toColor("#000000"),ee={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};Se.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")],b=[0,95,135,175,215,255],z=0;z<216;z++){var x=b[z/36%6|0],re=b[z/6%6|0],ae=b[z%6];E.push({css:ie.channels.toCss(x,re,ae),rgba:ie.channels.toRgba(x,re,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 ne=function(){function E(b,z){this.allowTransparency=z;var x=b.createElement("canvas");x.width=1,x.height=1;var re=x.getContext("2d");if(!re)throw new Error("Could not get rendering context");this._ctx=re,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Ce.ColorContrastCache,this.colors={foreground:ue,background:se,cursor:te,cursorAccent:le,selectionTransparent:ee,selectionOpaque:ie.color.blend(se,ee),ansi:Se.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return E.prototype.onOptionsChange=function(b){b==="minimumContrastRatio"&&this._contrastCache.clear()},E.prototype.setTheme=function(b){b===void 0&&(b={}),this.colors.foreground=this._parseColor(b.foreground,ue),this.colors.background=this._parseColor(b.background,se),this.colors.cursor=this._parseColor(b.cursor,te,!0),this.colors.cursorAccent=this._parseColor(b.cursorAccent,le,!0),this.colors.selectionTransparent=this._parseColor(b.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(b.black,Se.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(b.red,Se.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(b.green,Se.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(b.yellow,Se.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(b.blue,Se.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(b.magenta,Se.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(b.cyan,Se.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(b.white,Se.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(b.brightBlack,Se.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(b.brightRed,Se.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(b.brightGreen,Se.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(b.brightYellow,Se.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(b.brightBlue,Se.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(b.brightMagenta,Se.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(b.brightCyan,Se.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(b.brightWhite,Se.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},E.prototype._parseColor=function(b,z,x){if(x===void 0&&(x=this.allowTransparency),b===void 0)return z;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=b,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+b+" is invalid using fallback "+z.css),z;this._ctx.fillRect(0,0,1,1);var re=this._ctx.getImageData(0,0,1,1).data;if(re[3]!==255){if(!x)return console.warn("Color: "+b+" 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(_e){return Number(_e)}),oe=ae[0],ve=ae[1],ye=ae[2],me=ae[3],ge=Math.round(255*me);return{rgba:ie.channels.toRgba(oe,ve,ye,ge),css:b}}return{css:this._ctx.fillStyle,rgba:ie.channels.toRgba(re[0],re[1],re[2],re[3])}},E}();Se.ColorManager=ne},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.throwIfFalsy=void 0,Se.throwIfFalsy=function(ie){if(!ie)throw new Error("value must not be falsy");return ie}},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ne,E){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,z){b.__proto__=z}||function(b,z){for(var x in z)z.hasOwnProperty(x)&&(b[x]=z[x])})(ne,E)},function(ne,E){function b(){this.constructor=ne}ie(ne,E),ne.prototype=E===null?Object.create(E):(b.prototype=E.prototype,new b)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.CharacterJoinerRegistry=Se.JoinedCellData=void 0;var ue=ce(6),se=ce(3),te=ce(4),le=function(ne){function E(b,z,x){var re=ne.call(this)||this;return re.content=0,re.combinedData="",re.fg=b.fg,re.bg=b.bg,re.combinedData=z,re._width=x,re}return Ce(E,ne),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(b){throw new Error("not implemented")},E.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},E}(ue.AttributeData);Se.JoinedCellData=le;var ee=function(){function ne(E){this._bufferService=E,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new te.CellData}return ne.prototype.registerCharacterJoiner=function(E){var b={id:this._nextCharacterJoinerId++,handler:E};return this._characterJoiners.push(b),b.id},ne.prototype.deregisterCharacterJoiner=function(E){for(var b=0;b<this._characterJoiners.length;b++)if(this._characterJoiners[b].id===E)return this._characterJoiners.splice(b,1),!0;return!1},ne.prototype.getJoinedCharacters=function(E){if(this._characterJoiners.length===0)return[];var b=this._bufferService.buffer.lines.get(E);if(!b||b.length===0)return[];for(var z=[],x=b.translateToString(!0),re=0,ae=0,oe=0,ve=b.getFg(0),ye=b.getBg(0),me=0;me<b.getTrimmedLength();me++)if(b.loadCell(me,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==ve||this._workCell.bg!==ye){if(me-re>1)for(var ge=this._getJoinedRanges(x,oe,ae,b,re),_e=0;_e<ge.length;_e++)z.push(ge[_e]);re=me,oe=ae,ve=this._workCell.fg,ye=this._workCell.bg}ae+=this._workCell.getChars().length||se.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-re>1)for(ge=this._getJoinedRanges(x,oe,ae,b,re),_e=0;_e<ge.length;_e++)z.push(ge[_e]);return z},ne.prototype._getJoinedRanges=function(E,b,z,x,re){for(var ae=E.substring(b,z),oe=this._characterJoiners[0].handler(ae),ve=1;ve<this._characterJoiners.length;ve++)for(var ye=this._characterJoiners[ve].handler(ae),me=0;me<ye.length;me++)ne._mergeRanges(oe,ye[me]);return this._stringRangesToCellRanges(oe,x,re),oe},ne.prototype._stringRangesToCellRanges=function(E,b,z){var x=0,re=!1,ae=0,oe=E[x];if(oe){for(var ve=z;ve<this._bufferService.cols;ve++){var ye=b.getWidth(ve),me=b.getString(ve).length||se.WHITESPACE_CELL_CHAR.length;if(ye!==0){if(!re&&oe[0]<=ae&&(oe[0]=ve,re=!0),oe[1]<=ae){if(oe[1]=ve,!(oe=E[++x]))break;oe[0]<=ae?(oe[0]=ve,re=!0):re=!1}ae+=me}}oe&&(oe[1]=this._bufferService.cols)}},ne._mergeRanges=function(E,b){for(var z=!1,x=0;x<E.length;x++){var re=E[x];if(z){if(b[1]<=re[0])return E[x-1][1]=b[1],E;if(b[1]<=re[1])return E[x-1][1]=Math.max(b[1],re[1]),E.splice(x,1),E;E.splice(x,1),x--}else{if(b[1]<=re[0])return E.splice(x,0,b),E;if(b[1]<=re[1])return re[0]=Math.min(b[0],re[0]),E;b[0]<re[1]&&(re[0]=Math.min(b[0],re[0]),z=!0)}}return z?E[E.length-1][1]=b[1]:E.push(b),E},ne}();Se.CharacterJoinerRegistry=ee},function(Dt,Se,ce){"use strict";function ie(Ce,ue){var se=ue.getBoundingClientRect();return[Ce.clientX-se.left,Ce.clientY-se.top]}Object.defineProperty(Se,"__esModule",{value:!0}),Se.getRawByteCoords=Se.getCoords=Se.getCoordsRelativeToElement=void 0,Se.getCoordsRelativeToElement=ie,Se.getCoords=function(Ce,ue,se,te,le,ee,ne,E){if(le){var b=ie(Ce,ue);if(b)return b[0]=Math.ceil((b[0]+(E?ee/2:0))/ee),b[1]=Math.ceil(b[1]/ne),b[0]=Math.min(Math.max(b[0],1),se+(E?1:0)),b[1]=Math.min(Math.max(b[1],1),te),b}},Se.getRawByteCoords=function(Ce){if(Ce)return{x:Ce[0]+32,y:Ce[1]+32}}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.RenderDebouncer=void 0;var ie=function(){function Ce(ue){this._renderCallback=ue}return Ce.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Ce.prototype.refresh=function(ue,se,te){var le=this;this._rowCount=te,ue=ue!==void 0?ue:0,se=se!==void 0?se:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,ue):ue,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,se):se,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return le._innerRefresh()}))},Ce.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var ue=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(ue,se)}},Ce}();Se.RenderDebouncer=ie},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(se,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ee){le.__proto__=ee}||function(le,ee){for(var ne in ee)ee.hasOwnProperty(ne)&&(le[ne]=ee[ne])})(se,te)},function(se,te){function le(){this.constructor=se}ie(se,te),se.prototype=te===null?Object.create(te):(le.prototype=te.prototype,new le)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.ScreenDprMonitor=void 0;var ue=function(se){function te(){var le=se!==null&&se.apply(this,arguments)||this;return le._currentDevicePixelRatio=window.devicePixelRatio,le}return Ce(te,se),te.prototype.setListener=function(le){var ee=this;this._listener&&this.clearListener(),this._listener=le,this._outerListener=function(){ee._listener&&(ee._listener(window.devicePixelRatio,ee._currentDevicePixelRatio),ee._updateDpr())},this._updateDpr()},te.prototype.dispose=function(){se.prototype.dispose.call(this),this.clearListener()},te.prototype._updateDpr=function(){var le;this._outerListener&&((le=this._resolutionMediaMatchList)===null||le===void 0||le.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},te.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)},te}(ce(2).Disposable);Se.ScreenDprMonitor=ue},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.clone=void 0,Se.clone=function ie(Ce,ue){if(ue===void 0&&(ue=5),typeof Ce!="object")return Ce;var se=Array.isArray(Ce)?[]:{};for(var te in Ce)se[te]=ue<=1?Ce[te]:Ce[te]?ie(Ce[te],ue-1):Ce[te];return se}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.Terminal=void 0;var ie=ce(4),Ce=ce(35),ue=ce(18),se=ce(0),te=ce(83),le=function(){function x(re){this._core=new Ce.Terminal(re),this._addonManager=new te.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 b(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 ne(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(re,ae){this._verifyIntegers(re,ae),this._core.resize(re,ae)},x.prototype.open=function(re){this._core.open(re)},x.prototype.attachCustomKeyEventHandler=function(re){this._core.attachCustomKeyEventHandler(re)},x.prototype.registerLinkMatcher=function(re,ae,oe){return this._checkProposedApi(),this._core.registerLinkMatcher(re,ae,oe)},x.prototype.deregisterLinkMatcher=function(re){this._checkProposedApi(),this._core.deregisterLinkMatcher(re)},x.prototype.registerLinkProvider=function(re){return this._checkProposedApi(),this._core.registerLinkProvider(re)},x.prototype.registerCharacterJoiner=function(re){return this._checkProposedApi(),this._core.registerCharacterJoiner(re)},x.prototype.deregisterCharacterJoiner=function(re){this._checkProposedApi(),this._core.deregisterCharacterJoiner(re)},x.prototype.registerMarker=function(re){return this._checkProposedApi(),this._verifyIntegers(re),this._core.addMarker(re)},x.prototype.addMarker=function(re){return this.registerMarker(re)},x.prototype.hasSelection=function(){return this._core.hasSelection()},x.prototype.select=function(re,ae,oe){this._verifyIntegers(re,ae,oe),this._core.select(re,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(re,ae){this._verifyIntegers(re,ae),this._core.selectLines(re,ae)},x.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},x.prototype.scrollLines=function(re){this._verifyIntegers(re),this._core.scrollLines(re)},x.prototype.scrollPages=function(re){this._verifyIntegers(re),this._core.scrollPages(re)},x.prototype.scrollToTop=function(){this._core.scrollToTop()},x.prototype.scrollToBottom=function(){this._core.scrollToBottom()},x.prototype.scrollToLine=function(re){this._verifyIntegers(re),this._core.scrollToLine(re)},x.prototype.clear=function(){this._core.clear()},x.prototype.write=function(re,ae){this._core.write(re,ae)},x.prototype.writeUtf8=function(re,ae){this._core.write(re,ae)},x.prototype.writeln=function(re,ae){this._core.write(re),this._core.write(`\r
`,ae)},x.prototype.paste=function(re){this._core.paste(re)},x.prototype.getOption=function(re){return this._core.optionsService.getOption(re)},x.prototype.setOption=function(re,ae){this._core.optionsService.setOption(re,ae)},x.prototype.refresh=function(re,ae){this._verifyIntegers(re,ae),this._core.refresh(re,ae)},x.prototype.reset=function(){this._core.reset()},x.prototype.loadAddon=function(re){return this._addonManager.loadAddon(this,re)},Object.defineProperty(x,"strings",{get:function(){return ue},enumerable:!1,configurable:!0}),x.prototype._verifyIntegers=function(){for(var re=[],ae=0;ae<arguments.length;ae++)re[ae]=arguments[ae];for(var oe=0,ve=re;oe<ve.length;oe++){var ye=ve[oe];if(ye===1/0||isNaN(ye)||ye%1!=0)throw new Error("This API only accepts integers")}},x}();Se.Terminal=le;var ee=function(){function x(re,ae){this._buffer=re,this.type=ae}return x.prototype.init=function(re){return this._buffer=re,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(re){var ae=this._buffer.lines.get(re);if(ae)return new E(ae)},x.prototype.getNullCell=function(){return new ie.CellData},x}(),ne=function(){function x(re){var ae=this;this._buffers=re,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(re){this._line=re}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(re,ae){if(!(re<0||re>=this._line.length))return ae?(this._line.loadCell(re,ae),ae):this._line.loadCell(re,new ie.CellData)},x.prototype.translateToString=function(re,ae,oe){return this._line.translateToString(re,ae,oe)},x}(),b=function(){function x(re){this._core=re}return x.prototype.registerCsiHandler=function(re,ae){return this._core.addCsiHandler(re,function(oe){return ae(oe.toArray())})},x.prototype.addCsiHandler=function(re,ae){return this.registerCsiHandler(re,ae)},x.prototype.registerDcsHandler=function(re,ae){return this._core.addDcsHandler(re,function(oe,ve){return ae(oe,ve.toArray())})},x.prototype.addDcsHandler=function(re,ae){return this.registerDcsHandler(re,ae)},x.prototype.registerEscHandler=function(re,ae){return this._core.addEscHandler(re,ae)},x.prototype.addEscHandler=function(re,ae){return this.registerEscHandler(re,ae)},x.prototype.registerOscHandler=function(re,ae){return this._core.addOscHandler(re,ae)},x.prototype.addOscHandler=function(re,ae){return this.registerOscHandler(re,ae)},x}(),z=function(){function x(re){this._core=re}return x.prototype.register=function(re){this._core.unicodeService.register(re)},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(re){this._core.unicodeService.activeVersion=re},enumerable:!1,configurable:!0}),x}()},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ot,We){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,Ye){rt.__proto__=Ye}||function(rt,Ye){for(var ut in Ye)Ye.hasOwnProperty(ut)&&(rt[ut]=Ye[ut])})(ot,We)},function(ot,We){function rt(){this.constructor=ot}ie(ot,We),ot.prototype=We===null?Object.create(We):(rt.prototype=We.prototype,new rt)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.Terminal=void 0;var ue=ce(36),se=ce(37),te=ce(38),le=ce(12),ee=ce(19),ne=ce(40),E=ce(50),b=ce(51),z=ce(11),x=ce(7),re=ce(18),ae=ce(54),oe=ce(55),ve=ce(56),ye=ce(57),me=ce(59),ge=ce(0),_e=ce(16),he=ce(27),pe=ce(60),ke=ce(5),Te=ce(61),Ee=ce(62),Oe=ce(63),je=ce(64),Pe=ce(65),Qe=typeof window!="undefined"?window.document:null,Xe=function(ot){function We(rt){rt===void 0&&(rt={});var Ye=ot.call(this,rt)||this;return Ye.browser=z,Ye._keyDownHandled=!1,Ye._onCursorMove=new ge.EventEmitter,Ye._onKey=new ge.EventEmitter,Ye._onRender=new ge.EventEmitter,Ye._onSelectionChange=new ge.EventEmitter,Ye._onTitleChange=new ge.EventEmitter,Ye._onFocus=new ge.EventEmitter,Ye._onBlur=new ge.EventEmitter,Ye._onA11yCharEmitter=new ge.EventEmitter,Ye._onA11yTabEmitter=new ge.EventEmitter,Ye._setup(),Ye.linkifier=Ye._instantiationService.createInstance(E.Linkifier),Ye.linkifier2=Ye.register(Ye._instantiationService.createInstance(Oe.Linkifier2)),Ye.register(Ye._inputHandler.onRequestBell(function(){return Ye.bell()})),Ye.register(Ye._inputHandler.onRequestRefreshRows(function(ut,Ge){return Ye.refresh(ut,Ge)})),Ye.register(Ye._inputHandler.onRequestReset(function(){return Ye.reset()})),Ye.register(Ye._inputHandler.onRequestScroll(function(ut,Ge){return Ye.scroll(ut,Ge||void 0)})),Ye.register(Ye._inputHandler.onRequestWindowsOptionsReport(function(ut){return Ye._reportWindowsOptions(ut)})),Ye.register(ge.forwardEvent(Ye._inputHandler.onCursorMove,Ye._onCursorMove)),Ye.register(ge.forwardEvent(Ye._inputHandler.onTitleChange,Ye._onTitleChange)),Ye.register(ge.forwardEvent(Ye._inputHandler.onA11yChar,Ye._onA11yCharEmitter)),Ye.register(ge.forwardEvent(Ye._inputHandler.onA11yTab,Ye._onA11yTabEmitter)),Ye.register(Ye._bufferService.onResize(function(ut){return Ye._afterResize(ut.cols,ut.rows)})),Ye}return Ce(We,ot),Object.defineProperty(We.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),We.prototype.dispose=function(){var rt,Ye,ut;this._isDisposed||(ot.prototype.dispose.call(this),(rt=this._renderService)===null||rt===void 0||rt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(ut=(Ye=this.element)===null||Ye===void 0?void 0:Ye.parentNode)===null||ut===void 0||ut.removeChild(this.element))},We.prototype._setup=function(){ot.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(We.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),We.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},We.prototype._updateOptions=function(rt){var Ye,ut,Ge,ze;switch(ot.prototype._updateOptions.call(this,rt),rt){case"fontFamily":case"fontSize":(Ye=this._renderService)===null||Ye===void 0||Ye.clear(),(ut=this._charSizeService)===null||ut===void 0||ut.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":(Ge=this.viewport)===null||Ge===void 0||Ge.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)):((ze=this._accessibilityManager)===null||ze===void 0||ze.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},We.prototype._onTextAreaFocus=function(rt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(le.C0.ESC+"[I"),this.updateCursorStyle(rt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},We.prototype.blur=function(){var rt;return(rt=this.textarea)===null||rt===void 0?void 0:rt.blur()},We.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(le.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},We.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var rt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),Ye=this._bufferService.buffer.y*rt,ut=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=ut+"px",this.textarea.style.top=Ye+"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"}},We.prototype._initGlobal=function(){var rt=this;this._bindKeys(),this.register(x.addDisposableDomListener(this.element,"copy",function(ut){rt.hasSelection()&&te.copyHandler(ut,rt._selectionService)}));var Ye=function(ut){return te.handlePasteEvent(ut,rt.textarea,rt._coreService)};this.register(x.addDisposableDomListener(this.textarea,"paste",Ye)),this.register(x.addDisposableDomListener(this.element,"paste",Ye)),z.isFirefox?this.register(x.addDisposableDomListener(this.element,"mousedown",function(ut){ut.button===2&&te.rightClickHandler(ut,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})):this.register(x.addDisposableDomListener(this.element,"contextmenu",function(ut){te.rightClickHandler(ut,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})),z.isLinux&&this.register(x.addDisposableDomListener(this.element,"auxclick",function(ut){ut.button===1&&te.moveTextAreaUnderMouseCursor(ut,rt.textarea,rt.screenElement)}))},We.prototype._bindKeys=function(){var rt=this;this.register(x.addDisposableDomListener(this.textarea,"keyup",function(Ye){return rt._keyUp(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keydown",function(Ye){return rt._keyDown(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keypress",function(Ye){return rt._keyPress(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"compositionstart",function(){return rt._compositionHelper.compositionstart()})),this.register(x.addDisposableDomListener(this.textarea,"compositionupdate",function(Ye){return rt._compositionHelper.compositionupdate(Ye)})),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(Ye){return rt._queueLinkification(Ye.start,Ye.end)}))},We.prototype.open=function(rt){var Ye=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 ut=Qe.createDocumentFragment();this._viewportElement=Qe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),ut.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),ut.appendChild(this.screenElement),this.textarea=Qe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",re.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(Ve){return Ye._onTextAreaFocus(Ve)})),this.register(x.addDisposableDomListener(this.textarea,"blur",function(){return Ye._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var Ge=this._instantiationService.createInstance(je.CoreBrowserService,this.textarea);this._instantiationService.setService(ke.ICoreBrowserService,Ge),this._charSizeService=this._instantiationService.createInstance(Te.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(ke.ICharSizeService,this._charSizeService),this._compositionView=Qe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ue.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(ut),this._theme=this.options.theme||this._theme,this._colorManager=new he.ColorManager(Qe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(Ve){return Ye._colorManager.onOptionsChange(Ve)})),this._colorManager.setTheme(this._theme);var ze=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(pe.RenderService,ze,this.rows,this.screenElement)),this._instantiationService.setService(ke.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(Ve){return Ye._onRender.fire(Ve)})),this.onResize(function(Ve){return Ye._renderService.resize(Ve.cols,Ve.rows)}),this._soundService=this._instantiationService.createInstance(ae.SoundService),this._instantiationService.setService(ke.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Ee.MouseService),this._instantiationService.setService(ke.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(se.Viewport,function(Ve,$e){return Ye.scrollLines(Ve,$e)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return Ye.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){Ye._renderService.onCursorMove(),Ye._syncTextArea()})),this.register(this.onResize(function(){return Ye._renderService.onResize(Ye.cols,Ye.rows)})),this.register(this.onBlur(function(){return Ye._renderService.onBlur()})),this.register(this.onFocus(function(){return Ye._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return Ye.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(b.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(ke.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(Ve){return Ye.scrollLines(Ve.amount,Ve.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return Ye._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(Ve){return Ye._renderService.onSelectionChanged(Ve.start,Ve.end,Ve.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(Ve){Ye.textarea.value=Ve,Ye.textarea.focus(),Ye.textarea.select()})),this.register(this.onScroll(function(){Ye.viewport.syncScrollArea(),Ye._selectionService.refresh()})),this.register(x.addDisposableDomListener(this._viewportElement,"scroll",function(){return Ye._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(oe.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return Ye._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(Ve){return Ye._selectionService.onMouseDown(Ve)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},We.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(ne.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(ye.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},We.prototype._setTheme=function(rt){var Ye,ut,Ge;this._theme=rt,(Ye=this._colorManager)===null||Ye===void 0||Ye.setTheme(rt),(ut=this._renderService)===null||ut===void 0||ut.setColors(this._colorManager.colors),(Ge=this.viewport)===null||Ge===void 0||Ge.onThemeChange(this._colorManager.colors)},We.prototype.bindMouse=function(){var rt=this,Ye=this,ut=this.element;function Ge(pt){var ct,Rt,dt=Ye._mouseService.getRawByteCoords(pt,Ye.screenElement,Ye.cols,Ye.rows);if(!dt)return!1;switch(pt.overrideType||pt.type){case"mousemove":Rt=32,pt.buttons===void 0?(ct=3,pt.button!==void 0&&(ct=pt.button<3?pt.button:3)):ct=1&pt.buttons?0:4&pt.buttons?1:2&pt.buttons?2:3;break;case"mouseup":Rt=0,ct=pt.button<3?pt.button:3;break;case"mousedown":Rt=1,ct=pt.button<3?pt.button:3;break;case"wheel":pt.deltaY!==0&&(Rt=pt.deltaY<0?0:1),ct=4;break;default:return!1}return!(Rt===void 0||ct===void 0||ct>4)&&Ye._coreMouseService.triggerMouseEvent({col:dt.x-33,row:dt.y-33,button:ct,action:Rt,ctrl:pt.ctrlKey,alt:pt.altKey,shift:pt.shiftKey})}var ze={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ve=function(pt){return Ge(pt),pt.buttons||(rt._document.removeEventListener("mouseup",ze.mouseup),ze.mousedrag&&rt._document.removeEventListener("mousemove",ze.mousedrag)),rt.cancel(pt)},$e=function(pt){return Ge(pt),pt.preventDefault(),rt.cancel(pt)},nt=function(pt){pt.buttons&&Ge(pt)},et=function(pt){pt.buttons||Ge(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?ze.mousemove||(ut.addEventListener("mousemove",et),ze.mousemove=et):(ut.removeEventListener("mousemove",ze.mousemove),ze.mousemove=null),16&pt?ze.wheel||(ut.addEventListener("wheel",$e,{passive:!1}),ze.wheel=$e):(ut.removeEventListener("wheel",ze.wheel),ze.wheel=null),2&pt?ze.mouseup||(ze.mouseup=Ve):(rt._document.removeEventListener("mouseup",ze.mouseup),ze.mouseup=null),4&pt?ze.mousedrag||(ze.mousedrag=nt):(rt._document.removeEventListener("mousemove",ze.mousedrag),ze.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(x.addDisposableDomListener(ut,"mousedown",function(pt){if(pt.preventDefault(),rt.focus(),rt._coreMouseService.areMouseEventsActive&&!rt._selectionService.shouldForceSelection(pt))return Ge(pt),ze.mouseup&&rt._document.addEventListener("mouseup",ze.mouseup),ze.mousedrag&&rt._document.addEventListener("mousemove",ze.mousedrag),rt.cancel(pt)})),this.register(x.addDisposableDomListener(ut,"wheel",function(pt){if(!ze.wheel){if(!rt.buffer.hasScrollback){var ct=rt.viewport.getLinesScrolled(pt);if(ct===0)return;for(var Rt=le.C0.ESC+(rt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pt.deltaY<0?"A":"B"),dt="",Mt=0;Mt<Math.abs(ct);Mt++)dt+=Rt;rt._coreService.triggerDataEvent(dt,!0)}}},{passive:!0})),this.register(x.addDisposableDomListener(ut,"wheel",function(pt){if(!ze.wheel)return rt.viewport.onWheel(pt)?void 0:rt.cancel(pt)},{passive:!1})),this.register(x.addDisposableDomListener(ut,"touchstart",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchStart(pt),rt.cancel(pt)},{passive:!0})),this.register(x.addDisposableDomListener(ut,"touchmove",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchMove(pt)?void 0:rt.cancel(pt)},{passive:!1}))},We.prototype.refresh=function(rt,Ye){var ut;(ut=this._renderService)===null||ut===void 0||ut.refreshRows(rt,Ye)},We.prototype._queueLinkification=function(rt,Ye){var ut;(ut=this.linkifier)===null||ut===void 0||ut.linkifyRows(rt,Ye)},We.prototype.updateCursorStyle=function(rt){this._selectionService&&this._selectionService.shouldColumnSelect(rt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},We.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},We.prototype.scrollLines=function(rt,Ye){ot.prototype.scrollLines.call(this,rt,Ye),this.refresh(0,this.rows-1)},We.prototype.paste=function(rt){te.paste(rt,this.textarea,this._coreService)},We.prototype.attachCustomKeyEventHandler=function(rt){this._customKeyEventHandler=rt},We.prototype.registerLinkMatcher=function(rt,Ye,ut){var Ge=this.linkifier.registerLinkMatcher(rt,Ye,ut);return this.refresh(0,this.rows-1),Ge},We.prototype.deregisterLinkMatcher=function(rt){this.linkifier.deregisterLinkMatcher(rt)&&this.refresh(0,this.rows-1)},We.prototype.registerLinkProvider=function(rt){return this.linkifier2.registerLinkProvider(rt)},We.prototype.registerCharacterJoiner=function(rt){var Ye=this._renderService.registerCharacterJoiner(rt);return this.refresh(0,this.rows-1),Ye},We.prototype.deregisterCharacterJoiner=function(rt){this._renderService.deregisterCharacterJoiner(rt)&&this.refresh(0,this.rows-1)},Object.defineProperty(We.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),We.prototype.addMarker=function(rt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+rt)},We.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},We.prototype.select=function(rt,Ye,ut){this._selectionService.setSelection(rt,Ye,ut)},We.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},We.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]}},We.prototype.clearSelection=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.clearSelection()},We.prototype.selectAll=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.selectAll()},We.prototype.selectLines=function(rt,Ye){var ut;(ut=this._selectionService)===null||ut===void 0||ut.selectLines(rt,Ye)},We.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 Ye=me.evaluateKeyboardEvent(rt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(rt),Ye.type===3||Ye.type===2){var ut=this.rows-1;return this.scrollLines(Ye.type===2?-ut:ut),this.cancel(rt,!0)}return Ye.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,rt)||(Ye.cancel&&this.cancel(rt,!0),!Ye.key||(Ye.key!==le.C0.ETX&&Ye.key!==le.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Ye.key,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ye.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(rt,!0)))},We.prototype._isThirdLevelShift=function(rt,Ye){var ut=rt.isMac&&!this.options.macOptionIsMeta&&Ye.altKey&&!Ye.ctrlKey&&!Ye.metaKey||rt.isWindows&&Ye.altKey&&Ye.ctrlKey&&!Ye.metaKey;return Ye.type==="keypress"?ut:ut&&(!Ye.keyCode||Ye.keyCode>47)},We.prototype._keyUp=function(rt){this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1||(function(Ye){return Ye.keyCode===16||Ye.keyCode===17||Ye.keyCode===18}(rt)||this.focus(),this.updateCursorStyle(rt))},We.prototype._keyPress=function(rt){var Ye;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1)return!1;if(this.cancel(rt),rt.charCode)Ye=rt.charCode;else if(rt.which===null||rt.which===void 0)Ye=rt.keyCode;else{if(rt.which===0||rt.charCode===0)return!1;Ye=rt.which}return!(!Ye||(rt.altKey||rt.ctrlKey||rt.metaKey)&&!this._isThirdLevelShift(this.browser,rt))&&(Ye=String.fromCharCode(Ye),this._onKey.fire({key:Ye,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ye,!0),!0)},We.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},We.prototype.resize=function(rt,Ye){rt!==this.cols||Ye!==this.rows?ot.prototype.resize.call(this,rt,Ye):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},We.prototype._afterResize=function(rt,Ye){var ut,Ge;(ut=this._charSizeService)===null||ut===void 0||ut.measure(),(Ge=this.viewport)===null||Ge===void 0||Ge.syncScrollArea(!0)},We.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(_e.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},We.prototype.reset=function(){var rt,Ye;this.options.rows=this.rows,this.options.cols=this.cols;var ut=this._customKeyEventHandler;this._setup(),ot.prototype.reset.call(this),(rt=this._selectionService)===null||rt===void 0||rt.reset(),this._customKeyEventHandler=ut,this.refresh(0,this.rows-1),(Ye=this.viewport)===null||Ye===void 0||Ye.syncScrollArea()},We.prototype._reportWindowsOptions=function(rt){if(this._renderService)switch(rt){case ee.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var Ye=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),ut=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(le.C0.ESC+"[4;"+ut+";"+Ye+"t");break;case ee.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var Ge=this._renderService.dimensions.scaledCellWidth.toFixed(0),ze=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(le.C0.ESC+"[6;"+ze+";"+Ge+"t")}},We.prototype.cancel=function(rt,Ye){if(this.options.cancelEvents||Ye)return rt.preventDefault(),rt.stopPropagation(),!1},We.prototype._visualBell=function(){return!1},We.prototype._soundBell=function(){return this.options.bellStyle==="sound"},We}(Pe.CoreTerminal);Se.Terminal=Xe},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(le,ee,ne,E){var b,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,ne):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(le,ee,ne,E);else for(var re=le.length-1;re>=0;re--)(b=le[re])&&(x=(z<3?b(x):z>3?b(ee,ne,x):b(ee,ne))||x);return z>3&&x&&Object.defineProperty(ee,ne,x),x},Ce=this&&this.__param||function(le,ee){return function(ne,E){ee(ne,E,le)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.CompositionHelper=void 0;var ue=ce(5),se=ce(1),te=function(){function le(ee,ne,E,b,z,x){this._textarea=ee,this._compositionView=ne,this._bufferService=E,this._optionsService=b,this._charSizeService=z,this._coreService=x,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(le.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),le.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},le.prototype.compositionupdate=function(ee){var ne=this;this._compositionView.textContent=ee.data,this.updateCompositionElements(),setTimeout(function(){ne._compositionPosition.end=ne._textarea.value.length},0)},le.prototype.compositionend=function(){this._finalizeComposition(!0)},le.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)},le.prototype._finalizeComposition=function(ee){var ne=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(ne._isSendingComposition){ne._isSendingComposition=!1;var z=void 0;z=ne._isComposing?ne._textarea.value.substring(E.start,E.end):ne._textarea.value.substring(E.start),ne._coreService.triggerDataEvent(z,!0)}},0)}else{this._isSendingComposition=!1;var b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}},le.prototype._handleAnyTextareaChanges=function(){var ee=this,ne=this._textarea.value;setTimeout(function(){if(!ee._isComposing){var E=ee._textarea.value.replace(ne,"");E.length>0&&ee._coreService.triggerDataEvent(E,!0)}},0)},le.prototype.updateCompositionElements=function(ee){var ne=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var E=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),b=this._bufferService.buffer.y*E,z=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=z+"px",this._compositionView.style.top=b+"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=b+"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 ne.updateCompositionElements(!0)},0)}},le=ie([Ce(2,se.IBufferService),Ce(3,se.IOptionsService),Ce(4,ue.ICharSizeService),Ce(5,se.ICoreService)],le)}();Se.CompositionHelper=te},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.Viewport=void 0;var te=ce(2),le=ce(7),ee=ce(5),ne=ce(1),E=function(b){function z(x,re,ae,oe,ve,ye,me){var ge=b.call(this)||this;return ge._scrollLines=x,ge._viewportElement=re,ge._scrollArea=ae,ge._bufferService=oe,ge._optionsService=ve,ge._charSizeService=ye,ge._renderService=me,ge.scrollBarWidth=0,ge._currentRowHeight=0,ge._lastRecordedBufferLength=0,ge._lastRecordedViewportHeight=0,ge._lastRecordedBufferHeight=0,ge._lastTouchY=0,ge._lastScrollTop=0,ge._wheelPartialScroll=0,ge._refreshAnimationFrame=null,ge._ignoreNextScrollEvent=!1,ge.scrollBarWidth=ge._viewportElement.offsetWidth-ge._scrollArea.offsetWidth||15,ge.register(le.addDisposableDomListener(ge._viewportElement,"scroll",ge._onScroll.bind(ge))),setTimeout(function(){return ge.syncScrollArea()},0),ge}return Ce(z,b),z.prototype.onThemeChange=function(x){this._viewportElement.style.backgroundColor=x.background.css},z.prototype._refresh=function(x){var re=this;if(x)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return re._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 re=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==re&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=re),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 re=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===re&&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 re=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(re,!0)}},z.prototype._bubbleScroll=function(x,re){var ae=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(re<0&&this._viewportElement.scrollTop!==0||re>0&&ae<this._lastRecordedBufferHeight)||(x.cancelable&&x.preventDefault(),!1)},z.prototype.onWheel=function(x){var re=this._getPixelsScrolled(x);return re!==0&&(this._viewportElement.scrollTop+=re,this._bubbleScroll(x,re))},z.prototype._getPixelsScrolled=function(x){if(x.deltaY===0)return 0;var re=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_LINE?re*=this._currentRowHeight:x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(re*=this._currentRowHeight*this._bufferService.rows),re},z.prototype.getLinesScrolled=function(x){if(x.deltaY===0)return 0;var re=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(re/=this._currentRowHeight+0,this._wheelPartialScroll+=re,re=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(re*=this._bufferService.rows),re},z.prototype._applyScrollModifier=function(x,re){var ae=this._optionsService.options.fastScrollModifier;return ae==="alt"&&re.altKey||ae==="ctrl"&&re.ctrlKey||ae==="shift"&&re.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 re=this._lastTouchY-x.touches[0].pageY;return this._lastTouchY=x.touches[0].pageY,re!==0&&(this._viewportElement.scrollTop+=re,this._bubbleScroll(x,re))},z=ue([se(3,ne.IBufferService),se(4,ne.IOptionsService),se(5,ee.ICharSizeService),se(6,ee.IRenderService)],z)}(te.Disposable);Se.Viewport=E},function(Dt,Se,ce){"use strict";function ie(te){return te.replace(/\r?\n/g,"\r")}function Ce(te,le){return le?"\x1B[200~"+te+"\x1B[201~":te}function ue(te,le,ee){te=Ce(te=ie(te),ee.decPrivateModes.bracketedPasteMode),ee.triggerDataEvent(te,!0),le.value=""}function se(te,le,ee){var ne=ee.getBoundingClientRect(),E=te.clientX-ne.left-10,b=te.clientY-ne.top-10;le.style.width="20px",le.style.height="20px",le.style.left=E+"px",le.style.top=b+"px",le.style.zIndex="1000",le.focus()}Object.defineProperty(Se,"__esModule",{value:!0}),Se.rightClickHandler=Se.moveTextAreaUnderMouseCursor=Se.paste=Se.handlePasteEvent=Se.copyHandler=Se.bracketTextForPaste=Se.prepareTextForTerminal=void 0,Se.prepareTextForTerminal=ie,Se.bracketTextForPaste=Ce,Se.copyHandler=function(te,le){te.clipboardData&&te.clipboardData.setData("text/plain",le.selectionText),te.preventDefault()},Se.handlePasteEvent=function(te,le,ee){te.stopPropagation(),te.clipboardData&&ue(te.clipboardData.getData("text/plain"),le,ee)},Se.paste=ue,Se.moveTextAreaUnderMouseCursor=se,Se.rightClickHandler=function(te,le,ee,ne,E){se(te,le,ee),E&&!ne.isClickInSelection(te)&&ne.selectWordAtCursor(te),le.value=ne.selectionText,le.select()}},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.EscapeSequenceParser=Se.VT500_TRANSITION_TABLE=Se.TransitionTable=void 0;var ue=ce(2),se=ce(15),te=ce(21),le=ce(22),ee=ce(24),ne=function(){function b(z){this.table=new Uint8Array(z)}return b.prototype.setDefault=function(z,x){se.fill(this.table,z<<4|x)},b.prototype.add=function(z,x,re,ae){this.table[x<<8|z]=re<<4|ae},b.prototype.addMany=function(z,x,re,ae){for(var oe=0;oe<z.length;oe++)this.table[x<<8|z[oe]]=re<<4|ae},b}();Se.TransitionTable=ne,Se.VT500_TRANSITION_TABLE=function(){var b=new ne(4095),z=Array.apply(null,Array(256)).map(function(ye,me){return me}),x=function(ye,me){return z.slice(ye,me)},re=x(32,127),ae=x(0,24);ae.push(25),ae.push.apply(ae,x(28,32));var oe,ve=x(0,14);for(oe in b.setDefault(1,0),b.addMany(re,0,2,0),ve)b.addMany([24,26,153,154],oe,3,0),b.addMany(x(128,144),oe,3,0),b.addMany(x(144,152),oe,3,0),b.add(156,oe,0,0),b.add(27,oe,11,1),b.add(157,oe,4,8),b.addMany([152,158,159],oe,0,7),b.add(155,oe,11,3),b.add(144,oe,11,9);return b.addMany(ae,0,3,0),b.addMany(ae,1,3,1),b.add(127,1,0,1),b.addMany(ae,8,0,8),b.addMany(ae,3,3,3),b.add(127,3,0,3),b.addMany(ae,4,3,4),b.add(127,4,0,4),b.addMany(ae,6,3,6),b.addMany(ae,5,3,5),b.add(127,5,0,5),b.addMany(ae,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(re,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(re,7,0,7),b.addMany(ae,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(ae,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(ae,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(ae,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(ae,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(ae,13,13,13),b.addMany(re,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(160,0,2,0),b.add(160,8,5,8),b.add(160,6,0,6),b.add(160,11,0,11),b.add(160,13,13,13),b}();var E=function(b){function z(x){x===void 0&&(x=Se.VT500_TRANSITION_TABLE);var re=b.call(this)||this;return re._transitions=x,re.initialState=0,re.currentState=re.initialState,re._params=new te.Params,re._params.addParam(0),re._collect=0,re.precedingCodepoint=0,re._printHandlerFb=function(ae,oe,ve){},re._executeHandlerFb=function(ae){},re._csiHandlerFb=function(ae,oe){},re._escHandlerFb=function(ae){},re._errorHandlerFb=function(ae){return ae},re._printHandler=re._printHandlerFb,re._executeHandlers=Object.create(null),re._csiHandlers=Object.create(null),re._escHandlers=Object.create(null),re._oscParser=new le.OscParser,re._dcsParser=new ee.DcsParser,re._errorHandler=re._errorHandlerFb,re.setEscHandler({final:"\\"},function(){}),re}return Ce(z,b),z.prototype._identifier=function(x,re){re===void 0&&(re=[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 ve=x.intermediates.charCodeAt(oe);if(32>ve||ve>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ae<<=8,ae|=ve}}if(x.final.length!==1)throw new Error("final must be a single byte");var ye=x.final.charCodeAt(0);if(re[0]>ye||ye>re[1])throw new Error("final must be in range "+re[0]+" .. "+re[1]);return ae<<=8,ae|=ye},z.prototype.identToString=function(x){for(var re=[];x;)re.push(String.fromCharCode(255&x)),x>>=8;return re.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,re){var ae=this._identifier(x,[48,126]);this._escHandlers[ae]===void 0&&(this._escHandlers[ae]=[]);var oe=this._escHandlers[ae];return oe.push(re),{dispose:function(){var ve=oe.indexOf(re);ve!==-1&&oe.splice(ve,1)}}},z.prototype.setEscHandler=function(x,re){this._escHandlers[this._identifier(x,[48,126])]=[re]},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,re){this._executeHandlers[x.charCodeAt(0)]=re},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,re){var ae=this._identifier(x);this._csiHandlers[ae]===void 0&&(this._csiHandlers[ae]=[]);var oe=this._csiHandlers[ae];return oe.push(re),{dispose:function(){var ve=oe.indexOf(re);ve!==-1&&oe.splice(ve,1)}}},z.prototype.setCsiHandler=function(x,re){this._csiHandlers[this._identifier(x)]=[re]},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,re){return this._dcsParser.addHandler(this._identifier(x),re)},z.prototype.setDcsHandler=function(x,re){this._dcsParser.setHandler(this._identifier(x),re)},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,re){return this._oscParser.addHandler(x,re)},z.prototype.setOscHandler=function(x,re){this._oscParser.setHandler(x,re)},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,re){for(var ae=0,oe=0,ve=this.currentState,ye=this._oscParser,me=this._dcsParser,ge=this._collect,_e=this._params,he=this._transitions.table,pe=0;pe<re;++pe){switch((oe=he[ve<<8|((ae=x[pe])<160?ae:160)])>>4){case 2:for(var ke=pe+1;;++ke){if(ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-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:pe,code:ae,currentState:ve,collect:ge,params:_e,abort:!1}).abort)return;break;case 7:for(var Te=this._csiHandlers[ge<<8|ae],Ee=Te?Te.length-1:-1;Ee>=0&&Te[Ee](_e)===!1;Ee--);Ee<0&&this._csiHandlerFb(ge<<8|ae,_e),this.precedingCodepoint=0;break;case 8:do switch(ae){case 59:_e.addParam(0);break;case 58:_e.addSubParam(-1);break;default:_e.addDigit(ae-48)}while(++pe<re&&(ae=x[pe])>47&&ae<60);pe--;break;case 9:ge<<=8,ge|=ae;break;case 10:for(var Oe=this._escHandlers[ge<<8|ae],je=Oe?Oe.length-1:-1;je>=0&&Oe[je]()===!1;je--);je<0&&this._escHandlerFb(ge<<8|ae),this.precedingCodepoint=0;break;case 11:_e.reset(),_e.addParam(0),ge=0;break;case 12:me.hook(ge<<8|ae,_e);break;case 13:for(var Pe=pe+1;;++Pe)if(Pe>=re||(ae=x[Pe])===24||ae===26||ae===27||ae>127&&ae<160){me.put(x,pe,Pe),pe=Pe-1;break}break;case 14:me.unhook(ae!==24&&ae!==26),ae===27&&(oe|=1),_e.reset(),_e.addParam(0),ge=0,this.precedingCodepoint=0;break;case 4:ye.start();break;case 5:for(var Qe=pe+1;;Qe++)if(Qe>=re||(ae=x[Qe])<32||ae>127&&ae<=159){ye.put(x,pe,Qe),pe=Qe-1;break}break;case 6:ye.end(ae!==24&&ae!==26),ae===27&&(oe|=1),_e.reset(),_e.addParam(0),ge=0,this.precedingCodepoint=0}ve=15&oe}this._collect=ge,this.currentState=ve},z}(ue.Disposable);Se.EscapeSequenceParser=E},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ye,me){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,_e){ge.__proto__=_e}||function(ge,_e){for(var he in _e)_e.hasOwnProperty(he)&&(ge[he]=_e[he])})(ye,me)},function(ye,me){function ge(){this.constructor=ye}ie(ye,me),ye.prototype=me===null?Object.create(me):(ge.prototype=me.prototype,new ge)}),ue=this&&this.__decorate||function(ye,me,ge,_e){var he,pe=arguments.length,ke=pe<3?me:_e===null?_e=Object.getOwnPropertyDescriptor(me,ge):_e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ye,me,ge,_e);else for(var Te=ye.length-1;Te>=0;Te--)(he=ye[Te])&&(ke=(pe<3?he(ke):pe>3?he(me,ge,ke):he(me,ge))||ke);return pe>3&&ke&&Object.defineProperty(me,ge,ke),ke},se=this&&this.__param||function(ye,me){return function(ge,_e){me(ge,_e,ye)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.Renderer=void 0;var te=ce(41),le=ce(47),ee=ce(48),ne=ce(49),E=ce(29),b=ce(2),z=ce(5),x=ce(1),re=ce(25),ae=ce(0),oe=1,ve=function(ye){function me(ge,_e,he,pe,ke,Te,Ee,Oe,je){var Pe=ye.call(this)||this;Pe._colors=ge,Pe._screenElement=_e,Pe._bufferService=ke,Pe._charSizeService=Te,Pe._optionsService=Ee,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 te.TextRenderLayer(Pe._screenElement,0,Pe._colors,Pe._characterJoinerRegistry,Qe,Pe._id,Pe._bufferService,Ee),new le.SelectionRenderLayer(Pe._screenElement,1,Pe._colors,Pe._id,Pe._bufferService,Ee),new ne.LinkRenderLayer(Pe._screenElement,2,Pe._colors,Pe._id,he,pe,Pe._bufferService,Ee),new ee.CursorRenderLayer(Pe._screenElement,3,Pe._colors,Pe._id,Pe._onRequestRedraw,Pe._bufferService,Ee,Oe,je)],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 Ce(me,ye),Object.defineProperty(me.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){for(var ge=0,_e=this._renderLayers;ge<_e.length;ge++)_e[ge].dispose();ye.prototype.dispose.call(this),re.removeTerminalFromCache(this._id)},me.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},me.prototype.setColors=function(ge){this._colors=ge;for(var _e=0,he=this._renderLayers;_e<he.length;_e++){var pe=he[_e];pe.setColors(this._colors),pe.reset()}},me.prototype.onResize=function(ge,_e){this._updateDimensions();for(var he=0,pe=this._renderLayers;he<pe.length;he++)pe[he].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},me.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},me.prototype.onBlur=function(){this._runOperation(function(ge){return ge.onBlur()})},me.prototype.onFocus=function(){this._runOperation(function(ge){return ge.onFocus()})},me.prototype.onSelectionChanged=function(ge,_e,he){he===void 0&&(he=!1),this._runOperation(function(pe){return pe.onSelectionChanged(ge,_e,he)})},me.prototype.onCursorMove=function(){this._runOperation(function(ge){return ge.onCursorMove()})},me.prototype.onOptionsChanged=function(){this._runOperation(function(ge){return ge.onOptionsChanged()})},me.prototype.clear=function(){this._runOperation(function(ge){return ge.reset()})},me.prototype._runOperation=function(ge){for(var _e=0,he=this._renderLayers;_e<he.length;_e++)ge(he[_e])},me.prototype.renderRows=function(ge,_e){for(var he=0,pe=this._renderLayers;he<pe.length;he++)pe[he].onGridChanged(ge,_e)},me.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)},me.prototype.registerCharacterJoiner=function(ge){return this._characterJoinerRegistry.registerCharacterJoiner(ge)},me.prototype.deregisterCharacterJoiner=function(ge){return this._characterJoinerRegistry.deregisterCharacterJoiner(ge)},me=ue([se(4,x.IBufferService),se(5,z.ICharSizeService),se(6,x.IOptionsService),se(7,x.ICoreService),se(8,z.ICoreBrowserService)],me)}(b.Disposable);Se.Renderer=ve},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.TextRenderLayer=void 0;var ue=ce(42),se=ce(13),te=ce(6),le=ce(3),ee=ce(29),ne=ce(4),E=function(b){function z(x,re,ae,oe,ve,ye,me,ge){var _e=b.call(this,x,"text",re,ve,ae,ye,me,ge)||this;return _e._characterWidth=0,_e._characterFont="",_e._characterOverlapCache={},_e._workCell=new ne.CellData,_e._state=new ue.GridCache,_e._characterJoinerRegistry=oe,_e}return Ce(z,b),z.prototype.resize=function(x){b.prototype.resize.call(this,x);var re=this._getFont(!1,!1);this._characterWidth===x.scaledCharWidth&&this._characterFont===re||(this._characterWidth=x.scaledCharWidth,this._characterFont=re,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,re,ae,oe){for(var ve=x;ve<=re;ve++)for(var ye=ve+this._bufferService.buffer.ydisp,me=this._bufferService.buffer.lines.get(ye),ge=ae?ae.getJoinedCharacters(ye):[],_e=0;_e<this._bufferService.cols;_e++){me.loadCell(_e,this._workCell);var he=this._workCell,pe=!1,ke=_e;if(he.getWidth()!==0){if(ge.length>0&&_e===ge[0][0]){pe=!0;var Te=ge.shift();he=new ee.JoinedCellData(this._workCell,me.translateToString(!0,Te[0],Te[1]),Te[1]-Te[0]),ke=Te[1]-1}!pe&&this._isOverlapping(he)&&ke<me.length-1&&me.getCodePoint(ke+1)===le.NULL_CELL_CODE&&(he.content&=-12582913,he.content|=2<<22),oe(he,_e,ve),_e=ke}}},z.prototype._drawBackground=function(x,re){var ae=this,oe=this._ctx,ve=this._bufferService.cols,ye=0,me=0,ge=null;oe.save(),this._forEachCell(x,re,null,function(_e,he,pe){var ke=null;_e.isInverse()?ke=_e.isFgDefault()?ae._colors.foreground.css:_e.isFgRGB()?"rgb("+te.AttributeData.toColorRGB(_e.getFgColor()).join(",")+")":ae._colors.ansi[_e.getFgColor()].css:_e.isBgRGB()?ke="rgb("+te.AttributeData.toColorRGB(_e.getBgColor()).join(",")+")":_e.isBgPalette()&&(ke=ae._colors.ansi[_e.getBgColor()].css),ge===null&&(ye=he,me=pe),pe!==me?(oe.fillStyle=ge||"",ae._fillCells(ye,me,ve-ye,1),ye=he,me=pe):ge!==ke&&(oe.fillStyle=ge||"",ae._fillCells(ye,me,he-ye,1),ye=he,me=pe),ge=ke}),ge!==null&&(oe.fillStyle=ge,this._fillCells(ye,me,ve-ye,1)),oe.restore()},z.prototype._drawForeground=function(x,re){var ae=this;this._forEachCell(x,re,this._characterJoinerRegistry,function(oe,ve,ye){if(!oe.isInvisible()&&(ae._drawChars(oe,ve,ye),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("+te.AttributeData.toColorRGB(oe.getBgColor()).join(",")+")";else{var me=oe.getBgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&me<8&&(me+=8),ae._ctx.fillStyle=ae._colors.ansi[me].css}else if(oe.isFgDefault())ae._ctx.fillStyle=ae._colors.foreground.css;else if(oe.isFgRGB())ae._ctx.fillStyle="rgb("+te.AttributeData.toColorRGB(oe.getFgColor()).join(",")+")";else{var ge=oe.getFgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&ge<8&&(ge+=8),ae._ctx.fillStyle=ae._colors.ansi[ge].css}ae._fillBottomLineAtCells(ve,ye,oe.getWidth()),ae._ctx.restore()}})},z.prototype.onGridChanged=function(x,re){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,x,this._bufferService.cols,re-x+1),this._drawBackground(x,re),this._drawForeground(x,re))},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 re=x.getChars();if(this._characterOverlapCache.hasOwnProperty(re))return this._characterOverlapCache[re];this._ctx.save(),this._ctx.font=this._characterFont;var ae=Math.floor(this._ctx.measureText(re).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[re]=ae,ae},z}(se.BaseRenderLayer);Se.TextRenderLayer=E},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.GridCache=void 0;var ie=function(){function Ce(){this.cache=[]}return Ce.prototype.resize=function(ue,se){for(var te=0;te<ue;te++){this.cache.length<=te&&this.cache.push([]);for(var le=this.cache[te].length;le<se;le++)this.cache[te].push(void 0);this.cache[te].length=se}this.cache.length=ue},Ce.prototype.clear=function(){for(var ue=0;ue<this.cache.length;ue++)for(var se=0;se<this.cache[ue].length;se++)this.cache[ue][se]=void 0},Ce}();Se.GridCache=ie},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ae,oe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,ye){ve.__proto__=ye}||function(ve,ye){for(var me in ye)ye.hasOwnProperty(me)&&(ve[me]=ye[me])})(ae,oe)},function(ae,oe){function ve(){this.constructor=ae}ie(ae,oe),ae.prototype=oe===null?Object.create(oe):(ve.prototype=oe.prototype,new ve)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.NoneCharAtlas=Se.DynamicCharAtlas=Se.getGlyphCacheKey=void 0;var ue=ce(9),se=ce(44),te=ce(27),le=ce(46),ee=ce(11),ne=ce(28),E=ce(10),b={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)}Se.getGlyphCacheKey=z;var x=function(ae){function oe(ve,ye){var me=ae.call(this)||this;me._config=ye,me._drawToCacheCount=0,me._glyphsWaitingOnBitmap=[],me._bitmapCommitTimeout=null,me._bitmap=null,me._cacheCanvas=ve.createElement("canvas"),me._cacheCanvas.width=1024,me._cacheCanvas.height=1024,me._cacheCtx=ne.throwIfFalsy(me._cacheCanvas.getContext("2d",{alpha:!0}));var ge=ve.createElement("canvas");ge.width=me._config.scaledCharWidth,ge.height=me._config.scaledCharHeight,me._tmpCtx=ne.throwIfFalsy(ge.getContext("2d",{alpha:me._config.allowTransparency})),me._width=Math.floor(1024/me._config.scaledCharWidth),me._height=Math.floor(1024/me._config.scaledCharHeight);var _e=me._width*me._height;return me._cacheMap=new le.LRUMap(_e),me._cacheMap.prealloc(_e),me}return Ce(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(ve,ye,me,ge){if(ye.code===32)return!0;if(!this._canCache(ye))return!1;var _e=z(ye),he=this._cacheMap.get(_e);if(he!=null)return this._drawFromCache(ve,he,me,ge),!0;if(this._drawToCacheCount<100){var pe=void 0;pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var ke=this._drawToCache(ye,pe);return this._cacheMap.set(_e,ke),this._drawFromCache(ve,ke,me,ge),!0}return!1},oe.prototype._canCache=function(ve){return ve.code<256},oe.prototype._toCoordinateX=function(ve){return ve%this._width*this._config.scaledCharWidth},oe.prototype._toCoordinateY=function(ve){return Math.floor(ve/this._width)*this._config.scaledCharHeight},oe.prototype._drawFromCache=function(ve,ye,me,ge){if(!ye.isEmpty){var _e=this._toCoordinateX(ye.index),he=this._toCoordinateY(ye.index);ve.drawImage(ye.inBitmap?this._bitmap:this._cacheCanvas,_e,he,this._config.scaledCharWidth,this._config.scaledCharHeight,me,ge,this._config.scaledCharWidth,this._config.scaledCharHeight)}},oe.prototype._getColorFromAnsiIndex=function(ve){return ve<this._config.colors.ansi.length?this._config.colors.ansi[ve]:te.DEFAULT_ANSI_COLORS[ve]},oe.prototype._getBackgroundColor=function(ve){return this._config.allowTransparency?b:ve.bg===ue.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:ve.bg<256?this._getColorFromAnsiIndex(ve.bg):this._config.colors.background},oe.prototype._getForegroundColor=function(ve){return ve.fg===ue.INVERTED_DEFAULT_COLOR?E.color.opaque(this._config.colors.background):ve.fg<256?this._getColorFromAnsiIndex(ve.fg):this._config.colors.foreground},oe.prototype._drawToCache=function(ve,ye){this._drawToCacheCount++,this._tmpCtx.save();var me=this._getBackgroundColor(ve);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=me.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var ge=ve.bold?this._config.fontWeightBold:this._config.fontWeight,_e=ve.italic?"italic":"";this._tmpCtx.font=_e+" "+ge+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(ve).css,ve.dim&&(this._tmpCtx.globalAlpha=ue.DIM_OPACITY),this._tmpCtx.fillText(ve.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var he=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),pe=!1;this._config.allowTransparency||(pe=function(Oe,je){for(var Pe=!0,Qe=je.rgba>>>24,Xe=je.rgba>>>16&255,ot=je.rgba>>>8&255,We=0;We<Oe.data.length;We+=4)Oe.data[We]===Qe&&Oe.data[We+1]===Xe&&Oe.data[We+2]===ot?Oe.data[We+3]=0:Pe=!1;return Pe}(he,me));var ke=this._toCoordinateX(ye),Te=this._toCoordinateY(ye);this._cacheCtx.putImageData(he,ke,Te);var Ee={index:ye,isEmpty:pe,inBitmap:!1};return this._addGlyphToBitmap(Ee),Ee},oe.prototype._addGlyphToBitmap=function(ve){var ye=this;!("createImageBitmap"in window)||ee.isFirefox||ee.isSafari||(this._glyphsWaitingOnBitmap.push(ve),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ye._generateBitmap()},100)))},oe.prototype._generateBitmap=function(){var ve=this,ye=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(me){ve._bitmap=me;for(var ge=0;ge<ye.length;ge++)ye[ge].inBitmap=!0}),this._bitmapCommitTimeout=null},oe}(se.BaseCharAtlas);Se.DynamicCharAtlas=x;var re=function(ae){function oe(ve,ye){return ae.call(this)||this}return Ce(oe,ae),oe.prototype.draw=function(ve,ye,me,ge){return!1},oe}(se.BaseCharAtlas);Se.NoneCharAtlas=re},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.BaseCharAtlas=void 0;var ie=function(){function Ce(){this._didWarmUp=!1}return Ce.prototype.dispose=function(){},Ce.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Ce.prototype._doWarmUp=function(){},Ce.prototype.beginFrame=function(){},Ce}();Se.BaseCharAtlas=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.ColorContrastCache=void 0;var ie=function(){function Ce(){this._color={},this._rgba={}}return Ce.prototype.clear=function(){this._color={},this._rgba={}},Ce.prototype.setCss=function(ue,se,te){this._rgba[ue]||(this._rgba[ue]={}),this._rgba[ue][se]=te},Ce.prototype.getCss=function(ue,se){return this._rgba[ue]?this._rgba[ue][se]:void 0},Ce.prototype.setColor=function(ue,se,te){this._color[ue]||(this._color[ue]={}),this._color[ue][se]=te},Ce.prototype.getColor=function(ue,se){return this._color[ue]?this._color[ue][se]:void 0},Ce}();Se.ColorContrastCache=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.LRUMap=void 0;var ie=function(){function Ce(ue){this.capacity=ue,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Ce.prototype._unlinkNode=function(ue){var se=ue.prev,te=ue.next;ue===this._head&&(this._head=te),ue===this._tail&&(this._tail=se),se!==null&&(se.next=te),te!==null&&(te.prev=se)},Ce.prototype._appendNode=function(ue){var se=this._tail;se!==null&&(se.next=ue),ue.prev=se,ue.next=null,this._tail=ue,this._head===null&&(this._head=ue)},Ce.prototype.prealloc=function(ue){for(var se=this._nodePool,te=0;te<ue;te++)se.push({prev:null,next:null,key:null,value:null})},Ce.prototype.get=function(ue){var se=this._map[ue];return se!==void 0?(this._unlinkNode(se),this._appendNode(se),se.value):null},Ce.prototype.peekValue=function(ue){var se=this._map[ue];return se!==void 0?se.value:null},Ce.prototype.peek=function(){var ue=this._head;return ue===null?null:ue.value},Ce.prototype.set=function(ue,se){var te=this._map[ue];if(te!==void 0)te=this._map[ue],this._unlinkNode(te),te.value=se;else if(this.size>=this.capacity)te=this._head,this._unlinkNode(te),delete this._map[te.key],te.key=ue,te.value=se,this._map[ue]=te;else{var le=this._nodePool;le.length>0?((te=le.pop()).key=ue,te.value=se):te={prev:null,next:null,key:ue,value:se},this._map[ue]=te,this.size++}this._appendNode(te)},Ce}();Se.LRUMap=ie},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(se,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ee){le.__proto__=ee}||function(le,ee){for(var ne in ee)ee.hasOwnProperty(ne)&&(le[ne]=ee[ne])})(se,te)},function(se,te){function le(){this.constructor=se}ie(se,te),se.prototype=te===null?Object.create(te):(le.prototype=te.prototype,new le)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.SelectionRenderLayer=void 0;var ue=function(se){function te(le,ee,ne,E,b,z){var x=se.call(this,le,"selection",ee,!0,ne,E,b,z)||this;return x._clearState(),x}return Ce(te,se),te.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},te.prototype.resize=function(le){se.prototype.resize.call(this,le),this._clearState()},te.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},te.prototype.onSelectionChanged=function(le,ee,ne){if(this._didStateChange(le,ee,ne,this._bufferService.buffer.ydisp))if(this._clearAll(),le&&ee){var E=le[1]-this._bufferService.buffer.ydisp,b=ee[1]-this._bufferService.buffer.ydisp,z=Math.max(E,0),x=Math.min(b,this._bufferService.rows-1);if(!(z>=this._bufferService.rows||x<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,ne){var re=le[0],ae=ee[0]-re,oe=x-z+1;this._fillCells(re,z,ae,oe)}else{re=E===z?le[0]:0;var ve=z===x?ee[0]:this._bufferService.cols;this._fillCells(re,z,ve-re,1);var ye=Math.max(x-z-1,0);if(this._fillCells(0,z+1,this._bufferService.cols,ye),z!==x){var me=b===x?ee[0]:this._bufferService.cols;this._fillCells(0,x,me,1)}}this._state.start=[le[0],le[1]],this._state.end=[ee[0],ee[1]],this._state.columnSelectMode=ne,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},te.prototype._didStateChange=function(le,ee,ne,E){return!this._areCoordinatesEqual(le,this._state.start)||!this._areCoordinatesEqual(ee,this._state.end)||ne!==this._state.columnSelectMode||E!==this._state.ydisp},te.prototype._areCoordinatesEqual=function(le,ee){return!(!le||!ee)&&le[0]===ee[0]&&le[1]===ee[1]},te}(ce(13).BaseRenderLayer);Se.SelectionRenderLayer=ue},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.CursorRenderLayer=void 0;var ue=ce(13),se=ce(4),te=function(ee){function ne(E,b,z,x,re,ae,oe,ve,ye){var me=ee.call(this,E,"cursor",b,!0,z,x,ae,oe)||this;return me._onRequestRedraw=re,me._coreService=ve,me._coreBrowserService=ye,me._cell=new se.CellData,me._state={x:0,y:0,isFocused:!1,style:"",width:0},me._cursorRenderers={bar:me._renderBarCursor.bind(me),block:me._renderBlockCursor.bind(me),underline:me._renderUnderlineCursor.bind(me)},me}return Ce(ne,ee),ne.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},ne.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},ne.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},ne.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},ne.prototype.onOptionsChanged=function(){var E,b=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new le(this._coreBrowserService.isFocused,function(){b._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})},ne.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},ne.prototype.onGridChanged=function(E,b){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},ne.prototype._render=function(E){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var b=this._bufferService.buffer.ybase+this._bufferService.buffer.y,z=b-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(b).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 re=this._optionsService.options.cursorStyle;return re&&re!=="block"?this._cursorRenderers[re](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=re,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()},ne.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})},ne.prototype._renderBarCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(E,b,this._optionsService.options.cursorWidth),this._ctx.restore()},ne.prototype._renderBlockCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(E,b,z.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(z,E,b),this._ctx.restore()},ne.prototype._renderUnderlineCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(E,b),this._ctx.restore()},ne.prototype._renderBlurCursor=function(E,b,z){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(E,b,z.getWidth(),1),this._ctx.restore()},ne}(ue.BaseRenderLayer);Se.CursorRenderLayer=te;var le=function(){function ee(ne,E){this._renderCallback=E,this.isCursorVisible=!0,ne&&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 ne=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){ne._renderCallback(),ne._animationFrame=void 0})))},ee.prototype._restartInterval=function(ne){var E=this;ne===void 0&&(ne=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(E._animationTimeRestarted){var b=600-(Date.now()-E._animationTimeRestarted);if(E._animationTimeRestarted=void 0,b>0)return void E._restartInterval(b)}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)},ne)},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(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.LinkRenderLayer=void 0;var ue=ce(13),se=ce(9),te=ce(26),le=function(ee){function ne(E,b,z,x,re,ae,oe,ve){var ye=ee.call(this,E,"link",b,!0,z,x,oe,ve)||this;return re.onShowLinkUnderline(function(me){return ye._onShowLinkUnderline(me)}),re.onHideLinkUnderline(function(me){return ye._onHideLinkUnderline(me)}),ae.onShowLinkUnderline(function(me){return ye._onShowLinkUnderline(me)}),ae.onHideLinkUnderline(function(me){return ye._onHideLinkUnderline(me)}),ye}return Ce(ne,ee),ne.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state=void 0},ne.prototype.reset=function(){this._clearCurrentLink()},ne.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}},ne.prototype._onShowLinkUnderline=function(E){if(E.fg===se.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:E.fg&&te.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 b=E.y1+1;b<E.y2;b++)this._fillBottomLineAtCells(0,b,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E},ne.prototype._onHideLinkUnderline=function(E){this._clearCurrentLink()},ne}(ue.BaseRenderLayer);Se.LinkRenderLayer=le},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(ee,ne,E,b){var z,x=arguments.length,re=x<3?ne:b===null?b=Object.getOwnPropertyDescriptor(ne,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(ee,ne,E,b);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(re=(x<3?z(re):x>3?z(ne,E,re):z(ne,E))||re);return x>3&&re&&Object.defineProperty(ne,E,re),re},Ce=this&&this.__param||function(ee,ne){return function(E,b){ne(E,b,ee)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.MouseZone=Se.Linkifier=void 0;var ue=ce(0),se=ce(1),te=function(){function ee(ne,E,b){this._bufferService=ne,this._logService=E,this._unicodeService=b,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new ue.EventEmitter,this._onHideLinkUnderline=new ue.EventEmitter,this._onLinkTooltip=new ue.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(ne,E){this._element=ne,this._mouseZoneManager=E},ee.prototype.linkifyRows=function(ne,E){var b=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=ne,this._rowsToLinkify.end=E):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,ne),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,E)),this._mouseZoneManager.clearAll(ne,E),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return b._linkifyRows()},ee._timeBeforeLatency))},ee.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var ne=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var E=ne.ydisp+this._rowsToLinkify.start;if(!(E>=ne.lines.length)){for(var b=ne.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,z=Math.ceil(2e3/this._bufferService.cols),x=this._bufferService.buffer.iterator(!1,E,b,z,z);x.hasNext();)for(var re=x.next(),ae=0;ae<this._linkMatchers.length;ae++)this._doLinkifyRow(re.range.first,re.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(ne,E,b){if(b===void 0&&(b={}),!E)throw new Error("handler must be defined");var z={id:this._nextLinkMatcherId++,regex:ne,handler:E,matchIndex:b.matchIndex,validationCallback:b.validationCallback,hoverTooltipCallback:b.tooltipCallback,hoverLeaveCallback:b.leaveCallback,willLinkActivate:b.willLinkActivate,priority:b.priority||0};return this._addLinkMatcherToList(z),z.id},ee.prototype._addLinkMatcherToList=function(ne){if(this._linkMatchers.length!==0){for(var E=this._linkMatchers.length-1;E>=0;E--)if(ne.priority<=this._linkMatchers[E].priority)return void this._linkMatchers.splice(E+1,0,ne);this._linkMatchers.splice(0,0,ne)}else this._linkMatchers.push(ne)},ee.prototype.deregisterLinkMatcher=function(ne){for(var E=0;E<this._linkMatchers.length;E++)if(this._linkMatchers[E].id===ne)return this._linkMatchers.splice(E,1),!0;return!1},ee.prototype._doLinkifyRow=function(ne,E,b){for(var z,x=this,re=new RegExp(b.regex.source,(b.regex.flags||"")+"g"),ae=-1,oe=function(){var ye=z[typeof b.matchIndex!="number"?0:b.matchIndex];if(!ye)return ve._logService.debug("match found without corresponding matchIndex",z,b),"break";if(ae=E.indexOf(ye,ae+1),re.lastIndex=ae+ye.length,ae<0)return"break";var me=ve._bufferService.buffer.stringIndexToBufferIndex(ne,ae);if(me[0]<0)return"break";var ge=ve._bufferService.buffer.lines.get(me[0]);if(!ge)return"break";var _e=ge.getFg(me[1]),he=_e?_e>>9&511:void 0;b.validationCallback?b.validationCallback(ye,function(pe){x._rowsTimeoutId||pe&&x._addLink(me[1],me[0]-x._bufferService.buffer.ydisp,ye,b,he)}):ve._addLink(me[1],me[0]-ve._bufferService.buffer.ydisp,ye,b,he)},ve=this;(z=re.exec(E))!==null&&oe()!=="break";);},ee.prototype._addLink=function(ne,E,b,z,x){var re=this;if(this._mouseZoneManager&&this._element){var ae=this._unicodeService.getStringCellWidth(b),oe=ne%this._bufferService.cols,ve=E+Math.floor(ne/this._bufferService.cols),ye=(oe+ae)%this._bufferService.cols,me=ve+Math.floor((oe+ae)/this._bufferService.cols);ye===0&&(ye=this._bufferService.cols,me--),this._mouseZoneManager.add(new le(oe+1,ve+1,ye+1,me+1,function(ge){if(z.handler)return z.handler(ge,b);var _e=window.open();_e?(_e.opener=null,_e.location.href=b):console.warn("Opening link blocked as opener could not be cleared")},function(){re._onShowLinkUnderline.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),re._element.classList.add("xterm-cursor-pointer")},function(ge){re._onLinkTooltip.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),z.hoverTooltipCallback&&z.hoverTooltipCallback(ge,b,{start:{x:oe,y:ve},end:{x:ye,y:me}})},function(){re._onHideLinkUnderline.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),re._element.classList.remove("xterm-cursor-pointer"),z.hoverLeaveCallback&&z.hoverLeaveCallback()},function(ge){return!z.willLinkActivate||z.willLinkActivate(ge,b)}))}},ee.prototype._createLinkHoverEvent=function(ne,E,b,z,x){return{x1:ne,y1:E,x2:b,y2:z,cols:this._bufferService.cols,fg:x}},ee._timeBeforeLatency=200,ee=ie([Ce(0,se.IBufferService),Ce(1,se.ILogService),Ce(2,se.IUnicodeService)],ee)}();Se.Linkifier=te;var le=function(ee,ne,E,b,z,x,re,ae,oe){this.x1=ee,this.y1=ne,this.x2=E,this.y2=b,this.clickCallback=z,this.hoverCallback=x,this.tooltipCallback=re,this.leaveCallback=ae,this.willLinkActivate=oe};Se.MouseZone=le},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ye,me){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,_e){ge.__proto__=_e}||function(ge,_e){for(var he in _e)_e.hasOwnProperty(he)&&(ge[he]=_e[he])})(ye,me)},function(ye,me){function ge(){this.constructor=ye}ie(ye,me),ye.prototype=me===null?Object.create(me):(ge.prototype=me.prototype,new ge)}),ue=this&&this.__decorate||function(ye,me,ge,_e){var he,pe=arguments.length,ke=pe<3?me:_e===null?_e=Object.getOwnPropertyDescriptor(me,ge):_e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ye,me,ge,_e);else for(var Te=ye.length-1;Te>=0;Te--)(he=ye[Te])&&(ke=(pe<3?he(ke):pe>3?he(me,ge,ke):he(me,ge))||ke);return pe>3&&ke&&Object.defineProperty(me,ge,ke),ke},se=this&&this.__param||function(ye,me){return function(ge,_e){me(ge,_e,ye)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.SelectionService=void 0;var te=ce(11),le=ce(52),ee=ce(4),ne=ce(0),E=ce(5),b=ce(1),z=ce(30),x=ce(53),re=ce(2),ae="\xA0",oe=new RegExp(ae,"g"),ve=function(ye){function me(ge,_e,he,pe,ke,Te,Ee){var Oe=ye.call(this)||this;return Oe._element=ge,Oe._screenElement=_e,Oe._bufferService=he,Oe._coreService=pe,Oe._mouseService=ke,Oe._optionsService=Te,Oe._renderService=Ee,Oe._dragScrollAmount=0,Oe._enabled=!0,Oe._workCell=new ee.CellData,Oe._mouseDownTimeStamp=0,Oe._onLinuxMouseSelection=Oe.register(new ne.EventEmitter),Oe._onRedrawRequest=Oe.register(new ne.EventEmitter),Oe._onSelectionChange=Oe.register(new ne.EventEmitter),Oe._onRequestScrollLines=Oe.register(new ne.EventEmitter),Oe._mouseMoveListener=function(je){return Oe._onMouseMove(je)},Oe._mouseUpListener=function(je){return Oe._onMouseUp(je)},Oe._coreService.onUserInput(function(){Oe.hasSelection&&Oe.clearSelection()}),Oe._trimListener=Oe._bufferService.buffer.lines.onTrim(function(je){return Oe._onTrim(je)}),Oe.register(Oe._bufferService.buffers.onBufferActivate(function(je){return Oe._onBufferActivate(je)})),Oe.enable(),Oe._model=new le.SelectionModel(Oe._bufferService),Oe._activeSelectionMode=0,Oe}return Ce(me,ye),Object.defineProperty(me.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){this._removeMouseDownListeners()},me.prototype.reset=function(){this.clearSelection()},me.prototype.disable=function(){this.clearSelection(),this._enabled=!1},me.prototype.enable=function(){this._enabled=!0},Object.defineProperty(me.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"hasSelection",{get:function(){var ge=this._model.finalSelectionStart,_e=this._model.finalSelectionEnd;return!(!ge||!_e)&&(ge[0]!==_e[0]||ge[1]!==_e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"selectionText",{get:function(){var ge=this._model.finalSelectionStart,_e=this._model.finalSelectionEnd;if(!ge||!_e)return"";var he=this._bufferService.buffer,pe=[];if(this._activeSelectionMode===3){if(ge[0]===_e[0])return"";for(var ke=ge[1];ke<=_e[1];ke++){var Te=he.translateBufferLineToString(ke,!0,ge[0],_e[0]);pe.push(Te)}}else{var Ee=ge[1]===_e[1]?_e[0]:void 0;for(pe.push(he.translateBufferLineToString(ge[1],!0,ge[0],Ee)),ke=ge[1]+1;ke<=_e[1]-1;ke++){var Oe=he.lines.get(ke);Te=he.translateBufferLineToString(ke,!0),Oe&&Oe.isWrapped?pe[pe.length-1]+=Te:pe.push(Te)}ge[1]!==_e[1]&&(Oe=he.lines.get(_e[1]),Te=he.translateBufferLineToString(_e[1],!0,0,_e[0]),Oe&&Oe.isWrapped?pe[pe.length-1]+=Te:pe.push(Te))}return pe.map(function(je){return je.replace(oe," ")}).join(te.isWindows?`\r
`:`
`)},enumerable:!1,configurable:!0}),me.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},me.prototype.refresh=function(ge){var _e=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return _e._refresh()})),te.isLinux&&ge&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},me.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},me.prototype.isClickInSelection=function(ge){var _e=this._getMouseBufferCoords(ge),he=this._model.finalSelectionStart,pe=this._model.finalSelectionEnd;return!!(he&&pe&&_e)&&this._areCoordsInSelection(_e,he,pe)},me.prototype._areCoordsInSelection=function(ge,_e,he){return ge[1]>_e[1]&&ge[1]<he[1]||_e[1]===he[1]&&ge[1]===_e[1]&&ge[0]>=_e[0]&&ge[0]<he[0]||_e[1]<he[1]&&ge[1]===he[1]&&ge[0]<he[0]||_e[1]<he[1]&&ge[1]===_e[1]&&ge[0]>=_e[0]},me.prototype.selectWordAtCursor=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._selectWordAt(_e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},me.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},me.prototype.selectLines=function(ge,_e){this._model.clearSelection(),ge=Math.max(ge,0),_e=Math.min(_e,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ge],this._model.selectionEnd=[this._bufferService.cols,_e],this.refresh(),this._onSelectionChange.fire()},me.prototype._onTrim=function(ge){this._model.onTrim(ge)&&this.refresh()},me.prototype._getMouseBufferCoords=function(ge){var _e=this._mouseService.getCoords(ge,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(_e)return _e[0]--,_e[1]--,_e[1]+=this._bufferService.buffer.ydisp,_e},me.prototype._getMouseEventScrollAmount=function(ge){var _e=z.getCoordsRelativeToElement(ge,this._screenElement)[1],he=this._renderService.dimensions.canvasHeight;return _e>=0&&_e<=he?0:(_e>he&&(_e-=he),_e=Math.min(Math.max(_e,-50),50),(_e/=50)/Math.abs(_e)+Math.round(14*_e))},me.prototype.shouldForceSelection=function(ge){return te.isMac?ge.altKey&&this._optionsService.options.macOptionClickForcesSelection:ge.shiftKey},me.prototype.onMouseDown=function(ge){if(this._mouseDownTimeStamp=ge.timeStamp,(ge.button!==2||!this.hasSelection)&&ge.button===0){if(!this._enabled){if(!this.shouldForceSelection(ge))return;ge.stopPropagation()}ge.preventDefault(),this._dragScrollAmount=0,this._enabled&&ge.shiftKey?this._onIncrementalClick(ge):ge.detail===1?this._onSingleClick(ge):ge.detail===2?this._onDoubleClick(ge):ge.detail===3&&this._onTripleClick(ge),this._addMouseDownListeners(),this.refresh(!0)}},me.prototype._addMouseDownListeners=function(){var ge=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return ge._dragScroll()},50)},me.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},me.prototype._onIncrementalClick=function(ge){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(ge))},me.prototype._onSingleClick=function(ge){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(ge)?3:0,this._model.selectionStart=this._getMouseBufferCoords(ge),this._model.selectionStart){this._model.selectionEnd=void 0;var _e=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);_e&&_e.length!==this._model.selectionStart[0]&&_e.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},me.prototype._onDoubleClick=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._activeSelectionMode=1,this._selectWordAt(_e,!0))},me.prototype._onTripleClick=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._activeSelectionMode=2,this._selectLineAt(_e[1]))},me.prototype.shouldColumnSelect=function(ge){return ge.altKey&&!(te.isMac&&this._optionsService.options.macOptionClickForcesSelection)},me.prototype._onMouseMove=function(ge){if(ge.stopImmediatePropagation(),this._model.selectionStart){var _e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(ge),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(ge),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var he=this._bufferService.buffer;if(this._model.selectionEnd[1]<he.lines.length){var pe=he.lines.get(this._model.selectionEnd[1]);pe&&pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}_e&&_e[0]===this._model.selectionEnd[0]&&_e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},me.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var ge=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(ge.ydisp+this._bufferService.rows,ge.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=ge.ydisp),this.refresh()}},me.prototype._onMouseUp=function(ge){var _e=ge.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&_e<500&&ge.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var he=this._mouseService.getCoords(ge,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(he&&he[0]!==void 0&&he[1]!==void 0){var pe=x.moveToCellSequence(he[0]-1,he[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},me.prototype._onBufferActivate=function(ge){var _e=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ge.activeBuffer.lines.onTrim(function(he){return _e._onTrim(he)})},me.prototype._convertViewportColToCharacterIndex=function(ge,_e){for(var he=_e[0],pe=0;_e[0]>=pe;pe++){var ke=ge.loadCell(pe,this._workCell).getChars().length;this._workCell.getWidth()===0?he--:ke>1&&_e[0]!==pe&&(he+=ke-1)}return he},me.prototype.setSelection=function(ge,_e,he){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ge,_e],this._model.selectionStartLength=he,this.refresh()},me.prototype._getWordAt=function(ge,_e,he,pe){if(he===void 0&&(he=!0),pe===void 0&&(pe=!0),!(ge[0]>=this._bufferService.cols)){var ke=this._bufferService.buffer,Te=ke.lines.get(ge[1]);if(Te){var Ee=ke.translateBufferLineToString(ge[1],!1),Oe=this._convertViewportColToCharacterIndex(Te,ge),je=Oe,Pe=ge[0]-Oe,Qe=0,Xe=0,ot=0,We=0;if(Ee.charAt(Oe)===" "){for(;Oe>0&&Ee.charAt(Oe-1)===" ";)Oe--;for(;je<Ee.length&&Ee.charAt(je+1)===" ";)je++}else{var rt=ge[0],Ye=ge[0];Te.getWidth(rt)===0&&(Qe++,rt--),Te.getWidth(Ye)===2&&(Xe++,Ye++);var ut=Te.getString(Ye).length;for(ut>1&&(We+=ut-1,je+=ut-1);rt>0&&Oe>0&&!this._isCharWordSeparator(Te.loadCell(rt-1,this._workCell));){Te.loadCell(rt-1,this._workCell);var Ge=this._workCell.getChars().length;this._workCell.getWidth()===0?(Qe++,rt--):Ge>1&&(ot+=Ge-1,Oe-=Ge-1),Oe--,rt--}for(;Ye<Te.length&&je+1<Ee.length&&!this._isCharWordSeparator(Te.loadCell(Ye+1,this._workCell));){Te.loadCell(Ye+1,this._workCell);var ze=this._workCell.getChars().length;this._workCell.getWidth()===2?(Xe++,Ye++):ze>1&&(We+=ze-1,je+=ze-1),je++,Ye++}}je++;var Ve=Oe+Pe-Qe+ot,$e=Math.min(this._bufferService.cols,je-Oe+Qe+Xe-ot-We);if(_e||Ee.slice(Oe,je).trim()!==""){if(he&&Ve===0&&Te.getCodePoint(0)!==32){var nt=ke.lines.get(ge[1]-1);if(nt&&Te.isWrapped&&nt.getCodePoint(this._bufferService.cols-1)!==32){var et=this._getWordAt([this._bufferService.cols-1,ge[1]-1],!1,!0,!1);if(et){var pt=this._bufferService.cols-et.start;Ve-=pt,$e+=pt}}}if(pe&&Ve+$e===this._bufferService.cols&&Te.getCodePoint(this._bufferService.cols-1)!==32){var ct=ke.lines.get(ge[1]+1);if(ct&&ct.isWrapped&&ct.getCodePoint(0)!==32){var Rt=this._getWordAt([0,ge[1]+1],!1,!1,!0);Rt&&($e+=Rt.length)}}return{start:Ve,length:$e}}}}},me.prototype._selectWordAt=function(ge,_e){var he=this._getWordAt(ge,_e);if(he){for(;he.start<0;)he.start+=this._bufferService.cols,ge[1]--;this._model.selectionStart=[he.start,ge[1]],this._model.selectionStartLength=he.length}},me.prototype._selectToWordAt=function(ge){var _e=this._getWordAt(ge,!0);if(_e){for(var he=ge[1];_e.start<0;)_e.start+=this._bufferService.cols,he--;if(!this._model.areSelectionValuesReversed())for(;_e.start+_e.length>this._bufferService.cols;)_e.length-=this._bufferService.cols,he++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?_e.start:_e.start+_e.length,he]}},me.prototype._isCharWordSeparator=function(ge){return ge.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(ge.getChars())>=0},me.prototype._selectLineAt=function(ge){var _e=this._bufferService.buffer.getWrappedRangeForLine(ge);this._model.selectionStart=[0,_e.first],this._model.selectionEnd=[this._bufferService.cols,_e.last],this._model.selectionStartLength=0},me=ue([se(2,b.IBufferService),se(3,b.ICoreService),se(4,E.IMouseService),se(5,b.IOptionsService),se(6,E.IRenderService)],me)}(re.Disposable);Se.SelectionService=ve},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.SelectionModel=void 0;var ie=function(){function Ce(ue){this._bufferService=ue,this.isSelectAllActive=!1,this.selectionStartLength=0}return Ce.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Ce.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(Ce.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 ue=this.selectionStart[0]+this.selectionStartLength;return ue>this._bufferService.cols?[ue%this._bufferService.cols,this.selectionStart[1]+Math.floor(ue/this._bufferService.cols)]:[ue,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}),Ce.prototype.areSelectionValuesReversed=function(){var ue=this.selectionStart,se=this.selectionEnd;return!(!ue||!se)&&(ue[1]>se[1]||ue[1]===se[1]&&ue[0]>se[0])},Ce.prototype.onTrim=function(ue){return this.selectionStart&&(this.selectionStart[1]-=ue),this.selectionEnd&&(this.selectionEnd[1]-=ue),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Ce}();Se.SelectionModel=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.moveToCellSequence=void 0;var ie=ce(12);function Ce(ne,E,b,z){var x=ne-ue(b,ne),re=E-ue(b,E);return ee(Math.abs(x-re)-function(ae,oe,ve){for(var ye=0,me=ae-ue(ve,ae),ge=oe-ue(ve,oe),_e=0;_e<Math.abs(me-ge);_e++){var he=se(ae,oe)==="A"?-1:1,pe=ve.buffer.lines.get(me+he*_e);pe&&pe.isWrapped&&ye++}return ye}(ne,E,b),le(se(ne,E),z))}function ue(ne,E){for(var b=0,z=ne.buffer.lines.get(E),x=z&&z.isWrapped;x&&E>=0&&E<ne.rows;)b++,x=(z=ne.buffer.lines.get(--E))&&z.isWrapped;return b}function se(ne,E){return ne>E?"A":"B"}function te(ne,E,b,z,x,re){for(var ae=ne,oe=E,ve="";ae!==b||oe!==z;)ae+=x?1:-1,x&&ae>re.cols-1?(ve+=re.buffer.translateBufferLineToString(oe,!1,ne,ae),ae=0,ne=0,oe++):!x&&ae<0&&(ve+=re.buffer.translateBufferLineToString(oe,!1,0,ne+1),ne=ae=re.cols-1,oe--);return ve+re.buffer.translateBufferLineToString(oe,!1,ne,ae)}function le(ne,E){var b=E?"O":"[";return ie.C0.ESC+b+ne}function ee(ne,E){ne=Math.floor(ne);for(var b="",z=0;z<ne;z++)b+=E;return b}Se.moveToCellSequence=function(ne,E,b,z){var x,re=b.buffer.x,ae=b.buffer.y;if(!b.buffer.hasScrollback)return function(ve,ye,me,ge,_e,he){return Ce(ye,ge,_e,he).length===0?"":ee(te(ve,ye,ve,ye-ue(_e,ye),!1,_e).length,le("D",he))}(re,ae,0,E,b,z)+Ce(ae,E,b,z)+function(ve,ye,me,ge,_e,he){var pe;pe=Ce(ye,ge,_e,he).length>0?ge-ue(_e,ge):ye;var ke=ge,Te=function(Ee,Oe,je,Pe,Qe,Xe){var ot;return ot=Ce(je,Pe,Qe,Xe).length>0?Pe-ue(Qe,Pe):Oe,Ee<je&&ot<=Pe||Ee>=je&&ot<Pe?"C":"D"}(ve,ye,me,ge,_e,he);return ee(te(ve,pe,me,ke,Te==="C",_e).length,le(Te,he))}(re,ae,ne,E,b,z);if(ae===E)return x=re>ne?"D":"C",ee(Math.abs(re-ne),le(x,z));x=ae>E?"D":"C";var oe=Math.abs(ae-E);return ee(function(ve,ye){return ye.cols-ve}(ae>E?ne:re,b)+(oe-1)*b.cols+1+((ae>E?re:ne)-1),le(x,z))}},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(te,le,ee,ne){var E,b=arguments.length,z=b<3?le:ne===null?ne=Object.getOwnPropertyDescriptor(le,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(te,le,ee,ne);else for(var x=te.length-1;x>=0;x--)(E=te[x])&&(z=(b<3?E(z):b>3?E(le,ee,z):E(le,ee))||z);return b>3&&z&&Object.defineProperty(le,ee,z),z},Ce=this&&this.__param||function(te,le){return function(ee,ne){le(ee,ne,te)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.SoundService=void 0;var ue=ce(1),se=function(){function te(le){this._optionsService=le}return Object.defineProperty(te,"audioContext",{get:function(){if(!te._audioContext){var le=window.AudioContext||window.webkitAudioContext;if(!le)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;te._audioContext=new le}return te._audioContext},enumerable:!1,configurable:!0}),te.prototype.playBellSound=function(){var le=te.audioContext;if(le){var ee=le.createBufferSource();le.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(ne){ee.buffer=ne,ee.connect(le.destination),ee.start(0)})}},te.prototype._base64ToArrayBuffer=function(le){for(var ee=window.atob(le),ne=ee.length,E=new Uint8Array(ne),b=0;b<ne;b++)E[b]=ee.charCodeAt(b);return E.buffer},te.prototype._removeMimeType=function(le){return le.split(",")[1]},te=ie([Ce(0,ue.IOptionsService)],te)}();Se.SoundService=se},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.MouseZoneManager=void 0;var te=ce(2),le=ce(7),ee=ce(5),ne=ce(1),E=function(b){function z(x,re,ae,oe,ve,ye){var me=b.call(this)||this;return me._element=x,me._screenElement=re,me._bufferService=ae,me._mouseService=oe,me._selectionService=ve,me._optionsService=ye,me._zones=[],me._areZonesActive=!1,me._lastHoverCoords=[void 0,void 0],me._initialSelectionLength=0,me.register(le.addDisposableDomListener(me._element,"mousedown",function(ge){return me._onMouseDown(ge)})),me._mouseMoveListener=function(ge){return me._onMouseMove(ge)},me._mouseLeaveListener=function(ge){return me._onMouseLeave(ge)},me._clickListener=function(ge){return me._onClick(ge)},me}return Ce(z,b),z.prototype.dispose=function(){b.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,re){if(this._zones.length!==0){x&&re||(x=0,re=this._bufferService.rows-1);for(var ae=0;ae<this._zones.length;ae++){var oe=this._zones[ae];(oe.y1>x&&oe.y1<=re+1||oe.y2>x&&oe.y2<=re+1||oe.y1<x&&oe.y2>re+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 re=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 re._onTooltip(x)},this._optionsService.options.linkTooltipHoverDuration)))},z.prototype._onTooltip=function(x){this._tooltipTimeout=void 0;var re=this._findZoneEventAt(x);re&&re.tooltipCallback&&re.tooltipCallback(x)},z.prototype._onMouseDown=function(x){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var re=this._findZoneEventAt(x);re!=null&&re.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 re=this._findZoneEventAt(x),ae=this._getSelectionLength();re&&ae===this._initialSelectionLength&&(re.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 re=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(re)for(var ae=re[0],oe=re[1],ve=0;ve<this._zones.length;ve++){var ye=this._zones[ve];if(ye.y1===ye.y2){if(oe===ye.y1&&ae>=ye.x1&&ae<ye.x2)return ye}else if(oe===ye.y1&&ae>=ye.x1||oe===ye.y2&&ae<ye.x2||oe>ye.y1&&oe<ye.y2)return ye}},z=ue([se(2,ne.IBufferService),se(3,ee.IMouseService),se(4,ee.ISelectionService),se(5,ne.IOptionsService)],z)}(te.Disposable);Se.MouseZoneManager=E},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(z,x){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,ae){re.__proto__=ae}||function(re,ae){for(var oe in ae)ae.hasOwnProperty(oe)&&(re[oe]=ae[oe])})(z,x)},function(z,x){function re(){this.constructor=z}ie(z,x),z.prototype=x===null?Object.create(x):(re.prototype=x.prototype,new re)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.AccessibilityManager=void 0;var ue=ce(18),se=ce(11),te=ce(31),le=ce(7),ee=ce(2),ne=ce(32),E=ce(17),b=function(z){function x(re,ae){var oe=z.call(this)||this;oe._terminal=re,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 ve=0;ve<oe._terminal.rows;ve++)oe._rowElements[ve]=oe._createAccessibilityTreeNode(),oe._rowContainer.appendChild(oe._rowElements[ve]);if(oe._topBoundaryFocusListener=function(ye){return oe._onBoundaryFocus(ye,0)},oe._bottomBoundaryFocusListener=function(ye){return oe._onBoundaryFocus(ye,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 te.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(ye){return oe._onResize(ye.rows)})),oe.register(oe._terminal.onRender(function(ye){return oe._refreshRows(ye.start,ye.end)})),oe.register(oe._terminal.onScroll(function(){return oe._refreshRows()})),oe.register(oe._terminal.onA11yChar(function(ye){return oe._onChar(ye)})),oe.register(oe._terminal.onLineFeed(function(){return oe._onChar(`
`)})),oe.register(oe._terminal.onA11yTab(function(ye){return oe._onTab(ye)})),oe.register(oe._terminal.onKey(function(ye){return oe._onKey(ye.key)})),oe.register(oe._terminal.onBlur(function(){return oe._clearLiveRegion()})),oe.register(oe._renderService.onDimensionsChange(function(){return oe._refreshRowsDimensions()})),oe._screenDprMonitor=new ne.ScreenDprMonitor,oe.register(oe._screenDprMonitor),oe._screenDprMonitor.setListener(function(){return oe._refreshRowsDimensions()}),oe.register(le.addDisposableDomListener(window,"resize",function(){return oe._refreshRowsDimensions()})),oe}return Ce(x,z),x.prototype.dispose=function(){z.prototype.dispose.call(this),E.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},x.prototype._onBoundaryFocus=function(re,ae){var oe=re.target,ve=this._rowElements[ae===0?1:this._rowElements.length-2];if(oe.getAttribute("aria-posinset")!==(ae===0?"1":""+this._terminal.buffer.lines.length)&&re.relatedTarget===ve){var ye,me;if(ae===0?(ye=oe,me=this._rowElements.pop(),this._rowContainer.removeChild(me)):(ye=this._rowElements.shift(),me=oe,this._rowContainer.removeChild(ye)),ye.removeEventListener("focus",this._topBoundaryFocusListener),me.removeEventListener("focus",this._bottomBoundaryFocusListener),ae===0){var ge=this._createAccessibilityTreeNode();this._rowElements.unshift(ge),this._rowContainer.insertAdjacentElement("afterbegin",ge)}else ge=this._createAccessibilityTreeNode(),this._rowElements.push(ge),this._rowContainer.appendChild(ge);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(),re.preventDefault(),re.stopImmediatePropagation()}},x.prototype._onResize=function(re){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>re;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},x.prototype._createAccessibilityTreeNode=function(){var re=document.createElement("div");return re.setAttribute("role","listitem"),re.tabIndex=-1,this._refreshRowDimensions(re),re},x.prototype._onTab=function(re){for(var ae=0;ae<re;ae++)this._onChar(" ")},x.prototype._onChar=function(re){var ae=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==re&&(this._charsToAnnounce+=re):this._charsToAnnounce+=re,re===`
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=ue.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(re){this._clearLiveRegion(),this._charsToConsume.push(re)},x.prototype._refreshRows=function(re,ae){this._renderRowsDebouncer.refresh(re,ae,this._terminal.rows)},x.prototype._renderRows=function(re,ae){for(var oe=this._terminal.buffer,ve=oe.lines.length.toString(),ye=re;ye<=ae;ye++){var me=oe.translateBufferLineToString(oe.ydisp+ye,!0),ge=(oe.ydisp+ye+1).toString(),_e=this._rowElements[ye];_e&&(me.length===0?_e.innerHTML="&nbsp;":_e.textContent=me,_e.setAttribute("aria-posinset",ge),_e.setAttribute("aria-setsize",ve))}this._announceCharacters()},x.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var re=0;re<this._terminal.rows;re++)this._refreshRowDimensions(this._rowElements[re])}},x.prototype._refreshRowDimensions=function(re){re.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);Se.AccessibilityManager=b},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(oe,ve){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,me){ye.__proto__=me}||function(ye,me){for(var ge in me)me.hasOwnProperty(ge)&&(ye[ge]=me[ge])})(oe,ve)},function(oe,ve){function ye(){this.constructor=oe}ie(oe,ve),oe.prototype=ve===null?Object.create(ve):(ye.prototype=ve.prototype,new ye)}),ue=this&&this.__decorate||function(oe,ve,ye,me){var ge,_e=arguments.length,he=_e<3?ve:me===null?me=Object.getOwnPropertyDescriptor(ve,ye):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(oe,ve,ye,me);else for(var pe=oe.length-1;pe>=0;pe--)(ge=oe[pe])&&(he=(_e<3?ge(he):_e>3?ge(ve,ye,he):ge(ve,ye))||he);return _e>3&&he&&Object.defineProperty(ve,ye,he),he},se=this&&this.__param||function(oe,ve){return function(ye,me){ve(ye,me,oe)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.DomRenderer=void 0;var te=ce(58),le=ce(9),ee=ce(2),ne=ce(5),E=ce(1),b=ce(0),z=ce(10),x=ce(17),re=1,ae=function(oe){function ve(ye,me,ge,_e,he,pe,ke,Te,Ee){var Oe=oe.call(this)||this;return Oe._colors=ye,Oe._element=me,Oe._screenElement=ge,Oe._viewportElement=_e,Oe._linkifier=he,Oe._linkifier2=pe,Oe._charSizeService=ke,Oe._optionsService=Te,Oe._bufferService=Ee,Oe._terminalClass=re++,Oe._rowElements=[],Oe._rowContainer=document.createElement("div"),Oe._rowContainer.classList.add("xterm-rows"),Oe._rowContainer.style.lineHeight="normal",Oe._rowContainer.setAttribute("aria-hidden","true"),Oe._refreshRowElements(Oe._bufferService.cols,Oe._bufferService.rows),Oe._selectionContainer=document.createElement("div"),Oe._selectionContainer.classList.add("xterm-selection"),Oe._selectionContainer.setAttribute("aria-hidden","true"),Oe.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},Oe._updateDimensions(),Oe._injectCss(),Oe._rowFactory=new te.DomRendererRowFactory(document,Oe._optionsService,Oe._colors),Oe._element.classList.add("xterm-dom-renderer-owner-"+Oe._terminalClass),Oe._screenElement.appendChild(Oe._rowContainer),Oe._screenElement.appendChild(Oe._selectionContainer),Oe._linkifier.onShowLinkUnderline(function(je){return Oe._onLinkHover(je)}),Oe._linkifier.onHideLinkUnderline(function(je){return Oe._onLinkLeave(je)}),Oe._linkifier2.onShowLinkUnderline(function(je){return Oe._onLinkHover(je)}),Oe._linkifier2.onHideLinkUnderline(function(je){return Oe._onLinkLeave(je)}),Oe}return Ce(ve,oe),Object.defineProperty(ve.prototype,"onRequestRedraw",{get:function(){return new b.EventEmitter().event},enumerable:!1,configurable:!0}),ve.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)},ve.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 ye=0,me=this._rowElements;ye<me.length;ye++){var ge=me[ye];ge.style.width=this.dimensions.canvasWidth+"px",ge.style.height=this.dimensions.actualCellHeight+"px",ge.style.lineHeight=this.dimensions.actualCellHeight+"px",ge.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var _e=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=_e,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ve.prototype.setColors=function(ye){this._colors=ye,this._injectCss()},ve.prototype._injectCss=function(){var ye=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var me=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";me+=this._terminalSelector+" span:not(."+te.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+te.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+te.ITALIC_CLASS+" { font-style: italic;}",me+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",me+="@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+"; }}",me+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_BLINK_CLASS+":not(."+te.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_BLINK_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",me+=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(ge,_e){me+=ye._terminalSelector+" .xterm-fg-"+_e+" { color: "+ge.css+"; }"+ye._terminalSelector+" .xterm-bg-"+_e+" { background-color: "+ge.css+"; }"}),me+=this._terminalSelector+" .xterm-fg-"+le.INVERTED_DEFAULT_COLOR+" { color: "+z.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+le.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=me},ve.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},ve.prototype._refreshRowElements=function(ye,me){for(var ge=this._rowElements.length;ge<=me;ge++){var _e=document.createElement("div");this._rowContainer.appendChild(_e),this._rowElements.push(_e)}for(;this._rowElements.length>me;)this._rowContainer.removeChild(this._rowElements.pop())},ve.prototype.onResize=function(ye,me){this._refreshRowElements(ye,me),this._updateDimensions()},ve.prototype.onCharSizeChanged=function(){this._updateDimensions()},ve.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},ve.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},ve.prototype.onSelectionChanged=function(ye,me,ge){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ye&&me){var _e=ye[1]-this._bufferService.buffer.ydisp,he=me[1]-this._bufferService.buffer.ydisp,pe=Math.max(_e,0),ke=Math.min(he,this._bufferService.rows-1);if(!(pe>=this._bufferService.rows||ke<0)){var Te=document.createDocumentFragment();if(ge)Te.appendChild(this._createSelectionElement(pe,ye[0],me[0],ke-pe+1));else{var Ee=_e===pe?ye[0]:0,Oe=pe===ke?me[0]:this._bufferService.cols;Te.appendChild(this._createSelectionElement(pe,Ee,Oe));var je=ke-pe-1;if(Te.appendChild(this._createSelectionElement(pe+1,0,this._bufferService.cols,je)),pe!==ke){var Pe=he===ke?me[0]:this._bufferService.cols;Te.appendChild(this._createSelectionElement(ke,0,Pe))}}this._selectionContainer.appendChild(Te)}}},ve.prototype._createSelectionElement=function(ye,me,ge,_e){_e===void 0&&(_e=1);var he=document.createElement("div");return he.style.height=_e*this.dimensions.actualCellHeight+"px",he.style.top=ye*this.dimensions.actualCellHeight+"px",he.style.left=me*this.dimensions.actualCellWidth+"px",he.style.width=this.dimensions.actualCellWidth*(ge-me)+"px",he},ve.prototype.onCursorMove=function(){},ve.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},ve.prototype.clear=function(){for(var ye=0,me=this._rowElements;ye<me.length;ye++)me[ye].innerHTML=""},ve.prototype.renderRows=function(ye,me){for(var ge=this._bufferService.buffer.ybase+this._bufferService.buffer.y,_e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),he=this._optionsService.options.cursorBlink,pe=ye;pe<=me;pe++){var ke=this._rowElements[pe];ke.innerHTML="";var Te=pe+this._bufferService.buffer.ydisp,Ee=this._bufferService.buffer.lines.get(Te),Oe=this._optionsService.options.cursorStyle;ke.appendChild(this._rowFactory.createRow(Ee,Te===ge,Oe,_e,he,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(ve.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),ve.prototype.registerCharacterJoiner=function(ye){return-1},ve.prototype.deregisterCharacterJoiner=function(ye){return!1},ve.prototype._onLinkHover=function(ye){this._setCellUnderline(ye.x1,ye.x2,ye.y1,ye.y2,ye.cols,!0)},ve.prototype._onLinkLeave=function(ye){this._setCellUnderline(ye.x1,ye.x2,ye.y1,ye.y2,ye.cols,!1)},ve.prototype._setCellUnderline=function(ye,me,ge,_e,he,pe){for(;ye!==me||ge!==_e;){var ke=this._rowElements[ge];if(!ke)return;var Te=ke.children[ye];Te&&(Te.style.textDecoration=pe?"underline":"none"),++ye>=he&&(ye=0,ge++)}},ve=ue([se(6,ne.ICharSizeService),se(7,E.IOptionsService),se(8,E.IBufferService)],ve)}(ee.Disposable);Se.DomRenderer=ae},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.DomRendererRowFactory=Se.CURSOR_STYLE_UNDERLINE_CLASS=Se.CURSOR_STYLE_BAR_CLASS=Se.CURSOR_STYLE_BLOCK_CLASS=Se.CURSOR_BLINK_CLASS=Se.CURSOR_CLASS=Se.UNDERLINE_CLASS=Se.ITALIC_CLASS=Se.DIM_CLASS=Se.BOLD_CLASS=void 0;var ie=ce(9),Ce=ce(3),ue=ce(4),se=ce(10);Se.BOLD_CLASS="xterm-bold",Se.DIM_CLASS="xterm-dim",Se.ITALIC_CLASS="xterm-italic",Se.UNDERLINE_CLASS="xterm-underline",Se.CURSOR_CLASS="xterm-cursor",Se.CURSOR_BLINK_CLASS="xterm-cursor-blink",Se.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",Se.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",Se.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var te=function(){function ee(ne,E,b){this._document=ne,this._optionsService=E,this._colors=b,this._workCell=new ue.CellData}return ee.prototype.setColors=function(ne){this._colors=ne},ee.prototype.createRow=function(ne,E,b,z,x,re,ae){for(var oe=this._document.createDocumentFragment(),ve=0,ye=Math.min(ne.length,ae)-1;ye>=0;ye--)if(ne.loadCell(ye,this._workCell).getCode()!==Ce.NULL_CELL_CODE||E&&ye===z){ve=ye+1;break}for(ye=0;ye<ve;ye++){ne.loadCell(ye,this._workCell);var me=this._workCell.getWidth();if(me!==0){var ge=this._document.createElement("span");if(me>1&&(ge.style.width=re*me+"px"),E&&ye===z)switch(ge.classList.add(Se.CURSOR_CLASS),x&&ge.classList.add(Se.CURSOR_BLINK_CLASS),b){case"bar":ge.classList.add(Se.CURSOR_STYLE_BAR_CLASS);break;case"underline":ge.classList.add(Se.CURSOR_STYLE_UNDERLINE_CLASS);break;default:ge.classList.add(Se.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&ge.classList.add(Se.BOLD_CLASS),this._workCell.isItalic()&&ge.classList.add(Se.ITALIC_CLASS),this._workCell.isDim()&&ge.classList.add(Se.DIM_CLASS),this._workCell.isUnderline()&&ge.classList.add(Se.UNDERLINE_CLASS),this._workCell.isInvisible()?ge.textContent=Ce.WHITESPACE_CELL_CHAR:ge.textContent=this._workCell.getChars()||Ce.WHITESPACE_CELL_CHAR;var _e=this._workCell.getFgColor(),he=this._workCell.getFgColorMode(),pe=this._workCell.getBgColor(),ke=this._workCell.getBgColorMode(),Te=!!this._workCell.isInverse();if(Te){var Ee=_e;_e=pe,pe=Ee;var Oe=he;he=ke,ke=Oe}switch(he){case 16777216:case 33554432:this._workCell.isBold()&&_e<8&&this._optionsService.options.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(ge,this._colors.background,this._colors.ansi[_e])||ge.classList.add("xterm-fg-"+_e);break;case 50331648:var je=se.rgba.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(ge,this._colors.background,je)||this._addStyle(ge,"color:#"+le(_e.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(ge,this._colors.background,this._colors.foreground)||Te&&ge.classList.add("xterm-fg-"+ie.INVERTED_DEFAULT_COLOR)}switch(ke){case 16777216:case 33554432:ge.classList.add("xterm-bg-"+pe);break;case 50331648:this._addStyle(ge,"background-color:#"+le(pe.toString(16),"0",6));break;case 0:default:Te&&ge.classList.add("xterm-bg-"+ie.INVERTED_DEFAULT_COLOR)}oe.appendChild(ge)}}return oe},ee.prototype._applyMinimumContrast=function(ne,E,b){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,b,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,z!=null?z:null)),!!z&&(this._addStyle(ne,"color:"+z.css),!0)},ee.prototype._addStyle=function(ne,E){ne.setAttribute("style",""+(ne.getAttribute("style")||"")+E+";")},ee}();function le(ee,ne,E){for(;ee.length<E;)ee=ne+ee;return ee}Se.DomRendererRowFactory=te},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.evaluateKeyboardEvent=void 0;var ie=ce(12),Ce={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:["'",'"']};Se.evaluateKeyboardEvent=function(ue,se,te,le){var ee={type:0,cancel:!1,key:void 0},ne=(ue.shiftKey?1:0)|(ue.altKey?2:0)|(ue.ctrlKey?4:0)|(ue.metaKey?8:0);switch(ue.keyCode){case 0:ue.key==="UIKeyInputUpArrow"?ee.key=se?ie.C0.ESC+"OA":ie.C0.ESC+"[A":ue.key==="UIKeyInputLeftArrow"?ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D":ue.key==="UIKeyInputRightArrow"?ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C":ue.key==="UIKeyInputDownArrow"&&(ee.key=se?ie.C0.ESC+"OB":ie.C0.ESC+"[B");break;case 8:if(ue.shiftKey){ee.key=ie.C0.BS;break}if(ue.altKey){ee.key=ie.C0.ESC+ie.C0.DEL;break}ee.key=ie.C0.DEL;break;case 9:if(ue.shiftKey){ee.key=ie.C0.ESC+"[Z";break}ee.key=ie.C0.HT,ee.cancel=!0;break;case 13:ee.key=ue.altKey?ie.C0.ESC+ie.C0.CR:ie.C0.CR,ee.cancel=!0;break;case 27:ee.key=ie.C0.ESC,ue.altKey&&(ee.key=ie.C0.ESC+ie.C0.ESC),ee.cancel=!0;break;case 37:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"D",ee.key===ie.C0.ESC+"[1;3D"&&(ee.key=ie.C0.ESC+(te?"b":"[1;5D"))):ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D";break;case 39:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"C",ee.key===ie.C0.ESC+"[1;3C"&&(ee.key=ie.C0.ESC+(te?"f":"[1;5C"))):ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C";break;case 38:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"A",te||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(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"B",te||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:ue.shiftKey||ue.ctrlKey||(ee.key=ie.C0.ESC+"[2~");break;case 46:ee.key=ne?ie.C0.ESC+"[3;"+(ne+1)+"~":ie.C0.ESC+"[3~";break;case 36:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"H":se?ie.C0.ESC+"OH":ie.C0.ESC+"[H";break;case 35:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"F":se?ie.C0.ESC+"OF":ie.C0.ESC+"[F";break;case 33:ue.shiftKey?ee.type=2:ee.key=ie.C0.ESC+"[5~";break;case 34:ue.shiftKey?ee.type=3:ee.key=ie.C0.ESC+"[6~";break;case 112:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"P":ie.C0.ESC+"OP";break;case 113:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"Q":ie.C0.ESC+"OQ";break;case 114:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"R":ie.C0.ESC+"OR";break;case 115:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"S":ie.C0.ESC+"OS";break;case 116:ee.key=ne?ie.C0.ESC+"[15;"+(ne+1)+"~":ie.C0.ESC+"[15~";break;case 117:ee.key=ne?ie.C0.ESC+"[17;"+(ne+1)+"~":ie.C0.ESC+"[17~";break;case 118:ee.key=ne?ie.C0.ESC+"[18;"+(ne+1)+"~":ie.C0.ESC+"[18~";break;case 119:ee.key=ne?ie.C0.ESC+"[19;"+(ne+1)+"~":ie.C0.ESC+"[19~";break;case 120:ee.key=ne?ie.C0.ESC+"[20;"+(ne+1)+"~":ie.C0.ESC+"[20~";break;case 121:ee.key=ne?ie.C0.ESC+"[21;"+(ne+1)+"~":ie.C0.ESC+"[21~";break;case 122:ee.key=ne?ie.C0.ESC+"[23;"+(ne+1)+"~":ie.C0.ESC+"[23~";break;case 123:ee.key=ne?ie.C0.ESC+"[24;"+(ne+1)+"~":ie.C0.ESC+"[24~";break;default:if(!ue.ctrlKey||ue.shiftKey||ue.altKey||ue.metaKey)if(te&&!le||!ue.altKey||ue.metaKey)te&&!ue.altKey&&!ue.ctrlKey&&ue.metaKey?ue.keyCode===65&&(ee.type=1):ue.key&&!ue.ctrlKey&&!ue.altKey&&!ue.metaKey&&ue.keyCode>=48&&ue.key.length===1?ee.key=ue.key:ue.key&&ue.ctrlKey&&ue.key==="_"&&(ee.key=ie.C0.US);else{var E=Ce[ue.keyCode],b=E&&E[ue.shiftKey?1:0];if(b)ee.key=ie.C0.ESC+b;else if(ue.keyCode>=65&&ue.keyCode<=90){var z=ue.ctrlKey?ue.keyCode-64:ue.keyCode+32;ee.key=ie.C0.ESC+String.fromCharCode(z)}}else ue.keyCode>=65&&ue.keyCode<=90?ee.key=String.fromCharCode(ue.keyCode-64):ue.keyCode===32?ee.key=ie.C0.NUL:ue.keyCode>=51&&ue.keyCode<=55?ee.key=String.fromCharCode(ue.keyCode-51+27):ue.keyCode===56?ee.key=ie.C0.DEL:ue.keyCode===219?ee.key=ie.C0.ESC:ue.keyCode===220?ee.key=ie.C0.FS:ue.keyCode===221&&(ee.key=ie.C0.GS)}return ee}},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(re,ae){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ve){oe.__proto__=ve}||function(oe,ve){for(var ye in ve)ve.hasOwnProperty(ye)&&(oe[ye]=ve[ye])})(re,ae)},function(re,ae){function oe(){this.constructor=re}ie(re,ae),re.prototype=ae===null?Object.create(ae):(oe.prototype=ae.prototype,new oe)}),ue=this&&this.__decorate||function(re,ae,oe,ve){var ye,me=arguments.length,ge=me<3?ae:ve===null?ve=Object.getOwnPropertyDescriptor(ae,oe):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(re,ae,oe,ve);else for(var _e=re.length-1;_e>=0;_e--)(ye=re[_e])&&(ge=(me<3?ye(ge):me>3?ye(ae,oe,ge):ye(ae,oe))||ge);return me>3&&ge&&Object.defineProperty(ae,oe,ge),ge},se=this&&this.__param||function(re,ae){return function(oe,ve){ae(oe,ve,re)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.RenderService=void 0;var te=ce(31),le=ce(0),ee=ce(2),ne=ce(32),E=ce(7),b=ce(1),z=ce(5),x=function(re){function ae(oe,ve,ye,me,ge,_e){var he=re.call(this)||this;if(he._renderer=oe,he._rowCount=ve,he._isPaused=!1,he._needsFullRefresh=!1,he._isNextRenderRedrawOnly=!0,he._needsSelectionRefresh=!1,he._canvasWidth=0,he._canvasHeight=0,he._selectionState={start:void 0,end:void 0,columnSelectMode:!1},he._onDimensionsChange=new le.EventEmitter,he._onRender=new le.EventEmitter,he._onRefreshRequest=new le.EventEmitter,he.register({dispose:function(){return he._renderer.dispose()}}),he._renderDebouncer=new te.RenderDebouncer(function(ke,Te){return he._renderRows(ke,Te)}),he.register(he._renderDebouncer),he._screenDprMonitor=new ne.ScreenDprMonitor,he._screenDprMonitor.setListener(function(){return he.onDevicePixelRatioChange()}),he.register(he._screenDprMonitor),he.register(_e.onResize(function(ke){return he._fullRefresh()})),he.register(me.onOptionChange(function(){return he._renderer.onOptionsChanged()})),he.register(ge.onCharSizeChange(function(){return he.onCharSizeChanged()})),he._renderer.onRequestRedraw(function(ke){return he.refreshRows(ke.start,ke.end,!0)}),he.register(E.addDisposableDomListener(window,"resize",function(){return he.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var pe=new IntersectionObserver(function(ke){return he._onIntersectionChange(ke[ke.length-1])},{threshold:0});pe.observe(ye),he.register({dispose:function(){return pe.disconnect()}})}return he}return Ce(ae,re),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,ve,ye){ye===void 0&&(ye=!1),this._isPaused?this._needsFullRefresh=!0:(ye||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(oe,ve,this._rowCount))},ae.prototype._renderRows=function(oe,ve){this._renderer.renderRows(oe,ve),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:ve}),this._isNextRenderRedrawOnly=!0},ae.prototype.resize=function(oe,ve){this._rowCount=ve,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(){re.prototype.dispose.call(this)},ae.prototype.setRenderer=function(oe){var ve=this;this._renderer.dispose(),this._renderer=oe,this._renderer.onRequestRedraw(function(ye){return ve.refreshRows(ye.start,ye.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,ve){this._renderer.onResize(oe,ve),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,ve,ye){this._selectionState.start=oe,this._selectionState.end=ve,this._selectionState.columnSelectMode=ye,this._renderer.onSelectionChanged(oe,ve,ye)},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=ue([se(3,b.IOptionsService),se(4,z.ICharSizeService),se(5,b.IBufferService)],ae)}(ee.Disposable);Se.RenderService=x},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(ee,ne,E,b){var z,x=arguments.length,re=x<3?ne:b===null?b=Object.getOwnPropertyDescriptor(ne,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(ee,ne,E,b);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(re=(x<3?z(re):x>3?z(ne,E,re):z(ne,E))||re);return x>3&&re&&Object.defineProperty(ne,E,re),re},Ce=this&&this.__param||function(ee,ne){return function(E,b){ne(E,b,ee)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.CharSizeService=void 0;var ue=ce(1),se=ce(0),te=function(){function ee(ne,E,b){this._optionsService=b,this.width=0,this.height=0,this._onCharSizeChange=new se.EventEmitter,this._measureStrategy=new le(ne,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 ne=this._measureStrategy.measure();ne.width===this.width&&ne.height===this.height||(this.width=ne.width,this.height=ne.height,this._onCharSizeChange.fire())},ee=ie([Ce(2,ue.IOptionsService)],ee)}();Se.CharSizeService=te;var le=function(){function ee(ne,E,b){this._document=ne,this._parentElement=E,this._optionsService=b,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 ne=this._measureElement.getBoundingClientRect();return ne.width!==0&&ne.height!==0&&(this._result.width=ne.width,this._result.height=Math.ceil(ne.height)),this._result},ee}()},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(le,ee,ne,E){var b,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,ne):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(le,ee,ne,E);else for(var re=le.length-1;re>=0;re--)(b=le[re])&&(x=(z<3?b(x):z>3?b(ee,ne,x):b(ee,ne))||x);return z>3&&x&&Object.defineProperty(ee,ne,x),x},Ce=this&&this.__param||function(le,ee){return function(ne,E){ee(ne,E,le)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.MouseService=void 0;var ue=ce(5),se=ce(30),te=function(){function le(ee,ne){this._renderService=ee,this._charSizeService=ne}return le.prototype.getCoords=function(ee,ne,E,b,z){return se.getCoords(ee,ne,E,b,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,z)},le.prototype.getRawByteCoords=function(ee,ne,E,b){var z=this.getCoords(ee,ne,E,b);return se.getRawByteCoords(z)},le=ie([Ce(0,ue.IRenderService),Ce(1,ue.ICharSizeService)],le)}();Se.MouseService=te},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.Linkifier2=void 0;var te=ce(1),le=ce(0),ee=ce(2),ne=ce(7),E=function(b){function z(x){var re=b.call(this)||this;return re._bufferService=x,re._linkProviders=[],re._linkCacheDisposables=[],re._isMouseOut=!0,re._activeLine=-1,re._onShowLinkUnderline=re.register(new le.EventEmitter),re._onHideLinkUnderline=re.register(new le.EventEmitter),re.register(ee.getDisposeArrayDisposable(re._linkCacheDisposables)),re}return Ce(z,b),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 re=this;return this._linkProviders.push(x),{dispose:function(){var ae=re._linkProviders.indexOf(x);ae!==-1&&re._linkProviders.splice(ae,1)}}},z.prototype.attachToDom=function(x,re,ae){var oe=this;this._element=x,this._mouseService=re,this._renderService=ae,this.register(ne.addDisposableDomListener(this._element,"mouseleave",function(){oe._isMouseOut=!0,oe._clearCurrentLink()})),this.register(ne.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(ne.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},z.prototype._onMouseMove=function(x){if(this._lastMouseEvent=x,this._element&&this._mouseService){var re=this._positionFromMouseEvent(x,this._element,this._mouseService);if(re){this._isMouseOut=!1;for(var ae=x.composedPath(),oe=0;oe<ae.length;oe++){var ve=ae[oe];if(ve.classList.contains("xterm"))break;if(ve.classList.contains("xterm-hover"))return}this._lastBufferCell&&re.x===this._lastBufferCell.x&&re.y===this._lastBufferCell.y||(this._onHover(re),this._lastBufferCell=re)}}},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,re){var ae=this;this._activeProviderReplies&&re||(this._activeProviderReplies=new Map,this._activeLine=x.y);var oe=!1;this._linkProviders.forEach(function(ve,ye){var me;re?!((me=ae._activeProviderReplies)===null||me===void 0)&&me.get(ye)&&(oe=ae._checkLinkProviderResult(ye,x,oe)):ve.provideLinks(x.y,function(ge){var _e,he;if(!ae._isMouseOut){var pe=ge==null?void 0:ge.map(function(ke){return{link:ke}});(_e=ae._activeProviderReplies)===null||_e===void 0||_e.set(ye,pe),oe=ae._checkLinkProviderResult(ye,x,oe),((he=ae._activeProviderReplies)===null||he===void 0?void 0:he.size)===ae._linkProviders.length&&ae._removeIntersectingLinks(x.y,ae._activeProviderReplies)}})})},z.prototype._removeIntersectingLinks=function(x,re){for(var ae=new Set,oe=0;oe<re.size;oe++){var ve=re.get(oe);if(ve)for(var ye=0;ye<ve.length;ye++)for(var me=ve[ye],ge=me.link.range.start.y<x?0:me.link.range.start.x,_e=me.link.range.end.y>x?this._bufferService.cols:me.link.range.end.x,he=ge;he<=_e;he++){if(ae.has(he)){ve.splice(ye--,1);break}ae.add(he)}}},z.prototype._checkLinkProviderResult=function(x,re,ae){var oe,ve=this;if(!this._activeProviderReplies)return ae;for(var ye=this._activeProviderReplies.get(x),me=!1,ge=0;ge<x;ge++)this._activeProviderReplies.has(ge)&&!this._activeProviderReplies.get(ge)||(me=!0);if(!me&&ye){var _e=ye.find(function(pe){return ve._linkAtPosition(pe.link,re)});_e&&(ae=!0,this._handleNewLink(_e))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ae)for(ge=0;ge<this._activeProviderReplies.size;ge++){var he=(oe=this._activeProviderReplies.get(ge))===null||oe===void 0?void 0:oe.find(function(pe){return ve._linkAtPosition(pe.link,re)});if(he){ae=!0,this._handleNewLink(he);break}}return ae},z.prototype._onClick=function(x){if(this._element&&this._mouseService&&this._currentLink){var re=this._positionFromMouseEvent(x,this._element,this._mouseService);re&&this._linkAtPosition(this._currentLink.link,re)&&this._currentLink.link.activate(x,this._currentLink.link.text)}},z.prototype._clearCurrentLink=function(x,re){this._element&&this._currentLink&&this._lastMouseEvent&&(!x||!re||this._currentLink.link.range.start.y>=x&&this._currentLink.link.range.end.y<=re)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ee.disposeArray(this._linkCacheDisposables))},z.prototype._handleNewLink=function(x){var re=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,ve;return(ve=(oe=re._currentLink)===null||oe===void 0?void 0:oe.state)===null||ve===void 0?void 0:ve.decorations.pointerCursor},set:function(oe){var ve,ye;!((ve=re._currentLink)===null||ve===void 0)&&ve.state&&re._currentLink.state.decorations.pointerCursor!==oe&&(re._currentLink.state.decorations.pointerCursor=oe,re._currentLink.state.isHovered&&((ye=re._element)===null||ye===void 0||ye.classList.toggle("xterm-cursor-pointer",oe)))}},underline:{get:function(){var oe,ve;return(ve=(oe=re._currentLink)===null||oe===void 0?void 0:oe.state)===null||ve===void 0?void 0:ve.decorations.underline},set:function(oe){var ve,ye,me;!((ve=re._currentLink)===null||ve===void 0)&&ve.state&&((me=(ye=re._currentLink)===null||ye===void 0?void 0:ye.state)===null||me===void 0?void 0:me.decorations.underline)!==oe&&(re._currentLink.state.decorations.underline=oe,re._currentLink.state.isHovered&&re._fireUnderlineEvent(x.link,oe))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(oe){var ve=oe.start===0?0:oe.start+1+re._bufferService.buffer.ydisp;re._clearCurrentLink(ve,oe.end+1+re._bufferService.buffer.ydisp)})))}},z.prototype._linkHover=function(x,re,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(re,!0),this._currentLink.state.decorations.pointerCursor&&x.classList.add("xterm-cursor-pointer")),re.hover&&re.hover(ae,re.text)},z.prototype._fireUnderlineEvent=function(x,re){var ae=x.range,oe=this._bufferService.buffer.ydisp,ve=this._createLinkUnderlineEvent(ae.start.x-1,ae.start.y-oe-1,ae.end.x,ae.end.y-oe-1,void 0);(re?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(ve)},z.prototype._linkLeave=function(x,re,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(re,!1),this._currentLink.state.decorations.pointerCursor&&x.classList.remove("xterm-cursor-pointer")),re.leave&&re.leave(ae,re.text)},z.prototype._linkAtPosition=function(x,re){var ae=x.range.start.y===x.range.end.y,oe=x.range.start.y<re.y,ve=x.range.end.y>re.y;return(ae&&x.range.start.x<=re.x&&x.range.end.x>=re.x||oe&&x.range.end.x>=re.x||ve&&x.range.start.x<=re.x||oe&&ve)&&x.range.start.y<=re.y&&x.range.end.y>=re.y},z.prototype._positionFromMouseEvent=function(x,re,ae){var oe=ae.getCoords(x,re,this._bufferService.cols,this._bufferService.rows);if(oe)return{x:oe[0],y:oe[1]+this._bufferService.buffer.ydisp}},z.prototype._createLinkUnderlineEvent=function(x,re,ae,oe,ve){return{x1:x,y1:re,x2:ae,y2:oe,cols:this._bufferService.cols,fg:ve}},z=ue([se(0,te.IBufferService)],z)}(ee.Disposable);Se.Linkifier2=E},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.CoreBrowserService=void 0;var ie=function(){function Ce(ue){this._textarea=ue}return Object.defineProperty(Ce.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Ce}();Se.CoreBrowserService=ie},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ge,_e){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var ke in pe)pe.hasOwnProperty(ke)&&(he[ke]=pe[ke])})(ge,_e)},function(ge,_e){function he(){this.constructor=ge}ie(ge,_e),ge.prototype=_e===null?Object.create(_e):(he.prototype=_e.prototype,new he)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.CoreTerminal=void 0;var ue=ce(2),se=ce(1),te=ce(66),le=ce(67),ee=ce(68),ne=ce(74),E=ce(75),b=ce(0),z=ce(76),x=ce(77),re=ce(78),ae=ce(80),oe=ce(81),ve=ce(19),ye=ce(82),me=function(ge){function _e(he){var pe=ge.call(this)||this;return pe._onBinary=new b.EventEmitter,pe._onData=new b.EventEmitter,pe._onLineFeed=new b.EventEmitter,pe._onResize=new b.EventEmitter,pe._onScroll=new b.EventEmitter,pe._instantiationService=new te.InstantiationService,pe.optionsService=new ne.OptionsService(he),pe._instantiationService.setService(se.IOptionsService,pe.optionsService),pe._bufferService=pe.register(pe._instantiationService.createInstance(ee.BufferService)),pe._instantiationService.setService(se.IBufferService,pe._bufferService),pe._logService=pe._instantiationService.createInstance(le.LogService),pe._instantiationService.setService(se.ILogService,pe._logService),pe._coreService=pe.register(pe._instantiationService.createInstance(E.CoreService,function(){return pe.scrollToBottom()})),pe._instantiationService.setService(se.ICoreService,pe._coreService),pe._coreMouseService=pe._instantiationService.createInstance(z.CoreMouseService),pe._instantiationService.setService(se.ICoreMouseService,pe._coreMouseService),pe._dirtyRowService=pe._instantiationService.createInstance(x.DirtyRowService),pe._instantiationService.setService(se.IDirtyRowService,pe._dirtyRowService),pe.unicodeService=pe._instantiationService.createInstance(re.UnicodeService),pe._instantiationService.setService(se.IUnicodeService,pe.unicodeService),pe._charsetService=pe._instantiationService.createInstance(ae.CharsetService),pe._instantiationService.setService(se.ICharsetService,pe._charsetService),pe._inputHandler=new ve.InputHandler(pe._bufferService,pe._charsetService,pe._coreService,pe._dirtyRowService,pe._logService,pe.optionsService,pe._coreMouseService,pe.unicodeService),pe.register(b.forwardEvent(pe._inputHandler.onLineFeed,pe._onLineFeed)),pe.register(pe._inputHandler),pe.register(b.forwardEvent(pe._bufferService.onResize,pe._onResize)),pe.register(b.forwardEvent(pe._coreService.onData,pe._onData)),pe.register(b.forwardEvent(pe._coreService.onBinary,pe._onBinary)),pe.register(pe.optionsService.onOptionChange(function(ke){return pe._updateOptions(ke)})),pe._writeBuffer=new ye.WriteBuffer(function(ke){return pe._inputHandler.parse(ke)}),pe}return Ce(_e,ge),Object.defineProperty(_e.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),_e.prototype.dispose=function(){var he;this._isDisposed||(ge.prototype.dispose.call(this),(he=this._windowsMode)===null||he===void 0||he.dispose(),this._windowsMode=void 0)},_e.prototype.write=function(he,pe){this._writeBuffer.write(he,pe)},_e.prototype.writeSync=function(he){this._writeBuffer.writeSync(he)},_e.prototype.resize=function(he,pe){isNaN(he)||isNaN(pe)||(he=Math.max(he,ee.MINIMUM_COLS),pe=Math.max(pe,ee.MINIMUM_ROWS),this._bufferService.resize(he,pe))},_e.prototype.scroll=function(he,pe){pe===void 0&&(pe=!1);var ke,Te=this._bufferService.buffer;(ke=this._cachedBlankLine)&&ke.length===this.cols&&ke.getFg(0)===he.fg&&ke.getBg(0)===he.bg||(ke=Te.getBlankLine(he,pe),this._cachedBlankLine=ke),ke.isWrapped=pe;var Ee=Te.ybase+Te.scrollTop,Oe=Te.ybase+Te.scrollBottom;if(Te.scrollTop===0){var je=Te.lines.isFull;Oe===Te.lines.length-1?je?Te.lines.recycle().copyFrom(ke):Te.lines.push(ke.clone()):Te.lines.splice(Oe+1,0,ke.clone()),je?this._bufferService.isUserScrolling&&(Te.ydisp=Math.max(Te.ydisp-1,0)):(Te.ybase++,this._bufferService.isUserScrolling||Te.ydisp++)}else{var Pe=Oe-Ee+1;Te.lines.shiftElements(Ee+1,Pe-1,-1),Te.lines.set(Oe,ke.clone())}this._bufferService.isUserScrolling||(Te.ydisp=Te.ybase),this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom),this._onScroll.fire(Te.ydisp)},_e.prototype.scrollLines=function(he,pe){var ke=this._bufferService.buffer;if(he<0){if(ke.ydisp===0)return;this._bufferService.isUserScrolling=!0}else he+ke.ydisp>=ke.ybase&&(this._bufferService.isUserScrolling=!1);var Te=ke.ydisp;ke.ydisp=Math.max(Math.min(ke.ydisp+he,ke.ybase),0),Te!==ke.ydisp&&(pe||this._onScroll.fire(ke.ydisp))},_e.prototype.scrollPages=function(he){this.scrollLines(he*(this.rows-1))},_e.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},_e.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},_e.prototype.scrollToLine=function(he){var pe=he-this._bufferService.buffer.ydisp;pe!==0&&this.scrollLines(pe)},_e.prototype.addEscHandler=function(he,pe){return this._inputHandler.addEscHandler(he,pe)},_e.prototype.addDcsHandler=function(he,pe){return this._inputHandler.addDcsHandler(he,pe)},_e.prototype.addCsiHandler=function(he,pe){return this._inputHandler.addCsiHandler(he,pe)},_e.prototype.addOscHandler=function(he,pe){return this._inputHandler.addOscHandler(he,pe)},_e.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},_e.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},_e.prototype._updateOptions=function(he){var pe;switch(he){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((pe=this._windowsMode)===null||pe===void 0||pe.dispose(),this._windowsMode=void 0)}},_e.prototype._enableWindowsMode=function(){var he=this;if(!this._windowsMode){var pe=[];pe.push(this.onLineFeed(oe.updateWindowsModeWrappedState.bind(null,this._bufferService))),pe.push(this.addCsiHandler({final:"H"},function(){return oe.updateWindowsModeWrappedState(he._bufferService),!1})),this._windowsMode={dispose:function(){for(var ke=0,Te=pe;ke<Te.length;ke++)Te[ke].dispose()}}}},_e}(ue.Disposable);Se.CoreTerminal=me},function(Dt,Se,ce){"use strict";var ie=this&&this.__spreadArrays||function(){for(var le=0,ee=0,ne=arguments.length;ee<ne;ee++)le+=arguments[ee].length;var E=Array(le),b=0;for(ee=0;ee<ne;ee++)for(var z=arguments[ee],x=0,re=z.length;x<re;x++,b++)E[b]=z[x];return E};Object.defineProperty(Se,"__esModule",{value:!0}),Se.InstantiationService=Se.ServiceCollection=void 0;var Ce=ce(1),ue=ce(14),se=function(){function le(){for(var ee=[],ne=0;ne<arguments.length;ne++)ee[ne]=arguments[ne];this._entries=new Map;for(var E=0,b=ee;E<b.length;E++){var z=b[E],x=z[0],re=z[1];this.set(x,re)}}return le.prototype.set=function(ee,ne){var E=this._entries.get(ee);return this._entries.set(ee,ne),E},le.prototype.forEach=function(ee){this._entries.forEach(function(ne,E){return ee(E,ne)})},le.prototype.has=function(ee){return this._entries.has(ee)},le.prototype.get=function(ee){return this._entries.get(ee)},le}();Se.ServiceCollection=se;var te=function(){function le(){this._services=new se,this._services.set(Ce.IInstantiationService,this)}return le.prototype.setService=function(ee,ne){this._services.set(ee,ne)},le.prototype.getService=function(ee){return this._services.get(ee)},le.prototype.createInstance=function(ee){for(var ne=[],E=1;E<arguments.length;E++)ne[E-1]=arguments[E];for(var b=ue.getServiceDependencies(ee).sort(function(ye,me){return ye.index-me.index}),z=[],x=0,re=b;x<re.length;x++){var ae=re[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 ve=b.length>0?b[0].index:ne.length;if(ne.length!==ve)throw new Error("[createInstance] First service dependency of "+ee.name+" at position "+(ve+1)+" conflicts with "+ne.length+" static arguments");return new(ee.bind.apply(ee,ie([void 0],ie(ne,z))))},le}();Se.InstantiationService=te},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(ne,E,b,z){var x,re=arguments.length,ae=re<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,b):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(ne,E,b,z);else for(var oe=ne.length-1;oe>=0;oe--)(x=ne[oe])&&(ae=(re<3?x(ae):re>3?x(E,b,ae):x(E,b))||ae);return re>3&&ae&&Object.defineProperty(E,b,ae),ae},Ce=this&&this.__param||function(ne,E){return function(b,z){E(b,z,ne)}},ue=this&&this.__spreadArrays||function(){for(var ne=0,E=0,b=arguments.length;E<b;E++)ne+=arguments[E].length;var z=Array(ne),x=0;for(E=0;E<b;E++)for(var re=arguments[E],ae=0,oe=re.length;ae<oe;ae++,x++)z[x]=re[ae];return z};Object.defineProperty(Se,"__esModule",{value:!0}),Se.LogService=Se.LogLevel=void 0;var se,te=ce(1);(function(ne){ne[ne.DEBUG=0]="DEBUG",ne[ne.INFO=1]="INFO",ne[ne.WARN=2]="WARN",ne[ne.ERROR=3]="ERROR",ne[ne.OFF=4]="OFF"})(se=Se.LogLevel||(Se.LogLevel={}));var le={debug:se.DEBUG,info:se.INFO,warn:se.WARN,error:se.ERROR,off:se.OFF},ee=function(){function ne(E){var b=this;this._optionsService=E,this._updateLogLevel(),this._optionsService.onOptionChange(function(z){z==="logLevel"&&b._updateLogLevel()})}return ne.prototype._updateLogLevel=function(){this._logLevel=le[this._optionsService.options.logLevel]},ne.prototype._evalLazyOptionalParams=function(E){for(var b=0;b<E.length;b++)typeof E[b]=="function"&&(E[b]=E[b]())},ne.prototype._log=function(E,b,z){this._evalLazyOptionalParams(z),E.call.apply(E,ue([console,"xterm.js: "+b],z))},ne.prototype.debug=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.DEBUG&&this._log(console.log,E,b)},ne.prototype.info=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.INFO&&this._log(console.info,E,b)},ne.prototype.warn=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.WARN&&this._log(console.warn,E,b)},ne.prototype.error=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.ERROR&&this._log(console.error,E,b)},ne=ie([Ce(0,te.IOptionsService)],ne)}();Se.LogService=ee},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.BufferService=Se.MINIMUM_ROWS=Se.MINIMUM_COLS=void 0;var te=ce(1),le=ce(69),ee=ce(0),ne=ce(2);Se.MINIMUM_COLS=2,Se.MINIMUM_ROWS=1;var E=function(b){function z(x){var re=b.call(this)||this;return re._optionsService=x,re.isUserScrolling=!1,re._onResize=new ee.EventEmitter,re.cols=Math.max(x.options.cols,Se.MINIMUM_COLS),re.rows=Math.max(x.options.rows,Se.MINIMUM_ROWS),re.buffers=new le.BufferSet(x,re),re}return Ce(z,b),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(){b.prototype.dispose.call(this),this.buffers.dispose()},z.prototype.resize=function(x,re){this.cols=x,this.rows=re,this.buffers.resize(x,re),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:x,rows:re})},z.prototype.reset=function(){this.buffers.dispose(),this.buffers=new le.BufferSet(this._optionsService,this),this.isUserScrolling=!1},z=ue([se(0,te.IOptionsService)],z)}(ne.Disposable);Se.BufferService=E},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(le,ee){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ne,E){ne.__proto__=E}||function(ne,E){for(var b in E)E.hasOwnProperty(b)&&(ne[b]=E[b])})(le,ee)},function(le,ee){function ne(){this.constructor=le}ie(le,ee),le.prototype=ee===null?Object.create(ee):(ne.prototype=ee.prototype,new ne)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.BufferSet=void 0;var ue=ce(70),se=ce(0),te=function(le){function ee(ne,E){var b=le.call(this)||this;return b._onBufferActivate=b.register(new se.EventEmitter),b._normal=new ue.Buffer(!0,ne,E),b._normal.fillViewportRows(),b._alt=new ue.Buffer(!1,ne,E),b._activeBuffer=b._normal,b.setupTabStops(),b}return Ce(ee,le),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(ne){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(ne),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(ne,E){this._normal.resize(ne,E),this._alt.resize(ne,E)},ee.prototype.setupTabStops=function(ne){this._normal.setupTabStops(ne),this._alt.setupTabStops(ne)},ee}(ce(2).Disposable);Se.BufferSet=te},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.BufferStringIterator=Se.Buffer=Se.MAX_BUFFER_SIZE=void 0;var ie=ce(71),Ce=ce(16),ue=ce(4),se=ce(3),te=ce(72),le=ce(73),ee=ce(20),ne=ce(6);Se.MAX_BUFFER_SIZE=4294967295;var E=function(){function z(x,re,ae){this._hasScrollback=x,this._optionsService=re,this._bufferService=ae,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Ce.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ee.DEFAULT_CHARSET,this.markers=[],this._nullCell=ue.CellData.fromCharData([0,se.NULL_CELL_CHAR,se.NULL_CELL_WIDTH,se.NULL_CELL_CODE]),this._whitespaceCell=ue.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 ne.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 ne.ExtendedAttrs),this._whitespaceCell},z.prototype.getBlankLine=function(x,re){return new Ce.BufferLine(this._bufferService.cols,this.getNullCell(x),re)},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 re=x+this._optionsService.options.scrollback;return re>Se.MAX_BUFFER_SIZE?Se.MAX_BUFFER_SIZE:re},z.prototype.fillViewportRows=function(x){if(this.lines.length===0){x===void 0&&(x=Ce.DEFAULT_ATTR_DATA);for(var re=this._rows;re--;)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,re){var ae=this.getNullCell(Ce.DEFAULT_ATTR_DATA),oe=this._getCorrectBufferLength(re);if(oe>this.lines.maxLength&&(this.lines.maxLength=oe),this.lines.length>0){if(this._cols<x)for(var ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(x,ae);var ye=0;if(this._rows<re)for(var me=this._rows;me<re;me++)this.lines.length<re+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Ce.BufferLine(x,ae)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ye+1?(this.ybase--,ye++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ce.BufferLine(x,ae)));else for(me=this._rows;me>re;me--)this.lines.length>re+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(oe<this.lines.maxLength){var ge=this.lines.length-oe;ge>0&&(this.lines.trimStart(ge),this.ybase=Math.max(this.ybase-ge,0),this.ydisp=Math.max(this.ydisp-ge,0),this.savedY=Math.max(this.savedY-ge,0)),this.lines.maxLength=oe}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,re-1),ye&&(this.y+=ye),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=re-1,this._isReflowEnabled&&(this._reflow(x,re),this._cols>x))for(ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(x,ae);this._cols=x,this._rows=re},Object.defineProperty(z.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),z.prototype._reflow=function(x,re){this._cols!==x&&(x>this._cols?this._reflowLarger(x,re):this._reflowSmaller(x,re))},z.prototype._reflowLarger=function(x,re){var ae=te.reflowLargerGetLinesToRemove(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(Ce.DEFAULT_ATTR_DATA));if(ae.length>0){var oe=te.reflowLargerCreateNewLayout(this.lines,ae);te.reflowLargerApplyNewLayout(this.lines,oe.layout),this._reflowLargerAdjustViewport(x,re,oe.countRemoved)}},z.prototype._reflowLargerAdjustViewport=function(x,re,ae){for(var oe=this.getNullCell(Ce.DEFAULT_ATTR_DATA),ve=ae;ve-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<re&&this.lines.push(new Ce.BufferLine(x,oe))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ae,0)},z.prototype._reflowSmaller=function(x,re){for(var ae=this.getNullCell(Ce.DEFAULT_ATTR_DATA),oe=[],ve=0,ye=this.lines.length-1;ye>=0;ye--){var me=this.lines.get(ye);if(!(!me||!me.isWrapped&&me.getTrimmedLength()<=x)){for(var ge=[me];me.isWrapped&&ye>0;)me=this.lines.get(--ye),ge.unshift(me);var _e=this.ybase+this.y;if(!(_e>=ye&&_e<ye+ge.length)){var he=ge[ge.length-1].getTrimmedLength(),pe=te.reflowSmallerGetNewLineLengths(ge,this._cols,x),ke=pe.length-ge.length,Te=void 0;Te=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+ke):Math.max(0,this.lines.length-this.lines.maxLength+ke);for(var Ee=[],Oe=0;Oe<ke;Oe++){var je=this.getBlankLine(Ce.DEFAULT_ATTR_DATA,!0);Ee.push(je)}Ee.length>0&&(oe.push({start:ye+ge.length+ve,newLines:Ee}),ve+=Ee.length),ge.push.apply(ge,Ee);var Pe=pe.length-1,Qe=pe[Pe];Qe===0&&(Qe=pe[--Pe]);for(var Xe=ge.length-ke-1,ot=he;Xe>=0;){var We=Math.min(ot,Qe);if(ge[Pe].copyCellsFrom(ge[Xe],ot-We,Qe-We,We,!0),(Qe-=We)===0&&(Qe=pe[--Pe]),(ot-=We)===0){Xe--;var rt=Math.max(Xe,0);ot=te.getWrappedLineTrimmedLength(ge,rt,this._cols)}}for(Oe=0;Oe<ge.length;Oe++)pe[Oe]<x&&ge[Oe].setCell(pe[Oe],ae);for(var Ye=ke-Te;Ye-- >0;)this.ybase===0?this.y<re-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+ve)-re&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+ke,this.ybase+re-1)}}}if(oe.length>0){var ut=[],Ge=[];for(Oe=0;Oe<this.lines.length;Oe++)Ge.push(this.lines.get(Oe));var ze=this.lines.length,Ve=ze-1,$e=0,nt=oe[$e];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+ve);var et=0;for(Oe=Math.min(this.lines.maxLength-1,ze+ve-1);Oe>=0;Oe--)if(nt&&nt.start>Ve+et){for(var pt=nt.newLines.length-1;pt>=0;pt--)this.lines.set(Oe--,nt.newLines[pt]);Oe++,ut.push({index:Ve+1,amount:nt.newLines.length}),et+=nt.newLines.length,nt=oe[++$e]}else this.lines.set(Oe,Ge[Ve--]);var ct=0;for(Oe=ut.length-1;Oe>=0;Oe--)ut[Oe].index+=ct,this.lines.onInsertEmitter.fire(ut[Oe]),ct+=ut[Oe].amount;var Rt=Math.max(0,ze+ve-this.lines.maxLength);Rt>0&&this.lines.onTrimEmitter.fire(Rt)}},z.prototype.stringIndexToBufferIndex=function(x,re,ae){for(ae===void 0&&(ae=!1);re;){var oe=this.lines.get(x);if(!oe)return[-1,-1];for(var ve=ae?oe.getTrimmedLength():oe.length,ye=0;ye<ve;++ye)if(oe.get(ye)[se.CHAR_DATA_WIDTH_INDEX]&&(re-=oe.get(ye)[se.CHAR_DATA_CHAR_INDEX].length||1),re<0)return[x,ye];x++}return[x,0]},z.prototype.translateBufferLineToString=function(x,re,ae,oe){ae===void 0&&(ae=0);var ve=this.lines.get(x);return ve?ve.translateToString(re,ae,oe):""},z.prototype.getWrappedRangeForLine=function(x){for(var re=x,ae=x;re>0&&this.lines.get(re).isWrapped;)re--;for(;ae+1<this.lines.length&&this.lines.get(ae+1).isWrapped;)ae++;return{first:re,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 re=this,ae=new le.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 re._removeMarker(ae)})),ae},z.prototype._removeMarker=function(x){this.markers.splice(this.markers.indexOf(x),1)},z.prototype.iterator=function(x,re,ae,oe,ve){return new b(this,x,re,ae,oe,ve)},z}();Se.Buffer=E;var b=function(){function z(x,re,ae,oe,ve,ye){ae===void 0&&(ae=0),oe===void 0&&(oe=x.lines.length),ve===void 0&&(ve=0),ye===void 0&&(ye=0),this._buffer=x,this._trimRight=re,this._startIndex=ae,this._endIndex=oe,this._startOverscan=ve,this._endOverscan=ye,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 re="",ae=x.first;ae<=x.last;++ae)re+=this._buffer.translateBufferLineToString(ae,this._trimRight);return this._current=x.last+1,{range:x,content:re}},z}();Se.BufferStringIterator=b},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.CircularList=void 0;var ie=ce(0),Ce=function(){function ue(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(ue.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"maxLength",{get:function(){return this._maxLength},set:function(se){if(this._maxLength!==se){for(var te=new Array(se),le=0;le<Math.min(se,this.length);le++)te[le]=this._array[this._getCyclicIndex(le)];this._array=te,this._maxLength=se,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"length",{get:function(){return this._length},set:function(se){if(se>this._length)for(var te=this._length;te<se;te++)this._array[te]=void 0;this._length=se},enumerable:!1,configurable:!0}),ue.prototype.get=function(se){return this._array[this._getCyclicIndex(se)]},ue.prototype.set=function(se,te){this._array[this._getCyclicIndex(se)]=te},ue.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++},ue.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(ue.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),ue.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},ue.prototype.splice=function(se,te){for(var le=[],ee=2;ee<arguments.length;ee++)le[ee-2]=arguments[ee];if(te){for(var ne=se;ne<this._length-te;ne++)this._array[this._getCyclicIndex(ne)]=this._array[this._getCyclicIndex(ne+te)];this._length-=te}for(ne=this._length-1;ne>=se;ne--)this._array[this._getCyclicIndex(ne+le.length)]=this._array[this._getCyclicIndex(ne)];for(ne=0;ne<le.length;ne++)this._array[this._getCyclicIndex(se+ne)]=le[ne];if(this._length+le.length>this._maxLength){var E=this._length+le.length-this._maxLength;this._startIndex+=E,this._length=this._maxLength,this.onTrimEmitter.fire(E)}else this._length+=le.length},ue.prototype.trimStart=function(se){se>this._length&&(se=this._length),this._startIndex+=se,this._length-=se,this.onTrimEmitter.fire(se)},ue.prototype.shiftElements=function(se,te,le){if(!(te<=0)){if(se<0||se>=this._length)throw new Error("start argument out of range");if(se+le<0)throw new Error("Cannot shift elements in list beyond index 0");if(le>0){for(var ee=te-1;ee>=0;ee--)this.set(se+ee+le,this.get(se+ee));var ne=se+te+le-this._length;if(ne>0)for(this._length+=ne;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ee=0;ee<te;ee++)this.set(se+ee+le,this.get(se+ee))}},ue.prototype._getCyclicIndex=function(se){return(this._startIndex+se)%this._maxLength},ue}();Se.CircularList=Ce},function(Dt,Se,ce){"use strict";function ie(Ce,ue,se){if(ue===Ce.length-1)return Ce[ue].getTrimmedLength();var te=!Ce[ue].hasContent(se-1)&&Ce[ue].getWidth(se-1)===1,le=Ce[ue+1].getWidth(0)===2;return te&&le?se-1:se}Object.defineProperty(Se,"__esModule",{value:!0}),Se.getWrappedLineTrimmedLength=Se.reflowSmallerGetNewLineLengths=Se.reflowLargerApplyNewLayout=Se.reflowLargerCreateNewLayout=Se.reflowLargerGetLinesToRemove=void 0,Se.reflowLargerGetLinesToRemove=function(Ce,ue,se,te,le){for(var ee=[],ne=0;ne<Ce.length-1;ne++){var E=ne,b=Ce.get(++E);if(b.isWrapped){for(var z=[Ce.get(ne)];E<Ce.length&&b.isWrapped;)z.push(b),b=Ce.get(++E);if(te>=ne&&te<E)ne+=z.length-1;else{for(var x=0,re=ie(z,x,ue),ae=1,oe=0;ae<z.length;){var ve=ie(z,ae,ue),ye=ve-oe,me=se-re,ge=Math.min(ye,me);z[x].copyCellsFrom(z[ae],oe,re,ge,!1),(re+=ge)===se&&(x++,re=0),(oe+=ge)===ve&&(ae++,oe=0),re===0&&x!==0&&z[x-1].getWidth(se-1)===2&&(z[x].copyCellsFrom(z[x-1],se-1,re++,1,!1),z[x-1].setCell(se-1,le))}z[x].replaceCells(re,se,le);for(var _e=0,he=z.length-1;he>0&&(he>x||z[he].getTrimmedLength()===0);he--)_e++;_e>0&&(ee.push(ne+z.length-_e),ee.push(_e)),ne+=z.length-1}}}return ee},Se.reflowLargerCreateNewLayout=function(Ce,ue){for(var se=[],te=0,le=ue[te],ee=0,ne=0;ne<Ce.length;ne++)if(le===ne){var E=ue[++te];Ce.onDeleteEmitter.fire({index:ne-ee,amount:E}),ne+=E-1,ee+=E,le=ue[++te]}else se.push(ne);return{layout:se,countRemoved:ee}},Se.reflowLargerApplyNewLayout=function(Ce,ue){for(var se=[],te=0;te<ue.length;te++)se.push(Ce.get(ue[te]));for(te=0;te<se.length;te++)Ce.set(te,se[te]);Ce.length=ue.length},Se.reflowSmallerGetNewLineLengths=function(Ce,ue,se){for(var te=[],le=Ce.map(function(re,ae){return ie(Ce,ae,ue)}).reduce(function(re,ae){return re+ae}),ee=0,ne=0,E=0;E<le;){if(le-E<se){te.push(le-E);break}ee+=se;var b=ie(Ce,ne,ue);ee>b&&(ee-=b,ne++);var z=Ce[ne].getWidth(ee-1)===2;z&&ee--;var x=z?se-1:se;te.push(x),E+=x}return te},Se.getWrappedLineTrimmedLength=ie},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(te,le){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ne){ee.__proto__=ne}||function(ee,ne){for(var E in ne)ne.hasOwnProperty(E)&&(ee[E]=ne[E])})(te,le)},function(te,le){function ee(){this.constructor=te}ie(te,le),te.prototype=le===null?Object.create(le):(ee.prototype=le.prototype,new ee)});Object.defineProperty(Se,"__esModule",{value:!0}),Se.Marker=void 0;var ue=ce(0),se=function(te){function le(ee){var ne=te.call(this)||this;return ne.line=ee,ne._id=le._nextId++,ne.isDisposed=!1,ne._onDispose=new ue.EventEmitter,ne}return Ce(le,te),Object.defineProperty(le.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),le.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},le._nextId=1,le}(ce(2).Disposable);Se.Marker=se},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.OptionsService=Se.DEFAULT_OPTIONS=Se.DEFAULT_BELL_SOUND=void 0;var ie=ce(0),Ce=ce(11),ue=ce(33);Se.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",Se.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:Se.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:Ce.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var se=["cols","rows"],te=function(){function le(ee){this._onOptionChange=new ie.EventEmitter,this.options=ue.clone(Se.DEFAULT_OPTIONS);for(var ne=0,E=Object.keys(ee);ne<E.length;ne++){var b=E[ne];if(b in this.options){var z=ee[b];this.options[b]=z}}}return Object.defineProperty(le.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),le.prototype.setOption=function(ee,ne){if(!(ee in Se.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]!==ne&&(ne=this._sanitizeAndValidateOption(ee,ne),this.options[ee]!==ne&&(this.options[ee]=ne,this._onOptionChange.fire(ee)))},le.prototype._sanitizeAndValidateOption=function(ee,ne){switch(ee){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":ne||(ne=Se.DEFAULT_OPTIONS[ee]);break;case"cursorWidth":ne=Math.floor(ne);case"lineHeight":case"tabStopWidth":if(ne<1)throw new Error(ee+" cannot be less than 1, value: "+ne);break;case"minimumContrastRatio":ne=Math.max(1,Math.min(21,Math.round(10*ne)/10));break;case"scrollback":if((ne=Math.min(ne,4294967295))<0)throw new Error(ee+" cannot be less than 0, value: "+ne);break;case"fastScrollSensitivity":case"scrollSensitivity":if(ne<=0)throw new Error(ee+" cannot be less than or equal to 0, value: "+ne)}return ne},le.prototype.getOption=function(ee){if(!(ee in Se.DEFAULT_OPTIONS))throw new Error('No option with key "'+ee+'"');return this.options[ee]},le}();Se.OptionsService=te},function(Dt,Se,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(x,re){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,oe){ae.__proto__=oe}||function(ae,oe){for(var ve in oe)oe.hasOwnProperty(ve)&&(ae[ve]=oe[ve])})(x,re)},function(x,re){function ae(){this.constructor=x}ie(x,re),x.prototype=re===null?Object.create(re):(ae.prototype=re.prototype,new ae)}),ue=this&&this.__decorate||function(x,re,ae,oe){var ve,ye=arguments.length,me=ye<3?re:oe===null?oe=Object.getOwnPropertyDescriptor(re,ae):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(x,re,ae,oe);else for(var ge=x.length-1;ge>=0;ge--)(ve=x[ge])&&(me=(ye<3?ve(me):ye>3?ve(re,ae,me):ve(re,ae))||me);return ye>3&&me&&Object.defineProperty(re,ae,me),me},se=this&&this.__param||function(x,re){return function(ae,oe){re(ae,oe,x)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.CoreService=void 0;var te=ce(1),le=ce(0),ee=ce(33),ne=ce(2),E=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),z=function(x){function re(ae,oe,ve,ye){var me=x.call(this)||this;return me._bufferService=oe,me._logService=ve,me._optionsService=ye,me.isCursorInitialized=!1,me.isCursorHidden=!1,me._onData=me.register(new le.EventEmitter),me._onUserInput=me.register(new le.EventEmitter),me._onBinary=me.register(new le.EventEmitter),me._scrollToBottom=ae,me.register({dispose:function(){return me._scrollToBottom=void 0}}),me.modes=ee.clone(E),me.decPrivateModes=ee.clone(b),me}return Ce(re,x),Object.defineProperty(re.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),re.prototype.reset=function(){this.modes=ee.clone(E),this.decPrivateModes=ee.clone(b)},re.prototype.triggerDataEvent=function(ae,oe){if(oe===void 0&&(oe=!1),!this._optionsService.options.disableStdin){var ve=this._bufferService.buffer;ve.ybase!==ve.ydisp&&this._scrollToBottom(),oe&&this._onUserInput.fire(),this._logService.debug('sending data "'+ae+'"',function(){return ae.split("").map(function(ye){return ye.charCodeAt(0)})}),this._onData.fire(ae)}},re.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))},re=ue([se(1,te.IBufferService),se(2,te.ILogService),se(3,te.IOptionsService)],re)}(ne.Disposable);Se.CoreService=z},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},Ce=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.CoreMouseService=void 0;var ue=ce(1),se=ce(0),te={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(b){return b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)}},VT200:{events:19,restrict:function(b){return b.action!==32}},DRAG:{events:23,restrict:function(b){return b.action!==32||b.button!==3}},ANY:{events:31,restrict:function(b){return!0}}};function le(b,z){var x=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(x|=64,x|=b.action):(x|=3&b.button,4&b.button&&(x|=64),8&b.button&&(x|=128),b.action===32?x|=32:b.action!==0||z||(x|=3)),x}var ee=String.fromCharCode,ne={DEFAULT:function(b){var z=[le(b,!1)+32,b.col+32,b.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(b){var z=b.action===0&&b.button!==4?"m":"M";return"\x1B[<"+le(b,!0)+";"+b.col+";"+b.row+z}},E=function(){function b(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 re=0,ae=Object.keys(te);re<ae.length;re++){var oe=ae[re];this.addProtocol(oe,te[oe])}for(var ve=0,ye=Object.keys(ne);ve<ye.length;ve++){var me=ye[ve];this.addEncoding(me,ne[me])}this.reset()}return b.prototype.addProtocol=function(z,x){this._protocols[z]=x},b.prototype.addEncoding=function(z,x){this._encodings[z]=x},Object.defineProperty(b.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(b.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(b.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}),b.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(b.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),b.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},b.prototype.explainEvents=function(z){return{down:!!(1&z),up:!!(2&z),drag:!!(4&z),move:!!(8&z),wheel:!!(16&z)}},b.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},b=ie([Ce(0,ue.IBufferService),Ce(1,ue.ICoreService)],b)}();Se.CoreMouseService=E},function(Dt,Se,ce){"use strict";var ie=this&&this.__decorate||function(te,le,ee,ne){var E,b=arguments.length,z=b<3?le:ne===null?ne=Object.getOwnPropertyDescriptor(le,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(te,le,ee,ne);else for(var x=te.length-1;x>=0;x--)(E=te[x])&&(z=(b<3?E(z):b>3?E(le,ee,z):E(le,ee))||z);return b>3&&z&&Object.defineProperty(le,ee,z),z},Ce=this&&this.__param||function(te,le){return function(ee,ne){le(ee,ne,te)}};Object.defineProperty(Se,"__esModule",{value:!0}),Se.DirtyRowService=void 0;var ue=ce(1),se=function(){function te(le){this._bufferService=le,this.clearRange()}return Object.defineProperty(te.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),te.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},te.prototype.markDirty=function(le){le<this._start?this._start=le:le>this._end&&(this._end=le)},te.prototype.markRangeDirty=function(le,ee){if(le>ee){var ne=le;le=ee,ee=ne}le<this._start&&(this._start=le),ee>this._end&&(this._end=ee)},te.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},te=ie([Ce(0,ue.IBufferService)],te)}();Se.DirtyRowService=se},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UnicodeService=void 0;var ie=ce(0),Ce=ce(79),ue=function(){function se(){this._providers=Object.create(null),this._active="",this._onChange=new ie.EventEmitter;var te=new Ce.UnicodeV6;this.register(te),this._active=te.version,this._activeProvider=te}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(te){if(!this._providers[te])throw new Error('unknown Unicode version "'+te+'"');this._active=te,this._activeProvider=this._providers[te],this._onChange.fire(te)},enumerable:!1,configurable:!0}),se.prototype.register=function(te){this._providers[te.version]=te},se.prototype.wcwidth=function(te){return this._activeProvider.wcwidth(te)},se.prototype.getStringCellWidth=function(te){for(var le=0,ee=te.length,ne=0;ne<ee;++ne){var E=te.charCodeAt(ne);if(55296<=E&&E<=56319){if(++ne>=ee)return le+this.wcwidth(E);var b=te.charCodeAt(ne);56320<=b&&b<=57343?E=1024*(E-55296)+b-56320+65536:le+=this.wcwidth(b)}le+=this.wcwidth(E)}return le},se}();Se.UnicodeService=ue},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.UnicodeV6=void 0;var ie,Ce=ce(15),ue=[[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]],te=function(){function le(){if(this.version="6",!ie){ie=new Uint8Array(65536),Ce.fill(ie,1),ie[0]=0,Ce.fill(ie,0,1,32),Ce.fill(ie,0,127,160),Ce.fill(ie,2,4352,4448),ie[9001]=2,ie[9002]=2,Ce.fill(ie,2,11904,42192),ie[12351]=1,Ce.fill(ie,2,44032,55204),Ce.fill(ie,2,63744,64256),Ce.fill(ie,2,65040,65050),Ce.fill(ie,2,65072,65136),Ce.fill(ie,2,65280,65377),Ce.fill(ie,2,65504,65511);for(var ee=0;ee<ue.length;++ee)Ce.fill(ie,0,ue[ee][0],ue[ee][1]+1)}}return le.prototype.wcwidth=function(ee){return ee<32?0:ee<127?1:ee<65536?ie[ee]:function(ne,E){var b,z=0,x=E.length-1;if(ne<E[0][0]||ne>E[x][1])return!1;for(;x>=z;)if(ne>E[b=z+x>>1][1])z=b+1;else{if(!(ne<E[b][0]))return!0;x=b-1}return!1}(ee,se)?0:ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?2:1},le}();Se.UnicodeV6=te},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.CharsetService=void 0;var ie=function(){function Ce(){this.glevel=0,this._charsets=[]}return Ce.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Ce.prototype.setgLevel=function(ue){this.glevel=ue,this.charset=this._charsets[ue]},Ce.prototype.setgCharset=function(ue,se){this._charsets[ue]=se,this.glevel===ue&&(this.charset=se)},Ce}();Se.CharsetService=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.updateWindowsModeWrappedState=void 0;var ie=ce(3);Se.updateWindowsModeWrappedState=function(Ce){var ue=Ce.buffer.lines.get(Ce.buffer.ybase+Ce.buffer.y-1),se=ue==null?void 0:ue.get(Ce.cols-1),te=Ce.buffer.lines.get(Ce.buffer.ybase+Ce.buffer.y);te&&se&&(te.isWrapped=se[ie.CHAR_DATA_CODE_INDEX]!==ie.NULL_CELL_CODE&&se[ie.CHAR_DATA_CODE_INDEX]!==ie.WHITESPACE_CELL_CODE)}},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.WriteBuffer=void 0;var ie=function(){function Ce(ue){this._action=ue,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Ce.prototype.writeSync=function(ue){if(this._writeBuffer.length){for(var se=this._bufferOffset;se<this._writeBuffer.length;++se){var te=this._writeBuffer[se],le=this._callbacks[se];this._action(te),le&&le()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ue)},Ce.prototype.write=function(ue,se){var te=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 te._innerWrite()})),this._pendingData+=ue.length,this._writeBuffer.push(ue),this._callbacks.push(se)},Ce.prototype._innerWrite=function(){for(var ue=this,se=Date.now();this._writeBuffer.length>this._bufferOffset;){var te=this._writeBuffer[this._bufferOffset],le=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(te),this._pendingData-=te.length,le&&le(),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 ue._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Ce}();Se.WriteBuffer=ie},function(Dt,Se,ce){"use strict";Object.defineProperty(Se,"__esModule",{value:!0}),Se.AddonManager=void 0;var ie=function(){function Ce(){this._addons=[]}return Ce.prototype.dispose=function(){for(var ue=this._addons.length-1;ue>=0;ue--)this._addons[ue].instance.dispose()},Ce.prototype.loadAddon=function(ue,se){var te=this,le={instance:se,dispose:se.dispose,isDisposed:!1};this._addons.push(le),se.dispose=function(){return te._wrappedAddonDispose(le)},se.activate(ue)},Ce.prototype._wrappedAddonDispose=function(ue){if(!ue.isDisposed){for(var se=-1,te=0;te<this._addons.length;te++)if(this._addons[te]===ue){se=te;break}if(se===-1)throw new Error("Could not dispose an addon that has not been loaded");ue.isDisposed=!0,ue.dispose.apply(ue.instance),this._addons.splice(se,1)}},Ce}();Se.AddonManager=ie}])})},93314:function($t){"use strict";$t.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($t){"use strict";$t.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($t,Dt,Se){"use strict";Se.d(Dt,{Z:function(){return ee}});const ce=ne=>typeof ne=="object"&&ne!=null&&ne.nodeType===1,ie=(ne,E)=>(!E||ne!=="hidden")&&ne!=="visible"&&ne!=="clip",Ce=(ne,E)=>{if(ne.clientHeight<ne.scrollHeight||ne.clientWidth<ne.scrollWidth){const b=getComputedStyle(ne,null);return ie(b.overflowY,E)||ie(b.overflowX,E)||(z=>{const x=(re=>{if(!re.ownerDocument||!re.ownerDocument.defaultView)return null;try{return re.ownerDocument.defaultView.frameElement}catch(ae){return null}})(z);return!!x&&(x.clientHeight<z.scrollHeight||x.clientWidth<z.scrollWidth)})(ne)}return!1},ue=(ne,E,b,z,x,re,ae,oe)=>re<ne&&ae>E||re>ne&&ae<E?0:re<=ne&&oe<=b||ae>=E&&oe>=b?re-ne-z:ae>E&&oe<b||re<ne&&oe>b?ae-E+x:0,se=ne=>{const E=ne.parentElement;return E==null?ne.getRootNode().host||null:E},te=(ne,E)=>{var b,z,x,re;if(typeof document=="undefined")return[];const{scrollMode:ae,block:oe,inline:ve,boundary:ye,skipOverflowHiddenElements:me}=E,ge=typeof ye=="function"?ye:nt=>nt!==ye;if(!ce(ne))throw new TypeError("Invalid target");const _e=document.scrollingElement||document.documentElement,he=[];let pe=ne;for(;ce(pe)&&ge(pe);){if(pe=se(pe),pe===_e){he.push(pe);break}pe!=null&&pe===document.body&&Ce(pe)&&!Ce(document.documentElement)||pe!=null&&Ce(pe,me)&&he.push(pe)}const ke=(z=(b=window.visualViewport)==null?void 0:b.width)!=null?z:innerWidth,Te=(re=(x=window.visualViewport)==null?void 0:x.height)!=null?re:innerHeight,{scrollX:Ee,scrollY:Oe}=window,{height:je,width:Pe,top:Qe,right:Xe,bottom:ot,left:We}=ne.getBoundingClientRect(),{top:rt,right:Ye,bottom:ut,left:Ge}=(nt=>{const et=window.getComputedStyle(nt);return{top:parseFloat(et.scrollMarginTop)||0,right:parseFloat(et.scrollMarginRight)||0,bottom:parseFloat(et.scrollMarginBottom)||0,left:parseFloat(et.scrollMarginLeft)||0}})(ne);let ze=oe==="start"||oe==="nearest"?Qe-rt:oe==="end"?ot+ut:Qe+je/2-rt+ut,Ve=ve==="center"?We+Pe/2-Ge+Ye:ve==="end"?Xe+Ye:We-Ge;const $e=[];for(let nt=0;nt<he.length;nt++){const et=he[nt],{height:pt,width:ct,top:Rt,right:dt,bottom:Mt,left:xt}=et.getBoundingClientRect();if(ae==="if-needed"&&Qe>=0&&We>=0&&ot<=Te&&Xe<=ke&&(et===_e&&!Ce(et)||Qe>=Rt&&ot<=Mt&&We>=xt&&Xe<=dt))return $e;const yt=getComputedStyle(et),bt=parseInt(yt.borderLeftWidth,10),He=parseInt(yt.borderTopWidth,10),Ae=parseInt(yt.borderRightWidth,10),be=parseInt(yt.borderBottomWidth,10);let Be=0,Ke=0;const Ne="offsetWidth"in et?et.offsetWidth-et.clientWidth-bt-Ae:0,De="offsetHeight"in et?et.offsetHeight-et.clientHeight-He-be:0,we="offsetWidth"in et?et.offsetWidth===0?0:ct/et.offsetWidth:0,Le="offsetHeight"in et?et.offsetHeight===0?0:pt/et.offsetHeight:0;if(_e===et)Be=oe==="start"?ze:oe==="end"?ze-Te:oe==="nearest"?ue(Oe,Oe+Te,Te,He,be,Oe+ze,Oe+ze+je,je):ze-Te/2,Ke=ve==="start"?Ve:ve==="center"?Ve-ke/2:ve==="end"?Ve-ke:ue(Ee,Ee+ke,ke,bt,Ae,Ee+Ve,Ee+Ve+Pe,Pe),Be=Math.max(0,Be+Oe),Ke=Math.max(0,Ke+Ee);else{Be=oe==="start"?ze-Rt-He:oe==="end"?ze-Mt+be+De:oe==="nearest"?ue(Rt,Mt,pt,He,be+De,ze,ze+je,je):ze-(Rt+pt/2)+De/2,Ke=ve==="start"?Ve-xt-bt:ve==="center"?Ve-(xt+ct/2)+Ne/2:ve==="end"?Ve-dt+Ae+Ne:ue(xt,dt,ct,bt,Ae+Ne,Ve,Ve+Pe,Pe);const{scrollLeft:Ue,scrollTop:Me}=et;Be=Le===0?0:Math.max(0,Math.min(Me+Be/Le,et.scrollHeight-pt/Le+De)),Ke=we===0?0:Math.max(0,Math.min(Ue+Ke/we,et.scrollWidth-ct/we+Ne)),ze+=Me-Be,Ve+=Ue-Ke}$e.push({el:et,top:Be,left:Ke})}return $e},le=ne=>ne===!1?{block:"end",inline:"nearest"}:(E=>E===Object(E)&&Object.keys(E).length!==0)(ne)?ne:{block:"start",inline:"nearest"};function ee(ne,E){if(!ne.isConnected||!(x=>{let re=x;for(;re&&re.parentNode;){if(re.parentNode===document)return!0;re=re.parentNode instanceof ShadowRoot?re.parentNode.host:re.parentNode}return!1})(ne))return;const b=(x=>{const re=window.getComputedStyle(x);return{top:parseFloat(re.scrollMarginTop)||0,right:parseFloat(re.scrollMarginRight)||0,bottom:parseFloat(re.scrollMarginBottom)||0,left:parseFloat(re.scrollMarginLeft)||0}})(ne);if((x=>typeof x=="object"&&typeof x.behavior=="function")(E))return E.behavior(te(ne,E));const z=typeof E=="boolean"||E==null?void 0:E.behavior;for(const{el:x,top:re,left:ae}of te(ne,le(E))){const oe=re-b.top+b.bottom,ve=ae-b.left+b.right;x.scroll({top:oe,left:ve,behavior:z})}}}}]);