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...

1 line
1.7 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.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(54476),i=n(59301),o={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"},s=n(7657),a=function(e,t){return i.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var l=i.forwardRef(a)},76618:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(54476),i=n(59301),o={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"},s=n(7657),a=function(e,t){return i.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:o}))};var l=i.forwardRef(a)},24433:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},t="5.0",n={},r=null,i=!1,o=!1,s=null,a=!1,l=null,c=null,u=0;u<arguments.length;u++){var d=arguments[u];if(null!==d)switch(_typeof(d)){case"number":t=d.toFixed(1);break;case"string":d.match(new RegExp("^[0-9]\\.[0-9]+$"))?t=d:s=d;break;case"object":void 0!==d.is3D?r=d:n=d;break;case"boolean":i=d,o=!0}}null===r&&(r={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===n.material_id||o||(i=!0)),null!==s&&void 0===n.id&&(n.id=s);var h="",f=!1,p=null,m=null,v=null,g=!1,y=null,_=null,b=null;void 0!==n.height&&(n.height=Math.round(n.height)),void 0!==n.width&&(n.width=Math.round(n.width));var x=function(e){return parseFloat(e)>4?parseFloat(e):5};function w(){try{return window.self!==window.top}catch(e){return!0}}function S(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){c=e,P(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(l=e,j(e,t))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){b=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var r,i="auto",o=n.id,s=!1,l=0;l<arguments.length;l++){var c=arguments[l];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?i=c:o=arguments[l]:"boolean"==typeof c?s=c:c instanceof HTMLElement&&(r=c)}function u(){if(a){i=R(i);var l=r||document.getElementById(o);if(l)if(e.removeExistingApplet(l,!1),void 0===n.width&&l.clientWidth&&(n.width=l.clientWidth),void 0===n.height&&l.clientHeight&&(n.height=l.clientHeight),n.width&&n.height||"html5"!==i||(delete n.width,delete n.height),p=i,"screenshot"===i)A(l,n);else{var c=!1;n.hasOwnProperty("playButton")&&n.playButton||n.hasOwnProperty("clickToLoad")&&n.clickToLoad?c=!0:n.hasOwnProperty("playButtonAutoDecide")&&n.playButtonAutoDecide&&(c=(!w()||t())&&S()),c?(p="screenshot",D(l,n,s,i)):L(l,n,s)}else console.log("possibly bug on ajax loading? ")}else setTimeout(u,200)}u()},e.getViews=function(){return r},e.isJavaInstalled=function(){return!1};var C=function(t){var i=function(){n.onError&&n.onError(),B("Error: Fetching material (id "+n.material_id+") failed.",n)},o=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",s="/materials/"+n.material_id+"?scope=basic";E("https://"+o+"/api/proxy.php?path="+encodeURIComponent(s),(function(o){var s=JSON.parse(o),a=s.elements?s.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:s;if(a&&a.url){n.fileName=a.url,k(a.settings||{}),r.is3D=!0;var l="https://www.geogebra.org/images/";e.setPreviewImage(y||a.previewUrl,l+"GeoGebra_loading.png",l+"applet_play.png"),t()}else i()}),i)};function k(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(t){e[t]=!!e[t]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(t){void 0===n[t]&&void 0!==e[t]&&(n[t]=e[t])})),void 0===n.showToolBarHelp&&(n.showToolBarHelp=n.showToolBar)}function E(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.onload=function(){t(r.responseText)},r.onerror=n,r.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return p},e.setPreviewImage=function(e,t,n){y=e,_=t,n},e.removeExistingApplet=function(e,t){var r;"string"==typeof e&&(e=document.getElementById(e)),p=null;var i=null;for(r=0;r<e.childNodes.length;r++){var o=e.childNodes[r],s=o.className;"applet_screenshot"===s?t?(o.style.display="block",p="screenshot"):o.style.display="none":"applet_scaler prerender"!==s&&(e.removeChild(o),i=s&&-1!=s.indexOf("appletParameters")?o.id:null,r--)}var a=void 0!==n.id?n.id:i,l=window[a];l&&"function"==typeof l.getBase64&&(l.remove(),window[a]=null)},e.refreshHitPoints=function(){if(x(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var T=function(e){return e&&"false"!==e},L=function(t,n,r){x(m)<=4.2&&(r=!0);var i=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!g)&&(i=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var s=n.width,a=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(x(m)<=4.4)T(n.showToolBar)&&(n.height-=7),T(n.showAlgebraInput)&&(n.height-=37),n.width<605&&T(n.showToolBar)&&(n.width=605,s=605);else{var u=100;(T(n.showToolBar)||T(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),u=T(n.showMenuBar)?245:155),s<u&&(n.width=u,s=u)}for(var d in o.style.border="none",o.style.display="inline-block",n)n.hasOwnProperty(d)&&"appletOnLoad"!==d&&o.setAttribute("data-param-"+d,n[d]);b&&o.setAttribute("data-param-fontscssurl",b),e.resize=function(){GGBAppletUtils.responsiveResize(t,n)},window.addEventListener("resize",(function(t){e.resize()}));var f="function"==typeof n.appletOnLoad?n.appletOnLoad:function(){};if(r||void 0===n.width){var p=document.createElement("div");p.className="applet_scaler",p.style.position="relative",p.style.display="block",p.appendChild(o),t.appendChild(p),n.appletOnLoad=function(t){e.resize(),f(t)}}else{n.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var y=t.querySelector(".applet_scaler.prerender"),_=null!==y;if(_)w=y.querySelector(".ggb_preview");else{var w=N(s,a,n.borderColor,!1);(y=document.createElement("div")).className="applet_scaler",y.style.position="relative",y.style.display="block",y.style.width=s+"px",y.style.height=a+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(y,"66%"),x(m)>=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),f(e)},_||y.appendChild(w)):o.appendChild(w),y.appendChild(o),_||t.appendChild(y),setTimeout((function(){e.resize()}),1)}function S(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),B("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function C(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){S(e.article,e.params)})),html5AppletsToProcess=null)},x(m)<5&&(e.className+=" geogebraweb")):S(e,t)}if(i){scriptLoadStarted=!0;for(var k=0;k<o.childNodes.length;k++){"TABLE"===o.childNodes[k].tagName&&(o.removeChild(o.childNodes[k]),k--)}if(null!==ggbHTML5LoadedScript){var E=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=E&&E.parentNode.removeChild(E)}var L=document.createElement("script"),A=function(){C(o,n)};L.src=h+v,ggbHTML5LoadedCodebaseIsWebSimple=g,ggbHTML5LoadedCodebaseVersion=m,ggbHTML5LoadedScript=L.src,B("GeoGebra HTML5 codebase loaded: '"+h+"'.",n),c||l&&"5.0"!=l?h.requirejs?__webpack_require__.e(5178).then(function(){var e=[__webpack_require__(95178)];A.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(L.onload=A,t.appendChild(L)):(g?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),A())}else C(o,n);n.height=a,n.width=s},A=function(t,n,r){var i=N(n.width,n.height,n.borderColor,r),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=n.width+"px",o.style.height=n.height+"px",o.className="applet_screenshot applet_scaler"+(r?" applet_screenshot_play":""),o.appendChild(i);var s=GGBAppletUtils.getScale(n,t,r);r?(t.appendChild(I()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),t.appendChild(o),1===s||isNaN(s)||(GGBAppletUtils.scaleElement(o,s),o.style.width=n.width+"px",o.style.height=n.height+"px",o.parentNode.style.width=n.width*s+"px",o.parentNode.style.height=n.height*s+"px"),e.resize=function(){M(t,i,o,r)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function M(e,t,r,i){if(e.contains(t)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var o=GGBAppletUtils.getScale(n,e,i);null!==r.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(r,1),r.parentNode.style.width=n.width+"px",r.parentNode.style.height=n.height+"px"):(GGBAppletUtils.scaleElement(r,o),r.parentNode.style.width=n.width*o+"px",r.parentNode.style.height=n.height*o+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,t){t.appendChild(e)};var D=function(e,t,n,r){A(e,t,!0);for(var i=function(){var n=[];for(s=0;s<e.childNodes.length;s++)n.push(e.childNodes[s]);if(window.GGBT_wsf_view){var i=window.GGBT_wsf_view.renderFullScreen(e,t.id),o=document.getElementById("fullscreencontainer"),a=jQuery(e).find(".fullscreencontent");a.length>0?(i.remove(),a.attr("id","fullscreencontent").show(),jQuery(o).append(a),window.dispatchEvent(new Event("resize"))):L(i,t,!1),window.GGBT_wsf_view.launchFullScreen(o)}else p=r,L(e,t,!1);if(!window.GGBT_wsf_view)for(s=0;s<n.length;s++)e.removeChild(n[s])},o=e.getElementsByClassName("ggb_preview_play"),s=0;s<o.length;s++)o[s].addEventListener("click",i,!1),o[s].addEventListener("ontouchstart",i,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),S()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},I=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var t='.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");}',n=document.createElement("style");n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(n)}return e},N=function(e,t,n,r){var i=document.createElement("div");i.className="ggb_preview",i.style.position="absolute",i.style.zIndex="90",i.style.width=e-2+"px",i.style.height=t-2+"px",i.style.top="0px",i.style.left="0px",i.style.overflow="hidden",i.style.backgroundColor="white";var o="lightgrey";void 0!==n&&(o="none"===n?"transparent":n),i.style.border="1px solid "+o;var s,a,l,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==y&&c.setAttribute("src",y),c.style.opacity=.7,null!==_)&&!r){(s=document.createElement("img")).style.position="absolute",s.style.zIndex="1001",s.style.opacity=1,c.style.opacity=.3,(a=360)>e/4*3&&(a=e/4*3),l=a/5.8,s.setAttribute("src",_),s.setAttribute("width",a),s.setAttribute("height",l);var u=(e-a)/2,d=(t-l)/2;s.style.left=u+"px",s.style.top=d+"px",i.appendChild(s)}return i.appendChild(c),i},R=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},O=["web","webSimple","web3d","tablet","tablet3d","phone"],j=function(e,t){if(m=e,t)P(m,!0);else{var o,s,a=!i;if(a){var l=x(m);!isNaN(l)&&l<4.4&&(a=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=m.indexOf("//");for(var u in s=c>0?m:0===c?o+m:"https://www.geogebra.org/apps/5.2.814.0/",O)if(m.slice(-1*O[u].length)===O[u]||m.slice(-1*(O[u].length+1))===O[u]+"/")return void P(s,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!a||r.is3D||r.AV||r.SV||r.CV||r.EV2||r.CP||r.PC||r.DA||r.FI||r.PV||T(n.showToolBar)||T(n.showMenuBar)||T(n.showAlgebraInput)||T(n.enableRightClick)||n.appName&&"classic"!=n.appName?s+="web3d/":s+="webSimple/",P(s,!1)}},P=function(e,t){if(e.requirejs)h=e;else{"/"!==e.slice(-1)&&(e+="/"),h=e,null===t&&(t=-1===e.indexOf("http")),f=t,v="web.nocache.js",g=!1;var n=h.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?O.indexOf(n[n.length-2])>=0&&(v=n[n.length-2]+".nocache.js"):(v="webSimple.nocache.js",g=!0)),n=e.split("/"),"test"===(m=n[n.length-3]).substr(0,4)?m=m.substr(4,1)+"."+m.substr(5,1):"war"!==m.substr(0,3)&&"beta"!==m.substr(0,4)||(m="5.0");var r=parseFloat(m);NaN!==r&&r<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+r+" is deprecated. Using version latest instead."),j("5.0",t))}},B=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function U(){var e=t;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),j(e,!1),null!==c&&P(c,f),a=!0}return void 0!==n.material_id?C(U):U(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,r,i){if(e.isScreenshoGenerator)return 1;var o,s=void 0!==r&&r,a=null!=e.noScaleMargin&&e.noScaleMargin,l=(o=e.autoHeight)&&"false"!==o,c=function(e,t,n,r,i,o){var s=null;if(null!=o&&""!=o)for(var a=e.parentNode;null!=a;){if((" "+a.className+" ").indexOf(" "+o+" ")>-1){s=a;break}a=a.parentNode}var l=0,c=0,u=0,d=0,h=0,f=0,p=0;if(s)l=s.offsetWidth,c=Math.max(r?s.offsetWidth:0,s.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=l):(l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=l&&(void 0===i||!i)&&("rtl"===document.dir?(h=l-m.width-m.left,f=u<=480?10:30):(f=m.left,h=u<=480?10:30),d=f+h)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,p=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,p=40))}return e&&((void 0===n||!n)&&t>0&&t+d<l?l=t:l-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==n&&n||(c-=p)),{width:l,height:c}}(t,e.width,n,l,s&&window.GGBT_wsf_view||a,i),u=parseInt(c.width),d=e.width,h=e.height;if(void 0===d){var f=t.querySelector(".appletParameters");f&&(d=f.offsetWidth,h=f.offsetHeight)}var p=u/d,m=s?1:c.height/h;return void 0===n||n||(p=Math.min(1,p),m=Math.min(1,m)),Math.min(p,m)}function r(e,t,r){var i,o=1,s=!1;return e.hasOwnProperty("allowUpscale")&&(s=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(s=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(s=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(i=n(e,t,s,r,e.scaleContainerClass),!s||e.hasOwnProperty("scale")&&1!==o?Math.min(o,i):i)}function i(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),r=e.getBoundingClientRect(),i=(t-r.width)/2,o=(n-r.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=i<40?"40px":i+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=i+"px")}return{responsiveResize:function(n,o){var s=n.querySelector(".appletParameters");if(s){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==s.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(s.parentElement&&/fullscreen/.test(s.parentElement.className))return;var a=r(o,n);e()&&s.setAttribute("data-param-scale",a);for(var l=null,c=0;c<n.childNodes.length;c++)if(void 0!==n.childNodes[c].className&&n.childNodes[c].className.match(/^applet_scaler/)){l=n.childNodes[c];break}if(null!==l&&null!==l.querySelector(".noscale"))return;var u=void 0!==o.id?o.id:"ggbApplet",d=window[u];null!=d&&d.recalculateEnvironments||null===l||l.className.match(/fullscreen/)||(l.parentNode.style.transform="",isNaN(a)||1===a?(t(l,1),l.parentNode.style.width=o.width+"px",l.parentNode.style.height=o.height+"px"):(l.parentNode.style.width=o.width*a+"px",l.parentNode.style.height=o.height*a+"px",t(l,a))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&i(n),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(s).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:i,getScale:r,scaleElement:t}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(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 e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,t){}q(H,I),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||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function t(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var n=t();if(n)e();else{o.addEventListener&&o.addEventListener(Z,i,!1);var r=setInterval((function(){i()}),$)}function i(){if(!n){if(!t())return;n=!0,e(),o.removeEventListener&&o.removeEventListener(Z,i,!1),r&&clearInterval(r)}}}((function(){var t,n,r,i;t=e,n=u(),r=n.body,(i=n.createElement(_)).language=ab,i.crossOrigin=W,i.src=t,webModule.__errFn&&(i.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),r.appendChild(i),q(cb,db)}))}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(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var r=e.lastIndexOf(tb,Math.min(n,t));return r>=O?e.substring(O,r+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;n<t.length;++n)if(-1!=t[n].src.indexOf(xb))return e(t[n].src);return W}()),n==W&&(n=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function s(e){var t=o[e](),n=i[e];if(t in n)return t;var s=[];for(var a in n)s[n[a]]=a;throw r&&r(e,s,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in i[e]},webModule.__getPropMap=function(){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[t]=s(t));return e},webModule.__computePropValue=s,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var a=(e=Cb).indexOf(Db);-1!=a&&(t=parseInt(e.substring(a+P),$),e=e.substring(O,a))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},r=e[webModule.__softPermutationId],i=O;i<r.length;i++){var o=r[i];n[o[O]]=o[P]}return n}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),n=t.body,r=t.createElement(_);r.language=ab,r.text=e,n.appendChild(r),n.removeChild(r)},A(),webModule.__moduleBase="/react/build/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},20337:function(e,t,n){"use strict";function r(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function i(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],r=0;r<e.length;r++){var i=e[r],o=t?"".concat(t,"/").concat(i.name):"".concat(i.name);n.push({title:i.name,type:i.type,isLeaf:"tree"!==i.type,key:o})}return n}function o(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(i.key===t){i.children=n;break}i.children&&o(i.children,t,n)}return e}function s(e,t,n){var r;return function(){var i=this,o=arguments,s=function(){r=null,n||e.apply(i,o)},a=n&&!r;clearTimeout(r),r=setTimeout(s,t),a&&e.apply(i,o)}}n.d(t,{Ax:function(){return o},Ds:function(){return s},KI:function(){return a},SI:function(){return i},f1:function(){return r}});var a=n(6816).Z.API_SERVER},17086:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var r=n(7557),i=n.n(r),o=n(41498),s=n.n(o),a=n(79800),l=n.n(a),c=n(59301),u="imageDimensions___a7crR",d="img___Kroat",h="fullWidth___c492T",f=n(92310),p=n.n(f),m=n(29787),v=n(2859),g=n(67310),y=n(32985),_=n(37712),b=function(e){var t=e.data,n=e.className,r=e.fullWidth,o=e.style,a=void 0===o?{}:o,f=e.onClose,b=e.onOk,x=e.showFullTools,w=e.noAssociationId,S=(0,c.useRef)(null),C=(0,c.useRef)(null),k=(0,c.useRef)(null),E=(0,c.useRef)(null),T=(0,c.useState)(!1),L=l()(T,2),A=L[0],M=L[1],D=(0,c.useState)("正在加载中"),I=l()(D,2),N=I[0],R=I[1];(0,c.useEffect)((function(){return k.current||(k.current=document.createElement("style"),document.head.appendChild(k.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),k.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&O()):(document.body.removeAttribute("data-custom"),k.current&&(document.head.removeChild(k.current),k.current=null)),function(){document.body.removeAttribute("data-custom"),k.current&&(document.head.removeChild(k.current),k.current=null)}}),[null==t?void 0:t.visible]);var O=function(){var e=s()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),R("正在加载中"),e.next=4,(0,y.ZJ)(null==t?void 0:t.src);case 4:n=e.sent,S.current.src="",S.current.src=n,S.current.onload=function(){P()},M(!1),R("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(){var e=s()(i()().mark((function e(n){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),R("正在保存中"),e.next=4,(0,g.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:n.dataUrl}});case 4:if(null==(r=e.sent)||!r.id||w){e.next=12;break}return e.next=8,(0,g.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==r?void 0:r.id,settings:JSON.stringify(n.state)}});case 8:0===e.sent.status&&b(),e.next=13;break;case 12:null!=r&&r.id&&b(r);case 13:M(!1),R("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){C.current=new v.hP(S.current),C.current.targetRoot=E.current,C.current.addEventListener("render",j),C.current.addEventListener("beforeclose",f),x&&(C.current.availableMarkerTypes=C.current.ALL_MARKER_TYPES,C.current.uiStyleSettings.redoButtonVisible=!0,C.current.uiStyleSettings.notesButtonVisible=!0,C.current.uiStyleSettings.zoomButtonVisible=!0,C.current.uiStyleSettings.zoomOutButtonVisible=!0,C.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=C.current.uiStyleSettings,C.current.show(),null!=t&&t.snapshotData&&C.current.restoreState(t.snapshotData),setTimeout((function(){var e;window.scrollTo(0,0),(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var t=document.querySelector(e.name);t&&t.setAttribute("title",e.title)}))}),300)};return(0,_.jsx)(c.Fragment,{children:(null==t?void 0:t.visible)&&(0,_.jsx)(m.Z,{spinning:A,tip:N,style:{position:"absolute",width:"100vw"},children:(0,_.jsx)("div",{ref:E,className:p()(u,n,r?h:""),style:a,children:(0,_.jsx)("img",{className:d,ref:S})})})})}},74135:function(e,t,n){"use strict";var r=n(59301),i=n(77019),o=n(5269),s=n(20554),a=n(99571),l=n(76603),c=n(32313),u=(n(48136),n(37712)),d=(0,r.forwardRef)((function(e,t){var n=e.callback,d=e.showSaveButton,h=e.value,f=void 0===h?"":h,p=(0,r.useRef)(),m=function(e){p.current.setValue(p.current.getValue()+" "+e.value+" ")},v=[{key:"1",label:"快捷模板",children:(0,u.jsx)(i.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"分数得分",value:"\\frac{x}{y}",children:[{name:"分数 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:"导数 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"模算术 Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"根式角标",value:"\\sqrt{x}",children:[{name:"根式 Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"上下标 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"重音符及其他 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:"极限对数",value:"\\lim_{x \\to 0}",children:[{name:"极限 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"对数指数 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"界限 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"三角函数",value:"\\sin a",children:[{name:"三角函数 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"反三角函数 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:"双曲函数 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"反双曲函数 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:"积分运算",value:"\\int_{a}^{b}",children:[{name:"积分 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"双重积分 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"三重积分 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"曲线积分 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"大型运算",value:"\\sum_{a}^{b}",children:[{name:"求和 Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"乘积余积 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:"并集交集 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"析取合取 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"括号取整",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"括号 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 "}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(l.Z,{value:"$$".concat(e.value,"$$")}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(i.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})},{key:"2",label:"公式模板",children:(0,u.jsx)(i.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"代数",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\n x=a + r\\text{cos}\\theta \\ \r\n y=b + r\\text{sin}\\theta \r\n\\end{matrix}\\right. "},{value:"\\begin{array}{l} \r\n \\text{对于方程形如:}x^{3}-1=0 \\ \r\n \\text{设}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\left\\{\\begin{matrix} \r\n \\Delta \\gt 0\\text{方程有两个不相等的实根} \\ \r\n \\Delta = 0\\text{方程有两个相等的实根} \\ \r\n \\Delta \\lt 0\\text{方程无实根} \r\n\\end{matrix}\\right. \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r\n \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r\n\\end{array} "}]}]},{name:"几何",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\n a \\perp \\alpha \\ \r\n b \\perp \\alpha \r\n\\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\n \\Rightarrow a \\perp \\beta "},{value:"\\left.\\begin{matrix} \r\n a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r\n a \\parallel \\partial ,b \\parallel \\partial \r\n\\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\n m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r\n a \\perp m,a \\perp n \r\n\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha "},{value:"\\begin{array}{c} \r\n \\text{直角三角形中,直角边长a,b,斜边边长c} \\ \r\n a^{2}+b^{2}=c^{2} \r\n\\end{array}"}]}]},{name:"不等式",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\n a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r\n a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r\n\\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\n a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r\n \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r\n\\end{array}"},{value:"\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r\n\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) "},{value:"\\begin{array}{c} \r\n a,b \\in R^{+} \\ \r\n \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n a,b \\in R \\ \r\n \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n 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\n\\end{array}"}]}]},{name:"积分",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:"三角",value:"e^{i \\theta}",children:[{name:"求和 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:"统计",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\n \\text{若}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r\n \\text{则}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r\n\\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\n P \\left( \\emptyset \\right) =0 \\\\ \r\n P \\left( S \\right) =1 \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n \\forall A \\in S \\\\ \r\n P \\left( A \\right) \\ge 0 \r\n\\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\n S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r\n P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n P_{n}=n! \\\\ \r\n A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r\n\\end{array}"}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[e.name&&(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(i.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(l.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})}],g=function(){var e=document.createElement("div");e.innerHTML=p.current.getValue();var t=e.innerText;return n&&n(t),t};return(0,r.useImperativeHandle)(t,(function(){return{getData:g}})),(0,u.jsxs)("div",{className:c.Z.mathWrap,children:[(0,u.jsx)(s.Z,{defaultActiveKey:"1",items:v}),(0,u.jsx)("math-field",{locale:"zh_cn",className:c.Z.mathField,placeholder:"请打开键盘,输入公式",ref:p,style:{width:800,marginTop:30,fontSize:18},children:f||""}),d&&(0,u.jsx)("div",{className:c.Z.button,children:(0,u.jsx)(a.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})}));t.Z=d},90059:function(e,t,n){"use strict";var r=n(82242),i=n.n(r),o=(n(59301),n(93314)),s=n(99571),a=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,l=e.styles,c=void 0===l?{}:l,u=e.customText,d=e.ButtonText,h=e.ButtonClick,f=e.Buttonclass,p=e.ButtonTwo,m=e.imgStyles,v=e.loading,g=void 0!==v&&v,y=e.className,_=void 0===y?"":y;return(0,a.jsxs)("section",{className:"tc animated fadeIn ".concat(_),style:i()({color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"},c),children:[(0,a.jsx)("img",{src:t||o,style:i()(i()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,a.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,a.jsx)(s.ZP,i()(i()({className:f,onClick:h},r),{},{children:d})),p&&p]})}},99074:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(82242),i=n.n(r),o=n(7557),s=n.n(o),a=n(41498),l=n.n(a),c=n(79800),u=n.n(c),d=n(59301),h={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=n(99571),p=n(70557),m=n(49337),v=n(25399),g=n(32985),y=n(99534),_=n(90059),b=n(6816),x=n(78288),w=n(37712),S=function(e){var t,n,r,o,a,c,S=e.editOffice,C=void 0===S?"view":S,k=e.data,E=e.issaver,T=e.onSaver,L=(e.theme,e.type),A=e.filename,M=e.monacoEditor,D=e.className,I=e.style,N=e.close,R=e.onClose,O=e.hasMask,j=e.disabledDownload,P=e.onImgDimensions,B=e.showNodata,U=e.recordInfo,F=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=u()(F,2),H=(z[0],z[1],(0,d.useState)("")),Z=u()(H,2),W=(Z[0],Z[1]),G=(0,d.useState)(),q=u()(G,2),V=q[0],K=q[1],Y="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,J=(0,d.useRef)();null!==(t=k)&&void 0!==t&&t.startsWith("/api")&&"txt"!==L&&(k=b.Z.API_SERVER+k);function Q(e){return $.apply(this,arguments)}function $(){return($=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"pdfdata"===t.data.type&&(T(t.data.data),window.removeEventListener("message",Q,!1)),console.log("mess---:",t.data);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}A&&M&&(M.filename=A),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&W(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===L&&(k.indexOf("bigfilescdn.")>-1||k.indexOf("bigfiles1")>-1?K({url:k,fileType:(e=k,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:k.indexOf("model=edit")?"edit":"view"}):ee())}),[L,k]);var ee=function(){var e=l()(s()().mark((function e(){var t,n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",k),t=k,k.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,y.gJ)({attachment_id:n});case 6:(r=e.sent).url=X+r.url,K(r);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){k.startsWith("http")||k.startsWith("blob:")?ne():(0,g.Sv)(A||"educoder",k,A)},ne=function(){U&&(0,x.fc)({id:null==U?void 0:U.id,watch_type:1,course_id:null==U?void 0:U.course_id}),(0,g.Nd)(A||"educoder",decodeURIComponent(k))};return(0,w.jsxs)("div",{style:i()({},I||{}),className:"".concat(O&&h.bgBlack," ").concat(L?h.wrp:"hide"),children:[N&&(0,w.jsxs)("div",{className:h.close,ref:J,children:[!!P&&(0,w.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,w.jsx)("span",{onClick:function(){R(),P()},children:(0,w.jsx)("i",{className:"icon-yulanpizhu"})})}),!j&&(0,w.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,w.jsx)("span",{onClick:ne,children:(0,w.jsx)("i",{className:"icon-quxiaozhiding"})})}),E&&(0,w.jsx)(v.Z,{title:"保存pdf并退出",getPopupContainer:function(){return J.current},children:(0,w.jsx)("span",{className:"",onClick:function(){var e=document.getElementById("pdfiframe");window.addEventListener("message",Q,!1),setTimeout((function(){e.contentWindow.postMessage("getData","*")}),300)},children:(0,w.jsx)("i",{className:"icon-baocun"})})}),(0,w.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,w.jsx)("span",{className:"",onClick:function(){R()},children:(0,w.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,w.jsx)("div",{className:"".concat(h[D]," ").concat(D," ").concat(h.monaco," ").concat("txt"===L?"show":"hide"),children:"txt"===L&&(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(m.ZP,i()({},M))})}),"audio"===L&&(0,w.jsx)("audio",{src:"".concat((null===(n=k)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(r=k)||void 0===r?void 0:r.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===L&&(0,w.jsx)(w.Fragment,{children:(null===(o=k)||void 0===o?void 0:o.indexOf("http"))>-1?(0,w.jsx)("video",{controls:!0,src:"".concat(k),autoPlay:!0}):(0,w.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})}),"office"===L&&V&&(0,w.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(V.key,"&url=").concat(btoa(V.url),"&callbackUrl=").concat(X+(V.callbackUrl||""),"&fileType=").concat(V.fileType,"&title=").concat(V.title||"","&model=").concat(C,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!j)}),"html"===L&&(0,w.jsx)("iframe",{src:k+"&disposition=inline"}),"pdf"===L&&(0,w.jsx)("iframe",{id:"pdfiframe",src:"".concat(Y,"/js/pdfview/index.html?filename=").concat(A||"educoder.pdf","&url=").concat(encodeURIComponent(k),"&disabledDownload=").concat(!!j,"&model=").concat(C)}),"image"===L&&(0,w.jsx)("img",{src:"".concat((null===(a=k)||void 0===a?void 0:a.indexOf("http://"))>-1||(null===(c=k)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),("other"===L||"download"===L)&&(0,w.jsx)(w.Fragment,{children:B?(0,w.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,w.jsx)(f.ZP,{icon:(0,w.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:j,children:"下载"})}):(0,w.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:te,disabled:j,children:[(0,w.jsx)(p.Z,{}),"点击下载"]})}),"flowChart"===L&&(0,w.jsx)("div",{className:"embed",children:(0,w.jsx)("iframe",{src:"/drawio/src/main/webapp/viewer.html?id=".concat(k||"","&gapi=0&od=0&db=0&gh=0&gl=0"),width:"100%",height:"100%",frameBorder:"0"})})]})}},76603:function(e,t,n){"use strict";n.d(t,{z:function(){return L},Z:function(){return A}});var r=n(82242),i=n.n(r),o=n(37205),s=n.n(o),a=n(91232),l=n.n(a),c=n(79800),u=n.n(c),d=n(59301),h=(n(73958),n(90969)),f=(n(64018),n(44523)),p=n(6816),m=n(32985),v=n(15342),g=n(77736),y=n(99571),_=n(1012),b=n(99074),x=n(37712),w=function(e){var t=e.html,n=(0,d.useRef)(null),r=(0,d.useRef)(null);return(0,d.useEffect)((function(){var e=n.current.attachShadow({mode:"open"});r.current=document.createElement("div"),r.current.className="markdown-body",r.current.innerHTML=t,e.appendChild(r.current);var i=document.createElement("style");return i.textContent='.markdown-body p {\n margin: 0 0 16px 0 !important;\n line-height: 28px;\n white-space: pre-wrap;\n }\n\n ol,\n ul,\n li {\n list-style-type: none\n }\n\n ol,\n ul,\n dl {\n margin-bottom: 0px;\n }\n\n .markdown-body {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n color: #333;\n overflow: hidden;\n font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;\n word-break: break-word;\n font-size: 16px;\n line-height: 1.6;\n white-space: normal;\n word-wrap: break-word;\n position: relative;\n }\n\n .markdown-body ul>li {\n list-style-type: disc;\n }\n\n .markdown-body ol>li {\n list-style-type: decimal;\n }\n\n .markdown-body a {\n background: transparent;\n }\n\n .markdown-body a:active,\n .markdown-body a:hover {\n outline: 0;\n }\n\n .markdown-body strong {\n font-weight: bold;\n }\n\n .markdown-body h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n .markdown-body img {\n border: 0;\n }\n\n .markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n }\n\n .markdown-body pre {\n overflow: auto;\n }\n\n .markdown-body code,\n .markdown-body kbd,\n .markdown-body pre {\n font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;\n font-size: 1em;\n }\n\n .markdown-body input {\n color: inherit;\n font: inherit;\n margin: 0;\n }\n\n .markdown-body html input[disabled] {\n cursor: default;\n }\n\n .markdown-body input {\n line-height: normal;\n }\n\n .markdown-body input[type="checkbox"] {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n }\n\n .markdown-body table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .markdown-body td,\n .markdown-body th {\n padding: 0;\n }\n\n .markdown-body * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body input {\n font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";\n }\n\n .markdown-body a {\n color: #4183c4;\n text-decoration: none;\n }\n\n .markdown-body a:hover,\n .markdown-body a:active {\n text-decoration: underline;\n }\n\n .markdown-body hr {\n height: 0;\n margin: 15px 0;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid #ddd;\n }\n\n .markdown-body hr:before {\n display: table;\n content: "";\n }\n\n .markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n margin-top: 15px;\n margin-bottom: 15px;\n line-height: 1.1;\n }\n\n .markdown-body h1 {\n font-size: 30px;\n }\n\n .markdown-body h2 {\n font-size: 21px;\n }\n\n .markdown-body h3 {\n font-size: 16px;\n }\n\n .markdown-body h4 {\n font-size: 14px;\n }\n\n .markdown-body h5 {\n font-size: 12px;\n }\n\n .markdown-body h6 {\n font-size: 11px;\n }\n\n .markdown-body blockquote {\n margin: 0;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n ul.linenums,\n ol.linenums {\n padding: 16px 0 0 56px !important;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding-left: 2em;\n }\n\n\n .markdown-body ol ol,\n .markdown-body ul ol {\n list-style-type: lower-roman;\n }\n\n .markdown-body ul ul ol,\n .markdown-body ul ol ol,\n .markdown-body ol ul ol,\n .markdown-body ol ol ol {\n list-style-type: lower-alpha;\n }\n\n .markdown-body dd {\n margin-left: 0;\n }\n\n .markdown-body code {\n font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;\n font-size: 12px;\n }\n\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 0;\n font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n }\n\n .markdown-body .octicon {\n font: normal normal 16px octicons-anchor;\n line-height: 1;\n display: inline-block;\n text-decoration: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .markdown-body .octicon-link:before {\n content: \'\f05c\';\n }\n\n .markdown-body>*:first-child {\n margin-top: 0 !important;\n }\n\n .markdown-body>*:last-child {\n margin-bottom: 0 !important;\n }\n\n .markdown-body .anchor {\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n padding-right: 6px;\n padding-left: 30px;\n margin-left: -30px;\n }\n\n .markdown-body .anchor:focus {\n outline: none;\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n position: relative;\n margin-top: 1em;\n margin-bottom: 16px;\n font-weight: bold;\n line-height: 1.4;\n }\n\n .markdown-body h1 .octicon-link,\n .markdown-body h2 .octicon-link,\n .markdown-body h3 .octicon-link,\n .markdown-body h4 .octicon-link,\n .markdown-body h5 .octicon-link,\n .markdown-body h6 .octicon-link {\n display: none;\n color: #000;\n vertical-align: middle;\n }\n\n .markdown-body h1:hover .anchor,\n .markdown-body h2:hover .anchor,\n .markdown-body h3:hover .anchor,\n .markdown-body h4:hover .anchor,\n .markdown-body h5:hover .anchor,\n .markdown-body h6:hover .anchor {\n padding-left: 8px;\n margin-left: -30px;\n text-decoration: none;\n }\n\n .markdown-body h1:hover .anchor .octicon-link,\n .markdown-body h2:hover .anchor .octicon-link,\n .markdown-body h3:hover .anchor .octicon-link,\n .markdown-body h4:hover .anchor .octicon-link,\n .markdown-body h5:hover .anchor .octicon-link,\n .markdown-body h6:hover .anchor .octicon-link {\n display: inline-block;\n }\n\n .markdown-body h1 {\n padding-bottom: 0.3em;\n font-size: 2.25em;\n line-height: 1.2;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h1 .anchor {\n line-height: 1;\n }\n\n .markdown-body h2 {\n padding-bottom: 0.3em;\n font-size: 1.75em;\n line-height: 1.225;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h2 .anchor {\n line-height: 1;\n }\n\n .markdown-body h3 {\n font-size: 1.5em;\n line-height: 1.43;\n }\n\n .markdown-body h3 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h4 {\n font-size: 1.25em;\n }\n\n .markdown-body h4 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h5 {\n font-size: 1em;\n }\n\n .markdown-body h5 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body h6 {\n font-size: 1em;\n color: #777;\n }\n\n .markdown-body h6 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n .markdown-body ul ul,\n .markdown-body ul ol,\n .markdown-body ol ol,\n .markdown-body ol ul {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .markdown-body li>p {\n margin-top: 16px;\n }\n\n .markdown-body dl {\n padding: 0;\n }\n\n .markdown-body dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: bold;\n }\n\n .markdown-body dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n }\n\n .markdown-body blockquote {\n padding: 0 15px;\n color: #777;\n border-left: 4px solid #ddd;\n }\n\n .markdown-body blockquote> :first-child {\n margin-top: 0;\n }\n\n .markdown-body blockquote> :last-child {\n margin-bottom: 0;\n }\n\n .markdown-body table {\n display: block;\n width: 100%;\n overflow: auto;\n word-break: normal;\n word-break: keep-all;\n }\n\n .markdown-body table th {\n font-weight: bold;\n text-align: revert;\n }\n\n .markdown-body table th,\n .markdown-body table td {\n padding: 6px 13px;\n border: 1px solid #ddd;\n }\n\n .markdown-body table tr {\n background-color: #fff;\n border-top: 1px solid #ccc;\n }\n\n .markdown-body table tr:nth-child(2n) {\n background-color: #f8f8f8;\n }\n\n .markdown-body img {\n max-width: 100%;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body code {\n padding: 0;\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n margin: 0;\n font-size: 85%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px;\n }\n\n .markdown-body code:has(.katex) {\n background-color: transparent;\n }\n\n .markdown-body code:before,\n .markdown-body code:after {\n letter-spacing: -0.2em;\n content: "\\00a0";\n }\n\n .markdown-body pre>code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n }\n\n .markdown-body .highlight {\n margin-bottom: 16px;\n }\n\n .markdown-body .highlight pre,\n .markdown-body pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px;\n }\n\n .markdown-body .highlight pre {\n margin-bottom: 0;\n word-break: normal;\n }\n\n .markdown-body pre {\n word-wrap: normal;\n }\n\n .markdown-body pre code {\n display: inline;\n max-width: initial;\n padding: 0;\n margin: 0;\n overflow: initial;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n }\n\n .markdown-body pre code:before,\n .markdown-body pre code:after {\n content: normal;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font-size: 11px;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .pl-c {\n color: #969896;\n }\n\n .markdown-body .pl-c1,\n .markdown-body .pl-mdh,\n .markdown-body .pl-mm,\n .markdown-body .pl-mp,\n .markdown-body .pl-mr,\n .markdown-body .pl-s1 .pl-v,\n .markdown-body .pl-s3,\n .markdown-body .pl-sc,\n .markdown-body .pl-sv {\n color: #0086b3;\n }\n\n .markdown-body .pl-e,\n .markdown-body .pl-en {\n color: #795da3;\n }\n\n .markdown-body .pl-s1 .pl-s2,\n .markdown-body .pl-smi,\n .markdown-body .pl-smp,\n .markdown-body .pl-stj,\n .markdown-body .pl-vo,\n .markdown-body .pl-vpf {\n color: #333;\n }\n\n .markdown-body .pl-ent {\n color: #63a35c;\n }\n\n .markdown-body .pl-k,\n .markdown-body .pl-s,\n .markdown-body .pl-st {\n color: #a71d5d;\n }\n\n .markdown-body .pl-pds,\n .markdown-body .pl-s1,\n .markdown-body .pl-s1 .pl-pse .pl-s2,\n .markdown-body .pl-sr,\n .markdown-body .pl-sr .pl-cce,\n .markdown-body .pl-sr .pl-sra,\n .markdown-body .pl-sr .pl-sre,\n .markdown-body .pl-src {\n color: #df5000;\n }\n\n .markdown-body .pl-mo,\n .markdown-body .pl-v {\n color: #1d3e81;\n }\n\n .markdown-body .pl-id {\n color: #b52a1d;\n }\n\n .markdown-body .pl-ii {\n background-color: #b52a1d;\n color: #f8f8f8;\n }\n\n .markdown-body .pl-sr .pl-cce {\n color: #63a35c;\n font-weight: bold;\n }\n\n .markdown-body .pl-ml {\n color: #693a17;\n }\n\n .markdown-body .pl-mh,\n .markdown-body .pl-mh .pl-en,\n .markdown-body .pl-ms {\n color: #1d3e81;\n font-weight: bold;\n }\n\n .markdown-body .pl-mq {\n color: #008080;\n }\n\n .markdown-body .pl-mi {\n color: #333;\n font-style: italic;\n }\n\n .markdown-body .pl-mb {\n color: #333;\n font-weight: bold;\n }\n\n .markdown-body .pl-md,\n .markdown-body .pl-mdhf {\n background-color: #ffecec;\n color: #bd2c00;\n }\n\n .markdown-body .pl-mdht,\n .markdown-body .pl-mi1 {\n background-color: #eaffea;\n color: #55a532;\n }\n\n .markdown-body .pl-mdr {\n color: #795da3;\n font-weight: bold;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .task-list-item {\n list-style-type: none;\n }\n\n .markdown-body .task-list-item+.task-list-item {\n margin-top: 3px;\n }\n\n .markdown-body .task-list-item input {\n float: left;\n margin: 0.3em 0 0.25em -1.6em;\n vertical-align: middle;\n }\n\n .markdown-body :checked+.radio-label {\n z-index: 1;\n position: relative;\n border-color: #4183c4;\n }\n\n\n /*! Pretty printing styles. Used with prettify.js. */\n /* SPAN elements with the classes below are added by prettyprint. */\n .pln {\n color: #000\n }\n\n /* plain text */\n\n @media screen {\n .str {\n color: #080\n }\n\n /* string content */\n .kwd {\n color: #008\n }\n\n /* a keyword */\n .com {\n color: #800\n }\n\n /* a comment */\n .typ {\n color: #606\n }\n\n /* a type name */\n .lit {\n color: #066\n }\n\n /* a literal value */\n /* punctuation, lisp open bracket, lisp close bracket */\n .pun,\n .opn,\n .clo {\n color: #660\n }\n\n .tag {\n color: #008\n }\n\n /* a markup tag name */\n .atn {\n color: #606\n }\n\n /* a markup attribute name */\n .atv {\n color: #080\n }\n\n /* a markup attribute value */\n .dec,\n .var {\n color: #606\n }\n\n /* a declaration; a variable name */\n .fun {\n color: red\n }\n\n /* a function name */\n }\n\n /* Use higher contrast and text-weight for printable form. */\n @media print,\n projection {\n .str {\n color: #060\n }\n\n .kwd {\n color: #006;\n font-weight: bold\n }\n\n .com {\n color: #600;\n font-style: italic\n }\n\n .typ {\n color: #404;\n font-weight: bold\n }\n\n .lit {\n color: #044\n }\n\n .pun,\n .opn,\n .clo {\n color: #440\n }\n\n .tag {\n color: #006;\n font-weight: bold\n }\n\n .atn {\n color: #404\n }\n\n .atv {\n color: #060\n }\n }\n\n /* Put a border around prettyprinted code snippets. */\n pre.prettyprint {\n padding: 2px;\n /* border: 1px solid #888 */\n }\n\n /* Specify class=linenums on a pre to get line numbering */\n ol.linenums {\n margin-top: 0;\n margin-bottom: 0\n }\n\n /* IE indents via margin-left */\n li.L0,\n li.L1,\n li.L2,\n li.L3,\n li.L5,\n li.L6,\n li.L7,\n li.L8 {\n list-style-type: none\n }\n\n /* Alternate shading for lines */\n li.L1,\n li.L3,\n li.L5,\n li.L7,\n li.L9 {\n background: #eee\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }',e.appendChild(i),function(){e.innerHTML=""}}),[]),(0,d.useEffect)((function(){r.current&&(r.current.innerHTML=t)}),[t]),(0,x.jsx)("div",{ref:n})};var S="mdBody___raKXb",C="button___Ch5Pc",k="previewFlowChart___vY1dq",E="@▁@",T=/<pre[^>]*>/g;var L=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,r,i,o,s){var a=t||r||o,l=n||i||s||"?";return p.Z.API_SERVER+"/api/attachments/"+a+l+"&t="+(0,m.Jn)(a,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,r,i,o,s){var a=t||r||o,l=n||i||s||"?";return p.Z.API_SERVER+"/attachments/download/"+a+l+"&t="+(0,m.Jn)(a,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(n,(function(e,t,n,r,i,o,s){var a=t||r||o,l=n||i||s||"?";return p.Z.API_SERVER+"/api/attachments/"+a+l+"&t="+(0,m.Jn)(a,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,r,i){var o=t||r,s=n||i||"";return'"'+p.Z.API_SERVER+"/api/attachments/"+o+s+o+s+"&t="+(0,m.Jn)(o,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,r,i){var o=t||r,s=n||i||"";return"("+p.Z.API_SERVER+"/files/uploads/"+o+s+o+s+"&t="+(0,m.Jn)(o,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,"\n")},A=function(e){var t=e.value,n=void 0===t?"":t,r=e.edit,o=void 0!==r&&r,a=e.className,c=e.showTextOnly,m=e.showLines,L=e.style,A=void 0===L?{}:L,M=e.stylesPrev,D=void 0===M?{}:M,I=e.highlightKeywords,N=e.showProgramFill,R=(e.isProgramFill,e.disabledFill),O=void 0!==R&&R,j=e.programFillValue,P=e.openEditor,B=void 0===P?function(){}:P,U=e.onFillChange,F=void 0===U?function(e){}:U,z=e.onFillBlur,H=void 0===z?function(){}:z,Z=e.onFillFocus,W=void 0===Z?function(){}:Z,G=function(e){var t=new RegExp("\\b(".concat(["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"].join("|"),")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]*)"),"gi");return e.replace(t,"").trim()}(String(n||"")),q=(0,d.useRef)(),V=(0,d.useRef)(),K=(0,d.useState)(""),Y=u()(K,2),X=Y[0],J=Y[1],Q=(0,d.useState)("office"),$=u()(Q,2),ee=$[0],te=$[1],ne=(0,d.useState)([]),re=u()(ne,2),ie=re[0],oe=re[1],se=(0,d.useRef)("a"+(0,_.Z)()),ae={},le=function(e){return/<style[\s\S]*?>/i.test(e||"")};var ce=function(e){return!c&&le(G)?e:e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),r=[];return n.map((function(e){""!=e&&r.push(".".concat(se.current," ").concat(e))})),"<style>".concat(r.join("}"),"</style>")}))},ue=(0,d.useMemo)((function(){try{G=G.replace(/\(\/attachments\/download\//g,"("+p.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+p.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+p.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+p.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,"\n"),q.current.style.display="none"}catch(e){}if(N){var e=-1;return G=G.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,r){var i;return function(e,t,n){var r=document.createElement(e===E?"input":"textarea");r.style.width="100%",r.style.height=e===E?"40px":"151px",r.rows=5,r.spellcheck=!1,r.name="edu-program-fill",r.placeholder="请输入",r.dataset.id=t;var i=Object.keys(ae).length;return ae[i]=r,'<span class="edu-program-fill-wrap '.concat(e===E?"":"show",'" style="width:').concat(e===E?"600px":"100%",'" title=').concat(n||"","><span>").concat(r.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==j||null===(i=j[e])||void 0===i?void 0:i.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat(ce(G||""),"</pre>")}var t=ce(G);t=(0,h.ZP)(t);var n=(0,h.ez)();G.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,h.Qv)()),(0,h.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var r=n[t],i=r.type,o=r.expression;return(0,v.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,h.AL)();var r=document.createElement("div");return r.innerHTML=t,c?r.innerText:I?(pe(r,I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r.innerHTML):(setTimeout((function(){return ge()}),500),r.innerHTML)}),[G,I]);(0,d.useEffect)((function(){me.current&&me.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=de,e.onblur=he,e.onfocus=fe}))}),[ie]),(0,d.useEffect)((function(){if(null!=j&&j.length)try{var e,t=me.current.querySelectorAll(".edu-program-fill-score"),n=me.current.querySelectorAll('[name="edu-program-fill"]'),r=l()(n.entries());try{for(r.s();!(e=r.n()).done;){var i,o,s,a=u()(e.value,2),c=a[0],d=a[1];d.value=(null==j||null===(i=j[c])||void 0===i?void 0:i.value)||"","warning"===(null==j||null===(o=j[c])||void 0===o?void 0:o.type)?d.className="program-fill-warning":"success"===(null==j||null===(s=j[c])||void 0===s?void 0:s.type)?d.className="program-fill-success":d.className=""}}catch(e){r.e(e)}finally{r.f()}var h,f=l()(t.entries());try{for(f.s();!(h=f.n()).done;){var p,m,v=u()(h.value,2),g=v[0];v[1].innerHTML=null!=j&&null!==(p=j[g])&&void 0!==p&&p.score?"".concat(null==j||null===(m=j[g])||void 0===m?void 0:m.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}oe(j)}catch(e){console.log(e,"error")}}),[j]);var de=function(e){ie[e.target.dataset.id]=ie[e.target.dataset.id]||{},ie[e.target.dataset.id].value=e.target.value,oe(s()(ie)),F(ie,e.target.dataset.id)},he=function(e){ie[e.target.dataset.id]=ie[e.target.dataset.id]||{},ie[e.target.dataset.id].value=e.target.value,oe(s()(ie)),H(ie,e.target.dataset.id)},fe=function(e){ie[e.target.dataset.id]=ie[e.target.dataset.id]||{},ie[e.target.dataset.id].value=e.target.value,oe(s()(ie)),W(ie,e.target.dataset.id)};function pe(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)pe(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var r=document.createElement("span");r.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(r)}}))}var me=(0,d.useRef)();function ve(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),J(n),te("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),J(n),te("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),J(n),te("html");else if(n.startsWith("#")){e.preventDefault();var r=document.getElementById(n.replace("#",""));r&&r.scrollIntoView(!0)}}}h.jb.WebkitLineClamp=m,m&&(A=i()(i()({},A),h.jb));var ge=function(){var e,t=null===(e=me.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var t=new f.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};(0,d.useEffect)((function(){if(me.current&&ue&&ue.match(T)&&window.PR.prettyPrint(),me.current)return me.current.addEventListener("click",ve),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("click",ve),(0,h.AL)(),(0,h.Iy)()}}),[ue,me.current,ve]);return(0,d.useEffect)((function(){var e,t=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=me.current)||void 0===e||e.addEventListener("copy",t),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("copy",t)}}),[me.current]),(0,x.jsxs)("div",{style:{position:"relative"},onMouseLeave:function(){q.current.style.display="none"},children:[c&&(0,x.jsx)("div",{ref:me,className:"".concat(S," "),children:ue}),!c&&!le(ue)&&(0,x.jsx)("div",{ref:me,style:i()({},A),onMouseOver:function(e){"IMG"===e.target.nodeName&&e.target.className.indexOf("draw-flowchart")>-1?(q.current.style.zIndex=1,q.current.style.display="flex",q.current.style.width=e.target.clientWidth+"px",q.current.style.height=e.target.clientHeight+"px",q.current.style.top=e.target.offsetTop+"px",q.current.style.left=e.target.offsetLeft+"px",e.target.id&&(V.current=e.target.id)):q.current.style.display="none"},className:"".concat(a||""," ").concat(O?"disabled-fill":""," markdown-body ").concat(S," ").concat(se.current),dangerouslySetInnerHTML:{__html:ue}}),!c&&le(ue)&&(0,x.jsx)(w,{html:ue}),(0,x.jsx)("div",{ref:q,className:"".concat(C," ").concat(o?"":k),children:(0,x.jsx)(g.Z,{children:(0,x.jsx)(y.ZP,{onClick:function(){o?B(V.current):(J(V.current),te("flowChart"))},children:o?"编辑":"预览"})})}),(0,x.jsx)(b.Z,{close:!0,data:X,type:null!=X&&X.length?ee:"",style:i()({},D),onClose:function(){return J("")}})]})}},79072:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(5030),i="ldsRing___mpBZC",o="idsRingWrapper___Of9_n",s=n(37712),a=function(e){var t=e.message,n=e.className,a=e.children,l=e.style,c=void 0===l?{}:l;return(0,s.jsxs)("div",{className:"custom-spinner ".concat(o," ").concat(n),children:[(0,s.jsxs)("div",{className:i,children:[(0,s.jsx)("div",{}),(0,s.jsx)("div",{}),(0,s.jsx)("div",{}),(0,s.jsx)("div",{})]}),t?(0,s.jsx)("p",{style:c,children:t}):null,a,(0,s.jsx)(r.Outlet,{})]})}},16749:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(79800),i=n.n(r),o=n(59301),s=n(13326),a=n(37712),l=function(e){var t=e.defaultX,n=void 0===t?"40%":t,r=e.leftChild,l=e.rightChild,c=e.className,u=e.hideResize,d=void 0!==u&&u,h=(0,o.useState)(n),f=i()(h,2),p=f[0],m=f[1],v=(0,o.useRef)();(0,o.useEffect)((function(){function e(e){v.current&&(s.Z.publish("resize-move-bar",e),m(e.pageX))}function t(){v.current=!1}return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),function(){window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}}),[]);var g="number"==typeof p&&.01!==p?"".concat(p,"px"):n,y="calc(100% - ".concat(d?"0px":"4px"," - ").concat(g,")");return(0,a.jsxs)("div",{className:"split-panel-container ".concat(c),children:[(0,a.jsx)("section",{style:{width:g,display:.01===p?"none":""},children:r}),(0,a.jsx)("section",{className:"resize-x-bar",onMouseDown:function(){v.current=!0},children:(0,a.jsx)("a",{className:"btn-resize",children:(0,a.jsx)("svg",{width:"16",height:"13",viewBox:"0 0 16 13",children:(0,a.jsx)("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"})})})}),(0,a.jsx)("section",{style:{width:y},children:l})]})}},66761:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});n(59301);var r="result___gu5zt",i="title___xrnx2",o="left___IAxp9",s="leftNode___HL8fG",a="right___ZXYmw",l="rightNode___jYL5_",c=n(92310),u=n.n(c),d=n(37712),h=function(e){var t=e.className,n=e.style,c=void 0===n?{}:n,h=e.leftNode,f=e.leftTitle,p=void 0===f?"自测输入":f,m=e.rightNode,v=e.rightTitle,g=void 0===v?"运行结果":v;return(0,d.jsxs)("div",{className:u()(r,t),style:c,children:[(0,d.jsxs)("div",{className:o,children:[(0,d.jsxs)("div",{className:i,children:[(0,d.jsx)("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),(0,d.jsx)("span",{children:p})]}),(0,d.jsx)("div",{className:s,children:h})]}),(0,d.jsxs)("div",{className:a,children:[(0,d.jsxs)("div",{className:i,children:[(0,d.jsx)("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),(0,d.jsx)("span",{children:g})]}),(0,d.jsx)("div",{className:l,children:m})]})]})}},91153:function(e,t,n){"use strict";var r=n(79800),i=n.n(r),o=n(59301),s=n(37712),a=function(e){return 1===String(e).length?"0".concat(e):e};t.Z=function(e){var t=e.className,n=void 0===t?"":t,r=e.onChange,l=e.defaultValue,c=void 0===l?0:l,u=(0,o.useState)(c),d=i()(u,2),h=d[0],f=d[1];(0,o.useEffect)((function(){var e=setTimeout((function(){f(h+1e3)}),1e3);return r(h+1e3),function(){clearInterval(e)}}),[h]);var p=parseInt(h/36e5)||"00",m=parseInt(h%36e5/6e4)||"00",v=parseInt(h%6e4/1e3)||"00";return(0,s.jsxs)("div",{className:n,children:[a(p),":",a(m),":",a(v)]})}},61422:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var r=n(79800),i=n.n(r),o=n(7557),s=n.n(o),a=n(41498),l=n.n(a),c=n(59301),u=n(6767),d=n(75727),h=n(84201),f=n(44523),p=n(56800),m=n(56102),v=n(66860),g={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"},y=n(37712);function _(e){if(isNaN(e))return{minutes:"00",seconds:"00"};var t=new Date(1e3*e).toISOString().substr(11,8);return{hour:t.substr(0,2),minutes:t.substr(3,2),seconds:t.substr(6,2)}}function b(e,t){return e-t}function x(e){e.sort(b);for(var t=0,n=0;n<e.length-1;n++){var r=Math.abs(e[n+1]-e[n]);r<21&&(t+=r)}return t}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return!!(this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2)}});var w=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i,S=(0,c.forwardRef)((function(e,t){var n,r=e.allow_skip,o=e.src,a=e.toLog,b=e.videoId,S=e.logWatchHistory,C=e.courseId,k=void 0===C?null:C,E=e.startTime,T=e.handlePause,L=void 0===T?function(){}:T,A=e.handlePlay,M=void 0===A?function(){}:A,D=e.handlePlayEnded,I=void 0===D?function(){}:D,N=e.autoPlay,R=void 0!==N&&N,O=e.onPlayEnded,j=void 0===O?function(){}:O,P=e.isShowWaterMark,B=void 0===P||P,U="flv"===(null==o||null===(n=o.split("."))||void 0===n?void 0:n.pop()),F=(0,c.useRef)(),z=(0,c.useRef)(),H=(0,c.useRef)(),Z=(0,c.useRef)(),W=(0,c.useRef)(),G=(0,c.useRef)(),q=(0,c.useRef)(),V=(0,c.useRef)(),K=(0,c.useRef)(),Y=(0,c.useRef)(),X=(0,c.useRef)(),J=(0,c.useRef)(),Q=(0,c.useRef)(),$=(0,c.useRef)(),ee=navigator.userAgent.toLowerCase().match(w),te=ee?ee[0]:"pc",ne=(0,c.useRef)(!1),re=(0,p.eY)(),ie=0,oe=0,se=0,ae=null,le=!1,ce=20,ue=1,de=!1,he=!1,fe=[];(0,c.useImperativeHandle)(t,(function(){return{getLastUpdatedTime:function(){return F.current.currentTime},getDuration:function(){return F.current.duration}}})),u.ZP.config({maxCount:1,getContainer:function(){return H.current}});var pe=(0,c.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={point:F.current.currentTime};function r(){return i.apply(this,arguments)}function i(){return(i=l()(s()().mark((function t(){var r;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return de=!0,t.next=3,null==S?void 0:S(n);case 3:r=t.sent,ae=r,de=!1,e&&e();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}ae?(n.log_id=ae,n.watch_duration=x(fe),n.total_duration=oe):(k?(n.video_id=parseInt(b,10),n.course_id=k):n.video_id=b,n.duration=ie,n.device=te),t&&(n.ed="1"),r()}),[b,k]);function me(){F.current.paused?(Z.current.style.display="none",W.current.style.display="block"):(Z.current.style.display="block",W.current.style.display="none")}function ve(){X.current.style.display="none",Q.current.style.display="none",J.current.style.display="none",F.current.muted||0===F.current.volume?X.current.style.display="block":F.current.volume>0&&F.current.volume<=.5?Q.current.style.display="block":J.current.style.display="block"}(0,c.useEffect)((function(){F.current&&(Z.current.style.display="none",W.current.style.display="block"),u.ZP.destroy();var e=null;return h.Z.isSupported&&U&&o&&(null==o?void 0:o.indexOf(".m3u8"))<0?(e=h.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:o,muted:!1}),F.current&&(e.attachMediaElement(F.current),e.load())):F.current.setAttribute("src",o),ve(),function(){e&&(e.unload(),e.pause(),e.destroy(),e=null)}}),[F,U,o]),(0,c.useEffect)((function(){document.getElementById("play"),document.querySelectorAll(".playback-icons use");function e(){M(),E&&!ne.current&&(F.current.currentTime=E),ne.current=!0,fe.push(F.current.currentTime),le||(le=!0,a&&pe())}function t(){return n.apply(this,arguments)}function n(){return(n=l()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:me(),fe.push(F.current.currentTime),a&&pe((function(){ae=null,se=0,le=!1,de=!1,he=!1,fe=[],oe=0,ue=1}),!0),j();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function i(){G.current.value=Math.round(F.current.currentTime),q.current.value=Math.round(F.current.currentTime)}function o(){var e,t,n,r,i,o=Math.round(null===(e=F.current)||void 0===e?void 0:e.duration);null===(t=G.current)||void 0===t||null===(n=t.setAttribute)||void 0===n||n.call(t,"max",o),null===(r=q.current)||void 0===r||null===(i=r.setAttribute)||void 0===i||i.call(r,"max",o);var s,a,l=_(o);V.current&&(V.current.innerText="".concat(l.hour>0?l.hour+":":"").concat(l.minutes,":").concat(l.seconds),null===(s=(a=V.current).setAttribute)||void 0===s||s.call(a,"datetime","".concat(l.hour>0?" "+l.hour+" ":"").concat(l.minutes,"m ").concat(l.seconds,"s")))}function c(){try{var e=Math.round(F.current.duration);G.current.setAttribute("max",e),q.current.setAttribute("max",e);var t=_(e);V.current.innerText="".concat(t.hour>0?t.hour+":":"").concat(t.minutes,":").concat(t.seconds),V.current.setAttribute("datetime","".concat(t.hour>0?" "+t.hour+" ":"").concat(t.minutes,"m ").concat(t.seconds,"s")),i(),function(){var e=_(Math.round(F.current.currentTime));K.current.innerText="".concat(e.hour>0?e.hour+":":"").concat(e.minutes,":").concat(e.seconds),K.current.setAttribute("datetime","".concat(e.hour>0?" "+e.hour+" ":"").concat(e.minutes,"m ").concat(e.seconds,"s"))}();var n=z.current.getBoundingClientRect();n.width,n.height,n.x,n.y;if(!he){var r=F.current.currentTime,o=r-se;Math.abs(o)<10?(oe+=Math.abs(o),se=r,de||oe-ue*ce>=0&&(ue++,fe.push(se),a&&pe())):(se=r,a&&pe())}}catch(e){console.log("videoplaying:",e)}}function d(){he=!0}function h(){F.current.playing&&fe.push(F.current.currentTime,se),se=F.current.currentTime,he=!1}function f(){(ie=F.current.duration)<=20&&(ce=ie/3),F.current.addEventListener("play",e)}function p(){L()}function m(e){if(r){var t=e.target.dataset.seek?e.target.dataset.seek:e.target.value;F.current.currentTime=t,q.current.value=t,G.current.value=t}else u.ZP.warning("该视频禁止快进/后退播放")}function g(e){var t=Math.round(e.offsetX/e.target.clientWidth*parseInt(e.target.getAttribute("max"),10));G.current.setAttribute("data-seek",t);var n=_(t);Y.current.textContent="".concat(n.hour>0?n.hour+":":"").concat(n.minutes,":").concat(n.seconds);var r=F.current.getBoundingClientRect();Y.current.style.left="".concat(e.pageX-r.left,"px")}function y(e){switch(e.code){case"Space":e.preventDefault(),be();break;case"ArrowRight":if(e.preventDefault(),!r){u.ZP.warning("该视频禁止快进/后退播放");break}if(F.current.currentTime>=F.current.duration)break;F.current.currentTime=parseInt(F.current.currentTime)+5,i();break;case"ArrowLeft":if(e.preventDefault(),!r){u.ZP.warning("该视频禁止快进/后退播放");break}if(0===F.current.currentTime)break;F.current.currentTime=parseInt(F.current.currentTime)-5,i();break;case"ArrowUp":e.preventDefault(),F.current.volume<1&&(F.current.volume=(parseInt(10*F.current.volume)+1)/10);break;case"ArrowDown":e.preventDefault(),F.current.volume>0&&(F.current.volume=(parseInt(10*F.current.volume)-1)/10)}}return H.current.addEventListener((0,v.gH)(),(function(e){e.preventDefault(),(0,v.vp)()?(F.current.style.width="100%",F.current.style.height="100%"):F.current.style.cssText=""})),F.current.addEventListener("canplay",f),F.current.addEventListener("ended",t),F.current.addEventListener("seeking",d),F.current.addEventListener("seeked",h),F.current.addEventListener("loadedmetadata",o),G.current.addEventListener("mousemove",g),G.current.addEventListener("input",m),F.current.addEventListener("timeupdate",c),F.current.addEventListener("pause",p),F.current.addEventListener("volumechange",ve),document.addEventListener("keydown",y),function(){var n,r,i,s,l,u,v,_,b,x,w,S;null===(n=F.current)||void 0===n||n.removeEventListener("canplay",f),null===(r=F.current)||void 0===r||r.removeEventListener("play",e),null===(i=F.current)||void 0===i||i.removeEventListener("ended",t),null===(s=F.current)||void 0===s||s.removeEventListener("seeking",d),null===(l=F.current)||void 0===l||l.removeEventListener("seeked",h),null===(u=G.current)||void 0===u||u.removeEventListener("mousemove",g),null===(v=G.current)||void 0===v||v.removeEventListener("input",m),null===(_=F.current)||void 0===_||_.removeEventListener("timeupdate",c),null===(b=F.current)||void 0===b||b.removeEventListener("pause",p),null===(x=F.current)||void 0===x||x.removeEventListener("loadedmetadata",o),null===(w=F.current)||void 0===w||w.removeEventListener("volumechange",ve),document.removeEventListener("keydown",y),null!==(S=F.current)&&void 0!==S&&S.playing&&(fe.push(se,F.current.currentTime),a&&pe())}}),[F,o]),(0,c.useEffect)((function(){if(F.current.onended=function(){I(F)},F.current.oncontextmenu=function(){return!1},(null==o?void 0:o.indexOf(".m3u8"))>-1)if(F.current.canPlayType("application/vnd.apple.mpegurl"))F.current.src=o;else if(f.ZP.isSupported()){var e=new f.ZP;e.loadSource(o),e.attachMedia(F.current)}}),[o]);var ge=(0,c.useState)(1),ye=i()(ge,2),_e=(ye[0],ye[1]),be=function(){F.current.paused||F.current.ended?F.current.play():F.current.pause(),me()};return(0,y.jsxs)("div",{style:{position:"relative"},ref:H,children:[(0,y.jsx)("div",{ref:z,className:"".concat(g.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(g.animate__loop),children:B&&re?re.login:" "}),(0,y.jsx)("div",{className:g.container,children:(0,y.jsxs)("div",{className:g["video-container"],id:"video-container",children:[(0,y.jsx)("div",{className:g["playback-animation"],id:"playback-animation",children:(0,y.jsxs)("svg",{className:g["playback-icons"],children:[(0,y.jsx)("use",{className:"hidden",href:"#play-icon"}),(0,y.jsx)("use",{href:"#pause"})]})}),(0,y.jsx)("video",{className:g.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:F,autoPlay:R}),(0,y.jsxs)("div",{className:"".concat(g["video-controls"]," "),id:"video-controls",children:[(0,y.jsxs)("div",{className:g["bottom-controls"],children:[(0,y.jsxs)("div",{className:g["left-controls"],children:[(0,y.jsx)("button",{"data-title":"播放/暂停",id:"play",onClick:be,children:(0,y.jsxs)("svg",{className:g["playback-icons"],children:[(0,y.jsx)("use",{ref:W,href:"#play-icon"}),(0,y.jsx)("use",{ref:Z,style:{display:"none"},href:"#pause"})]})}),(0,y.jsxs)("div",{className:g.time,children:[(0,y.jsx)("time",{id:"time-elapsed",ref:K,children:"00:00"}),(0,y.jsx)("span",{children:" / "}),(0,y.jsx)("time",{id:"duration",ref:V,children:"00:00"})]})]}),(0,y.jsxs)("div",{className:g["right-controls"],children:[r&&(0,y.jsx)(d.Z,{placement:"top",overlayClassName:g.rateOverlay,getPopupContainer:function(e){return e.parentNode},menu:{items:[{key:"1",label:(0,y.jsx)("span",{onClick:function(){_e(1),F.current.playbackRate=1},children:"1.0x"})},{key:"2",label:(0,y.jsx)("span",{onClick:function(){_e(1.5),F.current.playbackRate=1.5},children:"1.5x"})},{key:"3",label:(0,y.jsx)("span",{onClick:function(){_e(2),F.current.playbackRate=2},children:"2.0x"})}]},children:(0,y.jsx)("div",{className:"".concat(g.controlText," mr5"),children:"倍速"})}),(0,y.jsx)(m.CopyToClipboard,{text:o,onCopy:function(){return u.ZP.success("复制成功")},children:(0,y.jsx)("button",{"data-title":"复制链接",children:(0,y.jsx)("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}})})}),(0,y.jsxs)("div",{className:g["volume-controls"],children:[(0,y.jsxs)("button",{"data-title":"开启/关闭声音",className:g["volume-button"],id:"volume-button",onClick:function(){F.current.muted=!F.current.muted,F.current.muted?($.current.setAttribute("data-volume",volume.value),$.current.value=0):$.current.value=$.current.dataset.volume},children:[(0,y.jsx)("i",{ref:X,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),(0,y.jsx)("i",{ref:Q,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),(0,y.jsx)("i",{ref:J,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})]}),(0,y.jsx)("input",{className:g.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:$,style:{display:"none"},onClick:ve})]}),(0,y.jsx)("button",{"data-title":"全屏/退出全屏",className:g["fullscreen-button"],onClick:function(){(0,v.vp)()?(0,v.BU)():(0,v.Dj)(H.current)},children:(0,y.jsx)("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})})]})]}),(0,y.jsxs)("div",{className:g["video-progress"],children:[(0,y.jsx)("progress",{ref:q,value:"0",min:"0"}),(0,y.jsx)("input",{className:g.seek,ref:G,value:"0",min:"0",type:"range",step:"1"}),(0,y.jsx)("div",{className:g["seek-tooltip"],ref:Y,id:"seek-tooltip",children:"00:00"})]})]})]})}),(0,y.jsx)("svg",{style:{display:"none"},children:(0,y.jsxs)("defs",{children:[(0,y.jsx)("symbol",{id:"pause",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})}),(0,y.jsx)("symbol",{id:"play-icon",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})}),(0,y.jsx)("symbol",{id:"volume-high",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})}),(0,y.jsx)("symbol",{id:"volume-low",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})}),(0,y.jsx)("symbol",{id:"volume-mute",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})}),(0,y.jsx)("symbol",{id:"fullscreen",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})}),(0,y.jsx)("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})}),(0,y.jsx)("symbol",{id:"pip",viewBox:"0 0 24 24",children:(0,y.jsx)("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"})})]})})]})}))},23723:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(79800),i=n.n(r),o=n(59301),s=n(13326),a=n(90083),l=n(37712),c=function(){var e=(0,o.useState)(""),t=i()(e,2),n=t[0],r=t[1],c=(0,o.useState)(0),u=i()(c,2),d=(u[0],u[1]),h=(0,o.useState)(),f=i()(h,2),p=(f[0],f[1]),m=(0,o.useState)(),v=i()(m,2),g=(v[0],v[1]),y=(0,o.useState)(!1),_=i()(y,2),b=(_[0],_[1],(0,o.useRef)(""));function x(e){console.log("e====",e),27==e.keyCode&&b.current&&w()}function w(){document.body.style.overflow="auto",p(void 0),g(void 0),d(0),r("")}(0,o.useEffect)((function(){return s.Z.subscribe("preview-image",(function(e){r(e),console.log(C.current)}))}),[]),(0,o.useEffect)((function(){return document.addEventListener("keydown",x),function(){document.removeEventListener("keydown",x)}}),[]),(0,o.useEffect)((function(){b.current=n}),[n]);(0,o.useRef)();var S=(0,o.useRef)(),C=(0,o.useRef)();return(0,l.jsx)(o.Fragment,{children:n?(0,l.jsx)("div",{children:(0,l.jsx)("div",{className:"preview-wrp-group",ref:S,children:(0,l.jsx)(a.Z,{className:"image-preview",src:n,style:{display:"none"},preview:{visible:!0,src:n,onVisibleChange:function(e){r("")}},alt:"预览大图"})})}):null})}},2747:function(e,t,n){"use strict";n.d(t,{h:function(){return g}});var r=n(82242),i=n.n(r),o=n(79800),s=n.n(o),a=n(59301),l=n(82326),c=n(28284),u=n(99571),d=n(89780),h=n.n(d),f=(n(78318),n(44084),n(37712)),p=l.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},v={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"]};function g(e){var t=e.value,n=e.onChange,r=e.mode,o=e.options,l=void 0===o?{}:o,c=(0,a.useRef)(),u=(0,a.useState)(),d=s()(u,2),p=d[0],m=d[1];return(0,a.useEffect)((function(){if(p){var e=function(e){var t=e.getValue();n&&n(t)};return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),(0,a.useEffect)((function(){p&&p.setOption("mode",r)}),[p,r]),(0,a.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||"")}),300))}),[p,t]),(0,a.useEffect)((function(){if(c.current&&!p){var e=h().fromTextArea(c.current,i()({mode:r,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(e)}}),[c.current,p]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:c})})}t.Z=function(e){var t=e.callback,n=e.onCancel,r=(0,a.useState)("python"),o=s()(r,2),d=o[0],h=o[1];return(0,f.jsxs)(c.Z,i()(i()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,f.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){h(v[e][1])},children:Object.keys(v).map((function(e){return(0,f.jsx)(p,{value:e,children:v[e][0]},e)}))})}),(0,f.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(g,{mode:d})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},15409:function(e,t,n){"use strict";n.d(t,{Z:function(){return he}});var r=n(91232),i=n.n(r),o=n(79800),s=n.n(o),a=n(85573),l=n.n(a),c=n(59301),u=n(5030),d=n(89780),h=n.n(d),f=n(76374),p=(n(78318),n(6313),n(25717),n(99498),n(25419),n(67549),n(76603)),m=n(37712),v=function(e){var t=e.value,n=void 0===t?"":t,r=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[n]));return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})})},g=n(82242),y=n.n(g),_=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学公式",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function b(e){var t=e.onActionCallback,n=e.title,r=e.icon,i=e.actionName,o=e.className,s=void 0===o?"":o,a=e.children;return(0,m.jsxs)("a",{title:n,className:s,onClick:function(){t(i)},children:[(0,m.jsx)("i",{className:"".concat(r)}),a]})}var x=function(e){var t=e.watch,n=e.showNullButton,r=e.showNullProgramButton,i=e.onActionCallback,o=e.fullScreen,s=e.insertTemp,a=e.hidetoolBar,l=e.extraUse,c=[].concat(_,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!a&&c.map((function(e,t){return(0,m.jsx)("li",{children:e.actionName?(0,m.jsx)(b,y()(y()({},e),{},{onActionCallback:i})):(0,m.jsx)("span",{className:"v-line"})},t)})),n?(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"增加填空",actionName:"add-null-ch",onActionCallback:i,children:(0,m.jsx)("span",{className:"fill-tip",children:"点击新增填空项"})})}):null,r?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:i,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:i,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,s&&(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:i,children:(0,m.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,m.jsx)("li",{children:l}),(0,m.jsx)("li",{className:"btn-full-screen",children:(0,m.jsx)(b,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})})]})},w=n(56946),S=n(28284),C=n(37568),k=n(99571),E={labelCol:{span:4},wrapperCol:{span:20}},T=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(S.Z,y()(y()({},E),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,m.jsx)(S.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(C.Z,{})}),(0,m.jsx)(S.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(C.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(k.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},L=n(2747),A=n(26805),M=n(62957),D=n(77019),I=n(17086),N=function(e){var t=e.callback,n=e.onCancel,r=document.createElement("canvas"),i=r.getContext("2d");r.width=1e3,r.height=800,i.fillStyle="#ffffff",i.fillRect(0,0,r.width,r.height);var o=r.toDataURL("image/png");return(0,m.jsx)(M.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,m.jsx)(D.Z,{style:{height:"100vh"},children:(0,m.jsx)(I.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},R=n(30641),O=n(5269),j=n(6767),P="drawerWrap___MfDw8",B=(0,c.forwardRef)((function(e,t){e.onCancel;var n=e.editImgId,r=e.callback,i=((0,c.useRef)(),(0,c.useRef)()),o=((0,c.useRef)(),(0,c.useRef)(!1),(0,c.useRef)(!1));console.log("ref:",t);var a=(0,c.useState)(0),l=s()(a,2),u=l[0],d=l[1],h=(0,c.useState)("100vh"),f=s()(h,2),p=f[0],v=f[1];return(0,c.useEffect)((function(){d(1)}),[]),(0,c.useImperativeHandle)(t,(function(){return{setHeight:v}})),(0,m.jsx)("div",{ref:o,className:"body-overflow-initial",children:(0,m.jsx)(R.Z,{width:"100vw",height:p,footer:null,closable:!0,placement:"bottom",open:!!u,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:"zIndex-9999 ".concat(P),onClose:function(){window.saveDrawData((function(e){r({src:"/api/attachments/".concat(e),id:e})}))},title:(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(O.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(O.Z,{onClick:function(){v("60px"===p?"100vh":"60px")},children:(0,m.jsx)("span",{className:"current c-blue",style:{fontWeight:400},children:"展开/收起"})}),(0,m.jsx)(O.Z,{onClick:function(){window.saveDrawData((function(e){null!==e?(j.ZP.success({content:"保存成功",key:"saveFlowChart",style:{zIndex:999999999}}),r({src:"/api/attachments/".concat(e),id:e,disabledClose:!0})):j.ZP.warning({content:"内容为空,请先绘制流程图",key:"saveFlowChart"})}))},children:(0,m.jsx)(k.ZP,{type:"primary",className:"ml20",children:"保存"})})]}),children:(0,m.jsx)("iframe",{src:"/drawio/src/main/webapp/?id=".concat(n||"","&gapi=0&od=0&db=0&gh=0&gl=0&local=0"),width:"100%",height:"100%",frameBorder:"0",ref:i})})})})),U=n(6816),F=n(47889),z=n(71051),H=F.ZP.Group,Z={margin:"0 8px"},W=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(S.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:Z,children:"单元格数:"}),(0,m.jsx)("span",{style:Z,children:"行数"}),(0,m.jsx)(S.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(z.Z,{})}),(0,m.jsx)("span",{style:Z,children:"列数"}),(0,m.jsx)(S.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(z.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:Z,children:"对齐方式:"}),(0,m.jsx)(S.Z.Item,{name:"align",children:(0,m.jsxs)(H,{children:[(0,m.jsx)(F.ZP,{value:"default",children:(0,m.jsx)("i",{className:"fa fa-align-justify"})}),(0,m.jsx)(F.ZP,{value:"left",children:(0,m.jsx)("i",{className:"fa fa-align-left"})}),(0,m.jsx)(F.ZP,{value:"center",children:(0,m.jsx)("i",{className:"fa fa-align-center"})}),(0,m.jsx)(F.ZP,{value:"right",children:(0,m.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(k.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},G=n(71411),q=n(24433),V=n.n(q),K=(0,c.forwardRef)((function(e,t){var n=e.use3d,r=e.width,i=e.height,o=e.callback,a=(e.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),u=(0,c.useState)(!1),d=s()(u,2),h=d[0],f=d[1],p=(0,c.useRef)({id:a,appName:"graphing",width:r||1e3,height:i||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){l.current=new(V())(p.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,c.useEffect)((function(){p.current.appName=h?"3D":"graphing",l.current.inject("applet_container")}),[h]),(0,c.useEffect)((function(){f(n)}),[n]),(0,c.useImperativeHandle)(t,(function(){return{getImgData:v}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:a}),(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(O.Z,{flex:1,children:(0,m.jsx)(G.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:h,onChange:function(e){return f(e)}})}),(0,m.jsx)(O.Z,{children:(0,m.jsx)(k.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),Y=n(74135),X="link",J="upload-image",Q="add-flowchart",$="draw-image",ee="code-block",te="add-table",ne="------------",re={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},ie=n(21323),oe=n(32985);var se="@▁▁@",ae=["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 le(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ue=l()(l()({},ce+"-B","bold"),ce+"-I","italic"),de=l()(l()(l()(l()(l()(l()(l()(l()({},X,"添加链接"),ee,"添加代码块"),J,"添加图片"),$,"添加画图"),Q,"插入流程图"),te,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),he=function(e){var t=e.defaultValue,n=void 0===t?"":t,r=e.onChange,o=e.width,a=void 0===o?"100%":o,d=e.height,g=void 0===d?400:d,y=e.miniToolbar,_=void 0!==y&&y,b=e.isFocus,S=void 0!==b&&b,C=e.watch,k=e.insertTemp,E=e.mode,D=void 0===E?"markdown":E,I=e.id,R=void 0===I?"markdown-editor-id":I,O=e.showResizeBar,P=void 0!==O&&O,F=e.noStorage,z=void 0!==F&&F,H=e.showNullButton,Z=void 0!==H&&H,G=e.showNullProgramButton,q=void 0!==G&&G,V=e.hidetoolBar,ne=void 0!==V&&V,ce=e.fullScreen,he=void 0!==ce&&ce,fe=e.onBlur,pe=e.onCMBeforeChange,me=e.onFullScreen,ve=e.className,ge=void 0===ve?"":ve,ye=e.disablePaste,_e=void 0!==ye&&ye,be=e.disabled,xe=void 0!==be&&be,we=e.disabledFill,Se=void 0!==we&&we,Ce=e.placeholder,ke=void 0===Ce?"":Ce,Ee=e.values,Te=void 0===Ee?"":Ee,Le=e.extraUse,Ae=e.onAddBlank,Me=(0,c.useState)(null),De=s()(Me,2),Ie=De[0],Ne=De[1],Re=(0,c.useState)(n),Oe=s()(Re,2),je=Oe[0],Pe=Oe[1],Be=(0,c.useState)(C),Ue=s()(Be,2),Fe=Ue[0],ze=Ue[1],He=(0,c.useState)(he),Ze=s()(He,2),We=Ze[0],Ge=Ze[1],qe=(0,c.useState)(""),Ve=s()(qe,2),Ke=Ve[0],Ye=Ve[1],Xe=(0,c.useState)(0),Je=s()(Xe,2),Qe=Je[0],$e=Je[1],et=(0,c.useState)(g),tt=s()(et,2),nt=tt[0],rt=tt[1],it=(0,c.useState)(!1),ot=s()(it,2),st=(ot[0],ot[1]),at=(0,c.useState)(0),lt=s()(at,2),ct=lt[0],ut=lt[1],dt=(0,c.useState)(0),ht=s()(dt,2),ft=ht[0],pt=ht[1],mt=(0,c.useRef)(),vt=(0,c.useRef)(),gt=(0,c.useRef)(),yt=(0,c.useRef)(),_t=(0,c.useRef)(),bt=(0,c.useRef)(),xt=(0,u.useDispatch)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Pe(Te),null==Ie||Ie.setValue(Te),window.scrollTo(0,e)}),[Te]),(0,c.useEffect)((function(){null==me||me(We)}),[We]),(0,c.useEffect)((function(){if(mt.current){var e=function(e,n){if(!_e){var r=n.clipboardData;if(r){var i=r.types.toString(),o=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var s,a=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(a=o[0]);var l=a.getAsFile(),c=l.name.split(".").pop();(0,A.I)(l,(function(e){var n,r,i;e.id?(null==l||null===(n=l.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection('<img width="100%" src="/api/attachments/'.concat(e.id,"?type=").concat(e.content_type,')" alt="','" />')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):ae.includes(c)?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):t.replaceSelection("[".concat(l.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){j.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=h().fromTextArea(mt.current,{mode:D,lineNumbers:!_,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",ke):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),r=n.getCursor(),i=n.getLine(r.line),o=i.charAt(r.ch-1),s=i.lastIndexOf("@▁@",r.ch),a=i.lastIndexOf("@▁▁@",r.ch),l=s>a?s:a,c=s>a?3:4;if(-1===se.indexOf(o))return null;if(console.log("change1:",t,e,i,r,l,s,a,o),l>=0&&r.ch-l<5){var u=l+c;return n.replaceRange("",{line:r.line,ch:l},{line:r.line,ch:u}),{line:r.line,ch:u}}return null}(e);n&&t.preventDefault()}})),S&&t.focus(),t.on("paste",e),xe&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Ne(t),function(){t.off("paste",e)}}}),[]);var wt=(0,c.useCallback)((function(){vt.current}),[nt,vt,We]);(0,c.useEffect)((function(){if(Ie){var e=function(){var e=new f.Z((function(e){var t,n=i()(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(wt(),Ie.setSize("100%","100%"),Ie.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(mt.current.parentElement),e}();return function(){var t,n;null!==(t=mt.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=mt.current)||void 0===n?void 0:n.parentElement)}}}),[Ie,wt]),(0,c.useEffect)((function(){if(Ie){for(var e=[],t=function(){var t=s()(r[n],2),i=t[0],o=t[1],a=l()({},i,(function(){St(o)}));e.push(a),Ie.addKeyMap(a)},n=0,r=Object.entries(ue);n<r.length;n++)t();return function(){for(var t=0,n=e;t<n.length;t++){var r=n[t];Ie.removeKeyMap(r)}}}}),[Ie]),(0,c.useEffect)((function(){he!==We&&Ge(he)}),[he]),(0,ie.Z)((function(){if(!z&&Qe>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(R);e>=Qe+1e4&&(!t||t!==je)&&(window.sessionStorage.setItem(R,je),st(!0))}}),1e4),(0,c.useEffect)((function(){ze(C)}),[Ie,C]),(0,c.useEffect)((function(){Ie&&S&&Ie.focus()}),[Ie,S]),(0,c.useEffect)((function(){if(Fe&&Ie){var e=function(e){var t=e.target;if(yt.current){var n=t.scrollTop/t.scrollHeight;yt.current.scrollTop=yt.current.scrollHeight*n}},t=Ie.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[Ie,Fe]),(0,c.useEffect)((function(){if(Ie&&pe){var e=function(e,t){pe(e,t)};return Ie.on("beforeChange",e),function(){Ie.off("beforeChange",e)}}}),[Ie,pe]),(0,c.useEffect)((function(){if(Ie&&fe){var e=function(){fe(Ie.getValue())};return Ie.on("blur",e),function(){Ie.off("blur",e)}}}),[Ie,fe]),(0,c.useEffect)((function(){if(Ie){var e=function(e,t){var n=e.getValue();Pe(n),$e((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),r&&(q?r(n,Lt(n)):r(n))};return Ie.on("change",e),function(){Ie.off("change",e)}}}),[Ie,r]),(0,c.useEffect)((function(){if(Ie)if(null==n)Ie.setValue(""),Pe("");else{var e=window.scrollY||window.pageYOffset;n!==Ie.getValue()&&(Ie.setValue(n),Pe(n),Ie.setCursor(xe?1:Ie.lineCount(),0),window.scrollTo(0,e))}}),[Ie,n]);var St=(0,c.useCallback)((function(e){var t=Ie.getCursor(),n=Ie.getSelection(),r=n.split("\n");switch(e){case"bold":return Ie.replaceSelection("**"+n+"**"),""===n&&Ie.setCursor(t.line,t.ch+2),Ie.focus();case"italic":return Ie.replaceSelection("*"+n+"*"),""===n&&Ie.setCursor(t.line,t.ch+1),Ie.focus();case"code":return Ie.replaceSelection("`"+n+"`"),""===n&&Ie.setCursor(t.line,t.ch+1),Ie.focus();case"inline-latex":if((0,oe.Ye)(xt))return;return Ye("inline-latex"),Ie.focus();case"latex":return Ie.replaceSelection("```latex\n"+n+"\n```"),Ie.setCursor(t.line+1,n.length+1),Ie.focus();case"line-break":return Ie.replaceSelection("<br/>\n"),Ie.focus();case"list-ul":return""===n?Ie.replaceSelection("- "+n):Ie.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ie.focus();case"list-ol":return""===n?Ie.replaceSelection("1. "+n):Ie.replaceSelection(r.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),Ie.focus();case"add-null-ch":return void(null==Ae||Ae());case"add-signal":return""===n&&Ie.setCursor(t.line,t.ch),Ie.replaceSelection("@▁@"),Ie.focus();case"add-multiple":return""===n&&Ie.setCursor(t.line,t.ch),Ie.replaceSelection(se),Ie.focus();case"inster-template-1":return""===n&&Ie.setCursor(t.line,t.ch),Ie.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Ie.focus();case"eraser":return Ie.setValue(""),Ie.focus();case"trigger-watch":return ze(!Fe),Ie.focus();case"trigger-full-screen":return Ge(!We),Ie.focus();case X:return void Ye(X);case ee:return void Ye(ee);case J:return void Ye(J);case $:return void Ye($);case"maths-latex":if((0,oe.Ye)(xt))return;return void Ye("maths-latex");case Q:return _t.current="",sessionStorage.removeItem("file_id"),void Ye(Q);case te:return void Ye(te);default:throw new Error}}),[Ie,Fe,We]),Ct=(0,c.useCallback)((function(e,t){var n,r,i,o,s;null!=e&&e.disabledClose||Ye("");var a=e||{},l=a.src,c=a.alt,u=a.id;switch(Ke){case X:var d=e.title,h=e.link;return Ie.replaceSelection("[".concat(d,"](").concat(h,")")),Ie.focus();case ee:var f=e.language,p=e.content;return Ie.replaceSelection(["```"+f,p,"```"].join("\n")),Ie.focus();case"maths-latex":for(var m=atob(e),v=new Uint8Array(m.length),g=0;g<m.length;g++)v[g]=m.charCodeAt(g);var y=new Blob([v],{type:"image/png"});(0,A.I)(y,(function(e){e.id?Ie.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":if((0,oe.Ye)(xt))return;Ie.replaceSelection("`$$"+e+"$$`");break;case"add-flowchart":if(!u)return;-1===Ie.getValue().indexOf(l)?Ie.replaceSelection('<center><img id="'.concat(u,'" width="80%" src="').concat(l,'" class="draw-flowchart" alt="').concat(c||"",'" /></center>')):document.getElementById(u).src=U.Z.API_SERVER+l+"?t="+Date.now();break;case J:case $:var _=t,b=null==_||null===(n=_.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(r=n.pop)||void 0===r?void 0:r.call(n);return(null==_||null===(i=_.type)||void 0===i?void 0:i.indexOf("image"))>-1||null==_||!_.type?null!=_&&_.align||null!=_&&_.width?Ie.replaceSelection('<p style="text-align:'.concat(_.align||"initial",'"><img width="').concat(_.width?_.width+"%":"initial",'" src="').concat(l,'" alt="').concat(c||"",'" /></p>')):Ie.replaceSelection('<img width="100%" src="'.concat(l,'" alt="').concat(c||"",'" />')):(null==_||null===(o=_.type)||void 0===o?void 0:o.indexOf("video"))>-1?Ie.replaceSelection('<video width="100%" controls src="'.concat(l,'"></video>')):(null==_||null===(s=_.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?Ie.replaceSelection('<a href="'.concat(l,"?type=").concat(_.type,'&disposition=inline" target="_blank">').concat(_.name,"</a>")):ae.includes(b)?Ie.replaceSelection('<a href="'.concat(l,'?type=office&disposition=inline" target="_blank">').concat(_.name,"</a>")):Ie.replaceSelection("[".concat(_.name,"](").concat(l,")")),Ie.focus();case te:for(var x=e.row,w=e.col,S=e.align,C="\n",k=0;k<x;k++){for(var E=[],T=[],L=0;L<w;L++)1===k&&T.push(re[S]),E.push(" ");1===k&&(C+="| ".concat(T.join(" | ")," |\n")),C+="| ".concat(E.join(1===w?"":" | ")," |\n")}return Ie.replaceSelection(C+"\n"),Ie.focus();default:throw new Error}}),[Ie,Ke]),kt=(0,c.useMemo)((function(){switch(Ke){case X:return(0,m.jsx)(T,{callback:Ct,onCancel:Et});case ee:return(0,m.jsx)(L.Z,{callback:Ct,onCancel:Et});case J:return(0,m.jsx)(A.Z,{callback:Ct,onCancel:Et});case Q:return(0,m.jsx)(B,{editImgId:_t.current,callback:Ct,onCancel:Et});case te:return(0,m.jsx)(W,{callback:Ct,onCancel:Et});case"maths-latex":return(0,m.jsx)(K,{showSaveButton:!0,callback:Ct});case"inline-latex":return(0,m.jsx)(Y.Z,{showSaveButton:!0,callback:Ct});default:return null}}),[Ke]);function Et(){Ye("")}(0,c.useEffect)((function(){if(gt.current){var e=function(e){i=!0,o=e.pageY},t=function(){i=!1},n=function(e){if(i){var t=e.pageY-o;t<0&&(t=0),t>300&&(t=300),rt(g+t+"px")}},r=gt.current,i=!1,o=0;return r.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){r.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[Ie,gt]),(0,c.useEffect)((function(){rt(g)}),[g]);var Tt={width:le(a),height:le(nt)},Lt=((0,c.useMemo)((function(){if(Qe){var e=new Date(Qe),t=e.getHours(),n=e.getMinutes(),r=e.getSeconds();return n=n<10?"0"+n:n,r=r<10?"0"+r:r,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(r)}return 0}),[Qe]),function(e){var t=[];if(q){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,r){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,c.useEffect)((function(){de[Ke]&&Ke!==$&&Ke!==Q&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;ut(t),pt(n)}),0)}),[Ke]);var At=function(e,t,n,r){var i=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&n<e||t<20&&r>t||t>i-20&&r<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsx)("div",{className:"markdown-editor-wrapper",ref:vt,children:(0,m.jsxs)("div",{className:"markdown-editor-container ".concat(ge," ").concat(Fe?"on-preview":""," ").concat(_?"mini":""," ").concat(We?"full-screen":""),style:Tt,children:[(0,m.jsx)(x,{insertTemp:k,watch:Fe,fullScreen:We,showNullButton:Z,showNullProgramButton:q,onActionCallback:St,hidetoolBar:ne,extraUse:Le}),(0,m.jsxs)("div",{className:"markdown-editor-body",children:[(0,m.jsx)("div",{className:"codemirror-container",children:(0,m.jsx)("textarea",{ref:mt,placeholder:ke})}),Fe?(0,m.jsxs)("div",{ref:yt,className:"preview-container",children:["stex"===D&&(0,m.jsx)(v,{value:je}),"stex"!==D&&(0,m.jsx)(p.Z,{edit:!0,disabledFill:Se,showProgramFill:q,value:je,openEditor:function(e){var t;_t.current=e,null===(t=bt.current)||void 0===t||t.setHeight("100vh"),setTimeout((function(){Ye("add-flowchart")}),150)}})]}):null]})]})}),P?(0,m.jsx)("a",{ref:gt,className:"editor-resize"}):null,Ke===$&&(0,m.jsx)(N,{callback:Ct,onCancel:Et}),Ke===Q&&(0,m.jsx)(B,{ref:bt,editImgId:_t.current,callback:Ct,onCancel:Et}),(0,m.jsx)(w.Z,{children:de[Ke]&&Ke!==$&&Ke!==Q?(0,m.jsx)(M.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ct,top:ft},title:(0,m.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-ct,n=e.clientY-ft;document.body.onmousemove=function(e){var r=e.clientX-t,i=e.clientY-n,o=document.getElementsByClassName("markdown-popup-form")[0],s=window.innerWidth-o.offsetWidth,a=window.innerHeight-o.offsetHeight;r=Math.max(0,Math.min(r,s)),i=Math.max(0,Math.min(i,a)),At(e.clientX,e.clientY,t,n)&&(ut(r),pt(i))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:de[Ke]}),open:!0,onCancel:Et,footer:null,destroyOnClose:!0,width:Ke===Q?"1200px":null,height:Ke===Q?"80vh":null,className:"markdown-popup-form",children:kt}):null})]})}},26805:function(e,t,n){"use strict";n.d(t,{Z:function(){return b},I:function(){return w}});var r=n(82242),i=n.n(r),o=n(79800),s=n.n(o),a=n(28284),l=n(6767),c=n(37568),u=n(77736),d=n(71051),h=n(47889),f=n(99571),p=n(20337),m=n(59301),v=n(37712),g=a.Z.useForm,y={width:280,marginRight:10},_={labelCol:{span:5},wrapperCol:{span:19}},b=function(e){var t=e.callback,n=e.onCancel,r=g(),o=s()(r,1)[0],p=(0,m.useRef)();function b(e,t){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):l.ZP.error(e.message)}return(0,v.jsxs)(a.Z,i()(i()({form:o},_),{},{className:"upload-image-panel",onFinish:function(e){p.current.width=o.getFieldValue("width"),p.current.align=o.getFieldValue("align"),t(e,p.current)},style:{width:470,overflow:"hidden"},children:[(0,v.jsx)(a.Z.Item,{label:"图片地址",required:!0,children:(0,v.jsxs)("div",{className:"flex-container",children:[(0,v.jsx)(a.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,v.jsx)(c.Z,{style:y})}),(0,v.jsx)(x,{onFileChange:function(e){var t=e.target.files[0];p.current=t,w(t,b)}})]})}),(0,v.jsx)(a.Z.Item,{label:"图片描述",name:"alt",children:(0,v.jsx)(c.Z,{style:{width:264}})}),(0,v.jsx)(a.Z.Item,{label:"图片宽度",name:"width",children:(0,v.jsxs)(u.Z,{children:[(0,v.jsx)(a.Z.Item,{name:"width",style:{margin:0},children:(0,v.jsx)(d.Z,{style:{width:264}})}),(0,v.jsx)("span",{className:"ml8",children:"%"})]})}),(0,v.jsx)(a.Z.Item,{label:"对齐方式",name:"align",children:(0,v.jsx)(h.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"左对齐"},{value:"center",label:"居中对齐"},{value:"right",label:"右对齐"}]})}),(0,v.jsx)("aside",{children:(0,v.jsxs)(a.Z.Item,{style:{textAlign:"right",position:"relative",right:-98},children:[(0,v.jsx)(f.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,v.jsx)(f.ZP,{type:"default",onClick:n,children:"取消"})]})})]}))};function x(e){var t=e.onFileChange;return(0,v.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,v.jsx)("input",{type:"file",onChange:t})]})}function w(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(p.KI,"/api/attachments.json")),r.send(n)}},56946:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(82100),i=n.n(r),o=n(29186),s=n.n(o),a=n(80619),l=n.n(a),c=n(47074),u=n.n(c),d=n(59301),h=n(4676),f=function(e){l()(n,e);var t=u()(n);function n(e){var r;i()(this,n),r=t.call(this,e);var o=window.document;return r.node=o.createElement("div"),o.body.appendChild(r.node),r}return s()(n,[{key:"render",value:function(){var e=this.props.children;return(0,h.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(d.Component)},49337:function(e,t,n){"use strict";n.d(t,{SV:function(){return J},ZP:function(){return X}});var r=n(82242),i=n.n(r),o=n(37205),s=n.n(o),a=n(91232),l=n.n(a),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),f=n(7557),p=n.n(f),m=n(41498),v=n.n(m),g=n(59301),y=n(76374),_=["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"],b={quickKey:[{label:"main",content:["public static void main(String[] args) {","\t$0","}"].join("\n")},{label:"System.out.println",content:["System.out.println($0)"].join("\n")},{label:"System.out.print",content:["System.out.print($0)"].join("\n")}],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"]},x={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}) {","\t$0","} else {","\t","}"].join("\n")},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {","\t$0","}"].join("\n")},{label:"if",content:["if () {","\t$0","}"].join("\n")},{label:"for",content:["for(int j=0 ; j<10; j++){","\t$0","}"].join("\n")},{label:"trycatch",content:["try{","\t$0","}catch(ExceptionName e){","}"].join("\n")},{label:"using namespace std;",content:["using namespace std;"].join("\n")},{label:"include <iostream>",content:["#include <iostream>"].join("\n")},{label:"include <vector>",content:["#include <vector>"].join("\n")},{label:"include <cstdio>",content:["#include <cstdio>"].join("\n")},{label:"include <cstring>",content:["#include <cstring>"].join("\n")},{label:"include <sstream>",content:["#include <sstream>"].join("\n")},{label:"include <fstream>",content:["#include <fstream>"].join("\n")},{label:"include <map>",content:["#include <map>"].join("\n")},{label:"include <string>",content:["#include <string>"].join("\n")},{label:"include <cmath>",content:["#include <cmath>"].join("\n")}]},w={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("\n")}]},S={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("\n")}]},C=n(53184),k=n.n(C),E={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"]}},T=function(e,t,n,r){e.languages.registerCompletionItemProvider(t,{provideCompletionItems:function(t,i){var o=t.getWordUntilPosition(i),a={startLineNumber:i.lineNumber,endLineNumber:i.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=t.getLineContent(i.lineNumber).substring(o.startColumn-2,o.endColumn),c=function(e,t,n,r){var i=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});return Array.from(new Set(i.match(/\b\w{2,}\b/g)||[])).map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Text,insertText:t,range:r}}))}(e,t,i,a);return{suggestions:[].concat(s()(c),s()(n.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,documentation:t,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}))),s()(r.map((function(t){return{label:t.label,kind:e.languages.CompletionItemKind.Snippet,documentation:t.content,insertText:l.startsWith("#")?t.content.replace(/#/,""):t.content,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:a}}))))}}})},L=n(82100),A=n.n(L),M=n(29186),D=n.n(M),I=n(85573),N=n.n(I),R=function(){function e(t,n,r){var i=this;A()(this,e),this.placeholder=t,this.editor=n,this.monaco=r,n.onDidChangeModelContent((function(){return i.onDidChangeModelContent()})),this.onDidChangeModelContent()}return D()(e,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return e.ID}},{key:"getDomNode",value:function(){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}},{key:"getPosition",value:function(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"dispose",value:function(){this.editor.removeContentWidget(this)}}]),e}();N()(R,"ID","editor.widget.placeholderHint");var O=R,j=n(96236),P=n(6767),B=n(25399),U=n(89392),F=n(13326),z=n(56102),H=n(37712),Z=["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"];function W(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function G(){}var q={"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 V(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var r=q[e[n]];if(r)return r}return t[0]}return q[t]||t}var K=null,Y=function(){var e=v()(p()().mark((function e(){return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.writeText(" ");case 3:console.log("内容已自动复制到剪贴板:"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("自动复制失败:",e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),X=function(e){var t=e.width,r=void 0===t?"100%":t,o=e.height,a=void 0===o?"100%":o,c=e.value,d=e.language,f=void 0===d?"javascript":d,m=e.style,C=void 0===m?{}:m,L=e.options,A=void 0===L?{}:L,M=e.overrideServices,D=void 0===M?{}:M,I=e.theme,N=void 0===I?"vs-dark":I,R=e.onEditBlur,q=e.isCopy,X=void 0!==q&&q,J=e.onSave,Q=e.autoHeight,$=void 0!==Q&&Q,ee=e.forbidCopy,te=void 0!==ee&&ee,ne=e.onChange,re=void 0===ne?G:ne,ie=e.editorDidMount,oe=void 0===ie?G:ie,se=e.onFocus,ae=void 0===se?G:se,le=e.onBreakPoint,ce=void 0===le?G:le,ue=e.breakPointValue,de=void 0===ue?[]:ue,he=e.filename,fe=void 0===he?"educoder.txt":he,pe=e.errorLine,me=e.errorContent,ve=void 0===me?"":me,ge=e.highlightLine,ye=e.openBreakPoint,_e=void 0!==ye&&ye,be=e.placeholder,xe=void 0===be?"":be,we=e.showMiniMap,Se=void 0===we||we,Ce=(h()(e,Z),(0,g.useRef)()),ke=(0,g.useRef)({}),Ee=(0,g.useRef)(),Te=(0,g.useRef)(),Le=(0,g.useRef)([]),Ae=(0,g.useRef)(!1),Me=(0,g.useRef)(),De=(0,g.useRef)(),Ie=(0,g.useRef)(!1),Ne=(0,g.useState)(!1),Re=u()(Ne,2),Oe=Re[0],je=Re[1];(0,g.useEffect)((function(){var e=F.Z.subscribe("formatDocument",(function(e){var t,n=ke.current.instance;null==n||null===(t=n.getAction)||void 0===t||t.call(n,"editor.action.formatDocument").run()}));return window.updateMonacoValue=function(e){re(e)},e}),[]),(0,g.useEffect)((function(){var e,t=ke.current.instance;(Te.current&&clearTimeout(Te.current),Te.current=setTimeout((function(){!function(){var e=ke.current.instance;if(null!=c&&e&&Oe){var t=e.getModel();t&&c!==t.getValue()&&(!0,t.setValue(c),e.layout(),!1)}}()}),500),c&&null!=c&&c.length)&&(null==t||null===(e=t.updateOptions)||void 0===e||e.call(t,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(c.split(/\r\n|\r|\n/g).length))+3,5)}))}),[c,Oe,ke.current]),(0,g.useEffect)((function(){if(pe&&ke.current&&ke.current.instance){var e=ke.current.instance;e.changeViewZones((function(e){var t=document.createElement("div");t.style.padding="10px 20px",t.style.width="calc(100% - 20px)",t.className="my-error-line-wrp",t.innerHTML=ve,e.addZone({afterLineNumber:pe||11,heightInLines:3,domNode:t})}));var t={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}};e.addOverlayWidget(t),e.revealPositionInCenter({lineNumber:20,column:1})}}),[pe,ke.current,Oe]);var Pe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e||""===e.trim())return!0;for(var n=ke.current.instance.getModel(),r=n.getLineTokens(t),i=!1,o=0;o<2;o++)1===r.getStandardTokenType(o)&&(i=!0);return i};function Be(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),J())}(0,g.useEffect)((function(){var e,t=null===(e=ke.current)||void 0===e?void 0:e.instance;if(t&&Oe&&te){var n=t.onDidBlurEditorWidget((function(){Ie.current=!1})),r=t.onDidFocusEditorText((function(){Ie.current=!0}));return function(){n.dispose(),r.dispose()}}}),[ke.current,Oe,te]),(0,g.useEffect)((function(){var e;if(null!==(e=ke.current)&&void 0!==e&&e.instance&&Oe&&_e){var t=ke.current.instance,n=t.getModel();if(!n)return;!function(){var e,r=[],i=[],o=n.getAllDecorations(),s=l()(o);try{for(s.s();!(e=s.n()).done;){var a,c=e.value;if("highlighted-line"===c.options.className)r.push(null==c||null===(a=c.range)||void 0===a?void 0:a.startLineNumber),i.push(null==c?void 0:c.id)}}catch(e){s.e(e)}finally{s.f()}if(ge!==r[0]){n.deltaDecorations(i,[]);var u=n.getLineCount();ge&&ge<=u&&(t.deltaDecorations([],[{range:new K.Range(ge,1,ge,n.getLineMaxColumn(ge)),options:{isWholeLine:!0,className:"highlighted-line"}}]),t.revealLineInCenter(ge))}}();var r=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=[],i=[],o=n.getAllDecorations(),s=l()(o);try{for(s.s();!(e=s.n()).done;){var a,c=e.value;if("breakpoints-select"===c.options.linesDecorationsClassName)r.push(null==c||null===(a=c.range)||void 0===a?void 0:a.startLineNumber),i.push(null==c?void 0:c.id)}}catch(e){s.e(e)}finally{s.f()}if(t)return{lines:r,ids:i};ce(r)},i=function(){var e=v()(p()().mark((function e(t){var i;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i={range:new K.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},e.next=3,n.deltaDecorations([],[i]);case 3:r();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=v()(p()().mark((function e(i){var o,s,a,c,u;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=[],s=t.getLineDecorations(i),a=l()(s);try{for(a.s();!(c=a.n()).done;)"breakpoints-select"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(e){a.e(e)}finally{a.f()}return e.next=6,n.deltaDecorations(o,[]);case 6:r();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),s=function(e){var n,r=t.getLineDecorations(e),i=l()(r);try{for(i.s();!(n=i.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(e){i.e(e)}finally{i.f()}return!1};if(!(0,U.isEqual)(de,r(!0).lines)){n.deltaDecorations(r(!0).ids,[]);var a=de.map((function(e){return{range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],a)}var c=t.onDidChangeModelContent((function(e){var a=t.getPosition();if(a){var l=a.lineNumber;clearTimeout(De.current),De.current=setTimeout((function(){Pe(n.getLineContent(l),l)?o(l):s(l)?(o(l),i(l)):r()}),100)}})),u=t.onMouseDown((function(e){var t;if(e.target.detail&&null!==(t=e.target)&&void 0!==t&&null!==(t=t.element)&&void 0!==t&&null!==(t=t.className)&&void 0!==t&&t.includes("line-numbers")){var r=e.target.position.lineNumber;if(Pe(n.getLineContent(r),r))return;s(r)?o(r):i(r)}})),d=function(){Le.current=t.deltaDecorations(Le.current,[])},h=t.onMouseMove((function(e){var r;if(d(),e.target.detail&&null!==(r=e.target)&&void 0!==r&&null!==(r=r.element)&&void 0!==r&&null!==(r=r.className)&&void 0!==r&&r.includes("line-numbers")){var i=e.target.position.lineNumber;if(Pe(n.getLineContent(i),i))return;!function(e){var n={range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Le.current=t.deltaDecorations(Le.current,[n])}(i)}})),f=t.onMouseLeave((function(){d()}));return function(){c.dispose(),u.dispose(),h.dispose(),f.dispose()}}}),[ke.current,Oe,de,ge,_e,f]),(0,g.useEffect)((function(){var e;null!==(e=ke.current)&&void 0!==e&&e.instance&&_e&&ke.current.instance.setPosition({lineNumber:0,column:0})}),[ge]);var Ue=function(){if($&&ke.current.instance){var e=ke.current.instance.getContentHeight();Ke(e<a?a:e)}else Ke(a)};var Fe=function(e){if(Ie.current){var t=e.keyCode,n=e.ctrlKey,r=e.metaKey,i=e.target;return"paste"!==e.type&&(67!==t&&86!==t||!r&&!n)||"TEXTAREA"!==i.nodeName||(P.ZP.warning({content:decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"),key:"monaco-editor-tip"}),e.preventDefault()),!1}};function ze(e,t){var n,r,i=window.URL||window.webkitURL||window,o=new Blob([t]),s=document.createElementNS("http://www.w3.org/1999/xhtml","a");s.href=i.createObjectURL(o),s.download=e,n=s,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}(0,g.useEffect)((function(){Ue()}),[Ue]),(0,g.useEffect)((function(){Ce.current&&!Oe&&Promise.all([n.e(8909),n.e(1196)]).then(n.bind(n,71448)).then((function(e){try{K=e,ke.current.instance=K.editor.create(Ce.current,{value:c,language:V(f),theme:N,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Se||!1}},D);var t=ke.current.instance,n=j.BH._menuItems,r=s()(n).find((function(e){return"EditorContext"==e[0]._debugName}))[1];if(oe(t,K),setTimeout((function(){Ue(),ke.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){ze(fe||"educoder.txt",t.getValue())}})}),500),ke.current.subscription=t.onDidChangeModelContent((function(e){Ae.current?clearTimeout(Me.current):(Ue(),re(t.getValue(),e)),Me.current=setTimeout((function(){Ae.current=!1}),500)})),window.Monaco||function(e){E.languages.forEach((function(t){e.languages.registerDocumentFormattingEditProvider(t,{provideDocumentFormattingEdits:function(e){return v()(p()().mark((function t(){var n;return p()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=k()(e.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}),t.abrupt("return",[{range:e.getFullModelRange(),text:n}]);case 2:case"end":return t.stop()}}),t)})))()}})})),T(e,"java",b.keywords,b.quickKey),T(e,"cpp",x.keywords,x.quickKey),T(e,"c",_,[]),T(e,"python",w.keywords,w.quickKey),T(e,"scala",S.keywords,S.quickKey)}(K,V(f)),te&&(!function(e,t){var n=e._first;do{var r;t.includes(null===(r=n.element)||void 0===r||null===(r=r.command)||void 0===r?void 0:r.id)&&e._remove(n)}while(n=n.next)}(r,["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"]),Ce.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Fe),window.removeEventListener("paste",Fe),window.addEventListener("keydown",Fe),window.addEventListener("paste",Fe)),window.Monaco=K,R&&t.onDidBlurEditorWidget((function(){R(t.getValue())})),ae&&t.onDidFocusEditorText((function(){te&&Y(),ae(t.getValue())})),te){Y();try{t.onDidPaste((function(e){var n=t.getSelection(),r=ke.current.pastePos||{};new K.Range(r.startLineNumber||n.endLineNumber,r.startColumn||n.endColumn,r.endLineNumber||n.endLineNumber,r.endColumn||n.endColumn);t.executeEdits("",[{range:e.range,text:""}])}))}catch(e){}}var i=function(){var e;return Ce.current&&(e=new y.Z((function(e){var t,n=l()(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&ke.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(Ce.current),e}();return xe&&"string"==typeof xe&&new O(xe,t,K),je(!0),function(){var e=ke.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),ke.current.subscription&&ke.current.subscription.dispose(),i.unobserve(Ce.current)}}catch(e){}}))}),[]),(0,g.useEffect)((function(){if(ke.current.instance&&Oe)return document.addEventListener("keydown",Be,!1),function(){document.removeEventListener("keydown",Be)}}),[J,Oe]),(0,g.useEffect)((function(){var e=ke.current.instance;if(e&&Oe){var t=V(f);K.editor.setModelLanguage(e.getModel(),t)}}),[f,Oe]),(0,g.useEffect)((function(){ke.current.instance&&Oe&&K.editor.setTheme(N)}),[N,Oe]),(0,g.useEffect)((function(){var e=ke.current.instance;Ee.current=A,e&&Oe&&(e.updateOptions(i()({},A)),setTimeout((function(){e.getModel().updateOptions(i()({},A))}),200))}),[JSON.stringify(A),Oe]),(0,g.useEffect)((function(){var e=ke.current.instance;e&&Oe&&e.layout()}),[r,a,Oe]);var He=(0,g.useState)(W(r)),Ze=u()(He,2),We=Ze[0],Ge=(Ze[1],(0,g.useState)(W(a))),qe=u()(Ge,2),Ve=qe[0],Ke=qe[1],Ye=i()(i()({},C),{},{width:We,height:Ve,position:"relative"});return(0,H.jsx)("div",{className:"my-monaco-editor",ref:Ce,style:Ye,children:X&&(0,H.jsx)(z.CopyToClipboard,{text:c,onCopy:function(){return P.ZP.success("复制成功")},children:(0,H.jsx)(B.Z,{title:"复制代码",children:(0,H.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,H.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};function J(e){var t=e.width,r=void 0===t?"100%":t,o=e.height,s=void 0===o?"100%":o,a=e.original,c=e.modified,d=e.language,h=e.options,f=void 0===h?{}:h,p=(0,g.useRef)(),m=(0,g.useState)(null),v=u()(m,2),_=v[0],b=v[1];(0,g.useEffect)((function(){return p.current&&Promise.all([n.e(8909),n.e(9404)]).then(n.bind(n,2550)).then((function(e){var t=(K=e).editor.createDiffEditor(p.current,i()(i()({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},f),{},{wordWrap:!0}));b(t);var n=function(e){var t;return p.current&&(t=new y.Z((function(t){var n,r=l()(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&e.layout()}}catch(e){r.e(e)}finally{r.f()}}))).observe(p.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(p.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),(0,g.useEffect)((function(){_&&_.setModel({original:K.editor.createModel(a,d),modified:K.editor.createModel(c,d)})}),[a,c,d,_]);var x={width:W(r),height:W(s)};return(0,H.jsx)("div",{className:"my-diff-editor",ref:p,style:x})}},17341:function(e,t,n){"use strict";n(32905);var r=n(82326),i=n(71411),o=n(37712),s=r.default.Option;t.Z=function(e){var t,n=e.isTheoretical,a=e.onFontSizeChange,l=e.cmFontSize,c=e.cmCodeMode,u=(e.autoFormat,e.onCodeModeChange),d=e.onTabToSpace,h=(e.onAutoFormat,e.formatDocument),f=e.className,p=void 0===f?"":f,m=e.tabToSpace,v=e.children,g=e.code_editor,y=e.challenge,_=e.shixun_environment_id,b=e.shixun_environments,x=null==b||null===(t=b.find((function(e){return e.shixun_environment_id===_})))||void 0===t?void 0:t.program_language;return console.log("----",x,b,_,g),(0,o.jsxs)("div",{className:"tpi-code-setting ".concat(p),children:[(0,o.jsx)("h3",{children:"代码格式"}),(0,o.jsxs)("section",{children:[(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"显示模式"}),(0,o.jsxs)(r.default,{bordered:!1,size:"small",value:c,onChange:u,children:[(0,o.jsx)(s,{value:"vs",children:"白色背景"}),(0,o.jsx)(s,{value:"vs-dark",children:"黑色背景"})]})]}),!n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"字体大小"}),(0,o.jsxs)(r.default,{bordered:!1,size:"small",value:l,onChange:a,children:[(0,o.jsx)(s,{value:12,children:"12px"}),(0,o.jsx)(s,{value:14,children:"14px"}),(0,o.jsx)(s,{value:16,children:"16px"}),(0,o.jsx)(s,{value:18,children:"18px"}),(0,o.jsx)(s,{value:20,children:"20px"}),(0,o.jsx)(s,{value:22,children:"22px"})]})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"Tab转换"}),(0,o.jsx)(i.Z,{checked:m,onChange:d})]}),(0,o.jsx)("div",{className:"file-item",onClick:h,children:(0,o.jsx)("b",{style:{cursor:"pointer"},children:"格式化代码"})})]})]}),!n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h3",{children:"快捷键"}),(0,o.jsxs)("section",{children:[(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"保存代码"}),(0,o.jsx)("span",{children:"Ctrl + S"})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"唤出快捷键列表"}),(0,o.jsx)("span",{children:"F1 / Alt + F1"})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"左右缩进"}),(0,o.jsx)("span",{children:"Ctrl + ]/["})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"跳到匹配的括号"}),(0,o.jsx)("span",{children:"Ctrl + Shift + \\"})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"转到行首"}),(0,o.jsx)("span",{children:"Home"})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"转到行尾"}),(0,o.jsx)("span",{children:"End"})]})]}),v]}),!n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h3",{children:"快捷键"}),(0,o.jsxs)("section",{children:[x&&(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"编程语言"}),(0,o.jsx)("span",{children:x})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"实训难易度"}),(0,o.jsx)("span",{children:{1:"简单",2:"中等",3:"困难"}[null==y?void 0:y.difficulty]})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"实验环境"}),(0,o.jsx)("span",{children:null==g?void 0:g.name})]}),(0,o.jsxs)("div",{className:"file-item",children:[(0,o.jsx)("b",{children:"实验容器网络"}),(0,o.jsx)("span",{children:null!=g&&g.close_internet?"关闭外网":"开启外网"})]})]})]})]})}},21323:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(59301);function i(e,t){var n=(0,r.useRef)();(0,r.useEffect)((function(){n.current=e})),(0,r.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},75983:function(e,t,n){"use strict";n.d(t,{Im:function(){return E},ZP:function(){return I},gZ:function(){return M}});var r=n(79800),i=n.n(r),o=n(82242),s=n.n(o),a=n(85573),l=n.n(a),c=n(59301),u=n(37568),d=n(99571),h=n(84105),f=n(87395),p=n(77309),m=n(24334),v=n(79072),g=n(76603),y=n(32985),_=n(66761),b=n(34376),x=n(92310),w=n.n(x),S=n(37712),C=u.Z.TextArea,k={visible:!1,tabIndex:"0"},E=l()(l()(l()(l()(l()(l()(l()({},p.h.HIDE_COMPILE_STATUS,"暂不支持查看"),p.h.NOMATCH,"测试用例结果不匹配"),p.h.OK,"调试通过"),2,"调试超时"),3,"调试pod失败"),4,"编译失败"),5,"执行失败"),T=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(T||{});function L(e,t){switch(t.type){case T.SET_VISIBLE:return s()(s()({},e),{},{visible:t.payload});case T.SET_TABINDEX:return s()(s()({},e),{},{tabIndex:t.payload});default:throw new Error}}function A(e){var t=e.value,n=e.className,r=(0,c.useState)(!1),o=i()(r,2),s=o[0],a=o[1],l=(0,c.useRef)(),u=(0,c.useRef)();return(0,c.useEffect)((function(){s&&(u.current.reset(),u.current.write((0,y.pp)(t||"")))}),[t,s]),(0,c.useEffect)((function(){if(l.current){var e;u.current=new b.Terminal({fontSize:14,disableStdin:!0}),u.current.open(l.current);var t=l.current.offsetWidth-14,n=(null===(e=u.current)||void 0===e||null===(e=e._core)||void 0===e||null===(e=e._renderService)||void 0===e||null===(e=e.dimensions)||void 0===e?void 0:e.actualCellWidth)||9.5,r=Math.ceil(t/n);u.current.resize(r,8),a(!0)}}),[]),(0,S.jsx)("div",{ref:l,className:w()("XtermText-valueRef",n)})}function M(e){var t=e.status,n=e.error_msg,r=e.output,i=e.input,o=e.expected_output,s=e.is_file,a=e.input_file_url,l=e.output_file_url,c=e.expected_output_file_url,u=null,d={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(t){case p.h.NOMATCH:u=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{className:"c-red",children:"实际输入:"}),!s&&(0,S.jsx)(A,{className:"mb10",value:i}),s&&(0,S.jsx)("div",{style:d,children:(0,S.jsx)("a",{onClick:function(){return(0,y.LR)(a,i)},children:i})}),(0,S.jsx)("p",{className:"c-red",children:"实际输出:"}),!s&&(0,S.jsx)(A,{className:"mb10",value:r&&m.Base64.decode(r)||""}),s&&(0,S.jsx)("div",{style:d,children:(0,S.jsx)("a",{onClick:function(){return(0,y.LR)(l,r)},children:r})}),(0,S.jsx)("p",{className:"c-red",children:"预期输出:"}),!s&&(0,S.jsx)(A,{className:"mb10",value:o&&m.Base64.decode(o)||""}),s&&(0,S.jsx)("div",{style:d,children:(0,S.jsx)("a",{onClick:function(){return(0,y.LR)(c,o)},children:o})})]});break;case p.h.EXECUTEFAILURE:case p.h.COMPILEFAILURE:u=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("p",{children:"最后执行的输入:"}),!s&&(0,S.jsx)(g.Z,{value:i,style:d}),s&&(0,S.jsx)("div",{style:d,children:(0,S.jsx)("a",{onClick:function(){return(0,y.LR)(a,i)},children:i})}),(0,S.jsx)("p",{children:"执行出错信息:"}),(0,S.jsx)("pre",{className:"error",children:m.Base64.decode(n)})]});break;case p.h.PODFAILURE:u=(0,S.jsx)("p",{children:"创建pod失败请稍后重试"});break;case p.h.TIMEOUT:u=(0,S.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,S.jsxs)(S.Fragment,{children:[" ",u," "]})}function D(e){var t=e.status,n=e.error_msg,r=e.execute_time,i=e.output,o=e.input,s=e.expected_output,a=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(t){case p.h.OK:a=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:["执行用时:",r,"秒"]}),(0,S.jsx)("p",{children:"执行结果:"}),(0,S.jsx)("pre",{children:m.Base64.decode(i)})]});break;case p.h.NOMATCH:a=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:["输入:",(0,S.jsx)("pre",{children:o})]}),(0,S.jsxs)("p",{children:["输出:",i&&m.Base64.decode(i)]}),(0,S.jsxs)("p",{children:["预期输出:",s&&m.Base64.decode(s)]})]});break;case p.h.EXECUTEFAILURE:case p.h.COMPILEFAILURE:a=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("p",{children:["最后执行的输入:",(0,S.jsx)("pre",{children:o})]}),(0,S.jsx)("p",{children:"执行出错信息:"}),(0,S.jsx)("pre",{className:"error",children:m.Base64.decode(n)})]});break;case p.h.PODFAILURE:a=(0,S.jsx)("p",{children:"创建pod失败请稍后重试"});break;case p.h.TIMEOUT:a=(0,S.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,S.jsxs)(S.Fragment,{children:[" ",a," "]})}var I=function(e){var t=e.id,n=e.is_file,r=e.input,o=e.debuging,s=e.submitting,a=(e.executingMessage,e.debugResult),l=e.onChangeInput,u=e.onDebugCode,p=e.onSubmitCode,m=(0,c.useReducer)(L,k),g=i()(m,2),y=g[0],b=g[1],x=y.visible;y.tabIndex;(0,c.useEffect)((function(){b({type:T.SET_VISIBLE,payload:!1})}),[t]);var w=(0,c.useMemo)((function(){if(a){a.status;return(0,S.jsx)(S.Fragment,{children:D(a)})}return null}),[a]);return(0,S.jsxs)("div",{className:"test-case-panel",children:[(0,S.jsxs)("div",{className:"test-case-panel-body ".concat(x?"active":""),children:[(0,S.jsx)("ul",{className:"s-navs",children:(0,S.jsx)("li",{children:(0,S.jsx)("a",{className:"active",children:"调试代码结果"})})}),(0,S.jsx)(_.Z,{leftTitle:"自定义测试用例",rightTitle:"代码执行结果",style:{height:240},leftNode:(0,S.jsx)(C,{placeholder:"请输入自测用例(如果未填写,首次自测运行时,系统会自动填充第一个非隐藏的文本类型的测试用例)",value:n?"":r,onChange:l}),rightNode:o?(0,S.jsx)(v.Z,{message:"代码执行中..."}):a?w:(0,S.jsx)("p",{style:{color:"#536879"},children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,S.jsx)("a",{className:"btn-collapse ".concat(x?"up":""),onClick:function(){b({type:T.SET_VISIBLE,payload:!x})},children:x?(0,S.jsx)(h.Z,{}):(0,S.jsx)(f.Z,{})}),(0,S.jsxs)("footer",{className:"footer",children:[(0,S.jsx)("span",{style:{visibility:"hidden"},children:"控制台"}),(0,S.jsxs)("div",{className:"flex-container",children:[(0,S.jsx)(d.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost",children:"上一题"}),(0,S.jsx)(d.ZP,{id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,S.jsx)(d.ZP,{className:"btn-green",type:"ghost",loading:o,onClick:function(){b({type:T.SET_VISIBLE,payload:!0}),b({type:T.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),(0,S.jsx)(d.ZP,{type:"primary",className:"custom-ant-disabled",loading:s,disabled:s,onClick:function(){b({type:T.SET_VISIBLE,payload:!1}),p()},children:"评测并提交"})]})]})]})}},19474:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return xn}});var r=n(39647),i=n.n(r),o=n(7557),s=n.n(o),a=n(41498),l=n.n(a),c=n(79800),u=n.n(c),d=n(82242),h=n.n(d),f=n(59301),p=n(10906),m=n(76618),v=n(5030),g=n(11938),y=n(6767),_=n(62957),b=n(29787),x=n(82326),w=n(20935),S=n(16749),C=n(6816),k=n(87169),E=n(30641),T=n(49337),L=n(56946),A=n(37748),M=n(17341),D=n(37712),I={theme:(0,A.G)("cmCodeMode","vs-dark"),fontSize:(0,A.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,A.G)("cmTabToSpace",!0)},N=function(e){return e[e.set_font_size=0]="set_font_size",e[e.set_theme=1]="set_theme",e[e.on_tab_to_space=2]="on_tab_to_space",e[e.set_show_editor_setting=3]="set_show_editor_setting",e}(N||{});function R(e,t){switch(t.type){case N.set_show_editor_setting:return h()(h()({},e),{},{showEditorSetting:t.payload});case N.set_theme:return h()(h()({},e),{},{theme:t.payload});case N.set_font_size:return h()(h()({},e),{},{fontSize:t.payload});case N.on_tab_to_space:return h()(h()({},e),{},{tabToSpace:t.payload});default:throw new Error}}var O=function(e){var t=e.isLoading,n=e.value,r=e.onChange,i=e.language,o=e.onUpdateCode,s=e.ActionBarRender,a=void 0===s?function(e){return(0,D.jsx)(j,{onShowCodeSetting:e})}:s,l=(0,f.useReducer)(R,I),c=u()(l,2),d=c[0],p=c[1],m=d.theme,v=d.fontSize,g=d.showEditorSetting,y=d.tabToSpace,_=(0,f.useRef)(),b=(0,f.useRef)(),x={onFontSizeChange:function(e){p({type:N.set_font_size,payload:e}),(0,A.t)("cmFontSize",e)},tabToSpace:y,cmFontSize:v,className:"oj",cmCodeMode:m,onTabToSpace:function(e){p({type:N.on_tab_to_space,payload:e}),(0,A.t)("cmTabToSpace",e)},onCodeModeChange:function(e){p({type:N.set_theme,payload:e}),(0,A.t)("cmCodeMode",e)}};var w={value:n,language:i,theme:m,height:"calc(100% - 56px)",options:{fontSize:v,insertSpaces:y},onChange:function(e){r(e),b.current=e,clearTimeout(_.current),_.current=setTimeout((function(){o(b.current)}),1e4)},onEditBlur:function(e){b.current&&o(b.current)}};return(0,D.jsxs)(f.Fragment,{children:[(0,D.jsxs)("div",{className:"code-panel-container",children:[a((function(){p({type:N.set_show_editor_setting,payload:!0})})),!t&&(0,D.jsx)(T.ZP,h()({},w))]}),(0,D.jsx)(L.Z,{children:(0,D.jsx)(E.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:g,onClose:function(){p({type:N.set_show_editor_setting,payload:!1})},children:(0,D.jsx)(M.Z,h()({},x))})})]})};function j(e){var t=e.onShowCodeSetting;return(0,D.jsxs)("div",{className:"action-bar",children:[(0,D.jsx)("span",{children:"学员初始代码文件"}),(0,D.jsx)("a",{onClick:t,children:(0,D.jsx)("i",{className:"iconfont icon-shezhi"})})]})}var P=n(24334),B=n(36952),U=n(75983),F=n(37568),z=n(28284),H=n(99571),Z=F.Z.TextArea,W=function(e){var t=e.callback,n=e.onCancel,r=e.notes;return(0,D.jsxs)(z.Z,{className:"note-form-panel",onFinish:function(e){t(e)},initialValues:{notes:r},children:[(0,D.jsx)(z.Z.Item,{name:"notes",rules:[{required:!0,message:"请输入笔记内容"},{max:5e3,message:"笔记最大字数为".concat(5e3)}],children:(0,D.jsx)(Z,{placeholder:"请输入笔记内容",rows:5})}),(0,D.jsxs)(z.Z.Item,{style:{textAlign:"right"},children:[(0,D.jsx)(H.ZP,{type:"ghost",onClick:n,style:{marginRight:10},children:" 取消 "}),(0,D.jsx)(H.ZP,{type:"primary",htmlType:"submit",children:" 提交 "})]})]})},G="left-panel___fP6Y3",q="tab-panel-body___aLOJQ",V="b1___ELpwD",K="oj-mr___SIQSw",Y="s-navs___iVrSH",X="bg-white___S0kiU",J="active___D332c",Q={pagination:"pagination___npPu7",info:"info___aRH6C"},$=n(54172),ee=n(13747),te=n(58617),ne=n(81953),re=n(77309),ie=n(32985),oe=n(56656),se=n.n(oe),ae=$.Z.Column,le=function(e){var t=e.submitResult,n=e.submitting,r=e.submitRecords,i=e.page,o=e.onPageChange,s=e.topicId,a=t||{},l=a.status,c=a.id,u=a.input,d=a.output,h=a.expected_output,f=a.is_file,p=a.input_file_url,m=a.output_file_url,g=a.expected_output_file_url,_=a.error_msg,x=r||{},w=x.records,S=x.records_count,C=(0,v.useParams)();return(0,D.jsxs)(b.Z,{spinning:n,tip:"评测中...",indicator:(0,D.jsx)(te.Z,{style:{fontSize:24},spin:!0}),children:[c?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("ul",{className:Q.info,children:[(0,D.jsxs)("li",{children:["执行结果:",(0,D.jsx)("span",{className:l===re.h.OK?"c-green":"c-red",children:U.Im[l]})]}),(0,D.jsx)("li",{className:Q.error,children:(0,D.jsxs)("a",{onClick:function(){f?navigator.clipboard.writeText(P.Base64.decode(_)).then((function(){y.ZP.success("复制错误信息成功")})):navigator.clipboard.writeText(P.Base64.decode(d)).then((function(){y.ZP.success("复制错误信息成功")}))},children:["复制错误信息 ",(0,D.jsx)(ne.Z,{})," "]})}),(0,D.jsx)("li",{children:(0,D.jsx)(v.Link,{to:"/problems/".concat(s,"/record-detail/").concat(c,"?backId=").concat(null==C?void 0:C.save_identifier),children:"显示详情 > "})})]}),l!==re.h.OK?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("p",{className:"c-red",children:"实际输入:"}),(0,D.jsxs)("pre",{children:[!f&&u,f&&(0,D.jsx)("a",{style:{fontSize:"16px"},onClick:function(){return(0,ie.LR)(p,u)},children:u})]}),(0,D.jsx)("p",{className:"c-red",children:"实际输出:"}),(0,D.jsxs)("pre",{children:[(4===l||5===l)&&P.Base64.decode(_),4!=l&&5!=l&&(f?(0,D.jsx)("a",{style:{fontSize:"16px"},onClick:function(){return(0,ie.LR)(m,d)},children:d}):P.Base64.decode(d))]}),(0,D.jsx)("p",{className:"c-red",children:"预期输出:"}),(0,D.jsxs)("pre",{children:[!f&&P.Base64.decode(h),f&&(0,D.jsx)("a",{style:{fontSize:"16px"},onClick:function(){return(0,ie.LR)(g,h)},children:h})]})]}):null]}):null,(null==w?void 0:w.length)>0?(0,D.jsxs)($.Z,{dataSource:w,rowKey:"id",pagination:!1,children:[(0,D.jsx)(ae,{title:"提交时间",dataIndex:"created_at",render:function(e,t){return(0,D.jsxs)("span",{children:[" ",se()(e).format("YYYY-MM-DD HH:mm:ss")]})}},"created_at"),(0,D.jsx)(ae,{title:"提交结果",dataIndex:"status",render:function(e,t){var n;return(0,D.jsx)(v.Link,{className:0===e?"c-green":"c-red",to:"/problems/".concat(s,"/record-detail/").concat(t.id,"?backId=").concat(null==C?void 0:C.save_identifier),children:null===(n=U.Im[e])||void 0===n?void 0:n.replace("调试","评测")})}},"status"),(0,D.jsx)(ae,{title:"执行用时 (S)",dataIndex:"execute_time"},"execute_time"),(0,D.jsx)(ae,{title:"内存消耗MB",dataIndex:"execute_memory"},"execute_memory"),(0,D.jsx)(ae,{title:"语言",dataIndex:"language"},"language")]}):null,S>15?(0,D.jsx)(ee.Z,{className:Q.pagination,current:i,pageSize:15,total:S,onChange:o}):null]})},ce=n(90059),ue=n(96599),de=n(77736),he="desc___X8_hx",fe="info___C1DPv",pe="commit-info____9yQm",me=n(76603),ve={1:{name:"简单",color:"#52c41a"},2:{name:"适中",color:"#faad14"},3:{name:"困难",color:"#f5222d"}},ge=function(e){var t=e.hack,n=(e.onTriggerPraise,e.toDiscuss),r=(t.language,t.difficulty),i=t.time_limit,o=(t.username,t.user_path,t.user_praise,t.comments_count),s=(t.praises_count,t.description),a=t.pass_count,l=t.submit_count;(0,v.useLocation)();console.log(t.language,"language");var c=ve[r];return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("ul",{className:fe,children:[(0,D.jsxs)("li",{children:["难度:",(0,D.jsx)(ue.Z,{color:null==c?void 0:c.color,children:null==c?void 0:c.name})]}),(0,D.jsxs)("li",{children:["单个测试集评测时长限制:",(0,D.jsxs)("b",{children:[i,"秒"]})]})]}),(0,D.jsx)(me.Z,{value:s,className:he}),(0,D.jsxs)("ul",{className:pe,children:[(0,D.jsx)("li",{children:(0,D.jsxs)(de.Z,{size:4,children:[(0,D.jsx)("span",{children:"通过次数"})," ",(0,D.jsx)("b",{children:a})]})}),(0,D.jsxs)("li",{children:[(0,D.jsxs)(de.Z,{size:4,children:[(0,D.jsx)("span",{children:"提交次数"})," ",(0,D.jsx)("b",{children:l})]})," "]}),(0,D.jsx)("li",{style:{flex:"1 0 0"}}),(0,D.jsxs)("li",{children:[(0,D.jsxs)(de.Z,{size:4,children:[(0,D.jsx)("i",{className:"iconfont icon-huifu1",onClick:n})," ",(0,D.jsx)("b",{children:o})]})," "]})]})]})},ye=n(13326);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var _e=n(37205),be=n.n(_e),xe=n(67310);function we(e){return(0,xe.U2)("comments.json",e)}function Se(e){return(0,xe.v_)("/discusses/".concat(e,"/plus.json"),{container_type:"Discuss",type:1})}function Ce(e){return(0,xe.v_)("comments/reply.json",e)}function ke(e){return(0,xe.v_)("comments.json",e)}function Ee(e){return(0,xe.v_)("comments/".concat(null==e?void 0:e.id,"/hidden.json"),e)}function Te(e){return(0,xe.IV)("comments/".concat(null==e?void 0:e.id,".json"))}var Le=n(37092),Ae=n(56800);function Me(e){var t=e.author;return(0,D.jsx)("a",{href:"/users/".concat(t.login),target:"_blank",children:(0,D.jsx)("img",{alt:"用户头像",height:"50",style:{borderRadius:"50%"},src:"".concat(C.Z.IMG_SERVER,"/images/").concat(t.image_url),width:"50"})})}function De(e){var t=e.data,n=e.index,r=e.parentDiscussIndex,i=e.user,o=e.onSetActionType,s=t.author,a=t.can_delete,l=t.content,c=t.id,u=t.time;var d=i.admin||a||s.user_id===i.user_id;return(0,D.jsxs)("div",{className:"discuss-item-container second-discuss ",children:[(0,D.jsx)(Me,{author:s}),(0,D.jsxs)("section",{children:[(0,D.jsxs)("div",{className:"discuss-info",children:[(0,D.jsx)("a",{href:"/users/".concat(s.login),target:"_blank",children:s.name}),(0,D.jsx)("span",{className:"grey",children:u}),(0,D.jsx)("div",{className:"btn-group",style:{marginBottom:0},children:d?(0,D.jsx)("a",{onClick:function(){o({id:c,index:n,type:"delete-discuss",parentDiscussIndex:r,message:"确定要删除该条回复吗"})},title:"删除",children:(0,D.jsx)("i",{className:"iconfont icon-shanchu"})}):null})]}),(0,D.jsx)(me.Z,{className:"discuss-content",value:l})]})]})}var Ie=function(e){var t=e.user,n=e.data,r=e.index,i=e.onPlusDiscuss,o=e.onSetActionType,s=e.activeDiscussIndex,a=e.onReplyDiscuss,l=e.onSetActiveDiscussIndex,c=n.content,u=n.children,d=n.hidden,h=n.id,f=n.praise_count,p=n.time,m=n.user_praise,v=n.can_delete,g=n.author;console.log(v&&(!u||0==u.length),"children22");t.admin||(t.user_id,g.user_id);return(0,D.jsxs)("div",{className:"discuss-item-container",children:[(0,D.jsx)(Me,{author:g}),(0,D.jsxs)("section",{children:[(0,D.jsxs)("div",{className:"discuss-info",children:[(0,D.jsxs)("a",{href:"/users/".concat(g.login),target:"_blank",children:[" ",g.name," "]}),(0,D.jsx)("span",{className:"grey",children:p})]}),(0,D.jsx)(me.Z,{className:"discuss-content",value:c}),u&&u.length>0?(0,D.jsx)("div",{className:"reply-discuss-container",children:u.map((function(e,n){return(0,D.jsx)(De,{data:e,index:n,user:t,onSetActionType:o,parentDiscussIndex:r},e.id)}))}):null,(0,D.jsxs)("div",{className:"btn-group",children:[(0,Ae.Ny)()?(0,D.jsx)("a",{onClick:function(){o({id:h,index:r,params:{hidden:d?"0":"1"},type:"hidden-discuss",message:d?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:d?"取消隐藏":"隐藏评论",children:(0,D.jsx)("i",{className:d?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,!v||u&&0!=u.length?null:(0,D.jsx)("a",{onClick:function(){o({id:h,index:r,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除",children:(0,D.jsx)("i",{className:"iconfont icon-shanchu"})}),(0,D.jsxs)("a",{onClick:function(){l(h)},title:"回复",children:[" ",(0,D.jsx)("i",{className:"iconfont icon-huifu1"})," "]}),(0,D.jsxs)("a",{onClick:function(){i(h,!m,r)},className:m?"c-orange":"",children:[(0,D.jsx)("i",{className:m?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,D.jsx)("span",{children:f||""})]})]}),(0,D.jsx)(Le.Z,{id:h,activeDiscussIndex:s,onReplyDiscuss:a})]})]},h)},Ne=n(23723),Re=n(15409),Oe=function(e){var t=e.user_praise,n=e.praise_count,r=e.praisePlus,i=e.onCreateDiscuss,o=e.discuss_count,a=(0,f.useState)(!1),c=u()(a,2),d=c[0],h=c[1],p=(0,f.useState)(""),m=u()(p,2),v=m[0],g=m[1];function y(){h(!1)}function _(){return(_=l()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i(v),g(""),h(!1);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,D.jsxs)("div",{className:"dis-input-editor-container ".concat(d?"active":""," "),children:[(0,D.jsxs)("div",{className:d?"text-area hide":"text-area",children:[(0,D.jsx)("input",{placeholder:"说点什么",onClick:function(){h(!0)}}),(0,D.jsxs)("a",{style:{alignItems:"center"},children:[" ",(0,D.jsx)("i",{className:"iconfont icon-huifu1"}),"    ",o," "]}),(0,D.jsxs)("a",{className:"c-light-black",onClick:r,style:{alignItems:"center"},title:t?"取消点赞":"点赞",children:[(0,D.jsx)("i",{className:"mr3 ".concat(t?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," ")}),n?(0,D.jsx)("span",{children:n}):""]})]}),d?(0,D.jsx)("div",{className:"input-mask",onClick:y}):null,(0,D.jsxs)("div",{className:d?"md-container":"md-container hide",children:[(0,D.jsx)(Re.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:v,height:240,onChange:function(e){g(e)}}),(0,D.jsx)("div",{className:"tip-container",onClick:y,children:(0,D.jsx)("a",{className:"btn-send",onClick:function(){return _.apply(this,arguments)},children:" 发送 "})})]})]})},je={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null},Pe=function(e){return e[e.GET_DISCUSSES=0]="GET_DISCUSSES",e[e.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",e[e.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",e[e.PLUS_DISCUSS=3]="PLUS_DISCUSS",e[e.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",e[e.SET_PAGE=5]="SET_PAGE",e[e.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",e}(Pe||{});function Be(e,t){switch(t.type){case Pe.SHOW_DISCUSSES_LOADING:return h()(h()({},e),{},{loading:!0});case Pe.GET_DISCUSSES:case Pe.TOP_OR_DOWN_DISCUSS:case Pe.SET_ACTION_TYPE:case Pe.PLUS_DISCUSS:case Pe.SET_PAGE:case Pe.ACTIVE_DISCUSS_INDEX:return h()(h()({},e),t.payload);default:throw new Error}}var Ue=function(e){var t=e.user,n=e.identifier,r=e.hack,i=e.onTriggerPraise,o=e.setDiscussTotal,a=(0,f.useReducer)(Be,je),c=u()(a,2),d=c[0],p=c[1],m=d.loading,v=d.page,g=d.data,y=d.count,x=d.actionType,w=d.activeDiscussIndex;console.log("---",d);var S=(0,f.useCallback)(l()(s()().mark((function e(){var t,r,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p({type:Pe.SHOW_DISCUSSES_LOADING}),e.next=3,we({container_type:"Practice",container_identifier:n,limit:10,page:v});case 3:t=e.sent,r=t.comments,i=t.disscuss_count,p({type:Pe.GET_DISCUSSES,payload:{data:r,count:i,loading:!1}}),o(i);case 7:case"end":return e.stop()}}),e)}))),[v,n]);function C(e){p({type:Pe.SET_ACTION_TYPE,payload:{actionType:e}})}function k(e){p(w===e?{type:Pe.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:null}}:{type:Pe.ACTIVE_DISCUSS_INDEX,payload:{activeDiscussIndex:e}})}function E(e,t,n){return T.apply(this,arguments)}function T(){return(T=l()(s()().mark((function e(t,n,r){var i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Se(t);case 3:i=e.sent,g[r].user_praise=n,g[r].praise_count=i.praise_count,p({type:Pe.PLUS_DISCUSS,payload:{data:be()(g)}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function A(){return(A=l()(s()().mark((function e(){var t,r,i,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.id,r=x.params,i=x.type,o=x.index,a=x.parentDiscussIndex,"hidden-discuss"!==i){e.next=7;break}return console.log(r,"params"),e.next=5,Ee(h()({id:t,container_type:"Practice",container_identifier:n},r));case 5:a?g[a].children[o].hidden=1==r.hidden:g[o].hidden=1==r.hidden,p({type:Pe.SET_ACTION_TYPE,payload:{actionType:null,data:be()(g)}});case 7:if("delete-discuss"!==i){e.next=13;break}return e.next=10,Te({id:t,container_type:"Practice",container_identifier:n});case 10:return p({type:Pe.SET_ACTION_TYPE,payload:{actionType:null}}),e.next=13,S();case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e,t){return I.apply(this,arguments)}function I(){return(I=l()(s()().mark((function e(t,r){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Ce({container_type:"Practice",container_identifier:n,comments:{content:r,parent_id:t}});case 3:S(),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.log(e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function N(){return(N=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return p({type:Pe.SHOW_DISCUSSES_LOADING}),e.next=3,ke({comments:{content:t},container_type:"Practice",container_identifier:n});case 3:S();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,f.useEffect)((function(){S()}),[n,v]),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"discuss-panel",children:[0===g.length?(0,D.jsx)(ce.Z,{}):(0,D.jsx)(b.Z,{spinning:m,children:g.map((function(e,n){return(0,D.jsx)(Ie,{onReplyDiscuss:M,onPlusDiscuss:E,onSetActiveDiscussIndex:k,onSetActionType:C,data:e,index:n,user:t,activeDiscussIndex:w})}))}),y>10?(0,D.jsx)("div",{className:"pagination-container mt10 mb10",children:(0,D.jsx)(ee.Z,{showQuickJumper:!0,onChange:function(e){p({type:Pe.SET_PAGE,payload:{page:e}})},current:v,total:y,showTotal:function(e){return(0,D.jsxs)("span",{style:{color:"#656F87"},children:["共",(0,D.jsx)("span",{className:"c-light-primary",children:e}),"条数据"]})}})}):null]}),(0,D.jsx)(Oe,{user_praise:r.user_praise,praise_count:r.praises_count,praisePlus:i,discuss_count:r.comments_count,onCreateDiscuss:function(e){return N.apply(this,arguments)}}),(0,D.jsxs)(L.Z,{children:[(0,D.jsx)(_.Z,{centered:!0,title:"提示",open:!!x,onOk:function(){return A.apply(this,arguments)},onCancel:function(){p({type:Pe.SET_ACTION_TYPE,payload:{actionType:null}})},children:(0,D.jsx)("p",{children:x?x.message:""})}),(0,D.jsx)(Ne.Z,{})]})]})},Fe="wrap___sgoJE",ze="head___b9a9v",He="sort___L2Zw8",Ze="btn___khuE4",We="listWarp___zZj6C",Ge="pagination___XlROP",qe="fixedRight___MuAXo",Ve="oj-width-input___RsZb6",Ke="active___BczOO",Ye="line___VC_Ry",Xe="list___n9ABd",Je="left___LVHqw",Qe="mask___fP13z",$e="right___iLe52",et="name___Oz_7h",tt="title___2Sess",nt="a___t7rIW",rt="b___Kb_45",it="des___CjMBM",ot="tag___V0PVb";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var st="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var at="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var lt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",ct=function(e){var t=e.style,n=void 0===t?{}:t,r=e.onClick,i=e.onAssist,o=e.onHide,s=e.data,a=e.active,l=e.showLine;return(0,D.jsxs)(f.Fragment,{children:[(0,D.jsxs)("div",{className:a===(null==s?void 0:s.id)?"".concat(Xe," ").concat(Ke):Xe,style:n,onClick:function(){return r(s)},children:[(null==s?void 0:s.video)&&(0,D.jsxs)("div",{className:Je,children:[(0,D.jsx)("img",{src:null==s?void 0:s.video_cover}),(0,D.jsxs)("div",{children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4="}),(0,D.jsx)("span",{children:null==s?void 0:s.video_duration})]}),(0,D.jsx)("div",{className:Qe})]}),(0,D.jsxs)("div",{className:$e,children:[(0,D.jsxs)("div",{className:et,children:[(0,D.jsx)("img",{src:C.Z.IMG_SERVER+"/images/"+(null==s?void 0:s.image_url),width:30,height:30}),(0,D.jsx)("div",{title:null==s?void 0:s.name,className:tt,children:null==s?void 0:s.name}),(null==s?void 0:s.is_authority)&&(0,D.jsx)("div",{className:rt,children:"官方"}),(null==s?void 0:s.is_excellent)&&(0,D.jsx)("div",{className:nt,children:"精选"})]}),(0,D.jsx)("div",{className:it,children:(0,D.jsx)(me.Z,{showLines:2,showTextOnly:!0,value:(null==s?void 0:s.content)||"暂无内容"})}),(0,D.jsxs)("div",{className:ot,children:[(0,D.jsxs)("span",{className:"current",onClick:function(e){e.stopPropagation(),i(s)},children:[(0,D.jsx)("img",{src:null!=s&&s.user_liker?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==":st}),(0,D.jsx)("span",{style:{color:null!=s&&s.user_liker?"#0152d9":"#656f87"},children:null==s?void 0:s.praises_count})]}),(0,D.jsxs)("span",{children:[(0,D.jsx)("img",{src:at}),(0,D.jsx)("span",{children:null==s?void 0:s.discusses_count})]}),(0,D.jsxs)("span",{children:[(0,D.jsx)("img",{src:lt}),(0,D.jsx)("span",{children:null==s?void 0:s.viewed_count})]}),(0,Ae.Ny)()&&(0,D.jsx)("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:function(e){e.stopPropagation(),o(s)},children:null!=s&&s.is_hidden?"取消隐藏":"隐藏"})]})]})]}),l&&(0,D.jsx)("div",{className:Ye})]})},ut={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"},dt=n(25399),ht=n(75673);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ft="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",pt=function(e,t){var n,r,i,o=t.payload.uploadInfo,s=void 0===o?{}:o;switch(t.type){case"addVideo":return{videoList:[].concat(be()(e.videoList),[{name:s.file.name,size:s.file.size,type:s.file.type,fileHash:s.fileHash,state:s.state,video_id:s.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}])};case"removeVideo":return{videoList:e.videoList.filter((function(e){return e.name!==t.payload.name}))};case"replaceVideo":return{videoList:t.payload};case"removeAll":default:return[];case"updateProgress":return{videoList:e.videoList.map((function(e){return e.name===t.payload.uploadInfo.file.name?h()(h()({},e),{loaded:t.payload.progressPercent,video_id:s.videoId,fileHash:s.fileHash}):e}))};case"updateTitle":return{videoList:null===(n=e.videoList)||void 0===n?void 0:n.map((function(e){return e.name===t.payload.item.name?h()(h()({},e),{title:t.payload.title}):e}))};case"updateImg":return{videoList:null===(r=e.videoList)||void 0===r?void 0:r.map((function(e){return e.name===t.payload.item.name?h()(h()({},e),{attachment_id:t.payload.attachment_id}):e}))};case"updateImg":return{videoList:null===(i=e.videoList)||void 0===i?void 0:i.map((function(e){return e.name===t.payload.item.name?h()(h()({},e),{attachment_id:t.payload.attachment_id}):e}))}}},mt=function(e){var t,n,r=e.onClose,i=e.onOk,o=e.identifier,a=e.active,c=z.Z.useForm(),d=u()(c,1)[0],p=(0,f.useState)({}),m=u()(p,2),g=m[0],b=m[1],x=(0,f.useState)(!1),S=u()(x,2),C=S[0],k=S[1],E=(0,f.useState)(!1),T=u()(E,2),L=T[0],A=T[1],M=(0,f.useReducer)(pt,{videoList:[]}),I=u()(M,2),N=I[0],R=I[1],O=(0,Ae.eY)(),j=((0,v.useParams)(),(0,f.useRef)());(0,f.useEffect)((function(){a&&B()}),[a]);var P,B=function(){var e=l()(s()().mark((function e(){var t,n,r,i,l,c,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.M3)(o,{active:a});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(l={name:null==t||null===(n=t.data)||void 0===n?void 0:n.name,content:null==t||null===(r=t.data)||void 0===r?void 0:r.content},d.setFieldsValue(l),b(l),null!=t&&null!==(i=t.data)&&void 0!==i&&null!==(i=i.videos)&&void 0!==i&&i[0]&&R({type:"replaceVideo",payload:[{video_id:null==t||null===(c=t.data)||void 0===c||null===(c=c.videos)||void 0===c||null===(c=c[0])||void 0===c?void 0:c.video_id,name:null==t||null===(u=t.data)||void 0===u||null===(u=u.videos)||void 0===u||null===(u=u[0])||void 0===u?void 0:u.title,loaded:100}]}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){var e=l()(s()().mark((function e(t){var n,r,l,c,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r={videos:N.videoList,articles:t},A(!0),!a){e.next=9;break}return r.active=a,e.next=6,(0,w.gu)(o,r);case 6:l=e.sent,e.next=12;break;case 9:return e.next=11,(0,w.bx)(o,r);case 11:l=e.sent;case 12:0===(null===(n=l)||void 0===n?void 0:n.status)&&(console.log(a||(null===(c=l)||void 0===c?void 0:c.id),44),i(a||(null===(u=l)||void 0===u?void 0:u.id))),A(!1);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(){document.getElementById("fileUpload").value=""},W=function(e){return(0,D.jsxs)("div",{className:ut.mainSucceed,children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",alt:""}),(0,D.jsx)("span",{children:"上传成功"}),(0,D.jsx)("div",{className:ut.tip,children:(0,D.jsx)(dt.Z,{getPopupContainer:function(e){return e.parentNode},title:(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{children:["1、上传视频即表示您已同意",(0,D.jsx)("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol",children:"上传内容协议"}),",不得上传未经他人授权的作品;"]}),(0,D.jsx)("div",{children:"2、不支持断点续传文件大小请勿超过1G"}),(0,D.jsx)("div",{children:"3、支持文件格式avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm、wmv"})]}),children:(0,D.jsx)("img",{src:ft,alt:""})})}),(0,D.jsxs)("div",{className:ut.del,onClick:function(){return t=e.name,n=100==e.loaded,void _.Z.confirm({title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:(0,D.jsxs)("div",{className:"tc",children:["您确认要",n?"删除":"取消上传","该视频吗?"]}),onOk:function(){Z(),R({type:"removeVideo",payload:{name:t}})}});var t,n},children:[(0,D.jsx)("i",{className:"iconfont icon-shanchu7 mr5"}),"删除视频"]})]})},G=null===(t=N.videoList)||void 0===t?void 0:t.length;return(0,D.jsxs)("div",{className:ut.listForm,children:[(0,D.jsxs)("header",{children:[a?"编辑":"发布","题解"]}),(0,D.jsxs)("section",{className:ut.scroll,id:"sss",children:[(0,D.jsxs)("div",{className:ut.formWrap,children:[" ",(0,D.jsxs)(z.Z,{form:d,scrollToFirstError:!0,layout:"vertical",onValuesChange:function(e,t){b(h()({},t))},onFinish:U,children:[(0,D.jsx)(z.Z.Item,{name:"name",label:"标题:",rules:[{required:!0,message:"请输入名称"},{max:60,message:"请输入名称最大限制60个字符"},{whitespace:!0,message:"请勿输入空格"}],children:(0,D.jsx)(F.Z,{bordered:!1,placeholder:"请输入名称最大限制60个字符",suffix:"".concat((null===(n=g.name)||void 0===n?void 0:n.length)||0,"/60")})}),(0,D.jsx)(z.Z.Item,{name:"content",label:"内容:",children:(0,D.jsx)(Re.Z,{defaultValue:g.content||"",watch:!0})})]})]}),(0,D.jsxs)("div",{className:ut.upload,children:[G?(0,D.jsx)(f.Fragment,{children:null===(P=N.videoList)||void 0===P?void 0:P.map((function(e,t){return(0,D.jsx)(f.Fragment,{children:100==e.loaded?W(e):(n=e.loaded,(0,D.jsxs)("div",{className:ut.mainLoading,children:[(0,D.jsxs)("div",{className:ut.proWarp,children:[(0,D.jsx)("div",{className:ut.pro,children:(0,D.jsx)("div",{style:{width:n}})}),(0,D.jsxs)("span",{children:[n||0,"%"]})]}),(0,D.jsx)("aside",{children:"上传中"}),(0,D.jsx)("div",{className:ut.tip,children:(0,D.jsx)(dt.Z,{getPopupContainer:function(e){return e.parentNode},title:(0,D.jsxs)("div",{children:[(0,D.jsxs)("div",{children:["1、上传视频即表示您已同意",(0,D.jsx)("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol",children:"上传内容协议"}),",不得上传未经他人授权的作品;"]}),(0,D.jsx)("div",{children:"2、不支持断点续传文件大小请勿超过1G"}),(0,D.jsx)("div",{children:"3、支持文件格式avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm、wmv"})]}),children:(0,D.jsx)("img",{src:ft,alt:""})})})]}))},t);var n}))}):(0,D.jsxs)("label",{htmlFor:"fileUpload",className:ut.main,children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",alt:""}),(0,D.jsx)("span",{children:"上传视频"})]}),(0,D.jsx)("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:function(e){var t,n=e.target.files[0];if(n){var r=n.name.toLowerCase();return r&&-1==r.indexOf(".avi")&&-1==r.indexOf(".flv")&&-1==r.indexOf(".f4v")&&-1==r.indexOf(".m4v")&&-1==r.indexOf(".mov")&&-1==r.indexOf(".mp4")&&-1==r.indexOf(".rmvb")&&-1==r.indexOf(".swf")&&-1==r.indexOf(".webm")&&-1==r.indexOf(".wmv")?(y.ZP.info("不支持的视频格式"),void Z()):n.size>1073741824?(y.ZP.info("视频大小超过".concat(1024,"M")),void Z()):null!==(t=N.videoList)&&void 0!==t&&t.find((function(e){return e.name===n.name}))?(y.ZP.info("你不能上传同一个视频文件名称,请重新选择。"),void Z()):void function(e){var t='{"Vod":{}}';k(!0),j.current?j.current.addFile(e,null,null,null,t):(0,ht.o)(null==O?void 0:O.login,"",{create:!j,addFileSuccess:function(e){R({type:"addVideo",payload:{uploadInfo:e}})},onUploadProgress:function(e,t,n){var r=Math.ceil(100*n);R({type:"updateProgress",payload:{uploadInfo:e,progressPercent:r}}),Z()},onUploadFailed:function(e){y.ZP.info("视频云服务出现异常,请重新上传。")},onUploadEnd:function(e){k(!1)},onUploadSucceed:function(e){k(!1)},onUploadError:function(e){k(!1)},gotUploader:function(n){n.addFile(e,null,null,null,t),j.current=n}})}(n)}Z()},accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"})]})]}),(0,D.jsxs)("div",{className:ut.btns,children:[(0,D.jsx)(H.ZP,{onClick:function(){_.Z.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"注意",icon:null,className:"custom-modal-divider",content:"您正在编写题解,点击关闭后,您的题解内容将不会进行保存。",onOk:r})},type:"primary",ghost:!0,children:"关闭"}),(0,D.jsx)(H.ZP,{loading:L,disabled:C,onClick:function(){return d.submit()},type:"primary",children:"发布题解"})]})]})},vt="listDetails___HpDwH",gt="head___wipEz",yt="name___qdH8S",_t="title___B0yUa",bt="a___LB6ZS",xt="b___yvOON",wt="tag___bRCso",St="btn___akBxg",Ct="scroll___JKC_q",kt="video___nEr4F",Et="html___GDNSx",Tt="g___LSOhO",Lt="btns___Ci727",At=n(458);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Mt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Dt="discuss___fk6PE",It="reply___pOmly",Nt="pagination___qEsHX",Rt=n(77019),Ot=n(5269),jt="discussItem___zcesj",Pt="wrap___ezVW4",Bt="list___EEOWp",Ut="btns___Niwl7",Ft="secondLevelDiscuss___TXG1b",zt="line___ejh2a",Ht="thirdlyLevelDiscuss___HRI5Q",Zt=function(e){var t=e.id,n=e.cb,r=(0,f.useState)(""),i=u()(r,2),o=i[0],a=i[1];return(0,D.jsxs)("aside",{className:"mt10",children:[(0,D.jsx)(Re.Z,{defaultValue:o,id:"writeForumsReviewId",onChange:function(e){a(e)},placeholder:"我要回复...",height:240}),(0,D.jsxs)(Rt.Z,{children:[(0,D.jsx)(Ot.Z,{flex:"1"}),(0,D.jsx)(Ot.Z,{children:(0,D.jsx)(H.ZP,{type:"primary",size:"middle",onClick:l()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:""===o?y.ZP.error("请输入内容"):n(t,o);case 1:case"end":return e.stop()}}),e)}))),children:"发送"})})]})]})},Wt=function(e){var t,n=e.data;return(0,D.jsxs)("div",{className:Ht,children:[(0,D.jsxs)("span",{className:"c-grey-333",children:[(0,D.jsx)("span",{className:"font 14 c-light-primary",children:null==n||null===(t=n.author)||void 0===t?void 0:t.name}),"@",(0,D.jsx)("span",{className:"font 14 c-light-primary",children:null==n?void 0:n.parent_name}),":"]}),(0,D.jsx)(me.Z,{value:null==n?void 0:n.content})]})},Gt=function(e){var t,n,r,i,o=e.data,s=e.onReplyDiscuss,a=e.thirdlyReply,l=e.setThirdlyReply,c=(0,Ae.eY)();return console.log(c,"user"),(0,D.jsxs)("div",{className:Bt,children:[(0,D.jsx)("img",{src:C.Z.IMG_SERVER+"/images/"+(null==o||null===(t=o.author)||void 0===t?void 0:t.image_url)}),(0,D.jsxs)("div",{className:Pt,children:[(0,D.jsxs)("div",{className:"font14",style:{marginBottom:6},children:[(0,D.jsx)("span",{className:"c-grey-333",children:null==o||null===(n=o.author)||void 0===n?void 0:n.name}),(null==c?void 0:c.login)!==(null==o||null===(r=o.author)||void 0===r?void 0:r.login)&&(0,D.jsxs)("span",{onClick:function(){return l(null==o?void 0:o.id)},className:"c-grey-999 current",style:{float:"right"},children:[(0,D.jsx)("i",{className:"iconfont icon-huifu3 mr3 font12"}),(0,D.jsx)("span",{children:"回复"})]})]}),(0,D.jsx)(me.Z,{value:null==o?void 0:o.content}),null==o||null===(i=o.children)||void 0===i?void 0:i.map((function(e){return(0,D.jsx)(Wt,{data:e},e.id)})),a===(null==o?void 0:o.id)&&(0,D.jsxs)("div",{children:[(0,D.jsx)(Zt,{id:null==o?void 0:o.id,cb:s}),(0,D.jsxs)("div",{style:{textAlign:"end",paddingTop:20},onClick:function(){return l(null)},className:"c-light-primary current",children:[(0,D.jsx)("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"收起回复"]})]}),(0,D.jsx)("div",{className:zt})]})]})},qt=function(e){var t,n,r,i,o=e.data,s=e.onReplyDiscuss,a=e.secondReply,l=e.setSecondReply,c=e.thirdlyReply,d=e.setThirdlyReply,h=e.onPlusDiscuss,p=(0,f.useState)(!1),m=u()(p,2),v=m[0],g=m[1];return console.log(o,"data"),(0,D.jsx)("div",{className:jt,children:(0,D.jsxs)("div",{className:Bt,children:[(0,D.jsx)("img",{src:C.Z.IMG_SERVER+"/images/"+(null==o||null===(t=o.author)||void 0===t?void 0:t.image_url)}),(0,D.jsxs)("div",{className:Pt,children:[(0,D.jsxs)("div",{className:"font14",style:{marginBottom:6},children:[(0,D.jsx)("span",{className:"c-grey-333 mr30",children:null==o||null===(n=o.author)||void 0===n?void 0:n.name}),(0,D.jsx)("span",{className:"c-grey-999",children:null==o?void 0:o.time})]}),(0,D.jsx)(me.Z,{value:null==o?void 0:o.content}),(0,D.jsxs)("div",{className:Ut,children:[(0,D.jsxs)("div",{onClick:function(){return h(null==o?void 0:o.id)},className:null!=o&&o.user_praise?"c-light-primary":"c-grey-999",children:[(0,D.jsx)("i",{className:"iconfont icon-xiaodianzan2 mr3"}),(0,D.jsx)("span",{children:null==o?void 0:o.praise_count})]}),(0,D.jsxs)("div",{onClick:function(){var e;0!==(null==o||null===(e=o.children)||void 0===e?void 0:e.length)&&(l(null),g(!v))},style:{color:v?"#0152d9":"#999999"},children:[(0,D.jsx)("i",{className:"iconfont icon-xiaopinglun2 mr3"}),(0,D.jsx)("span",{children:v?"收起评论":null==o||null===(r=o.children)||void 0===r?void 0:r.length})]}),(0,D.jsxs)("div",{onClick:function(){g(!1),l(a===(null==o?void 0:o.id)?null:null==o?void 0:o.id)},style:{color:a===(null==o?void 0:o.id)?"#0152d9":"#999999"},children:[(0,D.jsx)("i",{className:"iconfont icon-huifu3 mr3"}),(0,D.jsx)("span",{children:a===(null==o?void 0:o.id)?"收起回复":"回复"})]})]}),a===(null==o?void 0:o.id)&&(0,D.jsx)(Zt,{id:null==o?void 0:o.id,cb:function(e,t){s(e,t),g(!0)}}),v&&(0,D.jsx)("div",{className:Ft,children:null==o||null===(i=o.children)||void 0===i?void 0:i.map((function(e){return(0,D.jsx)(Gt,{thirdlyReply:c,setThirdlyReply:d,data:e,onReplyDiscuss:s},e.id)}))})]})]})})},Vt=function(e){e.identifier;var t=e.active,n=e.onOk,r=(0,f.useState)(""),i=u()(r,2),o=i[0],a=i[1],c=(0,f.useState)(1),d=u()(c,2),h=d[0],p=d[1],m=(0,f.useState)([]),v=u()(m,2),g=v[0],_=v[1],b=(0,f.useState)(0),x=u()(b,2),w=x[0],S=x[1],C=(0,f.useState)(null),k=u()(C,2),E=k[0],T=k[1],L=(0,f.useState)(null),A=u()(L,2),M=A[0],I=A[1];(0,f.useEffect)((function(){N(1),p(1)}),[t]);var N=function(){var e=l()(s()().mark((function e(n){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,we({container_type:"QuestionSolutionArticle",container_identifier:t,limit:5,page:n});case 2:null!=(r=e.sent)&&r.comments&&(_((null==r?void 0:r.comments)||[]),p(n),S(null==r?void 0:r.disscuss_count));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=l()(s()().mark((function e(){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==o){e.next=3;break}return y.ZP.error("请输入内容"),e.abrupt("return");case 3:return e.next=5,ke({comments:{content:o},container_type:"QuestionSolutionArticle",container_identifier:t});case 5:null!=(r=e.sent)&&r.discuss&&(a(""),N(h),n());case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=l()(s()().mark((function e(n,r,i){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ce({container_type:"QuestionSolutionArticle",container_identifier:t,comments:{content:r,parent_id:n}});case 2:e.sent,T(null),I(null),N(h);case 6:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),j=function(){var e=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Se(t);case 2:e.sent,N(h);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,D.jsxs)("div",{className:Dt,children:[(0,D.jsxs)("aside",{className:It,style:{borderWidth:w?1:0},children:[(0,D.jsx)(Re.Z,{defaultValue:o,id:"writeForumsReviewId",onChange:function(e){a(e)},placeholder:"我要回复...",height:240}),(0,D.jsxs)(Rt.Z,{children:[(0,D.jsx)(Ot.Z,{flex:"1"}),(0,D.jsx)(Ot.Z,{children:(0,D.jsx)(H.ZP,{type:"primary",size:"middle",onClick:function(){return R()},children:"发送"})})]})]}),null==g?void 0:g.map((function(e){return(0,D.jsx)(qt,{secondReply:E,setSecondReply:T,thirdlyReply:M,setThirdlyReply:I,data:e,onReplyDiscuss:O,onPlusDiscuss:j},e.id)})),(0,D.jsx)(ee.Z,{className:Nt,showTotal:function(e){return(0,D.jsxs)("span",{style:{color:"#656F87"},children:["共",(0,D.jsx)("span",{className:"c-light-primary",children:e}),"条数据"]})},current:h,onChange:function(e){p(e),N(e)},total:w,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5})]})},Kt=n(61422),Yt=function(e){var t,n,r,i,o,a=e.active,c=e.identifier,d=(e.onAssist,e.onEdit),p=e.onArticlesSkip,m=e.onClose,v=e.onOk,g=e.onDelete,y=e.detailsIndex,x=e.btnShowStatus,S=(0,f.useState)(!0),k=u()(S,2),E=k[0],T=k[1],L=(0,f.useState)({}),A=u()(L,2),M=A[0],I=A[1];(0,f.useEffect)((function(){a&&N()}),[a,y]);var N=function(){var e=l()(s()().mark((function e(){var t,n=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(!(n.length>0&&void 0!==n[0])||n[0])&&T(!0),e.next=4,(0,w.wO)(c,{active:a});case 4:0===(null==(t=e.sent)?void 0:t.status)&&I((null==t?void 0:t.data)||{}),T(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(){var e=l()(s()().mark((function e(t){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.qe)(c,h()({active:a},t));case 2:0===(null==(n=e.sent)?void 0:n.status)&&(N(!1),v());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),O=function(){var e=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.Rg)(c,{active:null==t?void 0:t.id});case 2:0===e.sent.status&&(N(!1),v());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,D.jsx)("div",{className:vt,children:(0,D.jsxs)(At.Z,{className:"pt20 pl20 pr20",loading:E,active:!0,paragraph:{rows:5},children:[(0,D.jsxs)("div",{className:gt,children:[(0,D.jsxs)("div",{className:yt,children:[(0,D.jsx)("div",{title:null==M?void 0:M.name,className:_t,children:null==M?void 0:M.name}),(null==M?void 0:M.is_authority)&&(0,D.jsx)("div",{className:xt,children:"官方"}),(null==M?void 0:M.is_excellent)&&(0,D.jsx)("div",{className:bt,children:"精选"})]}),(0,D.jsxs)("div",{className:wt,children:[(0,D.jsx)("img",{src:C.Z.IMG_SERVER+"/images/"+(null==M?void 0:M.image_url)}),(0,D.jsx)("div",{className:"c-grey-333 ml5 mr20 font14",children:null==M?void 0:M.username}),(0,D.jsxs)("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12",children:["发布于",se()(null==M?void 0:M.created_at).format("YYYY-MM-DD")]}),(0,D.jsxs)("span",{children:[(0,D.jsx)("img",{src:st}),(0,D.jsx)("span",{children:null==M?void 0:M.praises_count})]}),(0,D.jsxs)("span",{children:[(0,D.jsx)("img",{src:at}),(0,D.jsx)("span",{children:null==M?void 0:M.discusses_count})]}),(0,D.jsxs)("span",{children:[(0,D.jsx)("img",{src:lt}),(0,D.jsx)("span",{children:null==M?void 0:M.viewed_count})]}),(0,D.jsxs)("div",{className:St,children:[((0,Ae.Ny)()||(null==M?void 0:M.is_self))&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(H.ZP,{onClick:function(){return function(e){_.Z.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"提示",icon:null,className:"custom-modal-divider",content:"确认要删除该题解吗?",onOk:function(){return g(e)}})}(M)},type:"primary",ghost:!0,children:"删除"}),(0,D.jsx)(H.ZP,{onClick:function(){return d(M)},type:"primary",ghost:!0,children:"编辑"})]}),(0,Ae.Ny)()&&(0,D.jsxs)(H.ZP,{onClick:function(){return R({is_authority:!(null!=M&&M.is_authority)})},type:"primary",children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg=="}),null!=M&&M.is_authority?"取消":"设为","官方"]}),(0,Ae.Ny)()&&(0,D.jsxs)(H.ZP,{onClick:function(){return R({is_excellent:!(null!=M&&M.is_excellent)})},type:"primary",children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4="}),null!=M&&M.is_excellent?"取消":"设为","精选"]})]})]})]}),(0,D.jsxs)("div",{className:Ct,children:[(null==M||null===(t=M.videos)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.id)&&(0,D.jsx)("div",{className:kt,children:(0,D.jsx)(b.Z,{tip:"正在转码,请稍等...",spinning:!(null!=M&&null!==(n=M.videos)&&void 0!==n&&null!==(n=n[0])&&void 0!==n&&n.transcoded),children:(0,D.jsx)(Kt.Z,{poster:null==M||null===(r=M.videos)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.cover_url,src:(null==M||null===(i=M.videos)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.play_url)||"",videoId:null==M||null===(o=M.videos)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.id,logWatchHistory:function(){}})})}),(0,D.jsx)(me.Z,{className:Et,value:(null==M?void 0:M.content)||""}),(0,D.jsxs)("div",{onClick:function(){return O(M)},className:Tt,children:[(0,D.jsx)("img",{className:"mr10",src:(null!=M&&M.user_liker,Mt)}),(0,D.jsx)("span",{children:null==M?void 0:M.praises_count})]}),(0,D.jsx)(Vt,{onOk:function(){N(!1),v()},active:a,identifier:c})]}),(0,D.jsxs)("div",{className:Lt,children:[(0,D.jsx)(H.ZP,{onClick:function(){return m()},type:"primary",ghost:!0,children:"关闭"}),x[0]&&(0,D.jsx)(H.ZP,{onClick:function(e){return p(e,"prev")},style:{marginLeft:20},type:"primary",children:"上一题解"}),x[1]&&(0,D.jsx)(H.ZP,{onClick:function(e){return p(e,"next")},style:{marginLeft:20},type:"primary",children:"下一题解"})]})]})})};Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Xt=n(59477),Jt=n(89489),Qt=function(e){var t=e.identifier,n=e.tabStatus,r=e.setFilterListTotal,i=e.setListStatus,o={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null},a=(0,f.useState)(h()({},o)),c=u()(a,2),d=c[0],p=c[1],m=(0,f.useState)(!1),v=u()(m,2),g=v[0],_=v[1],x=(0,f.useState)(0),S=u()(x,2),C=S[0],k=S[1],E=(0,f.useState)(1),T=u()(E,2),L=T[0],A=T[1],M=(0,f.useState)(null),I=u()(M,2),N=I[0],R=I[1],O=(0,f.useState)([]),j=u()(O,2),P=j[0],B=j[1],U=(0,f.useState)([!0,!0]),z=u()(U,2),H=z[0],Z=z[1],W=(0,f.useState)(0),G=u()(W,2),q=G[0],V=G[1],K=(0,f.useRef)(null);(0,f.useEffect)((function(){te()}),[n]),(0,f.useEffect)((function(){Y()}),[N]),(0,f.useEffect)((function(){J(h()({},o)),te()}),[t]),(0,f.useEffect)((function(){return window.addEventListener("resize",X),i(q),function(){window.removeEventListener("resize",X)}}),[q]);var Y=function(){var e=l()(s()().mark((function e(){var t,n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N){e.next=3;break}return Z([!0,!0]),e.abrupt("return");case 3:t=[!0,!0],n=null==P?void 0:P.findIndex((function(e){return e.id===N})),0===n&&1===d.page&&(t[0]=!1),(d.page-1)*d.limit+(n+1)===d.total&&(t[1]=!1),Z(t);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){if(q){var e,t=window.innerWidth-(null===(e=K.current)||void 0===e?void 0:e.clientWidth);k(t)}},J=function(){var e=l()(s()().mark((function e(n){var i,o,a,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return _(!0),e.next=3,(0,w.WH)(t,n);case 3:return 0===(null==(i=e.sent)?void 0:i.status)&&(B((null==i||null===(o=i.data)||void 0===o?void 0:o.articles)||[]),p(h()(h()({},n),{},{total:null==i||null===(a=i.data)||void 0===a?void 0:a.articles_count})),r(null==i||null===(l=i.data)||void 0===l?void 0:l.articles_count)),_(!1),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e;document.getElementsByClassName("btn-resize")[0].style.visibility="hidden";var t=window.innerWidth-(null===(e=K.current)||void 0===e?void 0:e.clientWidth);k(t)},$=function(e){Q(),R(null==e?void 0:e.id),V(3)},te=function(){document.getElementsByClassName("btn-resize")[0].style.visibility="visible",k(0),V(0),R(null)},ne=function(){var e=l()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.Rg)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(J(d),A(L+1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=l()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.rL)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(J(d),A(L+1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=l()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.de)(t,{active:null==n?void 0:n.id});case 2:0===e.sent.status&&(te(),J(d));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=l()(s()().mark((function e(t,n){var r,i,o,a,l,c,u,f,m,v;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null==P?void 0:P.findIndex((function(e){return e.id===N})),console.log(r,n,22),"prev"!==n){e.next=21;break}if(void 0!==r){e.next=6;break}return y.ZP.warning("上一题解不存在"),e.abrupt("return");case 6:if(0!==r){e.next=19;break}if(1!==d.page){e.next=10;break}return y.ZP.warning("上一题解不存在"),e.abrupt("return");case 10:if(1===d.page){e.next=17;break}return d.page=d.page-1,p(h()({},d)),e.next=15,J(d);case 15:0===(null==(i=e.sent)?void 0:i.status)&&(l=null==i||null===(o=i.data)||void 0===o?void 0:o.articles[(null==i||null===(a=i.data)||void 0===a||null===(a=a.articles)||void 0===a?void 0:a.length)-1],R(null==l?void 0:l.id),console.log(t.target,555));case 17:e.next=21;break;case 19:c=P[r-1],R(null==c?void 0:c.id);case 21:if("next"!==n){e.next=39;break}if(void 0!==r){e.next=25;break}return y.ZP.warning("下一题解不存在"),e.abrupt("return");case 25:if((d.page-1)*d.limit+(r+1)!==d.total){e.next=28;break}return y.ZP.warning("下一题解不存在"),e.abrupt("return");case 28:if(r+1!==d.limit){e.next=37;break}return d.page=d.page+1,p(h()({},d)),e.next=33,J(d);case 33:0===(null==(u=e.sent)?void 0:u.status)&&(m=null==u||null===(f=u.data)||void 0===f?void 0:f.articles[0],R(null==m?void 0:m.id)),e.next=39;break;case 37:v=P[r+1],R(null==v?void 0:v.id);case 39:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,D.jsxs)("div",{className:Fe,ref:K,children:[(0,D.jsxs)("div",{className:ze,children:[(0,D.jsxs)("div",{className:He,onClick:function(){null===(null==d?void 0:d.sort_direction)?d.sort_direction="asc":"asc"===(null==d?void 0:d.sort_direction)?d.sort_direction="desc":"desc"===(null==d?void 0:d.sort_direction)&&(d.sort_direction=null),d.page=1,te(),p(h()({},d)),J(d)},children:[(0,D.jsx)("span",{children:"最新"}),(0,D.jsxs)("aside",{children:[(0,D.jsx)(Xt.Z,{style:{color:"asc"===(null==d?void 0:d.sort_direction)?"#0152d9":"#bfbfbf"}}),(0,D.jsx)(Jt.Z,{style:{color:"desc"===(null==d?void 0:d.sort_direction)?"#0152d9":"#bfbfbf"}})]})]}),(0,D.jsx)(F.Z.Search,{value:d.save_search,className:Ve,placeholder:"搜索题解",onChange:function(e){d.save_search=e.target.value,p(h()({},d))},onSearch:function(){d.page=1,d.search=null==d?void 0:d.save_search,te(),p(h()({},d)),J(d)}}),(0,D.jsxs)("div",{onClick:function(){Q(),V(1)},className:Ze,children:[(0,D.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+"}),"写题解"]})]}),(0,D.jsx)("div",{className:We,children:(0,D.jsxs)(b.Z,{spinning:g,className:"mt20",children:[null==P?void 0:P.map((function(e,t){var n=!0;return t+1===P.length&&0!==t&&(n=!1),(0,D.jsx)(ct,{active:N,data:e,showLine:n,onClick:$,onAssist:ne,onHide:re},e.id)})),0===(null==P?void 0:P.length)&&(0,D.jsx)(ce.Z,{customText:"暂时还没有相关数据哦!"})]})}),(0,D.jsx)(ee.Z,{className:Ge,showTotal:function(e){return(0,D.jsxs)("span",{style:{color:"#656F87"},children:["共",(0,D.jsx)("span",{className:"c-light-primary",children:e}),"条数据"]})},total:d.total,showSizeChanger:!1,current:null==d?void 0:d.page,onChange:function(e){d.page=e,p(h()({},d)),J(d)},hideOnSinglePage:!0,showQuickJumper:!0}),q>0&&(0,D.jsxs)("div",{className:qe,style:{width:C},children:[1===q&&(0,D.jsx)(mt,{identifier:t,onClose:te,onOk:function(e){V(3),R(e),d.page=1,p(h()({},d)),J(d)}}),2===q&&(0,D.jsx)(mt,{active:N,identifier:t,onClose:te,onOk:function(e){V(3),R(e),p(h()({},d)),J(d)}}),3===q&&(0,D.jsx)(Yt,{btnShowStatus:H,onArticlesSkip:oe,detailsIndex:L,active:N,identifier:t,onClose:te,onOk:function(e){p(h()({},d)),J(d)},onEdit:function(e){Q(),R(null==e?void 0:e.id),V(2)},onAssist:ne,onDelete:ie})]})]})},$t="wrap___UAZFM",en="head___Nl6hk",tn="title___Ir573",nn="content___xUewa",rn="list___oi2ig",on="footer___V3bwQ",sn=function(e){var t,n=e.visible,r=e.onVisible,i=e.value,o=e.onChange,a=e.setIndex,c=(0,f.useState)({page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null}),d=u()(c,2),p=d[0],m=d[1],g=(0,f.useState)([]),_=u()(g,2),S=_[0],C=_[1],k=(0,f.useState)([]),E=u()(k,2),T=E[0],L=E[1],A=(0,f.useState)(!1),M=u()(A,2),I=M[0],N=M[1],R=(0,f.useRef)([]),O=(0,f.useRef)(null),j=(0,v.useParams)();(0,f.useEffect)((function(){return null!=j&&j.id&&(O.current=setInterval((function(){P(30)}),3e4)),function(){clearInterval(O.current)}}),[]);var P=function(){var e=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.uc)(null==j?void 0:j.id,{practice_time:t});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){H(p),z()}),[]),(0,f.useEffect)((function(){return window.addEventListener("click",U),function(){window.removeEventListener("click",U)}}),[null==j?void 0:j.save_identifier,n]),(0,f.useEffect)((function(){var e=R.current.findIndex((function(e){return e.identifier===(null==j?void 0:j.save_identifier)})),t=R.current[e-1],n=R.current[e+1],r=document.getElementById("oj-prev"),i=document.getElementById("oj-next");r.style.display=t?"block":"none",i.style.display=n?"block":"none"}),[null==j?void 0:j.save_identifier,R.current]);var B=function(e,t){if(e.id===t)return e;for(var n=0,r=e;r=r.parentNode;n++){if(r.id===t)return r;if(r==document.documentElement)return!1}},U=function(){var e=l()(s()().mark((function e(t){var i,o,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!B(t.target,"oj-drawer")&&n&&r(!1),i=R.current.findIndex((function(e){return e.identifier===(null==j?void 0:j.save_identifier)})),o=R.current[i-1],l=R.current[i+1],"oj-prev"!==t.target.id){e.next=14;break}if(o&&-1!==i){e.next=8;break}return y.ZP.warning("上一题不存在"),e.abrupt("return");case 8:return t.target.style.pointerEvents="none",t.target.style.cursor="not-allowed",e.next=12,Z(null==o?void 0:o.identifier);case 12:a("0"),setTimeout((function(){t.target.style.pointerEvents="auto",t.target.style.cursor="pointer"}),400);case 14:if("oj-next"!==t.target.id&&"oj-modal-next"!==t.target.id){e.next=24;break}if(l&&-1!==i){e.next=18;break}return y.ZP.warning("下一题不存在"),e.abrupt("return");case 18:return t.target.style.pointerEvents="none",t.target.style.cursor="not-allowed",e.next=22,Z(null==l?void 0:l.identifier);case 22:a("0"),setTimeout((function(){t.target.style.pointerEvents="auto",t.target.style.cursor="pointer"}),400);case 24:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){o(null==j?void 0:j.save_identifier);var e=T.findIndex((function(e){return e.some((function(e){return e.identifier===(null==j?void 0:j.save_identifier)}))}));m(-1===e?h()(h()({},p),{},{page:1}):h()(h()({},p),{},{page:e+1}))}),[null==j?void 0:j.save_identifier,T]);var z=function(){var e=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,xe.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});case 2:t=e.sent,C(t.tag_disciplines||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=l()(s()().mark((function e(t){var n,r,i,o,a,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.next=3,(0,w.KC)(t);case 3:if(null!=(n=e.sent)&&n.practices_list){for(i=null==n||null===(r=n.practices_list)||void 0===r?void 0:r.length,o=[],a=0;a<i;a+=null==p?void 0:p.per_page)o.push(null==n||null===(l=n.practices_list)||void 0===l?void 0:l.slice(a,a+(null==p?void 0:p.per_page)));m(h()(h()({},p),{},{total:null==n?void 0:n.practices_count})),R.current=(null==n?void 0:n.practices_list)||[],L(o)}N(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Z=function(){var e=l()(s()().mark((function e(t,n){var r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,xe.ZP)("/api/practices/".concat(t,"/start"),{method:"get"});case 2:0===(null==(r=e.sent)?void 0:r.status)&&v.history.push("/problems/".concat(null==r?void 0:r.identifier,"/oj/").concat(t));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,D.jsxs)("div",{className:$t,id:"oj-drawer",style:{left:n?0:-700},children:[(0,D.jsxs)("div",{className:en,children:[(0,D.jsx)("div",{className:tn,children:"题目列表"}),(0,D.jsx)(F.Z.Search,{value:null==p?void 0:p.save_search,placeholder:"请输入题目名称搜索",style:{width:180,marginLeft:"auto",marginRight:10},onChange:function(e){p.save_search=e.target.value,m(h()({},p))},onSearch:function(){p.page=1,p.search=p.save_search,m(h()({},p)),H(p)}}),(0,D.jsx)(x.default,{value:null==p?void 0:p.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"选择知识点",showSearch:!1,showArrow:!0,getPopupContainer:function(e){return e.parentNode},maxTagTextLength:2,maxTagCount:2,onChange:function(e){p.page=1,p.tag_discipline_id=e,m(h()({},p)),H(p)},children:S.map((function(e){return(0,D.jsx)(x.default.Option,{value:e.id,children:e.name},e.id)}))}),(0,D.jsxs)(x.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"难度",getPopupContainer:function(e){return e.parentNode},value:null==p?void 0:p.difficulty,onChange:function(e){p.page=1,p.difficulty="number"==typeof e?e:null,m(h()({},p)),H(p)},children:[(0,D.jsx)(x.default.Option,{value:1,children:"简单"}),(0,D.jsx)(x.default.Option,{value:2,children:"适中"}),(0,D.jsx)(x.default.Option,{value:3,children:"困难"})]})]}),(0,D.jsx)("div",{className:nn,children:(0,D.jsx)(b.Z,{spinning:I,children:null==T||null===(t=T[p.page-1])||void 0===t?void 0:t.map((function(e){return(0,D.jsxs)("div",{className:rn,onClick:function(t){return Z(e.identifier,t)},children:[(0,D.jsx)("i",{style:{visibility:i===e.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),(0,D.jsx)("span",{style:{fontWeight:i===e.identifier?"bold":400,color:i===e.identifier?"#ffffff":"#bac4cd"},title:null==e?void 0:e.name,children:e.name}),1===(null==e?void 0:e.difficulty)&&(0,D.jsx)("b",{style:{color:"#2FA34F"},children:"简单"}),2===(null==e?void 0:e.difficulty)&&(0,D.jsx)("b",{style:{color:"#0152d9"},children:"适中"}),3===(null==e?void 0:e.difficulty)&&(0,D.jsx)("b",{style:{color:"#FA6400"},children:"困难"})]},e.identifier)}))})}),(0,D.jsx)("div",{className:on,children:(0,D.jsx)(ee.Z,{showTotal:function(e){return(0,D.jsxs)("span",{style:{color:"#656F87"},children:["共",(0,D.jsx)("span",{className:"c-light-primary",children:e}),"条数据"]})},total:p.total,pageSize:null==p?void 0:p.per_page,current:null==p?void 0:p.page,showSizeChanger:!1,onChange:function(e){p.page=e,m(h()({},p))},showQuickJumper:!0,hideOnSinglePage:!0})})]})},an=function(e){var t=e.hack,n=e.onTriggerPraise,r=e.topicId,i=e.page,o=e.onPageChange,s=e.user,a=e.submitRecords,l=e.submitting,c=e.submitResult,d=(0,v.useSearchParams)(),h=u()(d,1)[0],p=((0,v.useLocation)(),(0,f.useState)(h.get("tab")||"0")),m=u()(p,2),g=m[0],y=m[1],b=(0,f.useState)(0),x=u()(b,2),w=x[0],S=x[1],C=(0,f.useState)(0),k=u()(C,2),E=k[0],T=k[1],L=(0,f.useState)(0),A=u()(L,2),M=A[0],I=A[1],N=(0,f.useState)(),R=u()(N,2),O=R[0],j=R[1],P=(0,f.useState)(!1),B=u()(P,2),U=B[0],F=B[1];function z(e){var t=e.target.id;"3"!==g||t===g||1!==E&&2!==E?y(t):_.Z.confirm({centered:!0,width:500,okText:"确定",cancelText:"取消",title:"注意",icon:null,className:"custom-modal-divider",content:"您正在编写题解,点击关闭后,您的题解内容将不会进行保存。",onOk:function(){y(t)}})}return(0,f.useEffect)((function(){return ye.Z.subscribe("to-commit-info",(function(){y("1")}))}),[]),(0,D.jsxs)("div",{className:G,children:[(0,D.jsxs)("ul",{className:"".concat(Y," ").concat(X," ").concat(V),children:[(0,D.jsx)("li",{className:"mr40 current",children:(0,D.jsx)("img",{onClick:function(){return F(!0)},src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4="})}),(0,D.jsx)("li",{className:K,children:(0,D.jsx)("a",{className:"0"===g?J:"",id:"0",onClick:z,children:"任务描述"})}),(0,D.jsx)("li",{className:K,children:(0,D.jsxs)("a",{className:"3"===g?J:"",id:"3",onClick:z,children:["题解",M?"(".concat(M,")"):""]})}),(0,D.jsx)("li",{className:K,children:(0,D.jsxs)("a",{className:"2"===g?J:"",id:"2",onClick:z,children:["评论",w?"(".concat(w,")"):""]})}),(0,D.jsx)("li",{children:(0,D.jsx)("a",{className:"1"===g?J:"",id:"1",onClick:z,children:"提交记录"})})]}),(0,D.jsx)("div",{className:"".concat(q," ").concat("0"===g?"":"hide"),style:{padding:"0 0 0 16px"},children:(0,D.jsx)(ge,{hack:t,onTriggerPraise:n,toDiscuss:function(){y("2")}})}),(0,D.jsx)("div",{className:"".concat(q," ").concat("1"===g?"":"hide"),children:null!=a&&a.records_count?(0,D.jsx)(le,{page:i,onPageChange:o,topicId:r,submitting:l,submitRecords:a,submitResult:c}):(0,D.jsx)(ce.Z,{})}),(0,D.jsx)("div",{className:"".concat(q," ").concat("2"===g?"":"hide"),style:{padding:0},children:(0,D.jsx)(Ue,{setDiscussTotal:S,user:s,identifier:t.identifier,hack:t,onTriggerPraise:n})}),(0,D.jsx)("div",{className:"".concat(q," ").concat("3"===g?"":"hide"),style:{padding:0},children:(0,D.jsx)(Qt,{setListStatus:T,setFilterListTotal:I,tabStatus:g,identifier:t.identifier})}),(0,D.jsx)(sn,{visible:U,setIndex:y,onVisible:function(e){return F(e)},value:O,onChange:function(e){return j(e)}})]})},ln=n(91153),cn=n(62522),un=n(74469),dn=n(67566),hn=n(89392),fn=n.n(hn),pn=n(56102),mn=["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"],vn=(g.Z.Countdown,{Java:"java",C:"c",Python:"py","C++":"c"}),gn=function(e){return e[e.SET_LOADING=0]="SET_LOADING",e[e.GET_DATA=1]="GET_DATA",e[e.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",e[e.SET_DATA=3]="SET_DATA",e[e.SET_DEBUGING=4]="SET_DEBUGING",e[e.SET_SUBMITING=5]="SET_SUBMITING",e[e.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",e[e.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",e[e.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",e[e.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",e[e.SET_PAGE=10]="SET_PAGE",e[e.GET_LANGUAGE=11]="GET_LANGUAGE",e[e.GET_DRAWER=12]="GET_DRAWER",e}(gn||{});function yn(){return(new Date).getTime()}var _n={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 bn(e,t){switch(t.type){case gn.GET_DATA:return h()(h()({},e),t.payload);case gn.SET_DATA:return h()(h()({},e),{},{data:t.payload});case gn.SET_LOADING:return h()(h()({},e),{},{loading:t.payload});case gn.GET_LANGUAGE:return h()(h()({},e),{},{languageList:t.payload});case gn.GET_DRAWER:return h()(h()({},e),{},{drawerData:t.payload});case gn.SET_SHOW_NOTE:return h()(h()({},e),{},{showNote:t.payload});case gn.SET_DEBUGING:return h()(h()({},e),{},{debuging:t.payload});case gn.SET_SUBMITING:return h()(h()({},e),{},{submitting:t.payload});case gn.GET_SUBMIT_RECORDS:return h()(h()({},e),{},{submitRecords:t.payload});case gn.SET_PAGE:return h()(h()({},e),{},{submitRecordPage:t.payload});case gn.SET_EXECUTE_MESSAGE:return h()(h()({},e),{},{executingMessage:t.payload});case gn.SET_EXECUTE_RESULT:case gn.SET_SUBMIT_RESULT:return h()(h()({},e),t.payload);default:throw new Error}}var xn=function(e){e.children;var t,n,r,i,o=(0,f.useReducer)(bn,_n),a=u()(o,2),c=a[0],d=a[1],g=(0,v.useParams)().id,x=(0,v.useLocation)(),k=(0,v.useSearchParams)(),E=u()(k,1)[0],T=c.languageValue,L=c.languageList,A=c.loading,M=c.data,I=c.debugResult,N=c.submitResult,R=c.submitRecords,O=c.submitRecordPage,j=c.showNote,U=c.debuging,F=c.submitting,z=c.executingMessage,H=(0,f.useState)("#FFF"),Z=u()(H,2),W=(Z[0],Z[1],(0,f.useState)(null)),G=u()(W,2),q=(G[0],G[1],(0,f.useState)({})),V=u()(q,2),K=(V[0],V[1],(0,f.useState)(!1)),Y=u()(K,2),X=Y[0],J=Y[1],Q=(0,f.useRef)(null),$=(0,f.useRef)(null),ee=null==M?void 0:M.user,te=null==M?void 0:M.hack;(0,f.useEffect)((function(){return(0,v.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,v.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),function(){(0,v.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,v.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}}),[]),(0,f.useEffect)((function(){setTimeout((function(){document.title="在线刷题"}),400)})),(0,f.useEffect)((function(){if(X){var e,t=document.getElementById("oj-next"),n=document.getElementById("oj-modal-next");"none"===(null==t||null===(e=t.style)||void 0===e?void 0:e.display)?n.style.display="none":n.style.display="block"}}),[X]),(0,f.useEffect)((function(){function e(){return(e=l()(s()().mark((function e(){var t,n,r,i,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.fu)(g);case 2:401===(t=e.sent).status?document.location.href="/user/login":(t.hack=t.practice,t.hack.code=P.Base64.decode(null==t||null===(n=t.hack)||void 0===n?void 0:n.code),o="".concat(null==ee?void 0:ee.login,"-language"),localStorage.getItem(o)&&(t.hack.language=localStorage.getItem(o)),$.current=fn().cloneDeep(t),$.current.language=null==t||null===(r=t.hack)||void 0===r?void 0:r.language,d({type:gn.GET_DATA,payload:{loading:!1,data:t}}),d({type:gn.SET_SUBMIT_RESULT,payload:{languageValue:null==t||null===(i=t.hack)||void 0===i?void 0:i.language}}));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}g&&function(){e.apply(this,arguments)}()}),[g]),(0,f.useEffect)((function(){d({type:gn.SET_SUBMIT_RESULT,payload:{debugResult:void 0}}),re(),J(!1)}),[g]),(0,f.useEffect)((function(){clearTimeout(Q.current)}),[g]),(0,f.useEffect)((function(){!function(){ne.apply(this,arguments)}()}),[g,O]);function ne(){return(ne=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.zO)(g,{limit:15,page:O});case 3:t=e.sent,d({type:gn.GET_SUBMIT_RECORDS,payload:t}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function re(){return ie.apply(this,arguments)}function ie(){return(ie=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.dd)(g);case 3:t=e.sent,d({type:gn.GET_LANGUAGE,payload:null==t?void 0:t.data}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function oe(e){return se.apply(this,arguments)}function se(){return(se=l()(s()().mark((function e(t){var n,r,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(null===(n=window)||void 0===n||null===(n=n.location)||void 0===n||null===(n=n.pathname)||void 0===n||null===(n=n.split("/"))||void 0===n?void 0:n[2])||g,e.next=3,(0,w.n4)(r,t||{code:P.Base64.encode(te.code),language:T});case 3:return i=e.sent,e.abrupt("return",i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ae(){return ae=l()(s()().mark((function e(){var t,n,r,i,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(te.code&&""!==(null===(t=te.code)||void 0===t?void 0:t.trim())){e.next=3;break}return y.ZP.warning({key:"emptyContent",content:"代码不能为空,请先编写代码后,再进行评测!"}),e.abrupt("return");case 3:if(!F){e.next=5;break}return e.abrupt("return");case 5:return d({type:gn.SET_SUBMITING,payload:!0}),e.prev=6,ye.Z.publish("to-commit-info"),e.next=10,oe();case 10:if(0!==e.sent.status){e.next=23;break}return n=function(){var e=l()(s()().mark((function e(){var t,r,l,u,f,p;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.rX)(g,"submit");case 2:if(t=e.sent,r=t.status,l=t.data,u=yn(),f=u-a>1e3*(i*o+3),0===r||f||setTimeout(n,1e3),!f){e.next=12;break}return _.Z.error({centered:!0,okText:"知道啦",title:"评测代码超时"}),d({type:gn.SET_SUBMITING,payload:!1}),e.abrupt("return");case 12:if(0!==r){e.next=19;break}return 2===l.status&&_.Z.error({centered:!0,okText:"知道啦",title:"评测代码超时"}),e.next=16,(0,w.zO)(g,{limit:15,page:O});case 16:p=e.sent,d({type:gn.SET_SUBMIT_RESULT,payload:h()(h()({},c),{},{submitResult:l,submitting:!1,submitRecords:p})}),0===(null==l?void 0:l.status)&&J(!0);case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r={},e.next=16,(0,w.bM)(g,r);case 16:if(-1!==e.sent.status||!E.get("exercisesId")){e.next=20;break}return window.parent.location.href="/classrooms/".concat(E.get("coursesId"),"/exercise/").concat(E.get("exercisesId"),"/detail"),e.abrupt("return");case 20:i=te.time_limit,o=te.test_case_size,a=yn(),n();case 23:e.next=28;break;case 25:e.prev=25,e.t0=e.catch(6),d({type:gn.SET_SUBMITING,payload:!1});case 28:case"end":return e.stop()}}),e,null,[[6,25]])}))),ae.apply(this,arguments)}function le(){return le=l()(s()().mark((function e(){var t,n,r,i,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(te.code&&""!==(null===(t=te.code)||void 0===t?void 0:t.trim())){e.next=3;break}return y.ZP.warning({key:"emptyContent",content:"代码不能为空,请先编写代码后,再进行评测!"}),e.abrupt("return");case 3:return c.debuging=!0,d({type:gn.SET_DEBUGING,payload:!0}),e.prev=6,e.next=9,oe();case 9:if(0!==e.sent.status){e.next=24;break}return n=function(){var e=l()(s()().mark((function e(){var t,i,a,l,u,f;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.rX)(g,"debug");case 2:if(t=e.sent,i=t.status,a=t.message,l=t.data,u=yn(),f=u-o>1e3*(r+3),0===i||f||(d({type:gn.SET_EXECUTE_MESSAGE,payload:a}),setTimeout(n,1e3)),!f){e.next=13;break}return _.Z.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),d({type:gn.SET_DEBUGING,payload:!1}),e.abrupt("return");case 13:0===i&&(d({type:gn.SET_DEBUGING,payload:!1}),2===l.status&&_.Z.error({centered:!0,okText:"知道啦",content:"调试代码超时"}),d({type:gn.SET_EXECUTE_RESULT,payload:h()(h()({},c),{},{debugResult:l,debuging:!1})}));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),r=te.time_limit,i={input:encodeURIComponent(M.test_case.input)},e.next=16,(0,w.MU)(g,i);case 16:if(-1!==e.sent.status||!E.get("exercisesId")){e.next=20;break}return window.parent.location.href="/classrooms/".concat(E.get("coursesId"),"/exercise/").concat(E.get("exercisesId"),"/detail"),e.abrupt("return");case 20:o=yn(),n(),e.next=25;break;case 24:d({type:gn.SET_DEBUGING,payload:!1});case 25:e.next=30;break;case 27:e.prev=27,e.t0=e.catch(6),console.log(e.t0);case 30:return e.prev=30,e.finish(30);case 32:case"end":return e.stop()}}),e,null,[[6,27,30,32]])}))),le.apply(this,arguments)}function ce(e){var t;clearTimeout(Q.current),Q.current=setTimeout((function(){var t;oe({code:P.Base64.encode(e),language:null==$||null===(t=$.current)||void 0===t?void 0:t.language})}),2e3),d({type:gn.SET_DATA,payload:h()(h()({},null==$?void 0:$.current),{},{hack:h()(h()({},null==$||null===(t=$.current)||void 0===t?void 0:t.hack),{},{code:e})})})}var ue=function(){var e=l()(s()().mark((function e(t){var n,r,i,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d({type:gn.SET_LOADING,payload:!0}),e.next=3,oe();case 3:if(0!==e.sent.status){e.next=13;break}return d({type:gn.SET_SUBMIT_RESULT,payload:{languageValue:t}}),$.current.language=t,n="".concat(null==ee?void 0:ee.login,"-language"),localStorage.setItem(n,t),e.next=11,(0,w.dd)(g);case 11:0===(r=e.sent).status&&(o=null==r||null===(i=r.data)||void 0===i?void 0:i.find((function(e){return e.language===t})),ce(P.Base64.decode(o.code)));case 13:setTimeout((function(){d({type:gn.SET_LOADING,payload:!1})}),300);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function de(){return(de=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.H7)(g,{language:T});case 3:401===(t=e.sent).status?v.history.replace("/login",{from:x.pathname}):(ce(P.Base64.decode(t.code)),re()),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function he(){return(he=l()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.MK)(g,t);case 2:d({type:gn.GET_DATA,payload:{showNote:!1,data:h()(h()({},M),{},{hack:h()(h()({},te),{},{notes:t.notes})})}});case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var fe={input:null==M||null===(t=M.test_case)||void 0===t?void 0:t.input,is_file:null==M||null===(n=M.test_case)||void 0===n?void 0:n.is_file,language:(null===(r=$.current)||void 0===r?void 0:r.language)||(null==te?void 0:te.language),code:null==te?void 0:te.code,title:"main."+vn[null==te?void 0:te.language],modify_code:null==te?void 0:te.modify_code,notes:null==te?void 0:te.notes,debugResult:I,debuging:U,submitting:F,executingMessage:z,id:g,languageValue:T,languageList:L,onChangeLanguage:ue,onCancelNote:function(){d({type:gn.SET_SHOW_NOTE,payload:!1})},onAddNote:function(e){return he.apply(this,arguments)},showNote:j,onShowNote:function(){d({type:gn.SET_SHOW_NOTE,payload:!0})},onSubmitCode:function(){return ae.apply(this,arguments)},onChangeCode:ce,onChangeInput:function(e){var t=e.target.value;d({type:gn.SET_DATA,payload:h()(h()({},M),{},{test_case:{input:t}})})},onDebugCode:function(){return le.apply(this,arguments)},onResetCode:function(){return de.apply(this,arguments)},onSyncCode:function(){_.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,D.jsxs)("p",{children:["初始代码有修改,更新后将覆盖现有代码哦~ ",(0,D.jsx)("br",{}),"请将您编辑的代码保存至本地,以防丢失"]}),onOk:function(){return l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.fi)(g,{language:T});case 2:401===(t=e.sent).status?v.history.replace("/login",{from:x.pathname}):ce(P.Base64.decode(t.code));case 4:case"end":return e.stop()}}),e)})))()}})},onUpdateCode:oe};function pe(){return(pe=l()(s()().mark((function e(){var t,n,r;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.vl)(te.id,{container_type:"Hack",type:1});case 2:t=e.sent,n=t.praise_count,r=h()(h()({},M),{},{hack:h()(h()({},te),{},{praises_count:n,user_praise:!te.user_praise})}),d({type:gn.SET_DATA,payload:r});case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var me={topicId:g,submitResult:N,submitRecords:R,submitting:F,page:O,onPageChange:function(e){d({type:gn.SET_PAGE,payload:e})},hack:te,user:null==M?void 0:M.user,onTriggerPraise:function(){return pe.apply(this,arguments)}};return console.log(M,null==$?void 0:$.current,"data--------"),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(b.Z,{className:"oj-custom-large-spin",size:"large",spinning:A,children:M?(0,D.jsxs)("div",{className:"oj-custom-warp",children:[(0,D.jsxs)("header",{className:B.Z.header,style:{minWidth:1200},children:[(0,D.jsxs)("div",{children:[(0,D.jsx)("img",{src:"".concat(C.Z.IMG_SERVER,"/images/").concat(ee.image_url),alt:"user",width:30}),(0,D.jsx)("span",{children:ee.name})]}),(0,D.jsxs)("h2",{className:"flex-wrp flex_box_column flex_box_center",children:[(0,D.jsx)("div",{children:te.name}),(0,D.jsx)(ln.Z,{onChange:function(e){},className:"font12 c-grey-999"})]}),(0,D.jsx)(pn.CopyToClipboard,{text:"".concat(null===(i=window.location)||void 0===i?void 0:i.origin,"/problems/").concat(te.identifier,"/share"),onCopy:function(){return y.ZP.success("复制题目链接成功")},children:(0,D.jsxs)("span",{className:B.Z.btn_back,style:{marginRight:10,cursor:"pointer"},children:[" ",(0,D.jsx)("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"分享题目"]})}),te.edit_privilege?(0,D.jsxs)(v.Link,{className:B.Z.btn_back,to:"/problems/".concat(te.identifier,"/ojedit"),style:{marginRight:10},children:[" ",(0,D.jsx)(p.Z,{})," 编辑"]}):null,(0,D.jsxs)(v.Link,{className:B.Z.btn_back,onClick:function(){},to:"/problems",children:[" ",(0,D.jsx)(m.Z,{}),"退出"]})]}),(0,D.jsx)(S.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:(0,D.jsx)(an,h()({},me)),rightChild:(0,D.jsx)(Sn,h()({},fe))})]}):null}),(0,D.jsx)(_.Z,{centered:!0,closable:!1,width:680,footer:null,open:X,className:"oj-modal",children:(0,D.jsxs)("section",{className:"oj-modal-content",children:[(0,D.jsxs)("div",{className:"oj-modal-head",children:[(0,D.jsx)("img",{src:cn,alt:""}),(0,D.jsx)("i",{onClick:function(){return J(!1)},className:"iconfont icon-guanbi1"})]}),(0,D.jsxs)("aside",{children:[(0,D.jsx)("img",{className:"mr30",src:dn.Z}),"运行时间: ",(0,D.jsxs)("span",{style:{color:"#75d6ba",marginRight:100},children:[null==N?void 0:N.execute_time,"s"]}),"优于",(0,D.jsxs)("span",{style:{color:"#f3b087",margin:"0 5px"},children:[(null==N?void 0:N.time_better_than)||100,"%"]}),"的用户"]}),(0,D.jsxs)("aside",{className:"mb50",children:[(0,D.jsx)("img",{src:un.Z,className:"mr30"}),(0,D.jsxs)("span",{className:"oj-modal-tt",children:[(0,D.jsxs)("span",{children:[(0,D.jsx)("span",{children:"占用内存: "}),(0,D.jsxs)("span",{className:"c-light-primary",children:[null==N?void 0:N.execute_memory,"mb"]})]}),(0,D.jsx)("span",{children:(0,D.jsx)("span",{})})]}),"优于",(0,D.jsxs)("span",{style:{color:"#f3b087",margin:"0 5px"},children:[(null==N?void 0:N.memory_better_than)||100,"%"]}),"的用户"]}),(0,D.jsx)("div",{id:"oj-modal-next",className:"oj-modal-btn",children:"进入下一题"})]})})]})};function wn(e){var t=e.languageValue,n=e.languageList,r=e.onChangeLanguage,i=(e.title,e.modify_code,e.onSyncCode,e.onShowCodeSetting),o=e.onResetCode;(0,v.useLocation)();return(0,D.jsxs)("div",{className:"action-bar",children:[(0,D.jsx)(x.default,{className:"oj-select",value:t,style:{width:100},placeholder:"选择语言",onChange:r,children:null==n?void 0:n.map((function(e){return(0,D.jsx)(x.default.Option,{value:e.language,children:e.language},e.language)}))}),(0,D.jsx)("span",{}),(0,D.jsx)("a",{title:"恢复初始代码",onClick:function(){_.Z.confirm({title:"恢复初始代码",icon:(0,D.jsx)(k.Z,{}),content:"你在本文件中修改的内容将丢失,是否确定重新加载初始代码?",centered:!0,okText:"确定",cancelText:"取消",onOk:o})},children:(0,D.jsx)("i",{className:"iconfont icon-zhongzhi font-20 "})}),(0,D.jsx)("a",{onClick:i,children:(0,D.jsx)("i",{className:"iconfont icon-shezhi"})})]})}function Sn(e){var t=e.id,n=e.input,r=e.is_file,o=e.showNote,s=(e.onShowNote,e.notes),a=e.onCancelNote,l=e.onAddNote,c=e.debugResult,u=e.language,d=e.debuging,f=e.submitting,p=e.executingMessage,m=e.code,v=e.onSubmitCode,g=e.onDebugCode,y=e.onChangeCode,_=e.onChangeInput,b=(e.onUpdateCode,i()(e,mn));var x={id:t,input:n,debugResult:c,debuging:d,is_file:r,submitting:f,executingMessage:p,onDebugCode:g,onChangeCode:y,onSubmitCode:v,onChangeInput:_};return(0,D.jsxs)("div",{className:"right-panel",children:[(0,D.jsx)(O,{onUpdateCode:function(){},language:u,value:m,onChange:y,ActionBarRender:function(e){return(0,D.jsx)(wn,h()(h()({},b),{},{onShowCodeSetting:e}))}}),(0,D.jsx)("div",{className:"note-form-area ".concat(o?"active":""),children:(0,D.jsx)(W,{onCancel:a,notes:s,callback:l})}),(0,D.jsx)(U.ZP,h()({},x))]})}},77309:function(e,t,n){"use strict";n.d(t,{h:function(){return r}});var r=function(e){return e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE",e[e.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",e}({})},20935:function(e,t,n){"use strict";n.d(t,{H7:function(){return d},KC:function(){return v},M3:function(){return b},MK:function(){return u},MU:function(){return s},Rg:function(){return S},WH:function(){return g},X6:function(){return l},bM:function(){return o},bx:function(){return y},dd:function(){return p},de:function(){return k},fi:function(){return h},fu:function(){return i},gu:function(){return _},n4:function(){return f},qe:function(){return w},rL:function(){return C},rX:function(){return c},uc:function(){return E},vl:function(){return m},wO:function(){return x},zO:function(){return a}});var r=n(67310);function i(e){return(0,r.U2)("mypractices/".concat(e,".json"),{hidePopLogin:!0})}function o(e,t){return(0,r.v_)("mypractices/".concat(e,"/code_submit.json"),t)}function s(e,t){return(0,r.v_)("mypractices/".concat(e,"/code_debug.json"),t)}function a(e,t){return t.language&&(t.language=encodeURIComponent(t.language)),(0,r.U2)("mypractices/".concat(e,"/submit_records.json"),t)}function l(e){return(0,r.U2)("mypractices/record_detail.json",{id:e})}function c(e,t){return(0,r.U2)("mypractices/".concat(e,"/result.json"),{mode:t})}function u(e,t){return(0,r.v_)("mypractices/".concat(e,"/add_notes.json"),t)}function d(e,t){return(0,r.v_)("mypractices/".concat(e,"/restore_initial_code.json"),t)}function h(e,t){return(0,r.v_)("mypractices/".concat(e,"/sync_code.json"),t)}function f(e,t){return(0,r.v_)("mypractices/".concat(e,"/update_code.json"),t)}function p(e){return(0,r.v_)("mypractices/".concat(e,"/initial_codes.json"))}function m(e,t){return(0,r.v_)("discusses/".concat(e,"/plus.json"),t)}function v(e){return(0,r.U2)("practices/practices_list.json",e)}function g(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles"),t)}function y(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles"),t)}function _(e,t){return(0,r.gz)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function b(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/edit"),t)}function x(e,t){return(0,r.U2)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function w(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/set_authority_or_excellent"),t)}function S(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/praise_or_treads"),t)}function C(e,t){return(0,r.v_)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active,"/hide"))}function k(e,t){return(0,r.IV)("practices/".concat(e,"/question_solution_articles/").concat(null==t?void 0:t.active),t)}function E(e,t){return(0,r.v_)("mypractices/".concat(e,"/update_practice_time_sum"),t)}},37092:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(7557),i=n.n(r),o=n(41498),s=n.n(o),a=n(79800),l=n.n(a),c=n(59301),u=n(6767),d=n(25399),h=n(29787),f=n(77019),p=n(5269),m=n(13747),v=n(99571),g=n(15409),y=n(67310),_=n(76603),b=n(37712),x=function(e){var t=e.id,n=e.activeDiscussIndex,r=e.onReplyDiscuss,i=e.adminOrOperator,o=(0,c.useState)(""),s=l()(o,2),a=s[0],h=s[1],f=(0,c.useState)(!1),p=l()(f,2),m=p[0],v=p[1];function y(e){h(e)}return(0,c.useEffect)((function(){n!=t&&v(!1)}),[n]),(0,b.jsxs)("div",{className:"discuss-item-editor",style:{display:n===t?"block":"none",width:"100%"},children:[(0,b.jsx)(g.Z,{miniToolbar:!0,startInit:n===t,defaultValue:a,id:t,noStorage:!0,watch:!1,height:155,placeholder:"我要回复",showResizeBar:!0,onChange:y,extraUse:i&&(0,b.jsx)(d.Z,{color:"#fff",open:m,destroyTooltipOnHide:!0,title:w({id:t,isOpen:m,activeDiscussIndex:n,onChange:y,setIsOpen:v}),overlayStyle:{maxWidth:600},children:(0,b.jsx)("a",{title:m?"关闭推荐":"打开推荐",onClick:function(){return v(!m)},children:(0,b.jsx)("i",{className:"iconfont icon-dianzan11"})})})}),(0,b.jsx)("a",{onClick:function(){a?(r(t,a),h("")):u.ZP.info("回复内容不能为空!")},className:"btn-send",children:"发送"})]},t)},w=function(e){var t=(0,c.useState)(!1),n=l()(t,2),r=n[0],o=n[1],a=(0,c.useState)([]),u=l()(a,2),d=u[0],g=u[1],x=(0,c.useState)(1),w=l()(x,2),S=w[0],C=w[1];(0,c.useEffect)((function(){null!=e&&e.isOpen?k():(C(1),g([]))}),[null==e?void 0:e.isOpen]);var k=function(){var t=s()(i()().mark((function t(){var n;return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o(!0),t.next=3,(0,y.ZP)("/api/discusses/".concat(null==e?void 0:e.id,"/recommend_answer.json"),{method:"get"});case 3:0==(null==(n=t.sent)?void 0:n.status)&&g(null==n?void 0:n.answer),o(!1);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,b.jsx)(h.Z,{spinning:r,children:(0,b.jsxs)("div",{style:{color:"#000"},children:[(0,b.jsx)(_.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(null==d?void 0:d[S-1])||""}),(0,b.jsxs)(f.Z,{justify:"end",align:"middle",children:[(0,b.jsx)(p.Z,{children:(0,b.jsx)(m.Z,{simple:!0,current:S,pageSize:1,total:(null==d?void 0:d.length)||0,onChange:function(e){C(e)}})}),(0,b.jsx)(p.Z,{children:(0,b.jsx)(v.ZP,{onClick:s()(i()().mark((function t(){return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:null==e||e.onChange(null==d?void 0:d[S-1]),null==e||e.setIsOpen(!1);case 2:case"end":return t.stop()}}),t)}))),children:"填入文本框"})})]})]})})}},75673:function(e,t,n){"use strict";n.d(t,{o:function(){return u}});var r,i=n(67310),o=n(93125),s=n.n(o),a="",l="";function c(e){!function(e){r=new(s().Vod)({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(t){console.log("addFileSuccess: "+t.file.name),e.addFileSuccess&&e.addFileSuccess(t),r.startUpload()},onUploadstarted:function(t){var n=t.file.name;if(t.videoId){var o="/api/users/".concat(a,"/video_auths.json");(0,i.ZP)(o,{method:"put",body:{video_id:t.videoId,title:n,file_name:n,virtual_classroom_id:l}}).then((function(n){if(-1!=n.status){var i=n.data,o=i.UploadAuth,s=i.UploadAddress;i.VideoId;r.setUploadAuthAndAddress(t,o,s)}else e.onUploadError&&e.onUploadError(t)})).catch((function(e){r.deleteFile(r._curIndex),r.nextUpload(),console.log(e)}))}else{var s="/api/users/".concat(a,"/video_auths.json"),c="";(0,i.ZP)(s,{method:"Post",body:{title:c+n,file_name:c+n,virtual_classroom_id:l}}).then((function(e){if(e){var n=e.data,i=n.UploadAuth,o=n.UploadAddress,s=n.VideoId;r.setUploadAuthAndAddress(t,i,o,s)}})).catch((function(e){r.deleteFile(r._curIndex),r.nextUpload(),console.log(e)})),console.log("文件开始上传...")}},onUploadSucceed:function(t){e.onUploadSucceed&&e.onUploadSucceed(t),console.log("文件上传成功!")},onUploadFailed:function(t,n,r){e.onUploadFailed&&e.onUploadFailed(t),console.log("文件上传失败!")},onUploadCanceled:function(e,t,n){console.log("文件上传已暂停!")},onUploadProgress:function(t,n,r){e.onUploadProgress&&e.onUploadProgress(t,n,r);Math.ceil(100*r);console.log("文件上传中...")},onUploadTokenExpired:function(e){console.log("文件上传超时!");var t="/api/users/".concat(a,"/video_auths.json");(0,i.ZP)(t,{method:"put",body:{video_id:e.videoId}}).then((function(e){var t=e.data.UploadAuth;r.resumeUploadWithAuth(t)})).catch((function(e){console.log(e)}))},onUploadEnd:function(t){e.onUploadEnd&&e.onUploadEnd(t),console.log("onUploadEnd: uploaded all the files")}}),e.gotUploader&&e.gotUploader(r)}(e)}function u(e,t,n){e&&(a=e),t&&(l=t),c(n)}},66860:function(e,t,n){"use strict";function r(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function i(){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()}n.d(t,{BU:function(){return i},Dj:function(){return r},gH:function(){return o},vp:function(){return s}});var o=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function s(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",e),window.isFullScreen?window.isFullScreen:null!=e}},90969:function(e,t,n){"use strict";n.d(t,{AL:function(){return S},Iy:function(){return f},Qv:function(){return v},ez:function(){return w},jb:function(){return p}});var r=n(79800),i=n.n(r),o=n(32834),s=n.n(o),a=n(11690),l=1;var c=[],u=["<ul>"],d=new(s().Renderer),h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function f(){c.length=0,u=["<ul>"]}var p={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(e,t,n,r){if(t>=e.length||e[t].level<=n)return t;var i=e[t];r.push("<li><a href='#"+l+i.anchor+"'>"+i.text+"</a>");var o=[];return t=m(e,++t,i.level,o),o.length>0&&(r.push("<ul>"),o.forEach((function(e){r.push(e)})),r.push("</ul>")),r.push("</li>"),t=m(e,t,n,r)}function v(){return m(c,0,0,u),u.push("</ul>"),u.join("")}var g={heading:function(e){var t=h.exec(e);if(l+=1,t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:i()(t,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||""),o=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(o)>=0){var s=b(),a=r;r=s,x[s]={type:"block",expression:a}}return{type:"code",raw:n,lang:o,text:r}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,_=0,b=function(){return"__special_katext_id_".concat(_++,"__")},x={};function w(){return x}function S(){_=0,x={}}function C(e){return e=e.replace(y,(function(e,t){var n=b();return x[n]={type:"inline",expression:t},n}))}var k=d.listitem;d.listitem=function(e){return k(C(e))};var E=d.paragraph;d.paragraph=function(e){return E(C(e))};var T=d.tablecell;d.tablecell=function(e,t){return T(C(e),t)},d.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,a.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,a.escape)(e,!0))+"</code></pre>"},d.heading=function(e,t,n){var r=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:r,level:t,text:e}),"<h"+t+' id="'+l+r+'">'+e+"</h"+t+">"},s().setOptions({silent:!0,gfm:!0,pedantic:!1}),s().use({tokenizer:g,renderer:d}),t.ZP=s()},37748:function(e,t,n){"use strict";n.d(t,{G:function(){return s},t:function(){return o}});var r=n(7062),i=n.n(r);function o(e,t){var n=i().get("__ec");n||(n={}),n[e]=t,i().set("__ec",n)}function s(e,t){var n=i().get("__ec");return n?void 0===n[e]?t:n[e]:t}},84201:function(e,t,n){"use strict";n.d(t,{Z:function(){return Se}});var r=n(31468),i=n.n(r),o=n(82100),s=n.n(o),a=n(29186),l=n.n(a),c=function(){function e(){s()(this,e)}return l()(e,null,[{key:"install",value:function(){Object.setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Object.assign=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])}return t},"function"!=typeof self.Promise&&n(3867).polyfill()}}]),e}();c.install();var u=c,d=n(86204),h=n.n(d),f=function(){function e(){s()(this,e)}return l()(e,null,[{key:"e",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","error",r),e.ENABLE_ERROR&&(console.error?console.error(r):console.warn?console.warn(r):console.log(r))}},{key:"i",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","info",r),e.ENABLE_INFO&&(console.info?console.info(r):console.log(r))}},{key:"w",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","warn",r),e.ENABLE_WARN&&(console.warn?console.warn(r):console.log(r))}},{key:"d",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","debug",r),e.ENABLE_DEBUG&&(console.debug?console.debug(r):console.log(r))}},{key:"v",value:function(t,n){t&&!e.FORCE_GLOBAL_TAG||(t=e.GLOBAL_TAG);var r="[".concat(t,"] > ").concat(n);e.ENABLE_CALLBACK&&e.emitter.emit("log","verbose",r),e.ENABLE_VERBOSE&&console.log(r)}}]),e}();f.GLOBAL_TAG="flv.js",f.FORCE_GLOBAL_TAG=!1,f.ENABLE_ERROR=!0,f.ENABLE_INFO=!0,f.ENABLE_WARN=!0,f.ENABLE_DEBUG=!0,f.ENABLE_VERBOSE=!0,f.ENABLE_CALLBACK=!1,f.emitter=new(h());var p=f,m=function(){function e(){s()(this,e),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}return l()(e,[{key:"reset",value:function(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}},{key:"addBytes",value:function(e){0===this._firstCheckpoint?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=e,this._totalBytes+=e):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=e,this._totalBytes+=e):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=e,this._totalBytes+=e,this._lastCheckpoint=this._now())}},{key:"currentKBps",get:function(){this.addBytes(0);var e=(this._now()-this._lastCheckpoint)/1e3;return 0==e&&(e=1),this._intervalBytes/e/1024}},{key:"lastSecondKBps",get:function(){return this.addBytes(0),0!==this._lastSecondBytes?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}},{key:"averageKBps",get:function(){var e=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/e/1024}}]),e}(),v=n(80619),g=n.n(v),y=n(47074),_=n.n(y),b=function(){function e(t){s()(this,e),this._message=t}return l()(e,[{key:"name",get:function(){return"RuntimeException"}},{key:"message",get:function(){return this._message}},{key:"toString",value:function(){return this.name+": "+this.message}}]),e}(),x=function(e){g()(n,e);var t=_()(n);function n(e){return s()(this,n),t.call(this,e)}return l()(n,[{key:"name",get:function(){return"IllegalStateException"}}]),n}(b),w=function(e){g()(n,e);var t=_()(n);function n(e){return s()(this,n),t.call(this,e)}return l()(n,[{key:"name",get:function(){return"InvalidArgumentException"}}]),n}(b),S=function(e){g()(n,e);var t=_()(n);function n(e){return s()(this,n),t.call(this,e)}return l()(n,[{key:"name",get:function(){return"NotImplementedException"}}]),n}(b),C={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},k={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"},E=function(){function e(t){s()(this,e),this._type=t||"undefined",this._status=C.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}return l()(e,[{key:"destroy",value:function(){this._status=C.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}},{key:"isWorking",value:function(){return this._status===C.kConnecting||this._status===C.kBuffering}},{key:"type",get:function(){return this._type}},{key:"status",get:function(){return this._status}},{key:"needStashBuffer",get:function(){return this._needStash}},{key:"onContentLengthKnown",get:function(){return this._onContentLengthKnown},set:function(e){this._onContentLengthKnown=e}},{key:"onURLRedirect",get:function(){return this._onURLRedirect},set:function(e){this._onURLRedirect=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"open",value:function(e,t){throw new S("Unimplemented abstract function!")}},{key:"abort",value:function(){throw new S("Unimplemented abstract function!")}}]),e}(),T=n(4811),L=n.n(T),A=n(34577),M=n.n(A),D={};!function(){var e=self.navigator.userAgent.toLowerCase(),t=/(edge)\/([\w.]+)/.exec(e)||/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(iemobile)[\/]([\w.]+)/.exec(e)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(e)||[],n=/(ipad)/.exec(e)||/(ipod)/.exec(e)||/(windows phone)/.exec(e)||/(iphone)/.exec(e)||/(kindle)/.exec(e)||/(android)/.exec(e)||/(windows)/.exec(e)||/(mac)/.exec(e)||/(linux)/.exec(e)||/(cros)/.exec(e)||[],r={browser:t[5]||t[3]||t[1]||"",version:t[2]||t[4]||"0",majorVersion:t[4]||t[2]||"0",platform:n[0]||""},i={};if(r.browser){i[r.browser]=!0;var o=r.majorVersion.split(".");i.version={major:parseInt(r.majorVersion,10),string:r.version},o.length>1&&(i.version.minor=parseInt(o[1],10)),o.length>2&&(i.version.build=parseInt(o[2],10))}if(r.platform&&(i[r.platform]=!0),(i.chrome||i.opr||i.safari)&&(i.webkit=!0),i.rv||i.iemobile){i.rv&&delete i.rv;var s="msie";r.browser=s,i[s]=!0}if(i.edge){delete i.edge;var a="msedge";r.browser=a,i[a]=!0}if(i.opr){var l="opera";r.browser=l,i[l]=!0}if(i.safari&&i.android){var c="android";r.browser=c,i[c]=!0}for(var u in i.name=r.browser,i.platform=r.platform,D)D.hasOwnProperty(u)&&delete D[u];Object.assign(D,i)}();var I=D,N=function(e){g()(n,e);var t=_()(n);function n(e,r){var i;return s()(this,n),(i=t.call(this,"fetch-stream-loader")).TAG="FetchStreamLoader",i._seekHandler=e,i._config=r,i._needStash=!0,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return l()(n,[{key:"destroy",value:function(){this.isWorking()&&this.abort(),L()(M()(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){var n=this;this._dataSource=e,this._range=t;var r=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(r=e.redirectedURL);var o=this._seekHandler.getConfig(r,t),s=new self.Headers;if("object"===i()(o.headers)){var a=o.headers;for(var l in a)a.hasOwnProperty(l)&&s.append(l,a[l])}var c={method:"GET",headers:s,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if("object"===i()(this._config.headers))for(var u in this._config.headers)s.append(u,this._config.headers[u]);!1===e.cors&&(c.mode="same-origin"),e.withCredentials&&(c.credentials="include"),e.referrerPolicy&&(c.referrerPolicy=e.referrerPolicy),this._status=C.kConnecting,self.fetch(o.url,c).then((function(e){if(n._requestAbort)return n._requestAbort=!1,void(n._status=C.kIdle);if(e.ok&&e.status>=200&&e.status<=299){if(e.url!==o.url&&n._onURLRedirect){var t=n._seekHandler.removeURLParameters(e.url);n._onURLRedirect(t)}var r=e.headers.get("Content-Length");return null!=r&&(n._contentLength=parseInt(r),0!==n._contentLength&&n._onContentLengthKnown&&n._onContentLengthKnown(n._contentLength)),n._pump.call(n,e.body.getReader())}if(n._status=C.kError,!n._onError)throw new b("FetchStreamLoader: Http code invalid, "+e.status+" "+e.statusText);n._onError(k.HTTP_STATUS_CODE_INVALID,{code:e.status,msg:e.statusText})})).catch((function(e){if(n._status=C.kError,!n._onError)throw e;n._onError(k.EXCEPTION,{code:-1,msg:e.message})}))}},{key:"abort",value:function(){this._requestAbort=!0}},{key:"_pump",value:function(e){var t=this;return e.read().then((function(n){if(n.done)if(null!==t._contentLength&&t._receivedLength<t._contentLength){t._status=C.kError;var r=k.EARLY_EOF,i={code:-1,msg:"Fetch stream meet Early-EOF"};if(!t._onError)throw new b(i.msg);t._onError(r,i)}else t._status=C.kComplete,t._onComplete&&t._onComplete(t._range.from,t._range.from+t._receivedLength-1);else{if(!0===t._requestAbort)return t._requestAbort=!1,t._status=C.kComplete,e.cancel();t._status=C.kBuffering;var o=n.value.buffer,s=t._range.from+t._receivedLength;t._receivedLength+=o.byteLength,t._onDataArrival&&t._onDataArrival(o,s,t._receivedLength),t._pump(e)}})).catch((function(e){if(11!==e.code||!I.msedge){t._status=C.kError;var n=0,r=null;if(19!==e.code&&"network error"!==e.message||!(null===t._contentLength||null!==t._contentLength&&t._receivedLength<t._contentLength)?(n=k.EXCEPTION,r={code:e.code,msg:e.message}):(n=k.EARLY_EOF,r={code:e.code,msg:"Fetch stream meet Early-EOF"}),!t._onError)throw new b(r.msg);t._onError(n,r)}}))}}],[{key:"isSupported",value:function(){try{var e=I.msedge&&I.version.minor>=15048,t=!I.msedge||e;return self.fetch&&self.ReadableStream&&t}catch(e){return!1}}}]),n}(E),R=function(e){g()(n,e);var t=_()(n);function n(e,r){var i;return s()(this,n),(i=t.call(this,"xhr-moz-chunked-loader")).TAG="MozChunkedLoader",i._seekHandler=e,i._config=r,i._needStash=!0,i._xhr=null,i._requestAbort=!1,i._contentLength=null,i._receivedLength=0,i}return l()(n,[{key:"destroy",value:function(){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),L()(M()(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t;var n=e.url;this._config.reuseRedirectedURL&&null!=e.redirectedURL&&(n=e.redirectedURL);var r=this._seekHandler.getConfig(n,t);this._requestURL=r.url;var o=this._xhr=new XMLHttpRequest;if(o.open("GET",r.url,!0),o.responseType="moz-chunked-arraybuffer",o.onreadystatechange=this._onReadyStateChange.bind(this),o.onprogress=this._onProgress.bind(this),o.onloadend=this._onLoadEnd.bind(this),o.onerror=this._onXhrError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===i()(r.headers)){var s=r.headers;for(var a in s)s.hasOwnProperty(a)&&o.setRequestHeader(a,s[a])}if("object"===i()(this._config.headers)){var l=this._config.headers;for(var c in l)l.hasOwnProperty(c)&&o.setRequestHeader(c,l[c])}this._status=C.kConnecting,o.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=C.kComplete}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL&&t.responseURL!==this._requestURL&&this._onURLRedirect){var n=this._seekHandler.removeURLParameters(t.responseURL);this._onURLRedirect(n)}if(0!==t.status&&(t.status<200||t.status>299)){if(this._status=C.kError,!this._onError)throw new b("MozChunkedLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(k.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}else this._status=C.kBuffering}}},{key:"_onProgress",value:function(e){if(this._status!==C.kError){null===this._contentLength&&null!==e.total&&0!==e.total&&(this._contentLength=e.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));var t=e.target.response,n=this._range.from+this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}}},{key:"_onLoadEnd",value:function(e){!0!==this._requestAbort?this._status!==C.kError&&(this._status=C.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)):this._requestAbort=!1}},{key:"_onXhrError",value:function(e){this._status=C.kError;var t=0,n=null;if(this._contentLength&&e.loaded<this._contentLength?(t=k.EARLY_EOF,n={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(t=k.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new b(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return p.w("MozChunkedLoader",e.message),!1}}}]),n}(E),O=function(e){g()(n,e);var t=_()(n);function n(e,r){var i;return s()(this,n),(i=t.call(this,"xhr-range-loader")).TAG="RangeLoader",i._seekHandler=e,i._config=r,i._needStash=!1,i._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],i._currentChunkSizeKB=384,i._currentSpeedNormalized=0,i._zeroSpeedChunkCount=0,i._xhr=null,i._speedSampler=new m,i._requestAbort=!1,i._waitForTotalLength=!1,i._totalLengthReceived=!1,i._currentRequestURL=null,i._currentRedirectedURL=null,i._currentRequestRange=null,i._totalLength=null,i._contentLength=null,i._receivedLength=0,i._lastTimeLoaded=0,i}return l()(n,[{key:"destroy",value:function(){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),L()(M()(n.prototype),"destroy",this).call(this)}},{key:"currentSpeed",get:function(){return this._speedSampler.lastSecondKBps}},{key:"open",value:function(e,t){this._dataSource=e,this._range=t,this._status=C.kConnecting;var n=!1;null!=this._dataSource.filesize&&0!==this._dataSource.filesize&&(n=!0,this._totalLength=this._dataSource.filesize),this._totalLengthReceived||n?this._openSubRange():(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1}))}},{key:"_openSubRange",value:function(){var e=1024*this._currentChunkSizeKB,t=this._range.from+this._receivedLength,n=t+e;null!=this._contentLength&&n-this._range.from>=this._contentLength&&(n=this._range.from+this._contentLength-1),this._currentRequestRange={from:t,to:n},this._internalOpen(this._dataSource,this._currentRequestRange)}},{key:"_internalOpen",value:function(e,t){this._lastTimeLoaded=0;var n=e.url;this._config.reuseRedirectedURL&&(null!=this._currentRedirectedURL?n=this._currentRedirectedURL:null!=e.redirectedURL&&(n=e.redirectedURL));var r=this._seekHandler.getConfig(n,t);this._currentRequestURL=r.url;var o=this._xhr=new XMLHttpRequest;if(o.open("GET",r.url,!0),o.responseType="arraybuffer",o.onreadystatechange=this._onReadyStateChange.bind(this),o.onprogress=this._onProgress.bind(this),o.onload=this._onLoad.bind(this),o.onerror=this._onXhrError.bind(this),e.withCredentials&&(o.withCredentials=!0),"object"===i()(r.headers)){var s=r.headers;for(var a in s)s.hasOwnProperty(a)&&o.setRequestHeader(a,s[a])}if("object"===i()(this._config.headers)){var l=this._config.headers;for(var c in l)l.hasOwnProperty(c)&&o.setRequestHeader(c,l[c])}o.send()}},{key:"abort",value:function(){this._requestAbort=!0,this._internalAbort(),this._status=C.kComplete}},{key:"_internalAbort",value:function(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}},{key:"_onReadyStateChange",value:function(e){var t=e.target;if(2===t.readyState){if(null!=t.responseURL){var n=this._seekHandler.removeURLParameters(t.responseURL);t.responseURL!==this._currentRequestURL&&n!==this._currentRedirectedURL&&(this._currentRedirectedURL=n,this._onURLRedirect&&this._onURLRedirect(n))}if(t.status>=200&&t.status<=299){if(this._waitForTotalLength)return;this._status=C.kBuffering}else{if(this._status=C.kError,!this._onError)throw new b("RangeLoader: Http code invalid, "+t.status+" "+t.statusText);this._onError(k.HTTP_STATUS_CODE_INVALID,{code:t.status,msg:t.statusText})}}}},{key:"_onProgress",value:function(e){if(this._status!==C.kError){if(null===this._contentLength){var t=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,t=!0;var n=e.total;this._internalAbort(),null!=n&0!==n&&(this._totalLength=n)}if(-1===this._range.to?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,t)return void this._openSubRange();this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}var r=e.loaded-this._lastTimeLoaded;this._lastTimeLoaded=e.loaded,this._speedSampler.addBytes(r)}}},{key:"_normalizeSpeed",value:function(e){var t=this._chunkSizeKBList,n=t.length-1,r=0,i=0,o=n;if(e<t[0])return t[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:o=r-1}}},{key:"_onLoad",value:function(e){if(this._status!==C.kError)if(this._waitForTotalLength)this._waitForTotalLength=!1;else{this._lastTimeLoaded=0;var t=this._speedSampler.lastSecondKBps;if(0===t&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(t=this._speedSampler.currentKBps)),0!==t){var n=this._normalizeSpeed(t);this._currentSpeedNormalized!==n&&(this._currentSpeedNormalized=n,this._currentChunkSizeKB=n)}var r=e.target.response,i=this._range.from+this._receivedLength;this._receivedLength+=r.byteLength;var o=!1;null!=this._contentLength&&this._receivedLength<this._contentLength?this._openSubRange():o=!0,this._onDataArrival&&this._onDataArrival(r,i,this._receivedLength),o&&(this._status=C.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}}},{key:"_onXhrError",value:function(e){this._status=C.kError;var t=0,n=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(t=k.EARLY_EOF,n={code:-1,msg:"RangeLoader meet Early-Eof"}):(t=k.EXCEPTION,n={code:-1,msg:e.constructor.name+" "+e.type}),!this._onError)throw new b(n.msg);this._onError(t,n)}}],[{key:"isSupported",value:function(){try{var e=new XMLHttpRequest;return e.open("GET","https://example.com",!0),e.responseType="arraybuffer","arraybuffer"===e.responseType}catch(e){return p.w("RangeLoader",e.message),!1}}}]),n}(E),j=function(e){g()(n,e);var t=_()(n);function n(){var e;return s()(this,n),(e=t.call(this,"websocket-loader")).TAG="WebSocketLoader",e._needStash=!0,e._ws=null,e._requestAbort=!1,e._receivedLength=0,e}return l()(n,[{key:"destroy",value:function(){this._ws&&this.abort(),L()(M()(n.prototype),"destroy",this).call(this)}},{key:"open",value:function(e){try{var t=this._ws=new self.WebSocket(e.url);t.binaryType="arraybuffer",t.onopen=this._onWebSocketOpen.bind(this),t.onclose=this._onWebSocketClose.bind(this),t.onmessage=this._onWebSocketMessage.bind(this),t.onerror=this._onWebSocketError.bind(this),this._status=C.kConnecting}catch(e){this._status=C.kError;var n={code:e.code,msg:e.message};if(!this._onError)throw new b(n.msg);this._onError(k.EXCEPTION,n)}}},{key:"abort",value:function(){var e=this._ws;!e||0!==e.readyState&&1!==e.readyState||(this._requestAbort=!0,e.close()),this._ws=null,this._status=C.kComplete}},{key:"_onWebSocketOpen",value:function(e){this._status=C.kBuffering}},{key:"_onWebSocketClose",value:function(e){!0!==this._requestAbort?(this._status=C.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)):this._requestAbort=!1}},{key:"_onWebSocketMessage",value:function(e){var t=this;if(e.data instanceof ArrayBuffer)this._dispatchArrayBuffer(e.data);else if(e.data instanceof Blob){var n=new FileReader;n.onload=function(){t._dispatchArrayBuffer(n.result)},n.readAsArrayBuffer(e.data)}else{this._status=C.kError;var r={code:-1,msg:"Unsupported WebSocket message type: "+e.data.constructor.name};if(!this._onError)throw new b(r.msg);this._onError(k.EXCEPTION,r)}}},{key:"_dispatchArrayBuffer",value:function(e){var t=e,n=this._receivedLength;this._receivedLength+=t.byteLength,this._onDataArrival&&this._onDataArrival(t,n,this._receivedLength)}},{key:"_onWebSocketError",value:function(e){this._status=C.kError;var t={code:e.code,msg:e.message};if(!this._onError)throw new b(t.msg);this._onError(k.EXCEPTION,t)}}],[{key:"isSupported",value:function(){try{return void 0!==self.WebSocket}catch(e){return!1}}}]),n}(E),P=function(){function e(t){s()(this,e),this._zeroStart=t||!1}return l()(e,[{key:"getConfig",value:function(e,t){var n,r={};0!==t.from||-1!==t.to?(n=-1!==t.to?"bytes=".concat(t.from.toString(),"-").concat(t.to.toString()):"bytes=".concat(t.from.toString(),"-"),r.Range=n):this._zeroStart&&(r.Range="bytes=0-");return{url:e,headers:r}}},{key:"removeURLParameters",value:function(e){return e}}]),e}(),B=function(){function e(t,n){s()(this,e),this._startName=t,this._endName=n}return l()(e,[{key:"getConfig",value:function(e,t){var n=e;if(0!==t.from||-1!==t.to){var r=!0;-1===n.indexOf("?")&&(n+="?",r=!1),r&&(n+="&"),n+="".concat(this._startName,"=").concat(t.from.toString()),-1!==t.to&&(n+="&".concat(this._endName,"=").concat(t.to.toString()))}return{url:n,headers:{}}}},{key:"removeURLParameters",value:function(e){var t=e.split("?")[0],n=void 0,r=e.indexOf("?");-1!==r&&(n=e.substring(r+1));var i="";if(null!=n&&n.length>0)for(var o=n.split("&"),s=0;s<o.length;s++){var a=o[s].split("="),l=s>0;a[0]!==this._startName&&a[0]!==this._endName&&(l&&(i+="&"),i+=o[s])}return 0===i.length?t:t+"?"+i}}]),e}(),U=function(){function e(t,n,r){s()(this,e),this.TAG="IOController",this._config=n,this._extraData=r,this._stashInitialSize=393216,null!=n.stashInitialSize&&n.stashInitialSize>0&&(this._stashInitialSize=n.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=3145728,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,!1===n.enableStashBuffer&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=t,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(t.url),this._refTotalLength=t.filesize?t.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new m,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()}return l()(e,[{key:"destroy",value:function(){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}},{key:"isWorking",value:function(){return this._loader&&this._loader.isWorking()&&!this._paused}},{key:"isPaused",value:function(){return this._paused}},{key:"status",get:function(){return this._loader.status}},{key:"extraData",get:function(){return this._extraData},set:function(e){this._extraData=e}},{key:"onDataArrival",get:function(){return this._onDataArrival},set:function(e){this._onDataArrival=e}},{key:"onSeeked",get:function(){return this._onSeeked},set:function(e){this._onSeeked=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onComplete",get:function(){return this._onComplete},set:function(e){this._onComplete=e}},{key:"onRedirect",get:function(){return this._onRedirect},set:function(e){this._onRedirect=e}},{key:"onRecoveredEarlyEof",get:function(){return this._onRecoveredEarlyEof},set:function(e){this._onRecoveredEarlyEof=e}},{key:"currentURL",get:function(){return this._dataSource.url}},{key:"hasRedirect",get:function(){return null!=this._redirectedURL||null!=this._dataSource.redirectedURL}},{key:"currentRedirectedURL",get:function(){return this._redirectedURL||this._dataSource.redirectedURL}},{key:"currentSpeed",get:function(){return this._loaderClass===O?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}},{key:"loaderType",get:function(){return this._loader.type}},{key:"_selectSeekHandler",value:function(){var e=this._config;if("range"===e.seekType)this._seekHandler=new P(this._config.rangeLoadZeroStart);else if("param"===e.seekType){var t=e.seekParamStart||"bstart",n=e.seekParamEnd||"bend";this._seekHandler=new B(t,n)}else{if("custom"!==e.seekType)throw new w("Invalid seekType in config: ".concat(e.seekType));if("function"!=typeof e.customSeekHandler)throw new w("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new e.customSeekHandler}}},{key:"_selectLoader",value:function(){if(null!=this._config.customLoader)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=j;else if(N.isSupported())this._loaderClass=N;else if(R.isSupported())this._loaderClass=R;else{if(!O.isSupported())throw new b("Your browser doesn't support xhr with arraybuffer responseType!");this._loaderClass=O}}},{key:"_createLoader",value:function(){this._loader=new this._loaderClass(this._seekHandler,this._config),!1===this._loader.needStashBuffer&&(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)}},{key:"open",value:function(e){this._currentRange={from:0,to:-1},e&&(this._currentRange.from=e),this._speedSampler.reset(),e||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}},{key:"abort",value:function(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}},{key:"pause",value:function(){this.isWorking()&&(this._loader.abort(),0!==this._stashUsed?(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)}},{key:"resume",value:function(){if(this._paused){this._paused=!1;var e=this._resumeFrom;this._resumeFrom=0,this._internalSeek(e,!0)}}},{key:"seek",value:function(e){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(e,!0)}},{key:"_internalSeek",value:function(e,t){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(t),this._loader.destroy(),this._loader=null;var n={from:e,to:-1};this._currentRange={from:n.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,n),this._onSeeked&&this._onSeeked()}},{key:"updateUrl",value:function(e){if(!e||"string"!=typeof e||0===e.length)throw new w("Url must be a non-empty string!");this._dataSource.url=e}},{key:"_expandBuffer",value:function(e){for(var t=this._stashSize;t+1048576<e;)t*=2;if((t+=1048576)!==this._bufferSize){var n=new ArrayBuffer(t);if(this._stashUsed>0){var r=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(n,0,t).set(r,0)}this._stashBuffer=n,this._bufferSize=t}}},{key:"_normalizeSpeed",value:function(e){var t=this._speedNormalizeList,n=t.length-1,r=0,i=0,o=n;if(e<t[0])return t[0];for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>=t[r]&&e<t[r+1])return t[r];t[r]<e?i=r+1:o=r-1}}},{key:"_adjustStashSize",value:function(e){var t=0;(t=this._config.isLive||e<512?e:e>=512&&e<=1024?Math.floor(1.5*e):2*e)>8192&&(t=8192);var n=1024*t+1048576;this._bufferSize<n&&this._expandBuffer(n),this._stashSize=1024*t}},{key:"_dispatchChunks",value:function(e,t){return this._currentRange.to=t+e.byteLength-1,this._onDataArrival(e,t)}},{key:"_onURLRedirect",value:function(e){this._redirectedURL=e,this._onRedirect&&this._onRedirect(e)}},{key:"_onContentLengthKnown",value:function(e){e&&this._fullRequestFlag&&(this._totalLength=e,this._fullRequestFlag=!1)}},{key:"_onLoaderChunkArrival",value:function(e,t,n){if(!this._onDataArrival)throw new x("IOController: No existing consumer (onDataArrival) callback!");if(!this._paused){this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(e.byteLength);var r=this._speedSampler.lastSecondKBps;if(0!==r){var i=this._normalizeSpeed(r);this._speedNormalized!==i&&(this._speedNormalized=i,this._adjustStashSize(i))}if(this._enableStash)if(0===this._stashUsed&&0===this._stashByteStart&&(this._stashByteStart=t),this._stashUsed+e.byteLength<=this._stashSize){new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var o=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){var s=this._stashBuffer.slice(0,this._stashUsed),a=this._dispatchChunks(s,this._stashByteStart);if(a<s.byteLength){if(a>0){var l=new Uint8Array(s,a);o.set(l,0),this._stashUsed=l.byteLength,this._stashByteStart+=a}}else this._stashUsed=0,this._stashByteStart+=a;this._stashUsed+e.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+e.byteLength),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength}else{var c=this._dispatchChunks(e,t);if(c<e.byteLength){var u=e.byteLength-c;u>this._bufferSize&&(this._expandBuffer(u),o=new Uint8Array(this._stashBuffer,0,this._bufferSize)),o.set(new Uint8Array(e,c),0),this._stashUsed+=u,this._stashByteStart=t+c}}}else if(0===this._stashUsed){var d=this._dispatchChunks(e,t);if(d<e.byteLength){var h=e.byteLength-d;h>this._bufferSize&&this._expandBuffer(h),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(e,d),0),this._stashUsed+=h,this._stashByteStart=t+d}}else{this._stashUsed+e.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+e.byteLength);var f=new Uint8Array(this._stashBuffer,0,this._bufferSize);f.set(new Uint8Array(e),this._stashUsed),this._stashUsed+=e.byteLength;var p=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(p<this._stashUsed&&p>0){var m=new Uint8Array(this._stashBuffer,p);f.set(m,0)}this._stashUsed-=p,this._stashByteStart+=p}}}},{key:"_flushStashBuffer",value:function(e){if(this._stashUsed>0){var t=this._stashBuffer.slice(0,this._stashUsed),n=this._dispatchChunks(t,this._stashByteStart),r=t.byteLength-n;if(n<t.byteLength){if(!e){if(n>0){var i=new Uint8Array(this._stashBuffer,0,this._bufferSize),o=new Uint8Array(t,n);i.set(o,0),this._stashUsed=o.byteLength,this._stashByteStart+=n}return 0}p.w(this.TAG,"".concat(r," bytes unconsumed data remain when flush buffer, dropped"))}return this._stashUsed=0,this._stashByteStart=0,r}return 0}},{key:"_onLoaderComplete",value:function(e,t){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}},{key:"_onLoaderError",value:function(e,t){if(p.e(this.TAG,"Loader error, code = ".concat(t.code,", msg = ").concat(t.msg)),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,e=k.UNRECOVERABLE_EARLY_EOF),e===k.EARLY_EOF){if(!this._config.isLive&&this._totalLength){var n=this._currentRange.to+1;return void(n<this._totalLength&&(p.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(n,!1)))}e=k.UNRECOVERABLE_EARLY_EOF}if(!this._onError)throw new b("IOException: "+t.msg);this._onError(e,t)}}]),e}(),F={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:180,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:180,autoCleanupMinBackwardDuration:120,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 z(){return Object.assign({},F)}var H=function(){function e(){s()(this,e)}return l()(e,null,[{key:"supportMSEH264Playback",value:function(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}},{key:"supportNetworkStreamIO",value:function(){var e=new U({},z()),t=e.loaderType;return e.destroy(),"fetch-stream-loader"==t||"xhr-moz-chunked-loader"==t}},{key:"getNetworkLoaderTypeName",value:function(){var e=new U({},z()),t=e.loaderType;return e.destroy(),t}},{key:"supportNativeMediaPlayback",value:function(t){null==e.videoElement&&(e.videoElement=window.document.createElement("video"));var n=e.videoElement.canPlayType(t);return"probably"===n||"maybe"==n}},{key:"getFeatureList",value:function(){var t={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return t.mseFlvPlayback=e.supportMSEH264Playback(),t.networkStreamIO=e.supportNetworkStreamIO(),t.networkLoaderName=e.getNetworkLoaderTypeName(),t.mseLiveFlvPlayback=t.mseFlvPlayback&&t.networkStreamIO,t.nativeMP4H264Playback=e.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),t.nativeWebmVP8Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),t.nativeWebmVP9Playback=e.supportNativeMediaPlayback('video/webm; codecs="vp9"'),t}}]),e}(),Z=H,W={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"},G=function(){function e(){s()(this,e)}return l()(e,null,[{key:"forceGlobalTag",get:function(){return p.FORCE_GLOBAL_TAG},set:function(t){p.FORCE_GLOBAL_TAG=t,e._notifyChange()}},{key:"globalTag",get:function(){return p.GLOBAL_TAG},set:function(t){p.GLOBAL_TAG=t,e._notifyChange()}},{key:"enableAll",get:function(){return p.ENABLE_VERBOSE&&p.ENABLE_DEBUG&&p.ENABLE_INFO&&p.ENABLE_WARN&&p.ENABLE_ERROR},set:function(t){p.ENABLE_VERBOSE=t,p.ENABLE_DEBUG=t,p.ENABLE_INFO=t,p.ENABLE_WARN=t,p.ENABLE_ERROR=t,e._notifyChange()}},{key:"enableDebug",get:function(){return p.ENABLE_DEBUG},set:function(t){p.ENABLE_DEBUG=t,e._notifyChange()}},{key:"enableVerbose",get:function(){return p.ENABLE_VERBOSE},set:function(t){p.ENABLE_VERBOSE=t,e._notifyChange()}},{key:"enableInfo",get:function(){return p.ENABLE_INFO},set:function(t){p.ENABLE_INFO=t,e._notifyChange()}},{key:"enableWarn",get:function(){return p.ENABLE_WARN},set:function(t){p.ENABLE_WARN=t,e._notifyChange()}},{key:"enableError",get:function(){return p.ENABLE_ERROR},set:function(t){p.ENABLE_ERROR=t,e._notifyChange()}},{key:"getConfig",value:function(){return{globalTag:p.GLOBAL_TAG,forceGlobalTag:p.FORCE_GLOBAL_TAG,enableVerbose:p.ENABLE_VERBOSE,enableDebug:p.ENABLE_DEBUG,enableInfo:p.ENABLE_INFO,enableWarn:p.ENABLE_WARN,enableError:p.ENABLE_ERROR,enableCallback:p.ENABLE_CALLBACK}}},{key:"applyConfig",value:function(e){p.GLOBAL_TAG=e.globalTag,p.FORCE_GLOBAL_TAG=e.forceGlobalTag,p.ENABLE_VERBOSE=e.enableVerbose,p.ENABLE_DEBUG=e.enableDebug,p.ENABLE_INFO=e.enableInfo,p.ENABLE_WARN=e.enableWarn,p.ENABLE_ERROR=e.enableError,p.ENABLE_CALLBACK=e.enableCallback}},{key:"_notifyChange",value:function(){var t=e.emitter;if(t.listenerCount("change")>0){var n=e.getConfig();t.emit("change",n)}}},{key:"registerListener",value:function(t){e.emitter.addListener("change",t)}},{key:"removeListener",value:function(t){e.emitter.removeListener("change",t)}},{key:"addLogListener",value:function(t){p.emitter.addListener("log",t),p.emitter.listenerCount("log")>0&&(p.ENABLE_CALLBACK=!0,e._notifyChange())}},{key:"removeLogListener",value:function(t){p.emitter.removeListener("log",t),0===p.emitter.listenerCount("log")&&(p.ENABLE_CALLBACK=!1,e._notifyChange())}}]),e}();G.emitter=new(h());var q=G,V=function(){function e(){s()(this,e),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}return l()(e,[{key:"isComplete",value:function(){var e=!1===this.hasAudio||!0===this.hasAudio&&null!=this.audioCodec&&null!=this.audioSampleRate&&null!=this.audioChannelCount,t=!1===this.hasVideo||!0===this.hasVideo&&null!=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;return null!=this.mimeType&&null!=this.duration&&null!=this.metadata&&null!=this.hasKeyframesIndex&&e&&t}},{key:"isSeekable",value:function(){return!0===this.hasKeyframesIndex}},{key:"getNearestKeyframe",value:function(e){if(null==this.keyframesIndex)return null;var t=this.keyframesIndex,n=this._search(t.times,e);return{index:n,milliseconds:t.times[n],fileposition:t.filepositions[n]}}},{key:"_search",value:function(e,t){var n=0,r=e.length-1,i=0,o=0,s=r;for(t<e[0]&&(n=0,o=s+1);o<=s;){if((i=o+Math.floor((s-o)/2))===r||t>=e[i]&&t<e[i+1]){n=i;break}e[i]<t?o=i+1:s=i-1}return n}}]),e}();function K(e,t,n){var r=e;if(t+n<r.length){for(;n--;)if(128!=(192&r[++t]))return!1;return!0}return!1}var Y,X=function(e){for(var t=[],n=e,r=0,i=e.length;r<i;)if(n[r]<128)t.push(String.fromCharCode(n[r])),++r;else{if(n[r]<192);else if(n[r]<224){if(K(n,r,1)){var o=(31&n[r])<<6|63&n[r+1];if(o>=128){t.push(String.fromCharCode(65535&o)),r+=2;continue}}}else if(n[r]<240){if(K(n,r,2)){var s=(15&n[r])<<12|(63&n[r+1])<<6|63&n[r+2];if(s>=2048&&55296!=(63488&s)){t.push(String.fromCharCode(65535&s)),r+=3;continue}}}else if(n[r]<248&&K(n,r,3)){var a=(7&n[r])<<18|(63&n[r+1])<<12|(63&n[r+2])<<6|63&n[r+3];if(a>65536&&a<1114112){a-=65536,t.push(String.fromCharCode(a>>>10|55296)),t.push(String.fromCharCode(1023&a|56320)),r+=4;continue}}t.push(String.fromCharCode(65533)),++r}return t.join("")},J=(Y=new ArrayBuffer(2),new DataView(Y).setInt16(0,256,!0),256===new Int16Array(Y)[0]),Q=function(){function e(){s()(this,e)}return l()(e,null,[{key:"parseScriptData",value:function(t,n,r){var i={};try{var o=e.parseValue(t,n,r),s=e.parseValue(t,n+o.size,r-o.size);i[o.data]=s.data}catch(e){p.e("AMF",e.toString())}return i}},{key:"parseObject",value:function(t,n,r){if(r<3)throw new x("Data not enough when parse ScriptDataObject");var i=e.parseString(t,n,r),o=e.parseValue(t,n+i.size,r-i.size),s=o.objectEnd;return{data:{name:i.data,value:o.data},size:i.size+o.size,objectEnd:s}}},{key:"parseVariable",value:function(t,n,r){return e.parseObject(t,n,r)}},{key:"parseString",value:function(e,t,n){if(n<2)throw new x("Data not enough when parse String");var r=new DataView(e,t,n).getUint16(0,!J);return{data:r>0?X(new Uint8Array(e,t+2,r)):"",size:2+r}}},{key:"parseLongString",value:function(e,t,n){if(n<4)throw new x("Data not enough when parse LongString");var r=new DataView(e,t,n).getUint32(0,!J);return{data:r>0?X(new Uint8Array(e,t+4,r)):"",size:4+r}}},{key:"parseDate",value:function(e,t,n){if(n<10)throw new x("Data size invalid when parse Date");var r=new DataView(e,t,n),i=r.getFloat64(0,!J),o=r.getInt16(8,!J);return{data:new Date(i+=60*o*1e3),size:10}}},{key:"parseValue",value:function(t,n,r){if(r<1)throw new x("Data not enough when parse Value");var i,o=new DataView(t,n,r),s=1,a=o.getUint8(0),l=!1;try{switch(a){case 0:i=o.getFloat64(1,!J),s+=8;break;case 1:i=!!o.getUint8(1),s+=1;break;case 2:var c=e.parseString(t,n+1,r-1);i=c.data,s+=c.size;break;case 3:i={};var u=0;for(9==(16777215&o.getUint32(r-4,!J))&&(u=3);s<r-4;){var d=e.parseObject(t,n+s,r-s-u);if(d.objectEnd)break;i[d.data.name]=d.data.value,s+=d.size}if(s<=r-3)9===(16777215&o.getUint32(s-1,!J))&&(s+=3);break;case 8:i={},s+=4;var h=0;for(9==(16777215&o.getUint32(r-4,!J))&&(h=3);s<r-8;){var f=e.parseVariable(t,n+s,r-s-h);if(f.objectEnd)break;i[f.data.name]=f.data.value,s+=f.size}if(s<=r-3)9===(16777215&o.getUint32(s-1,!J))&&(s+=3);break;case 9:i=void 0,s=1,l=!0;break;case 10:i=[];var m=o.getUint32(1,!J);s+=4;for(var v=0;v<m;v++){var g=e.parseValue(t,n+s,r-s);i.push(g.data),s+=g.size}break;case 11:var y=e.parseDate(t,n+1,r-1);i=y.data,s+=y.size;break;case 12:var _=e.parseString(t,n+1,r-1);i=_.data,s+=_.size;break;default:s=r,p.w("AMF","Unsupported AMF value type "+a)}}catch(e){p.e("AMF",e.toString())}return{data:i,size:s,objectEnd:l}}}]),e}(),$=function(){function e(t){s()(this,e),this.TAG="ExpGolomb",this._buffer=t,this._buffer_index=0,this._total_bytes=t.byteLength,this._total_bits=8*t.byteLength,this._current_word=0,this._current_word_bits_left=0}return l()(e,[{key:"destroy",value:function(){this._buffer=null}},{key:"_fillCurrentWord",value:function(){var e=this._total_bytes-this._buffer_index;if(e<=0)throw new x("ExpGolomb: _fillCurrentWord() but no bytes available");var t=Math.min(4,e),n=new Uint8Array(4);n.set(this._buffer.subarray(this._buffer_index,this._buffer_index+t)),this._current_word=new DataView(n.buffer).getUint32(0,!1),this._buffer_index+=t,this._current_word_bits_left=8*t}},{key:"readBits",value:function(e){if(e>32)throw new w("ExpGolomb: readBits() bits exceeded max 32bits!");if(e<=this._current_word_bits_left){var t=this._current_word>>>32-e;return this._current_word<<=e,this._current_word_bits_left-=e,t}var n=this._current_word_bits_left?this._current_word:0;n>>>=32-this._current_word_bits_left;var r=e-this._current_word_bits_left;this._fillCurrentWord();var i=Math.min(r,this._current_word_bits_left),o=this._current_word>>>32-i;return this._current_word<<=i,this._current_word_bits_left-=i,n=n<<i|o}},{key:"readBool",value:function(){return 1===this.readBits(1)}},{key:"readByte",value:function(){return this.readBits(8)}},{key:"_skipLeadingZero",value:function(){var e;for(e=0;e<this._current_word_bits_left;e++)if(0!=(this._current_word&2147483648>>>e))return this._current_word<<=e,this._current_word_bits_left-=e,e;return this._fillCurrentWord(),e+this._skipLeadingZero()}},{key:"readUEG",value:function(){var e=this._skipLeadingZero();return this.readBits(e+1)-1}},{key:"readSEG",value:function(){var e=this.readUEG();return 1&e?e+1>>>1:-1*(e>>>1)}}]),e}(),ee=function(){function e(){s()(this,e)}return l()(e,null,[{key:"_ebsp2rbsp",value:function(e){for(var t=e,n=t.byteLength,r=new Uint8Array(n),i=0,o=0;o<n;o++)o>=2&&3===t[o]&&0===t[o-1]&&0===t[o-2]||(r[i]=t[o],i++);return new Uint8Array(r.buffer,0,i)}},{key:"parseSPS",value:function(t){var n=e._ebsp2rbsp(t),r=new $(n);r.readByte();var i=r.readByte();r.readByte();var o=r.readByte();r.readUEG();var s=e.getProfileString(i),a=e.getLevelString(o),l=1,c=420,u=8;if((100===i||110===i||122===i||244===i||44===i||83===i||86===i||118===i||128===i||138===i||144===i)&&(3===(l=r.readUEG())&&r.readBits(1),l<=3&&(c=[0,420,422,444][l]),u=r.readUEG()+8,r.readUEG(),r.readBits(1),r.readBool()))for(var d=3!==l?8:12,h=0;h<d;h++)r.readBool()&&(h<6?e._skipScalingList(r,16):e._skipScalingList(r,64));r.readUEG();var f=r.readUEG();if(0===f)r.readUEG();else if(1===f){r.readBits(1),r.readSEG(),r.readSEG();for(var p=r.readUEG(),m=0;m<p;m++)r.readSEG()}var v=r.readUEG();r.readBits(1);var g=r.readUEG(),y=r.readUEG(),_=r.readBits(1);0===_&&r.readBits(1),r.readBits(1);var b=0,x=0,w=0,S=0;r.readBool()&&(b=r.readUEG(),x=r.readUEG(),w=r.readUEG(),S=r.readUEG());var C=1,k=1,E=0,T=!0,L=0,A=0;if(r.readBool()){if(r.readBool()){var M=r.readByte();M>0&&M<16?(C=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2][M-1],k=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1][M-1]):255===M&&(C=r.readByte()<<8|r.readByte(),k=r.readByte()<<8|r.readByte())}if(r.readBool()&&r.readBool(),r.readBool()&&(r.readBits(4),r.readBool()&&r.readBits(24)),r.readBool()&&(r.readUEG(),r.readUEG()),r.readBool()){var D=r.readBits(32),I=r.readBits(32);T=r.readBool(),E=(L=I)/(A=2*D)}}var N=1;1===C&&1===k||(N=C/k);var R=0,O=0;0===l?(R=1,O=2-_):(R=3===l?1:2,O=(1===l?2:1)*(2-_));var j=16*(g+1),P=16*(y+1)*(2-_);j-=(b+x)*R,P-=(w+S)*O;var B=Math.ceil(j*N);return r.destroy(),r=null,{profile_string:s,level_string:a,bit_depth:u,ref_frames:v,chroma_format:c,chroma_format_string:e.getChromaFormatString(c),frame_rate:{fixed:T,fps:E,fps_den:A,fps_num:L},sar_ratio:{width:C,height:k},codec_size:{width:j,height:P},present_size:{width:B,height:P}}}},{key:"_skipScalingList",value:function(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+e.readSEG()+256)%256),n=0===r?n:r}},{key:"getProfileString",value:function(e){switch(e){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"}}},{key:"getLevelString",value:function(e){return(e/10).toFixed(1)}},{key:"getChromaFormatString",value:function(e){switch(e){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}]),e}(),te={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};var ne=function(){function e(t,n){s()(this,e),this.TAG="FLVDemuxer",this._config=n,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=t.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=t.hasAudioTrack,this._hasVideo=t.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new V,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(){var e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256===new Int16Array(e)[0]}()}return l()(e,[{key:"destroy",value:function(){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}},{key:"bindDataSource",value:function(e){return e.onDataArrival=this.parseChunks.bind(this),this}},{key:"onTrackMetadata",get:function(){return this._onTrackMetadata},set:function(e){this._onTrackMetadata=e}},{key:"onMediaInfo",get:function(){return this._onMediaInfo},set:function(e){this._onMediaInfo=e}},{key:"onMetaDataArrived",get:function(){return this._onMetaDataArrived},set:function(e){this._onMetaDataArrived=e}},{key:"onScriptDataArrived",get:function(){return this._onScriptDataArrived},set:function(e){this._onScriptDataArrived=e}},{key:"onError",get:function(){return this._onError},set:function(e){this._onError=e}},{key:"onDataAvailable",get:function(){return this._onDataAvailable},set:function(e){this._onDataAvailable=e}},{key:"timestampBase",get:function(){return this._timestampBase},set:function(e){this._timestampBase=e}},{key:"overridedDuration",get:function(){return this._duration},set:function(e){this._durationOverrided=!0,this._duration=e,this._mediaInfo.duration=e}},{key:"overridedHasAudio",set:function(e){this._hasAudioFlagOverrided=!0,this._hasAudio=e,this._mediaInfo.hasAudio=e}},{key:"overridedHasVideo",set:function(e){this._hasVideoFlagOverrided=!0,this._hasVideo=e,this._mediaInfo.hasVideo=e}},{key:"resetMediaInfo",value:function(){this._mediaInfo=new V}},{key:"_isInitialMetadataDispatched",value:function(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!(this._hasAudio||!this._hasVideo)&&this._videoInitialMetadataDispatched}},{key:"parseChunks",value:function(t,n){if(!(this._onError&&this._onMediaInfo&&this._onTrackMetadata&&this._onDataAvailable))throw new x("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");var r=0,i=this._littleEndian;if(0===n){if(!(t.byteLength>13))return 0;r=e.probe(t).dataOffset}this._firstParse&&(this._firstParse=!1,n+r!==this._dataOffset&&p.w(this.TAG,"First time parsing but chunk byteStart invalid!"),0!==new DataView(t,r).getUint32(0,!i)&&p.w(this.TAG,"PrevTagSize0 !== 0 !!!"),r+=4);for(;r<t.byteLength;){this._dispatch=!0;var o=new DataView(t,r);if(r+11+4>t.byteLength)break;var s=o.getUint8(0),a=16777215&o.getUint32(0,!i);if(r+11+a+4>t.byteLength)break;if(8===s||9===s||18===s){var l=o.getUint8(4),c=o.getUint8(5),u=o.getUint8(6)|c<<8|l<<16|o.getUint8(7)<<24;0!==(16777215&o.getUint32(7,!i))&&p.w(this.TAG,"Meet tag which has StreamID != 0!");var d=r+11;switch(s){case 8:this._parseAudioData(t,d,a,u);break;case 9:this._parseVideoData(t,d,a,u,n+r);break;case 18:this._parseScriptData(t,d,a)}var h=o.getUint32(11+a,!i);h!==11+a&&p.w(this.TAG,"Invalid PrevTagSize ".concat(h)),r+=11+a+4}else p.w(this.TAG,"Unsupported tag type ".concat(s,", skipped")),r+=11+a+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),r}},{key:"_parseScriptData",value:function(e,t,n){var r=Q.parseScriptData(e,t,n);if(r.hasOwnProperty("onMetaData")){if(null==r.onMetaData||"object"!==i()(r.onMetaData))return void p.w(this.TAG,"Invalid onMetaData structure!");this._metadata&&p.w(this.TAG,"Found another onMetaData tag!"),this._metadata=r;var o=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},o)),"boolean"==typeof o.hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=o.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),"boolean"==typeof o.hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=o.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),"number"==typeof o.audiodatarate&&(this._mediaInfo.audioDataRate=o.audiodatarate),"number"==typeof o.videodatarate&&(this._mediaInfo.videoDataRate=o.videodatarate),"number"==typeof o.width&&(this._mediaInfo.width=o.width),"number"==typeof o.height&&(this._mediaInfo.height=o.height),"number"==typeof o.duration){if(!this._durationOverrided){var s=Math.floor(o.duration*this._timescale);this._duration=s,this._mediaInfo.duration=s}}else this._mediaInfo.duration=0;if("number"==typeof o.framerate){var a=Math.floor(1e3*o.framerate);if(a>0){var l=a/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=l,this._referenceFrameRate.fps_num=a,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=l}}if("object"===i()(o.keyframes)){this._mediaInfo.hasKeyframesIndex=!0;var c=o.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(c),o.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=o,p.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(r).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},r))}},{key:"_parseKeyframesIndex",value:function(e){for(var t=[],n=[],r=1;r<e.times.length;r++){var i=this._timestampBase+Math.floor(1e3*e.times[r]);t.push(i),n.push(e.filepositions[r])}return{times:t,filepositions:n}}},{key:"_parseAudioData",value:function(e,t,n,r){if(n<=1)p.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");else if(!0!==this._hasAudioFlagOverrided||!1!==this._hasAudio){this._littleEndian;var i=new DataView(e,t,n).getUint8(0),o=i>>>4;if(2===o||10===o){var s=0,a=(12&i)>>>2;if(a>=0&&a<=4){s=this._flvSoundRateTable[a];var l=1&i,c=this._audioMetadata,u=this._audioTrack;if(c||(!1===this._hasAudio&&!1===this._hasAudioFlagOverrided&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),(c=this._audioMetadata={}).type="audio",c.id=u.id,c.timescale=this._timescale,c.duration=this._duration,c.audioSampleRate=s,c.channelCount=0===l?1:2),10===o){var d=this._parseAACAudioData(e,t+1,n-1);if(null==d)return;if(0===d.packetType){c.config&&p.w(this.TAG,"Found another AudioSpecificConfig!");var h=d.data;c.audioSampleRate=h.samplingRate,c.channelCount=h.channelCount,c.codec=h.codec,c.originalCodec=h.originalCodec,c.config=h.config,c.refSampleDuration=1024/c.audioSampleRate*c.timescale,p.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",c);var f=this._mediaInfo;f.audioCodec=c.originalCodec,f.audioSampleRate=c.audioSampleRate,f.audioChannelCount=c.channelCount,f.hasVideo?null!=f.videoCodec&&(f.mimeType='video/x-flv; codecs="'+f.videoCodec+","+f.audioCodec+'"'):f.mimeType='video/x-flv; codecs="'+f.audioCodec+'"',f.isComplete()&&this._onMediaInfo(f)}else if(1===d.packetType){var m=this._timestampBase+r,v={unit:d.data,length:d.data.byteLength,dts:m,pts:m};u.samples.push(v),u.length+=d.data.length}else p.e(this.TAG,"Flv: Unsupported AAC data type ".concat(d.packetType))}else if(2===o){if(!c.codec){var g=this._parseMP3AudioData(e,t+1,n-1,!0);if(null==g)return;c.audioSampleRate=g.samplingRate,c.channelCount=g.channelCount,c.codec=g.codec,c.originalCodec=g.originalCodec,c.refSampleDuration=1152/c.audioSampleRate*c.timescale,p.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",c);var y=this._mediaInfo;y.audioCodec=c.codec,y.audioSampleRate=c.audioSampleRate,y.audioChannelCount=c.channelCount,y.audioDataRate=g.bitRate,y.hasVideo?null!=y.videoCodec&&(y.mimeType='video/x-flv; codecs="'+y.videoCodec+","+y.audioCodec+'"'):y.mimeType='video/x-flv; codecs="'+y.audioCodec+'"',y.isComplete()&&this._onMediaInfo(y)}var _=this._parseMP3AudioData(e,t+1,n-1,!1);if(null==_)return;var b=this._timestampBase+r,x={unit:_,length:_.byteLength,dts:b,pts:b};u.samples.push(x),u.length+=_.length}}else this._onError(te.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+a)}else this._onError(te.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+o)}}},{key:"_parseAACAudioData",value:function(e,t,n){if(!(n<=1)){var r={},i=new Uint8Array(e,t,n);return r.packetType=i[0],0===i[0]?r.data=this._parseAACAudioSpecificConfig(e,t+1,n-1):r.data=i.subarray(1),r}p.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!")}},{key:"_parseAACAudioSpecificConfig",value:function(e,t,n){var r,i,o=new Uint8Array(e,t,n),s=null,a=0,l=null;if(a=r=o[0]>>>3,(i=(7&o[0])<<1|o[1]>>>7)<0||i>=this._mpegSamplingRates.length)this._onError(te.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");else{var c=this._mpegSamplingRates[i],u=(120&o[1])>>>3;if(!(u<0||u>=8)){5===a&&(l=(7&o[1])<<1|o[2]>>>7,(124&o[2])>>>2);var d=self.navigator.userAgent.toLowerCase();return-1!==d.indexOf("firefox")?i>=6?(a=5,s=new Array(4),l=i-3):(a=2,s=new Array(2),l=i):-1!==d.indexOf("android")?(a=2,s=new Array(2),l=i):(a=5,l=i,s=new Array(4),i>=6?l=i-3:1===u&&(a=2,s=new Array(2),l=i)),s[0]=a<<3,s[0]|=(15&i)>>>1,s[1]=(15&i)<<7,s[1]|=(15&u)<<3,5===a&&(s[1]|=(15&l)>>>1,s[2]=(1&l)<<7,s[2]|=8,s[3]=0),{config:s,samplingRate:c,channelCount:u,codec:"mp4a.40."+a,originalCodec:"mp4a.40."+r}}this._onError(te.FORMAT_ERROR,"Flv: AAC invalid channel configuration")}}},{key:"_parseMP3AudioData",value:function(e,t,n,r){if(!(n<4)){this._littleEndian;var i=new Uint8Array(e,t,n),o=null;if(r){if(255!==i[0])return;var s=i[1]>>>3&3,a=(6&i[1])>>1,l=(240&i[2])>>>4,c=(12&i[2])>>>2,u=3!==(i[3]>>>6&3)?2:1,d=0,h=0;switch(s){case 0:d=this._mpegAudioV25SampleRateTable[c];break;case 2:d=this._mpegAudioV20SampleRateTable[c];break;case 3:d=this._mpegAudioV10SampleRateTable[c]}switch(a){case 1:34,l<this._mpegAudioL3BitRateTable.length&&(h=this._mpegAudioL3BitRateTable[l]);break;case 2:33,l<this._mpegAudioL2BitRateTable.length&&(h=this._mpegAudioL2BitRateTable[l]);break;case 3:32,l<this._mpegAudioL1BitRateTable.length&&(h=this._mpegAudioL1BitRateTable[l])}o={bitRate:h,samplingRate:d,channelCount:u,codec:"mp3",originalCodec:"mp3"}}else o=i;return o}p.w(this.TAG,"Flv: Invalid MP3 packet, header missing!")}},{key:"_parseVideoData",value:function(e,t,n,r,i){if(n<=1)p.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");else if(!0!==this._hasVideoFlagOverrided||!1!==this._hasVideo){var o=new Uint8Array(e,t,n)[0],s=(240&o)>>>4,a=15&o;7===a?this._parseAVCVideoPacket(e,t+1,n-1,r,i,s):this._onError(te.CODEC_UNSUPPORTED,"Flv: Unsupported codec in video frame: ".concat(a))}}},{key:"_parseAVCVideoPacket",value:function(e,t,n,r,i,o){if(n<4)p.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");else{var s=this._littleEndian,a=new DataView(e,t,n),l=a.getUint8(0),c=(16777215&a.getUint32(0,!s))<<8>>8;if(0===l)this._parseAVCDecoderConfigurationRecord(e,t+4,n-4);else if(1===l)this._parseAVCVideoData(e,t+4,n-4,r,i,o,c);else if(2!==l)return void this._onError(te.FORMAT_ERROR,"Flv: Invalid video packet type ".concat(l))}}},{key:"_parseAVCDecoderConfigurationRecord",value:function(e,t,n){if(n<7)p.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");else{var r=this._videoMetadata,i=this._videoTrack,o=this._littleEndian,s=new DataView(e,t,n);r?void 0!==r.avcc&&p.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(!1===this._hasVideo&&!1===this._hasVideoFlagOverrided&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),(r=this._videoMetadata={}).type="video",r.id=i.id,r.timescale=this._timescale,r.duration=this._duration);var a=s.getUint8(0),l=s.getUint8(1);s.getUint8(2),s.getUint8(3);if(1===a&&0!==l)if(this._naluLengthSize=1+(3&s.getUint8(4)),3===this._naluLengthSize||4===this._naluLengthSize){var c=31&s.getUint8(5);if(0!==c){c>1&&p.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ".concat(c));for(var u=6,d=0;d<c;d++){var h=s.getUint16(u,!o);if(u+=2,0!==h){var f=new Uint8Array(e,t+u,h);u+=h;var m=ee.parseSPS(f);if(0===d){r.codecWidth=m.codec_size.width,r.codecHeight=m.codec_size.height,r.presentWidth=m.present_size.width,r.presentHeight=m.present_size.height,r.profile=m.profile_string,r.level=m.level_string,r.bitDepth=m.bit_depth,r.chromaFormat=m.chroma_format,r.sarRatio=m.sar_ratio,r.frameRate=m.frame_rate,!1!==m.frame_rate.fixed&&0!==m.frame_rate.fps_num&&0!==m.frame_rate.fps_den||(r.frameRate=this._referenceFrameRate);var v=r.frameRate.fps_den,g=r.frameRate.fps_num;r.refSampleDuration=r.timescale*(v/g);for(var y=f.subarray(1,4),_="avc1.",b=0;b<3;b++){var x=y[b].toString(16);x.length<2&&(x="0"+x),_+=x}r.codec=_;var w=this._mediaInfo;w.width=r.codecWidth,w.height=r.codecHeight,w.fps=r.frameRate.fps,w.profile=r.profile,w.level=r.level,w.refFrames=m.ref_frames,w.chromaFormat=m.chroma_format_string,w.sarNum=r.sarRatio.width,w.sarDen=r.sarRatio.height,w.videoCodec=_,w.hasAudio?null!=w.audioCodec&&(w.mimeType='video/x-flv; codecs="'+w.videoCodec+","+w.audioCodec+'"'):w.mimeType='video/x-flv; codecs="'+w.videoCodec+'"',w.isComplete()&&this._onMediaInfo(w)}}}var S=s.getUint8(u);if(0!==S){S>1&&p.w(this.TAG,"Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ".concat(S)),u++;for(var C=0;C<S;C++){var k=s.getUint16(u,!o);u+=2,0!==k&&(u+=k)}r.avcc=new Uint8Array(n),r.avcc.set(new Uint8Array(e,t,n),0),p.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",r)}else this._onError(te.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS")}else this._onError(te.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS")}else this._onError(te.FORMAT_ERROR,"Flv: Strange NaluLengthSizeMinusOne: ".concat(this._naluLengthSize-1));else this._onError(te.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord")}}},{key:"_parseAVCVideoData",value:function(e,t,n,r,i,o,s){for(var a=this._littleEndian,l=new DataView(e,t,n),c=[],u=0,d=0,h=this._naluLengthSize,f=this._timestampBase+r,m=1===o;d<n;){if(d+4>=n){p.w(this.TAG,"Malformed Nalu near timestamp ".concat(f,", offset = ").concat(d,", dataSize = ").concat(n));break}var v=l.getUint32(d,!a);if(3===h&&(v>>>=8),v>n-h)return void p.w(this.TAG,"Malformed Nalus near timestamp ".concat(f,", NaluSize > DataSize!"));var g=31&l.getUint8(d+h);5===g&&(m=!0);var y=new Uint8Array(e,t+d,h+v),_={type:g,data:y};c.push(_),u+=y.byteLength,d+=h+v}if(c.length){var b=this._videoTrack,x={units:c,length:u,isKeyframe:m,dts:f,cts:s,pts:f+s};m&&(x.fileposition=i),b.samples.push(x),b.length+=u}}}],[{key:"probe",value:function(e){var t=new Uint8Array(e),n={match:!1};if(70!==t[0]||76!==t[1]||86!==t[2]||1!==t[3])return n;var r,i,o=(4&t[4])>>>2!=0,s=0!=(1&t[4]),a=(r=t)[i=5]<<24|r[i+1]<<16|r[i+2]<<8|r[i+3];return a<9?n:{match:!0,consumed:a,dataOffset:a,hasAudioTrack:o,hasVideoTrack:s}}}]),e}(),re=ne,ie=function(){function e(){s()(this,e)}return l()(e,null,[{key:"init",value:function(){for(var t in e.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":[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=e.constants={};n.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),n.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),n.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),n.STSC=n.STCO=n.STTS,n.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),n.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]),n.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]),n.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),n.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}},{key:"box",value:function(e){for(var t=8,n=null,r=Array.prototype.slice.call(arguments,1),i=r.length,o=0;o<i;o++)t+=r[o].byteLength;(n=new Uint8Array(t))[0]=t>>>24&255,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n.set(e,4);for(var s=8,a=0;a<i;a++)n.set(r[a],s),s+=r[a].byteLength;return n}},{key:"generateInitSegment",value:function(t){var n=e.box(e.types.ftyp,e.constants.FTYP),r=e.moov(t),i=new Uint8Array(n.byteLength+r.byteLength);return i.set(n,0),i.set(r,n.byteLength),i}},{key:"moov",value:function(t){var n=e.mvhd(t.timescale,t.duration),r=e.trak(t),i=e.mvex(t);return e.box(e.types.moov,n,r,i)}},{key:"mvhd",value:function(t,n){return e.box(e.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t,n>>>24&255,n>>>16&255,n>>>8&255,255&n,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]))}},{key:"trak",value:function(t){return e.box(e.types.trak,e.tkhd(t),e.mdia(t))}},{key:"tkhd",value:function(t){var n=t.id,r=t.duration,i=t.presentWidth,o=t.presentHeight;return e.box(e.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r,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,i>>>8&255,255&i,0,0,o>>>8&255,255&o,0,0]))}},{key:"mdia",value:function(t){return e.box(e.types.mdia,e.mdhd(t),e.hdlr(t),e.minf(t))}},{key:"mdhd",value:function(t){var n=t.timescale,r=t.duration;return e.box(e.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,r>>>24&255,r>>>16&255,r>>>8&255,255&r,85,196,0,0]))}},{key:"hdlr",value:function(t){var n=null;return n="audio"===t.type?e.constants.HDLR_AUDIO:e.constants.HDLR_VIDEO,e.box(e.types.hdlr,n)}},{key:"minf",value:function(t){var n=null;return n="audio"===t.type?e.box(e.types.smhd,e.constants.SMHD):e.box(e.types.vmhd,e.constants.VMHD),e.box(e.types.minf,n,e.dinf(),e.stbl(t))}},{key:"dinf",value:function(){return e.box(e.types.dinf,e.box(e.types.dref,e.constants.DREF))}},{key:"stbl",value:function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.constants.STTS),e.box(e.types.stsc,e.constants.STSC),e.box(e.types.stsz,e.constants.STSZ),e.box(e.types.stco,e.constants.STCO))}},{key:"stsd",value:function(t){return"audio"===t.type?"mp3"===t.codec?e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp3(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.mp4a(t)):e.box(e.types.stsd,e.constants.STSD_PREFIX,e.avc1(t))}},{key:"mp3",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types[".mp3"],i)}},{key:"mp4a",value:function(t){var n=t.channelCount,r=t.audioSampleRate,i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,n,0,16,0,0,0,0,r>>>8&255,255&r,0,0]);return e.box(e.types.mp4a,i,e.esds(t))}},{key:"esds",value:function(t){var n=t.config||[],r=n.length,i=new Uint8Array([0,0,0,0,3,23+r,0,1,0,4,15+r,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([r]).concat(n).concat([6,1,2]));return e.box(e.types.esds,i)}},{key:"avc1",value:function(t){var n=t.avcc,r=t.codecWidth,i=t.codecHeight,o=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,r>>>8&255,255&r,i>>>8&255,255&i,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 e.box(e.types.avc1,o,e.box(e.types.avcC,n))}},{key:"mvex",value:function(t){return e.box(e.types.mvex,e.trex(t))}},{key:"trex",value:function(t){var n=t.id,r=new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return e.box(e.types.trex,r)}},{key:"moof",value:function(t,n){return e.box(e.types.moof,e.mfhd(t.sequenceNumber),e.traf(t,n))}},{key:"mfhd",value:function(t){var n=new Uint8Array([0,0,0,0,t>>>24&255,t>>>16&255,t>>>8&255,255&t]);return e.box(e.types.mfhd,n)}},{key:"traf",value:function(t,n){var r=t.id,i=e.box(e.types.tfhd,new Uint8Array([0,0,0,0,r>>>24&255,r>>>16&255,r>>>8&255,255&r])),o=e.box(e.types.tfdt,new Uint8Array([0,0,0,0,n>>>24&255,n>>>16&255,n>>>8&255,255&n])),s=e.sdtp(t),a=e.trun(t,s.byteLength+16+16+8+16+8+8);return e.box(e.types.traf,i,o,a,s)}},{key:"sdtp",value:function(t){for(var n=t.samples||[],r=n.length,i=new Uint8Array(4+r),o=0;o<r;o++){var s=n[o].flags;i[o+4]=s.isLeading<<6|s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy}return e.box(e.types.sdtp,i)}},{key:"trun",value:function(t,n){var r=t.samples||[],i=r.length,o=12+16*i,s=new Uint8Array(o);n+=8+o,s.set([0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,255&i,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0);for(var a=0;a<i;a++){var l=r[a].duration,c=r[a].size,u=r[a].flags,d=r[a].cts;s.set([l>>>24&255,l>>>16&255,l>>>8&255,255&l,c>>>24&255,c>>>16&255,c>>>8&255,255&c,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.isNonSync,0,0,d>>>24&255,d>>>16&255,d>>>8&255,255&d],12+16*a)}return e.box(e.types.trun,s)}},{key:"mdat",value:function(t){return e.box(e.types.mdat,t)}}]),e}();ie.init();var oe=ie,se=function(){function e(){s()(this,e)}return l()(e,null,[{key:"getSilentFrame",value:function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)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(6===t)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(1===t)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(2===t)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(3===t)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}}]),e}(),ae=l()((function e(t,n,r,i,o){s()(this,e),this.dts=t,this.pts=n,this.duration=r,this.originalDts=i,this.isSyncPoint=o,this.fileposition=null})),le=function(){function e(){s()(this,e),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}return l()(e,[{key:"appendSyncPoint",value:function(e){e.isSyncPoint=!0,this.syncPoints.push(e)}}]),e}(),ce=function(){function e(){s()(this,e),this._list=[]}return l()(e,[{key:"clear",value:function(){this._list=[]}},{key:"appendArray",value:function(e){var t=this._list;0!==e.length&&(t.length>0&&e[0].originalDts<t[t.length-1].originalDts&&this.clear(),Array.prototype.push.apply(t,e))}},{key:"getLastSyncPointBeforeDts",value:function(e){if(0==this._list.length)return null;var t=this._list,n=0,r=t.length-1,i=0,o=0,s=r;for(e<t[0].dts&&(n=0,o=s+1);o<=s;){if((i=o+Math.floor((s-o)/2))===r||e>=t[i].dts&&e<t[i+1].dts){n=i;break}t[i].dts<e?o=i+1:s=i-1}return this._list[n]}}]),e}(),ue=function(){function e(t){s()(this,e),this._type=t,this._list=[],this._lastAppendLocation=-1}return l()(e,[{key:"type",get:function(){return this._type}},{key:"length",get:function(){return this._list.length}},{key:"isEmpty",value:function(){return 0===this._list.length}},{key:"clear",value:function(){this._list=[],this._lastAppendLocation=-1}},{key:"_searchNearestSegmentBefore",value:function(e){var t=this._list;if(0===t.length)return-2;var n=t.length-1,r=0,i=0,o=n,s=0;if(e<t[0].originalBeginDts)return s=-1;for(;i<=o;){if((r=i+Math.floor((o-i)/2))===n||e>t[r].lastSample.originalDts&&e<t[r+1].originalBeginDts){s=r;break}t[r].originalBeginDts<e?i=r+1:o=r-1}return s}},{key:"_searchNearestSegmentAfter",value:function(e){return this._searchNearestSegmentBefore(e)+1}},{key:"append",value:function(e){var t=this._list,n=e,r=this._lastAppendLocation,i=0;-1!==r&&r<t.length&&n.originalBeginDts>=t[r].lastSample.originalDts&&(r===t.length-1||r<t.length-1&&n.originalBeginDts<t[r+1].originalBeginDts)?i=r+1:t.length>0&&(i=this._searchNearestSegmentBefore(n.originalBeginDts)+1),this._lastAppendLocation=i,this._list.splice(i,0,n)}},{key:"getLastSegmentBefore",value:function(e){var t=this._searchNearestSegmentBefore(e);return t>=0?this._list[t]:null}},{key:"getLastSampleBefore",value:function(e){var t=this.getLastSegmentBefore(e);return null!=t?t.lastSample:null}},{key:"getLastSyncPointBefore",value:function(e){for(var t=this._searchNearestSegmentBefore(e),n=this._list[t].syncPoints;0===n.length&&t>0;)t--,n=this._list[t].syncPoints;return n.length>0?n[n.length-1]:null}}]),e}(),de=function(){function e(t){s()(this,e),this.TAG="MP4Remuxer",this._config=t,this._isLive=!0===t.isLive,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 ue("audio"),this._videoSegmentInfoList=new ue("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!(!I.chrome||!(I.version.major<50||50===I.version.major&&I.version.build<2661)),this._fillSilentAfterSeek=I.msedge||I.msie,this._mp3UseMpegAudio=!I.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}return l()(e,[{key:"destroy",value:function(){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}},{key:"bindDataSource",value:function(e){return e.onDataAvailable=this.remux.bind(this),e.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}},{key:"onInitSegment",get:function(){return this._onInitSegment},set:function(e){this._onInitSegment=e}},{key:"onMediaSegment",get:function(){return this._onMediaSegment},set:function(e){this._onMediaSegment=e}},{key:"insertDiscontinuity",value:function(){this._audioNextDts=this._videoNextDts=void 0}},{key:"seek",value:function(e){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}},{key:"remux",value:function(e,t){if(!this._onMediaSegment)throw new x("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(e,t),this._remuxVideo(t),this._remuxAudio(e)}},{key:"_onTrackMetadataReceived",value:function(e,t){var n=null,r="mp4",i=t.codec;if("audio"===e)this._audioMeta=t,"mp3"===t.codec&&this._mp3UseMpegAudio?(r="mpeg",i="",n=new Uint8Array):n=oe.generateInitSegment(t);else{if("video"!==e)return;this._videoMeta=t,n=oe.generateInitSegment(t)}if(!this._onInitSegment)throw new x("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(e,{type:e,data:n.buffer,codec:i,container:"".concat(e,"/").concat(r),mediaDuration:t.duration})}},{key:"_calculateDtsBase",value:function(e,t){this._dtsBaseInited||(e.samples&&e.samples.length&&(this._audioDtsBase=e.samples[0].dts),t.samples&&t.samples.length&&(this._videoDtsBase=t.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}},{key:"flushStashedSamples",value:function(){var e=this._videoStashedLastSample,t=this._audioStashedLastSample,n={type:"video",id:1,sequenceNumber:0,samples:[],length:0};null!=e&&(n.samples.push(e),n.length=e.length);var r={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};null!=t&&(r.samples.push(t),r.length=t.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(n,!0),this._remuxAudio(r,!0)}},{key:"_remuxAudio",value:function(e,t){if(null!=this._audioMeta){var n,r=e,i=r.samples,o=void 0,s=-1,a=this._audioMeta.refSampleDuration,l="mp3"===this._audioMeta.codec&&this._mp3UseMpegAudio,c=this._dtsBaseInited&&void 0===this._audioNextDts,u=!1;if(i&&0!==i.length&&(1!==i.length||t)){var d=0,h=null,f=0;l?(d=0,f=r.length):(d=8,f=8+r.length);var m=null;if(i.length>1&&(f-=(m=i.pop()).length),null!=this._audioStashedLastSample){var v=this._audioStashedLastSample;this._audioStashedLastSample=null,i.unshift(v),f+=v.length}null!=m&&(this._audioStashedLastSample=m);var g=i[0].dts-this._dtsBase;if(this._audioNextDts)o=g-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())o=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&"mp3"!==this._audioMeta.originalCodec&&(u=!0);else{var y=this._audioSegmentInfoList.getLastSampleBefore(g);if(null!=y){var _=g-(y.originalDts+y.duration);_<=3&&(_=0),o=g-(y.dts+y.duration+_)}else o=0}if(u){var b=g-o,x=this._videoSegmentInfoList.getLastSegmentBefore(g);if(null!=x&&x.beginDts<b){var w=se.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(w){var S=x.beginDts,C=b-x.beginDts;p.v(this.TAG,"InsertPrefixSilentAudio: dts: ".concat(S,", duration: ").concat(C)),i.unshift({unit:w,dts:S,pts:S}),f+=w.byteLength}}else u=!1}for(var k=[],E=0;E<i.length;E++){var T=i[E],L=T.unit,A=T.dts-this._dtsBase,M=A-o;-1===s&&(s=M);var D=0;if(E!==i.length-1)D=i[E+1].dts-this._dtsBase-o-M;else if(null!=m)D=m.dts-this._dtsBase-o-M;else D=k.length>=1?k[k.length-1].duration:Math.floor(a);var N=!1,R=null;if(D>1.5*a&&"mp3"!==this._audioMeta.codec&&this._fillAudioTimestampGap&&!I.safari){N=!0;var O=Math.abs(D-a),j=Math.ceil(O/a),P=M+a;p.w(this.TAG,"Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\n"+"dts: ".concat(M+D," ms, expected: ").concat(M+Math.round(a)," ms, ")+"delta: ".concat(Math.round(O)," ms, generate: ").concat(j," frames"));var B=se.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);null==B&&(p.w(this.TAG,"Unable to generate silent frame for "+"".concat(this._audioMeta.originalCodec," with ").concat(this._audioMeta.channelCount," channels, repeat last frame")),B=L),R=[];for(var U=0;U<j;U++){var F=Math.round(P);if(R.length>0){var z=R[R.length-1];z.duration=F-z.dts}var H={dts:F,pts:F,cts:0,unit:B,size:B.byteLength,duration:0,originalDts:A,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};R.push(H),f+=H.size,P+=a}var Z=R[R.length-1];Z.duration=M+D-Z.dts,D=Math.round(a)}k.push({dts:M,pts:M,cts:0,unit:T.unit,size:T.unit.byteLength,duration:D,originalDts:A,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),N&&k.push.apply(k,R)}l?h=new Uint8Array(f):((h=new Uint8Array(f))[0]=f>>>24&255,h[1]=f>>>16&255,h[2]=f>>>8&255,h[3]=255&f,h.set(oe.types.mdat,4));for(var W=0;W<k.length;W++){var G=k[W].unit;h.set(G,d),d+=G.byteLength}var q=k[k.length-1];n=q.dts+q.duration,this._audioNextDts=n;var V=new le;V.beginDts=s,V.endDts=n,V.beginPts=s,V.endPts=n,V.originalBeginDts=k[0].originalDts,V.originalEndDts=q.originalDts+q.duration,V.firstSample=new ae(k[0].dts,k[0].pts,k[0].duration,k[0].originalDts,!1),V.lastSample=new ae(q.dts,q.pts,q.duration,q.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(V),r.samples=k,r.sequenceNumber++;var K=null;K=l?new Uint8Array:oe.moof(r,s),r.samples=[],r.length=0;var Y={type:"audio",data:this._mergeBoxes(K,h).buffer,sampleCount:k.length,info:V};l&&c&&(Y.timestampOffset=s),this._onMediaSegment("audio",Y)}}}},{key:"_remuxVideo",value:function(e,t){if(null!=this._videoMeta){var n,r,i=e,o=i.samples,s=void 0,a=-1,l=-1;if(o&&0!==o.length&&(1!==o.length||t)){var c=8,u=null,d=8+e.length,h=null;if(o.length>1&&(d-=(h=o.pop()).length),null!=this._videoStashedLastSample){var f=this._videoStashedLastSample;this._videoStashedLastSample=null,o.unshift(f),d+=f.length}null!=h&&(this._videoStashedLastSample=h);var p=o[0].dts-this._dtsBase;if(this._videoNextDts)s=p-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())s=0;else{var m=this._videoSegmentInfoList.getLastSampleBefore(p);if(null!=m){var v=p-(m.originalDts+m.duration);v<=3&&(v=0),s=p-(m.dts+m.duration+v)}else s=0}for(var g=new le,y=[],_=0;_<o.length;_++){var b=o[_],x=b.dts-this._dtsBase,w=b.isKeyframe,S=x-s,C=b.cts,k=S+C;-1===a&&(a=S,l=k);var E=0;if(_!==o.length-1)E=o[_+1].dts-this._dtsBase-s-S;else if(null!=h)E=h.dts-this._dtsBase-s-S;else E=y.length>=1?y[y.length-1].duration:Math.floor(this._videoMeta.refSampleDuration);if(w){var T=new ae(S,k,E,b.dts,!0);T.fileposition=b.fileposition,g.appendSyncPoint(T)}y.push({dts:S,pts:k,cts:C,units:b.units,size:b.length,isKeyframe:w,duration:E,originalDts:x,flags:{isLeading:0,dependsOn:w?2:1,isDependedOn:w?1:0,hasRedundancy:0,isNonSync:w?0:1}})}(u=new Uint8Array(d))[0]=d>>>24&255,u[1]=d>>>16&255,u[2]=d>>>8&255,u[3]=255&d,u.set(oe.types.mdat,4);for(var L=0;L<y.length;L++)for(var A=y[L].units;A.length;){var M=A.shift().data;u.set(M,c),c+=M.byteLength}var D=y[y.length-1];if(n=D.dts+D.duration,r=D.pts+D.duration,this._videoNextDts=n,g.beginDts=a,g.endDts=n,g.beginPts=l,g.endPts=r,g.originalBeginDts=y[0].originalDts,g.originalEndDts=D.originalDts+D.duration,g.firstSample=new ae(y[0].dts,y[0].pts,y[0].duration,y[0].originalDts,y[0].isKeyframe),g.lastSample=new ae(D.dts,D.pts,D.duration,D.originalDts,D.isKeyframe),this._isLive||this._videoSegmentInfoList.append(g),i.samples=y,i.sequenceNumber++,this._forceFirstIDR){var I=y[0].flags;I.dependsOn=2,I.isNonSync=0}var N=oe.moof(i,a);i.samples=[],i.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(N,u).buffer,sampleCount:y.length,info:g})}}}},{key:"_mergeBoxes",value:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(e,0),n.set(t,e.byteLength),n}}]),e}(),he={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"},fe=function(){function e(t,n){s()(this,e),this.TAG="TransmuxingController",this._emitter=new(h()),this._config=n,t.segments||(t.segments=[{duration:t.duration,filesize:t.filesize,url:t.url}]),"boolean"!=typeof t.cors&&(t.cors=!0),"boolean"!=typeof t.withCredentials&&(t.withCredentials=!1),this._mediaDataSource=t,this._currentSegmentIndex=0;var r=0;this._mediaDataSource.segments.forEach((function(e){e.timestampBase=r,r+=e.duration,e.cors=t.cors,e.withCredentials=t.withCredentials,n.referrerPolicy&&(e.referrerPolicy=n.referrerPolicy)})),isNaN(r)||this._mediaDataSource.duration===r||(this._mediaDataSource.duration=r),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}return l()(e,[{key:"destroy",value:function(){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}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"start",value:function(){this._loadSegment(0),this._enableStatisticsReporter()}},{key:"_loadSegment",value:function(e,t){this._currentSegmentIndex=e;var n=this._mediaDataSource.segments[e],r=this._ioctl=new U(n,this._config,e);r.onError=this._onIOException.bind(this),r.onSeeked=this._onIOSeeked.bind(this),r.onComplete=this._onIOComplete.bind(this),r.onRedirect=this._onIORedirect.bind(this),r.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),t?this._demuxer.bindDataSource(this._ioctl):r.onDataArrival=this._onInitChunkArrival.bind(this),r.open(t)}},{key:"stop",value:function(){this._internalAbort(),this._disableStatisticsReporter()}},{key:"_internalAbort",value:function(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}},{key:"pause",value:function(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}},{key:"resume",value:function(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}},{key:"seek",value:function(e){if(null!=this._mediaInfo&&this._mediaInfo.isSeekable()){var t=this._searchSegmentIndexContains(e);if(t===this._currentSegmentIndex){var n=this._mediaInfo.segments[t];if(null==n)this._pendingSeekTime=e;else{var r=n.getNearestKeyframe(e);this._remuxer.seek(r.milliseconds),this._ioctl.seek(r.fileposition),this._pendingResolveSeekPoint=r.milliseconds}}else{var i=this._mediaInfo.segments[t];if(null==i)this._pendingSeekTime=e,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(t);else{var o=i.getNearestKeyframe(e);this._internalAbort(),this._remuxer.seek(e),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[t].timestampBase,this._loadSegment(t,o.fileposition),this._pendingResolveSeekPoint=o.milliseconds,this._reportSegmentMediaInfo(t)}}this._enableStatisticsReporter()}}},{key:"_searchSegmentIndexContains",value:function(e){for(var t=this._mediaDataSource.segments,n=t.length-1,r=0;r<t.length;r++)if(e<t[r].timestampBase){n=r-1;break}return n}},{key:"_onInitChunkArrival",value:function(e,t){var n=this,r=null,i=0;if(t>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,i=this._demuxer.parseChunks(e,t);else if((r=re.probe(e)).match){this._demuxer=new re(r,this._config),this._remuxer||(this._remuxer=new de(this._config));var o=this._mediaDataSource;null==o.duration||isNaN(o.duration)||(this._demuxer.overridedDuration=o.duration),"boolean"==typeof o.hasAudio&&(this._demuxer.overridedHasAudio=o.hasAudio),"boolean"==typeof o.hasVideo&&(this._demuxer.overridedHasVideo=o.hasVideo),this._demuxer.timestampBase=o.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),i=this._demuxer.parseChunks(e,t)}else r=null,p.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then((function(){n._internalAbort()})),this._emitter.emit(he.DEMUX_ERROR,te.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),i=0;return i}},{key:"_onMediaInfo",value:function(e){var t=this;null==this._mediaInfo&&(this._mediaInfo=Object.assign({},e),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,V.prototype));var n=Object.assign({},e);Object.setPrototypeOf(n,V.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=n,this._reportSegmentMediaInfo(this._currentSegmentIndex),null!=this._pendingSeekTime&&Promise.resolve().then((function(){var e=t._pendingSeekTime;t._pendingSeekTime=null,t.seek(e)}))}},{key:"_onMetaDataArrived",value:function(e){this._emitter.emit(he.METADATA_ARRIVED,e)}},{key:"_onScriptDataArrived",value:function(e){this._emitter.emit(he.SCRIPTDATA_ARRIVED,e)}},{key:"_onIOSeeked",value:function(){this._remuxer.insertDiscontinuity()}},{key:"_onIOComplete",value:function(e){var t=e+1;t<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(t)):(this._remuxer.flushStashedSamples(),this._emitter.emit(he.LOADING_COMPLETE),this._disableStatisticsReporter())}},{key:"_onIORedirect",value:function(e){var t=this._ioctl.extraData;this._mediaDataSource.segments[t].redirectedURL=e}},{key:"_onIORecoveredEarlyEof",value:function(){this._emitter.emit(he.RECOVERED_EARLY_EOF)}},{key:"_onIOException",value:function(e,t){p.e(this.TAG,"IOException: type = ".concat(e,", code = ").concat(t.code,", msg = ").concat(t.msg)),this._emitter.emit(he.IO_ERROR,e,t),this._disableStatisticsReporter()}},{key:"_onDemuxException",value:function(e,t){p.e(this.TAG,"DemuxException: type = ".concat(e,", info = ").concat(t)),this._emitter.emit(he.DEMUX_ERROR,e,t)}},{key:"_onRemuxerInitSegmentArrival",value:function(e,t){this._emitter.emit(he.INIT_SEGMENT,e,t)}},{key:"_onRemuxerMediaSegmentArrival",value:function(e,t){if(null==this._pendingSeekTime&&(this._emitter.emit(he.MEDIA_SEGMENT,e,t),null!=this._pendingResolveSeekPoint&&"video"===e)){var n=t.info.syncPoints,r=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,I.safari&&n.length>0&&n[0].originalDts===r&&(r=n[0].pts),this._emitter.emit(he.RECOMMEND_SEEKPOINT,r)}}},{key:"_enableStatisticsReporter",value:function(){null==this._statisticsReporter&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}},{key:"_disableStatisticsReporter",value:function(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"_reportSegmentMediaInfo",value:function(e){var t=this._mediaInfo.segments[e],n=Object.assign({},t);n.duration=this._mediaInfo.duration,n.segmentCount=this._mediaInfo.segmentCount,delete n.segments,delete n.keyframesIndex,this._emitter.emit(he.MEDIA_INFO,n)}},{key:"_reportStatisticsInfo",value:function(){var e={};e.url=this._ioctl.currentURL,e.hasRedirect=this._ioctl.hasRedirect,e.hasRedirect&&(e.redirectedURL=this._ioctl.currentRedirectedURL),e.speed=this._ioctl.currentSpeed,e.loaderType=this._ioctl.loaderType,e.currentSegmentIndex=this._currentSegmentIndex,e.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(he.STATISTICS_INFO,e)}}]),e}(),pe=function(e){var t=null,n=function(t,n){e.postMessage({msg:"logcat_callback",data:{type:t,logcat:n}})}.bind(this);function r(t,n){var r={msg:he.INIT_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function i(t,n){var r={msg:he.MEDIA_SEGMENT,data:{type:t,data:n}};e.postMessage(r,[n.data])}function o(){var t={msg:he.LOADING_COMPLETE};e.postMessage(t)}function s(){var t={msg:he.RECOVERED_EARLY_EOF};e.postMessage(t)}function a(t){var n={msg:he.MEDIA_INFO,data:t};e.postMessage(n)}function l(t){var n={msg:he.METADATA_ARRIVED,data:t};e.postMessage(n)}function c(t){var n={msg:he.SCRIPTDATA_ARRIVED,data:t};e.postMessage(n)}function d(t){var n={msg:he.STATISTICS_INFO,data:t};e.postMessage(n)}function h(t,n){e.postMessage({msg:he.IO_ERROR,data:{type:t,info:n}})}function f(t,n){e.postMessage({msg:he.DEMUX_ERROR,data:{type:t,info:n}})}function p(t){e.postMessage({msg:he.RECOMMEND_SEEKPOINT,data:t})}u.install(),e.addEventListener("message",(function(u){switch(u.data.cmd){case"init":(t=new fe(u.data.param[0],u.data.param[1])).on(he.IO_ERROR,h.bind(this)),t.on(he.DEMUX_ERROR,f.bind(this)),t.on(he.INIT_SEGMENT,r.bind(this)),t.on(he.MEDIA_SEGMENT,i.bind(this)),t.on(he.LOADING_COMPLETE,o.bind(this)),t.on(he.RECOVERED_EARLY_EOF,s.bind(this)),t.on(he.MEDIA_INFO,a.bind(this)),t.on(he.METADATA_ARRIVED,l.bind(this)),t.on(he.SCRIPTDATA_ARRIVED,c.bind(this)),t.on(he.STATISTICS_INFO,d.bind(this)),t.on(he.RECOMMEND_SEEKPOINT,p.bind(this));break;case"destroy":t&&(t.destroy(),t=null),e.postMessage({msg:"destroyed"});break;case"start":t.start();break;case"stop":t.stop();break;case"seek":t.seek(u.data.param);break;case"pause":t.pause();break;case"resume":t.resume();break;case"logging_config":var m=u.data.param;q.applyConfig(m),!0===m.enableCallback?q.addLogListener(n):q.removeLogListener(n)}}))},me=function(){function e(t,r){if(s()(this,e),this.TAG="Transmuxer",this._emitter=new(h()),r.enableWorker&&"undefined"!=typeof Worker)try{var i=n(82059);this._worker=i(pe),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[t,r]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},q.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:q.getConfig()})}catch(e){p.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new fe(t,r)}else this._controller=new fe(t,r);if(this._controller){var o=this._controller;o.on(he.IO_ERROR,this._onIOError.bind(this)),o.on(he.DEMUX_ERROR,this._onDemuxError.bind(this)),o.on(he.INIT_SEGMENT,this._onInitSegment.bind(this)),o.on(he.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),o.on(he.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),o.on(he.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),o.on(he.MEDIA_INFO,this._onMediaInfo.bind(this)),o.on(he.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),o.on(he.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),o.on(he.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),o.on(he.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}return l()(e,[{key:"destroy",value:function(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),q.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"hasWorker",value:function(){return null!=this._worker}},{key:"open",value:function(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}},{key:"close",value:function(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}},{key:"seek",value:function(e){this._worker?this._worker.postMessage({cmd:"seek",param:e}):this._controller.seek(e)}},{key:"pause",value:function(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}},{key:"resume",value:function(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}},{key:"_onInitSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(he.INIT_SEGMENT,e,t)}))}},{key:"_onMediaSegment",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(he.MEDIA_SEGMENT,e,t)}))}},{key:"_onLoadingComplete",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(he.LOADING_COMPLETE)}))}},{key:"_onRecoveredEarlyEof",value:function(){var e=this;Promise.resolve().then((function(){e._emitter.emit(he.RECOVERED_EARLY_EOF)}))}},{key:"_onMediaInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(he.MEDIA_INFO,e)}))}},{key:"_onMetaDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(he.METADATA_ARRIVED,e)}))}},{key:"_onScriptDataArrived",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(he.SCRIPTDATA_ARRIVED,e)}))}},{key:"_onStatisticsInfo",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(he.STATISTICS_INFO,e)}))}},{key:"_onIOError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(he.IO_ERROR,e,t)}))}},{key:"_onDemuxError",value:function(e,t){var n=this;Promise.resolve().then((function(){n._emitter.emit(he.DEMUX_ERROR,e,t)}))}},{key:"_onRecommendSeekpoint",value:function(e){var t=this;Promise.resolve().then((function(){t._emitter.emit(he.RECOMMEND_SEEKPOINT,e)}))}},{key:"_onLoggingConfigChanged",value:function(e){this._worker&&this._worker.postMessage({cmd:"logging_config",param:e})}},{key:"_onWorkerMessage",value:function(e){var t=e.data,n=t.data;if("destroyed"===t.msg||this._workerDestroying)return this._workerDestroying=!1,this._worker.terminate(),void(this._worker=null);switch(t.msg){case he.INIT_SEGMENT:case he.MEDIA_SEGMENT:this._emitter.emit(t.msg,n.type,n.data);break;case he.LOADING_COMPLETE:case he.RECOVERED_EARLY_EOF:this._emitter.emit(t.msg);break;case he.MEDIA_INFO:Object.setPrototypeOf(n,V.prototype),this._emitter.emit(t.msg,n);break;case he.METADATA_ARRIVED:case he.SCRIPTDATA_ARRIVED:case he.STATISTICS_INFO:this._emitter.emit(t.msg,n);break;case he.IO_ERROR:case he.DEMUX_ERROR:this._emitter.emit(t.msg,n.type,n.info);break;case he.RECOMMEND_SEEKPOINT:this._emitter.emit(t.msg,n);break;case"logcat_callback":p.emitter.emit("log",n.type,n.logcat)}}}]),e}(),ve={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"},ge=function(){function e(t){s()(this,e),this.TAG="MSEController",this._config=t,this._emitter=new(h()),this._config.isLive&&null==this._config.autoCleanupSourceBuffer&&(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 ce}return l()(e,[{key:"destroy",value:function(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaSource)throw new x("MediaSource has been attached to an HTMLMediaElement!");var t=this._mediaSource=new window.MediaSource;t.addEventListener("sourceopen",this.e.onSourceOpen),t.addEventListener("sourceended",this.e.onSourceEnded),t.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=e,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),e.src=this._mediaSourceObjectURL}},{key:"detachMediaElement",value:function(){if(this._mediaSource){var e=this._mediaSource;for(var t in this._sourceBuffers){var n=this._pendingSegments[t];n.splice(0,n.length),this._pendingSegments[t]=null,this._pendingRemoveRanges[t]=null,this._lastInitSegments[t]=null;var r=this._sourceBuffers[t];if(r){if("closed"!==e.readyState){try{e.removeSourceBuffer(r)}catch(e){p.e(this.TAG,e.message)}r.removeEventListener("error",this.e.onSourceBufferError),r.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[t]=null,this._sourceBuffers[t]=null}}if("open"===e.readyState)try{e.endOfStream()}catch(e){p.e(this.TAG,e.message)}e.removeEventListener("sourceopen",this.e.onSourceOpen),e.removeEventListener("sourceended",this.e.onSourceEnded),e.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)}},{key:"appendInitSegment",value:function(e,t){if(!this._mediaSource||"open"!==this._mediaSource.readyState)return this._pendingSourceBufferInit.push(e),void this._pendingSegments[e.type].push(e);var n=e,r="".concat(n.container);n.codec&&n.codec.length>0&&(r+=";codecs=".concat(n.codec));var i=!1;if(p.v(this.TAG,"Received Initialization Segment, mimeType: "+r),this._lastInitSegments[n.type]=n,r!==this._mimeTypes[n.type]){if(this._mimeTypes[n.type])p.v(this.TAG,"Notice: ".concat(n.type," mimeType changed, origin: ").concat(this._mimeTypes[n.type],", target: ").concat(r));else{i=!0;try{var o=this._sourceBuffers[n.type]=this._mediaSource.addSourceBuffer(r);o.addEventListener("error",this.e.onSourceBufferError),o.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(e){return p.e(this.TAG,e.message),void this._emitter.emit(ve.ERROR,{code:e.code,msg:e.message})}}this._mimeTypes[n.type]=r}t||this._pendingSegments[n.type].push(n),i||this._sourceBuffers[n.type]&&!this._sourceBuffers[n.type].updating&&this._doAppendSegments(),I.safari&&"audio/mpeg"===n.container&&n.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=n.mediaDuration/1e3,this._updateMediaSourceDuration())}},{key:"appendMediaSegment",value:function(e){var t=e;this._pendingSegments[t.type].push(t),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();var n=this._sourceBuffers[t.type];!n||n.updating||this._hasPendingRemoveRanges()||this._doAppendSegments()}},{key:"seek",value:function(e){for(var t in this._sourceBuffers)if(this._sourceBuffers[t]){var n=this._sourceBuffers[t];if("open"===this._mediaSource.readyState)try{n.abort()}catch(e){p.e(this.TAG,e.message)}this._idrList.clear();var r=this._pendingSegments[t];if(r.splice(0,r.length),"closed"!==this._mediaSource.readyState){for(var i=0;i<n.buffered.length;i++){var o=n.buffered.start(i),s=n.buffered.end(i);this._pendingRemoveRanges[t].push({start:o,end:s})}if(n.updating||this._doRemoveRanges(),I.safari){var a=this._lastInitSegments[t];a&&(this._pendingSegments[t].push(a),n.updating||this._doAppendSegments())}}}}},{key:"endOfStream",value:function(){var e=this._mediaSource,t=this._sourceBuffers;e&&"open"===e.readyState?t.video&&t.video.updating||t.audio&&t.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,e.endOfStream()):e&&"closed"===e.readyState&&this._hasPendingSegments()&&(this._hasPendingEos=!0)}},{key:"getNearestKeyframe",value:function(e){return this._idrList.getLastSyncPointBeforeDts(e)}},{key:"_needCleanupSourceBuffer",value:function(){if(!this._config.autoCleanupSourceBuffer)return!1;var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){var r=n.buffered;if(r.length>=1&&e-r.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}},{key:"_doCleanupSourceBuffer",value:function(){var e=this._mediaElement.currentTime;for(var t in this._sourceBuffers){var n=this._sourceBuffers[t];if(n){for(var r=n.buffered,i=!1,o=0;o<r.length;o++){var s=r.start(o),a=r.end(o);if(s<=e&&e<a+3){if(e-s>=this._config.autoCleanupMaxBackwardDuration){i=!0;var l=e-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[t].push({start:s,end:l})}}else a<e&&(i=!0,this._pendingRemoveRanges[t].push({start:s,end:a}))}i&&!n.updating&&this._doRemoveRanges()}}}},{key:"_updateMediaSourceDuration",value:function(){var e=this._sourceBuffers;if(0!==this._mediaElement.readyState&&"open"===this._mediaSource.readyState&&!(e.video&&e.video.updating||e.audio&&e.audio.updating)){var t=this._mediaSource.duration,n=this._pendingMediaDuration;n>0&&(isNaN(t)||n>t)&&(p.v(this.TAG,"Update MediaSource duration from ".concat(t," to ").concat(n)),this._mediaSource.duration=n),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}}},{key:"_doRemoveRanges",value:function(){for(var e in this._pendingRemoveRanges)if(this._sourceBuffers[e]&&!this._sourceBuffers[e].updating)for(var t=this._sourceBuffers[e],n=this._pendingRemoveRanges[e];n.length&&!t.updating;){var r=n.shift();t.remove(r.start,r.end)}}},{key:"_doAppendSegments",value:function(){var e=this._pendingSegments;for(var t in e)if(this._sourceBuffers[t]&&!this._sourceBuffers[t].updating&&e[t].length>0){var n=e[t].shift();if(n.timestampOffset){var r=this._sourceBuffers[t].timestampOffset,i=n.timestampOffset/1e3;Math.abs(r-i)>.1&&(p.v(this.TAG,"Update MPEG audio timestampOffset from ".concat(r," to ").concat(i)),this._sourceBuffers[t].timestampOffset=i),delete n.timestampOffset}if(!n.data||0===n.data.byteLength)continue;try{this._sourceBuffers[t].appendBuffer(n.data),this._isBufferFull=!1,"video"===t&&n.hasOwnProperty("info")&&this._idrList.appendArray(n.info.syncPoints)}catch(e){this._pendingSegments[t].unshift(n),22===e.code?(this._isBufferFull||this._emitter.emit(ve.BUFFER_FULL),this._isBufferFull=!0):(p.e(this.TAG,e.message),this._emitter.emit(ve.ERROR,{code:e.code,msg:e.message}))}}}},{key:"_onSourceOpen",value:function(){if(p.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0)for(var e=this._pendingSourceBufferInit;e.length;){var t=e.shift();this.appendInitSegment(t,!0)}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(ve.SOURCE_OPEN)}},{key:"_onSourceEnded",value:function(){p.v(this.TAG,"MediaSource onSourceEnded")}},{key:"_onSourceClose",value:function(){p.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&null!=this.e&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}},{key:"_hasPendingSegments",value:function(){var e=this._pendingSegments;return e.video.length>0||e.audio.length>0}},{key:"_hasPendingRemoveRanges",value:function(){var e=this._pendingRemoveRanges;return e.video.length>0||e.audio.length>0}},{key:"_onSourceBufferUpdateEnd",value:function(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(ve.UPDATE_END)}},{key:"_onSourceBufferError",value:function(e){p.e(this.TAG,"SourceBuffer Error: ".concat(e))}}]),e}(),ye={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},_e={NETWORK_EXCEPTION:k.EXCEPTION,NETWORK_STATUS_CODE_INVALID:k.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:k.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:k.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:te.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:te.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:te.CODEC_UNSUPPORTED},be=function(){function e(t,n){if(s()(this,e),this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(h()),this._config=z(),"object"===i()(n)&&Object.assign(this._config,n),"flv"!==t.type.toLowerCase())throw new w("FlvPlayer requires an flv MediaDataSource input!");!0===t.isLive&&(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=t,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;var r=I.chrome&&(I.version.major<50||50===I.version.major&&I.version.build<2661);this._alwaysSeekKeyframe=!!(r||I.msedge||I.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}return l()(e,[{key:"destroy",value:function(){null!=this._progressChecker&&(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}},{key:"on",value:function(e,t){var n=this;e===W.MEDIA_INFO?null!=this._mediaInfo&&Promise.resolve().then((function(){n._emitter.emit(W.MEDIA_INFO,n.mediaInfo)})):e===W.STATISTICS_INFO&&null!=this._statisticsInfo&&Promise.resolve().then((function(){n._emitter.emit(W.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){var t=this;if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),e.addEventListener("seeking",this.e.onvSeeking),e.addEventListener("canplay",this.e.onvCanPlay),e.addEventListener("stalled",this.e.onvStalled),e.addEventListener("progress",this.e.onvProgress),this._msectl=new ge(this._config),this._msectl.on(ve.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(ve.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(ve.SOURCE_OPEN,(function(){t._mseSourceOpened=!0,t._hasPendingLoad&&(t._hasPendingLoad=!1,t.load())})),this._msectl.on(ve.ERROR,(function(e){t._emitter.emit(W.ERROR,ye.MEDIA_ERROR,_e.MEDIA_MSE_ERROR,e)})),this._msectl.attachMediaElement(e),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){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)}},{key:"load",value:function(){var e=this;if(!this._mediaElement)throw new x("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new x("FlvPlayer.load() has been called, please call unload() first!");this._hasPendingLoad||(this._config.deferLoadAfterSourceOpen&&!1===this._mseSourceOpened?this._hasPendingLoad=!0:(this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new me(this._mediaDataSource,this._config),this._transmuxer.on(he.INIT_SEGMENT,(function(t,n){e._msectl.appendInitSegment(n)})),this._transmuxer.on(he.MEDIA_SEGMENT,(function(t,n){if(e._msectl.appendMediaSegment(n),e._config.lazyLoad&&!e._config.isLive){var r=e._mediaElement.currentTime;n.info.endDts>=1e3*(r+e._config.lazyLoadMaxDuration)&&null==e._progressChecker&&(p.v(e.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),e._suspendTransmuxer())}})),this._transmuxer.on(he.LOADING_COMPLETE,(function(){e._msectl.endOfStream(),e._emitter.emit(W.LOADING_COMPLETE)})),this._transmuxer.on(he.RECOVERED_EARLY_EOF,(function(){e._emitter.emit(W.RECOVERED_EARLY_EOF)})),this._transmuxer.on(he.IO_ERROR,(function(t,n){e._emitter.emit(W.ERROR,ye.NETWORK_ERROR,t,n)})),this._transmuxer.on(he.DEMUX_ERROR,(function(t,n){e._emitter.emit(W.ERROR,ye.MEDIA_ERROR,t,{code:-1,msg:n})})),this._transmuxer.on(he.MEDIA_INFO,(function(t){e._mediaInfo=t,e._emitter.emit(W.MEDIA_INFO,Object.assign({},t))})),this._transmuxer.on(he.METADATA_ARRIVED,(function(t){e._emitter.emit(W.METADATA_ARRIVED,t)})),this._transmuxer.on(he.SCRIPTDATA_ARRIVED,(function(t){e._emitter.emit(W.SCRIPTDATA_ARRIVED,t)})),this._transmuxer.on(he.STATISTICS_INFO,(function(t){e._statisticsInfo=e._fillStatisticsInfo(t),e._emitter.emit(W.STATISTICS_INFO,Object.assign({},e._statisticsInfo))})),this._transmuxer.on(he.RECOMMEND_SEEKPOINT,(function(t){e._mediaElement&&!e._config.accurateSeek&&(e._requestSetTime=!0,e._mediaElement.currentTime=t/1e3)})),this._transmuxer.open()))}},{key:"unload",value:function(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._internalSeek(e):this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){return Object.assign({},this._mediaInfo)}},{key:"statisticsInfo",get:function(){return null==this._statisticsInfo&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}},{key:"_fillStatisticsInfo",value:function(e){if(e.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onmseUpdateEnd",value:function(){if(this._config.lazyLoad&&!this._config.isLive){for(var e=this._mediaElement.buffered,t=this._mediaElement.currentTime,n=0,r=0;r<e.length;r++){var i=e.start(r),o=e.end(r);if(i<=t&&t<o){i,n=o;break}}n>=t+this._config.lazyLoadMaxDuration&&null==this._progressChecker&&(p.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}},{key:"_onmseBufferFull",value:function(){p.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),null==this._progressChecker&&this._suspendTransmuxer()}},{key:"_suspendTransmuxer",value:function(){this._transmuxer&&(this._transmuxer.pause(),null==this._progressChecker&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}},{key:"_checkProgressAndResume",value:function(){for(var e=this._mediaElement.currentTime,t=this._mediaElement.buffered,n=!1,r=0;r<t.length;r++){var i=t.start(r),o=t.end(r);if(e>=i&&e<o){e>=o-this._config.lazyLoadRecoverDuration&&(n=!0);break}}n&&(window.clearInterval(this._progressChecker),this._progressChecker=null,n&&(p.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}},{key:"_isTimepointBuffered",value:function(e){for(var t=this._mediaElement.buffered,n=0;n<t.length;n++){var r=t.start(n),i=t.end(n);if(e>=r&&e<i)return!0}return!1}},{key:"_internalSeek",value:function(e){var t=this._isTimepointBuffered(e),n=!1,r=0;if(e<1&&this._mediaElement.buffered.length>0){var i=this._mediaElement.buffered.start(0);(i<1&&e<i||I.safari)&&(n=!0,r=I.safari?.1:i)}if(n)this._requestSetTime=!0,this._mediaElement.currentTime=r;else if(t){if(this._alwaysSeekKeyframe){var o=this._msectl.getNearestKeyframe(Math.floor(1e3*e));this._requestSetTime=!0,this._mediaElement.currentTime=null!=o?o.dts/1e3:e}else this._requestSetTime=!0,this._mediaElement.currentTime=e;null!=this._progressChecker&&this._checkProgressAndResume()}else null!=this._progressChecker&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e)}},{key:"_checkAndApplyUnbufferedSeekpoint",value:function(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){var e=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(e)||(null!=this._progressChecker&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(e),this._transmuxer.seek(Math.floor(1e3*e)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=e))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}},{key:"_checkAndResumeStuckPlayback",value:function(e){var t=this._mediaElement;if(e||!this._receivedCanPlay||t.readyState<2){var n=t.buffered;n.length>0&&t.currentTime<n.start(0)&&(p.w(this.TAG,"Playback seems stuck at ".concat(t.currentTime,", seek to ").concat(n.start(0))),this._requestSetTime=!0,this._mediaElement.currentTime=n.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}},{key:"_onvSeeking",value:function(e){var t=this._mediaElement.currentTime,n=this._mediaElement.buffered;if(this._requestSetTime)this._requestSetTime=!1;else{if(t<1&&n.length>0){var r=n.start(0);if(r<1&&t<r||I.safari)return this._requestSetTime=!0,void(this._mediaElement.currentTime=I.safari?.1:r)}if(this._isTimepointBuffered(t)){if(this._alwaysSeekKeyframe){var i=this._msectl.getNearestKeyframe(Math.floor(1e3*t));null!=i&&(this._requestSetTime=!0,this._mediaElement.currentTime=i.dts/1e3)}null!=this._progressChecker&&this._checkProgressAndResume()}else this._seekpointRecord={seekPoint:t,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}}},{key:"_onvCanPlay",value:function(e){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}},{key:"_onvStalled",value:function(e){this._checkAndResumeStuckPlayback(!0)}},{key:"_onvProgress",value:function(e){this._checkAndResumeStuckPlayback()}}]),e}(),xe=function(){function e(t,n){if(s()(this,e),this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(h()),this._config=z(),"object"===i()(n)&&Object.assign(this._config,n),"flv"===t.type.toLowerCase())throw new w("NativePlayer does't support flv MediaDataSource input!");if(t.hasOwnProperty("segments"))throw new w("NativePlayer(".concat(t.type,") doesn't support multipart playback!"));this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=t,this._mediaElement=null}return l()(e,[{key:"destroy",value:function(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}},{key:"on",value:function(e,t){var n=this;e===W.MEDIA_INFO?null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(W.MEDIA_INFO,n.mediaInfo)})):e===W.STATISTICS_INFO&&null!=this._mediaElement&&0!==this._mediaElement.readyState&&Promise.resolve().then((function(){n._emitter.emit(W.STATISTICS_INFO,n.statisticsInfo)})),this._emitter.addListener(e,t)}},{key:"off",value:function(e,t){this._emitter.removeListener(e,t)}},{key:"attachMediaElement",value:function(e){if(this._mediaElement=e,e.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),null!=this._pendingSeekTime)try{e.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(e){}}},{key:"detachMediaElement",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"load",value:function(){if(!this._mediaElement)throw new x("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)}},{key:"unload",value:function(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),null!=this._statisticsReporter&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}},{key:"play",value:function(){return this._mediaElement.play()}},{key:"pause",value:function(){this._mediaElement.pause()}},{key:"type",get:function(){return this._type}},{key:"buffered",get:function(){return this._mediaElement.buffered}},{key:"duration",get:function(){return this._mediaElement.duration}},{key:"volume",get:function(){return this._mediaElement.volume},set:function(e){this._mediaElement.volume=e}},{key:"muted",get:function(){return this._mediaElement.muted},set:function(e){this._mediaElement.muted=e}},{key:"currentTime",get:function(){return this._mediaElement?this._mediaElement.currentTime:0},set:function(e){this._mediaElement?this._mediaElement.currentTime=e:this._pendingSeekTime=e}},{key:"mediaInfo",get:function(){var e={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(e.duration=Math.floor(1e3*this._mediaElement.duration),this._mediaElement instanceof HTMLVideoElement&&(e.width=this._mediaElement.videoWidth,e.height=this._mediaElement.videoHeight)),e}},{key:"statisticsInfo",get:function(){var e={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return e;var t=!0,n=0,r=0;if(this._mediaElement.getVideoPlaybackQuality){var i=this._mediaElement.getVideoPlaybackQuality();n=i.totalVideoFrames,r=i.droppedVideoFrames}else null!=this._mediaElement.webkitDecodedFrameCount?(n=this._mediaElement.webkitDecodedFrameCount,r=this._mediaElement.webkitDroppedFrameCount):t=!1;return t&&(e.decodedFrames=n,e.droppedFrames=r),e}},{key:"_onvLoadedMetadata",value:function(e){null!=this._pendingSeekTime&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(W.MEDIA_INFO,this.mediaInfo)}},{key:"_reportStatisticsInfo",value:function(){this._emitter.emit(W.STATISTICS_INFO,this.statisticsInfo)}}]),e}();u.install();var we={createPlayer:function(e,t){var n=e;if(null==n||"object"!==i()(n))throw new w("MediaDataSource must be an javascript object!");if(!n.hasOwnProperty("type"))throw new w("MediaDataSource must has type field to indicate video file type!");return"flv"===n.type?new be(n,t):new xe(n,t)},isSupported:function(){return Z.supportMSEH264Playback()},getFeatureList:function(){return Z.getFeatureList()}};we.BaseLoader=E,we.LoaderStatus=C,we.LoaderErrors=k,we.Events=W,we.ErrorTypes=ye,we.ErrorDetails=_e,we.FlvPlayer=be,we.NativePlayer=xe,we.LoggingControl=q,Object.defineProperty(we,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Se=we},74469:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},67566:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},78318:function(){},44084:function(){},32313:function(e,t){"use strict";t.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},36952:function(e,t){"use strict";t.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"}},32905:function(){},93125:function(e,t,n){var r;r=function(){return function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=void 0,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){"use strict";var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.co=e("co"),r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(e,t,n){(function(n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(this instanceof o))return new o(e,t);e&&e.inited?this.options=e:this.options=o.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=x,this.agent=this.options.agent||T),this.ctx=t,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var s=i(e("babel-runtime/regenerator")),a=i(e("babel-runtime/core-js/object/keys")),l=e("debug")("ali-oss"),c=e("./../../shims/crypto/crypto.js"),u=e("path"),d=e("copy-to"),h=e("mime"),f=e("xml2js"),p=e("humanize-ms"),m=e("agentkeepalive"),v=e("merge-descriptors"),g=e("url"),y=e("is-type-of"),_=e("platform"),b=e("utility"),x=e("urllib"),w=e("./version"),S=e("dateformat"),C=e("bowser"),k=e("../common/signUtils"),E=e("../common/utils"),T=new m;t.exports=o,o.initOptions=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var t={region:"oss-cn-hangzhou",internal:!1,secure:document&&document.location&&"https:"===document.location.protocol,bucket:null,endpoint:null,cname:!1};if((0,a.default)(e).forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=p(t.timeout)),t.endpoint)t.endpoint=function(e,t){var n=g.parse(e);if(!n.protocol){var r=t?"https://":"http://";n=g.parse(r+e)}if("http:"!==n.protocol&&"https:"!==n.protocol)throw new Error("Endpoint protocol must be http or https.");return n}(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=function(e,t,n){var r=n?"https://":"http://",i=t?"-internal.aliyuncs.com":".aliyuncs.com";return"vpc100-oss-cn-"===e.substr(0,"vpc100-oss-cn-".length)&&(i=".aliyuncs.com"),g.parse(r+e+i)}(t.region,t.internal,t.secure)}return t.inited=!0,t};var L=o.prototype;v(L,e("./object")),v(L,e("./managed_upload")),v(L,e("../common/multipart")),v(L,e("../common/thunkpool.js")),o.Wrapper=e("./wrapper"),L.signature=function(e){return l("authorization stringToSign: %s",e),k.computeSignature(this.options.accessKeySecret,e)},L.authorization=function(e,t,n,r){var i=k.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:n});return k.authorization(this.options.accessKeyId,this.options.accessKeySecret,i)},L.createRequest=function(e){var t={"x-oss-date":S(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(t["x-oss-security-token"]=this.options.stsToken),d(e.headers).to(t),function(e,t){return e[t]||e[t.toLowerCase()]}(t,"Content-Type")||(e.mime===h.default_type&&(e.mime=""),e.mime&&e.mime.indexOf("/")>0?t["Content-Type"]=e.mime:t["Content-Type"]=h.getType(e.mime||u.extname(e.object||""))||"application/octet-stream"),e.content&&(t["Content-Md5"]=c.createHash("md5").update(new r(e.content,"utf8")).digest("base64"),t["Content-Length"]||(t["Content-Length"]=e.content.length));var n=this._getResource(e);t.authorization=this.authorization(e.method,n,e.subres,t);var i=this._getReqUrl(e);l("request %s %s, with headers %j, !!stream: %s",e.method,i,t,!!e.stream);var o=e.timeout||this.options.timeout;return{url:i,params:{agent:this.agent,method:e.method,content:e.content,stream:e.stream,headers:t,timeout:o,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx}}},L.request=s.default.mark((function e(t){var n,r,i,o;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.createRequest(t),r=void 0,i=void 0,e.prev=3,e.next=6,this.urllib.request(n.url,n.params);case 6:r=e.sent,l("response %s %s, got %s, headers: %j",t.method,n.url,r.status,r.headers),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),i=e.t0;case 13:if(o=void 0,!r||!t.successStatuses||-1!==t.successStatuses.indexOf(r.status)){e.next=26;break}return e.next=17,this.requestError(r);case 17:if("RequestTimeTooSkewed"!==(o=e.sent).code){e.next=23;break}return this.options.amendTimeSkewed=+new Date(o.serverTime)-new Date,e.next=22,this.request(t);case 22:return e.abrupt("return",e.sent);case 23:o.params=t,e.next=30;break;case 26:if(!i){e.next=30;break}return e.next=29,this.requestError(i);case 29:o=e.sent;case 30:if(!o){e.next=32;break}throw o;case 32:if(!t.xmlResponse){e.next=36;break}return e.next=35,this.parseXML(r.data);case 35:r.data=e.sent;case 36:return e.abrupt("return",r);case 37:case"end":return e.stop()}}),e,this,[[3,10]])})),L._getResource=function(e){var t="/";return e.bucket&&(t+=e.bucket+"/"),e.object&&(t+=e.object),t},L._isIP=function(e){return E._isIP(e)},L._escape=function(e){return b.encodeURIComponent(e).replace(/%2F/g,"/")},L._getReqUrl=function(e){var t={};d(this.options.endpoint).to(t);var n=this._isIP(t.hostname),r=this.options.cname;!e.bucket||r||n||(t.host=e.bucket+"."+t.host);var i="/";e.bucket&&n&&(i+=e.bucket+"/"),e.object&&(i+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=i;var o={};if(e.query&&v(o,e.query),e.subres){var s={};y.string(e.subres)?s[e.subres]="":y.array(e.subres)?e.subres.forEach((function(e){s[e]=""})):s=e.subres,v(o,s)}return t.query=o,g.format(t)},L._getUserAgent=function(){var e="aliyun-sdk-"+(n&&n.browser?"js":"nodejs")+"/"+w.version,t=_.description;return!t&&n&&(t="Node.js "+n.version.slice(1)+" on "+n.platform+" "+n.arch),this._checkUserAgent(e+" "+t)},L._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},L.checkBrowserAndVersion=function(e,t){return C.name===e&&C.version.split(".")[0]===t},L.parseXML=function(e){return function(t){r.isBuffer(e)&&(e=e.toString()),f.parseString(e,{explicitRoot:!1,explicitArray:!1},t)}},L.requestError=s.default.mark((function e(t){var n,r,i,o;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null,t.data&&t.data.length){e.next=5;break}-1===t.status||-2===t.status?((n=new Error(t.message)).name=t.name,n.status=t.status,n.code=t.name):(404===t.status?((n=new Error("Object not exists")).name="NoSuchKeyError",n.status=404,n.code="NoSuchKey"):412===t.status?((n=new Error("Pre condition failed")).name="PreconditionFailedError",n.status=412,n.code="PreconditionFailed"):((n=new Error("Unknow error, status: "+t.status)).name="UnknowError",n.status=t.status),n.requestId=t.headers["x-oss-request-id"],n.host=""),e.next=30;break;case 5:return r=String(t.data),l("request response error data: %s",r),i=void 0,e.prev=8,e.next=11,this.parseXML(r)||{};case 11:i=e.sent,e.next=21;break;case 14:return e.prev=14,e.t0=e.catch(8),l(r),e.t0.message+="\nraw xml: "+r,e.t0.status=t.status,e.t0.requestId=t.headers["x-oss-request-id"],e.abrupt("return",e.t0);case 21:o=i.Message||"unknow request error, status: "+t.status,i.Condition&&(o+=" (condition: "+i.Condition+")"),(n=new Error(o)).name=i.Code?i.Code+"Error":"UnknowError",n.status=t.status,n.code=i.Code,n.requestId=i.RequestId,n.hostId=i.HostId,n.serverTime=i.ServerTime;case 30:return l("generate error %j",n),e.abrupt("return",n);case 32:case"end":return e.stop()}}),e,this,[[8,14]])}))}).call(this,e("_process"),e("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(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(this instanceof i))return new i(e,t);f.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var o=r(e("babel-runtime/core-js/array/from")),s=r(e("babel-runtime/regenerator")),a=e("is-type-of"),l=e("util"),c=e("path"),u=e("mime"),d=e("copy-to"),h=n;h.multipartUpload=s.default.mark((function e(t,n,r){var i,o,l,d,h,f,p,m,v;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.resetCancelFlag(),!(r=r||{}).checkpoint||!r.checkpoint.uploadId){e.next=6;break}return e.next=5,this._resumeMultipart(r.checkpoint,r);case 5:case 38:return e.abrupt("return",e.sent);case 6:return i=102400,r.mime||(a.file(n)?r.mime=u.getType(c.extname(n.name)):a.blob(n)?r.mime=n.type:r.mime=u.getType(c.extname(n))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),e.next=12,this._getFileSize(n);case 12:if(!((o=e.sent)<i)){e.next=25;break}return l=this._createStream(n,0,o),r.contentLength=o,e.next=18,this.putStream(t,l,r);case 18:if(d=e.sent,!r||!r.progress){e.next=22;break}return e.next=22,r.progress(1);case 22:return h={res:d.res,bucket:this.options.bucket,name:t,etag:d.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(h.data=d.data),e.abrupt("return",h);case 25:if(!(r.partSize&&r.partSize<i)){e.next=27;break}throw new Error("partSize must not be smaller than "+i);case 27:return e.next=29,this.initMultipartUpload(t,r);case 29:if(f=e.sent,p=f.uploadId,m=this._getPartSize(o,r.partSize),v={file:n,name:t,fileSize:o,partSize:m,uploadId:p,doneParts:[]},!r||!r.progress){e.next=36;break}return e.next=36,r.progress(0,v,f.res);case 36:return e.next=38,this._resumeMultipart(v,r);case 39:case"end":return e.stop()}}),e,this)})),h._resumeMultipart=s.default.mark((function e(t,n){var r,i,a,l,c,u,h,f,p,m,v,g,y,_,b,x,w,S,C,k;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(r=t.file,i=t.fileSize,a=t.partSize,l=t.uploadId,c=t.doneParts,u=t.name,h=[],c.length>0&&d(c).to(h),f=this._divideParts(i,a),p=f.length,m=!1,v=s.default.mark((function e(i,o){var a,d,v;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i.isCancel()){e.next=21;break}return e.prev=1,a=f[o-1],d={stream:i._createStream(r,a.start,a.end),size:a.end-a.start},e.next=6,i._uploadPart(u,l,o,d);case 6:if(v=e.sent,i.isCancel()||m){e.next=13;break}if(t.doneParts.push({number:o,etag:v.res.headers.etag}),h.push({number:o,etag:v.res.headers.etag}),!n||!n.progress){e.next=13;break}return e.next=13,n.progress(c.length/p,t,v.res);case 13:e.next=21;break;case 15:if(e.prev=15,e.t0=e.catch(1),i.isCancel()){e.next=21;break}throw i.cancel(),e.t0.partNum=o,e.t0;case 21:case"end":return e.stop()}}),e,this,[[1,15]])})),g=(0,o.default)(new Array(p),(function(e,t){return t+1})),y=h.map((function(e){return e.number})),_=g.filter((function(e){return y.indexOf(e)<0})),b=n.parallel||5,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==b){e.next=26;break}x=0;case 16:if(!(x<_.length)){e.next=24;break}if(!this.isCancel()){e.next=19;break}throw this._makeCancelEvent();case 19:return e.next=21,v(this,_[x]);case 21:x++,e.next=16;break;case 24:e.next=40;break;case 26:for(w=[],S=0;S<_.length;S++)w.push(v(this,_[S]));return e.next=30,this._thunkPool(w,b);case 30:if(C=e.sent,m=!0,!(C&&C.length>0)){e.next=37;break}throw this.resetCancelFlag(),(k=C[0]).message="Failed to upload some parts with error: "+k.toString()+" part_num: "+k.partNum,k;case 37:if(!this.isCancel()){e.next=40;break}throw w=null,this._makeCancelEvent();case 40:return e.next=42,this.completeMultipartUpload(u,l,h,n);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}}),e,this)})),a.file=function(e){return"undefined"!=typeof File&&e instanceof File},a.blob=function(e){return"undefined"!=typeof Blob&&e instanceof Blob},h._getFileSize=s.default.mark((function e(t){var n;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.buffer(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!a.blob(t)&&!a.file(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:if(!a.string(t)){e.next=11;break}return e.next=9,this._statFile(t);case 9:return n=e.sent,e.abrupt("return",n.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return e.stop()}}),e,this)}));var f=e("stream").Readable;l.inherits(i,f),i.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var n=this.start,r=n+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(n,r))}},i.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var n=this;this.reader.onload=function(r){n.fileBuffer=new t(new Uint8Array(r.target.result)),n.file=null,n.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},h._createStream=function(e,t,n){if(a.blob(e)||a.file(e))return new i(e.slice(t,n));throw new Error("_createStream requires File/String.")},h._getPartSize=function(e,t){return t?Math.max(Math.ceil(e/1e4),t):1048576},h._divideParts=function(e,t){for(var n=Math.ceil(e/t),r=[],i=0;i<n;i++){var o=t*i,s=Math.min(o+t,e);r.push({start:o,end:s})}return r},h._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,e("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(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/keys")),o=r(e("babel-runtime/regenerator")),s=e("debug")("ali-oss:object"),a=e("utility"),l=e("fs"),c=e("is-type-of"),u=e("url"),d=e("copy-to"),h=e("path"),f=e("mime"),p=e("../common/callback"),m=e("../common/signUtils"),v=n;v.append=o.default.mark((function e(t,n,r){var i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",e.next=6,this.put(t,n,r);case 6:return(i=e.sent).nextAppendPosition=i.res.headers["x-oss-next-append-position"],e.abrupt("return",i);case 9:case"end":return e.stop()}}),e,this)})),v.put=o.default.mark((function e(t,n,r){var i,s,a,l,u,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=void 0,r=r||{},!c.buffer(n)){e.next=6;break}i=n,e.next=18;break;case 6:if(!c.blob(n)&&!c.file(n)){e.next=17;break}return r.mime||(c.file(n)?r.mime=f.getType(h.extname(n.name)):r.mime=n.type),s=this._createStream(n,0,n.size),e.next=11,this._getFileSize(n);case 11:return r.contentLength=e.sent,e.next=14,this.putStream(t,s,r);case 14:return e.abrupt("return",e.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),a=r.method||"PUT",l=this._objectRequestParams(a,t,r),p.encodeCallback(l,r),l.mime=r.mime,l.content=i,l.successStatuses=[200],e.next=28,this.request(l);case 28:return u=e.sent,d={name:t,url:this._objectUrl(t),res:u.res},l.headers&&l.headers["x-oss-callback"]&&(d.data=JSON.parse(u.data.toString())),e.abrupt("return",d);case 32:case"end":return e.stop()}}),e,this)})),v.putStream=o.default.mark((function e(t,n,r){var i,s,a,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),i=r.method||"PUT",s=this._objectRequestParams(i,t,r),p.encodeCallback(s,r),s.mime=r.mime,s.stream=n,s.successStatuses=[200],e.next=12,this.request(s);case 12:return a=e.sent,l={name:t,url:this._objectUrl(t),res:a.res},s.headers&&s.headers["x-oss-callback"]&&(l.data=JSON.parse(a.data.toString())),e.abrupt("return",l);case 16:case"end":return e.stop()}}),e,this)})),v.head=o.default.mark((function e(t,n){var r,s,a;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("HEAD",t,n)).successStatuses=[200,304],e.next=4,this.request(r);case 4:return s=e.sent,a={meta:null,res:s.res,status:s.status},200===s.status&&(0,i.default)(s.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=s.headers[e])})),e.abrupt("return",a);case 8:case"end":return e.stop()}}),e,this)})),v.get=o.default.mark((function e(t,n,r){var i,a,u,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,a=!1,c.writableStream(n)?i=n:c.string(n)?(i=l.createWriteStream(n),a=!0):r=n,(r=r||{}).process&&(r.subres=r.subres||{},r.subres["x-oss-process"]=r.process),u=void 0,e.prev=6,(d=this._objectRequestParams("GET",t,r)).writeStream=i,d.successStatuses=[200,206,304],e.next=12,this.request(d);case 12:u=e.sent,a&&i.destroy(),e.next=24;break;case 16:if(e.prev=16,e.t0=e.catch(6),!a){e.next=23;break}return i.destroy(),s("get error: %s, delete the exists file %s",e.t0,n),e.next=23,this._deleteFileSafe(n);case 23:throw e.t0;case 24:return e.abrupt("return",{res:u.res,content:u.data});case 25:case"end":return e.stop()}}),e,this,[[6,16]])})),v.getStream=o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},(r=this._objectRequestParams("GET",t,n)).customResponse=!0,r.successStatuses=[200,206,304],e.next=6,this.request(r);case 6:return i=e.sent,e.abrupt("return",{stream:i.res,res:{status:i.status,headers:i.headers}});case 8:case"end":return e.stop()}}),e,this)})),v.delete=o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("DELETE",t,n)).successStatuses=[204],e.next=4,this.request(r);case 4:return i=e.sent,e.abrupt("return",{res:i.res});case 6:case"end":return e.stop()}}),e,this)})),v.deleteMulti=o.default.mark((function e(t,n){var r,i,l,c,u,d;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(r='<?xml version="1.0" encoding="UTF-8"?>\n<Delete>\n',(n=n||{}).quiet?r+=" <Quiet>true</Quiet>\n":r+=" <Quiet>false</Quiet>\n",i=0;i<t.length;i++)r+=" <Object><Key>"+a.escape(this._objectName(t[i]))+"</Key></Object>\n";return s("delete multi objects: %s",r+="</Delete>"),n.subres="delete",(l=this._objectRequestParams("POST","",n)).mime="xml",l.content=r,l.xmlResponse=!0,l.successStatuses=[200],e.next=14,this.request(l);case 14:return c=e.sent,u=c.data,(d=u&&u.Deleted||null)&&(Array.isArray(d)||(d=[d]),d=d.map((function(e){return e.Key}))),e.abrupt("return",{res:c.res,deleted:d});case 19:case"end":return e.stop()}}),e,this)})),v.copy=o.default.mark((function e(t,n,r){var s,a,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},(0,i.default)(r.headers).forEach((function(e){r.headers["x-oss-copy-source-"+e.toLowerCase()]=r.headers[e]})),r.meta&&(r.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(r.meta,r.headers),n="/"!==n[0]?"/"+this.options.bucket+"/"+encodeURIComponent(n):"/"+encodeURIComponent(n.slice(1)),r.headers["x-oss-copy-source"]=n,(s=this._objectRequestParams("PUT",t,r)).xmlResponse=!0,s.successStatuses=[200,304],e.next=12,this.request(s);case 12:return a=e.sent,(l=a.data)&&(l={etag:l.ETag,lastModified:l.LastModified}),e.abrupt("return",{data:l,res:a.res});case 16:case"end":return e.stop()}}),e,this)})),v.putMeta=o.default.mark((function e(t,n,r){return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:n||{},timeout:r&&r.timeout,ctx:r&&r.ctx});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})),v.list=o.default.mark((function e(t,n){var r,i,s,a,l;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("GET","",n)).query=t,r.xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return i=e.sent,s=i.data.Contents,a=this,s&&(Array.isArray(s)||(s=[s]),s=s.map((function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(l=i.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map((function(e){return e.Prefix}))),e.abrupt("return",{res:i.res,objects:s,prefixes:l,nextMarker:i.data.NextMarker||null,isTruncated:"true"===i.data.IsTruncated});case 13:case"end":return e.stop()}}),e,this)})),v.putACL=o.default.mark((function e(t,n,r){var i,s;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).subres="acl",r.headers=r.headers||{},r.headers["x-oss-object-acl"]=n,t=this._objectName(t),(i=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=9,this.request(i);case 9:return s=e.sent,e.abrupt("return",{res:s.res});case 11:case"end":return e.stop()}}),e,this)})),v.getACL=o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).subres="acl",t=this._objectName(t),(r=this._objectRequestParams("GET",t,n)).successStatuses=[200],r.xmlResponse=!0,e.next=8,this.request(r);case 8:return i=e.sent,e.abrupt("return",{acl:i.data.AccessControlList.Grant,owner:{id:i.data.Owner.ID,displayName:i.data.Owner.DisplayName},res:i.res});case 10:case"end":return e.stop()}}),e,this)})),v.restore=o.default.mark((function e(t,n){var r,i;return o.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=n||{}).subres="restore",(r=this._objectRequestParams("POST",t,n)).successStatuses=[202],e.next=6,this.request(r);case 6:return i=e.sent,e.abrupt("return",{res:i.res});case 8:case"end":return e.stop()}}),e,this)})),v.signatureUrl=function(e,t){t=t||{},e=this._objectName(e),t.method=t.method||"GET";var n=a.timestamp()+(t.expires||1800),r={bucket:this.options.bucket,object:e},i=this._getResource(r);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var o=m._signatureForURL(this.options.accessKeySecret,t,i,n),s=u.parse(this._getReqUrl(r));return s.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:o.Signature},d(o.subResource).to(s.query),s.format()},v.getObjectUrl=function(e,t){return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))},v._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},v.generateObjectUrl=function(e,t){if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var n=u.parse(t),r=this.options.bucket;n.hostname=r+"."+n.hostname,n.host=r+"."+n.host,t=n.format()}return t+this._escape(this._objectName(e))},v._objectRequestParams=function(e,t,n){if(!this.options.bucket)throw new Error("Please create a bucket first");n=n||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:n&&n.subres,timeout:n&&n.timeout,ctx:n&&n.ctx};return n.headers&&(r.headers={},d(n.headers).to(r.headers)),r},v._objectName=function(e){return e.replace(/^\/+/,"")},v._statFile=function(e){return function(t){l.stat(e,t)}},v._convertMetaToHeaders=function(e,t){e&&(0,i.default)(e).forEach((function(n){t["x-oss-meta-"+n]=e[n]}))},v._deleteFileSafe=function(e){return function(t){l.exists(e,(function(n){n?l.unlink(e,(function(n){n&&s("unlink %j error: %s",e,n),t()})):t()}))}}},{"../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(e,t,n){"use strict";n.version="5.3.1"},{}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return e&&"function"==typeof e.next&&"function"==typeof e.throw}function o(e){if(!e)return!1;var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||i(t.prototype)||i(e.prototype))}function s(e,t){var n=new e(t),r=(0,c.default)(n),i=(0,c.default)((0,l.default)(n));r.concat(i).forEach((function(e){o(n[e])?this[e]=u.wrap(n[e]).bind(n):this[e]=n[e]}),this)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,d,e)}var l=r(e("babel-runtime/core-js/object/get-prototype-of")),c=r(e("babel-runtime/core-js/object/keys")),u=e("co"),d=e("./client");t.exports=a,a.STS=function e(t){if(!(this instanceof e))return new e(t);s.call(this,d.STS,t)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/keys")),o=r(e("babel-runtime/core-js/json/stringify"));n.encodeCallback=function(e,n){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&n.callback){var r={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};n.callback.host&&(r.callbackHost=n.callback.host),n.callback.contentType&&(r.callbackBodyType=n.callback.contentType);var s=new t((0,o.default)(r)).toString("base64");if(e.headers["x-oss-callback"]=s,n.callback.customValue){var a={};(0,i.default)(n.callback.customValue).forEach((function(e){a["x:"+e]=n.callback.customValue[e]})),e.headers["x-oss-callback-var"]=new t((0,o.default)(a)).toString("base64")}}}}).call(this,e("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/regenerator")),i=e("copy-to"),o=e("./callback"),s=n;s.listUploads=r.default.mark((function e(t,n){var o,s,a,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={},i(n=n||{}).to(o),o.subres="uploads",(s=this._objectRequestParams("GET","",o)).query=t,s.xmlResponse=!0,s.successStatuses=[200],e.next=10,this.request(s);case 10:return a=e.sent,l=a.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),e.abrupt("return",{res:a.res,uploads:l,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:"true"===a.data.IsTruncated});case 15:case"end":return e.stop()}}),e,this)})),s.listParts=r.default.mark((function e(t,n,o,s){var a,l,c;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},i(s=s||{}).to(a),a.subres={uploadId:n},(l=this._objectRequestParams("GET",t,a)).query=o,l.xmlResponse=!0,l.successStatuses=[200],e.next=10,this.request(l);case 10:return c=e.sent,e.abrupt("return",{res:c.res,uploadId:c.data.UploadId,bucket:c.data.Bucket,name:c.data.Key,partNumberMarker:c.data.PartNumberMarker,nextPartNumberMarker:c.data.NextPartNumberMarker,maxParts:c.data.MaxParts,isTruncated:c.data.IsTruncated,parts:c.data.Part||[]});case 12:case"end":return e.stop()}}),e,this)})),s.abortMultipartUpload=r.default.mark((function e(t,n,o){var s,a,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.cancel(),s={},i(o=o||{}).to(s),s.subres={uploadId:n},(a=this._objectRequestParams("DELETE",t,s)).successStatuses=[204],e.next=9,this.request(a);case 9:return l=e.sent,e.abrupt("return",{res:l.res});case 11:case"end":return e.stop()}}),e,this)})),s.initMultipartUpload=r.default.mark((function e(t,n){var o,s,a;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={},i(n=n||{}).to(o),o.headers=o.headers||{},this._convertMetaToHeaders(n.meta,o.headers),o.subres="uploads",(s=this._objectRequestParams("POST",t,o)).mime=n.mime,s.xmlResponse=!0,s.successStatuses=[200],e.next=12,this.request(s);case 12:return a=e.sent,e.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return e.stop()}}),e,this)})),s.uploadPart=r.default.mark((function e(t,n,i,o,s,a,l){var c;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c={stream:this._createStream(o,s,a),size:a-s},e.next=3,this._uploadPart(t,n,i,c,l);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)})),s.completeMultipartUpload=r.default.mark((function e(t,n,s,a){var l,c,u,d,h,f,p,m;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(l=s.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,n){return!t||e.number!==n[t-1].number})),c='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',u=0;u<l.length;u++)d=l[u],c+="<Part>\n",c+="<PartNumber>"+d.number+"</PartNumber>\n",c+="<ETag>"+d.etag+"</ETag>\n",c+="</Part>\n";return c+="</CompleteMultipartUpload>",h={},i(a=a||{}).to(h),h.subres={uploadId:n},f=this._objectRequestParams("POST",t,h),o.encodeCallback(f,h),f.mime="xml",f.content=c,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],e.next=16,this.request(f);case 16:return p=e.sent,m={res:p.res,bucket:f.bucket,name:t,etag:p.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(m.data=JSON.parse(p.data.toString())),e.abrupt("return",m);case 20:case"end":return e.stop()}}),e,this)})),s._uploadPart=r.default.mark((function e(t,n,o,s,a){var l,c,u;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l={},i(a=a||{}).to(l),l.headers={"Content-Length":s.size},l.subres={partNumber:o,uploadId:n},(c=this._objectRequestParams("PUT",t,l)).mime=l.mime,c.stream=s.stream,c.successStatuses=[200],e.next=11,this.request(c);case 11:return u=e.sent,s.stream=null,c.stream=null,e.abrupt("return",{name:t,etag:u.res.headers.etag,res:u.res});case 15:case"end":return e.stop()}}),e,this)}))},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/json/stringify")),o=r(e("babel-runtime/core-js/object/keys")),s=e("./../../shims/crypto/crypto.js"),a=e("is-type-of");n.buildCanonicalizedResource=function(e,t){var n=""+e,r="?";return a.string(t)&&""!==t.trim()?n+=r+t:a.array(t)?(t.sort(),n+=r+t.join("&")):t&&(0,o.default)(t).sort((function(e,t){return e[0]>t[0]?1:e[0]<t[0]?-1:0})).forEach((function(e){n+=r+e,t[e]&&(n+="="+t[e]),r="&"})),n},n.buildCanonicalString=function(e,t,n,r){var i=(n=n||{}).headers||{},s=[],a={},l=[e.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],r||i["x-oss-date"]];return(0,o.default)(i).forEach((function(e){var t=e.toLowerCase();0===t.indexOf("x-oss-")&&(a[t]=String(i[e]).trim())})),(0,o.default)(a).sort().forEach((function(e){s.push(e+":"+a[e])})),(l=l.concat(s)).push(this.buildCanonicalizedResource(t,n.parameters)),l.join("\n")},n.computeSignature=function(e,n){return s.createHmac("sha1",e).update(new t(n,"utf8")).digest("base64")},n.authorization=function(e,t,n){return"OSS "+e+":"+this.computeSignature(t,n)},n._signatureForURL=function(e,n,r,s){var a={},l={};if(n.process&&(l["x-oss-process"]=n.process),n.response&&(0,o.default)(n.response).forEach((function(e){var t="response-"+e.toLowerCase();l[t]=n.response[e]})),(0,o.default)(n).forEach((function(e){var t=e.toLowerCase(),r=n[e];0===t.indexOf("x-oss-")?a[t]=r:0===t.indexOf("content-md5")||0===t.indexOf("content-type")?a[e]=r:"expires"!==t&&"response"!==t&&"process"!==t&&"method"!==t&&(l[t]=r)})),Object.prototype.hasOwnProperty.call(n,"security-token")&&(l["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var c={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(c.callbackHost=n.callback.host),n.callback.contentType&&(c.callbackBodyType=n.callback.contentType),l.callback=new t((0,i.default)(c)).toString("base64"),n.callback.customValue){var u={};(0,o.default)(n.callback.customValue).forEach((function(e){u["x:"+e]=n.callback.customValue[e]})),l["callback-var"]=new t((0,i.default)(u)).toString("base64")}}var d=this.buildCanonicalString(n.method,r,{headers:a,parameters:l},s.toString());return{Signature:this.computeSignature(e,d),subResource:l}}}).call(this,e("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(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/regenerator")),i=e("co"),o=e("co-priority-queue"),s=e("any-promise"),a=n;a._thunkPool=function(e,t){function n(e,t){++c===e.length&&t(u)}function a(e,t){function n(){var n;return r.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=void 0;case 1:if(l.isCancel()){r.next=9;break}return r.next=4,c.next();case 4:return n=r.sent,r.next=7,n();case 7:r.next=1;break;case 9:(d+=1)===e&&(c.fns=[],c.buffer=[],t(u));case 11:case"end":return r.stop()}}),a,this)}function s(e){console.error(e.stack)}for(var a=r.default.mark(n),c=new o,d=0,h=0;h<e;h++)i(n).catch(s);return function(e,t){return function(n){c.push(r.default.mark((function t(){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=n,t.next=4,e;case 4:t.t1=t.sent,(0,t.t0)(null,t.t1),t.next=11;break;case 8:t.prev=8,t.t2=t.catch(0),n(t.t2);case 11:case"end":return t.stop()}}),t,this,[[0,8]])})),t)}}}var l=this,c=0,u=[];return new s((function(o){function s(t){return r.default.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,d(e[t]);case 2:n(e,o);case 3:case"end":return r.stop()}}),c,this)}function l(t){u.push(t),n(e,o)}for(var c=r.default.mark(s),d=new a(t,o),h=0;h<e.length;h++)i(s(h)).catch(l)}))},a.cancel=function(){this.options.cancelFlag=!0},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(e,t,n){"use strict";n._isIP=function(e){return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||/^\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*$/.test(e)}},{}],12:[function(e,t,n){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],13:[function(e,t,n){t.exports=e("./register")().Promise},{"./register":15}],14:[function(e,t,n){"use strict";var r=null;t.exports=function(e,t){return function(n,i){n=n||null;var o=!1!==(i=i||{}).global;if(null===r&&o&&(r=e["@@any-promise/REGISTRATION"]||null),null!==r&&null!==n&&r.implementation!==n)throw new Error('any-promise already defined as "'+r.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return null===r&&(r=null!==n&&void 0!==i.Promise?{Promise:i.Promise,implementation:n}:t(n),o&&(e["@@any-promise/REGISTRATION"]=r)),r}}},{}],15:[function(e,t,n){"use strict";t.exports=e("./loader")(window,(function(){if(void 0===window.Promise)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"}}))},{"./loader":14}],16:[function(e,t,n){t.exports={default:e("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(e,t,n){t.exports={default:e("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(e,t,n){t.exports={default:e("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(e,t,n){t.exports={default:e("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(e,t,n){t.exports={default:e("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(e,t,n){t.exports={default:e("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(e,t,n){t.exports={default:e("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(e,t,n){"use strict";n.__esModule=!0,n.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(e,t,n){"use strict";n.__esModule=!0;var r=function(e){return e&&e.__esModule?e:{default:e}}(e("../core-js/object/define-property"));n.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(e,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},{"../core-js/object/define-property":20}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}n.__esModule=!0;var i=r(e("../core-js/symbol/iterator")),o=r(e("../core-js/symbol")),s="function"==typeof o.default&&"symbol"==typeof i.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};n.default="function"==typeof o.default&&"symbol"===s(i.default)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":s(e)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(e,t,n){t.exports=e("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function i(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function o(e,t,n){for(var r,o=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(i(r));return o.join("")}n.byteLength=function(e){var t=r(e),n=t[0],i=t[1];return 3*(n+i)/4-i},n.toByteArray=function(e){for(var t,n=r(e),i=n[0],o=n[1],s=new l(function(e,t,n){return 3*(t+n)/4-n}(0,i,o)),c=0,u=o>0?i-4:i,d=0;d<u;d+=4)t=a[e.charCodeAt(d)]<<18|a[e.charCodeAt(d+1)]<<12|a[e.charCodeAt(d+2)]<<6|a[e.charCodeAt(d+3)],s[c++]=t>>16&255,s[c++]=t>>8&255,s[c++]=255&t;return 2===o&&(t=a[e.charCodeAt(d)]<<2|a[e.charCodeAt(d+1)]>>4,s[c++]=255&t),1===o&&(t=a[e.charCodeAt(d)]<<10|a[e.charCodeAt(d+1)]<<4|a[e.charCodeAt(d+2)]>>2,s[c++]=t>>8&255,s[c++]=255&t),s},n.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],a=0,l=n-r;a<l;a+=16383)i.push(o(e,a,a+16383>l?l:a+16383));return 1===r?(t=e[n-1],i.push(s[t>>2]+s[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),i.join("")};for(var s=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=c.length;u<d;++u)s[u]=c[u],a[c.charCodeAt(u)]=u;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},{}],35:[function(e,t,n){!function(e,n,r){void 0!==t&&t.exports?t.exports=r():e.bowser=r()}(this,0,(function(){function e(e){function t(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}var r,i=t(/(ipod|iphone|ipad)/i).toLowerCase(),s=!/like android/i.test(e)&&/android/i.test(e),a=/nexus\s*[0-6]\s*/i.test(e),l=!a&&/nexus\s*[0-9]+/i.test(e),c=/CrOS/.test(e),u=/silk/i.test(e),d=/sailfish/i.test(e),h=/tizen/i.test(e),f=/(web|hpw)os/i.test(e),p=/windows phone/i.test(e),m=(/SamsungBrowser/i.test(e),!p&&/windows/i.test(e)),v=!i&&!u&&/macintosh/i.test(e),g=!s&&!d&&!h&&!f&&/linux/i.test(e),y=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),_=t(/version\/(\d+(\.\d+)?)/i),b=/tablet/i.test(e)&&!/tablet pc/i.test(e),x=!b&&/[^-]mobi/i.test(e),w=/xbox/i.test(e);/opera/i.test(e)?r={name:"Opera",opera:o,version:_||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(e)?r={name:"Opera",opera:o,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||_}:/SamsungBrowser/i.test(e)?r={name:"Samsung Internet for Android",samsungBrowser:o,version:_||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?r={name:"Opera Coast",coast:o,version:_||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?r={name:"Yandex Browser",yandexbrowser:o,version:_||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?r={name:"UC Browser",ucbrowser:o,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?r={name:"Maxthon",maxthon:o,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?r={name:"Epiphany",epiphany:o,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?r={name:"Puffin",puffin:o,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?r={name:"Sleipnir",sleipnir:o,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?r={name:"K-Meleon",kMeleon:o,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:p?(r={name:"Windows Phone",osname:"Windows Phone",windowsphone:o},y?(r.msedge=o,r.version=y):(r.msie=o,r.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?r={name:"Internet Explorer",msie:o,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?r={name:"Chrome",osname:"Chrome OS",chromeos:o,chromeBook:o,chrome:o,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(e)?r={name:"Microsoft Edge",msedge:o,version:y}:/vivaldi/i.test(e)?r={name:"Vivaldi",vivaldi:o,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||_}:d?r={name:"Sailfish",osname:"Sailfish OS",sailfish:o,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?r={name:"SeaMonkey",seamonkey:o,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(r={name:"Firefox",firefox:o,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(r.firefoxos=o,r.osname="Firefox OS")):u?r={name:"Amazon Silk",silk:o,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?r={name:"PhantomJS",phantom:o,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?r={name:"SlimerJS",slimer:o,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?r={name:"BlackBerry",osname:"BlackBerry OS",blackberry:o,version:_||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:f?(r={name:"WebOS",osname:"WebOS",webos:o,version:_||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(r.touchpad=o)):/bada/i.test(e)?r={name:"Bada",osname:"Bada",bada:o,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:h?r={name:"Tizen",osname:"Tizen",tizen:o,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||_}:/qupzilla/i.test(e)?r={name:"QupZilla",qupzilla:o,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||_}:/chromium/i.test(e)?r={name:"Chromium",chromium:o,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||_}:/chrome|crios|crmo/i.test(e)?r={name:"Chrome",chrome:o,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:s?r={name:"Android",version:_}:/safari|applewebkit/i.test(e)?(r={name:"Safari",safari:o},_&&(r.version=_)):i?(r={name:"iphone"==i?"iPhone":"ipad"==i?"iPad":"iPod"},_&&(r.version=_)):r=/googlebot/i.test(e)?{name:"Googlebot",googlebot:o,version:t(/googlebot\/(\d+(\.\d+))/i)||_}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!r.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(r.name=r.name||"Blink",r.blink=o):(r.name=r.name||"Webkit",r.webkit=o),!r.version&&_&&(r.version=_)):!r.opera&&/gecko\//i.test(e)&&(r.name=r.name||"Gecko",r.gecko=o,r.version=r.version||t(/gecko\/(\d+(\.\d+)?)/i)),r.windowsphone||!s&&!r.silk?!r.windowsphone&&i?(r[i]=o,r.ios=o,r.osname="iOS"):v?(r.mac=o,r.osname="macOS"):w?(r.xbox=o,r.osname="Xbox"):m?(r.windows=o,r.osname="Windows"):g&&(r.linux=o,r.osname="Linux"):(r.android=o,r.osname="Android");var S="";r.windows?S=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";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}}(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):r.windowsphone?S=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):r.mac?S=(S=t(/Mac OS X (\d+([_\.\s]\d+)*)/i)).replace(/[_\s]/g,"."):i?S=(S=t(/os (\d+([_\s]\d+)*) like mac os x/i)).replace(/[_\s]/g,"."):s?S=t(/android[ \/-](\d+(\.\d+)*)/i):r.webos?S=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):r.blackberry?S=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):r.bada?S=t(/bada\/(\d+(\.\d+)*)/i):r.tizen&&(S=t(/tizen[\/\s](\d+(\.\d+)*)/i)),S&&(r.osversion=S);var C=!r.windows&&S.split(".")[0];return b||l||"ipad"==i||s&&(3==C||C>=4&&!x)||r.silk?r.tablet=o:(x||"iphone"==i||"ipod"==i||s||a||r.blackberry||r.webos||r.bada)&&(r.mobile=o),r.msedge||r.msie&&r.version>=10||r.yandexbrowser&&r.version>=15||r.vivaldi&&r.version>=1||r.chrome&&r.version>=20||r.samsungBrowser&&r.version>=4||r.firefox&&r.version>=20||r.safari&&r.version>=6||r.opera&&r.version>=10||r.ios&&r.osversion&&r.osversion.split(".")[0]>=6||r.blackberry&&r.version>=10.1||r.chromium&&r.version>=20?r.a=o:r.msie&&r.version<10||r.chrome&&r.version<20||r.firefox&&r.version<20||r.safari&&r.version<6||r.opera&&r.version<10||r.ios&&r.osversion&&r.osversion.split(".")[0]<6||r.chromium&&r.version<20?r.c=o:r.x=o,r}function t(e){return e.split(".").length}function n(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n<e.length;n++)r.push(t(e[n]));return r}function r(e){for(var r=Math.max(t(e[0]),t(e[1])),i=n(e,(function(e){var i=r-t(e);return n((e+=new Array(i+1).join(".0")).split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));--r>=0;){if(i[0][r]>i[1][r])return 1;if(i[0][r]!==i[1][r])return-1;if(0===r)return 0}}function i(t,n,i){var o=s;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(o=e(i));var a=""+o.version;for(var l in t)if(t.hasOwnProperty(l)&&o[l]){if("string"!=typeof t[l])throw new Error("Browser version in the minVersion map should be a string: "+l+": "+String(t));return r([a,t[l]])<0}return n}var o=!0,s=e("undefined"!=typeof navigator&&navigator.userAgent||"");return s.test=function(e){for(var t=0;t<e.length;++t){var n=e[t];if("string"==typeof n&&n in s)return!0}return!1},s.isUnsupportedBrowser=i,s.compareVersions=r,s.check=function(e,t,n){return!i(e,t,n)},s._detect=e,s.detect=e,s}))},{}],36:[function(e,t,n){},{}],37:[function(e,t,n){function r(e){return e.toString(this.encoding)}function i(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,a=s.isEncoding||function(e){switch(e&&e.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}},l=n.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!a(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=i;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=r)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};l.prototype.write=function(e){for(var t="";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(e=e.slice(n,e.length),!((r=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(r=t.charCodeAt(i))>=55296&&r<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},l.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},l.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},{buffer:38}],38:[function(e,t,r){(function(t){"use strict";function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(n()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=o.prototype:(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t).__proto__=o.prototype:e=c(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),s=(e=i(e,r)).write(t,n);return s!==r&&(e=e.slice(0,s)),e}(e,t,n):function(e,t){if(o.isBuffer(t)){var n=0|u(t.length);return 0===(e=i(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?i(e,0):c(e,t);if("Buffer"===t.type&&z(t.data))return c(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(a(t),e=i(e,t<0?0:0|u(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t){var n=t.length<0?0:0|u(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function u(e){if(e>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function d(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function p(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,l=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,c/=2,n/=2}if(i){var u=-1;for(s=n;s<l;s++)if(o(e,s)===o(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===c)return u*a}else-1!==u&&(s-=s-u),u=-1}else for(n+c>l&&(n=l-c),s=n;s>=0;s--){for(var d=!0,h=0;h<c;h++)if(o(e,s+h)!==o(t,h)){d=!1;break}if(d)return s}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function g(e,t,n,r){return B(j(t,e.length-n),e,n,r)}function y(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return y(e,t,n,r)}function b(e,t,n,r){return B(P(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?U.fromByteArray(e):U.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=H));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function E(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=O(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||I(e,0,n,4),F.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||I(e,0,n,8),F.write(e,t,n,r,52,8),n+8}function O(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return U.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}var U=e("base64-js"),F=e("ieee754"),z=e("isarray");r.Buffer=o,r.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return function(e,t,n,r){return a(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).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}},o.concat=function(e,t){if(!z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},o.byteLength=d,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):h.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(s,a),c=this.slice(r,i),u=e.slice(t,n),d=0;d<l;++d)if(c[d]!==u[d]){s=c[d],a=u[d];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},o.prototype.indexOf=function(e,t,n){return p(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return p(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;o.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),o.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=o.prototype;else{var i=t-e;n=new o(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},o.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},o.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),F.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),F.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),F.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),F.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=o.isBuffer(e)?e:j(new o(e,r).toString()),l=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%l]}return this};var Z=/[^+\/0-9A-Za-z-_]/g}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(e,t,n){t.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(e,t,n){"use strict";var r=function(){this.buffer=[],this.fns=[]};r.prototype.push=function(e,t){if(this.fns.length)return this.fns.shift()(null,e);var n={data:e,priority:t},r=i(this.buffer,n,(function(e){return e.priority}));this.buffer.splice(r,0,n)},r.prototype.next=function(){var e=this;return function(t){if(e.buffer.length)return t(null,e.buffer.pop().data);e.fns.push(t)}};var i=function(e,t,n){t=n(t);for(var r=0,i=e?e.length:r;r<i;){var o=r+i>>>1;n(e[o])<t?r=o+1:i=o}return r};t.exports=r},{}],41:[function(e,t,n){function r(e){var t=this,n=u.call(arguments,1);return new Promise((function(r,o){function s(t){var n;try{n=e.next(t)}catch(e){return o(e)}c(n)}function a(t){var n;try{n=e.throw(t)}catch(e){return o(e)}c(n)}function c(e){if(e.done)return r(e.value);var n=i.call(t,e.value);return n&&l(n)?n.then(s,a):a(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(e.value)+'"'))}if("function"==typeof e&&(e=e.apply(t,n)),!e||"function"!=typeof e.next)return r(e);s()}))}function i(e){return e?l(e)?e:function(e){var t=e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName||c(t.prototype))}(e)||c(e)?r.call(this,e):"function"==typeof e?o.call(this,e):Array.isArray(e)?s.call(this,e):function(e){return Object==e.constructor}(e)?a.call(this,e):e:e}function o(e){var t=this;return new Promise((function(n,r){e.call(t,(function(e,t){if(e)return r(e);arguments.length>2&&(t=u.call(arguments,1)),n(t)}))}))}function s(e){return Promise.all(e.map(i,this))}function a(e){for(var t=new e.constructor,n=Object.keys(e),r=[],o=0;o<n.length;o++){var s=n[o],a=i.call(this,e[s]);a&&l(a)?function(e,n){t[n]=void 0,r.push(e.then((function(e){t[n]=e})))}(a,s):t[s]=e[s]}return Promise.all(r).then((function(){return t}))}function l(e){return"function"==typeof e.then}function c(e){return"function"==typeof e.next&&"function"==typeof e.throw}var u=Array.prototype.slice;t.exports=r.default=r.co=r,r.wrap=function(e){function t(){return r.call(this,e.apply(this,arguments))}return t.__generatorFunction__=e,t}},{}],42:[function(e,t,n){t.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(e,t,n){"use strict";function r(e,t){if(!(this instanceof r))return new r(e,t);this.src=e,this._withAccess=t}function i(e,t){return void 0===e[t]&&void 0===e.__lookupGetter__(t)&&void 0===e.__lookupSetter__(t)}var o=Array.prototype.slice;t.exports=r,r.prototype.withAccess=function(e){return this._withAccess=!1!==e,this},r.prototype.pick=function(e){return Array.isArray(e)||(e=o.call(arguments)),e.length&&(this.keys=e),this},r.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var n=0;n<t.length;n++)void 0===e[r=t[n]]&&(e[r]=this.src[r]);return e}for(n=0;n<t.length;n++){var r=t[n];if(i(e,r)){var o=this.src.__lookupGetter__(r),s=this.src.__lookupSetter__(r);o&&e.__defineGetter__(r,o),s&&e.__defineSetter__(r,s),o||s||(e[r]=this.src[r])}}return e},r.prototype.toCover=function(e){for(var t=this.keys||Object.keys(this.src),n=0;n<t.length;n++){var r=t[n];delete e[r];var i=this.src.__lookupGetter__(r),o=this.src.__lookupSetter__(r);i&&e.__defineGetter__(r,i),o&&e.__defineSetter__(r,o),i||o||(e[r]=this.src[r])}},r.prototype.override=r.prototype.toCover,r.prototype.and=function(e){var t={};return this.to(t),this.src=e,this.to(t),this.src=t,this}},{}],44:[function(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/es6.array.from"),t.exports=e("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(e,t,n){var r=e("../../modules/_core"),i=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(e){return i.stringify.apply(i,arguments)}},{"../../modules/_core":65}],46:[function(e,t,n){e("../../modules/es6.object.assign"),t.exports=e("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(e,t,n){e("../../modules/es6.object.create");var r=e("../../modules/_core").Object;t.exports=function(e,t){return r.create(e,t)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(e,t,n){e("../../modules/es6.object.define-property");var r=e("../../modules/_core").Object;t.exports=function(e,t,n){return r.defineProperty(e,t,n)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(e,t,n){e("../../modules/es6.object.get-own-property-names");var r=e("../../modules/_core").Object;t.exports=function(e){return r.getOwnPropertyNames(e)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(e,t,n){e("../../modules/es6.object.get-prototype-of"),t.exports=e("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(e,t,n){e("../../modules/es6.object.keys"),t.exports=e("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(e,t,n){e("../modules/es6.object.to-string"),e("../modules/es6.string.iterator"),e("../modules/web.dom.iterable"),e("../modules/es6.promise"),e("../modules/es7.promise.finally"),e("../modules/es7.promise.try"),t.exports=e("../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(e,t,n){e("../modules/web.immediate"),t.exports=e("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(e,t,n){e("../../modules/es6.string.from-code-point"),t.exports=e("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(e,t,n){e("../../modules/es6.function.has-instance"),t.exports=e("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(e,t,n){e("../../modules/es6.symbol"),e("../../modules/es6.object.to-string"),e("../../modules/es7.symbol.async-iterator"),e("../../modules/es7.symbol.observable"),t.exports=e("../../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(e,t,n){e("../../modules/es6.string.iterator"),e("../../modules/web.dom.iterable"),t.exports=e("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},{}],59:[function(e,t,n){t.exports=function(){}},{}],60:[function(e,t,n){t.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},{}],61:[function(e,t,n){var r=e("./_is-object");t.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},{"./_is-object":85}],62:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_to-length"),o=e("./_to-absolute-index");t.exports=function(e){return function(t,n,s){var a,l=r(t),c=i(l.length),u=o(s,c);if(e&&n!=n){for(;c>u;)if((a=l[u++])!=a)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(e,t,n){var r=e("./_cof"),i=e("./_wks")("toStringTag"),o="Arguments"==r(function(){return arguments}());t.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},{"./_cof":64,"./_wks":131}],64:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],65:[function(e,t,n){var r=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=r)},{}],66:[function(e,t,n){"use strict";var r=e("./_object-dp"),i=e("./_property-desc");t.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},{"./_object-dp":98,"./_property-desc":111}],67:[function(e,t,n){var r=e("./_a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"./_a-function":58}],68:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],69:[function(e,t,n){t.exports=!e("./_fails")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},{"./_fails":74}],70:[function(e,t,n){var r=e("./_is-object"),i=e("./_global").document,o=r(i)&&r(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"./_global":76,"./_is-object":85}],71:[function(e,t,n){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(e,t,n){var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie");t.exports=function(e){var t=r(e),n=i.f;if(n)for(var s,a=n(e),l=o.f,c=0;a.length>c;)l.call(e,s=a[c++])&&t.push(s);return t}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_ctx"),s=e("./_hide"),a=e("./_has"),l=function(e,t,n){var c,u,d,h=e&l.F,f=e&l.G,p=e&l.S,m=e&l.P,v=e&l.B,g=e&l.W,y=f?i:i[t]||(i[t]={}),_=y.prototype,b=f?r:p?r[t]:(r[t]||{}).prototype;for(c in f&&(n=t),n)(u=!h&&b&&void 0!==b[c])&&a(y,c)||(d=u?b[c]:n[c],y[c]=f&&"function"!=typeof b[c]?n[c]:v&&u?o(d,r):g&&b[c]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[c]=d,e&l.R&&_&&!_[c]&&s(_,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],75:[function(e,t,n){var r=e("./_ctx"),i=e("./_iter-call"),o=e("./_is-array-iter"),s=e("./_an-object"),a=e("./_to-length"),l=e("./core.get-iterator-method"),c={},u={};n=t.exports=function(e,t,n,d,h){var f,p,m,v,g=h?function(){return e}:l(e),y=r(n,d,t?2:1),_=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(o(g)){for(f=a(e.length);f>_;_++)if((v=t?y(s(p=e[_])[0],p[1]):y(e[_]))===c||v===u)return v}else for(m=g.call(e);!(p=m.next()).done;)if((v=i(m,y,p.value,t))===c||v===u)return v},n.BREAK=c,n.RETURN=u},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(e,t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},{}],77:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],78:[function(e,t,n){var r=e("./_object-dp"),i=e("./_property-desc");t.exports=e("./_descriptors")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(e,t,n){var r=e("./_global").document;t.exports=r&&r.documentElement},{"./_global":76}],80:[function(e,t,n){t.exports=!e("./_descriptors")&&!e("./_fails")((function(){return 7!=Object.defineProperty(e("./_dom-create")("div"),"a",{get:function(){return 7}}).a}))},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(e,t,n){t.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},{}],82:[function(e,t,n){var r=e("./_cof");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},{"./_cof":64}],83:[function(e,t,n){var r=e("./_iterators"),i=e("./_wks")("iterator"),o=Array.prototype;t.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},{"./_iterators":91,"./_wks":131}],84:[function(e,t,n){var r=e("./_cof");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"./_cof":64}],85:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],86:[function(e,t,n){var r=e("./_an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},{"./_an-object":61}],87:[function(e,t,n){"use strict";var r=e("./_object-create"),i=e("./_property-desc"),o=e("./_set-to-string-tag"),s={};e("./_hide")(s,e("./_wks")("iterator"),(function(){return this})),t.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(e,t,n){"use strict";var r=e("./_library"),i=e("./_export"),o=e("./_redefine"),s=e("./_hide"),a=e("./_iterators"),l=e("./_iter-create"),c=e("./_set-to-string-tag"),u=e("./_object-gpo"),d=e("./_wks")("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};t.exports=function(e,t,n,p,m,v,g){l(n,t,p);var y,_,b,x=function(e){if(!h&&e in k)return k[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",S="values"==m,C=!1,k=e.prototype,E=k[d]||k["@@iterator"]||m&&k[m],T=E||x(m),L=m?S?x("entries"):T:void 0,A="Array"==t&&k.entries||E;if(A&&(b=u(A.call(new e)))!==Object.prototype&&b.next&&(c(b,w,!0),r||"function"==typeof b[d]||s(b,d,f)),S&&E&&"values"!==E.name&&(C=!0,T=function(){return E.call(this)}),r&&!g||!h&&!C&&k[d]||s(k,d,T),a[t]=T,a[w]=f,m)if(y={values:S?T:x("values"),keys:v?T:x("keys"),entries:L},g)for(_ in y)_ in k||o(k,_,y[_]);else i(i.P+i.F*(h||C),t,y);return y}},{"./_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(e,t,n){var r=e("./_wks")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(e){}return n}},{"./_wks":131}],90:[function(e,t,n){t.exports=function(e,t){return{value:t,done:!!e}}},{}],91:[function(e,t,n){t.exports={}},{}],92:[function(e,t,n){t.exports=!0},{}],93:[function(e,t,n){var r=e("./_uid")("meta"),i=e("./_is-object"),o=e("./_has"),s=e("./_object-dp").f,a=0,l=Object.isExtensible||function(){return!0},c=!e("./_fails")((function(){return l(Object.preventExtensions({}))})),u=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},d=t.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!l(e))return"F";if(!t)return"E";u(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!l(e))return!0;if(!t)return!1;u(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&l(e)&&!o(e,r)&&u(e),e}}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(e,t,n){var r=e("./_global"),i=e("./_task").set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,l="process"==e("./_cof")(s);t.exports=function(){var e,t,n,c=function(){var r,i;for(l&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){s.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(c)}}else n=function(){i.call(r,c)};else{var d=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),n=function(){h.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=i(t),this.reject=i(n)}var i=e("./_a-function");t.exports.f=function(e){return new r(e)}},{"./_a-function":58}],96:[function(e,t,n){"use strict";var r=e("./_object-keys"),i=e("./_object-gops"),o=e("./_object-pie"),s=e("./_to-object"),a=e("./_iobject"),l=Object.assign;t.exports=!l||e("./_fails")((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r}))?function(e,t){for(var n=s(e),l=arguments.length,c=1,u=i.f,d=o.f;l>c;)for(var h,f=a(arguments[c++]),p=u?r(f).concat(u(f)):r(f),m=p.length,v=0;m>v;)d.call(f,h=p[v++])&&(n[h]=f[h]);return n}:l},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(e,t,n){var r=e("./_an-object"),i=e("./_object-dps"),o=e("./_enum-bug-keys"),s=e("./_shared-key")("IE_PROTO"),a=function(){},l=function(){var t,n=e("./_dom-create")("iframe"),r=o.length;for(n.style.display="none",e("./_html").appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),l=t.F;r--;)delete l.prototype[o[r]];return l()};t.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=r(e),n=new a,a.prototype=null,n[s]=e):n=l(),void 0===t?n:i(n,t)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(e,t,n){var r=e("./_an-object"),i=e("./_ie8-dom-define"),o=e("./_to-primitive"),s=Object.defineProperty;n.f=e("./_descriptors")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(e,t,n){var r=e("./_object-dp"),i=e("./_an-object"),o=e("./_object-keys");t.exports=e("./_descriptors")?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),a=s.length,l=0;a>l;)r.f(e,n=s[l++],t[n]);return e}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(e,t,n){var r=e("./_object-pie"),i=e("./_property-desc"),o=e("./_to-iobject"),s=e("./_to-primitive"),a=e("./_has"),l=e("./_ie8-dom-define"),c=Object.getOwnPropertyDescriptor;n.f=e("./_descriptors")?c:function(e,t){if(e=o(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(a(e,t))return i(!r.f.call(e,t),e[t])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(e,t,n){var r=e("./_to-iobject"),i=e("./_object-gopn").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){return s&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return s.slice()}}(e):i(r(e))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],104:[function(e,t,n){var r=e("./_has"),i=e("./_to-object"),o=e("./_shared-key")("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(e,t,n){var r=e("./_has"),i=e("./_to-iobject"),o=e("./_array-includes")(!1),s=e("./_shared-key")("IE_PROTO");t.exports=function(e,t){var n,a=i(e),l=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;t.length>l;)r(a,n=t[l++])&&(~o(c,n)||c.push(n));return c}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(e,t,n){var r=e("./_object-keys-internal"),i=e("./_enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(e,t,n){n.f={}.propertyIsEnumerable},{}],108:[function(e,t,n){var r=e("./_export"),i=e("./_core"),o=e("./_fails");t.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",s)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(e,t,n){t.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},{}],110:[function(e,t,n){var r=e("./_an-object"),i=e("./_is-object"),o=e("./_new-promise-capability");t.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],112:[function(e,t,n){var r=e("./_hide");t.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},{"./_hide":78}],113:[function(e,t,n){t.exports=e("./_hide")},{"./_hide":78}],114:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_core"),o=e("./_object-dp"),s=e("./_descriptors"),a=e("./_wks")("species");t.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];s&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(e,t,n){var r=e("./_object-dp").f,i=e("./_has"),o=e("./_wks")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(e,t,n){var r=e("./_shared")("keys"),i=e("./_uid");t.exports=function(e){return r[e]||(r[e]=i(e))}},{"./_shared":117,"./_uid":127}],117:[function(e,t,n){var r=e("./_core"),i=e("./_global"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:e("./_library")?"pure":"global",copyright:"漏 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(e,t,n){var r=e("./_an-object"),i=e("./_a-function"),o=e("./_wks")("species");t.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||null==(n=r(s)[o])?t:i(n)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(e,t,n){var r=e("./_to-integer"),i=e("./_defined");t.exports=function(e){return function(t,n){var o,s,a=String(i(t)),l=r(n),c=a.length;return l<0||l>=c?e?"":void 0:(o=a.charCodeAt(l))<55296||o>56319||l+1===c||(s=a.charCodeAt(l+1))<56320||s>57343?e?a.charAt(l):o:e?a.slice(l,l+2):s-56320+(o-55296<<10)+65536}}},{"./_defined":68,"./_to-integer":122}],120:[function(e,t,n){var r,i,o,s=e("./_ctx"),a=e("./_invoke"),l=e("./_html"),c=e("./_dom-create"),u=e("./_global"),d=u.process,h=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,m=u.Dispatch,v=0,g={},y=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},_=function(e){y.call(e.data)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++v]=function(){a("function"==typeof e?e:Function(e),t)},r(v),v},f=function(e){delete g[e]},"process"==e("./_cof")(d)?r=function(e){d.nextTick(s(y,e,1))}:m&&m.now?r=function(e){m.now(s(y,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=_,r=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",_,!1)):r="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),y.call(e)}}:function(e){setTimeout(s(y,e,1),0)}),t.exports={set:h,clear:f}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(e,t,n){var r=e("./_to-integer"),i=Math.max,o=Math.min;t.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},{"./_to-integer":122}],122:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(e>0?i:r)(e)}},{}],123:[function(e,t,n){var r=e("./_iobject"),i=e("./_defined");t.exports=function(e){return r(i(e))}},{"./_defined":68,"./_iobject":82}],124:[function(e,t,n){var r=e("./_to-integer"),i=Math.min;t.exports=function(e){return e>0?i(r(e),9007199254740991):0}},{"./_to-integer":122}],125:[function(e,t,n){var r=e("./_defined");t.exports=function(e){return Object(r(e))}},{"./_defined":68}],126:[function(e,t,n){var r=e("./_is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++r+i).toString(36))}},{}],128:[function(e,t,n){var r=e("./_global").navigator;t.exports=r&&r.userAgent||""},{"./_global":76}],129:[function(e,t,n){var r=e("./_global"),i=e("./_core"),o=e("./_library"),s=e("./_wks-ext"),a=e("./_object-dp").f;t.exports=function(e){var t=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||a(t,e,{value:s.f(e)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(e,t,n){n.f=e("./_wks")},{"./_wks":131}],131:[function(e,t,n){var r=e("./_shared")("wks"),i=e("./_uid"),o=e("./_global").Symbol,s="function"==typeof o;(t.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))}).store=r},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(e,t,n){var r=e("./_classof"),i=e("./_wks")("iterator"),o=e("./_iterators");t.exports=e("./_core").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(e,t,n){"use strict";var r=e("./_ctx"),i=e("./_export"),o=e("./_to-object"),s=e("./_iter-call"),a=e("./_is-array-iter"),l=e("./_to-length"),c=e("./_create-property"),u=e("./core.get-iterator-method");i(i.S+i.F*!e("./_iter-detect")((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,d,h=o(e),f="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,v=void 0!==m,g=0,y=u(h);if(v&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||f==Array&&a(y))for(n=new f(t=l(h.length));t>g;g++)c(n,g,v?m(h[g],g):h[g]);else for(d=y.call(h),n=new f;!(i=d.next()).done;g++)c(n,g,v?s(d,m,[i.value,g],!0):i.value);return n.length=g,n}})},{"./_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(e,t,n){"use strict";var r=e("./_add-to-unscopables"),i=e("./_iter-step"),o=e("./_iterators"),s=e("./_to-iobject");t.exports=e("./_iter-define")(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(e,t,n){"use strict";var r=e("./_is-object"),i=e("./_object-gpo"),o=e("./_wks")("hasInstance"),s=Function.prototype;o in s||e("./_object-dp").f(s,o,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(e,t,n){var r=e("./_export");r(r.S+r.F,"Object",{assign:e("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(e,t,n){var r=e("./_export");r(r.S,"Object",{create:e("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(e,t,n){var r=e("./_export");r(r.S+r.F*!e("./_descriptors"),"Object",{defineProperty:e("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(e,t,n){e("./_object-sap")("getOwnPropertyNames",(function(){return e("./_object-gopn-ext").f}))},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-gpo");e("./_object-sap")("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(e,t,n){var r=e("./_to-object"),i=e("./_object-keys");e("./_object-sap")("keys",(function(){return function(e){return i(r(e))}}))},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(e,t,n){arguments[4][36][0].apply(n,arguments)},{dup:36}],143:[function(e,t,n){"use strict";var r,i,o,s,a=e("./_library"),l=e("./_global"),c=e("./_ctx"),u=e("./_classof"),d=e("./_export"),h=e("./_is-object"),f=e("./_a-function"),p=e("./_an-instance"),m=e("./_for-of"),v=e("./_species-constructor"),g=e("./_task").set,y=e("./_microtask")(),_=e("./_new-promise-capability"),b=e("./_perform"),x=e("./_user-agent"),w=e("./_promise-resolve"),S=l.TypeError,C=l.process,k=C&&C.versions,E=k&&k.v8||"",T=l.Promise,L="process"==u(C),A=function(){},M=i=_.f,D=!!function(){try{var t=T.resolve(1),n=(t.constructor={})[e("./_wks")("species")]=function(e){e(A,A)};return(L||"function"==typeof PromiseRejectionEvent)&&t.then(A)instanceof n&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},N=function(e,t){if(!e._n){e._n=!0;var n=e._c;y((function(){for(var r=e._v,i=1==e._s,o=0;n.length>o;)!function(t){var n,o,s,a=i?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{a?(i||(2==e._h&&j(e),e._h=1),!0===a?n=r:(u&&u.enter(),n=a(r),u&&(u.exit(),s=!0)),n===t.promise?c(S("Promise-chain cycle")):(o=I(n))?o.call(n,l,c):l(n)):c(r)}catch(e){u&&!s&&u.exit(),c(e)}}(n[o++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){g.call(l,(function(){var t,n,r,i=e._v,o=O(e);if(o&&(t=b((function(){L?C.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=L||O(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},O=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(l,(function(){var t;L?C.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),N(t,!0))},B=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=I(e))?y((function(){var r={_w:n,_d:!1};try{t.call(e,c(B,r,1),c(P,r,1))}catch(e){P.call(r,e)}})):(n._v=e,n._s=1,N(n,!1))}catch(e){P.call({_w:n,_d:!1},e)}}};D||(T=function(e){p(this,T,"Promise","_h"),f(e),r.call(this);try{e(c(B,this,1),c(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=e("./_redefine-all")(T.prototype,{then:function(e,t){var n=M(v(this,T));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=L?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&N(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=c(B,e,1),this.reject=c(P,e,1)},_.f=M=function(e){return e===T||e===s?new o(e):i(e)}),d(d.G+d.W+d.F*!D,{Promise:T}),e("./_set-to-string-tag")(T,"Promise"),e("./_set-species")("Promise"),s=e("./_core").Promise,d(d.S+d.F*!D,"Promise",{reject:function(e){var t=M(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(a||!D),"Promise",{resolve:function(e){return w(a&&this===s?T:this,e)}}),d(d.S+d.F*!(D&&e("./_iter-detect")((function(e){T.all(e).catch(A)}))),"Promise",{all:function(e){var t=this,n=M(t),r=n.resolve,i=n.reject,o=b((function(){var n=[],o=0,s=1;m(e,!1,(function(e){var a=o++,l=!1;n.push(void 0),s++,t.resolve(e).then((function(e){l||(l=!0,n[a]=e,--s||r(n))}),i)})),--s||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=M(t),r=n.reject,i=b((function(){m(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.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(e,t,n){var r=e("./_export"),i=e("./_to-absolute-index"),o=String.fromCharCode,s=String.fromCodePoint;r(r.S+r.F*(!!s&&1!=s.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,s=0;r>s;){if(t=+arguments[s++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(e,t,n){"use strict";var r=e("./_string-at")(!0);e("./_iter-define")(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},{"./_iter-define":88,"./_string-at":119}],146:[function(e,t,n){"use strict";var r=e("./_global"),i=e("./_has"),o=e("./_descriptors"),s=e("./_export"),a=e("./_redefine"),l=e("./_meta").KEY,c=e("./_fails"),u=e("./_shared"),d=e("./_set-to-string-tag"),h=e("./_uid"),f=e("./_wks"),p=e("./_wks-ext"),m=e("./_wks-define"),v=e("./_enum-keys"),g=e("./_is-array"),y=e("./_an-object"),_=e("./_is-object"),b=e("./_to-iobject"),x=e("./_to-primitive"),w=e("./_property-desc"),S=e("./_object-create"),C=e("./_object-gopn-ext"),k=e("./_object-gopd"),E=e("./_object-dp"),T=e("./_object-keys"),L=k.f,A=E.f,M=C.f,D=r.Symbol,I=r.JSON,N=I&&I.stringify,R=f("_hidden"),O=f("toPrimitive"),j={}.propertyIsEnumerable,P=u("symbol-registry"),B=u("symbols"),U=u("op-symbols"),F=Object.prototype,z="function"==typeof D,H=r.QObject,Z=!H||!H.prototype||!H.prototype.findChild,W=o&&c((function(){return 7!=S(A({},"a",{get:function(){return A(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=L(F,t);r&&delete F[t],A(e,t,n),r&&e!==F&&A(F,t,r)}:A,G=function(e){var t=B[e]=S(D.prototype);return t._k=e,t},q=z&&"symbol"==typeof D.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof D},V=function(e,t,n){return e===F&&V(U,t,n),y(e),t=x(t,!0),y(n),i(B,t)?(n.enumerable?(i(e,R)&&e[R][t]&&(e[R][t]=!1),n=S(n,{enumerable:w(0,!1)})):(i(e,R)||A(e,R,w(1,{})),e[R][t]=!0),W(e,t,n)):A(e,t,n)},K=function(e,t){y(e);for(var n,r=v(t=b(t)),i=0,o=r.length;o>i;)V(e,n=r[i++],t[n]);return e},Y=function(e){var t=j.call(this,e=x(e,!0));return!(this===F&&i(B,e)&&!i(U,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,R)&&this[R][e])||t)},X=function(e,t){if(e=b(e),t=x(t,!0),e!==F||!i(B,t)||i(U,t)){var n=L(e,t);return!n||!i(B,t)||i(e,R)&&e[R][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=M(b(e)),r=[],o=0;n.length>o;)i(B,t=n[o++])||t==R||t==l||r.push(t);return r},Q=function(e){for(var t,n=e===F,r=M(n?U:b(e)),o=[],s=0;r.length>s;)!i(B,t=r[s++])||n&&!i(F,t)||o.push(B[t]);return o};z||(D=function(){if(this instanceof D)throw TypeError("Symbol is not a constructor!");var e=h(arguments.length>0?arguments[0]:void 0),t=function(n){this===F&&t.call(U,n),i(this,R)&&i(this[R],e)&&(this[R][e]=!1),W(this,e,w(1,n))};return o&&Z&&W(F,e,{configurable:!0,set:t}),G(e)},a(D.prototype,"toString",(function(){return this._k})),k.f=X,E.f=V,e("./_object-gopn").f=C.f=J,e("./_object-pie").f=Y,e("./_object-gops").f=Q,o&&!e("./_library")&&a(F,"propertyIsEnumerable",Y,!0),p.f=function(e){return G(f(e))}),s(s.G+s.W+s.F*!z,{Symbol:D});for(var $="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;$.length>ee;)f($[ee++]);for(var te=T(f.store),ne=0;te.length>ne;)m(te[ne++]);s(s.S+s.F*!z,"Symbol",{for:function(e){return i(P,e+="")?P[e]:P[e]=D(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in P)if(P[t]===e)return t},useSetter:function(){Z=!0},useSimple:function(){Z=!1}}),s(s.S+s.F*!z,"Object",{create:function(e,t){return void 0===t?S(e):K(S(e),t)},defineProperty:V,defineProperties:K,getOwnPropertyDescriptor:X,getOwnPropertyNames:J,getOwnPropertySymbols:Q}),I&&s(s.S+s.F*(!z||c((function(){var e=D();return"[null]"!=N([e])||"{}"!=N({a:e})||"{}"!=N(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(_(t)||void 0!==e)&&!q(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,N.apply(I,r)}}),D.prototype[O]||e("./_hide")(D.prototype,O,D.prototype.valueOf),d(D,"Symbol"),d(Math,"Math",!0),d(r.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(e,t,n){"use strict";var r=e("./_export"),i=e("./_core"),o=e("./_global"),s=e("./_species-constructor"),a=e("./_promise-resolve");r(r.P+r.R,"Promise",{finally:function(e){var t=s(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return a(t,e()).then((function(){return n}))}:e,n?function(n){return a(t,e()).then((function(){throw n}))}:e)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(e,t,n){"use strict";var r=e("./_export"),i=e("./_new-promise-capability"),o=e("./_perform");r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(e,t,n){e("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(e,t,n){e("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(e,t,n){e("./es6.array.iterator");for(var r=e("./_global"),i=e("./_hide"),o=e("./_iterators"),s=e("./_wks")("toStringTag"),a="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(","),l=0;l<a.length;l++){var c=a[l],u=r[c],d=u&&u.prototype;d&&!d[s]&&i(d,s,c),o[c]=o.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(e,t,n){var r=e("./_export"),i=e("./_task");r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},{"./_export":73,"./_task":120}],153:[function(e,t,n){(function(t){"use strict";function r(e){return Object.prototype.toString.call(e)}var i=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/typeof"));n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"===(void 0===e?"undefined":(0,i.default)(e))},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===r(e)},n.isObject=function(e){return"object"===(void 0===e?"undefined":(0,i.default)(e))&&null!==e},n.isDate=function(e){return"[object Date]"===r(e)},n.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===(void 0===e?"undefined":(0,i.default)(e))||void 0===e},n.isBuffer=t.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/helpers/typeof"));!function(e){function i(e,t){for(e=String(e),t=t||2;e.length<t;)e="0"+e;return e}function o(e){var t=new Date(e.getFullYear(),e.getMonth(),e.getDate());t.setDate(t.getDate()-(t.getDay()+6)%7+3);var n=new Date(t.getFullYear(),0,4);n.setDate(n.getDate()-(n.getDay()+6)%7+3);var r=t.getTimezoneOffset()-n.getTimezoneOffset();t.setHours(t.getHours()-r);var i=(t-n)/6048e5;return 1+Math.floor(i)}function s(e){var t=e.getDay();return 0===t&&(t=7),t}function a(e){return null===e?"null":void 0===e?"undefined":"object"!==(void 0===e?"undefined":(0,r.default)(e))?void 0===e?"undefined":(0,r.default)(e):Array.isArray(e)?"array":{}.toString.call(e).slice(8,-1).toLowerCase()}var l=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g;return function(r,c,u,d){if(1!==arguments.length||"string"!==a(r)||/\d/.test(r)||(c=r,r=void 0),(r=r||new Date)instanceof Date||(r=new Date(r)),isNaN(r))throw TypeError("Invalid date");var h=(c=String(l.masks[c]||c||l.masks.default)).slice(0,4);"UTC:"!==h&&"GMT:"!==h||(c=c.slice(4),u=!0,"GMT:"===h&&(d=!0));var f=u?"getUTC":"get",p=r[f+"Date"](),m=r[f+"Day"](),v=r[f+"Month"](),g=r[f+"FullYear"](),y=r[f+"Hours"](),_=r[f+"Minutes"](),b=r[f+"Seconds"](),x=r[f+"Milliseconds"](),w=u?0:r.getTimezoneOffset(),S=o(r),C=s(r),k={d:p,dd:i(p),ddd:l.i18n.dayNames[m],dddd:l.i18n.dayNames[m+7],m:v+1,mm:i(v+1),mmm:l.i18n.monthNames[v],mmmm:l.i18n.monthNames[v+12],yy:String(g).slice(2),yyyy:g,h:y%12||12,hh:i(y%12||12),H:y,HH:i(y),M:_,MM:i(_),s:b,ss:i(b),l:i(x,3),L:i(Math.round(x/10)),t:y<12?"a":"p",tt:y<12?"am":"pm",T:y<12?"A":"P",TT:y<12?"AM":"PM",Z:d?"GMT":u?"UTC":(String(r).match(t)||[""]).pop().replace(n,""),o:(w>0?"-":"+")+i(100*Math.floor(Math.abs(w)/60)+Math.abs(w)%60,4),S:["th","st","nd","rd"][p%10>3?0:(p%100-p%10!=10)*p%10],W:S,N:C};return c.replace(e,(function(e){return e in k?k[e]:e.slice(1,e.length-1)}))}}();l.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"},l.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"]},"object"===(void 0===n?"undefined":(0,r.default)(n))?t.exports=l:(void 0).dateFormat=l}()},{"babel-runtime/helpers/typeof":32}],155:[function(e,t,n){(function(r){function i(){var e;try{e=n.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(n=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},n.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)}},n.save=function(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}},n.load=i,n.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(i())}).call(this,e("_process"))},{"./debug":156,_process:173}],156:[function(e,t,n){function r(e){function t(){if(t.enabled){var e=t,r=+new Date,o=r-(i||r);e.diff=o,e.prev=i,e.curr=r,i=r;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var l=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(t,r){if("%%"===t)return t;l++;var i=n.formatters[r];if("function"==typeof i){var o=s[l];t=i.call(e,o),s.splice(l,1),l--}return t})),n.formatArgs.call(e,s),(t.log||n.log||console.log.bind(console)).apply(e,s)}}return t.namespace=e,t.enabled=n.enabled(e),t.useColors=n.useColors(),t.color=function(e){var t,r=0;for(t in e)r=(r<<5)-r+e.charCodeAt(t),r|=0;return n.colors[Math.abs(r)%n.colors.length]}(e),"function"==typeof n.init&&n.init(t),t}var i;(n=t.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){n.enable("")},n.enable=function(e){n.save(e),n.names=[],n.skips=[];for(var t=("string"==typeof e?e:"").split(/[\s,]+/),r=t.length,i=0;i<r;i++)t[i]&&("-"===(e=t[i].replace(/\*/g,".*?"))[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))},n.enabled=function(e){var t,r;for(t=0,r=n.skips.length;t<r;t++)if(n.skips[t].test(e))return!1;for(t=0,r=n.names.length;t<r;t++)if(n.names[t].test(e))return!0;return!1},n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={}},{ms:169}],157:[function(e,t,n){"use strict";var r=/["'&<>]/;t.exports=function(e){var t=""+e,n=r.exec(t);if(!n)return t;var i,o="",s=0,a=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){case 34:i="&quot;";break;case 38:i="&amp;";break;case 39:i="&#39;";break;case 60:i="&lt;";break;case 62:i="&gt;";break;default:continue}a!==s&&(o+=t.substring(a,s)),a=s+1,o+=i}return a!==s?o+t.substring(a,s):o}},{}],158:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if(!function(e){return"number"==typeof e}(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,a,l,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(s(n=this._events[e]))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),r=(c=n.slice()).length,l=0;l<r;l++)c[l].apply(this,a);return!0},r.prototype.addListener=function(e,t){var n;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?o(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,o(this._events[e])&&!this._events[e].warned&&(n=s(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(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),"function"==typeof console.trace&&console.trace()),this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(e,t){function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var r=!1;return n.listener=t,this.on(e,n),this},r.prototype.removeListener=function(e,t){var n,r,s,a;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(n=this._events[e]).length,r=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(a=s;a-- >0;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],159:[function(e,t,n){var r=e("http"),i=t.exports;for(var o in r)r.hasOwnProperty(o)&&(i[o]=r[o]);i.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",r.request.call(this,e,t)}},{http:196}],160:[function(e,t,n){"use strict";var r=e("util"),i=e("ms");t.exports=function(e){if("number"==typeof e)return e;var t=i(e);if(void 0===t){var n=new Error(r.format("humanize-ms(%j) result undefined",e));console.warn(n.stack)}return t}},{ms:169,util:207}],161:[function(e,t,n){n.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+f]=255&s,f+=p,s/=256,c-=8);e[n+f-p]|=128*m}},{}],162:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],163:[function(e,t,n){function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&r(e.slice(0,0))}(e)||!!e._isBuffer)}},{}],164:[function(e,t,n){!function(e){function r(e){return"function"==typeof e&&(/^class(\s|\{\}$)/.test(i.call(e))||/^.*classCallCheck\(/.test(function(e){return i.call(e).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}(e)))}var i=Function.prototype.toString;void 0!==n?(void 0!==t&&t.exports&&(n=t.exports=r),n.isClass=r):e.isClass=r}(this)},{}],165:[function(e,t,n){"use strict";var r=e("core-util-is"),i=e("isstream"),o=e("is-class");Object.keys(r).map((function(e){n[function(e){var t=e.slice(2);return t[0].toLowerCase()+t.slice(1)}(e)]=r[e]})),n.stream=i,n.readableStream=i.isReadable,n.writableStream=i.isWritable,n.duplexStream=i.isDuplex,n.class=o,n.finite=function(e){return Number.isFinite(e)},n.NaN=function(e){return Number.isNaN(e)},n.generator=function(e){return e&&"function"==typeof e.next&&"function"==typeof e.throw},n.generatorFunction=function(e){return e&&e.constructor&&"GeneratorFunction"===e.constructor.name},n.asyncFunction=function(e){return e&&e.constructor&&"AsyncFunction"===e.constructor.name},n.promise=function(e){return e&&"function"==typeof e.then};var s=Math.pow(2,31);n.int=function(e){return r.isNumber(e)&&e%1==0},n.int32=function(e){return n.int(e)&&e<s&&e>=-s},n.long=function(e){return n.int(e)&&(e>=s||e<-s)},n.Long=function(e){return n.object(e)&&n.number(e.high)&&n.number(e.low)},n.double=function(e){return r.isNumber(e)&&!isNaN(e)&&e%1!=0},n.date=function(e){return e instanceof Date},n.regExp=function(e){return e instanceof RegExp},n.regexp=n.regExp,n.error=function(e){return e instanceof Error},n.array=function(e){return Array.isArray(e)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],167:[function(e,t,n){function r(e){return e instanceof s.Stream}function i(e){return r(e)&&"function"==typeof e._read&&"object"==typeof e._readableState}function o(e){return r(e)&&"function"==typeof e._write&&"object"==typeof e._writableState}var s=e("stream");t.exports=r,t.exports.isReadable=i,t.exports.isWritable=o,t.exports.isDuplex=function(e){return i(e)&&o(e)}},{stream:195}],168:[function(e,t,n){"use strict";t.exports=function(e,t,n){if(!e)throw new TypeError("argument dest is required");if(!t)throw new TypeError("argument src is required");return void 0===n&&(n=!0),Object.getOwnPropertyNames(t).forEach((function(i){if(n||!r.call(e,i)){var o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,o)}})),e};var r=Object.prototype.hasOwnProperty},{}],169:[function(e,t,n){function r(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var i=1e3,o=60*i,s=60*o,a=24*s,l=365.25*a;t.exports=function(e,t){t=t||{};var n=typeof e;if("string"===n&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*a;case"hours":case"hour":case"hrs":case"hr":case"h":return n*s;case"minutes":case"minute":case"mins":case"min":case"m":return n*o;case"seconds":case"second":case"secs":case"sec":case"s":return n*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}(e);if("number"===n&&!1===isNaN(e))return t.long?function(e){return r(e,a,"day")||r(e,s,"hour")||r(e,o,"minute")||r(e,i,"second")||e+" ms"}(e):function(e){return e>=a?Math.round(e/a)+"d":e>=s?Math.round(e/s)+"h":e>=o?Math.round(e/o)+"m":e>=i?Math.round(e/i)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],170:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(n=s+"/"+n,i="/"===s.charAt(0))}return n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(e){var o=n.isAbsolute(e),s="/"===i(e,-1);return(e=t(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),s=Math.min(i.length,o.length),a=s,l=0;l<s;l++)if(i[l]!==o[l]){a=l;break}var c=[];for(l=a;l<i.length;l++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},n.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i=function(e,t,n){return e.substr(t,n)}}).call(this,e("_process"))},{_process:173}],171:[function(e,t,r){(function(e){(function(){"use strict";function n(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function i(e){return e=c(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:n(e)}function o(e,t){for(var n in e)y.call(e,n)&&t(e[n],n,e)}function s(e){return null==e?n(e):_.call(e).slice(8,-1)}function a(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function l(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=m)for(;++n<r;)t(e[n],n,e);else o(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function c(e){return String(e).replace(/^ +| +$/g,"")}var u={function:!0,object:!0},d=u[typeof window]&&window||this,h=u[typeof r]&&r,f=u[typeof t]&&t&&!t.nodeType&&t,p=h&&f&&"object"==typeof e&&e;!p||p.global!==p&&p.window!==p&&p.self!==p||(d=p);var m=Math.pow(2,53)-1,v=/\bOpera/,g=Object.prototype,y=g.hasOwnProperty,_=g.toString,b=function e(t){function n(e){return l(e,(function(e,n){var r=n.pattern||a(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=i(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}var r=d,u=t&&"object"==typeof t&&"String"!=s(t);u&&(r=t,t=null);var h=r.navigator||{},f=h.userAgent||"";t||(t=f);var p,m,g=u?!!h.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(_.toString()),y=u?"Object":"ScriptBridgingProxyObject",b=u?"Object":"Environment",x=u&&r.java?"JavaPackage":s(r.java),w=u?"Object":"RuntimeObject",S=/\bJava/.test(x)&&r.java,C=S&&s(r.environment)==b,k=S?"a":"伪",E=S?"b":"尾",T=r.document||{},L=r.operamini||r.opera,A=v.test(A=u&&L?L["[[Class]]"]:s(L))?A:L=null,M=t,D=[],I=null,N=t==f,R=N&&L&&"function"==typeof L.version&&L.version(),O=l([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||a(n))+"\\b","i").exec(t)&&(n.label||n)})),j=l(["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"],(function(e,n){return e||RegExp("\\b"+(n.pattern||a(n))+"\\b","i").exec(t)&&(n.label||n)})),P=n([{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"]),B=l({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}},(function(e,n,r){return e||(n[P]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(P)]||RegExp("\\b"+a(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r})),U=l(["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 "],(function(e,n){var r=n.pattern||a(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"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 t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),i(e.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])}(e,r,n.label||n)),e}));if(O&&(O=[O]),B&&!P&&(P=n([B])),(p=/\bGoogle TV\b/.exec(P))&&(P=p[0]),/\bSimulator\b/i.test(t)&&(P=(P?P+" ":"")+"Simulator"),"Opera Mini"==j&&/\bOPiOS\b/.test(t)&&D.push("running in Turbo/Uncompressed mode"),"IE"==j&&/\blike iPhone OS\b/.test(t)?(B=(p=e(t.replace(/like iPhone OS/,""))).manufacturer,P=p.product):/^iP/.test(P)?(j||(j="Safari"),U="iOS"+((p=/ OS ([\d_]+)/i.exec(t))?" "+p[1].replace(/_/g,"."):"")):"Konqueror"!=j||/buntu/i.test(U)?B&&"Google"!=B&&(/Chrome/.test(j)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(P))||/\bAndroid\b/.test(U)&&/^Chrome/.test(j)&&/\bVersion\//i.test(t)?(j="Android Browser",U=/\bAndroid\b/.test(U)?U:"Android"):"Silk"==j?(/\bMobi/i.test(t)||(U="Android",D.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&D.unshift("accelerated")):"PaleMoon"==j&&(p=/\bFirefox\/([\d.]+)\b/.exec(t))?D.push("identifying as Firefox "+p[1]):"Firefox"==j&&(p=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(U||(U="Firefox OS"),P||(P=p[1])):!j||(p=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(j))?(j&&!P&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(p+"/")+8))&&(j=null),(p=P||B||U)&&(P||B||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(U))&&(j=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(U)?U:p)+" Browser")):"Electron"==j&&(p=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&D.push("Chromium "+p):U="Kubuntu",R||(R=function(e){return l(e,(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",a(j),"(?:Firefox|Minefield|NetFront)"])),(p=("iCab"==O&&parseFloat(R)>3?"WebKit":/\bOpera\b/.test(j)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(O)&&"WebKit"||!O&&/\bMSIE\b/i.test(t)&&("Mac OS"==U?"Tasman":"Trident")||"WebKit"==O&&/\bPlayStation\b(?! Vita\b)/i.test(j)&&"NetFront")&&(O=[p]),"IE"==j&&(p=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(j+=" Mobile",U="Windows Phone "+(/\+$/.test(p)?p:p+".x"),D.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(j="IE Mobile",U="Windows Phone 8.x",D.unshift("desktop mode"),R||(R=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=j&&"Trident"==O&&(p=/\brv:([\d.]+)/.exec(t))&&(j&&D.push("identifying as "+j+(R?" "+R:"")),j="IE",R=p[1]),N){if(function(e,t){var n=null!=e?typeof e[t]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(n)||"object"==n&&!e[t])}(r,"global"))if(S&&(M=(p=S.lang.System).getProperty("os.arch"),U=U||p.getProperty("os.name")+" "+p.getProperty("os.version")),C){try{R=r.require("ringo/engine").version.join("."),j="RingoJS"}catch(t){(p=r.system)&&p.global.system==r.system&&(j="Narwhal",U||(U=p[0].os||null))}j||(j="Rhino")}else"object"==typeof r.process&&!r.process.browser&&(p=r.process)&&("object"==typeof p.versions&&("string"==typeof p.versions.electron?(D.push("Node "+p.versions.node),j="Electron",R=p.versions.electron):"string"==typeof p.versions.nw&&(D.push("Chromium "+R,"Node "+p.versions.node),j="NW.js",R=p.versions.nw)),j||(j="Node.js",M=p.arch,U=p.platform,R=(R=/[\d.]+/.exec(p.version))?R[0]:null));else s(p=r.runtime)==y?(j="Adobe AIR",U=p.flash.system.Capabilities.os):s(p=r.phantom)==w?(j="PhantomJS",R=(p=p.version||null)&&p.major+"."+p.minor+"."+p.patch):"number"==typeof T.documentMode&&(p=/\bTrident\/(\d+)/i.exec(t))?(R=[R,T.documentMode],(p=+p[1]+4)!=R[1]&&(D.push("IE "+R[1]+" mode"),O&&(O[1]=""),R[1]=p),R="IE"==j?String(R[1].toFixed(1)):R[0]):"number"==typeof T.documentMode&&/^(?:Chrome|Firefox)\b/.test(j)&&(D.push("masking as "+j+" "+R),j="IE",R="11.0",O=["Trident"],U="Windows");U=U&&i(U)}if(R&&(p=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(R)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(N&&h.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(I=/b/i.test(p)?"beta":"alpha",R=R.replace(RegExp(p+"\\+?$"),"")+("beta"==I?E:k)+(/\d+\+?/.exec(p)||"")),"Fennec"==j||"Firefox"==j&&/\b(?:Android|Firefox OS)\b/.test(U))j="Firefox Mobile";else if("Maxthon"==j&&R)R=R.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(P))"Xbox 360"==P&&(U=null),"Xbox 360"==P&&/\bIEMobile\b/.test(t)&&D.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(j)&&(!j||P||/Browser|Mobi/.test(j))||"Windows CE"!=U&&!/Mobi/i.test(t))if("IE"==j&&N)try{null===r.external&&D.unshift("platform preview")}catch(t){D.unshift("embedded")}else(/\bBlackBerry\b/.test(P)||/\bBB10\b/.test(t))&&(p=(RegExp(P.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||R)?(U=((p=[p,/BB10/.test(t)])[1]?(P=null,B="BlackBerry"):"Device Software")+" "+p[0],R=null):this!=o&&"Wii"!=P&&(N&&L||/Opera/.test(j)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==j&&/\bOS X (?:\d+\.){2,}/.test(U)||"IE"==j&&(U&&!/^Win/.test(U)&&R>5.5||/\bWindows XP\b/.test(U)&&R>8||8==R&&!/\bTrident\b/.test(t)))&&!v.test(p=e.call(o,t.replace(v,"")+";"))&&p.name&&(p="ing as "+p.name+((p=p.version)?" "+p:""),v.test(j)?(/\bIE\b/.test(p)&&"Mac OS"==U&&(U=null),p="identify"+p):(p="mask"+p,j=A?i(A.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(p)&&(U=null),N||(R=null)),O=["Presto"],D.push(p));else j+=" Mobile";(p=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(p=[parseFloat(p.replace(/\.(\d)$/,".0$1")),p],"Safari"==j&&"+"==p[1].slice(-1)?(j="WebKit Nightly",I="alpha",R=p[1].slice(0,-1)):R!=p[1]&&R!=(p[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(R=null),p[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==p[0]&&537.36==p[2]&&parseFloat(p[1])>=28&&"WebKit"==O&&(O=["Blink"]),N&&(g||p[1])?(O&&(O[1]="like Chrome"),p=p[1]||((p=p[0])<530?1:p<532?2:p<532.05?3:p<533?4:p<534.03?5:p<534.07?6:p<534.1?7:p<534.13?8:p<534.16?9:p<534.24?10:p<534.3?11:p<535.01?12:p<535.02?"13+":p<535.07?15:p<535.11?16:p<535.19?17:p<536.05?18:p<536.1?19:p<537.01?20:p<537.11?"21+":p<537.13?23:p<537.18?24:p<537.24?25:p<537.36?26:"Blink"!=O?"27":"28")):(O&&(O[1]="like Safari"),p=(p=p[0])<400?1:p<500?2:p<526?3:p<533?4:p<534?"4+":p<535?5:p<537?6:p<538?7:p<601?8:"8"),O&&(O[1]+=" "+(p+="number"==typeof p?".x":/[.+]/.test(p)?"":"+")),"Safari"==j&&(!R||parseInt(R)>45)&&(R=p)),"Opera"==j&&(p=/\bzbov|zvav$/.exec(U))?(j+=" ",D.unshift("desktop mode"),"zvav"==p?(j+="Mini",R=null):j+="Mobile",U=U.replace(RegExp(" *"+p+"$"),"")):"Safari"==j&&/\bChrome\b/.exec(O&&O[1])&&(D.unshift("desktop mode"),j="Chrome Mobile",R=null,/\bOS X\b/.test(U)?(B="Apple",U="iOS 4.3+"):U=null),R&&0==R.indexOf(p=/[\d.]+$/.exec(U))&&t.indexOf("/"+p+"-")>-1&&(U=c(U.replace(p,""))),O&&!/\b(?:Avant|Nook)\b/.test(j)&&(/Browser|Lunascape|Maxthon/.test(j)||"Safari"!=j&&/^iOS/.test(U)&&/\bSafari\b/.test(O[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(j)&&O[1])&&(p=O[O.length-1])&&D.push(p),D.length&&(D=["("+D.join("; ")+")"]),B&&P&&P.indexOf(B)<0&&D.push("on "+B),P&&D.push((/^on /.test(D[D.length-1])?"":"on ")+P),U&&(p=/ ([\d.+]+)$/.exec(U),m=p&&"/"==U.charAt(U.length-p[0].length-1),U={architecture:32,family:p&&!m?U.replace(p[0],""):U,version:p?p[1]:null,toString:function(){var e=this.version;return this.family+(e&&!m?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(p=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(M))&&!/\bi686\b/i.test(M)?(U&&(U.architecture=64,U.family=U.family.replace(RegExp(" *"+p),"")),j&&(/\bWOW64\b/i.test(t)||N&&/\w(?:86|32)$/.test(h.cpuClass||h.platform)&&!/\bWin64; x64\b/i.test(t))&&D.unshift("32-bit")):U&&/^OS X/.test(U.family)&&"Chrome"==j&&parseFloat(R)>=39&&(U.architecture=64),t||(t=null);var F={};return F.description=t,F.layout=O&&O[0],F.manufacturer=B,F.name=j,F.prerelease=I,F.product=P,F.ua=t,F.version=j&&R,F.os=U||{architecture:null,family:null,version:null,toString:function(){return"null"}},F.parse=e,F.toString=function(){return this.description||""},F.version&&D.unshift(R),F.name&&D.unshift(j),U&&j&&(U!=String(U).split(" ")[0]||U!=j.split(" ")[0]&&!P)&&D.push(P?"("+U+")":"on "+U),D.length&&(F.description=D.join(" ")),F}();h&&f?o(b,(function(e,t){h[t]=e})):d.platform=b}).call(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],172:[function(e,t,n){(function(e){"use strict";!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,e("_process"))},{_process:173}],173:[function(e,t,n){function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(u===setTimeout)return setTimeout(e,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(e,0);try{return u(e,0)}catch(t){try{return u.call(null,e,0)}catch(t){return u.call(this,e,0)}}}function s(){m&&f&&(m=!1,f.length?p=f.concat(p):v=-1,p.length&&a())}function a(){if(!m){var e=o(s);m=!0;for(var t=p.length;t;){for(f=p,p=[];++v<t;)f&&f[v].run();v=-1,t=p.length}f=null,m=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var u,d,h=t.exports={};!function(){try{u="function"==typeof setTimeout?setTimeout:r}catch(e){u=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(e){d=i}}();var f,p=[],m=!1,v=-1;h.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];p.push(new l(e,t)),1!==p.length||m||o(a)},l.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(e){return[]},h.binding=function(e){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(e){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}],174:[function(e,t,r){(function(e){!function(n){function i(e){throw new RangeError(D[e])}function o(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function s(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+o((e=e.replace(M,".")).split("."),t).join(".")}function a(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function l(e){return o(e,(function(e){var t="";return e>65535&&(t+=R((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+R(e)})).join("")}function c(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:b}function u(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?N(e/C):e>>1,e+=N(e/t);e>I*w>>1;r+=b)e=N(e/I);return N(r+(I+1)*e/(e+S))}function h(e){var t,n,r,o,s,a,u,h,f,p,m=[],v=e.length,g=0,y=E,S=k;for((n=e.lastIndexOf(T))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&i("not-basic"),m.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<v;){for(s=g,a=1,u=b;o>=v&&i("invalid-input"),((h=c(e.charCodeAt(o++)))>=b||h>N((_-g)/a))&&i("overflow"),g+=h*a,!(h<(f=u<=S?x:u>=S+w?w:u-S));u+=b)a>N(_/(p=b-f))&&i("overflow"),a*=p;S=d(g-s,t=m.length+1,0==s),N(g/t)>_-y&&i("overflow"),y+=N(g/t),g%=t,m.splice(g++,0,y)}return l(m)}function f(e){var t,n,r,o,s,l,c,h,f,p,m,v,g,y,S,C=[];for(v=(e=a(e)).length,t=E,n=0,s=k,l=0;l<v;++l)(m=e[l])<128&&C.push(R(m));for(r=o=C.length,o&&C.push(T);r<v;){for(c=_,l=0;l<v;++l)(m=e[l])>=t&&m<c&&(c=m);for(c-t>N((_-n)/(g=r+1))&&i("overflow"),n+=(c-t)*g,t=c,l=0;l<v;++l)if((m=e[l])<t&&++n>_&&i("overflow"),m==t){for(h=n,f=b;!(h<(p=f<=s?x:f>=s+w?w:f-s));f+=b)S=h-p,y=b-p,C.push(R(u(p+S%y,0))),h=N(S/y);C.push(R(u(h,0))),s=d(n,g,r==o),n=0,++r}++n,++t}return C.join("")}var p="object"==typeof r&&r&&!r.nodeType&&r,m="object"==typeof t&&t&&!t.nodeType&&t,v="object"==typeof e&&e;v.global!==v&&v.window!==v&&v.self!==v||(n=v);var g,y,_=2147483647,b=36,x=1,w=26,S=38,C=700,k=72,E=128,T="-",L=/^xn--/,A=/[^\x20-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=b-x,N=Math.floor,R=String.fromCharCode;if(g={version:"1.4.1",ucs2:{decode:a,encode:l},decode:h,encode:f,toASCII:function(e){return s(e,(function(e){return A.test(e)?"xn--"+f(e):e}))},toUnicode:function(e){return s(e,(function(e){return L.test(e)?h(e.slice(4).toLowerCase()):e}))}},p&&m)if(t.exports==p)m.exports=g;else for(y in g)g.hasOwnProperty(y)&&(p[y]=g[y]);else n.punycode=g}(this)}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],175:[function(e,t,n){"use strict";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,o){t=t||"&",n=n||"=";var s={};if("string"!=typeof e||0===e.length)return s;var a=/\+/g;e=e.split(t);var l=1e3;o&&"number"==typeof o.maxKeys&&(l=o.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,h,f,p,m=e[u].replace(a,"%20"),v=m.indexOf(n);v>=0?(d=m.substr(0,v),h=m.substr(v+1)):(d=m,h=""),f=decodeURIComponent(d),p=decodeURIComponent(h),r(s,f)?i(s[f])?s[f].push(p):s[f]=[s[f],p]:s[f]=p}return s};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],176:[function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,n,a){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"==typeof e?r(s(e),(function(s){var a=encodeURIComponent(i(s))+n;return o(e[s])?r(e[s],(function(e){return a+encodeURIComponent(i(e))})).join(t):a+encodeURIComponent(i(e[s]))})).join(t):a?encodeURIComponent(i(a))+n+encodeURIComponent(i(e)):""};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},{}],177:[function(e,t,n){"use strict";n.decode=n.parse=e("./decode"),n.encode=n.stringify=e("./encode")},{"./decode":175,"./encode":176}],178:[function(e,t,n){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);u.call(this,e),d.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",i)}function i(){this.allowHalfOpen||this._writableState.ended||a.nextTick(o,this)}function o(e){e.end()}var s=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/keys")),a=e("process-nextick-args"),l=s.default||function(e){var t=[];for(var n in e)t.push(n);return t};t.exports=r;var c=e("core-util-is");c.inherits=e("inherits");var u=e("./_stream_readable"),d=e("./_stream_writable");c.inherits(r,u);for(var h=l(d.prototype),f=0;f<h.length;f++){var p=h[f];r.prototype[p]||(r.prototype[p]=d.prototype[p])}Object.defineProperty(r.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(r.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),r.prototype._destroy=function(e,t){this.push(null),this.end(),a.nextTick(t,e)}},{"./_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(e,t,n){"use strict";function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}t.exports=r;var i=e("./_stream_transform"),o=e("core-util-is");o.inherits=e("inherits"),o.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(e,t,r){(function(n,r){"use strict";function i(t,n){t=t||{};var r=n instanceof(S=S||e("./_stream_duplex"));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new N,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(I||(I=e("string_decoder/").StringDecoder),this.decoder=new I(t.encoding),this.encoding=t.encoding)}function o(t){if(S=S||e("./_stream_duplex"),!(this instanceof o))return new o(t);this._readableState=new i(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),E.call(this)}function s(e,t,n,r,i){var o,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,u(e)}}(e,s)):(i||(o=l(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||(0,x.default)(t)===T.prototype||(t=function(e){return T.from(e)}(t)),r?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):a(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!n?(t=s.decoder.write(t),s.objectMode||0!==t.length?a(e,s,t,!1):h(e,s)):a(e,s,t,!1))):r||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function a(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&u(e)),h(e,t)}function l(e,t){var n;return function(e){return T.isBuffer(e)||e instanceof L}(t)||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=j?e=j:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function u(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(D("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?w.nextTick(d,e):d(e))}function d(e){D("emit readable"),e.emit("readable"),v(e)}function h(e,t){t.readingMore||(t.readingMore=!0,w.nextTick(f,e,t))}function f(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(D("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function p(e){D("readable nexttick read 0"),e.read(0)}function m(e,t){t.reading||(D("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),v(e),t.flowing&&!t.reading&&e.read(0)}function v(e){var t=e._readableState;for(D("flow",t.flowing);t.flowing&&null!==e.read(););}function g(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0==(e-=s)){s===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++r}return t.length-=r,i}(e,t):function(e,t){var n=T.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,s),0==(e-=s)){s===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++i}return t.length-=i,n}(e,t),r}(e,t.buffer,t.decoder),n);var n}function y(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,w.nextTick(_,t,e))}function _(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function b(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}var x=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/get-prototype-of")),w=e("process-nextick-args");t.exports=o;var S,C=e("isarray");o.ReadableState=i;var k=(e("events").EventEmitter,function(e,t){return e.listeners(t).length}),E=e("./internal/streams/stream"),T=e("safe-buffer").Buffer,L=r.Uint8Array||function(){},A=e("core-util-is");A.inherits=e("inherits");var M=e("util"),D=void 0;D=M&&M.debuglog?M.debuglog("stream"):function(){};var I,N=e("./internal/streams/BufferList"),R=e("./internal/streams/destroy");A.inherits(o,E);var O=["error","close","destroy","pause","resume"];Object.defineProperty(o.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),o.prototype.destroy=R.destroy,o.prototype._undestroy=R.undestroy,o.prototype._destroy=function(e,t){this.push(null),t(e)},o.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=T.from(e,t),t=""),n=!0),s(this,e,t,!1,n)},o.prototype.unshift=function(e){return s(this,e,null,!0,!1)},o.prototype.isPaused=function(){return!1===this._readableState.flowing},o.prototype.setEncoding=function(t){return I||(I=e("string_decoder/").StringDecoder),this._readableState.decoder=new I(t),this._readableState.encoding=t,this};var j=8388608;o.prototype.read=function(e){D("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return D("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):u(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&y(this),null;var r,i=t.needReadable;return D("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&D("length less than watermark",i=!0),t.ended||t.reading?D("reading or ended",i=!1):i&&(D("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c(n,t))),null===(r=e>0?g(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&y(this)),null!==r&&this.emit("data",r),r},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,t){function r(e,t){D("onunpipe"),e===d&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,o())}function i(){D("onend"),e.end()}function o(){D("cleanup"),e.removeListener("close",l),e.removeListener("finish",c),e.removeListener("drain",p),e.removeListener("error",a),e.removeListener("unpipe",r),d.removeListener("end",i),d.removeListener("end",u),d.removeListener("data",s),m=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||p()}function s(t){D("ondata"),g=!1,!1!==e.write(t)||g||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&-1!==b(h.pipes,e))&&!m&&(D("false write response, pause",d._readableState.awaitDrain),d._readableState.awaitDrain++,g=!0),d.pause())}function a(t){D("onerror",t),u(),e.removeListener("error",a),0===k(e,"error")&&e.emit("error",t)}function l(){e.removeListener("finish",c),u()}function c(){D("onfinish"),e.removeListener("close",l),u()}function u(){D("unpipe"),d.unpipe(e)}var d=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,D("pipe count=%d opts=%j",h.pipesCount,t);var f=t&&!1===t.end||e===n.stdout||e===n.stderr?u:i;h.endEmitted?w.nextTick(f):d.once("end",f),e.on("unpipe",r);var p=function(e){return function(){var t=e._readableState;D("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&k(e,"data")&&(t.flowing=!0,v(e))}}(d);e.on("drain",p);var m=!1,g=!1;return d.on("data",s),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?C(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",a),e.once("close",l),e.once("finish",c),e.emit("pipe",d),h.flowing||(D("pipe resume"),d.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var s=b(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},o.prototype.on=function(e,t){var n=E.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&u(this):w.nextTick(p,this))}return n},o.prototype.addListener=o.prototype.on,o.prototype.resume=function(){var e=this._readableState;return e.flowing||(D("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,w.nextTick(m,e,t))}(this,e)),this},o.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},o.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(D("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){D("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||!(n.objectMode||i&&i.length)||t.push(i)||(r=!0,e.pause())})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<O.length;o++)e.on(O[o],this.emit.bind(this,O[o]));return this._read=function(t){D("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(o.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),o._fromList=g}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";function r(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function i(e){if(!(this instanceof i))return new i(e);a.call(this,e),this._transformState={afterTransform:r.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){s(e,t,n)})):s(this,null,null)}function s(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}t.exports=i;var a=e("./_stream_duplex"),l=e("core-util-is");l.inherits=e("inherits"),l.inherits(i,a),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,a.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var n=this;a.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(e,t,r){(function(n,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;for(e.entry=null;r;){var i=r.callback;t.pendingcb--,i(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}function s(){}function a(t,n){x=x||e("./_stream_duplex"),t=t||{};var r=n instanceof x;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,s=t.writableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(s||0===s)?s:a,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(b.nextTick(i,r),b.nextTick(m,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(i(r),e._writableState.errorEmitted=!0,e.emit("error",r),m(e,t))}(e,n,r,t,i);else{var o=f(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||h(e,n),r?w(d,e,n,o,i):d(e,n,o,i)}}(n,e)},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 o(this)}function l(t){if(x=x||e("./_stream_duplex"),!(C.call(l,this)||this instanceof x))return new l(t);this._writableState=new a(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),E.call(this)}function c(e,t,n,r,i,o){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=T.from(t,n)),t}(t,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else u(e,t,!1,a,r,i,o);return l}function u(e,t,n,r,i,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function d(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),m(e,t)}function h(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var a=0,l=!0;n;)i[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;i.allBuffers=l,u(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,d=n.encoding,h=n.callback;if(u(e,t,!1,t.objectMode?1:c.length,c,d,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function f(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function p(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),m(e,t)}))}function m(e,t){var n=f(t);return n&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,b.nextTick(p,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}var v=i(e("babel-runtime/core-js/object/define-property")),g=i(e("babel-runtime/core-js/symbol/has-instance")),y=i(e("babel-runtime/core-js/symbol")),_=i(e("babel-runtime/core-js/set-immediate")),b=e("process-nextick-args");t.exports=l;var x,w=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?_.default:b.nextTick;l.WritableState=a;var S=e("core-util-is");S.inherits=e("inherits");var C,k={deprecate:e("util-deprecate")},E=e("./internal/streams/stream"),T=e("safe-buffer").Buffer,L=r.Uint8Array||function(){},A=e("./internal/streams/destroy");S.inherits(l,E),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:k.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof y.default&&g.default&&"function"==typeof Function.prototype[g.default]?(C=Function.prototype[g.default],(0,v.default)(l,g.default,{value:function(e){return!!C.call(this,e)||this===l&&e&&e._writableState instanceof a}})):C=function(e){return e instanceof this},l.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},l.prototype.write=function(e,t,n){var r=this._writableState,i=!1,o=!r.objectMode&&function(e){return T.isBuffer(e)||e instanceof L}(e);return o&&!T.isBuffer(e)&&(e=function(e){return T.from(e)}(e)),"function"==typeof t&&(n=t,t=null),o?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=s),r.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),b.nextTick(t,n)}(this,n):(o||function(e,t,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),b.nextTick(r,o),i=!1),i}(this,r,e,n))&&(r.pendingcb++,i=c(this,r,o,e,t,n)),i},l.prototype.cork=function(){this._writableState.corked++},l.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||h(this,e))},l.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),l.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},l.prototype._writev=null,l.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,m(e,t),n&&(t.finished?b.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),l.prototype.destroy=A.destroy,l.prototype._undestroy=A.undestroy,l.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";function r(e,t,n){e.copy(t,n)}var i=e("safe-buffer").Buffer,o=e("util");t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,o=0;n;)r(n.data,t,o),o+=n.data.length,n=n.next;return t},e}(),o&&o.inspect&&o.inspect.custom&&(t.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":193,util:36}],185:[function(e,t,n){"use strict";function r(e,t){e.emit("error",t)}var i=e("process-nextick-args");t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i.nextTick(r,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(i.nextTick(r,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){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)}}},{"process-nextick-args":172}],186:[function(e,t,n){"use strict";t.exports=e("events").EventEmitter},{events:158}],187:[function(e,t,n){t.exports=e("./readable").PassThrough},{"./readable":188}],188:[function(e,t,n){(n=t.exports=e("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./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(e,t,n){t.exports=e("./readable").Transform},{"./readable":188}],190:[function(e,t,n){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=e("./runtime"),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(e,t,n){!function(e){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,s=Object.create(o.prototype),a=new f(r||[]);return s._invoke=c(e,n,a),s}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function s(){}function a(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function l(e){function t(n,i,o,s){var a=r(e[n],e,i);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&y.call(c,"__await")?Promise.resolve(c.__await).then((function(e){t("next",e,o,s)}),(function(e){t("throw",e,o,s)})):Promise.resolve(c).then((function(e){l.value=e,o(l)}),s)}s(a.arg)}var n;this._invoke=function(e,r){function i(){return new Promise((function(n,i){t(e,r,n,i)}))}return n=n?n.then(i,i):i()}}function c(e,t,n){var i=k;return function(o,s){if(i===T)throw new Error("Generator is already running");if(i===L){if("throw"===o)throw s;return m()}for(n.method=o,n.arg=s;;){var a=n.delegate;if(a){var l=u(a,n);if(l){if(l===A)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===k)throw i=L,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=T;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?L:E,c.arg===A)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=L,n.method="throw",n.arg=c.arg)}}}function u(e,t){var n=e.iterator[t.method];if(n===v){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=v,u(e,t),"throw"===t.method))return A;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,A;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=v),t.delegate=null,A):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,A)}function d(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function h(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function f(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(d,this),this.reset(!0)}function p(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(y.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=v,t.done=!0,t};return r.next=r}}return{next:m}}function m(){return{value:v,done:!0}}var v,g=Object.prototype,y=g.hasOwnProperty,_="function"==typeof Symbol?Symbol:{},b=_.iterator||"@@iterator",x=_.asyncIterator||"@@asyncIterator",w=_.toStringTag||"@@toStringTag",S="object"==typeof t,C=e.regeneratorRuntime;if(C)S&&(t.exports=C);else{(C=e.regeneratorRuntime=S?t.exports:{}).wrap=n;var k="suspendedStart",E="suspendedYield",T="executing",L="completed",A={},M={};M[b]=function(){return this};var D=Object.getPrototypeOf,I=D&&D(D(p([])));I&&I!==g&&y.call(I,b)&&(M=I);var N=s.prototype=i.prototype=Object.create(M);o.prototype=N.constructor=s,s.constructor=o,s[w]=o.displayName="GeneratorFunction",C.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},C.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(N),e},C.awrap=function(e){return{__await:e}},a(l.prototype),l.prototype[x]=function(){return this},C.AsyncIterator=l,C.async=function(e,t,r,i){var o=new l(n(e,t,r,i));return C.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},a(N),N[w]="Generator",N[b]=function(){return this},N.toString=function(){return"[object Generator]"},C.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},C.values=p,f.prototype={constructor:f,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,this.tryEntries.forEach(h),!e)for(var t in this)"t"===t.charAt(0)&&y.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=v)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){function t(t,r){return o.type="throw",o.arg=e,n.next=t,r&&(n.method="next",n.arg=v),!!r}if(this.done)throw e;for(var n=this,r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=y.call(i,"catchLoc"),a=y.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&y.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,A):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),A},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),h(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:p(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=v),A}}}}(function(){return this}()||Function("return this")())},{}],193:[function(e,t,n){function r(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return s(e,t,n)}var o=e("buffer"),s=o.Buffer;s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow?t.exports=o:(r(o,n),n.Buffer=i),r(s,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return s(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=s(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return s(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o.SlowBuffer(e)}},{buffer:38}],194:[function(e,t,n){(function(t){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/string/from-code-point")),o=r(e("babel-runtime/core-js/json/stringify")),s=r(e("babel-runtime/helpers/typeof")),a=r(e("babel-runtime/core-js/object/define-property")),l=r(e("babel-runtime/core-js/object/keys")),c=r(e("babel-runtime/core-js/object/create"));!function(n){function r(e,t){if(!(this instanceof r))return new r(e,t);var i=this;(function(e){for(var t=0,n=N.length;t<n;t++)e[N[t]]=""})(i),i.q=i.c="",i.bufferCheckPosition=n.MAX_BUFFER_LENGTH,i.opt=t||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=W.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?(0,c.default)(n.XML_ENTITIES):(0,c.default)(n.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=(0,c.default)(U)),i.trackPosition=!1!==i.opt.position,i.trackPosition&&(i.position=i.line=i.column=0),g(i,"onready")}function u(e){for(var t=Math.max(n.MAX_BUFFER_LENGTH,10),r=0,i=0,o=N.length;i<o;i++){var s=e[N[i]].length;if(s>t)switch(N[i]){case"textNode":_(e);break;case"cdata":y(e,"oncdata",e.cdata),e.cdata="";break;case"script":y(e,"onscript",e.script),e.script="";break;default:x(e,"Max buffer length exceeded: "+N[i])}r=Math.max(r,s)}var a=n.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=a+e.position}function d(e,t){if(!(this instanceof d))return new d(e,t);I.apply(this),this._parser=new r(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit("end")},this._parser.onerror=function(e){n.emit("error",e),n._parser.error=null},this._decoder=null,R.forEach((function(e){(0,a.default)(n,"on"+e,{get:function(){return n._parser["on"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser["on"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})}))}function h(e){return" "===e||"\n"===e||"\r"===e||"\t"===e}function f(e){return'"'===e||"'"===e}function p(e){return">"===e||h(e)}function m(e,t){return e.test(t)}function v(e,t){return!m(e,t)}function g(e,t,n){e[t]&&e[t](n)}function y(e,t,n){e.textNode&&_(e),g(e,t,n)}function _(e){e.textNode=b(e.opt,e.textNode),e.textNode&&g(e,"ontext",e.textNode),e.textNode=""}function b(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\s+/g," ")),t}function x(e,t){return _(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,g(e,"onerror",t),e}function w(e){return e.sawRoot&&!e.closedRoot&&S(e,"Unclosed root tag"),e.state!==W.BEGIN&&e.state!==W.BEGIN_WHITESPACE&&e.state!==W.TEXT&&x(e,"Unexpected end"),_(e),e.c="",e.closed=!0,g(e,"onend"),r.call(e,e.strict,e.opt),e}function S(e,t){if("object"!==(void 0===e?"undefined":(0,s.default)(e))||!(e instanceof r))throw new Error("bad call to strictFail");e.strict&&x(e,t)}function C(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,y(e,"onopentagstart",n)}function k(e,t){var n=e.indexOf(":")<0?["",e]:e.split(":"),r=n[0],i=n[1];return t&&"xmlns"===e&&(r="xmlns",i=""),{prefix:r,local:i}}function E(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName))e.attribName=e.attribValue="";else{if(e.opt.xmlns){var t=k(e.attribName,!0),n=t.prefix,r=t.local;if("xmlns"===n)if("xml"===r&&e.attribValue!==P)S(e,"xml: prefix must be bound to "+P+"\nActual: "+e.attribValue);else if("xmlns"===r&&e.attribValue!==B)S(e,"xmlns: prefix must be bound to "+B+"\nActual: "+e.attribValue);else{var i=e.tag,o=e.tags[e.tags.length-1]||e;i.ns===o.ns&&(i.ns=(0,c.default)(o.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,y(e,"onattribute",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=""}}function T(e,t){if(e.opt.xmlns){var n=e.tag,r=k(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(S(e,"Unbound namespace prefix: "+(0,o.default)(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&(0,l.default)(n.ns).forEach((function(t){y(e,"onopennamespace",{prefix:t,uri:n.ns[t]})}));for(var s=0,a=e.attribList.length;s<a;s++){var c=e.attribList[s],u=c[0],d=c[1],h=k(u,!0),f=h.prefix,p=h.local,m=""===f?"":n.ns[f]||"",v={name:u,value:d,prefix:f,local:p,uri:m};f&&"xmlns"!==f&&!m&&(S(e,"Unbound namespace prefix: "+(0,o.default)(f)),v.uri=f),e.tag.attributes[u]=v,y(e,"onattribute",v)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),y(e,"onopentag",e.tag),t||(e.noscript||"script"!==e.tagName.toLowerCase()?e.state=W.TEXT:e.state=W.SCRIPT,e.tag=null,e.tagName=""),e.attribName=e.attribValue="",e.attribList.length=0}function L(e){if(!e.tagName)return S(e,"Weird empty close tag."),e.textNode+="</>",void(e.state=W.TEXT);if(e.script){if("script"!==e.tagName)return e.script+="</"+e.tagName+">",e.tagName="",void(e.state=W.SCRIPT);y(e,"onscript",e.script),e.script=""}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--&&e.tags[t].name!==r;)S(e,"Unexpected close tag");if(t<0)return S(e,"Unmatched closing tag: "+e.tagName),e.textNode+="</"+e.tagName+">",void(e.state=W.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,y(e,"onclosetag",e.tagName);var s={};for(var a in o.ns)s[a]=o.ns[a];var c=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==c.ns&&(0,l.default)(o.ns).forEach((function(t){var n=o.ns[t];y(e,"onclosenamespace",{prefix:t,uri:n})}))}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=W.TEXT}function A(e){var t,n=e.entity,r=n.toLowerCase(),o="";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),o=(t=parseInt(n,16)).toString(16)):(n=n.slice(1),o=(t=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(t)||o.toLowerCase()!==n?(S(e,"Invalid character entity"),"&"+e.entity+";"):(0,i.default)(t))}function M(e,t){"<"===t?(e.state=W.OPEN_WAKA,e.startTagPosition=e.position):h(t)||(S(e,"Non-whitespace before first tag."),e.textNode=t,e.state=W.TEXT)}function D(e,t){var n="";return t<e.length&&(n=e.charAt(t)),n}n.parser=function(e,t){return new r(e,t)},n.SAXParser=r,n.SAXStream=d,n.createStream=function(e,t){return new d(e,t)},n.MAX_BUFFER_LENGTH=65536;var I,N=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];n.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],c.default||(Object.create=function(e){function t(){}return t.prototype=e,new t}),l.default||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r.prototype={end:function(){w(this)},write:function(e){var t=this;if(this.error)throw this.error;if(t.closed)return x(t,"Cannot write after close. Assign an onready handler.");if(null===e)return w(t);"object"===(void 0===e?"undefined":(0,s.default)(e))&&(e=e.toString());for(var n=0,r="";r=D(e,n++),t.c=r,r;)switch(t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++),t.state){case W.BEGIN:if(t.state=W.BEGIN_WHITESPACE,"\ufeff"===r)continue;M(t,r);continue;case W.BEGIN_WHITESPACE:M(t,r);continue;case W.TEXT:if(t.sawRoot&&!t.closedRoot){for(var i=n-1;r&&"<"!==r&&"&"!==r;)(r=D(e,n++))&&t.trackPosition&&(t.position++,"\n"===r?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(i,n-1)}"<"!==r||t.sawRoot&&t.closedRoot&&!t.strict?(h(r)||t.sawRoot&&!t.closedRoot||S(t,"Text data outside of root node."),"&"===r?t.state=W.TEXT_ENTITY:t.textNode+=r):(t.state=W.OPEN_WAKA,t.startTagPosition=t.position);continue;case W.SCRIPT:"<"===r?t.state=W.SCRIPT_ENDING:t.script+=r;continue;case W.SCRIPT_ENDING:"/"===r?t.state=W.CLOSE_TAG:(t.script+="<"+r,t.state=W.SCRIPT);continue;case W.OPEN_WAKA:if("!"===r)t.state=W.SGML_DECL,t.sgmlDecl="";else if(h(r));else if(m(F,r))t.state=W.OPEN_TAG,t.tagName=r;else if("/"===r)t.state=W.CLOSE_TAG,t.tagName="";else if("?"===r)t.state=W.PROC_INST,t.procInstName=t.procInstBody="";else{if(S(t,"Unencoded <"),t.startTagPosition+1<t.position){var o=t.position-t.startTagPosition;r=new Array(o).join(" ")+r}t.textNode+="<"+r,t.state=W.TEXT}continue;case W.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===O?(y(t,"onopencdata"),t.state=W.CDATA,t.sgmlDecl="",t.cdata=""):t.sgmlDecl+r==="--"?(t.state=W.COMMENT,t.comment="",t.sgmlDecl=""):(t.sgmlDecl+r).toUpperCase()===j?(t.state=W.DOCTYPE,(t.doctype||t.sawRoot)&&S(t,"Inappropriately located doctype declaration"),t.doctype="",t.sgmlDecl=""):">"===r?(y(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=W.TEXT):f(r)?(t.state=W.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case W.SGML_DECL_QUOTED:r===t.q&&(t.state=W.SGML_DECL,t.q=""),t.sgmlDecl+=r;continue;case W.DOCTYPE:">"===r?(t.state=W.TEXT,y(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=r,"["===r?t.state=W.DOCTYPE_DTD:f(r)&&(t.state=W.DOCTYPE_QUOTED,t.q=r));continue;case W.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q="",t.state=W.DOCTYPE);continue;case W.DOCTYPE_DTD:t.doctype+=r,"]"===r?t.state=W.DOCTYPE:f(r)&&(t.state=W.DOCTYPE_DTD_QUOTED,t.q=r);continue;case W.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=W.DOCTYPE_DTD,t.q="");continue;case W.COMMENT:"-"===r?t.state=W.COMMENT_ENDING:t.comment+=r;continue;case W.COMMENT_ENDING:"-"===r?(t.state=W.COMMENT_ENDED,t.comment=b(t.opt,t.comment),t.comment&&y(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+r,t.state=W.COMMENT);continue;case W.COMMENT_ENDED:">"!==r?(S(t,"Malformed comment"),t.comment+="--"+r,t.state=W.COMMENT):t.state=W.TEXT;continue;case W.CDATA:"]"===r?t.state=W.CDATA_ENDING:t.cdata+=r;continue;case W.CDATA_ENDING:"]"===r?t.state=W.CDATA_ENDING_2:(t.cdata+="]"+r,t.state=W.CDATA);continue;case W.CDATA_ENDING_2:">"===r?(t.cdata&&y(t,"oncdata",t.cdata),y(t,"onclosecdata"),t.cdata="",t.state=W.TEXT):"]"===r?t.cdata+="]":(t.cdata+="]]"+r,t.state=W.CDATA);continue;case W.PROC_INST:"?"===r?t.state=W.PROC_INST_ENDING:h(r)?t.state=W.PROC_INST_BODY:t.procInstName+=r;continue;case W.PROC_INST_BODY:if(!t.procInstBody&&h(r))continue;"?"===r?t.state=W.PROC_INST_ENDING:t.procInstBody+=r;continue;case W.PROC_INST_ENDING:">"===r?(y(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=W.TEXT):(t.procInstBody+="?"+r,t.state=W.PROC_INST_BODY);continue;case W.OPEN_TAG:m(z,r)?t.tagName+=r:(C(t),">"===r?T(t):"/"===r?t.state=W.OPEN_TAG_SLASH:(h(r)||S(t,"Invalid character in tag name"),t.state=W.ATTRIB));continue;case W.OPEN_TAG_SLASH:">"===r?(T(t,!0),L(t)):(S(t,"Forward-slash in opening tag not followed by >"),t.state=W.ATTRIB);continue;case W.ATTRIB:if(h(r))continue;">"===r?T(t):"/"===r?t.state=W.OPEN_TAG_SLASH:m(F,r)?(t.attribName=r,t.attribValue="",t.state=W.ATTRIB_NAME):S(t,"Invalid attribute name");continue;case W.ATTRIB_NAME:"="===r?t.state=W.ATTRIB_VALUE:">"===r?(S(t,"Attribute without value"),t.attribValue=t.attribName,E(t),T(t)):h(r)?t.state=W.ATTRIB_NAME_SAW_WHITE:m(z,r)?t.attribName+=r:S(t,"Invalid attribute name");continue;case W.ATTRIB_NAME_SAW_WHITE:if("="===r)t.state=W.ATTRIB_VALUE;else{if(h(r))continue;S(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",y(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===r?T(t):m(F,r)?(t.attribName=r,t.state=W.ATTRIB_NAME):(S(t,"Invalid attribute name"),t.state=W.ATTRIB)}continue;case W.ATTRIB_VALUE:if(h(r))continue;f(r)?(t.q=r,t.state=W.ATTRIB_VALUE_QUOTED):(S(t,"Unquoted attribute value"),t.state=W.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case W.ATTRIB_VALUE_QUOTED:if(r!==t.q){"&"===r?t.state=W.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}E(t),t.q="",t.state=W.ATTRIB_VALUE_CLOSED;continue;case W.ATTRIB_VALUE_CLOSED:h(r)?t.state=W.ATTRIB:">"===r?T(t):"/"===r?t.state=W.OPEN_TAG_SLASH:m(F,r)?(S(t,"No whitespace between attributes"),t.attribName=r,t.attribValue="",t.state=W.ATTRIB_NAME):S(t,"Invalid attribute name");continue;case W.ATTRIB_VALUE_UNQUOTED:if(!p(r)){"&"===r?t.state=W.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}E(t),">"===r?T(t):t.state=W.ATTRIB;continue;case W.CLOSE_TAG:if(t.tagName)">"===r?L(t):m(z,r)?t.tagName+=r:t.script?(t.script+="</"+t.tagName,t.tagName="",t.state=W.SCRIPT):(h(r)||S(t,"Invalid tagname in closing tag"),t.state=W.CLOSE_TAG_SAW_WHITE);else{if(h(r))continue;v(F,r)?t.script?(t.script+="</"+r,t.state=W.SCRIPT):S(t,"Invalid tagname in closing tag."):t.tagName=r}continue;case W.CLOSE_TAG_SAW_WHITE:if(h(r))continue;">"===r?L(t):S(t,"Invalid characters in closing tag");continue;case W.TEXT_ENTITY:case W.ATTRIB_VALUE_ENTITY_Q:case W.ATTRIB_VALUE_ENTITY_U:var a,l;switch(t.state){case W.TEXT_ENTITY:a=W.TEXT,l="textNode";break;case W.ATTRIB_VALUE_ENTITY_Q:a=W.ATTRIB_VALUE_QUOTED,l="attribValue";break;case W.ATTRIB_VALUE_ENTITY_U:a=W.ATTRIB_VALUE_UNQUOTED,l="attribValue"}";"===r?(t[l]+=A(t),t.entity="",t.state=a):m(t.entity.length?Z:H,r)?t.entity+=r:(S(t,"Invalid character in entity name"),t[l]+="&"+t.entity+r,t.entity="",t.state=a);continue;default:throw new Error(t,"Unknown state: "+t.state)}return t.position>=t.bufferCheckPosition&&u(t),t},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function(e){_(e),""!==e.cdata&&(y(e,"oncdata",e.cdata),e.cdata=""),""!==e.script&&(y(e,"onscript",e.script),e.script="")}(this)}};try{I=e("stream").Stream}catch(e){I=function(){}}var R=n.EVENTS.filter((function(e){return"error"!==e&&"end"!==e}));d.prototype=(0,c.default)(I.prototype,{constructor:{value:d}}),d.prototype.write=function(n){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(n)){if(!this._decoder){var r=e("string_decoder").StringDecoder;this._decoder=new r("utf8")}n=this._decoder.write(n)}return this._parser.write(n.toString()),this.emit("data",n),!0},d.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},d.prototype.on=function(e,t){var n=this;return n._parser["on"+e]||-1===R.indexOf(e)||(n._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),I.prototype.on.call(n,e,t)};var O="[CDATA[",j="DOCTYPE",P="http://www.w3.org/XML/1998/namespace",B="http://www.w3.org/2000/xmlns/",U={xml:P,xmlns:B},F=/[:_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]/,z=/[:_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-]/,H=/[#:_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]/,Z=/[#:_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-]/,W=0;for(var G in n.STATE={BEGIN:W++,BEGIN_WHITESPACE:W++,TEXT:W++,TEXT_ENTITY:W++,OPEN_WAKA:W++,SGML_DECL:W++,SGML_DECL_QUOTED:W++,DOCTYPE:W++,DOCTYPE_QUOTED:W++,DOCTYPE_DTD:W++,DOCTYPE_DTD_QUOTED:W++,COMMENT_STARTING:W++,COMMENT:W++,COMMENT_ENDING:W++,COMMENT_ENDED:W++,CDATA:W++,CDATA_ENDING:W++,CDATA_ENDING_2:W++,PROC_INST:W++,PROC_INST_BODY:W++,PROC_INST_ENDING:W++,OPEN_TAG:W++,OPEN_TAG_SLASH:W++,ATTRIB:W++,ATTRIB_NAME:W++,ATTRIB_NAME_SAW_WHITE:W++,ATTRIB_VALUE:W++,ATTRIB_VALUE_QUOTED:W++,ATTRIB_VALUE_CLOSED:W++,ATTRIB_VALUE_UNQUOTED:W++,ATTRIB_VALUE_ENTITY_Q:W++,ATTRIB_VALUE_ENTITY_U:W++,CLOSE_TAG:W++,CLOSE_TAG_SAW_WHITE:W++,SCRIPT:W++,SCRIPT_ENDING:W++},n.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},n.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,l.default)(n.ENTITIES).forEach((function(e){var t=n.ENTITIES[e],r="number"==typeof t?String.fromCharCode(t):t;n.ENTITIES[e]=r})),n.STATE)n.STATE[n.STATE[G]]=G;W=n.STATE,i.default||function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=[],o=-1,s=arguments.length;if(!s)return"";for(var a="";++o<s;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||t(l)!==l)throw RangeError("Invalid code point: "+l);l<=65535?i.push(l):(n=55296+((l-=65536)>>10),r=l%1024+56320,i.push(n,r)),(o+1===s||i.length>16384)&&(a+=e.apply(null,i),i.length=0)}return a};a.default?Object.defineProperty(String,"fromCodePoint",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(void 0===n?(void 0).sax={}:n)}).call(this,e("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(e,t,n){function r(){i.call(this)}t.exports=r;var i=e("events").EventEmitter;e("inherits")(r,i),r.Readable=e("readable-stream/readable.js"),r.Writable=e("readable-stream/writable.js"),r.Duplex=e("readable-stream/duplex.js"),r.Transform=e("readable-stream/transform.js"),r.PassThrough=e("readable-stream/passthrough.js"),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){u||(u=!0,e.end())}function s(){u||(u=!0,"function"==typeof e.destroy&&e.destroy())}function a(e){if(l(),0===i.listenerCount(this,"error"))throw e}function l(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),e.removeListener("error",a),c.removeListener("end",l),c.removeListener("close",l),e.removeListener("close",l)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&!1===t.end||(c.on("end",o),c.on("close",s));var u=!1;return c.on("error",a),e.on("error",a),c.on("end",l),c.on("close",l),e.on("close",l),e.emit("pipe",c),e}},{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(e,t,r){(function(t){var n=e("./lib/request"),i=e("./lib/response"),o=e("xtend"),s=e("builtin-status-codes"),a=e("url"),l=r;l.request=function(e,r){e="string"==typeof e?a.parse(e):o(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",s=e.protocol||i,l=e.hostname||e.host,c=e.port,u=e.path||"/";l&&-1!==l.indexOf(":")&&(l="["+l+"]"),e.url=(l?s+"//"+l:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new n(e);return r&&d.on("response",r),d},l.get=function(e,t){var n=l.request(e,t);return n.end(),n},l.ClientRequest=n,l.IncomingMessage=i.IncomingMessage,l.Agent=function(){},l.Agent.defaultMaxSockets=4,l.globalAgent=new l.Agent,l.STATUS_CODES=s,l.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,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(e,t,r){(function(e){"use strict";function t(){if(void 0!==o)return o;if(e.XMLHttpRequest){o=new e.XMLHttpRequest;try{o.open("GET",e.XDomainRequest?"/":"https://example.com")}catch(e){o=null}}else o=null;return o}function n(e){var n=t();if(!n)return!1;try{return n.responseType=e,n.responseType===e}catch(e){}return!1}function i(e){return"function"==typeof e}r.fetch=i(e.fetch)&&i(e.ReadableStream),r.writableStream=i(e.WritableStream),r.abortController=i(e.AbortController),r.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),r.blobConstructor=!0}catch(e){}var o,s=void 0!==e.ArrayBuffer,a=s&&i(e.ArrayBuffer.prototype.slice);r.arraybuffer=r.fetch||s&&n("arraybuffer"),r.msstream=!r.fetch&&a&&n("ms-stream"),r.mozchunkedarraybuffer=!r.fetch&&s&&n("moz-chunked-arraybuffer"),r.overrideMimeType=r.fetch||!!t()&&i(t().overrideMimeType),r.vbArray=i(e.VBArray),o=null}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],198:[function(e,t,r){(function(n,r,i){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/keys")),s=e("./capability"),a=e("inherits"),l=e("./response"),c=e("readable-stream"),u=e("to-arraybuffer"),d=l.IncomingMessage,h=l.readyStates,f=t.exports=function(e){var t=this;c.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+new i(e.auth).toString("base64")),(0,o.default)(e.headers).forEach((function(n){t.setHeader(n,e.headers[n])}));var n,r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!s.abortController)r=!1,n=!0;else if("prefer-streaming"===e.mode)n=!1;else if("allow-wrong-content-type"===e.mode)n=!s.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");n=!0}t._mode=function(e,t){return s.fetch&&t?"fetch":s.mozchunkedarraybuffer?"moz-chunked-arraybuffer":s.msstream?"ms-stream":s.arraybuffer&&e?"arraybuffer":s.vbArray&&e?"text:vbarray":"text"}(n,r),t._fetchTimer=null,t.on("finish",(function(){t._onFinish()}))};a(f,c.Writable),f.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===p.indexOf(n)&&(this._headers[n]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts,a=e._headers,l=null;"GET"!==t.method&&"HEAD"!==t.method&&(l=s.arraybuffer?u(i.concat(e._body)):s.blobConstructor?new r.Blob(e._body.map((function(e){return u(e)})),{type:(a["content-type"]||{}).value||""}):i.concat(e._body).toString());var c=[];if((0,o.default)(a).forEach((function(e){var t=a[e].name,n=a[e].value;Array.isArray(n)?n.forEach((function(e){c.push([t,e])})):c.push([t,n])})),"fetch"===e._mode){var d=null;if(s.abortController){var f=new AbortController;d=f.signal,e._fetchAbortController=f,"requestTimeout"in t&&0!==t.requestTimeout&&(e._fetchTimer=r.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}r.fetch(e._opts.url,{method:e._opts.method,headers:c,body:l||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:d}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){r.clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}else{var p=e._xhr=new r.XMLHttpRequest;try{p.open(e._opts.method,e._opts.url,!0)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}"responseType"in p&&(p.responseType=e._mode.split(":")[0]),"withCredentials"in p&&(p.withCredentials=!!t.withCredentials),"text"===e._mode&&"overrideMimeType"in p&&p.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(p.timeout=t.requestTimeout,p.ontimeout=function(){e.emit("requestTimeout")}),c.forEach((function(e){p.setRequestHeader(e[0],e[1])})),e._response=null,p.onreadystatechange=function(){switch(p.readyState){case h.LOADING:case h.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(p.onprogress=function(){e._onXHRProgress()}),p.onerror=function(){e._destroyed||e.emit("error",new Error("XHR error"))};try{p.send(l)}catch(t){return void n.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new d(e._xhr,e._fetchResponse,e._mode,e._fetchTimer),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,n){this._body.push(e),n()},f.prototype.abort=f.prototype.destroy=function(){var e=this;e._destroyed=!0,r.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},f.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},f.prototype.flushHeaders=function(){},f.prototype.setTimeout=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var p=["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,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("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(e,t,r){(function(t,n,i){"use strict";var o=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/promise")),s=e("./capability"),a=e("inherits"),l=e("readable-stream"),c=r.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=r.IncomingMessage=function(e,r,a,c){var u=this;if(l.Readable.call(u),u._mode=a,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===a){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(e,t){u.headers[t.toLowerCase()]=e,u.rawHeaders.push(t,e)})),s.writableStream){var d=new WritableStream({write:function(e){return new o.default((function(t,n){u._destroyed?n():u.push(new i(e))?t():u._resumeFetch=t}))},close:function(){n.clearTimeout(c),u._destroyed||u.push(null)},abort:function(e){u._destroyed||u.emit("error",e)}});try{return void r.body.pipeTo(d).catch((function(e){n.clearTimeout(c),u._destroyed||u.emit("error",e)}))}catch(e){}}var h=r.body.getReader();!function e(){h.read().then((function(t){if(!u._destroyed){if(t.done)return n.clearTimeout(c),void u.push(null);u.push(new i(t.value)),e()}})).catch((function(e){n.clearTimeout(c),u._destroyed||u.emit("error",e)}))}()}else if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===u.headers[n]&&(u.headers[n]=[]),u.headers[n].push(t[2])):void 0!==u.headers[n]?u.headers[n]+=", "+t[2]:u.headers[n]=t[2],u.rawHeaders.push(t[1],t[2])}})),u._charset="x-user-defined",!s.overrideMimeType){var f=u.rawHeaders["mime-type"];if(f){var p=f.match(/;\s*charset=([^;])(;|$)/);p&&(u._charset=p[1].toLowerCase())}u._charset||(u._charset="utf-8")}};a(u,l.Readable),u.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},u.prototype._onXHRProgress=function(){var e=this,t=e._xhr,r=null;switch(e._mode){case"text:vbarray":if(t.readyState!==c.DONE)break;try{r=new n.VBArray(t.responseBody).toArray()}catch(e){}if(null!==r){e.push(new i(r));break}case"text":try{r=t.responseText}catch(t){e._mode="text:vbarray";break}if(r.length>e._pos){var o=r.substr(e._pos);if("x-user-defined"===e._charset){for(var s=new i(o.length),a=0;a<o.length;a++)s[a]=255&o.charCodeAt(a);e.push(s)}else e.push(o,e._charset);e._pos=r.length}break;case"arraybuffer":if(t.readyState!==c.DONE||!t.response)break;r=t.response,e.push(new i(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=t.response,t.readyState!==c.LOADING||!r)break;e.push(new i(new Uint8Array(r)));break;case"ms-stream":if(r=t.response,t.readyState!==c.LOADING)break;var l=new n.MSStreamReader;l.onprogress=function(){l.result.byteLength>e._pos&&(e.push(new i(new Uint8Array(l.result.slice(e._pos)))),e._pos=l.result.byteLength)},l.onload=function(){e.push(null)},l.readAsArrayBuffer(r)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(e,t,n){"use strict";function r(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(h.isEncoding===f||!f(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=s,this.end=a,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=u,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=h.allocUnsafe(t)}function i(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"锟<>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"锟<>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"锟<>"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function a(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function l(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}var h=e("safe-buffer").Buffer,f=h.isEncoding||function(e){switch((e=""+e)&&e.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}};n.StringDecoder=r,r.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},r.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"锟<>":t},r.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=i(t[r]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--r<n||-2===o?0:(o=i(t[r]))>=0?(o>0&&(e.lastNeed=o-2),o):--r<n||-2===o?0:(o=i(t[r]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},r.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":193}],201:[function(e,t,n){(function(t,r){function i(e,t){this._id=e,this._clearFn=t}var o=e("process/browser.js").nextTick,s=Function.prototype.apply,a=Array.prototype.slice,l={},c=0;n.setTimeout=function(){return new i(s.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new i(s.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=c++,r=!(arguments.length<2)&&a.call(arguments,1);return l[t]=!0,o((function(){l[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete l[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(e,t,n){var r=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(r.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,i=0;i<n;i++)t[i]=e[i];return t.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(e,t,n){"use strict";function r(){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 i(e,t,n){if(e&&s.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}var o=e("punycode"),s=e("./util");n.parse=i,n.resolve=function(e,t){return i(e,!1,!0).resolve(t)},n.resolveObject=function(e,t){return e?i(e,!1,!0).resolveObject(t):t},n.format=function(e){return s.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)},n.Url=r;var a=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,c=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),h=["%","/","?",";","#"].concat(d),f=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=e("querystring");r.prototype.parse=function(e,t,n){if(!s.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=-1!==r&&r<e.indexOf("#")?"?":"#",l=e.split(i);l[0]=l[0].replace(/\\/g,"/");var u=e=l.join(i);if(u=u.trim(),!n&&1===e.split("#").length){var b=c.exec(u);if(b)return this.path=u,this.href=u,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?_.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=a.exec(u);if(x){var w=(x=x[0]).toLowerCase();this.protocol=w,u=u.substr(x.length)}if(n||x||u.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===u.substr(0,2);!S||x&&g[x]||(u=u.substr(2),this.slashes=!0)}if(!g[x]&&(S||x&&!y[x])){for(var C=-1,k=0;k<f.length;k++)-1!==(L=u.indexOf(f[k]))&&(-1===C||L<C)&&(C=L);var E,T;for(-1!==(T=-1===C?u.lastIndexOf("@"):u.lastIndexOf("@",C))&&(E=u.slice(0,T),u=u.slice(T+1),this.auth=decodeURIComponent(E)),C=-1,k=0;k<h.length;k++){var L;-1!==(L=u.indexOf(h[k]))&&(-1===C||L<C)&&(C=L)}-1===C&&(C=u.length),this.host=u.slice(0,C),u=u.slice(C),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var M=this.hostname.split(/\./),D=(k=0,M.length);k<D;k++){var I=M[k];if(I&&!I.match(p)){for(var N="",R=0,O=I.length;R<O;R++)I.charCodeAt(R)>127?N+="x":N+=I[R];if(!N.match(p)){var j=M.slice(0,k),P=M.slice(k+1),B=I.match(m);B&&(j.push(B[1]),P.unshift(B[2])),P.length&&(u="/"+P.join(".")+u),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=o.toASCII(this.hostname));var U=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+U,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==u[0]&&(u="/"+u))}if(!v[w])for(k=0,D=d.length;k<D;k++){var z=d[k];if(-1!==u.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),u=u.split(z).join(H)}}var Z=u.indexOf("#");-1!==Z&&(this.hash=u.substr(Z),u=u.slice(0,Z));var W=u.indexOf("?");if(-1!==W?(this.search=u.substr(W),this.query=u.substr(W+1),t&&(this.query=_.parse(this.query)),u=u.slice(0,W)):t&&(this.search="",this.query={}),u&&(this.pathname=u),y[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var G=this.search||"";this.path=U+G}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&s.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})),t+i+n+(a=a.replace("#","%23"))+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(s.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),o=0;o<i.length;o++){var a=i[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),h=0;h<d.length;h++){var f=d[h];n[f]=e[f]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||g[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",v=n.search||"";n.path=m+v}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var _=n.pathname&&"/"===n.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=b||_||n.host&&e.pathname,w=x,S=n.pathname&&n.pathname.split("/")||[],C=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(C&&(n.hostname="",n.port=null,n.host&&(""===S[0]?S[0]=n.host:S.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),x=x&&(""===p[0]||""===S[0])),b)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,S=p;else if(p.length)S||(S=[]),S.pop(),S=S.concat(p),n.search=e.search,n.query=e.query;else if(!s.isNullOrUndefined(e.search))return C&&(n.hostname=n.host=S.shift(),(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),n.search=e.search,n.query=e.query,s.isNull(n.pathname)&&s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n;if(!S.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var k=S.slice(-1)[0],E=(n.host||e.host||S.length>1)&&("."===k||".."===k)||""===k,T=0,L=S.length;L>=0;L--)"."===(k=S[L])?S.splice(L,1):".."===k?(S.splice(L,1),T++):T&&(S.splice(L,1),T--);if(!x&&!w)for(;T--;T)S.unshift("..");!x||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),E&&"/"!==S.join("/").substr(-1)&&S.push("");var A,M=""===S[0]||S[0]&&"/"===S[0].charAt(0);return C&&(n.hostname=n.host=M?"":S.length?S.shift():"",(A=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=A.shift(),n.host=n.hostname=A.shift())),(x=x||n.host&&S.length)&&!M&&S.unshift(""),S.length?n.pathname=S.join("/"):(n.pathname=null,n.path=null),s.isNull(n.pathname)&&s.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":204,punycode:174,querystring:177}],204:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],205:[function(e,t,r){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],206:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],207:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),h(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),a(n,e,n.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function s(e,t){return e}function a(e,t,n){if(e.customInspect&&t&&x(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return m(i)||(i=a(e,i,n)),i}var o=l(e,t);if(o)return o;var s=Object.keys(t),h=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),b(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return c(t);if(0===s.length){if(x(t)){var f=t.name?": "+t.name:"";return e.stylize("[Function"+f+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(_(t))return e.stylize(Date.prototype.toString.call(t),"date");if(b(t))return c(t)}var p,v="",y=!1,w=["{","}"];return d(t)&&(y=!0,w=["[","]"]),x(t)&&(v=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(v=" "+RegExp.prototype.toString.call(t)),_(t)&&(v=" "+Date.prototype.toUTCString.call(t)),b(t)&&(v=" "+c(t)),0!==s.length||y&&0!=t.length?n<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),p=y?function(e,t,n,r,i){for(var o=[],s=0,a=t.length;s<a;++s)k(t,String(s))?o.push(u(e,t,n,r,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(u(e,t,n,r,i,!0))})),o}(e,t,n,h,s):s.map((function(r){return u(e,t,n,h,r,y)})),e.seen.pop(),function(e,t,n){return e.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(p,v,w)):w[0]+v+w[1]}function l(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return p(t)?e.stylize(""+t,"number"):h(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,n,r,i,o){var s,l,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?l=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(l=e.stylize("[Setter]","special")),k(r,i)||(s="["+i+"]"),l||(e.seen.indexOf(c.value)<0?(l=f(n)?a(e,c.value,null):a(e,c.value,n-1)).indexOf("\n")>-1&&(l=o?l.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+l.split("\n").map((function(e){return" "+e})).join("\n")):l=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return l;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+l}function d(e){return Array.isArray(e)}function h(e){return"boolean"==typeof e}function f(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function g(e){return y(e)&&"[object RegExp]"===w(e)}function y(e){return"object"==typeof e&&null!==e}function _(e){return y(e)&&"[object Date]"===w(e)}function b(e){return y(e)&&("[object Error]"===w(e)||e instanceof Error)}function x(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}function C(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var E=/%[sdj%]/g;r.format=function(e){if(!m(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,o=r.length,s=String(e).replace(E,(function(e){if("%%"===e)return"%";if(n>=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),a=r[n];n<o;a=r[++n])f(a)||!y(a)?s+=" "+a:s+=" "+i(a);return s},r.deprecate=function(e,i){if(v(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var T,L={};r.debuglog=function(e){if(v(T)&&(T=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!L[e])if(new RegExp("\\b"+e+"\\b","i").test(T)){var n=t.pid;L[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else L[e]=function(){};return L[e]},r.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=h,r.isNull=f,r.isNullOrUndefined=function(e){return null==e},r.isNumber=p,r.isString=m,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=g,r.isObject=y,r.isDate=_,r.isError=b,r.isFunction=x,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",C(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!y(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(e,t,n){"use strict";(function(){n.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(void 0)},{}],209:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/helpers/typeof")),o=r(e("babel-runtime/core-js/object/keys"));(function(){var t,r,s,a,l,c={}.hasOwnProperty;t=e("xmlbuilder"),r=e("./defaults").defaults,a=function(e){return"string"==typeof e&&(e.indexOf("&")>=0||e.indexOf(">")>=0||e.indexOf("<")>=0)},l=function(e){return"<![CDATA["+s(e)+"]]>"},s=function(e){return e.replace("]]>","]]]]><![CDATA[>")},n.Builder=function(){function e(e){var t,n,i;for(t in this.options={},n=r[.2])c.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)c.call(e,t)&&(i=e[t],this.options[t]=i)}return e.prototype.buildObject=function(e){var n,s,u,d,h;return n=this.options.attrkey,s=this.options.charkey,1===(0,o.default)(e).length&&this.options.rootName===r[.2].rootName?e=e[h=(0,o.default)(e)[0]]:h=this.options.rootName,u=function(e){return function(t,r){var o,d,h,f,p,m;if("object"!==(void 0===r?"undefined":(0,i.default)(r)))e.options.cdata&&a(r)?t.raw(l(r)):t.txt(r);else if(Array.isArray(r)){for(f in r)if(c.call(r,f))for(p in d=r[f])h=d[p],t=u(t.ele(p),h).up()}else for(p in r)if(c.call(r,p))if(d=r[p],p===n){if("object"===(void 0===d?"undefined":(0,i.default)(d)))for(o in d)m=d[o],t=t.att(o,m)}else if(p===s)t=e.options.cdata&&a(d)?t.raw(l(d)):t.txt(d);else if(Array.isArray(d))for(f in d)c.call(d,f)&&(t="string"==typeof(h=d[f])?e.options.cdata&&a(h)?t.ele(p).raw(l(h)).up():t.ele(p,h).up():u(t.ele(p),h).up());else"object"===(void 0===d?"undefined":(0,i.default)(d))?t=u(t.ele(p),d).up():"string"==typeof d&&e.options.cdata&&a(d)?t=t.ele(p).raw(l(d)).up():(null==d&&(d=""),t=t.ele(p,d.toString()).up());return t}}(this),d=t.create(h,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),u(d,e).end(this.options.renderOpts)},e}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(e,t,n){"use strict";(function(){n.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:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/get-own-property-names")),o=r(e("babel-runtime/core-js/object/keys")),s=r(e("babel-runtime/helpers/typeof"));(function(){var t,r,a,l,c,u,d,h,f=function(e,t){return function(){return e.apply(t,arguments)}},p={}.hasOwnProperty;d=e("sax"),a=e("events"),t=e("./bom"),u=e("./processors"),h=e("timers").setImmediate,r=e("./defaults").defaults,l=function(e){return"object"===(void 0===e?"undefined":(0,s.default)(e))&&null!=e&&0===(0,o.default)(e).length},c=function(e,t,n){var r,i;for(r=0,i=e.length;r<i;r++)t=(0,e[r])(t,n);return t},n.Parser=function(e){function a(e){var t,i,o;if(this.parseString=f(this.parseString,this),this.reset=f(this.reset,this),this.assignOrPush=f(this.assignOrPush,this),this.processAsync=f(this.processAsync,this),!(this instanceof n.Parser))return new n.Parser(e);for(t in this.options={},i=r[.2])p.call(i,t)&&(o=i[t],this.options[t]=o);for(t in e)p.call(e,t)&&(o=e[t],this.options[t]=o);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return function(e,t){function n(){this.constructor=e}for(var r in t)p.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(a,e),a.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),h(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},a.prototype.assignOrPush=function(e,t,n){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(n)):this.options.explicitArray?e[t]=[n]:e[t]=n},a.prototype.reset=function(){var e,t,n,r;return this.removeAllListeners(),this.saxParser=d.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(e){return function(t){if(e.saxParser.resume(),!e.saxParser.errThrown)return e.saxParser.errThrown=!0,e.emit("error",t)}}(this),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var o,s,a,l,u;if((a={})[t]="",!n.options.ignoreAttrs)for(o in u=i.attributes)p.call(u,o)&&(e in a||n.options.mergeAttrs||(a[e]={}),s=n.options.attrValueProcessors?c(n.options.attrValueProcessors,i.attributes[o],o):i.attributes[o],l=n.options.attrNameProcessors?c(n.options.attrNameProcessors,o):o,n.options.mergeAttrs?n.assignOrPush(a,l,s):a[e][l]=s);return a["#name"]=n.options.tagNameProcessors?c(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(a[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(a)}}(this),this.saxParser.onclosetag=function(e){return function(){var n,a,u,d,h,f,m,v,g,y;if(f=r.pop(),h=f["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete f["#name"],!0===f.cdata&&(n=f.cdata,delete f.cdata),g=r[r.length-1],f[t].match(/^\s*$/)&&!n?(a=f[t],delete f[t]):(e.options.trim&&(f[t]=f[t].trim()),e.options.normalize&&(f[t]=f[t].replace(/\s{2,}/g," ").trim()),f[t]=e.options.valueProcessors?c(e.options.valueProcessors,f[t],h):f[t],1===(0,o.default)(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])),l(f)&&(f=""!==e.options.emptyTag?e.options.emptyTag:a),null!=e.options.validator&&(y="/"+function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)d=r[e],n.push(d["#name"]);return n}().concat(h).join("/"),function(){var t;try{f=e.options.validator(y,g&&g[h],f)}catch(n){return t=n,e.emit("error",t)}}()),e.options.explicitChildren&&!e.options.mergeAttrs&&"object"===(void 0===f?"undefined":(0,s.default)(f)))if(e.options.preserveChildrenOrder){if(g){for(u in g[e.options.childkey]=g[e.options.childkey]||[],m={},f)p.call(f,u)&&(m[u]=f[u]);g[e.options.childkey].push(m),delete f["#name"],1===(0,o.default)(f).length&&t in f&&!e.EXPLICIT_CHARKEY&&(f=f[t])}}else d={},e.options.attrkey in f&&(d[e.options.attrkey]=f[e.options.attrkey],delete f[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in f&&(d[e.options.charkey]=f[e.options.charkey],delete f[e.options.charkey]),(0,i.default)(f).length>0&&(d[e.options.childkey]=f),f=d;return r.length>0?e.assignOrPush(g,h,f):(e.options.explicitRoot&&(v=f,(f={})[h]=v),e.resultObject=f,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),n=function(e){return function(n){var i,o;if(o=r[r.length-1])return o[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==n.replace(/\\n/g,"").trim())&&(o[e.options.childkey]=o[e.options.childkey]||[],(i={"#name":"__text__"})[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),o[e.options.childkey].push(i)),o}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){var t;if(t=n(e))return t.cdata=!0}},a.prototype.parseString=function(e,n){var r;null!=n&&"function"==typeof n&&(this.on("end",(function(e){return this.reset(),n(null,e)})),this.on("error",(function(e){return this.reset(),n(e)})));try{return""===(e=e.toString()).trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,h(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},a}(a.EventEmitter),n.parseString=function(e,t,r){var i,o;return null!=r?("function"==typeof r&&(i=r),"object"===(void 0===t?"undefined":(0,s.default)(t))&&(o=t)):("function"==typeof t&&(i=t),o={}),new n.Parser(o).parseString(e,i)}}).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(e,t,n){"use strict";(function(){var e;e=new RegExp(/(?!xmlns)^.*:/),n.normalize=function(e){return e.toLowerCase()},n.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},n.stripPrefix=function(t){return t.replace(e,"")},n.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},n.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(void 0)},{}],213:[function(e,t,n){"use strict";(function(){var t,r,i,o,s={}.hasOwnProperty;r=e("./defaults"),t=e("./builder"),i=e("./parser"),o=e("./processors"),n.defaults=r.defaults,n.processors=o,n.ValidationError=function(e){function t(e){this.message=e}return function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,Error),t}(),n.Builder=t.Builder,n.Parser=i.Parser,n.parseString=i.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=r(e("babel-runtime/core-js/object/get-prototype-of")),o=r(e("babel-runtime/helpers/typeof")),s=r(e("babel-runtime/core-js/object/assign"));(function(){var e,n,r,a,l,c,u=[].slice,d={}.hasOwnProperty;e=function(){var e,t,n,r,i,o;if(o=arguments[0],i=2<=arguments.length?u.call(arguments,1):[],a(s.default))s.default.apply(null,arguments);else for(e=0,n=i.length;e<n;e++)if(null!=(r=i[e]))for(t in r)d.call(r,t)&&(o[t]=r[t]);return o},a=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},l=function(e){var t;return!!e&&("function"===(t=void 0===e?"undefined":(0,o.default)(e))||"object"===t)},n=function(e){return a(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},r=function(e){var t;if(n(e))return!e.length;for(t in e)if(d.call(e,t))return!1;return!0},c=function(e){var t,n;return l(e)&&(n=(0,i.default)(e))&&(t=n.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},t.exports.assign=e,t.exports.isFunction=a,t.exports.isObject=l,t.exports.isArray=n,t.exports.isEmpty=r,t.exports.isPlainObject=c}).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(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){t.exports=function(){function e(e,t,n){if(this.options=e.options,this.stringify=e.stringify,null==t)throw new Error("Missing attribute name of element "+e.name);if(null==n)throw new Error("Missing attribute value for attribute "+t+" of element "+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(n)}return e.prototype.clone=function(){return(0,r.default)(this)},e.prototype.toString=function(e){return this.options.writer.set(e).attribute(this)},e}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).cdata(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing comment text");this.text=this.stringify.comment(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).comment(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r,i,o,s){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name");if(null==r)throw new Error("Missing DTD attribute name");if(!i)throw new Error("Missing DTD attribute type");if(!o)throw new Error("Missing DTD attribute default");if(0!==o.indexOf("#")&&(o="#"+o),!o.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(s&&!o.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(n),this.attributeName=this.stringify.attName(r),this.attributeType=this.stringify.dtdAttType(i),this.defaultValue=this.stringify.dtdAttDefault(s),this.defaultValueType=o}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdAttList(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],219:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing DTD element name");r||(r="(#PCDATA)"),Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.eleName(n),this.value=this.stringify.dtdElementValue(r)}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdElement(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],220:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./Utility").isObject,n=e("./XMLNode"),t.exports=function(e){function t(e,n,i,o){if(t.__super__.constructor.call(this,e),null==i)throw new Error("Missing entity name");if(null==o)throw new Error("Missing entity value");if(this.pe=!!n,this.name=this.stringify.eleName(i),r(o)){if(!o.pubID&&!o.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(o.pubID&&!o.sysID)throw new Error("System identifier is required for a public external entity");if(null!=o.pubID&&(this.pubID=this.stringify.dtdPubID(o.pubID)),null!=o.sysID&&(this.sysID=this.stringify.dtdSysID(o.sysID)),null!=o.nData&&(this.nData=this.stringify.dtdNData(o.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(o)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdEntity(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(e,t,n){"use strict";(function(){var n,r={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing notation name");if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(n),null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return function(e,t){function n(){this.constructor=e}for(var i in t)r.call(t,i)&&(e[i]=t[i]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).dtdNotation(this)},t}(n)}).call(void 0)},{"./XMLNode":227}],222:[function(e,t,n){"use strict";(function(){var n,r,i={}.hasOwnProperty;r=e("./Utility").isObject,n=e("./XMLNode"),t.exports=function(e){function t(e,n,i,o){var s;t.__super__.constructor.call(this,e),r(n)&&(n=(s=n).version,i=s.encoding,o=s.standalone),n||(n="1.0"),this.version=this.stringify.xmlVersion(n),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=o&&(this.standalone=this.stringify.xmlStandalone(o))}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.toString=function(e){return this.options.writer.set(e).declaration(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l={}.hasOwnProperty;a=e("./Utility").isObject,s=e("./XMLNode"),n=e("./XMLDTDAttList"),i=e("./XMLDTDEntity"),r=e("./XMLDTDElement"),o=e("./XMLDTDNotation"),t.exports=function(e){function t(e,n,r){var i,o;t.__super__.constructor.call(this,e),this.documentObject=e,a(n)&&(n=(i=n).pubID,r=i.sysID),null==r&&(r=(o=[n,r])[0],n=o[1]),null!=n&&(this.pubID=this.stringify.dtdPubID(n)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return function(e,t){function n(){this.constructor=e}for(var r in t)l.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.element=function(e,t){var n;return n=new r(this,e,t),this.children.push(n),this},t.prototype.attList=function(e,t,r,i,o){var s;return s=new n(this,e,t,r,i,o),this.children.push(s),this},t.prototype.entity=function(e,t){var n;return n=new i(this,!1,e,t),this.children.push(n),this},t.prototype.pEntity=function(e,t){var n;return n=new i(this,!0,e,t),this.children.push(n),this},t.prototype.notation=function(e,t){var n;return n=new o(this,e,t),this.children.push(n),this},t.prototype.toString=function(e){return this.options.writer.set(e).docType(this)},t.prototype.ele=function(e,t){return this.element(e,t)},t.prototype.att=function(e,t,n,r,i){return this.attList(e,t,n,r,i)},t.prototype.ent=function(e,t){return this.entity(e,t)},t.prototype.pent=function(e,t){return this.pEntity(e,t)},t.prototype.not=function(e,t){return this.notation(e,t)},t.prototype.up=function(){return this.root()||this.documentObject},t}(s)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(e,t,n){"use strict";(function(){var n,r,i,o,s={}.hasOwnProperty;o=e("./Utility").isPlainObject,n=e("./XMLNode"),i=e("./XMLStringifier"),r=e("./XMLStringWriter"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,null),e||(e={}),e.writer||(e.writer=new r),this.options=e,this.stringify=new i(e),this.isDocument=!0}return function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.end=function(e){var t;return e?o(e)&&(t=e,e=this.options.writer.set(t)):e=this.options.writer,e.document(this)},t.prototype.toString=function(e){return this.options.writer.set(e).document(this)},t}(n)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l,c,u,d,h,f,p,m,v,g,y,_,b,x={}.hasOwnProperty;b=e("./Utility"),y=b.isObject,g=b.isFunction,_=b.isPlainObject,d=e("./XMLElement"),r=e("./XMLCData"),i=e("./XMLComment"),f=e("./XMLRaw"),v=e("./XMLText"),h=e("./XMLProcessingInstruction"),c=e("./XMLDeclaration"),u=e("./XMLDocType"),o=e("./XMLDTDAttList"),a=e("./XMLDTDEntity"),s=e("./XMLDTDElement"),l=e("./XMLDTDNotation"),n=e("./XMLAttribute"),m=e("./XMLStringifier"),p=e("./XMLStringWriter"),t.exports=function(){function e(e,t,n){var r;e||(e={}),e.writer?_(e.writer)&&(r=e.writer,e.writer=new p(r)):e.writer=new p(e),this.options=e,this.writer=e.writer,this.stringify=new m(e),this.onDataCallback=t||function(){},this.onEndCallback=n||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return e.prototype.node=function(e,t,n){var r;if(null==e)throw new Error("Missing node name");if(this.root&&-1===this.currentLevel)throw new Error("Document can only have one root node");return this.openCurrent(),e=e.valueOf(),null==t&&(t={}),t=t.valueOf(),y(t)||(n=(r=[t,n])[0],t=r[1]),this.currentNode=new d(this,e,t),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,null!=n&&this.text(n),this},e.prototype.element=function(e,t,n){return this.currentNode&&this.currentNode instanceof u?this.dtdElement.apply(this,arguments):this.node(e,t,n)},e.prototype.attribute=function(e,t){var r,i;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(null!=e&&(e=e.valueOf()),y(e))for(r in e)x.call(e,r)&&(i=e[r],this.attribute(r,i));else g(t)&&(t=t.apply()),this.options.skipNullAttributes&&null==t||(this.currentNode.attributes[e]=new n(this,e,t));return this},e.prototype.text=function(e){var t;return this.openCurrent(),t=new v(this,e),this.onData(this.writer.text(t,this.currentLevel+1)),this},e.prototype.cdata=function(e){var t;return this.openCurrent(),t=new r(this,e),this.onData(this.writer.cdata(t,this.currentLevel+1)),this},e.prototype.comment=function(e){var t;return this.openCurrent(),t=new i(this,e),this.onData(this.writer.comment(t,this.currentLevel+1)),this},e.prototype.raw=function(e){var t;return this.openCurrent(),t=new f(this,e),this.onData(this.writer.raw(t,this.currentLevel+1)),this},e.prototype.instruction=function(e,t){var n,r,i,o,s;if(this.openCurrent(),null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(n=0,o=e.length;n<o;n++)r=e[n],this.instruction(r);else if(y(e))for(r in e)x.call(e,r)&&(i=e[r],this.instruction(r,i));else g(t)&&(t=t.apply()),s=new h(this,e,t),this.onData(this.writer.processingInstruction(s,this.currentLevel+1));return this},e.prototype.declaration=function(e,t,n){var r;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return r=new c(this,e,t,n),this.onData(this.writer.declaration(r,this.currentLevel+1)),this},e.prototype.doctype=function(e,t,n){if(this.openCurrent(),null==e)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new u(this,t,n),this.currentNode.rootNodeName=e,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},e.prototype.dtdElement=function(e,t){var n;return this.openCurrent(),n=new s(this,e,t),this.onData(this.writer.dtdElement(n,this.currentLevel+1)),this},e.prototype.attList=function(e,t,n,r,i){var s;return this.openCurrent(),s=new o(this,e,t,n,r,i),this.onData(this.writer.dtdAttList(s,this.currentLevel+1)),this},e.prototype.entity=function(e,t){var n;return this.openCurrent(),n=new a(this,!1,e,t),this.onData(this.writer.dtdEntity(n,this.currentLevel+1)),this},e.prototype.pEntity=function(e,t){var n;return this.openCurrent(),n=new a(this,!0,e,t),this.onData(this.writer.dtdEntity(n,this.currentLevel+1)),this},e.prototype.notation=function(e,t){var n;return this.openCurrent(),n=new l(this,e,t),this.onData(this.writer.dtdNotation(n,this.currentLevel+1)),this},e.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},e.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},e.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},e.prototype.openNode=function(e){if(!e.isOpen)return!this.root&&0===this.currentLevel&&e instanceof d&&(this.root=e),this.onData(this.writer.openNode(e,this.currentLevel)),e.isOpen=!0},e.prototype.closeNode=function(e){if(!e.isClosed)return this.onData(this.writer.closeNode(e,this.currentLevel)),e.isClosed=!0},e.prototype.onData=function(e){return this.documentStarted=!0,this.onDataCallback(e)},e.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},e.prototype.ele=function(){return this.element.apply(this,arguments)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t,n){return this.doctype(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.att=function(){return this.currentNode&&this.currentNode instanceof u?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.a=function(){return this.currentNode&&this.currentNode instanceof u?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e}()}).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(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i,o,s,a,l={}.hasOwnProperty;a=e("./Utility"),s=a.isObject,o=a.isFunction,i=e("./XMLNode"),n=e("./XMLAttribute"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element name");this.name=this.stringify.eleName(n),this.attributes={},null!=r&&this.attribute(r),e.isDocument&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this)}return function(e,t){function n(){this.constructor=e}for(var r in t)l.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){var e,t,n,i;for(t in(n=(0,r.default)(this)).isRoot&&(n.documentObject=null),n.attributes={},i=this.attributes)l.call(i,t)&&(e=i[t],n.attributes[t]=e.clone());return n.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=n,n.children.push(t)})),n},t.prototype.attribute=function(e,t){var r,i;if(null!=e&&(e=e.valueOf()),s(e))for(r in e)l.call(e,r)&&(i=e[r],this.attribute(r,i));else o(t)&&(t=t.apply()),this.options.skipNullAttributes&&null==t||(this.attributes[e]=new n(this,e,t));return this},t.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error("Missing attribute name");if(e=e.valueOf(),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attributes[t];else delete this.attributes[e];return this},t.prototype.toString=function(e){return this.options.writer.set(e).element(this)},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t}(i)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l,c,u,d,h,f,p={}.hasOwnProperty;f=e("./Utility"),h=f.isObject,d=f.isFunction,u=f.isEmpty,s=null,n=null,r=null,i=null,o=null,l=null,c=null,a=null,t.exports=function(){function t(t){this.parent=t,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],s||(s=e("./XMLElement"),n=e("./XMLCData"),r=e("./XMLComment"),i=e("./XMLDeclaration"),o=e("./XMLDocType"),l=e("./XMLRaw"),c=e("./XMLText"),a=e("./XMLProcessingInstruction"))}return t.prototype.element=function(e,t,n){var r,i,o,s,a,l,c,f,m,v;if(l=null,null==t&&(t={}),t=t.valueOf(),h(t)||(n=(m=[t,n])[0],t=m[1]),null!=e&&(e=e.valueOf()),Array.isArray(e))for(o=0,c=e.length;o<c;o++)i=e[o],l=this.element(i);else if(d(e))l=this.element(e.apply());else if(h(e)){for(a in e)if(p.call(e,a))if(v=e[a],d(v)&&(v=v.apply()),h(v)&&u(v)&&(v=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))l=this.attribute(a.substr(this.stringify.convertAttKey.length),v);else if(!this.options.separateArrayItems&&Array.isArray(v))for(s=0,f=v.length;s<f;s++)i=v[s],(r={})[a]=i,l=this.element(r);else h(v)?(l=this.element(a)).element(v):l=this.element(a,v)}else l=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n);if(null==l)throw new Error("Could not create any elements with: "+e);return l},t.prototype.insertBefore=function(e,t,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,o),r},t.prototype.insertAfter=function(e,t,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level");return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,o),r},t.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element");return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},t.prototype.node=function(e,t,n){var r,i;return null!=e&&(e=e.valueOf()),t||(t={}),t=t.valueOf(),h(t)||(n=(i=[t,n])[0],t=i[1]),r=new s(this,e,t),null!=n&&r.text(n),this.children.push(r),r},t.prototype.text=function(e){var t;return t=new c(this,e),this.children.push(t),this},t.prototype.cdata=function(e){var t;return t=new n(this,e),this.children.push(t),this},t.prototype.comment=function(e){var t;return t=new r(this,e),this.children.push(t),this},t.prototype.commentBefore=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.commentAfter=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},t.prototype.raw=function(e){var t;return t=new l(this,e),this.children.push(t),this},t.prototype.instruction=function(e,t){var n,r,i,o,s;if(null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(o=0,s=e.length;o<s;o++)n=e[o],this.instruction(n);else if(h(e))for(n in e)p.call(e,n)&&(r=e[n],this.instruction(n,r));else d(t)&&(t=t.apply()),i=new a(this,e,t),this.children.push(i);return this},t.prototype.instructionBefore=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.instructionAfter=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},t.prototype.declaration=function(e,t,n){var r,o;return r=this.document(),o=new i(r,e,t,n),r.children[0]instanceof i?r.children[0]=o:r.children.unshift(o),r.root()||r},t.prototype.doctype=function(e,t){var n,r,i,s,a,l,c,u,d;for(n=this.document(),r=new o(n,e,t),i=s=0,l=(u=n.children).length;s<l;i=++s)if(u[i]instanceof o)return n.children[i]=r,r;for(i=a=0,c=(d=n.children).length;a<c;i=++a)if(d[i].isRoot)return n.children.splice(i,0,r),r;return n.children.push(r),r},t.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},t.prototype.root=function(){var e;for(e=this;e;){if(e.isDocument)return e.rootObject;if(e.isRoot)return e;e=e.parent}},t.prototype.document=function(){var e;for(e=this;e;){if(e.isDocument)return e;e=e.parent}},t.prototype.end=function(e){return this.document().end(e)},t.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[e-1]},t.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[e+1]},t.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},t.prototype.ele=function(e,t,n){return this.element(e,t,n)},t.prototype.nod=function(e,t,n){return this.node(e,t,n)},t.prototype.txt=function(e){return this.text(e)},t.prototype.dat=function(e){return this.cdata(e)},t.prototype.com=function(e){return this.comment(e)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.doc=function(){return this.document()},t.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},t.prototype.dtd=function(e,t){return this.doctype(e,t)},t.prototype.e=function(e,t,n){return this.element(e,t,n)},t.prototype.n=function(e,t,n){return this.node(e,t,n)},t.prototype.t=function(e){return this.text(e)},t.prototype.d=function(e){return this.cdata(e)},t.prototype.c=function(e){return this.comment(e)},t.prototype.r=function(e){return this.raw(e)},t.prototype.i=function(e,t){return this.instruction(e,t)},t.prototype.u=function(){return this.up()},t.prototype.importXMLBuilder=function(e){return this.importDocument(e)},t}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n,r){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(n),r&&(this.value=this.stringify.insValue(r))}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).processingInstruction(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing raw text");this.value=this.stringify.raw(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).raw(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l,c,u,d,h,f,p,m={}.hasOwnProperty;l=e("./XMLDeclaration"),c=e("./XMLDocType"),n=e("./XMLCData"),r=e("./XMLComment"),u=e("./XMLElement"),h=e("./XMLRaw"),f=e("./XMLText"),d=e("./XMLProcessingInstruction"),i=e("./XMLDTDAttList"),o=e("./XMLDTDElement"),s=e("./XMLDTDEntity"),a=e("./XMLDTDNotation"),p=e("./XMLWriterBase"),t.exports=function(e){function t(e,n){t.__super__.constructor.call(this,n),this.stream=e}return function(e,t){function n(){this.constructor=e}for(var r in t)m.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.document=function(e){var t,n,i,o,s,a,u,h;for(n=0,o=(a=e.children).length;n<o;n++)(t=a[n]).isLastRootNode=!1;for(e.children[e.children.length-1].isLastRootNode=!0,h=[],i=0,s=(u=e.children).length;i<s;i++)switch(t=u[i],!1){case!(t instanceof l):h.push(this.declaration(t));break;case!(t instanceof c):h.push(this.docType(t));break;case!(t instanceof r):h.push(this.comment(t));break;case!(t instanceof d):h.push(this.processingInstruction(t));break;default:h.push(this.element(t))}return h},t.prototype.attribute=function(e){return this.stream.write(" "+e.name+'="'+e.value+'"')},t.prototype.cdata=function(e,t){return this.stream.write(this.space(t)+"<![CDATA["+e.text+"]]>"+this.endline(e))},t.prototype.comment=function(e,t){return this.stream.write(this.space(t)+"\x3c!-- "+e.text+" --\x3e"+this.endline(e))},t.prototype.declaration=function(e,t){return this.stream.write(this.space(t)),this.stream.write('<?xml version="'+e.version+'"'),null!=e.encoding&&this.stream.write(' encoding="'+e.encoding+'"'),null!=e.standalone&&this.stream.write(' standalone="'+e.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(e))},t.prototype.docType=function(e,t){var l,c,u,h;if(t||(t=0),this.stream.write(this.space(t)),this.stream.write("<!DOCTYPE "+e.root().name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(e)),c=0,u=(h=e.children).length;c<u;c++)switch(l=h[c],!1){case!(l instanceof i):this.dtdAttList(l,t+1);break;case!(l instanceof o):this.dtdElement(l,t+1);break;case!(l instanceof s):this.dtdEntity(l,t+1);break;case!(l instanceof a):this.dtdNotation(l,t+1);break;case!(l instanceof n):this.cdata(l,t+1);break;case!(l instanceof r):this.comment(l,t+1);break;case!(l instanceof d):this.processingInstruction(l,t+1);break;default:throw new Error("Unknown DTD node type: "+l.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(e))},t.prototype.element=function(e,t){var i,o,s,a,l,c,p,v;for(l in t||(t=0),v=this.space(t),this.stream.write(v+"<"+e.name),c=e.attributes)m.call(c,l)&&(i=c[l],this.attribute(i));if(0===e.children.length||e.children.every((function(e){return""===e.value})))this.allowEmpty?this.stream.write("></"+e.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)this.stream.write(">"),this.stream.write(e.children[0].value),this.stream.write("</"+e.name+">");else{for(this.stream.write(">"+this.newline),s=0,a=(p=e.children).length;s<a;s++)switch(o=p[s],!1){case!(o instanceof n):this.cdata(o,t+1);break;case!(o instanceof r):this.comment(o,t+1);break;case!(o instanceof u):this.element(o,t+1);break;case!(o instanceof h):this.raw(o,t+1);break;case!(o instanceof f):this.text(o,t+1);break;case!(o instanceof d):this.processingInstruction(o,t+1);break;default:throw new Error("Unknown XML node type: "+o.constructor.name)}this.stream.write(v+"</"+e.name+">")}return this.stream.write(this.endline(e))},t.prototype.processingInstruction=function(e,t){return this.stream.write(this.space(t)+"<?"+e.target),e.value&&this.stream.write(" "+e.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(e))},t.prototype.raw=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},t.prototype.text=function(e,t){return this.stream.write(this.space(t)+e.value+this.endline(e))},t.prototype.dtdAttList=function(e,t){return this.stream.write(this.space(t)+"<!ATTLIST "+e.elementName+" "+e.attributeName+" "+e.attributeType),"#DEFAULT"!==e.defaultValueType&&this.stream.write(" "+e.defaultValueType),e.defaultValue&&this.stream.write(' "'+e.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdElement=function(e,t){return this.stream.write(this.space(t)+"<!ELEMENT "+e.name+" "+e.value),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdEntity=function(e,t){return this.stream.write(this.space(t)+"<!ENTITY"),e.pe&&this.stream.write(" %"),this.stream.write(" "+e.name),e.value?this.stream.write(' "'+e.value+'"'):(e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),e.nData&&this.stream.write(" NDATA "+e.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.dtdNotation=function(e,t){return this.stream.write(this.space(t)+"<!NOTATION "+e.name),e.pubID&&e.sysID?this.stream.write(' PUBLIC "'+e.pubID+'" "'+e.sysID+'"'):e.pubID?this.stream.write(' PUBLIC "'+e.pubID+'"'):e.sysID&&this.stream.write(' SYSTEM "'+e.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(e))},t.prototype.endline=function(e){return e.isLastRootNode?"":this.newline},t}(p)}).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(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l,c,u,d,h,f,p,m={}.hasOwnProperty;l=e("./XMLDeclaration"),c=e("./XMLDocType"),n=e("./XMLCData"),r=e("./XMLComment"),u=e("./XMLElement"),h=e("./XMLRaw"),f=e("./XMLText"),d=e("./XMLProcessingInstruction"),i=e("./XMLDTDAttList"),o=e("./XMLDTDElement"),s=e("./XMLDTDEntity"),a=e("./XMLDTDNotation"),p=e("./XMLWriterBase"),t.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){function n(){this.constructor=e}for(var r in t)m.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.document=function(e){var t,n,i,o,s;for(this.textispresent=!1,o="",n=0,i=(s=e.children).length;n<i;n++)t=s[n],o+=function(){switch(!1){case!(t instanceof l):return this.declaration(t);case!(t instanceof c):return this.docType(t);case!(t instanceof r):return this.comment(t);case!(t instanceof d):return this.processingInstruction(t);default:return this.element(t,0)}}.call(this);return this.pretty&&o.slice(-this.newline.length)===this.newline&&(o=o.slice(0,-this.newline.length)),o},t.prototype.attribute=function(e){return" "+e.name+'="'+e.value+'"'},t.prototype.cdata=function(e,t){return this.space(t)+"<![CDATA["+e.text+"]]>"+this.newline},t.prototype.comment=function(e,t){return this.space(t)+"\x3c!-- "+e.text+" --\x3e"+this.newline},t.prototype.declaration=function(e,t){var n;return n=this.space(t),n+='<?xml version="'+e.version+'"',null!=e.encoding&&(n+=' encoding="'+e.encoding+'"'),null!=e.standalone&&(n+=' standalone="'+e.standalone+'"'),(n+=this.spacebeforeslash+"?>")+this.newline},t.prototype.docType=function(e,t){var l,c,u,h,f;if(t||(t=0),h=this.space(t),h+="<!DOCTYPE "+e.root().name,e.pubID&&e.sysID?h+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(h+=' SYSTEM "'+e.sysID+'"'),e.children.length>0){for(h+=" [",h+=this.newline,c=0,u=(f=e.children).length;c<u;c++)l=f[c],h+=function(){switch(!1){case!(l instanceof i):return this.dtdAttList(l,t+1);case!(l instanceof o):return this.dtdElement(l,t+1);case!(l instanceof s):return this.dtdEntity(l,t+1);case!(l instanceof a):return this.dtdNotation(l,t+1);case!(l instanceof n):return this.cdata(l,t+1);case!(l instanceof r):return this.comment(l,t+1);case!(l instanceof d):return this.processingInstruction(l,t+1);default:throw new Error("Unknown DTD node type: "+l.constructor.name)}}.call(this);h+="]"}return(h+=this.spacebeforeslash+">")+this.newline},t.prototype.element=function(e,t){var i,o,s,a,l,c,p,v,g,y,_,b,x;for(p in t||(t=0),x=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),v="",v+=(b=this.space(t))+"<"+e.name,g=e.attributes)m.call(g,p)&&(i=g[p],v+=this.attribute(i));if(0===e.children.length||e.children.every((function(e){return""===e.value})))this.allowEmpty?v+="></"+e.name+">"+this.newline:v+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&1===e.children.length&&null!=e.children[0].value)v+=">",v+=e.children[0].value,v+="</"+e.name+">"+this.newline;else{if(this.dontprettytextnodes)for(s=0,l=(y=e.children).length;s<l;s++)if(null!=(o=y[s]).value){this.textispresent++,x=!0;break}for(this.textispresent&&(this.newline="",this.pretty=!1,b=this.space(t)),v+=">"+this.newline,a=0,c=(_=e.children).length;a<c;a++)o=_[a],v+=function(){switch(!1){case!(o instanceof n):return this.cdata(o,t+1);case!(o instanceof r):return this.comment(o,t+1);case!(o instanceof u):return this.element(o,t+1);case!(o instanceof h):return this.raw(o,t+1);case!(o instanceof f):return this.text(o,t+1);case!(o instanceof d):return this.processingInstruction(o,t+1);default:throw new Error("Unknown XML node type: "+o.constructor.name)}}.call(this);x&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),v+=b+"</"+e.name+">"+this.newline}return v},t.prototype.processingInstruction=function(e,t){var n;return n=this.space(t)+"<?"+e.target,e.value&&(n+=" "+e.value),n+(this.spacebeforeslash+"?>")+this.newline},t.prototype.raw=function(e,t){return this.space(t)+e.value+this.newline},t.prototype.text=function(e,t){return this.space(t)+e.value+this.newline},t.prototype.dtdAttList=function(e,t){var n;return n=this.space(t)+"<!ATTLIST "+e.elementName+" "+e.attributeName+" "+e.attributeType,"#DEFAULT"!==e.defaultValueType&&(n+=" "+e.defaultValueType),e.defaultValue&&(n+=' "'+e.defaultValue+'"'),n+(this.spacebeforeslash+">")+this.newline},t.prototype.dtdElement=function(e,t){return this.space(t)+"<!ELEMENT "+e.name+" "+e.value+this.spacebeforeslash+">"+this.newline},t.prototype.dtdEntity=function(e,t){var n;return n=this.space(t)+"<!ENTITY",e.pe&&(n+=" %"),n+=" "+e.name,e.value?n+=' "'+e.value+'"':(e.pubID&&e.sysID?n+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(n+=' SYSTEM "'+e.sysID+'"'),e.nData&&(n+=" NDATA "+e.nData)),n+(this.spacebeforeslash+">")+this.newline},t.prototype.dtdNotation=function(e,t){var n;return n=this.space(t)+"<!NOTATION "+e.name,e.pubID&&e.sysID?n+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.pubID?n+=' PUBLIC "'+e.pubID+'"':e.sysID&&(n+=' SYSTEM "'+e.sysID+'"'),n+(this.spacebeforeslash+">")+this.newline},t.prototype.openNode=function(e,t){var n,r,i,o;if(t||(t=0),e instanceof u){for(r in i=this.space(t)+"<"+e.name,o=e.attributes)m.call(o,r)&&(n=o[r],i+=this.attribute(n));return i+(e.children?">":"/>")+this.newline}return i=this.space(t)+"<!DOCTYPE "+e.rootNodeName,e.pubID&&e.sysID?i+=' PUBLIC "'+e.pubID+'" "'+e.sysID+'"':e.sysID&&(i+=' SYSTEM "'+e.sysID+'"'),i+(e.children?" [":">")+this.newline},t.prototype.closeNode=function(e,t){switch(t||(t=0),!1){case!(e instanceof u):return this.space(t)+"</"+e.name+">"+this.newline;case!(e instanceof c):return this.space(t)+"]>"+this.newline}},t}(p)}).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(e,t,n){"use strict";(function(){var e={}.hasOwnProperty;t.exports=function(){function t(t){var n,r,i;for(n in this.assertLegalChar=function(e,t){return function(){return e.apply(t,arguments)}}(this.assertLegalChar,this),t||(t={}),this.noDoubleEncoding=t.noDoubleEncoding,r=t.stringify||{})e.call(r,n)&&(i=r[n],this[n]=i)}return t.prototype.eleName=function(e){return e=""+e||"",this.assertLegalChar(e)},t.prototype.eleText=function(e){return e=""+e||"",this.assertLegalChar(this.elEscape(e))},t.prototype.cdata=function(e){return e=(e=""+e||"").replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(e)},t.prototype.comment=function(e){if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},t.prototype.raw=function(e){return""+e||""},t.prototype.attName=function(e){return""+e||""},t.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},t.prototype.insTarget=function(e){return""+e||""},t.prototype.insValue=function(e){if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},t.prototype.xmlVersion=function(e){if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},t.prototype.xmlEncoding=function(e){if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return e},t.prototype.xmlStandalone=function(e){return e?"yes":"no"},t.prototype.dtdPubID=function(e){return""+e||""},t.prototype.dtdSysID=function(e){return""+e||""},t.prototype.dtdElementValue=function(e){return""+e||""},t.prototype.dtdAttType=function(e){return""+e||""},t.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},t.prototype.dtdEntityValue=function(e){return""+e||""},t.prototype.dtdNData=function(e){return""+e||""},t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t.prototype.assertLegalChar=function(e){var t;if(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},t.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#xD;")},t.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/\t/g,"&#x9;").replace(/\n/g,"&#xA;").replace(/\r/g,"&#xD;")},t}()}).call(void 0)},{}],233:[function(e,t,n){"use strict";var r=function(e){return e&&e.__esModule?e:{default:e}}(e("babel-runtime/core-js/object/create"));(function(){var n,i={}.hasOwnProperty;n=e("./XMLNode"),t.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error("Missing element text");this.value=this.stringify.eleText(n)}return function(e,t){function n(){this.constructor=e}for(var r in t)i.call(t,r)&&(e[r]=t[r]);n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.clone=function(){return(0,r.default)(this)},t.prototype.toString=function(e){return this.options.writer.set(e).text(this)},t}(n)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(e,t,n){"use strict";(function(){var e={}.hasOwnProperty;t.exports=function(){function t(t){var n,r,i,o,s,a,l,c,u;for(n in t||(t={}),this.pretty=t.pretty||!1,this.allowEmpty=null!=(r=t.allowEmpty)&&r,this.pretty?(this.indent=null!=(i=t.indent)?i:" ",this.newline=null!=(o=t.newline)?o:"\n",this.offset=null!=(s=t.offset)?s:0,this.dontprettytextnodes=null!=(a=t.dontprettytextnodes)?a:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=null!=(l=t.spacebeforeslash)?l:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,c=t.writer||{})e.call(c,n)&&(u=c[n],this[n]=u)}return t.prototype.set=function(t){var n,r,i;for(n in t||(t={}),"pretty"in t&&(this.pretty=t.pretty),"allowEmpty"in t&&(this.allowEmpty=t.allowEmpty),this.pretty?(this.indent="indent"in t?t.indent:" ",this.newline="newline"in t?t.newline:"\n",this.offset="offset"in t?t.offset:0,this.dontprettytextnodes="dontprettytextnodes"in t?t.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in t?t.spacebeforeslash:"",!0===this.spacebeforeslash&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,r=t.writer||{})e.call(r,n)&&(i=r[n],this[n]=i);return this},t.prototype.space=function(e){var t;return this.pretty&&(t=(e||0)+this.offset+1)>0?new Array(t).join(this.indent):""},t}()}).call(void 0)},{}],235:[function(e,t,n){"use strict";(function(){var n,r,i,o,s,a,l;l=e("./Utility"),s=l.assign,a=l.isFunction,n=e("./XMLDocument"),r=e("./XMLDocumentCB"),o=e("./XMLStringWriter"),i=e("./XMLStreamWriter"),t.exports.create=function(e,t,r,i){var o,a;if(null==e)throw new Error("Root element needs a name");return i=s({},t,r,i),a=(o=new n(i)).element(e),i.headless||(o.declaration(i),null==i.pubID&&null==i.sysID||o.doctype(i)),a},t.exports.begin=function(e,t,i){var o;return a(e)&&(t=(o=[e,t])[0],i=o[1],e={}),t?new r(e,t,i):new n(e)},t.exports.stringWriter=function(e){return new o(e)},t.exports.streamWriter=function(e,t){return new i(e,t)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(e,t,n){t.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var i in n)r.call(n,i)&&(e[i]=n[i])}return e};var r=Object.prototype.hasOwnProperty},{}],237:[function(e,t,n){"use strict";function r(e,t){var n=s[e=e||"sha1"],r=[];return n||i("algorithm:",e,"is not yet supported"),{update:function(e){return o.isBuffer(e)||(e=new o(e)),r.push(e),e.length,this},digest:function(e){var i=o.concat(r),s=t?function(e,t,n){o.isBuffer(t)||(t=new o(t)),o.isBuffer(n)||(n=new o(n)),t.length>a?t=e(t):t.length<a&&(t=o.concat([t,l],a));for(var r=new o(a),i=new o(a),s=0;s<a;s++)r[s]=54^t[s],i[s]=92^t[s];var c=e(o.concat([r,n]));return e(o.concat([i,c]))}(n,t,i):n(i);return r=null,e?s.toString(e):s}}}function i(){var e=[].slice.call(arguments).join(" ");throw new Error([e,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}var o=e("buffer").Buffer,s={sha1:e("./sha"),sha256:e("./sha256"),md5:e("./md5")},a=64,l=new o(a);l.fill(0),n.createHash=function(e){return r(e)},n.createHmac=function(e,t){return r(e,t)},function(e,t){for(var n in e)t(e[n])}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],(function(e){n[e]=function(){i("sorry,",e,"is not implemented yet")}}))},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(e,t,n){"use strict";var r=e("buffer").Buffer,i=4,o=new r(i);o.fill(0);var s=8;t.exports={hash:function(e,t,n,a){return r.isBuffer(e)||(e=new r(e)),function(e,t,n){for(var i=new r(t),o=n?i.writeInt32BE:i.writeInt32LE,s=0;s<e.length;s++)o.call(i,e[s],4*s,!0);return i}(t(function(e,t){if(e.length%i!=0){var n=e.length+(i-e.length%i);e=r.concat([e,o],n)}for(var s=[],a=t?e.readInt32BE:e.readInt32LE,l=0;l<e.length;l+=i)s.push(a.call(e,l));return s}(e,a),e.length*s),n,a)}}},{buffer:38}],239:[function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var n=1732584193,r=-271733879,i=-1732584194,u=271733878,d=0;d<e.length;d+=16){var h=n,f=r,p=i,m=u;n=o(n,r,i,u,e[d+0],7,-680876936),u=o(u,n,r,i,e[d+1],12,-389564586),i=o(i,u,n,r,e[d+2],17,606105819),r=o(r,i,u,n,e[d+3],22,-1044525330),n=o(n,r,i,u,e[d+4],7,-176418897),u=o(u,n,r,i,e[d+5],12,1200080426),i=o(i,u,n,r,e[d+6],17,-1473231341),r=o(r,i,u,n,e[d+7],22,-45705983),n=o(n,r,i,u,e[d+8],7,1770035416),u=o(u,n,r,i,e[d+9],12,-1958414417),i=o(i,u,n,r,e[d+10],17,-42063),r=o(r,i,u,n,e[d+11],22,-1990404162),n=o(n,r,i,u,e[d+12],7,1804603682),u=o(u,n,r,i,e[d+13],12,-40341101),i=o(i,u,n,r,e[d+14],17,-1502002290),n=s(n,r=o(r,i,u,n,e[d+15],22,1236535329),i,u,e[d+1],5,-165796510),u=s(u,n,r,i,e[d+6],9,-1069501632),i=s(i,u,n,r,e[d+11],14,643717713),r=s(r,i,u,n,e[d+0],20,-373897302),n=s(n,r,i,u,e[d+5],5,-701558691),u=s(u,n,r,i,e[d+10],9,38016083),i=s(i,u,n,r,e[d+15],14,-660478335),r=s(r,i,u,n,e[d+4],20,-405537848),n=s(n,r,i,u,e[d+9],5,568446438),u=s(u,n,r,i,e[d+14],9,-1019803690),i=s(i,u,n,r,e[d+3],14,-187363961),r=s(r,i,u,n,e[d+8],20,1163531501),n=s(n,r,i,u,e[d+13],5,-1444681467),u=s(u,n,r,i,e[d+2],9,-51403784),i=s(i,u,n,r,e[d+7],14,1735328473),n=a(n,r=s(r,i,u,n,e[d+12],20,-1926607734),i,u,e[d+5],4,-378558),u=a(u,n,r,i,e[d+8],11,-2022574463),i=a(i,u,n,r,e[d+11],16,1839030562),r=a(r,i,u,n,e[d+14],23,-35309556),n=a(n,r,i,u,e[d+1],4,-1530992060),u=a(u,n,r,i,e[d+4],11,1272893353),i=a(i,u,n,r,e[d+7],16,-155497632),r=a(r,i,u,n,e[d+10],23,-1094730640),n=a(n,r,i,u,e[d+13],4,681279174),u=a(u,n,r,i,e[d+0],11,-358537222),i=a(i,u,n,r,e[d+3],16,-722521979),r=a(r,i,u,n,e[d+6],23,76029189),n=a(n,r,i,u,e[d+9],4,-640364487),u=a(u,n,r,i,e[d+12],11,-421815835),i=a(i,u,n,r,e[d+15],16,530742520),n=l(n,r=a(r,i,u,n,e[d+2],23,-995338651),i,u,e[d+0],6,-198630844),u=l(u,n,r,i,e[d+7],10,1126891415),i=l(i,u,n,r,e[d+14],15,-1416354905),r=l(r,i,u,n,e[d+5],21,-57434055),n=l(n,r,i,u,e[d+12],6,1700485571),u=l(u,n,r,i,e[d+3],10,-1894986606),i=l(i,u,n,r,e[d+10],15,-1051523),r=l(r,i,u,n,e[d+1],21,-2054922799),n=l(n,r,i,u,e[d+8],6,1873313359),u=l(u,n,r,i,e[d+15],10,-30611744),i=l(i,u,n,r,e[d+6],15,-1560198380),r=l(r,i,u,n,e[d+13],21,1309151649),n=l(n,r,i,u,e[d+4],6,-145523070),u=l(u,n,r,i,e[d+11],10,-1120210379),i=l(i,u,n,r,e[d+2],15,718787259),r=l(r,i,u,n,e[d+9],21,-343485551),n=c(n,h),r=c(r,f),i=c(i,p),u=c(u,m)}return Array(n,r,i,u)}function i(e,t,n,r,i,o){return c(function(e,t){return e<<t|e>>>32-t}(c(c(t,e),c(r,o)),i),n)}function o(e,t,n,r,o,s,a){return i(t&n|~t&r,e,t,o,s,a)}function s(e,t,n,r,o,s,a){return i(t&r|n&~r,e,t,o,s,a)}function a(e,t,n,r,o,s,a){return i(t^n^r,e,t,o,s,a)}function l(e,t,n,r,o,s,a){return i(n^(t|~r),e,t,o,s,a)}function c(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}var u=e("./helpers");t.exports=function(e){return u.hash(e,r,16)}},{"./helpers":238}],240:[function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n=Array(80),r=1732584193,l=-271733879,c=-1732584194,u=271733878,d=-1009589776,h=0;h<e.length;h+=16){for(var f=r,p=l,m=c,v=u,g=d,y=0;y<80;y++){n[y]=y<16?e[h+y]:a(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var _=s(s(a(r,5),i(y,l,c,u)),s(s(d,n[y]),o(y)));d=u,u=c,c=a(l,30),l=r,r=_}r=s(r,f),l=s(l,p),c=s(c,m),u=s(u,v),d=s(d,g)}return Array(r,l,c,u,d)}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function o(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t){return e<<t|e>>>32-t}var l=e("./helpers");t.exports=function(e){return l.hash(e,r,20,!0)}},{"./helpers":238}],241:[function(e,t,n){"use strict";var r=e("./helpers"),i=function(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},o=function(e,t){return e>>>t|e<<32-t},s=function(e,t){return e>>>t},a=function(e,t,n){return e&t^~e&n},l=function(e,t,n){return e&t^e&n^t&n},c=function(e){return o(e,2)^o(e,13)^o(e,22)},u=function(e){return o(e,6)^o(e,11)^o(e,25)},d=function(e){return o(e,7)^o(e,18)^s(e,3)},h=function(e){return o(e,17)^o(e,19)^s(e,10)},f=function(e,t){var n,r,o,s,f,p,m,v,g,y,_=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),b=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var w=0;w<e.length;w+=16){n=b[0],r=b[1],o=b[2],s=b[3],f=b[4],p=b[5],m=b[6],v=b[7];for(var S=0;S<64;S++)x[S]=S<16?e[S+w]:i(i(i(h(x[S-2]),x[S-7]),d(x[S-15])),x[S-16]),g=i(i(i(i(v,u(f)),a(f,p,m)),_[S]),x[S]),y=i(c(n),l(n,r,o)),v=m,m=p,p=f,f=i(s,g),s=o,o=r,r=n,n=i(g,y);b[0]=i(n,b[0]),b[1]=i(r,b[1]),b[2]=i(o,b[2]),b[3]=i(s,b[3]),b[4]=i(f,b[4]),b[5]=i(p,b[5]),b[6]=i(m,b[6]),b[7]=i(v,b[7])}return b};t.exports=function(e){return r.hash(e,f,32,!0)}},{"./helpers":238}],242:[function(e,t,r){(function(n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}var o=i(e("babel-runtime/core-js/object/create")),s=i(e("babel-runtime/helpers/classCallCheck")),a=i(e("babel-runtime/helpers/createClass")),l=i(e("babel-runtime/helpers/typeof"));!function(e){"object"===(void 0===r?"undefined":(0,l.default)(r))&&void 0!==t?t.exports=e():("undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:this).mime=e()}((function(){return function t(n,r,i){function o(a,l){if(!r[a]){if(!n[a]){var c="function"==typeof e&&e;if(!l&&c)return c(a,!0);if(s)return s(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var d=r[a]={exports:{}};n[a][0].call(d.exports,(function(e){return o(n[a][1][e]||e)}),d,d.exports,t,n,r,i)}return r[a].exports}for(var s="function"==typeof e&&e,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(e,t,n){var r=function(){function e(){(0,s.default)(this,e),this._types=(0,o.default)(null),this._extensions=(0,o.default)(null);for(var t=0;t<arguments.length;t++)this.define(arguments[t])}return(0,a.default)(e,[{key:"define",value:function(e,t){for(var n in e){for(var r=e[n],i=0;i<r.length;i++){var o=r[i];if(!t&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+n+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+n+'".');this._types[o]=n}!t&&this._extensions[n]||(this._extensions[n]=r[0])}}},{key:"getType",value:function(e){var t=(e=String(e)).replace(/^.*[\/\\]/,"").toLowerCase(),n=t.replace(/^.*\./,"").toLowerCase(),r=t.length<e.length;return(n.length<t.length-1||!r)&&this._types[n]||null}},{key:"getExtension",value:function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null}}]),e}();t.exports=r},{}],2:[function(e,t,n){var r=e("./Mime");t.exports=new r(e("./types/standard"),e("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(e,t,n){t.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(e,t,n){t.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,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?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(e,t,n){"use strict";n.encodeURIComponent=function(e){try{return encodeURIComponent(e)}catch(t){return e}},n.escape=e("escape-html"),n.timestamp=function(e){if(e){var t=e;return"string"==typeof t&&(t=Number(t)),10===String(e).length&&(t*=1e3),new Date(t)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(e,t,n){(function(t,r){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return void 0===e?t:e}function s(e,t){return function(n,r,i){if(n)return t(n);e({data:r,status:i.statusCode,headers:i.headers,res:i})}}var a,l=i(e("babel-runtime/core-js/json/stringify")),c=i(e("babel-runtime/helpers/typeof")),u=e("util"),d=e("url"),h=e("http"),f=e("https"),p=e("debug")("urllib"),m=e("humanize-ms"),v=0,g=Math.pow(2,31)-10,y=/^https?:\/\//i;n.TIMEOUTS=[m("300s"),m("300s")];var _=["json","text"];n.request=function(t,r,i){return 2===arguments.length&&"function"==typeof r&&(i=r,r=null),"function"==typeof i?n.requestWithCallback(t,r,i):(a||(a=e("any-promise")),new a((function(e,i){n.requestWithCallback(t,r,s(e,i))})))},n.requestWithCallback=function(i,s,a){function b(){K&&(clearTimeout(K),K=null)}function x(){Y&&(clearTimeout(Y),Y=null)}function w(e,r,o){if(x(),!a)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),A,t.pid,B.method,i),void(e&&console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s: %s\nstack: %s",Date(),A,t.pid,e.name,e.message,e.stack));var c=a;a=null;var u={};if(o&&(ee=o.statusCode,u=o.headers),401===ee&&u["www-authenticate"]&&(!s.headers||!s.headers.Authorization)&&s.digestAuth){var d=u["www-authenticate"];if(d.indexOf("Digest ")>=0)return p("Request#%d %s: got digest auth header WWW-Authenticate: %s",A,i,d),s.headers=s.headers||{},s.headers.Authorization=digestAuthHeader(B.method,B.path,d,s.digestAuth),p("Request#%d %s: auth with digest header: %s",A,i,s.headers.Authorization),o.headers["set-cookie"]&&(s.headers.Cookie=o.headers["set-cookie"].join(";")),n.requestWithCallback(i,s,c)}var h=Date.now()-I;ie&&(ie.contentDownload=h),p("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",h,$,ee,B.method,B.host,B.path,Q,ie);var f={status:ee,statusCode:ee,headers:u,size:$,aborted:te,rt:h,keepAliveSocket:Q,data:r,requestUrls:s.requestUrls,timing:ie,remoteAddress:ne,remotePort:re};if(e){var m="";j&&"function"==typeof j.getCurrentStatus&&(m=", agent status: "+(0,l.default)(j.getCurrentStatus())),e.message+=", "+B.method+" "+i+" "+ee+" (connected: "+J+", keepalive socket: "+Q+m+")\nheaders: "+(0,l.default)(u),e.data=r,e.path=B.path,e.status=ee,e.headers=u,e.res=f}c(e,r,s.streaming?o:f),s.emitter&&(M.url=i,M.socket=ae&&ae.connection,M.options=B,M.size=q,s.emitter.emit("response",{requestId:A,error:e,ctx:s.ctx,req:M,res:f}))}function S(e){var t=null;if(s.followRedirect&&statuses.redirect[e.statusCode]){s._followRedirectCount=(s._followRedirectCount||0)+1;var r=e.headers.location;if(r){if(!(s._followRedirectCount>s.maxRedirects)){var o=s.formatRedirectUrl?s.formatRedirectUrl(i,r):d.resolve(i,r);p("Request#%d %s: `redirected` from %s to %s",A,B.path,i,o),x(),s.headers&&s.headers.Host&&y.test(r)&&(s.headers.Host=null);var l=a;return a=null,n.requestWithCallback(o,s,l),{redirect:!0,error:null}}(t=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+i)).name="MaxRedirectError"}else(t=new Error("Got statusCode "+e.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:t}}function C(e,t,n){return n(null,t,e.headers["content-encoding"])}function k(e){var t;if(ie&&(ie.waiting=Date.now()-I),p("Request#%d %s `req response` event emit: status %d, headers: %j",A,i,e.statusCode,e.headers),s.streaming)return(t=S(e)).redirect?void e.resume():t.error?(e.resume(),w(t.error,null,e)):w(null,null,e);if(e.on("close",(function(){p("Request#%d %s: `res close` event emit, total size %d",A,i,$)})),e.on("error",(function(){p("Request#%d %s: `res error` event emit, total size %d",A,i,$)})),e.on("aborted",(function(){te=!0,p("Request#%d %s: `res aborted` event emit, total size %d",A,i,$)})),le)return(t=S(e)).redirect?void e.resume():t.error?(e.resume(),le.end(),w(t.error,null,e)):(!1===s.consumeWriteStream?e.on("end",w.bind(null,null,null,e)):isNode010||isNode012?first([[le,"close"],[e,"aborted"]],(function(t,n,r){p("Request#%d %s: writeStream or res %s event emitted",A,i,r),w(X||null,null,e)})):le.on("close",(function(){p("Request#%d %s: writeStream close event emitted",A,i),w(X||null,null,e)})),e.pipe(le));var n=[];e.on("data",(function(e){p("Request#%d %s: `res data` event emit, size %d",A,i,e.length),$+=e.length,n.push(e)})),e.on("end",(function(){var t=r.concat(n,$);if(p("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",A,i,$,e._dumped),X)return w(X,t,e);var o=S(e);if(o.error)return w(o.error,t,e);o.redirect||C(e,t,(function(n,r,o){if(n)return w(n,t,e);if(!o&&_.indexOf(s.dataType)>=0){try{r=decodeBodyByCharset(r,e)}catch(t){return p("decodeBodyByCharset error: %s",t),w(null,r,e)}if("json"===s.dataType)if(0===$)r=null;else{var a=parseJSON(r,P);a.error?n=a.error:r=a.data}}te&&p("Request#%d %s: Remote socket was terminated before `response.end()` was called",A,i),w(n,r,e)}))}))}function E(){p("Response timer ticking, timeout: %d",se),Y=setTimeout((function(){Y=null;var e="Response timeout for "+se+"ms";(X=new Error(e)).name="ResponseTimeoutError",X.requestId=A,p("ResponseTimeout: Request#%d %s %s: %s, connected: %s",A,i,X.name,e,J),T()}),se)}function T(){p("Request#%d %s abort, connected: %s",A,i,J),ae.socket||(X.noSocket=!0,w(X)),ae.abort()}if(!i||"string"!=typeof i&&"object"!==(void 0===i?"undefined":(0,c.default)(i))){var L=u.format("expect request url to be a string or a http request options, but got %j",i);throw new Error(L)}2===arguments.length&&"function"==typeof s&&(a=s,s=null),v>=g&&(v=0);var A=++v;(s=s||{}).requestUrls=s.requestUrls||[];var M={requestId:A,url:i,args:s,ctx:s.ctx};s.emitter&&s.emitter.emit("request",M),s.timeout=s.timeout||n.TIMEOUTS,s.maxRedirects=s.maxRedirects||10,s.streaming=s.streaming||s.customResponse;var D,I=Date.now();"string"==typeof i?(y.test(i)||(i="http://"+i),D=d.parse(i)):D=i;var N=(s.type||s.method||D.method||"GET").toUpperCase(),R=D.port||80,O=h,j=o(s.agent,n.agent),P=s.fixJSONCtlChars;"https:"===D.protocol&&(O=f,j=o(s.httpsAgent,n.httpsAgent),D.port||(R=443));var B={host:D.hostname||D.host||"localhost",path:D.path||"/",method:N,port:R,agent:j,headers:s.headers||{},lookup:s.lookup};Array.isArray(s.timeout)?B.requestTimeout=s.timeout[s.timeout.length-1]:void 0!==s.timeout&&(B.requestTimeout=s.timeout);for(var U=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],F=0;F<U.length;F++){var z=U[F];s.hasOwnProperty(z)&&(B[z]=s[z])}!1!==B.rejectUnauthorized||B.hasOwnProperty("secureOptions")||(B.secureOptions=e("constants").SSL_OP_NO_TLSv1_2);var H=s.auth||D.auth;H&&(B.auth=H);var Z=s.content||s.data,W="GET"===N||"HEAD"===N||s.dataAsQueryString;if(!s.content&&Z&&"string"!=typeof Z&&!r.isBuffer(Z))if(W)Z=s.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z);else{var G=B.headers["Content-Type"]||B.headers["content-type"];G||(G="json"===s.contentType?"application/json":"application/x-www-form-urlencoded",B.headers["Content-Type"]=G),Z="application/json"===parseContentType(G).type?(0,l.default)(Z):s.nestedQuerystring?qs.stringify(Z):querystring.stringify(Z)}W&&Z&&(B.path+=(D.query?"&":"?")+Z,Z=null);var q=0;if(Z){var V=Z.length;r.isBuffer(Z)||(V=r.byteLength(Z)),q=B.headers["Content-Length"]=V}"json"===s.dataType&&(B.headers.Accept="application/json"),"function"==typeof s.beforeRequest&&s.beforeRequest(B);var K=null,Y=null,X=null,J=!1,Q=!1,$=0,ee=-1,te=!1,ne="",re="",ie=null;s.timing&&(ie={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),B.headers["User-Agent"]||B.headers["user-agent"]||(B.headers["User-Agent"]=navigator.userAgent),s.gzip&&(B.headers["Accept-Encoding"]||B.headers["accept-encoding"]||(B.headers["Accept-Encoding"]="gzip"));var oe,se,ae,le=s.writeStream;p("Request#%d %s %s with headers %j, options.path: %s",A,N,i,B.headers,B.path),s.requestUrls.push(i),Array.isArray(s.timeout)?(oe=m(s.timeout[0]),se=m(s.timeout[1])):oe=se=m(s.timeout),p("ConnectTimeout: %d, ResponseTimeout: %d",oe,se);try{ae=O.request(B,k)}catch(e){return w(e)}return"undefined"==typeof window?(p("Connect timer ticking, timeout: %d",oe),K=setTimeout((function(){K=null,-1===ee&&(ee=-2);var e="Connect timeout for "+oe+"ms",t="ConnectionTimeoutError";ae.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),(X=new Error(e)).name=t,X.requestId=A,p("ConnectTimeout: Request#%d %s %s: %s, connected: %s",A,i,X.name,e,J),T()}),oe)):ae.on("requestTimeout",(function(){-1===ee&&(ee=-2),(X=new Error("Connect timeout for "+oe+"ms")).name="ConnectionTimeoutError",X.requestId=A,T()})),ie&&ae.on("finish",(function(){ie.requestSent=Date.now()-I})),ae.once("socket",(function(e){ie&&(ie.queuing=Date.now()-I),isNode010&&e.socket&&(e=e.socket);var t=e.readyState;if("opening"===t)return e.once("lookup",(function(e,t,n){p("Request#%d %s lookup: %s, %s, %s",A,i,e,t,n),ie&&(ie.dnslookup=Date.now()-I),t&&(ne=t)})),void e.once("connect",(function(){ie&&(ie.connected=Date.now()-I),b(),E(),p("Request#%d %s new socket connected",A,i),J=!0,ne||(ne=e.remoteAddress),re=e.remotePort}));p("Request#%d %s reuse socket connected, readyState: %s",A,i,t),J=!0,Q=!0,ne||(ne=e.remoteAddress),re=e.remotePort,b(),E()})),ae.on("error",(function(e){"Error"!==e.name&&"TypeError"!==e.name||(e.name=J?"ResponseError":"RequestError"),e.message+=' (req "error")',p("Request#%d %s `req error` event emit, %s: %s",A,i,e.name,e.message),w(X||e)})),le&&le.once("error",(function(e){e.message+=' (writeStream "error")',X=e,p("Request#%d %s `writeStream error` event emit, %s: %s",A,i,e.name,e.message),T()})),s.stream?(s.stream.pipe(ae),s.stream.once("error",(function(e){e.message+=' (stream "error")',X=e,p("Request#%d %s `readStream error` event emit, %s: %s",A,i,e.name,e.message),T()}))):ae.end(Z),ae.requestId=A,ae}}).call(this,e("_process"),e("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)},window.OSS=r(),e.exports=r(),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=12)}([function(e,t,n){e.exports=function(){var e=e||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},s=i.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n,r=[],i=0;i<t;i+=4){var o=function(t){var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(t=18e3*(65535&t)+(t>>16)&r)&r;return i/=4294967296,(i+=.5)*(e.random()>.5?1:-1)}}(4294967296*(n||e.random()));n=987654071*o(),r.push(4294967296*o()|0)}return new s.init(r,t)}}),a=r.enc={},l=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new s.init(n,t/2)}},c=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new s.init(n,t)}},u=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},d=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new s.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,a=i/(4*o),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*o,c=e.min(4*l,i);if(l){for(var u=0;u<l;u+=o)this._doProcessBlock(r,u);var d=r.splice(0,l);n.sigBytes-=c}return new s.init(d,c)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),h=(i.Hasher=d.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new h.HMAC.init(e,n).finalize(t)}}}),r.algo={});return r}(Math);return e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"detectIEVersion",value:function(){for(var e=4,t=document.createElement("div"),n=t.getElementsByTagName("i");t.innerHTML="\x3c!--[if gt IE "+e+"]><i></i><![endif]--\x3e",n[0];)e++;return e>4&&e}},{key:"extend",value:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&t[n]&&(e[n]=t[n])}},{key:"isArray",value:function(e){return"[object Array]"===Object.prototype.toString.call(arg)}},{key:"getFileType",value:function(e){return e=e.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(e)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(e)?"audio":/.bmp|.jpg|.jpeg|.png/.test(e)?"img":"other"}},{key:"isImage",value:function(e){return e=e.toLowerCase(),!!/.jpg|.jpeg|.png/.test(e)}},{key:"ISODateString",value:function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(e){return!!/^\d+$/.test(e)}}]),e}();t.default=i},function(e,t,n){e.exports=function(e){return function(t){function n(e,t,n,r,i,o,s){var a=e+(t&n|~t&r)+i+s;return(a<<o|a>>>32-o)+t}function r(e,t,n,r,i,o,s){var a=e+(t&r|n&~r)+i+s;return(a<<o|a>>>32-o)+t}function i(e,t,n,r,i,o,s){var a=e+(t^n^r)+i+s;return(a<<o|a>>>32-o)+t}function o(e,t,n,r,i,o,s){var a=e+(n^(t|~r))+i+s;return(a<<o|a>>>32-o)+t}var s=e,a=s.lib,l=a.WordArray,c=a.Hasher,u=s.algo,d=[];!function(){for(var e=0;e<64;e++)d[e]=4294967296*t.abs(t.sin(e+1))|0}();var h=u.MD5=c.extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var s=0;s<16;s++){var a=t+s,l=e[a];e[a]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var c=this._hash.words,u=e[t+0],h=e[t+1],f=e[t+2],p=e[t+3],m=e[t+4],v=e[t+5],g=e[t+6],y=e[t+7],_=e[t+8],b=e[t+9],x=e[t+10],w=e[t+11],S=e[t+12],C=e[t+13],k=e[t+14],E=e[t+15],T=c[0],L=c[1],A=c[2],M=c[3];T=n(T,L,A,M,u,7,d[0]),M=n(M,T,L,A,h,12,d[1]),A=n(A,M,T,L,f,17,d[2]),L=n(L,A,M,T,p,22,d[3]),T=n(T,L,A,M,m,7,d[4]),M=n(M,T,L,A,v,12,d[5]),A=n(A,M,T,L,g,17,d[6]),L=n(L,A,M,T,y,22,d[7]),T=n(T,L,A,M,_,7,d[8]),M=n(M,T,L,A,b,12,d[9]),A=n(A,M,T,L,x,17,d[10]),L=n(L,A,M,T,w,22,d[11]),T=n(T,L,A,M,S,7,d[12]),M=n(M,T,L,A,C,12,d[13]),A=n(A,M,T,L,k,17,d[14]),T=r(T,L=n(L,A,M,T,E,22,d[15]),A,M,h,5,d[16]),M=r(M,T,L,A,g,9,d[17]),A=r(A,M,T,L,w,14,d[18]),L=r(L,A,M,T,u,20,d[19]),T=r(T,L,A,M,v,5,d[20]),M=r(M,T,L,A,x,9,d[21]),A=r(A,M,T,L,E,14,d[22]),L=r(L,A,M,T,m,20,d[23]),T=r(T,L,A,M,b,5,d[24]),M=r(M,T,L,A,k,9,d[25]),A=r(A,M,T,L,p,14,d[26]),L=r(L,A,M,T,_,20,d[27]),T=r(T,L,A,M,C,5,d[28]),M=r(M,T,L,A,f,9,d[29]),A=r(A,M,T,L,y,14,d[30]),T=i(T,L=r(L,A,M,T,S,20,d[31]),A,M,v,4,d[32]),M=i(M,T,L,A,_,11,d[33]),A=i(A,M,T,L,w,16,d[34]),L=i(L,A,M,T,k,23,d[35]),T=i(T,L,A,M,h,4,d[36]),M=i(M,T,L,A,m,11,d[37]),A=i(A,M,T,L,y,16,d[38]),L=i(L,A,M,T,x,23,d[39]),T=i(T,L,A,M,C,4,d[40]),M=i(M,T,L,A,u,11,d[41]),A=i(A,M,T,L,p,16,d[42]),L=i(L,A,M,T,g,23,d[43]),T=i(T,L,A,M,b,4,d[44]),M=i(M,T,L,A,S,11,d[45]),A=i(A,M,T,L,E,16,d[46]),T=o(T,L=i(L,A,M,T,f,23,d[47]),A,M,u,6,d[48]),M=o(M,T,L,A,y,10,d[49]),A=o(A,M,T,L,k,15,d[50]),L=o(L,A,M,T,v,21,d[51]),T=o(T,L,A,M,S,6,d[52]),M=o(M,T,L,A,p,10,d[53]),A=o(A,M,T,L,x,15,d[54]),L=o(L,A,M,T,h,21,d[55]),T=o(T,L,A,M,_,6,d[56]),M=o(M,T,L,A,E,10,d[57]),A=o(A,M,T,L,g,15,d[58]),L=o(L,A,M,T,C,21,d[59]),T=o(T,L,A,M,m,6,d[60]),M=o(M,T,L,A,w,10,d[61]),A=o(A,M,T,L,f,15,d[62]),L=o(L,A,M,T,b,21,d[63]),c[0]=c[0]+T|0,c[1]=c[1]+L|0,c[2]=c[2]+A|0,c[3]=c[3]+M|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,l=a.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}});s.MD5=c._createHelper(h),s.HmacMD5=c._createHmacHelper(h)}(Math),e.MD5}(n(0))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},t.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},t.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(n(5)),s=r(n(25)),a=r(n(6)),l=r(n(7)),c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=l.default.os.name,r=l.default.os.version||"",i=l.default.browser.name,s=l.default.browser.version||"",c=window.location.href,u="";c&&(u=l.default.getHost(c));var d="pc";l.default.os.ipad?d="pad":(l.default.os.iphone||l.default.os.android)&&(d="phone"),this._ri=o.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:a.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:e.getUuid(),os:n,ov:r,et:i,ev:s,uat:navigator.userAgent,app_n:u,tt:d,dm:"h5",ut:""}}return i(e,[{key:"log",value:function(e,t){t&&t.ri?(this._ri=t.ri,delete t.ri):this._ri=o.default.create(),t&&t.ut&&(this.initParam.ut=t.ut,delete t.ut),this.initParam.t=(new Date).getTime(),this.initParam.ll="20006"==e?"error":"info",this.initParam.ri=this._ri,this.initParam.e=e;var n=[];if(t)for(var r in t)n.push(r+"="+t[r]);var i=n.join("&");this.initParam.args=encodeURIComponent(""==i?"0":i);var s=[];for(var r in this.initParam)s.push(r+"="+this.initParam[r]);var a=s.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(a):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+a}}],[{key:"getUuid",value:function(){var e=s.default.get("p_h5_upload_u");return e||(e=o.default.create(),s.default.set("p_h5_upload_u",e,730)),e}},{key:"getClientId",value:function(){return s.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(e){return e||(e=o.default.create()),s.default.set("p_h5_upload_clientId",e,730),e}}]),e}();t.default=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"create",value:function(e,t){var n,r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[];if(t=t||i.length,e)for(n=0;n<e;n++)o[n]=i[0|Math.random()*t];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",n=0;n<36;n++)o[n]||(r=0|16*Math.random(),o[n]=i[19==n?3&r|8:r]);return o.join("")}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default={version:"1.5.0"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(e){var t=navigator.userAgent.toLowerCase();return e.chrome?"Chrome":e.firefox?"Firefox":e.safari?"Safari":e.webview?"webview":e.ie?/edge/.test(t)?"Edge":"IE":/baiduspider/.test(t)?"Baiduspider":/ucweb/.test(t)||/UCBrowser/.test(t)?"UC":/opera/.test(t)?"Opera":/ucweb/.test(t)?"UC":/360se/.test(t)?"360浏览器":/bidubrowser/.test(t)?"百度浏览器":/metasr/.test(t)?"搜狗浏览器":/lbbrowser/.test(t)?"猎豹浏览器":/micromessenger/.test(t)?"微信内置浏览器":/qqbrowser/.test(t)?"QQ浏览器":/playstation/.test(t)?"PS4浏览器":void 0},o=function(){var e={},t={},n=navigator.userAgent,r=navigator.platform,o=n.match(/Web[kK]it[\/]{0,1}([\d.]+)/),s=n.match(/(Android);?[\s\/]+([\d.]+)?/),a=!!n.match(/\(Macintosh\; Intel /),l=n.match(/(iPad).*OS\s([\d_]+)/),c=n.match(/(iPod)(.*OS\s([\d_]+))?/),u=!l&&n.match(/(iPhone\sOS)\s([\d_]+)/),d=n.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),h=/Win\d{2}|Windows/.test(r),f=n.match(/Windows Phone ([\d.]+)/),p=d&&n.match(/TouchPad/),m=n.match(/Kindle\/([\d.]+)/),v=n.match(/Silk\/([\d._]+)/),g=n.match(/(BlackBerry).*Version\/([\d.]+)/),y=n.match(/(BB10).*Version\/([\d.]+)/),_=n.match(/(RIM\sTablet\sOS)\s([\d.]+)/),b=n.match(/PlayBook/),x=n.match(/Chrome\/([\d.]+)/)||n.match(/CriOS\/([\d.]+)/),w=n.match(/Firefox\/([\d.]+)/),S=n.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),C=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),k=!x&&n.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),E=k||n.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((t.webkit=!!o)&&(t.version=o[1]),s&&(e.android=!0,e.version=s[2]),u&&!c&&(e.ios=e.iphone=!0,e.version=u[2].replace(/_/g,".")),l&&(e.ios=e.ipad=!0,e.version=l[2].replace(/_/g,".")),c&&(e.ios=e.ipod=!0,e.version=c[3]?c[3].replace(/_/g,"."):null),f&&(e.wp=!0,e.version=f[1]),d&&(e.webos=!0,e.version=d[2]),p&&(e.touchpad=!0),g&&(e.blackberry=!0,e.version=g[2]),y&&(e.bb10=!0,e.version=y[2]),_&&(e.rimtabletos=!0,e.version=_[2]),b&&(t.playbook=!0),m&&(e.kindle=!0,e.version=m[1]),v&&(t.silk=!0,t.version=v[1]),!v&&e.android&&n.match(/Kindle Fire/)&&(t.silk=!0),x&&(t.chrome=!0,t.version=x[1]),w&&(t.firefox=!0,t.version=w[1]),S&&(e.firefoxos=!0,e.version=S[1]),C&&(t.ie=!0,t.version=C[1]),E&&(a||e.ios||h||s)&&(t.safari=!0,e.ios||(t.version=E[1])),k&&(t.webview=!0),a){var T=n.match(/[\d]*_[\d]*_[\d]*/);T&&T.length>0&&T[0]&&(e.version=T[0].replace(/_/g,"."))}return e.tablet=!!(l||b||s&&!n.match(/Mobile/)||w&&n.match(/Tablet/)||C&&!n.match(/Phone/)&&n.match(/Touch/)),e.phone=!(e.tablet||e.ipod||!(s||u||d||g||y||x&&n.match(/Android/)||x&&n.match(/CriOS\/([\d.]+)/)||w&&n.match(/Mobile/)||C&&n.match(/Touch/))),e.pc=!e.tablet&&!e.phone,a?e.name="macOS":h?(e.name="windows",e.version=function(){var e=navigator.userAgent,t="";return(e.indexOf("Windows NT 5.0")>-1||e.indexOf("Windows 2000")>-1)&&(t="2000"),(e.indexOf("Windows NT 5.1")>-1||e.indexOf("Windows XP")>-1)&&(t="XP"),(e.indexOf("Windows NT 5.2")>-1||e.indexOf("Windows 2003")>-1)&&(t="2003"),(e.indexOf("Windows NT 6.0")>-1||e.indexOf("Windows Vista")>-1)&&(t="Vista"),(e.indexOf("Windows NT 6.1")>-1||e.indexOf("Windows 7")>-1)&&(t="7"),(e.indexOf("Windows NT 6.2")>-1||e.indexOf("Windows 8")>-1)&&(t="8"),(e.indexOf("Windows NT 6.3")>-1||e.indexOf("Windows 8.1")>-1)&&(t="8.1"),(e.indexOf("Windows NT 10")>-1||e.indexOf("Windows 10")>-1)&&(t="10"),t}()):e.name=function(e){var t=navigator.userAgent,n="other";if(e.ios)return"iOS";if(e.android)return"android";if(t.indexOf("Baiduspider")>-1)return"Baiduspider";if(t.indexOf("PlayStation")>-1)return"PS4";var r="Win32"==navigator.platform||"Windows"==navigator.platform||t.indexOf("Windows")>-1,i="Mac68K"==navigator.platform||"MacPPC"==navigator.platform||"Macintosh"==navigator.platform||"MacIntel"==navigator.platform;return i&&(n="macOS"),"X11"==navigator.platform&&!r&&!i&&(n="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(n="Linux"),r?"windows":n}(e),t.name=i(t),{os:e,browser:t}}(),s=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getHost",value:function(e){var t="";if(void 0===e||null==e||""==e)return"";var n=e.indexOf("//"),r=e;n>-1&&(r=e.substring(n+2));t=r;var i=r.split("/");return i&&i.length>0&&(t=i[0]),(i=t.split(":"))&&i.length>0&&(t=i[0]),t}},{key:"os",get:function(){return o.os}},{key:"browser",get:function(){var e=o.browser;return e.name||(e.name=i()),e}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"get",value:function(e,t,n,r,i){var o;n=n||function(){},"undefined"==typeof XMLHttpRequest&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw new Error("This browser does not support XMLHttpRequest.")}),(o=new XMLHttpRequest).onreadystatechange=function(){4===o.readyState&&(200===o.status?t(o.responseText):n(o.responseText))};try{void 0===r&&(r=!0),o.open("GET",e,r),i&&(o.withCredentials=!0)}catch(e){return void n(e)}try{o.send()}catch(e){n(e)}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(27),o=n(30),s=(n(10),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"randomUUID",value:function(){for(var e=[],t="0123456789abcdef",n=0;n<36;n++)e[n]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}},{key:"aliyunEncodeURI",value:function(e){var t=encodeURIComponent(e);return t.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(t,n,r){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");var i=[];for(var o in t)i.push(o);var s=i.sort(),a="",l=s.length;for(o=0;o<l;o++){var c=e.aliyunEncodeURI(s[o]),u=e.aliyunEncodeURI(t[s[o]]);""==a?a=c+n+u:a+=r+c+n+u}return a}},{key:"makeChangeSiga",value:function(t,n){if(!t)throw new Error("PrismPlayer Error: vid should not be null!");return o.stringify(i("GET&"+e.aliyunEncodeURI("/")+"&"+e.aliyunEncodeURI(e.makeUTF8sort(t,"=","&")),n+"&"))}}]),e}());t.default=s},function(e,t,n){e.exports=function(e){return e.enc.Utf8}(n(0))},function(e,t,n){e.exports=function(e){return e.enc.Hex}(n(0))},function(e,t,n){e.exports=n(13)},function(t,n,r){"use strict";var i,o=function(e){return e&&e.__esModule?e:{default:e}}(("function"==typeof Symbol&&Symbol.iterator,r(14))),s={Vod:o.default};void 0!==(i=function(){return s}.apply(n,[]))&&(t.exports=i),window.AliyunUpload=s,e.exports=AliyunUpload},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(15),s=n(3),a=r(n(16)),l=r(n(18)),c=r(n(24)),u=r(n(4)),d=r(n(1)),h=r(n(5)),f=r(n(26)),p=r(n(31)),m=r(n(32)),v=(n(2),function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=t,this.options.partSize=this.options.partSize||s.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||s.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,void 0===this.options.enableUploadProgress&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=o.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new u.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=o.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return i(e,[{key:"init",value:function(e,t,n,r){return this._retryCount=0,!(n&&!r||!n&&r||e&&!t||!e&&t||(this._ossCreditor.accessKeyId=e,this._ossCreditor.accessKeySecret=t,this._ossCreditor.securityToken=n,this._ossCreditor.expireTime=r,0))}},{key:"addFile",value:function(e,t,n,r,i,s){if(!e)return!1;if(0==e.size)try{this.options.onUploadFailed({file:e},"EmptyFile","文件大小为0不能上传")}catch(e){console.log(e)}for(var a=(this.options,0);a<this._uploadList.length;a++)if(this._uploadList[a].file==e)return!1;var c=new Object;if(c.file=e,c._endpoint=t,c._bucket=n,c._object=r,c.state=o.UPLOADSTATE.INIT,c.isImage=d.default.isImage(e.name),!c.isImage&&this.options.enableUploadProgress){var u=this;m.default.getMd5(e,(function(e){c.fileHash=e;var t=u._getCheckoutpoint(c);u.options.localCheckpoint||t||u._getCheckoutpointFromCloud(c,(function(e){if(e.UploadPoint){var t=JSON.parse(e.UploadPoint);1!=t.loaded&&(c.checkpoint=t.checkpoint,c.loaded=t.loaded,c.videoId=e.VideoId,u._saveCheckoutpoint(c,t.checkpoint))}}),(function(e){try{if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){u._invalidUserId=!0;var t=e.Message+"正确账号ID(userId)请参考https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}catch(e){console.log(e)}}))}))}i&&(c.videoInfo=i?JSON.parse(i).Vod:{},c.userData=l.default.encode(i)),c.ri=h.default.create(),this._uploadList.push(c),this._reportLog("20001",c,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(c)}catch(e){console.log(e)}return!0}},{key:"deleteFile",value:function(e){return!!this.cancelFile(e)&&(this._uploadList.splice(e,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(e){if(this.options,e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];if(e==this._curIndex&&t.state==o.UPLOADSTATE.UPLOADING){t.state=o.UPLOADSTATE.CANCELED;var n=this._getCheckoutpoint(t);n&&n.checkpoint&&(n=n.checkpoint),n&&this._ossUpload.abort(t),this._removeCheckoutpoint(t),this.nextUpload()}else t.state!=o.UPLOADSTATE.SUCCESS&&(t.state=o.UPLOADSTATE.CANCELED);return this._reportLog("20008",t),!0}},{key:"resumeFile",value:function(e){if(this.options,e<0||e>=this._uploadList.length)return!1;var t=this._uploadList[e];return t.state==o.UPLOADSTATE.CANCELED&&(t.state=o.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(e){return this._getCheckoutpoint({file:e})}},{key:"startUpload",value:function(e){if(this._retryCount=0,this.options,this._state!=o.VODSTATE.START&&this._state!=o.VODSTATE.EXPIRE)if(this._initState(),this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t),this._state=o.VODSTATE.START}else this._state=o.VODSTATE.END;else console.log("already started or expired")}},{key:"nextUpload",value:function(){var e=this.options;if(this._state==o.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),-1!=this._curIndex){var t=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(t)}else{this._state=o.VODSTATE.END;try{e.onUploadEnd&&e.onUploadEnd(t)}catch(e){console.log(e)}}}},{key:"clear",value:function(e){for(var t=this.options,n=0,r=0;r<this._uploadList.length;r++)t.uploadList[r].state==o.UPLOADSTATE.SUCCESS&&n++,this._uploadList[r].state==e&&(t.uploadList.splice(r,1),r--);t.onClear&&t.onClear(t.uploadList.length,n)}},{key:"stopUpload",value:function(){if((this._state==o.VODSTATE.START||this._state==o.VODSTATE.FAILURE||-1==this._curIndex)&&-1!=this._curIndex){var e=this._uploadList[this._curIndex];this._state=o.VODSTATE.STOP,e.state=o.UPLOADSTATE.STOPED,this._changeState(e,o.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(e){if(!e)return!1;var t=JSON.parse(l.default.decode(e));return!!(t.AccessKeyId&&t.AccessKeySecret&&t.SecurityToken&&t.Expiration)&&this.resumeUploadWithToken(t.AccessKeyId,t.AccessKeySecret,t.SecurityToken,t.Expiration)}},{key:"resumeUploadWithToken",value:function(e,t,n,r){if(this.options,!(e&&t&&n&&r))return!1;if(this._state!=o.VODSTATE.EXPIRE)return!1;if(-1==this._curIndex)return!1;var i="";return this._uploadList.length>this._curIndex&&(i=this._uploadList[this._curIndex]),i&&(this.init(e,t,n,r),this._state=o.VODSTATE.START,this._ossUpload=null,this._uploadCore(i,i.retry),i.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(e,t,n){if(-1==this._curIndex)return!1;if(this._state!=o.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var r=this._uploadList[this._curIndex];r.object?this._refreshSTSTokenUpload(r,e,t,n):this.setSTSToken(r,e,t,n)}}},{key:"setSTSTokenDirectlyUpload",value:function(e,t,n,r,i){if(!(t&&n&&r&&i))return console.log("accessKeyId、ccessKeySecret、securityToken and expiration should not be empty."),!1;this._ut="oss";var o=e;this.init(t,n,r,i),o.endpoint=o._endpoint,o.bucket=o._bucket,o.object=o._object,this._ossUpload=null,this._uploadCore(o,e.retry),e.retry=!1}},{key:"setSTSToken",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var i=e.videoInfo,s={accessKeyId:t,securityToken:r,accessKeySecret:n,fileName:e.file.name,title:i.Title,requestId:e.ri,region:this.options.region};i.ImageType&&(s.imageType=i.ImageType),i.ImageExt&&(s.imageExt=i.ImageExt),i.FileSize&&(s.fileSize=i.FileSize),i.Description&&(s.description=i.Description),i.CateId&&(s.cateId=i.CateId),i.Tags&&(s.tags=i.Tags),i.TemplateGroupId&&(s.templateGroupId=i.TemplateGroupId),i.StorageLocation&&(s.storageLocation=i.StorageLocation),i.CoverURL&&(s.coverUrl=i.CoverURL),i.TransCodeMode&&(s.transCodeMode=i.TransCodeMode),i.UserData&&(s.userData=i.UserData);var a=this,l="getUploadAuth";e.videoId?(s.videoId=e.videoId,l="refreshUploadAuth"):e.isImage&&(l="getImageUploadAuth"),f.default[l](s,(function(t){e.videoId=t.VideoId?t.VideoId:e.videoId,a.setUploadAuthAndAddress(e,t.UploadAuth,t.UploadAddress),a._state=o.VODSTATE.START}),(function(t){a._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})}))}},{key:"setUploadAuthAndAddress",value:function(e,t,n,r){if(!e||!t||!n)return!1;var i=JSON.parse(l.default.decode(t));if(!(i.AccessKeyId&&i.AccessKeySecret&&i.SecurityToken&&i.Expiration))return console.error("uploadauth is invalid"),!1;var o={},s=e;if(n){if(!(o=JSON.parse(l.default.decode(n))).Endpoint||!o.Bucket||!o.FileName)return console.error("uploadAddress is invalid"),!1}else o.Endpoint=s.endpoint,o.Bucket=s.bucket,o.FileName=s.object;this._ut="vod",this._uploadWay="vod",this.options.region=i.Region||this.options.region,this.init(i.AccessKeyId,i.AccessKeySecret,i.SecurityToken,i.Expiration),s.endpoint=s._endpoint?s._endpoint:o.Endpoint,s.bucket=s._bucket?s._bucket:o.Bucket,s.object=s._object?s._object:o.FileName,s.region=this.options.region,r&&(s.videoId=r),this._ossUpload=null,this._uploadCore(s,e.retry),e.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(e,t,n,r){if(!t||!n||!r)return console.log("accessKeyId、ccessKeySecret、securityToken should not be empty."),!1;var i={accessKeyId:t,securityToken:r,accessKeySecret:n,videoId:e.object,requestId:e.ri,region:this.options.region},s=this,a="refreshUploadAuth";e.isImage&&(a="getImageUploadAuth"),f.default[a](i,(function(t){s.setUploadAuthAndAddress(e,t.UploadAuth,UploadAddress),s._state=o.VODSTATE.START}),(function(t){s._error(e,{name:t.Code,code:t.Code,message:t.Message,requestId:t.RequestId})}))}},{key:"_upload",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.options;if(e.retry=t,n.onUploadstarted&&!t)try{var r=this._getCheckoutpoint(e);r&&r.state!=o.UPLOADSTATE.UPLOADING&&(e.checkpoint=r,e.videoId=r.videoId),n.onUploadstarted(e)}catch(e){console.log(e)}}},{key:"_uploadCore",value:function(e){if(!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId、AccessKeySecret、securityToken should not be null");if(e.state=o.UPLOADSTATE.UPLOADING,!this._ossUpload){e.endpoint=e.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var t=this;this._ossUpload=new a.default({bucket:e.bucket,endpoint:e.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(e,n){t._error.call(t,e,n)},oncomplete:function(e,n){t._complete.call(t,e,n)},onprogress:function(e,n,r){t._progress.call(t,e,n,r)}})}var n=d.default.getFileType(e.file.name),r=this._getCheckoutpoint(e),i="",s="";r&&r.checkpoint&&(s=r.state,i=r.videoId,r=r.checkpoint),r&&i==e.videoId&&s!=o.UPLOADSTATE.UPLOADING&&(r.file=e.file,e.checkpoint=r,r.uploadId);var l=this._adjustPartSize(e);this._reportLog("20002",e,{ft:n,fs:e.file.size,bu:e.bucket,ok:e.object,vid:e.videoId||"",fn:e.file.name,fw:null,fh:null,ps:l});var c={headers:{"x-oss-notification":e.userData?e.userData:""},partSize:l,parallel:this.options.parallel};this._ossUpload.upload(e,c)}},{key:"_findUploadIndex",value:function(){for(var e=-1,t=0;t<this._uploadList.length;t++)if(this._uploadList[t].state==o.UPLOADSTATE.INIT){e=t;break}return e}},{key:"_error",value:function(e,t){if("cancel"==t.name)try{this.options.onUploadCanceled(e,t)}catch(e){console.log(e)}else{if(t.message.indexOf("InvalidAccessKeyIdError")>0||"SignatureDoesNotMatchError"==t.name||"SecurityTokenExpired"==t.code||"InvalidSecurityToken.Expired"==t.code||"InvalidAccessKeyId"==t.code&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=o.VODSTATE.EXPIRE,e.state=o.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(e,t)}catch(e){console.log(e)}}return}if(("RequestTimeoutError"==t.name||"ConnectionTimeout"==t.name||"ConnectionTimeoutError"==t.name)&&this._retryTotal>this._retryCount){var n=this;return setTimeout((function(){n._uploadCore(e,!0)}),1e3*n._retryDuration),void this._retryCount++}"NoSuchUploadError"==t.name&&this._removeCheckoutpoint(e),this._handleError(e,t)}}},{key:"_handleError",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=o.UPLOADSTATE.FAIlURE;if(e.state!=o.UPLOADSTATE.CANCELED&&(e.state=o.UPLOADSTATE.FAIlURE,this._state=o.VODSTATE.FAILURE,this.options.onUploadFailed&&t&&t.code&&t.message))try{this.options.onUploadFailed(e,t.code,t.message)}catch(e){console.log(e)}if(n&&this._changeState(e,r),this._reportLog("20006",e,{code:t.name,message:t.message,requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),this._reportLog("20004",e,{requestId:t.requestId,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),e.ri=h.default.create(),-1!=this._findUploadIndex()){var i=this;this._state=o.VODSTATE.START,setTimeout((function(){i.nextUpload()}),100)}}},{key:"_complete",value:function(e,t){if(e.state=o.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(e)}catch(e){console.log(e)}var n=0;t&&t.res&&t.res.headers&&(n=t.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(e);var r=this;setTimeout((function(){r.nextUpload()}),100),this._retryCount=0,this._reportLog("20003",e,{requestId:n})}},{key:"_progress",value:function(e,t,n){if(this.options.onUploadProgress)try{e.loaded=t.loaded,this.options.onUploadProgress(e,t.total,t.loaded)}catch(e){console.log(e)}var r=t.checkpoint,i=0;r&&(e.checkpoint=r,this._saveCheckoutpoint(e,r,o.UPLOADSTATE.UPLOADING),i=r.uploadId),this._retryCount=0;var s=this._getPortNumber(r),a=0;if(n&&n.headers&&(a=n.headers["x-oss-request-id"]),0!=t.loaded&&this._reportLog("20007",e,{pn:s,requestId:a}),1!=t.loaded&&this._reportLog("20005",e,{UploadId:i,pn:s+1,pr:e.retry?1:0,fs:e.file.size,bu:e.bucket,ok:e.object,fn:e.file.name}),!this._invalidUserId&&!e.isImage&&"vod"==this._ut&&this.options.enableUploadProgress){var l={file:e.file,checkpoint:t,userId:this.options.userId,videoId:e.videoId,region:this.options.region,fileHash:e.fileHash};try{var c=this;p.default.upload(l,(function(){}),(function(e){if((e=JSON.parse(e))&&"InvalidParameter"==e.Code&&e.Message.indexOf("UserId")>0){c._invalidUserId=!0;var t=e.Message+"正确账号ID(userId)请参考https://help.aliyun.com/knowledge_detail/37196.html";console.log(t)}}))}catch(e){console.log(e)}}}},{key:"_getPortNumber",value:function(e){if(e){var t=e.doneParts;if(t&&t.length>0)return t[t.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e);c.default.remove(t)}},{key:"_getCheckoutpoint",value:function(e){var t=this._getCheckoutpointKey(e),n=c.default.get(t);if(n)try{return JSON.parse(n)}catch(e){}return""}},{key:"_saveCheckoutpoint",value:function(e,t,n){if(t){var r=this._getCheckoutpointKey(e),i=e.file,o={fileName:i.name,lastModified:i.lastModified,size:i.size,object:e.object,videoId:e.videoId,bucket:e.bucket,endpoint:e.endpoint,checkpoint:t,loaded:e.loaded,state:n};c.default.set(r,JSON.stringify(o))}}},{key:"_changeState",value:function(e,t){var n=this._getCheckoutpoint(e);n&&((this._onbeforeunload=!0)&&(t=o.UPLOADSTATE.STOPED),this._saveCheckoutpoint(e,n.checkpoint,t))}},{key:"_getCheckoutpointKey",value:function(e){return"upload_"+e.file.lastModified+"_"+e.file.name+"_"+e.file.size}},{key:"_getCheckoutpointFromCloud",value:function(e,t,n){var r={userId:this.options.userId,uploadInfoList:[{FileName:e.file.name,FileSize:e.file.size,FileCreateTime:e.file.lastModified,FileHash:e.fileHash}],region:this.options.region};p.default.get(r,(function(e){t(e)}),n)}},{key:"_reportLog",value:function(e,t,n){n||(n={}),n.ri=t.ri,this._ut&&(n.ut=this._ut),this._log.log(e,n)}},{key:"_initEvent",value:function(){var e=this;window&&(window.onbeforeunload=function(t){if(e._onbeforeunload=!0,-1!=e._curIndex&&e._uploadList.length>e._curIndex){var n=e._uploadList[e._curIndex];e._changeState(n,o.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var e=0;e<this._uploadList.length;e++){var t=this._uploadList[e];t.state!=o.UPLOADSTATE.FAIlURE&&t.state!=o.UPLOADSTATE.STOPED||(t.state=o.UPLOADSTATE.INIT)}this._state=o.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(e){return e.file.size/this.options.partSize>1e4?e.file.size/9999:this.options.partSize}}]),e}());t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},t.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=n(3),s=(r(n(17)),n(1)),a=(r(s),function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t){this._config=t,this.create(this._config),this._uploadInfo=null,this._callback={};var r=function(){};this._callback.onerror=n.onerror||r,this._callback.oncomplete=n.oncomplete||r,this._callback.onprogress=n.onprogress||r}}return i(e,[{key:"create",value:function(e){if(e.endpoint=e.endpoint||this._config.endpoint,e.bucket=e.bucket||this._config.bucket,!(e.AccessKeyId&&e.AccessKeySecret&&e.endpoint&&e.SecurityToken))throw new Error("AccessKeyId、AccessKeySecret、endpoint should not be null");var t={accessKeyId:e.AccessKeyId,accessKeySecret:e.AccessKeySecret,stsToken:e.SecurityToken,endpoint:e.endpoint||this._config.endpoint,bucket:e.bucket||this._config.bucket,secure:!0,cname:e.cname};e.timeout&&(t.timeout=e.timeout),this.oss=new OSS.Wrapper(t)}},{key:"abort",value:function(e){if(e.checkpoint){var t=e.checkpoint.uploadId;this.oss.abortMultipartUpload(e.object,t)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(e,t){this._uploadInfo=e;var n=this,r={parallel:t.parallel||this._config.parallel||o.UPLOADDEFAULT.PARALLEL,partSize:t.partSize||this._config.partSize||o.UPLOADDEFAULT.PARTSIZE,progress:function(e,t,r){return function(i){n._progress(e,t,r),i()}}};t.headers&&(r.headers=t.headers),e.checkpoint&&(r.checkpoint=e.checkpoint),e.bucket||(this.oss.options.bucket=e.bucket),e.endpoint||(this.oss.options.endpoint=e.endpoint),this.oss.multipartUpload(e.object,e.file,r).then((function(e,t){n._complete(e)})).catch((function(e){n.oss.cancel&&(n.oss&&n.oss.isCancel()?console.log("oss is cancel as error"):n.oss.cancel()),n._error(e)}))}},{key:"header",value:function(e,t,n){this.oss.get(e.object).then((function(e){t(e)})).catch((function(e){n(e)}))}},{key:"_progress",value:function(e,t,n){this._callback.onprogress(this._uploadInfo,{loaded:e,total:this._uploadInfo.file.size,checkpoint:t},n)}},{key:"_error",value:function(e){this._callback.onerror(this._uploadInfo,e)}},{key:"_complete",value:function(e){this._callback.oncomplete(this._uploadInfo,e)}}]),e}());t.default=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"format",value:function(e){if(arguments.length<2)return null;for(var t=arguments[1],n=1;n<arguments.length;n++){var r=new RegExp("\\{"+(n-1)+"\\}","gm");t=t.replace(r,arguments[n+1])}return{code:e,message:t}}},{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:"参数 {0} 不能为空。",STSInvalid:"STS参数非法 accessKeyId、accessKeySecret、secretToken、expireTime都不能为空。",ReadFileError:"读取文件{0}{1}失败.",FILEDUPLICATION:"文件重复添加 {0}",UploadALEADRYSTARTED:"重复开始."}}}]),e}();t.default=i},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"encode",value:function(t){return new e(t).toString("base64")}},{key:"decode",value:function(t){return new e(t,"base64").toString()}}]),t}();t.default=r}).call(t,n(19).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=o.prototype:(null===e&&(e=new o(t)),e.length=t),e}function o(e,t,n){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,t,n)}function s(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),o.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=o.prototype):e=c(e,t),e}(e,t,n,r):"string"==typeof t?function(e,t,n){if("string"==typeof n&&""!==n||(n="utf8"),!o.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n);e=i(e,r);var s=e.write(t,n);return s!==r&&(e=e.slice(0,s)),e}(e,t,n):function(e,t){if(o.isBuffer(t)){var n=0|u(t.length);return 0===(e=i(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||function(e){return e!=e}(t.length)?i(e,0):c(e,t);if("Buffer"===t.type&&z(t.data))return c(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(a(t),e=i(e,t<0?0:0|u(t)),!o.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function c(e,t){var n=t.length<0?0:0|u(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function u(e){if(e>=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function d(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return P(e).length;default:if(r)return j(e).length;t=(""+t).toLowerCase(),r=!0}}function h(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function p(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=o.from(t,r)),o.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var s,a=1,l=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,l/=2,c/=2,n/=2}if(i){var u=-1;for(s=n;s<l;s++)if(o(e,s)===o(t,-1===u?0:s-u)){if(-1===u&&(u=s),s-u+1===c)return u*a}else-1!==u&&(s-=s-u),u=-1}else for(n+c>l&&(n=l-c),s=n;s>=0;s--){for(var d=!0,h=0;h<c;h++)if(o(e,s+h)!==o(t,h)){d=!1;break}if(d)return s}return-1}function v(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function g(e,t,n,r){return B(j(t,e.length-n),e,n,r)}function y(e,t,n,r){return B(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function _(e,t,n,r){return y(e,t,n,r)}function b(e,t,n,r){return B(P(t),e,n,r)}function x(e,t,n,r){return B(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?U.fromByteArray(e):U.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,l,c=e[i],u=null,d=c>239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=H)return String.fromCharCode.apply(String,e);for(var n="",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=H));return n}(r)}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function E(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=O(e[o]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function A(e,t,n,r,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function M(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,i){return i||I(e,0,n,4),F.write(e,t,n,r,23,4),n+4}function R(e,t,n,r,i){return i||I(e,0,n,8),F.write(e,t,n,r,52,8),n+8}function O(e){return e<16?"0"+e.toString(16):e.toString(16)}function j(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function P(e){return U.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}var U=n(21),F=n(22),z=n(23);t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return function(e,t,n,r){return a(t),t<=0?i(e,t):void 0!==n?"string"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}(null,e,t,n)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,s=Math.min(n,r);i<s;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},o.isEncoding=function(e){switch(String(e).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}},o.concat=function(e,t){if(!z(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=o.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},o.byteLength=d,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)f(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)f(this,t,t+3),f(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)f(this,t,t+7),f(this,t+1,t+6),f(this,t+2,t+5),f(this,t+3,t+4);return this},o.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):h.apply(this,arguments)},o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},o.prototype.compare=function(e,t,n,r,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),l=Math.min(s,a),c=this.slice(r,i),u=e.slice(t,n),d=0;d<l;++d)if(c[d]!==u[d]){s=c[d],a=u[d];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},o.prototype.indexOf=function(e,t,n){return p(this,e,t,n,!0)},o.prototype.lastIndexOf=function(e,t,n){return p(this,e,t,n,!1)},o.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return g(this,e,t,n);case"ascii":return y(this,e,t,n);case"latin1":case"binary":return _(this,e,t,n);case"base64":return b(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var H=4096;o.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),o.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=o.prototype;else{var i=t-e;n=new o(i,void 0);for(var s=0;s<i;++s)n[s]=this[s+e]}return n},o.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},o.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},o.prototype.readUInt8=function(e,t){return t||L(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||L(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||L(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},o.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||L(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){t||L(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||L(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||L(e,4,this.length),F.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||L(e,4,this.length),F.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||L(e,8,this.length),F.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||L(e,8,this.length),F.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},o.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||A(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);A(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):M(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||A(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,s=r-n;if(this===e&&n<t&&t<r)for(i=s-1;i>=0;--i)e[i+t]=this[i+n];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<s;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+s),t);return s},o.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!o.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var a=o.isBuffer(e)?e:j(new o(e,r).toString()),l=a.length;for(s=0;s<n-t;++s)this[s+t]=a[s%l]}return this};var Z=/[^+\/0-9A-Za-z-_]/g}).call(t,n(20))},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return s[e>>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}function o(e,t,n){for(var r,o=[],s=t;s<n;s+=3)r=(e[s]<<16)+(e[s+1]<<8)+e[s+2],o.push(i(r));return o.join("")}t.byteLength=function(e){return 3*e.length/4-r(e)},t.toByteArray=function(e){var t,n,i,o,s,c=e.length;o=r(e),s=new l(3*c/4-o),n=o>0?c-4:c;var u=0;for(t=0;t<n;t+=4)i=a[e.charCodeAt(t)]<<18|a[e.charCodeAt(t+1)]<<12|a[e.charCodeAt(t+2)]<<6|a[e.charCodeAt(t+3)],s[u++]=i>>16&255,s[u++]=i>>8&255,s[u++]=255&i;return 2===o?(i=a[e.charCodeAt(t)]<<2|a[e.charCodeAt(t+1)]>>4,s[u++]=255&i):1===o&&(i=a[e.charCodeAt(t)]<<10|a[e.charCodeAt(t+1)]<<4|a[e.charCodeAt(t+2)]>>2,s[u++]=i>>8&255,s[u++]=255&i),s},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i="",a=[],l=0,c=n-r;l<c;l+=16383)a.push(o(e,l,l+16383>c?c:l+16383));return 1===r?(t=e[n-1],i+=s[t>>2],i+=s[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=s[t>>10],i+=s[t>>4&63],i+=s[t<<2&63],i+="="),a.push(i),a.join("")};for(var s=[],a=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,d=c.length;u<d;++u)s[u]=c[u],a[c.charCodeAt(u)]=u;a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<<a)-1,c=l>>1,u=-7,d=n?i-1:0,h=n?-1:1,f=e[t+d];for(d+=h,o=f&(1<<-u)-1,f>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=c}return(f?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<<c)-1,d=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+f]=255&s,f+=p,s/=256,c-=8);e[n+f-p]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"set",value:function(e,t){try{window.localStorage&&localStorage.setItem(e,t)}catch(n){window[e+"_localStorage"]=t}}},{key:"get",value:function(e){try{if(window.localStorage)return localStorage.getItem(e)}catch(t){return window[e+"_localStorage"]}return""}},{key:"remove",value:function(e){try{window.localStorage&&localStorage.removeItem(e)}catch(t){delete window[e+"_localStorage"]}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"get",value:function(e){for(var t=e+"",n=document.cookie.split(";"),r=0;r<n.length;r++){var i=n[r].trim();if(0==i.indexOf(t))return unescape(i.substring(t.length+1,i.length))}return""}},{key:"set",value:function(e,t,n){var r=new Date;r.setTime(r.getTime()+24*n*60*60*1e3);var i="expires="+r.toGMTString();document.cookie=e+"="+escape(t)+"; "+i}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(n(8)),s=r(n(9)),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"refreshUploadAuth",value:function(e,t,n){var r=(s.default.randomUUID(),s.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"RefreshUploadVideo",VideoId:e.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId},a=s.default.makeUTF8sort(i,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+a;o.default.get(l,(function(e){e=JSON.parse(e);t&&t(e)}),(function(e){if(n){var t=JSON.parse(e);n(t)}}))}},{key:"getUploadAuth",value:function(e,t,n){var r=(s.default.randomUUID(),s.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"CreateUploadVideo",Title:e.title,FileName:e.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId};e.fileSize&&(i.FileSize=e.fileSize),e.description&&(i.Description=e.description),e.cateId&&(i.CateId=e.cateId),e.tags&&(i.Tags=e.tags),e.templateGroupId&&(i.TemplateGroupId=e.templateGroupId),e.storageLocation&&(i.StorageLocation=e.storageLocation),e.coverUrl&&(i.CoverURL=e.coverUrl),e.transCodeMode&&(i.TransCodeMode=e.transCodeMode),e.userData&&(i.UserData=JSON.stringify(e.userData));var a=s.default.makeUTF8sort(i,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+a;o.default.get(l,(function(e){try{e=JSON.parse(e)}catch(e){if(n)return void n({Code:"GetUploadAuthFailed",Message:"获取uploadauth失败"})}t&&t(e)}),(function(e){if(n){var t={Code:"GetUploadAuthFailed",Message:"获取uploadauth失败"};try{t=JSON.parse(e)}catch(e){}n(t)}}))}},{key:"getImageUploadAuth",value:function(e,t,n){var r=(s.default.randomUUID(),s.default.randomUUID()),i={AccessKeyId:e.accessKeyId,SecurityToken:e.securityToken,Action:"CreateUploadImage",ImageType:e.imageType?e.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,RequestId:e.requestId};e.title&&(i.Title=e.title),e.imageExt&&(i.ImageExt=e.imageExt),e.tags&&(i.Tags=e.tags),e.storageLocation&&(i.StorageLocation=e.storageLocation);var a=s.default.makeUTF8sort(i,"=","&")+"&Signature="+s.default.aliyunEncodeURI(s.default.makeChangeSiga(i,e.accessKeySecret)),l="https://vod."+e.region+".aliyuncs.com/?"+a;o.default.get(l,(function(e){e=JSON.parse(e),t&&t(e)}),(function(e){if(n){var t=JSON.parse(e);n(t)}}))}}]),e}();t.default=a},function(e,t,n){e.exports=function(e){return e.HmacSHA1}(n(0),n(28),n(29))},function(e,t,n){e.exports=function(e){return function(){var t=e,n=t.lib,r=n.WordArray,i=n.Hasher,o=t.algo,s=[],a=o.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],l=n[4],c=0;c<80;c++){if(c<16)s[c]=0|e[t+c];else{var u=s[c-3]^s[c-8]^s[c-14]^s[c-16];s[c]=u<<1|u>>>31}var d=(r<<5|r>>>27)+l+s[c];d+=c<20?1518500249+(i&o|~i&a):c<40?1859775393+(i^o^a):c<60?(i&o|i&a|o&a)-1894007588:(i^o^a)-899497514,l=a,a=o,o=i<<30|i>>>2,i=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(a),t.HmacSHA1=i._createHmacHelper(a)}(),e.SHA1}(n(0))},function(e,t,n){e.exports=function(e){!function(){var t=e,n=t.lib.Base,r=t.enc.Utf8;t.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var o=this._oKey=t.clone(),s=this._iKey=t.clone(),a=o.words,l=s.words,c=0;c<n;c++)a[c]^=1549556828,l[c]^=909522486;o.sigBytes=s.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}})}()}(n(0))},function(e,t,n){e.exports=function(e){return function(){function t(e,t,n){for(var i=[],o=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2,l=n[e.charCodeAt(s)]>>>6-s%4*2;i[o>>>2]|=(a|l)<<24-o%4*8,o++}return r.create(i,o)}var n=e,r=n.lib.WordArray;n.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var l=r.charAt(64);if(l)for(;i.length%4;)i.push(l);return i.join("")},parse:function(e){var n=e.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o<r.length;o++)i[r.charCodeAt(o)]=o}var s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(n=a)}return t(e,n,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),e.enc.Base64}(n(0))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=r(n(8)),s=r(n(7)),a=r(n(4)),l=r(n(6)),c=r(n(1)),u=r(n(9)),d=n(2),h=n(11),f=n(10),p=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"getAuthInfo",value:function(e,t,n){var r=e+"|f#Ylm&^1TppeRhLg|"+n;return t&&(r=e+"|"+t+"|f#Ylm&^1TppeRhLg|"+n),d(f.parse(r)).toString(h)}},{key:"upload",value:function(t,n,r){var i=c.default.ISODateString(new Date),d=Math.floor((new Date).valueOf()/1e3),h=a.default.getClientId();h=a.default.setClientId(h);var f=e.getAuthInfo(t.userId,h,d),p=u.default.randomUUID(),m={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:d,Timestamp:i,AuthInfo:f,FileName:t.file.name,FileSize:t.file.size,FileCreateTime:t.file.lastModified,FileHash:t.fileHash,UploadId:t.checkpoint.checkpoint.uploadId,PartSize:t.checkpoint.checkpoint.partSize,DonePartsCount:t.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(t.checkpoint),UploadRatio:t.checkpoint.loaded,UserId:t.userId,VideoId:t.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:p};h&&(m.ClientId=h);var v=u.default.makeUTF8sort(m,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(m,t.accessKeySecret)),g="https://vod."+t.region+".aliyuncs.com/?"+v;o.default.get(g,(function(e){n&&n()}),(function(e){e&&(r(e),console.log(e))}))}},{key:"get",value:function(t,n,r){var i=c.default.ISODateString(new Date),d=Math.floor((new Date).valueOf()/1e3),h=a.default.getClientId(),f=e.getAuthInfo(t.userId,h,d),p=u.default.randomUUID(),m={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:s.default.browser.name+(s.default.browser.version||""),AppVersion:l.default.version,AuthTimestamp:d,Timestamp:i,AuthInfo:f,UserId:t.userId,UploadInfoList:JSON.stringify(t.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:p};h&&(m.ClientId=h);var v=u.default.makeUTF8sort(m,"=","&")+"&Signature="+u.default.aliyunEncodeURI(u.default.makeChangeSiga(m,t.accessKeySecret)),g="https://vod."+t.region+".aliyuncs.com/?"+v;o.default.get(g,(function(e){var t={},r=h;(e=e?JSON.parse(e):{}).UploadProgress&&e.UploadProgress.UploadProgressList&&e.UploadProgress.UploadProgressList.length>0&&(r=(t=e.UploadProgress.UploadProgressList[0]).ClientId),a.default.setClientId(r),n&&n(t)}),(function(e){e&&(r(e),console.log(e))}))}}]),e}();t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),o=n(33),s=(n(11),function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,null,[{key:"getMd5",value:function(e,t,n){var r=new FileReader;r.onload=function(e){try{if(e&&e.target){var n=i(o.parse(e.target.result)).toString();t(n)}}catch(e){console.log(e)}},r.onerror=function(e){console.log(e),errorCallback(e)};var s=(File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice).call(e,0,1024);r.readAsBinaryString(s)}}]),e}());t.default=s},function(e,t,n){e.exports=function(e){return e.enc.Latin1}(n(0))}])},99498:function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var r=e.getOption("placeholder");"string"==typeof r&&(r=document.createTextNode(r)),n.appendChild(r),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function r(e){setTimeout((function(){var r=!1,i=e.getInputField();"TEXTAREA"==i.nodeName?r=!i.value:1==e.lineCount()&&(r=!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)),r?n(e):t(e)}),20)}function i(e){s(e)&&n(e)}function o(e){var r=e.getWrapperElement(),i=s(e);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?n(e):t(e)}function s(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,s,a){var l=a&&a!=e.Init;if(s&&!l)n.on("blur",i),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){r(n)}),o(n);else if(!s&&l){n.off("blur",i),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}s&&!n.hasFocus()&&i(n)}))}(n(89780))},25717:function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,s){s&&s!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),n&&(o(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(i))}));var i={Backspace:l,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";i[r]||(i[r]=s(n))}}function s(e){return function(t){return d(t,e)}}function a(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(t){var i=a(t);if(!i||t.getOption("disableInput"))return e.Pass;for(var o=r(i,"pairs"),s=t.listSelections(),l=0;l<s.length;l++){if(!s[l].empty())return e.Pass;var c=h(t,s[l].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(l=s.length-1;l>=0;l--){var u=s[l].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=a(t),i=n&&r(n,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var l=h(t,o[s].head);if(!l||i.indexOf(l)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var n=0;n<o.length;n++){var r=o[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}function u(t){var r=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(r?-1:1)),head:new n(t.head.line,t.head.ch+(r?1:-1))}}function d(t,i){var o=a(t);if(!o||t.getOption("disableInput"))return e.Pass;var s=r(o,"pairs"),l=s.indexOf(i);if(-1==l)return e.Pass;for(var c,d=r(o,"closeBefore"),h=r(o,"triples"),p=s.charAt(l+1)==i,m=t.listSelections(),v=l%2==0,g=0;g<m.length;g++){var y,_=m[g],b=_.head,x=t.getRange(b,n(b.line,b.ch+1));if(v&&!_.empty())y="surround";else if(!p&&v||x!=i)if(p&&b.ch>1&&h.indexOf(i)>=0&&t.getRange(n(b.line,b.ch-2),b)==i+i){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;y="addFour"}else if(p){var w=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(x)||w==i||e.isWordChar(w))return e.Pass;y="both"}else{if(!v||!(0===x.length||/\s/.test(x)||d.indexOf(x)>-1))return e.Pass;y="both"}else y=p&&f(t,b)?"both":h.indexOf(i)>=0&&t.getRange(b,n(b.line,b.ch+3))==i+i+i?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var S=l%2?s.charAt(l-1):i,C=l%2?i:s.charAt(l+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==c){var n=t.getSelections();for(e=0;e<n.length;e++)n[e]=S+n[e]+C;for(t.replaceSelections(n,"around"),n=t.listSelections().slice(),e=0;e<n.length;e++)n[e]=u(n[e]);t.setSelections(n)}else"both"==c?(t.replaceSelection(S+C,null),t.triggerElectric(S+C),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(S+S+S+S,"before"),t.execCommand("goCharRight"))}))}function h(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function f(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(89780))},6313:function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,i){if(i!=e.Init&&i&&t.removeKeyMap("autoCloseTags"),n){var s={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(s["'/'"]=function(e){return o(e)}),"object"==typeof n&&!1===n.whenOpening||(s["'>'"]=function(e){return r(e)}),t.addKeyMap(s)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["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 r(r){if(r.getOption("disableInput"))return e.Pass;for(var i=r.listSelections(),o=[],l=r.getOption("autoCloseTags"),c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var u=i[c].head,d=r.getTokenAt(u),h=e.innerMode(r.getMode(),d.state),f=h.state,p=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(f),m=p&&p.name;if(!m)return e.Pass;var v="html"==h.mode.configuration,g="object"==typeof l&&l.dontCloseTags||v&&t,y="object"==typeof l&&l.indentTags||v&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var _=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&p.close||d.string.indexOf("/")==u.ch-d.start-1||g&&s(g,_)>-1||a(r,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f)||[],m,u,!0))return e.Pass;var b="object"==typeof l&&l.emptyTags;if(b&&s(b,m)>-1)o[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var x=y&&s(y,_)>-1;o[c]={indent:x,text:">"+(x?"\n\n":"")+"</"+m+">",newPos:x?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var w="object"==typeof l&&l.dontIndentOnAutoClose;for(c=i.length-1;c>=0;c--){var S=o[c];r.replaceRange(S.text,i[c].head,i[c].anchor,"+insert");var C=r.listSelections().slice(0);C[c]={head:S.newPos,anchor:S.newPos},r.setSelections(C),!w&&S.indent&&(r.indentLine(S.newPos.line,null,!0),r.indentLine(S.newPos.line+1,null,!0))}}function i(t,n){for(var r=t.listSelections(),i=[],o=n?"/":"</",s=t.getOption("autoCloseTags"),l="object"==typeof s&&s.dontIndentOnSlash,c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=t.getTokenAt(u),h=e.innerMode(t.getMode(),d.state),f=h.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var p,m="xml"!=h.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==h.mode.name)p=o+"script";else if(m&&"css"==h.mode.name)p=o+"style";else{var v=h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(f);if(!v||v.length&&a(t,v,v[v.length-1],u))return e.Pass;p=o+v[v.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(p+=">"),i[c]=p}if(t.replaceSelections(i),r=t.listSelections(),!l)for(c=0;c<r.length;c++)(c==r.length-1||r[c].head.line<r[c+1].head.line)&&t.indentLine(r[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:i(t,!0)}function s(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function a(t,n,r,i,o){if(!e.scanForClosingTag)return!1;var s=Math.min(t.lastLine()+1,i.line+500),a=e.scanForClosingTag(t,i,null,s);if(!a||a.tag!=r)return!1;for(var l=o?1:0,c=n.length-1;c>=0&&n[c]==r;c--)++l;for(i=a.to,c=1;c<l;c++){var u=e.scanForClosingTag(t,i,null,s);if(!u||u.tag!=r)return!1;i=u.to}return!0}e.commands.closeTag=function(e){return i(e)}}(n(89780),n(32855))},32855:function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var r="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",i=new RegExp("<(/?)(["+r+"]["+r+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,r){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=r?Math.max(r.from,e.firstLine()):e.firstLine(),this.max=r?Math.min(r.to-1,e.lastLine()):e.lastLine()}function s(e,n){var r=e.cm.getTokenTypeAt(t(e.line,n));return r&&/\btag\b/.test(r)}function a(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(a(e))continue;return}if(s(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(s(e,t+1)){i.lastIndex=t,e.ch=t;var n=i.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(a(e))continue;return}if(s(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(s(e,t+1)){var n=e.text.lastIndexOf("/",t),r=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,r?"selfClose":"regular"}e.ch=t}}function f(e,n){for(var r=[];;){var i,o=d(e),s=e.line,a=e.ch-(o?o[0].length:0);if(!o||!(i=c(e)))return;if("selfClose"!=i)if(o[1]){for(var l=r.length-1;l>=0;--l)if(r[l]==o[2]){r.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:t(s,a),to:t(e.line,e.ch)}}else r.push(o[2])}}function p(e,n){for(var r=[];;){var i=h(e);if(!i)return;if("selfClose"!=i){var o=e.line,s=e.ch,a=u(e);if(!a)return;if(a[1])r.push(a[2]);else{for(var l=r.length-1;l>=0;--l)if(r[l]==a[2]){r.length=l;break}if(l<0&&(!n||n==a[2]))return{tag:a[2],from:t(e.line,e.ch),to:t(o,s)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,r){for(var i=new o(e,r.line,0);;){var s=d(i);if(!s||i.line!=r.line)return;var a=c(i);if(!a)return;if(!s[1]&&"selfClose"!=a){var l=t(i.line,i.ch),u=f(i,s[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),e.findMatchingTag=function(e,r,i){var s=new o(e,r.line,r.ch,i);if(-1!=s.text.indexOf(">")||-1!=s.text.indexOf("<")){var a=c(s),l=a&&t(s.line,s.ch),d=a&&u(s);if(a&&d&&!(n(s,r)>0)){var h={from:t(s.line,s.ch),to:l,tag:d[2]};return"selfClose"==a?{open:h,close:null,at:"open"}:d[1]?{open:p(s,d[2]),close:h,at:"close"}:{open:h,close:f(s=new o(e,l.line,l.ch,i),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,r){for(var i=new o(e,t.line,t.ch,n);;){var s=p(i,r);if(!s)break;var a=f(new o(e,t.line,t.ch,n),s.tag);if(a)return{open:s,close:a}}},e.scanForClosingTag=function(e,t,n,r){return f(new o(e,t.line,t.ch,r?{from:0,to:r}:null),n)}}(n(89780))},89780:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),s=r||i||o,a=s&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),_=/\bCrOS\b/.test(e),b=/win/i.test(t),x=d&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(d=!1,l=!0);var w=y&&(c||d&&(null==x||x<12.11)),S=n||s&&a>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,E=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function T(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function L(e,t){return T(e).appendChild(t)}function A(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function M(e,t,n,r){var i=A(e,t,n,r);return i.setAttribute("role","presentation"),i}function D(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function N(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function R(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}k=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var O=function(e){e.select()};function j(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function P(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function B(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,s=i||0;;){var a=e.indexOf("\t",o);if(a<0||a>=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}}m?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:s&&(O=function(e){try{e.select()}catch(e){}});var U=function(){this.id=null,this.f=null,this.time=0,this.handler=j(this.onTimeout,this)};function F(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}U.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},U.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var z=50,H={toString:function(){return"CodeMirror.Pass"}},Z={scroll:!1},W={origin:"*mouse"},G={origin:"+move"};function q(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var s=o-r;if(o==e.length||i+s>=t)return r+Math.min(s,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var V=[""];function K(e){for(;V.length<=e;)V.push(Y(V)+" ");return V[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function J(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function Q(){}function $(e,t){var n;return Object.create?n=Object.create(e):(Q.prototype=e,n=new Q),t&&P(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ie=/[\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 oe(e){return e.charCodeAt(0)>=768&&ie.test(e)}function se(e,t,n){for(;(n<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function le(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var s=e[o];(s.from<n&&s.to>t||t==n&&s.to==t)&&(r(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var ce=null;function ue(e,t,n){var r;ce=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:ce=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:ce=i)}return null!=r?r:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;function l(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!r.test(e))return!1;for(var u=e.length,d=[],h=0;h<u;++h)d.push(n(e.charCodeAt(h)));for(var f=0,p=c;f<u;++f){var m=d[f];"m"==m?d[f]=p:p=m}for(var v=0,g=c;v<u;++v){var y=d[v];"1"==y&&"r"==g?d[v]="n":o.test(y)&&(g=y,"r"==y&&(d[v]="R"))}for(var _=1,b=d[0];_<u-1;++_){var x=d[_];"+"==x&&"1"==b&&"1"==d[_+1]?d[_]="1":","!=x||b!=d[_+1]||"1"!=b&&"n"!=b||(d[_]=b),b=x}for(var w=0;w<u;++w){var S=d[w];if(","==S)d[w]="N";else if("%"==S){var C=void 0;for(C=w+1;C<u&&"%"==d[C];++C);for(var k=w&&"!"==d[w-1]||C<u&&"1"==d[C]?"1":"N",E=w;E<C;++E)d[E]=k;w=C-1}}for(var T=0,L=c;T<u;++T){var A=d[T];"L"==L&&"1"==A?d[T]="L":o.test(A)&&(L=A)}for(var M=0;M<u;++M)if(i.test(d[M])){var D=void 0;for(D=M+1;D<u&&i.test(d[D]);++D);for(var I="L"==(M?d[M-1]:c),N=I==("L"==(D<u?d[D]:c))?I?"L":"R":c,R=M;R<D;++R)d[R]=N;M=D-1}for(var O,j=[],P=0;P<u;)if(s.test(d[P])){var B=P;for(++P;P<u&&s.test(d[P]);++P);j.push(new l(0,B,P))}else{var U=P,F=j.length,z="rtl"==t?1:0;for(++P;P<u&&"L"!=d[P];++P);for(var H=U;H<P;)if(a.test(d[H])){U<H&&(j.splice(F,0,new l(1,U,H)),F+=z);var Z=H;for(++H;H<P&&a.test(d[H]);++H);j.splice(F,0,new l(2,Z,H)),F+=z,U=H}else++H;U<P&&j.splice(F,0,new l(1,U,P))}return"ltr"==t&&(1==j[0].level&&(O=e.match(/^\s+/))&&(j[0].from=O[0].length,j.unshift(new l(0,0,O[0].length))),1==Y(j).level&&(O=e.match(/\s+$/))&&(Y(j).to-=O[0].length,j.push(new l(0,u-O[0].length,u)))),"rtl"==t?j.reverse():j}}();function he(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var fe=[],pe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||fe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||fe}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=F(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var n=me(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),Ce(t)||t.codemirrorIgnore}function _e(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==F(n,t[r])&&n.push(t[r])}function be(e,t){return me(e,t).length>0}function xe(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Se(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){we(e),Se(e)}function Ee(e){return e.target||e.srcElement}function Te(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Le,Ae,Me=function(){if(s&&a<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function De(e){if(null==Le){var t=A("span","");L(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Le=t.offsetWidth<=1&&t.offsetHeight>2&&!(s&&a<8))}var n=Le?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Ie(e){if(null!=Ae)return Ae;var t=L(e,document.createTextNode("AخA")),n=k(t,0,1).getBoundingClientRect(),r=k(t,1,2).getBoundingClientRect();return T(e),!(!n||n.left==n.right)&&(Ae=r.right-n.right<3)}var Ne,Re=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),s=o.indexOf("\r");-1!=s?(n.push(o.slice(0,s)),t+=s+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Oe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},je="oncopy"in(Ne=A("div"))||(Ne.setAttribute("oncopy","return;"),"function"==typeof Ne.oncopy),Pe=null;function Be(e){if(null!=Pe)return Pe;var t=L(e,A("span","x")),n=t.getBoundingClientRect(),r=k(t,0,1).getBoundingClientRect();return Pe=Math.abs(n.left-r.left)>1}var Ue={},Fe={};function ze(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ue[e]=t}function He(e,t){Fe[e]=t}function Ze(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function We(e,t){t=Ze(t);var n=Ue[t.name];if(!n)return We(e,"text/plain");var r=n(e,t);if(Ge.hasOwnProperty(t.name)){var i=Ge[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)r[s]=t.modeProps[s];return r}var Ge={};function qe(e,t){P(t,Ge.hasOwnProperty(e)?Ge[e]:Ge[e]={})}function Ve(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ke(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Xe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Je(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Qe(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function $e(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function et(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=F(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var s=0;s<e.lines.length;++s){var a=e.lines[s].height;if(t<a)break;t-=a}return n+s}function rt(e,t){return t>=e.first&&t<e.first+e.size}function it(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ot(e,t,n){if(void 0===n&&(n=null),!(this instanceof ot))return new ot(e,t,n);this.line=e,this.ch=t,this.sticky=n}function st(e,t){return e.line-t.line||e.ch-t.ch}function at(e,t){return e.sticky==t.sticky&&0==st(e,t)}function lt(e){return ot(e.line,e.ch)}function ct(e,t){return st(e,t)<0?t:e}function ut(e,t){return st(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ht(e,t){if(t.line<e.first)return ot(e.first,0);var n=e.first+e.size-1;return t.line>n?ot(n,Je(e,n).text.length):ft(t,Je(e,t.line).text.length)}function ft(e,t){var n=e.ch;return null==n||n>t?ot(e.line,t):n<0?ot(e.line,0):e}function pt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=ht(e,t[r]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Xe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=B(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,r){var i=[e.state.modeGen],o={};Et(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var s=n.state,a=function(r){n.baseTokens=i;var a=e.state.overlays[r],l=1,c=0;n.state=!0,Et(e,t.text,a.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=s,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)a(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function yt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=_t(e,tt(t)),i=t.text.length>e.options.maxHighlightLength&&Ve(e.doc.mode,r.state),o=gt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function _t(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new vt(r,!0,t);var o=Tt(e,t,n),s=o>r.first&&Je(r,o-1).stateAfter,a=s?vt.fromSaved(r,s,o):new vt(r,Ye(r.mode),o);return r.iter(o,t,(function(n){bt(e,n.text,a);var r=a.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?a.save():null,a.nextLine()})),n&&(r.modeFrontier=a.line),a}function bt(e,t,n,r){var i=e.doc.mode,o=new Xe(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&xt(i,n.state);!o.eol();)wt(i,o,n.state),o.start=o.pos}function xt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=Ke(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function wt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=Ke(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,n){return t instanceof mt?new vt(e,Ve(e.mode,t.state),n,t.lookAhead):new vt(e,Ve(e.mode,t),n)},vt.prototype.save=function(e){var t=!1!==e?Ve(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var St=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function Ct(e,t,n,r){var i,o,s=e.doc,a=s.mode,l=Je(s,(t=ht(s,t)).line),c=_t(e,t.line,n),u=new Xe(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=wt(a,u,c.state),r&&o.push(new St(u,i,Ve(s.mode,c.state)));return r?o:new St(u,i,c.state)}function kt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Et(e,t,n,r,i,o,s){var a=n.flattenSpans;null==a&&(a=e.options.flattenSpans);var l,c=0,u=null,d=new Xe(t,e.options.tabSize,r),h=e.options.addModeClass&&[null];for(""==t&&kt(xt(n,r.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(a=!1,s&&bt(e,t,r,d.pos),d.pos=t.length,l=null):l=kt(wt(n,d,r.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;c<d.start;)i(c=Math.min(d.start,c+5e3),u);u=l}d.start=d.pos}for(;c<d.pos;){var p=Math.min(d.pos,c+5e3);i(p,u),c=p}}function Tt(e,t,n){for(var r,i,o=e.doc,s=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>s;--a){if(a<=o.first)return o.first;var l=Je(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof mt?c.lookAhead:0)<=o.modeFrontier))return a;var u=B(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=a-1,r=u)}return i}function Lt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Je(e,r).stateAfter;if(i&&(!(i instanceof mt)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var At=!1,Mt=!1;function Dt(){At=!0}function It(){Mt=!0}function Nt(e,t,n){this.marker=e,this.from=t,this.to=n}function Rt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ot(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function jt(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Pt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==s.type&&(!n||!o.marker.insertLeft)){var a=null==o.to||(s.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Nt(s,o.from,a?null:o.to))}}return r}function Bt(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],s=o.marker;if(null==o.to||(s.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var a=null==o.from||(s.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Nt(s,a?null:o.from-t,null==o.to?null:o.to-t))}}return r}function Ut(e,t){if(t.full)return null;var n=rt(e,t.from.line)&&Je(e,t.from.line).markedSpans,r=rt(e,t.to.line)&&Je(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,s=0==st(t.from,t.to),a=Pt(n,i,s),l=Bt(r,o,s),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(a)for(var d=0;d<a.length;++d){var h=a[d];if(null==h.to){var f=Rt(l,h.marker);f?c&&(h.to=null==f.to?null:f.to+u):h.to=i}}if(l)for(var p=0;p<l.length;++p){var m=l[p];null!=m.to&&(m.to+=u),null==m.from?Rt(a,m.marker)||(m.from=u,c&&(a||(a=[])).push(m)):(m.from+=u,c&&(a||(a=[])).push(m))}a&&(a=Ft(a)),l&&l!=a&&(l=Ft(l));var v=[a];if(!c){var g,y=t.text.length-2;if(y>0&&a)for(var _=0;_<a.length;++_)null==a[_].to&&(g||(g=[])).push(new Nt(a[_].marker,null,null));for(var b=0;b<y;++b)v.push(g);v.push(l)}return v}function Ft(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function zt(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=F(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var s=r[o],a=s.find(0),l=0;l<i.length;++l){var c=i[l];if(!(st(c.to,a.from)<0||st(c.from,a.to)>0)){var u=[l,1],d=st(c.from,a.from),h=st(c.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(h>0||!s.inclusiveRight&&!h)&&u.push({from:a.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}function Ht(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Zt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Wt(e){return e.inclusiveLeft?-1:0}function Gt(e){return e.inclusiveRight?1:0}function qt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=st(r.from,i.from)||Wt(e)-Wt(t);if(o)return-o;var s=st(r.to,i.to)||Gt(e)-Gt(t);return s||t.id-e.id}function Vt(e,t){var n,r=Mt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||qt(n,i.marker)<0)&&(n=i.marker);return n}function Kt(e){return Vt(e,!0)}function Yt(e){return Vt(e,!1)}function Xt(e,t){var n,r=Mt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||qt(n,o.marker)<0)&&(n=o.marker)}return n}function Jt(e,t,n,r,i){var o=Je(e,t),s=Mt&&o.markedSpans;if(s)for(var a=0;a<s.length;++a){var l=s[a];if(l.marker.collapsed){var c=l.marker.find(0),u=st(c.from,n)||Wt(l.marker)-Wt(i),d=st(c.to,r)||Gt(l.marker)-Gt(i);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?st(c.to,n)>=0:st(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?st(c.from,r)<=0:st(c.from,r)<0)))return!0}}}function Qt(e){for(var t;t=Kt(e);)e=t.find(-1,!0).line;return e}function $t(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=Yt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Je(e,t),r=Qt(n);return n==r?t:tt(r)}function nn(e,t){if(t>e.lastLine())return t;var n,r=Je(e,t);if(!rn(e,r))return t;for(;n=Yt(r);)r=n.find(1,!0).line;return tt(r)+1}function rn(e,t){var n=Mt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&on(e,t,r))return!0}}function on(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return on(e,r.line,Rt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&on(e,t,i))return!0}function sn(e){for(var t=0,n=(e=Qt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var s=0;s<o.children.length;++s){var a=o.children[s];if(a==n)break;t+=a.height}return t}function an(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Kt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Yt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function ln(e){var t=e.display,n=e.doc;t.maxLine=Je(n,n.first),t.maxLineLength=an(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=an(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var cn=function(e,t,n){this.text=e,Zt(this,t),this.height=n?n(this):1};function un(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ht(e),Zt(e,n);var i=r?r(e):1;i!=e.height&&et(e,i)}function dn(e){e.parent=null,Ht(e)}cn.prototype.lineNo=function(){return tt(this)},xe(cn);var hn={},fn={};function pn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?fn:hn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;r.pos=0,r.addToken=gn,Ie(e.display.measure)&&(s=he(o,e.doc.direction))&&(r.addToken=_n(r.addToken,s)),r.map=[],xn(o,r,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=R(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=R(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(De(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var a=r.content.lastChild;(/\bcm-tab\b/.test(a.className)||a.querySelector&&a.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=R(r.pre.className,r.textClass||"")),r}function vn(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gn(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?yn(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var f=0;;){d.lastIndex=f;var p=d.exec(t),m=p?p.index-f:t.length-f;if(m){var v=document.createTextNode(u.slice(f,f+m));s&&a<9?c.appendChild(A("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!p)break;f+=m+1;var g=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,_=y-e.col%y;(g=c.appendChild(A("span",K(_),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=_}else"\r"==p[0]||"\n"==p[0]?((g=c.appendChild(A("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),s&&a<9?c.appendChild(A("span",[g])):c.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),s&&a<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||h||o||l){var b=n||"";r&&(b+=r),i&&(b+=i);var x=A("span",[c],b,o);if(l)for(var w in l)l.hasOwnProperty(w)&&"style"!=w&&"class"!=w&&x.setAttribute(w,l[w]);return e.content.appendChild(x)}e.content.appendChild(c)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}function _n(e,t){return function(n,r,i,o,s,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>c&&d.from<=c);h++);if(d.to>=u)return e(n,r,i,o,s,a,l);e(n,r.slice(0,d.to-c),i,o,null,a,l),o=null,r=r.slice(d.to-c),c=d.to}}}function bn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function xn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var s,a,l,c,u,d,h,f=i.length,p=0,m=1,v="",g=0;;){if(g==p){l=c=u=a="",h=null,d=null,g=1/0;for(var y=[],_=void 0,b=0;b<r.length;++b){var x=r[b],w=x.marker;if("bookmark"==w.type&&x.from==p&&w.widgetNode)y.push(w);else if(x.from<=p&&(null==x.to||x.to>p||w.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&g>x.to&&(g=x.to,c=""),w.className&&(l+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&x.from==p&&(u+=" "+w.startStyle),w.endStyle&&x.to==g&&(_||(_=[])).push(w.endStyle,x.to),w.title&&((h||(h={})).title=w.title),w.attributes)for(var S in w.attributes)(h||(h={}))[S]=w.attributes[S];w.collapsed&&(!d||qt(d.marker,w)<0)&&(d=x)}else x.from>p&&g>x.from&&(g=x.from)}if(_)for(var C=0;C<_.length;C+=2)_[C+1]==g&&(c+=" "+_[C]);if(!d||d.from==p)for(var k=0;k<y.length;++k)bn(t,0,y[k]);if(d&&(d.from||0)==p){if(bn(t,(null==d.to?f+1:d.to)-p,d.marker,null==d.from),null==d.to)return;d.to==p&&(d=!1)}}if(p>=f)break;for(var E=Math.min(f,g);;){if(v){var T=p+v.length;if(!d){var L=T>E?v.slice(0,E-p):v;t.addToken(t,L,s?s+l:l,u,p+L.length==g?c:"",a,h)}if(T>=E){v=v.slice(E-p),p=E;break}p=T,u=""}v=i.slice(o,o=n[m++]),s=pn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,i.slice(o,o=n[A]),pn(n[A+1],t.cm.options))}function wn(e,t,n){this.line=t,this.rest=en(t),this.size=this.rest?tt(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=rn(e,t)}function Sn(e,t,n){for(var r,i=[],o=t;o<n;o=r){var s=new wn(e.doc,Je(e.doc,o),o);r=o+s.size,i.push(s)}return i}var Cn=null;function kn(e){Cn?Cn.ops.push(e):e.ownsGroup=Cn={ops:[e],delayedCallbacks:[]}}function En(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function Tn(e,t){var n=e.ownsGroup;if(n)try{En(n)}finally{Cn=null,t(n)}}var Ln=null;function An(e,t){var n=me(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);Cn?r=Cn.delayedCallbacks:Ln?r=Ln:(r=Ln=[],setTimeout(Mn,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},s=0;s<n.length;++s)o(s)}}function Mn(){var e=Ln;Ln=null;for(var t=0;t<e.length;++t)e[t]()}function Dn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?On(e,t):"gutter"==o?Pn(e,t,n,r):"class"==o?jn(e,t):"widget"==o&&Bn(e,t,r)}t.changes=null}function In(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),s&&a<8&&(e.node.style.zIndex=2)),e.node}function Nn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=In(t);t.background=r.insertBefore(A("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function Rn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):mn(e,t)}function On(e,t){var n=t.text.className,r=Rn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,jn(e,t)):n&&(t.text.className=n)}function jn(e,t){Nn(e,t),t.line.wrapClass?In(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Pn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=In(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var s=In(t),a=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(A("div",it(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&a.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function Bn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);Fn(e,t,n)}function Un(e,t,n,r){var i=Rn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),jn(e,t),Pn(e,t,n,r),Fn(e,t,r),t.node}function Fn(e,t,n){if(zn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)zn(e,t.rest[r],t,n,!1)}function zn(e,t,n,r,i){if(t.widgets)for(var o=In(n),s=0,a=t.widgets;s<a.length;++s){var l=a[s],c=A("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Hn(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),An(l,"redraw")}}function Hn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function Zn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!D(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),L(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Wn(e,t){for(var n=Ee(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Gn(e){return e.lineSpace.offsetTop}function qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Vn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=L(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Kn(e){return z-e.display.nativeBarWidth}function Yn(e){return e.display.scroller.clientWidth-Kn(e)-e.display.barWidth}function Xn(e){return e.display.scroller.clientHeight-Kn(e)-e.display.barHeight}function Jn(e,t,n){var r=e.options.lineWrapping,i=r&&Yn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var s=t.text.firstChild.getClientRects(),a=0;a<s.length-1;a++){var l=s[a],c=s[a+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Qn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(tt(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function $n(e,t){var n=tt(t=Qt(t)),r=e.display.externalMeasured=new wn(e.doc,t,n);r.lineN=n;var i=r.built=mn(e,r);return r.text=i.pre,L(e.display.lineMeasure,i.pre),r}function er(e,t,n,r){return rr(e,nr(e,t),n,r)}function tr(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[jr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function nr(e,t){var n=tt(t),r=tr(e,n);r&&!r.text?r=null:r&&r.changes&&(Dn(e,r,n,Dr(e)),e.curOp.forceUpdate=!0),r||(r=$n(e,t));var i=Qn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function rr(e,t,n,r,i){t.before&&(n=-1);var o,s=n+(r||"");return t.cache.hasOwnProperty(s)?o=t.cache[s]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Jn(e,t.view,t.rect),t.hasHeights=!0),(o=lr(e,t,n,r)).bogus||(t.cache[s]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var ir,or={left:0,right:0,top:0,bottom:0};function sr(e,t,n){for(var r,i,o,s,a,l,c=0;c<e.length;c+=3)if(a=e[c],l=e[c+1],t<a?(i=0,o=1,s="left"):t<l?o=1+(i=t-a):(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-a)-1,t>=l&&(s="right")),null!=i){if(r=e[c+2],a==l&&n==(r.insertLeft?"left":"right")&&(s=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],s="left";if("right"==n&&i==l-a)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],s="right";break}return{node:r,start:i,end:o,collapse:s,coverStart:a,coverEnd:l}}function ar(e,t){var n=or;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function lr(e,t,n,r){var i,o=sr(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var h=0;h<4;h++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((i=s&&a<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():ar(k(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,d="right"}s&&a<11&&(i=cr(e.display.measure,i))}else{var f;c>0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(s&&a<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+Mr(e.display),top:p.top,bottom:p.bottom}:or}for(var m=i.top-t.rect.top,v=i.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,_=0;_<y.length-1&&!(g<y[_]);_++);var b=_?y[_-1]:0,x=y[_],w={left:("right"==d?i.right:i.left)-t.rect.left,right:("left"==d?i.left:i.right)-t.rect.left,top:b,bottom:x};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=m,w.rbottom=v),w}function cr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Be(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}function ur(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function dr(e){e.display.externalMeasure=null,T(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ur(e.display.view[t])}function hr(e){dr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function fr(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function pr(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mr(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=Zn(e.widgets[n]));return t}function vr(e,t,n,r,i){if(!i){var o=mr(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var s=sn(t);if("local"==r?s+=Gn(e.display):s-=e.display.viewOffset,"page"==r||"window"==r){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==r?0:pr());var l=a.left+("window"==r?0:fr());n.left+=l,n.right+=l}return n.top+=s,n.bottom+=s,n}function gr(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=fr(),i-=pr();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var s=e.display.lineSpace.getBoundingClientRect();return{left:r-s.left,top:i-s.top}}function yr(e,t,n,r,i){return r||(r=Je(e.doc,t.line)),vr(e,r,er(e,r,t.ch,i),n)}function _r(e,t,n,r,i,o){function s(t,s){var a=rr(e,i,t,s?"right":"left",o);return s?a.left=a.right:a.right=a.left,vr(e,r,a,n)}r=r||Je(e.doc,t.line),i||(i=nr(e,r));var a=he(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!a)return s("before"==c?l-1:l,"before"==c);function u(e,t,n){return s(n?e-1:e,1==a[t].level!=n)}var d=ue(a,l,c),h=ce,f=u(l,d,"before"==c);return null!=h&&(f.other=u(l,h,"before"!=c)),f}function br(e,t){var n=0;t=ht(e.doc,t),e.options.lineWrapping||(n=Mr(e.display)*t.ch);var r=Je(e.doc,t.line),i=sn(r)+Gn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function xr(e,t,n,r,i){var o=ot(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function wr(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return xr(r.first,0,null,-1,-1);var i=nt(r,n),o=r.first+r.size-1;if(i>o)return xr(r.first+r.size-1,Je(r,o).text.length,null,1,1);t<0&&(t=0);for(var s=Je(r,i);;){var a=Er(e,s,i,t,n),l=Xt(s,a.ch+(a.xRel>0||a.outside>0?1:0));if(!l)return a;var c=l.find(1);if(c.line==i)return c;s=Je(r,i=c.line)}}function Sr(e,t,n,r){r-=mr(t);var i=t.text.length,o=ae((function(t){return rr(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ae((function(t){return rr(e,n,t).top>r}),o,i)}}function Cr(e,t,n,r){return n||(n=nr(e,t)),Sr(e,t,n,vr(e,t,rr(e,n,r),"line").top)}function kr(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Er(e,t,n,r,i){i-=sn(t);var o=nr(e,t),s=mr(t),a=0,l=t.text.length,c=!0,u=he(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Lr:Tr)(e,t,n,o,u,r,i);a=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,m=null,v=ae((function(t){var n=rr(e,o,t);return n.top+=s,n.bottom+=s,!!kr(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,m=n),!0)}),a,l),g=!1;if(m){var y=r-m.left<m.right-r,_=y==c;v=p+(_?0:1),f=_?"after":"before",h=y?m.left:m.right}else{c||v!=l&&v!=a||v++,f=0==v?"after":v==t.text.length?"before":rr(e,o,v-(c?1:0)).bottom+s<=i==c?"after":"before";var b=_r(e,ot(n,v,f),"line",t,o);h=b.left,g=i<b.top?-1:i>=b.bottom?1:0}return xr(n,v=se(t.text,v,1),f,g,r-h)}function Tr(e,t,n,r,i,o,s){var a=ae((function(a){var l=i[a],c=1!=l.level;return kr(_r(e,ot(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,s,!0)}),0,i.length-1),l=i[a];if(a>0){var c=1!=l.level,u=_r(e,ot(n,c?l.from:l.to,c?"after":"before"),"line",t,r);kr(u,o,s,!0)&&u.top>s&&(l=i[a-1])}return l}function Lr(e,t,n,r,i,o,s){var a=Sr(e,t,r,s),l=a.begin,c=a.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<i.length;h++){var f=i[h];if(!(f.from>=c||f.to<=l)){var p=rr(e,r,1!=f.level?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=p<o?o-p+1e9:p-o;(!u||d>m)&&(u=f,d=m)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Ar(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ir){ir=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ir.appendChild(document.createTextNode("x")),ir.appendChild(A("br"));ir.appendChild(document.createTextNode("x"))}L(e.measure,ir);var n=ir.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),T(e.measure),n||1}function Mr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");L(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Dr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s){var a=e.display.gutterSpecs[s].className;n[a]=o.offsetLeft+o.clientLeft+i,r[a]=o.clientWidth}return{fixedPos:Ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Nr(e){var t=Ar(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/Mr(e.display)-3);return function(i){if(rn(e.doc,i))return 0;var o=0;if(i.widgets)for(var s=0;s<i.widgets.length;s++)i.widgets[s].height&&(o+=i.widgets[s].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function Rr(e){var t=e.doc,n=Nr(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function Or(e,t,n,r){var i=e.display;if(!n&&"true"==Ee(t).getAttribute("cm-not-content"))return null;var o,s,a=i.lineSpace.getBoundingClientRect();try{o=t.clientX-a.left,s=t.clientY-a.top}catch(e){return null}var l,c=wr(e,o,s);if(r&&c.xRel>0&&(l=Je(e.doc,c.line).text).length==c.ch){var u=B(l,l.length,e.options.tabSize)-l.length;c=ot(c.line,Math.max(0,Math.round((o-Vn(e.display).left)/Mr(e.display))-u))}return c}function jr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function Pr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Mt&&tn(e.doc,t)<i.viewTo&&Ur(e);else if(n<=i.viewFrom)Mt&&nn(e.doc,n+r)>i.viewFrom?Ur(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Ur(e);else if(t<=i.viewFrom){var o=Fr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Ur(e)}else if(n>=i.viewTo){var s=Fr(e,t,t,-1);s?(i.view=i.view.slice(0,s.index),i.viewTo=s.lineN):Ur(e)}else{var a=Fr(e,t,t,-1),l=Fr(e,n,n+r,1);a&&l?(i.view=i.view.slice(0,a.index).concat(Sn(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Ur(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function Br(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[jr(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==F(s,n)&&s.push(n)}}}function Ur(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fr(e,t,n,r){var i,o=jr(e,t),s=e.display.view;if(!Mt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,l=0;l<o;l++)a+=s[l].size;if(a!=t){if(r>0){if(o==s.length-1)return null;i=a+s[o].size-t,o++}else i=a-t;t+=i,n+=i}for(;tn(e.doc,n)!=n;){if(o==(r<0?0:s.length-1))return null;n+=r*s[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function zr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=Sn(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=Sn(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(jr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(Sn(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,jr(e,n)))),r.viewTo=n}function Hr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function Zr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Wr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),s=0;s<n.sel.ranges.length;s++)if(t||s!=n.sel.primIndex){var a=n.sel.ranges[s];if(!(a.from().line>=e.display.viewTo||a.to().line<e.display.viewFrom)){var l=a.empty();(l||e.options.showCursorWhenSelecting)&&Gr(e,a.head,i),l||Vr(e,a,o)}}return r}function Gr(e,t,n){var r=_r(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(A("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var o=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=r.other.left+"px",o.style.top=r.other.top+"px",o.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function qr(e,t){return e.top-t.top||e.left-t.left}function Vr(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),s=Vn(e.display),a=s.left,l=Math.max(r.sizerWidth,Yn(e)-r.sizer.offsetLeft)-s.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function d(t,n,r){var o,s,d=Je(i,t),h=d.text.length;function f(n,r){return yr(e,ot(t,n),"div",d,r)}function p(t,n,r){var i=Cr(e,d,null,t),o="ltr"==n==("after"==r)?"left":"right";return f("after"==r?i.begin:i.end-(/\s/.test(d.text.charAt(i.end-1))?2:1),o)[o]}var m=he(d,i.direction);return le(m,n||0,null==r?h:r,(function(e,t,i,d){var v="ltr"==i,g=f(e,v?"left":"right"),y=f(t-1,v?"right":"left"),_=null==n&&0==e,b=null==r&&t==h,x=0==d,w=!m||d==m.length-1;if(y.top-g.top<=3){var S=(c?b:_)&&w,C=(c?_:b)&&x?a:(v?g:y).left,k=S?l:(v?y:g).right;u(C,g.top,k-C,g.bottom)}else{var E,T,L,A;v?(E=c&&_&&x?a:g.left,T=c?l:p(e,i,"before"),L=c?a:p(t,i,"after"),A=c&&b&&w?l:y.right):(E=c?p(e,i,"before"):a,T=!c&&_&&x?l:g.right,L=!c&&b&&w?a:y.left,A=c?p(t,i,"after"):l),u(E,g.top,T-E,g.bottom),g.bottom<y.top&&u(a,g.bottom,null,y.top),u(L,y.top,A-L,y.bottom)}(!o||qr(g,o)<0)&&(o=g),qr(y,o)<0&&(o=y),(!s||qr(g,s)<0)&&(s=g),qr(y,s)<0&&(s=y)})),{start:o,end:s}}var h=t.from(),f=t.to();if(h.line==f.line)d(h.line,h.ch,f.ch);else{var p=Je(i,h.line),m=Je(i,f.line),v=Qt(p)==Qt(m),g=d(h.line,h.ch,v?p.text.length+1:null).end,y=d(f.line,v?0:null,f.ch).start;v&&(g.top<y.top-2?(u(g.right,g.top,null,g.bottom),u(a,y.top,y.left,y.bottom)):u(g.right,g.top,y.left-g.right,g.bottom)),g.bottom<y.top&&u(a,g.bottom,null,y.top)}n.appendChild(o)}function Kr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Qr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yr(e){e.state.focused||(e.display.input.focus(),Jr(e))}function Xr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qr(e))}),100)}function Jr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Kr(e))}function Qr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function $r(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var i=t.view[r],o=e.options.lineWrapping,l=void 0,c=0;if(!i.hidden){if(s&&a<8){var u=i.node.offsetTop+i.node.offsetHeight;l=u-n,n=u}else{var d=i.node.getBoundingClientRect();l=d.bottom-d.top,!o&&i.text.firstChild&&(c=i.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=i.line.height-l;if((h>.005||h<-.005)&&(et(i.line,l),ei(i.line),i.rest))for(var f=0;f<i.rest.length;f++)ei(i.rest[f]);if(c>e.display.sizerWidth){var p=Math.ceil(c/Mr(e.display));p>e.display.maxLineLength&&(e.display.maxLineLength=p,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function ei(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function ti(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Gn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=nt(t,r),s=nt(t,i);if(n&&n.ensure){var a=n.ensure.from.line,l=n.ensure.to.line;a<o?(o=a,s=nt(t,sn(Je(t,a))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=s&&(o=nt(t,sn(Je(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function ni(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=A("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Gn(e.display))+"px;\n height: "+(t.bottom-t.top+Kn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function ri(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ot(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var s=!1,a=_r(e,t),l=n&&n!=t?_r(e,n):a,c=oi(e,i={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-r,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+r}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(hi(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(pi(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return i}function ii(e,t){var n=oi(e,t);null!=n.scrollTop&&hi(e,n.scrollTop),null!=n.scrollLeft&&pi(e,n.scrollLeft)}function oi(e,t){var n=e.display,r=Ar(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Xn(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+qn(n),l=t.top<r,c=t.bottom>a-r;if(t.top<i)s.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?a:t.bottom)-o);u!=i&&(s.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,f=Yn(e)-n.gutters.offsetWidth,p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?s.scrollLeft=0:t.left<h?s.scrollLeft=Math.max(0,t.left+d-(p?0:10)):t.right>f+h-3&&(s.scrollLeft=t.right+(p?0:10)-f),s}function si(e,t){null!=t&&(ui(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function ai(e){ui(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function li(e,t,n){null==t&&null==n||ui(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function ci(e,t){ui(e),e.curOp.scrollToPos=t}function ui(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,di(e,br(e,t.from),br(e,t.to),t.margin))}function di(e,t,n,r){var i=oi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});li(e,i.scrollLeft,i.scrollTop)}function hi(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||Zi(e,{top:t}),fi(e,t,!0),n&&Zi(e),Oi(e,100))}function fi(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function pi(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Vi(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mi(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+qn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Kn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vi=function(e,t,n){this.cm=n;var r=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),pe(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,s&&a<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vi.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},vi.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vi.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vi.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new U,this.disableVert=new U},vi.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},vi.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gi=function(){};function yi(e,t){t||(t=mi(e));var n=e.display.barWidth,r=e.display.barHeight;_i(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&$r(e),_i(e,mi(e)),n=e.display.barWidth,r=e.display.barHeight}function _i(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}gi.prototype.update=function(){return{bottom:0,right:0}},gi.prototype.setScrollLeft=function(){},gi.prototype.setScrollTop=function(){},gi.prototype.clear=function(){};var bi={native:vi,null:gi};function xi(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new bi[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?pi(e,t):hi(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var wi=0;function Si(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++wi},kn(e.curOp)}function Ci(e){var t=e.curOp;t&&Tn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;ki(e)}))}function ki(e){for(var t=e.ops,n=0;n<t.length;n++)Ei(t[n]);for(var r=0;r<t.length;r++)Ti(t[r]);for(var i=0;i<t.length;i++)Li(t[i]);for(var o=0;o<t.length;o++)Ai(t[o]);for(var s=0;s<t.length;s++)Mi(t[s])}function Ei(e){var t=e.cm,n=t.display;Bi(t),e.updateMaxLine&&ln(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Pi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Ti(e){e.updatedDisplay=e.mustUpdate&&zi(e.cm,e.update)}function Li(e){var t=e.cm,n=t.display;e.updatedDisplay&&$r(t),e.barMeasure=mi(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=er(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Kn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ai(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&pi(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yi(t,e.barMeasure),e.updatedDisplay&&qi(t,e.barMeasure),e.selectionChanged&&Kr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Yr(e.cm)}function Mi(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&Hi(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&fi(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&pi(t,e.scrollLeft,!0,!0),e.scrollToPos&&ni(t,ri(t,ht(r,e.scrollToPos.from),ht(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var s=0;s<i.length;++s)i[s].lines.length||ge(i[s],"hide");if(o)for(var a=0;a<o.length;++a)o[a].lines.length&&ge(o[a],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Di(e,t){if(e.curOp)return t();Si(e);try{return t()}finally{Ci(e)}}function Ii(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Si(e);try{return t.apply(e,arguments)}finally{Ci(e)}}}function Ni(e){return function(){if(this.curOp)return e.apply(this,arguments);Si(this);try{return e.apply(this,arguments)}finally{Ci(this)}}}function Ri(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Si(t);try{return e.apply(this,arguments)}finally{Ci(t)}}}function Oi(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,j(ji,e))}function ji(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=_t(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?Ve(t.mode,r.state):null,l=gt(e,o,r,!0);a&&(r.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<s.length;++h)d=s[h]!=o.styles[h];d&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return Oi(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Di(e,(function(){for(var t=0;t<i.length;t++)Br(e,i[t],"text")}))}}var Pi=function(e,t,n){var r=e.display;this.viewport=t,this.visible=ti(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Yn(e),this.force=n,this.dims=Dr(e),this.events=[]};function Bi(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Kn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Kn(e)+"px",t.scrollbarsClipped=!0)}function Ui(e){if(e.hasFocus())return null;var t=I();if(!t||!D(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&D(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}function Fi(e){if(e&&e.activeElt&&e.activeElt!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function zi(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return Ur(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hr(e))return!1;Ki(e)&&(Ur(e),t.dims=Dr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),s=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(i,n.viewTo)),Mt&&(o=tn(e.doc,o),s=nn(e.doc,s));var a=o!=n.viewFrom||s!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;zr(e,o,s),n.viewOffset=sn(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var l=Hr(e);if(!a&&0==l&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Ui(e);return l>4&&(n.lineDiv.style.display="none"),Wi(e,n.updateLineNumbers,t.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Fi(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,a&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Oi(e,400)),n.updateLineNumbers=null,!0}function Hi(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))r&&(t.visible=ti(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+qn(e.display)-Xn(e),n.top)}),t.visible=ti(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!zi(e,t))break;$r(e);var i=mi(e);Zr(e),yi(e,i),qi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Zi(e,t){var n=new Pi(e,t);if(zi(e,n)){$r(e),Hi(e,n);var r=mi(e);Zr(e),yi(e,r),qi(e,r),n.finish()}}function Wi(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,s=o.firstChild;function a(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;s!=h.node;)s=a(s);var f=i&&null!=t&&t<=u&&h.lineNumber;h.changes&&(F(h.changes,"gutter")>-1&&(f=!1),Dn(e,h,u,n)),f&&(T(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(it(e.options,u)))),s=h.node.nextSibling}else{var p=Un(e,h,u,n);o.insertBefore(p,s)}u+=h.size}for(;s;)s=a(s)}function Gi(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function qi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Kn(e)+"px"}function Vi(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=Ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",s=0;s<n.length;s++)if(!n[s].hidden){e.options.fixedGutter&&(n[s].gutter&&(n[s].gutter.style.left=o),n[s].gutterBackground&&(n[s].gutterBackground.style.left=o));var a=n[s].alignable;if(a)for(var l=0;l<a.length;l++)a[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function Ki(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=it(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,s=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-s)+1,r.lineNumWidth=r.lineNumInnerWidth+s,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Gi(e.display),!0}return!1}function Yi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],s=null;if("string"!=typeof o&&(s=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:s})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Xi(e){var t=e.gutters,n=e.gutterSpecs;T(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,s=i.style,a=t.appendChild(A("div",null,"CodeMirror-gutter "+o));s&&(a.style.cssText=s),"CodeMirror-linenumbers"==o&&(e.lineGutter=a,a.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Gi(e)}function Ji(e){Xi(e.display),Pr(e),Vi(e)}function Qi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=M("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=M("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=M("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+z+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),s&&a<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&g||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Yi(i.gutters,i.lineNumbers),Xi(o),r.init(o)}Pi.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},Pi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var $i=0,eo=null;function to(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function no(e){var t=to(e);return t.x*=eo,t.y*=eo,t}function ro(e,t){var r=to(t),i=r.x,o=r.y,s=e.display,a=s.scroller,c=a.scrollWidth>a.clientWidth,u=a.scrollHeight>a.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var h=t.target,f=s.view;h!=a;h=h.parentNode)for(var p=0;p<f.length;p++)if(f[p].node==h){e.display.currentWheelTarget=h;break e}if(i&&!n&&!d&&null!=eo)return o&&u&&hi(e,Math.max(0,a.scrollTop+o*eo)),pi(e,Math.max(0,a.scrollLeft+i*eo)),(!o||o&&u)&&we(t),void(s.wheelStartX=null);if(o&&null!=eo){var m=o*eo,v=e.doc.scrollTop,g=v+s.wrapper.clientHeight;m<0?v=Math.max(0,v+m-50):g=Math.min(e.doc.height,g+m+50),Zi(e,{top:v,bottom:g})}$i<20&&(null==s.wheelStartX?(s.wheelStartX=a.scrollLeft,s.wheelStartY=a.scrollTop,s.wheelDX=i,s.wheelDY=o,setTimeout((function(){if(null!=s.wheelStartX){var e=a.scrollLeft-s.wheelStartX,t=a.scrollTop-s.wheelStartY,n=t&&s.wheelDY&&t/s.wheelDY||e&&s.wheelDX&&e/s.wheelDX;s.wheelStartX=s.wheelStartY=null,n&&(eo=(eo*$i+n)/($i+1),++$i)}}),200)):(s.wheelDX+=i,s.wheelDY+=o))}}s?eo=-.53:n?eo=15:u?eo=-.7:h&&(eo=-1/3);var io=function(e,t){this.ranges=e,this.primIndex=t};io.prototype.primary=function(){return this.ranges[this.primIndex]},io.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!at(n.anchor,r.anchor)||!at(n.head,r.head))return!1}return!0},io.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new oo(lt(this.ranges[t].anchor),lt(this.ranges[t].head));return new io(e,this.primIndex)},io.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},io.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(st(t,r.from())>=0&&st(e,r.to())<=0)return n}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function so(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return st(e.from(),t.from())})),n=F(t,i);for(var o=1;o<t.length;o++){var s=t[o],a=t[o-1],l=st(a.to(),s.from());if(r&&!s.empty()?l>0:l>=0){var c=ut(a.from(),s.from()),u=ct(a.to(),s.to()),d=a.empty()?s.from()==s.head:a.from()==a.head;o<=n&&--n,t.splice(--o,2,new oo(d?u:c,d?c:u))}}return new io(t,n)}function ao(e,t){return new io([new oo(e,t||e)],0)}function lo(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function co(e,t){if(st(e,t.from)<0)return e;if(st(e,t.to)<=0)return lo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=lo(t).ch-t.to.ch),ot(n,r)}function uo(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new oo(co(i.anchor,t),co(i.head,t)))}return so(e.cm,n,e.sel.primIndex)}function ho(e,t,n){return e.line==t.line?ot(n.line,e.ch-t.ch+n.ch):ot(n.line+(e.line-t.line),e.ch)}function fo(e,t,n){for(var r=[],i=ot(e.first,0),o=i,s=0;s<t.length;s++){var a=t[s],l=ho(a.from,i,o),c=ho(lo(a),i,o);if(i=a.to,o=c,"around"==n){var u=e.sel.ranges[s],d=st(u.head,u.anchor)<0;r[s]=new oo(d?c:l,d?l:c)}else r[s]=new oo(l,l)}return new io(r,e.sel.primIndex)}function po(e){e.doc.mode=We(e.options,e.doc.modeOption),mo(e)}function mo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Oi(e,100),e.state.modeGen++,e.curOp&&Pr(e)}function vo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){un(e,n,i,r),An(e,"change",e,t)}function s(e,t){for(var n=[],o=e;o<t;++o)n.push(new cn(c[o],i(o),r));return n}var a=t.from,l=t.to,c=t.text,u=Je(e,a.line),d=Je(e,l.line),h=Y(c),f=i(c.length-1),p=l.line-a.line;if(t.full)e.insert(0,s(0,c.length)),e.remove(c.length,e.size-c.length);else if(vo(e,t)){var m=s(0,c.length-1);o(d,d.text,f),p&&e.remove(a.line,p),m.length&&e.insert(a.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,a.ch)+h+u.text.slice(l.ch),f);else{var v=s(1,c.length-1);v.push(new cn(h+u.text.slice(l.ch),f,r)),o(u,u.text.slice(0,a.ch)+c[0],i(0)),e.insert(a.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,a.ch)+c[0]+d.text.slice(l.ch),i(0)),e.remove(a.line+1,p);else{o(u,u.text.slice(0,a.ch)+c[0],i(0)),o(d,h+d.text.slice(l.ch),f);var g=s(1,c.length-1);p>1&&e.remove(a.line+1,p-1),e.insert(a.line+1,g)}An(e,"change",e,t)}function yo(e,t,n){function r(e,i,o){if(e.linked)for(var s=0;s<e.linked.length;++s){var a=e.linked[s];if(a.doc!=i){var l=o&&a.sharedHist;n&&!l||(t(a.doc,l),r(a.doc,e,l))}}}r(e,null,!0)}function _o(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Rr(e),po(e),bo(e),e.options.lineWrapping||ln(e),e.options.mode=t.modeOption,Pr(e)}function bo(e){("rtl"==e.doc.direction?N:E)(e.display.lineDiv,"CodeMirror-rtl")}function xo(e){Di(e,(function(){bo(e),Pr(e)}))}function wo(e){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=e||1}function So(e,t){var n={from:lt(t.from),to:lo(t),text:Qe(e,t.from,t.to)};return Mo(e,n,t.from.line,t.to.line+1),yo(e,(function(e){return Mo(e,n,t.from.line,t.to.line+1)}),!0),n}function Co(e){for(;e.length&&Y(e).ranges;)e.pop()}function ko(e,t){return t?(Co(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function Eo(e,t,n,r){var i=e.history;i.undone.length=0;var o,s,a=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=ko(i,i.lastOp==r)))s=Y(o.changes),0==st(t.from,t.to)&&0==st(t.from,s.to)?s.to=lo(t):o.changes.push(So(e,t));else{var l=Y(i.done);for(l&&l.ranges||Ao(e.sel,i.done),o={changes:[So(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=a,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,s||ge(e,"historyAdded")}function To(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Lo(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||To(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Ao(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Co(i.undone)}function Ao(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Mo(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Do(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Io(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push(Do(n[i]));return r}function No(e,t){var n=Io(e,t),r=Ut(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],s=r[i];if(o&&s)e:for(var a=0;a<s.length;++a){for(var l=s[a],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else s&&(n[i]=s)}return n}function Ro(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?io.prototype.deepCopy.call(o):o);else{var s=o.changes,a=[];r.push({changes:a});for(var l=0;l<s.length;++l){var c=s[l],u=void 0;if(a.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&F(t,Number(u[1]))>-1&&(Y(a)[d]=c[d],delete c[d])}}}return r}function Oo(e,t,n,r){if(r){var i=e.anchor;if(n){var o=st(t,i)<0;o!=st(n,i)<0?(i=t,t=n):o!=st(t,n)<0&&(t=n)}return new oo(i,t)}return new oo(n||t,t)}function jo(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Ho(e,new io([Oo(e.sel.primary(),t,n,i)],0),r)}function Po(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Oo(e.sel.ranges[o],t[o],null,i);Ho(e,so(e.cm,r,e.sel.primIndex),n)}function Bo(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,Ho(e,so(e.cm,i,e.sel.primIndex),r)}function Uo(e,t,n,r){Ho(e,ao(t,n),r)}function Fo(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new oo(ht(e,t[n].anchor),ht(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,r),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?so(e.cm,r.ranges,r.ranges.length-1):t}function zo(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=t,Zo(e,t,n)):Ho(e,t,n)}function Ho(e,t,n){Zo(e,t,n),Lo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function Zo(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=Fo(e,t,n));var r=n&&n.bias||(st(t.primary().head,e.sel.primary().head)<0?-1:1);Wo(e,qo(e,t,r,!0)),n&&!1===n.scroll||!e.cm||ai(e.cm)}function Wo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,_e(e.cm)),An(e,"cursorActivity",e))}function Go(e){Wo(e,qo(e,e.sel,null,!1))}function qo(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var s=t.ranges[o],a=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=Ko(e,s.anchor,a&&a.anchor,n,r),c=Ko(e,s.head,a&&a.head,n,r);(i||l!=s.anchor||c!=s.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new oo(l,c))}return i?so(e.cm,i,t.primIndex):t}function Vo(e,t,n,r,i){var o=Je(e,t.line);if(o.markedSpans)for(var s=0;s<o.markedSpans.length;++s){var a=o.markedSpans[s],l=a.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==a.from||(c?a.from<=t.ch:a.from<t.ch))&&(null==a.to||(u?a.to>=t.ch:a.to>t.ch))){if(i&&(ge(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),h=void 0;if((r<0?u:c)&&(d=Yo(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=st(d,n))&&(r<0?h<0:h>0))return Vo(e,d,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?c:u)&&(f=Yo(e,f,r,f.line==t.line?o:null)),f?Vo(e,f,t,r,i):null}}return t}function Ko(e,t,n,r,i){var o=r||1,s=Vo(e,t,n,o,i)||!i&&Vo(e,t,n,o,!0)||Vo(e,t,n,-o,i)||!i&&Vo(e,t,n,-o,!0);return s||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ht(e,ot(t.line-1)):null:n>0&&t.ch==(r||Je(e,t.line)).text.length?t.line<e.first+e.size-1?ot(t.line+1,0):null:new ot(t.line,t.ch+n)}function Xo(e){e.setSelection(ot(e.firstLine(),0),ot(e.lastLine()),Z)}function Jo(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=ht(e,t)),n&&(r.to=ht(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ge(e,"beforeChange",e,r),e.cm&&ge(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Qo(e,t,n){if(e.cm){if(!e.cm.curOp)return Ii(e.cm,Qo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=Jo(e,t,!0))){var r=At&&!n&&zt(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)$o(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else $o(e,t)}}function $o(e,t){if(1!=t.text.length||""!=t.text[0]||0!=st(t.from,t.to)){var n=uo(e,t);Eo(e,t,n,e.cm?e.cm.curOp.id:NaN),ns(e,t,n,Ut(e,t));var r=[];yo(e,(function(e,n){n||-1!=F(r,e.history)||(as(e.history,t),r.push(e.history)),ns(e,t,null,Ut(e,t))}))}}function es(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,s=e.sel,a="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<a.length&&(i=a[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=a.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=a.pop()).ranges){if(r)return void a.push(i);break}if(Ao(i,l),n&&!i.equals(e.sel))return void Ho(e,i,{clearRedo:!1});s=i}var u=[];Ao(s,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),h=function(n){var r=i.changes[n];if(r.origin=t,d&&!Jo(e,r,!1))return a.length=0,{};u.push(So(e,r));var o=n?uo(e,r):Y(a);ns(e,r,o,No(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:lo(r)});var s=[];yo(e,(function(e,t){t||-1!=F(s,e.history)||(as(e.history,r),s.push(e.history)),ns(e,r,null,No(e,r))}))},f=i.changes.length-1;f>=0;--f){var p=h(f);if(p)return p.v}}}}function ts(e,t){if(0!=t&&(e.first+=t,e.sel=new io(X(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Pr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)Br(e.cm,r,"gutter")}}function ns(e,t,n,r){if(e.cm&&!e.cm.curOp)return Ii(e.cm,ns)(e,t,n,r);if(t.to.line<e.first)ts(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);ts(e,i),t={from:ot(e.first,0),to:ot(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ot(o,Je(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qe(e,t.from,t.to),n||(n=uo(e,t)),e.cm?rs(e.cm,t,r):go(e,t,r),Zo(e,n,Z),e.cantEdit&&Ko(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function rs(e,t,n){var r=e.doc,i=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=tt(Qt(Je(r,o.line))),r.iter(l,s.line+1,(function(e){if(e==i.maxLine)return a=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&_e(e),go(r,t,n,Nr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=an(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,a=!1)})),a&&(e.curOp.updateMaxLine=!0)),Lt(r,o.line),Oi(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?Pr(e):o.line!=s.line||1!=t.text.length||vo(e.doc,t)?Pr(e,o.line,s.line+1,c):Br(e,o.line,"text");var u=be(e,"changes"),d=be(e,"change");if(d||u){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&An(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function is(e,t,n,r,i){var o;r||(r=n),st(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Qo(e,{from:n,to:r,text:t,origin:i})}function os(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function ss(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],s=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var a=0;a<o.ranges.length;a++)os(o.ranges[a].anchor,t,n,r),os(o.ranges[a].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=ot(c.from.line+r,c.from.ch),c.to=ot(c.to.line+r,c.to.ch);else if(t<=c.to.line){s=!1;break}}s||(e.splice(0,i+1),i=0)}}}function as(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;ss(e.done,n,r,i),ss(e.undone,n,r,i)}function ls(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Je(e,dt(e,t)):i=tt(t),null==i?null:(r(o,i)&&e.cm&&Br(e.cm,i,n),o)}function cs(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function us(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}oo.prototype.from=function(){return ut(this.anchor,this.head)},oo.prototype.to=function(){return ct(this.anchor,this.head)},oo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},cs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,dn(i),An(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},us.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),s=r.height;if(r.removeInner(e,o),this.height-=s-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof cs))){var a=[];this.collapse(a),this.children=[new cs(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var s=i.lines.length%25+25,a=s;a<i.lines.length;){var l=new cs(i.lines.slice(a,a+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,s),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new us(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=F(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new us(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var s=Math.min(t,o-e);if(i.iterN(e,s,n))return!0;if(0==(t-=s))break;e=0}else e-=o}}};var ds=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function hs(e,t,n){sn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&si(e,n)}function fs(e,t,n,r){var i=new ds(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),ls(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!rn(e,t)){var r=sn(t)<e.scrollTop;et(t,t.height+Zn(i)),r&&si(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&An(o,"lineWidgetAdded",o,i,"number"==typeof t?t:tt(t)),i}ds.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=tt(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=Zn(this);et(n,Math.max(0,n.height-o)),e&&(Di(e,(function(){hs(e,n,-o),Br(e,r,"widget")})),An(e,"lineWidgetCleared",e,this,r))}},ds.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=Zn(this)-t;i&&(rn(this.doc,r)||et(r,r.height+i),n&&Di(n,(function(){n.curOp.forceUpdate=!0,hs(n,r,i),An(n,"lineWidgetChanged",n,e,tt(r))})))},xe(ds);var ps=0,ms=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ps};function vs(e,t,n,r,i){if(r&&r.shared)return ys(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return Ii(e.cm,vs)(e,t,n,r,i);var o=new ms(e,i),s=st(t,n);if(r&&P(r,o,!1),s>0||0==s&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=M("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Jt(e,t.line,t,n,o)||t.line!=n.line&&Jt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");It()}o.addToHistory&&Eo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var a,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Qt(e)==c.display.maxLine&&(a=!0),o.collapsed&&l!=t.line&&et(e,0),jt(e,new Nt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),o.clearOnEnter&&pe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Dt(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++ps,o.atomic=!0),c){if(a&&(c.curOp.updateMaxLine=!0),o.collapsed)Pr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Br(c,u,"text");o.atomic&&Go(c.doc),An(c,"markerAdded",c,o)}return o}ms.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Si(e),be(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var s=this.lines[o],a=Rt(s.markedSpans,this);e&&!this.collapsed?Br(e,tt(s),"text"):e&&(null!=a.to&&(i=tt(s)),null!=a.from&&(r=tt(s))),s.markedSpans=Ot(s.markedSpans,a),null==a.from&&this.collapsed&&!rn(this.doc,s)&&e&&et(s,Ar(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Qt(this.lines[l]),u=an(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&Pr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Go(e.doc)),e&&An(e,"markerCleared",e,this,r,i),t&&Ci(e),this.parent&&this.parent.clear()}},ms.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],s=Rt(o.markedSpans,this);if(null!=s.from&&(n=ot(t?o:tt(o),s.from),-1==e))return n;if(null!=s.to&&(r=ot(t?o:tt(o),s.to),1==e))return r}return n&&{from:n,to:r}},ms.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Di(r,(function(){var i=t.line,o=tt(t.line),s=tr(r,o);if(s&&(ur(s),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!rn(n.doc,i)&&null!=n.height){var a=n.height;n.height=null;var l=Zn(n)-a;l&&et(i,i.height+l)}An(r,"markerChanged",r,e)}))},ms.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=F(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ms.prototype.detachLine=function(e){if(this.lines.splice(F(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(ms);var gs=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ys(e,t,n,r,i){(r=P(r)).shared=!1;var o=[vs(e,t,n,r,i)],s=o[0],a=r.widgetNode;return yo(e,(function(e){a&&(r.widgetNode=a.cloneNode(!0)),o.push(vs(e,ht(e,t),ht(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;s=Y(o)})),new gs(o,s)}function _s(e){return e.findMarks(ot(e.first,0),e.clipPos(ot(e.lastLine())),(function(e){return e.parent}))}function bs(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),s=e.clipPos(i.to);if(st(o,s)){var a=vs(e,o,s,r.primary,r.primary.type);r.markers.push(a),a.parent=r}}}function xs(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];yo(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==F(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}gs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();An(this,"clear")}},gs.prototype.find=function(e,t){return this.primary.find(e,t)},xe(gs);var ws=0,Ss=function(e,t,n,r,i){if(!(this instanceof Ss))return new Ss(e,t,n,r,i);null==n&&(n=0),us.call(this,[new cs([new cn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ot(n,0);this.sel=ao(o),this.history=new wo(null),this.id=++ws,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),Ho(this,ao(o),Z)};Ss.prototype=$(us.prototype,{constructor:Ss,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=$e(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Ri((function(e){var t=ot(this.first,0),n=this.first+this.size-1;Qo(this,{from:t,to:ot(n,Je(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&li(this.cm,0,0),Ho(this,ao(t),Z)})),replaceRange:function(e,t,n,r){is(this,e,t=ht(this,t),n=n?ht(this,n):t,r)},getRange:function(e,t,n){var r=Qe(this,ht(this,e),ht(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(rt(this,e))return Je(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Je(this,e)),Qt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ht(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Ri((function(e,t,n){Uo(this,ht(this,"number"==typeof e?ot(e,t||0):e),null,n)})),setSelection:Ri((function(e,t,n){Uo(this,ht(this,e),ht(this,t||e),n)})),extendSelection:Ri((function(e,t,n){jo(this,ht(this,e),t&&ht(this,t),n)})),extendSelections:Ri((function(e,t){Po(this,pt(this,e),t)})),extendSelectionsBy:Ri((function(e,t){Po(this,pt(this,X(this.sel.ranges,e)),t)})),setSelections:Ri((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new oo(ht(this,e[i].anchor),ht(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ho(this,so(this.cm,r,t),n)}})),addSelection:Ri((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new oo(ht(this,e),ht(this,t||e))),Ho(this,so(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Qe(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Qe(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:Ri((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var s=i.ranges[o];r[o]={from:s.from(),to:s.to(),text:this.splitLines(e[o]),origin:n}}for(var a=t&&"end"!=t&&fo(this,r,t),l=r.length-1;l>=0;l--)Qo(this,r[l]);a?zo(this,a):this.cm&&ai(this.cm)})),undo:Ri((function(){es(this,"undo")})),redo:Ri((function(){es(this,"redo")})),undoSelection:Ri((function(){es(this,"undo",!0)})),redoSelection:Ri((function(){es(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new wo(this.history.maxGeneration),yo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ro(this.history.done),undone:Ro(this.history.undone)}},setHistory:function(e){var t=this.history=new wo(this.history.maxGeneration);t.done=Ro(e.done.slice(0),null,!0),t.undone=Ro(e.undone.slice(0),null,!0)},setGutterMarker:Ri((function(e,t,n){return ls(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&re(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:Ri((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&ls(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,re(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!rt(this,e))return null;if(t=e,!(e=Je(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Ri((function(e,t,n){return ls(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:Ri((function(e,t,n){return ls(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var s=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&s!=i.length?" ":"")+i.slice(s)||null}return!0}))})),addLineWidget:Ri((function(e,t,n){return fs(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return vs(this,ht(this,e),ht(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return vs(this,e=ht(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Je(this,(e=ht(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=ht(this,e),t=ht(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var s=o.markedSpans;if(s)for(var a=0;a<s.length;a++){var l=s[a];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),ht(this,ot(n,t))},indexFromPos:function(e){var t=(e=ht(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Ss($e(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Ss($e(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],bs(r,_s(this)),r},unlinkDoc:function(e){if(e instanceof Pa&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),xs(_s(this));break}if(e.history==this.history){var n=[e.id];yo(e,(function(e){return n.push(e.id)}),!0),e.history=new wo(null),e.history.done=Ro(this.history.done,n),e.history.undone=Ro(this.history.undone,n)}},iterLinkedDocs:function(e){yo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Re(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Ri((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&xo(this.cm))}))}),Ss.prototype.eachLine=Ss.prototype.iter;var Cs=0;function ks(e){var t=this;if(Ls(t),!ye(t,e)&&!Wn(t.display,e)){we(e),s&&(Cs=+new Date);var n=Or(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),a=0,l=function(){++a==i&&Ii(t,(function(){var e={from:n=ht(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Qo(t.doc,e),zo(t.doc,ao(ht(t.doc,n),ht(t.doc,lo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==F(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),Zo(t.doc,ao(n,n)),h)for(var f=0;f<h.length;++f)is(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Es(e,t){if(s&&(!e.state.draggingText||+new Date-Cs<100))ke(t);else if(!ye(e,t)&&!Wn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Ts(e,t){var n=Or(e,t);if(n){var r=document.createDocumentFragment();Gr(e,n,r),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),L(e.display.dragCursor,r)}}function Ls(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function As(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Ms=!1;function Ds(){Ms||(Is(),Ms=!0)}function Is(){var e;pe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,As(Ns)}),100))})),pe(window,"blur",(function(){return As(Qr)}))}function Ns(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Rs={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"},Os=0;Os<10;Os++)Rs[Os+48]=Rs[Os+96]=String(Os);for(var js=65;js<=90;js++)Rs[js]=String.fromCharCode(js);for(var Ps=1;Ps<=12;Ps++)Rs[Ps+111]=Rs[Ps+63235]="F"+Ps;var Bs={};function Us(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var s=0;s<o.length-1;s++){var a=o[s];if(/^(cmd|meta|m)$/i.test(a))i=!0;else if(/^a(lt)?$/i.test(a))t=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else{if(!/^s(hift)?$/i.test(a))throw new Error("Unrecognized modifier name: "+a);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function Fs(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=X(n.split(" "),Us),o=0;o<i.length;o++){var s=void 0,a=void 0;o==i.length-1?(a=i.join(" "),s=r):(a=i.slice(0,o+1).join(" "),s="...");var l=t[a];if(l){if(l!=s)throw new Error("Inconsistent bindings for "+a)}else t[a]=s}delete e[n]}for(var c in t)e[c]=t[c];return e}function zs(e,t,n,r){var i=(t=Gs(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return zs(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var s=zs(e,t.fallthrough[o],n,r);if(s)return s}}}function Hs(e){var t="string"==typeof e?e:Rs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Zs(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(w?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(w?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ws(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Rs[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Zs(n,e,t))}function Gs(e){return"string"==typeof e?Bs[e]:e}function qs(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&st(o.from,Y(r).to)<=0;){var s=r.pop();if(st(s.from,o.from)<0){o.from=s.from;break}}r.push(o)}Di(e,(function(){for(var t=r.length-1;t>=0;t--)is(e.doc,"",r[t].from,r[t].to,"+delete");ai(e)}))}function Vs(e,t,n){var r=se(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ks(e,t,n){var r=Vs(e,t.ch,n);return null==r?null:new ot(t.line,r,n<0?"after":"before")}function Ys(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=he(n,t.doc.direction);if(o){var s,a=i<0?Y(o):o[0],l=i<0==(1==a.level)?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var c=nr(t,n);s=i<0?n.text.length-1:0;var u=rr(t,c,s).top;s=ae((function(e){return rr(t,c,e).top==u}),i<0==(1==a.level)?a.from:a.to-1,s),"before"==l&&(s=Vs(n,s,1))}else s=i<0?a.to:a.from;return new ot(r,s,l)}}return new ot(r,i<0?n.text.length:0,i<0?"before":"after")}function Xs(e,t,n,r){var i=he(t,e.doc.direction);if(!i)return Ks(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(i,n.ch,n.sticky),s=i[o];if("ltr"==e.doc.direction&&s.level%2==0&&(r>0?s.to>n.ch:s.from<n.ch))return Ks(t,n,r);var a,l=function(e,n){return Vs(t,e instanceof ot?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(a=a||nr(e,t),Cr(e,t,a,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==s.level){var d=1==s.level==r<0,h=l(n,d?1:-1);if(null!=h&&(d?h<=s.to&&h<=u.end:h>=s.from&&h>=u.begin)){var f=d?"before":"after";return new ot(n.line,h,f)}}var p=function(e,t,r){for(var o=function(e,t){return t?new ot(n.line,l(e,1),"before"):new ot(n.line,e,"after")};e>=0&&e<i.length;e+=t){var s=i[e],a=t>0==(1!=s.level),c=a?r.begin:l(r.end,-1);if(s.from<=c&&c<s.to)return o(c,a);if(c=a?s.from:l(s.to,-1),r.begin<=c&&c<r.end)return o(c,a)}},m=p(o+r,r,u);if(m)return m;var v=r>0?u.end:l(u.begin,-1);return null==v||r>0&&v==t.text.length||!(m=p(r>0?0:i.length-1,r,c(v)))?null:m}Bs.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"},Bs.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"},Bs.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"},Bs.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"]},Bs.default=y?Bs.macDefault:Bs.pcDefault;var Js={selectAll:Xo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Z)},killLine:function(e){return qs(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ot(t.head.line+1,0)}:{from:t.head,to:ot(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return qs(e,(function(t){return{from:ot(t.from().line,0),to:ht(e.doc,ot(t.to().line+1,0))}}))},delLineLeft:function(e){return qs(e,(function(e){return{from:ot(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return qs(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return qs(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ot(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ot(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Qs(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ea(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return $s(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),G)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),G)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ea(e,t.head):r}),G)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),s=B(e.getLine(o.line),o.ch,r);t.push(K(r-s%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Je(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ot(i.line,i.ch-1)),i.ch>0)i=new ot(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ot(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var s=Je(e.doc,i.line-1).text;s&&(i=new ot(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),ot(i.line-1,s.length-1),i,"+transpose"))}n.push(new oo(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return Di(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);ai(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qs(e,t){var n=Je(e.doc,t),r=Qt(n);return r!=n&&(t=tt(r)),Ys(!0,e,r,t,1)}function $s(e,t){var n=Je(e.doc,t),r=$t(n);return r!=n&&(t=tt(r)),Ys(!0,e,n,t,-1)}function ea(e,t){var n=Qs(e,t.line),r=Je(e.doc,n.line),i=he(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return ot(n.line,s?0:o,n.sticky)}return n}function ta(e,t,n){if("string"==typeof t&&!(t=Js[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=H}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function na(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=zs(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&zs(t,e.options.extraKeys,n,e)||zs(t,e.options.keyMap,n,e)}var ra=new U;function ia(e,t,n,r){var i=e.state.keySeq;if(i){if(Hs(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ra.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),oa(e,i+" "+t,n,r))return!0}return oa(e,t,n,r)}function oa(e,t,n,r){var i=na(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&An(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(we(n),Kr(e)),!!i}function sa(e,t){var n=Ws(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?ia(e,"Shift-"+n,t,(function(t){return ta(e,t,!0)}))||ia(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return ta(e,t)})):ia(e,n,t,(function(t){return ta(e,t)})))}function aa(e,t,n){return ia(e,"'"+n+"'",t,(function(t){return ta(e,t,!0)}))}var la=null;function ca(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=I(),ye(t,e)))){s&&a<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=sa(t,e);d&&(la=i?r:null,i||88!=r||je||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ua(t)}}function ua(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(E(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}N(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n)}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function ha(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Wn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(d&&n==la)return la=null,void we(e);if(!d||e.which&&!(e.which<10)||!sa(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(aa(t,e,i)||t.display.input.onKeyPress(e))}}}var fa,pa,ma=400,va=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e,t){var n=+new Date;return pa&&pa.compare(n,e,t)?(fa=pa=null,"triple"):fa&&fa.compare(n,e,t)?(pa=new va(n,e,t),fa=null,"double"):(fa=new va(n,e,t),pa=null,"single")}function ya(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Wn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Ta(t,e)){var r=Or(t,e),i=Te(e),o=r?ga(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&_a(t,i,r,o,e)||(1==i?r?xa(t,r,o,e):Ee(e)==n.scroller&&we(e):2==i?(r&&jo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(S?t.display.input.onContextMenu(e):Xr(t)))}}function _a(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),ia(e,Zs(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=Js[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=H}finally{e.state.suppressEdits=!1}return r}))}function ba(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=_?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}function xa(e,t,n,r){s?setTimeout(j(Yr,e),0):e.curOp.focus=I();var i,o=ba(e,n,r),a=e.doc.sel;e.options.dragDrop&&Me&&!e.isReadOnly()&&"single"==n&&(i=a.contains(t))>-1&&(st((i=a.ranges[i]).from(),t)<0||t.xRel>0)&&(st(i.to(),t)>0||t.xRel<0)?wa(e,r,t,o):Ca(e,r,t,o)}function wa(e,t,n,r){var i=e.display,o=!1,c=Ii(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,ve(i.wrapper.ownerDocument,"mouseup",c),ve(i.wrapper.ownerDocument,"mousemove",u),ve(i.scroller,"dragstart",d),ve(i.scroller,"drop",c),o||(we(t),r.addNew||jo(e.doc,n,null,null,r.extend),l&&!h||s&&9==a?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),Xr(e),setTimeout((function(){return i.input.focus()}),20)}function Sa(e,t,n){if("char"==n)return new oo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new oo(ot(t.line,0),ht(e.doc,ot(t.line+1,0)));var r=n(e,t);return new oo(r.from,r.to)}function Ca(e,t,n,r){var i=e.display,o=e.doc;we(t);var s,a,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(a=o.sel.contains(n),s=a>-1?c[a]:new oo(n,n)):(s=o.sel.primary(),a=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new oo(n,n)),n=Or(e,t,!0,!0),a=-1;else{var u=Sa(e,n,r.unit);s=r.extend?Oo(s,u.anchor,u.head,r.extend):u}r.addNew?-1==a?(a=c.length,Ho(o,so(e,c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==r.unit&&!r.extend?(Ho(o,so(e,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Bo(o,a,s,W):(a=0,Ho(o,new io([s],0),W),l=o.sel);var d=n;function h(t){if(0!=st(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=B(Je(o,n.line).text,n.ch,c),h=B(Je(o,t.line).text,t.ch,c),f=Math.min(u,h),p=Math.max(u,h),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Je(o,m).text,y=q(g,f,c);f==p?i.push(new oo(ot(m,y),ot(m,y))):g.length>y&&i.push(new oo(ot(m,y),ot(m,q(g,p,c))))}i.length||i.push(new oo(n,n)),Ho(o,so(e,l.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var _,b=s,x=Sa(e,t,r.unit),w=b.anchor;st(x.anchor,w)>0?(_=x.head,w=ut(b.from(),x.anchor)):(_=x.anchor,w=ct(b.to(),x.head));var S=l.ranges.slice(0);S[a]=ka(e,new oo(ht(o,w),_)),Ho(o,so(e,S,a),W)}}var f=i.wrapper.getBoundingClientRect(),p=0;function m(t){var n=++p,s=Or(e,t,!0,"rectangle"==r.unit);if(s)if(0!=st(s,d)){e.curOp.focus=I(),h(s);var a=ti(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(Ii(e,(function(){p==n&&m(t)})),150)}else{var l=t.clientY<f.top?-20:t.clientY>f.bottom?20:0;l&&setTimeout(Ii(e,(function(){p==n&&(i.scroller.scrollTop+=l,m(t))})),50)}}function v(t){e.state.selectingText=!1,p=1/0,t&&(we(t),i.input.focus()),ve(i.wrapper.ownerDocument,"mousemove",g),ve(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var g=Ii(e,(function(e){0!==e.buttons&&Te(e)?m(e):v(e)})),y=Ii(e,v);e.state.selectingText=y,pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",y)}function ka(e,t){var n=t.anchor,r=t.head,i=Je(e.doc,n.line);if(0==st(n,r)&&n.sticky==r.sticky)return t;var o=he(i);if(!o)return t;var s=ue(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var l,c=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,r.ch,r.sticky),d=u-s||(r.ch-n.ch)*(1==a.level?-1:1);l=u==c-1||u==c?d<0:d>0}var h=o[c+(l?-1:0)],f=l==(1==h.level),p=f?h.from:h.to,m=f?"after":"before";return n.ch==p&&n.sticky==m?t:new oo(new ot(n.line,p,m),r)}function Ea(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!be(e,n))return Ce(t);o-=a.top-s.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=s.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return ge(e,n,e,nt(e.doc,o),e.display.gutterSpecs[l].className,t),Ce(t)}}function Ta(e,t){return Ea(e,t,"gutterClick",!0)}function La(e,t){Wn(e.display,t)||Aa(e,t)||ye(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Aa(e,t){return!!be(e,"gutterContextMenu")&&Ea(e,t,"gutterContextMenu",!1)}function Ma(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hr(e)}va.prototype.compare=function(e,t,n){return this.time+ma>e&&0==st(t,this.pos)&&n==this.button};var Da={toString:function(){return"CodeMirror.Init"}},Ia={},Na={};function Ra(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Da&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Da,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,po(e)}),!0),n("indentUnit",2,po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){mo(e),hr(e),Pr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(ot(r,o))}r++}));for(var i=n.length-1;i>=0;i--)is(e.doc,t,n[i],ot(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Da&&e.refresh()})),n("specialCharPlaceholder",vn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Ma(e),Ji(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Gs(t),i=n!=Da&&Gs(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,ja,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yi(t,e.options.lineNumbers),Ji(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Ir(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yi(e)}),!0),n("scrollbarStyle","native",(function(e){xi(e),yi(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yi(e.options.gutters,t),Ji(e)}),!0),n("firstLineNumber",1,Ji,!0),n("lineNumberFormatter",(function(e){return e}),Ji,!0),n("showCursorWhenSelecting",!1,Zr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Qr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Oa),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Zr,!0),n("singleCursorHeightPerLine",!0,Zr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Oa(e,t,n){if(!t!=!(n&&n!=Da)){var r=e.display.dragFunctions,i=t?pe:ve;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function ja(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),ln(e)),Rr(e),Pr(e),hr(e),setTimeout((function(){return yi(e)}),100)}function Pa(e,t){var n=this;if(!(this instanceof Pa))return new Pa(e,t);this.options=t=t?P(t):{},P(Ia,t,!1);var r=t.value;"string"==typeof r?r=new Ss(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Pa.inputStyles[t.inputStyle](this),o=this.display=new Qi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,Ma(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),xi(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 U,keySeq:null,specialChars:null},t.autofocus&&!g&&o.input.focus(),s&&a<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Ba(this),Ds(),Si(this),this.curOp.forceUpdate=!0,_o(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Jr(n)}),20):Qr(this),Na)Na.hasOwnProperty(c)&&Na[c](this,t[c],Da);Ki(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ua.length;++u)Ua[u](this);Ci(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Ba(e){var t=e.display;pe(t.scroller,"mousedown",Ii(e,ya)),pe(t.scroller,"dblclick",s&&a<11?Ii(e,(function(t){if(!ye(e,t)){var n=Or(e,t);if(n&&!Ta(e,t)&&!Wn(e.display,t)){we(t);var r=e.findWordAt(n);jo(e.doc,r.anchor,r.head)}}})):function(t){return ye(e,t)||we(t)}),pe(t.scroller,"contextmenu",(function(t){return La(e,t)})),pe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||La(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function l(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",(function(i){if(!ye(e,i)&&!o(i)&&!Ta(e,i)){t.input.ensurePolled(),clearTimeout(n);var s=+new Date;t.activeTouch={start:s,moved:!1,prev:s-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),pe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),pe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!Wn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var o,s=e.coordsChar(t.activeTouch,"page");o=!r.prev||l(r,r.prev)?new oo(s,s):!r.prev.prev||l(r,r.prev.prev)?e.findWordAt(s):new oo(ot(s.line,0),ht(e.doc,ot(s.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),we(n)}i()})),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(hi(e,t.scroller.scrollTop),pi(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),pe(t.scroller,"mousewheel",(function(t){return ro(e,t)})),pe(t.scroller,"DOMMouseScroll",(function(t){return ro(e,t)})),pe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||ke(t)},over:function(t){ye(e,t)||(Ts(e,t),ke(t))},start:function(t){return Es(e,t)},drop:Ii(e,ks),leave:function(t){ye(e,t)||Ls(e)}};var c=t.input.getField();pe(c,"keyup",(function(t){return da.call(e,t)})),pe(c,"keydown",Ii(e,ca)),pe(c,"keypress",Ii(e,ha)),pe(c,"focus",(function(t){return Jr(e,t)})),pe(c,"blur",(function(t){return Qr(e,t)}))}Pa.defaults=Ia,Pa.optionHandlers=Na;var Ua=[];function Fa(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=_t(e,t).state:n="prev");var s=e.options.tabSize,a=Je(o,t),l=B(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(i,a.text.slice(u.length),a.text))==H||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?B(Je(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/s);f;--f)h+=s,d+="\t";if(h<c&&(d+=K(c-h)),d!=u)return is(o,d,ot(t,0),ot(t,u.length),"+input"),a.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var m=o.sel.ranges[p];if(m.head.line==t&&m.head.ch<u.length){var v=ot(t,u.length);Bo(o,p,new oo(v,v));break}}}Pa.defineInitHook=function(e){return Ua.push(e)};var za=null;function Ha(e){za=e}function Za(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var s=+new Date-200,a="paste"==i||e.state.pasteIncoming>s,l=Re(t),c=null;if(a&&r.ranges.length>1)if(za&&za.text.join("\n")==t){if(r.ranges.length%za.text.length==0){c=[];for(var u=0;u<za.text.length;u++)c.push(o.splitLines(za.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(l,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=r.ranges.length-1;h>=0;h--){var f=r.ranges[h],p=f.from(),m=f.to();f.empty()&&(n&&n>0?p=ot(p.line,p.ch-n):e.state.overwrite&&!a?m=ot(m.line,Math.min(Je(o,m.line).text.length,m.ch+Y(l).length)):a&&za&&za.lineWise&&za.text.join("\n")==l.join("\n")&&(p=m=ot(p.line,0)));var v={from:p,to:m,text:c?c[h%c.length]:l,origin:i||(a?"paste":e.state.cutIncoming>s?"cut":"+input")};Qo(e.doc,v),An(e,"inputRead",e,v)}t&&!a&&Ga(e,t),ai(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Wa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Di(t,(function(){return Za(t,n,0,null,"paste")})),!0}function Ga(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),s=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){s=Fa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Je(e.doc,i.head.line).text.slice(0,i.head.ch))&&(s=Fa(e,i.head.line,"smart"));s&&An(e,"electricInput",e,i.head.line)}}}function qa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:ot(i,0),head:ot(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Va(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ka(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Va(e),t}function Ya(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Ii(this,t[e])(this,n,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Gs(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Ni((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Pr(this)})),removeOverlay:Ni((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void Pr(this)}})),indentLine:Ni((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),rt(this.doc,e)&&Fa(this,e,t,n)})),indentSelection:Ni((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Fa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&ai(this));else{var o=i.from(),s=i.to(),a=Math.max(n,o.line);n=Math.min(this.lastLine(),s.line-(s.ch?0:1))+1;for(var l=a;l<n;++l)Fa(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Bo(this.doc,r,new oo(o,c[r].to()),Z)}}})),getTokenAt:function(e,t){return Ct(this,e,t)},getLineTokens:function(e,t){return Ct(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=ht(this.doc,e);var t,n=yt(this,Je(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=r+i>>1;if((s?n[2*s-1]:0)>=o)i=s;else{if(!(n[2*s+1]<o)){t=n[2*s+2];break}r=s+1}}var a=t?t.indexOf("overlay "):-1;return a<0?t:0==a?null:t.slice(0,a-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var s=0;s<o[t].length;s++){var a=i[o[t][s]];a&&r.push(a)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==F(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return _t(this,(e=dt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return _r(this,null==e?n.head:"object"==typeof e?ht(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return yr(this,ht(this.doc,e),t||"page")},coordsChar:function(e,t){return wr(this,(e=gr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=gr(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Je(this.doc,e)}else r=e;return vr(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-sn(r):0)},defaultTextHeight:function(){return Ar(this.display)},defaultCharWidth:function(){return Mr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,s=(e=_r(this,ht(this.doc,e))).bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)s=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==i?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?a=0:"middle"==i&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&ii(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:Ni(ca),triggerOnKeyPress:Ni(ha),triggerOnKeyUp:da,triggerOnMouseDown:Ni(ya),execCommand:function(e){if(Js.hasOwnProperty(e))return Js[e].call(null,this)},triggerElectric:Ni((function(e){Ga(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=ht(this.doc,e),s=0;s<t&&!(o=Xa(this.doc,o,i,n,r)).hitSide;++s);return o},moveH:Ni((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Xa(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),G)})),deleteH:Ni((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):qs(this,(function(n){var i=Xa(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var s=ht(this.doc,e),a=0;a<t;++a){var l=_r(this,s,"div");if(null==o?o=l.left:l.left=o,(s=Ja(this,l,i,n)).hitSide)break}return s},moveV:Ni((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(s){if(o)return e<0?s.from():s.to();var a=_r(n,s.head,"div");null!=s.goalColumn&&(a.left=s.goalColumn),i.push(a.left);var l=Ja(n,a,e,t);return"page"==t&&s==r.sel.primary()&&si(n,yr(n,l,"div").top-a.top),l}),G),i.length)for(var s=0;s<r.sel.ranges.length;s++)r.sel.ranges[s].goalColumn=i[s]})),findWordAt:function(e){var t=Je(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),s=ne(o,i)?function(e){return ne(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};n>0&&s(t.charAt(n-1));)--n;for(;r<t.length&&s(t.charAt(r));)++r}return new oo(ot(e.line,n),ot(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?N(this.display.cursorDiv,"CodeMirror-overwrite"):E(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Ni((function(e,t){li(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Kn(this)-this.display.barHeight,width:e.scrollWidth-Kn(this)-this.display.barWidth,clientHeight:Xn(this),clientWidth:Yn(this)}},scrollIntoView:Ni((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ot(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?ci(this,e):di(this,e.from,e.to,e.margin)})),setSize:Ni((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&dr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Br(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ge(this,"refresh",this)})),operation:function(e){return Di(this,e)},startOperation:function(){return Si(this)},endOperation:function(){return Ci(this)},refresh:Ni((function(){var e=this.display.cachedTextHeight;Pr(this),this.curOp.forceUpdate=!0,hr(this),li(this,this.doc.scrollLeft,this.doc.scrollTop),Gi(this.display),(null==e||Math.abs(e-Ar(this.display))>.5||this.options.lineWrapping)&&Rr(this),ge(this,"refresh",this)})),swapDoc:Ni((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),_o(this,e),hr(this),this.display.input.reset(),li(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,An(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},xe(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}function Xa(e,t,n,r,i){var o=t,s=n,a=Je(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(){var n=t.line+l;return!(n<e.first||n>=e.first+e.size)&&(t=new ot(n,t.ch,t.sticky),a=Je(e,n))}function u(o){var s;if("codepoint"==r){var u=a.text.charCodeAt(t.ch+(r>0?0:-1));s=isNaN(u)?null:new ot(t.line,Math.max(0,Math.min(a.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else s=i?Xs(e.cm,a,t,n):Ks(a,t,n);if(null==s){if(o||!c())return!1;t=Ys(i,e.cm,a,t.line,l)}else t=s;return!0}if("char"==r||"codepoint"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var d=null,h="group"==r,f=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var m=a.text.charAt(t.ch)||"\n",v=ne(m,f)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||p||v||(v="s"),d&&d!=v){n<0&&(n=1,u(),t.sticky="after");break}if(v&&(d=v),n>0&&!u(!p))break}var g=Ko(e,t,o,s,!0);return at(o,g)&&(g.hitSide=!0),g}function Ja(e,t,n,r){var i,o,s=e.doc,a=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Ar(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=wr(e,a,i)).outside;){if(n<0?i<=0:i>=s.height){o.hitSide=!0;break}i+=5*n}return o}var Qa=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new U,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $a(e,t){var n=tr(e,t.line);if(!n||n.hidden)return null;var r=Je(e.doc,t.line),i=Qn(n,r,t.line),o=he(r,e.doc.direction),s="left";o&&(s=ue(o,t.ch)%2?"right":"left");var a=sr(i.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function el(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function tl(e,t){return t&&(e.bad=!0),e}function nl(e,t,n,r,i){var o="",s=!1,a=e.doc.lineSeparator(),l=!1;function c(e){return function(t){return t.id==e}}function u(){s&&(o+=a,l&&(o+=a),s=l=!1)}function d(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(ot(r,0),ot(i+1,0),c(+f));return void(p.length&&(o=p[0].find(0))&&d(Qe(e.doc,o.from,o.to).join(a)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var v=0;v<t.childNodes.length;v++)h(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),m&&(s=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;h(t),t!=n;)t=t.nextSibling,l=!1;return o}function rl(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return tl(e.clipPos(ot(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return il(o,t,n)}}function il(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!D(r,t))return tl(ot(tt(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return tl(ot(tt(o),o.text.length),i)}var s=3==t.nodeType?t:null,a=t;for(s||1!=t.childNodes.length||3!=t.firstChild.nodeType||(s=t.firstChild,n&&(n=s.nodeValue.length));a.parentNode!=r;)a=a.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],s=0;s<o.length;s+=3){var a=o[s+2];if(a==t||a==n){var u=tt(i<0?e.line:e.rest[i]),d=o[s]+r;return(r<0||a!=t)&&(d=o[s+(r?1:0)]),ot(u,d)}}}var d=u(s,a,n);if(d)return tl(d,i);for(var h=a.nextSibling,f=s?s.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return tl(ot(d.line,d.ch-f),i);f+=h.textContent.length}for(var p=a.previousSibling,m=n;p;p=p.previousSibling){if(d=u(p,p.firstChild,-1))return tl(ot(d.line,d.ch+m),i);m+=p.textContent.length}}Qa.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function s(e){if(o(e)&&!ye(r,e)){if(r.somethingSelected())Ha({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);Ha({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,Z),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var s=za.text.join("\n");if(e.clipboardData.setData("Text",s),e.clipboardData.getData("Text")==s)return void e.preventDefault()}var a=Ka(),l=a.firstChild;r.display.lineSpace.insertBefore(a,r.display.lineSpace.firstChild),l.value=za.text.join("\n");var c=document.activeElement;O(l),setTimeout((function(){r.display.lineSpace.removeChild(a),c.focus(),c==i&&n.showPrimarySelection()}),50)}}Va(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),pe(i,"paste",(function(e){!o(e)||ye(r,e)||Wa(e,r)||a<=11&&setTimeout(Ii(r,(function(){return t.updateFromDOM()})),20)})),pe(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),pe(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),pe(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),pe(i,"touchstart",(function(){return n.forceCompositionEnd()})),pe(i,"input",(function(){t.composing||t.readFromDOMSoon()})),pe(i,"copy",s),pe(i,"cut",s)},Qa.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Qa.prototype.prepareSelection=function(){var e=Wr(this.cm,!1);return e.focus=document.activeElement==this.div,e},Qa.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Qa.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Qa.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var s=rl(t,e.anchorNode,e.anchorOffset),a=rl(t,e.focusNode,e.focusOffset);if(!s||s.bad||!a||a.bad||0!=st(ut(s,a),i)||0!=st(ct(s,a),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&$a(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&$a(t,o);if(!u){var d=l[l.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var f,p=e.rangeCount&&e.getRangeAt(0);try{f=k(c.node,c.offset,u.offset,u.node)}catch(e){}f&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),f.collapsed||(e.removeAllRanges(),e.addRange(f))):(e.removeAllRanges(),e.addRange(f)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Qa.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Qa.prototype.showMultipleSelections=function(e){L(this.cm.display.cursorDiv,e.cursors),L(this.cm.display.selectionDiv,e.selection)},Qa.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Qa.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return D(this.div,t)},Qa.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Qa.prototype.blur=function(){this.div.blur()},Qa.prototype.getField=function(){return this.div},Qa.prototype.supportsTouch=function(){return!0},Qa.prototype.receivedFocus=function(){var e=this;function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.selectionInEditor()?this.pollSelection():Di(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},Qa.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Qa.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&el(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=rl(t,e.anchorNode,e.anchorOffset),r=rl(t,e.focusNode,e.focusOffset);n&&r&&Di(t,(function(){Ho(t.doc,ao(n,r),Z),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Qa.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),s=o.from(),a=o.to();if(0==s.ch&&s.line>r.firstLine()&&(s=ot(s.line-1,Je(r.doc,s.line-1).length)),a.ch==Je(r.doc,a.line).text.length&&a.line<r.lastLine()&&(a=ot(a.line+1,0)),s.line<i.viewFrom||a.line>i.viewTo-1)return!1;s.line==i.viewFrom||0==(e=jr(r,s.line))?(t=tt(i.view[0].line),n=i.view[0].node):(t=tt(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=jr(r,a.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=tt(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(nl(r,n,c,t,l)),h=Qe(r.doc,ot(t,0),ot(l,Je(r.doc,l).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var f=0,p=0,m=d[0],v=h[0],g=Math.min(m.length,v.length);f<g&&m.charCodeAt(f)==v.charCodeAt(f);)++f;for(var y=Y(d),_=Y(h),b=Math.min(y.length-(1==d.length?f:0),_.length-(1==h.length?f:0));p<b&&y.charCodeAt(y.length-p-1)==_.charCodeAt(_.length-p-1);)++p;if(1==d.length&&1==h.length&&t==s.line)for(;f&&f>s.ch&&y.charCodeAt(y.length-p-1)==_.charCodeAt(_.length-p-1);)f--,p++;d[d.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=ot(t,f),w=ot(l,h.length?Y(h).length-p:0);return d.length>1||d[0]||st(x,w)?(is(r.doc,d,x,w,"+input"),!0):void 0},Qa.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qa.prototype.reset=function(){this.forceCompositionEnd()},Qa.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qa.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Qa.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Di(this.cm,(function(){return Pr(e.cm)}))},Qa.prototype.setUneditable=function(e){e.contentEditable="false"},Qa.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Ii(this.cm,Za)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Qa.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Qa.prototype.onContextMenu=function(){},Qa.prototype.resetPosition=function(){},Qa.prototype.needsContentAttribute=!0;var ol=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new U,this.hasSelection=!1,this.composing=null};function sl(e,t){if((t=t?P(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var a=Pa((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return a}function al(e){e.off=ve,e.on=pe,e.wheelEventPixels=no,e.Doc=Ss,e.splitLines=Re,e.countColumn=B,e.findColumn=q,e.isWordChar=te,e.Pass=H,e.signal=ge,e.Line=cn,e.changeEnd=lo,e.scrollbarModel=bi,e.Pos=ot,e.cmpPos=st,e.modes=Ue,e.mimeModes=Fe,e.resolveMode=Ze,e.getMode=We,e.modeExtensions=Ge,e.extendMode=qe,e.copyState=Ve,e.startState=Ye,e.innerMode=Ke,e.commands=Js,e.keyMap=Bs,e.keyName=Ws,e.isModifierKey=Hs,e.lookupKey=zs,e.normalizeKeyMap=Fs,e.StringStream=Xe,e.SharedTextMarker=gs,e.TextMarker=ms,e.LineWidget=ds,e.e_preventDefault=we,e.e_stopPropagation=Se,e.e_stop=ke,e.addClass=N,e.contains=D,e.rmClass=E,e.keyNames=Rs}ol.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ye(r,e)){if(r.somethingSelected())Ha({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=qa(r);Ha({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Z):(n.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",(function(){s&&a>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),pe(i,"paste",(function(e){ye(r,e)||Wa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",(function(t){if(!Wn(e,t)&&!ye(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),pe(e.lineSpace,"selectstart",(function(t){Wn(e,t)||we(t)})),pe(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),pe(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ol.prototype.createField=function(e){this.wrapper=Ka(),this.textarea=this.wrapper.firstChild},ol.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},ol.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=Wr(e);if(e.options.moveInputWithCursor){var i=_r(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+s.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+s.left-o.left))}return r},ol.prototype.showSelection=function(e){var t=this.cm.display;L(t.cursorDiv,e.cursors),L(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},ol.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&O(this.textarea),s&&a>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",s&&a>=9&&(this.hasSelection=null))}},ol.prototype.getField=function(){return this.textarea},ol.prototype.supportsTouch=function(){return!1},ol.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},ol.prototype.blur=function(){this.textarea.blur()},ol.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ol.prototype.receivedFocus=function(){this.slowPoll()},ol.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},ol.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},ol.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Oe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(s&&a>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Di(t,(function(){Za(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ol.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ol.prototype.onKeyPress=function(){s&&a>=9&&(this.hasSelection=null),this.fastPoll()},ol.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Or(n,e),c=r.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Ii(n,Ho)(n.doc,ao(o),Z);var u,h=i.style.cssText,f=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(s?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),s&&a>=9&&v(),S){ke(e);var m=function(){ve(window,"mouseup",m),setTimeout(g,20)};pe(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),o=""+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=h,s&&a<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!s||s&&a<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&""==t.prevInput?Ii(n,Xo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},ol.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},ol.prototype.setUneditable=function(){},ol.prototype.needsContentAttribute=!1,Ra(Pa),Ya(Pa);var ll="iter insert remove copy getEditor constructor".split(" ");for(var cl in Ss.prototype)Ss.prototype.hasOwnProperty(cl)&&F(ll,cl)<0&&(Pa.prototype[cl]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ss.prototype[cl]));return xe(Ss),Pa.inputStyles={textarea:ol,contenteditable:Qa},Pa.defineMode=function(e){Pa.defaults.mode||"null"==e||(Pa.defaults.mode=e),ze.apply(this,arguments)},Pa.defineMIME=He,Pa.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Pa.defineMIME("text/plain","null"),Pa.defineExtension=function(e,t){Pa.prototype[e]=t},Pa.defineDocExtension=function(e,t){Ss.prototype[e]=t},Pa.fromTextArea=sl,al(Pa),Pa.version="5.58.2",Pa}()},25419:function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var r=e.getMode(t,"text/html"),i="null"==r.name;function o(n){if(e.findModeByName){var r=e.findModeByName(n);r&&(n=r.mime||r.mimes[0])}var i=e.getMode(t,n);return"null"==i.name?null:i}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var s={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 a in s)s.hasOwnProperty(a)&&n.tokenTypeOverrides[a]&&(s[a]=n.tokenTypeOverrides[a]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,f=/^[^#!\[\]*_\\<>` "'(~:]+/,p=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,g=" ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function _(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function x(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==S){var n=i;if(!n){var o=e.innerMode(r,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=T,t.block=w,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function w(t,r){var i=t.column()===r.indentation,a=b(r.prevLine.stream),f=r.indentedCode,v=r.prevLine.hr,g=!1!==r.list,_=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var x=r.indentation;if(null===r.indentationDiff&&(r.indentationDiff=r.indentation,g)){for(r.list=null;x<r.listStack[r.listStack.length-1];)r.listStack.pop(),r.listStack.length?r.indentation=r.listStack[r.listStack.length-1]:r.list=!1;!1!==r.list&&(r.indentationDiff=x-r.listStack[r.listStack.length-1])}var w=!(a||v||r.prevLine.header||g&&f||r.prevLine.fencedCodeEnd),S=(!1===r.list||v||a)&&r.indentation<=_&&t.match(l),E=null;if(r.indentationDiff>=4&&(f||r.prevLine.fencedCodeEnd||r.prevLine.header||a))return t.skipToEnd(),r.indentedCode=!0,s.code;if(t.eatSpace())return null;if(i&&r.indentation<=_&&(E=t.match(d))&&E[1].length<=6)return r.quote=0,r.header=E[1].length,r.thisLine.header=!0,n.highlightFormatting&&(r.formatting="header"),r.f=r.inline,k(r);if(r.indentation<=_&&t.eat(">"))return r.quote=i?1:r.quote+1,n.highlightFormatting&&(r.formatting="quote"),t.eatSpace(),k(r);if(!S&&!r.setext&&i&&r.indentation<=_&&(E=t.match(c))){var T=E[1]?"ol":"ul";return r.indentation=x+t.current().length,r.list=!0,r.quote=0,r.listStack.push(r.indentation),r.em=!1,r.strong=!1,r.code=!1,r.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(r.taskList=!0),r.f=r.inline,n.highlightFormatting&&(r.formatting=["list","list-"+T]),k(r)}return i&&r.indentation<=_&&(E=t.match(p,!0))?(r.quote=0,r.fencedEndRE=new RegExp(E[1]+"+ *$"),r.localMode=n.fencedCodeBlockHighlighting&&o(E[2]||n.fencedCodeBlockDefaultMode),r.localMode&&(r.localState=e.startState(r.localMode)),r.f=r.block=C,n.highlightFormatting&&(r.formatting="code-block"),r.code=-1,k(r)):r.setext||!(w&&g||r.quote||!1!==r.list||r.code||S||m.test(t.string))&&(E=t.lookAhead(1))&&(E=E.match(h))?(r.setext?(r.header=r.setext,r.setext=0,t.skipToEnd(),n.highlightFormatting&&(r.formatting="header")):(r.header="="==E[0].charAt(0)?1:2,r.setext=r.header),r.thisLine.header=!0,r.f=r.inline,k(r)):S?(t.skipToEnd(),r.hr=!0,r.thisLine.hr=!0,s.hr):"["===t.peek()?y(t,r,I):y(t,r,r.inline)}function S(t,n){var o=r.token(t,n.htmlState);if(!i){var s=e.innerMode(r,n.htmlState);("xml"==s.mode.name&&null===s.state.tagStart&&!s.state.context&&s.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=T,n.block=w,n.htmlState=null)}return o}function C(e,t){var r,i=t.listStack[t.listStack.length-1]||0,o=t.indentation<i,a=i+3;return t.fencedEndRE&&t.indentation<=a&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(r=k(t)),t.localMode=t.localState=null,t.block=w,t.f=T,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?_(e,t,t.block):r):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),s.code)}function k(e){var t=[];if(e.formatting){t.push(s.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var r=0;r<e.formatting.length;r++)t.push(s.formatting+"-"+e.formatting[r]),"header"===e.formatting[r]&&t.push(s.formatting+"-"+e.formatting[r]+"-"+e.header),"quote"===e.formatting[r]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(s.formatting+"-"+e.formatting[r]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(s.linkHref,"url"):(e.strong&&t.push(s.strong),e.em&&t.push(s.em),e.strikethrough&&t.push(s.strikethrough),e.emoji&&t.push(s.emoji),e.linkText&&t.push(s.linkText),e.code&&t.push(s.code),e.image&&t.push(s.image),e.imageAltText&&t.push(s.imageAltText,"link"),e.imageMarker&&t.push(s.imageMarker)),e.header&&t.push(s.header,s.header+"-"+e.header),e.quote&&(t.push(s.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(s.quote+"-"+e.quote):t.push(s.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var i=(e.listStack.length-1)%3;i?1===i?t.push(s.list2):t.push(s.list3):t.push(s.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function E(e,t){if(e.match(f,!0))return k(t)}function T(t,i){var o=i.text(t,i);if(void 0!==o)return o;if(i.list)return i.list=null,k(i);if(i.taskList)return" "===t.match(u,!0)[1]?i.taskOpen=!0:i.taskClosed=!0,n.highlightFormatting&&(i.formatting="task"),i.taskList=!1,k(i);if(i.taskOpen=!1,i.taskClosed=!1,i.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(i.formatting="header"),k(i);var a=t.next();if(i.linkTitle){i.linkTitle=!1;var l=a;"("===a&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(t.match(new RegExp(c),!0))return s.linkHref}if("`"===a){var d=i.formatting;n.highlightFormatting&&(i.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=i.code||i.quote&&1!=h){if(h==i.code){var f=k(i);return i.code=0,f}return i.formatting=d,k(i)}return i.code=h,k(i)}if(i.code)return k(i);if("\\"===a&&(t.next(),n.highlightFormatting)){var p=k(i),m=s.formatting+"-escape";return p?p+" "+m:m}if("!"===a&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return i.imageMarker=!0,i.image=!0,n.highlightFormatting&&(i.formatting="image"),k(i);if("["===a&&i.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return i.imageMarker=!1,i.imageAltText=!0,n.highlightFormatting&&(i.formatting="image"),k(i);if("]"===a&&i.imageAltText){n.highlightFormatting&&(i.formatting="image");var p=k(i);return i.imageAltText=!1,i.image=!1,i.inline=i.f=A,p}if("["===a&&!i.image)return i.linkText&&t.match(/^.*?\]/)||(i.linkText=!0,n.highlightFormatting&&(i.formatting="link")),k(i);if("]"===a&&i.linkText){n.highlightFormatting&&(i.formatting="link");var p=k(i);return i.linkText=!1,i.inline=i.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:T,p}if("<"===a&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=L,n.highlightFormatting&&(i.formatting="link"),(p=k(i))?p+=" ":p="",p+s.linkInline;if("<"===a&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return i.f=i.inline=L,n.highlightFormatting&&(i.formatting="link"),(p=k(i))?p+=" ":p="",p+s.linkEmail;if(n.xml&&"<"===a&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var g=t.string.indexOf(">",t.pos);if(-1!=g){var y=t.string.substring(t.start,g);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(i.md_inside=!0)}return t.backUp(1),i.htmlState=e.startState(r),_(t,i,S)}if(n.xml&&"<"===a&&t.match(/^\/\w*?>/))return i.md_inside=!1,"tag";if("*"===a||"_"===a){for(var b=1,x=1==t.pos?" ":t.string.charAt(t.pos-2);b<3&&t.eat(a);)b++;var w=t.peek()||" ",C=!/\s/.test(w)&&(!v.test(w)||/\s/.test(x)||v.test(x)),E=!/\s/.test(x)&&(!v.test(x)||/\s/.test(w)||v.test(w)),M=null,D=null;if(b%2&&(i.em||!C||"*"!==a&&E&&!v.test(x)?i.em!=a||!E||"*"!==a&&C&&!v.test(w)||(M=!1):M=!0),b>1&&(i.strong||!C||"*"!==a&&E&&!v.test(x)?i.strong!=a||!E||"*"!==a&&C&&!v.test(w)||(D=!1):D=!0),null!=D||null!=M)return n.highlightFormatting&&(i.formatting=null==M?"strong":null==D?"em":"strong em"),!0===M&&(i.em=a),!0===D&&(i.strong=a),f=k(i),!1===M&&(i.em=!1),!1===D&&(i.strong=!1),f}else if(" "===a&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return k(i);t.backUp(1)}if(n.strikethrough)if("~"===a&&t.eatWhile(a)){if(i.strikethrough)return n.highlightFormatting&&(i.formatting="strikethrough"),f=k(i),i.strikethrough=!1,f;if(t.match(/^[^\s]/,!1))return i.strikethrough=!0,n.highlightFormatting&&(i.formatting="strikethrough"),k(i)}else if(" "===a&&t.match(/^~~/,!0)){if(" "===t.peek())return k(i);t.backUp(2)}if(n.emoji&&":"===a&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){i.emoji=!0,n.highlightFormatting&&(i.formatting="emoji");var I=k(i);return i.emoji=!1,I}return" "===a&&(t.match(/^ +$/,!1)?i.trailingSpace++:i.trailingSpace&&(i.trailingSpaceNewLine=!0)),k(i)}function L(e,t){if(">"===e.next()){t.f=t.inline=T,n.highlightFormatting&&(t.formatting="link");var r=k(t);return r?r+=" ":r="",r+s.linkInline}return e.match(/^[^>]+/,!0),s.linkInline}function A(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=D("("===r?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,k(t)):"error"}var M={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function D(e){return function(t,r){if(t.next()===e){r.f=r.inline=T,n.highlightFormatting&&(r.formatting="link-string");var i=k(r);return r.linkHref=!1,i}return t.match(M[e]),r.linkHref=!0,k(r)}}function I(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=N,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,k(t)):y(e,t,T)}function N(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=R,n.highlightFormatting&&(t.formatting="link");var r=k(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),s.linkText}function R(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=T,s.linkHref+" url")}var O={startState:function(){return{f:w,prevLine:{stream:null},thisLine:{stream:null},block:w,htmlState:null,indentation:0,inline:T,text:E,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(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(r,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return x(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=S)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,g).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==S?{state:e.htmlState,mode:r}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:O}},indent:function(t,n,i){return t.block==S&&r.indent?r.indent(t.htmlState,n,i):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,i):e.Pass},blankLine:x,getType:k,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return O}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(89780),n(15525),n(98101))},98101:function(e,t,n){!function(e){"use strict";e.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 t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}}(n(89780))},67549:function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function r(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function i(e){var t=e.cmdState.pop();t&&t.closeBracket()}function o(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var r=t[n];if("DEFAULT"!=r.name)return r}return{styleIdentifier:function(){return null}}}function s(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var a={};function l(e,t){e.f=t}function c(e,t){var i;if(e.match(/^\\[a-zA-Z@]+/)){var s=e.current().slice(1);return n(t,i=new(i=a.hasOwnProperty(s)?a[s]:a.DEFAULT)),l(t,d),i.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return l(t,(function(e,t){return u(e,t,"\\]")})),"keyword";if(e.match("\\("))return l(t,(function(e,t){return u(e,t,"\\)")})),"keyword";if(e.match("$$"))return l(t,(function(e,t){return u(e,t,"$$")})),"keyword";if(e.match("$"))return l(t,(function(e,t){return u(e,t,"$")})),"keyword";var c=e.next();return"%"==c?(e.skipToEnd(),"comment"):"}"==c||"]"==c?(i=r(t))?(i.closeBracket(c),l(t,d),"bracket"):"error":"{"==c||"["==c?(n(t,i=new(i=a.DEFAULT)),"bracket"):/\d/.test(c)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(i=o(t)).name&&(i.argument=e.current()),i.styleIdentifier())}function u(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return l(t,c),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var r=e.next();return"{"==r||"}"==r||"["==r||"]"==r||"("==r||")"==r?"bracket":"%"==r?(e.skipToEnd(),"comment"):"error"}function d(e,t){var n=e.peek();return"{"==n||"["==n?(r(t).openBracket(n),e.eat(n),l(t,c),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(l(t,c),i(t),c(e,t))}return a.importmodule=s("importmodule","tag",["string","builtin"]),a.documentclass=s("documentclass","tag",["","atom"]),a.usepackage=s("usepackage","tag",["atom"]),a.begin=s("begin","tag",["atom"]),a.end=s("end","tag",["atom"]),a.label=s("label","tag",["atom"]),a.ref=s("ref","tag",["atom"]),a.eqref=s("eqref","tag",["atom"]),a.cite=s("cite","tag",["atom"]),a.bibitem=s("bibitem","tag",["atom"]),a.Bibitem=s("Bibitem","tag",["atom"]),a.RBibitem=s("RBibitem","tag",["atom"]),a.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return u(e,t)}:c}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=c,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(89780))},15525:function(e,t,n){!function(e){"use strict";var t={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},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,s,a=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(p("atom","]]>")):null:e.match("--")?n(p("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=p("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=_,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=f(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function f(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}function p(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function v(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function _(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?x:_}function b(e,t,n){return"word"==e?(n.tagName=t.current(),s="tag",C):l.allowMissingTagName&&"endTag"==e?(s="tag bracket",C(e,t,n)):(s="error",b)}function x(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(s="tag",w):(s="tag error",S)}return l.allowMissingTagName&&"endTag"==e?(s="tag bracket",w(e,t,n)):(s="error",S)}function w(e,t,n){return"endTag"!=e?(s="error",w):(g(n),_)}function S(e,t,n){return s="error",w(e,t,n)}function C(e,t,n){if("word"==e)return s="attribute",k;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(r)?y(n,r):(y(n,r),n.context=new v(n,r,i==n.indented)),_}return s="error",C}function k(e,t,n){return"equals"==e?E:(l.allowMissing||(s="error"),C(e,t,n))}function E(e,t,n){return"string"==e?T:"word"==e&&l.allowUnquoted?(s="string",C):(s="error",C(e,t,n))}function T(e,t,n){return"string"==e?T:C(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:_,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(s=null,t.state=t.state(o||n,e,t),s&&(n="error"==s?n+" error":s)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+a;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+a*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(o)for(;i;){var s=l.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(o[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+a:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=C)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(89780))},3867:function(e,t,n){var r=n(97671);e.exports=function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function t(e){return"function"==typeof e}var i=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=0,s=void 0,a=void 0,l=function(e,t){x[o]=e,x[o+1]=t,2===(o+=2)&&(a?a(w):C())};function c(e){a=e}function u(e){l=e}var d="undefined"!=typeof window?window:void 0,h=d||{},f=h.MutationObserver||h.WebKitMutationObserver,p="undefined"==typeof self&&void 0!==r&&"[object process]"==={}.toString.call(r),m="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function v(){return function(){return r.nextTick(w)}}function g(){return void 0!==s?function(){s(w)}:b()}function y(){var e=0,t=new f(w),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function _(){var e=new MessageChannel;return e.port1.onmessage=w,function(){return e.port2.postMessage(0)}}function b(){var e=setTimeout;return function(){return e(w,1)}}var x=new Array(1e3);function w(){for(var e=0;e<o;e+=2)(0,x[e])(x[e+1]),x[e]=void 0,x[e+1]=void 0;o=0}function S(){try{var e=Function("return this")().require("vertx");return s=e.runOnLoop||e.runOnContext,g()}catch(e){return b()}}var C=void 0;function k(e,t){var n=this,r=new this.constructor(L);void 0===r[T]&&K(r);var i=n._state;if(i){var o=arguments[i-1];l((function(){return W(i,r,o,n._result)}))}else H(n,r,e,t);return r}function E(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(L);return B(n,e),n}C=p?v():f?y():m?_():void 0===d?S():b();var T=Math.random().toString(36).substring(2);function L(){}var A=void 0,M=1,D=2;function I(){return new TypeError("You cannot resolve a promise with itself")}function N(){return new TypeError("A promises callback cannot return that same promise.")}function R(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function O(e,t,n){l((function(e){var r=!1,i=R(n,t,(function(n){r||(r=!0,t!==n?B(e,n):F(e,n))}),(function(t){r||(r=!0,z(e,t))}),"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,z(e,i))}),e)}function j(e,t){t._state===M?F(e,t._result):t._state===D?z(e,t._result):H(t,void 0,(function(t){return B(e,t)}),(function(t){return z(e,t)}))}function P(e,n,r){n.constructor===e.constructor&&r===k&&n.constructor.resolve===E?j(e,n):void 0===r?F(e,n):t(r)?O(e,n,r):F(e,n)}function B(t,n){if(t===n)z(t,I());else if(e(n)){var r=void 0;try{r=n.then}catch(e){return void z(t,e)}P(t,n,r)}else F(t,n)}function U(e){e._onerror&&e._onerror(e._result),Z(e)}function F(e,t){e._state===A&&(e._result=t,e._state=M,0!==e._subscribers.length&&l(Z,e))}function z(e,t){e._state===A&&(e._state=D,e._result=t,l(U,e))}function H(e,t,n,r){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+M]=n,i[o+D]=r,0===o&&e._state&&l(Z,e)}function Z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,o=e._result,s=0;s<t.length;s+=3)r=t[s],i=t[s+n],r?W(n,r,i,o):i(o);e._subscribers.length=0}}function W(e,n,r,i){var o=t(r),s=void 0,a=void 0,l=!0;if(o){try{s=r(i)}catch(e){l=!1,a=e}if(n===s)return void z(n,N())}else s=i;n._state!==A||(o&&l?B(n,s):!1===l?z(n,a):e===M?F(n,s):e===D&&z(n,s))}function G(e,t){try{t((function(t){B(e,t)}),(function(t){z(e,t)}))}catch(t){z(e,t)}}var q=0;function V(){return q++}function K(e){e[T]=q++,e._state=void 0,e._result=void 0,e._subscribers=[]}function Y(){return new Error("Array Methods must be provided an Array")}var X=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(L),this.promise[T]||K(this.promise),i(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?F(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&F(this.promise,this._result))):z(this.promise,Y())}return e.prototype._enumerate=function(e){for(var t=0;this._state===A&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===E){var i=void 0,o=void 0,s=!1;try{i=e.then}catch(e){s=!0,o=e}if(i===k&&e._state!==A)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===ne){var a=new n(L);s?z(a,o):P(a,e,i),this._willSettleAt(a,t)}else this._willSettleAt(new n((function(t){return t(e)})),t)}else this._willSettleAt(r(e),t)},e.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===A&&(this._remaining--,e===D?z(r,n):this._result[t]=n),0===this._remaining&&F(r,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;H(e,void 0,(function(e){return n._settledAt(M,t,e)}),(function(e){return n._settledAt(D,t,e)}))},e}();function J(e){return new X(this,e).promise}function Q(e){var t=this;return i(e)?new t((function(n,r){for(var i=e.length,o=0;o<i;o++)t.resolve(e[o]).then(n,r)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))}function $(e){var t=new this(L);return z(t,e),t}function ee(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function te(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var ne=function(){function e(t){this[T]=V(),this._result=this._state=void 0,this._subscribers=[],L!==t&&("function"!=typeof t&&ee(),this instanceof e?G(this,t):te())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=this,r=n.constructor;return t(e)?n.then((function(t){return r.resolve(e()).then((function(){return t}))}),(function(t){return r.resolve(e()).then((function(){throw t}))})):n.then(e,e)},e}();function re(){var e=void 0;if(void 0!==n.g)e=n.g;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=ne}return ne.prototype.then=k,ne.all=J,ne.race=Q,ne.resolve=E,ne.reject=$,ne._setScheduler=c,ne._setAsap=u,ne._asap=l,ne.polyfill=re,ne.Promise=ne,ne}()},86204:function(e){"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}m(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&m(e,"error",t,n)}(e,i,{once:!0})}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,n,r){var i,o,s;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=l(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,function(e){console&&console.warn&&console.warn(e)}(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):p(i,i.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function m(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return l(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)r(l,this,t);else{var c=l.length,u=p(l,c);for(n=0;n<c;++n)r(u[n],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},24334:function(e,t,n){var r,i;i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var i,o=(n=n||{}).Base64,s="2.6.4",a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=function(e){for(var t={},n=0,r=e.length;n<r;n++)t[e.charAt(n)]=n;return t}(a),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(e){return e.replace(d,u)},f=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[a.charAt(n>>>18),a.charAt(n>>>12&63),t>=2?"=":a.charAt(n>>>6&63),t>=1?"=":a.charAt(63&n)].join("")},p=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,f)},m=function(e){return p(h(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?v(m(e)):m(e)},y=function(e){return g(e,!0)};n.Uint8Array&&(i=function(e,t){for(var n="",r=0,i=e.length;r<i;r+=3){var o=e[r],s=e[r+1],l=e[r+2],c=o<<16|s<<8|l;n+=a.charAt(c>>>18)+a.charAt(c>>>12&63)+(void 0!==s?a.charAt(c>>>6&63):"=")+(void 0!==l?a.charAt(63&c):"=")}return t?v(n):n});var _,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,x=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},w=function(e){return e.replace(b,x)},S=function(e){var t=e.length,n=t%4,r=(t>0?l[e.charAt(0)]<<18:0)|(t>1?l[e.charAt(1)]<<12:0)|(t>2?l[e.charAt(2)]<<6:0)|(t>3?l[e.charAt(3)]:0),i=[c(r>>>16),c(r>>>8&255),c(255&r)];return i.length-=[0,0,2,1][n],i.join("")},C=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,S)},k=function(e){return C(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},E=function(e){return w(C(e))},T=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},L=function(e){return E(T(e))};n.Uint8Array&&(_=function(e){return Uint8Array.from(k(T(e)),(function(e){return e.charCodeAt(0)}))});var A=function(){var e=n.Base64;return n.Base64=o,e};if(n.Base64={VERSION:s,atob:k,btoa:p,fromBase64:L,toBase64:g,utob:h,encode:g,encodeURI:y,btou:w,decode:L,noConflict:A,fromUint8Array:i,toUint8Array:_},"function"==typeof Object.defineProperty){var M=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",M((function(){return L(this)}))),Object.defineProperty(String.prototype,"toBase64",M((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",M((function(){return g(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(r=function(){return n.Base64}.apply(t,[]))||(e.exports=r),{Base64:n.Base64}}(i)},2859:function(e,t,n){"use strict";n.d(t,{hP:function(){return Q}});var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function s(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function a(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var l=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n],o=i[0],s=i[1];e.setAttribute(o,s)}},e.createRect=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");return i.setAttribute("width",t.toString()),i.setAttribute("height",n.toString()),r&&e.setAttributes(i,r),i},e.createLine=function(t,n,r,i,o){var s=document.createElementNS("http://www.w3.org/2000/svg","line");return s.setAttribute("x1",t.toString()),s.setAttribute("y1",n.toString()),s.setAttribute("x2",r.toString()),s.setAttribute("y2",i.toString()),o&&e.setAttributes(s,o),s},e.createPolygon=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",t),n&&e.setAttributes(r,n),r},e.createCircle=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("r",t.toString()),n&&e.setAttributes(r,n),r},e.createEllipse=function(t,n,r){var i=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(n/2).toString()),i.setAttribute("rx",(t/2).toString()),i.setAttribute("ry",(n/2).toString()),r&&e.setAttributes(i,r),i},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,r,i,o,s,a){var l=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(l,[["id",t],["orient",n],["markerWidth",r.toString()],["markerHeight",i.toString()],["refX",o.toString()],["refY",s.toString()]]),l.appendChild(a),l},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","tspan");return r.textContent=t,n&&e.setAttributes(r,n),r},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",t),n&&e.setAttributes(r,n),r},e}(),c=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),u=function(){function e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return e.prototype.rasterize=function(e,t,n){var r=this;return new Promise((function(i){var o=void 0!==n?n:document.createElement("canvas");null===e&&(r.markersOnly=!0,r.naturalSize=!1);var s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.setAttribute("xmlns","http://www.w3.org/2000/svg"),s.setAttribute("width",t.width.baseVal.valueAsString),s.setAttribute("height",t.height.baseVal.valueAsString),s.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),s.innerHTML=t.innerHTML,!0===r.naturalSize?(s.width.baseVal.value=e.naturalWidth,s.height.baseVal.value=e.naturalHeight):void 0!==r.width&&void 0!==r.height&&(s.width.baseVal.value=r.width,s.height.baseVal.value=r.height),o.width=s.width.baseVal.value,o.height=s.height.baseVal.value;var a=s.outerHTML,l=o.getContext("2d");!0!==r.markersOnly&&l.drawImage(e,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var d=new Blob([a],{type:"image/svg+xml"}),h=c.createObjectURL(d);u.onload=function(){l.drawImage(u,0,0),c.revokeObjectURL(h);var e=o.toDataURL(r.imageType,r.imageQuality);i(e)},u.src=h}))},e}(),d=function(){},h=function(){function e(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new f("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new f("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new f("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new p("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new p("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),f=function(e,t){this.selector=e,this.style=t},p=function(e,t){this.localName=e,this.style=t},m=function(){function e(e,t,n,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=n,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return e.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(n,'<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(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),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 r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<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(r,'<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()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},e.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(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")},e.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},e.prototype.addActionButton=function(e,t,n){var r=this,i=document.createElement("div");switch(i.className=""+this.toolbarButtonStyleClass.name,i.innerHTML=t,i.setAttribute("data-action",n),i.addEventListener("click",(function(){r.actionToolbarButtonClicked(i,n)})),n){case"select":case"undo":case"redo":i.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":i.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"render":i.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":i.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(i),this.buttons.push(i)},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new p("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new p("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new p("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new p("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new p("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new p("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new p("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new p("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new f("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new f("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},e.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),v=function(){function e(e,t,n,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new p("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new p("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new p("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new p("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new p("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new p("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new p("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new p("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new p("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new f("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new f("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,r=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=r.uiStyleSettings;var n=document.createElement("div");n.className=r.toolboxButtonStyleClass.name+" "+(null!==(t=r.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:r.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){r.panelButtonClick(e)})),r.panelButtons.push(n),r.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),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=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,r){var i,o;e.className=t.toolboxButtonStyleClass.name+" "+(r===n?""+(null!==(i=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==i?i:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),g=function(e,t){this.title=e,this.icon=t},y=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=r,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var r=e.getColorBox(n);t.appendChild(r),e.colorBoxes.push(r)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,r=this.uiStyleSettings.toolbarHeight-n,i=document.createElement("div");i.style.display="inline-block",i.style.boxSizing="content-box",i.style.width=r-2+"px",i.style.height=r-2+"px",i.style.padding="1px",i.style.marginRight="2px",i.style.marginBottom="2px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderRadius=(r+2)/2+"px",i.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentColor(e,i)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=r-2+"px",o.style.height=r-2+"px",o.style.backgroundColor=e,o.style.borderRadius=r/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <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" />\n </svg>'),i.appendChild(o),i},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(g),_=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),b=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),x=function(){function e(){this.GRIP_SIZE=10,this.visual=l.createGroup(),this.visual.appendChild(l.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(l.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),w=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),S=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(l.createTransform()),i.setupControlBox(),i}return i(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=l.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,r=this.manipulationStartTop,i=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:r=this.manipulationStartTop+e.y-this.manipulationStartY,i=this.manipulationStartHeight+this.manipulationStartTop-r;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:i=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),i>=0?(this.top=r,this.height=i):(this.top=r+i,this.height=-i),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=l.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=l.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=l.createGroup();var e=l.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=l.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),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=l.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 b,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(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()},t.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(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new x;return e.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,r=(this.width+this.CB_DISTANCE)/2-e/2,i=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,s=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,r,n),this.positionGrip(this.controlGrips.topRight.visual,s,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,i),this.positionGrip(this.controlGrips.centerRight.visual,s,i),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,r,o),this.positionGrip(this.controlGrips.bottomRight.visual,s,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,r,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:w.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:w.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(w.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(w.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*n});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(_),C=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&l.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&l.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&l.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&l.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(S),k=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=r,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.flexGrow="2",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentWidth(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=n.toString(),i.style.marginRight="5px",r.appendChild(i);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var s=document.createElement("hr");s.style.minWidth="20px",s.style.border="0px",s.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,s.style.flexGrow="2",o.appendChild(s),r.appendChild(o),e.widthBoxes.push(r)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(g),E=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=r,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.styles.length-5+"%",r.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentStyle(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.minHeight="20px",i.style.flexGrow="2",i.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";i.innerHTML=o,r.appendChild(i),e.styleBoxes.push(r)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(g),T=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new y("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new E("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return i(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',t}(C),L=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"},A=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return i(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&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(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=l.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new x;return e.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var r=e.transform.baseVal.getItem(0);r.setTranslate(t,n),e.transform.baseVal.replaceItem(r,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(_),M=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new y("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new E("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorLine=l.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.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()),l.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',t}(A),D=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=r,o.setCurrentFont=o.setCurrentFont.bind(o),o}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var r=document.createElement("div");r.style.display="inline-block",r.style.alignItems="center",r.style.justifyContent="space-between",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.overflow="hidden",r.style.maxWidth=100/e.fonts.length-5+"%",r.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentFont(n,r)})),t.appendChild(r);var i=document.createElement("div");i.style.display="flex",i.style.minHeight="20px",i.style.flexGrow="2",i.style.fontFamily=n,i.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",i.appendChild(o),r.appendChild(i),e.fontBoxes.push(r)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(g),I=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.padding=5,i.DEFAULT_TEXT="请输入文本",i.text=i.DEFAULT_TEXT,i.isMoved=!1,i.color=r.defaultColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setColor=i.setColor.bind(i),i.setFont=i.setFont.bind(i),i.renderText=i.renderText.bind(i),i.sizeText=i.sizeText.bind(i),i.textEditDivClicked=i.textEditDivClicked.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.setSize=i.setSize.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.colorPanel=new y("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.fontFamilyPanel=new D("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i}return i(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.bgRectangle=l.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=l.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(l.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,r=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,r)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,r=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,r=this.height/2-t.height*e/2),{x:n,y:r}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),r={x:n.width*e,y:n.height*e};t.x-=r.x/2,t.y-=r.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&l.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&l.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.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>',t}(S),N=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new y("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.drawingImage=l.createImage(),this.visual.appendChild(this.drawingImage);var e=l.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.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)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],r=t[1],i=t[2],o=t[3],s=!1,a=0;a<this.canvasElement.height;a++)for(var l=0;l<this.canvasElement.width;l++)e.data[a*this.canvasElement.width*4+4*l+3]>0&&(s=!0,a<r&&(r=a),l<n&&(n=l),a>o&&(o=a),l>i&&(i=l));if(s){this.left=n/this.pixelRatio,this.top=r/this.pixelRatio,this.width=(i-n)/this.pixelRatio,this.height=(o-r)/this.pixelRatio;var c=document.createElement("canvas");c.width=i-n,c.height=o-r,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,r,i-n,o-r),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.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>',t}(S),R=function(e){function t(t,n,r){var i=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return i.typeBoxes=[],i.currentType=n,i.setCurrentType=i.setCurrentType.bind(i),i}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var i="both";switch(n){case 0:i="both";break;case 1:i="start";break;case 2:i="end";break;case 3:i="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=i===r.currentType?r.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(i,o)})),t.appendChild(o),"both"===i||"start"===i){var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',s.style.marginLeft="5px",o.appendChild(s)}var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",a.appendChild(l),o.appendChild(a),"both"===i||"end"===i){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==r.uiStyleSettings?r.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}r.typeBoxes.push(o)},r=this,i=0;i<4;i++)n(i);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(g),O=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new R("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,r=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+r/2)+" "+e+","+(t-r/2)+" "+(e+n/2)+","+(t+r/2)},t.prototype.createTips=function(){this.arrow1=l.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=l.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",l.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),l.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',t}(M),j=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new y("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return i(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',t}(C),P=function(e){function t(t,n,r,i){var o=e.call(this,t,i||'<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 o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=r,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return i(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.padding="5px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentOpacity(n,r)})),t.appendChild(r);var i=document.createElement("div");i.innerText=100*n+"%",r.appendChild(i),e.opacityBoxes.push(r)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(g),B=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new y("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new P("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return i(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&l.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.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>',t}(j),U='<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>',F='<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>',z=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new y("Text color",r.defaultColorSet,i.color,U),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new y("Fill color",r.defaultColorSet,i.bgColor,F),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new D("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new x,i.tipGrip.visual.transform.baseVal.appendItem(l.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return i(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){l.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=l.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(l.setAttributes(this.bgRectangle,[["fill",e]]),l.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var r=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:0},this.tipBase2Position={x:t+n,y:0}):(this.tipBase1Position={x:0,y:t},this.tipBase2Position={x:0,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?r<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:0},this.tipBase2Position={x:this.width-t,y:0}):(this.tipBase1Position={x:this.width,y:t},this.tipBase2Position={x:this.width,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?r<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:this.height},this.tipBase2Position={x:this.width-t,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-t-n},this.tipBase2Position={x:this.width,y:this.height-t}):r<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:this.height},this.tipBase2Position={x:t+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-t},this.tipBase2Position={x:0,y:this.height-t-n})},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.positionTip()},t.prototype.positionTip=function(){l.setAttributes(this.tip,[["points",this.getTipPoints()]]);var e=this.tipGrip.visual.transform.baseVal.getItem(0);e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(e,0)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.positionTip(),e.prototype.select.call(this)},t.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,e.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*n},this.positionTip()},t.typeName="CalloutMarker",t.title="Callout marker",t.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>',t}(I),H=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new y("Line color",a(r.defaultColorSet,["transparent"]),r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new y("Fill color",a(r.defaultColorSet,["transparent"]),i.fillColor,F),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new E("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new P("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&l.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&l.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&l.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&l.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&l.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.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>',t}(S),Z=function(e){function t(t,n,r){return e.call(this,t,n,r)||this}return i(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=l.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(l.createTransform()),this.visual.appendChild(this.tip1),this.tip2=l.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(l.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(l.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()]]),l.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 t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.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>',t}(M),W=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return i(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.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>',t}(H),G=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),q=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new y("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new E("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorCurve=l.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=l.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)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),l.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=l.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=l.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)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/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()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.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>',t}(A),V=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.textColor="transparent",i.fontSize="1rem",i.isMoved=!1,i.captionText="Caption",i.PADDING=5,i.captionBoxWidth=0,i.captionBoxHeight=0,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.textColor=r.defaultStrokeColor,i.fontFamily=r.defaultFontFamily,i.fontSize=r.defaultCaptionFontSize,i.captionText=r.defaultCaptionText,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i.sizeCaption=i.sizeCaption.bind(i),i.setCaptionText=i.setCaptionText.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.finishTextEditing=i.finishTextEditing.bind(i),i.setFont=i.setFont.bind(i),i.setTextColor=i.setTextColor.bind(i),i.strokePanel=new y("Line color",a(r.defaultColorSet,["transparent"]),i.strokeColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new y("Fill color",a(r.defaultColorSet,["transparent"]),i.fillColor,F),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new k("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new E("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.fontFamilyPanel=new D("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.textColorPanel=new y("Text color",r.defaultColorSet,i.textColor,U),i.textColorPanel.onColorChanged=i.setTextColor,i}return i(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},t.prototype.createVisual=function(){this.visual=l.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=l.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=l.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=l.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()},t.prototype.setCaptionText=function(e){this.captionText=e,this.captionElement.textContent=this.captionText,this.sizeCaption()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.sizeCaption=function(){var e=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=e.width+2*this.PADDING,this.captionBoxHeight=e.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),l.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')"]]),l.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')"]])},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(t){"Enter"===t.key&&e.finishTextEditing(e.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){e.finishTextEditing(e.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){e.finishTextEditing(e.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},t.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?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"))},t.prototype.finishTextEditing=function(e){this.setCaptionText(e.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},t.prototype.setFont=function(e){this.captionElement&&l.setAttributes(this.captionElement,[["font-family",e]]),this.fontFamily=e,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},t.prototype.setTextColor=function(e){this.captionElement&&l.setAttributes(this.captionElement,[["fill",e]]),this.textColor=e,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},t.prototype.setSize=function(){e.prototype.setSize.call(this),l.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.frame&&l.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.captionBg&&l.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.frame&&l.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.frame&&l.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var t=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},e.prototype.getState.call(this));return t.typeName=this.typeName,t},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.textColor=n.textColor,this.fontFamily=n.fontFamily,this.captionText=n.captionText,this.fontSize=n.fontSize,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="CaptionFrameMarker",t.title="Caption frame marker",t.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>',t}(S),K=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Y=function(e){function t(t,n,r){var i=e.call(this,t,!1)||this;return i.dataUrl=n,i.state=r,i}return i(t,e),t}(K),X=function(e){function t(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,r)||this;return i.marker=n,i}return i(t,e),t}(K),J=function(){function e(){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 e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Q=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new L,this._isOpen=!1,this.undoRedoManager=new G,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 J,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.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(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[T,N,O,I,W,H,B,z,Z,j,M,q,V]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[T,N,O,I,H,B,z]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[T,N,O,I,B]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,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(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),c.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==d.styleSheetRoot&&(this.styles.styleSheetRoot=d.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new K(e))}))},e.prototype.render=function(){return o(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new u).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var r=new K(t,!0);e(r),r.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new K(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._availableMarkerTypes).push.apply(e,t)},e.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},e.prototype.removeRenderEventListener=function(e){},e.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},e.prototype.removeCloseEventListener=function(e){},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,n)},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.resize=function(e,t){this._isResizing=!0;var n=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),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","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,r),this._isResizing=!1},e.prototype.scaleMarkers=function(e,t){var n,r=this;this._currentMarker&&this._currentMarker instanceof I?this._currentMarker.scale(e,t):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==r._currentMarker&&n.scale(e,t)})),void 0!==n&&this.setCurrentMarker(n)},e.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"},e.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},e.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)},e.prototype.addDefs=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.defs=l.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},e.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)},e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},e.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)},e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},e.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)},e.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 e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.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>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?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")},e.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"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&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 e=void 0!==this.settings.uiOffsetTop?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=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?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=void 0!==this.uiStyleSettings.zIndex?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="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new m(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","popup"===this.settings.displayMode&&(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","popup"===this.settings.displayMode&&(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"),void 0===this.settings.uiOffsetTop&&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 v(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},e.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){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":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new X(e,e._currentMarker,!0);n(r),r.defaultPrevented&&(t=!0)})),!t){var n=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(t){return t(new X(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var r=new X(e,void 0,!0);n(r),r.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=r.markers[t];r.setCurrentMarker(r.markers[t]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(t){return t(new X(e,n))}))},r=this,i=this.markers.length-1;i>=0;i--)n(i);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(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=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(t){return t(new K(e))}))}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach((function(t){return t(new K(e))}))}},e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},e.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new K(e))})))},e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},e.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new K(e))})))},e.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},e.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},e.prototype.startRenderAndClose=function(){return o(this,void 0,void 0,(function(){var e,t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(r){return r(new Y(n,e,t))})),this.close(!0),[2]}}))}))},e.prototype.getState=function(e){!0===e&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(e){return t.markers.push(e.getState())})),t},e.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(e){var n=t._availableMarkerTypes.find((function(t){return t.typeName===e.typeName}));if(void 0!==n){var r=t.addNewMarker(n);r.restoreState(e),t.markers.push(r)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(e){return e(new K(t))}))},e.prototype.addNewMarker=function(e){var t=l.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},e.prototype.createNewMarker=function(e){var t,n=this;(t="string"==typeof e?this._availableMarkerTypes.find((function(t){return t.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),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(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(e){return e(new X(n,n._currentMarker))})))},e.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof N&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(N):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(e){return e(new X(t,t._currentMarker))}))},e.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},e.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},e.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(n){return n(new X(t,e))}))},e.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(e){return e(new X(t,t._currentMarker))}))),this._currentMarker=e,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(e){return e(new X(t,t._currentMarker))})))},e.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==e.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},e.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),"select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t&&t!==this._currentMarker&&this.setCurrentMarker(t),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},e.prototype.onPointerMove=function(e){1!==this.touchPoints&&"touch"===e.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||e.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"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()},e.prototype.addLicenseKey=function(e){c.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new K(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new K(e))})))},e.instanceCounter=0,e}()},66042:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(33885),i=n(42978),o=n(43403),s=n(34280),a=n(59301),l=a.createContext(null),c=a.createContext({}),u=l,d=n(20068),h=n(54476),f=n(92310),p=n.n(f),m=n(77900),v=n(10228),g=n(26112),y=n(75931),_=n(8654),b=["prefixCls","className","containerRef"];var x=function(e){var t=e.prefixCls,n=e.className,r=e.containerRef,i=(0,y.Z)(e,b),o=a.useContext(c).panel,s=(0,_.x1)(o,r);return a.createElement("div",(0,h.Z)({className:p()("".concat(t,"-content"),n),role:"dialog",ref:s},(0,g.Z)(e,{aria:!0}),{"aria-modal":"true"},i))},w=n(48736);function S(e){return"string"==typeof e&&String(Number(e))===e?((0,w.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var C={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function k(e,t){var n,o,s,l=e.prefixCls,c=e.open,f=e.placement,y=e.inline,_=e.push,b=e.forceRender,w=e.autoFocus,k=e.keyboard,E=e.classNames,T=e.rootClassName,L=e.rootStyle,A=e.zIndex,M=e.className,D=e.id,I=e.style,N=e.motion,R=e.width,O=e.height,j=e.children,P=e.mask,B=e.maskClosable,U=e.maskMotion,F=e.maskClassName,z=e.maskStyle,H=e.afterOpenChange,Z=e.onClose,W=e.onMouseEnter,G=e.onMouseOver,q=e.onMouseLeave,V=e.onClick,K=e.onKeyDown,Y=e.onKeyUp,X=e.styles,J=e.drawerRender,Q=a.useRef(),$=a.useRef(),ee=a.useRef();a.useImperativeHandle(t,(function(){return Q.current}));a.useEffect((function(){var e;c&&w&&(null===(e=Q.current)||void 0===e||e.focus({preventScroll:!0}))}),[c]);var te=a.useState(!1),ne=(0,i.Z)(te,2),re=ne[0],ie=ne[1],oe=a.useContext(u),se=null!==(n=null!==(o=null===(s="boolean"==typeof _?_?{}:{distance:0}:_||{})||void 0===s?void 0:s.distance)&&void 0!==o?o:null==oe?void 0:oe.pushDistance)&&void 0!==n?n:180,ae=a.useMemo((function(){return{pushDistance:se,push:function(){ie(!0)},pull:function(){ie(!1)}}}),[se]);a.useEffect((function(){var e,t;c?null==oe||null===(e=oe.push)||void 0===e||e.call(oe):null==oe||null===(t=oe.pull)||void 0===t||t.call(oe)}),[c]),a.useEffect((function(){return function(){var e;null==oe||null===(e=oe.pull)||void 0===e||e.call(oe)}}),[]);var le=P&&a.createElement(m.default,(0,h.Z)({key:"mask"},U,{visible:c}),(function(e,t){var n=e.className,i=e.style;return a.createElement("div",{className:p()("".concat(l,"-mask"),n,null==E?void 0:E.mask,F),style:(0,r.Z)((0,r.Z)((0,r.Z)({},i),z),null==X?void 0:X.mask),onClick:B&&c?Z:void 0,ref:t})})),ce="function"==typeof N?N(f):N,ue={};if(re&&se)switch(f){case"top":ue.transform="translateY(".concat(se,"px)");break;case"bottom":ue.transform="translateY(".concat(-se,"px)");break;case"left":ue.transform="translateX(".concat(se,"px)");break;default:ue.transform="translateX(".concat(-se,"px)")}"left"===f||"right"===f?ue.width=S(R):ue.height=S(O);var de={onMouseEnter:W,onMouseOver:G,onMouseLeave:q,onClick:V,onKeyDown:K,onKeyUp:Y},he=a.createElement(m.default,(0,h.Z)({key:"panel"},ce,{visible:c,forceRender:b,onVisibleChanged:function(e){null==H||H(e)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),(function(t,n){var i=t.className,o=t.style,s=a.createElement(x,(0,h.Z)({id:D,containerRef:n,prefixCls:l,className:p()(M,null==E?void 0:E.content),style:(0,r.Z)((0,r.Z)({},I),null==X?void 0:X.content)},(0,g.Z)(e,{aria:!0}),de),j);return a.createElement("div",(0,h.Z)({className:p()("".concat(l,"-content-wrapper"),null==E?void 0:E.wrapper,i),style:(0,r.Z)((0,r.Z)((0,r.Z)({},ue),o),null==X?void 0:X.wrapper)},(0,g.Z)(e,{data:!0})),J?J(s):s)})),fe=(0,r.Z)({},L);return A&&(fe.zIndex=A),a.createElement(u.Provider,{value:ae},a.createElement("div",{className:p()(l,"".concat(l,"-").concat(f),T,(0,d.Z)((0,d.Z)({},"".concat(l,"-open"),c),"".concat(l,"-inline"),y)),style:fe,tabIndex:-1,ref:Q,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case v.Z.TAB:var r;if(t===v.Z.TAB)if(n||document.activeElement!==ee.current){if(n&&document.activeElement===$.current){var i;null===(i=ee.current)||void 0===i||i.focus({preventScroll:!0})}}else null===(r=$.current)||void 0===r||r.focus({preventScroll:!0});break;case v.Z.ESC:Z&&k&&(e.stopPropagation(),Z(e))}}},le,a.createElement("div",{tabIndex:0,ref:$,style:C,"aria-hidden":"true","data-sentinel":"start"}),he,a.createElement("div",{tabIndex:0,ref:ee,style:C,"aria-hidden":"true","data-sentinel":"end"})))}var E=a.forwardRef(k);var T=function(e){var t=e.open,n=void 0!==t&&t,l=e.prefixCls,u=void 0===l?"rc-drawer":l,d=e.placement,h=void 0===d?"right":d,f=e.autoFocus,p=void 0===f||f,m=e.keyboard,v=void 0===m||m,g=e.width,y=void 0===g?378:g,_=e.mask,b=void 0===_||_,x=e.maskClosable,w=void 0===x||x,S=e.getContainer,C=e.forceRender,k=e.afterOpenChange,T=e.destroyOnClose,L=e.onMouseEnter,A=e.onMouseOver,M=e.onMouseLeave,D=e.onClick,I=e.onKeyDown,N=e.onKeyUp,R=e.panelRef,O=a.useState(!1),j=(0,i.Z)(O,2),P=j[0],B=j[1];var U=a.useState(!1),F=(0,i.Z)(U,2),z=F[0],H=F[1];(0,s.Z)((function(){H(!0)}),[]);var Z=!!z&&n,W=a.useRef(),G=a.useRef();(0,s.Z)((function(){Z&&(G.current=document.activeElement)}),[Z]);var q=a.useMemo((function(){return{panel:R}}),[R]);if(!C&&!P&&!Z&&T)return null;var V={onMouseEnter:L,onMouseOver:A,onMouseLeave:M,onClick:D,onKeyDown:I,onKeyUp:N},K=(0,r.Z)((0,r.Z)({},e),{},{open:Z,prefixCls:u,placement:h,autoFocus:p,keyboard:v,width:y,mask:b,maskClosable:w,inline:!1===S,afterOpenChange:function(e){var t,n;(B(e),null==k||k(e),e||!G.current||null!==(t=W.current)&&void 0!==t&&t.contains(G.current))||(null===(n=G.current)||void 0===n||n.focus({preventScroll:!0}))},ref:W},V);return a.createElement(c.Provider,{value:q},a.createElement(o.Z,{open:Z||C||P,autoDestroy:!1,getContainer:S,autoLock:b&&(Z||P)},a.createElement(E,K)))}},91574:function(e,t,n){"use strict";n.d(t,{Z:function(){return H}});var r=n(54476),i=n(33885),o=n(20068),s=n(42978),a=n(76190),l=n(75931),c=n(92310),u=n.n(c);function d(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}var h=n(18929),f=n(59301),p=n(55311),m=n(8224),v=n(10228),g=n(43403),y=n(77900),_=f.createContext(null),b=function(e){var t=e.visible,n=e.maskTransitionName,r=e.getContainer,s=e.prefixCls,a=e.rootClassName,l=e.icons,c=e.countRender,d=e.showSwitch,h=e.showProgress,p=e.current,m=e.transform,b=e.count,x=e.scale,w=e.minScale,S=e.maxScale,C=e.closeIcon,k=e.onActive,E=e.onClose,T=e.onZoomIn,L=e.onZoomOut,A=e.onRotateRight,M=e.onRotateLeft,D=e.onFlipX,I=e.onFlipY,N=e.onReset,R=e.toolbarRender,O=e.zIndex,j=e.image,P=(0,f.useContext)(_),B=l.rotateLeft,U=l.rotateRight,F=l.zoomIn,z=l.zoomOut,H=l.close,Z=l.left,W=l.right,G=l.flipX,q=l.flipY,V="".concat(s,"-operations-operation");f.useEffect((function(){var e=function(e){e.keyCode===v.Z.ESC&&E()};return t&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]);var K=function(e,t){e.preventDefault(),e.stopPropagation(),k(t)},Y=f.useCallback((function(e){var t=e.type,n=e.disabled,r=e.onClick,i=e.icon;return f.createElement("div",{key:t,className:u()(V,"".concat(s,"-operations-operation-").concat(t),(0,o.Z)({},"".concat(s,"-operations-operation-disabled"),!!n)),onClick:r},i)}),[V,s]),X=d?Y({icon:Z,onClick:function(e){return K(e,-1)},type:"prev",disabled:0===p}):void 0,J=d?Y({icon:W,onClick:function(e){return K(e,1)},type:"next",disabled:p===b-1}):void 0,Q=Y({icon:q,onClick:I,type:"flipY"}),$=Y({icon:G,onClick:D,type:"flipX"}),ee=Y({icon:B,onClick:M,type:"rotateLeft"}),te=Y({icon:U,onClick:A,type:"rotateRight"}),ne=Y({icon:z,onClick:L,type:"zoomOut",disabled:x<=w}),re=Y({icon:F,onClick:T,type:"zoomIn",disabled:x===S}),ie=f.createElement("div",{className:"".concat(s,"-operations")},Q,$,ee,te,ne,re);return f.createElement(y.default,{visible:t,motionName:n},(function(e){var t=e.className,n=e.style;return f.createElement(g.Z,{open:!0,getContainer:null!=r?r:document.body},f.createElement("div",{className:u()("".concat(s,"-operations-wrapper"),t,a),style:(0,i.Z)((0,i.Z)({},n),{},{zIndex:O})},null===C?null:f.createElement("button",{className:"".concat(s,"-close"),onClick:E},C||H),d&&f.createElement(f.Fragment,null,f.createElement("div",{className:u()("".concat(s,"-switch-left"),(0,o.Z)({},"".concat(s,"-switch-left-disabled"),0===p)),onClick:function(e){return K(e,-1)}},Z),f.createElement("div",{className:u()("".concat(s,"-switch-right"),(0,o.Z)({},"".concat(s,"-switch-right-disabled"),p===b-1)),onClick:function(e){return K(e,1)}},W)),f.createElement("div",{className:"".concat(s,"-footer")},h&&f.createElement("div",{className:"".concat(s,"-progress")},c?c(p+1,b):"".concat(p+1," / ").concat(b)),R?R(ie,(0,i.Z)((0,i.Z)({icons:{prevIcon:X,nextIcon:J,flipYIcon:Q,flipXIcon:$,rotateLeftIcon:ee,rotateRightIcon:te,zoomOutIcon:ne,zoomInIcon:re},actions:{onActive:k,onFlipY:I,onFlipX:D,onRotateLeft:M,onRotateRight:A,onZoomOut:L,onZoomIn:T,onReset:N,onClose:E},transform:m},P?{current:p,total:b}:{}),{},{image:j})):ie)))}))},x=n(13697),w=n(16089),S={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};var C=n(48736);function k(e,t,n,r){var i=t+n,s=(n-r)/2;if(n>r){if(t>0)return(0,o.Z)({},e,s);if(t<0&&i<r)return(0,o.Z)({},e,-s)}else if(t<0||i>r)return(0,o.Z)({},e,t<0?s:-s);return{}}function E(e,t,n,r){var o=d(),s=o.width,a=o.height,l=null;return e<=s&&t<=a?l={x:0,y:0}:(e>s||t>a)&&(l=(0,i.Z)((0,i.Z)({},k("x",n,e,s)),k("y",r,t,a))),l}function T(e){var t=e.src,n=e.isCustomPlaceholder,r=e.fallback,i=(0,f.useState)(n?"loading":"normal"),o=(0,s.Z)(i,2),a=o[0],l=o[1],c=(0,f.useRef)(!1),u="error"===a;(0,f.useEffect)((function(){var e=!0;return function(e){return new Promise((function(t){if(e){var n=document.createElement("img");n.onerror=function(){return t(!1)},n.onload=function(){return t(!0)},n.src=e}else t(!1)}))}(t).then((function(t){!t&&e&&l("error")})),function(){e=!1}}),[t]),(0,f.useEffect)((function(){n&&!c.current?l("loading"):u&&l("normal")}),[t]);var d=function(){l("normal")};return[function(e){c.current=!1,"loading"===a&&null!=e&&e.complete&&(e.naturalWidth||e.naturalHeight)&&(c.current=!0,d())},u&&r?{src:r}:{onLoad:d,src:t},a]}function L(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.hypot(n,r)}function A(e,t,n,r,o,a,l){var c=o.rotate,u=o.scale,d=o.x,h=o.y,p=(0,f.useState)(!1),v=(0,s.Z)(p,2),g=v[0],y=v[1],_=(0,f.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),b=function(e){_.current=(0,i.Z)((0,i.Z)({},_.current),e)};return(0,f.useEffect)((function(){var e;return n&&t&&(e=(0,m.Z)(window,"touchmove",(function(e){return e.preventDefault()}),{passive:!1})),function(){var t;null===(t=e)||void 0===t||t.remove()}}),[n,t]),{isTouching:g,onTouchStart:function(e){if(t){e.stopPropagation(),y(!0);var n=e.touches,r=void 0===n?[]:n;r.length>1?b({point1:{x:r[0].clientX,y:r[0].clientY},point2:{x:r[1].clientX,y:r[1].clientY},eventType:"touchZoom"}):b({point1:{x:r[0].clientX-d,y:r[0].clientY-h},eventType:"move"})}},onTouchMove:function(e){var t=e.touches,n=void 0===t?[]:t,r=_.current,i=r.point1,o=r.point2,c=r.eventType;if(n.length>1&&"touchZoom"===c){var u={x:n[0].clientX,y:n[0].clientY},d={x:n[1].clientX,y:n[1].clientY},h=function(e,t,n,r){var i=L(e,n),o=L(t,r);if(0===i&&0===o)return[e.x,e.y];var s=i/(i+o);return[e.x+s*(t.x-e.x),e.y+s*(t.y-e.y)]}(i,o,u,d),f=(0,s.Z)(h,2),p=f[0],m=f[1],v=L(u,d)/L(i,o);l(v,"touchZoom",p,m,!0),b({point1:u,point2:d,eventType:"touchZoom"})}else"move"===c&&(a({x:n[0].clientX-i.x,y:n[0].clientY-i.y},"move"),b({eventType:"move"}))},onTouchEnd:function(){if(n){if(g&&y(!1),b({eventType:"none"}),r>u)return a({x:0,y:0,scale:r},"touchZoom");var t=e.current.offsetWidth*u,o=e.current.offsetHeight*u,s=e.current.getBoundingClientRect(),l=s.left,d=s.top,h=c%180!=0,f=E(h?o:t,h?t:o,l,d);f&&a((0,i.Z)({},f),"dragRebound")}}}}var M=["fallback","src","imgRef"],D=["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"],I=function(e){var t=e.fallback,n=e.src,i=e.imgRef,o=(0,l.Z)(e,M),a=T({src:n,fallback:t}),c=(0,s.Z)(a,2),u=c[0],d=c[1];return f.createElement("img",(0,r.Z)({ref:function(e){i.current=e,u(e)}},o,d))},N=function(e){var t=e.prefixCls,n=e.src,a=e.alt,c=e.imageInfo,h=e.fallback,g=e.movable,y=void 0===g||g,k=e.onClose,T=e.visible,L=e.icons,M=void 0===L?{}:L,N=e.rootClassName,R=e.closeIcon,O=e.getContainer,j=e.current,P=void 0===j?0:j,B=e.count,U=void 0===B?1:B,F=e.countRender,z=e.scaleStep,H=void 0===z?.5:z,Z=e.minScale,W=void 0===Z?1:Z,G=e.maxScale,q=void 0===G?50:G,V=e.transitionName,K=void 0===V?"zoom":V,Y=e.maskTransitionName,X=void 0===Y?"fade":Y,J=e.imageRender,Q=e.imgCommonProps,$=e.toolbarRender,ee=e.onTransform,te=e.onChange,ne=(0,l.Z)(e,D),re=(0,f.useRef)(),ie=(0,f.useContext)(_),oe=ie&&U>1,se=ie&&U>=1,ae=(0,f.useState)(!0),le=(0,s.Z)(ae,2),ce=le[0],ue=le[1],de=function(e,t,n,r){var o=(0,f.useRef)(null),a=(0,f.useRef)([]),l=(0,f.useState)(S),c=(0,s.Z)(l,2),u=c[0],h=c[1],p=function(e,t){null===o.current&&(a.current=[],o.current=(0,w.Z)((function(){h((function(e){var n=e;return a.current.forEach((function(e){n=(0,i.Z)((0,i.Z)({},n),e)})),o.current=null,null==r||r({transform:n,action:t}),n}))}))),a.current.push((0,i.Z)((0,i.Z)({},u),e))};return{transform:u,resetTransform:function(e){h(S),(0,x.Z)(S,u)||null==r||r({transform:S,action:e})},updateTransform:p,dispatchZoomChange:function(r,i,o,s,a){var l=e.current,c=l.width,h=l.height,f=l.offsetWidth,m=l.offsetHeight,v=l.offsetLeft,g=l.offsetTop,y=r,_=u.scale*r;_>n?(_=n,y=n/u.scale):_<t&&(y=(_=a?_:t)/u.scale);var b=null!=o?o:innerWidth/2,x=null!=s?s:innerHeight/2,w=y-1,S=w*c*.5,C=w*h*.5,k=w*(b-u.x-v),E=w*(x-u.y-g),T=u.x-(k-S),L=u.y-(E-C);if(r<1&&1===_){var A=f*_,M=m*_,D=d(),I=D.width,N=D.height;A<=I&&M<=N&&(T=0,L=0)}p({x:T,y:L,scale:_},i)}}}(re,W,q,ee),he=de.transform,fe=de.resetTransform,pe=de.updateTransform,me=de.dispatchZoomChange,ve=function(e,t,n,r,o,a,l){var c=o.rotate,u=o.scale,d=o.x,h=o.y,p=(0,f.useState)(!1),v=(0,s.Z)(p,2),g=v[0],y=v[1],_=(0,f.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),b=function(e){n&&g&&a({x:e.pageX-_.current.diffX,y:e.pageY-_.current.diffY},"move")},x=function(){if(n&&g){y(!1);var t=_.current,r=t.transformX,o=t.transformY;if(d===r||h===o)return;var s=e.current.offsetWidth*u,l=e.current.offsetHeight*u,f=e.current.getBoundingClientRect(),p=f.left,m=f.top,v=c%180!=0,b=E(v?l:s,v?s:l,p,m);b&&a((0,i.Z)({},b),"dragRebound")}};return(0,f.useEffect)((function(){var e,n,r,i;if(t){r=(0,m.Z)(window,"mouseup",x,!1),i=(0,m.Z)(window,"mousemove",b,!1);try{window.top!==window.self&&(e=(0,m.Z)(window.top,"mouseup",x,!1),n=(0,m.Z)(window.top,"mousemove",b,!1))}catch(e){(0,C.Kp)(!1,"[rc-image] ".concat(e))}}return function(){var t,o,s,a;null===(t=r)||void 0===t||t.remove(),null===(o=i)||void 0===o||o.remove(),null===(s=e)||void 0===s||s.remove(),null===(a=n)||void 0===a||a.remove()}}),[n,g,d,h,c,t]),{isMoving:g,onMouseDown:function(e){t&&0===e.button&&(e.preventDefault(),e.stopPropagation(),_.current={diffX:e.pageX-d,diffY:e.pageY-h,transformX:d,transformY:h},y(!0))},onMouseMove:b,onMouseUp:x,onWheel:function(e){if(n&&0!=e.deltaY){var t=Math.abs(e.deltaY/100),i=1+Math.min(t,1)*r;e.deltaY>0&&(i=1/i),l(i,"wheel",e.clientX,e.clientY)}}}}(re,y,T,H,he,pe,me),ge=ve.isMoving,ye=ve.onMouseDown,_e=ve.onWheel,be=A(re,y,T,W,he,pe,me),xe=be.isTouching,we=be.onTouchStart,Se=be.onTouchMove,Ce=be.onTouchEnd,ke=he.rotate,Ee=he.scale,Te=u()((0,o.Z)({},"".concat(t,"-moving"),ge));(0,f.useEffect)((function(){ce||ue(!0)}),[ce]);var Le=function(e){var t=P+e;!Number.isInteger(t)||t<0||t>U-1||(ue(!1),fe(e<0?"prev":"next"),null==te||te(t,P))},Ae=function(e){T&&oe&&(e.keyCode===v.Z.LEFT?Le(-1):e.keyCode===v.Z.RIGHT&&Le(1))};(0,f.useEffect)((function(){var e=(0,m.Z)(window,"keydown",Ae,!1);return function(){e.remove()}}),[T,oe,P]);var Me=f.createElement(I,(0,r.Z)({},Q,{width:e.width,height:e.height,imgRef:re,className:"".concat(t,"-img"),alt:a,style:{transform:"translate3d(".concat(he.x,"px, ").concat(he.y,"px, 0) scale3d(").concat(he.flipX?"-":"").concat(Ee,", ").concat(he.flipY?"-":"").concat(Ee,", 1) rotate(").concat(ke,"deg)"),transitionDuration:(!ce||xe)&&"0s"},fallback:h,src:n,onWheel:_e,onMouseDown:ye,onDoubleClick:function(e){T&&(1!==Ee?pe({x:0,y:0,scale:1},"doubleClick"):me(1+H,"doubleClick",e.clientX,e.clientY))},onTouchStart:we,onTouchMove:Se,onTouchEnd:Ce,onTouchCancel:Ce})),De=(0,i.Z)({url:n,alt:a},c);return f.createElement(f.Fragment,null,f.createElement(p.Z,(0,r.Z)({transitionName:K,maskTransitionName:X,closable:!1,keyboard:!0,prefixCls:t,onClose:k,visible:T,classNames:{wrapper:Te},rootClassName:N,getContainer:O},ne,{afterClose:function(){fe("close")}}),f.createElement("div",{className:"".concat(t,"-img-wrapper")},J?J(Me,(0,i.Z)({transform:he,image:De},ie?{current:P}:{})):Me)),f.createElement(b,{visible:T,transform:he,maskTransitionName:X,closeIcon:R,getContainer:O,prefixCls:t,rootClassName:N,icons:M,countRender:F,showSwitch:oe,showProgress:se,current:P,count:U,scale:Ee,minScale:W,maxScale:q,toolbarRender:$,onActive:Le,onZoomIn:function(){me(1+H,"zoomIn")},onZoomOut:function(){me(1/(1+H),"zoomOut")},onRotateRight:function(){pe({rotate:ke+90},"rotateRight")},onRotateLeft:function(){pe({rotate:ke-90},"rotateLeft")},onFlipX:function(){pe({flipX:!he.flipX},"flipX")},onFlipY:function(){pe({flipY:!he.flipY},"flipY")},onClose:k,onReset:function(){fe("reset")},zIndex:void 0!==ne.zIndex?ne.zIndex+1:void 0,image:De}))},R=n(94480),O=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];var j=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],P=["src"],B=0;var U=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],F=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],z=function(e){var t=e.src,n=e.alt,c=e.onPreviewClose,d=e.prefixCls,p=void 0===d?"rc-image":d,m=e.previewPrefixCls,v=void 0===m?"".concat(p,"-preview"):m,g=e.placeholder,y=e.fallback,b=e.width,x=e.height,w=e.style,S=e.preview,C=void 0===S||S,k=e.className,E=e.onClick,L=e.onError,A=e.wrapperClassName,M=e.wrapperStyle,D=e.rootClassName,I=(0,l.Z)(e,U),R=g&&!0!==g,j="object"===(0,a.Z)(C)?C:{},P=j.src,z=j.visible,H=void 0===z?void 0:z,Z=j.onVisibleChange,W=void 0===Z?c:Z,G=j.getContainer,q=void 0===G?void 0:G,V=j.mask,K=j.maskClassName,Y=j.movable,X=j.icons,J=j.scaleStep,Q=j.minScale,$=j.maxScale,ee=j.imageRender,te=j.toolbarRender,ne=(0,l.Z)(j,F),re=null!=P?P:t,ie=(0,h.Z)(!!H,{value:H,onChange:W}),oe=(0,s.Z)(ie,2),se=oe[0],ae=oe[1],le=T({src:t,isCustomPlaceholder:R,fallback:y}),ce=(0,s.Z)(le,3),ue=ce[0],de=ce[1],he=ce[2],fe=(0,f.useState)(null),pe=(0,s.Z)(fe,2),me=pe[0],ve=pe[1],ge=(0,f.useContext)(_),ye=!!C,_e=u()(p,A,D,(0,o.Z)({},"".concat(p,"-error"),"error"===he)),be=(0,f.useMemo)((function(){var t={};return O.forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t}),O.map((function(t){return e[t]}))),xe=function(e,t){var n=f.useState((function(){return String(B+=1)})),r=(0,s.Z)(n,1)[0],i=f.useContext(_),o={data:t,canPreview:e};return f.useEffect((function(){if(i)return i.register(r,o)}),[]),f.useEffect((function(){i&&i.register(r,o)}),[e,t]),r}(ye,(0,f.useMemo)((function(){return(0,i.Z)((0,i.Z)({},be),{},{src:re})}),[re,be]));return f.createElement(f.Fragment,null,f.createElement("div",(0,r.Z)({},I,{className:_e,onClick:ye?function(e){var t,n,r,i=(t=e.target,n=t.getBoundingClientRect(),r=document.documentElement,{left:n.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}),o=i.left,s=i.top;ge?ge.onPreview(xe,re,o,s):(ve({x:o,y:s}),ae(!0)),null==E||E(e)}:E,style:(0,i.Z)({width:b,height:x},M)}),f.createElement("img",(0,r.Z)({},be,{className:u()("".concat(p,"-img"),(0,o.Z)({},"".concat(p,"-img-placeholder"),!0===g),k),style:(0,i.Z)({height:x},w),ref:ue},de,{width:b,height:x,onError:L})),"loading"===he&&f.createElement("div",{"aria-hidden":"true",className:"".concat(p,"-placeholder")},g),V&&ye&&f.createElement("div",{className:u()("".concat(p,"-mask"),K),style:{display:"none"===(null==w?void 0:w.display)?"none":void 0}},V)),!ge&&ye&&f.createElement(N,(0,r.Z)({"aria-hidden":!se,visible:se,prefixCls:v,onClose:function(){ae(!1),ve(null)},mousePosition:me,src:re,alt:n,imageInfo:{width:b,height:x},fallback:y,getContainer:q,icons:X,movable:Y,scaleStep:J,minScale:Q,maxScale:$,rootClassName:D,imageRender:ee,imgCommonProps:be,toolbarRender:te},ne)))};z.PreviewGroup=function(e){var t,n=e.previewPrefixCls,c=void 0===n?"rc-image-preview":n,u=e.children,d=e.icons,p=void 0===d?{}:d,m=e.items,v=e.preview,g=e.fallback,y="object"===(0,a.Z)(v)?v:{},b=y.visible,x=y.onVisibleChange,w=y.getContainer,S=y.current,C=y.movable,k=y.minScale,E=y.maxScale,T=y.countRender,L=y.closeIcon,A=y.onChange,M=y.onTransform,D=y.toolbarRender,I=y.imageRender,B=(0,l.Z)(y,j),U=function(e){var t=f.useState({}),n=(0,s.Z)(t,2),r=n[0],a=n[1],l=f.useCallback((function(e,t){return a((function(n){return(0,i.Z)((0,i.Z)({},n),{},(0,o.Z)({},e,t))})),function(){a((function(t){var n=(0,i.Z)({},t);return delete n[e],n}))}}),[]);return[f.useMemo((function(){return e?e.map((function(e){if("string"==typeof e)return{data:{src:e}};var t={};return Object.keys(e).forEach((function(n){["src"].concat((0,R.Z)(O)).includes(n)&&(t[n]=e[n])})),{data:t}})):Object.keys(r).reduce((function(e,t){var n=r[t],i=n.canPreview,o=n.data;return i&&e.push({data:o,id:t}),e}),[])}),[e,r]),l,!!e]}(m),F=(0,s.Z)(U,3),z=F[0],H=F[1],Z=F[2],W=(0,h.Z)(0,{value:S}),G=(0,s.Z)(W,2),q=G[0],V=G[1],K=(0,f.useState)(!1),Y=(0,s.Z)(K,2),X=Y[0],J=Y[1],Q=(null===(t=z[q])||void 0===t?void 0:t.data)||{},$=Q.src,ee=(0,l.Z)(Q,P),te=(0,h.Z)(!!b,{value:b,onChange:function(e,t){null==x||x(e,t,q)}}),ne=(0,s.Z)(te,2),re=ne[0],ie=ne[1],oe=(0,f.useState)(null),se=(0,s.Z)(oe,2),ae=se[0],le=se[1],ce=f.useCallback((function(e,t,n,r){var i=Z?z.findIndex((function(e){return e.data.src===t})):z.findIndex((function(t){return t.id===e}));V(i<0?0:i),ie(!0),le({x:n,y:r}),J(!0)}),[z,Z]);f.useEffect((function(){re?X||V(0):J(!1)}),[re]);var ue=f.useMemo((function(){return{register:H,onPreview:ce}}),[H,ce]);return f.createElement(_.Provider,{value:ue},u,f.createElement(N,(0,r.Z)({"aria-hidden":!re,movable:C,visible:re,prefixCls:c,closeIcon:L,onClose:function(){ie(!1),le(null)},mousePosition:ae,imgCommonProps:ee,src:$,fallback:g,icons:p,minScale:k,maxScale:E,getContainer:w,current:q,count:z.length,countRender:T,onTransform:M,toolbarRender:D,imageRender:I,onChange:function(e,t){V(e),null==A||A(e,t)}},B)))};var H=z},23425:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(20068),i=n(54476),o=n(76190),s=n(33885),a=n(42978),l=n(92310),c=n.n(l),u=n(18929),d=n(10228),h=n(26112),f=(n(48736),n(59301)),p=n(17119),m=[10,20,50,100];var v=function(e){var t=e.pageSizeOptions,n=void 0===t?m:t,r=e.locale,i=e.changeSize,o=e.pageSize,s=e.goButton,l=e.quickGo,c=e.rootPrefixCls,u=e.disabled,h=e.buildOptionText,p=e.showSizeChanger,v=e.sizeChangerRender,g=f.useState(""),y=(0,a.Z)(g,2),_=y[0],b=y[1],x=function(){return!_||Number.isNaN(_)?void 0:Number(_)},w="function"==typeof h?h:function(e){return"".concat(e," ").concat(r.items_per_page)},S=function(e){""!==_&&(e.keyCode!==d.Z.ENTER&&"click"!==e.type||(b(""),null==l||l(x())))},C="".concat(c,"-options");if(!p&&!l)return null;var k=null,E=null,T=null;return p&&v&&(k=v({disabled:u,size:o,onSizeChange:function(e){null==i||i(Number(e))},"aria-label":r.page_size,className:"".concat(C,"-size-changer"),options:(n.some((function(e){return e.toString()===o.toString()}))?n:n.concat([o]).sort((function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))}))).map((function(e){return{label:w(e),value:e}}))})),l&&(s&&(T="boolean"==typeof s?f.createElement("button",{type:"button",onClick:S,onKeyUp:S,disabled:u,className:"".concat(C,"-quick-jumper-button")},r.jump_to_confirm):f.createElement("span",{onClick:S,onKeyUp:S},s)),E=f.createElement("div",{className:"".concat(C,"-quick-jumper")},r.jump_to,f.createElement("input",{disabled:u,type:"text",value:_,onChange:function(e){b(e.target.value)},onKeyUp:S,onBlur:function(e){s||""===_||(b(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(c,"-item"))>=0)||null==l||l(x()))},"aria-label":r.page}),r.page,T)),f.createElement("li",{className:C},k,E)};var g=function(e){var t=e.rootPrefixCls,n=e.page,i=e.active,o=e.className,s=e.showTitle,a=e.onClick,l=e.onKeyPress,u=e.itemRender,d="".concat(t,"-item"),h=c()(d,"".concat(d,"-").concat(n),(0,r.Z)((0,r.Z)({},"".concat(d,"-active"),i),"".concat(d,"-disabled"),!n),o),p=u(n,"page",f.createElement("a",{rel:"nofollow"},n));return p?f.createElement("li",{title:s?String(n):null,className:h,onClick:function(){a(n)},onKeyDown:function(e){l(e,a,n)},tabIndex:0},p):null},y=function(e,t,n){return n};function _(){}function b(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function x(e,t,n){var r=void 0===e?t:e;return Math.floor((n-1)/r)+1}var w=function(e){var t=e.prefixCls,n=void 0===t?"rc-pagination":t,l=e.selectPrefixCls,m=void 0===l?"rc-select":l,w=e.className,S=e.current,C=e.defaultCurrent,k=void 0===C?1:C,E=e.total,T=void 0===E?0:E,L=e.pageSize,A=e.defaultPageSize,M=void 0===A?10:A,D=e.onChange,I=void 0===D?_:D,N=e.hideOnSinglePage,R=e.align,O=e.showPrevNextJumpers,j=void 0===O||O,P=e.showQuickJumper,B=e.showLessItems,U=e.showTitle,F=void 0===U||U,z=e.onShowSizeChange,H=void 0===z?_:z,Z=e.locale,W=void 0===Z?p.Z:Z,G=e.style,q=e.totalBoundaryShowSizeChanger,V=void 0===q?50:q,K=e.disabled,Y=e.simple,X=e.showTotal,J=e.showSizeChanger,Q=void 0===J?T>V:J,$=e.sizeChangerRender,ee=e.pageSizeOptions,te=e.itemRender,ne=void 0===te?y:te,re=e.jumpPrevIcon,ie=e.jumpNextIcon,oe=e.prevIcon,se=e.nextIcon,ae=f.useRef(null),le=(0,u.Z)(10,{value:L,defaultValue:M}),ce=(0,a.Z)(le,2),ue=ce[0],de=ce[1],he=(0,u.Z)(1,{value:S,defaultValue:k,postState:function(e){return Math.max(1,Math.min(e,x(void 0,ue,T)))}}),fe=(0,a.Z)(he,2),pe=fe[0],me=fe[1],ve=f.useState(pe),ge=(0,a.Z)(ve,2),ye=ge[0],_e=ge[1];(0,f.useEffect)((function(){_e(pe)}),[pe]);var be=Math.max(1,pe-(B?3:5)),xe=Math.min(x(void 0,ue,T),pe+(B?3:5));function we(t,r){var i=t||f.createElement("button",{type:"button","aria-label":r,className:"".concat(n,"-item-link")});return"function"==typeof t&&(i=f.createElement(t,(0,s.Z)({},e))),i}function Se(e){var t=e.target.value,n=x(void 0,ue,T);return""===t?t:Number.isNaN(Number(t))?ye:t>=n?n:Number(t)}var Ce=T>ue&&P;function ke(e){var t=Se(e);switch(t!==ye&&_e(t),e.keyCode){case d.Z.ENTER:Ee(t);break;case d.Z.UP:Ee(t-1);break;case d.Z.DOWN:Ee(t+1)}}function Ee(e){if(function(e){return b(e)&&e!==pe&&b(T)&&T>0}(e)&&!K){var t=x(void 0,ue,T),n=e;return e>t?n=t:e<1&&(n=1),n!==ye&&_e(n),me(n),null==I||I(n,ue),n}return pe}var Te=pe>1,Le=pe<x(void 0,ue,T);function Ae(){Te&&Ee(pe-1)}function Me(){Le&&Ee(pe+1)}function De(){Ee(be)}function Ie(){Ee(xe)}function Ne(e,t){if("Enter"===e.key||e.charCode===d.Z.ENTER||e.keyCode===d.Z.ENTER){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];t.apply(void 0,r)}}function Re(e){"click"!==e.type&&e.keyCode!==d.Z.ENTER||Ee(ye)}var Oe=null,je=(0,h.Z)(e,{aria:!0,data:!0}),Pe=X&&f.createElement("li",{className:"".concat(n,"-total-text")},X(T,[0===T?0:(pe-1)*ue+1,pe*ue>T?T:pe*ue])),Be=null,Ue=x(void 0,ue,T);if(N&&T<=ue)return null;var Fe=[],ze={rootPrefixCls:n,onClick:Ee,onKeyPress:Ne,showTitle:F,itemRender:ne,page:-1},He=pe-1>0?pe-1:0,Ze=pe+1<Ue?pe+1:Ue,We=P&&P.goButton,Ge="object"===(0,o.Z)(Y)?Y.readOnly:!Y,qe=We,Ve=null;Y&&(We&&(qe="boolean"==typeof We?f.createElement("button",{type:"button",onClick:Re,onKeyUp:Re},W.jump_to_confirm):f.createElement("span",{onClick:Re,onKeyUp:Re},We),qe=f.createElement("li",{title:F?"".concat(W.jump_to).concat(pe,"/").concat(Ue):null,className:"".concat(n,"-simple-pager")},qe)),Ve=f.createElement("li",{title:F?"".concat(pe,"/").concat(Ue):null,className:"".concat(n,"-simple-pager")},Ge?ye:f.createElement("input",{type:"text","aria-label":W.jump_to,value:ye,disabled:K,onKeyDown:function(e){e.keyCode!==d.Z.UP&&e.keyCode!==d.Z.DOWN||e.preventDefault()},onKeyUp:ke,onChange:ke,onBlur:function(e){Ee(Se(e))},size:3}),f.createElement("span",{className:"".concat(n,"-slash")},"/"),Ue));var Ke=B?1:2;if(Ue<=3+2*Ke){Ue||Fe.push(f.createElement(g,(0,i.Z)({},ze,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var Ye=1;Ye<=Ue;Ye+=1)Fe.push(f.createElement(g,(0,i.Z)({},ze,{key:Ye,page:Ye,active:pe===Ye})))}else{var Xe=B?W.prev_3:W.prev_5,Je=B?W.next_3:W.next_5,Qe=ne(be,"jump-prev",we(re,"prev page")),$e=ne(xe,"jump-next",we(ie,"next page"));j&&(Oe=Qe?f.createElement("li",{title:F?Xe:null,key:"prev",onClick:De,tabIndex:0,onKeyDown:function(e){Ne(e,De)},className:c()("".concat(n,"-jump-prev"),(0,r.Z)({},"".concat(n,"-jump-prev-custom-icon"),!!re))},Qe):null,Be=$e?f.createElement("li",{title:F?Je:null,key:"next",onClick:Ie,tabIndex:0,onKeyDown:function(e){Ne(e,Ie)},className:c()("".concat(n,"-jump-next"),(0,r.Z)({},"".concat(n,"-jump-next-custom-icon"),!!ie))},$e):null);var et=Math.max(1,pe-Ke),tt=Math.min(pe+Ke,Ue);pe-1<=Ke&&(tt=1+2*Ke),Ue-pe<=Ke&&(et=Ue-2*Ke);for(var nt=et;nt<=tt;nt+=1)Fe.push(f.createElement(g,(0,i.Z)({},ze,{key:nt,page:nt,active:pe===nt})));if(pe-1>=2*Ke&&3!==pe&&(Fe[0]=f.cloneElement(Fe[0],{className:c()("".concat(n,"-item-after-jump-prev"),Fe[0].props.className)}),Fe.unshift(Oe)),Ue-pe>=2*Ke&&pe!==Ue-2){var rt=Fe[Fe.length-1];Fe[Fe.length-1]=f.cloneElement(rt,{className:c()("".concat(n,"-item-before-jump-next"),rt.props.className)}),Fe.push(Be)}1!==et&&Fe.unshift(f.createElement(g,(0,i.Z)({},ze,{key:1,page:1}))),tt!==Ue&&Fe.push(f.createElement(g,(0,i.Z)({},ze,{key:Ue,page:Ue})))}var it=function(e){var t=ne(e,"prev",we(oe,"prev page"));return f.isValidElement(t)?f.cloneElement(t,{disabled:!Te}):t}(He);if(it){var ot=!Te||!Ue;it=f.createElement("li",{title:F?W.prev_page:null,onClick:Ae,tabIndex:ot?null:0,onKeyDown:function(e){Ne(e,Ae)},className:c()("".concat(n,"-prev"),(0,r.Z)({},"".concat(n,"-disabled"),ot)),"aria-disabled":ot},it)}var st,at,lt=function(e){var t=ne(e,"next",we(se,"next page"));return f.isValidElement(t)?f.cloneElement(t,{disabled:!Le}):t}(Ze);lt&&(Y?(st=!Le,at=Te?0:null):at=(st=!Le||!Ue)?null:0,lt=f.createElement("li",{title:F?W.next_page:null,onClick:Me,tabIndex:at,onKeyDown:function(e){Ne(e,Me)},className:c()("".concat(n,"-next"),(0,r.Z)({},"".concat(n,"-disabled"),st)),"aria-disabled":st},lt));var ct=c()(n,w,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(n,"-start"),"start"===R),"".concat(n,"-center"),"center"===R),"".concat(n,"-end"),"end"===R),"".concat(n,"-simple"),Y),"".concat(n,"-disabled"),K));return f.createElement("ul",(0,i.Z)({className:ct,style:G,ref:ae},je),Pe,it,Y?Ve:Fe,lt,f.createElement(v,{locale:W,rootPrefixCls:n,disabled:K,selectPrefixCls:m,changeSize:function(e){var t=x(e,ue,T),n=pe>t&&0!==t?t:pe;de(e),_e(n),null==H||H(pe,e),me(n),null==I||I(n,e)},pageSize:ue,pageSizeOptions:ee,quickGo:Ce?Ee:null,goButton:qe,showSizeChanger:Q,sizeChangerRender:$}))}},6551:function(e,t,n){"use strict";n.d(t,{ZP:function(){return l}});var r=n(42978),i=n(59301),o=n(47273),s=0,a=(0,o.Z)();function l(e){var t=i.useState(),n=(0,r.Z)(t,2),o=n[0],l=n[1];return i.useEffect((function(){var e;l("rc_select_".concat((a?(e=s,s+=1):e="TEST_OR_SSR",e)))}),[]),e||o}},37463:function(e,t,n){"use strict";n.d(t,{Ac:function(){return ee},Xo:function(){return ne},Wx:function(){return ie},ZP:function(){return ke},lk:function(){return b}});var r=n(54476),i=n(94480),o=n(20068),s=n(33885),a=n(42978),l=n(75931),c=n(76190),u=n(18929),d=n(48736),h=n(59301),f=n(92310),p=n.n(f),m=n(34280),v=n(49658),g=n(8654),y=function(e){var t=e.className,n=e.customizeIcon,r=e.customizeIconProps,i=e.children,o=e.onMouseDown,s=e.onClick,a="function"==typeof n?n(r):n;return h.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==o||o(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},void 0!==a?a:h.createElement("span",{className:p()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},i))},_=h.createContext(null);function b(){return h.useContext(_)}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=h.useRef(null),n=h.useRef(null);function r(r){(r||null===t.current)&&(t.current=r),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return h.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},r]}var w=n(10228);var S=n(26112),C=n(11780);var k=function(e,t,n){var r=(0,s.Z)((0,s.Z)({},e),n?t:{});return Object.keys(t).forEach((function(n){var i=t[n];"function"==typeof i&&(r[n]=function(){for(var t,r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return i.apply(void 0,o),null===(t=e[n])||void 0===t?void 0:t.call.apply(t,[e].concat(o))})})),r},E=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],T=function(e,t){var n=e.prefixCls,r=e.id,i=e.inputElement,o=e.autoFocus,a=e.autoComplete,c=e.editable,u=e.activeDescendantId,f=e.value,m=e.open,v=e.attrs,y=(0,l.Z)(e,E),_=i||h.createElement("input",null),b=_,x=b.ref,w=b.props;return(0,d.Kp)(!("maxLength"in _.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),_=h.cloneElement(_,(0,s.Z)((0,s.Z)((0,s.Z)({type:"search"},k(y,w,!0)),{},{id:r,ref:(0,g.sQ)(t,x),autoComplete:a||"off",autoFocus:o,className:p()("".concat(n,"-selection-search-input"),null==w?void 0:w.className),role:"combobox","aria-expanded":m||!1,"aria-haspopup":"listbox","aria-owns":"".concat(r,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(r,"_list"),"aria-activedescendant":m?u:void 0},v),{},{value:c?f:"",readOnly:!c,unselectable:c?null:"on",style:(0,s.Z)((0,s.Z)({},w.style),{},{opacity:c?null:0})}))};var L=h.forwardRef(T);function A(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var M="undefined"!=typeof window&&window.document&&window.document.documentElement;function D(e){return["string","number"].includes((0,c.Z)(e))}function I(e){var t=void 0;return e&&(D(e.title)?t=e.title.toString():D(e.label)&&(t=e.label.toString())),t}function N(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var R=function(e){e.preventDefault(),e.stopPropagation()},O=function(e){var t,n,r=e.id,i=e.prefixCls,s=e.values,l=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,f=e.placeholder,m=e.disabled,v=e.mode,g=e.showSearch,_=e.autoFocus,b=e.autoComplete,x=e.activeDescendantId,w=e.tabIndex,k=e.removeIcon,E=e.maxTagCount,T=e.maxTagTextLength,A=e.maxTagPlaceholder,D=void 0===A?function(e){return"+ ".concat(e.length," ...")}:A,O=e.tagRender,j=e.onToggleOpen,P=e.onRemove,B=e.onInputChange,U=e.onInputPaste,F=e.onInputKeyDown,z=e.onInputMouseDown,H=e.onInputCompositionStart,Z=e.onInputCompositionEnd,W=e.onInputBlur,G=h.useRef(null),q=(0,h.useState)(0),V=(0,a.Z)(q,2),K=V[0],Y=V[1],X=(0,h.useState)(!1),J=(0,a.Z)(X,2),Q=J[0],$=J[1],ee="".concat(i,"-selection"),te=l||"multiple"===v&&!1===u||"tags"===v?c:"",ne="tags"===v||"multiple"===v&&!1===u||g&&(l||Q);t=function(){Y(G.current.scrollWidth)},n=[te],M?h.useLayoutEffect(t,n):h.useEffect(t,n);var re=function(e,t,n,r,i){return h.createElement("span",{title:I(e),className:p()("".concat(ee,"-item"),(0,o.Z)({},"".concat(ee,"-item-disabled"),n))},h.createElement("span",{className:"".concat(ee,"-item-content")},t),r&&h.createElement(y,{className:"".concat(ee,"-item-remove"),onMouseDown:R,onClick:i,customizeIcon:k},"×"))},ie=function(e,t,n,r,i,o){return h.createElement("span",{onMouseDown:function(e){R(e),j(!l)}},O({label:t,value:e,disabled:n,closable:r,onClose:i,isMaxTag:!!o}))},oe=h.createElement("div",{className:"".concat(ee,"-search"),style:{width:K},onFocus:function(){$(!0)},onBlur:function(){$(!1)}},h.createElement(L,{ref:d,open:l,prefixCls:i,id:r,inputElement:null,disabled:m,autoFocus:_,autoComplete:b,editable:ne,activeDescendantId:x,value:te,onKeyDown:F,onMouseDown:z,onChange:B,onPaste:U,onCompositionStart:H,onCompositionEnd:Z,onBlur:W,tabIndex:w,attrs:(0,S.Z)(e,!0)}),h.createElement("span",{ref:G,className:"".concat(ee,"-search-mirror"),"aria-hidden":!0},te," ")),se=h.createElement(C.Z,{prefixCls:"".concat(ee,"-overflow"),data:s,renderItem:function(e){var t=e.disabled,n=e.label,r=e.value,i=!m&&!t,o=n;if("number"==typeof T&&("string"==typeof n||"number"==typeof n)){var s=String(o);s.length>T&&(o="".concat(s.slice(0,T),"..."))}var a=function(t){t&&t.stopPropagation(),P(e)};return"function"==typeof O?ie(r,o,t,i,a):re(e,o,t,i,a)},renderRest:function(e){if(!s.length)return null;var t="function"==typeof D?D(e):D;return"function"==typeof O?ie(void 0,t,!1,!1,void 0,!0):re({title:t},t,!1)},suffix:oe,itemKey:N,maxCount:E});return h.createElement("span",{className:"".concat(ee,"-wrap")},se,!s.length&&!te&&h.createElement("span",{className:"".concat(ee,"-placeholder")},f))},j=function(e){var t=e.inputElement,n=e.prefixCls,r=e.id,i=e.inputRef,o=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,f=e.values,p=e.placeholder,m=e.tabIndex,v=e.showSearch,g=e.searchValue,y=e.activeValue,_=e.maxLength,b=e.onInputKeyDown,x=e.onInputMouseDown,w=e.onInputChange,C=e.onInputPaste,k=e.onInputCompositionStart,E=e.onInputCompositionEnd,T=e.onInputBlur,A=e.title,M=h.useState(!1),D=(0,a.Z)(M,2),N=D[0],R=D[1],O="combobox"===u,j=O||v,P=f[0],B=g||"";O&&y&&!N&&(B=y),h.useEffect((function(){O&&R(!1)}),[O,y]);var U=!("combobox"!==u&&!d&&!v)&&!!B,F=void 0===A?I(P):A,z=h.useMemo((function(){return P?null:h.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:U?{visibility:"hidden"}:void 0},p)}),[P,U,p,n]);return h.createElement("span",{className:"".concat(n,"-selection-wrap")},h.createElement("span",{className:"".concat(n,"-selection-search")},h.createElement(L,{ref:i,prefixCls:n,id:r,open:d,inputElement:t,disabled:o,autoFocus:s,autoComplete:l,editable:j,activeDescendantId:c,value:B,onKeyDown:b,onMouseDown:x,onChange:function(e){R(!0),w(e)},onPaste:C,onCompositionStart:k,onCompositionEnd:E,onBlur:T,tabIndex:m,attrs:(0,S.Z)(e,!0),maxLength:O?_:void 0})),!O&&P?h.createElement("span",{className:"".concat(n,"-selection-item"),title:F,style:U?{visibility:"hidden"}:void 0},P.label):null,z)},P=function(e,t){var n=(0,h.useRef)(null),i=(0,h.useRef)(!1),o=e.prefixCls,s=e.open,l=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.disabled,f=e.prefix,p=e.autoClearSearchValue,m=e.onSearch,v=e.onSearchSubmit,g=e.onToggleOpen,y=e.onInputKeyDown,_=e.onInputBlur,b=e.domRef;h.useImperativeHandle(t,(function(){return{focus:function(e){n.current.focus(e)},blur:function(){n.current.blur()}}}));var S=x(0),C=(0,a.Z)(S,2),k=C[0],E=C[1],T=(0,h.useRef)(null),L=function(e){!1!==m(e,!0,i.current)&&g(!0)},A={inputRef:n,onInputKeyDown:function(e){var t,r=e.which,o=n.current instanceof HTMLTextAreaElement;(o||!s||r!==w.Z.UP&&r!==w.Z.DOWN||e.preventDefault(),y&&y(e),r!==w.Z.ENTER||"tags"!==l||i.current||s||null==v||v(e.target.value),o&&!s&&~[w.Z.UP,w.Z.DOWN,w.Z.LEFT,w.Z.RIGHT].indexOf(r))||(t=r)&&![w.Z.ESC,w.Z.SHIFT,w.Z.BACKSPACE,w.Z.TAB,w.Z.WIN_KEY,w.Z.ALT,w.Z.META,w.Z.WIN_KEY_RIGHT,w.Z.CTRL,w.Z.SEMICOLON,w.Z.EQUALS,w.Z.CAPS_LOCK,w.Z.CONTEXT_MENU,w.Z.F1,w.Z.F2,w.Z.F3,w.Z.F4,w.Z.F5,w.Z.F6,w.Z.F7,w.Z.F8,w.Z.F9,w.Z.F10,w.Z.F11,w.Z.F12].includes(t)&&g(!0)},onInputMouseDown:function(){E(!0)},onInputChange:function(e){var t=e.target.value;if(u&&T.current&&/[\r\n]/.test(T.current)){var n=T.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,T.current)}T.current=null,L(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");T.current=n||""},onInputCompositionStart:function(){i.current=!0},onInputCompositionEnd:function(e){i.current=!1,"combobox"!==l&&L(e.target.value)},onInputBlur:_},M="multiple"===l||"tags"===l?h.createElement(O,(0,r.Z)({},e,A)):h.createElement(j,(0,r.Z)({},e,A));return h.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=k();e.target===n.current||t||"combobox"===l&&d||e.preventDefault(),("combobox"===l||c&&t)&&s||(s&&!1!==p&&m("",!0,!1),g())}},f&&h.createElement("div",{className:"".concat(o,"-prefix")},f),M)};var B=h.forwardRef(P),U=n(65030),F=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(e,t){var n=e.prefixCls,i=(e.disabled,e.visible),a=e.children,c=e.popupElement,u=e.animation,d=e.transitionName,f=e.dropdownStyle,m=e.dropdownClassName,v=e.direction,g=void 0===v?"ltr":v,y=e.placement,_=e.builtinPlacements,b=e.dropdownMatchSelectWidth,x=e.dropdownRender,w=e.dropdownAlign,S=e.getPopupContainer,C=e.empty,k=e.getTriggerDOMNode,E=e.onPopupVisibleChange,T=e.onPopupMouseEnter,L=(0,l.Z)(e,F),A="".concat(n,"-dropdown"),M=c;x&&(M=x(c));var D=h.useMemo((function(){return _||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(b)}),[_,b]),I=u?"".concat(A,"-").concat(u):d,N="number"==typeof b,R=h.useMemo((function(){return N?null:!1===b?"minWidth":"width"}),[b,N]),O=f;N&&(O=(0,s.Z)((0,s.Z)({},O),{},{width:b}));var j=h.useRef(null);return h.useImperativeHandle(t,(function(){return{getPopupElement:function(){var e;return null===(e=j.current)||void 0===e?void 0:e.popupElement}}})),h.createElement(U.Z,(0,r.Z)({},L,{showAction:E?["click"]:[],hideAction:E?["click"]:[],popupPlacement:y||("rtl"===g?"bottomRight":"bottomLeft"),builtinPlacements:D,prefixCls:A,popupTransitionName:I,popup:h.createElement("div",{onMouseEnter:T},M),ref:j,stretch:R,popupAlign:w,popupVisible:i,getPopupContainer:S,popupClassName:p()(m,(0,o.Z)({},"".concat(A,"-empty"),C)),popupStyle:O,getTriggerDOMNode:k,onPopupVisibleChange:E}),a)};var H=h.forwardRef(z),Z=n(66712);function W(e,t){var n,r=e.key;return"value"in e&&(n=e.value),null!=r?r:void 0!==n?n:"rc-index-key-".concat(t)}function G(e){return void 0!==e&&!Number.isNaN(e)}function q(e,t){var n=e||{},r=n.label||(t?"children":"label");return{label:r,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||r}}function V(e){var t=(0,s.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,d.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var K=h.createContext(null);function Y(e){var t=e.visible,n=e.values;if(!t)return null;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,50).map((function(e){var t=e.label,n=e.value;return["number","string"].includes((0,c.Z)(t))?t:n})).join(", ")),n.length>50?", ...":null)}var X=["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"],J=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Q=function(e){return"tags"===e||"multiple"===e},$=h.forwardRef((function(e,t){var n,d=e.id,f=e.prefixCls,b=e.className,w=e.showSearch,S=e.tagRender,C=e.direction,k=e.omitDomProps,E=e.displayValues,T=e.onDisplayValuesChange,L=e.emptyOptions,A=e.notFoundContent,M=void 0===A?"Not Found":A,D=e.onClear,I=e.mode,N=e.disabled,R=e.loading,O=e.getInputElement,j=e.getRawInputElement,P=e.open,U=e.defaultOpen,F=e.onDropdownVisibleChange,z=e.activeValue,W=e.onActiveValueChange,q=e.activeDescendantId,V=e.searchValue,$=e.autoClearSearchValue,ee=e.onSearch,te=e.onSearchSplit,ne=e.tokenSeparators,re=e.allowClear,ie=e.prefix,oe=e.suffixIcon,se=e.clearIcon,ae=e.OptionList,le=e.animation,ce=e.transitionName,ue=e.dropdownStyle,de=e.dropdownClassName,he=e.dropdownMatchSelectWidth,fe=e.dropdownRender,pe=e.dropdownAlign,me=e.placement,ve=e.builtinPlacements,ge=e.getPopupContainer,ye=e.showAction,_e=void 0===ye?[]:ye,be=e.onFocus,xe=e.onBlur,we=e.onKeyUp,Se=e.onKeyDown,Ce=e.onMouseDown,ke=(0,l.Z)(e,X),Ee=Q(I),Te=(void 0!==w?w:Ee)||"combobox"===I,Le=(0,s.Z)({},ke);J.forEach((function(e){delete Le[e]})),null==k||k.forEach((function(e){delete Le[e]}));var Ae=h.useState(!1),Me=(0,a.Z)(Ae,2),De=Me[0],Ie=Me[1];h.useEffect((function(){Ie((0,v.Z)())}),[]);var Ne=h.useRef(null),Re=h.useRef(null),Oe=h.useRef(null),je=h.useRef(null),Pe=h.useRef(null),Be=h.useRef(!1),Ue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=h.useState(!1),n=(0,a.Z)(t,2),r=n[0],i=n[1],o=h.useRef(null),s=function(){window.clearTimeout(o.current)};return h.useEffect((function(){return s}),[]),[r,function(t,n){s(),o.current=window.setTimeout((function(){i(t),n&&n()}),e)},s]}(),Fe=(0,a.Z)(Ue,3),ze=Fe[0],He=Fe[1],Ze=Fe[2];h.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=je.current)||void 0===e?void 0:e.focus,blur:null===(t=je.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=Pe.current)||void 0===t?void 0:t.scrollTo(e)},nativeElement:Ne.current||Re.current}}));var We=h.useMemo((function(){var e;if("combobox"!==I)return V;var t=null===(e=E[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""}),[V,I,E]),Ge="combobox"===I&&"function"==typeof O&&O()||null,qe="function"==typeof j&&j(),Ve=(0,g.x1)(Re,null==qe||null===(n=qe.props)||void 0===n?void 0:n.ref),Ke=h.useState(!1),Ye=(0,a.Z)(Ke,2),Xe=Ye[0],Je=Ye[1];(0,m.Z)((function(){Je(!0)}),[]);var Qe=(0,u.Z)(!1,{defaultValue:U,value:P}),$e=(0,a.Z)(Qe,2),et=$e[0],tt=$e[1],nt=!!Xe&&et,rt=!M&&L;(N||rt&&nt&&"combobox"===I)&&(nt=!1);var it=!rt&&nt,ot=h.useCallback((function(e){var t=void 0!==e?e:!nt;N||(tt(t),nt!==t&&(null==F||F(t)))}),[N,nt,tt,F]),st=h.useMemo((function(){return(ne||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ne]),at=h.useContext(K)||{},lt=at.maxCount,ct=at.rawValues,ut=function(e,t,n){if(!(Ee&&G(lt)&&(null==ct?void 0:ct.size)>=lt)){var r=!0,o=e;null==W||W(null);var s=function(e,t,n){if(!t||!t.length)return null;var r=!1,o=function e(t,n){var o=(0,Z.Z)(n),s=o[0],a=o.slice(1);if(!s)return[t];var l=t.split(s);return r=r||l.length>1,l.reduce((function(t,n){return[].concat((0,i.Z)(t),(0,i.Z)(e(n,a)))}),[]).filter(Boolean)}(e,t);return r?void 0!==n?o.slice(0,n):o:null}(e,ne,G(lt)?lt-ct.size:void 0),a=n?null:s;return"combobox"!==I&&a&&(o="",null==te||te(a),ot(!1),r=!1),ee&&We!==o&&ee(o,{source:t?"typing":"effect"}),r}};h.useEffect((function(){nt||Ee||"combobox"===I||ut("",!1,!1)}),[nt]),h.useEffect((function(){et&&N&&tt(!1),N&&!Be.current&&He(!1)}),[N]);var dt=x(),ht=(0,a.Z)(dt,2),ft=ht[0],pt=ht[1],mt=h.useRef(!1),vt=h.useRef(!1),gt=[];h.useEffect((function(){return function(){gt.forEach((function(e){return clearTimeout(e)})),gt.splice(0,gt.length)}}),[]);var yt,_t=h.useState({}),bt=(0,a.Z)(_t,2)[1];qe&&(yt=function(e){ot(e)}),function(e,t,n,r){var i=h.useRef(null);i.current={open:t,triggerOpen:n,customizedTrigger:r},h.useEffect((function(){function t(t){var n;if(null===(n=i.current)||void 0===n||!n.customizedTrigger){var r=t.target;r.shadowRoot&&t.composed&&(r=t.composedPath()[0]||r),i.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(r)&&e!==r}))&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[Ne.current,null===(e=Oe.current)||void 0===e?void 0:e.getPopupElement()]}),it,ot,!!qe);var xt,wt=h.useMemo((function(){return(0,s.Z)((0,s.Z)({},e),{},{notFoundContent:M,open:nt,triggerOpen:it,id:d,showSearch:Te,multiple:Ee,toggleOpen:ot})}),[e,M,it,nt,d,Te,Ee,ot]),St=!!oe||R;St&&(xt=h.createElement(y,{className:p()("".concat(f,"-arrow"),(0,o.Z)({},"".concat(f,"-arrow-loading"),R)),customizeIcon:oe,customizeIconProps:{loading:R,searchValue:We,open:nt,focused:ze,showSearch:Te}}));var Ct,kt=function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6?arguments[6]:void 0,a=arguments.length>7?arguments[7]:void 0,l=h.useMemo((function(){return"object"===(0,c.Z)(r)?r.clearIcon:i||void 0}),[r,i]),u=h.useMemo((function(){return!(o||!r||!n.length&&!s||"combobox"===a&&""===s)}),[r,o,n.length,s,a]);return{allowClear:u,clearIcon:h.createElement(y,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:l},"×")}}(f,(function(){var e;null==D||D(),null===(e=je.current)||void 0===e||e.focus(),T([],{type:"clear",values:E}),ut("",!1,!1)}),E,re,se,N,We,I),Et=kt.allowClear,Tt=kt.clearIcon,Lt=h.createElement(ae,{ref:Pe}),At=p()(f,b,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(f,"-focused"),ze),"".concat(f,"-multiple"),Ee),"".concat(f,"-single"),!Ee),"".concat(f,"-allow-clear"),re),"".concat(f,"-show-arrow"),St),"".concat(f,"-disabled"),N),"".concat(f,"-loading"),R),"".concat(f,"-open"),nt),"".concat(f,"-customize-input"),Ge),"".concat(f,"-show-search"),Te)),Mt=h.createElement(H,{ref:Oe,disabled:N,prefixCls:f,visible:it,popupElement:Lt,animation:le,transitionName:ce,dropdownStyle:ue,dropdownClassName:de,direction:C,dropdownMatchSelectWidth:he,dropdownRender:fe,dropdownAlign:pe,placement:me,builtinPlacements:ve,getPopupContainer:ge,empty:L,getTriggerDOMNode:function(e){return Re.current||e},onPopupVisibleChange:yt,onPopupMouseEnter:function(){bt({})}},qe?h.cloneElement(qe,{ref:Ve}):h.createElement(B,(0,r.Z)({},e,{domRef:Re,prefixCls:f,inputElement:Ge,ref:je,id:d,prefix:ie,showSearch:Te,autoClearSearchValue:$,mode:I,activeDescendantId:q,tagRender:S,values:E,open:nt,onToggleOpen:ot,activeValue:z,searchValue:We,onSearch:ut,onSearchSubmit:function(e){e&&e.trim()&&ee(e,{source:"submit"})},onRemove:function(e){var t=E.filter((function(t){return t!==e}));T(t,{type:"remove",values:[e]})},tokenWithEnter:st,onInputBlur:function(){mt.current=!1}})));return Ct=qe?Mt:h.createElement("div",(0,r.Z)({className:At},Le,{ref:Ne,onMouseDown:function(e){var t,n=e.target,r=null===(t=Oe.current)||void 0===t?void 0:t.getPopupElement();if(r&&r.contains(n)){var i=setTimeout((function(){var e,t=gt.indexOf(i);-1!==t&&gt.splice(t,1),Ze(),De||r.contains(document.activeElement)||null===(e=je.current)||void 0===e||e.focus()}));gt.push(i)}for(var o=arguments.length,s=new Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];null==Ce||Ce.apply(void 0,[e].concat(s))},onKeyDown:function(e){var t,n=ft(),r=e.key,o="Enter"===r;if(o&&("combobox"!==I&&e.preventDefault(),nt||ot(!0)),pt(!!We),"Backspace"===r&&!n&&Ee&&!We&&E.length){for(var s=(0,i.Z)(E),a=null,l=s.length-1;l>=0;l-=1){var c=s[l];if(!c.disabled){s.splice(l,1),a=c;break}}a&&T(s,{type:"remove",values:[a]})}for(var u=arguments.length,d=new Array(u>1?u-1:0),h=1;h<u;h++)d[h-1]=arguments[h];!nt||o&&mt.current||(o&&(mt.current=!0),null===(t=Pe.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(d))),null==Se||Se.apply(void 0,[e].concat(d))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i;nt&&(null===(i=Pe.current)||void 0===i||i.onKeyUp.apply(i,[e].concat(n))),"Enter"===e.key&&(mt.current=!1),null==we||we.apply(void 0,[e].concat(n))},onFocus:function(){He(!0),N||(be&&!vt.current&&be.apply(void 0,arguments),_e.includes("focus")&&ot(!0)),vt.current=!0},onBlur:function(){Be.current=!0,He(!1,(function(){vt.current=!1,Be.current=!1,ot(!1)})),N||(We&&("tags"===I?ee(We,{source:"submit"}):"multiple"===I&&ee("",{source:"blur"})),xe&&xe.apply(void 0,arguments))}}),h.createElement(Y,{visible:ze&&!nt,values:E}),Mt,xt,Et&&Tt),h.createElement(_.Provider,{value:wt},Ct)}));var ee=$,te=function(){return null};te.isSelectOptGroup=!0;var ne=te,re=function(){return null};re.isSelectOption=!0;var ie=re,oe=n(80547),se=n(2738),ae=n(48911);var le=["disabled","title","children","style","className"];function ce(e){return"string"==typeof e||"number"==typeof e}var ue=function(e,t){var n=b(),s=n.prefixCls,c=n.id,u=n.open,d=n.multiple,f=n.mode,m=n.searchValue,v=n.toggleOpen,g=n.notFoundContent,_=n.onPopupScroll,x=h.useContext(K),C=x.maxCount,k=x.flattenOptions,E=x.onActiveValue,T=x.defaultActiveFirstOption,L=x.onSelect,A=x.menuItemSelectedIcon,M=x.rawValues,D=x.fieldNames,I=x.virtual,N=x.direction,R=x.listHeight,O=x.listItemHeight,j=x.optionRender,P="".concat(s,"-item"),B=(0,oe.Z)((function(){return k}),[u,k],(function(e,t){return t[0]&&e[1]!==t[1]})),U=h.useRef(null),F=h.useMemo((function(){return d&&G(C)&&(null==M?void 0:M.size)>=C}),[d,C,null==M?void 0:M.size]),z=function(e){e.preventDefault()},H=function(e){var t;null===(t=U.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},Z=h.useCallback((function(e){return"combobox"!==f&&M.has(e)}),[f,(0,i.Z)(M).toString(),M.size]),W=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=B.length,r=0;r<n;r+=1){var i=(e+r*t+n)%n,o=B[i]||{},s=o.group,a=o.data;if(!s&&(null==a||!a.disabled)&&(Z(a.value)||!F))return i}return-1},q=h.useState((function(){return W(0)})),V=(0,a.Z)(q,2),Y=V[0],X=V[1],J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];X(e);var n={source:t?"keyboard":"mouse"},r=B[e];r?E(r.value,e,n):E(null,-1,n)};(0,h.useEffect)((function(){J(!1!==T?W(0):-1)}),[B.length,m]);var Q=h.useCallback((function(e){return"combobox"===f?String(e).toLowerCase()===m.toLowerCase():M.has(e)}),[f,m,(0,i.Z)(M).toString(),M.size]);(0,h.useEffect)((function(){var e,t=setTimeout((function(){if(!d&&u&&1===M.size){var e=Array.from(M)[0],t=B.findIndex((function(t){var n=t.data;return m?String(n.value).startsWith(m):n.value===e}));-1!==t&&(J(t),H(t))}}));u&&(null===(e=U.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[u,m]);var $=function(e){void 0!==e&&L(e,{selected:!M.has(e)}),d||v(!1)};if(h.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case w.Z.N:case w.Z.P:case w.Z.UP:case w.Z.DOWN:var r=0;if(t===w.Z.UP?r=-1:t===w.Z.DOWN?r=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===w.Z.N?r=1:t===w.Z.P&&(r=-1)),0!==r){var i=W(Y+r,r);H(i),J(i,!0)}break;case w.Z.TAB:case w.Z.ENTER:var o,s=B[Y];!s||null!=s&&null!==(o=s.data)&&void 0!==o&&o.disabled||F?$(void 0):$(s.value),u&&e.preventDefault();break;case w.Z.ESC:v(!1),u&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){H(e)}}})),0===B.length)return h.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(P,"-empty"),onMouseDown:z},g);var ee=Object.keys(D).map((function(e){return D[e]})),te=function(e){return e.label};function ne(e,t){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(t)}}var re=function(e){var t=B[e];if(!t)return null;var n=t.data||{},i=n.value,o=t.group,s=(0,S.Z)(n,!0),a=te(t);return t?h.createElement("div",(0,r.Z)({"aria-label":"string"!=typeof a||o?null:a},s,{key:e},ne(t,e),{"aria-selected":Q(i)}),i):null},ie={role:"listbox",id:"".concat(c,"_list")};return h.createElement(h.Fragment,null,I&&h.createElement("div",(0,r.Z)({},ie,{style:{height:0,width:0,overflow:"hidden"}}),re(Y-1),re(Y),re(Y+1)),h.createElement(ae.Z,{itemKey:"key",ref:U,data:B,height:R,itemHeight:O,fullHeight:!1,onMouseDown:z,onScroll:_,virtual:I,direction:N,innerProps:I?null:ie},(function(e,t){var n=e.group,i=e.groupOption,s=e.data,a=e.label,c=e.value,u=s.key;if(n){var d,f=null!==(d=s.title)&&void 0!==d?d:ce(a)?a.toString():void 0;return h.createElement("div",{className:p()(P,"".concat(P,"-group"),s.className),title:f},void 0!==a?a:u)}var m=s.disabled,v=s.title,g=(s.children,s.style),_=s.className,b=(0,l.Z)(s,le),x=(0,se.Z)(b,ee),w=Z(c),C=m||!w&&F,k="".concat(P,"-option"),E=p()(P,k,_,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(k,"-grouped"),i),"".concat(k,"-active"),Y===t&&!C),"".concat(k,"-disabled"),C),"".concat(k,"-selected"),w)),T=te(e),L=!A||"function"==typeof A||w,M="number"==typeof T?T:T||c,D=ce(M)?M.toString():void 0;return void 0!==v&&(D=v),h.createElement("div",(0,r.Z)({},(0,S.Z)(x),I?{}:ne(e,t),{"aria-selected":Q(c),className:E,title:D,onMouseMove:function(){Y===t||C||J(t)},onClick:function(){C||$(c)},style:g}),h.createElement("div",{className:"".concat(k,"-content")},"function"==typeof j?j(e,{index:t}):M),h.isValidElement(A)||w,L&&h.createElement(y,{className:"".concat(P,"-option-state"),customizeIcon:A,customizeIconProps:{value:c,disabled:C,isSelected:w}},w?"✓":null))})))};var de=h.forwardRef(ue);function he(e,t){return A(e).join("").toUpperCase().includes(t)}var fe=n(6551),pe=n(11592),me=["children","value"],ve=["children"];function ge(e){var t=e,n=t.key,r=t.props,i=r.children,o=r.value,a=(0,l.Z)(r,me);return(0,s.Z)({key:n,value:void 0!==o?o:n,children:i},a)}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,pe.Z)(e).map((function(e,n){if(!h.isValidElement(e)||!e.type)return null;var r=e,i=r.type.isSelectOptGroup,o=r.key,a=r.props,c=a.children,u=(0,l.Z)(a,ve);return t||!i?ge(e):(0,s.Z)((0,s.Z)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:ye(c)})})).filter((function(e){return e}))}var _e=function(e,t,n,r,i){return h.useMemo((function(){var o=e;!e&&(o=ye(t));var s=new Map,a=new Map,l=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(t){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<t.length;c+=1){var u=t[c];!u[n.options]||o?(s.set(u[n.value],u),l(a,u,n.label),l(a,u,r),l(a,u,i)):e(u[n.options],!0)}}(o),{options:o,valueOptions:s,labelOptions:a}}),[e,t,n,r,i])};function be(e){var t=h.useRef();t.current=e;var n=h.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var xe=["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"],we=["inputValue"];var Se=h.forwardRef((function(e,t){var n=e.id,d=e.mode,f=e.prefixCls,p=void 0===f?"rc-select":f,m=e.backfill,v=e.fieldNames,g=e.inputValue,y=e.searchValue,_=e.onSearch,b=e.autoClearSearchValue,x=void 0===b||b,w=e.onSelect,S=e.onDeselect,C=e.dropdownMatchSelectWidth,k=void 0===C||C,E=e.filterOption,T=e.filterSort,L=e.optionFilterProp,M=e.optionLabelProp,D=e.options,I=e.optionRender,N=e.children,R=e.defaultActiveFirstOption,O=e.menuItemSelectedIcon,j=e.virtual,P=e.direction,B=e.listHeight,U=void 0===B?200:B,F=e.listItemHeight,z=void 0===F?20:F,H=e.labelRender,Z=e.value,G=e.defaultValue,Y=e.labelInValue,X=e.onChange,J=e.maxCount,$=(0,l.Z)(e,xe),te=(0,fe.ZP)(n),ne=Q(d),re=!(D||!N),ie=h.useMemo((function(){return(void 0!==E||"combobox"!==d)&&E}),[E,d]),oe=h.useMemo((function(){return q(v,re)}),[JSON.stringify(v),re]),se=(0,u.Z)("",{value:void 0!==y?y:g,postState:function(e){return e||""}}),ae=(0,a.Z)(se,2),le=ae[0],ce=ae[1],ue=_e(D,N,oe,L,M),pe=ue.valueOptions,me=ue.labelOptions,ve=ue.options,ge=h.useCallback((function(e){return A(e).map((function(e){var t,n,r,i,o,s;(function(e){return!e||"object"!==(0,c.Z)(e)})(e)?t=e:(r=e.key,n=e.label,t=null!==(s=e.value)&&void 0!==s?s:r);var a,l=pe.get(t);l&&(void 0===n&&(n=null==l?void 0:l[M||oe.label]),void 0===r&&(r=null!==(a=null==l?void 0:l.key)&&void 0!==a?a:t),i=null==l?void 0:l.disabled,o=null==l?void 0:l.title);return{label:n,value:t,key:r,disabled:i,title:o}}))}),[oe,M,pe]),ye=(0,u.Z)(G,{value:Z}),Se=(0,a.Z)(ye,2),Ce=Se[0],ke=Se[1],Ee=h.useMemo((function(){var e,t=ge(ne&&null===Ce?[]:Ce);return"combobox"===d&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[Ce,ge,d,ne]),Te=function(e,t){var n=h.useRef({values:new Map,options:new Map});return[h.useMemo((function(){var r=n.current,i=r.values,o=r.options,a=e.map((function(e){var t;return void 0===e.label?(0,s.Z)((0,s.Z)({},e),{},{label:null===(t=i.get(e.value))||void 0===t?void 0:t.label}):e})),l=new Map,c=new Map;return a.forEach((function(e){l.set(e.value,e),c.set(e.value,t.get(e.value)||o.get(e.value))})),n.current.values=l,n.current.options=c,a}),[e,t]),h.useCallback((function(e){return t.get(e)||n.current.options.get(e)}),[t])]}(Ee,pe),Le=(0,a.Z)(Te,2),Ae=Le[0],Me=Le[1],De=h.useMemo((function(){if(!d&&1===Ae.length){var e=Ae[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return Ae.map((function(e){var t;return(0,s.Z)((0,s.Z)({},e),{},{label:null!==(t="function"==typeof H?H(e):e.label)&&void 0!==t?t:e.value})}))}),[d,Ae,H]),Ie=h.useMemo((function(){return new Set(Ae.map((function(e){return e.value})))}),[Ae]);h.useEffect((function(){if("combobox"===d){var e,t=null===(e=Ae[0])||void 0===e?void 0:e.value;ce(function(e){return null!=e}(t)?String(t):"")}}),[Ae]);var Ne=be((function(e,t){var n=null!=t?t:e;return(0,o.Z)((0,o.Z)({},oe.value,e),oe.label,n)})),Re=function(e,t,n,r,i){return h.useMemo((function(){if(!n||!1===r)return e;var a=t.options,l=t.label,c=t.value,u=[],d="function"==typeof r,h=n.toUpperCase(),f=d?r:function(e,t){return i?he(t[i],h):t[a]?he(t["children"!==l?l:"label"],h):he(t[c],h)},p=d?function(e){return V(e)}:function(e){return e};return e.forEach((function(e){if(e[a])if(f(n,p(e)))u.push(e);else{var t=e[a].filter((function(e){return f(n,p(e))}));t.length&&u.push((0,s.Z)((0,s.Z)({},e),{},(0,o.Z)({},a,t)))}else f(n,p(e))&&u.push(e)})),u}),[e,r,i,n,t])}(h.useMemo((function(){if("tags"!==d)return ve;var e=(0,i.Z)(ve);return(0,i.Z)(Ae).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return pe.has(e)})(n)||e.push(Ne(n,t.label))})),e}),[Ne,ve,pe,Ae,d]),oe,le,ie,L),Oe=h.useMemo((function(){return"tags"!==d||!le||Re.some((function(e){return e[L||"value"]===le}))||Re.some((function(e){return e[oe.value]===le}))?Re:[Ne(le)].concat((0,i.Z)(Re))}),[Ne,L,d,Re,le,oe]),je=function e(t){return(0,i.Z)(t).sort((function(e,t){return T(e,t,{searchValue:le})})).map((function(t){return Array.isArray(t.options)?(0,s.Z)((0,s.Z)({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},Pe=h.useMemo((function(){return T?je(Oe):Oe}),[Oe,T,le]),Be=h.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,r=t.childrenAsData,i=[],o=q(n,!1),s=o.label,a=o.value,l=o.options,c=o.groupLabel;function u(e,t){Array.isArray(e)&&e.forEach((function(e){if(t||!(l in e)){var n=e[a];i.push({key:W(e,i.length),groupOption:t,data:e,label:e[s],value:n})}else{var o=e[c];void 0===o&&r&&(o=e.label),i.push({key:W(e,i.length),group:!0,data:e,label:o}),u(e[l],!0)}}))}return u(e,!1),i}(Pe,{fieldNames:oe,childrenAsData:re})}),[Pe,oe,re]),Ue=function(e){var t=ge(e);if(ke(t),X&&(t.length!==Ae.length||t.some((function(e,t){var n;return(null===(n=Ae[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)})))){var n=Y?t:t.map((function(e){return e.value})),r=t.map((function(e){return V(Me(e.value))}));X(ne?n:n[0],ne?r:r[0])}},Fe=h.useState(null),ze=(0,a.Z)(Fe,2),He=ze[0],Ze=ze[1],We=h.useState(0),Ge=(0,a.Z)(We,2),qe=Ge[0],Ve=Ge[1],Ke=void 0!==R?R:"combobox"!==d,Ye=h.useCallback((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.source,i=void 0===r?"keyboard":r;Ve(t),m&&"combobox"===d&&null!==e&&"keyboard"===i&&Ze(String(e))}),[m,d]),Xe=function(e,t,n){var r=function(){var t,n=Me(e);return[Y?{label:null==n?void 0:n[oe.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,V(n)]};if(t&&w){var i=r(),o=(0,a.Z)(i,2),s=o[0],l=o[1];w(s,l)}else if(!t&&S&&"clear"!==n){var c=r(),u=(0,a.Z)(c,2),d=u[0],h=u[1];S(d,h)}},Je=be((function(e,t){var n,r=!ne||t.selected;n=r?ne?[].concat((0,i.Z)(Ae),[e]):[e]:Ae.filter((function(t){return t.value!==e})),Ue(n),Xe(e,r),"combobox"===d?Ze(""):Q&&!x||(ce(""),Ze(""))})),Qe=h.useMemo((function(){var e=!1!==j&&!1!==k;return(0,s.Z)((0,s.Z)({},ue),{},{flattenOptions:Be,onActiveValue:Ye,defaultActiveFirstOption:Ke,onSelect:Je,menuItemSelectedIcon:O,rawValues:Ie,fieldNames:oe,virtual:e,direction:P,listHeight:U,listItemHeight:z,childrenAsData:re,maxCount:J,optionRender:I})}),[J,ue,Be,Ye,Ke,Je,O,Ie,oe,j,k,P,U,z,re,I]);return h.createElement(K.Provider,{value:Qe},h.createElement(ee,(0,r.Z)({},$,{id:te,prefixCls:p,ref:t,omitDomProps:we,mode:d,displayValues:De,onDisplayValuesChange:function(e,t){Ue(e);var n=t.type,r=t.values;"remove"!==n&&"clear"!==n||r.forEach((function(e){Xe(e.value,!1,n)}))},direction:P,searchValue:le,onSearch:function(e,t){if(ce(e),Ze(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===d&&Ue(e),null==_||_(e));else{var n=(e||"").trim();if(n){var r=Array.from(new Set([].concat((0,i.Z)(Ie),[n])));Ue(r),Xe(n,!0),ce("")}}},autoClearSearchValue:x,onSearchSplit:function(e){var t=e;"tags"!==d&&(t=e.map((function(e){var t=me.get(e);return null==t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,i.Z)(Ie),(0,i.Z)(t))));Ue(n),n.forEach((function(e){Xe(e,!0)}))},dropdownMatchSelectWidth:k,OptionList:de,emptyOptions:!Be.length,activeValue:He,activeDescendantId:"".concat(te,"_list_").concat(qe)})))}));var Ce=Se;Ce.Option=ie,Ce.OptGroup=ne;var ke=Ce},63158:function(e,t,n){"use strict";var r=n(54476),i=n(20068),o=n(42978),s=n(75931),a=n(59301),l=n(92310),c=n.n(l),u=n(18929),d=n(10228),h=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],f=a.forwardRef((function(e,t){var n,l=e.prefixCls,f=void 0===l?"rc-switch":l,p=e.className,m=e.checked,v=e.defaultChecked,g=e.disabled,y=e.loadingIcon,_=e.checkedChildren,b=e.unCheckedChildren,x=e.onClick,w=e.onChange,S=e.onKeyDown,C=(0,s.Z)(e,h),k=(0,u.Z)(!1,{value:m,defaultValue:v}),E=(0,o.Z)(k,2),T=E[0],L=E[1];function A(e,t){var n=T;return g||(L(n=e),null==w||w(n,t)),n}var M=c()(f,p,(n={},(0,i.Z)(n,"".concat(f,"-checked"),T),(0,i.Z)(n,"".concat(f,"-disabled"),g),n));return a.createElement("button",(0,r.Z)({},C,{type:"button",role:"switch","aria-checked":T,disabled:g,className:M,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?A(!1,e):e.which===d.Z.RIGHT&&A(!0,e),null==S||S(e)},onClick:function(e){var t=A(!T,e);null==x||x(t,e)}}),y,a.createElement("span",{className:"".concat(f,"-inner")},a.createElement("span",{className:"".concat(f,"-inner-checked")},_),a.createElement("span",{className:"".concat(f,"-inner-unchecked")},b)))}));f.displayName="Switch",t.Z=f},86351:function(e,t,n){"use strict";n.d(t,{R:function(){return i},w:function(){return r}});var r={},i="rc-table-internal-hook"},97347:function(e,t,n){"use strict";n.d(t,{L:function(){return v},Z:function(){return _}});var r=n(42978),i=n(20068),o=n(94480),s=n(76190),a=n(33885),l=n(75931),c=n(11592),u=(n(48736),n(59301)),d=n(86351),h=n(54451);function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var p=["children"],m=["fixed"];function v(e){return(0,c.Z)(e).filter((function(e){return u.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,r=n.children,i=(0,l.Z)(n,p),o=(0,a.Z)({key:t},i);return r&&(o.children=v(r)),o}))}function g(e){return e.filter((function(e){return e&&"object"===(0,s.Z)(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?(0,a.Z)((0,a.Z)({},e),{},{children:g(t)}):e}))}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter((function(e){return e&&"object"===(0,s.Z)(e)})).reduce((function(e,n,r){var i=n.fixed,s=!0===i?"left":i,l="".concat(t,"-").concat(r),c=n.children;return c&&c.length>0?[].concat((0,o.Z)(e),(0,o.Z)(y(c,l).map((function(e){return(0,a.Z)({fixed:s},e)})))):[].concat((0,o.Z)(e),[(0,a.Z)((0,a.Z)({key:l},n),{},{fixed:s})])}),[])}var _=function(e,t){var n=e.prefixCls,o=e.columns,s=e.children,c=e.expandable,p=e.expandedKeys,_=e.columnTitle,b=e.getRowKey,x=e.onTriggerExpand,w=e.expandIcon,S=e.rowExpandable,C=e.expandIconColumnIndex,k=e.direction,E=e.expandRowByClick,T=e.columnWidth,L=e.fixed,A=e.scrollWidth,M=e.clientWidth,D=u.useMemo((function(){return g((o||v(s)||[]).slice())}),[o,s]),I=u.useMemo((function(){if(c){var e=D.slice();if(!e.includes(d.w)){var t=C||0;t>=0&&(t||"left"===L||!L)&&e.splice(t,0,d.w),"right"===L&&e.splice(D.length,0,d.w)}0;var r=e.indexOf(d.w);e=e.filter((function(e,t){return e!==d.w||t===r}));var o,s=D[r];o=L||(s?s.fixed:null);var a=(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},h.v,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",_),"fixed",o),"className","".concat(n,"-row-expand-icon-cell")),"width",T),"render",(function(e,t,r){var i=b(t,r),o=p.has(i),s=!S||S(t),a=w({prefixCls:n,expanded:o,expandable:s,record:t,onExpand:x});return E?u.createElement("span",{onClick:function(e){return e.stopPropagation()}},a):a}));return e.map((function(e){return e===d.w?a:e}))}return D.filter((function(e){return e!==d.w}))}),[c,D,b,p,w,k]),N=u.useMemo((function(){var e=I;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,I,k]),R=u.useMemo((function(){return"rtl"===k?function(e){return e.map((function(e){var t=e.fixed,n=(0,l.Z)(e,m),r=t;return"left"===t?r="right":"right"===t&&(r="left"),(0,a.Z)({fixed:r},n)}))}(y(N)):y(N)}),[N,k,A]),O=u.useMemo((function(){for(var e=-1,t=R.length-1;t>=0;t-=1){var n=R[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var r=0;r<=e;r+=1){var i=R[r].fixed;if("left"!==i&&!0!==i)return!0}var o=R.findIndex((function(e){return"right"===e.fixed}));if(o>=0)for(var s=o;s<R.length;s+=1){if("right"!==R[s].fixed)return!0}return!1}),[R]),j=function(e,t,n){return u.useMemo((function(){if(t&&t>0){var r=0,i=0;e.forEach((function(e){var n=f(t,e.width);n?r+=n:i+=1}));var o=Math.max(t,n),s=Math.max(o-r,i),l=i,c=s/i,u=0,d=e.map((function(e){var n=(0,a.Z)({},e),r=f(t,n.width);if(r)n.width=r;else{var i=Math.floor(c);n.width=1===l?s:i,s-=i,l-=1}return u+=n.width,n}));if(u<o){var h=o/u;s=o,d.forEach((function(e,t){var n=Math.floor(e.width*h);e.width=t===d.length-1?s:n,s-=n}))}return[d,Math.max(u,o)]}return[e,t]}),[e,t,n])}(R,A,M),P=(0,r.Z)(j,2),B=P[0],U=P[1];return[N,B,U,O]}},4030:function(e,t,n){"use strict";n.d(t,{w2:function(){return r.w},vP:function(){return oe.v},RQ:function(){return r.R},ER:function(){return H},Q$:function(){return Ie},TN:function(){return Ge}});var r=n(86351),i=n(42978),o=n(6089),s=n(34280),a=n(13697),l=n(59301),c=n(4676);function u(e){var t=l.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,r=e.children,o=l.useRef(n);o.current=n;var a=l.useState((function(){return{getValue:function(){return o.current},listeners:new Set}})),u=(0,i.Z)(a,1)[0];return(0,s.Z)((function(){(0,c.unstable_batchedUpdates)((function(){u.listeners.forEach((function(e){e(n)}))}))}),[n]),l.createElement(t.Provider,{value:u},r)},defaultValue:e}}function d(e,t){var n=(0,o.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach((function(t){n[t]=e[t]})),n}),r=l.useContext(null==e?void 0:e.Context),c=r||{},u=c.listeners,d=c.getValue,h=l.useRef();h.current=n(r?d():null==e?void 0:e.defaultValue);var f=l.useState({}),p=(0,i.Z)(f,2)[1];return(0,s.Z)((function(){if(r)return u.add(e),function(){u.delete(e)};function e(e){var t=n(e);(0,a.Z)(h.current,t,!0)||p({})}}),[r]),h.current}var h=n(54476),f=n(8654);function p(){var e=l.createContext(null);function t(){return l.useContext(e)}return{makeImmutable:function(n,r){var i=(0,f.Yr)(n),o=function(o,s){var a=i?{ref:s}:{},c=l.useRef(0),u=l.useRef(o);return null!==t()?l.createElement(n,(0,h.Z)({},o,a)):(r&&!r(u.current,o)||(c.current+=1),u.current=o,l.createElement(e.Provider,{value:c.current},l.createElement(n,(0,h.Z)({},o,a))))};return i?l.forwardRef(o):o},responseImmutable:function(e,n){var r=(0,f.Yr)(e),i=function(n,i){var o=r?{ref:i}:{};return t(),l.createElement(e,(0,h.Z)({},n,o))};return r?l.memo(l.forwardRef(i),n):l.memo(i,n)},useImmutableMark:t}}var m=p(),v=(m.makeImmutable,m.responseImmutable,m.useImmutableMark,p()),g=v.makeImmutable,y=v.responseImmutable,_=v.useImmutableMark,b=u();var x=n(76190),w=n(33885),S=n(20068),C=n(92310),k=n.n(C),E=n(80547),T=n(97938),L=(n(48736),l.createContext({renderWithProps:!1}));function A(e){var t=[],n={};return e.forEach((function(e){for(var r,i=e||{},o=i.key,s=i.dataIndex,a=o||(r=s,null==r?[]:Array.isArray(r)?r:[r]).join("-")||"RC_TABLE_KEY";n[a];)a="".concat(a,"_next");n[a]=!0,t.push(a)})),t}function M(e){return null!=e}function D(e,t,n,r,o,s){var c=l.useContext(L),u=_();return(0,E.Z)((function(){if(M(r))return[r];var i,s=null==t||""===t?[]:Array.isArray(t)?t:[t],a=(0,T.Z)(e,s),u=a,d=void 0;if(o){var h=o(a,e,n);!(i=h)||"object"!==(0,x.Z)(i)||Array.isArray(i)||l.isValidElement(i)?u=h:(u=h.children,d=h.props,c.renderWithProps=!0)}return[u,d]}),[u,e,r,t,o,n],(function(e,t){if(s){var n=(0,i.Z)(e,2)[1],r=(0,i.Z)(t,2)[1];return s(r,n)}return!!c.renderWithProps||!(0,a.Z)(e,t,!0)}))}var I=n(70425);function N(e){var t,n,r,o,s,a,c,u;var f=e.component,p=e.children,m=e.ellipsis,v=e.scope,g=e.prefixCls,y=e.className,_=e.align,C=e.record,E=e.render,T=e.dataIndex,L=e.renderIndex,A=e.shouldCellUpdate,M=e.index,N=e.rowType,R=e.colSpan,O=e.rowSpan,j=e.fixLeft,P=e.fixRight,B=e.firstFixLeft,U=e.lastFixLeft,F=e.firstFixRight,z=e.lastFixRight,H=e.appendNode,Z=e.additionalProps,W=void 0===Z?{}:Z,G=e.isSticky,q="".concat(g,"-cell"),V=d(b,["supportSticky","allColumnsFixedLeft","rowHoverable"]),K=V.supportSticky,Y=V.allColumnsFixedLeft,X=V.rowHoverable,J=D(C,T,L,p,E,A),Q=(0,i.Z)(J,2),$=Q[0],ee=Q[1],te={},ne="number"==typeof j&&K,re="number"==typeof P&&K;ne&&(te.position="sticky",te.left=j),re&&(te.position="sticky",te.right=P);var ie=null!==(t=null!==(n=null!==(r=null==ee?void 0:ee.colSpan)&&void 0!==r?r:W.colSpan)&&void 0!==n?n:R)&&void 0!==t?t:1,oe=null!==(o=null!==(s=null!==(a=null==ee?void 0:ee.rowSpan)&&void 0!==a?a:W.rowSpan)&&void 0!==s?s:O)&&void 0!==o?o:1,se=function(e,t){return d(b,(function(n){var r,i,o,s;return[(r=e,i=t||1,o=n.hoverStartRow,s=n.hoverEndRow,r<=s&&r+i-1>=o),n.onHover]}))}(M,oe),ae=(0,i.Z)(se,2),le=ae[0],ce=ae[1],ue=(0,I.zX)((function(e){var t;C&&ce(M,M+oe-1),null==W||null===(t=W.onMouseEnter)||void 0===t||t.call(W,e)})),de=(0,I.zX)((function(e){var t;C&&ce(-1,-1),null==W||null===(t=W.onMouseLeave)||void 0===t||t.call(W,e)}));if(0===ie||0===oe)return null;var he=null!==(c=W.title)&&void 0!==c?c:function(e){var t,n=e.ellipsis,r=e.rowType,i=e.children,o=!0===n?{showTitle:!0}:n;return o&&(o.showTitle||"header"===r)&&("string"==typeof i||"number"==typeof i?t=i.toString():l.isValidElement(i)&&"string"==typeof i.props.children&&(t=i.props.children)),t}({rowType:N,ellipsis:m,children:$}),fe=k()(q,y,(u={},(0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)(u,"".concat(q,"-fix-left"),ne&&K),"".concat(q,"-fix-left-first"),B&&K),"".concat(q,"-fix-left-last"),U&&K),"".concat(q,"-fix-left-all"),U&&Y&&K),"".concat(q,"-fix-right"),re&&K),"".concat(q,"-fix-right-first"),F&&K),"".concat(q,"-fix-right-last"),z&&K),"".concat(q,"-ellipsis"),m),"".concat(q,"-with-append"),H),"".concat(q,"-fix-sticky"),(ne||re)&&G&&K),(0,S.Z)(u,"".concat(q,"-row-hover"),!ee&&le)),W.className,null==ee?void 0:ee.className),pe={};_&&(pe.textAlign=_);var me=(0,w.Z)((0,w.Z)((0,w.Z)((0,w.Z)({},null==ee?void 0:ee.style),te),pe),W.style),ve=$;return"object"!==(0,x.Z)(ve)||Array.isArray(ve)||l.isValidElement(ve)||(ve=null),m&&(U||F)&&(ve=l.createElement("span",{className:"".concat(q,"-content")},ve)),l.createElement(f,(0,h.Z)({},ee,W,{className:fe,style:me,title:he,scope:v,onMouseEnter:X?ue:void 0,onMouseLeave:X?de:void 0,colSpan:1!==ie?ie:null,rowSpan:1!==oe?oe:null}),H,ve)}var R=l.memo(N);function O(e,t,n,r,i){var o,s,a=n[e]||{},l=n[t]||{};"left"===a.fixed?o=r.left["rtl"===i?t:e]:"right"===l.fixed&&(s=r.right["rtl"===i?e:t]);var c=!1,u=!1,d=!1,h=!1,f=n[t+1],p=n[e-1],m=f&&!f.fixed||p&&!p.fixed||n.every((function(e){return"left"===e.fixed}));if("rtl"===i){if(void 0!==o)h=!(p&&"left"===p.fixed)&&m;else if(void 0!==s){d=!(f&&"right"===f.fixed)&&m}}else if(void 0!==o){c=!(f&&"left"===f.fixed)&&m}else if(void 0!==s){u=!(p&&"right"===p.fixed)&&m}return{fixLeft:o,fixRight:s,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:r.isSticky}}var j=l.createContext({});var P=n(75931),B=["children"];function U(e){return e.children}U.Row=function(e){var t=e.children,n=(0,P.Z)(e,B);return l.createElement("tr",n,t)},U.Cell=function(e){var t=e.className,n=e.index,r=e.children,i=e.colSpan,o=void 0===i?1:i,s=e.rowSpan,a=e.align,c=d(b,["prefixCls","direction"]),u=c.prefixCls,f=c.direction,p=l.useContext(j),m=p.scrollColumnIndex,v=p.stickyOffsets,g=n+o-1+1===m?o+1:o,y=O(n,n+g-1,p.flattenColumns,v,f);return l.createElement(R,(0,h.Z)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:a,colSpan:g,rowSpan:s,render:function(){return r}},y))};var F=U;var z=y((function(e){var t=e.children,n=e.stickyOffsets,r=e.flattenColumns,i=d(b,"prefixCls"),o=r.length-1,s=r[o],a=l.useMemo((function(){return{stickyOffsets:n,flattenColumns:r,scrollColumnIndex:null!=s&&s.scrollbar?o:null}}),[s,r,o,n]);return l.createElement(j.Provider,{value:a},l.createElement("tfoot",{className:"".concat(i,"-summary")},t))})),H=F,Z=n(29301),W=n(24514),G=n(75152),q=n(26112);function V(e,t,n,r,i,o,s){e.push({record:t,indent:n,index:s});var a=o(t),l=null==i?void 0:i.has(a);if(t&&Array.isArray(t[r])&&l)for(var c=0;c<t[r].length;c+=1)V(e,t[r][c],n+1,r,i,o,c)}function K(e,t,n,r){return l.useMemo((function(){if(null!=n&&n.size){for(var i=[],o=0;o<(null==e?void 0:e.length);o+=1){V(i,e[o],0,t,n,r,o)}return i}return null==e?void 0:e.map((function(e,t){return{record:e,indent:0,index:t}}))}),[e,t,n,r])}function Y(e,t,n,r){var i,o=d(b,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),s=o.flattenColumns,a=o.expandableType,l=o.expandedKeys,c=o.childrenColumnName,u=o.onTriggerExpand,h=o.rowExpandable,f=o.onRow,p=o.expandRowByClick,m=o.rowClassName,v="nest"===a,g="row"===a&&(!h||h(e)),y=g||v,_=l&&l.has(t),x=c&&e&&e[c],S=(0,I.zX)(u),C=null==f?void 0:f(e,n),E=null==C?void 0:C.onClick;"string"==typeof m?i=m:"function"==typeof m&&(i=m(e,n,r));var T=A(s);return(0,w.Z)((0,w.Z)({},o),{},{columnsKey:T,nestExpandable:v,expanded:_,hasNestChildren:x,record:e,onTriggerExpand:S,rowSupportExpand:g,expandable:y,rowProps:(0,w.Z)((0,w.Z)({},C),{},{className:k()(i,null==C?void 0:C.className),onClick:function(t){p&&y&&u(e,t);for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];null==E||E.apply(void 0,[t].concat(r))}})})}var X=function(e){var t=e.prefixCls,n=e.children,r=e.component,i=e.cellComponent,o=e.className,s=e.expanded,a=e.colSpan,c=e.isEmpty,u=d(b,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),h=u.scrollbarSize,f=u.fixHeader,p=u.fixColumn,m=u.componentWidth,v=u.horizonScroll,g=n;return(c?v&&m:p)&&(g=l.createElement("div",{style:{width:m-(f&&!c?h:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},g)),l.createElement(r,{className:o,style:{display:s?null:"none"}},l.createElement(R,{component:i,prefixCls:t,colSpan:a},g))};function J(e){var t=e.prefixCls,n=e.record,r=e.onExpand,i=e.expanded,o=e.expandable,s="".concat(t,"-row-expand-icon");if(!o)return l.createElement("span",{className:k()(s,"".concat(t,"-row-spaced"))});return l.createElement("span",{className:k()(s,(0,S.Z)((0,S.Z)({},"".concat(t,"-row-expanded"),i),"".concat(t,"-row-collapsed"),!i)),onClick:function(e){r(n,e),e.stopPropagation()}})}function Q(e,t,n,r){return"string"==typeof e?e:"function"==typeof e?e(t,n,r):""}function $(e,t,n,r,i){var o,s,a=e.record,c=e.prefixCls,u=e.columnsKey,d=e.fixedInfoList,h=e.expandIconColumnIndex,f=e.nestExpandable,p=e.indentSize,m=e.expandIcon,v=e.expanded,g=e.hasNestChildren,y=e.onTriggerExpand,_=u[n],b=d[n];return n===(h||0)&&f&&(o=l.createElement(l.Fragment,null,l.createElement("span",{style:{paddingLeft:"".concat(p*r,"px")},className:"".concat(c,"-row-indent indent-level-").concat(r)}),m({prefixCls:c,expanded:v,expandable:g,record:a,onExpand:y}))),t.onCell&&(s=t.onCell(a,i)),{key:_,fixedInfo:b,appendCellNode:o,additionalCellProps:s||{}}}var ee=y((function(e){var t=e.className,n=e.style,r=e.record,i=e.index,o=e.renderIndex,s=e.rowKey,a=e.indent,c=void 0===a?0:a,u=e.rowComponent,d=e.cellComponent,f=e.scopeCellComponent,p=Y(r,s,i,c),m=p.prefixCls,v=p.flattenColumns,g=p.expandedRowClassName,y=p.expandedRowRender,_=p.rowProps,b=p.expanded,x=p.rowSupportExpand,C=l.useRef(!1);C.current||(C.current=b);var E,T=Q(g,r,i,c),L=l.createElement(u,(0,h.Z)({},_,{"data-row-key":s,className:k()(t,"".concat(m,"-row"),"".concat(m,"-row-level-").concat(c),null==_?void 0:_.className,(0,S.Z)({},T,c>=1)),style:(0,w.Z)((0,w.Z)({},n),null==_?void 0:_.style)}),v.map((function(e,t){var n=e.render,s=e.dataIndex,a=e.className,u=$(p,e,t,c,i),v=u.key,g=u.fixedInfo,y=u.appendCellNode,_=u.additionalCellProps;return l.createElement(R,(0,h.Z)({className:a,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?f:d,prefixCls:m,key:v,record:r,index:i,renderIndex:o,dataIndex:s,render:n,shouldCellUpdate:e.shouldCellUpdate},g,{appendNode:y,additionalProps:_}))})));if(x&&(C.current||b)){var A=y(r,i,c+1,b);E=l.createElement(X,{expanded:b,className:k()("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(c+1),T),prefixCls:m,component:u,cellComponent:d,colSpan:v.length,isEmpty:!1},A)}return l.createElement(l.Fragment,null,L,E)}));function te(e){var t=e.columnKey,n=e.onColumnResize,r=l.useRef();return(0,s.Z)((function(){r.current&&n(t,r.current.offsetWidth)}),[]),l.createElement(Z.Z,{data:t},l.createElement("td",{ref:r,style:{padding:0,border:0,height:0}},l.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var ne=n(29194);function re(e){var t=e.prefixCls,n=e.columnsKey,r=e.onColumnResize,i=l.useRef(null);return l.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:i},l.createElement(Z.Z.Collection,{onBatchResize:function(e){(0,ne.Z)(i.current)&&e.forEach((function(e){var t=e.data,n=e.size;r(t,n.offsetWidth)}))}},n.map((function(e){return l.createElement(te,{key:e,columnKey:e,onColumnResize:r})}))))}var ie=y((function(e){var t,n=e.data,r=e.measureColumnWidth,i=d(b,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),o=i.prefixCls,s=i.getComponent,a=i.onColumnResize,c=i.flattenColumns,u=i.getRowKey,h=i.expandedKeys,f=i.childrenColumnName,p=i.emptyNode,m=K(n,f,h,u),v=l.useRef({renderWithProps:!1}),g=s(["body","wrapper"],"tbody"),y=s(["body","row"],"tr"),_=s(["body","cell"],"td"),x=s(["body","cell"],"th");t=n.length?m.map((function(e,t){var n=e.record,r=e.indent,i=e.index,o=u(n,t);return l.createElement(ee,{key:o,rowKey:o,record:n,index:t,renderIndex:i,rowComponent:y,cellComponent:_,scopeCellComponent:x,indent:r})})):l.createElement(X,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:y,cellComponent:_,colSpan:c.length,isEmpty:!0},p);var w=A(c);return l.createElement(L.Provider,{value:v.current},l.createElement(g,{className:"".concat(o,"-tbody")},r&&l.createElement(re,{prefixCls:o,columnsKey:w,onColumnResize:a}),t))})),oe=n(54451),se=["columnType"];var ae=function(e){for(var t=e.colWidths,n=e.columns,r=e.columCount,i=d(b,["tableLayout"]).tableLayout,o=[],s=!1,a=(r||n.length)-1;a>=0;a-=1){var c=t[a],u=n&&n[a],f=void 0,p=void 0;if(u&&(f=u[oe.v],"auto"===i&&(p=u.minWidth)),c||p||f||s){var m=f||{},v=(m.columnType,(0,P.Z)(m,se));o.unshift(l.createElement("col",(0,h.Z)({key:a,style:{width:c,minWidth:p}},v))),s=!0}}return l.createElement("colgroup",null,o)},le=n(94480),ce=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];var ue=l.forwardRef((function(e,t){var n=e.className,r=e.noData,i=e.columns,o=e.flattenColumns,s=e.colWidths,a=e.columCount,c=e.stickyOffsets,u=e.direction,h=e.fixHeader,p=e.stickyTopOffset,m=e.stickyBottomOffset,v=e.stickyClassName,g=e.onScroll,y=e.maxContentScroll,_=e.children,x=(0,P.Z)(e,ce),C=d(b,["prefixCls","scrollbarSize","isSticky","getComponent"]),E=C.prefixCls,T=C.scrollbarSize,L=C.isSticky,A=(0,C.getComponent)(["header","table"],"table"),M=L&&!h?0:T,D=l.useRef(null),I=l.useCallback((function(e){(0,f.mH)(t,e),(0,f.mH)(D,e)}),[]);l.useEffect((function(){var e;function t(e){var t=e,n=t.currentTarget,r=t.deltaX;r&&(g({currentTarget:n,scrollLeft:n.scrollLeft+r}),e.preventDefault())}return null===(e=D.current)||void 0===e||e.addEventListener("wheel",t,{passive:!1}),function(){var e;null===(e=D.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var N=l.useMemo((function(){return o.every((function(e){return e.width}))}),[o]),R=o[o.length-1],O={fixed:R?R.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(E,"-cell-scrollbar")}}},j=(0,l.useMemo)((function(){return M?[].concat((0,le.Z)(i),[O]):i}),[M,i]),B=(0,l.useMemo)((function(){return M?[].concat((0,le.Z)(o),[O]):o}),[M,o]),U=(0,l.useMemo)((function(){var e=c.right,t=c.left;return(0,w.Z)((0,w.Z)({},c),{},{left:"rtl"===u?[].concat((0,le.Z)(t.map((function(e){return e+M}))),[0]):t,right:"rtl"===u?e:[].concat((0,le.Z)(e.map((function(e){return e+M}))),[0]),isSticky:L})}),[M,c,L]),F=function(e,t){return(0,l.useMemo)((function(){for(var n=[],r=0;r<t;r+=1){var i=e[r];if(void 0===i)return null;n[r]=i}return n}),[e.join("_"),t])}(s,a);return l.createElement("div",{style:(0,w.Z)({overflow:"hidden"},L?{top:p,bottom:m}:{}),ref:I,className:k()(n,(0,S.Z)({},v,!!v))},l.createElement(A,{style:{tableLayout:"fixed",visibility:r||F?null:"hidden"}},(!r||!y||N)&&l.createElement(ae,{colWidths:F?[].concat((0,le.Z)(F),[M]):[],columCount:a+1,columns:B}),_((0,w.Z)((0,w.Z)({},x),{},{stickyOffsets:U,columns:j,flattenColumns:B}))))}));var de=l.memo(ue);var he=function(e){var t,n=e.cells,r=e.stickyOffsets,i=e.flattenColumns,o=e.rowComponent,s=e.cellComponent,a=e.onHeaderRow,c=e.index,u=d(b,["prefixCls","direction"]),f=u.prefixCls,p=u.direction;a&&(t=a(n.map((function(e){return e.column})),c));var m=A(n.map((function(e){return e.column})));return l.createElement(o,t,n.map((function(e,t){var n,o=e.column,a=O(e.colStart,e.colEnd,i,r,p);return o&&o.onHeaderCell&&(n=e.column.onHeaderCell(o)),l.createElement(R,(0,h.Z)({},e,{scope:o.title?e.colSpan>1?"colgroup":"col":null,ellipsis:o.ellipsis,align:o.align,component:s,prefixCls:f,key:m[t]},a,{additionalProps:n,rowType:"header"}))})))};var fe=y((function(e){var t=e.stickyOffsets,n=e.columns,r=e.flattenColumns,i=e.onHeaderRow,o=d(b,["prefixCls","getComponent"]),s=o.prefixCls,a=o.getComponent,c=l.useMemo((function(){return function(e){var t=[];!function e(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[i]=t[i]||[];var o=r;return n.filter(Boolean).map((function(n){var r={key:n.key,className:n.className||"",children:n.title,column:n,colStart:o},s=1,a=n.children;return a&&a.length>0&&(s=e(a,o,i+1).reduce((function(e,t){return e+t}),0),r.hasSubColumns=!0),"colSpan"in n&&(s=n.colSpan),"rowSpan"in n&&(r.rowSpan=n.rowSpan),r.colSpan=s,r.colEnd=r.colStart+s-1,t[i].push(r),o+=s,s}))}(e,0);for(var n=t.length,r=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},i=0;i<n;i+=1)r(i);return t}(n)}),[n]),u=a(["header","wrapper"],"thead"),h=a(["header","row"],"tr"),f=a(["header","cell"],"th");return l.createElement(u,{className:"".concat(s,"-thead")},c.map((function(e,n){return l.createElement(he,{key:n,flattenColumns:r,cells:e,stickyOffsets:t,rowComponent:h,cellComponent:f,onHeaderRow:i,index:n})})))})),pe=n(97347);var me=(0,n(47273).Z)()?window:null;var ve=function(e,t,n){return(0,l.useMemo)((function(){var r=t.length,i=function(n,r,i){for(var o=[],s=0,a=n;a!==r;a+=i)o.push(s),t[a].fixed&&(s+=e[a]||0);return o},o=i(0,r,1),s=i(r-1,-1,-1).reverse();return"rtl"===n?{left:s,right:o}:{left:o,right:s}}),[e,t,n])};var ge=function(e){var t=e.className,n=e.children;return l.createElement("div",{className:t},n)},ye=n(8224),_e=n(16089),be=n(76846);function xe(e){var t=(0,be.bn)(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var we=function(e,t){var n,r,o,s,a,c,u,h,f=e.scrollBodyRef,p=e.onScroll,m=e.offsetScroll,v=e.container,g=e.direction,y=d(b,"prefixCls"),_=(null===(n=f.current)||void 0===n?void 0:n.scrollWidth)||0,x=(null===(r=f.current)||void 0===r?void 0:r.clientWidth)||0,C=_&&x*(x/_),E=l.useRef(),T=(o={scrollLeft:0,isHiddenScrollBar:!0},s=(0,l.useRef)(o),a=(0,l.useState)({}),c=(0,i.Z)(a,2)[1],u=(0,l.useRef)(null),h=(0,l.useRef)([]),(0,l.useEffect)((function(){return function(){u.current=null}}),[]),[s.current,function(e){h.current.push(e);var t=Promise.resolve();u.current=t,t.then((function(){if(u.current===t){var e=h.current,n=s.current;h.current=[],e.forEach((function(e){s.current=e(s.current)})),u.current=null,n!==s.current&&c({})}}))}]),L=(0,i.Z)(T,2),A=L[0],M=L[1],D=l.useRef({delta:0,x:0}),I=l.useState(!1),N=(0,i.Z)(I,2),R=N[0],O=N[1],j=l.useRef(null);l.useEffect((function(){return function(){_e.Z.cancel(j.current)}}),[]);var P=function(){O(!1)},B=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(R&&0!==n){var r=D.current.x+e.pageX-D.current.x-D.current.delta,i="rtl"===g;r=Math.max(i?C-x:0,Math.min(i?0:x-C,r)),(!i||Math.abs(r)+Math.abs(C)<x)&&(p({scrollLeft:r/x*(_+2)}),D.current.x=e.pageX)}else R&&O(!1)},U=function(){_e.Z.cancel(j.current),j.current=(0,_e.Z)((function(){if(f.current){var e=xe(f.current).top,t=e+f.current.offsetHeight,n=v===window?document.documentElement.scrollTop+window.innerHeight:xe(v).top+v.clientHeight;t-(0,G.Z)()<=n||e>=n-m?M((function(e){return(0,w.Z)((0,w.Z)({},e),{},{isHiddenScrollBar:!0})})):M((function(e){return(0,w.Z)((0,w.Z)({},e),{},{isHiddenScrollBar:!1})}))}}))},F=function(e){M((function(t){return(0,w.Z)((0,w.Z)({},t),{},{scrollLeft:e/_*x||0})}))};return l.useImperativeHandle(t,(function(){return{setScrollLeft:F,checkScrollBarVisible:U}})),l.useEffect((function(){var e=(0,ye.Z)(document.body,"mouseup",P,!1),t=(0,ye.Z)(document.body,"mousemove",B,!1);return U(),function(){e.remove(),t.remove()}}),[C,R]),l.useEffect((function(){if(f.current){for(var e=[],t=(0,be.bn)(f.current);t;)e.push(t),t=t.parentElement;return e.forEach((function(e){return e.addEventListener("scroll",U,!1)})),window.addEventListener("resize",U,!1),window.addEventListener("scroll",U,!1),v.addEventListener("scroll",U,!1),function(){e.forEach((function(e){return e.removeEventListener("scroll",U)})),window.removeEventListener("resize",U),window.removeEventListener("scroll",U),v.removeEventListener("scroll",U)}}}),[v]),l.useEffect((function(){A.isHiddenScrollBar||M((function(e){var t=f.current;return t?(0,w.Z)((0,w.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[A.isHiddenScrollBar]),_<=x||!C||A.isHiddenScrollBar?null:l.createElement("div",{style:{height:(0,G.Z)(),width:x,bottom:m},className:"".concat(y,"-sticky-scroll")},l.createElement("div",{onMouseDown:function(e){e.persist(),D.current.delta=e.pageX-A.scrollLeft,D.current.x=0,O(!0),e.preventDefault()},ref:E,className:k()("".concat(y,"-sticky-scroll-bar"),(0,S.Z)({},"".concat(y,"-sticky-scroll-bar-active"),R)),style:{width:"".concat(C,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))},Se=l.forwardRef(we);var Ce=function(e){return null};var ke=function(e){return null},Ee="rc-table",Te=[],Le={};function Ae(){return"No Data"}function Me(e,t){var n=(0,w.Z)({rowKey:"key",prefixCls:Ee,emptyText:Ae},e),c=n.prefixCls,u=n.className,d=n.rowClassName,f=n.style,p=n.data,m=n.rowKey,v=n.scroll,g=n.tableLayout,y=n.direction,_=n.title,C=n.footer,L=n.summary,D=n.caption,I=n.id,N=n.showHeader,R=n.components,j=n.emptyText,P=n.onRow,B=n.onHeaderRow,U=n.onScroll,H=n.internalHooks,V=n.transformColumns,K=n.internalRefs,Y=n.tailor,X=n.getContainerWidth,Q=n.sticky,$=n.rowHoverable,ee=void 0===$||$,te=p||Te,ne=!!te.length,re=H===r.R;var se=l.useCallback((function(e,t){return(0,T.Z)(R,e)||t}),[R]),ce=l.useMemo((function(){return"function"==typeof m?m:function(e){return e&&e[m]}}),[m]),ue=se(["body"]),he=function(){var e=l.useState(-1),t=(0,i.Z)(e,2),n=t[0],r=t[1],o=l.useState(-1),s=(0,i.Z)(o,2),a=s[0],c=s[1];return[n,a,l.useCallback((function(e,t){r(e),c(t)}),[])]}(),ye=(0,i.Z)(he,3),_e=ye[0],xe=ye[1],we=ye[2],Ce=function(e,t,n){var o=(0,oe.g)(e),s=o.expandIcon,a=o.expandedRowKeys,c=o.defaultExpandedRowKeys,u=o.defaultExpandAllRows,d=o.expandedRowRender,h=o.onExpand,f=o.onExpandedRowsChange,p=s||J,m=o.childrenColumnName||"children",v=l.useMemo((function(){return d?"row":!!(e.expandable&&e.internalHooks===r.R&&e.expandable.__PARENT_RENDER_ICON__||t.some((function(e){return e&&"object"===(0,x.Z)(e)&&e[m]})))&&"nest"}),[!!d,t]),g=l.useState((function(){return c||(u?function(e,t,n){var r=[];return function e(i){(i||[]).forEach((function(i,o){r.push(t(i,o)),e(i[n])}))}(e),r}(t,n,m):[])})),y=(0,i.Z)(g,2),_=y[0],b=y[1],w=l.useMemo((function(){return new Set(a||_||[])}),[a,_]),S=l.useCallback((function(e){var r,i=n(e,t.indexOf(e)),o=w.has(i);o?(w.delete(i),r=(0,le.Z)(w)):r=[].concat((0,le.Z)(w),[i]),b(r),h&&h(!o,e),f&&f(r)}),[n,w,t,h,f]);return[o,v,w,p,m,S]}(n,te,ce),ke=(0,i.Z)(Ce,6),Me=ke[0],De=ke[1],Ie=ke[2],Ne=ke[3],Re=ke[4],Oe=ke[5],je=null==v?void 0:v.x,Pe=l.useState(0),Be=(0,i.Z)(Pe,2),Ue=Be[0],Fe=Be[1],ze=(0,pe.Z)((0,w.Z)((0,w.Z)((0,w.Z)({},n),Me),{},{expandable:!!Me.expandedRowRender,columnTitle:Me.columnTitle,expandedKeys:Ie,getRowKey:ce,onTriggerExpand:Oe,expandIcon:Ne,expandIconColumnIndex:Me.expandIconColumnIndex,direction:y,scrollWidth:re&&Y&&"number"==typeof je?je:null,clientWidth:Ue}),re?V:null),He=(0,i.Z)(ze,4),Ze=He[0],We=He[1],Ge=He[2],qe=He[3],Ve=null!=Ge?Ge:je,Ke=l.useMemo((function(){return{columns:Ze,flattenColumns:We}}),[Ze,We]),Ye=l.useRef(),Xe=l.useRef(),Je=l.useRef(),Qe=l.useRef();l.useImperativeHandle(t,(function(){return{nativeElement:Ye.current,scrollTo:function(e){var t,n;if(Je.current instanceof HTMLElement){var r=e.index,i=e.top,o=e.key;if("number"!=typeof(n=i)||Number.isNaN(n)){var s,a=null!=o?o:ce(te[r]);null===(s=Je.current.querySelector('[data-row-key="'.concat(a,'"]')))||void 0===s||s.scrollIntoView()}else{var l;null===(l=Je.current)||void 0===l||l.scrollTo({top:i})}}else null!==(t=Je.current)&&void 0!==t&&t.scrollTo&&Je.current.scrollTo(e)}}}));var $e,et,tt,nt=l.useRef(),rt=l.useState(!1),it=(0,i.Z)(rt,2),ot=it[0],st=it[1],at=l.useState(!1),lt=(0,i.Z)(at,2),ct=lt[0],ut=lt[1],dt=l.useState(new Map),ht=(0,i.Z)(dt,2),ft=ht[0],pt=ht[1],mt=A(We).map((function(e){return ft.get(e)})),vt=l.useMemo((function(){return mt}),[mt.join("_")]),gt=ve(vt,We,y),yt=v&&M(v.y),_t=v&&M(Ve)||Boolean(Me.fixed),bt=_t&&We.some((function(e){return e.fixed})),xt=l.useRef(),wt=function(e,t){var n="object"===(0,x.Z)(e)?e:{},r=n.offsetHeader,i=void 0===r?0:r,o=n.offsetSummary,s=void 0===o?0:o,a=n.offsetScroll,c=void 0===a?0:a,u=n.getContainer,d=(void 0===u?function(){return me}:u)()||me,h=!!e;return l.useMemo((function(){return{isSticky:h,stickyClassName:h?"".concat(t,"-sticky-holder"):"",offsetHeader:i,offsetSummary:s,offsetScroll:c,container:d}}),[h,c,i,s,t,d])}(Q,c),St=wt.isSticky,Ct=wt.offsetHeader,kt=wt.offsetSummary,Et=wt.offsetScroll,Tt=wt.stickyClassName,Lt=wt.container,At=l.useMemo((function(){return null==L?void 0:L(te)}),[L,te]),Mt=(yt||St)&&l.isValidElement(At)&&At.type===F&&At.props.fixed;yt&&(et={overflowY:ne?"scroll":"auto",maxHeight:v.y}),_t&&($e={overflowX:"auto"},yt||(et={overflowY:"hidden"}),tt={width:!0===Ve?"auto":Ve,minWidth:"100%"});var Dt=l.useCallback((function(e,t){pt((function(n){if(n.get(e)!==t){var r=new Map(n);return r.set(e,t),r}return n}))}),[]),It=function(e){var t=(0,l.useRef)(e||null),n=(0,l.useRef)();function r(){window.clearTimeout(n.current)}return(0,l.useEffect)((function(){return r}),[]),[function(e){t.current=e,r(),n.current=window.setTimeout((function(){t.current=null,n.current=void 0}),100)},function(){return t.current}]}(null),Nt=(0,i.Z)(It,2),Rt=Nt[0],Ot=Nt[1];function jt(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout((function(){t.scrollLeft=e}),0)))}var Pt=(0,o.Z)((function(e){var t,n=e.currentTarget,r=e.scrollLeft,i="rtl"===y,o="number"==typeof r?r:n.scrollLeft,s=n||Le;Ot()&&Ot()!==s||(Rt(s),jt(o,Xe.current),jt(o,Je.current),jt(o,nt.current),jt(o,null===(t=xt.current)||void 0===t?void 0:t.setScrollLeft));var a=n||Xe.current;if(a){var l=re&&Y&&"number"==typeof Ve?Ve:a.scrollWidth,c=a.clientWidth;if(l===c)return st(!1),void ut(!1);i?(st(-o<l-c),ut(-o>0)):(st(o>0),ut(o<l-c))}})),Bt=(0,o.Z)((function(e){Pt(e),null==U||U(e)})),Ut=function(){var e;_t&&Je.current?Pt({currentTarget:(0,be.bn)(Je.current),scrollLeft:null===(e=Je.current)||void 0===e?void 0:e.scrollLeft}):(st(!1),ut(!1))},Ft=l.useRef(!1);l.useEffect((function(){Ft.current&&Ut()}),[_t,p,Ze.length]),l.useEffect((function(){Ft.current=!0}),[]);var zt=l.useState(0),Ht=(0,i.Z)(zt,2),Zt=Ht[0],Wt=Ht[1],Gt=l.useState(!0),qt=(0,i.Z)(Gt,2),Vt=qt[0],Kt=qt[1];(0,s.Z)((function(){Y&&re||(Je.current instanceof Element?Wt((0,G.o)(Je.current).width):Wt((0,G.o)(Qe.current).width)),Kt((0,W.G)("position","sticky"))}),[]),l.useEffect((function(){re&&K&&(K.body.current=Je.current)}));var Yt,Xt=l.useCallback((function(e){return l.createElement(l.Fragment,null,l.createElement(fe,e),"top"===Mt&&l.createElement(z,e,At))}),[Mt,At]),Jt=l.useCallback((function(e){return l.createElement(z,e,At)}),[At]),Qt=se(["table"],"table"),$t=l.useMemo((function(){return g||(bt?"max-content"===Ve?"auto":"fixed":yt||St||We.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[yt,bt,We,g,St]),en={colWidths:vt,columCount:We.length,stickyOffsets:gt,onHeaderRow:B,fixHeader:yt,scroll:v},tn=l.useMemo((function(){return ne?null:"function"==typeof j?j():j}),[ne,j]),nn=l.createElement(ie,{data:te,measureColumnWidth:yt||_t||St}),rn=l.createElement(ae,{colWidths:We.map((function(e){return e.width})),columns:We}),on=null!=D?l.createElement("caption",{className:"".concat(c,"-caption")},D):void 0,sn=(0,q.Z)(n,{data:!0}),an=(0,q.Z)(n,{aria:!0});if(yt||St){var ln;"function"==typeof ue?(ln=ue(te,{scrollbarSize:Zt,ref:Je,onScroll:Pt}),en.colWidths=We.map((function(e,t){var n=e.width,r=t===We.length-1?n-Zt:n;return"number"!=typeof r||Number.isNaN(r)?0:r}))):ln=l.createElement("div",{style:(0,w.Z)((0,w.Z)({},$e),et),onScroll:Bt,ref:Je,className:k()("".concat(c,"-body"))},l.createElement(Qt,(0,h.Z)({style:(0,w.Z)((0,w.Z)({},tt),{},{tableLayout:$t})},an),on,rn,nn,!Mt&&At&&l.createElement(z,{stickyOffsets:gt,flattenColumns:We},At)));var cn=(0,w.Z)((0,w.Z)((0,w.Z)({noData:!te.length,maxContentScroll:_t&&"max-content"===Ve},en),Ke),{},{direction:y,stickyClassName:Tt,onScroll:Pt});Yt=l.createElement(l.Fragment,null,!1!==N&&l.createElement(de,(0,h.Z)({},cn,{stickyTopOffset:Ct,className:"".concat(c,"-header"),ref:Xe}),Xt),ln,Mt&&"top"!==Mt&&l.createElement(de,(0,h.Z)({},cn,{stickyBottomOffset:kt,className:"".concat(c,"-summary"),ref:nt}),Jt),St&&Je.current&&Je.current instanceof Element&&l.createElement(Se,{ref:xt,offsetScroll:Et,scrollBodyRef:Je,onScroll:Pt,container:Lt,direction:y}))}else Yt=l.createElement("div",{style:(0,w.Z)((0,w.Z)({},$e),et),className:k()("".concat(c,"-content")),onScroll:Pt,ref:Je},l.createElement(Qt,(0,h.Z)({style:(0,w.Z)((0,w.Z)({},tt),{},{tableLayout:$t})},an),on,rn,!1!==N&&l.createElement(fe,(0,h.Z)({},en,Ke)),nn,At&&l.createElement(z,{stickyOffsets:gt,flattenColumns:We},At)));var un=l.createElement("div",(0,h.Z)({className:k()(c,u,(0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)((0,S.Z)({},"".concat(c,"-rtl"),"rtl"===y),"".concat(c,"-ping-left"),ot),"".concat(c,"-ping-right"),ct),"".concat(c,"-layout-fixed"),"fixed"===g),"".concat(c,"-fixed-header"),yt),"".concat(c,"-fixed-column"),bt),"".concat(c,"-fixed-column-gapped"),bt&&qe),"".concat(c,"-scroll-horizontal"),_t),"".concat(c,"-has-fix-left"),We[0]&&We[0].fixed),"".concat(c,"-has-fix-right"),We[We.length-1]&&"right"===We[We.length-1].fixed)),style:f,id:I,ref:Ye},sn),_&&l.createElement(ge,{className:"".concat(c,"-title")},_(te)),l.createElement("div",{ref:Qe,className:"".concat(c,"-container")},Yt),C&&l.createElement(ge,{className:"".concat(c,"-footer")},C(te)));_t&&(un=l.createElement(Z.Z,{onResize:function(e){var t,n=e.width;null===(t=xt.current)||void 0===t||t.checkScrollBarVisible();var r=Ye.current?Ye.current.offsetWidth:n;re&&X&&Ye.current&&(r=X(Ye.current,r)||r),r!==Ue&&(Ut(),Fe(r))}},un));var dn=function(e,t,n){var r=e.map((function(r,i){return O(i,i,e,t,n)}));return(0,E.Z)((function(){return r}),[r],(function(e,t){return!(0,a.Z)(e,t)}))}(We,gt,y),hn=l.useMemo((function(){return{scrollX:Ve,prefixCls:c,getComponent:se,scrollbarSize:Zt,direction:y,fixedInfoList:dn,isSticky:St,supportSticky:Vt,componentWidth:Ue,fixHeader:yt,fixColumn:bt,horizonScroll:_t,tableLayout:$t,rowClassName:d,expandedRowClassName:Me.expandedRowClassName,expandIcon:Ne,expandableType:De,expandRowByClick:Me.expandRowByClick,expandedRowRender:Me.expandedRowRender,onTriggerExpand:Oe,expandIconColumnIndex:Me.expandIconColumnIndex,indentSize:Me.indentSize,allColumnsFixedLeft:We.every((function(e){return"left"===e.fixed})),emptyNode:tn,columns:Ze,flattenColumns:We,onColumnResize:Dt,hoverStartRow:_e,hoverEndRow:xe,onHover:we,rowExpandable:Me.rowExpandable,onRow:P,getRowKey:ce,expandedKeys:Ie,childrenColumnName:Re,rowHoverable:ee}}),[Ve,c,se,Zt,y,dn,St,Vt,Ue,yt,bt,_t,$t,d,Me.expandedRowClassName,Ne,De,Me.expandRowByClick,Me.expandedRowRender,Oe,Me.expandIconColumnIndex,Me.indentSize,tn,Ze,We,Dt,_e,xe,we,Me.rowExpandable,P,ce,Ie,Re,ee]);return l.createElement(b.Provider,{value:hn},un)}var De=l.forwardRef(Me);function Ie(e){return g(De,e)}var Ne=Ie();Ne.EXPAND_COLUMN=r.w,Ne.INTERNAL_HOOKS=r.R,Ne.Column=Ce,Ne.ColumnGroup=ke,Ne.Summary=H;var Re=Ne,Oe=n(48911),je=u(null),Pe=u(null);var Be=function(e){var t=e.rowInfo,n=e.column,r=e.colIndex,i=e.indent,o=e.index,s=e.component,a=e.renderIndex,c=e.record,u=e.style,f=e.className,p=e.inverse,m=e.getHeight,v=n.render,g=n.dataIndex,y=n.className,_=n.width,b=d(Pe,["columnsOffset"]).columnsOffset,x=$(t,n,r,i,o),S=x.key,C=x.fixedInfo,E=x.appendCellNode,T=x.additionalCellProps,L=T.style,A=T.colSpan,M=void 0===A?1:A,D=T.rowSpan,I=void 0===D?1:D,N=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(r-1,M,b),O=M>1?_-N:0,j=(0,w.Z)((0,w.Z)((0,w.Z)({},L),u),{},{flex:"0 0 ".concat(N,"px"),width:"".concat(N,"px"),marginRight:O,pointerEvents:"auto"}),P=l.useMemo((function(){return p?I<=1:0===M||0===I||I>1}),[I,M,p]);P?j.visibility="hidden":p&&(j.height=null==m?void 0:m(I));var B=P?function(){return null}:v,U={};return 0!==I&&0!==M||(U.rowSpan=1,U.colSpan=1),l.createElement(R,(0,h.Z)({className:k()(y,f),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:s,prefixCls:t.prefixCls,key:S,record:c,index:o,renderIndex:a,dataIndex:g,render:B,shouldCellUpdate:n.shouldCellUpdate},C,{appendNode:E,additionalProps:(0,w.Z)((0,w.Z)({},T),{},{style:j},U)}))},Ue=["data","index","className","rowKey","style","extra","getHeight"];var Fe=y(l.forwardRef((function(e,t){var n,r=e.data,i=e.index,o=e.className,s=e.rowKey,a=e.style,c=e.extra,u=e.getHeight,f=(0,P.Z)(e,Ue),p=r.record,m=r.indent,v=r.index,g=d(b,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),y=g.scrollX,_=g.flattenColumns,x=g.prefixCls,C=g.fixColumn,E=g.componentWidth,T=d(je,["getComponent"]).getComponent,L=Y(p,s,i,m),A=T(["body","row"],"div"),M=T(["body","cell"],"div"),D=L.rowSupportExpand,I=L.expanded,N=L.rowProps,O=L.expandedRowRender,j=L.expandedRowClassName;if(D&&I){var B=O(p,i,m+1,I),U=Q(j,p,i,m),F={};C&&(F={style:(0,S.Z)({},"--virtual-width","".concat(E,"px"))});var z="".concat(x,"-expanded-row-cell");n=l.createElement(A,{className:k()("".concat(x,"-expanded-row"),"".concat(x,"-expanded-row-level-").concat(m+1),U)},l.createElement(R,{component:M,prefixCls:x,className:k()(z,(0,S.Z)({},"".concat(z,"-fixed"),C)),additionalProps:F},B))}var H=(0,w.Z)((0,w.Z)({},a),{},{width:y});c&&(H.position="absolute",H.pointerEvents="none");var Z=l.createElement(A,(0,h.Z)({},N,f,{"data-row-key":s,ref:D?null:t,className:k()(o,"".concat(x,"-row"),null==N?void 0:N.className,(0,S.Z)({},"".concat(x,"-row-extra"),c)),style:(0,w.Z)((0,w.Z)({},H),null==N?void 0:N.style)}),_.map((function(e,t){return l.createElement(Be,{key:t,component:M,rowInfo:L,column:e,colIndex:t,indent:m,index:i,renderIndex:v,record:p,inverse:c,getHeight:u})})));return D?l.createElement("div",{ref:t},Z,n):Z})));var ze=y(l.forwardRef((function(e,t){var n=e.data,r=e.onScroll,o=d(b,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),s=o.flattenColumns,a=o.onColumnResize,c=o.getRowKey,u=o.expandedKeys,h=o.prefixCls,f=o.childrenColumnName,p=o.scrollX,m=o.direction,v=d(je),g=v.sticky,y=v.scrollY,_=v.listItemHeight,w=v.getComponent,S=v.onScroll,C=l.useRef(),k=K(n,f,u,c),E=l.useMemo((function(){var e=0;return s.map((function(t){var n=t.width;return[t.key,n,e+=n]}))}),[s]),T=l.useMemo((function(){return E.map((function(e){return e[2]}))}),[E]);l.useEffect((function(){E.forEach((function(e){var t=(0,i.Z)(e,2),n=t[0],r=t[1];a(n,r)}))}),[E]),l.useImperativeHandle(t,(function(){var e,t={scrollTo:function(e){var t;null===(t=C.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=C.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=C.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=C.current)||void 0===t||t.scrollTo({left:e})}}),t}));var L=function(e,t){var n,r=null===(n=k[t])||void 0===n?void 0:n.record,i=e.onCell;if(i){var o,s=i(r,t);return null!==(o=null==s?void 0:s.rowSpan)&&void 0!==o?o:1}return 1},A=l.useMemo((function(){return{columnsOffset:T}}),[T]),M="".concat(h,"-tbody"),D=w(["body","wrapper"]),I={};return g&&(I.position="sticky",I.bottom=0,"object"===(0,x.Z)(g)&&g.offsetScroll&&(I.bottom=g.offsetScroll)),l.createElement(Pe.Provider,{value:A},l.createElement(Oe.Z,{fullHeight:!1,ref:C,prefixCls:"".concat(M,"-virtual"),styles:{horizontalScrollBar:I},className:M,height:y,itemHeight:_||24,data:k,itemKey:function(e){return c(e.record)},component:D,scrollWidth:p,direction:m,onVirtualScroll:function(e){var t,n=e.x;r({currentTarget:null===(t=C.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:S,extraRender:function(e){var t=e.start,n=e.end,r=e.getSize,i=e.offsetY;if(n<0)return null;for(var o=s.filter((function(e){return 0===L(e,t)})),a=t,u=function(e){if(!(o=o.filter((function(t){return 0===L(t,e)}))).length)return a=e,1},d=t;d>=0&&!u(d);d-=1);for(var h=s.filter((function(e){return 1!==L(e,n)})),f=n,p=function(e){if(!(h=h.filter((function(t){return 1!==L(t,e)}))).length)return f=Math.max(e-1,n),1},m=n;m<k.length&&!p(m);m+=1);for(var v=[],g=function(e){if(!k[e])return 1;s.some((function(t){return L(t,e)>1}))&&v.push(e)},y=a;y<=f;y+=1)g(y);return v.map((function(e){var t=k[e],n=c(t.record,e),o=r(n);return l.createElement(Fe,{key:e,data:t,rowKey:n,index:e,style:{top:-i+o.top},extra:!0,getHeight:function(t){var i=e+t-1,o=c(k[i].record,i),s=r(n,o);return s.bottom-s.top}})}))}},(function(e,t,n){var r=c(e.record,t);return l.createElement(Fe,{data:e,rowKey:r,index:t,style:n.style})})))}))),He=function(e,t){var n=t.ref,r=t.onScroll;return l.createElement(ze,{ref:n,data:e,onScroll:r})};function Ze(e,t){var n=e.data,i=e.columns,o=e.scroll,s=e.sticky,a=e.prefixCls,c=void 0===a?Ee:a,u=e.className,d=e.listItemHeight,f=e.components,p=e.onScroll,m=o||{},v=m.x,g=m.y;"number"!=typeof v&&(v=1),"number"!=typeof g&&(g=500);var y=(0,I.zX)((function(e,t){return(0,T.Z)(f,e)||t})),_=(0,I.zX)(p),b=l.useMemo((function(){return{sticky:s,scrollY:g,listItemHeight:d,getComponent:y,onScroll:_}}),[s,g,d,y,_]);return l.createElement(je.Provider,{value:b},l.createElement(Re,(0,h.Z)({},e,{className:k()(u,"".concat(c,"-virtual")),scroll:(0,w.Z)((0,w.Z)({},o),{},{x:v}),components:(0,w.Z)((0,w.Z)({},f),{},{body:null!=n&&n.length?He:void 0}),columns:i,internalHooks:r.R,tailor:!0,ref:t})))}var We=l.forwardRef(Ze);function Ge(e){return g(We,e)}Ge()},54451:function(e,t,n){"use strict";n.d(t,{g:function(){return a},v:function(){return s}});var r=n(33885),i=n(75931),o=(n(48736),["expandable"]),s="RC_TABLE_INTERNAL_COL_DEFINE";function a(e){var t,n=e.expandable,s=(0,i.Z)(e,o);return!1===(t="expandable"in e?(0,r.Z)((0,r.Z)({},s),n):s).showExpandColumn&&(t.expandIconColumnIndex=-1),t}},22711:function(e,t,n){"use strict";n.r(t),n.d(t,{ResizableTextArea:function(){return T},default:function(){return A}});var r,i=n(54476),o=n(20068),s=n(33885),a=n(94480),l=n(42978),c=n(75931),u=n(92310),d=n.n(u),h=n(36901),f=n(66003),p=n(30292),m=n(18929),v=n(59301),g=n(76190),y=n(29301),_=n(34280),b=n(16089),x="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n",w=["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"],S={};function C(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&S[n])return S[n];var r=window.getComputedStyle(e),i=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),o=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),s=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),a=w.map((function(e){return"".concat(e,":").concat(r.getPropertyValue(e))})).join(";"),l={sizingStyle:a,paddingSize:o,borderSize:s,boxSizing:i};return t&&n&&(S[n]=l),l}var k=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],E=v.forwardRef((function(e,t){var n=e,a=n.prefixCls,u=n.defaultValue,h=n.value,f=n.autoSize,p=n.onResize,w=n.className,S=n.style,E=n.disabled,T=n.onChange,L=(n.onInternalAutoSize,(0,c.Z)(n,k)),A=(0,m.Z)(u,{value:h,postState:function(e){return null!=e?e:""}}),M=(0,l.Z)(A,2),D=M[0],I=M[1],N=v.useRef();v.useImperativeHandle(t,(function(){return{textArea:N.current}}));var R=v.useMemo((function(){return f&&"object"===(0,g.Z)(f)?[f.minRows,f.maxRows]:[]}),[f]),O=(0,l.Z)(R,2),j=O[0],P=O[1],B=!!f,U=v.useState(2),F=(0,l.Z)(U,2),z=F[0],H=F[1],Z=v.useState(),W=(0,l.Z)(Z,2),G=W[0],q=W[1],V=function(){H(0)};(0,_.Z)((function(){B&&V()}),[h,j,P,B]),(0,_.Z)((function(){if(0===z)H(1);else if(1===z){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;r||((r=document.createElement("textarea")).setAttribute("tab-index","-1"),r.setAttribute("aria-hidden","true"),r.setAttribute("name","hiddenTextarea"),document.body.appendChild(r)),e.getAttribute("wrap")?r.setAttribute("wrap",e.getAttribute("wrap")):r.removeAttribute("wrap");var o=C(e,t),s=o.paddingSize,a=o.borderSize,l=o.boxSizing,c=o.sizingStyle;r.setAttribute("style","".concat(c,";").concat(x)),r.value=e.value||e.placeholder||"";var u,d=void 0,h=void 0,f=r.scrollHeight;if("border-box"===l?f+=a:"content-box"===l&&(f-=s),null!==n||null!==i){r.value=" ";var p=r.scrollHeight-s;null!==n&&(d=p*n,"border-box"===l&&(d=d+s+a),f=Math.max(d,f)),null!==i&&(h=p*i,"border-box"===l&&(h=h+s+a),u=f>h?"":"hidden",f=Math.min(h,f))}var m={height:f,overflowY:u,resize:"none"};return d&&(m.minHeight=d),h&&(m.maxHeight=h),m}(N.current,!1,j,P);H(2),q(e)}else!function(){try{if(document.activeElement===N.current){var e=N.current,t=e.selectionStart,n=e.selectionEnd,r=e.scrollTop;N.current.setSelectionRange(t,n),N.current.scrollTop=r}}catch(e){}}()}),[z]);var K=v.useRef(),Y=function(){b.Z.cancel(K.current)};v.useEffect((function(){return Y}),[]);var X=B?G:null,J=(0,s.Z)((0,s.Z)({},S),X);return 0!==z&&1!==z||(J.overflowY="hidden",J.overflowX="hidden"),v.createElement(y.Z,{onResize:function(e){2===z&&(null==p||p(e),f&&(Y(),K.current=(0,b.Z)((function(){V()}))))},disabled:!(f||p)},v.createElement("textarea",(0,i.Z)({},L,{ref:N,style:J,className:d()(a,w,(0,o.Z)({},"".concat(a,"-disabled"),E)),disabled:E,value:D,onChange:function(e){I(e.target.value),null==T||T(e)}})))})),T=E,L=["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"],A=v.forwardRef((function(e,t){var n,r=e.defaultValue,u=e.value,g=e.onFocus,y=e.onBlur,_=e.onChange,b=e.allowClear,x=e.maxLength,w=e.onCompositionStart,S=e.onCompositionEnd,C=e.suffix,k=e.prefixCls,E=void 0===k?"rc-textarea":k,A=e.showCount,M=e.count,D=e.className,I=e.style,N=e.disabled,R=e.hidden,O=e.classNames,j=e.styles,P=e.onResize,B=e.onClear,U=e.onPressEnter,F=e.readOnly,z=e.autoSize,H=e.onKeyDown,Z=(0,c.Z)(e,L),W=(0,m.Z)(r,{value:u,defaultValue:r}),G=(0,l.Z)(W,2),q=G[0],V=G[1],K=null==q?"":String(q),Y=v.useState(!1),X=(0,l.Z)(Y,2),J=X[0],Q=X[1],$=v.useRef(!1),ee=v.useState(null),te=(0,l.Z)(ee,2),ne=te[0],re=te[1],ie=(0,v.useRef)(null),oe=(0,v.useRef)(null),se=function(){var e;return null===(e=oe.current)||void 0===e?void 0:e.textArea},ae=function(){se().focus()};(0,v.useImperativeHandle)(t,(function(){var e;return{resizableTextArea:oe.current,focus:ae,blur:function(){se().blur()},nativeElement:(null===(e=ie.current)||void 0===e?void 0:e.nativeElement)||se()}})),(0,v.useEffect)((function(){Q((function(e){return!N&&e}))}),[N]);var le=v.useState(null),ce=(0,l.Z)(le,2),ue=ce[0],de=ce[1];v.useEffect((function(){var e;ue&&(e=se()).setSelectionRange.apply(e,(0,a.Z)(ue))}),[ue]);var he,fe=(0,f.Z)(M,A),pe=null!==(n=fe.max)&&void 0!==n?n:x,me=Number(pe)>0,ve=fe.strategy(K),ge=!!pe&&ve>pe,ye=function(e,t){var n=t;!$.current&&fe.exceedFormatter&&fe.max&&fe.strategy(t)>fe.max&&t!==(n=fe.exceedFormatter(t,{max:fe.max}))&&de([se().selectionStart||0,se().selectionEnd||0]),V(n),(0,p.rJ)(e.currentTarget,e,_,n)},_e=C;fe.show&&(he=fe.showFormatter?fe.showFormatter({value:K,count:ve,maxLength:pe}):"".concat(ve).concat(me?" / ".concat(pe):""),_e=v.createElement(v.Fragment,null,_e,v.createElement("span",{className:d()("".concat(E,"-data-count"),null==O?void 0:O.count),style:null==j?void 0:j.count},he)));var be=!z&&!A&&!b;return v.createElement(h.BaseInput,{ref:ie,value:K,allowClear:b,handleReset:function(e){V(""),ae(),(0,p.rJ)(se(),e,_)},suffix:_e,prefixCls:E,classNames:(0,s.Z)((0,s.Z)({},O),{},{affixWrapper:d()(null==O?void 0:O.affixWrapper,(0,o.Z)((0,o.Z)({},"".concat(E,"-show-count"),A),"".concat(E,"-textarea-allow-clear"),b))}),disabled:N,focused:J,className:d()(D,ge&&"".concat(E,"-out-of-range")),style:(0,s.Z)((0,s.Z)({},I),ne&&!be?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof he?he:void 0}},hidden:R,readOnly:F,onClear:B},v.createElement(T,(0,i.Z)({},Z,{autoSize:z,maxLength:x,onKeyDown:function(e){"Enter"===e.key&&U&&U(e),null==H||H(e)},onChange:function(e){ye(e,e.target.value)},onFocus:function(e){Q(!0),null==g||g(e)},onBlur:function(e){Q(!1),null==y||y(e)},onCompositionStart:function(e){$.current=!0,null==w||w(e)},onCompositionEnd:function(e){$.current=!1,ye(e,e.currentTarget.value),null==S||S(e)},className:d()(null==O?void 0:O.textarea),style:(0,s.Z)((0,s.Z)({},null==j?void 0:j.textarea),{},{resize:null==I?void 0:I.resize}),disabled:N,prefixCls:E,onResize:function(e){var t;null==P||P(e),null!==(t=se())&&void 0!==t&&t.style.height&&re(!0)},ref:oe,readOnly:F})))}))},639:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(54476),i=n(20068),o=n(33885),s=n(42978),a=n(75931),l=n(59301),c=n(92310),u=n.n(c),d=n(26112),h=n(30699),f=function(e){for(var t=e.prefixCls,n=e.level,r=e.isStart,o=e.isEnd,s="".concat(t,"-indent-unit"),a=[],c=0;c<n;c+=1)a.push(l.createElement("span",{key:c,className:u()(s,(0,i.Z)((0,i.Z)({},"".concat(s,"-start"),r[c]),"".concat(s,"-end"),o[c]))}));return l.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},a)},p=l.memo(f),m=n(65065),v=n(34061),g=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],y="open",_="close",b=function(e){var t,n,c,f=e.eventKey,b=e.className,x=e.style,w=e.dragOver,S=e.dragOverGapTop,C=e.dragOverGapBottom,k=e.isLeaf,E=e.isStart,T=e.isEnd,L=e.expanded,A=e.selected,M=e.checked,D=e.halfChecked,I=e.loading,N=e.domRef,R=e.active,O=e.data,j=e.onMouseMove,P=e.selectable,B=(0,a.Z)(e,g),U=l.useContext(h.k),F=l.useContext(h.y),z=l.useRef(null),H=l.useState(!1),Z=(0,s.Z)(H,2),W=Z[0],G=Z[1],q=!!(U.disabled||e.disabled||null!==(t=F.nodeDisabled)&&void 0!==t&&t.call(F,O)),V=l.useMemo((function(){return!(!U.checkable||!1===e.checkable)&&U.checkable}),[U.checkable,e.checkable]),K=function(t){q||V&&!e.disableCheckbox&&U.onNodeCheck(t,(0,v.F)(e),!M)},Y=l.useMemo((function(){return"boolean"==typeof P?P:U.selectable}),[P,U.selectable]),X=function(t){U.onNodeClick(t,(0,v.F)(e)),Y?function(t){q||U.onNodeSelect(t,(0,v.F)(e))}(t):K(t)},J=function(t){U.onNodeDoubleClick(t,(0,v.F)(e))},Q=function(t){U.onNodeMouseEnter(t,(0,v.F)(e))},$=function(t){U.onNodeMouseLeave(t,(0,v.F)(e))},ee=function(t){U.onNodeContextMenu(t,(0,v.F)(e))},te=l.useMemo((function(){return!(!U.draggable||U.draggable.nodeDraggable&&!U.draggable.nodeDraggable(O))}),[U.draggable,O]),ne=function(t){I||U.onNodeExpand(t,(0,v.F)(e))},re=l.useMemo((function(){var e=((0,m.Z)(U.keyEntities,f)||{}).children;return Boolean((e||[]).length)}),[U.keyEntities,f]),ie=l.useMemo((function(){return!1!==k&&(k||!U.loadData&&!re||U.loadData&&e.loaded&&!re)}),[k,U.loadData,re,e.loaded]);l.useEffect((function(){I||"function"!=typeof U.loadData||!L||ie||e.loaded||U.onNodeLoad((0,v.F)(e))}),[I,U.loadData,U.onNodeLoad,L,ie,e]);var oe=l.useMemo((function(){var e;return null!==(e=U.draggable)&&void 0!==e&&e.icon?l.createElement("span",{className:"".concat(U.prefixCls,"-draggable-icon")},U.draggable.icon):null}),[U.draggable]),se=function(t){var n=e.switcherIcon||U.switcherIcon;return"function"==typeof n?n((0,o.Z)((0,o.Z)({},e),{},{isLeaf:t})):n},ae=l.useMemo((function(){if(!V)return null;var t="boolean"!=typeof V?V:null;return l.createElement("span",{className:u()("".concat(U.prefixCls,"-checkbox"),(0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(U.prefixCls,"-checkbox-checked"),M),"".concat(U.prefixCls,"-checkbox-indeterminate"),!M&&D),"".concat(U.prefixCls,"-checkbox-disabled"),q||e.disableCheckbox)),onClick:K,role:"checkbox","aria-checked":D?"mixed":M,"aria-disabled":q||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[V,M,D,q,e.disableCheckbox,e.title]),le=l.useMemo((function(){return ie?null:L?y:_}),[ie,L]),ce=l.useMemo((function(){return l.createElement("span",{className:u()("".concat(U.prefixCls,"-iconEle"),"".concat(U.prefixCls,"-icon__").concat(le||"docu"),(0,i.Z)({},"".concat(U.prefixCls,"-icon_loading"),I))})}),[U.prefixCls,le,I]),ue=l.useMemo((function(){var t=Boolean(U.draggable);return!e.disabled&&t&&U.dragOverNodeKey===f?U.dropIndicatorRender({dropPosition:U.dropPosition,dropLevelOffset:U.dropLevelOffset,indent:U.indent,prefixCls:U.prefixCls,direction:U.direction}):null}),[U.dropPosition,U.dropLevelOffset,U.indent,U.prefixCls,U.direction,U.draggable,U.dragOverNodeKey,U.dropIndicatorRender]),de=l.useMemo((function(){var t,n,r=e.title,o=void 0===r?"---":r,s="".concat(U.prefixCls,"-node-content-wrapper");if(U.showIcon){var a=e.icon||U.icon;t=a?l.createElement("span",{className:u()("".concat(U.prefixCls,"-iconEle"),"".concat(U.prefixCls,"-icon__customize"))},"function"==typeof a?a(e):a):ce}else U.loadData&&I&&(t=ce);return n="function"==typeof o?o(O):U.titleRender?U.titleRender(O):o,l.createElement("span",{ref:z,title:"string"==typeof o?o:"",className:u()(s,"".concat(s,"-").concat(le||"normal"),(0,i.Z)({},"".concat(U.prefixCls,"-node-selected"),!q&&(A||W))),onMouseEnter:Q,onMouseLeave:$,onContextMenu:ee,onClick:X,onDoubleClick:J},t,l.createElement("span",{className:"".concat(U.prefixCls,"-title")},n),ue)}),[U.prefixCls,U.showIcon,e,U.icon,ce,U.titleRender,O,le,Q,$,ee,X,J]),he=(0,d.Z)(B,{aria:!0,data:!0}),fe=((0,m.Z)(U.keyEntities,f)||{}).level,pe=T[T.length-1],me=!q&&te,ve=U.draggingNodeKey===f,ge=void 0!==P?{"aria-selected":!!P}:void 0;return l.createElement("div",(0,r.Z)({ref:N,role:"treeitem","aria-expanded":k?void 0:L,className:u()(b,"".concat(U.prefixCls,"-treenode"),(c={},(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)(c,"".concat(U.prefixCls,"-treenode-disabled"),q),"".concat(U.prefixCls,"-treenode-switcher-").concat(L?"open":"close"),!k),"".concat(U.prefixCls,"-treenode-checkbox-checked"),M),"".concat(U.prefixCls,"-treenode-checkbox-indeterminate"),D),"".concat(U.prefixCls,"-treenode-selected"),A),"".concat(U.prefixCls,"-treenode-loading"),I),"".concat(U.prefixCls,"-treenode-active"),R),"".concat(U.prefixCls,"-treenode-leaf-last"),pe),"".concat(U.prefixCls,"-treenode-draggable"),te),"dragging",ve),(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)(c,"drop-target",U.dropTargetKey===f),"drop-container",U.dropContainerKey===f),"drag-over",!q&&w),"drag-over-gap-top",!q&&S),"drag-over-gap-bottom",!q&&C),"filter-node",null===(n=U.filterTreeNode)||void 0===n?void 0:n.call(U,(0,v.F)(e))),"".concat(U.prefixCls,"-treenode-leaf"),ie))),style:x,draggable:me,onDragStart:me?function(t){t.stopPropagation(),G(!0),U.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:te?function(t){t.preventDefault(),t.stopPropagation(),U.onNodeDragEnter(t,e)}:void 0,onDragOver:te?function(t){t.preventDefault(),t.stopPropagation(),U.onNodeDragOver(t,e)}:void 0,onDragLeave:te?function(t){t.stopPropagation(),U.onNodeDragLeave(t,e)}:void 0,onDrop:te?function(t){t.preventDefault(),t.stopPropagation(),G(!1),U.onNodeDrop(t,e)}:void 0,onDragEnd:te?function(t){t.stopPropagation(),G(!1),U.onNodeDragEnd(t,e)}:void 0,onMouseMove:j},ge,he),l.createElement(p,{prefixCls:U.prefixCls,level:fe,isStart:E,isEnd:T}),oe,function(){if(ie){var e=se(!0);return!1!==e?l.createElement("span",{className:u()("".concat(U.prefixCls,"-switcher"),"".concat(U.prefixCls,"-switcher-noop"))},e):null}var t=se(!1);return!1!==t?l.createElement("span",{onClick:ne,className:u()("".concat(U.prefixCls,"-switcher"),"".concat(U.prefixCls,"-switcher_").concat(L?y:_))},t):null}(),ae,de)};b.isTreeNode=1;var x=b},30699:function(e,t,n){"use strict";n.d(t,{k:function(){return i},y:function(){return o}});var r=n(59301),i=r.createContext(null),o=r.createContext({})},3741:function(e,t,n){"use strict";n.d(t,{OF:function(){return T.Z},y6:function(){return _.y},ZP:function(){return K}});var r=n(54476),i=n(76190),o=n(33885),s=n(94480),a=n(67732),l=n(83652),c=n(31226),u=n(42403),d=n(158),h=n(20068),f=n(92310),p=n.n(f),m=n(10228),v=n(26112),g=n(48736),y=n(59301),_=n(30699);var b=function(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,i={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:i.top=0,i.left=-n*r;break;case 1:i.bottom=0,i.left=-n*r;break;case 0:i.bottom=0,i.left=r}return y.createElement("div",{style:i})};function x(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var w=n(42978),S=n(75931),C=n(34280),k=n(48911),E=n(77900),T=n(639);var L=function(e,t){var n=y.useState(!1),r=(0,w.Z)(n,2),i=r[0],o=r[1];(0,C.Z)((function(){if(i)return e(),function(){t()}}),[i]),(0,C.Z)((function(){return o(!0),function(){o(!1)}}),[])},A=n(34061),M=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"];var D=y.forwardRef((function(e,t){var n=e.className,i=e.style,o=e.motion,s=e.motionNodes,a=e.motionType,l=e.onMotionStart,c=e.onMotionEnd,u=e.active,d=e.treeNodeRequiredProps,h=(0,S.Z)(e,M),f=y.useState(!0),m=(0,w.Z)(f,2),v=m[0],g=m[1],b=y.useContext(_.k).prefixCls,k=s&&"hide"!==a;(0,C.Z)((function(){s&&k!==v&&g(k)}),[s]);var D=y.useRef(!1),I=function(){s&&!D.current&&(D.current=!0,c())};L((function(){s&&l()}),I);return s?y.createElement(E.default,(0,r.Z)({ref:t,visible:v},o,{motionAppear:"show"===a,onVisibleChanged:function(e){k===e&&I()}}),(function(e,t){var n=e.className,i=e.style;return y.createElement("div",{ref:t,className:p()("".concat(b,"-treenode-motion"),n),style:i},s.map((function(e){var t=Object.assign({},(x(e.data),e.data)),n=e.title,i=e.key,o=e.isStart,s=e.isEnd;delete t.children;var a=(0,A.H8)(i,d);return y.createElement(T.Z,(0,r.Z)({},t,a,{title:n,active:u,data:e.data,key:i,isStart:o,isEnd:s}))})))})):y.createElement(T.Z,(0,r.Z)({domRef:t,className:n,style:i},h,{active:u}))}));function I(e,t,n){var r=e.findIndex((function(e){return e.key===n})),i=e[r+1],o=t.findIndex((function(e){return e.key===n}));if(i){var s=t.findIndex((function(e){return e.key===i.key}));return t.slice(o+1,s)}return t.slice(o+1)}var N=["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"],R={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},O=function(){},j="RC_TREE_MOTION_".concat(Math.random()),P={key:j},B={key:j,level:0,index:0,pos:"0",node:P,nodes:[P]},U={parent:null,children:[],pos:B.pos,data:P,title:null,key:j,isStart:[],isEnd:[]};function F(e,t,n,r){return!1!==t&&n?e.slice(0,Math.ceil(n/r)+1):e}function z(e){var t=e.key,n=e.pos;return(0,A.km)(t,n)}var H=y.forwardRef((function(e,t){var n=e.prefixCls,i=e.data,o=(e.selectable,e.checkable,e.expandedKeys),s=e.selectedKeys,a=e.checkedKeys,l=e.loadedKeys,c=e.loadingKeys,u=e.halfCheckedKeys,d=e.keyEntities,h=e.disabled,f=e.dragging,p=e.dragOverNodeKey,m=e.dropPosition,v=e.motion,g=e.height,_=e.itemHeight,b=e.virtual,E=e.scrollWidth,T=e.focusable,L=e.activeItem,M=e.focused,P=e.tabIndex,B=e.onKeyDown,H=e.onFocus,Z=e.onBlur,W=e.onActiveChange,G=e.onListChangeStart,q=e.onListChangeEnd,V=(0,S.Z)(e,N),K=y.useRef(null),Y=y.useRef(null);y.useImperativeHandle(t,(function(){return{scrollTo:function(e){K.current.scrollTo(e)},getIndentWidth:function(){return Y.current.offsetWidth}}}));var X=y.useState(o),J=(0,w.Z)(X,2),Q=J[0],$=J[1],ee=y.useState(i),te=(0,w.Z)(ee,2),ne=te[0],re=te[1],ie=y.useState(i),oe=(0,w.Z)(ie,2),se=oe[0],ae=oe[1],le=y.useState([]),ce=(0,w.Z)(le,2),ue=ce[0],de=ce[1],he=y.useState(null),fe=(0,w.Z)(he,2),pe=fe[0],me=fe[1],ve=y.useRef(i);function ge(){var e=ve.current;re(e),ae(e),de([]),me(null),q()}ve.current=i,(0,C.Z)((function(){$(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,r=t.length;if(1!==Math.abs(n-r))return{add:!1,key:null};function i(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var r=t.filter((function(e){return!n.has(e)}));return 1===r.length?r[0]:null}return n<r?{add:!0,key:i(e,t)}:{add:!1,key:i(t,e)}}(Q,o);if(null!==e.key)if(e.add){var t=ne.findIndex((function(t){return t.key===e.key})),n=F(I(ne,i,e.key),b,g,_),r=ne.slice();r.splice(t+1,0,U),ae(r),de(n),me("show")}else{var s=i.findIndex((function(t){return t.key===e.key})),a=F(I(i,ne,e.key),b,g,_),l=i.slice();l.splice(s+1,0,U),ae(l),de(a),me("hide")}else ne!==i&&(re(i),ae(i))}),[o,i]),y.useEffect((function(){f||ge()}),[f]);var ye=v?se:i,_e={expandedKeys:o,selectedKeys:s,loadedKeys:l,loadingKeys:c,checkedKeys:a,halfCheckedKeys:u,dragOverNodeKey:p,dropPosition:m,keyEntities:d};return y.createElement(y.Fragment,null,M&&L&&y.createElement("span",{style:R,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(L)),y.createElement("div",null,y.createElement("input",{style:R,disabled:!1===T||h,tabIndex:!1!==T?P:null,onKeyDown:B,onFocus:H,onBlur:Z,value:"",onChange:O,"aria-label":"for screen reader"})),y.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},y.createElement("div",{className:"".concat(n,"-indent")},y.createElement("div",{ref:Y,className:"".concat(n,"-indent-unit")}))),y.createElement(k.Z,(0,r.Z)({},V,{data:ye,itemKey:z,height:g,fullHeight:!1,virtual:b,itemHeight:_,scrollWidth:E,prefixCls:"".concat(n,"-list"),ref:K,role:"tree",onVisibleChange:function(e){e.every((function(e){return z(e)!==j}))&&ge()}}),(function(e){var t=e.pos,n=Object.assign({},(x(e.data),e.data)),i=e.title,o=e.key,s=e.isStart,a=e.isEnd,l=(0,A.km)(o,t);delete n.key,delete n.children;var c=(0,A.H8)(l,_e);return y.createElement(D,(0,r.Z)({},n,c,{title:i,active:!!L&&o===L.key,pos:t,data:e.data,isStart:s,isEnd:a,motion:v,motionNodes:o===j?ue:null,motionType:pe,onMotionStart:G,onMotionEnd:ge,treeNodeRequiredProps:_e,onMouseMove:function(){W(null)}}))})))}));var Z=H,W=n(82661),G=n(34643),q=n(65065),V=function(e){(0,u.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return e=t.call.apply(t,[this].concat(i)),(0,h.Z)((0,c.Z)(e),"destroyed",!1),(0,h.Z)((0,c.Z)(e),"delayedDragEnterLogic",void 0),(0,h.Z)((0,c.Z)(e),"loadingRetryTimes",{}),(0,h.Z)((0,c.Z)(e),"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,A.w$)()}),(0,h.Z)((0,c.Z)(e),"dragStartMousePosition",null),(0,h.Z)((0,c.Z)(e),"dragNodeProps",null),(0,h.Z)((0,c.Z)(e),"currentMouseOverDroppableNodeKey",null),(0,h.Z)((0,c.Z)(e),"listRef",y.createRef()),(0,h.Z)((0,c.Z)(e),"onNodeDragStart",(function(t,n){var r=e.state,i=r.expandedKeys,o=r.keyEntities,s=e.props.onDragStart,a=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var l=(0,W._5)(i,a);e.setState({draggingNodeKey:a,dragChildrenKeys:(0,W.wA)(a,o),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(l),window.addEventListener("dragend",e.onWindowDragEnd),null==s||s({event:t,node:(0,A.F)(n)})})),(0,h.Z)((0,c.Z)(e),"onNodeDragEnter",(function(t,n){var r=e.state,i=r.expandedKeys,o=r.keyEntities,a=r.dragChildrenKeys,l=r.flattenNodes,c=r.indent,u=e.props,d=u.onDragEnter,h=u.onExpand,f=u.allowDrop,p=u.direction,m=n.pos,v=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==v&&(e.currentMouseOverDroppableNodeKey=v),e.dragNodeProps){var g=(0,W.OM)(t,e.dragNodeProps,n,c,e.dragStartMousePosition,f,l,o,i,p),y=g.dropPosition,_=g.dropLevelOffset,b=g.dropTargetKey,x=g.dropContainerKey,w=g.dropTargetPos,S=g.dropAllowed,C=g.dragOverNodeKey;!a.includes(b)&&S?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var r=(0,s.Z)(i),a=(0,q.Z)(o,n.eventKey);a&&(a.children||[]).length&&(r=(0,W.L0)(i,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(r),null==h||h(r,{node:(0,A.F)(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==b||0!==_?(e.setState({dragOverNodeKey:C,dropPosition:y,dropLevelOffset:_,dropTargetKey:b,dropContainerKey:x,dropTargetPos:w,dropAllowed:S}),null==d||d({event:t,node:(0,A.F)(n),expandedKeys:i})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),(0,h.Z)((0,c.Z)(e),"onNodeDragOver",(function(t,n){var r=e.state,i=r.dragChildrenKeys,o=r.flattenNodes,s=r.keyEntities,a=r.expandedKeys,l=r.indent,c=e.props,u=c.onDragOver,d=c.allowDrop,h=c.direction;if(e.dragNodeProps){var f=(0,W.OM)(t,e.dragNodeProps,n,l,e.dragStartMousePosition,d,o,s,a,h),p=f.dropPosition,m=f.dropLevelOffset,v=f.dropTargetKey,g=f.dropContainerKey,y=f.dropTargetPos,_=f.dropAllowed,b=f.dragOverNodeKey;!i.includes(v)&&_&&(e.dragNodeProps.eventKey===v&&0===m?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():p===e.state.dropPosition&&m===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&g===e.state.dropContainerKey&&y===e.state.dropTargetPos&&_===e.state.dropAllowed&&b===e.state.dragOverNodeKey||e.setState({dropPosition:p,dropLevelOffset:m,dropTargetKey:v,dropContainerKey:g,dropTargetPos:y,dropAllowed:_,dragOverNodeKey:b}),null==u||u({event:t,node:(0,A.F)(n)}))}})),(0,h.Z)((0,c.Z)(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var r=e.props.onDragLeave;null==r||r({event:t,node:(0,A.F)(n)})})),(0,h.Z)((0,c.Z)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,h.Z)((0,c.Z)(e),"onNodeDragEnd",(function(t,n){var r=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==r||r({event:t,node:(0,A.F)(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,h.Z)((0,c.Z)(e),"onNodeDrop",(function(t,n){var r,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=e.state,a=s.dragChildrenKeys,l=s.dropPosition,c=s.dropTargetKey,u=s.dropTargetPos,d=s.dropAllowed;if(d){var h=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==c){var f=(0,o.Z)((0,o.Z)({},(0,A.H8)(c,e.getTreeNodeRequiredProps())),{},{active:(null===(r=e.getActiveItem())||void 0===r?void 0:r.key)===c,data:(0,q.Z)(e.state.keyEntities,c).node}),p=a.includes(c);(0,g.ZP)(!p,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var m=(0,W.yx)(u),v={event:t,node:(0,A.F)(f),dragNode:e.dragNodeProps?(0,A.F)(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(a),dropToGap:0!==l,dropPosition:l+Number(m[m.length-1])};i||null==h||h(v),e.dragNodeProps=null}}})),(0,h.Z)((0,c.Z)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),(0,h.Z)((0,c.Z)(e),"triggerExpandActionExpand",(function(t,n){var r=e.state,i=r.expandedKeys,s=r.flattenNodes,a=n.expanded,l=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var c=s.filter((function(e){return e.key===l}))[0],u=(0,A.F)((0,o.Z)((0,o.Z)({},(0,A.H8)(l,e.getTreeNodeRequiredProps())),{},{data:c.data}));e.setExpandedKeys(a?(0,W._5)(i,l):(0,W.L0)(i,l)),e.onNodeExpand(t,u)}})),(0,h.Z)((0,c.Z)(e),"onNodeClick",(function(t,n){var r=e.props,i=r.onClick;"click"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==i||i(t,n)})),(0,h.Z)((0,c.Z)(e),"onNodeDoubleClick",(function(t,n){var r=e.props,i=r.onDoubleClick;"doubleClick"===r.expandAction&&e.triggerExpandActionExpand(t,n),null==i||i(t,n)})),(0,h.Z)((0,c.Z)(e),"onNodeSelect",(function(t,n){var r=e.state.selectedKeys,i=e.state,o=i.keyEntities,s=i.fieldNames,a=e.props,l=a.onSelect,c=a.multiple,u=n.selected,d=n[s.key],h=!u,f=(r=h?c?(0,W.L0)(r,d):[d]:(0,W._5)(r,d)).map((function(e){var t=(0,q.Z)(o,e);return t?t.node:null})).filter(Boolean);e.setUncontrolledState({selectedKeys:r}),null==l||l(r,{event:"select",selected:h,node:n,selectedNodes:f,nativeEvent:t.nativeEvent})})),(0,h.Z)((0,c.Z)(e),"onNodeCheck",(function(t,n,r){var i,o=e.state,a=o.keyEntities,l=o.checkedKeys,c=o.halfCheckedKeys,u=e.props,d=u.checkStrictly,h=u.onCheck,f=n.key,p={event:"check",node:n,checked:r,nativeEvent:t.nativeEvent};if(d){var m=r?(0,W.L0)(l,f):(0,W._5)(l,f);i={checked:m,halfChecked:(0,W._5)(c,f)},p.checkedNodes=m.map((function(e){return(0,q.Z)(a,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:m})}else{var v=(0,G.S)([].concat((0,s.Z)(l),[f]),!0,a),g=v.checkedKeys,y=v.halfCheckedKeys;if(!r){var _=new Set(g);_.delete(f);var b=(0,G.S)(Array.from(_),{checked:!1,halfCheckedKeys:y},a);g=b.checkedKeys,y=b.halfCheckedKeys}i=g,p.checkedNodes=[],p.checkedNodesPositions=[],p.halfCheckedKeys=y,g.forEach((function(e){var t=(0,q.Z)(a,e);if(t){var n=t.node,r=t.pos;p.checkedNodes.push(n),p.checkedNodesPositions.push({node:n,pos:r})}})),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:y})}null==h||h(i,p)})),(0,h.Z)((0,c.Z)(e),"onNodeLoad",(function(t){var n,r=t.key,i=e.state.keyEntities,o=(0,q.Z)(i,r);if(null==o||null===(n=o.children)||void 0===n||!n.length){var s=new Promise((function(n,i){e.setState((function(o){var s=o.loadedKeys,a=void 0===s?[]:s,l=o.loadingKeys,c=void 0===l?[]:l,u=e.props,d=u.loadData,h=u.onLoad;return!d||a.includes(r)||c.includes(r)?null:(d(t).then((function(){var i=e.state.loadedKeys,o=(0,W.L0)(i,r);null==h||h(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState((function(e){return{loadingKeys:(0,W._5)(e.loadingKeys,r)}})),n()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:(0,W._5)(e.loadingKeys,r)}})),e.loadingRetryTimes[r]=(e.loadingRetryTimes[r]||0)+1,e.loadingRetryTimes[r]>=10){var o=e.state.loadedKeys;(0,g.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,W.L0)(o,r)}),n()}i(t)})),{loadingKeys:(0,W.L0)(c,r)})}))}));return s.catch((function(){})),s}})),(0,h.Z)((0,c.Z)(e),"onNodeMouseEnter",(function(t,n){var r=e.props.onMouseEnter;null==r||r({event:t,node:n})})),(0,h.Z)((0,c.Z)(e),"onNodeMouseLeave",(function(t,n){var r=e.props.onMouseLeave;null==r||r({event:t,node:n})})),(0,h.Z)((0,c.Z)(e),"onNodeContextMenu",(function(t,n){var r=e.props.onRightClick;r&&(t.preventDefault(),r({event:t,node:n}))})),(0,h.Z)((0,c.Z)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t||t.apply(void 0,r)})),(0,h.Z)((0,c.Z)(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];null==t||t.apply(void 0,r)})),(0,h.Z)((0,c.Z)(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),(0,h.Z)((0,c.Z)(e),"setExpandedKeys",(function(t){var n=e.state,r=n.treeData,i=n.fieldNames,o=(0,A.oH)(r,t,i);e.setUncontrolledState({expandedKeys:t,flattenNodes:o},!0)})),(0,h.Z)((0,c.Z)(e),"onNodeExpand",(function(t,n){var r=e.state.expandedKeys,i=e.state,o=i.listChanging,s=i.fieldNames,a=e.props,l=a.onExpand,c=a.loadData,u=n.expanded,d=n[s.key];if(!o){var h=r.includes(d),f=!u;if((0,g.ZP)(u&&h||!u&&!h,"Expand state not sync with index check"),r=f?(0,W.L0)(r,d):(0,W._5)(r,d),e.setExpandedKeys(r),null==l||l(r,{node:n,expanded:f,nativeEvent:t.nativeEvent}),f&&c){var p=e.onNodeLoad(n);p&&p.then((function(){var t=(0,A.oH)(e.state.treeData,r,s);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=e.state.expandedKeys,n=(0,W._5)(t,d);e.setExpandedKeys(n)}))}}})),(0,h.Z)((0,c.Z)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),(0,h.Z)((0,c.Z)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),(0,h.Z)((0,c.Z)(e),"onActiveChange",(function(t){var n=e.state.activeKey,r=e.props,i=r.onActiveChange,o=r.itemScrollOffset,s=void 0===o?0:o;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:s}),null==i||i(t))})),(0,h.Z)((0,c.Z)(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,r=t.flattenNodes;return null===n?null:r.find((function(e){return e.key===n}))||null})),(0,h.Z)((0,c.Z)(e),"offsetActiveKey",(function(t){var n=e.state,r=n.flattenNodes,i=n.activeKey,o=r.findIndex((function(e){return e.key===i}));-1===o&&t<0&&(o=r.length);var s=r[o=(o+t+r.length)%r.length];if(s){var a=s.key;e.onActiveChange(a)}else e.onActiveChange(null)})),(0,h.Z)((0,c.Z)(e),"onKeyDown",(function(t){var n=e.state,r=n.activeKey,i=n.expandedKeys,s=n.checkedKeys,a=n.fieldNames,l=e.props,c=l.onKeyDown,u=l.checkable,d=l.selectable;switch(t.which){case m.Z.UP:e.offsetActiveKey(-1),t.preventDefault();break;case m.Z.DOWN:e.offsetActiveKey(1),t.preventDefault()}var h=e.getActiveItem();if(h&&h.data){var f=e.getTreeNodeRequiredProps(),p=!1===h.data.isLeaf||!!(h.data[a.children]||[]).length,v=(0,A.F)((0,o.Z)((0,o.Z)({},(0,A.H8)(r,f)),{},{data:h.data,active:!0}));switch(t.which){case m.Z.LEFT:p&&i.includes(r)?e.onNodeExpand({},v):h.parent&&e.onActiveChange(h.parent.key),t.preventDefault();break;case m.Z.RIGHT:p&&!i.includes(r)?e.onNodeExpand({},v):h.children&&h.children.length&&e.onActiveChange(h.children[0].key),t.preventDefault();break;case m.Z.ENTER:case m.Z.SPACE:!u||v.disabled||!1===v.checkable||v.disableCheckbox?u||!d||v.disabled||!1===v.selectable||e.onNodeSelect({},v):e.onNodeCheck({},v,!s.includes(r))}}null==c||c(t)})),(0,h.Z)((0,c.Z)(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var i=!1,s=!0,a={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?s=!1:(i=!0,a[n]=t[n])})),!i||n&&!s||e.setState((0,o.Z)((0,o.Z)({},a),r))}})),(0,h.Z)((0,c.Z)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return(0,l.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,r=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:r}))}},{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 e,t=this.state,n=t.focused,o=t.flattenNodes,s=t.keyEntities,a=t.draggingNodeKey,l=t.activeKey,c=t.dropLevelOffset,u=t.dropContainerKey,d=t.dropTargetKey,f=t.dropPosition,m=t.dragOverNodeKey,g=t.indent,b=this.props,x=b.prefixCls,w=b.className,S=b.style,C=b.showLine,k=b.focusable,E=b.tabIndex,T=void 0===E?0:E,L=b.selectable,A=b.showIcon,M=b.icon,D=b.switcherIcon,I=b.draggable,N=b.checkable,R=b.checkStrictly,O=b.disabled,j=b.motion,P=b.loadData,B=b.filterTreeNode,U=b.height,F=b.itemHeight,z=b.scrollWidth,H=b.virtual,W=b.titleRender,G=b.dropIndicatorRender,q=b.onContextMenu,V=b.onScroll,K=b.direction,Y=b.rootClassName,X=b.rootStyle,J=(0,v.Z)(this.props,{aria:!0,data:!0});I&&(e="object"===(0,i.Z)(I)?I:"function"==typeof I?{nodeDraggable:I}:{});var Q={prefixCls:x,selectable:L,showIcon:A,icon:M,switcherIcon:D,draggable:e,draggingNodeKey:a,checkable:N,checkStrictly:R,disabled:O,keyEntities:s,dropLevelOffset:c,dropContainerKey:u,dropTargetKey:d,dropPosition:f,dragOverNodeKey:m,indent:g,direction:K,dropIndicatorRender:G,loadData:P,filterTreeNode:B,titleRender:W,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 y.createElement(_.k.Provider,{value:Q},y.createElement("div",{className:p()(x,w,Y,(0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(x,"-show-line"),C),"".concat(x,"-focused"),n),"".concat(x,"-active-focused"),null!==l)),style:X},y.createElement(Z,(0,r.Z)({ref:this.listRef,prefixCls:x,style:S,data:o,disabled:O,selectable:L,checkable:!!N,motion:j,dragging:null!==a,height:U,itemHeight:F,virtual:H,focusable:k,focused:n,tabIndex:T,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:q,onScroll:V,scrollWidth:z},this.getTreeNodeRequiredProps(),J))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,r=t.prevProps,i={prevProps:e};function s(t){return!r&&e.hasOwnProperty(t)||r&&r[t]!==e[t]}var a=t.fieldNames;if(s("fieldNames")&&(a=(0,A.w$)(e.fieldNames),i.fieldNames=a),s("treeData")?n=e.treeData:s("children")&&((0,g.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=(0,A.zn)(e.children)),n){i.treeData=n;var l=(0,A.I8)(n,{fieldNames:a});i.keyEntities=(0,o.Z)((0,h.Z)({},j,B),l.keyEntities)}var c,u=i.keyEntities||t.keyEntities;if(s("expandedKeys")||r&&s("autoExpandParent"))i.expandedKeys=e.autoExpandParent||!r&&e.defaultExpandParent?(0,W.r7)(e.expandedKeys,u):e.expandedKeys;else if(!r&&e.defaultExpandAll){var d=(0,o.Z)({},u);delete d[j];var f=[];Object.keys(d).forEach((function(e){var t=d[e];t.children&&t.children.length&&f.push(t.key)})),i.expandedKeys=f}else!r&&e.defaultExpandedKeys&&(i.expandedKeys=e.autoExpandParent||e.defaultExpandParent?(0,W.r7)(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,n||i.expandedKeys){var p=(0,A.oH)(n||t.treeData,i.expandedKeys||t.expandedKeys,a);i.flattenNodes=p}if((e.selectable&&(s("selectedKeys")?i.selectedKeys=(0,W.BT)(e.selectedKeys,e):!r&&e.defaultSelectedKeys&&(i.selectedKeys=(0,W.BT)(e.defaultSelectedKeys,e))),e.checkable)&&(s("checkedKeys")?c=(0,W.E6)(e.checkedKeys)||{}:!r&&e.defaultCheckedKeys?c=(0,W.E6)(e.defaultCheckedKeys)||{}:n&&(c=(0,W.E6)(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var m=c,v=m.checkedKeys,y=void 0===v?[]:v,_=m.halfCheckedKeys,b=void 0===_?[]:_;if(!e.checkStrictly){var x=(0,G.S)(y,!0,u);y=x.checkedKeys,b=x.halfCheckedKeys}i.checkedKeys=y,i.halfCheckedKeys=b}return s("loadedKeys")&&(i.loadedKeys=e.loadedKeys),i}}]),n}(y.Component);(0,h.Z)(V,"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:b,allowDrop:function(){return!0},expandAction:!1}),(0,h.Z)(V,"TreeNode",T.Z);var K=V},82661:function(e,t,n){"use strict";n.d(t,{BT:function(){return f},E6:function(){return p},L0:function(){return l},OM:function(){return h},_5:function(){return a},r7:function(){return m},wA:function(){return u},yx:function(){return c}});var r=n(94480),i=n(76190),o=n(48736),s=(n(59301),n(639),n(65065));n(34061);function a(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function l(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function c(e){return e.split("-")}function u(e,t){var n=[];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var r=t.key,i=t.children;n.push(r),e(i)}))}((0,s.Z)(t,e).children),n}function d(e){if(e.parent){var t=c(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function h(e,t,n,r,i,o,a,l,u,h){var f,p=e.clientX,m=e.clientY,v=e.target.getBoundingClientRect(),g=v.top,y=v.height,_=(("rtl"===h?-1:1)*(((null==i?void 0:i.x)||0)-p)-12)/r,b=u.filter((function(e){var t;return null===(t=l[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),x=(0,s.Z)(l,n.eventKey);if(m<g+y/2){var w=a.findIndex((function(e){return e.key===x.key})),S=a[w<=0?0:w-1].key;x=(0,s.Z)(l,S)}var C=x.key,k=x,E=x.key,T=0,L=0;if(!b.includes(C))for(var A=0;A<_&&d(x);A+=1)x=x.parent,L+=1;var M,D=t.data,I=x.node,N=!0;return M=c(x.pos),0===Number(M[M.length-1])&&0===x.level&&m<g+y/2&&o({dragNode:D,dropNode:I,dropPosition:-1})&&x.key===n.eventKey?T=-1:(k.children||[]).length&&b.includes(E)?o({dragNode:D,dropNode:I,dropPosition:0})?T=0:N=!1:0===L?_>-1.5?o({dragNode:D,dropNode:I,dropPosition:1})?T=1:N=!1:o({dragNode:D,dropNode:I,dropPosition:0})?T=0:o({dragNode:D,dropNode:I,dropPosition:1})?T=1:N=!1:o({dragNode:D,dropNode:I,dropPosition:1})?T=1:N=!1,{dropPosition:T,dropLevelOffset:L,dropTargetKey:x.key,dropTargetPos:x.pos,dragOverNodeKey:E,dropContainerKey:0===T?null:(null===(f=x.parent)||void 0===f?void 0:f.key)||null,dropAllowed:N}}function f(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function p(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,i.Z)(e))return(0,o.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;function i(e){if(!n.has(e)){var r=(0,s.Z)(t,e);if(r){n.add(e);var o=r.parent;r.node.disabled||o&&i(o.key)}}}return(e||[]).forEach((function(e){i(e)})),(0,r.Z)(n)}},34643:function(e,t,n){"use strict";n.d(t,{S:function(){return a}});var r=n(48736),i=n(65065);function o(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function s(e){var t=e||{},n=t.disabled,r=t.disableCheckbox,i=t.checkable;return!(!n&&!r)||!1===i}function a(e,t,n,a){var l,c=[];l=a||s;var u,d=new Set(e.filter((function(e){var t=!!(0,i.Z)(n,e);return t||c.push(e),t}))),h=new Map,f=0;return Object.keys(n).forEach((function(e){var t=n[e],r=t.level,i=h.get(r);i||(i=new Set,h.set(r,i)),i.add(t),f=Math.max(f,r)})),(0,r.ZP)(!c.length,"Tree missing follow keys: ".concat(c.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),u=!0===t?function(e,t,n,r){for(var i=new Set(e),s=new Set,a=0;a<=n;a+=1)(t.get(a)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,s=void 0===o?[]:o;i.has(t)&&!r(n)&&s.filter((function(e){return!r(e.node)})).forEach((function(e){i.add(e.key)}))}));for(var l=new Set,c=n;c>=0;c-=1)(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!l.has(e.parent.key))if(r(e.parent.node))l.add(t.key);else{var o=!0,a=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=i.has(t);o&&!n&&(o=!1),a||!n&&!s.has(t)||(a=!0)})),o&&i.add(t.key),a&&s.add(t.key),l.add(t.key)}}));return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(o(s,i))}}(d,h,f,l):function(e,t,n,r,i){for(var s=new Set(e),a=new Set(t),l=0;l<=r;l+=1)(n.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,r=e.children,o=void 0===r?[]:r;s.has(t)||a.has(t)||i(n)||o.filter((function(e){return!i(e.node)})).forEach((function(e){s.delete(e.key)}))}));a=new Set;for(var c=new Set,u=r;u>=0;u-=1)(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!c.has(e.parent.key))if(i(e.parent.node))c.add(t.key);else{var r=!0,o=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=s.has(t);r&&!n&&(r=!1),o||!n&&!a.has(t)||(o=!0)})),r||s.delete(t.key),o&&a.add(t.key),c.add(t.key)}}));return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(o(a,s))}}(d,t.halfCheckedKeys,h,f,l),u}},65065:function(e,t,n){"use strict";function r(e,t){return e[t]}n.d(t,{Z:function(){return r}})},34061:function(e,t,n){"use strict";n.d(t,{F:function(){return b},H8:function(){return _},I8:function(){return y},km:function(){return f},oH:function(){return v},w$:function(){return p},zn:function(){return m}});var r=n(76190),i=n(94480),o=n(33885),s=n(75931),a=n(11592),l=n(2738),c=n(48736),u=n(65065),d=["children"];function h(e,t){return"".concat(e,"-").concat(t)}function f(e,t){return null!=e?e:t}function p(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function m(e){return function e(t){return(0,a.Z)(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return(0,c.ZP)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,r=t.props,i=r.children,a=(0,s.Z)(r,d),l=(0,o.Z)({key:n},a),u=e(i);return u.length&&(l.children=u),l})).filter((function(e){return e}))}(e)}function v(e,t,n){var r=p(n),o=r._title,s=r.key,a=r.children,c=new Set(!0===t?[]:t),u=[];return function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(d,p){for(var m,v=h(r?r.pos:"0",p),g=f(d[s],v),y=0;y<o.length;y+=1){var _=o[y];if(void 0!==d[_]){m=d[_];break}}var b=Object.assign((0,l.Z)(d,[].concat((0,i.Z)(o),[s,a])),{title:m,key:g,parent:r,pos:v,children:null,data:d,isStart:[].concat((0,i.Z)(r?r.isStart:[]),[0===p]),isEnd:[].concat((0,i.Z)(r?r.isEnd:[]),[p===n.length-1])});return u.push(b),!0===t||c.has(g)?b.children=e(d[a]||[],b):b.children=[],b}))}(e),u}function g(e,t,n){var o,s=("object"===(0,r.Z)(n)?n:{externalGetKey:n})||{},a=s.childrenPropName,l=s.externalGetKey,c=p(s.fieldNames),u=c.key,d=c.children,m=a||d;l?"string"==typeof l?o=function(e){return e[l]}:"function"==typeof l&&(o=function(e){return l(e)}):o=function(e,t){return f(e[u],t)},function n(r,s,a,l){var c=r?r[m]:e,u=r?h(a.pos,s):"0",d=r?[].concat((0,i.Z)(l),[r]):[];if(r){var f=o(r,u),p={node:r,index:s,pos:u,key:f,parentPos:a.node?a.pos:null,level:a.level+1,nodes:d};t(p)}c&&c.forEach((function(e,t){n(e,t,{node:r,pos:u,level:a?a.level+1:-1},d)}))}(null)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,i=t.onProcessFinished,o=t.externalGetKey,s=t.childrenPropName,a=t.fieldNames,l=arguments.length>2?arguments[2]:void 0,c=o||l,u={},d={},h={posEntities:u,keyEntities:d};return n&&(h=n(h)||h),g(e,(function(e){var t=e.node,n=e.index,i=e.pos,o=e.key,s=e.parentPos,a=e.level,l={node:t,nodes:e.nodes,index:n,key:o,pos:i,level:a},c=f(o,i);u[i]=l,d[c]=l,l.parent=u[s],l.parent&&(l.parent.children=l.parent.children||[],l.parent.children.push(l)),r&&r(l,h)}),{externalGetKey:c,childrenPropName:s,fieldNames:a}),i&&i(h),h}function _(e,t){var n=t.expandedKeys,r=t.selectedKeys,i=t.loadedKeys,o=t.loadingKeys,s=t.checkedKeys,a=t.halfCheckedKeys,l=t.dragOverNodeKey,c=t.dropPosition,d=t.keyEntities,h=(0,u.Z)(d,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==r.indexOf(e),loaded:-1!==i.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==s.indexOf(e),halfChecked:-1!==a.indexOf(e),pos:String(h?h.pos:""),dragOver:l===e&&0===c,dragOverGapTop:l===e&&-1===c,dragOverGapBottom:l===e&&1===c}}function b(e){var t=e.data,n=e.expanded,r=e.selected,i=e.checked,s=e.loaded,a=e.loading,l=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,h=e.dragOverGapBottom,f=e.pos,p=e.active,m=e.eventKey,v=(0,o.Z)((0,o.Z)({},t),{},{expanded:n,selected:r,checked:i,loaded:s,loading:a,halfChecked:l,dragOver:u,dragOverGapTop:d,dragOverGapBottom:h,pos:f,active:p,key:m});return"props"in v||Object.defineProperty(v,"props",{get:function(){return(0,c.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}},8224:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4676);function i(e,t,n,i){var o=r.unstable_batchedUpdates?function(e){r.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,o,i),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,o,i)}}}},24514:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var r=n(47273),i=function(e){if((0,r.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};function o(e,t){return Array.isArray(e)||void 0===t?i(e):function(e,t){if(!i(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r}(e,t)}},48911:function(e,t,n){"use strict";n.d(t,{Z:function(){return B}});var r=n(54476),i=n(76190),o=n(33885),s=n(20068),a=n(42978),l=n(75931),c=n(92310),u=n.n(c),d=n(29301),h=n(70425),f=n(34280),p=n(59301),m=n(4676),v=p.forwardRef((function(e,t){var n=e.height,i=e.offsetY,a=e.offsetX,l=e.children,c=e.prefixCls,h=e.onInnerResize,f=e.innerProps,m=e.rtl,v=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==i&&(g={height:n,position:"relative",overflow:"hidden"},y=(0,o.Z)((0,o.Z)({},y),{},(0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)((0,s.Z)({transform:"translateY(".concat(i,"px)")},m?"marginRight":"marginLeft",-a),"position","absolute"),"left",0),"right",0),"top",0))),p.createElement("div",{style:g},p.createElement(d.Z,{onResize:function(e){e.offsetHeight&&h&&h()}},p.createElement("div",(0,r.Z)({style:y,className:u()((0,s.Z)({},"".concat(c,"-holder-inner"),c)),ref:t},f),l,v)))}));v.displayName="Filler";var g=v;function y(e){var t=e.children,n=e.setRef,r=p.useCallback((function(e){n(e)}),[]);return p.cloneElement(t,{ref:r})}function _(e,t,n){var r=p.useState(e),i=(0,a.Z)(r,2),o=i[0],s=i[1],l=p.useState(null),c=(0,a.Z)(l,2),u=c[0],d=c[1];return p.useEffect((function(){var r=function(e,t,n){var r,i,o=e.length,s=t.length;if(0===o&&0===s)return null;o<s?(r=e,i=t):(r=t,i=e);var a={__EMPTY_ITEM__:!0};function l(e){return void 0!==e?n(e):a}for(var c=null,u=1!==Math.abs(o-s),d=0;d<i.length;d+=1){var h=l(r[d]);if(h!==l(i[d])){c=d,u=u||h!==l(i[d+1]);break}}return null===c?null:{index:c,multiple:u}}(o||[],e||[],t);void 0!==(null==r?void 0:r.index)&&(null==n||n(r.index),d(e[r.index])),s(e)}),[e]),[u]}var b=n(16089),x="object"===("undefined"==typeof navigator?"undefined":(0,i.Z)(navigator))&&/Firefox/i.test(navigator.userAgent),w=function(e,t,n,r){var i=(0,p.useRef)(!1),o=(0,p.useRef)(null);function s(){clearTimeout(o.current),i.current=!0,o.current=setTimeout((function(){i.current=!1}),50)}var a=(0,p.useRef)({top:e,bottom:t,left:n,right:r});return a.current.top=e,a.current.bottom=t,a.current.left=n,a.current.right=r,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e?t<0&&a.current.left||t>0&&a.current.right:t<0&&a.current.top||t>0&&a.current.bottom;return n&&r?(clearTimeout(o.current),i.current=!1):r&&!i.current||s(),!i.current&&r}};function S(e,t,n,r,i,o,s){var a=(0,p.useRef)(0),l=(0,p.useRef)(null),c=(0,p.useRef)(null),u=(0,p.useRef)(!1),d=w(t,n,r,i);var h=(0,p.useRef)(null),f=(0,p.useRef)(null);return[function(t){if(e){b.Z.cancel(f.current),f.current=(0,b.Z)((function(){h.current=null}),2);var n=t.deltaX,r=t.deltaY,i=t.shiftKey,p=n,m=r;("sx"===h.current||!h.current&&i&&r&&!n)&&(p=r,m=0,h.current="sx");var v=Math.abs(p),g=Math.abs(m);null===h.current&&(h.current=o&&v>g?"x":"y"),"y"===h.current?function(e,t){if(b.Z.cancel(l.current),!d(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,a.current+=t,c.current=t,x||n.preventDefault(),l.current=(0,b.Z)((function(){var e=u.current?10:1;s(a.current*e,!1),a.current=0})))}}(t,m):function(e,t){s(t,!0),x||e.preventDefault()}(t,p)}},function(t){e&&(u.current=t.detail===c.current)}]}var C=n(67732),k=n(83652),E=function(){function e(){(0,C.Z)(this,e),(0,s.Z)(this,"maps",void 0),(0,s.Z)(this,"id",0),(0,s.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,k.Z)(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function T(e){var t=parseFloat(e);return isNaN(t)?0:t}var L=14/15;function A(e){return Math.floor(Math.pow(e,.5))}function M(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var D=p.forwardRef((function(e,t){var n=e.prefixCls,r=e.rtl,i=e.scrollOffset,l=e.scrollRange,c=e.onStartMove,d=e.onStopMove,h=e.onScroll,f=e.horizontal,m=e.spinSize,v=e.containerSize,g=e.style,y=e.thumbStyle,_=e.showScrollBar,x=p.useState(!1),w=(0,a.Z)(x,2),S=w[0],C=w[1],k=p.useState(null),E=(0,a.Z)(k,2),T=E[0],L=E[1],A=p.useState(null),D=(0,a.Z)(A,2),I=D[0],N=D[1],R=!r,O=p.useRef(),j=p.useRef(),P=p.useState(_),B=(0,a.Z)(P,2),U=B[0],F=B[1],z=p.useRef(),H=function(){!0!==_&&!1!==_&&(clearTimeout(z.current),F(!0),z.current=setTimeout((function(){F(!1)}),3e3))},Z=l-v||0,W=v-m||0,G=p.useMemo((function(){return 0===i||0===Z?0:i/Z*W}),[i,Z,W]),q=p.useRef({top:G,dragging:S,pageY:T,startTop:I});q.current={top:G,dragging:S,pageY:T,startTop:I};var V=function(e){C(!0),L(M(e,f)),N(q.current.top),c(),e.stopPropagation(),e.preventDefault()};p.useEffect((function(){var e=function(e){e.preventDefault()},t=O.current,n=j.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",V,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",V)}}),[]);var K=p.useRef();K.current=Z;var Y=p.useRef();Y.current=W,p.useEffect((function(){if(S){var e,t=function(t){var n=q.current,r=n.dragging,i=n.pageY,o=n.startTop;b.Z.cancel(e);var s=O.current.getBoundingClientRect(),a=v/(f?s.width:s.height);if(r){var l=(M(t,f)-i)*a,c=o;!R&&f?c-=l:c+=l;var u=K.current,d=Y.current,p=d?c/d:0,m=Math.ceil(p*u);m=Math.max(m,0),m=Math.min(m,u),e=(0,b.Z)((function(){h(m,f)}))}},n=function(){C(!1),d()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),b.Z.cancel(e)}}}),[S]),p.useEffect((function(){return H(),function(){clearTimeout(z.current)}}),[i]),p.useImperativeHandle(t,(function(){return{delayHidden:H}}));var X="".concat(n,"-scrollbar"),J={position:"absolute",visibility:U?null:"hidden"},Q={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return f?(Object.assign(J,{height:8,left:0,right:0,bottom:0}),Object.assign(Q,(0,s.Z)({height:"100%",width:m},R?"left":"right",G))):(Object.assign(J,(0,s.Z)({width:8,top:0,bottom:0},R?"right":"left",0)),Object.assign(Q,{width:"100%",height:m,top:G})),p.createElement("div",{ref:O,className:u()(X,(0,s.Z)((0,s.Z)((0,s.Z)({},"".concat(X,"-horizontal"),f),"".concat(X,"-vertical"),!f),"".concat(X,"-visible"),U)),style:(0,o.Z)((0,o.Z)({},J),g),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:H},p.createElement("div",{ref:j,className:u()("".concat(X,"-thumb"),(0,s.Z)({},"".concat(X,"-thumb-moving"),S)),style:(0,o.Z)((0,o.Z)({},Q),y),onMouseDown:V}))}));function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,20),Math.floor(n)}var N=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],R=[],O={overflowY:"auto",overflowAnchor:"none"};function j(e,t){var n=e.prefixCls,c=void 0===n?"rc-virtual-list":n,v=e.className,x=e.height,C=e.itemHeight,k=e.fullHeight,j=void 0===k||k,P=e.style,B=e.data,U=e.children,F=e.itemKey,z=e.virtual,H=e.direction,Z=e.scrollWidth,W=e.component,G=void 0===W?"div":W,q=e.onScroll,V=e.onVirtualScroll,K=e.onVisibleChange,Y=e.innerProps,X=e.extraRender,J=e.styles,Q=e.showScrollBar,$=void 0===Q?"optional":Q,ee=(0,l.Z)(e,N),te=p.useCallback((function(e){return"function"==typeof F?F(e):null==e?void 0:e[F]}),[F]),ne=function(e,t,n){var r=p.useState(0),i=(0,a.Z)(r,2),o=i[0],s=i[1],l=(0,p.useRef)(new Map),c=(0,p.useRef)(new E),u=(0,p.useRef)(0);function d(){u.current+=1}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){var e=!1;l.current.forEach((function(t,n){if(t&&t.offsetParent){var r=t.offsetHeight,i=getComputedStyle(t),o=i.marginTop,s=i.marginBottom,a=r+T(o)+T(s);c.current.get(n)!==a&&(c.current.set(n,a),e=!0)}})),e&&s((function(e){return e+1}))};if(e)t();else{u.current+=1;var n=u.current;Promise.resolve().then((function(){n===u.current&&t()}))}}return(0,p.useEffect)((function(){return d}),[]),[function(r,i){var o=e(r),s=l.current.get(o);i?(l.current.set(o,i),h()):l.current.delete(o),!s!=!i&&(i?null==t||t(r):null==n||n(r))},h,c.current,o]}(te,null,null),re=(0,a.Z)(ne,4),ie=re[0],oe=re[1],se=re[2],ae=re[3],le=!(!1===z||!x||!C),ce=p.useMemo((function(){return Object.values(se.maps).reduce((function(e,t){return e+t}),0)}),[se.id,se.maps]),ue=le&&B&&(Math.max(C*B.length,ce)>x||!!Z),de="rtl"===H,he=u()(c,(0,s.Z)({},"".concat(c,"-rtl"),de),v),fe=B||R,pe=(0,p.useRef)(),me=(0,p.useRef)(),ve=(0,p.useRef)(),ge=(0,p.useState)(0),ye=(0,a.Z)(ge,2),_e=ye[0],be=ye[1],xe=(0,p.useState)(0),we=(0,a.Z)(xe,2),Se=we[0],Ce=we[1],ke=(0,p.useState)(!1),Ee=(0,a.Z)(ke,2),Te=Ee[0],Le=Ee[1],Ae=function(){Le(!0)},Me=function(){Le(!1)},De={getKey:te};function Ie(e){be((function(t){var n=function(e){var t=e;Number.isNaN(Je.current)||(t=Math.min(t,Je.current));return t=Math.max(t,0),t}("function"==typeof e?e(t):e);return pe.current.scrollTop=n,n}))}var Ne=(0,p.useRef)({start:0,end:fe.length}),Re=(0,p.useRef)(),Oe=_(fe,te),je=(0,a.Z)(Oe,1)[0];Re.current=je;var Pe=p.useMemo((function(){if(!le)return{scrollHeight:void 0,start:0,end:fe.length-1,offset:void 0};var e;if(!ue)return{scrollHeight:(null===(e=me.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:fe.length-1,offset:void 0};for(var t,n,r,i=0,o=fe.length,s=0;s<o;s+=1){var a=fe[s],l=te(a),c=se.get(l),u=i+(void 0===c?C:c);u>=_e&&void 0===t&&(t=s,n=i),u>_e+x&&void 0===r&&(r=s),i=u}return void 0===t&&(t=0,n=0,r=Math.ceil(x/C)),void 0===r&&(r=fe.length-1),{scrollHeight:i,start:t,end:r=Math.min(r+1,fe.length-1),offset:n}}),[ue,le,_e,fe,ae,x]),Be=Pe.scrollHeight,Ue=Pe.start,Fe=Pe.end,ze=Pe.offset;Ne.current.start=Ue,Ne.current.end=Fe,p.useLayoutEffect((function(){var e=se.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),r=fe[Ue];if(r&&void 0===n)if(te(r)===t){var i=se.get(t)-C;Ie((function(e){return e+i}))}}se.resetRecord()}),[Be]);var He=p.useState({width:0,height:x}),Ze=(0,a.Z)(He,2),We=Ze[0],Ge=Ze[1],qe=(0,p.useRef)(),Ve=(0,p.useRef)(),Ke=p.useMemo((function(){return I(We.width,Z)}),[We.width,Z]),Ye=p.useMemo((function(){return I(We.height,Be)}),[We.height,Be]),Xe=Be-x,Je=(0,p.useRef)(Xe);Je.current=Xe;var Qe=_e<=0,$e=_e>=Xe,et=Se<=0,tt=Se>=Z,nt=w(Qe,$e,et,tt),rt=function(){return{x:de?-Se:Se,y:_e}},it=(0,p.useRef)(rt()),ot=(0,h.zX)((function(e){if(V){var t=(0,o.Z)((0,o.Z)({},rt()),e);it.current.x===t.x&&it.current.y===t.y||(V(t),it.current=t)}}));function st(e,t){var n=e;t?((0,m.flushSync)((function(){Ce(n)})),ot()):Ie(n)}var at=function(e){var t=e,n=Z?Z-We.width:0;return t=Math.max(t,0),t=Math.min(t,n)},lt=(0,h.zX)((function(e,t){t?((0,m.flushSync)((function(){Ce((function(t){return at(t+(de?-e:e))}))})),ot()):Ie((function(t){return t+e}))})),ct=S(le,Qe,$e,et,tt,!!Z,lt),ut=(0,a.Z)(ct,2),dt=ut[0],ht=ut[1];!function(e,t,n){var r,i=(0,p.useRef)(!1),o=(0,p.useRef)(0),s=(0,p.useRef)(0),a=(0,p.useRef)(null),l=(0,p.useRef)(null),c=function(e){if(i.current){var t=Math.ceil(e.touches[0].pageX),r=Math.ceil(e.touches[0].pageY),a=o.current-t,c=s.current-r,u=Math.abs(a)>Math.abs(c);u?o.current=t:s.current=r;var d=n(u,u?a:c,!1,e);d&&e.preventDefault(),clearInterval(l.current),d&&(l.current=setInterval((function(){u?a*=L:c*=L;var e=Math.floor(u?a:c);(!n(u,e,!0)||Math.abs(e)<=.1)&&clearInterval(l.current)}),16))}},u=function(){i.current=!1,r()},d=function(e){r(),1!==e.touches.length||i.current||(i.current=!0,o.current=Math.ceil(e.touches[0].pageX),s.current=Math.ceil(e.touches[0].pageY),a.current=e.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};r=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},(0,f.Z)((function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),r(),clearInterval(l.current)}}),[e])}(le,pe,(function(e,t,n,r){var i=r;return!nt(e,t,n)&&((!i||!i._virtualHandled)&&(i&&(i._virtualHandled=!0),dt({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),!0))})),function(e,t,n){p.useEffect((function(){var r=t.current;if(e&&r){var i,o,s=!1,a=function(){b.Z.cancel(i)},l=function e(){a(),i=(0,b.Z)((function(){n(o),e()}))},c=function(){s=!1,a()},u=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,s=!0)}},d=function(e){if(s){var t=M(e,!1),n=r.getBoundingClientRect(),i=n.top,c=n.bottom;t<=i?(o=-A(i-t),l()):t>=c?(o=A(t-c),l()):a()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",d),r.ownerDocument.addEventListener("dragend",c),function(){r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",d),r.ownerDocument.removeEventListener("dragend",c),a()}}}),[e])}(ue,pe,(function(e){Ie((function(t){return t+e}))})),(0,f.Z)((function(){function e(e){var t=Qe&&e.detail<0,n=$e&&e.detail>0;!le||t||n||e.preventDefault()}var t=pe.current;return t.addEventListener("wheel",dt,{passive:!1}),t.addEventListener("DOMMouseScroll",ht,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",dt),t.removeEventListener("DOMMouseScroll",ht),t.removeEventListener("MozMousePixelScroll",e)}}),[le,Qe,$e]),(0,f.Z)((function(){if(Z){var e=at(Se);Ce(e),ot({x:e})}}),[We.width,Z]);var ft=function(){var e,t;null===(e=qe.current)||void 0===e||e.delayHidden(),null===(t=Ve.current)||void 0===t||t.delayHidden()},pt=function(e,t,n,r,s,l,c,u){var d=p.useRef(),h=p.useState(null),m=(0,a.Z)(h,2),v=m[0],g=m[1];return(0,f.Z)((function(){if(v&&v.times<10){if(!e.current)return void g((function(e){return(0,o.Z)({},e)}));l();var i=v.targetAlign,a=v.originAlign,u=v.index,d=v.offset,h=e.current.clientHeight,f=!1,p=i,m=null;if(h){for(var y=i||a,_=0,b=0,x=0,w=Math.min(t.length-1,u),S=0;S<=w;S+=1){var C=s(t[S]);b=_;var k=n.get(C);_=x=b+(void 0===k?r:k)}for(var E="top"===y?d:h-d,T=w;T>=0;T-=1){var L=s(t[T]),A=n.get(L);if(void 0===A){f=!0;break}if((E-=A)<=0)break}switch(y){case"top":m=b-d;break;case"bottom":m=x-h+d;break;default:var M=e.current.scrollTop;b<M?p="top":x>M+h&&(p="bottom")}null!==m&&c(m),m!==v.lastTop&&(f=!0)}f&&g((0,o.Z)((0,o.Z)({},v),{},{times:v.times+1,targetAlign:p,lastTop:m}))}}),[v,e.current]),function(e){if(null!=e){if(b.Z.cancel(d.current),"number"==typeof e)c(e);else if(e&&"object"===(0,i.Z)(e)){var n,r=e.align;n="index"in e?e.index:t.findIndex((function(t){return s(t)===e.key}));var o=e.offset;g({times:0,index:n,offset:void 0===o?0:o,originAlign:r})}}else u()}}(pe,fe,se,C,te,(function(){return oe(!0)}),Ie,ft);p.useImperativeHandle(t,(function(){return{nativeElement:ve.current,getScrollInfo:rt,scrollTo:function(e){!function(e){return e&&"object"===(0,i.Z)(e)&&("left"in e||"top"in e)}(e)?pt(e):(void 0!==e.left&&Ce(at(e.left)),pt(e.top))}}})),(0,f.Z)((function(){if(K){var e=fe.slice(Ue,Fe+1);K(e,fe)}}),[Ue,Fe,fe]);var mt=function(e,t,n,r){var i=p.useMemo((function(){return[new Map,[]]}),[e,n.id,r]),o=(0,a.Z)(i,2),s=o[0],l=o[1];return function(i){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,a=s.get(i),c=s.get(o);if(void 0===a||void 0===c)for(var u=e.length,d=l.length;d<u;d+=1){var h,f=e[d],p=t(f);s.set(p,d);var m=null!==(h=n.get(p))&&void 0!==h?h:r;if(l[d]=(l[d-1]||0)+m,p===i&&(a=d),p===o&&(c=d),void 0!==a&&void 0!==c)break}return{top:l[a-1]||0,bottom:l[c]}}}(fe,te,se,C),vt=null==X?void 0:X({start:Ue,end:Fe,virtual:ue,offsetX:Se,offsetY:ze,rtl:de,getSize:mt}),gt=function(e,t,n,r,i,o,s,a){var l=a.getKey;return e.slice(t,n+1).map((function(e,n){var a=s(e,t+n,{style:{width:r},offsetX:i}),c=l(e);return p.createElement(y,{key:c,setRef:function(t){return o(e,t)}},a)}))}(fe,Ue,Fe,Z,Se,ie,U,De),yt=null;x&&(yt=(0,o.Z)((0,s.Z)({},j?"height":"maxHeight",x),O),le&&(yt.overflowY="hidden",Z&&(yt.overflowX="hidden"),Te&&(yt.pointerEvents="none")));var _t={};return de&&(_t.dir="rtl"),p.createElement("div",(0,r.Z)({ref:ve,style:(0,o.Z)((0,o.Z)({},P),{},{position:"relative"}),className:he},_t,ee),p.createElement(d.Z,{onResize:function(e){Ge({width:e.offsetWidth,height:e.offsetHeight})}},p.createElement(G,{className:"".concat(c,"-holder"),style:yt,ref:pe,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==_e&&Ie(t),null==q||q(e),ot()},onMouseEnter:ft},p.createElement(g,{prefixCls:c,height:Be,offsetX:Se,offsetY:ze,scrollWidth:Z,onInnerResize:oe,ref:me,innerProps:Y,rtl:de,extra:vt},gt))),ue&&Be>x&&p.createElement(D,{ref:qe,prefixCls:c,scrollOffset:_e,scrollRange:Be,rtl:de,onScroll:st,onStartMove:Ae,onStopMove:Me,spinSize:Ye,containerSize:We.height,style:null==J?void 0:J.verticalScrollBar,thumbStyle:null==J?void 0:J.verticalScrollBarThumb,showScrollBar:$}),ue&&Z>We.width&&p.createElement(D,{ref:Ve,prefixCls:c,scrollOffset:Se,scrollRange:Z,rtl:de,onScroll:st,onStartMove:Ae,onStopMove:Me,spinSize:Ke,containerSize:We.width,horizontal:!0,style:null==J?void 0:J.horizontalScrollBar,thumbStyle:null==J?void 0:J.horizontalScrollBarThumb,showScrollBar:$}))}var P=p.forwardRef(j);P.displayName="List";var B=P},7062:function(e,t,n){var r=n(19637),i=n(13412),o=[n(96627)];e.exports=r.createStore(i,o)},96627:function(e,t,n){e.exports=function(){return n(42424),{}}},42424:function(){"object"!=typeof JSON&&(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,gap,indent,meta,rep;function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,(function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function str(e,t){var n,r,i,o,s,a=gap,l=t[e];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(e)),"function"==typeof rep&&(l=rep.call(t,e,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,s=[],"[object Array]"===Object.prototype.toString.apply(l)){for(o=l.length,n=0;n<o;n+=1)s[n]=str(n,l)||"null";return i=0===s.length?"[]":gap?"[\n"+gap+s.join(",\n"+gap)+"\n"+a+"]":"["+s.join(",")+"]",gap=a,i}if(rep&&"object"==typeof rep)for(o=rep.length,n=0;n<o;n+=1)"string"==typeof rep[n]&&(i=str(r=rep[n],l))&&s.push(quote(r)+(gap?": ":":")+i);else for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(i=str(r,l))&&s.push(quote(r)+(gap?": ":":")+i);return i=0===s.length?"{}":gap?"{\n"+gap+s.join(",\n"+gap)+"\n"+a+"}":"{"+s.join(",")+"}",gap=a,i}}"function"!=typeof Date.prototype.toJSON&&(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),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){var j;function walk(e,t){var n,r,i=e[t];if(i&&"object"==typeof i)for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(void 0!==(r=walk(i,n))?i[n]=r:delete i[n]);return reviver.call(e,t,i)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,(function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(e,t,n){var r=n(67039),i=r.slice,o=r.pluck,s=r.each,a=r.bind,l=r.create,c=r.isList,u=r.isFunction,d=r.isObject;e.exports={createStore:f};var h={version:"2.0.12",enabled:!1,get:function(e,t){var n=this.storage.read(this._namespacePrefix+e);return this._deserialize(n,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(e){var t=this;this.storage.each((function(n,r){e.call(t,t._deserialize(n),(r||"").replace(t._namespaceRegexp,""))}))},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return f.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return f(this.storage,this.plugins,e)}};function f(e,t,n){n||(n=""),e&&!c(e)&&(e=[e]),t&&!c(t)&&(t=[t]);var r=n?"__storejs_"+n+"_":"",f=n?new RegExp("^"+r):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var p={_namespacePrefix:r,_namespaceRegexp:f,_testStorage:function(e){try{var t="__storejs__test__";e.write(t,t);var n=e.read(t)===t;return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(e,t){var n=this[t];this[t]=function(){var t=i(arguments,0),r=this;function o(){if(n)return s(arguments,(function(e,n){t[n]=e})),n.apply(r,t)}var a=[o].concat(t);return e.apply(r,a)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(e,t){if(!e)return t;var n="";try{n=JSON.parse(e)}catch(t){n=e}return void 0!==n?n:t},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(e){var t=this;if(c(e))s(e,(function(e){t._addPlugin(e)}));else if(!o(this.plugins,(function(t){return e===t}))){if(this.plugins.push(e),!u(e))throw new Error("Plugins must be function values that return objects");var n=e.call(this);if(!d(n))throw new Error("Plugins must return an object of function properties");s(n,(function(n,r){if(!u(n))throw new Error("Bad plugin property: "+r+" from plugin "+e.name+". Plugins should only return functions.");t._assignPluginFnProp(n,r)}))}},addStorage:function(e){!function(){var e="undefined"==typeof console?null:console;if(e){(e.warn?e.warn:e.log).apply(e,arguments)}}("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},m=l(p,h,{plugins:[]});return m.raw={},s(m,(function(e,t){u(e)&&(m.raw[t]=a(m,e))})),s(e,(function(e){m._addStorage(e)})),s(t,(function(e){m._addPlugin(e)})),m}},67039:function(e,t,n){var r=Object.assign?Object.assign:function(e,t,n,r){for(var i=1;i<arguments.length;i++)l(Object(arguments[i]),(function(t,n){e[n]=t}));return e},i=function(){if(Object.create)return function(e,t,n,i){var o=a(arguments,1);return r.apply(this,[Object.create(e)].concat(o))};{function e(){}return function(t,n,i,o){var s=a(arguments,1);return e.prototype=t,r.apply(this,[new e].concat(s))}}}(),o=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},s="undefined"!=typeof window?window:n.g;function a(e,t){return Array.prototype.slice.call(e,t||0)}function l(e,t){c(e,(function(e,n){return t(e,n),!1}))}function c(e,t){if(u(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function u(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}e.exports={assign:r,create:i,trim:o,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:a,each:l,map:function(e,t){var n=u(e)?[]:{};return c(e,(function(e,r){return n[r]=t(e,r),!1})),n},pluck:c,isList:u,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:s}},13412:function(e,t,n){e.exports=[n(52496),n(16436),n(76673),n(35701),n(65578),n(65300)]},35701:function(e,t,n){var r=n(67039),i=r.Global,o=r.trim;e.exports={name:"cookieStorage",read:function(e){if(!e||!c(e))return null;var t="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(s.cookie.replace(new RegExp(t),"$1"))},write:function(e,t){if(!e)return;s.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"},each:a,remove:l,clearAll:function(){a((function(e,t){l(t)}))}};var s=i.document;function a(e){for(var t=s.cookie.split(/; ?/g),n=t.length-1;n>=0;n--)if(o(t[n])){var r=t[n].split("="),i=unescape(r[0]);e(unescape(r[1]),i)}}function l(e){e&&c(e)&&(s.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function c(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(s.cookie)}},52496:function(e,t,n){var r=n(67039).Global;function i(){return r.localStorage}function o(e){return i().getItem(e)}e.exports={name:"localStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},65300:function(e){e.exports={name:"memoryStorage",read:function(e){return t[e]},write:function(e,n){t[e]=n},each:function(e){for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},remove:function(e){delete t[e]},clearAll:function(e){t={}}};var t={}},16436:function(e,t,n){var r=n(67039).Global;e.exports={name:"oldFF-globalStorage",read:function(e){return i[e]},write:function(e,t){i[e]=t},each:o,remove:function(e){return i.removeItem(e)},clearAll:function(){o((function(e,t){delete i[e]}))}};var i=r.globalStorage;function o(e){for(var t=i.length-1;t>=0;t--){var n=i.key(t);e(i[n],n)}}},76673:function(e,t,n){var r=n(67039).Global;e.exports={name:"oldIE-userDataStorage",write:function(e,t){if(a)return;var n=c(e);s((function(e){e.setAttribute(n,t),e.save(i)}))},read:function(e){if(a)return;var t=c(e),n=null;return s((function(e){n=e.getAttribute(t)})),n},each:function(e){s((function(t){for(var n=t.XMLDocument.documentElement.attributes,r=n.length-1;r>=0;r--){var i=n[r];e(t.getAttribute(i.name),i.name)}}))},remove:function(e){var t=c(e);s((function(e){e.removeAttribute(t),e.save(i)}))},clearAll:function(){s((function(e){var t=e.XMLDocument.documentElement.attributes;e.load(i);for(var n=t.length-1;n>=0;n--)e.removeAttribute(t[n].name);e.save(i)}))}};var i="storejs",o=r.document,s=function(){if(!o||!o.documentElement||!o.documentElement.addBehavior)return null;var e,t,n,r="script";try{(t=new ActiveXObject("htmlfile")).open(),t.write("<"+r+">document.w=window</"+r+'><iframe src="/favicon.ico"></iframe>'),t.close(),e=t.w.frames[0].document,n=e.createElement("div")}catch(t){n=o.createElement("div"),e=o.body}return function(t){var r=[].slice.call(arguments,0);r.unshift(n),e.appendChild(n),n.addBehavior("#default#userData"),n.load(i),t.apply(this,r),e.removeChild(n)}}(),a=(r.navigator?r.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);var l=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function c(e){return e.replace(/^\d/,"___$&").replace(l,"___")}},65578:function(e,t,n){var r=n(67039).Global;function i(){return r.sessionStorage}function o(e){return i().getItem(e)}e.exports={name:"sessionStorage",read:o,write:function(e,t){return i().setItem(e,t)},each:function(e){for(var t=i().length-1;t>=0;t--){var n=i().key(t);e(o(n),n)}},remove:function(e){return i().removeItem(e)},clearAll:function(){return i().clear()}}},82059:function(e){var t=arguments[3],n=arguments[4],r=arguments[5],i=JSON.stringify;e.exports=function(e,o){for(var s,a=Object.keys(r),l=0,c=a.length;l<c;l++){var u=a[l],d=r[u].exports;if(d===e||d&&d.default===e){s=u;break}}if(!s){s=Math.floor(Math.pow(16,8)*Math.random()).toString(16);var h={};for(l=0,c=a.length;l<c;l++){h[u=a[l]]=u}n[s]=["function(require,module,exports){"+e+"(self); }",h]}var f=Math.floor(Math.pow(16,8)*Math.random()).toString(16),p={};p[s]=s,n[f]=["function(require,module,exports){var f = require("+i(s)+");(f.default ? f.default : f)(self);}",p];var m={};!function e(t){for(var r in m[t]=!0,n[t][1]){var i=n[t][1][r];m[i]||e(i)}}(f);var v="("+t+")({"+Object.keys(m).map((function(e){return i(e)+":["+n[e][0]+","+i(n[e][1])+"]"})).join(",")+"},{},["+i(f)+"])",g=window.URL||window.webkitURL||window.mozURL||window.msURL,y=new Blob([v],{type:"text/javascript"});if(o&&o.bare)return y;var _=g.createObjectURL(y),b=new Worker(_);return b.objectURL=_,b}},34376:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=34)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0;var r=function(){function e(){this._listeners=[],this._disposed=!1}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){return e._listeners.push(t),{dispose:function(){if(!e._disposed)for(var n=0;n<e._listeners.length;n++)if(e._listeners[n]===t)return void e._listeners.splice(n,1)}}}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e,t){for(var n=[],r=0;r<this._listeners.length;r++)n.push(this._listeners[r]);for(r=0;r<n.length;r++)n[r].call(void 0,e,t)},e.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},e}();t.EventEmitter=r,t.forwardEvent=function(e,t){return e((function(e){return t.fire(e)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IUnicodeService=t.IOptionsService=t.ILogService=t.IInstantiationService=t.IDirtyRowService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;var r=n(14);t.IBufferService=r.createDecorator("BufferService"),t.ICoreMouseService=r.createDecorator("CoreMouseService"),t.ICoreService=r.createDecorator("CoreService"),t.ICharsetService=r.createDecorator("CharsetService"),t.IDirtyRowService=r.createDecorator("DirtyRowService"),t.IInstantiationService=r.createDecorator("InstantiationService"),t.ILogService=r.createDecorator("LogService"),t.IOptionsService=r.createDecorator("OptionsService"),t.IUnicodeService=r.createDecorator("UnicodeService")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.Disposable=void 0;var r=function(){function e(){this._disposables=[],this._isDisposed=!1}return e.prototype.dispose=function(){this._isDisposed=!0;for(var e=0,t=this._disposables;e<t.length;e++)t[e].dispose();this._disposables.length=0},e.prototype.register=function(e){return this._disposables.push(e),e},e.prototype.unregister=function(e){var t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)},e}();function i(e){for(var t=0,n=e;t<n.length;t++)n[t].dispose();e.length=0}t.Disposable=r,t.disposeArray=i,t.getDisposeArrayDisposable=function(e){return{dispose:function(){return i(e)}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;var o=n(8),s=n(3),a=n(6),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.content=0,t.fg=0,t.bg=0,t.extended=new a.ExtendedAttrs,t.combinedData="",t}return i(t,e),t.fromCharData=function(e){var n=new t;return n.setFromCharData(e),n},t.prototype.isCombined=function(){return 2097152&this.content},t.prototype.getWidth=function(){return this.content>>22},t.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?o.stringFromCodePoint(2097151&this.content):""},t.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},t.prototype.setFromCharData=function(e){this.fg=e[s.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(e[s.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[s.CHAR_DATA_CHAR_INDEX].length){var n=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=n&&n<=56319){var r=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=r&&r<=57343?this.content=1024*(n-55296)+r-56320+65536|e[s.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[s.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[s.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[s.CHAR_DATA_WIDTH_INDEX]<<22)},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(a.AttributeData);t.CellData=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ISoundService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;var r=n(14);t.ICharSizeService=r.createDecorator("CharSizeService"),t.ICoreBrowserService=r.createDecorator("CoreBrowserService"),t.IMouseService=r.createDecorator("MouseService"),t.IRenderService=r.createDecorator("RenderService"),t.ISelectionService=r.createDecorator("SelectionService"),t.ISoundService=r.createDecorator("SoundService")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;var r=function(){function e(){this.fg=0,this.bg=0,this.extended=new i}return e.toColorRGB=function(e){return[e>>>16&255,e>>>8&255,255&e]},e.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},e.prototype.clone=function(){var t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t},e.prototype.isInverse=function(){return 67108864&this.fg},e.prototype.isBold=function(){return 134217728&this.fg},e.prototype.isUnderline=function(){return 268435456&this.fg},e.prototype.isBlink=function(){return 536870912&this.fg},e.prototype.isInvisible=function(){return 1073741824&this.fg},e.prototype.isItalic=function(){return 67108864&this.bg},e.prototype.isDim=function(){return 134217728&this.bg},e.prototype.getFgColorMode=function(){return 50331648&this.fg},e.prototype.getBgColorMode=function(){return 50331648&this.bg},e.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},e.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},e.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},e.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},e.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},e.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},e.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},e.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},e.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},e.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},e.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},e.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()},e.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},e.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()},e.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()},e.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()},e.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},e}();t.AttributeData=r;var i=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=-1),this.underlineStyle=e,this.underlineColor=t}return e.prototype.clone=function(){return new e(this.underlineStyle,this.underlineColor)},e.prototype.isEmpty=function(){return 0===this.underlineStyle},e}();t.ExtendedAttrs=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,n,r){e.addEventListener(t,n,r);var i=!1;return{dispose:function(){i||(i=!0,e.removeEventListener(t,n,r))}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=e.length);for(var r="",i=t;i<n;++i){var o=e[i];o>65535?(o-=65536,r+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=function(){function e(){this._interim=0}return e.prototype.clear=function(){this._interim=0},e.prototype.decode=function(e,t){var n=e.length;if(!n)return 0;var r=0,i=0;this._interim&&(56320<=(a=e.charCodeAt(i++))&&a<=57343?t[r++]=1024*(this._interim-55296)+a-56320+65536:(t[r++]=this._interim,t[r++]=a),this._interim=0);for(var o=i;o<n;++o){var s=e.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=n)return this._interim=s,r;var a;56320<=(a=e.charCodeAt(o))&&a<=57343?t[r++]=1024*(s-55296)+a-56320+65536:(t[r++]=s,t[r++]=a)}else t[r++]=s}return r},e}();t.StringToUtf32=r;var i=function(){function e(){this.interim=new Uint8Array(3)}return e.prototype.clear=function(){this.interim.fill(0)},e.prototype.decode=function(e,t){var n=e.length;if(!n)return 0;var r,i,o,s,a=0,l=0,c=0;if(this.interim[0]){var u=!1,d=this.interim[0];d&=192==(224&d)?31:224==(240&d)?15:7;for(var h=0,f=void 0;(f=63&this.interim[++h])&&h<4;)d<<=6,d|=f;for(var p=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,m=p-h;c<m;){if(c>=n)return 0;if(128!=(192&(f=e[c++]))){c--,u=!0;break}this.interim[h++]=f,d<<=6,d|=63&f}u||(2===p?d<128?c--:t[a++]=d:3===p?d<2048||d>=55296&&d<=57343||(t[a++]=d):d<65536||d>1114111||(t[a++]=d)),this.interim.fill(0)}for(var v=n-4,g=c;g<n;){for(;!(!(g<v)||128&(r=e[g])||128&(i=e[g+1])||128&(o=e[g+2])||128&(s=e[g+3]));)t[a++]=r,t[a++]=i,t[a++]=o,t[a++]=s,g+=4;if((r=e[g++])<128)t[a++]=r;else if(192==(224&r)){if(g>=n)return this.interim[0]=r,a;if(128!=(192&(i=e[g++]))){g--;continue}if((l=(31&r)<<6|63&i)<128){g--;continue}t[a++]=l}else if(224==(240&r)){if(g>=n)return this.interim[0]=r,a;if(128!=(192&(i=e[g++]))){g--;continue}if(g>=n)return this.interim[0]=r,this.interim[1]=i,a;if(128!=(192&(o=e[g++]))){g--;continue}if((l=(15&r)<<12|(63&i)<<6|63&o)<2048||l>=55296&&l<=57343)continue;t[a++]=l}else if(240==(248&r)){if(g>=n)return this.interim[0]=r,a;if(128!=(192&(i=e[g++]))){g--;continue}if(g>=n)return this.interim[0]=r,this.interim[1]=i,a;if(128!=(192&(o=e[g++]))){g--;continue}if(g>=n)return this.interim[0]=r,this.interim[1]=i,this.interim[2]=o,a;if(128!=(192&(s=e[g++]))){g--;continue}if((l=(7&r)<<18|(63&i)<<12|(63&o)<<6|63&s)<65536||l>1114111)continue;t[a++]=l}}return a},e}();t.Utf8ToUtf32=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR_ATLAS_CELL_SPACING=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0,t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.CHAR_ATLAS_CELL_SPACING=1},function(e,t,n){"use strict";var r,i,o,s;function a(e){var t=e.toString(16);return t.length<2?"0"+t:t}function l(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=void 0,function(e){e.toCss=function(e,t,n,r){return void 0!==r?"#"+a(e)+a(t)+a(n)+a(r):"#"+a(e)+a(t)+a(n)},e.toRgba=function(e,t,n,r){return void 0===r&&(r=255),(e<<24|t<<16|n<<8|r)>>>0}}(r=t.channels||(t.channels={})),(i=t.color||(t.color={})).blend=function(e,t){var n=(255&t.rgba)/255;if(1===n)return{css:t.css,rgba:t.rgba};var i=t.rgba>>24&255,o=t.rgba>>16&255,s=t.rgba>>8&255,a=e.rgba>>24&255,l=e.rgba>>16&255,c=e.rgba>>8&255,u=a+Math.round((i-a)*n),d=l+Math.round((o-l)*n),h=c+Math.round((s-c)*n);return{css:r.toCss(u,d,h),rgba:r.toRgba(u,d,h)}},i.isOpaque=function(e){return 255==(255&e.rgba)},i.ensureContrastRatio=function(e,t,n){var r=s.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return s.toColor(r>>24&255,r>>16&255,r>>8&255)},i.opaque=function(e){var t=(255|e.rgba)>>>0,n=s.toChannels(t),i=n[0],o=n[1],a=n[2];return{css:r.toCss(i,o,a),rgba:t}},i.opacity=function(e,t){var n=Math.round(255*t),i=s.toChannels(e.rgba),o=i[0],a=i[1],l=i[2];return{css:r.toCss(o,a,l,n),rgba:r.toRgba(o,a,l,n)}},(t.css||(t.css={})).toColor=function(e){switch(e.length){case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(e){function t(e,t,n){var r=e/255,i=t/255,o=n/255;return.2126*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.7152*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(o=t.rgb||(t.rgb={})),function(e){function t(e,t,n){for(var r=e>>24&255,i=e>>16&255,s=e>>8&255,a=t>>24&255,c=t>>16&255,u=t>>8&255,d=l(o.relativeLuminance2(a,u,c),o.relativeLuminance2(r,i,s));d<n&&(a>0||c>0||u>0);)a-=Math.max(0,Math.ceil(.1*a)),c-=Math.max(0,Math.ceil(.1*c)),u-=Math.max(0,Math.ceil(.1*u)),d=l(o.relativeLuminance2(a,u,c),o.relativeLuminance2(r,i,s));return(a<<24|c<<16|u<<8|255)>>>0}function n(e,t,n){for(var r=e>>24&255,i=e>>16&255,s=e>>8&255,a=t>>24&255,c=t>>16&255,u=t>>8&255,d=l(o.relativeLuminance2(a,u,c),o.relativeLuminance2(r,i,s));d<n&&(a<255||c<255||u<255);)a=Math.min(255,a+Math.ceil(.1*(255-a))),c=Math.min(255,c+Math.ceil(.1*(255-c))),u=Math.min(255,u+Math.ceil(.1*(255-u))),d=l(o.relativeLuminance2(a,u,c),o.relativeLuminance2(r,i,s));return(a<<24|c<<16|u<<8|255)>>>0}e.ensureContrastRatio=function(e,r,i){var s=o.relativeLuminance(e>>8),a=o.relativeLuminance(r>>8);if(l(s,a)<i)return a<s?t(e,r,i):n(e,r,i)},e.reduceLuminance=t,e.increaseLuminance=n,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},e.toColor=function(e,t,n){return{css:r.toCss(e,t,n),rgba:r.toRgba(e,t,n)}}}(s=t.rgba||(t.rgba={})),t.toPaddedHex=a,t.contrastRatio=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.isSafari=t.isFirefox=void 0;var r="undefined"==typeof navigator,i=r?"node":navigator.userAgent,o=r?"node":navigator.platform;function s(e,t){return e.indexOf(t)>=0}t.isFirefox=!!~i.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(i),t.isMac=s(["Macintosh","MacIntel","MacPPC","Mac68K"],o),t.isIpad="iPad"===o,t.isIphone="iPhone"===o,t.isWindows=s(["Windows","Win16","Win32","WinCE"],o),t.isLinux=o.indexOf("Linux")>=0},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.C1=t.C0=void 0,function(e){e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""}(t.C0||(t.C0={})),function(e){e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"}(t.C1||(t.C1={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;var r=n(3),i=n(9),o=n(25),s=n(6),a=n(28),l=n(10),c=n(17),u=function(){function e(e,t,n,r,i,o,s,a){this._container=e,this._alpha=r,this._colors=i,this._rendererId=o,this._bufferService=s,this._optionsService=a,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-"+t+"-layer"),this._canvas.style.zIndex=n.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return e.prototype.dispose=function(){var e;c.removeElementFromParent(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},e.prototype._initCanvas=function(){this._ctx=a.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(e,t){},e.prototype.onSelectionChanged=function(e,t,n){void 0===n&&(n=!1)},e.prototype.setColors=function(e){this._refreshCharAtlas(e)},e.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},e.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=o.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},e.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},e.prototype._fillCells=function(e,t,n,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,n*this._scaledCellWidth,r*this._scaledCellHeight)},e.prototype._fillBottomLineAtCells=function(e,t,n){void 0===n&&(n=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,n*this._scaledCellWidth,window.devicePixelRatio)},e.prototype._fillLeftLineAtCell=function(e,t,n){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*n,this._scaledCellHeight)},e.prototype._strokeRectAtCell=function(e,t,n,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,n*this._scaledCellWidth-window.devicePixelRatio,r*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(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,n*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,n*this._scaledCellWidth,r*this._scaledCellHeight))},e.prototype._fillCharTrueColor=function(e,t,n){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(n),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},e.prototype._drawChars=function(e,t,n){var o,s,a=this._getContrastColor(e);a||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,n,a):(e.isInverse()?(o=e.isBgDefault()?i.INVERTED_DEFAULT_COLOR:e.getBgColor(),s=e.isFgDefault()?i.INVERTED_DEFAULT_COLOR:e.getFgColor()):(s=e.isBgDefault()?r.DEFAULT_COLOR:e.getBgColor(),o=e.isFgDefault()?r.DEFAULT_COLOR:e.getFgColor()),o+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&o<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||r.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||r.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=s,this._currentGlyphIdentifier.fg=o,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,n))},e.prototype._drawUncachedChars=function(e,t,n,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse())if(r)this._ctx.fillStyle=r.css;else if(e.isBgDefault())this._ctx.fillStyle=l.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var o=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}else if(r)this._ctx.fillStyle=r.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var a=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&a<8&&(a+=8),this._ctx.fillStyle=this._colors.ansi[a].css}this._clipRow(n),e.isDim()&&(this._ctx.globalAlpha=i.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,n*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},e.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},e.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},e.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var n=e.getFgColor(),r=e.getFgColorMode(),i=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();if(s){var c=n;n=i,i=c;var u=r;r=o,o=u}var d=this._resolveBackgroundRgba(o,i,s),h=this._resolveForegroundRgba(r,n,s,a),f=l.rgba.ensureContrastRatio(d,h,this._optionsService.options.minimumContrastRatio);if(f){var p={css:l.channels.toCss(f>>24&255,f>>16&255,f>>8&255),rgba:f};return this._colors.contrastCache.setColor(e.bg,e.fg,p),p}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},e.prototype._resolveBackgroundRgba=function(e,t,n){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return n?this._colors.foreground.rgba:this._colors.background.rgba}},e.prototype._resolveForegroundRgba=function(e,t,n,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return n?this._colors.background.rgba:this._colors.foreground.rgba}},e}();t.BaseRenderLayer=u},function(e,t,n){"use strict";function r(e,t,n){t.di$target===t?t.di$dependencies.push({id:e,index:n}):(t.di$dependencies=[{id:e,index:n}],t.di$target=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0,t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e.di$dependencies||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var n=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(n,e,i)};return n.toString=function(){return e},t.serviceRegistry.set(e,n),n}},function(e,t,n){"use strict";function r(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=e.length),n>=e.length)return e;n=(e.length+n)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var i=n;i<r;++i)e[i]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.fillFallback=t.fill=void 0,t.fill=function(e,t,n,i){return e.fill?e.fill(t,n,i):r(e,t,n,i)},t.fillFallback=r,t.concat=function(e,t){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;var r=n(8),i=n(3),o=n(4),s=n(6);t.DEFAULT_ATTR_DATA=Object.freeze(new s.AttributeData);var a=function(){function e(e,t,n){void 0===n&&(n=!1),this.isWrapped=n,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);for(var r=t||o.CellData.fromCharData([0,i.NULL_CELL_CHAR,i.NULL_CELL_WIDTH,i.NULL_CELL_CODE]),s=0;s<e;++s)this.setCell(s,r);this.length=e}return e.prototype.get=function(e){var t=this._data[3*e+0],n=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:n?r.stringFromCodePoint(n):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):n]},e.prototype.set=function(e,t){this._data[3*e+1]=t[i.CHAR_DATA_ATTR_INDEX],t[i.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[i.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[i.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[i.CHAR_DATA_WIDTH_INDEX]<<22},e.prototype.getWidth=function(e){return this._data[3*e+0]>>22},e.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},e.prototype.getFg=function(e){return this._data[3*e+1]},e.prototype.getBg=function(e){return this._data[3*e+2]},e.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},e.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},e.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},e.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?r.stringFromCodePoint(2097151&t):""},e.prototype.loadCell=function(e,t){var n=3*e;return t.content=this._data[n+0],t.fg=this._data[n+1],t.bg=this._data[n+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t},e.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},e.prototype.setCellFromCodePoint=function(e,t,n,r,i,o){268435456&i&&(this._extendedAttrs[e]=o),this._data[3*e+0]=t|n<<22,this._data[3*e+1]=r,this._data[3*e+2]=i},e.prototype.addCodepointToCell=function(e,t){var n=this._data[3*e+0];2097152&n?this._combined[e]+=r.stringFromCodePoint(t):(2097151&n?(this._combined[e]=r.stringFromCodePoint(2097151&n)+r.stringFromCodePoint(t),n&=-2097152,n|=2097152):n=t|1<<22,this._data[3*e+0]=n)},e.prototype.insertCells=function(e,t,n,r){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs),t<this.length-e){for(var i=new o.CellData,a=this.length-e-t-1;a>=0;--a)this.setCell(e+t+a,this.loadCell(e+a,i));for(a=0;a<t;++a)this.setCell(e+a,n)}else for(a=e;a<this.length;++a)this.setCell(a,n);2===this.getWidth(this.length-1)&&this.setCellFromCodePoint(this.length-1,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs)},e.prototype.deleteCells=function(e,t,n,r){if(e%=this.length,t<this.length-e){for(var i=new o.CellData,a=0;a<this.length-e-t;++a)this.setCell(e+a,this.loadCell(e+t+a,i));for(a=this.length-t;a<this.length;++a)this.setCell(a,n)}else for(a=e;a<this.length;++a)this.setCell(a,n);e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs)},e.prototype.replaceCells=function(e,t,n,r){for(e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t,0,1,(null==r?void 0:r.fg)||0,(null==r?void 0:r.bg)||0,(null==r?void 0:r.extended)||new s.ExtendedAttrs);e<t&&e<this.length;)this.setCell(e++,n)},e.prototype.resize=function(e,t){if(e!==this.length){if(e>this.length){var n=new Uint32Array(3*e);this.length&&(3*e<this._data.length?n.set(this._data.subarray(0,3*e)):n.set(this._data)),this._data=n;for(var r=this.length;r<e;++r)this.setCell(r,t)}else if(e){(n=new Uint32Array(3*e)).set(this._data.subarray(0,3*e)),this._data=n;var i=Object.keys(this._combined);for(r=0;r<i.length;r++){var o=parseInt(i[r],10);o>=e&&delete this._combined[o]}}else this._data=new Uint32Array(0),this._combined={};this.length=e}},e.prototype.fill=function(e){this._combined={},this._extendedAttrs={};for(var t=0;t<this.length;++t)this.setCell(t,e)},e.prototype.copyFrom=function(e){for(var t in this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={},e._combined)this._combined[t]=e._combined[t];for(var t in this._extendedAttrs={},e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped},e.prototype.clone=function(){var t=new e(0);for(var n in t._data=new Uint32Array(this._data),t.length=this.length,this._combined)t._combined[n]=this._combined[n];for(var n in this._extendedAttrs)t._extendedAttrs[n]=this._extendedAttrs[n];return t.isWrapped=this.isWrapped,t},e.prototype.getTrimmedLength=function(){for(var e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0},e.prototype.copyCellsFrom=function(e,t,n,r,i){var o=e._data;if(i)for(var s=r-1;s>=0;s--)for(var a=0;a<3;a++)this._data[3*(n+s)+a]=o[3*(t+s)+a];else for(s=0;s<r;s++)for(a=0;a<3;a++)this._data[3*(n+s)+a]=o[3*(t+s)+a];var l=Object.keys(e._combined);for(a=0;a<l.length;a++){var c=parseInt(l[a],10);c>=t&&(this._combined[c-t+n]=e._combined[c])}},e.prototype.translateToString=function(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=0),void 0===n&&(n=this.length),e&&(n=Math.min(n,this.getTrimmedLength()));for(var o="";t<n;){var s=this._data[3*t+0],a=2097151&s;o+=2097152&s?this._combined[t]:a?r.stringFromCodePoint(a):i.WHITESPACE_CELL_CHAR,t+=s>>22||1}return o},e}();t.BufferLine=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementFromParent=void 0,t.removeElementFromParent=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o=i[r];null===(e=null==o?void 0:o.parentElement)||void 0===e||e.removeChild(o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;var o,s=n(12),a=n(20),l=n(39),c=n(2),u=n(15),d=n(8),h=n(16),f=n(0),p=n(3),m=n(4),v=n(6),g=n(22),y=n(24),_={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function b(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(o=t.WindowsOptionsReportType||(t.WindowsOptionsReportType={}));var x=function(){function e(e,t,n,r){this._bufferService=e,this._coreService=t,this._logService=n,this._optionsService=r,this._data=new Uint32Array(0)}return e.prototype.hook=function(e){this._data=new Uint32Array(0)},e.prototype.put=function(e,t,n){this._data=u.concat(this._data,e.subarray(t,n))},e.prototype.unhook=function(e){if(e){var t=d.utf32ToString(this._data);switch(this._data=new Uint32Array(0),t){case'"q':return this._coreService.triggerDataEvent(s.C0.ESC+'P1$r0"q'+s.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(s.C0.ESC+'P1$r61;1"p'+s.C0.ESC+"\\");case"r":var n=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+n+s.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(s.C0.ESC+"P1$r0m"+s.C0.ESC+"\\");case" q":var r={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return r-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+r+" q"+s.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",t),this._coreService.triggerDataEvent(s.C0.ESC+"P0$r"+s.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},e}(),w=function(e){function t(t,n,r,i,o,c,u,p,v){void 0===v&&(v=new l.EscapeSequenceParser);var y=e.call(this)||this;y._bufferService=t,y._charsetService=n,y._coreService=r,y._dirtyRowService=i,y._logService=o,y._optionsService=c,y._coreMouseService=u,y._unicodeService=p,y._parser=v,y._parseBuffer=new Uint32Array(4096),y._stringDecoder=new d.StringToUtf32,y._utf8Decoder=new d.Utf8ToUtf32,y._workCell=new m.CellData,y._windowTitle="",y._iconName="",y._windowTitleStack=[],y._iconNameStack=[],y._curAttrData=h.DEFAULT_ATTR_DATA.clone(),y._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone(),y._onRequestBell=new f.EventEmitter,y._onRequestRefreshRows=new f.EventEmitter,y._onRequestReset=new f.EventEmitter,y._onRequestScroll=new f.EventEmitter,y._onRequestSyncScrollBar=new f.EventEmitter,y._onRequestWindowsOptionsReport=new f.EventEmitter,y._onA11yChar=new f.EventEmitter,y._onA11yTab=new f.EventEmitter,y._onCursorMove=new f.EventEmitter,y._onLineFeed=new f.EventEmitter,y._onScroll=new f.EventEmitter,y._onTitleChange=new f.EventEmitter,y.register(y._parser),y._parser.setCsiHandlerFallback((function(e,t){y._logService.debug("Unknown CSI code: ",{identifier:y._parser.identToString(e),params:t.toArray()})})),y._parser.setEscHandlerFallback((function(e){y._logService.debug("Unknown ESC code: ",{identifier:y._parser.identToString(e)})})),y._parser.setExecuteHandlerFallback((function(e){y._logService.debug("Unknown EXECUTE code: ",{code:e})})),y._parser.setOscHandlerFallback((function(e,t,n){y._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:n})})),y._parser.setDcsHandlerFallback((function(e,t,n){"HOOK"===t&&(n=n.toArray()),y._logService.debug("Unknown DCS code: ",{identifier:y._parser.identToString(e),action:t,payload:n})})),y._parser.setPrintHandler((function(e,t,n){return y.print(e,t,n)})),y._parser.setCsiHandler({final:"@"},(function(e){return y.insertChars(e)})),y._parser.setCsiHandler({intermediates:" ",final:"@"},(function(e){return y.scrollLeft(e)})),y._parser.setCsiHandler({final:"A"},(function(e){return y.cursorUp(e)})),y._parser.setCsiHandler({intermediates:" ",final:"A"},(function(e){return y.scrollRight(e)})),y._parser.setCsiHandler({final:"B"},(function(e){return y.cursorDown(e)})),y._parser.setCsiHandler({final:"C"},(function(e){return y.cursorForward(e)})),y._parser.setCsiHandler({final:"D"},(function(e){return y.cursorBackward(e)})),y._parser.setCsiHandler({final:"E"},(function(e){return y.cursorNextLine(e)})),y._parser.setCsiHandler({final:"F"},(function(e){return y.cursorPrecedingLine(e)})),y._parser.setCsiHandler({final:"G"},(function(e){return y.cursorCharAbsolute(e)})),y._parser.setCsiHandler({final:"H"},(function(e){return y.cursorPosition(e)})),y._parser.setCsiHandler({final:"I"},(function(e){return y.cursorForwardTab(e)})),y._parser.setCsiHandler({final:"J"},(function(e){return y.eraseInDisplay(e)})),y._parser.setCsiHandler({prefix:"?",final:"J"},(function(e){return y.eraseInDisplay(e)})),y._parser.setCsiHandler({final:"K"},(function(e){return y.eraseInLine(e)})),y._parser.setCsiHandler({prefix:"?",final:"K"},(function(e){return y.eraseInLine(e)})),y._parser.setCsiHandler({final:"L"},(function(e){return y.insertLines(e)})),y._parser.setCsiHandler({final:"M"},(function(e){return y.deleteLines(e)})),y._parser.setCsiHandler({final:"P"},(function(e){return y.deleteChars(e)})),y._parser.setCsiHandler({final:"S"},(function(e){return y.scrollUp(e)})),y._parser.setCsiHandler({final:"T"},(function(e){return y.scrollDown(e)})),y._parser.setCsiHandler({final:"X"},(function(e){return y.eraseChars(e)})),y._parser.setCsiHandler({final:"Z"},(function(e){return y.cursorBackwardTab(e)})),y._parser.setCsiHandler({final:"`"},(function(e){return y.charPosAbsolute(e)})),y._parser.setCsiHandler({final:"a"},(function(e){return y.hPositionRelative(e)})),y._parser.setCsiHandler({final:"b"},(function(e){return y.repeatPrecedingCharacter(e)})),y._parser.setCsiHandler({final:"c"},(function(e){return y.sendDeviceAttributesPrimary(e)})),y._parser.setCsiHandler({prefix:">",final:"c"},(function(e){return y.sendDeviceAttributesSecondary(e)})),y._parser.setCsiHandler({final:"d"},(function(e){return y.linePosAbsolute(e)})),y._parser.setCsiHandler({final:"e"},(function(e){return y.vPositionRelative(e)})),y._parser.setCsiHandler({final:"f"},(function(e){return y.hVPosition(e)})),y._parser.setCsiHandler({final:"g"},(function(e){return y.tabClear(e)})),y._parser.setCsiHandler({final:"h"},(function(e){return y.setMode(e)})),y._parser.setCsiHandler({prefix:"?",final:"h"},(function(e){return y.setModePrivate(e)})),y._parser.setCsiHandler({final:"l"},(function(e){return y.resetMode(e)})),y._parser.setCsiHandler({prefix:"?",final:"l"},(function(e){return y.resetModePrivate(e)})),y._parser.setCsiHandler({final:"m"},(function(e){return y.charAttributes(e)})),y._parser.setCsiHandler({final:"n"},(function(e){return y.deviceStatus(e)})),y._parser.setCsiHandler({prefix:"?",final:"n"},(function(e){return y.deviceStatusPrivate(e)})),y._parser.setCsiHandler({intermediates:"!",final:"p"},(function(e){return y.softReset(e)})),y._parser.setCsiHandler({intermediates:" ",final:"q"},(function(e){return y.setCursorStyle(e)})),y._parser.setCsiHandler({final:"r"},(function(e){return y.setScrollRegion(e)})),y._parser.setCsiHandler({final:"s"},(function(e){return y.saveCursor(e)})),y._parser.setCsiHandler({final:"t"},(function(e){return y.windowOptions(e)})),y._parser.setCsiHandler({final:"u"},(function(e){return y.restoreCursor(e)})),y._parser.setCsiHandler({intermediates:"'",final:"}"},(function(e){return y.insertColumns(e)})),y._parser.setCsiHandler({intermediates:"'",final:"~"},(function(e){return y.deleteColumns(e)})),y._parser.setExecuteHandler(s.C0.BEL,(function(){return y.bell()})),y._parser.setExecuteHandler(s.C0.LF,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.VT,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.FF,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.CR,(function(){return y.carriageReturn()})),y._parser.setExecuteHandler(s.C0.BS,(function(){return y.backspace()})),y._parser.setExecuteHandler(s.C0.HT,(function(){return y.tab()})),y._parser.setExecuteHandler(s.C0.SO,(function(){return y.shiftOut()})),y._parser.setExecuteHandler(s.C0.SI,(function(){return y.shiftIn()})),y._parser.setExecuteHandler(s.C1.IND,(function(){return y.index()})),y._parser.setExecuteHandler(s.C1.NEL,(function(){return y.nextLine()})),y._parser.setExecuteHandler(s.C1.HTS,(function(){return y.tabSet()})),y._parser.setOscHandler(0,new g.OscHandler((function(e){y.setTitle(e),y.setIconName(e)}))),y._parser.setOscHandler(1,new g.OscHandler((function(e){return y.setIconName(e)}))),y._parser.setOscHandler(2,new g.OscHandler((function(e){return y.setTitle(e)}))),y._parser.setEscHandler({final:"7"},(function(){return y.saveCursor()})),y._parser.setEscHandler({final:"8"},(function(){return y.restoreCursor()})),y._parser.setEscHandler({final:"D"},(function(){return y.index()})),y._parser.setEscHandler({final:"E"},(function(){return y.nextLine()})),y._parser.setEscHandler({final:"H"},(function(){return y.tabSet()})),y._parser.setEscHandler({final:"M"},(function(){return y.reverseIndex()})),y._parser.setEscHandler({final:"="},(function(){return y.keypadApplicationMode()})),y._parser.setEscHandler({final:">"},(function(){return y.keypadNumericMode()})),y._parser.setEscHandler({final:"c"},(function(){return y.fullReset()})),y._parser.setEscHandler({final:"n"},(function(){return y.setgLevel(2)})),y._parser.setEscHandler({final:"o"},(function(){return y.setgLevel(3)})),y._parser.setEscHandler({final:"|"},(function(){return y.setgLevel(3)})),y._parser.setEscHandler({final:"}"},(function(){return y.setgLevel(2)})),y._parser.setEscHandler({final:"~"},(function(){return y.setgLevel(1)})),y._parser.setEscHandler({intermediates:"%",final:"@"},(function(){return y.selectDefaultCharset()})),y._parser.setEscHandler({intermediates:"%",final:"G"},(function(){return y.selectDefaultCharset()}));var _=function(e){b._parser.setEscHandler({intermediates:"(",final:e},(function(){return y.selectCharset("("+e)})),b._parser.setEscHandler({intermediates:")",final:e},(function(){return y.selectCharset(")"+e)})),b._parser.setEscHandler({intermediates:"*",final:e},(function(){return y.selectCharset("*"+e)})),b._parser.setEscHandler({intermediates:"+",final:e},(function(){return y.selectCharset("+"+e)})),b._parser.setEscHandler({intermediates:"-",final:e},(function(){return y.selectCharset("-"+e)})),b._parser.setEscHandler({intermediates:".",final:e},(function(){return y.selectCharset("."+e)})),b._parser.setEscHandler({intermediates:"/",final:e},(function(){return y.selectCharset("/"+e)}))},b=this;for(var w in a.CHARSETS)_(w);return y._parser.setEscHandler({intermediates:"#",final:"8"},(function(){return y.screenAlignmentPattern()})),y._parser.setErrorHandler((function(e){return y._logService.error("Parsing error: ",e),e})),y._parser.setDcsHandler({intermediates:"$",final:"q"},new x(y._bufferService,y._coreService,y._logService,y._optionsService)),y}return i(t,e),Object.defineProperty(t.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.parse=function(e){var t=this._bufferService.buffer,n=t.x,r=t.y;if(this._logService.debug("parsing data",e),this._parseBuffer.length<e.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(e.length,131072))),this._dirtyRowService.clearRange(),e.length>131072)for(var i=0;i<e.length;i+=131072){var o=i+131072<e.length?i+131072:e.length,s="string"==typeof e?this._stringDecoder.decode(e.substring(i,o),this._parseBuffer):this._utf8Decoder.decode(e.subarray(i,o),this._parseBuffer);this._parser.parse(this._parseBuffer,s)}else s="string"==typeof e?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer),this._parser.parse(this._parseBuffer,s);(t=this._bufferService.buffer).x===n&&t.y===r||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},t.prototype.print=function(e,t,n){var r,i,o=this._bufferService.buffer,s=this._charsetService.charset,a=this._optionsService.options.screenReaderMode,l=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,u=this._coreService.modes.insertMode,h=this._curAttrData,f=o.lines.get(o.ybase+o.y);this._dirtyRowService.markDirty(o.y),o.x&&n-t>0&&2===f.getWidth(o.x-1)&&f.setCellFromCodePoint(o.x-1,0,1,h.fg,h.bg,h.extended);for(var m=t;m<n;++m){if(r=e[m],i=this._unicodeService.wcwidth(r),r<127&&s){var v=s[String.fromCharCode(r)];v&&(r=v.charCodeAt(0))}if(a&&this._onA11yChar.fire(d.stringFromCodePoint(r)),i||!o.x){if(o.x+i-1>=l)if(c){for(;o.x<l;)f.setCellFromCodePoint(o.x++,0,1,h.fg,h.bg,h.extended);o.x=0,o.y++,o.y===o.scrollBottom+1?(o.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(o.y>=this._bufferService.rows&&(o.y=this._bufferService.rows-1),o.lines.get(o.ybase+o.y).isWrapped=!0),f=o.lines.get(o.ybase+o.y)}else if(o.x=l-1,2===i)continue;if(u&&(f.insertCells(o.x,i,o.getNullCell(h),h),2===f.getWidth(l-1)&&f.setCellFromCodePoint(l-1,p.NULL_CELL_CODE,p.NULL_CELL_WIDTH,h.fg,h.bg,h.extended)),f.setCellFromCodePoint(o.x++,r,i,h.fg,h.bg,h.extended),i>0)for(;--i;)f.setCellFromCodePoint(o.x++,0,0,h.fg,h.bg,h.extended)}else f.getWidth(o.x-1)?f.addCodepointToCell(o.x-1,r):f.addCodepointToCell(o.x-2,r)}n-t>0&&(f.loadCell(o.x-1,this._workCell),2===this._workCell.getWidth()||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),o.x<l&&n-t>0&&0===f.getWidth(o.x)&&!f.hasContent(o.x)&&f.setCellFromCodePoint(o.x,0,1,h.fg,h.bg,h.extended),this._dirtyRowService.markDirty(o.y)},t.prototype.addCsiHandler=function(e,t){var n=this;return"t"!==e.final||e.prefix||e.intermediates?this._parser.addCsiHandler(e,t):this._parser.addCsiHandler(e,(function(e){return!b(e.params[0],n._optionsService.options.windowOptions)||t(e)}))},t.prototype.addDcsHandler=function(e,t){return this._parser.addDcsHandler(e,new y.DcsHandler(t))},t.prototype.addEscHandler=function(e,t){return this._parser.addEscHandler(e,t)},t.prototype.addOscHandler=function(e,t){return this._parser.addOscHandler(e,new g.OscHandler(t))},t.prototype.bell=function(){this._onRequestBell.fire()},t.prototype.lineFeed=function(){var e=this._bufferService.buffer;this._dirtyRowService.markDirty(e.y),this._optionsService.options.convertEol&&(e.x=0),e.y++,e.y===e.scrollBottom+1?(e.y--,this._onRequestScroll.fire(this._eraseAttrData())):e.y>=this._bufferService.rows&&(e.y=this._bufferService.rows-1),e.x>=this._bufferService.cols&&e.x--,this._dirtyRowService.markDirty(e.y),this._onLineFeed.fire()},t.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},t.prototype.backspace=function(){var e,t=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(t.x>0&&t.x--);if(this._restrictCursor(this._bufferService.cols),t.x>0)t.x--;else if(0===t.x&&t.y>t.scrollTop&&t.y<=t.scrollBottom&&(null===(e=t.lines.get(t.ybase+t.y))||void 0===e?void 0:e.isWrapped)){t.lines.get(t.ybase+t.y).isWrapped=!1,t.y--,t.x=this._bufferService.cols-1;var n=t.lines.get(t.ybase+t.y);n.hasWidth(t.x)&&!n.hasContent(t.x)&&t.x--}this._restrictCursor()},t.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var e=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-e)}},t.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},t.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},t.prototype._restrictCursor=function(e){void 0===e&&(e=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(e,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)},t.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=e,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+t):(this._bufferService.buffer.x=e,this._bufferService.buffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},t.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+e,this._bufferService.buffer.y+t)},t.prototype.cursorUp=function(e){var t=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1))},t.prototype.cursorDown=function(e){var t=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1)},t.prototype.cursorForward=function(e){this._moveCursor(e.params[0]||1,0)},t.prototype.cursorBackward=function(e){this._moveCursor(-(e.params[0]||1),0)},t.prototype.cursorNextLine=function(e){this.cursorDown(e),this._bufferService.buffer.x=0},t.prototype.cursorPrecedingLine=function(e){this.cursorUp(e),this._bufferService.buffer.x=0},t.prototype.cursorCharAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},t.prototype.cursorPosition=function(e){this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1)},t.prototype.charPosAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},t.prototype.hPositionRelative=function(e){this._moveCursor(e.params[0]||1,0)},t.prototype.linePosAbsolute=function(e){this._setCursor(this._bufferService.buffer.x,(e.params[0]||1)-1)},t.prototype.vPositionRelative=function(e){this._moveCursor(0,e.params[0]||1)},t.prototype.hVPosition=function(e){this.cursorPosition(e)},t.prototype.tabClear=function(e){var t=e.params[0];0===t?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===t&&(this._bufferService.buffer.tabs={})},t.prototype.cursorForwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1;t--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},t.prototype.cursorBackwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1,n=this._bufferService.buffer;t--;)n.x=n.prevStop()},t.prototype._eraseInBufferLine=function(e,t,n,r){void 0===r&&(r=!1);var i=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);i.replaceCells(t,n,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),r&&(i.isWrapped=!1)},t.prototype._resetBufferLine=function(e){var t=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);t.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),t.isWrapped=!1},t.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(),e.params[0]){case 0:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);t<this._bufferService.rows;t++)this._resetBufferLine(t);this._dirtyRowService.markDirty(t);break;case 1:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var n=this._bufferService.buffer.lines.length-this._bufferService.rows;n>0&&(this._bufferService.buffer.lines.trimStart(n),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-n,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-n,0),this._onScroll.fire(0))}},t.prototype.eraseInLine=function(e){switch(this._restrictCursor(),e.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)},t.prototype.insertLines=function(e){this._restrictCursor();var t=e.params[0]||1,n=this._bufferService.buffer;if(!(n.y>n.scrollBottom||n.y<n.scrollTop)){for(var r=n.ybase+n.y,i=this._bufferService.rows-1-n.scrollBottom,o=this._bufferService.rows-1+n.ybase-i+1;t--;)n.lines.splice(o-1,1),n.lines.splice(r,0,n.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(n.y,n.scrollBottom),n.x=0}},t.prototype.deleteLines=function(e){this._restrictCursor();var t=e.params[0]||1,n=this._bufferService.buffer;if(!(n.y>n.scrollBottom||n.y<n.scrollTop)){var r,i=n.ybase+n.y;for(r=this._bufferService.rows-1-n.scrollBottom,r=this._bufferService.rows-1+n.ybase-r;t--;)n.lines.splice(i,1),n.lines.splice(r,0,n.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(n.y,n.scrollBottom),n.x=0}},t.prototype.insertChars=function(e){this._restrictCursor();var t=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);t&&(t.insertCells(this._bufferService.buffer.x,e.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},t.prototype.deleteChars=function(e){this._restrictCursor();var t=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);t&&(t.deleteCells(this._bufferService.buffer.x,e.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},t.prototype.scrollUp=function(e){for(var t=e.params[0]||1,n=this._bufferService.buffer;t--;)n.lines.splice(n.ybase+n.scrollTop,1),n.lines.splice(n.ybase+n.scrollBottom,0,n.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(n.scrollTop,n.scrollBottom)},t.prototype.scrollDown=function(e){for(var t=e.params[0]||1,n=this._bufferService.buffer;t--;)n.lines.splice(n.ybase+n.scrollBottom,1),n.lines.splice(n.ybase+n.scrollTop,0,n.getBlankLine(h.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(n.scrollTop,n.scrollBottom)},t.prototype.scrollLeft=function(e){var t=this._bufferService.buffer;if(!(t.y>t.scrollBottom||t.y<t.scrollTop)){for(var n=e.params[0]||1,r=t.scrollTop;r<=t.scrollBottom;++r){var i=t.lines.get(t.ybase+r);i.deleteCells(0,n,t.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)}},t.prototype.scrollRight=function(e){var t=this._bufferService.buffer;if(!(t.y>t.scrollBottom||t.y<t.scrollTop)){for(var n=e.params[0]||1,r=t.scrollTop;r<=t.scrollBottom;++r){var i=t.lines.get(t.ybase+r);i.insertCells(0,n,t.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)}},t.prototype.insertColumns=function(e){var t=this._bufferService.buffer;if(!(t.y>t.scrollBottom||t.y<t.scrollTop)){for(var n=e.params[0]||1,r=t.scrollTop;r<=t.scrollBottom;++r){var i=this._bufferService.buffer.lines.get(t.ybase+r);i.insertCells(t.x,n,t.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)}},t.prototype.deleteColumns=function(e){var t=this._bufferService.buffer;if(!(t.y>t.scrollBottom||t.y<t.scrollTop)){for(var n=e.params[0]||1,r=t.scrollTop;r<=t.scrollBottom;++r){var i=t.lines.get(t.ybase+r);i.deleteCells(t.x,n,t.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)}},t.prototype.eraseChars=function(e){this._restrictCursor();var t=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);t&&(t.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(e.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},t.prototype.repeatPrecedingCharacter=function(e){if(this._parser.precedingCodepoint){for(var t=e.params[0]||1,n=new Uint32Array(t),r=0;r<t;++r)n[r]=this._parser.precedingCodepoint;this.print(n,0,n.length)}},t.prototype.sendDeviceAttributesPrimary=function(e){e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(s.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(s.C0.ESC+"[?6c"))},t.prototype.sendDeviceAttributesSecondary=function(e){e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(s.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(s.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(s.C0.ESC+"[>83;40003;0c"))},t.prototype._is=function(e){return 0===(this._optionsService.options.termName+"").indexOf(e)},t.prototype.setMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!0)},t.prototype.setModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),this._charsetService.setgCharset(1,a.DEFAULT_CHARSET),this._charsetService.setgCharset(2,a.DEFAULT_CHARSET),this._charsetService.setgCharset(3,a.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}},t.prototype.resetMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!1)},t.prototype.resetModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){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(),1049===e.params[t]&&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}},t.prototype._updateAttrColor=function(e,t,n,r,i){return 2===t?(e|=50331648,e&=-16777216,e|=v.AttributeData.fromColorRGB([n,r,i])):5===t&&(e&=-50331904,e|=33554432|255&n),e},t.prototype._extractColor=function(e,t,n){var r=[0,0,-1,0,0,0],i=0,o=0;do{if(r[o+i]=e.params[t+o],e.hasSubParams(t+o)){var s=e.getSubParams(t+o),a=0;do{5===r[1]&&(i=1),r[o+a+1+i]=s[a]}while(++a<s.length&&a+o+1+i<r.length);break}if(5===r[1]&&o+i>=2||2===r[1]&&o+i>=5)break;r[1]&&(i=1)}while(++o+t<e.length&&o+i<r.length);for(a=2;a<r.length;++a)-1===r[a]&&(r[a]=0);switch(r[0]){case 38:n.fg=this._updateAttrColor(n.fg,r[1],r[3],r[4],r[5]);break;case 48:n.bg=this._updateAttrColor(n.bg,r[1],r[3],r[4],r[5]);break;case 58:n.extended=n.extended.clone(),n.extended.underlineColor=this._updateAttrColor(n.extended.underlineColor,r[1],r[3],r[4],r[5])}return o},t.prototype._processUnderline=function(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()},t.prototype.charAttributes=function(e){if(1===e.length&&0===e.params[0])return this._curAttrData.fg=h.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=h.DEFAULT_ATTR_DATA.bg);for(var t,n=e.length,r=this._curAttrData,i=0;i<n;i++)(t=e.params[i])>=30&&t<=37?(r.fg&=-50331904,r.fg|=16777216|t-30):t>=40&&t<=47?(r.bg&=-50331904,r.bg|=16777216|t-40):t>=90&&t<=97?(r.fg&=-50331904,r.fg|=16777224|t-90):t>=100&&t<=107?(r.bg&=-50331904,r.bg|=16777224|t-100):0===t?(r.fg=h.DEFAULT_ATTR_DATA.fg,r.bg=h.DEFAULT_ATTR_DATA.bg):1===t?r.fg|=134217728:3===t?r.bg|=67108864:4===t?(r.fg|=268435456,this._processUnderline(e.hasSubParams(i)?e.getSubParams(i)[0]:1,r)):5===t?r.fg|=536870912:7===t?r.fg|=67108864:8===t?r.fg|=1073741824:2===t?r.bg|=134217728:21===t?this._processUnderline(2,r):22===t?(r.fg&=-134217729,r.bg&=-134217729):23===t?r.bg&=-67108865:24===t?r.fg&=-268435457:25===t?r.fg&=-536870913:27===t?r.fg&=-67108865:28===t?r.fg&=-1073741825:39===t?(r.fg&=-67108864,r.fg|=16777215&h.DEFAULT_ATTR_DATA.fg):49===t?(r.bg&=-67108864,r.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):38===t||48===t||58===t?i+=this._extractColor(e,i,r):59===t?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):100===t?(r.fg&=-67108864,r.fg|=16777215&h.DEFAULT_ATTR_DATA.fg,r.bg&=-67108864,r.bg|=16777215&h.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",t)},t.prototype.deviceStatus=function(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(s.C0.ESC+"[0n");break;case 6:var t=this._bufferService.buffer.y+1,n=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"["+t+";"+n+"R")}},t.prototype.deviceStatusPrivate=function(e){if(6===e.params[0]){var t=this._bufferService.buffer.y+1,n=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"[?"+t+";"+n+"R")}},t.prototype.softReset=function(e){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=h.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},t.prototype.setCursorStyle=function(e){var t=e.params[0]||1;switch(t){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 n=t%2==1;this._optionsService.options.cursorBlink=n},t.prototype.setScrollRegion=function(e){var t,n=e.params[0]||1;(e.length<2||(t=e.params[1])>this._bufferService.rows||0===t)&&(t=this._bufferService.rows),t>n&&(this._bufferService.buffer.scrollTop=n-1,this._bufferService.buffer.scrollBottom=t-1,this._setCursor(0,0))},t.prototype.windowOptions=function(e){if(b(e.params[0],this._optionsService.options.windowOptions)){var t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(o.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(o.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(s.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},t.prototype.saveCursor=function(e){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},t.prototype.restoreCursor=function(e){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()},t.prototype.setTitle=function(e){this._windowTitle=e,this._onTitleChange.fire(e)},t.prototype.setIconName=function(e){this._iconName=e},t.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},t.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},t.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},t.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,a.DEFAULT_CHARSET)},t.prototype.selectCharset=function(e){2===e.length?"/"!==e[0]&&this._charsetService.setgCharset(_[e[0]],a.CHARSETS[e[1]]||a.DEFAULT_CHARSET):this.selectDefaultCharset()},t.prototype.index=function(){this._restrictCursor();var e=this._bufferService.buffer;this._bufferService.buffer.y++,e.y===e.scrollBottom+1?(e.y--,this._onRequestScroll.fire(this._eraseAttrData())):e.y>=this._bufferService.rows&&(e.y=this._bufferService.rows-1),this._restrictCursor()},t.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},t.prototype.reverseIndex=function(){this._restrictCursor();var e=this._bufferService.buffer;if(e.y===e.scrollTop){var t=e.scrollBottom-e.scrollTop;e.lines.shiftElements(e.ybase+e.y,t,1),e.lines.set(e.ybase+e.y,e.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(e.scrollTop,e.scrollBottom)}else e.y--,this._restrictCursor()},t.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},t.prototype.reset=function(){this._curAttrData=h.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=h.DEFAULT_ATTR_DATA.clone()},t.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},t.prototype.setgLevel=function(e){this._charsetService.setgLevel(e)},t.prototype.screenAlignmentPattern=function(){var e=new m.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg;var t=this._bufferService.buffer;this._setCursor(0,0);for(var n=0;n<this._bufferService.rows;++n){var r=t.ybase+t.y+n,i=t.lines.get(r);i&&(i.fill(e),i.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},t}(c.Disposable);t.InputHandler=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;var r=function(){function e(e,t){if(void 0===e&&(e=32),void 0===t&&(t=32),this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return e.fromArray=function(t){var n=new e;if(!t.length)return n;for(var r=t[0]instanceof Array?1:0;r<t.length;++r){var i=t[r];if(i instanceof Array)for(var o=0;o<i.length;++o)n.addSubParam(i[o]);else n.addParam(i)}return n},e.prototype.clone=function(){var t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t},e.prototype.toArray=function(){for(var e=[],t=0;t<this.length;++t){e.push(this.params[t]);var n=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];r-n>0&&e.push(Array.prototype.slice.call(this._subParams,n,r))}return e},e.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},e.prototype.addParam=function(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>2147483647?2147483647:e}},e.prototype.addSubParam=function(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>2147483647?2147483647:e,this._subParamsIdx[this.length-1]++}},e.prototype.hasSubParams=function(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0},e.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,n=255&this._subParamsIdx[e];return n-t>0?this._subParams.subarray(t,n):null},e.prototype.getSubParamsAll=function(){for(var e={},t=0;t<this.length;++t){var n=this._subParamsIdx[t]>>8,r=255&this._subParamsIdx[t];r-n>0&&(e[t]=this._subParams.slice(n,r))}return e},e.prototype.addDigit=function(e){var t;if(!(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var n=this._digitIsSub?this._subParams:this.params,r=n[t-1];n[t-1]=~r?Math.min(10*r+e,2147483647):e}},e}();t.Params=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;var r=n(23),i=n(8),o=function(){function e(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return e.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var n=this._handlers[e];return n.push(t),{dispose:function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}}},e.prototype.setHandler=function(e,t){this._handlers[e]=[t]},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},e.prototype.reset=function(){2===this._state&&this.end(!1),this._id=-1,this._state=0},e.prototype._start=function(){var e=this._handlers[this._id];if(e)for(var t=e.length-1;t>=0;t--)e[t].start();else this._handlerFb(this._id,"START")},e.prototype._put=function(e,t,n){var r=this._handlers[this._id];if(r)for(var o=r.length-1;o>=0;o--)r[o].put(e,t,n);else this._handlerFb(this._id,"PUT",i.utf32ToString(e,t,n))},e.prototype._end=function(e){var t=this._handlers[this._id];if(t){for(var n=t.length-1;n>=0&&!1===t[n].end(e);n--);for(n--;n>=0;n--)t[n].end(!1)}else this._handlerFb(this._id,"END",e)},e.prototype.start=function(){this.reset(),this._id=-1,this._state=1},e.prototype.put=function(e,t,n){if(3!==this._state){if(1===this._state)for(;t<n;){var r=e[t++];if(59===r){this._state=2,this._start();break}if(r<48||57<r)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+r-48}2===this._state&&n-t>0&&this._put(e,t,n)}},e.prototype.end=function(e){0!==this._state&&(3!==this._state&&(1===this._state&&this._start(),this._end(e)),this._id=-1,this._state=0)},e}();t.OscParser=o;var s=function(){function e(e){this._handler=e,this._data="",this._hitLimit=!1}return e.prototype.start=function(){this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,n){this._hitLimit||(this._data+=i.utf32ToString(e,t,n),this._data.length>r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},e}();t.OscHandler=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;var r=n(8),i=n(21),o=n(23),s=[],a=function(){function e(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}return e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},e.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var n=this._handlers[e];return n.push(t),{dispose:function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)}}},e.prototype.setHandler=function(e,t){this._handlers[e]=[t]},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},e.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].hook(t);else this._handlerFb(this._ident,"HOOK",t)},e.prototype.put=function(e,t,n){if(this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].put(e,t,n);else this._handlerFb(this._ident,"PUT",r.utf32ToString(e,t,n))},e.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;t>=0&&!1===this._active[t].unhook(e);t--);for(t--;t>=0;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},e}();t.DcsParser=a;var l=function(){function e(e){this._handler=e,this._data="",this._hitLimit=!1}return e.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,n){this._hitLimit||(this._data+=r.utf32ToString(e,t,n),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params||new i.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},e}();t.DcsHandler=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireCharAtlas=void 0;var r=n(26),i=n(43),o=[];t.acquireCharAtlas=function(e,t,n,s,a){for(var l=r.generateConfig(s,a,e,n),c=0;c<o.length;c++){var u=(d=o[c]).ownedBy.indexOf(t);if(u>=0){if(r.configEquals(d.config,l))return d.atlas;1===d.ownedBy.length?(d.atlas.dispose(),o.splice(c,1)):d.ownedBy.splice(u,1);break}}for(c=0;c<o.length;c++){var d=o[c];if(r.configEquals(d.config,l))return d.ownedBy.push(t),d.atlas}var h={atlas:new i.DynamicCharAtlas(document,l),config:l,ownedBy:[t]};return o.push(h),h.atlas},t.removeTerminalFromCache=function(e){for(var t=0;t<o.length;t++){var n=o[t].ownedBy.indexOf(e);if(-1!==n){1===o[t].ownedBy.length?(o[t].atlas.dispose(),o.splice(t,1)):o[t].ownedBy.splice(n,1);break}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;var r=n(3);t.generateConfig=function(e,t,n,r){var i={foreground:r.foreground,background:r.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:r.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:e,scaledCharHeight:t,fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,fontWeightBold:n.fontWeightBold,allowTransparency:n.allowTransparency,colors:i}},t.configEquals=function(e,t){for(var n=0;n<e.colors.ansi.length;n++)if(e.colors.ansi[n].rgba!==t.colors.ansi[n].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.scaledCharWidth===t.scaledCharWidth&&e.scaledCharHeight===t.scaledCharHeight&&e.colors.foreground===t.colors.foreground&&e.colors.background===t.colors.background},t.is256Color=function(e){return e<r.DEFAULT_COLOR}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorManager=t.DEFAULT_ANSI_COLORS=void 0;var r=n(10),i=n(45),o=r.css.toColor("#ffffff"),s=r.css.toColor("#000000"),a=r.css.toColor("#ffffff"),l=r.css.toColor("#000000"),c={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=function(){for(var e=[r.css.toColor("#2e3436"),r.css.toColor("#cc0000"),r.css.toColor("#4e9a06"),r.css.toColor("#c4a000"),r.css.toColor("#3465a4"),r.css.toColor("#75507b"),r.css.toColor("#06989a"),r.css.toColor("#d3d7cf"),r.css.toColor("#555753"),r.css.toColor("#ef2929"),r.css.toColor("#8ae234"),r.css.toColor("#fce94f"),r.css.toColor("#729fcf"),r.css.toColor("#ad7fa8"),r.css.toColor("#34e2e2"),r.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],n=0;n<216;n++){var i=t[n/36%6|0],o=t[n/6%6|0],s=t[n%6];e.push({css:r.channels.toCss(i,o,s),rgba:r.channels.toRgba(i,o,s)})}for(n=0;n<24;n++){var a=8+10*n;e.push({css:r.channels.toCss(a,a,a),rgba:r.channels.toRgba(a,a,a)})}return e}();var u=function(){function e(e,n){this.allowTransparency=n;var u=e.createElement("canvas");u.width=1,u.height=1;var d=u.getContext("2d");if(!d)throw new Error("Could not get rendering context");this._ctx=d,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new i.ColorContrastCache,this.colors={foreground:o,background:s,cursor:a,cursorAccent:l,selectionTransparent:c,selectionOpaque:r.color.blend(s,c),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return e.prototype.onOptionsChange=function(e){"minimumContrastRatio"===e&&this._contrastCache.clear()},e.prototype.setTheme=function(e){void 0===e&&(e={}),this.colors.foreground=this._parseColor(e.foreground,o),this.colors.background=this._parseColor(e.background,s),this.colors.cursor=this._parseColor(e.cursor,a,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selectionTransparent=this._parseColor(e.selection,c,!0),this.colors.selectionOpaque=r.color.blend(this.colors.background,this.colors.selectionTransparent),r.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=r.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,t.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,t.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,t.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,t.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,t.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,t.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,t.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,t.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},e.prototype._parseColor=function(e,t,n){if(void 0===n&&(n=this.allowTransparency),void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+e+" is invalid using fallback "+t.css),t;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(255!==i[3]){if(!n)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t;var o=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map((function(e){return Number(e)})),s=o[0],a=o[1],l=o[2],c=o[3],u=Math.round(255*c);return{rgba:r.channels.toRgba(s,a,l,u),css:e}}return{css:this._ctx.fillStyle,rgba:r.channels.toRgba(i[0],i[1],i[2],i[3])}},e}();t.ColorManager=u},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerRegistry=t.JoinedCellData=void 0;var o=n(6),s=n(3),a=n(4),l=function(e){function t(t,n,r){var i=e.call(this)||this;return i.content=0,i.combinedData="",i.fg=t.fg,i.bg=t.bg,i.combinedData=n,i._width=r,i}return i(t,e),t.prototype.isCombined=function(){return 2097152},t.prototype.getWidth=function(){return this._width},t.prototype.getChars=function(){return this.combinedData},t.prototype.getCode=function(){return 2097151},t.prototype.setFromCharData=function(e){throw new Error("not implemented")},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(o.AttributeData);t.JoinedCellData=l;var c=function(){function e(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new a.CellData}return e.prototype.registerCharacterJoiner=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},e.prototype.deregisterCharacterJoiner=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},e.prototype.getJoinedCharacters=function(e){if(0===this._characterJoiners.length)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];for(var n=[],r=t.translateToString(!0),i=0,o=0,a=0,l=t.getFg(0),c=t.getBg(0),u=0;u<t.getTrimmedLength();u++)if(t.loadCell(u,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==l||this._workCell.bg!==c){if(u-i>1)for(var d=this._getJoinedRanges(r,a,o,t,i),h=0;h<d.length;h++)n.push(d[h]);i=u,a=o,l=this._workCell.fg,c=this._workCell.bg}o+=this._workCell.getChars().length||s.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-i>1)for(d=this._getJoinedRanges(r,a,o,t,i),h=0;h<d.length;h++)n.push(d[h]);return n},e.prototype._getJoinedRanges=function(t,n,r,i,o){for(var s=t.substring(n,r),a=this._characterJoiners[0].handler(s),l=1;l<this._characterJoiners.length;l++)for(var c=this._characterJoiners[l].handler(s),u=0;u<c.length;u++)e._mergeRanges(a,c[u]);return this._stringRangesToCellRanges(a,i,o),a},e.prototype._stringRangesToCellRanges=function(e,t,n){var r=0,i=!1,o=0,a=e[r];if(a){for(var l=n;l<this._bufferService.cols;l++){var c=t.getWidth(l),u=t.getString(l).length||s.WHITESPACE_CELL_CHAR.length;if(0!==c){if(!i&&a[0]<=o&&(a[0]=l,i=!0),a[1]<=o){if(a[1]=l,!(a=e[++r]))break;a[0]<=o?(a[0]=l,i=!0):i=!1}o+=u}}a&&(a[1]=this._bufferService.cols)}},e._mergeRanges=function(e,t){for(var n=!1,r=0;r<e.length;r++){var i=e[r];if(n){if(t[1]<=i[0])return e[r-1][1]=t[1],e;if(t[1]<=i[1])return e[r-1][1]=Math.max(t[1],i[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=i[0])return e.splice(r,0,t),e;if(t[1]<=i[1])return i[0]=Math.min(t[0],i[0]),e;t[0]<i[1]&&(i[0]=Math.min(t[0],i[0]),n=!0)}}return n?e[e.length-1][1]=t[1]:e.push(t),e},e}();t.CharacterJoinerRegistry=c},function(e,t,n){"use strict";function r(e,t){var n=t.getBoundingClientRect();return[e.clientX-n.left,e.clientY-n.top]}Object.defineProperty(t,"__esModule",{value:!0}),t.getRawByteCoords=t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=r,t.getCoords=function(e,t,n,i,o,s,a,l){if(o){var c=r(e,t);if(c)return c[0]=Math.ceil((c[0]+(l?s/2:0))/s),c[1]=Math.ceil(c[1]/a),c[0]=Math.min(Math.max(c[0],1),n+(l?1:0)),c[1]=Math.min(Math.max(c[1],1),i),c}},t.getRawByteCoords=function(e){if(e)return{x:e[0]+32,y:e[1]+32}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0;var r=function(){function e(e){this._renderCallback=e}return e.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.refresh=function(e,t,n){var r=this;this._rowCount=n,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){return r._innerRefresh()})))},e.prototype._innerRefresh=function(){if(void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(e,t)}},e}();t.RenderDebouncer=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenDprMonitor=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentDevicePixelRatio=window.devicePixelRatio,t}return i(t,e),t.prototype.setListener=function(e){var t=this;this._listener&&this.clearListener(),this._listener=e,this._outerListener=function(){t._listener&&(t._listener(window.devicePixelRatio,t._currentDevicePixelRatio),t._updateDpr())},this._updateDpr()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.clearListener()},t.prototype._updateDpr=function(){var e;this._outerListener&&(null===(e=this._resolutionMediaMatchList)||void 0===e||e.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},t.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)},t}(n(2).Disposable);t.ScreenDprMonitor=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t,n){if(void 0===n&&(n=5),"object"!=typeof t)return t;var r=Array.isArray(t)?[]:{};for(var i in t)r[i]=n<=1?t[i]:t[i]?e(t[i],n-1):t[i];return r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var r=n(4),i=n(35),o=n(18),s=n(0),a=n(83),l=function(){function e(e){this._core=new i.Terminal(e),this._addonManager=new a.AddonManager}return e.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(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new h(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new f(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),new u(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},e.prototype.open=function(e){this._core.open(e)},e.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},e.prototype.registerLinkMatcher=function(e,t,n){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,n)},e.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},e.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},e.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},e.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},e.prototype.registerMarker=function(e){return this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},e.prototype.addMarker=function(e){return this.registerMarker(e)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(e,t,n){this._verifyIntegers(e,t,n),this._core.select(e,t,n)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},e.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(e,t){this._core.write(e,t)},e.prototype.writeUtf8=function(e,t){this._core.write(e,t)},e.prototype.writeln=function(e,t){this._core.write(e),this._core.write("\r\n",t)},e.prototype.paste=function(e){this._core.paste(e)},e.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},e.prototype.setOption=function(e,t){this._core.optionsService.setOption(e,t)},e.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(e,"strings",{get:function(){return o},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i===1/0||isNaN(i)||i%1!=0)throw new Error("This API only accepts integers")}},e}();t.Terminal=l;var c=function(){function e(e,t){this._buffer=e,this.type=t}return e.prototype.init=function(e){return this._buffer=e,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(e){var t=this._buffer.lines.get(e);if(t)return new d(t)},e.prototype.getNullCell=function(){return new r.CellData},e}(),u=function(){function e(e){var t=this;this._buffers=e,this._onBufferChange=new s.EventEmitter,this._normal=new c(this._buffers.normal,"normal"),this._alternate=new c(this._buffers.alt,"alternate"),this._buffers.onBufferActivate((function(){return t._onBufferChange.fire(t.active)}))}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.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(e.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),e}(),d=function(){function e(e){this._line=e}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)},e.prototype.translateToString=function(e,t,n){return this._line.translateToString(e,t,n)},e}(),h=function(){function e(e){this._core=e}return e.prototype.registerCsiHandler=function(e,t){return this._core.addCsiHandler(e,(function(e){return t(e.toArray())}))},e.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},e.prototype.registerDcsHandler=function(e,t){return this._core.addDcsHandler(e,(function(e,n){return t(e,n.toArray())}))},e.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},e.prototype.registerEscHandler=function(e,t){return this._core.addEscHandler(e,t)},e.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},e.prototype.registerOscHandler=function(e,t){return this._core.addOscHandler(e,t)},e.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},e}(),f=function(){function e(e){this._core=e}return e.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!1,configurable:!0}),e}()},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var o=n(36),s=n(37),a=n(38),l=n(12),c=n(19),u=n(40),d=n(50),h=n(51),f=n(11),p=n(7),m=n(18),v=n(54),g=n(55),y=n(56),_=n(57),b=n(59),x=n(0),w=n(16),S=n(27),C=n(60),k=n(5),E=n(61),T=n(62),L=n(63),A=n(64),M=n(65),D="undefined"!=typeof window?window.document:null,I=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.browser=f,n._keyDownHandled=!1,n._onCursorMove=new x.EventEmitter,n._onKey=new x.EventEmitter,n._onRender=new x.EventEmitter,n._onSelectionChange=new x.EventEmitter,n._onTitleChange=new x.EventEmitter,n._onFocus=new x.EventEmitter,n._onBlur=new x.EventEmitter,n._onA11yCharEmitter=new x.EventEmitter,n._onA11yTabEmitter=new x.EventEmitter,n._setup(),n.linkifier=n._instantiationService.createInstance(d.Linkifier),n.linkifier2=n.register(n._instantiationService.createInstance(L.Linkifier2)),n.register(n._inputHandler.onRequestBell((function(){return n.bell()}))),n.register(n._inputHandler.onRequestRefreshRows((function(e,t){return n.refresh(e,t)}))),n.register(n._inputHandler.onRequestReset((function(){return n.reset()}))),n.register(n._inputHandler.onRequestScroll((function(e,t){return n.scroll(e,t||void 0)}))),n.register(n._inputHandler.onRequestWindowsOptionsReport((function(e){return n._reportWindowsOptions(e)}))),n.register(x.forwardEvent(n._inputHandler.onCursorMove,n._onCursorMove)),n.register(x.forwardEvent(n._inputHandler.onTitleChange,n._onTitleChange)),n.register(x.forwardEvent(n._inputHandler.onA11yChar,n._onA11yCharEmitter)),n.register(x.forwardEvent(n._inputHandler.onA11yTab,n._onA11yTabEmitter)),n.register(n._bufferService.onResize((function(e){return n._afterResize(e.cols,e.rows)}))),n}return i(t,e),Object.defineProperty(t.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t,n,r;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._renderService)||void 0===t||t.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},null===(r=null===(n=this.element)||void 0===n?void 0:n.parentNode)||void 0===r||r.removeChild(this.element))},t.prototype._setup=function(){e.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(t.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),t.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},t.prototype._updateOptions=function(t){var n,r,i,o;switch(e.prototype._updateOptions.call(this,t),t){case"fontFamily":case"fontSize":null===(n=this._renderService)||void 0===n||n.clear(),null===(r=this._charSizeService)||void 0===r||r.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":null===(i=this.viewport)||void 0===i||i.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new y.AccessibilityManager(this,this._renderService)):(null===(o=this._accessibilityManager)||void 0===o||o.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},t.prototype._onTextAreaFocus=function(e){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(l.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},t.prototype.blur=function(){var e;return null===(e=this.textarea)||void 0===e?void 0:e.blur()},t.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(l.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},t.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var e=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),t=this._bufferService.buffer.y*e,n=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=n+"px",this.textarea.style.top=t+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=e+"px",this.textarea.style.lineHeight=e+"px",this.textarea.style.zIndex="-5"}},t.prototype._initGlobal=function(){var e=this;this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",(function(t){e.hasSelection()&&a.copyHandler(t,e._selectionService)})));var t=function(t){return a.handlePasteEvent(t,e.textarea,e._coreService)};this.register(p.addDisposableDomListener(this.textarea,"paste",t)),this.register(p.addDisposableDomListener(this.element,"paste",t)),f.isFirefox?this.register(p.addDisposableDomListener(this.element,"mousedown",(function(t){2===t.button&&a.rightClickHandler(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))):this.register(p.addDisposableDomListener(this.element,"contextmenu",(function(t){a.rightClickHandler(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))),f.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",(function(t){1===t.button&&a.moveTextAreaUnderMouseCursor(t,e.textarea,e.screenElement)})))},t.prototype._bindKeys=function(){var e=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",(function(t){return e._keyUp(t)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",(function(t){return e._keyDown(t)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",(function(t){return e._keyPress(t)}),!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",(function(){return e._compositionHelper.compositionstart()}))),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",(function(t){return e._compositionHelper.compositionupdate(t)}))),this.register(p.addDisposableDomListener(this.textarea,"compositionend",(function(){return e._compositionHelper.compositionend()}))),this.register(this.onRender((function(){return e._compositionHelper.updateCompositionElements()}))),this.register(this.onRender((function(t){return e._queueLinkification(t.start,t.end)})))},t.prototype.open=function(e){var t=this;if(!e)throw new Error("Terminal requires a parent element.");D.body.contains(e)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.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"),e.appendChild(this.element);var n=D.createDocumentFragment();this._viewportElement=D.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),n.appendChild(this._viewportElement),this._viewportScrollArea=D.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=D.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=D.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),n.appendChild(this.screenElement),this.textarea=D.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.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(p.addDisposableDomListener(this.textarea,"focus",(function(e){return t._onTextAreaFocus(e)}))),this.register(p.addDisposableDomListener(this.textarea,"blur",(function(){return t._onTextAreaBlur()}))),this._helperContainer.appendChild(this.textarea);var r=this._instantiationService.createInstance(A.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,r),this._charSizeService=this._instantiationService.createInstance(E.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._compositionView=D.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(n),this._theme=this.options.theme||this._theme,this._colorManager=new S.ColorManager(D,this.options.allowTransparency),this.register(this.optionsService.onOptionChange((function(e){return t._colorManager.onOptionsChange(e)}))),this._colorManager.setTheme(this._theme);var i=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,i,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange((function(e){return t._onRender.fire(e)}))),this.onResize((function(e){return t._renderService.resize(e.cols,e.rows)})),this._soundService=this._instantiationService.createInstance(v.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(T.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,(function(e,n){return t.scrollLines(e,n)}),this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar((function(){return t.viewport.syncScrollArea()}))),this.register(this.viewport),this.register(this.onCursorMove((function(){t._renderService.onCursorMove(),t._syncTextArea()}))),this.register(this.onResize((function(){return t._renderService.onResize(t.cols,t.rows)}))),this.register(this.onBlur((function(){return t._renderService.onBlur()}))),this.register(this.onFocus((function(){return t._renderService.onFocus()}))),this.register(this._renderService.onDimensionsChange((function(){return t.viewport.syncScrollArea()}))),this._selectionService=this.register(this._instantiationService.createInstance(h.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((function(e){return t.scrollLines(e.amount,e.suppressScrollEvent)}))),this.register(this._selectionService.onSelectionChange((function(){return t._onSelectionChange.fire()}))),this.register(this._selectionService.onRequestRedraw((function(e){return t._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)}))),this.register(this._selectionService.onLinuxMouseSelection((function(e){t.textarea.value=e,t.textarea.focus(),t.textarea.select()}))),this.register(this.onScroll((function(){t.viewport.syncScrollArea(),t._selectionService.refresh()}))),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",(function(){return t._selectionService.refresh()}))),this._mouseZoneManager=this._instantiationService.createInstance(g.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll((function(){return t._mouseZoneManager.clearAll()}))),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(p.addDisposableDomListener(this.element,"mousedown",(function(e){return t._selectionService.onMouseDown(e)}))),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new y.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},t.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(_.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},t.prototype._setTheme=function(e){var t,n,r;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(n=this._renderService)||void 0===n||n.setColors(this._colorManager.colors),null===(r=this.viewport)||void 0===r||r.onThemeChange(this._colorManager.colors)},t.prototype.bindMouse=function(){var e=this,t=this,n=this.element;function r(e){var n,r,i=t._mouseService.getRawByteCoords(e,t.screenElement,t.cols,t.rows);if(!i)return!1;switch(e.overrideType||e.type){case"mousemove":r=32,void 0===e.buttons?(n=3,void 0!==e.button&&(n=e.button<3?e.button:3)):n=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":r=0,n=e.button<3?e.button:3;break;case"mousedown":r=1,n=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(r=e.deltaY<0?0:1),n=4;break;default:return!1}return!(void 0===r||void 0===n||n>4)&&t._coreMouseService.triggerMouseEvent({col:i.x-33,row:i.y-33,button:n,action:r,ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey})}var i={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o=function(t){return r(t),t.buttons||(e._document.removeEventListener("mouseup",i.mouseup),i.mousedrag&&e._document.removeEventListener("mousemove",i.mousedrag)),e.cancel(t)},s=function(t){return r(t),t.preventDefault(),e.cancel(t)},a=function(e){e.buttons&&r(e)},c=function(e){e.buttons||r(e)};this.register(this._coreMouseService.onProtocolChange((function(t){t?("debug"===e.optionsService.options.logLevel&&e._logService.debug("Binding to mouse events:",e._coreMouseService.explainEvents(t)),e.element.classList.add("enable-mouse-events"),e._selectionService.disable()):(e._logService.debug("Unbinding from mouse events."),e.element.classList.remove("enable-mouse-events"),e._selectionService.enable()),8&t?i.mousemove||(n.addEventListener("mousemove",c),i.mousemove=c):(n.removeEventListener("mousemove",i.mousemove),i.mousemove=null),16&t?i.wheel||(n.addEventListener("wheel",s,{passive:!1}),i.wheel=s):(n.removeEventListener("wheel",i.wheel),i.wheel=null),2&t?i.mouseup||(i.mouseup=o):(e._document.removeEventListener("mouseup",i.mouseup),i.mouseup=null),4&t?i.mousedrag||(i.mousedrag=a):(e._document.removeEventListener("mousemove",i.mousedrag),i.mousedrag=null)}))),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(p.addDisposableDomListener(n,"mousedown",(function(t){if(t.preventDefault(),e.focus(),e._coreMouseService.areMouseEventsActive&&!e._selectionService.shouldForceSelection(t))return r(t),i.mouseup&&e._document.addEventListener("mouseup",i.mouseup),i.mousedrag&&e._document.addEventListener("mousemove",i.mousedrag),e.cancel(t)}))),this.register(p.addDisposableDomListener(n,"wheel",(function(t){if(i.wheel);else if(!e.buffer.hasScrollback){var n=e.viewport.getLinesScrolled(t);if(0===n)return;for(var r=l.C0.ESC+(e._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(t.deltaY<0?"A":"B"),o="",s=0;s<Math.abs(n);s++)o+=r;e._coreService.triggerDataEvent(o,!0)}}),{passive:!0})),this.register(p.addDisposableDomListener(n,"wheel",(function(t){if(!i.wheel)return e.viewport.onWheel(t)?void 0:e.cancel(t)}),{passive:!1})),this.register(p.addDisposableDomListener(n,"touchstart",(function(t){if(!e._coreMouseService.areMouseEventsActive)return e.viewport.onTouchStart(t),e.cancel(t)}),{passive:!0})),this.register(p.addDisposableDomListener(n,"touchmove",(function(t){if(!e._coreMouseService.areMouseEventsActive)return e.viewport.onTouchMove(t)?void 0:e.cancel(t)}),{passive:!1}))},t.prototype.refresh=function(e,t){var n;null===(n=this._renderService)||void 0===n||n.refreshRows(e,t)},t.prototype._queueLinkification=function(e,t){var n;null===(n=this.linkifier)||void 0===n||n.linkifyRows(e,t)},t.prototype.updateCursorStyle=function(e){this._selectionService&&this._selectionService.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},t.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},t.prototype.scrollLines=function(t,n){e.prototype.scrollLines.call(this,t,n),this.refresh(0,this.rows-1)},t.prototype.paste=function(e){a.paste(e,this.textarea,this._coreService)},t.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},t.prototype.registerLinkMatcher=function(e,t,n){var r=this.linkifier.registerLinkMatcher(e,t,n);return this.refresh(0,this.rows-1),r},t.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},t.prototype.registerLinkProvider=function(e){return this.linkifier2.registerLinkProvider(e)},t.prototype.registerCharacterJoiner=function(e){var t=this._renderService.registerCharacterJoiner(e);return this.refresh(0,this.rows-1),t},t.prototype.deregisterCharacterJoiner=function(e){this._renderService.deregisterCharacterJoiner(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(t.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),t.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},t.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},t.prototype.select=function(e,t,n){this._selectionService.setSelection(e,t,n)},t.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},t.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]}},t.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},t.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},t.prototype.selectLines=function(e,t){var n;null===(n=this._selectionService)||void 0===n||n.selectLines(e,t)},t.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=b.evaluateKeyboardEvent(e,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===t.type||2===t.type){var n=this.rows-1;return this.scrollLines(2===t.type?-n:n),this.cancel(e,!0)}return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(t.key!==l.C0.ETX&&t.key!==l.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this._showCursor(),this._coreService.triggerDataEvent(t.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0)))},t.prototype._isThirdLevelShift=function(e,t){var n=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"===t.type?n:n&&(!t.keyCode||t.keyCode>47)},t.prototype._keyUp=function(e){this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e))},t.prototype._keyPress=function(e){var t;if(this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this._coreService.triggerDataEvent(t,!0),0))},t.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},t.prototype.resize=function(t,n){t!==this.cols||n!==this.rows?e.prototype.resize.call(this,t,n):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},t.prototype._afterResize=function(e,t){var n,r;null===(n=this._charSizeService)||void 0===n||n.measure(),null===(r=this.viewport)||void 0===r||r.syncScrollArea(!0)},t.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){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 e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(w.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},t.prototype.reset=function(){var t,n;this.options.rows=this.rows,this.options.cols=this.cols;var r=this._customKeyEventHandler;this._setup(),e.prototype.reset.call(this),null===(t=this._selectionService)||void 0===t||t.reset(),this._customKeyEventHandler=r,this.refresh(0,this.rows-1),null===(n=this.viewport)||void 0===n||n.syncScrollArea()},t.prototype._reportWindowsOptions=function(e){if(this._renderService)switch(e){case c.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var t=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),n=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(l.C0.ESC+"[4;"+n+";"+t+"t");break;case c.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var r=this._renderService.dimensions.scaledCellWidth.toFixed(0),i=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(l.C0.ESC+"[6;"+i+";"+r+"t")}},t.prototype.cancel=function(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1},t.prototype._visualBell=function(){return!1},t.prototype._soundBell=function(){return"sound"===this.options.bellStyle},t}(M.CoreTerminal);t.Terminal=I},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;var o=n(5),s=n(1),a=function(){function e(e,t,n,r,i,o){this._textarea=e,this._compositionView=t,this._bufferService=n,this._optionsService=r,this._charSizeService=i,this._coreService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(e.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),e.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},e.prototype.compositionupdate=function(e){var t=this;this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((function(){t._compositionPosition.end=t._textarea.value.length}),0)},e.prototype.compositionend=function(){this._finalizeComposition(!0)},e.prototype.keydown=function(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)},e.prototype._finalizeComposition=function(e){var t=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){var n={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((function(){if(t._isSendingComposition){t._isSendingComposition=!1;var e=void 0;e=t._isComposing?t._textarea.value.substring(n.start,n.end):t._textarea.value.substring(n.start),t._coreService.triggerDataEvent(e,!0)}}),0)}else{this._isSendingComposition=!1;var r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}},e.prototype._handleAnyTextareaChanges=function(){var e=this,t=this._textarea.value;setTimeout((function(){if(!e._isComposing){var n=e._textarea.value.replace(t,"");n.length>0&&e._coreService.triggerDataEvent(n,!0)}}),0)},e.prototype.updateCompositionElements=function(e){var t=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var n=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),r=this._bufferService.buffer.y*n,i=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=n+"px",this._compositionView.style.lineHeight=n+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var o=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=r+"px",this._textarea.style.width=o.width+"px",this._textarea.style.height=o.height+"px",this._textarea.style.lineHeight=o.height+"px"}e||setTimeout((function(){return t.updateCompositionElements(!0)}),0)}},r([i(2,s.IBufferService),i(3,s.IOptionsService),i(4,o.ICharSizeService),i(5,s.ICoreService)],e)}();t.CompositionHelper=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;var a=n(2),l=n(7),c=n(5),u=n(1),d=function(e){function t(t,n,r,i,o,s,a){var c=e.call(this)||this;return c._scrollLines=t,c._viewportElement=n,c._scrollArea=r,c._bufferService=i,c._optionsService=o,c._charSizeService=s,c._renderService=a,c.scrollBarWidth=0,c._currentRowHeight=0,c._lastRecordedBufferLength=0,c._lastRecordedViewportHeight=0,c._lastRecordedBufferHeight=0,c._lastTouchY=0,c._lastScrollTop=0,c._wheelPartialScroll=0,c._refreshAnimationFrame=null,c._ignoreNextScrollEvent=!1,c.scrollBarWidth=c._viewportElement.offsetWidth-c._scrollArea.offsetWidth||15,c.register(l.addDisposableDomListener(c._viewportElement,"scroll",c._onScroll.bind(c))),setTimeout((function(){return c.syncScrollArea()}),0),c}return i(t,e),t.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},t.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=requestAnimationFrame((function(){return t._innerRefresh()})))},t.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},t.prototype.syncScrollArea=function(e){if(void 0===e&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===t&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},t.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t,!0)}},t.prototype._bubbleScroll=function(e,t){var n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&n<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},t.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return 0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},t.prototype._getPixelsScrolled=function(e){if(0===e.deltaY)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},t.prototype.getLinesScrolled=function(e){if(0===e.deltaY)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},t.prototype._applyScrollModifier=function(e,t){var n=this._optionsService.options.fastScrollModifier;return"alt"===n&&t.altKey||"ctrl"===n&&t.ctrlKey||"shift"===n&&t.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},t.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},t.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},o([s(3,u.IBufferService),s(4,u.IOptionsService),s(5,c.ICharSizeService),s(6,c.IRenderService)],t)}(a.Disposable);t.Viewport=d},function(e,t,n){"use strict";function r(e){return e.replace(/\r?\n/g,"\r")}function i(e,t){return t?"[200~"+e+"[201~":e}function o(e,t,n){e=i(e=r(e),n.decPrivateModes.bracketedPasteMode),n.triggerDataEvent(e,!0),t.value=""}function s(e,t,n){var r=n.getBoundingClientRect(),i=e.clientX-r.left-10,o=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left=i+"px",t.style.top=o+"px",t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=r,t.bracketTextForPaste=i,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,n){e.stopPropagation(),e.clipboardData&&o(e.clipboardData.getData("text/plain"),t,n)},t.paste=o,t.moveTextAreaUnderMouseCursor=s,t.rightClickHandler=function(e,t,n,r,i){s(e,t,n),i&&!r.isClickInSelection(e)&&r.selectWordAtCursor(e),t.value=r.selectionText,t.select()}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;var o=n(2),s=n(15),a=n(21),l=n(22),c=n(24),u=function(){function e(e){this.table=new Uint8Array(e)}return e.prototype.setDefault=function(e,t){s.fill(this.table,e<<4|t)},e.prototype.add=function(e,t,n,r){this.table[t<<8|e]=n<<4|r},e.prototype.addMany=function(e,t,n,r){for(var i=0;i<e.length;i++)this.table[t<<8|e[i]]=n<<4|r},e}();t.TransitionTable=u,t.VT500_TRANSITION_TABLE=function(){var e=new u(4095),t=Array.apply(null,Array(256)).map((function(e,t){return t})),n=function(e,n){return t.slice(e,n)},r=n(32,127),i=n(0,24);i.push(25),i.push.apply(i,n(28,32));var o,s=n(0,14);for(o in e.setDefault(1,0),e.addMany(r,0,2,0),s)e.addMany([24,26,153,154],o,3,0),e.addMany(n(128,144),o,3,0),e.addMany(n(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(i,0,3,0),e.addMany(i,1,3,1),e.add(127,1,0,1),e.addMany(i,8,0,8),e.addMany(i,3,3,3),e.add(127,3,0,3),e.addMany(i,4,3,4),e.add(127,4,0,4),e.addMany(i,6,3,6),e.addMany(i,5,3,5),e.add(127,5,0,5),e.addMany(i,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(n(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(i,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(n(64,127),3,7,0),e.addMany(n(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(n(48,60),4,8,4),e.addMany(n(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(n(32,64),6,0,6),e.add(127,6,0,6),e.addMany(n(64,127),6,0,0),e.addMany(n(32,48),3,9,5),e.addMany(n(32,48),5,9,5),e.addMany(n(48,64),5,0,6),e.addMany(n(64,127),5,7,0),e.addMany(n(32,48),4,9,5),e.addMany(n(32,48),1,9,2),e.addMany(n(32,48),2,9,2),e.addMany(n(48,127),2,10,0),e.addMany(n(48,80),1,10,0),e.addMany(n(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(n(96,127),1,10,0),e.add(80,1,11,9),e.addMany(i,9,0,9),e.add(127,9,0,9),e.addMany(n(28,32),9,0,9),e.addMany(n(32,48),9,9,12),e.addMany(n(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(i,11,0,11),e.addMany(n(32,128),11,0,11),e.addMany(n(28,32),11,0,11),e.addMany(i,10,0,10),e.add(127,10,0,10),e.addMany(n(28,32),10,0,10),e.addMany(n(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(n(32,48),10,9,12),e.addMany(i,12,0,12),e.add(127,12,0,12),e.addMany(n(28,32),12,0,12),e.addMany(n(32,48),12,9,12),e.addMany(n(48,64),12,0,11),e.addMany(n(64,127),12,12,13),e.addMany(n(64,127),10,12,13),e.addMany(n(64,127),9,12,13),e.addMany(i,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(160,0,2,0),e.add(160,8,5,8),e.add(160,6,0,6),e.add(160,11,0,11),e.add(160,13,13,13),e}();var d=function(e){function n(n){void 0===n&&(n=t.VT500_TRANSITION_TABLE);var r=e.call(this)||this;return r._transitions=n,r.initialState=0,r.currentState=r.initialState,r._params=new a.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(e,t,n){},r._executeHandlerFb=function(e){},r._csiHandlerFb=function(e,t){},r._escHandlerFb=function(e){},r._errorHandlerFb=function(e){return e},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new l.OscParser,r._dcsParser=new c.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},(function(){})),r}return i(n,e),n.prototype._identifier=function(e,t){void 0===t&&(t=[64,126]);var n=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((n=e.prefix.charCodeAt(0))&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var r=0;r<e.intermediates.length;++r){var i=e.intermediates.charCodeAt(r);if(32>i||i>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=i}}if(1!==e.final.length)throw new Error("final must be a single byte");var o=e.final.charCodeAt(0);if(t[0]>o||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(n<<=8)|o},n.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},n.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},n.prototype.setPrintHandler=function(e){this._printHandler=e},n.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},n.prototype.addEscHandler=function(e,t){var n=this._identifier(e,[48,126]);void 0===this._escHandlers[n]&&(this._escHandlers[n]=[]);var r=this._escHandlers[n];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},n.prototype.setEscHandler=function(e,t){this._escHandlers[this._identifier(e,[48,126])]=[t]},n.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},n.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},n.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},n.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},n.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},n.prototype.addCsiHandler=function(e,t){var n=this._identifier(e);void 0===this._csiHandlers[n]&&(this._csiHandlers[n]=[]);var r=this._csiHandlers[n];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},n.prototype.setCsiHandler=function(e,t){this._csiHandlers[this._identifier(e)]=[t]},n.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},n.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},n.prototype.addDcsHandler=function(e,t){return this._dcsParser.addHandler(this._identifier(e),t)},n.prototype.setDcsHandler=function(e,t){this._dcsParser.setHandler(this._identifier(e),t)},n.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},n.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},n.prototype.addOscHandler=function(e,t){return this._oscParser.addHandler(e,t)},n.prototype.setOscHandler=function(e,t){this._oscParser.setHandler(e,t)},n.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},n.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},n.prototype.setErrorHandler=function(e){this._errorHandler=e},n.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},n.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},n.prototype.parse=function(e,t){for(var n=0,r=0,i=this.currentState,o=this._oscParser,s=this._dcsParser,a=this._collect,l=this._params,c=this._transitions.table,u=0;u<t;++u){switch((r=c[i<<8|((n=e[u])<160?n:160)])>>4){case 2:for(var d=u+1;;++d){if(d>=t||(n=e[d])<32||n>126&&n<160){this._printHandler(e,u,d),u=d-1;break}if(++d>=t||(n=e[d])<32||n>126&&n<160){this._printHandler(e,u,d),u=d-1;break}if(++d>=t||(n=e[d])<32||n>126&&n<160){this._printHandler(e,u,d),u=d-1;break}if(++d>=t||(n=e[d])<32||n>126&&n<160){this._printHandler(e,u,d),u=d-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:u,code:n,currentState:i,collect:a,params:l,abort:!1}).abort)return;break;case 7:for(var h=this._csiHandlers[a<<8|n],f=h?h.length-1:-1;f>=0&&!1===h[f](l);f--);f<0&&this._csiHandlerFb(a<<8|n,l),this.precedingCodepoint=0;break;case 8:do{switch(n){case 59:l.addParam(0);break;case 58:l.addSubParam(-1);break;default:l.addDigit(n-48)}}while(++u<t&&(n=e[u])>47&&n<60);u--;break;case 9:a<<=8,a|=n;break;case 10:for(var p=this._escHandlers[a<<8|n],m=p?p.length-1:-1;m>=0&&!1===p[m]();m--);m<0&&this._escHandlerFb(a<<8|n),this.precedingCodepoint=0;break;case 11:l.reset(),l.addParam(0),a=0;break;case 12:s.hook(a<<8|n,l);break;case 13:for(var v=u+1;;++v)if(v>=t||24===(n=e[v])||26===n||27===n||n>127&&n<160){s.put(e,u,v),u=v-1;break}break;case 14:s.unhook(24!==n&&26!==n),27===n&&(r|=1),l.reset(),l.addParam(0),a=0,this.precedingCodepoint=0;break;case 4:o.start();break;case 5:for(var g=u+1;;g++)if(g>=t||(n=e[g])<32||n>127&&n<=159){o.put(e,u,g),u=g-1;break}break;case 6:o.end(24!==n&&26!==n),27===n&&(r|=1),l.reset(),l.addParam(0),a=0,this.precedingCodepoint=0}i=15&r}this._collect=a,this.currentState=i},n}(o.Disposable);t.EscapeSequenceParser=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var a=n(41),l=n(47),c=n(48),u=n(49),d=n(29),h=n(2),f=n(5),p=n(1),m=n(25),v=n(0),g=1,y=function(e){function t(t,n,r,i,o,s,h,f,p){var m=e.call(this)||this;m._colors=t,m._screenElement=n,m._bufferService=o,m._charSizeService=s,m._optionsService=h,m._id=g++,m._onRequestRedraw=new v.EventEmitter;var y=m._optionsService.options.allowTransparency;return m._characterJoinerRegistry=new d.CharacterJoinerRegistry(m._bufferService),m._renderLayers=[new a.TextRenderLayer(m._screenElement,0,m._colors,m._characterJoinerRegistry,y,m._id,m._bufferService,h),new l.SelectionRenderLayer(m._screenElement,1,m._colors,m._id,m._bufferService,h),new u.LinkRenderLayer(m._screenElement,2,m._colors,m._id,r,i,m._bufferService,h),new c.CursorRenderLayer(m._screenElement,3,m._colors,m._id,m._onRequestRedraw,m._bufferService,h,f,p)],m.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},m._devicePixelRatio=window.devicePixelRatio,m._updateDimensions(),m.onOptionsChanged(),m}return i(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){for(var t=0,n=this._renderLayers;t<n.length;t++)n[t].dispose();e.prototype.dispose.call(this),m.removeTerminalFromCache(this._id)},t.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},t.prototype.setColors=function(e){this._colors=e;for(var t=0,n=this._renderLayers;t<n.length;t++){var r=n[t];r.setColors(this._colors),r.reset()}},t.prototype.onResize=function(e,t){this._updateDimensions();for(var n=0,r=this._renderLayers;n<r.length;n++)r[n].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},t.prototype.onBlur=function(){this._runOperation((function(e){return e.onBlur()}))},t.prototype.onFocus=function(){this._runOperation((function(e){return e.onFocus()}))},t.prototype.onSelectionChanged=function(e,t,n){void 0===n&&(n=!1),this._runOperation((function(r){return r.onSelectionChanged(e,t,n)}))},t.prototype.onCursorMove=function(){this._runOperation((function(e){return e.onCursorMove()}))},t.prototype.onOptionsChanged=function(){this._runOperation((function(e){return e.onOptionsChanged()}))},t.prototype.clear=function(){this._runOperation((function(e){return e.reset()}))},t.prototype._runOperation=function(e){for(var t=0,n=this._renderLayers;t<n.length;t++)e(n[t])},t.prototype.renderRows=function(e,t){for(var n=0,r=this._renderLayers;n<r.length;n++)r[n].onGridChanged(e,t)},t.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=1===this._optionsService.options.lineHeight?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)},t.prototype.registerCharacterJoiner=function(e){return this._characterJoinerRegistry.registerCharacterJoiner(e)},t.prototype.deregisterCharacterJoiner=function(e){return this._characterJoinerRegistry.deregisterCharacterJoiner(e)},o([s(4,p.IBufferService),s(5,f.ICharSizeService),s(6,p.IOptionsService),s(7,p.ICoreService),s(8,f.ICoreBrowserService)],t)}(h.Disposable);t.Renderer=y},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;var o=n(42),s=n(13),a=n(6),l=n(3),c=n(29),u=n(4),d=function(e){function t(t,n,r,i,s,a,l,c){var d=e.call(this,t,"text",n,s,r,a,l,c)||this;return d._characterWidth=0,d._characterFont="",d._characterOverlapCache={},d._workCell=new u.CellData,d._state=new o.GridCache,d._characterJoinerRegistry=i,d}return i(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t);var n=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===n||(this._characterWidth=t.scaledCharWidth,this._characterFont=n,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},t.prototype.reset=function(){this._state.clear(),this._clearAll()},t.prototype._forEachCell=function(e,t,n,r){for(var i=e;i<=t;i++)for(var o=i+this._bufferService.buffer.ydisp,s=this._bufferService.buffer.lines.get(o),a=n?n.getJoinedCharacters(o):[],u=0;u<this._bufferService.cols;u++){s.loadCell(u,this._workCell);var d=this._workCell,h=!1,f=u;if(0!==d.getWidth()){if(a.length>0&&u===a[0][0]){h=!0;var p=a.shift();d=new c.JoinedCellData(this._workCell,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1}!h&&this._isOverlapping(d)&&f<s.length-1&&s.getCodePoint(f+1)===l.NULL_CELL_CODE&&(d.content&=-12582913,d.content|=2<<22),r(d,u,i),u=f}}},t.prototype._drawBackground=function(e,t){var n=this,r=this._ctx,i=this._bufferService.cols,o=0,s=0,l=null;r.save(),this._forEachCell(e,t,null,(function(e,t,c){var u=null;e.isInverse()?u=e.isFgDefault()?n._colors.foreground.css:e.isFgRGB()?"rgb("+a.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":n._colors.ansi[e.getFgColor()].css:e.isBgRGB()?u="rgb("+a.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":e.isBgPalette()&&(u=n._colors.ansi[e.getBgColor()].css),null===l&&(o=t,s=c),c!==s?(r.fillStyle=l||"",n._fillCells(o,s,i-o,1),o=t,s=c):l!==u&&(r.fillStyle=l||"",n._fillCells(o,s,t-o,1),o=t,s=c),l=u})),null!==l&&(r.fillStyle=l,this._fillCells(o,s,i-o,1)),r.restore()},t.prototype._drawForeground=function(e,t){var n=this;this._forEachCell(e,t,this._characterJoinerRegistry,(function(e,t,r){if(!e.isInvisible()&&(n._drawChars(e,t,r),e.isUnderline())){if(n._ctx.save(),e.isInverse())if(e.isBgDefault())n._ctx.fillStyle=n._colors.background.css;else if(e.isBgRGB())n._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var i=e.getBgColor();n._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&i<8&&(i+=8),n._ctx.fillStyle=n._colors.ansi[i].css}else if(e.isFgDefault())n._ctx.fillStyle=n._colors.foreground.css;else if(e.isFgRGB())n._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();n._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),n._ctx.fillStyle=n._colors.ansi[o].css}n._fillBottomLineAtCells(t,r,e.getWidth()),n._ctx.restore()}}))},t.prototype.onGridChanged=function(e,t){0!==this._state.cache.length&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,t-e+1),this._drawBackground(e,t),this._drawForeground(e,t))},t.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},t.prototype._isOverlapping=function(e){if(1!==e.getWidth())return!1;if(e.getCode()<256)return!1;var t=e.getChars();if(this._characterOverlapCache.hasOwnProperty(t))return this._characterOverlapCache[t];this._ctx.save(),this._ctx.font=this._characterFont;var n=Math.floor(this._ctx.measureText(t).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=n,n},t}(s.BaseRenderLayer);t.TextRenderLayer=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0;var r=function(){function e(){this.cache=[]}return e.prototype.resize=function(e,t){for(var n=0;n<e;n++){this.cache.length<=n&&this.cache.push([]);for(var r=this.cache[n].length;r<t;r++)this.cache[n].push(void 0);this.cache[n].length=t}this.cache.length=e},e.prototype.clear=function(){for(var e=0;e<this.cache.length;e++)for(var t=0;t<this.cache[e].length;t++)this.cache[e][t]=void 0},e}();t.GridCache=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCharAtlas=t.DynamicCharAtlas=t.getGlyphCacheKey=void 0;var o=n(9),s=n(44),a=n(27),l=n(46),c=n(11),u=n(28),d=n(10),h={css:"rgba(0, 0, 0, 0)",rgba:0};function f(e){return e.code<<21|e.bg<<12|e.fg<<3|(e.bold?0:4)+(e.dim?0:2)+(e.italic?0:1)}t.getGlyphCacheKey=f;var p=function(e){function t(t,n){var r=e.call(this)||this;r._config=n,r._drawToCacheCount=0,r._glyphsWaitingOnBitmap=[],r._bitmapCommitTimeout=null,r._bitmap=null,r._cacheCanvas=t.createElement("canvas"),r._cacheCanvas.width=1024,r._cacheCanvas.height=1024,r._cacheCtx=u.throwIfFalsy(r._cacheCanvas.getContext("2d",{alpha:!0}));var i=t.createElement("canvas");i.width=r._config.scaledCharWidth,i.height=r._config.scaledCharHeight,r._tmpCtx=u.throwIfFalsy(i.getContext("2d",{alpha:r._config.allowTransparency})),r._width=Math.floor(1024/r._config.scaledCharWidth),r._height=Math.floor(1024/r._config.scaledCharHeight);var o=r._width*r._height;return r._cacheMap=new l.LRUMap(o),r._cacheMap.prealloc(o),r}return i(t,e),t.prototype.dispose=function(){null!==this._bitmapCommitTimeout&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},t.prototype.beginFrame=function(){this._drawToCacheCount=0},t.prototype.draw=function(e,t,n,r){if(32===t.code)return!0;if(!this._canCache(t))return!1;var i=f(t),o=this._cacheMap.get(i);if(null!=o)return this._drawFromCache(e,o,n,r),!0;if(this._drawToCacheCount<100){var s=void 0;s=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var a=this._drawToCache(t,s);return this._cacheMap.set(i,a),this._drawFromCache(e,a,n,r),!0}return!1},t.prototype._canCache=function(e){return e.code<256},t.prototype._toCoordinateX=function(e){return e%this._width*this._config.scaledCharWidth},t.prototype._toCoordinateY=function(e){return Math.floor(e/this._width)*this._config.scaledCharHeight},t.prototype._drawFromCache=function(e,t,n,r){if(!t.isEmpty){var i=this._toCoordinateX(t.index),o=this._toCoordinateY(t.index);e.drawImage(t.inBitmap?this._bitmap:this._cacheCanvas,i,o,this._config.scaledCharWidth,this._config.scaledCharHeight,n,r,this._config.scaledCharWidth,this._config.scaledCharHeight)}},t.prototype._getColorFromAnsiIndex=function(e){return e<this._config.colors.ansi.length?this._config.colors.ansi[e]:a.DEFAULT_ANSI_COLORS[e]},t.prototype._getBackgroundColor=function(e){return this._config.allowTransparency?h:e.bg===o.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:e.bg<256?this._getColorFromAnsiIndex(e.bg):this._config.colors.background},t.prototype._getForegroundColor=function(e){return e.fg===o.INVERTED_DEFAULT_COLOR?d.color.opaque(this._config.colors.background):e.fg<256?this._getColorFromAnsiIndex(e.fg):this._config.colors.foreground},t.prototype._drawToCache=function(e,t){this._drawToCacheCount++,this._tmpCtx.save();var n=this._getBackgroundColor(e);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=n.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var r=e.bold?this._config.fontWeightBold:this._config.fontWeight,i=e.italic?"italic":"";this._tmpCtx.font=i+" "+r+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(e).css,e.dim&&(this._tmpCtx.globalAlpha=o.DIM_OPACITY),this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var s=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),a=!1;this._config.allowTransparency||(a=function(e,t){for(var n=!0,r=t.rgba>>>24,i=t.rgba>>>16&255,o=t.rgba>>>8&255,s=0;s<e.data.length;s+=4)e.data[s]===r&&e.data[s+1]===i&&e.data[s+2]===o?e.data[s+3]=0:n=!1;return n}(s,n));var l=this._toCoordinateX(t),c=this._toCoordinateY(t);this._cacheCtx.putImageData(s,l,c);var u={index:t,isEmpty:a,inBitmap:!1};return this._addGlyphToBitmap(u),u},t.prototype._addGlyphToBitmap=function(e){var t=this;!("createImageBitmap"in window)||c.isFirefox||c.isSafari||(this._glyphsWaitingOnBitmap.push(e),null===this._bitmapCommitTimeout&&(this._bitmapCommitTimeout=window.setTimeout((function(){return t._generateBitmap()}),100)))},t.prototype._generateBitmap=function(){var e=this,t=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then((function(n){e._bitmap=n;for(var r=0;r<t.length;r++)t[r].inBitmap=!0})),this._bitmapCommitTimeout=null},t}(s.BaseCharAtlas);t.DynamicCharAtlas=p;var m=function(e){function t(t,n){return e.call(this)||this}return i(t,e),t.prototype.draw=function(e,t,n,r){return!1},t}(s.BaseCharAtlas);t.NoneCharAtlas=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCharAtlas=void 0;var r=function(){function e(){this._didWarmUp=!1}return e.prototype.dispose=function(){},e.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},e.prototype._doWarmUp=function(){},e.prototype.beginFrame=function(){},e}();t.BaseCharAtlas=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;var r=function(){function e(){this._color={},this._rgba={}}return e.prototype.clear=function(){this._color={},this._rgba={}},e.prototype.setCss=function(e,t,n){this._rgba[e]||(this._rgba[e]={}),this._rgba[e][t]=n},e.prototype.getCss=function(e,t){return this._rgba[e]?this._rgba[e][t]:void 0},e.prototype.setColor=function(e,t,n){this._color[e]||(this._color[e]={}),this._color[e][t]=n},e.prototype.getColor=function(e,t){return this._color[e]?this._color[e][t]:void 0},e}();t.ColorContrastCache=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUMap=void 0;var r=function(){function e(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return e.prototype._unlinkNode=function(e){var t=e.prev,n=e.next;e===this._head&&(this._head=n),e===this._tail&&(this._tail=t),null!==t&&(t.next=n),null!==n&&(n.prev=t)},e.prototype._appendNode=function(e){var t=this._tail;null!==t&&(t.next=e),e.prev=t,e.next=null,this._tail=e,null===this._head&&(this._head=e)},e.prototype.prealloc=function(e){for(var t=this._nodePool,n=0;n<e;n++)t.push({prev:null,next:null,key:null,value:null})},e.prototype.get=function(e){var t=this._map[e];return void 0!==t?(this._unlinkNode(t),this._appendNode(t),t.value):null},e.prototype.peekValue=function(e){var t=this._map[e];return void 0!==t?t.value:null},e.prototype.peek=function(){var e=this._head;return null===e?null:e.value},e.prototype.set=function(e,t){var n=this._map[e];if(void 0!==n)n=this._map[e],this._unlinkNode(n),n.value=t;else if(this.size>=this.capacity)n=this._head,this._unlinkNode(n),delete this._map[n.key],n.key=e,n.value=t,this._map[e]=n;else{var r=this._nodePool;r.length>0?((n=r.pop()).key=e,n.value=t):n={prev:null,next:null,key:e,value:t},this._map[e]=n,this.size++}this._appendNode(n)},e}();t.LRUMap=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;var o=function(e){function t(t,n,r,i,o,s){var a=e.call(this,t,"selection",n,!0,r,i,o,s)||this;return a._clearState(),a}return i(t,e),t.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._clearState()},t.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},t.prototype.onSelectionChanged=function(e,t,n){if(this._didStateChange(e,t,n,this._bufferService.buffer.ydisp))if(this._clearAll(),e&&t){var r=e[1]-this._bufferService.buffer.ydisp,i=t[1]-this._bufferService.buffer.ydisp,o=Math.max(r,0),s=Math.min(i,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||s<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var a=e[0],l=t[0]-a,c=s-o+1;this._fillCells(a,o,l,c)}else{a=r===o?e[0]:0;var u=o===s?t[0]:this._bufferService.cols;this._fillCells(a,o,u-a,1);var d=Math.max(s-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,d),o!==s){var h=i===s?t[0]:this._bufferService.cols;this._fillCells(0,s,h,1)}}this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},t.prototype._didStateChange=function(e,t,n,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||n!==this._state.columnSelectMode||r!==this._state.ydisp},t.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},t}(n(13).BaseRenderLayer);t.SelectionRenderLayer=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;var o=n(13),s=n(4),a=function(e){function t(t,n,r,i,o,a,l,c,u){var d=e.call(this,t,"cursor",n,!0,r,i,a,l)||this;return d._onRequestRedraw=o,d._coreService=c,d._coreBrowserService=u,d._cell=new s.CellData,d._state={x:0,y:0,isFocused:!1,style:"",width:0},d._cursorRenderers={bar:d._renderBarCursor.bind(d),block:d._renderBlockCursor.bind(d),underline:d._renderUnderlineCursor.bind(d)},d}return i(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},t.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new l(this._coreBrowserService.isFocused,(function(){t._render(!0)}))):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,n=t-this._bufferService.buffer.ydisp;if(n<0||n>=this._bufferService.rows)this._clearCursor();else{var r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(r,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var i=this._optionsService.options.cursorStyle;return i&&"block"!==i?this._cursorRenderers[i](r,n,this._cell):this._renderBlurCursor(r,n,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=n,this._state.isFocused=!1,this._state.style=i,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===r&&this._state.y===n&&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"](r,n,this._cell),this._ctx.restore(),this._state.x=r,this._state.y=n,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.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})},t.prototype._renderBarCursor=function(e,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.options.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(e,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,n.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(n,e,t),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(e,t,n){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},t.prototype._renderBlurCursor=function(e,t,n){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,n.getWidth(),1),this._ctx.restore()},t}(o.BaseRenderLayer);t.CursorRenderLayer=a;var l=function(){function e(e,t){this._renderCallback=t,this.isCursorVisible=!0,e&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.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)},e.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))))},e.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout((function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,e>0)return void t._restartInterval(e)}t.isCursorVisible=!1,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0})),t._blinkInterval=window.setInterval((function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);return t._animationTimeRestarted=void 0,void t._restartInterval(e)}t.isCursorVisible=!t.isCursorVisible,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0}))}),600)}),e)},e.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)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;var o=n(13),s=n(9),a=n(26),l=function(e){function t(t,n,r,i,o,s,a,l){var c=e.call(this,t,"link",n,!0,r,i,a,l)||this;return o.onShowLinkUnderline((function(e){return c._onShowLinkUnderline(e)})),o.onHideLinkUnderline((function(e){return c._onHideLinkUnderline(e)})),s.onShowLinkUnderline((function(e){return c._onShowLinkUnderline(e)})),s.onHideLinkUnderline((function(e){return c._onHideLinkUnderline(e)})),c}return i(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state=void 0},t.prototype.reset=function(){this._clearCurrentLink()},t.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}},t.prototype._onShowLinkUnderline=function(e){if(e.fg===s.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&a.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 t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},t.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},t}(o.BaseRenderLayer);t.LinkRenderLayer=l},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZone=t.Linkifier=void 0;var o=n(0),s=n(1),a=function(){function e(e,t,n){this._bufferService=e,this._logService=t,this._unicodeService=n,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new o.EventEmitter,this._onHideLinkUnderline=new o.EventEmitter,this._onLinkTooltip=new o.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(e.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),e.prototype.attachToDom=function(e,t){this._element=e,this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,n){var r=this;this._mouseZoneManager&&(void 0===this._rowsToLinkify.start||void 0===this._rowsToLinkify.end?(this._rowsToLinkify.start=t,this._rowsToLinkify.end=n):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,t),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,n)),this._mouseZoneManager.clearAll(t,n),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout((function(){return r._linkifyRows()}),e._timeBeforeLatency))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var e=this._bufferService.buffer;if(void 0!==this._rowsToLinkify.start&&void 0!==this._rowsToLinkify.end){var t=e.ydisp+this._rowsToLinkify.start;if(!(t>=e.lines.length)){for(var n=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),i=this._bufferService.buffer.iterator(!1,t,n,r,r);i.hasNext();)for(var o=i.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(o.range.first,o.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},e.prototype.registerLinkMatcher=function(e,t,n){if(void 0===n&&(n={}),!t)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:e,handler:t,matchIndex:n.matchIndex,validationCallback:n.validationCallback,hoverTooltipCallback:n.tooltipCallback,hoverLeaveCallback:n.leaveCallback,willLinkActivate:n.willLinkActivate,priority:n.priority||0};return this._addLinkMatcherToList(r),r.id},e.prototype._addLinkMatcherToList=function(e){if(0!==this._linkMatchers.length){for(var t=this._linkMatchers.length-1;t>=0;t--)if(e.priority<=this._linkMatchers[t].priority)return void this._linkMatchers.splice(t+1,0,e);this._linkMatchers.splice(0,0,e)}else this._linkMatchers.push(e)},e.prototype.deregisterLinkMatcher=function(e){for(var t=0;t<this._linkMatchers.length;t++)if(this._linkMatchers[t].id===e)return this._linkMatchers.splice(t,1),!0;return!1},e.prototype._doLinkifyRow=function(e,t,n){for(var r,i=this,o=new RegExp(n.regex.source,(n.regex.flags||"")+"g"),s=-1,a=function(){var a=r["number"!=typeof n.matchIndex?0:n.matchIndex];if(!a)return l._logService.debug("match found without corresponding matchIndex",r,n),"break";if(s=t.indexOf(a,s+1),o.lastIndex=s+a.length,s<0)return"break";var c=l._bufferService.buffer.stringIndexToBufferIndex(e,s);if(c[0]<0)return"break";var u=l._bufferService.buffer.lines.get(c[0]);if(!u)return"break";var d=u.getFg(c[1]),h=d?d>>9&511:void 0;n.validationCallback?n.validationCallback(a,(function(e){i._rowsTimeoutId||e&&i._addLink(c[1],c[0]-i._bufferService.buffer.ydisp,a,n,h)})):l._addLink(c[1],c[0]-l._bufferService.buffer.ydisp,a,n,h)},l=this;null!==(r=o.exec(t))&&"break"!==a(););},e.prototype._addLink=function(e,t,n,r,i){var o=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(n),a=e%this._bufferService.cols,c=t+Math.floor(e/this._bufferService.cols),u=(a+s)%this._bufferService.cols,d=c+Math.floor((a+s)/this._bufferService.cols);0===u&&(u=this._bufferService.cols,d--),this._mouseZoneManager.add(new l(a+1,c+1,u+1,d+1,(function(e){if(r.handler)return r.handler(e,n);var t=window.open();t?(t.opener=null,t.location.href=n):console.warn("Opening link blocked as opener could not be cleared")}),(function(){o._onShowLinkUnderline.fire(o._createLinkHoverEvent(a,c,u,d,i)),o._element.classList.add("xterm-cursor-pointer")}),(function(e){o._onLinkTooltip.fire(o._createLinkHoverEvent(a,c,u,d,i)),r.hoverTooltipCallback&&r.hoverTooltipCallback(e,n,{start:{x:a,y:c},end:{x:u,y:d}})}),(function(){o._onHideLinkUnderline.fire(o._createLinkHoverEvent(a,c,u,d,i)),o._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()}),(function(e){return!r.willLinkActivate||r.willLinkActivate(e,n)})))}},e.prototype._createLinkHoverEvent=function(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}},e._timeBeforeLatency=200,e=r([i(0,s.IBufferService),i(1,s.ILogService),i(2,s.IUnicodeService)],e)}();t.Linkifier=a;var l=function(e,t,n,r,i,o,s,a,l){this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.clickCallback=i,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=l};t.MouseZone=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;var a=n(11),l=n(52),c=n(4),u=n(0),d=n(5),h=n(1),f=n(30),p=n(53),m=n(2),v=String.fromCharCode(160),g=new RegExp(v,"g"),y=function(e){function t(t,n,r,i,o,s,a){var d=e.call(this)||this;return d._element=t,d._screenElement=n,d._bufferService=r,d._coreService=i,d._mouseService=o,d._optionsService=s,d._renderService=a,d._dragScrollAmount=0,d._enabled=!0,d._workCell=new c.CellData,d._mouseDownTimeStamp=0,d._onLinuxMouseSelection=d.register(new u.EventEmitter),d._onRedrawRequest=d.register(new u.EventEmitter),d._onSelectionChange=d.register(new u.EventEmitter),d._onRequestScrollLines=d.register(new u.EventEmitter),d._mouseMoveListener=function(e){return d._onMouseMove(e)},d._mouseUpListener=function(e){return d._onMouseUp(e)},d._coreService.onUserInput((function(){d.hasSelection&&d.clearSelection()})),d._trimListener=d._bufferService.buffer.lines.onTrim((function(e){return d._onTrim(e)})),d.register(d._bufferService.buffers.onBufferActivate((function(e){return d._onBufferActivate(e)}))),d.enable(),d._model=new l.SelectionModel(d._bufferService),d._activeSelectionMode=0,d}return i(t,e),Object.defineProperty(t.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._removeMouseDownListeners()},t.prototype.reset=function(){this.clearSelection()},t.prototype.disable=function(){this.clearSelection(),this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSelection",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionText",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";var n=this._bufferService.buffer,r=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";for(var i=e[1];i<=t[1];i++){var o=n.translateBufferLineToString(i,!0,e[0],t[0]);r.push(o)}}else{var s=e[1]===t[1]?t[0]:void 0;for(r.push(n.translateBufferLineToString(e[1],!0,e[0],s)),i=e[1]+1;i<=t[1]-1;i++){var l=n.lines.get(i);o=n.translateBufferLineToString(i,!0),l&&l.isWrapped?r[r.length-1]+=o:r.push(o)}e[1]!==t[1]&&(l=n.lines.get(t[1]),o=n.translateBufferLineToString(t[1],!0,0,t[0]),l&&l.isWrapped?r[r.length-1]+=o:r.push(o))}return r.map((function(e){return e.replace(g," ")})).join(a.isWindows?"\r\n":"\n")},enumerable:!1,configurable:!0}),t.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},t.prototype.refresh=function(e){var t=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame((function(){return t._refresh()}))),a.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},t.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})},t.prototype.isClickInSelection=function(e){var t=this._getMouseBufferCoords(e),n=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!!(n&&r&&t)&&this._areCoordsInSelection(t,n,r)},t.prototype._areCoordsInSelection=function(e,t,n){return e[1]>t[1]&&e[1]<n[1]||t[1]===n[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<n[0]||t[1]<n[1]&&e[1]===n[1]&&e[0]<n[0]||t[1]<n[1]&&e[1]===t[1]&&e[0]>=t[0]},t.prototype.selectWordAtCursor=function(e){var t=this._getMouseBufferCoords(e);t&&(this._selectWordAt(t,!1),this._model.selectionEnd=void 0,this.refresh(!0))},t.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},t.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},t.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},t.prototype._getMouseBufferCoords=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t},t.prototype._getMouseEventScrollAmount=function(e){var t=f.getCoordsRelativeToElement(e,this._screenElement)[1],n=this._renderService.dimensions.canvasHeight;return t>=0&&t<=n?0:(t>n&&(t-=n),t=Math.min(Math.max(t,-50),50),(t/=50)/Math.abs(t)+Math.round(14*t))},t.prototype.shouldForceSelection=function(e){return a.isMac?e.altKey&&this._optionsService.options.macOptionClickForcesSelection:e.shiftKey},t.prototype.onMouseDown=function(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._onIncrementalClick(e):1===e.detail?this._onSingleClick(e):2===e.detail?this._onDoubleClick(e):3===e.detail&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}},t.prototype._addMouseDownListeners=function(){var e=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval((function(){return e._dragScroll()}),50)},t.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},t.prototype._onIncrementalClick=function(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))},t.prototype._onSingleClick=function(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),this._model.selectionStart){this._model.selectionEnd=void 0;var t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}},t.prototype._onDoubleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=1,this._selectWordAt(t,!0))},t.prototype._onTripleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))},t.prototype.shouldColumnSelect=function(e){return e.altKey&&!(a.isMac&&this._optionsService.options.macOptionClickForcesSelection)},t.prototype._onMouseMove=function(e){if(e.stopImmediatePropagation(),this._model.selectionStart){var t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),this._model.selectionEnd){2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var n=this._bufferService.buffer;if(this._model.selectionEnd[1]<n.lines.length){var r=n.lines.get(this._model.selectionEnd[1]);r&&0===r.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},t.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var e=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}},t.prototype._onMouseUp=function(e){var t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var n=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(n&&void 0!==n[0]&&void 0!==n[1]){var r=p.moveToCellSequence(n[0]-1,n[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(r,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},t.prototype._onBufferActivate=function(e){var t=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((function(e){return t._onTrim(e)}))},t.prototype._convertViewportColToCharacterIndex=function(e,t){for(var n=t[0],r=0;t[0]>=r;r++){var i=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?n--:i>1&&t[0]!==r&&(n+=i-1)}return n},t.prototype.setSelection=function(e,t,n){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=n,this.refresh()},t.prototype._getWordAt=function(e,t,n,r){if(void 0===n&&(n=!0),void 0===r&&(r=!0),!(e[0]>=this._bufferService.cols)){var i=this._bufferService.buffer,o=i.lines.get(e[1]);if(o){var s=i.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),l=a,c=e[0]-a,u=0,d=0,h=0,f=0;if(" "===s.charAt(a)){for(;a>0&&" "===s.charAt(a-1);)a--;for(;l<s.length&&" "===s.charAt(l+1);)l++}else{var p=e[0],m=e[0];0===o.getWidth(p)&&(u++,p--),2===o.getWidth(m)&&(d++,m++);var v=o.getString(m).length;for(v>1&&(f+=v-1,l+=v-1);p>0&&a>0&&!this._isCharWordSeparator(o.loadCell(p-1,this._workCell));){o.loadCell(p-1,this._workCell);var g=this._workCell.getChars().length;0===this._workCell.getWidth()?(u++,p--):g>1&&(h+=g-1,a-=g-1),a--,p--}for(;m<o.length&&l+1<s.length&&!this._isCharWordSeparator(o.loadCell(m+1,this._workCell));){o.loadCell(m+1,this._workCell);var y=this._workCell.getChars().length;2===this._workCell.getWidth()?(d++,m++):y>1&&(f+=y-1,l+=y-1),l++,m++}}l++;var _=a+c-u+h,b=Math.min(this._bufferService.cols,l-a+u+d-h-f);if(t||""!==s.slice(a,l).trim()){if(n&&0===_&&32!==o.getCodePoint(0)){var x=i.lines.get(e[1]-1);if(x&&o.isWrapped&&32!==x.getCodePoint(this._bufferService.cols-1)){var w=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(w){var S=this._bufferService.cols-w.start;_-=S,b+=S}}}if(r&&_+b===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){var C=i.lines.get(e[1]+1);if(C&&C.isWrapped&&32!==C.getCodePoint(0)){var k=this._getWordAt([0,e[1]+1],!1,!1,!0);k&&(b+=k.length)}}return{start:_,length:b}}}}},t.prototype._selectWordAt=function(e,t){var n=this._getWordAt(e,t);if(n){for(;n.start<0;)n.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[n.start,e[1]],this._model.selectionStartLength=n.length}},t.prototype._selectToWordAt=function(e){var t=this._getWordAt(e,!0);if(t){for(var n=e[1];t.start<0;)t.start+=this._bufferService.cols,n--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,n++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,n]}},t.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&this._optionsService.options.wordSeparator.indexOf(e.getChars())>=0},t.prototype._selectLineAt=function(e){var t=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,t.first],this._model.selectionEnd=[this._bufferService.cols,t.last],this._model.selectionStartLength=0},o([s(2,h.IBufferService),s(3,h.ICoreService),s(4,d.IMouseService),s(5,h.IOptionsService),s(6,d.IRenderService)],t)}(m.Disposable);t.SelectionService=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0;var r=function(){function e(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}return e.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(e.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(e.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 e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,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}),e.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},e.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},e}();t.SelectionModel=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;var r=n(12);function i(e,t,n,r){var i=e-o(n,e),a=t-o(n,t);return c(Math.abs(i-a)-function(e,t,n){for(var r=0,i=e-o(n,e),a=t-o(n,t),l=0;l<Math.abs(i-a);l++){var c="A"===s(e,t)?-1:1,u=n.buffer.lines.get(i+c*l);u&&u.isWrapped&&r++}return r}(e,t,n),l(s(e,t),r))}function o(e,t){for(var n=0,r=e.buffer.lines.get(t),i=r&&r.isWrapped;i&&t>=0&&t<e.rows;)n++,i=(r=e.buffer.lines.get(--t))&&r.isWrapped;return n}function s(e,t){return e>t?"A":"B"}function a(e,t,n,r,i,o){for(var s=e,a=t,l="";s!==n||a!==r;)s+=i?1:-1,i&&s>o.cols-1?(l+=o.buffer.translateBufferLineToString(a,!1,e,s),s=0,e=0,a++):!i&&s<0&&(l+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return l+o.buffer.translateBufferLineToString(a,!1,e,s)}function l(e,t){var n=t?"O":"[";return r.C0.ESC+n+e}function c(e,t){e=Math.floor(e);for(var n="",r=0;r<e;r++)n+=t;return n}t.moveToCellSequence=function(e,t,n,r){var s,u=n.buffer.x,d=n.buffer.y;if(!n.buffer.hasScrollback)return function(e,t,n,r,s,u){return 0===i(t,r,s,u).length?"":c(a(e,t,e,t-o(s,t),!1,s).length,l("D",u))}(u,d,0,t,n,r)+i(d,t,n,r)+function(e,t,n,r,s,u){var d;d=i(t,r,s,u).length>0?r-o(s,r):t;var h=r,f=function(e,t,n,r,s,a){var l;return l=i(n,r,s,a).length>0?r-o(s,r):t,e<n&&l<=r||e>=n&&l<r?"C":"D"}(e,t,n,r,s,u);return c(a(e,d,n,h,"C"===f,s).length,l(f,u))}(u,d,e,t,n,r);if(d===t)return s=u>e?"D":"C",c(Math.abs(u-e),l(s,r));s=d>t?"D":"C";var h=Math.abs(d-t);return c(function(e,t){return t.cols-e}(d>t?e:u,n)+(h-1)*n.cols+1+((d>t?u:e)-1),l(s,r))}},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SoundService=void 0;var o=n(1),s=function(){function e(e){this._optionsService=e}return Object.defineProperty(e,"audioContext",{get:function(){if(!e._audioContext){var t=window.AudioContext||window.webkitAudioContext;if(!t)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;e._audioContext=new t}return e._audioContext},enumerable:!1,configurable:!0}),e.prototype.playBellSound=function(){var t=e.audioContext;if(t){var n=t.createBufferSource();t.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),(function(e){n.buffer=e,n.connect(t.destination),n.start(0)}))}},e.prototype._base64ToArrayBuffer=function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r.buffer},e.prototype._removeMimeType=function(e){return e.split(",")[1]},e=r([i(0,o.IOptionsService)],e)}();t.SoundService=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZoneManager=void 0;var a=n(2),l=n(7),c=n(5),u=n(1),d=function(e){function t(t,n,r,i,o,s){var a=e.call(this)||this;return a._element=t,a._screenElement=n,a._bufferService=r,a._mouseService=i,a._selectionService=o,a._optionsService=s,a._zones=[],a._areZonesActive=!1,a._lastHoverCoords=[void 0,void 0],a._initialSelectionLength=0,a.register(l.addDisposableDomListener(a._element,"mousedown",(function(e){return a._onMouseDown(e)}))),a._mouseMoveListener=function(e){return a._onMouseMove(e)},a._mouseLeaveListener=function(e){return a._onMouseLeave(e)},a._clickListener=function(e){return a._onClick(e)},a}return i(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},t.prototype.add=function(e){this._zones.push(e),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(e,t){if(0!==this._zones.length){e&&t||(e=0,t=this._bufferService.rows-1);for(var n=0;n<this._zones.length;n++){var r=this._zones[n];(r.y1>e&&r.y1<=t+1||r.y2>e&&r.y2<=t+1||r.y1<e&&r.y2>t+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(n--,1))}0===this._zones.length&&this._deactivate()}},t.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))},t.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))},t.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},t.prototype._onHover=function(e){var t=this,n=this._findZoneEventAt(e);n!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),n&&(this._currentZone=n,n.hoverCallback&&n.hoverCallback(e),this._tooltipTimeout=window.setTimeout((function(){return t._onTooltip(e)}),this._optionsService.options.linkTooltipHoverDuration)))},t.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t&&t.tooltipCallback&&t.tooltipCallback(e)},t.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);(null==t?void 0:t.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())}},t.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},t.prototype._onClick=function(e){var t=this._findZoneEventAt(e),n=this._getSelectionLength();t&&n===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},t.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},t.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var n=t[0],r=t[1],i=0;i<this._zones.length;i++){var o=this._zones[i];if(o.y1===o.y2){if(r===o.y1&&n>=o.x1&&n<o.x2)return o}else if(r===o.y1&&n>=o.x1||r===o.y2&&n<o.x2||r>o.y1&&r<o.y2)return o}},o([s(2,u.IBufferService),s(3,c.IMouseService),s(4,c.ISelectionService),s(5,u.IOptionsService)],t)}(a.Disposable);t.MouseZoneManager=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;var o=n(18),s=n(11),a=n(31),l=n(7),c=n(2),u=n(32),d=n(17),h=function(e){function t(t,n){var r=e.call(this)||this;r._terminal=t,r._renderService=n,r._liveRegionLineCount=0,r._charsToConsume=[],r._charsToAnnounce="",r._accessibilityTreeRoot=document.createElement("div"),r._accessibilityTreeRoot.classList.add("xterm-accessibility"),r._rowContainer=document.createElement("div"),r._rowContainer.classList.add("xterm-accessibility-tree"),r._rowContainer.setAttribute("role","list"),r._rowElements=[];for(var i=0;i<r._terminal.rows;i++)r._rowElements[i]=r._createAccessibilityTreeNode(),r._rowContainer.appendChild(r._rowElements[i]);if(r._topBoundaryFocusListener=function(e){return r._onBoundaryFocus(e,0)},r._bottomBoundaryFocusListener=function(e){return r._onBoundaryFocus(e,1)},r._rowElements[0].addEventListener("focus",r._topBoundaryFocusListener),r._rowElements[r._rowElements.length-1].addEventListener("focus",r._bottomBoundaryFocusListener),r._refreshRowsDimensions(),r._accessibilityTreeRoot.appendChild(r._rowContainer),r._renderRowsDebouncer=new a.RenderDebouncer(r._renderRows.bind(r)),r._refreshRows(),r._liveRegion=document.createElement("div"),r._liveRegion.classList.add("live-region"),r._liveRegion.setAttribute("aria-live","assertive"),r._accessibilityTreeRoot.appendChild(r._liveRegion),!r._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return r._terminal.element.insertAdjacentElement("afterbegin",r._accessibilityTreeRoot),r.register(r._renderRowsDebouncer),r.register(r._terminal.onResize((function(e){return r._onResize(e.rows)}))),r.register(r._terminal.onRender((function(e){return r._refreshRows(e.start,e.end)}))),r.register(r._terminal.onScroll((function(){return r._refreshRows()}))),r.register(r._terminal.onA11yChar((function(e){return r._onChar(e)}))),r.register(r._terminal.onLineFeed((function(){return r._onChar("\n")}))),r.register(r._terminal.onA11yTab((function(e){return r._onTab(e)}))),r.register(r._terminal.onKey((function(e){return r._onKey(e.key)}))),r.register(r._terminal.onBlur((function(){return r._clearLiveRegion()}))),r.register(r._renderService.onDimensionsChange((function(){return r._refreshRowsDimensions()}))),r._screenDprMonitor=new u.ScreenDprMonitor,r.register(r._screenDprMonitor),r._screenDprMonitor.setListener((function(){return r._refreshRowsDimensions()})),r.register(l.addDisposableDomListener(window,"resize",(function(){return r._refreshRowsDimensions()}))),r}return i(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),d.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(e,t){var n=e.target,r=this._rowElements[0===t?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(0===t?"1":""+this._terminal.buffer.lines.length)&&e.relatedTarget===r){var i,o;if(0===t?(i=n,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(i=this._rowElements.shift(),o=n,this._rowContainer.removeChild(i)),i.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){var s=this._createAccessibilityTreeNode();this._rowElements.unshift(s),this._rowContainer.insertAdjacentElement("afterbegin",s)}else s=this._createAccessibilityTreeNode(),this._rowElements.push(s),this._rowContainer.appendChild(s);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}},t.prototype._onResize=function(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},t.prototype._onTab=function(e){for(var t=0;t<e;t++)this._onChar(" ")},t.prototype._onChar=function(e){var t=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)),s.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((function(){t._accessibilityTreeRoot.appendChild(t._liveRegion)}),0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,s.isMac&&d.removeElementFromParent(this._liveRegion)},t.prototype._onKey=function(e){this._clearLiveRegion(),this._charsToConsume.push(e)},t.prototype._refreshRows=function(e,t){this._renderRowsDebouncer.refresh(e,t,this._terminal.rows)},t.prototype._renderRows=function(e,t){for(var n=this._terminal.buffer,r=n.lines.length.toString(),i=e;i<=t;i++){var o=n.translateBufferLineToString(n.ydisp+i,!0),s=(n.ydisp+i+1).toString(),a=this._rowElements[i];a&&(0===o.length?a.innerHTML="&nbsp;":a.textContent=o,a.setAttribute("aria-posinset",s),a.setAttribute("aria-setsize",r))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}},t.prototype._refreshRowDimensions=function(e){e.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(c.Disposable);t.AccessibilityManager=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;var a=n(58),l=n(9),c=n(2),u=n(5),d=n(1),h=n(0),f=n(10),p=n(17),m=1,v=function(e){function t(t,n,r,i,o,s,l,c,u){var d=e.call(this)||this;return d._colors=t,d._element=n,d._screenElement=r,d._viewportElement=i,d._linkifier=o,d._linkifier2=s,d._charSizeService=l,d._optionsService=c,d._bufferService=u,d._terminalClass=m++,d._rowElements=[],d._rowContainer=document.createElement("div"),d._rowContainer.classList.add("xterm-rows"),d._rowContainer.style.lineHeight="normal",d._rowContainer.setAttribute("aria-hidden","true"),d._refreshRowElements(d._bufferService.cols,d._bufferService.rows),d._selectionContainer=document.createElement("div"),d._selectionContainer.classList.add("xterm-selection"),d._selectionContainer.setAttribute("aria-hidden","true"),d.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},d._updateDimensions(),d._injectCss(),d._rowFactory=new a.DomRendererRowFactory(document,d._optionsService,d._colors),d._element.classList.add("xterm-dom-renderer-owner-"+d._terminalClass),d._screenElement.appendChild(d._rowContainer),d._screenElement.appendChild(d._selectionContainer),d._linkifier.onShowLinkUnderline((function(e){return d._onLinkHover(e)})),d._linkifier.onHideLinkUnderline((function(e){return d._onLinkLeave(e)})),d._linkifier2.onShowLinkUnderline((function(e){return d._onLinkHover(e)})),d._linkifier2.onHideLinkUnderline((function(e){return d._onLinkLeave(e)})),d}return i(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return(new h.EventEmitter).event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),p.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),e.prototype.dispose.call(this)},t.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 e=0,t=this._rowElements;e<t.length;e++){var n=t[e];n.style.width=this.dimensions.canvasWidth+"px",n.style.height=this.dimensions.actualCellHeight+"px",n.style.lineHeight=this.dimensions.actualCellHeight+"px",n.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var r=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=r,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.setColors=function(e){this._colors=e,this._injectCss()},t.prototype._injectCss=function(){var e=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var t=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";t+=this._terminalSelector+" span:not(."+a.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+a.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+a.ITALIC_CLASS+" { font-style: italic;}",t+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",t+="@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+"; }}",t+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_BLINK_CLASS+":not(."+a.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_BLINK_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",t+=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(n,r){t+=e._terminalSelector+" .xterm-fg-"+r+" { color: "+n.css+"; }"+e._terminalSelector+" .xterm-bg-"+r+" { background-color: "+n.css+"; }"})),t+=this._terminalSelector+" .xterm-fg-"+l.INVERTED_DEFAULT_COLOR+" { color: "+f.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+l.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=t},t.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},t.prototype._refreshRowElements=function(e,t){for(var n=this._rowElements.length;n<=t;n++){var r=document.createElement("div");this._rowContainer.appendChild(r),this._rowElements.push(r)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())},t.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},t.prototype.onCharSizeChanged=function(){this._updateDimensions()},t.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},t.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},t.prototype.onSelectionChanged=function(e,t,n){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(e&&t){var r=e[1]-this._bufferService.buffer.ydisp,i=t[1]-this._bufferService.buffer.ydisp,o=Math.max(r,0),s=Math.min(i,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||s<0)){var a=document.createDocumentFragment();if(n)a.appendChild(this._createSelectionElement(o,e[0],t[0],s-o+1));else{var l=r===o?e[0]:0,c=o===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,l,c));var u=s-o-1;if(a.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,u)),o!==s){var d=i===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(s,0,d))}}this._selectionContainer.appendChild(a)}}},t.prototype._createSelectionElement=function(e,t,n,r){void 0===r&&(r=1);var i=document.createElement("div");return i.style.height=r*this.dimensions.actualCellHeight+"px",i.style.top=e*this.dimensions.actualCellHeight+"px",i.style.left=t*this.dimensions.actualCellWidth+"px",i.style.width=this.dimensions.actualCellWidth*(n-t)+"px",i},t.prototype.onCursorMove=function(){},t.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},t.prototype.clear=function(){for(var e=0,t=this._rowElements;e<t.length;e++)t[e].innerHTML=""},t.prototype.renderRows=function(e,t){for(var n=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._optionsService.options.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerHTML="";var a=o+this._bufferService.buffer.ydisp,l=this._bufferService.buffer.lines.get(a),c=this._optionsService.options.cursorStyle;s.appendChild(this._rowFactory.createRow(l,a===n,c,r,i,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(t.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),t.prototype.registerCharacterJoiner=function(e){return-1},t.prototype.deregisterCharacterJoiner=function(e){return!1},t.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},t.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},t.prototype._setCellUnderline=function(e,t,n,r,i,o){for(;e!==t||n!==r;){var s=this._rowElements[n];if(!s)return;var a=s.children[e];a&&(a.style.textDecoration=o?"underline":"none"),++e>=i&&(e=0,n++)}},o([s(6,u.ICharSizeService),s(7,d.IOptionsService),s(8,d.IBufferService)],t)}(c.Disposable);t.DomRenderer=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=t.CURSOR_STYLE_UNDERLINE_CLASS=t.CURSOR_STYLE_BAR_CLASS=t.CURSOR_STYLE_BLOCK_CLASS=t.CURSOR_BLINK_CLASS=t.CURSOR_CLASS=t.UNDERLINE_CLASS=t.ITALIC_CLASS=t.DIM_CLASS=t.BOLD_CLASS=void 0;var r=n(9),i=n(3),o=n(4),s=n(10);t.BOLD_CLASS="xterm-bold",t.DIM_CLASS="xterm-dim",t.ITALIC_CLASS="xterm-italic",t.UNDERLINE_CLASS="xterm-underline",t.CURSOR_CLASS="xterm-cursor",t.CURSOR_BLINK_CLASS="xterm-cursor-blink",t.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",t.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",t.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var a=function(){function e(e,t,n){this._document=e,this._optionsService=t,this._colors=n,this._workCell=new o.CellData}return e.prototype.setColors=function(e){this._colors=e},e.prototype.createRow=function(e,n,o,a,c,u,d){for(var h=this._document.createDocumentFragment(),f=0,p=Math.min(e.length,d)-1;p>=0;p--)if(e.loadCell(p,this._workCell).getCode()!==i.NULL_CELL_CODE||n&&p===a){f=p+1;break}for(p=0;p<f;p++){e.loadCell(p,this._workCell);var m=this._workCell.getWidth();if(0!==m){var v=this._document.createElement("span");if(m>1&&(v.style.width=u*m+"px"),n&&p===a)switch(v.classList.add(t.CURSOR_CLASS),c&&v.classList.add(t.CURSOR_BLINK_CLASS),o){case"bar":v.classList.add(t.CURSOR_STYLE_BAR_CLASS);break;case"underline":v.classList.add(t.CURSOR_STYLE_UNDERLINE_CLASS);break;default:v.classList.add(t.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&v.classList.add(t.BOLD_CLASS),this._workCell.isItalic()&&v.classList.add(t.ITALIC_CLASS),this._workCell.isDim()&&v.classList.add(t.DIM_CLASS),this._workCell.isUnderline()&&v.classList.add(t.UNDERLINE_CLASS),this._workCell.isInvisible()?v.textContent=i.WHITESPACE_CELL_CHAR:v.textContent=this._workCell.getChars()||i.WHITESPACE_CELL_CHAR;var g=this._workCell.getFgColor(),y=this._workCell.getFgColorMode(),_=this._workCell.getBgColor(),b=this._workCell.getBgColorMode(),x=!!this._workCell.isInverse();if(x){var w=g;g=_,_=w;var S=y;y=b,b=S}switch(y){case 16777216:case 33554432:this._workCell.isBold()&&g<8&&this._optionsService.options.drawBoldTextInBrightColors&&(g+=8),this._applyMinimumContrast(v,this._colors.background,this._colors.ansi[g])||v.classList.add("xterm-fg-"+g);break;case 50331648:var C=s.rgba.toColor(g>>16&255,g>>8&255,255&g);this._applyMinimumContrast(v,this._colors.background,C)||this._addStyle(v,"color:#"+l(g.toString(16),"0",6));break;default:this._applyMinimumContrast(v,this._colors.background,this._colors.foreground)||x&&v.classList.add("xterm-fg-"+r.INVERTED_DEFAULT_COLOR)}switch(b){case 16777216:case 33554432:v.classList.add("xterm-bg-"+_);break;case 50331648:this._addStyle(v,"background-color:#"+l(_.toString(16),"0",6));break;default:x&&v.classList.add("xterm-bg-"+r.INVERTED_DEFAULT_COLOR)}h.appendChild(v)}}return h},e.prototype._applyMinimumContrast=function(e,t,n){if(1===this._optionsService.options.minimumContrastRatio)return!1;var r=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===r&&(r=s.color.ensureContrastRatio(t,n,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=r?r:null)),!!r&&(this._addStyle(e,"color:"+r.css),!0)},e.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},e}();function l(e,t,n){for(;e.length<n;)e=t+e;return e}t.DomRendererRowFactory=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;var r=n(12),i={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:["'",'"']};t.evaluateKeyboardEvent=function(e,t,n,o){var s={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?s.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?s.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?s.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(s.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B");break;case 8:if(e.shiftKey){s.key=r.C0.BS;break}if(e.altKey){s.key=r.C0.ESC+r.C0.DEL;break}s.key=r.C0.DEL;break;case 9:if(e.shiftKey){s.key=r.C0.ESC+"[Z";break}s.key=r.C0.HT,s.cancel=!0;break;case 13:s.key=e.altKey?r.C0.ESC+r.C0.CR:r.C0.CR,s.cancel=!0;break;case 27:s.key=r.C0.ESC,e.altKey&&(s.key=r.C0.ESC+r.C0.ESC),s.cancel=!0;break;case 37:if(e.metaKey)break;a?(s.key=r.C0.ESC+"[1;"+(a+1)+"D",s.key===r.C0.ESC+"[1;3D"&&(s.key=r.C0.ESC+(n?"b":"[1;5D"))):s.key=t?r.C0.ESC+"OD":r.C0.ESC+"[D";break;case 39:if(e.metaKey)break;a?(s.key=r.C0.ESC+"[1;"+(a+1)+"C",s.key===r.C0.ESC+"[1;3C"&&(s.key=r.C0.ESC+(n?"f":"[1;5C"))):s.key=t?r.C0.ESC+"OC":r.C0.ESC+"[C";break;case 38:if(e.metaKey)break;a?(s.key=r.C0.ESC+"[1;"+(a+1)+"A",n||s.key!==r.C0.ESC+"[1;3A"||(s.key=r.C0.ESC+"[1;5A")):s.key=t?r.C0.ESC+"OA":r.C0.ESC+"[A";break;case 40:if(e.metaKey)break;a?(s.key=r.C0.ESC+"[1;"+(a+1)+"B",n||s.key!==r.C0.ESC+"[1;3B"||(s.key=r.C0.ESC+"[1;5B")):s.key=t?r.C0.ESC+"OB":r.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(s.key=r.C0.ESC+"[2~");break;case 46:s.key=a?r.C0.ESC+"[3;"+(a+1)+"~":r.C0.ESC+"[3~";break;case 36:s.key=a?r.C0.ESC+"[1;"+(a+1)+"H":t?r.C0.ESC+"OH":r.C0.ESC+"[H";break;case 35:s.key=a?r.C0.ESC+"[1;"+(a+1)+"F":t?r.C0.ESC+"OF":r.C0.ESC+"[F";break;case 33:e.shiftKey?s.type=2:s.key=r.C0.ESC+"[5~";break;case 34:e.shiftKey?s.type=3:s.key=r.C0.ESC+"[6~";break;case 112:s.key=a?r.C0.ESC+"[1;"+(a+1)+"P":r.C0.ESC+"OP";break;case 113:s.key=a?r.C0.ESC+"[1;"+(a+1)+"Q":r.C0.ESC+"OQ";break;case 114:s.key=a?r.C0.ESC+"[1;"+(a+1)+"R":r.C0.ESC+"OR";break;case 115:s.key=a?r.C0.ESC+"[1;"+(a+1)+"S":r.C0.ESC+"OS";break;case 116:s.key=a?r.C0.ESC+"[15;"+(a+1)+"~":r.C0.ESC+"[15~";break;case 117:s.key=a?r.C0.ESC+"[17;"+(a+1)+"~":r.C0.ESC+"[17~";break;case 118:s.key=a?r.C0.ESC+"[18;"+(a+1)+"~":r.C0.ESC+"[18~";break;case 119:s.key=a?r.C0.ESC+"[19;"+(a+1)+"~":r.C0.ESC+"[19~";break;case 120:s.key=a?r.C0.ESC+"[20;"+(a+1)+"~":r.C0.ESC+"[20~";break;case 121:s.key=a?r.C0.ESC+"[21;"+(a+1)+"~":r.C0.ESC+"[21~";break;case 122:s.key=a?r.C0.ESC+"[23;"+(a+1)+"~":r.C0.ESC+"[23~";break;case 123:s.key=a?r.C0.ESC+"[24;"+(a+1)+"~":r.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(n&&!o||!e.altKey||e.metaKey)n&&!e.altKey&&!e.ctrlKey&&e.metaKey?65===e.keyCode&&(s.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?s.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(s.key=r.C0.US);else{var l=i[e.keyCode],c=l&&l[e.shiftKey?1:0];if(c)s.key=r.C0.ESC+c;else if(e.keyCode>=65&&e.keyCode<=90){var u=e.ctrlKey?e.keyCode-64:e.keyCode+32;s.key=r.C0.ESC+String.fromCharCode(u)}}else e.keyCode>=65&&e.keyCode<=90?s.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?s.key=r.C0.NUL:e.keyCode>=51&&e.keyCode<=55?s.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?s.key=r.C0.DEL:219===e.keyCode?s.key=r.C0.ESC:220===e.keyCode?s.key=r.C0.FS:221===e.keyCode&&(s.key=r.C0.GS)}return s}},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;var a=n(31),l=n(0),c=n(2),u=n(32),d=n(7),h=n(1),f=n(5),p=function(e){function t(t,n,r,i,o,s){var c=e.call(this)||this;if(c._renderer=t,c._rowCount=n,c._isPaused=!1,c._needsFullRefresh=!1,c._isNextRenderRedrawOnly=!0,c._needsSelectionRefresh=!1,c._canvasWidth=0,c._canvasHeight=0,c._selectionState={start:void 0,end:void 0,columnSelectMode:!1},c._onDimensionsChange=new l.EventEmitter,c._onRender=new l.EventEmitter,c._onRefreshRequest=new l.EventEmitter,c.register({dispose:function(){return c._renderer.dispose()}}),c._renderDebouncer=new a.RenderDebouncer((function(e,t){return c._renderRows(e,t)})),c.register(c._renderDebouncer),c._screenDprMonitor=new u.ScreenDprMonitor,c._screenDprMonitor.setListener((function(){return c.onDevicePixelRatioChange()})),c.register(c._screenDprMonitor),c.register(s.onResize((function(e){return c._fullRefresh()}))),c.register(i.onOptionChange((function(){return c._renderer.onOptionsChanged()}))),c.register(o.onCharSizeChange((function(){return c.onCharSizeChanged()}))),c._renderer.onRequestRedraw((function(e){return c.refreshRows(e.start,e.end,!0)})),c.register(d.addDisposableDomListener(window,"resize",(function(){return c.onDevicePixelRatioChange()}))),"IntersectionObserver"in window){var h=new IntersectionObserver((function(e){return c._onIntersectionChange(e[e.length-1])}),{threshold:0});h.observe(r),c.register({dispose:function(){return h.disconnect()}})}return c}return i(t,e),Object.defineProperty(t.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),t.prototype._onIntersectionChange=function(e){this._isPaused=0===e.intersectionRatio,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},t.prototype.refreshRows=function(e,t,n){void 0===n&&(n=!1),this._isPaused?this._needsFullRefresh=!0:(n||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))},t.prototype._renderRows=function(e,t){this._renderer.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0},t.prototype.resize=function(e,t){this._rowCount=t,this._fireOnCanvasResize()},t.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},t.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setRenderer=function(e){var t=this;this._renderer.dispose(),this._renderer=e,this._renderer.onRequestRedraw((function(e){return t.refreshRows(e.start,e.end,!0)})),this._needsSelectionRefresh=!0,this._fullRefresh()},t.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},t.prototype.setColors=function(e){this._renderer.setColors(e),this._fullRefresh()},t.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},t.prototype.onResize=function(e,t){this._renderer.onResize(e,t),this._fullRefresh()},t.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},t.prototype.onBlur=function(){this._renderer.onBlur()},t.prototype.onFocus=function(){this._renderer.onFocus()},t.prototype.onSelectionChanged=function(e,t,n){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=n,this._renderer.onSelectionChanged(e,t,n)},t.prototype.onCursorMove=function(){this._renderer.onCursorMove()},t.prototype.clear=function(){this._renderer.clear()},t.prototype.registerCharacterJoiner=function(e){return this._renderer.registerCharacterJoiner(e)},t.prototype.deregisterCharacterJoiner=function(e){return this._renderer.deregisterCharacterJoiner(e)},o([s(3,h.IOptionsService),s(4,f.ICharSizeService),s(5,h.IBufferService)],t)}(c.Disposable);t.RenderService=p},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;var o=n(1),s=n(0),a=function(){function e(e,t,n){this._optionsService=n,this.width=0,this.height=0,this._onCharSizeChange=new s.EventEmitter,this._measureStrategy=new l(e,t,this._optionsService)}return Object.defineProperty(e.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),e.prototype.measure=function(){var e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())},r([i(2,o.IOptionsService)],e)}();t.CharSizeService=a;var l=function(){function e(e,t,n){this._document=e,this._parentElement=t,this._optionsService=n,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 e.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._measureElement.getBoundingClientRect();return 0!==e.width&&0!==e.height&&(this._result.width=e.width,this._result.height=Math.ceil(e.height)),this._result},e}()},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;var o=n(5),s=n(30),a=function(){function e(e,t){this._renderService=e,this._charSizeService=t}return e.prototype.getCoords=function(e,t,n,r,i){return s.getCoords(e,t,n,r,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,i)},e.prototype.getRawByteCoords=function(e,t,n,r){var i=this.getCoords(e,t,n,r);return s.getRawByteCoords(i)},r([i(0,o.IRenderService),i(1,o.ICharSizeService)],e)}();t.MouseService=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier2=void 0;var a=n(1),l=n(0),c=n(2),u=n(7),d=function(e){function t(t){var n=e.call(this)||this;return n._bufferService=t,n._linkProviders=[],n._linkCacheDisposables=[],n._isMouseOut=!0,n._activeLine=-1,n._onShowLinkUnderline=n.register(new l.EventEmitter),n._onHideLinkUnderline=n.register(new l.EventEmitter),n.register(c.getDisposeArrayDisposable(n._linkCacheDisposables)),n}return i(t,e),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(e){var t=this;return this._linkProviders.push(e),{dispose:function(){var n=t._linkProviders.indexOf(e);-1!==n&&t._linkProviders.splice(n,1)}}},t.prototype.attachToDom=function(e,t,n){var r=this;this._element=e,this._mouseService=t,this._renderService=n,this.register(u.addDisposableDomListener(this._element,"mouseleave",(function(){r._isMouseOut=!0,r._clearCurrentLink()}))),this.register(u.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(u.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},t.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(t){this._isMouseOut=!1;for(var n=e.composedPath(),r=0;r<n.length;r++){var i=n[r];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._onHover(t),this._lastBufferCell=t)}}},t.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},t.prototype._askForLink=function(e,t){var n=this;this._activeProviderReplies&&t||(this._activeProviderReplies=new Map,this._activeLine=e.y);var r=!1;this._linkProviders.forEach((function(i,o){var s;t?(null===(s=n._activeProviderReplies)||void 0===s?void 0:s.get(o))&&(r=n._checkLinkProviderResult(o,e,r)):i.provideLinks(e.y,(function(t){var i,s;if(!n._isMouseOut){var a=null==t?void 0:t.map((function(e){return{link:e}}));null===(i=n._activeProviderReplies)||void 0===i||i.set(o,a),r=n._checkLinkProviderResult(o,e,r),(null===(s=n._activeProviderReplies)||void 0===s?void 0:s.size)===n._linkProviders.length&&n._removeIntersectingLinks(e.y,n._activeProviderReplies)}}))}))},t.prototype._removeIntersectingLinks=function(e,t){for(var n=new Set,r=0;r<t.size;r++){var i=t.get(r);if(i)for(var o=0;o<i.length;o++)for(var s=i[o],a=s.link.range.start.y<e?0:s.link.range.start.x,l=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x,c=a;c<=l;c++){if(n.has(c)){i.splice(o--,1);break}n.add(c)}}},t.prototype._checkLinkProviderResult=function(e,t,n){var r,i=this;if(!this._activeProviderReplies)return n;for(var o=this._activeProviderReplies.get(e),s=!1,a=0;a<e;a++)this._activeProviderReplies.has(a)&&!this._activeProviderReplies.get(a)||(s=!0);if(!s&&o){var l=o.find((function(e){return i._linkAtPosition(e.link,t)}));l&&(n=!0,this._handleNewLink(l))}if(this._activeProviderReplies.size===this._linkProviders.length&&!n)for(a=0;a<this._activeProviderReplies.size;a++){var c=null===(r=this._activeProviderReplies.get(a))||void 0===r?void 0:r.find((function(e){return i._linkAtPosition(e.link,t)}));if(c){n=!0,this._handleNewLink(c);break}}return n},t.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(e,t){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,c.disposeArray(this._linkCacheDisposables))},t.prototype._handleNewLink=function(e){var t=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var n=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);n&&this._linkAtPosition(e.link,n)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var e,n;return null===(n=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===n?void 0:n.decorations.pointerCursor},set:function(e){var n,r;(null===(n=t._currentLink)||void 0===n?void 0:n.state)&&t._currentLink.state.decorations.pointerCursor!==e&&(t._currentLink.state.decorations.pointerCursor=e,t._currentLink.state.isHovered&&(null===(r=t._element)||void 0===r||r.classList.toggle("xterm-cursor-pointer",e)))}},underline:{get:function(){var e,n;return null===(n=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===n?void 0:n.decorations.underline},set:function(n){var r,i,o;(null===(r=t._currentLink)||void 0===r?void 0:r.state)&&(null===(o=null===(i=t._currentLink)||void 0===i?void 0:i.state)||void 0===o?void 0:o.decorations.underline)!==n&&(t._currentLink.state.decorations.underline=n,t._currentLink.state.isHovered&&t._fireUnderlineEvent(e.link,n))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange((function(e){var n=0===e.start?0:e.start+1+t._bufferService.buffer.ydisp;t._clearCurrentLink(n,e.end+1+t._bufferService.buffer.ydisp)}))))}},t.prototype._linkHover=function(e,t,n){var r;(null===(r=this._currentLink)||void 0===r?void 0:r.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(n,t.text)},t.prototype._fireUnderlineEvent=function(e,t){var n=e.range,r=this._bufferService.buffer.ydisp,i=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-r-1,n.end.x,n.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(i)},t.prototype._linkLeave=function(e,t,n){var r;(null===(r=this._currentLink)||void 0===r?void 0:r.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(n,t.text)},t.prototype._linkAtPosition=function(e,t){var n=e.range.start.y===e.range.end.y,r=e.range.start.y<t.y,i=e.range.end.y>t.y;return(n&&e.range.start.x<=t.x&&e.range.end.x>=t.x||r&&e.range.end.x>=t.x||i&&e.range.start.x<=t.x||r&&i)&&e.range.start.y<=t.y&&e.range.end.y>=t.y},t.prototype._positionFromMouseEvent=function(e,t,n){var r=n.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(e,t,n,r,i){return{x1:e,y1:t,x2:n,y2:r,cols:this._bufferService.cols,fg:i}},o([s(0,a.IBufferService)],t)}(c.Disposable);t.Linkifier2=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;var r=function(){function e(e){this._textarea=e}return Object.defineProperty(e.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),e}();t.CoreBrowserService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;var o=n(2),s=n(1),a=n(66),l=n(67),c=n(68),u=n(74),d=n(75),h=n(0),f=n(76),p=n(77),m=n(78),v=n(80),g=n(81),y=n(19),_=n(82),b=function(e){function t(t){var n=e.call(this)||this;return n._onBinary=new h.EventEmitter,n._onData=new h.EventEmitter,n._onLineFeed=new h.EventEmitter,n._onResize=new h.EventEmitter,n._onScroll=new h.EventEmitter,n._instantiationService=new a.InstantiationService,n.optionsService=new u.OptionsService(t),n._instantiationService.setService(s.IOptionsService,n.optionsService),n._bufferService=n.register(n._instantiationService.createInstance(c.BufferService)),n._instantiationService.setService(s.IBufferService,n._bufferService),n._logService=n._instantiationService.createInstance(l.LogService),n._instantiationService.setService(s.ILogService,n._logService),n._coreService=n.register(n._instantiationService.createInstance(d.CoreService,(function(){return n.scrollToBottom()}))),n._instantiationService.setService(s.ICoreService,n._coreService),n._coreMouseService=n._instantiationService.createInstance(f.CoreMouseService),n._instantiationService.setService(s.ICoreMouseService,n._coreMouseService),n._dirtyRowService=n._instantiationService.createInstance(p.DirtyRowService),n._instantiationService.setService(s.IDirtyRowService,n._dirtyRowService),n.unicodeService=n._instantiationService.createInstance(m.UnicodeService),n._instantiationService.setService(s.IUnicodeService,n.unicodeService),n._charsetService=n._instantiationService.createInstance(v.CharsetService),n._instantiationService.setService(s.ICharsetService,n._charsetService),n._inputHandler=new y.InputHandler(n._bufferService,n._charsetService,n._coreService,n._dirtyRowService,n._logService,n.optionsService,n._coreMouseService,n.unicodeService),n.register(h.forwardEvent(n._inputHandler.onLineFeed,n._onLineFeed)),n.register(n._inputHandler),n.register(h.forwardEvent(n._bufferService.onResize,n._onResize)),n.register(h.forwardEvent(n._coreService.onData,n._onData)),n.register(h.forwardEvent(n._coreService.onBinary,n._onBinary)),n.register(n.optionsService.onOptionChange((function(e){return n._updateOptions(e)}))),n._writeBuffer=new _.WriteBuffer((function(e){return n._inputHandler.parse(e)})),n}return i(t,e),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)},t.prototype.write=function(e,t){this._writeBuffer.write(e,t)},t.prototype.writeSync=function(e){this._writeBuffer.writeSync(e)},t.prototype.resize=function(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,c.MINIMUM_COLS),t=Math.max(t,c.MINIMUM_ROWS),this._bufferService.resize(e,t))},t.prototype.scroll=function(e,t){void 0===t&&(t=!1);var n,r=this._bufferService.buffer;(n=this._cachedBlankLine)&&n.length===this.cols&&n.getFg(0)===e.fg&&n.getBg(0)===e.bg||(n=r.getBlankLine(e,t),this._cachedBlankLine=n),n.isWrapped=t;var i=r.ybase+r.scrollTop,o=r.ybase+r.scrollBottom;if(0===r.scrollTop){var s=r.lines.isFull;o===r.lines.length-1?s?r.lines.recycle().copyFrom(n):r.lines.push(n.clone()):r.lines.splice(o+1,0,n.clone()),s?this._bufferService.isUserScrolling&&(r.ydisp=Math.max(r.ydisp-1,0)):(r.ybase++,this._bufferService.isUserScrolling||r.ydisp++)}else{var a=o-i+1;r.lines.shiftElements(i+1,a-1,-1),r.lines.set(o,n.clone())}this._bufferService.isUserScrolling||(r.ydisp=r.ybase),this._dirtyRowService.markRangeDirty(r.scrollTop,r.scrollBottom),this._onScroll.fire(r.ydisp)},t.prototype.scrollLines=function(e,t){var n=this._bufferService.buffer;if(e<0){if(0===n.ydisp)return;this._bufferService.isUserScrolling=!0}else e+n.ydisp>=n.ybase&&(this._bufferService.isUserScrolling=!1);var r=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+e,n.ybase),0),r!==n.ydisp&&(t||this._onScroll.fire(n.ydisp))},t.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},t.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},t.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},t.prototype.scrollToLine=function(e){var t=e-this._bufferService.buffer.ydisp;0!==t&&this.scrollLines(t)},t.prototype.addEscHandler=function(e,t){return this._inputHandler.addEscHandler(e,t)},t.prototype.addDcsHandler=function(e,t){return this._inputHandler.addDcsHandler(e,t)},t.prototype.addCsiHandler=function(e,t){return this._inputHandler.addCsiHandler(e,t)},t.prototype.addOscHandler=function(e,t){return this._inputHandler.addOscHandler(e,t)},t.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},t.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},t.prototype._updateOptions=function(e){var t;switch(e){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():(null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)}},t.prototype._enableWindowsMode=function(){var e=this;if(!this._windowsMode){var t=[];t.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),t.push(this.addCsiHandler({final:"H"},(function(){return g.updateWindowsModeWrappedState(e._bufferService),!1}))),this._windowsMode={dispose:function(){for(var e=0,n=t;e<n.length;e++)n[e].dispose()}}}},t}(o.Disposable);t.CoreTerminal=b},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;var i=n(1),o=n(14),s=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var n=0,r=e;n<r.length;n++){var i=r[n],o=i[0],s=i[1];this.set(o,s)}}return e.prototype.set=function(e,t){var n=this._entries.get(e);return this._entries.set(e,t),n},e.prototype.forEach=function(e){this._entries.forEach((function(t,n){return e(n,t)}))},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=s;var a=function(){function e(){this._services=new s,this._services.set(i.IInstantiationService,this)}return e.prototype.setService=function(e,t){this._services.set(e,t)},e.prototype.getService=function(e){return this._services.get(e)},e.prototype.createInstance=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var i=o.getServiceDependencies(e).sort((function(e,t){return e.index-t.index})),s=[],a=0,l=i;a<l.length;a++){var c=l[a],u=this._services.get(c.id);if(!u)throw new Error("[createInstance] "+e.name+" depends on UNKNOWN service "+c.id+".");s.push(u)}var d=i.length>0?i[0].index:t.length;if(t.length!==d)throw new Error("[createInstance] First service dependency of "+e.name+" at position "+(d+1)+" conflicts with "+t.length+" static arguments");return new(e.bind.apply(e,r([void 0],r(t,s))))},e}();t.InstantiationService=a},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},o=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=t.LogLevel=void 0;var s,a=n(1);!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e[e.OFF=4]="OFF"}(s=t.LogLevel||(t.LogLevel={}));var l={debug:s.DEBUG,info:s.INFO,warn:s.WARN,error:s.ERROR,off:s.OFF},c=function(){function e(e){var t=this;this._optionsService=e,this._updateLogLevel(),this._optionsService.onOptionChange((function(e){"logLevel"===e&&t._updateLogLevel()}))}return e.prototype._updateLogLevel=function(){this._logLevel=l[this._optionsService.options.logLevel]},e.prototype._evalLazyOptionalParams=function(e){for(var t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())},e.prototype._log=function(e,t,n){this._evalLazyOptionalParams(n),e.call.apply(e,o([console,"xterm.js: "+t],n))},e.prototype.debug=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=s.DEBUG&&this._log(console.log,e,t)},e.prototype.info=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=s.INFO&&this._log(console.info,e,t)},e.prototype.warn=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=s.WARN&&this._log(console.warn,e,t)},e.prototype.error=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];this._logLevel<=s.ERROR&&this._log(console.error,e,t)},r([i(0,a.IOptionsService)],e)}();t.LogService=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;var a=n(1),l=n(69),c=n(0),u=n(2);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;var d=function(e){function n(n){var r=e.call(this)||this;return r._optionsService=n,r.isUserScrolling=!1,r._onResize=new c.EventEmitter,r.cols=Math.max(n.options.cols,t.MINIMUM_COLS),r.rows=Math.max(n.options.rows,t.MINIMUM_ROWS),r.buffers=new l.BufferSet(n,r),r}return i(n,e),Object.defineProperty(n.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),n.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},n.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},n.prototype.reset=function(){this.buffers.dispose(),this.buffers=new l.BufferSet(this._optionsService,this),this.isUserScrolling=!1},o([s(0,a.IOptionsService)],n)}(u.Disposable);t.BufferService=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;var o=n(70),s=n(0),a=function(e){function t(t,n){var r=e.call(this)||this;return r._onBufferActivate=r.register(new s.EventEmitter),r._normal=new o.Buffer(!0,t,n),r._normal.fillViewportRows(),r._alt=new o.Buffer(!1,t,n),r._activeBuffer=r._normal,r.setupTabStops(),r}return i(t,e),Object.defineProperty(t.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),t.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}))},t.prototype.activateAltBuffer=function(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),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}))},t.prototype.resize=function(e,t){this._normal.resize(e,t),this._alt.resize(e,t)},t.prototype.setupTabStops=function(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)},t}(n(2).Disposable);t.BufferSet=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStringIterator=t.Buffer=t.MAX_BUFFER_SIZE=void 0;var r=n(71),i=n(16),o=n(4),s=n(3),a=n(72),l=n(73),c=n(20),u=n(6);t.MAX_BUFFER_SIZE=4294967295;var d=function(){function e(e,t,n){this._hasScrollback=e,this._optionsService=t,this._bufferService=n,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=i.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=o.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=o.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return e.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell},e.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell},e.prototype.getBlankLine=function(e,t){return new i.BufferLine(this._bufferService.cols,this.getNullCell(e),t)},Object.defineProperty(e.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),e.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var n=e+this._optionsService.options.scrollback;return n>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:n},e.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=i.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},e.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},e.prototype.resize=function(e,t){var n=this.getNullCell(i.DEFAULT_ATTR_DATA),r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),this.lines.length>0){if(this._cols<e)for(var o=0;o<this.lines.length;o++)this.lines.get(o).resize(e,n);var s=0;if(this._rows<t)for(var a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new i.BufferLine(e,n)):this.ybase>0&&this.lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this.lines.push(new i.BufferLine(e,n)));else for(a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(r<this.lines.maxLength){var l=this.lines.length-r;l>0&&(this.lines.trimStart(l),this.ybase=Math.max(this.ybase-l,0),this.ydisp=Math.max(this.ydisp-l,0),this.savedY=Math.max(this.savedY-l,0)),this.lines.maxLength=r}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),s&&(this.y+=s),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(o=0;o<this.lines.length;o++)this.lines.get(o).resize(e,n);this._cols=e,this._rows=t},Object.defineProperty(e.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),e.prototype._reflow=function(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},e.prototype._reflowLarger=function(e,t){var n=a.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(i.DEFAULT_ATTR_DATA));if(n.length>0){var r=a.reflowLargerCreateNewLayout(this.lines,n);a.reflowLargerApplyNewLayout(this.lines,r.layout),this._reflowLargerAdjustViewport(e,t,r.countRemoved)}},e.prototype._reflowLargerAdjustViewport=function(e,t,n){for(var r=this.getNullCell(i.DEFAULT_ATTR_DATA),o=n;o-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new i.BufferLine(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-n,0)},e.prototype._reflowSmaller=function(e,t){for(var n=this.getNullCell(i.DEFAULT_ATTR_DATA),r=[],o=0,s=this.lines.length-1;s>=0;s--){var l=this.lines.get(s);if(!(!l||!l.isWrapped&&l.getTrimmedLength()<=e)){for(var c=[l];l.isWrapped&&s>0;)l=this.lines.get(--s),c.unshift(l);var u=this.ybase+this.y;if(!(u>=s&&u<s+c.length)){var d=c[c.length-1].getTrimmedLength(),h=a.reflowSmallerGetNewLineLengths(c,this._cols,e),f=h.length-c.length,p=void 0;p=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+f):Math.max(0,this.lines.length-this.lines.maxLength+f);for(var m=[],v=0;v<f;v++){var g=this.getBlankLine(i.DEFAULT_ATTR_DATA,!0);m.push(g)}m.length>0&&(r.push({start:s+c.length+o,newLines:m}),o+=m.length),c.push.apply(c,m);var y=h.length-1,_=h[y];0===_&&(_=h[--y]);for(var b=c.length-f-1,x=d;b>=0;){var w=Math.min(x,_);if(c[y].copyCellsFrom(c[b],x-w,_-w,w,!0),0==(_-=w)&&(_=h[--y]),0==(x-=w)){b--;var S=Math.max(b,0);x=a.getWrappedLineTrimmedLength(c,S,this._cols)}}for(v=0;v<c.length;v++)h[v]<e&&c[v].setCell(h[v],n);for(var C=f-p;C-- >0;)0===this.ybase?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+f,this.ybase+t-1)}}}if(r.length>0){var k=[],E=[];for(v=0;v<this.lines.length;v++)E.push(this.lines.get(v));var T=this.lines.length,L=T-1,A=0,M=r[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);var D=0;for(v=Math.min(this.lines.maxLength-1,T+o-1);v>=0;v--)if(M&&M.start>L+D){for(var I=M.newLines.length-1;I>=0;I--)this.lines.set(v--,M.newLines[I]);v++,k.push({index:L+1,amount:M.newLines.length}),D+=M.newLines.length,M=r[++A]}else this.lines.set(v,E[L--]);var N=0;for(v=k.length-1;v>=0;v--)k[v].index+=N,this.lines.onInsertEmitter.fire(k[v]),N+=k[v].amount;var R=Math.max(0,T+o-this.lines.maxLength);R>0&&this.lines.onTrimEmitter.fire(R)}},e.prototype.stringIndexToBufferIndex=function(e,t,n){for(void 0===n&&(n=!1);t;){var r=this.lines.get(e);if(!r)return[-1,-1];for(var i=n?r.getTrimmedLength():r.length,o=0;o<i;++o)if(r.get(o)[s.CHAR_DATA_WIDTH_INDEX]&&(t-=r.get(o)[s.CHAR_DATA_CHAR_INDEX].length||1),t<0)return[e,o];e++}return[e,0]},e.prototype.translateBufferLineToString=function(e,t,n,r){void 0===n&&(n=0);var i=this.lines.get(e);return i?i.translateToString(t,n,r):""},e.prototype.getWrappedRangeForLine=function(e){for(var t=e,n=e;t>0&&this.lines.get(t).isWrapped;)t--;for(;n+1<this.lines.length&&this.lines.get(n+1).isWrapped;)n++;return{first:t,last:n}},e.prototype.setupTabStops=function(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},e.prototype.prevStop=function(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.addMarker=function(e){var t=this,n=new l.Marker(e);return this.markers.push(n),n.register(this.lines.onTrim((function(e){n.line-=e,n.line<0&&n.dispose()}))),n.register(this.lines.onInsert((function(e){n.line>=e.index&&(n.line+=e.amount)}))),n.register(this.lines.onDelete((function(e){n.line>=e.index&&n.line<e.index+e.amount&&n.dispose(),n.line>e.index&&(n.line-=e.amount)}))),n.register(n.onDispose((function(){return t._removeMarker(n)}))),n},e.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},e.prototype.iterator=function(e,t,n,r,i){return new h(this,e,t,n,r,i)},e}();t.Buffer=d;var h=function(){function e(e,t,n,r,i,o){void 0===n&&(n=0),void 0===r&&(r=e.lines.length),void 0===i&&(i=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=n,this._endIndex=r,this._startOverscan=i,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return e.prototype.hasNext=function(){return this._current<this._endIndex},e.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",n=e.first;n<=e.last;++n)t+=this._buffer.translateBufferLineToString(n,this._trimRight);return this._current=e.last+1,{range:e,content:t}},e}();t.BufferStringIterator=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;var r=n(0),i=function(){function e(e){this._maxLength=e,this.onDeleteEmitter=new r.EventEmitter,this.onInsertEmitter=new r.EventEmitter,this.onTrimEmitter=new r.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(e.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),n=0;n<Math.min(e,this.length);n++)t[n]=this._array[this._getCyclicIndex(n)];this._array=t,this._maxLength=e,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(e){if(e>this._length)for(var t=this._length;t<e;t++)this._array[t]=void 0;this._length=e},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this._array[this._getCyclicIndex(e)]},e.prototype.set=function(e,t){this._array[this._getCyclicIndex(e)]=t},e.prototype.push=function(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},e.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(e.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t){for(var i=e;i<this._length-t;i++)this._array[this._getCyclicIndex(i)]=this._array[this._getCyclicIndex(i+t)];this._length-=t}for(i=this._length-1;i>=e;i--)this._array[this._getCyclicIndex(i+n.length)]=this._array[this._getCyclicIndex(i)];for(i=0;i<n.length;i++)this._array[this._getCyclicIndex(e+i)]=n[i];if(this._length+n.length>this._maxLength){var o=this._length+n.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=n.length},e.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},e.prototype.shiftElements=function(e,t,n){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+n<0)throw new Error("Cannot shift elements in list beyond index 0");if(n>0){for(var r=t-1;r>=0;r--)this.set(e+r+n,this.get(e+r));var i=e+t+n-this._length;if(i>0)for(this._length+=i;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;r<t;r++)this.set(e+r+n,this.get(e+r))}},e.prototype._getCyclicIndex=function(e){return(this._startIndex+e)%this._maxLength},e}();t.CircularList=i},function(e,t,n){"use strict";function r(e,t,n){if(t===e.length-1)return e[t].getTrimmedLength();var r=!e[t].hasContent(n-1)&&1===e[t].getWidth(n-1),i=2===e[t+1].getWidth(0);return r&&i?n-1:n}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,n,i,o){for(var s=[],a=0;a<e.length-1;a++){var l=a,c=e.get(++l);if(c.isWrapped){for(var u=[e.get(a)];l<e.length&&c.isWrapped;)u.push(c),c=e.get(++l);if(i>=a&&i<l)a+=u.length-1;else{for(var d=0,h=r(u,d,t),f=1,p=0;f<u.length;){var m=r(u,f,t),v=m-p,g=n-h,y=Math.min(v,g);u[d].copyCellsFrom(u[f],p,h,y,!1),(h+=y)===n&&(d++,h=0),(p+=y)===m&&(f++,p=0),0===h&&0!==d&&2===u[d-1].getWidth(n-1)&&(u[d].copyCellsFrom(u[d-1],n-1,h++,1,!1),u[d-1].setCell(n-1,o))}u[d].replaceCells(h,n,o);for(var _=0,b=u.length-1;b>0&&(b>d||0===u[b].getTrimmedLength());b--)_++;_>0&&(s.push(a+u.length-_),s.push(_)),a+=u.length-1}}}return s},t.reflowLargerCreateNewLayout=function(e,t){for(var n=[],r=0,i=t[r],o=0,s=0;s<e.length;s++)if(i===s){var a=t[++r];e.onDeleteEmitter.fire({index:s-o,amount:a}),s+=a-1,o+=a,i=t[++r]}else n.push(s);return{layout:n,countRemoved:o}},t.reflowLargerApplyNewLayout=function(e,t){for(var n=[],r=0;r<t.length;r++)n.push(e.get(t[r]));for(r=0;r<n.length;r++)e.set(r,n[r]);e.length=t.length},t.reflowSmallerGetNewLineLengths=function(e,t,n){for(var i=[],o=e.map((function(n,i){return r(e,i,t)})).reduce((function(e,t){return e+t})),s=0,a=0,l=0;l<o;){if(o-l<n){i.push(o-l);break}s+=n;var c=r(e,a,t);s>c&&(s-=c,a++);var u=2===e[a].getWidth(s-1);u&&s--;var d=u?n-1:n;i.push(d),l+=d}return i},t.getWrappedLineTrimmedLength=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;var o=n(0),s=function(e){function t(n){var r=e.call(this)||this;return r.line=n,r._id=t._nextId++,r.isDisposed=!1,r._onDispose=new o.EventEmitter,r}return i(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},t._nextId=1,t}(n(2).Disposable);t.Marker=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=t.DEFAULT_BELL_SOUND=void 0;var r=n(0),i=n(11),o=n(33);t.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",t.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:t.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:i.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var s=["cols","rows"],a=function(){function e(e){this._onOptionChange=new r.EventEmitter,this.options=o.clone(t.DEFAULT_OPTIONS);for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n];if(s in this.options){var a=e[s];this.options[s]=a}}}return Object.defineProperty(e.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),e.prototype.setOption=function(e,n){if(!(e in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');if(-1!==s.indexOf(e))throw new Error('Option "'+e+'" can only be set in the constructor');this.options[e]!==n&&(n=this._sanitizeAndValidateOption(e,n),this.options[e]!==n&&(this.options[e]=n,this._onOptionChange.fire(e)))},e.prototype._sanitizeAndValidateOption=function(e,n){switch(e){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":n||(n=t.DEFAULT_OPTIONS[e]);break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(e+" cannot be less than 1, value: "+n);break;case"minimumContrastRatio":n=Math.max(1,Math.min(21,Math.round(10*n)/10));break;case"scrollback":if((n=Math.min(n,4294967295))<0)throw new Error(e+" cannot be less than 0, value: "+n);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(e+" cannot be less than or equal to 0, value: "+n)}return n},e.prototype.getOption=function(e){if(!(e in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+e+'"');return this.options[e]},e}();t.OptionsService=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;var a=n(1),l=n(0),c=n(33),u=n(2),d=Object.freeze({insertMode:!1}),h=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),f=function(e){function t(t,n,r,i){var o=e.call(this)||this;return o._bufferService=n,o._logService=r,o._optionsService=i,o.isCursorInitialized=!1,o.isCursorHidden=!1,o._onData=o.register(new l.EventEmitter),o._onUserInput=o.register(new l.EventEmitter),o._onBinary=o.register(new l.EventEmitter),o._scrollToBottom=t,o.register({dispose:function(){return o._scrollToBottom=void 0}}),o.modes=c.clone(d),o.decPrivateModes=c.clone(h),o}return i(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=c.clone(d),this.decPrivateModes=c.clone(h)},t.prototype.triggerDataEvent=function(e,t){if(void 0===t&&(t=!1),!this._optionsService.options.disableStdin){var n=this._bufferService.buffer;n.ybase!==n.ydisp&&this._scrollToBottom(),t&&this._onUserInput.fire(),this._logService.debug('sending data "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onData.fire(e)}},t.prototype.triggerBinaryEvent=function(e){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onBinary.fire(e))},o([s(1,a.IBufferService),s(2,a.ILogService),s(3,a.IOptionsService)],t)}(u.Disposable);t.CoreService=f},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;var o=n(1),s=n(0),a={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(e){return 4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)}},VT200:{events:19,restrict:function(e){return 32!==e.action}},DRAG:{events:23,restrict:function(e){return 32!==e.action||3!==e.button}},ANY:{events:31,restrict:function(e){return!0}}};function l(e,t){var n=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(n|=64,n|=e.action):(n|=3&e.button,4&e.button&&(n|=64),8&e.button&&(n|=128),32===e.action?n|=32:0!==e.action||t||(n|=3)),n}var c=String.fromCharCode,u={DEFAULT:function(e){var t=[l(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":""+c(t[0])+c(t[1])+c(t[2])},SGR:function(e){var t=0===e.action&&4!==e.button?"m":"M";return"[<"+l(e,!0)+";"+e.col+";"+e.row+t}},d=function(){function e(e,t){this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null;for(var n=0,r=Object.keys(a);n<r.length;n++){var i=r[n];this.addProtocol(i,a[i])}for(var o=0,l=Object.keys(u);o<l.length;o++){var c=l[o];this.addEncoding(c,u[c])}this.reset()}return e.prototype.addProtocol=function(e,t){this._protocols[e]=t},e.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areMouseEventsActive",{get:function(){return 0!==this._protocols[this._activeProtocol].events},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(e.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),e.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},e.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},e.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},r([i(0,o.IBufferService),i(1,o.ICoreService)],e)}();t.CoreMouseService=d},function(e,t,n){"use strict";var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DirtyRowService=void 0;var o=n(1),s=function(){function e(e){this._bufferService=e,this.clearRange()}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),e.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},e.prototype.markDirty=function(e){e<this._start?this._start=e:e>this._end&&(this._end=e)},e.prototype.markRangeDirty=function(e,t){if(e>t){var n=e;e=t,t=n}e<this._start&&(this._start=e),t>this._end&&(this._end=t)},e.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},r([i(0,o.IBufferService)],e)}();t.DirtyRowService=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;var r=n(0),i=n(79),o=function(){function e(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter;var e=new i.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._active},set:function(e){if(!this._providers[e])throw new Error('unknown Unicode version "'+e+'"');this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)},enumerable:!1,configurable:!0}),e.prototype.register=function(e){this._providers[e.version]=e},e.prototype.wcwidth=function(e){return this._activeProvider.wcwidth(e)},e.prototype.getStringCellWidth=function(e){for(var t=0,n=e.length,r=0;r<n;++r){var i=e.charCodeAt(r);if(55296<=i&&i<=56319){if(++r>=n)return t+this.wcwidth(i);var o=e.charCodeAt(r);56320<=o&&o<=57343?i=1024*(i-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(i)}return t},e}();t.UnicodeService=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;var r,i=n(15),o=[[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]],s=[[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]],a=function(){function e(){if(this.version="6",!r){r=new Uint8Array(65536),i.fill(r,1),r[0]=0,i.fill(r,0,1,32),i.fill(r,0,127,160),i.fill(r,2,4352,4448),r[9001]=2,r[9002]=2,i.fill(r,2,11904,42192),r[12351]=1,i.fill(r,2,44032,55204),i.fill(r,2,63744,64256),i.fill(r,2,65040,65050),i.fill(r,2,65072,65136),i.fill(r,2,65280,65377),i.fill(r,2,65504,65511);for(var e=0;e<o.length;++e)i.fill(r,0,o[e][0],o[e][1]+1)}}return e.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?r[e]:function(e,t){var n,r=0,i=t.length-1;if(e<t[0][0]||e>t[i][1])return!1;for(;i>=r;)if(e>t[n=r+i>>1][1])r=n+1;else{if(!(e<t[n][0]))return!0;i=n-1}return!1}(e,s)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1},e}();t.UnicodeV6=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0;var r=function(){function e(){this.glevel=0,this._charsets=[]}return e.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},e.prototype.setgLevel=function(e){this.glevel=e,this.charset=this._charsets[e]},e.prototype.setgCharset=function(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)},e}();t.CharsetService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;var r=n(3);t.updateWindowsModeWrappedState=function(e){var t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),n=null==t?void 0:t.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&n&&(i.isWrapped=n[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&n[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;var r=function(){function e(e){this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return e.prototype.writeSync=function(e){if(this._writeBuffer.length){for(var t=this._bufferOffset;t<this._writeBuffer.length;++t){var n=this._writeBuffer[t],r=this._callbacks[t];this._action(n),r&&r()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(e)},e.prototype.write=function(e,t){var n=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 n._innerWrite()}))),this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)},e.prototype._innerWrite=function(){for(var e=this,t=Date.now();this._writeBuffer.length>this._bufferOffset;){var n=this._writeBuffer[this._bufferOffset],r=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(n),this._pendingData-=n.length,r&&r(),Date.now()-t>=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 e._innerWrite()}),0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},e}();t.WriteBuffer=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0;var r=function(){function e(){this._addons=[]}return e.prototype.dispose=function(){for(var e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()},e.prototype.loadAddon=function(e,t){var n=this,r={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(r),t.dispose=function(){return n._wrappedAddonDispose(r)},t.activate(e)},e.prototype._wrappedAddonDispose=function(e){if(!e.isDisposed){for(var t=-1,n=0;n<this._addons.length;n++)if(this._addons[n]===e){t=n;break}if(-1===t)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},e}();t.AddonManager=r}])},93314:function(e){"use strict";e.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(e){"use strict";e.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="},4811:function(e,t,n){var r=n(22652);function i(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=i=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var i=r(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(this,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},22652:function(e,t,n){var r=n(34577);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},16722:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});const r=e=>"object"==typeof e&&null!=e&&1===e.nodeType,i=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return i(n.overflowY,t)||i(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},s=(e,t,n,r,i,o,s,a)=>o<e&&s>t||o>e&&s<t?0:o<=e&&a<=n||s>=t&&a>=n?o-e-r:s>t&&a<n||o<e&&a>n?s-t+i:0,a=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},l=(e,t)=>{var n,i,l,c;if("undefined"==typeof document)return[];const{scrollMode:u,block:d,inline:h,boundary:f,skipOverflowHiddenElements:p}=t,m="function"==typeof f?f:e=>e!==f;if(!r(e))throw new TypeError("Invalid target");const v=document.scrollingElement||document.documentElement,g=[];let y=e;for(;r(y)&&m(y);){if(y=a(y),y===v){g.push(y);break}null!=y&&y===document.body&&o(y)&&!o(document.documentElement)||null!=y&&o(y,p)&&g.push(y)}const _=null!=(i=null==(n=window.visualViewport)?void 0:n.width)?i:innerWidth,b=null!=(c=null==(l=window.visualViewport)?void 0:l.height)?c:innerHeight,{scrollX:x,scrollY:w}=window,{height:S,width:C,top:k,right:E,bottom:T,left:L}=e.getBoundingClientRect(),{top:A,right:M,bottom:D,left:I}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===d||"nearest"===d?k-A:"end"===d?T+D:k+S/2-A+D,R="center"===h?L+C/2-I+M:"end"===h?E+M:L-I;const O=[];for(let e=0;e<g.length;e++){const t=g[e],{height:n,width:r,top:i,right:a,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===u&&k>=0&&L>=0&&T<=b&&E<=_&&(t===v&&!o(t)||k>=i&&T<=l&&L>=c&&E<=a))return O;const f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),m=parseInt(f.borderTopWidth,10),y=parseInt(f.borderRightWidth,10),A=parseInt(f.borderBottomWidth,10);let M=0,D=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-y:0,j="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-A:0,P="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,B="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(v===t)M="start"===d?N:"end"===d?N-b:"nearest"===d?s(w,w+b,b,m,A,w+N,w+N+S,S):N-b/2,D="start"===h?R:"center"===h?R-_/2:"end"===h?R-_:s(x,x+_,_,p,y,x+R,x+R+C,C),M=Math.max(0,M+w),D=Math.max(0,D+x);else{M="start"===d?N-i-m:"end"===d?N-l+A+j:"nearest"===d?s(i,l,n,m,A+j,N,N+S,S):N-(i+n/2)+j/2,D="start"===h?R-c-p:"center"===h?R-(c+r/2)+I/2:"end"===h?R-a+y+I:s(c,a,r,p,y+I,R,R+C,C);const{scrollLeft:e,scrollTop:o}=t;M=0===B?0:Math.max(0,Math.min(o+M/B,t.scrollHeight-n/B+j)),D=0===P?0:Math.max(0,Math.min(e+D/P,t.scrollWidth-r/P+I)),N+=o-M,R+=e-D}O.push({el:t,top:M,left:D})}return O};function c(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(l(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:i,top:o,left:s}of l(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=o-n.top+n.bottom,t=s-n.left+n.right;i.scroll({top:e,left:t,behavior:r})}}}}]);