|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[296,3,5,6,7,8,9,13,18,140],{"+Axu":function(U,X,x){},"+NIl":function(U,X,x){(function(I){I(x("VrN/"))})(function(I){"use strict";I.defineMode("stex",function(_,O){"use strict";function y(i,e){i.cmdState.push(e)}function v(i){return i.cmdState.length>0?i.cmdState[i.cmdState.length-1]:null}function o(i){var e=i.cmdState.pop();e&&e.closeBracket()}function g(i){for(var e=i.cmdState,r=e.length-1;r>=0;r--){var c=e[r];if(c.name=="DEFAULT")continue;return c}return{styleIdentifier:function(){return null}}}function p(i,e,r){return function(){this.name=i,this.bracketNo=0,this.style=e,this.styles=r,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var d={};d.importmodule=p("importmodule","tag",["string","builtin"]),d.documentclass=p("documentclass","tag",["","atom"]),d.usepackage=p("usepackage","tag",["atom"]),d.begin=p("begin","tag",["atom"]),d.end=p("end","tag",["atom"]),d.label=p("label","tag",["atom"]),d.ref=p("ref","tag",["atom"]),d.eqref=p("eqref","tag",["atom"]),d.cite=p("cite","tag",["atom"]),d.bibitem=p("bibitem","tag",["atom"]),d.Bibitem=p("Bibitem","tag",["atom"]),d.RBibitem=p("RBibitem","tag",["atom"]),d.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function a(i,e){i.f=e}function n(i,e){var r;if(i.match(/^\\[a-zA-Z@]+/)){var c=i.current().slice(1);return r=d.hasOwnProperty(c)?d[c]:d.DEFAULT,r=new r,y(e,r),a(e,t),r.style}if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/\\]/))return"tag";if(i.match("\\["))return a(e,function(f,m){return s(f,m,"\\]")}),"keyword";if(i.match("\\("))return a(e,function(f,m){return s(f,m,"\\)")}),"keyword";if(i.match("$$"))return a(e,function(f,m){return s(f,m,"$$")}),"keyword";if(i.match("$"))return a(e,function(f,m){return s(f,m,"$")}),"keyword";var u=i.next();if(u=="%")return i.skipToEnd(),"comment";if(u=="}"||u=="]"){if(r=v(e),r)r.closeBracket(u),a(e,t);else return"error";return"bracket"}else return u=="{"||u=="["?(r=d.DEFAULT,r=new r,y(e,r),"bracket"):/\d/.test(u)?(i.eatWhile(/[\w.%]/),"atom"):(i.eatWhile(/[\w\-_]/),r=g(e),r.name=="begin"&&(r.argument=i.current()),r.styleIdentifier())}function s(i,e,r){if(i.eatSpace())return null;if(r&&i.match(r))return a(e,n),"keyword";if(i.match(/^\\[a-zA-Z@]+/))return"tag";if(i.match(/^[a-zA-Z]+/))return"variable-2";if(i.match(/^\\[$&%#{}_]/))return"tag";if(i.match(/^\\[,;!\/]/))return"tag";if(i.match(/^[\^_&]/))return"tag";if(i.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(i.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var c=i.next();return c=="{"||c=="}"||c=="["||c=="]"||c=="("||c==")"?"bracket":c=="%"?(i.skipToEnd(),"comment"):"error"}function t(i,e){var r=i.peek(),c;return r=="{"||r=="["?(c=v(e),c.openBracket(r),i.eat(r),a(e,n),"bracket"):/[ \t\r]/.test(r)?(i.eat(r),null):(a(e,n),o(e),n(i,e))}return{startState:function(){var i=O.inMathMode?function(e,r){return s(e,r)}:n;return{cmdState:[],f:i}},copyState:function(i){return{cmdState:i.cmdState.slice(),f:i.f}},token:function(i,e){return e.f(i,e)},blankLine:function(i){i.f=n,i.cmdState.length=0},lineComment:"%"}}),I.defineMIME("text/x-stex","stex"),I.defineMIME("text/x-latex","stex")})},"+QRC":function(U,X,x){"use strict";var I=x("E9nw"),_={"text/plain":"Text","text/html":"Url",default:"Text"},O="Copy to clipboard: #{key}, Enter";function y(o){var g=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return o.replace(/#{\s*key\s*}/g,g)}function v(o,g){var p,d,a,n,s,t,i=!1;g||(g={}),p=g.debug||!1;try{a=I(),n=document.createRange(),s=document.getSelection(),t=document.createElement("span"),t.textContent=o,t.style.all="unset",t.style.position="fixed",t.style.top=0,t.style.clip="rect(0, 0, 0, 0)",t.style.whiteSpace="pre",t.style.webkitUserSelect="text",t.style.MozUserSelect="text",t.style.msUserSelect="text",t.style.userSelect="text",t.addEventListener("copy",function(r){if(r.stopPropagation(),g.format)if(r.preventDefault(),typeof r.clipboardData=="undefined"){p&&console.warn("unable to use e.clipboardData"),p&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var c=_[g.format]||_.default;window.clipboardData.setData(c,o)}else r.clipboardData.clearData(),r.clipboardData.setData(g.format,o);g.onCopy&&(r.preventDefault(),g.onCopy(r.clipboardData))}),document.body.appendChild(t),n.selectNodeContents(t),s.addRange(n);var e=document.execCommand("copy");if(!e)throw new Error("copy command was unsuccessful");i=!0}catch(r){p&&console.error("unable to copy using execCommand: ",r),p&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(g.format||"text",o),g.onCopy&&g.onCopy(window.clipboardData),i=!0}catch(c){p&&console.error("unable to copy using clipboardData: ",c),p&&console.error("falling back to prompt"),d=y("message"in g?g.message:O),window.prompt(d,o)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(n):s.removeAllRanges()),t&&document.body.removeChild(t),a()}return i}U.exports=v},"+ua5":function(U,X,x){},"/GNS":function(U,X,x){U.exports=x.p+"static/search1.c4136dd4.png"},"/POA":function(U,X,x){!function(I,_){if(!0)U.exports=_();else var O,y}(window,function(){return function(I){var _={};function O(y){if(_[y])return _[y].exports;var v=_[y]={i:y,l:!1,exports:{}};return I[y].call(v.exports,v,v.exports,O),v.l=!0,v.exports}return O.m=I,O.c=_,O.d=function(y,v,o){O.o(y,v)||Object.defineProperty(y,v,{enumerable:!0,get:o})},O.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},O.t=function(y,v){if(1&v&&(y=O(y)),8&v)return y;if(4&v&&typeof y=="object"&&y&&y.__esModule)return y;var o=Object.create(null);if(O.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:y}),2&v&&typeof y!="string")for(var g in y)O.d(o,g,function(p){return y[p]}.bind(null,g));return o},O.n=function(y){var v=y&&y.__esModule?function(){return y.default}:function(){return y};return O.d(v,"a",v),v},O.o=function(y,v){return Object.prototype.hasOwnProperty.call(y,v)},O.p="",O(O.s=34)}([function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.forwardEvent=_.EventEmitter=void 0;var y=function(){function v(){this._listeners=[],this._disposed=!1}return Object.defineProperty(v.prototype,"event",{get:function(){var o=this;return this._event||(this._event=function(g){return o._listeners.push(g),{dispose:function(){if(!o._disposed){for(var p=0;p<o._listeners.length;p++)if(o._listeners[p]===g)return void o._listeners.splice(p,1)}}}}),this._event},enumerable:!1,configurable:!0}),v.prototype.fire=function(o,g){for(var p=[],d=0;d<this._listeners.length;d++)p.push(this._listeners[d]);for(d=0;d<p.length;d++)p[d].call(void 0,o,g)},v.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},v}();_.EventEmitter=y,_.forwardEvent=function(v,o){return v(function(g){return o.fire(g)})}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.IUnicodeService=_.IOptionsService=_.ILogService=_.IInstantiationService=_.IDirtyRowService=_.ICharsetService=_.ICoreService=_.ICoreMouseService=_.IBufferService=void 0;var y=O(14);_.IBufferService=y.createDecorator("BufferService"),_.ICoreMouseService=y.createDecorator("CoreMouseService"),_.ICoreService=y.createDecorator("CoreService"),_.ICharsetService=y.createDecorator("CharsetService"),_.IDirtyRowService=y.createDecorator("DirtyRowService"),_.IInstantiationService=y.createDecorator("InstantiationService"),_.ILogService=y.createDecorator("LogService"),_.IOptionsService=y.createDecorator("OptionsService"),_.IUnicodeService=y.createDecorator("UnicodeService")},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.getDisposeArrayDisposable=_.disposeArray=_.Disposable=void 0;var y=function(){function o(){this._disposables=[],this._isDisposed=!1}return o.prototype.dispose=function(){this._isDisposed=!0;for(var g=0,p=this._disposables;g<p.length;g++)p[g].dispose();this._disposables.length=0},o.prototype.register=function(g){return this._disposables.push(g),g},o.prototype.unregister=function(g){var p=this._disposables.indexOf(g);p!==-1&&this._disposables.splice(p,1)},o}();function v(o){for(var g=0,p=o;g<p.length;g++)p[g].dispose();o.length=0}_.Disposable=y,_.disposeArray=v,_.getDisposeArrayDisposable=function(o){return{dispose:function(){return v(o)}}}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.WHITESPACE_CELL_CODE=_.WHITESPACE_CELL_WIDTH=_.WHITESPACE_CELL_CHAR=_.NULL_CELL_CODE=_.NULL_CELL_WIDTH=_.NULL_CELL_CHAR=_.CHAR_DATA_CODE_INDEX=_.CHAR_DATA_WIDTH_INDEX=_.CHAR_DATA_CHAR_INDEX=_.CHAR_DATA_ATTR_INDEX=_.DEFAULT_ATTR=_.DEFAULT_COLOR=void 0,_.DEFAULT_COLOR=256,_.DEFAULT_ATTR=256|_.DEFAULT_COLOR<<9,_.CHAR_DATA_ATTR_INDEX=0,_.CHAR_DATA_CHAR_INDEX=1,_.CHAR_DATA_WIDTH_INDEX=2,_.CHAR_DATA_CODE_INDEX=3,_.NULL_CELL_CHAR="",_.NULL_CELL_WIDTH=1,_.NULL_CELL_CODE=0,_.WHITESPACE_CELL_CHAR=" ",_.WHITESPACE_CELL_WIDTH=1,_.WHITESPACE_CELL_CODE=32},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(a,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,t){s.__proto__=t}||function(s,t){for(var i in t)t.hasOwnProperty(i)&&(s[i]=t[i])})(a,n)},function(a,n){function s(){this.constructor=a}y(a,n),a.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(_,"__esModule",{value:!0}),_.CellData=void 0;var o=O(8),g=O(3),p=O(6),d=function(a){function n(){var s=a!==null&&a.apply(this,arguments)||this;return s.content=0,s.fg=0,s.bg=0,s.extended=new p.ExtendedAttrs,s.combinedData="",s}return v(n,a),n.fromCharData=function(s){var t=new n;return t.setFromCharData(s),t},n.prototype.isCombined=function(){return 2097152&this.content},n.prototype.getWidth=function(){return this.content>>22},n.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?o.stringFromCodePoint(2097151&this.content):""},n.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},n.prototype.setFromCharData=function(s){this.fg=s[g.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(s[g.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(s[g.CHAR_DATA_CHAR_INDEX].length===2){var i=s[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=i&&i<=56319){var e=s[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=e&&e<=57343?this.content=1024*(i-55296)+e-56320+65536|s[g.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=s[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|s[g.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=s[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|s[g.CHAR_DATA_WIDTH_INDEX]<<22)},n.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},n}(p.AttributeData);_.CellData=d},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ISoundService=_.ISelectionService=_.IRenderService=_.IMouseService=_.ICoreBrowserService=_.ICharSizeService=void 0;var y=O(14);_.ICharSizeService=y.createDecorator("CharSizeService"),_.ICoreBrowserService=y.createDecorator("CoreBrowserService"),_.IMouseService=y.createDecorator("MouseService"),_.IRenderService=y.createDecorator("RenderService"),_.ISelectionService=y.createDecorator("SelectionService"),_.ISoundService=y.createDecorator("SoundService")},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ExtendedAttrs=_.AttributeData=void 0;var y=function(){function o(){this.fg=0,this.bg=0,this.extended=new v}return o.toColorRGB=function(g){return[g>>>16&255,g>>>8&255,255&g]},o.fromColorRGB=function(g){return(255&g[0])<<16|(255&g[1])<<8|255&g[2]},o.prototype.clone=function(){var g=new o;return g.fg=this.fg,g.bg=this.bg,g.extended=this.extended.clone(),g},o.prototype.isInverse=function(){return 67108864&this.fg},o.prototype.isBold=function(){return 134217728&this.fg},o.prototype.isUnderline=function(){return 268435456&this.fg},o.prototype.isBlink=function(){return 536870912&this.fg},o.prototype.isInvisible=function(){return 1073741824&this.fg},o.prototype.isItalic=function(){return 67108864&this.bg},o.prototype.isDim=function(){return 134217728&this.bg},o.prototype.getFgColorMode=function(){return 50331648&this.fg},o.prototype.getBgColorMode=function(){return 50331648&this.bg},o.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},o.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},o.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},o.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},o.prototype.isFgDefault=function(){return(50331648&this.fg)==0},o.prototype.isBgDefault=function(){return(50331648&this.bg)==0},o.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},o.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},o.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},o.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},o.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},o.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()},o.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},o.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},o.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},o.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},o.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},o}();_.AttributeData=y;var v=function(){function o(g,p){g===void 0&&(g=0),p===void 0&&(p=-1),this.underlineStyle=g,this.underlineColor=p}return o.prototype.clone=function(){return new o(this.underlineStyle,this.underlineColor)},o.prototype.isEmpty=function(){return this.underlineStyle===0},o}();_.ExtendedAttrs=v},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.addDisposableDomListener=void 0,_.addDisposableDomListener=function(y,v,o,g){y.addEventListener(v,o,g);var p=!1;return{dispose:function(){p||(p=!0,y.removeEventListener(v,o,g))}}}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Utf8ToUtf32=_.StringToUtf32=_.utf32ToString=_.stringFromCodePoint=void 0,_.stringFromCodePoint=function(o){return o>65535?(o-=65536,String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):String.fromCharCode(o)},_.utf32ToString=function(o,g,p){g===void 0&&(g=0),p===void 0&&(p=o.length);for(var d="",a=g;a<p;++a){var n=o[a];n>65535?(n-=65536,d+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):d+=String.fromCharCode(n)}return d};var y=function(){function o(){this._interim=0}return o.prototype.clear=function(){this._interim=0},o.prototype.decode=function(g,p){var d=g.length;if(!d)return 0;var a=0,n=0;this._interim&&(56320<=(i=g.charCodeAt(n++))&&i<=57343?p[a++]=1024*(this._interim-55296)+i-56320+65536:(p[a++]=this._interim,p[a++]=i),this._interim=0);for(var s=n;s<d;++s){var t=g.charCodeAt(s);if(55296<=t&&t<=56319){if(++s>=d)return this._interim=t,a;var i;56320<=(i=g.charCodeAt(s))&&i<=57343?p[a++]=1024*(t-55296)+i-56320+65536:(p[a++]=t,p[a++]=i)}else p[a++]=t}return a},o}();_.StringToUtf32=y;var v=function(){function o(){this.interim=new Uint8Array(3)}return o.prototype.clear=function(){this.interim.fill(0)},o.prototype.decode=function(g,p){var d=g.length;if(!d)return 0;var a,n,s,t,i=0,e=0,r=0;if(this.interim[0]){var c=!1,u=this.interim[0];u&=(224&u)==192?31:(240&u)==224?15:7;for(var f=0,m=void 0;(m=63&this.interim[++f])&&f<4;)u<<=6,u|=m;for(var l=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=l-f;r<E;){if(r>=d)return 0;if((192&(m=g[r++]))!=128){r--,c=!0;break}this.interim[f++]=m,u<<=6,u|=63&m}c||(l===2?u<128?r--:p[i++]=u:l===3?u<2048||u>=55296&&u<=57343||(p[i++]=u):u<65536||u>1114111||(p[i++]=u)),this.interim.fill(0)}for(var b=d-4,D=r;D<d;){for(;!(!(D<b)||128&(a=g[D])||128&(n=g[D+1])||128&(s=g[D+2])||128&(t=g[D+3]));)p[i++]=a,p[i++]=n,p[i++]=s,p[i++]=t,D+=4;if((a=g[D++])<128)p[i++]=a;else if((224&a)==192){if(D>=d)return this.interim[0]=a,i;if((192&(n=g[D++]))!=128){D--;continue}if((e=(31&a)<<6|63&n)<128){D--;continue}p[i++]=e}else if((240&a)==224){if(D>=d)return this.interim[0]=a,i;if((192&(n=g[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=a,this.interim[1]=n,i;if((192&(s=g[D++]))!=128){D--;continue}if((e=(15&a)<<12|(63&n)<<6|63&s)<2048||e>=55296&&e<=57343)continue;p[i++]=e}else if((248&a)==240){if(D>=d)return this.interim[0]=a,i;if((192&(n=g[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=a,this.interim[1]=n,i;if((192&(s=g[D++]))!=128){D--;continue}if(D>=d)return this.interim[0]=a,this.interim[1]=n,this.interim[2]=s,i;if((192&(t=g[D++]))!=128){D--;continue}if((e=(7&a)<<18|(63&n)<<12|(63&s)<<6|63&t)<65536||e>1114111)continue;p[i++]=e}}return i},o}();_.Utf8ToUtf32=v},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CHAR_ATLAS_CELL_SPACING=_.DIM_OPACITY=_.INVERTED_DEFAULT_COLOR=void 0,_.INVERTED_DEFAULT_COLOR=257,_.DIM_OPACITY=.5,_.CHAR_ATLAS_CELL_SPACING=1},function(I,_,O){"use strict";var y,v,o,g;function p(a){var n=a.toString(16);return n.length<2?"0"+n:n}function d(a,n){return a<n?(n+.05)/(a+.05):(a+.05)/(n+.05)}Object.defineProperty(_,"__esModule",{value:!0}),_.contrastRatio=_.toPaddedHex=_.rgba=_.rgb=_.css=_.color=_.channels=void 0,function(a){a.toCss=function(n,s,t,i){return i!==void 0?"#"+p(n)+p(s)+p(t)+p(i):"#"+p(n)+p(s)+p(t)},a.toRgba=function(n,s,t,i){return i===void 0&&(i=255),(n<<24|s<<16|t<<8|i)>>>0}}(y=_.channels||(_.channels={})),(v=_.color||(_.color={})).blend=function(a,n){var s=(255&n.rgba)/255;if(s===1)return{css:n.css,rgba:n.rgba};var t=n.rgba>>24&255,i=n.rgba>>16&255,e=n.rgba>>8&255,r=a.rgba>>24&255,c=a.rgba>>16&255,u=a.rgba>>8&255,f=r+Math.round((t-r)*s),m=c+Math.round((i-c)*s),l=u+Math.round((e-u)*s);return{css:y.toCss(f,m,l),rgba:y.toRgba(f,m,l)}},v.isOpaque=function(a){return(255&a.rgba)==255},v.ensureContrastRatio=function(a,n,s){var t=g.ensureContrastRatio(a.rgba,n.rgba,s);if(t)return g.toColor(t>>24&255,t>>16&255,t>>8&255)},v.opaque=function(a){var n=(255|a.rgba)>>>0,s=g.toChannels(n),t=s[0],i=s[1],e=s[2];return{css:y.toCss(t,i,e),rgba:n}},v.opacity=function(a,n){var s=Math.round(255*n),t=g.toChannels(a.rgba),i=t[0],e=t[1],r=t[2];return{css:y.toCss(i,e,r,s),rgba:y.toRgba(i,e,r,s)}},(_.css||(_.css={})).toColor=function(a){switch(a.length){case 7:return{css:a,rgba:(parseInt(a.slice(1),16)<<8|255)>>>0};case 9:return{css:a,rgba:parseInt(a.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(a){function n(s,t,i){var e=s/255,r=t/255,c=i/255;return .2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))+.0722*(c<=.03928?c/12.92:Math.pow((c+.055)/1.055,2.4))}a.relativeLuminance=function(s){return n(s>>16&255,s>>8&255,255&s)},a.relativeLuminance2=n}(o=_.rgb||(_.rgb={})),function(a){function n(t,i,e){for(var r=t>>24&255,c=t>>16&255,u=t>>8&255,f=i>>24&255,m=i>>16&255,l=i>>8&255,E=d(o.relativeLuminance2(f,l,m),o.relativeLuminance2(r,c,u));E<e&&(f>0||m>0||l>0);)f-=Math.max(0,Math.ceil(.1*f)),m-=Math.max(0,Math.ceil(.1*m)),l-=Math.max(0,Math.ceil(.1*l)),E=d(o.relativeLuminance2(f,l,m),o.relativeLuminance2(r,c,u));return(f<<24|m<<16|l<<8|255)>>>0}function s(t,i,e){for(var r=t>>24&255,c=t>>16&255,u=t>>8&255,f=i>>24&255,m=i>>16&255,l=i>>8&255,E=d(o.relativeLuminance2(f,l,m),o.relativeLuminance2(r,c,u));E<e&&(f<255||m<255||l<255);)f=Math.min(255,f+Math.ceil(.1*(255-f))),m=Math.min(255,m+Math.ceil(.1*(255-m))),l=Math.min(255,l+Math.ceil(.1*(255-l))),E=d(o.relativeLuminance2(f,l,m),o.relativeLuminance2(r,c,u));return(f<<24|m<<16|l<<8|255)>>>0}a.ensureContrastRatio=function(t,i,e){var r=o.relativeLuminance(t>>8),c=o.relativeLuminance(i>>8);if(d(r,c)<e)return c<r?n(t,i,e):s(t,i,e)},a.reduceLuminance=n,a.increaseLuminance=s,a.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},a.toColor=function(t,i,e){return{css:y.toCss(t,i,e),rgba:y.toRgba(t,i,e)}}}(g=_.rgba||(_.rgba={})),_.toPaddedHex=p,_.contrastRatio=d},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.isLinux=_.isWindows=_.isIphone=_.isIpad=_.isMac=_.isSafari=_.isFirefox=void 0;var y=typeof navigator=="undefined",v=y?"node":navigator.userAgent,o=y?"node":navigator.platform;function g(p,d){return p.indexOf(d)>=0}_.isFirefox=!!~v.indexOf("Firefox"),_.isSafari=/^((?!chrome|android).)*safari/i.test(v),_.isMac=g(["Macintosh","MacIntel","MacPPC","Mac68K"],o),_.isIpad=o==="iPad",_.isIphone=o==="iPhone",_.isWindows=g(["Windows","Win16","Win32","WinCE"],o),_.isLinux=o.indexOf("Linux")>=0},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.C1=_.C0=void 0,function(y){y.NUL="\0",y.SOH="",y.STX="",y.ETX="",y.EOT="",y.ENQ="",y.ACK="",y.BEL="\x07",y.BS="\b",y.HT=" ",y.LF=`
|
|
|
`,y.VT="\v",y.FF="\f",y.CR="\r",y.SO="",y.SI="",y.DLE="",y.DC1="",y.DC2="",y.DC3="",y.DC4="",y.NAK="",y.SYN="",y.ETB="",y.CAN="",y.EM="",y.SUB="",y.ESC="",y.FS="",y.GS="",y.RS="",y.US="",y.SP=" ",y.DEL="\x7F"}(_.C0||(_.C0={})),function(y){y.PAD="\x80",y.HOP="\x81",y.BPH="\x82",y.NBH="\x83",y.IND="\x84",y.NEL="\x85",y.SSA="\x86",y.ESA="\x87",y.HTS="\x88",y.HTJ="\x89",y.VTS="\x8A",y.PLD="\x8B",y.PLU="\x8C",y.RI="\x8D",y.SS2="\x8E",y.SS3="\x8F",y.DCS="\x90",y.PU1="\x91",y.PU2="\x92",y.STS="\x93",y.CCH="\x94",y.MW="\x95",y.SPA="\x96",y.EPA="\x97",y.SOS="\x98",y.SGCI="\x99",y.SCI="\x9A",y.CSI="\x9B",y.ST="\x9C",y.OSC="\x9D",y.PM="\x9E",y.APC="\x9F"}(_.C1||(_.C1={}))},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BaseRenderLayer=void 0;var y=O(3),v=O(9),o=O(25),g=O(6),p=O(28),d=O(10),a=O(17),n=function(){function s(t,i,e,r,c,u,f,m){this._container=t,this._alpha=r,this._colors=c,this._rendererId=u,this._bufferService=f,this._optionsService=m,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-"+i+"-layer"),this._canvas.style.zIndex=e.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return s.prototype.dispose=function(){var t;a.removeElementFromParent(this._canvas),(t=this._charAtlas)===null||t===void 0||t.dispose()},s.prototype._initCanvas=function(){this._ctx=p.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},s.prototype.onOptionsChanged=function(){},s.prototype.onBlur=function(){},s.prototype.onFocus=function(){},s.prototype.onCursorMove=function(){},s.prototype.onGridChanged=function(t,i){},s.prototype.onSelectionChanged=function(t,i,e){e===void 0&&(e=!1)},s.prototype.setColors=function(t){this._refreshCharAtlas(t)},s.prototype._setTransparency=function(t){if(t!==this._alpha){var i=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,i),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},s.prototype._refreshCharAtlas=function(t){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=o.acquireCharAtlas(this._optionsService.options,this._rendererId,t,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},s.prototype.resize=function(t){this._scaledCellWidth=t.scaledCellWidth,this._scaledCellHeight=t.scaledCellHeight,this._scaledCharWidth=t.scaledCharWidth,this._scaledCharHeight=t.scaledCharHeight,this._scaledCharLeft=t.scaledCharLeft,this._scaledCharTop=t.scaledCharTop,this._canvas.width=t.scaledCanvasWidth,this._canvas.height=t.scaledCanvasHeight,this._canvas.style.width=t.canvasWidth+"px",this._canvas.style.height=t.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},s.prototype._fillCells=function(t,i,e,r){this._ctx.fillRect(t*this._scaledCellWidth,i*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight)},s.prototype._fillBottomLineAtCells=function(t,i,e){e===void 0&&(e=1),this._ctx.fillRect(t*this._scaledCellWidth,(i+1)*this._scaledCellHeight-window.devicePixelRatio-1,e*this._scaledCellWidth,window.devicePixelRatio)},s.prototype._fillLeftLineAtCell=function(t,i,e){this._ctx.fillRect(t*this._scaledCellWidth,i*this._scaledCellHeight,window.devicePixelRatio*e,this._scaledCellHeight)},s.prototype._strokeRectAtCell=function(t,i,e,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,i*this._scaledCellHeight+window.devicePixelRatio/2,e*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},s.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))},s.prototype._clearCells=function(t,i,e,r){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,i*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,i*this._scaledCellHeight,e*this._scaledCellWidth,r*this._scaledCellHeight))},s.prototype._fillCharTrueColor=function(t,i,e){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(e),this._ctx.fillText(t.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},s.prototype._drawChars=function(t,i,e){var r,c,u=this._getContrastColor(t);u||t.isFgRGB()||t.isBgRGB()?this._drawUncachedChars(t,i,e,u):(t.isInverse()?(r=t.isBgDefault()?v.INVERTED_DEFAULT_COLOR:t.getBgColor(),c=t.isFgDefault()?v.INVERTED_DEFAULT_COLOR:t.getFgColor()):(c=t.isBgDefault()?y.DEFAULT_COLOR:t.getBgColor(),r=t.isFgDefault()?y.DEFAULT_COLOR:t.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=t.getChars()||y.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=t.getCode()||y.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=c,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!t.isBold(),this._currentGlyphIdentifier.dim=!!t.isDim(),this._currentGlyphIdentifier.italic=!!t.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,i*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(t,i,e))},s.prototype._drawUncachedChars=function(t,i,e,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!t.isBold(),!!t.isItalic()),this._ctx.textBaseline="middle",t.isInverse())if(r)this._ctx.fillStyle=r.css;else if(t.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(t.isBgRGB())this._ctx.fillStyle="rgb("+g.AttributeData.toColorRGB(t.getBgColor()).join(",")+")";else{var c=t.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&c<8&&(c+=8),this._ctx.fillStyle=this._colors.ansi[c].css}else if(r)this._ctx.fillStyle=r.css;else if(t.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(t.isFgRGB())this._ctx.fillStyle="rgb("+g.AttributeData.toColorRGB(t.getFgColor()).join(",")+")";else{var u=t.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&t.isBold()&&u<8&&(u+=8),this._ctx.fillStyle=this._colors.ansi[u].css}this._clipRow(e),t.isDim()&&(this._ctx.globalAlpha=v.DIM_OPACITY),this._ctx.fillText(t.getChars(),i*this._scaledCellWidth+this._scaledCharLeft,e*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},s.prototype._clipRow=function(t){this._ctx.beginPath(),this._ctx.rect(0,t*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},s.prototype._getFont=function(t,i){return(i?"italic":"")+" "+(t?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},s.prototype._getContrastColor=function(t){if(this._optionsService.options.minimumContrastRatio!==1){var i=this._colors.contrastCache.getColor(t.bg,t.fg);if(i!==void 0)return i||void 0;var e=t.getFgColor(),r=t.getFgColorMode(),c=t.getBgColor(),u=t.getBgColorMode(),f=!!t.isInverse(),m=!!t.isInverse();if(f){var l=e;e=c,c=l;var E=r;r=u,u=E}var b=this._resolveBackgroundRgba(u,c,f),D=this._resolveForegroundRgba(r,e,f,m),C=d.rgba.ensureContrastRatio(b,D,this._optionsService.options.minimumContrastRatio);if(C){var w={css:d.channels.toCss(C>>24&255,C>>16&255,C>>8&255),rgba:C};return this._colors.contrastCache.setColor(t.bg,t.fg,w),w}this._colors.contrastCache.setColor(t.bg,t.fg,null)}},s.prototype._resolveBackgroundRgba=function(t,i,e){switch(t){case 16777216:case 33554432:return this._colors.ansi[i].rgba;case 50331648:return i<<8;case 0:default:return e?this._colors.foreground.rgba:this._colors.background.rgba}},s.prototype._resolveForegroundRgba=function(t,i,e,r){switch(t){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&i<8&&(i+=8),this._colors.ansi[i].rgba;case 50331648:return i<<8;case 0:default:return e?this._colors.background.rgba:this._colors.foreground.rgba}},s}();_.BaseRenderLayer=n},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.createDecorator=_.getServiceDependencies=_.serviceRegistry=void 0;function y(v,o,g){o.di$target===o?o.di$dependencies.push({id:v,index:g}):(o.di$dependencies=[{id:v,index:g}],o.di$target=o)}_.serviceRegistry=new Map,_.getServiceDependencies=function(v){return v.di$dependencies||[]},_.createDecorator=function(v){if(_.serviceRegistry.has(v))return _.serviceRegistry.get(v);var o=function(g,p,d){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");y(o,g,d)};return o.toString=function(){return v},_.serviceRegistry.set(v,o),o}},function(I,_,O){"use strict";function y(v,o,g,p){if(g===void 0&&(g=0),p===void 0&&(p=v.length),g>=v.length)return v;g=(v.length+g)%v.length,p=p>=v.length?v.length:(v.length+p)%v.length;for(var d=g;d<p;++d)v[d]=o;return v}Object.defineProperty(_,"__esModule",{value:!0}),_.concat=_.fillFallback=_.fill=void 0,_.fill=function(v,o,g,p){return v.fill?v.fill(o,g,p):y(v,o,g,p)},_.fillFallback=y,_.concat=function(v,o){var g=new v.constructor(v.length+o.length);return g.set(v),g.set(o,v.length),g}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BufferLine=_.DEFAULT_ATTR_DATA=void 0;var y=O(8),v=O(3),o=O(4),g=O(6);_.DEFAULT_ATTR_DATA=Object.freeze(new g.AttributeData);var p=function(){function d(a,n,s){s===void 0&&(s=!1),this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*a);for(var t=n||o.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),i=0;i<a;++i)this.setCell(i,t);this.length=a}return d.prototype.get=function(a){var n=this._data[3*a+0],s=2097151&n;return[this._data[3*a+1],2097152&n?this._combined[a]:s?y.stringFromCodePoint(s):"",n>>22,2097152&n?this._combined[a].charCodeAt(this._combined[a].length-1):s]},d.prototype.set=function(a,n){this._data[3*a+1]=n[v.CHAR_DATA_ATTR_INDEX],n[v.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[a]=n[1],this._data[3*a+0]=2097152|a|n[v.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*a+0]=n[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|n[v.CHAR_DATA_WIDTH_INDEX]<<22},d.prototype.getWidth=function(a){return this._data[3*a+0]>>22},d.prototype.hasWidth=function(a){return 12582912&this._data[3*a+0]},d.prototype.getFg=function(a){return this._data[3*a+1]},d.prototype.getBg=function(a){return this._data[3*a+2]},d.prototype.hasContent=function(a){return 4194303&this._data[3*a+0]},d.prototype.getCodePoint=function(a){var n=this._data[3*a+0];return 2097152&n?this._combined[a].charCodeAt(this._combined[a].length-1):2097151&n},d.prototype.isCombined=function(a){return 2097152&this._data[3*a+0]},d.prototype.getString=function(a){var n=this._data[3*a+0];return 2097152&n?this._combined[a]:2097151&n?y.stringFromCodePoint(2097151&n):""},d.prototype.loadCell=function(a,n){var s=3*a;return n.content=this._data[s+0],n.fg=this._data[s+1],n.bg=this._data[s+2],2097152&n.content&&(n.combinedData=this._combined[a]),268435456&n.bg&&(n.extended=this._extendedAttrs[a]),n},d.prototype.setCell=function(a,n){2097152&n.content&&(this._combined[a]=n.combinedData),268435456&n.bg&&(this._extendedAttrs[a]=n.extended),this._data[3*a+0]=n.content,this._data[3*a+1]=n.fg,this._data[3*a+2]=n.bg},d.prototype.setCellFromCodePoint=function(a,n,s,t,i,e){268435456&i&&(this._extendedAttrs[a]=e),this._data[3*a+0]=n|s<<22,this._data[3*a+1]=t,this._data[3*a+2]=i},d.prototype.addCodepointToCell=function(a,n){var s=this._data[3*a+0];2097152&s?this._combined[a]+=y.stringFromCodePoint(n):(2097151&s?(this._combined[a]=y.stringFromCodePoint(2097151&s)+y.stringFromCodePoint(n),s&=-2097152,s|=2097152):s=n|1<<22,this._data[3*a+0]=s)},d.prototype.insertCells=function(a,n,s,t){if((a%=this.length)&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs),n<this.length-a){for(var i=new o.CellData,e=this.length-a-n-1;e>=0;--e)this.setCell(a+n+e,this.loadCell(a+e,i));for(e=0;e<n;++e)this.setCell(a+e,s)}else for(e=a;e<this.length;++e)this.setCell(e,s);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs)},d.prototype.deleteCells=function(a,n,s,t){if(a%=this.length,n<this.length-a){for(var i=new o.CellData,e=0;e<this.length-a-n;++e)this.setCell(a+e,this.loadCell(a+n+e,i));for(e=this.length-n;e<this.length;++e)this.setCell(e,s)}else for(e=a;e<this.length;++e)this.setCell(e,s);a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs),this.getWidth(a)!==0||this.hasContent(a)||this.setCellFromCodePoint(a,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs)},d.prototype.replaceCells=function(a,n,s,t){for(a&&this.getWidth(a-1)===2&&this.setCellFromCodePoint(a-1,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs),n<this.length&&this.getWidth(n-1)===2&&this.setCellFromCodePoint(n,0,1,(t==null?void 0:t.fg)||0,(t==null?void 0:t.bg)||0,(t==null?void 0:t.extended)||new g.ExtendedAttrs);a<n&&a<this.length;)this.setCell(a++,s)},d.prototype.resize=function(a,n){if(a!==this.length){if(a>this.length){var s=new Uint32Array(3*a);this.length&&(3*a<this._data.length?s.set(this._data.subarray(0,3*a)):s.set(this._data)),this._data=s;for(var t=this.length;t<a;++t)this.setCell(t,n)}else if(a){(s=new Uint32Array(3*a)).set(this._data.subarray(0,3*a)),this._data=s;var i=Object.keys(this._combined);for(t=0;t<i.length;t++){var e=parseInt(i[t],10);e>=a&&delete this._combined[e]}}else this._data=new Uint32Array(0),this._combined={};this.length=a}},d.prototype.fill=function(a){this._combined={},this._extendedAttrs={};for(var n=0;n<this.length;++n)this.setCell(n,a)},d.prototype.copyFrom=function(a){for(var n in this.length!==a.length?this._data=new Uint32Array(a._data):this._data.set(a._data),this.length=a.length,this._combined={},a._combined)this._combined[n]=a._combined[n];for(var n in this._extendedAttrs={},a._extendedAttrs)this._extendedAttrs[n]=a._extendedAttrs[n];this.isWrapped=a.isWrapped},d.prototype.clone=function(){var a=new d(0);for(var n in a._data=new Uint32Array(this._data),a.length=this.length,this._combined)a._combined[n]=this._combined[n];for(var n in this._extendedAttrs)a._extendedAttrs[n]=this._extendedAttrs[n];return a.isWrapped=this.isWrapped,a},d.prototype.getTrimmedLength=function(){for(var a=this.length-1;a>=0;--a)if(4194303&this._data[3*a+0])return a+(this._data[3*a+0]>>22);return 0},d.prototype.copyCellsFrom=function(a,n,s,t,i){var e=a._data;if(i)for(var r=t-1;r>=0;r--)for(var c=0;c<3;c++)this._data[3*(s+r)+c]=e[3*(n+r)+c];else for(r=0;r<t;r++)for(c=0;c<3;c++)this._data[3*(s+r)+c]=e[3*(n+r)+c];var u=Object.keys(a._combined);for(c=0;c<u.length;c++){var f=parseInt(u[c],10);f>=n&&(this._combined[f-n+s]=a._combined[f])}},d.prototype.translateToString=function(a,n,s){a===void 0&&(a=!1),n===void 0&&(n=0),s===void 0&&(s=this.length),a&&(s=Math.min(s,this.getTrimmedLength()));for(var t="";n<s;){var i=this._data[3*n+0],e=2097151&i;t+=2097152&i?this._combined[n]:e?y.stringFromCodePoint(e):v.WHITESPACE_CELL_CHAR,n+=i>>22||1}return t},d}();_.BufferLine=p},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.removeElementFromParent=void 0,_.removeElementFromParent=function(){for(var y,v=[],o=0;o<arguments.length;o++)v[o]=arguments[o];for(var g=0,p=v;g<p.length;g++){var d=p[g];(y=d==null?void 0:d.parentElement)===null||y===void 0||y.removeChild(d)}}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.tooMuchOutput=_.promptLabel=void 0,_.promptLabel="Terminal input",_.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(D,C){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,S){w.__proto__=S}||function(w,S){for(var A in S)S.hasOwnProperty(A)&&(w[A]=S[A])})(D,C)},function(D,C){function w(){this.constructor=D}y(D,C),D.prototype=C===null?Object.create(C):(w.prototype=C.prototype,new w)});Object.defineProperty(_,"__esModule",{value:!0}),_.InputHandler=_.WindowsOptionsReportType=void 0;var o,g=O(12),p=O(20),d=O(39),a=O(2),n=O(15),s=O(8),t=O(16),i=O(0),e=O(3),r=O(4),c=O(6),u=O(22),f=O(24),m={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function l(D,C){if(D>24)return C.setWinLines||!1;switch(D){case 1:return!!C.restoreWin;case 2:return!!C.minimizeWin;case 3:return!!C.setWinPosition;case 4:return!!C.setWinSizePixels;case 5:return!!C.raiseWin;case 6:return!!C.lowerWin;case 7:return!!C.refreshWin;case 8:return!!C.setWinSizeChars;case 9:return!!C.maximizeWin;case 10:return!!C.fullscreenWin;case 11:return!!C.getWinState;case 13:return!!C.getWinPosition;case 14:return!!C.getWinSizePixels;case 15:return!!C.getScreenSizePixels;case 16:return!!C.getCellSizePixels;case 18:return!!C.getWinSizeChars;case 19:return!!C.getScreenSizeChars;case 20:return!!C.getIconTitle;case 21:return!!C.getWinTitle;case 22:return!!C.pushTitle;case 23:return!!C.popTitle;case 24:return!!C.setWinLines}return!1}!function(D){D[D.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",D[D.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(o=_.WindowsOptionsReportType||(_.WindowsOptionsReportType={}));var E=function(){function D(C,w,S,A){this._bufferService=C,this._coreService=w,this._logService=S,this._optionsService=A,this._data=new Uint32Array(0)}return D.prototype.hook=function(C){this._data=new Uint32Array(0)},D.prototype.put=function(C,w,S){this._data=n.concat(this._data,C.subarray(w,S))},D.prototype.unhook=function(C){if(C){var w=s.utf32ToString(this._data);switch(this._data=new Uint32Array(0),w){case'"q':return this._coreService.triggerDataEvent(g.C0.ESC+'P1$r0"q'+g.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(g.C0.ESC+'P1$r61;1"p'+g.C0.ESC+"\\");case"r":var S=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(g.C0.ESC+"P1$r"+S+g.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(g.C0.ESC+"P1$r0m"+g.C0.ESC+"\\");case" q":var A={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return A-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(g.C0.ESC+"P1$r"+A+" q"+g.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",w),this._coreService.triggerDataEvent(g.C0.ESC+"P0$r"+g.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},D}(),b=function(D){function C(w,S,A,R,k,L,M,G,W){W===void 0&&(W=new d.EscapeSequenceParser);var N=D.call(this)||this;N._bufferService=w,N._charsetService=S,N._coreService=A,N._dirtyRowService=R,N._logService=k,N._optionsService=L,N._coreMouseService=M,N._unicodeService=G,N._parser=W,N._parseBuffer=new Uint32Array(4096),N._stringDecoder=new s.StringToUtf32,N._utf8Decoder=new s.Utf8ToUtf32,N._workCell=new r.CellData,N._windowTitle="",N._iconName="",N._windowTitleStack=[],N._iconNameStack=[],N._curAttrData=t.DEFAULT_ATTR_DATA.clone(),N._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone(),N._onRequestBell=new i.EventEmitter,N._onRequestRefreshRows=new i.EventEmitter,N._onRequestReset=new i.EventEmitter,N._onRequestScroll=new i.EventEmitter,N._onRequestSyncScrollBar=new i.EventEmitter,N._onRequestWindowsOptionsReport=new i.EventEmitter,N._onA11yChar=new i.EventEmitter,N._onA11yTab=new i.EventEmitter,N._onCursorMove=new i.EventEmitter,N._onLineFeed=new i.EventEmitter,N._onScroll=new i.EventEmitter,N._onTitleChange=new i.EventEmitter,N.register(N._parser),N._parser.setCsiHandlerFallback(function(B,J){N._logService.debug("Unknown CSI code: ",{identifier:N._parser.identToString(B),params:J.toArray()})}),N._parser.setEscHandlerFallback(function(B){N._logService.debug("Unknown ESC code: ",{identifier:N._parser.identToString(B)})}),N._parser.setExecuteHandlerFallback(function(B){N._logService.debug("Unknown EXECUTE code: ",{code:B})}),N._parser.setOscHandlerFallback(function(B,J,re){N._logService.debug("Unknown OSC code: ",{identifier:B,action:J,data:re})}),N._parser.setDcsHandlerFallback(function(B,J,re){J==="HOOK"&&(re=re.toArray()),N._logService.debug("Unknown DCS code: ",{identifier:N._parser.identToString(B),action:J,payload:re})}),N._parser.setPrintHandler(function(B,J,re){return N.print(B,J,re)}),N._parser.setCsiHandler({final:"@"},function(B){return N.insertChars(B)}),N._parser.setCsiHandler({intermediates:" ",final:"@"},function(B){return N.scrollLeft(B)}),N._parser.setCsiHandler({final:"A"},function(B){return N.cursorUp(B)}),N._parser.setCsiHandler({intermediates:" ",final:"A"},function(B){return N.scrollRight(B)}),N._parser.setCsiHandler({final:"B"},function(B){return N.cursorDown(B)}),N._parser.setCsiHandler({final:"C"},function(B){return N.cursorForward(B)}),N._parser.setCsiHandler({final:"D"},function(B){return N.cursorBackward(B)}),N._parser.setCsiHandler({final:"E"},function(B){return N.cursorNextLine(B)}),N._parser.setCsiHandler({final:"F"},function(B){return N.cursorPrecedingLine(B)}),N._parser.setCsiHandler({final:"G"},function(B){return N.cursorCharAbsolute(B)}),N._parser.setCsiHandler({final:"H"},function(B){return N.cursorPosition(B)}),N._parser.setCsiHandler({final:"I"},function(B){return N.cursorForwardTab(B)}),N._parser.setCsiHandler({final:"J"},function(B){return N.eraseInDisplay(B)}),N._parser.setCsiHandler({prefix:"?",final:"J"},function(B){return N.eraseInDisplay(B)}),N._parser.setCsiHandler({final:"K"},function(B){return N.eraseInLine(B)}),N._parser.setCsiHandler({prefix:"?",final:"K"},function(B){return N.eraseInLine(B)}),N._parser.setCsiHandler({final:"L"},function(B){return N.insertLines(B)}),N._parser.setCsiHandler({final:"M"},function(B){return N.deleteLines(B)}),N._parser.setCsiHandler({final:"P"},function(B){return N.deleteChars(B)}),N._parser.setCsiHandler({final:"S"},function(B){return N.scrollUp(B)}),N._parser.setCsiHandler({final:"T"},function(B){return N.scrollDown(B)}),N._parser.setCsiHandler({final:"X"},function(B){return N.eraseChars(B)}),N._parser.setCsiHandler({final:"Z"},function(B){return N.cursorBackwardTab(B)}),N._parser.setCsiHandler({final:"`"},function(B){return N.charPosAbsolute(B)}),N._parser.setCsiHandler({final:"a"},function(B){return N.hPositionRelative(B)}),N._parser.setCsiHandler({final:"b"},function(B){return N.repeatPrecedingCharacter(B)}),N._parser.setCsiHandler({final:"c"},function(B){return N.sendDeviceAttributesPrimary(B)}),N._parser.setCsiHandler({prefix:">",final:"c"},function(B){return N.sendDeviceAttributesSecondary(B)}),N._parser.setCsiHandler({final:"d"},function(B){return N.linePosAbsolute(B)}),N._parser.setCsiHandler({final:"e"},function(B){return N.vPositionRelative(B)}),N._parser.setCsiHandler({final:"f"},function(B){return N.hVPosition(B)}),N._parser.setCsiHandler({final:"g"},function(B){return N.tabClear(B)}),N._parser.setCsiHandler({final:"h"},function(B){return N.setMode(B)}),N._parser.setCsiHandler({prefix:"?",final:"h"},function(B){return N.setModePrivate(B)}),N._parser.setCsiHandler({final:"l"},function(B){return N.resetMode(B)}),N._parser.setCsiHandler({prefix:"?",final:"l"},function(B){return N.resetModePrivate(B)}),N._parser.setCsiHandler({final:"m"},function(B){return N.charAttributes(B)}),N._parser.setCsiHandler({final:"n"},function(B){return N.deviceStatus(B)}),N._parser.setCsiHandler({prefix:"?",final:"n"},function(B){return N.deviceStatusPrivate(B)}),N._parser.setCsiHandler({intermediates:"!",final:"p"},function(B){return N.softReset(B)}),N._parser.setCsiHandler({intermediates:" ",final:"q"},function(B){return N.setCursorStyle(B)}),N._parser.setCsiHandler({final:"r"},function(B){return N.setScrollRegion(B)}),N._parser.setCsiHandler({final:"s"},function(B){return N.saveCursor(B)}),N._parser.setCsiHandler({final:"t"},function(B){return N.windowOptions(B)}),N._parser.setCsiHandler({final:"u"},function(B){return N.restoreCursor(B)}),N._parser.setCsiHandler({intermediates:"'",final:"}"},function(B){return N.insertColumns(B)}),N._parser.setCsiHandler({intermediates:"'",final:"~"},function(B){return N.deleteColumns(B)}),N._parser.setExecuteHandler(g.C0.BEL,function(){return N.bell()}),N._parser.setExecuteHandler(g.C0.LF,function(){return N.lineFeed()}),N._parser.setExecuteHandler(g.C0.VT,function(){return N.lineFeed()}),N._parser.setExecuteHandler(g.C0.FF,function(){return N.lineFeed()}),N._parser.setExecuteHandler(g.C0.CR,function(){return N.carriageReturn()}),N._parser.setExecuteHandler(g.C0.BS,function(){return N.backspace()}),N._parser.setExecuteHandler(g.C0.HT,function(){return N.tab()}),N._parser.setExecuteHandler(g.C0.SO,function(){return N.shiftOut()}),N._parser.setExecuteHandler(g.C0.SI,function(){return N.shiftIn()}),N._parser.setExecuteHandler(g.C1.IND,function(){return N.index()}),N._parser.setExecuteHandler(g.C1.NEL,function(){return N.nextLine()}),N._parser.setExecuteHandler(g.C1.HTS,function(){return N.tabSet()}),N._parser.setOscHandler(0,new u.OscHandler(function(B){N.setTitle(B),N.setIconName(B)})),N._parser.setOscHandler(1,new u.OscHandler(function(B){return N.setIconName(B)})),N._parser.setOscHandler(2,new u.OscHandler(function(B){return N.setTitle(B)})),N._parser.setEscHandler({final:"7"},function(){return N.saveCursor()}),N._parser.setEscHandler({final:"8"},function(){return N.restoreCursor()}),N._parser.setEscHandler({final:"D"},function(){return N.index()}),N._parser.setEscHandler({final:"E"},function(){return N.nextLine()}),N._parser.setEscHandler({final:"H"},function(){return N.tabSet()}),N._parser.setEscHandler({final:"M"},function(){return N.reverseIndex()}),N._parser.setEscHandler({final:"="},function(){return N.keypadApplicationMode()}),N._parser.setEscHandler({final:">"},function(){return N.keypadNumericMode()}),N._parser.setEscHandler({final:"c"},function(){return N.fullReset()}),N._parser.setEscHandler({final:"n"},function(){return N.setgLevel(2)}),N._parser.setEscHandler({final:"o"},function(){return N.setgLevel(3)}),N._parser.setEscHandler({final:"|"},function(){return N.setgLevel(3)}),N._parser.setEscHandler({final:"}"},function(){return N.setgLevel(2)}),N._parser.setEscHandler({final:"~"},function(){return N.setgLevel(1)}),N._parser.setEscHandler({intermediates:"%",final:"@"},function(){return N.selectDefaultCharset()}),N._parser.setEscHandler({intermediates:"%",final:"G"},function(){return N.selectDefaultCharset()});var K=function(B){F._parser.setEscHandler({intermediates:"(",final:B},function(){return N.selectCharset("("+B)}),F._parser.setEscHandler({intermediates:")",final:B},function(){return N.selectCharset(")"+B)}),F._parser.setEscHandler({intermediates:"*",final:B},function(){return N.selectCharset("*"+B)}),F._parser.setEscHandler({intermediates:"+",final:B},function(){return N.selectCharset("+"+B)}),F._parser.setEscHandler({intermediates:"-",final:B},function(){return N.selectCharset("-"+B)}),F._parser.setEscHandler({intermediates:".",final:B},function(){return N.selectCharset("."+B)}),F._parser.setEscHandler({intermediates:"/",final:B},function(){return N.selectCharset("/"+B)})},F=this;for(var P in p.CHARSETS)K(P);return N._parser.setEscHandler({intermediates:"#",final:"8"},function(){return N.screenAlignmentPattern()}),N._parser.setErrorHandler(function(B){return N._logService.error("Parsing error: ",B),B}),N._parser.setDcsHandler({intermediates:"$",final:"q"},new E(N._bufferService,N._coreService,N._logService,N._optionsService)),N}return v(C,D),Object.defineProperty(C.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),C.prototype.dispose=function(){D.prototype.dispose.call(this)},C.prototype.parse=function(w){var S=this._bufferService.buffer,A=S.x,R=S.y;if(this._logService.debug("parsing data",w),this._parseBuffer.length<w.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(w.length,131072))),this._dirtyRowService.clearRange(),w.length>131072)for(var k=0;k<w.length;k+=131072){var L=k+131072<w.length?k+131072:w.length,M=typeof w=="string"?this._stringDecoder.decode(w.substring(k,L),this._parseBuffer):this._utf8Decoder.decode(w.subarray(k,L),this._parseBuffer);this._parser.parse(this._parseBuffer,M)}else M=typeof w=="string"?this._stringDecoder.decode(w,this._parseBuffer):this._utf8Decoder.decode(w,this._parseBuffer),this._parser.parse(this._parseBuffer,M);(S=this._bufferService.buffer).x===A&&S.y===R||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},C.prototype.print=function(w,S,A){var R,k,L=this._bufferService.buffer,M=this._charsetService.charset,G=this._optionsService.options.screenReaderMode,W=this._bufferService.cols,N=this._coreService.decPrivateModes.wraparound,K=this._coreService.modes.insertMode,F=this._curAttrData,P=L.lines.get(L.ybase+L.y);this._dirtyRowService.markDirty(L.y),L.x&&A-S>0&&P.getWidth(L.x-1)===2&&P.setCellFromCodePoint(L.x-1,0,1,F.fg,F.bg,F.extended);for(var B=S;B<A;++B){if(R=w[B],k=this._unicodeService.wcwidth(R),R<127&&M){var J=M[String.fromCharCode(R)];J&&(R=J.charCodeAt(0))}if(G&&this._onA11yChar.fire(s.stringFromCodePoint(R)),k||!L.x){if(L.x+k-1>=W){if(N){for(;L.x<W;)P.setCellFromCodePoint(L.x++,0,1,F.fg,F.bg,F.extended);L.x=0,L.y++,L.y===L.scrollBottom+1?(L.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(L.y>=this._bufferService.rows&&(L.y=this._bufferService.rows-1),L.lines.get(L.ybase+L.y).isWrapped=!0),P=L.lines.get(L.ybase+L.y)}else if(L.x=W-1,k===2)continue}if(K&&(P.insertCells(L.x,k,L.getNullCell(F),F),P.getWidth(W-1)===2&&P.setCellFromCodePoint(W-1,e.NULL_CELL_CODE,e.NULL_CELL_WIDTH,F.fg,F.bg,F.extended)),P.setCellFromCodePoint(L.x++,R,k,F.fg,F.bg,F.extended),k>0)for(;--k;)P.setCellFromCodePoint(L.x++,0,0,F.fg,F.bg,F.extended)}else P.getWidth(L.x-1)?P.addCodepointToCell(L.x-1,R):P.addCodepointToCell(L.x-2,R)}A-S>0&&(P.loadCell(L.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),L.x<W&&A-S>0&&P.getWidth(L.x)===0&&!P.hasContent(L.x)&&P.setCellFromCodePoint(L.x,0,1,F.fg,F.bg,F.extended),this._dirtyRowService.markDirty(L.y)},C.prototype.addCsiHandler=function(w,S){var A=this;return w.final!=="t"||w.prefix||w.intermediates?this._parser.addCsiHandler(w,S):this._parser.addCsiHandler(w,function(R){return!l(R.params[0],A._optionsService.options.windowOptions)||S(R)})},C.prototype.addDcsHandler=function(w,S){return this._parser.addDcsHandler(w,new f.DcsHandler(S))},C.prototype.addEscHandler=function(w,S){return this._parser.addEscHandler(w,S)},C.prototype.addOscHandler=function(w,S){return this._parser.addOscHandler(w,new u.OscHandler(S))},C.prototype.bell=function(){this._onRequestBell.fire()},C.prototype.lineFeed=function(){var w=this._bufferService.buffer;this._dirtyRowService.markDirty(w.y),this._optionsService.options.convertEol&&(w.x=0),w.y++,w.y===w.scrollBottom+1?(w.y--,this._onRequestScroll.fire(this._eraseAttrData())):w.y>=this._bufferService.rows&&(w.y=this._bufferService.rows-1),w.x>=this._bufferService.cols&&w.x--,this._dirtyRowService.markDirty(w.y),this._onLineFeed.fire()},C.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},C.prototype.backspace=function(){var w,S=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(S.x>0&&S.x--);if(this._restrictCursor(this._bufferService.cols),S.x>0)S.x--;else if(S.x===0&&S.y>S.scrollTop&&S.y<=S.scrollBottom&&((w=S.lines.get(S.ybase+S.y))===null||w===void 0?void 0:w.isWrapped)){S.lines.get(S.ybase+S.y).isWrapped=!1,S.y--,S.x=this._bufferService.cols-1;var A=S.lines.get(S.ybase+S.y);A.hasWidth(S.x)&&!A.hasContent(S.x)&&S.x--}this._restrictCursor()},C.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var w=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-w)}},C.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},C.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},C.prototype._restrictCursor=function(w){w===void 0&&(w=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(w,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)},C.prototype._setCursor=function(w,S){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=w,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+S):(this._bufferService.buffer.x=w,this._bufferService.buffer.y=S),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},C.prototype._moveCursor=function(w,S){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+w,this._bufferService.buffer.y+S)},C.prototype.cursorUp=function(w){var S=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;S>=0?this._moveCursor(0,-Math.min(S,w.params[0]||1)):this._moveCursor(0,-(w.params[0]||1))},C.prototype.cursorDown=function(w){var S=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;S>=0?this._moveCursor(0,Math.min(S,w.params[0]||1)):this._moveCursor(0,w.params[0]||1)},C.prototype.cursorForward=function(w){this._moveCursor(w.params[0]||1,0)},C.prototype.cursorBackward=function(w){this._moveCursor(-(w.params[0]||1),0)},C.prototype.cursorNextLine=function(w){this.cursorDown(w),this._bufferService.buffer.x=0},C.prototype.cursorPrecedingLine=function(w){this.cursorUp(w),this._bufferService.buffer.x=0},C.prototype.cursorCharAbsolute=function(w){this._setCursor((w.params[0]||1)-1,this._bufferService.buffer.y)},C.prototype.cursorPosition=function(w){this._setCursor(w.length>=2?(w.params[1]||1)-1:0,(w.params[0]||1)-1)},C.prototype.charPosAbsolute=function(w){this._setCursor((w.params[0]||1)-1,this._bufferService.buffer.y)},C.prototype.hPositionRelative=function(w){this._moveCursor(w.params[0]||1,0)},C.prototype.linePosAbsolute=function(w){this._setCursor(this._bufferService.buffer.x,(w.params[0]||1)-1)},C.prototype.vPositionRelative=function(w){this._moveCursor(0,w.params[0]||1)},C.prototype.hVPosition=function(w){this.cursorPosition(w)},C.prototype.tabClear=function(w){var S=w.params[0];S===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:S===3&&(this._bufferService.buffer.tabs={})},C.prototype.cursorForwardTab=function(w){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var S=w.params[0]||1;S--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},C.prototype.cursorBackwardTab=function(w){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var S=w.params[0]||1,A=this._bufferService.buffer;S--;)A.x=A.prevStop()},C.prototype._eraseInBufferLine=function(w,S,A,R){R===void 0&&(R=!1);var k=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+w);k.replaceCells(S,A,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),R&&(k.isWrapped=!1)},C.prototype._resetBufferLine=function(w){var S=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+w);S.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),S.isWrapped=!1},C.prototype.eraseInDisplay=function(w){var S;switch(this._restrictCursor(),w.params[0]){case 0:for(S=this._bufferService.buffer.y,this._dirtyRowService.markDirty(S),this._eraseInBufferLine(S++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);S<this._bufferService.rows;S++)this._resetBufferLine(S);this._dirtyRowService.markDirty(S);break;case 1:for(S=this._bufferService.buffer.y,this._dirtyRowService.markDirty(S),this._eraseInBufferLine(S,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(S+1).isWrapped=!1);S--;)this._resetBufferLine(S);this._dirtyRowService.markDirty(0);break;case 2:for(S=this._bufferService.rows,this._dirtyRowService.markDirty(S-1);S--;)this._resetBufferLine(S);this._dirtyRowService.markDirty(0);break;case 3:var A=this._bufferService.buffer.lines.length-this._bufferService.rows;A>0&&(this._bufferService.buffer.lines.trimStart(A),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-A,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-A,0),this._onScroll.fire(0))}},C.prototype.eraseInLine=function(w){switch(this._restrictCursor(),w.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)},C.prototype.insertLines=function(w){this._restrictCursor();var S=w.params[0]||1,A=this._bufferService.buffer;if(!(A.y>A.scrollBottom||A.y<A.scrollTop)){for(var R=A.ybase+A.y,k=this._bufferService.rows-1-A.scrollBottom,L=this._bufferService.rows-1+A.ybase-k+1;S--;)A.lines.splice(L-1,1),A.lines.splice(R,0,A.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(A.y,A.scrollBottom),A.x=0}},C.prototype.deleteLines=function(w){this._restrictCursor();var S=w.params[0]||1,A=this._bufferService.buffer;if(!(A.y>A.scrollBottom||A.y<A.scrollTop)){var R,k=A.ybase+A.y;for(R=this._bufferService.rows-1-A.scrollBottom,R=this._bufferService.rows-1+A.ybase-R;S--;)A.lines.splice(k,1),A.lines.splice(R,0,A.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(A.y,A.scrollBottom),A.x=0}},C.prototype.insertChars=function(w){this._restrictCursor();var S=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);S&&(S.insertCells(this._bufferService.buffer.x,w.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},C.prototype.deleteChars=function(w){this._restrictCursor();var S=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);S&&(S.deleteCells(this._bufferService.buffer.x,w.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},C.prototype.scrollUp=function(w){for(var S=w.params[0]||1,A=this._bufferService.buffer;S--;)A.lines.splice(A.ybase+A.scrollTop,1),A.lines.splice(A.ybase+A.scrollBottom,0,A.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(A.scrollTop,A.scrollBottom)},C.prototype.scrollDown=function(w){for(var S=w.params[0]||1,A=this._bufferService.buffer;S--;)A.lines.splice(A.ybase+A.scrollBottom,1),A.lines.splice(A.ybase+A.scrollTop,0,A.getBlankLine(t.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(A.scrollTop,A.scrollBottom)},C.prototype.scrollLeft=function(w){var S=this._bufferService.buffer;if(!(S.y>S.scrollBottom||S.y<S.scrollTop)){for(var A=w.params[0]||1,R=S.scrollTop;R<=S.scrollBottom;++R){var k=S.lines.get(S.ybase+R);k.deleteCells(0,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}},C.prototype.scrollRight=function(w){var S=this._bufferService.buffer;if(!(S.y>S.scrollBottom||S.y<S.scrollTop)){for(var A=w.params[0]||1,R=S.scrollTop;R<=S.scrollBottom;++R){var k=S.lines.get(S.ybase+R);k.insertCells(0,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}},C.prototype.insertColumns=function(w){var S=this._bufferService.buffer;if(!(S.y>S.scrollBottom||S.y<S.scrollTop)){for(var A=w.params[0]||1,R=S.scrollTop;R<=S.scrollBottom;++R){var k=this._bufferService.buffer.lines.get(S.ybase+R);k.insertCells(S.x,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}},C.prototype.deleteColumns=function(w){var S=this._bufferService.buffer;if(!(S.y>S.scrollBottom||S.y<S.scrollTop)){for(var A=w.params[0]||1,R=S.scrollTop;R<=S.scrollBottom;++R){var k=S.lines.get(S.ybase+R);k.deleteCells(S.x,A,S.getNullCell(this._eraseAttrData()),this._eraseAttrData()),k.isWrapped=!1}this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom)}},C.prototype.eraseChars=function(w){this._restrictCursor();var S=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);S&&(S.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(w.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},C.prototype.repeatPrecedingCharacter=function(w){if(this._parser.precedingCodepoint){for(var S=w.params[0]||1,A=new Uint32Array(S),R=0;R<S;++R)A[R]=this._parser.precedingCodepoint;this.print(A,0,A.length)}},C.prototype.sendDeviceAttributesPrimary=function(w){w.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(g.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(g.C0.ESC+"[?6c"))},C.prototype.sendDeviceAttributesSecondary=function(w){w.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(g.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(g.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(w.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(g.C0.ESC+"[>83;40003;0c"))},C.prototype._is=function(w){return(this._optionsService.options.termName+"").indexOf(w)===0},C.prototype.setMode=function(w){for(var S=0;S<w.length;S++)switch(w.params[S]){case 4:this._coreService.modes.insertMode=!0}},C.prototype.setModePrivate=function(w){for(var S=0;S<w.length;S++)switch(w.params[S]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.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}},C.prototype.resetMode=function(w){for(var S=0;S<w.length;S++)switch(w.params[S]){case 4:this._coreService.modes.insertMode=!1}},C.prototype.resetModePrivate=function(w){for(var S=0;S<w.length;S++)switch(w.params[S]){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(),w.params[S]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},C.prototype._updateAttrColor=function(w,S,A,R,k){return S===2?(w|=50331648,w&=-16777216,w|=c.AttributeData.fromColorRGB([A,R,k])):S===5&&(w&=-50331904,w|=33554432|255&A),w},C.prototype._extractColor=function(w,S,A){var R=[0,0,-1,0,0,0],k=0,L=0;do{if(R[L+k]=w.params[S+L],w.hasSubParams(S+L)){var M=w.getSubParams(S+L),G=0;do R[1]===5&&(k=1),R[L+G+1+k]=M[G];while(++G<M.length&&G+L+1+k<R.length);break}if(R[1]===5&&L+k>=2||R[1]===2&&L+k>=5)break;R[1]&&(k=1)}while(++L+S<w.length&&L+k<R.length);for(G=2;G<R.length;++G)R[G]===-1&&(R[G]=0);switch(R[0]){case 38:A.fg=this._updateAttrColor(A.fg,R[1],R[3],R[4],R[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,R[1],R[3],R[4],R[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,R[1],R[3],R[4],R[5])}return L},C.prototype._processUnderline=function(w,S){S.extended=S.extended.clone(),(!~w||w>5)&&(w=1),S.extended.underlineStyle=w,S.fg|=268435456,w===0&&(S.fg&=-268435457),S.updateExtended()},C.prototype.charAttributes=function(w){if(w.length===1&&w.params[0]===0)return this._curAttrData.fg=t.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=t.DEFAULT_ATTR_DATA.bg);for(var S,A=w.length,R=this._curAttrData,k=0;k<A;k++)(S=w.params[k])>=30&&S<=37?(R.fg&=-50331904,R.fg|=16777216|S-30):S>=40&&S<=47?(R.bg&=-50331904,R.bg|=16777216|S-40):S>=90&&S<=97?(R.fg&=-50331904,R.fg|=16777224|S-90):S>=100&&S<=107?(R.bg&=-50331904,R.bg|=16777224|S-100):S===0?(R.fg=t.DEFAULT_ATTR_DATA.fg,R.bg=t.DEFAULT_ATTR_DATA.bg):S===1?R.fg|=134217728:S===3?R.bg|=67108864:S===4?(R.fg|=268435456,this._processUnderline(w.hasSubParams(k)?w.getSubParams(k)[0]:1,R)):S===5?R.fg|=536870912:S===7?R.fg|=67108864:S===8?R.fg|=1073741824:S===2?R.bg|=134217728:S===21?this._processUnderline(2,R):S===22?(R.fg&=-134217729,R.bg&=-134217729):S===23?R.bg&=-67108865:S===24?R.fg&=-268435457:S===25?R.fg&=-536870913:S===27?R.fg&=-67108865:S===28?R.fg&=-1073741825:S===39?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg):S===49?(R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):S===38||S===48||S===58?k+=this._extractColor(w,k,R):S===59?(R.extended=R.extended.clone(),R.extended.underlineColor=-1,R.updateExtended()):S===100?(R.fg&=-67108864,R.fg|=16777215&t.DEFAULT_ATTR_DATA.fg,R.bg&=-67108864,R.bg|=16777215&t.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",S)},C.prototype.deviceStatus=function(w){switch(w.params[0]){case 5:this._coreService.triggerDataEvent(g.C0.ESC+"[0n");break;case 6:var S=this._bufferService.buffer.y+1,A=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(g.C0.ESC+"["+S+";"+A+"R")}},C.prototype.deviceStatusPrivate=function(w){switch(w.params[0]){case 6:var S=this._bufferService.buffer.y+1,A=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(g.C0.ESC+"[?"+S+";"+A+"R")}},C.prototype.softReset=function(w){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=t.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},C.prototype.setCursorStyle=function(w){var S=w.params[0]||1;switch(S){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 A=S%2==1;this._optionsService.options.cursorBlink=A},C.prototype.setScrollRegion=function(w){var S,A=w.params[0]||1;(w.length<2||(S=w.params[1])>this._bufferService.rows||S===0)&&(S=this._bufferService.rows),S>A&&(this._bufferService.buffer.scrollTop=A-1,this._bufferService.buffer.scrollBottom=S-1,this._setCursor(0,0))},C.prototype.windowOptions=function(w){if(l(w.params[0],this._optionsService.options.windowOptions)){var S=w.length>1?w.params[1]:0;switch(w.params[0]){case 14:S!==2&&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(g.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:S!==0&&S!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),S!==0&&S!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:S!==0&&S!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),S!==0&&S!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},C.prototype.saveCursor=function(w){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},C.prototype.restoreCursor=function(w){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()},C.prototype.setTitle=function(w){this._windowTitle=w,this._onTitleChange.fire(w)},C.prototype.setIconName=function(w){this._iconName=w},C.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},C.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},C.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},C.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET)},C.prototype.selectCharset=function(w){w.length===2?w[0]!=="/"&&this._charsetService.setgCharset(m[w[0]],p.CHARSETS[w[1]]||p.DEFAULT_CHARSET):this.selectDefaultCharset()},C.prototype.index=function(){this._restrictCursor();var w=this._bufferService.buffer;this._bufferService.buffer.y++,w.y===w.scrollBottom+1?(w.y--,this._onRequestScroll.fire(this._eraseAttrData())):w.y>=this._bufferService.rows&&(w.y=this._bufferService.rows-1),this._restrictCursor()},C.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},C.prototype.reverseIndex=function(){this._restrictCursor();var w=this._bufferService.buffer;if(w.y===w.scrollTop){var S=w.scrollBottom-w.scrollTop;w.lines.shiftElements(w.ybase+w.y,S,1),w.lines.set(w.ybase+w.y,w.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(w.scrollTop,w.scrollBottom)}else w.y--,this._restrictCursor()},C.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},C.prototype.reset=function(){this._curAttrData=t.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=t.DEFAULT_ATTR_DATA.clone()},C.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},C.prototype.setgLevel=function(w){this._charsetService.setgLevel(w)},C.prototype.screenAlignmentPattern=function(){var w=new r.CellData;w.content=1<<22|"E".charCodeAt(0),w.fg=this._curAttrData.fg,w.bg=this._curAttrData.bg;var S=this._bufferService.buffer;this._setCursor(0,0);for(var A=0;A<this._bufferService.rows;++A){var R=S.ybase+S.y+A,k=S.lines.get(R);k&&(k.fill(w),k.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},C}(a.Disposable);_.InputHandler=b},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DEFAULT_CHARSET=_.CHARSETS=void 0,_.CHARSETS={},_.DEFAULT_CHARSET=_.CHARSETS.B,_.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},_.CHARSETS.A={"#":"\xA3"},_.CHARSETS.B=void 0,_.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},_.CHARSETS.C=_.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},_.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},_.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},_.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},_.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},_.CHARSETS.E=_.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},_.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},_.CHARSETS.H=_.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},_.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Params=void 0;var y=function(){function v(o,g){if(o===void 0&&(o=32),g===void 0&&(g=32),this.maxLength=o,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(o),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(o),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return v.fromArray=function(o){var g=new v;if(!o.length)return g;for(var p=o[0]instanceof Array?1:0;p<o.length;++p){var d=o[p];if(d instanceof Array)for(var a=0;a<d.length;++a)g.addSubParam(d[a]);else g.addParam(d)}return g},v.prototype.clone=function(){var o=new v(this.maxLength,this.maxSubParamsLength);return o.params.set(this.params),o.length=this.length,o._subParams.set(this._subParams),o._subParamsLength=this._subParamsLength,o._subParamsIdx.set(this._subParamsIdx),o._rejectDigits=this._rejectDigits,o._rejectSubDigits=this._rejectSubDigits,o._digitIsSub=this._digitIsSub,o},v.prototype.toArray=function(){for(var o=[],g=0;g<this.length;++g){o.push(this.params[g]);var p=this._subParamsIdx[g]>>8,d=255&this._subParamsIdx[g];d-p>0&&o.push(Array.prototype.slice.call(this._subParams,p,d))}return o},v.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},v.prototype.addParam=function(o){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=o>2147483647?2147483647:o}},v.prototype.addSubParam=function(o){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(o<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=o>2147483647?2147483647:o,this._subParamsIdx[this.length-1]++}},v.prototype.hasSubParams=function(o){return(255&this._subParamsIdx[o])-(this._subParamsIdx[o]>>8)>0},v.prototype.getSubParams=function(o){var g=this._subParamsIdx[o]>>8,p=255&this._subParamsIdx[o];return p-g>0?this._subParams.subarray(g,p):null},v.prototype.getSubParamsAll=function(){for(var o={},g=0;g<this.length;++g){var p=this._subParamsIdx[g]>>8,d=255&this._subParamsIdx[g];d-p>0&&(o[g]=this._subParams.slice(p,d))}return o},v.prototype.addDigit=function(o){var g;if(!(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var p=this._digitIsSub?this._subParams:this.params,d=p[g-1];p[g-1]=~d?Math.min(10*d+o,2147483647):o}},v}();_.Params=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.OscHandler=_.OscParser=void 0;var y=O(23),v=O(8),o=function(){function p(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return p.prototype.addHandler=function(d,a){this._handlers[d]===void 0&&(this._handlers[d]=[]);var n=this._handlers[d];return n.push(a),{dispose:function(){var s=n.indexOf(a);s!==-1&&n.splice(s,1)}}},p.prototype.setHandler=function(d,a){this._handlers[d]=[a]},p.prototype.clearHandler=function(d){this._handlers[d]&&delete this._handlers[d]},p.prototype.setHandlerFallback=function(d){this._handlerFb=d},p.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},p.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},p.prototype._start=function(){var d=this._handlers[this._id];if(d)for(var a=d.length-1;a>=0;a--)d[a].start();else this._handlerFb(this._id,"START")},p.prototype._put=function(d,a,n){var s=this._handlers[this._id];if(s)for(var t=s.length-1;t>=0;t--)s[t].put(d,a,n);else this._handlerFb(this._id,"PUT",v.utf32ToString(d,a,n))},p.prototype._end=function(d){var a=this._handlers[this._id];if(a){for(var n=a.length-1;n>=0&&a[n].end(d)===!1;n--);for(n--;n>=0;n--)a[n].end(!1)}else this._handlerFb(this._id,"END",d)},p.prototype.start=function(){this.reset(),this._id=-1,this._state=1},p.prototype.put=function(d,a,n){if(this._state!==3){if(this._state===1)for(;a<n;){var s=d[a++];if(s===59){this._state=2,this._start();break}if(s<48||57<s)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+s-48}this._state===2&&n-a>0&&this._put(d,a,n)}},p.prototype.end=function(d){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(d)),this._id=-1,this._state=0)},p}();_.OscParser=o;var g=function(){function p(d){this._handler=d,this._data="",this._hitLimit=!1}return p.prototype.start=function(){this._data="",this._hitLimit=!1},p.prototype.put=function(d,a,n){this._hitLimit||(this._data+=v.utf32ToString(d,a,n),this._data.length>y.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},p.prototype.end=function(d){var a;return this._hitLimit?a=!1:d&&(a=this._handler(this._data)),this._data="",this._hitLimit=!1,a},p}();_.OscHandler=g},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.PAYLOAD_LIMIT=void 0,_.PAYLOAD_LIMIT=1e7},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DcsHandler=_.DcsParser=void 0;var y=O(8),v=O(21),o=O(23),g=[],p=function(){function a(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=function(){}}return a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},a.prototype.addHandler=function(n,s){this._handlers[n]===void 0&&(this._handlers[n]=[]);var t=this._handlers[n];return t.push(s),{dispose:function(){var i=t.indexOf(s);i!==-1&&t.splice(i,1)}}},a.prototype.setHandler=function(n,s){this._handlers[n]=[s]},a.prototype.clearHandler=function(n){this._handlers[n]&&delete this._handlers[n]},a.prototype.setHandlerFallback=function(n){this._handlerFb=n},a.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=g,this._ident=0},a.prototype.hook=function(n,s){if(this.reset(),this._ident=n,this._active=this._handlers[n]||g,this._active.length)for(var t=this._active.length-1;t>=0;t--)this._active[t].hook(s);else this._handlerFb(this._ident,"HOOK",s)},a.prototype.put=function(n,s,t){if(this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].put(n,s,t);else this._handlerFb(this._ident,"PUT",y.utf32ToString(n,s,t))},a.prototype.unhook=function(n){if(this._active.length){for(var s=this._active.length-1;s>=0&&this._active[s].unhook(n)===!1;s--);for(s--;s>=0;s--)this._active[s].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",n);this._active=g,this._ident=0},a}();_.DcsParser=p;var d=function(){function a(n){this._handler=n,this._data="",this._hitLimit=!1}return a.prototype.hook=function(n){this._params=n.clone(),this._data="",this._hitLimit=!1},a.prototype.put=function(n,s,t){this._hitLimit||(this._data+=y.utf32ToString(n,s,t),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},a.prototype.unhook=function(n){var s;return this._hitLimit?s=!1:n&&(s=this._handler(this._data,this._params||new v.Params)),this._params=void 0,this._data="",this._hitLimit=!1,s},a}();_.DcsHandler=d},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.removeTerminalFromCache=_.acquireCharAtlas=void 0;var y=O(26),v=O(43),o=[];_.acquireCharAtlas=function(g,p,d,a,n){for(var s=y.generateConfig(a,n,g,d),t=0;t<o.length;t++){var i=(e=o[t]).ownedBy.indexOf(p);if(i>=0){if(y.configEquals(e.config,s))return e.atlas;e.ownedBy.length===1?(e.atlas.dispose(),o.splice(t,1)):e.ownedBy.splice(i,1);break}}for(t=0;t<o.length;t++){var e=o[t];if(y.configEquals(e.config,s))return e.ownedBy.push(p),e.atlas}var r={atlas:new v.DynamicCharAtlas(document,s),config:s,ownedBy:[p]};return o.push(r),r.atlas},_.removeTerminalFromCache=function(g){for(var p=0;p<o.length;p++){var d=o[p].ownedBy.indexOf(g);if(d!==-1){o[p].ownedBy.length===1?(o[p].atlas.dispose(),o.splice(p,1)):o[p].ownedBy.splice(d,1);break}}}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.is256Color=_.configEquals=_.generateConfig=void 0;var y=O(3);_.generateConfig=function(v,o,g,p){var d={foreground:p.foreground,background:p.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:p.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:v,scaledCharHeight:o,fontFamily:g.fontFamily,fontSize:g.fontSize,fontWeight:g.fontWeight,fontWeightBold:g.fontWeightBold,allowTransparency:g.allowTransparency,colors:d}},_.configEquals=function(v,o){for(var g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==o.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===o.devicePixelRatio&&v.fontFamily===o.fontFamily&&v.fontSize===o.fontSize&&v.fontWeight===o.fontWeight&&v.fontWeightBold===o.fontWeightBold&&v.allowTransparency===o.allowTransparency&&v.scaledCharWidth===o.scaledCharWidth&&v.scaledCharHeight===o.scaledCharHeight&&v.colors.foreground===o.colors.foreground&&v.colors.background===o.colors.background},_.is256Color=function(v){return v<y.DEFAULT_COLOR}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ColorManager=_.DEFAULT_ANSI_COLORS=void 0;var y=O(10),v=O(45),o=y.css.toColor("#ffffff"),g=y.css.toColor("#000000"),p=y.css.toColor("#ffffff"),d=y.css.toColor("#000000"),a={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};_.DEFAULT_ANSI_COLORS=function(){for(var s=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],i=0;i<216;i++){var e=t[i/36%6|0],r=t[i/6%6|0],c=t[i%6];s.push({css:y.channels.toCss(e,r,c),rgba:y.channels.toRgba(e,r,c)})}for(i=0;i<24;i++){var u=8+10*i;s.push({css:y.channels.toCss(u,u,u),rgba:y.channels.toRgba(u,u,u)})}return s}();var n=function(){function s(t,i){this.allowTransparency=i;var e=t.createElement("canvas");e.width=1,e.height=1;var r=e.getContext("2d");if(!r)throw new Error("Could not get rendering context");this._ctx=r,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new v.ColorContrastCache,this.colors={foreground:o,background:g,cursor:p,cursorAccent:d,selectionTransparent:a,selectionOpaque:y.color.blend(g,a),ansi:_.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return s.prototype.onOptionsChange=function(t){t==="minimumContrastRatio"&&this._contrastCache.clear()},s.prototype.setTheme=function(t){(t===void 0&&(t={}),this.colors.foreground=this._parseColor(t.foreground,o),this.colors.background=this._parseColor(t.background,g),this.colors.cursor=this._parseColor(t.cursor,p,!0),this.colors.cursorAccent=this._parseColor(t.cursorAccent,d,!0),this.colors.selectionTransparent=this._parseColor(t.selection,a,!0),this.colors.selectionOpaque=y.color.blend(this.colors.background,this.colors.selectionTransparent),y.color.isOpaque(this.colors.selectionTransparent))&&(this.colors.selectionTransparent=y.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(t.black,_.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(t.red,_.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(t.green,_.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(t.yellow,_.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(t.blue,_.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(t.magenta,_.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(t.cyan,_.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(t.white,_.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(t.brightBlack,_.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(t.brightRed,_.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(t.brightGreen,_.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(t.brightYellow,_.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(t.brightBlue,_.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(t.brightMagenta,_.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(t.brightCyan,_.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(t.brightWhite,_.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},s.prototype._parseColor=function(t,i,e){if(e===void 0&&(e=this.allowTransparency),t===void 0)return i;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=t,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+t+" is invalid using fallback "+i.css),i;this._ctx.fillRect(0,0,1,1);var r=this._ctx.getImageData(0,0,1,1).data;if(r[3]!==255){if(!e)return console.warn("Color: "+t+" is using transparency, but allowTransparency is false. Using fallback "+i.css+"."),i;var c=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(b){return Number(b)}),u=c[0],f=c[1],m=c[2],l=c[3],E=Math.round(255*l);return{rgba:y.channels.toRgba(u,f,m,E),css:t}}return{css:this._ctx.fillStyle,rgba:y.channels.toRgba(r[0],r[1],r[2],r[3])}},s}();_.ColorManager=n},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.throwIfFalsy=void 0,_.throwIfFalsy=function(y){if(!y)throw new Error("value must not be falsy");return y}},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(n,s){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(n,s)},function(n,s){function t(){this.constructor=n}y(n,s),n.prototype=s===null?Object.create(s):(t.prototype=s.prototype,new t)});Object.defineProperty(_,"__esModule",{value:!0}),_.CharacterJoinerRegistry=_.JoinedCellData=void 0;var o=O(6),g=O(3),p=O(4),d=function(n){function s(t,i,e){var r=n.call(this)||this;return r.content=0,r.combinedData="",r.fg=t.fg,r.bg=t.bg,r.combinedData=i,r._width=e,r}return v(s,n),s.prototype.isCombined=function(){return 2097152},s.prototype.getWidth=function(){return this._width},s.prototype.getChars=function(){return this.combinedData},s.prototype.getCode=function(){return 2097151},s.prototype.setFromCharData=function(t){throw new Error("not implemented")},s.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},s}(o.AttributeData);_.JoinedCellData=d;var a=function(){function n(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new p.CellData}return n.prototype.registerCharacterJoiner=function(s){var t={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(t),t.id},n.prototype.deregisterCharacterJoiner=function(s){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===s)return this._characterJoiners.splice(t,1),!0;return!1},n.prototype.getJoinedCharacters=function(s){if(this._characterJoiners.length===0)return[];var t=this._bufferService.buffer.lines.get(s);if(!t||t.length===0)return[];for(var i=[],e=t.translateToString(!0),r=0,c=0,u=0,f=t.getFg(0),m=t.getBg(0),l=0;l<t.getTrimmedLength();l++)if(t.loadCell(l,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==f||this._workCell.bg!==m){if(l-r>1)for(var E=this._getJoinedRanges(e,u,c,t,r),b=0;b<E.length;b++)i.push(E[b]);r=l,u=c,f=this._workCell.fg,m=this._workCell.bg}c+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-r>1)for(E=this._getJoinedRanges(e,u,c,t,r),b=0;b<E.length;b++)i.push(E[b]);return i},n.prototype._getJoinedRanges=function(s,t,i,e,r){for(var c=s.substring(t,i),u=this._characterJoiners[0].handler(c),f=1;f<this._characterJoiners.length;f++)for(var m=this._characterJoiners[f].handler(c),l=0;l<m.length;l++)n._mergeRanges(u,m[l]);return this._stringRangesToCellRanges(u,e,r),u},n.prototype._stringRangesToCellRanges=function(s,t,i){var e=0,r=!1,c=0,u=s[e];if(u){for(var f=i;f<this._bufferService.cols;f++){var m=t.getWidth(f),l=t.getString(f).length||g.WHITESPACE_CELL_CHAR.length;if(m!==0){if(!r&&u[0]<=c&&(u[0]=f,r=!0),u[1]<=c){if(u[1]=f,!(u=s[++e]))break;u[0]<=c?(u[0]=f,r=!0):r=!1}c+=l}}u&&(u[1]=this._bufferService.cols)}},n._mergeRanges=function(s,t){for(var i=!1,e=0;e<s.length;e++){var r=s[e];if(i){if(t[1]<=r[0])return s[e-1][1]=t[1],s;if(t[1]<=r[1])return s[e-1][1]=Math.max(t[1],r[1]),s.splice(e,1),s;s.splice(e,1),e--}else{if(t[1]<=r[0])return s.splice(e,0,t),s;if(t[1]<=r[1])return r[0]=Math.min(t[0],r[0]),s;t[0]<r[1]&&(r[0]=Math.min(t[0],r[0]),i=!0)}}return i?s[s.length-1][1]=t[1]:s.push(t),s},n}();_.CharacterJoinerRegistry=a},function(I,_,O){"use strict";function y(v,o){var g=o.getBoundingClientRect();return[v.clientX-g.left,v.clientY-g.top]}Object.defineProperty(_,"__esModule",{value:!0}),_.getRawByteCoords=_.getCoords=_.getCoordsRelativeToElement=void 0,_.getCoordsRelativeToElement=y,_.getCoords=function(v,o,g,p,d,a,n,s){if(d){var t=y(v,o);if(t)return t[0]=Math.ceil((t[0]+(s?a/2:0))/a),t[1]=Math.ceil(t[1]/n),t[0]=Math.min(Math.max(t[0],1),g+(s?1:0)),t[1]=Math.min(Math.max(t[1],1),p),t}},_.getRawByteCoords=function(v){if(v)return{x:v[0]+32,y:v[1]+32}}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.RenderDebouncer=void 0;var y=function(){function v(o){this._renderCallback=o}return v.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},v.prototype.refresh=function(o,g,p){var d=this;this._rowCount=p,o=o!==void 0?o:0,g=g!==void 0?g:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,o):o,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,g):g,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return d._innerRefresh()}))},v.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var o=Math.max(this._rowStart,0),g=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(o,g)}},v}();_.RenderDebouncer=y},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(g,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,a){d.__proto__=a}||function(d,a){for(var n in a)a.hasOwnProperty(n)&&(d[n]=a[n])})(g,p)},function(g,p){function d(){this.constructor=g}y(g,p),g.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)});Object.defineProperty(_,"__esModule",{value:!0}),_.ScreenDprMonitor=void 0;var o=function(g){function p(){var d=g!==null&&g.apply(this,arguments)||this;return d._currentDevicePixelRatio=window.devicePixelRatio,d}return v(p,g),p.prototype.setListener=function(d){var a=this;this._listener&&this.clearListener(),this._listener=d,this._outerListener=function(){a._listener&&(a._listener(window.devicePixelRatio,a._currentDevicePixelRatio),a._updateDpr())},this._updateDpr()},p.prototype.dispose=function(){g.prototype.dispose.call(this),this.clearListener()},p.prototype._updateDpr=function(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},p.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)},p}(O(2).Disposable);_.ScreenDprMonitor=o},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.clone=void 0,_.clone=function y(v,o){if(o===void 0&&(o=5),typeof v!="object")return v;var g=Array.isArray(v)?[]:{};for(var p in v)g[p]=o<=1?v[p]:v[p]?y(v[p],o-1):v[p];return g}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;var y=O(4),v=O(35),o=O(18),g=O(0),p=O(83),d=function(){function e(r){this._core=new v.Terminal(r),this._addonManager=new p.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 t(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new i(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 n(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(r,c){this._verifyIntegers(r,c),this._core.resize(r,c)},e.prototype.open=function(r){this._core.open(r)},e.prototype.attachCustomKeyEventHandler=function(r){this._core.attachCustomKeyEventHandler(r)},e.prototype.registerLinkMatcher=function(r,c,u){return this._checkProposedApi(),this._core.registerLinkMatcher(r,c,u)},e.prototype.deregisterLinkMatcher=function(r){this._checkProposedApi(),this._core.deregisterLinkMatcher(r)},e.prototype.registerLinkProvider=function(r){return this._checkProposedApi(),this._core.registerLinkProvider(r)},e.prototype.registerCharacterJoiner=function(r){return this._checkProposedApi(),this._core.registerCharacterJoiner(r)},e.prototype.deregisterCharacterJoiner=function(r){this._checkProposedApi(),this._core.deregisterCharacterJoiner(r)},e.prototype.registerMarker=function(r){return this._checkProposedApi(),this._verifyIntegers(r),this._core.addMarker(r)},e.prototype.addMarker=function(r){return this.registerMarker(r)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(r,c,u){this._verifyIntegers(r,c,u),this._core.select(r,c,u)},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(r,c){this._verifyIntegers(r,c),this._core.selectLines(r,c)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(r){this._verifyIntegers(r),this._core.scrollLines(r)},e.prototype.scrollPages=function(r){this._verifyIntegers(r),this._core.scrollPages(r)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(r){this._verifyIntegers(r),this._core.scrollToLine(r)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(r,c){this._core.write(r,c)},e.prototype.writeUtf8=function(r,c){this._core.write(r,c)},e.prototype.writeln=function(r,c){this._core.write(r),this._core.write(`\r
|
|
|
`,c)},e.prototype.paste=function(r){this._core.paste(r)},e.prototype.getOption=function(r){return this._core.optionsService.getOption(r)},e.prototype.setOption=function(r,c){this._core.optionsService.setOption(r,c)},e.prototype.refresh=function(r,c){this._verifyIntegers(r,c),this._core.refresh(r,c)},e.prototype.reset=function(){this._core.reset()},e.prototype.loadAddon=function(r){return this._addonManager.loadAddon(this,r)},Object.defineProperty(e,"strings",{get:function(){return o},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var r=[],c=0;c<arguments.length;c++)r[c]=arguments[c];for(var u=0,f=r;u<f.length;u++){var m=f[u];if(m===1/0||isNaN(m)||m%1!=0)throw new Error("This API only accepts integers")}},e}();_.Terminal=d;var a=function(){function e(r,c){this._buffer=r,this.type=c}return e.prototype.init=function(r){return this._buffer=r,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(r){var c=this._buffer.lines.get(r);if(c)return new s(c)},e.prototype.getNullCell=function(){return new y.CellData},e}(),n=function(){function e(r){var c=this;this._buffers=r,this._onBufferChange=new g.EventEmitter,this._normal=new a(this._buffers.normal,"normal"),this._alternate=new a(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return c._onBufferChange.fire(c.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}(),s=function(){function e(r){this._line=r}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(r,c){if(!(r<0||r>=this._line.length))return c?(this._line.loadCell(r,c),c):this._line.loadCell(r,new y.CellData)},e.prototype.translateToString=function(r,c,u){return this._line.translateToString(r,c,u)},e}(),t=function(){function e(r){this._core=r}return e.prototype.registerCsiHandler=function(r,c){return this._core.addCsiHandler(r,function(u){return c(u.toArray())})},e.prototype.addCsiHandler=function(r,c){return this.registerCsiHandler(r,c)},e.prototype.registerDcsHandler=function(r,c){return this._core.addDcsHandler(r,function(u,f){return c(u,f.toArray())})},e.prototype.addDcsHandler=function(r,c){return this.registerDcsHandler(r,c)},e.prototype.registerEscHandler=function(r,c){return this._core.addEscHandler(r,c)},e.prototype.addEscHandler=function(r,c){return this.registerEscHandler(r,c)},e.prototype.registerOscHandler=function(r,c){return this._core.addOscHandler(r,c)},e.prototype.addOscHandler=function(r,c){return this.registerOscHandler(r,c)},e}(),i=function(){function e(r){this._core=r}return e.prototype.register=function(r){this._core.unicodeService.register(r)},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(r){this._core.unicodeService.activeVersion=r},enumerable:!1,configurable:!0}),e}()},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(W,N){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(K,F){K.__proto__=F}||function(K,F){for(var P in F)F.hasOwnProperty(P)&&(K[P]=F[P])})(W,N)},function(W,N){function K(){this.constructor=W}y(W,N),W.prototype=N===null?Object.create(N):(K.prototype=N.prototype,new K)});Object.defineProperty(_,"__esModule",{value:!0}),_.Terminal=void 0;var o=O(36),g=O(37),p=O(38),d=O(12),a=O(19),n=O(40),s=O(50),t=O(51),i=O(11),e=O(7),r=O(18),c=O(54),u=O(55),f=O(56),m=O(57),l=O(59),E=O(0),b=O(16),D=O(27),C=O(60),w=O(5),S=O(61),A=O(62),R=O(63),k=O(64),L=O(65),M=typeof window!="undefined"?window.document:null,G=function(W){function N(K){K===void 0&&(K={});var F=W.call(this,K)||this;return F.browser=i,F._keyDownHandled=!1,F._onCursorMove=new E.EventEmitter,F._onKey=new E.EventEmitter,F._onRender=new E.EventEmitter,F._onSelectionChange=new E.EventEmitter,F._onTitleChange=new E.EventEmitter,F._onFocus=new E.EventEmitter,F._onBlur=new E.EventEmitter,F._onA11yCharEmitter=new E.EventEmitter,F._onA11yTabEmitter=new E.EventEmitter,F._setup(),F.linkifier=F._instantiationService.createInstance(s.Linkifier),F.linkifier2=F.register(F._instantiationService.createInstance(R.Linkifier2)),F.register(F._inputHandler.onRequestBell(function(){return F.bell()})),F.register(F._inputHandler.onRequestRefreshRows(function(P,B){return F.refresh(P,B)})),F.register(F._inputHandler.onRequestReset(function(){return F.reset()})),F.register(F._inputHandler.onRequestScroll(function(P,B){return F.scroll(P,B||void 0)})),F.register(F._inputHandler.onRequestWindowsOptionsReport(function(P){return F._reportWindowsOptions(P)})),F.register(E.forwardEvent(F._inputHandler.onCursorMove,F._onCursorMove)),F.register(E.forwardEvent(F._inputHandler.onTitleChange,F._onTitleChange)),F.register(E.forwardEvent(F._inputHandler.onA11yChar,F._onA11yCharEmitter)),F.register(E.forwardEvent(F._inputHandler.onA11yTab,F._onA11yTabEmitter)),F.register(F._bufferService.onResize(function(P){return F._afterResize(P.cols,P.rows)})),F}return v(N,W),Object.defineProperty(N.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),N.prototype.dispose=function(){var K,F,P;this._isDisposed||(W.prototype.dispose.call(this),(K=this._renderService)===null||K===void 0||K.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(P=(F=this.element)===null||F===void 0?void 0:F.parentNode)===null||P===void 0||P.removeChild(this.element))},N.prototype._setup=function(){W.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(N.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),N.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},N.prototype._updateOptions=function(K){var F,P,B,J;switch(W.prototype._updateOptions.call(this,K),K){case"fontFamily":case"fontSize":(F=this._renderService)===null||F===void 0||F.clear(),(P=this._charSizeService)===null||P===void 0||P.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":(B=this.viewport)===null||B===void 0||B.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new f.AccessibilityManager(this,this._renderService)):((J=this._accessibilityManager)===null||J===void 0||J.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},N.prototype._onTextAreaFocus=function(K){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[I"),this.updateCursorStyle(K),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},N.prototype.blur=function(){var K;return(K=this.textarea)===null||K===void 0?void 0:K.blur()},N.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(d.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},N.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var K=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),F=this._bufferService.buffer.y*K,P=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=P+"px",this.textarea.style.top=F+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=K+"px",this.textarea.style.lineHeight=K+"px",this.textarea.style.zIndex="-5"}},N.prototype._initGlobal=function(){var K=this;this._bindKeys(),this.register(e.addDisposableDomListener(this.element,"copy",function(P){K.hasSelection()&&p.copyHandler(P,K._selectionService)}));var F=function(P){return p.handlePasteEvent(P,K.textarea,K._coreService)};this.register(e.addDisposableDomListener(this.textarea,"paste",F)),this.register(e.addDisposableDomListener(this.element,"paste",F)),i.isFirefox?this.register(e.addDisposableDomListener(this.element,"mousedown",function(P){P.button===2&&p.rightClickHandler(P,K.textarea,K.screenElement,K._selectionService,K.options.rightClickSelectsWord)})):this.register(e.addDisposableDomListener(this.element,"contextmenu",function(P){p.rightClickHandler(P,K.textarea,K.screenElement,K._selectionService,K.options.rightClickSelectsWord)})),i.isLinux&&this.register(e.addDisposableDomListener(this.element,"auxclick",function(P){P.button===1&&p.moveTextAreaUnderMouseCursor(P,K.textarea,K.screenElement)}))},N.prototype._bindKeys=function(){var K=this;this.register(e.addDisposableDomListener(this.textarea,"keyup",function(F){return K._keyUp(F)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keydown",function(F){return K._keyDown(F)},!0)),this.register(e.addDisposableDomListener(this.textarea,"keypress",function(F){return K._keyPress(F)},!0)),this.register(e.addDisposableDomListener(this.textarea,"compositionstart",function(){return K._compositionHelper.compositionstart()})),this.register(e.addDisposableDomListener(this.textarea,"compositionupdate",function(F){return K._compositionHelper.compositionupdate(F)})),this.register(e.addDisposableDomListener(this.textarea,"compositionend",function(){return K._compositionHelper.compositionend()})),this.register(this.onRender(function(){return K._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(F){return K._queueLinkification(F.start,F.end)}))},N.prototype.open=function(K){var F=this;if(!K)throw new Error("Terminal requires a parent element.");M.body.contains(K)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=K.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"),K.appendChild(this.element);var P=M.createDocumentFragment();this._viewportElement=M.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),P.appendChild(this._viewportElement),this._viewportScrollArea=M.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=M.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=M.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),P.appendChild(this.screenElement),this.textarea=M.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",r.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(e.addDisposableDomListener(this.textarea,"focus",function(re){return F._onTextAreaFocus(re)})),this.register(e.addDisposableDomListener(this.textarea,"blur",function(){return F._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var B=this._instantiationService.createInstance(k.CoreBrowserService,this.textarea);this._instantiationService.setService(w.ICoreBrowserService,B),this._charSizeService=this._instantiationService.createInstance(S.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(w.ICharSizeService,this._charSizeService),this._compositionView=M.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(P),this._theme=this.options.theme||this._theme,this._colorManager=new D.ColorManager(M,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(re){return F._colorManager.onOptionsChange(re)})),this._colorManager.setTheme(this._theme);var J=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(C.RenderService,J,this.rows,this.screenElement)),this._instantiationService.setService(w.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(re){return F._onRender.fire(re)})),this.onResize(function(re){return F._renderService.resize(re.cols,re.rows)}),this._soundService=this._instantiationService.createInstance(c.SoundService),this._instantiationService.setService(w.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(w.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(g.Viewport,function(re,he){return F.scrollLines(re,he)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return F.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){F._renderService.onCursorMove(),F._syncTextArea()})),this.register(this.onResize(function(){return F._renderService.onResize(F.cols,F.rows)})),this.register(this.onBlur(function(){return F._renderService.onBlur()})),this.register(this.onFocus(function(){return F._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return F.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(t.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(w.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(re){return F.scrollLines(re.amount,re.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return F._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(re){return F._renderService.onSelectionChanged(re.start,re.end,re.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(re){F.textarea.value=re,F.textarea.focus(),F.textarea.select()})),this.register(this.onScroll(function(){F.viewport.syncScrollArea(),F._selectionService.refresh()})),this.register(e.addDisposableDomListener(this._viewportElement,"scroll",function(){return F._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(u.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return F._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(e.addDisposableDomListener(this.element,"mousedown",function(re){return F._selectionService.onMouseDown(re)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new f.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},N.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(n.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},N.prototype._setTheme=function(K){var F,P,B;this._theme=K,(F=this._colorManager)===null||F===void 0||F.setTheme(K),(P=this._renderService)===null||P===void 0||P.setColors(this._colorManager.colors),(B=this.viewport)===null||B===void 0||B.onThemeChange(this._colorManager.colors)},N.prototype.bindMouse=function(){var K=this,F=this,P=this.element;function B(ne){var Oe,Ce,fe=F._mouseService.getRawByteCoords(ne,F.screenElement,F.cols,F.rows);if(!fe)return!1;switch(ne.overrideType||ne.type){case"mousemove":Ce=32,ne.buttons===void 0?(Oe=3,ne.button!==void 0&&(Oe=ne.button<3?ne.button:3)):Oe=1&ne.buttons?0:4&ne.buttons?1:2&ne.buttons?2:3;break;case"mouseup":Ce=0,Oe=ne.button<3?ne.button:3;break;case"mousedown":Ce=1,Oe=ne.button<3?ne.button:3;break;case"wheel":ne.deltaY!==0&&(Ce=ne.deltaY<0?0:1),Oe=4;break;default:return!1}return!(Ce===void 0||Oe===void 0||Oe>4)&&F._coreMouseService.triggerMouseEvent({col:fe.x-33,row:fe.y-33,button:Oe,action:Ce,ctrl:ne.ctrlKey,alt:ne.altKey,shift:ne.shiftKey})}var J={mouseup:null,wheel:null,mousedrag:null,mousemove:null},re=function(ne){return B(ne),ne.buttons||(K._document.removeEventListener("mouseup",J.mouseup),J.mousedrag&&K._document.removeEventListener("mousemove",J.mousedrag)),K.cancel(ne)},he=function(ne){return B(ne),ne.preventDefault(),K.cancel(ne)},we=function(ne){ne.buttons&&B(ne)},ke=function(ne){ne.buttons||B(ne)};this.register(this._coreMouseService.onProtocolChange(function(ne){ne?(K.optionsService.options.logLevel==="debug"&&K._logService.debug("Binding to mouse events:",K._coreMouseService.explainEvents(ne)),K.element.classList.add("enable-mouse-events"),K._selectionService.disable()):(K._logService.debug("Unbinding from mouse events."),K.element.classList.remove("enable-mouse-events"),K._selectionService.enable()),8&ne?J.mousemove||(P.addEventListener("mousemove",ke),J.mousemove=ke):(P.removeEventListener("mousemove",J.mousemove),J.mousemove=null),16&ne?J.wheel||(P.addEventListener("wheel",he,{passive:!1}),J.wheel=he):(P.removeEventListener("wheel",J.wheel),J.wheel=null),2&ne?J.mouseup||(J.mouseup=re):(K._document.removeEventListener("mouseup",J.mouseup),J.mouseup=null),4&ne?J.mousedrag||(J.mousedrag=we):(K._document.removeEventListener("mousemove",J.mousedrag),J.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(e.addDisposableDomListener(P,"mousedown",function(ne){if(ne.preventDefault(),K.focus(),K._coreMouseService.areMouseEventsActive&&!K._selectionService.shouldForceSelection(ne))return B(ne),J.mouseup&&K._document.addEventListener("mouseup",J.mouseup),J.mousedrag&&K._document.addEventListener("mousemove",J.mousedrag),K.cancel(ne)})),this.register(e.addDisposableDomListener(P,"wheel",function(ne){if(!J.wheel){if(!K.buffer.hasScrollback){var Oe=K.viewport.getLinesScrolled(ne);if(Oe===0)return;for(var Ce=d.C0.ESC+(K._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ne.deltaY<0?"A":"B"),fe="",oe=0;oe<Math.abs(Oe);oe++)fe+=Ce;K._coreService.triggerDataEvent(fe,!0)}}},{passive:!0})),this.register(e.addDisposableDomListener(P,"wheel",function(ne){if(!J.wheel)return K.viewport.onWheel(ne)?void 0:K.cancel(ne)},{passive:!1})),this.register(e.addDisposableDomListener(P,"touchstart",function(ne){if(!K._coreMouseService.areMouseEventsActive)return K.viewport.onTouchStart(ne),K.cancel(ne)},{passive:!0})),this.register(e.addDisposableDomListener(P,"touchmove",function(ne){if(!K._coreMouseService.areMouseEventsActive)return K.viewport.onTouchMove(ne)?void 0:K.cancel(ne)},{passive:!1}))},N.prototype.refresh=function(K,F){var P;(P=this._renderService)===null||P===void 0||P.refreshRows(K,F)},N.prototype._queueLinkification=function(K,F){var P;(P=this.linkifier)===null||P===void 0||P.linkifyRows(K,F)},N.prototype.updateCursorStyle=function(K){this._selectionService&&this._selectionService.shouldColumnSelect(K)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},N.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},N.prototype.scrollLines=function(K,F){W.prototype.scrollLines.call(this,K,F),this.refresh(0,this.rows-1)},N.prototype.paste=function(K){p.paste(K,this.textarea,this._coreService)},N.prototype.attachCustomKeyEventHandler=function(K){this._customKeyEventHandler=K},N.prototype.registerLinkMatcher=function(K,F,P){var B=this.linkifier.registerLinkMatcher(K,F,P);return this.refresh(0,this.rows-1),B},N.prototype.deregisterLinkMatcher=function(K){this.linkifier.deregisterLinkMatcher(K)&&this.refresh(0,this.rows-1)},N.prototype.registerLinkProvider=function(K){return this.linkifier2.registerLinkProvider(K)},N.prototype.registerCharacterJoiner=function(K){var F=this._renderService.registerCharacterJoiner(K);return this.refresh(0,this.rows-1),F},N.prototype.deregisterCharacterJoiner=function(K){this._renderService.deregisterCharacterJoiner(K)&&this.refresh(0,this.rows-1)},Object.defineProperty(N.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),N.prototype.addMarker=function(K){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+K)},N.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},N.prototype.select=function(K,F,P){this._selectionService.setSelection(K,F,P)},N.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},N.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]}},N.prototype.clearSelection=function(){var K;(K=this._selectionService)===null||K===void 0||K.clearSelection()},N.prototype.selectAll=function(){var K;(K=this._selectionService)===null||K===void 0||K.selectAll()},N.prototype.selectLines=function(K,F){var P;(P=this._selectionService)===null||P===void 0||P.selectLines(K,F)},N.prototype._keyDown=function(K){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(!this._compositionHelper.keydown(K))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var F=l.evaluateKeyboardEvent(K,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(K),F.type===3||F.type===2){var P=this.rows-1;return this.scrollLines(F.type===2?-P:P),this.cancel(K,!0)}return F.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,K)||(F.cancel&&this.cancel(K,!0),!F.key||(F.key!==d.C0.ETX&&F.key!==d.C0.CR||(this.textarea.value=""),this._onKey.fire({key:F.key,domEvent:K}),this._showCursor(),this._coreService.triggerDataEvent(F.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(K,!0)))},N.prototype._isThirdLevelShift=function(K,F){var P=K.isMac&&!this.options.macOptionIsMeta&&F.altKey&&!F.ctrlKey&&!F.metaKey||K.isWindows&&F.altKey&&F.ctrlKey&&!F.metaKey;return F.type==="keypress"?P:P&&(!F.keyCode||F.keyCode>47)},N.prototype._keyUp=function(K){this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1||(function(F){return F.keyCode===16||F.keyCode===17||F.keyCode===18}(K)||this.focus(),this.updateCursorStyle(K))},N.prototype._keyPress=function(K){var F;if(this._keyDownHandled)return!1;if(this._customKeyEventHandler&&this._customKeyEventHandler(K)===!1)return!1;if(this.cancel(K),K.charCode)F=K.charCode;else if(K.which===null||K.which===void 0)F=K.keyCode;else{if(K.which===0||K.charCode===0)return!1;F=K.which}return!(!F||(K.altKey||K.ctrlKey||K.metaKey)&&!this._isThirdLevelShift(this.browser,K))&&(F=String.fromCharCode(F),this._onKey.fire({key:F,domEvent:K}),this._showCursor(),this._coreService.triggerDataEvent(F,!0),!0)},N.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},N.prototype.resize=function(K,F){K!==this.cols||F!==this.rows?W.prototype.resize.call(this,K,F):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},N.prototype._afterResize=function(K,F){var P,B;(P=this._charSizeService)===null||P===void 0||P.measure(),(B=this.viewport)===null||B===void 0||B.syncScrollArea(!0)},N.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var K=1;K<this.rows;K++)this.buffer.lines.push(this.buffer.getBlankLine(b.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},N.prototype.reset=function(){var K,F;this.options.rows=this.rows,this.options.cols=this.cols;var P=this._customKeyEventHandler;this._setup(),W.prototype.reset.call(this),(K=this._selectionService)===null||K===void 0||K.reset(),this._customKeyEventHandler=P,this.refresh(0,this.rows-1),(F=this.viewport)===null||F===void 0||F.syncScrollArea()},N.prototype._reportWindowsOptions=function(K){if(this._renderService)switch(K){case a.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var F=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),P=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[4;"+P+";"+F+"t");break;case a.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var B=this._renderService.dimensions.scaledCellWidth.toFixed(0),J=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(d.C0.ESC+"[6;"+J+";"+B+"t")}},N.prototype.cancel=function(K,F){if(this.options.cancelEvents||F)return K.preventDefault(),K.stopPropagation(),!1},N.prototype._visualBell=function(){return!1},N.prototype._soundBell=function(){return this.options.bellStyle==="sound"},N}(L.CoreTerminal);_.Terminal=G},function(I,_,O){"use strict";var y=this&&this.__decorate||function(d,a,n,s){var t,i=arguments.length,e=i<3?a:s===null?s=Object.getOwnPropertyDescriptor(a,n):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,a,n,s);else for(var r=d.length-1;r>=0;r--)(t=d[r])&&(e=(i<3?t(e):i>3?t(a,n,e):t(a,n))||e);return i>3&&e&&Object.defineProperty(a,n,e),e},v=this&&this.__param||function(d,a){return function(n,s){a(n,s,d)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CompositionHelper=void 0;var o=O(5),g=O(1),p=function(){function d(a,n,s,t,i,e){this._textarea=a,this._compositionView=n,this._bufferService=s,this._optionsService=t,this._charSizeService=i,this._coreService=e,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(d.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),d.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},d.prototype.compositionupdate=function(a){var n=this;this._compositionView.textContent=a.data,this.updateCompositionElements(),setTimeout(function(){n._compositionPosition.end=n._textarea.value.length},0)},d.prototype.compositionend=function(){this._finalizeComposition(!0)},d.prototype.keydown=function(a){if(this._isComposing||this._isSendingComposition){if(a.keyCode===229)return!1;if(a.keyCode===16||a.keyCode===17||a.keyCode===18)return!1;this._finalizeComposition(!1)}return a.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},d.prototype._finalizeComposition=function(a){var n=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,a){var s={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(n._isSendingComposition){n._isSendingComposition=!1;var i=void 0;i=n._isComposing?n._textarea.value.substring(s.start,s.end):n._textarea.value.substring(s.start),n._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;var t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}},d.prototype._handleAnyTextareaChanges=function(){var a=this,n=this._textarea.value;setTimeout(function(){if(!a._isComposing){var s=a._textarea.value.replace(n,"");s.length>0&&a._coreService.triggerDataEvent(s,!0)}},0)},d.prototype.updateCompositionElements=function(a){var n=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var s=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),t=this._bufferService.buffer.y*s,i=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=i+"px",this._compositionView.style.top=t+"px",this._compositionView.style.height=s+"px",this._compositionView.style.lineHeight=s+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var e=this._compositionView.getBoundingClientRect();this._textarea.style.left=i+"px",this._textarea.style.top=t+"px",this._textarea.style.width=e.width+"px",this._textarea.style.height=e.height+"px",this._textarea.style.lineHeight=e.height+"px"}a||setTimeout(function(){return n.updateCompositionElements(!0)},0)}},d=y([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,o.ICharSizeService),v(5,g.ICoreService)],d)}();_.CompositionHelper=p},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),o=this&&this.__decorate||function(t,i,e,r){var c,u=arguments.length,f=u<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,i,e,r);else for(var m=t.length-1;m>=0;m--)(c=t[m])&&(f=(u<3?c(f):u>3?c(i,e,f):c(i,e))||f);return u>3&&f&&Object.defineProperty(i,e,f),f},g=this&&this.__param||function(t,i){return function(e,r){i(e,r,t)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Viewport=void 0;var p=O(2),d=O(7),a=O(5),n=O(1),s=function(t){function i(e,r,c,u,f,m,l){var E=t.call(this)||this;return E._scrollLines=e,E._viewportElement=r,E._scrollArea=c,E._bufferService=u,E._optionsService=f,E._charSizeService=m,E._renderService=l,E.scrollBarWidth=0,E._currentRowHeight=0,E._lastRecordedBufferLength=0,E._lastRecordedViewportHeight=0,E._lastRecordedBufferHeight=0,E._lastTouchY=0,E._lastScrollTop=0,E._wheelPartialScroll=0,E._refreshAnimationFrame=null,E._ignoreNextScrollEvent=!1,E.scrollBarWidth=E._viewportElement.offsetWidth-E._scrollArea.offsetWidth||15,E.register(d.addDisposableDomListener(E._viewportElement,"scroll",E._onScroll.bind(E))),setTimeout(function(){return E.syncScrollArea()},0),E}return v(i,t),i.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},i.prototype._refresh=function(e){var r=this;if(e)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return r._innerRefresh()}))},i.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 r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==r&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=r),this._refreshAnimationFrame=null},i.prototype.syncScrollArea=function(e){if(e===void 0&&(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 r=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===r&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(e)}else this._refresh(e)},i.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var r=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(r,!0)}},i.prototype._bubbleScroll=function(e,r){var c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(r<0&&this._viewportElement.scrollTop!==0||r>0&&c<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},i.prototype.onWheel=function(e){var r=this._getPixelsScrolled(e);return r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},i.prototype._getPixelsScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?r*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._currentRowHeight*this._bufferService.rows),r},i.prototype.getLinesScrolled=function(e){if(e.deltaY===0)return 0;var r=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(r/=this._currentRowHeight+0,this._wheelPartialScroll+=r,r=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(r*=this._bufferService.rows),r},i.prototype._applyScrollModifier=function(e,r){var c=this._optionsService.options.fastScrollModifier;return c==="alt"&&r.altKey||c==="ctrl"&&r.ctrlKey||c==="shift"&&r.shiftKey?e*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:e*this._optionsService.options.scrollSensitivity},i.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},i.prototype.onTouchMove=function(e){var r=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,r!==0&&(this._viewportElement.scrollTop+=r,this._bubbleScroll(e,r))},i=o([g(3,n.IBufferService),g(4,n.IOptionsService),g(5,a.ICharSizeService),g(6,a.IRenderService)],i)}(p.Disposable);_.Viewport=s},function(I,_,O){"use strict";function y(p){return p.replace(/\r?\n/g,"\r")}function v(p,d){return d?"[200~"+p+"[201~":p}function o(p,d,a){p=v(p=y(p),a.decPrivateModes.bracketedPasteMode),a.triggerDataEvent(p,!0),d.value=""}function g(p,d,a){var n=a.getBoundingClientRect(),s=p.clientX-n.left-10,t=p.clientY-n.top-10;d.style.width="20px",d.style.height="20px",d.style.left=s+"px",d.style.top=t+"px",d.style.zIndex="1000",d.focus()}Object.defineProperty(_,"__esModule",{value:!0}),_.rightClickHandler=_.moveTextAreaUnderMouseCursor=_.paste=_.handlePasteEvent=_.copyHandler=_.bracketTextForPaste=_.prepareTextForTerminal=void 0,_.prepareTextForTerminal=y,_.bracketTextForPaste=v,_.copyHandler=function(p,d){p.clipboardData&&p.clipboardData.setData("text/plain",d.selectionText),p.preventDefault()},_.handlePasteEvent=function(p,d,a){p.stopPropagation(),p.clipboardData&&o(p.clipboardData.getData("text/plain"),d,a)},_.paste=o,_.moveTextAreaUnderMouseCursor=g,_.rightClickHandler=function(p,d,a,n,s){g(p,d,a),s&&!n.isClickInSelection(p)&&n.selectWordAtCursor(p),d.value=n.selectionText,d.select()}},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(_,"__esModule",{value:!0}),_.EscapeSequenceParser=_.VT500_TRANSITION_TABLE=_.TransitionTable=void 0;var o=O(2),g=O(15),p=O(21),d=O(22),a=O(24),n=function(){function t(i){this.table=new Uint8Array(i)}return t.prototype.setDefault=function(i,e){g.fill(this.table,i<<4|e)},t.prototype.add=function(i,e,r,c){this.table[e<<8|i]=r<<4|c},t.prototype.addMany=function(i,e,r,c){for(var u=0;u<i.length;u++)this.table[e<<8|i[u]]=r<<4|c},t}();_.TransitionTable=n,_.VT500_TRANSITION_TABLE=function(){var t=new n(4095),i=Array.apply(null,Array(256)).map(function(m,l){return l}),e=function(m,l){return i.slice(m,l)},r=e(32,127),c=e(0,24);c.push(25),c.push.apply(c,e(28,32));var u,f=e(0,14);for(u in t.setDefault(1,0),t.addMany(r,0,2,0),f)t.addMany([24,26,153,154],u,3,0),t.addMany(e(128,144),u,3,0),t.addMany(e(144,152),u,3,0),t.add(156,u,0,0),t.add(27,u,11,1),t.add(157,u,4,8),t.addMany([152,158,159],u,0,7),t.add(155,u,11,3),t.add(144,u,11,9);return t.addMany(c,0,3,0),t.addMany(c,1,3,1),t.add(127,1,0,1),t.addMany(c,8,0,8),t.addMany(c,3,3,3),t.add(127,3,0,3),t.addMany(c,4,3,4),t.add(127,4,0,4),t.addMany(c,6,3,6),t.addMany(c,5,3,5),t.add(127,5,0,5),t.addMany(c,2,3,2),t.add(127,2,0,2),t.add(93,1,4,8),t.addMany(r,8,5,8),t.add(127,8,5,8),t.addMany([156,27,24,26,7],8,6,0),t.addMany(e(28,32),8,0,8),t.addMany([88,94,95],1,0,7),t.addMany(r,7,0,7),t.addMany(c,7,0,7),t.add(156,7,0,0),t.add(127,7,0,7),t.add(91,1,11,3),t.addMany(e(64,127),3,7,0),t.addMany(e(48,60),3,8,4),t.addMany([60,61,62,63],3,9,4),t.addMany(e(48,60),4,8,4),t.addMany(e(64,127),4,7,0),t.addMany([60,61,62,63],4,0,6),t.addMany(e(32,64),6,0,6),t.add(127,6,0,6),t.addMany(e(64,127),6,0,0),t.addMany(e(32,48),3,9,5),t.addMany(e(32,48),5,9,5),t.addMany(e(48,64),5,0,6),t.addMany(e(64,127),5,7,0),t.addMany(e(32,48),4,9,5),t.addMany(e(32,48),1,9,2),t.addMany(e(32,48),2,9,2),t.addMany(e(48,127),2,10,0),t.addMany(e(48,80),1,10,0),t.addMany(e(81,88),1,10,0),t.addMany([89,90,92],1,10,0),t.addMany(e(96,127),1,10,0),t.add(80,1,11,9),t.addMany(c,9,0,9),t.add(127,9,0,9),t.addMany(e(28,32),9,0,9),t.addMany(e(32,48),9,9,12),t.addMany(e(48,60),9,8,10),t.addMany([60,61,62,63],9,9,10),t.addMany(c,11,0,11),t.addMany(e(32,128),11,0,11),t.addMany(e(28,32),11,0,11),t.addMany(c,10,0,10),t.add(127,10,0,10),t.addMany(e(28,32),10,0,10),t.addMany(e(48,60),10,8,10),t.addMany([60,61,62,63],10,0,11),t.addMany(e(32,48),10,9,12),t.addMany(c,12,0,12),t.add(127,12,0,12),t.addMany(e(28,32),12,0,12),t.addMany(e(32,48),12,9,12),t.addMany(e(48,64),12,0,11),t.addMany(e(64,127),12,12,13),t.addMany(e(64,127),10,12,13),t.addMany(e(64,127),9,12,13),t.addMany(c,13,13,13),t.addMany(r,13,13,13),t.add(127,13,0,13),t.addMany([27,156,24,26],13,14,0),t.add(160,0,2,0),t.add(160,8,5,8),t.add(160,6,0,6),t.add(160,11,0,11),t.add(160,13,13,13),t}();var s=function(t){function i(e){e===void 0&&(e=_.VT500_TRANSITION_TABLE);var r=t.call(this)||this;return r._transitions=e,r.initialState=0,r.currentState=r.initialState,r._params=new p.Params,r._params.addParam(0),r._collect=0,r.precedingCodepoint=0,r._printHandlerFb=function(c,u,f){},r._executeHandlerFb=function(c){},r._csiHandlerFb=function(c,u){},r._escHandlerFb=function(c){},r._errorHandlerFb=function(c){return c},r._printHandler=r._printHandlerFb,r._executeHandlers=Object.create(null),r._csiHandlers=Object.create(null),r._escHandlers=Object.create(null),r._oscParser=new d.OscParser,r._dcsParser=new a.DcsParser,r._errorHandler=r._errorHandlerFb,r.setEscHandler({final:"\\"},function(){}),r}return v(i,t),i.prototype._identifier=function(e,r){r===void 0&&(r=[64,126]);var c=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((c=e.prefix.charCodeAt(0))&&60>c||c>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 u=0;u<e.intermediates.length;++u){var f=e.intermediates.charCodeAt(u);if(32>f||f>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=f}}if(e.final.length!==1)throw new Error("final must be a single byte");var m=e.final.charCodeAt(0);if(r[0]>m||m>r[1])throw new Error("final must be in range "+r[0]+" .. "+r[1]);return c<<=8,c|=m},i.prototype.identToString=function(e){for(var r=[];e;)r.push(String.fromCharCode(255&e)),e>>=8;return r.reverse().join("")},i.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},i.prototype.setPrintHandler=function(e){this._printHandler=e},i.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},i.prototype.addEscHandler=function(e,r){var c=this._identifier(e,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);var u=this._escHandlers[c];return u.push(r),{dispose:function(){var f=u.indexOf(r);f!==-1&&u.splice(f,1)}}},i.prototype.setEscHandler=function(e,r){this._escHandlers[this._identifier(e,[48,126])]=[r]},i.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},i.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},i.prototype.setExecuteHandler=function(e,r){this._executeHandlers[e.charCodeAt(0)]=r},i.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},i.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},i.prototype.addCsiHandler=function(e,r){var c=this._identifier(e);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);var u=this._csiHandlers[c];return u.push(r),{dispose:function(){var f=u.indexOf(r);f!==-1&&u.splice(f,1)}}},i.prototype.setCsiHandler=function(e,r){this._csiHandlers[this._identifier(e)]=[r]},i.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},i.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},i.prototype.addDcsHandler=function(e,r){return this._dcsParser.addHandler(this._identifier(e),r)},i.prototype.setDcsHandler=function(e,r){this._dcsParser.setHandler(this._identifier(e),r)},i.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},i.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},i.prototype.addOscHandler=function(e,r){return this._oscParser.addHandler(e,r)},i.prototype.setOscHandler=function(e,r){this._oscParser.setHandler(e,r)},i.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},i.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},i.prototype.setErrorHandler=function(e){this._errorHandler=e},i.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},i.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},i.prototype.parse=function(e,r){for(var c=0,u=0,f=this.currentState,m=this._oscParser,l=this._dcsParser,E=this._collect,b=this._params,D=this._transitions.table,C=0;C<r;++C){switch((u=D[f<<8|((c=e[C])<160?c:160)])>>4){case 2:for(var w=C+1;;++w){if(w>=r||(c=e[w])<32||c>126&&c<160){this._printHandler(e,C,w),C=w-1;break}if(++w>=r||(c=e[w])<32||c>126&&c<160){this._printHandler(e,C,w),C=w-1;break}if(++w>=r||(c=e[w])<32||c>126&&c<160){this._printHandler(e,C,w),C=w-1;break}if(++w>=r||(c=e[w])<32||c>126&&c<160){this._printHandler(e,C,w),C=w-1;break}}break;case 3:this._executeHandlers[c]?this._executeHandlers[c]():this._executeHandlerFb(c),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:c,currentState:f,collect:E,params:b,abort:!1}).abort)return;break;case 7:for(var S=this._csiHandlers[E<<8|c],A=S?S.length-1:-1;A>=0&&S[A](b)===!1;A--);A<0&&this._csiHandlerFb(E<<8|c,b),this.precedingCodepoint=0;break;case 8:do switch(c){case 59:b.addParam(0);break;case 58:b.addSubParam(-1);break;default:b.addDigit(c-48)}while(++C<r&&(c=e[C])>47&&c<60);C--;break;case 9:E<<=8,E|=c;break;case 10:for(var R=this._escHandlers[E<<8|c],k=R?R.length-1:-1;k>=0&&R[k]()===!1;k--);k<0&&this._escHandlerFb(E<<8|c),this.precedingCodepoint=0;break;case 11:b.reset(),b.addParam(0),E=0;break;case 12:l.hook(E<<8|c,b);break;case 13:for(var L=C+1;;++L)if(L>=r||(c=e[L])===24||c===26||c===27||c>127&&c<160){l.put(e,C,L),C=L-1;break}break;case 14:l.unhook(c!==24&&c!==26),c===27&&(u|=1),b.reset(),b.addParam(0),E=0,this.precedingCodepoint=0;break;case 4:m.start();break;case 5:for(var M=C+1;;M++)if(M>=r||(c=e[M])<32||c>127&&c<=159){m.put(e,C,M),C=M-1;break}break;case 6:m.end(c!==24&&c!==26),c===27&&(u|=1),b.reset(),b.addParam(0),E=0,this.precedingCodepoint=0}f=15&u}this._collect=E,this.currentState=f},i}(o.Disposable);_.EscapeSequenceParser=s},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(m,l){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var D in b)b.hasOwnProperty(D)&&(E[D]=b[D])})(m,l)},function(m,l){function E(){this.constructor=m}y(m,l),m.prototype=l===null?Object.create(l):(E.prototype=l.prototype,new E)}),o=this&&this.__decorate||function(m,l,E,b){var D,C=arguments.length,w=C<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,l,E,b);else for(var S=m.length-1;S>=0;S--)(D=m[S])&&(w=(C<3?D(w):C>3?D(l,E,w):D(l,E))||w);return C>3&&w&&Object.defineProperty(l,E,w),w},g=this&&this.__param||function(m,l){return function(E,b){l(E,b,m)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Renderer=void 0;var p=O(41),d=O(47),a=O(48),n=O(49),s=O(29),t=O(2),i=O(5),e=O(1),r=O(25),c=O(0),u=1,f=function(m){function l(E,b,D,C,w,S,A,R,k){var L=m.call(this)||this;L._colors=E,L._screenElement=b,L._bufferService=w,L._charSizeService=S,L._optionsService=A,L._id=u++,L._onRequestRedraw=new c.EventEmitter;var M=L._optionsService.options.allowTransparency;return L._characterJoinerRegistry=new s.CharacterJoinerRegistry(L._bufferService),L._renderLayers=[new p.TextRenderLayer(L._screenElement,0,L._colors,L._characterJoinerRegistry,M,L._id,L._bufferService,A),new d.SelectionRenderLayer(L._screenElement,1,L._colors,L._id,L._bufferService,A),new n.LinkRenderLayer(L._screenElement,2,L._colors,L._id,D,C,L._bufferService,A),new a.CursorRenderLayer(L._screenElement,3,L._colors,L._id,L._onRequestRedraw,L._bufferService,A,R,k)],L.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},L._devicePixelRatio=window.devicePixelRatio,L._updateDimensions(),L.onOptionsChanged(),L}return v(l,m),Object.defineProperty(l.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),l.prototype.dispose=function(){for(var E=0,b=this._renderLayers;E<b.length;E++)b[E].dispose();m.prototype.dispose.call(this),r.removeTerminalFromCache(this._id)},l.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},l.prototype.setColors=function(E){this._colors=E;for(var b=0,D=this._renderLayers;b<D.length;b++){var C=D[b];C.setColors(this._colors),C.reset()}},l.prototype.onResize=function(E,b){this._updateDimensions();for(var D=0,C=this._renderLayers;D<C.length;D++)C[D].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},l.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},l.prototype.onBlur=function(){this._runOperation(function(E){return E.onBlur()})},l.prototype.onFocus=function(){this._runOperation(function(E){return E.onFocus()})},l.prototype.onSelectionChanged=function(E,b,D){D===void 0&&(D=!1),this._runOperation(function(C){return C.onSelectionChanged(E,b,D)})},l.prototype.onCursorMove=function(){this._runOperation(function(E){return E.onCursorMove()})},l.prototype.onOptionsChanged=function(){this._runOperation(function(E){return E.onOptionsChanged()})},l.prototype.clear=function(){this._runOperation(function(E){return E.reset()})},l.prototype._runOperation=function(E){for(var b=0,D=this._renderLayers;b<D.length;b++)E(D[b])},l.prototype.renderRows=function(E,b){for(var D=0,C=this._renderLayers;D<C.length;D++)C[D].onGridChanged(E,b)},l.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},l.prototype.registerCharacterJoiner=function(E){return this._characterJoinerRegistry.registerCharacterJoiner(E)},l.prototype.deregisterCharacterJoiner=function(E){return this._characterJoinerRegistry.deregisterCharacterJoiner(E)},l=o([g(4,e.IBufferService),g(5,i.ICharSizeService),g(6,e.IOptionsService),g(7,e.ICoreService),g(8,i.ICoreBrowserService)],l)}(t.Disposable);_.Renderer=f},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(_,"__esModule",{value:!0}),_.TextRenderLayer=void 0;var o=O(42),g=O(13),p=O(6),d=O(3),a=O(29),n=O(4),s=function(t){function i(e,r,c,u,f,m,l,E){var b=t.call(this,e,"text",r,f,c,m,l,E)||this;return b._characterWidth=0,b._characterFont="",b._characterOverlapCache={},b._workCell=new n.CellData,b._state=new o.GridCache,b._characterJoinerRegistry=u,b}return v(i,t),i.prototype.resize=function(e){t.prototype.resize.call(this,e);var r=this._getFont(!1,!1);this._characterWidth===e.scaledCharWidth&&this._characterFont===r||(this._characterWidth=e.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},i.prototype.reset=function(){this._state.clear(),this._clearAll()},i.prototype._forEachCell=function(e,r,c,u){for(var f=e;f<=r;f++)for(var m=f+this._bufferService.buffer.ydisp,l=this._bufferService.buffer.lines.get(m),E=c?c.getJoinedCharacters(m):[],b=0;b<this._bufferService.cols;b++){l.loadCell(b,this._workCell);var D=this._workCell,C=!1,w=b;if(D.getWidth()!==0){if(E.length>0&&b===E[0][0]){C=!0;var S=E.shift();D=new a.JoinedCellData(this._workCell,l.translateToString(!0,S[0],S[1]),S[1]-S[0]),w=S[1]-1}!C&&this._isOverlapping(D)&&w<l.length-1&&l.getCodePoint(w+1)===d.NULL_CELL_CODE&&(D.content&=-12582913,D.content|=2<<22),u(D,b,f),b=w}}},i.prototype._drawBackground=function(e,r){var c=this,u=this._ctx,f=this._bufferService.cols,m=0,l=0,E=null;u.save(),this._forEachCell(e,r,null,function(b,D,C){var w=null;b.isInverse()?w=b.isFgDefault()?c._colors.foreground.css:b.isFgRGB()?"rgb("+p.AttributeData.toColorRGB(b.getFgColor()).join(",")+")":c._colors.ansi[b.getFgColor()].css:b.isBgRGB()?w="rgb("+p.AttributeData.toColorRGB(b.getBgColor()).join(",")+")":b.isBgPalette()&&(w=c._colors.ansi[b.getBgColor()].css),E===null&&(m=D,l=C),C!==l?(u.fillStyle=E||"",c._fillCells(m,l,f-m,1),m=D,l=C):E!==w&&(u.fillStyle=E||"",c._fillCells(m,l,D-m,1),m=D,l=C),E=w}),E!==null&&(u.fillStyle=E,this._fillCells(m,l,f-m,1)),u.restore()},i.prototype._drawForeground=function(e,r){var c=this;this._forEachCell(e,r,this._characterJoinerRegistry,function(u,f,m){if(!u.isInvisible()&&(c._drawChars(u,f,m),u.isUnderline())){if(c._ctx.save(),u.isInverse())if(u.isBgDefault())c._ctx.fillStyle=c._colors.background.css;else if(u.isBgRGB())c._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(u.getBgColor()).join(",")+")";else{var l=u.getBgColor();c._optionsService.options.drawBoldTextInBrightColors&&u.isBold()&&l<8&&(l+=8),c._ctx.fillStyle=c._colors.ansi[l].css}else if(u.isFgDefault())c._ctx.fillStyle=c._colors.foreground.css;else if(u.isFgRGB())c._ctx.fillStyle="rgb("+p.AttributeData.toColorRGB(u.getFgColor()).join(",")+")";else{var E=u.getFgColor();c._optionsService.options.drawBoldTextInBrightColors&&u.isBold()&&E<8&&(E+=8),c._ctx.fillStyle=c._colors.ansi[E].css}c._fillBottomLineAtCells(f,m,u.getWidth()),c._ctx.restore()}})},i.prototype.onGridChanged=function(e,r){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,r-e+1),this._drawBackground(e,r),this._drawForeground(e,r))},i.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},i.prototype._isOverlapping=function(e){if(e.getWidth()!==1)return!1;if(e.getCode()<256)return!1;var r=e.getChars();if(this._characterOverlapCache.hasOwnProperty(r))return this._characterOverlapCache[r];this._ctx.save(),this._ctx.font=this._characterFont;var c=Math.floor(this._ctx.measureText(r).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[r]=c,c},i}(g.BaseRenderLayer);_.TextRenderLayer=s},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.GridCache=void 0;var y=function(){function v(){this.cache=[]}return v.prototype.resize=function(o,g){for(var p=0;p<o;p++){this.cache.length<=p&&this.cache.push([]);for(var d=this.cache[p].length;d<g;d++)this.cache[p].push(void 0);this.cache[p].length=g}this.cache.length=o},v.prototype.clear=function(){for(var o=0;o<this.cache.length;o++)for(var g=0;g<this.cache[o].length;g++)this.cache[o][g]=void 0},v}();_.GridCache=y},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(c,u){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var l in m)m.hasOwnProperty(l)&&(f[l]=m[l])})(c,u)},function(c,u){function f(){this.constructor=c}y(c,u),c.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)});Object.defineProperty(_,"__esModule",{value:!0}),_.NoneCharAtlas=_.DynamicCharAtlas=_.getGlyphCacheKey=void 0;var o=O(9),g=O(44),p=O(27),d=O(46),a=O(11),n=O(28),s=O(10),t={css:"rgba(0, 0, 0, 0)",rgba:0};function i(c){return c.code<<21|c.bg<<12|c.fg<<3|(c.bold?0:4)+(c.dim?0:2)+(c.italic?0:1)}_.getGlyphCacheKey=i;var e=function(c){function u(f,m){var l=c.call(this)||this;l._config=m,l._drawToCacheCount=0,l._glyphsWaitingOnBitmap=[],l._bitmapCommitTimeout=null,l._bitmap=null,l._cacheCanvas=f.createElement("canvas"),l._cacheCanvas.width=1024,l._cacheCanvas.height=1024,l._cacheCtx=n.throwIfFalsy(l._cacheCanvas.getContext("2d",{alpha:!0}));var E=f.createElement("canvas");E.width=l._config.scaledCharWidth,E.height=l._config.scaledCharHeight,l._tmpCtx=n.throwIfFalsy(E.getContext("2d",{alpha:l._config.allowTransparency})),l._width=Math.floor(1024/l._config.scaledCharWidth),l._height=Math.floor(1024/l._config.scaledCharHeight);var b=l._width*l._height;return l._cacheMap=new d.LRUMap(b),l._cacheMap.prealloc(b),l}return v(u,c),u.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},u.prototype.beginFrame=function(){this._drawToCacheCount=0},u.prototype.draw=function(f,m,l,E){if(m.code===32)return!0;if(!this._canCache(m))return!1;var b=i(m),D=this._cacheMap.get(b);if(D!=null)return this._drawFromCache(f,D,l,E),!0;if(this._drawToCacheCount<100){var C=void 0;C=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var w=this._drawToCache(m,C);return this._cacheMap.set(b,w),this._drawFromCache(f,w,l,E),!0}return!1},u.prototype._canCache=function(f){return f.code<256},u.prototype._toCoordinateX=function(f){return f%this._width*this._config.scaledCharWidth},u.prototype._toCoordinateY=function(f){return Math.floor(f/this._width)*this._config.scaledCharHeight},u.prototype._drawFromCache=function(f,m,l,E){if(!m.isEmpty){var b=this._toCoordinateX(m.index),D=this._toCoordinateY(m.index);f.drawImage(m.inBitmap?this._bitmap:this._cacheCanvas,b,D,this._config.scaledCharWidth,this._config.scaledCharHeight,l,E,this._config.scaledCharWidth,this._config.scaledCharHeight)}},u.prototype._getColorFromAnsiIndex=function(f){return f<this._config.colors.ansi.length?this._config.colors.ansi[f]:p.DEFAULT_ANSI_COLORS[f]},u.prototype._getBackgroundColor=function(f){return this._config.allowTransparency?t:f.bg===o.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:f.bg<256?this._getColorFromAnsiIndex(f.bg):this._config.colors.background},u.prototype._getForegroundColor=function(f){return f.fg===o.INVERTED_DEFAULT_COLOR?s.color.opaque(this._config.colors.background):f.fg<256?this._getColorFromAnsiIndex(f.fg):this._config.colors.foreground},u.prototype._drawToCache=function(f,m){this._drawToCacheCount++,this._tmpCtx.save();var l=this._getBackgroundColor(f);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=l.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var E=f.bold?this._config.fontWeightBold:this._config.fontWeight,b=f.italic?"italic":"";this._tmpCtx.font=b+" "+E+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(f).css,f.dim&&(this._tmpCtx.globalAlpha=o.DIM_OPACITY),this._tmpCtx.fillText(f.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var D=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),C=!1;this._config.allowTransparency||(C=function(R,k){for(var L=!0,M=k.rgba>>>24,G=k.rgba>>>16&255,W=k.rgba>>>8&255,N=0;N<R.data.length;N+=4)R.data[N]===M&&R.data[N+1]===G&&R.data[N+2]===W?R.data[N+3]=0:L=!1;return L}(D,l));var w=this._toCoordinateX(m),S=this._toCoordinateY(m);this._cacheCtx.putImageData(D,w,S);var A={index:m,isEmpty:C,inBitmap:!1};return this._addGlyphToBitmap(A),A},u.prototype._addGlyphToBitmap=function(f){var m=this;!("createImageBitmap"in window)||a.isFirefox||a.isSafari||(this._glyphsWaitingOnBitmap.push(f),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return m._generateBitmap()},100)))},u.prototype._generateBitmap=function(){var f=this,m=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(l){f._bitmap=l;for(var E=0;E<m.length;E++)m[E].inBitmap=!0}),this._bitmapCommitTimeout=null},u}(g.BaseCharAtlas);_.DynamicCharAtlas=e;var r=function(c){function u(f,m){return c.call(this)||this}return v(u,c),u.prototype.draw=function(f,m,l,E){return!1},u}(g.BaseCharAtlas);_.NoneCharAtlas=r},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BaseCharAtlas=void 0;var y=function(){function v(){this._didWarmUp=!1}return v.prototype.dispose=function(){},v.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},v.prototype._doWarmUp=function(){},v.prototype.beginFrame=function(){},v}();_.BaseCharAtlas=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.ColorContrastCache=void 0;var y=function(){function v(){this._color={},this._rgba={}}return v.prototype.clear=function(){this._color={},this._rgba={}},v.prototype.setCss=function(o,g,p){this._rgba[o]||(this._rgba[o]={}),this._rgba[o][g]=p},v.prototype.getCss=function(o,g){return this._rgba[o]?this._rgba[o][g]:void 0},v.prototype.setColor=function(o,g,p){this._color[o]||(this._color[o]={}),this._color[o][g]=p},v.prototype.getColor=function(o,g){return this._color[o]?this._color[o][g]:void 0},v}();_.ColorContrastCache=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.LRUMap=void 0;var y=function(){function v(o){this.capacity=o,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return v.prototype._unlinkNode=function(o){var g=o.prev,p=o.next;o===this._head&&(this._head=p),o===this._tail&&(this._tail=g),g!==null&&(g.next=p),p!==null&&(p.prev=g)},v.prototype._appendNode=function(o){var g=this._tail;g!==null&&(g.next=o),o.prev=g,o.next=null,this._tail=o,this._head===null&&(this._head=o)},v.prototype.prealloc=function(o){for(var g=this._nodePool,p=0;p<o;p++)g.push({prev:null,next:null,key:null,value:null})},v.prototype.get=function(o){var g=this._map[o];return g!==void 0?(this._unlinkNode(g),this._appendNode(g),g.value):null},v.prototype.peekValue=function(o){var g=this._map[o];return g!==void 0?g.value:null},v.prototype.peek=function(){var o=this._head;return o===null?null:o.value},v.prototype.set=function(o,g){var p=this._map[o];if(p!==void 0)p=this._map[o],this._unlinkNode(p),p.value=g;else if(this.size>=this.capacity)p=this._head,this._unlinkNode(p),delete this._map[p.key],p.key=o,p.value=g,this._map[o]=p;else{var d=this._nodePool;d.length>0?((p=d.pop()).key=o,p.value=g):p={prev:null,next:null,key:o,value:g},this._map[o]=p,this.size++}this._appendNode(p)},v}();_.LRUMap=y},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(g,p){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,a){d.__proto__=a}||function(d,a){for(var n in a)a.hasOwnProperty(n)&&(d[n]=a[n])})(g,p)},function(g,p){function d(){this.constructor=g}y(g,p),g.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)});Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionRenderLayer=void 0;var o=function(g){function p(d,a,n,s,t,i){var e=g.call(this,d,"selection",a,!0,n,s,t,i)||this;return e._clearState(),e}return v(p,g),p.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},p.prototype.resize=function(d){g.prototype.resize.call(this,d),this._clearState()},p.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},p.prototype.onSelectionChanged=function(d,a,n){if(this._didStateChange(d,a,n,this._bufferService.buffer.ydisp))if(this._clearAll(),d&&a){var s=d[1]-this._bufferService.buffer.ydisp,t=a[1]-this._bufferService.buffer.ydisp,i=Math.max(s,0),e=Math.min(t,this._bufferService.rows-1);if(!(i>=this._bufferService.rows||e<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,n){var r=d[0],c=a[0]-r,u=e-i+1;this._fillCells(r,i,c,u)}else{r=s===i?d[0]:0;var f=i===e?a[0]:this._bufferService.cols;this._fillCells(r,i,f-r,1);var m=Math.max(e-i-1,0);if(this._fillCells(0,i+1,this._bufferService.cols,m),i!==e){var l=t===e?a[0]:this._bufferService.cols;this._fillCells(0,e,l,1)}}this._state.start=[d[0],d[1]],this._state.end=[a[0],a[1]],this._state.columnSelectMode=n,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},p.prototype._didStateChange=function(d,a,n,s){return!this._areCoordinatesEqual(d,this._state.start)||!this._areCoordinatesEqual(a,this._state.end)||n!==this._state.columnSelectMode||s!==this._state.ydisp},p.prototype._areCoordinatesEqual=function(d,a){return!(!d||!a)&&d[0]===a[0]&&d[1]===a[1]},p}(O(13).BaseRenderLayer);_.SelectionRenderLayer=o},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(a,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,t){s.__proto__=t}||function(s,t){for(var i in t)t.hasOwnProperty(i)&&(s[i]=t[i])})(a,n)},function(a,n){function s(){this.constructor=a}y(a,n),a.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(_,"__esModule",{value:!0}),_.CursorRenderLayer=void 0;var o=O(13),g=O(4),p=function(a){function n(s,t,i,e,r,c,u,f,m){var l=a.call(this,s,"cursor",t,!0,i,e,c,u)||this;return l._onRequestRedraw=r,l._coreService=f,l._coreBrowserService=m,l._cell=new g.CellData,l._state={x:0,y:0,isFocused:!1,style:"",width:0},l._cursorRenderers={bar:l._renderBarCursor.bind(l),block:l._renderBlockCursor.bind(l),underline:l._renderUnderlineCursor.bind(l)},l}return v(n,a),n.prototype.resize=function(s){a.prototype.resize.call(this,s),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},n.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},n.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onOptionsChanged=function(){var s,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new d(this._coreBrowserService.isFocused,function(){t._render(!0)})):((s=this._cursorBlinkStateManager)===null||s===void 0||s.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},n.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype.onGridChanged=function(s,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},n.prototype._render=function(s){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else{var e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(e,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&r!=="block"?this._cursorRenderers[r](e,i,this._cell):this._renderBlurCursor(e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===e&&this._state.y===i&&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"](e,i,this._cell),this._ctx.restore(),this._state.x=e,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},n.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})},n.prototype._renderBarCursor=function(s,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(s,t,this._optionsService.options.cursorWidth),this._ctx.restore()},n.prototype._renderBlockCursor=function(s,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(s,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,s,t),this._ctx.restore()},n.prototype._renderUnderlineCursor=function(s,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(s,t),this._ctx.restore()},n.prototype._renderBlurCursor=function(s,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(s,t,i.getWidth(),1),this._ctx.restore()},n}(o.BaseRenderLayer);_.CursorRenderLayer=p;var d=function(){function a(n,s){this._renderCallback=s,this.isCursorVisible=!0,n&&this._restartInterval()}return Object.defineProperty(a.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),a.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)},a.prototype.restartBlinkAnimation=function(){var n=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){n._renderCallback(),n._animationFrame=void 0})))},a.prototype._restartInterval=function(n){var s=this;n===void 0&&(n=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(s._animationTimeRestarted){var t=600-(Date.now()-s._animationTimeRestarted);if(s._animationTimeRestarted=void 0,t>0)return void s._restartInterval(t)}s.isCursorVisible=!1,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0}),s._blinkInterval=window.setInterval(function(){if(s._animationTimeRestarted){var i=600-(Date.now()-s._animationTimeRestarted);return s._animationTimeRestarted=void 0,void s._restartInterval(i)}s.isCursorVisible=!s.isCursorVisible,s._animationFrame=window.requestAnimationFrame(function(){s._renderCallback(),s._animationFrame=void 0})},600)},n)},a.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)},a.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},a}()},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(a,n){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,t){s.__proto__=t}||function(s,t){for(var i in t)t.hasOwnProperty(i)&&(s[i]=t[i])})(a,n)},function(a,n){function s(){this.constructor=a}y(a,n),a.prototype=n===null?Object.create(n):(s.prototype=n.prototype,new s)});Object.defineProperty(_,"__esModule",{value:!0}),_.LinkRenderLayer=void 0;var o=O(13),g=O(9),p=O(26),d=function(a){function n(s,t,i,e,r,c,u,f){var m=a.call(this,s,"link",t,!0,i,e,u,f)||this;return r.onShowLinkUnderline(function(l){return m._onShowLinkUnderline(l)}),r.onHideLinkUnderline(function(l){return m._onHideLinkUnderline(l)}),c.onShowLinkUnderline(function(l){return m._onShowLinkUnderline(l)}),c.onHideLinkUnderline(function(l){return m._onHideLinkUnderline(l)}),m}return v(n,a),n.prototype.resize=function(s){a.prototype.resize.call(this,s),this._state=void 0},n.prototype.reset=function(){this._clearCurrentLink()},n.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var s=this._state.y2-this._state.y1-1;s>0&&this._clearCells(0,this._state.y1+1,this._state.cols,s),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},n.prototype._onShowLinkUnderline=function(s){if(s.fg===g.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:s.fg&&p.is256Color(s.fg)?this._ctx.fillStyle=this._colors.ansi[s.fg].css:this._ctx.fillStyle=this._colors.foreground.css,s.y1===s.y2)this._fillBottomLineAtCells(s.x1,s.y1,s.x2-s.x1);else{this._fillBottomLineAtCells(s.x1,s.y1,s.cols-s.x1);for(var t=s.y1+1;t<s.y2;t++)this._fillBottomLineAtCells(0,t,s.cols);this._fillBottomLineAtCells(0,s.y2,s.x2)}this._state=s},n.prototype._onHideLinkUnderline=function(s){this._clearCurrentLink()},n}(o.BaseRenderLayer);_.LinkRenderLayer=d},function(I,_,O){"use strict";var y=this&&this.__decorate||function(a,n,s,t){var i,e=arguments.length,r=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(a,n,s,t);else for(var c=a.length-1;c>=0;c--)(i=a[c])&&(r=(e<3?i(r):e>3?i(n,s,r):i(n,s))||r);return e>3&&r&&Object.defineProperty(n,s,r),r},v=this&&this.__param||function(a,n){return function(s,t){n(s,t,a)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseZone=_.Linkifier=void 0;var o=O(0),g=O(1),p=function(){function a(n,s,t){this._bufferService=n,this._logService=s,this._unicodeService=t,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(a.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),a.prototype.attachToDom=function(n,s){this._element=n,this._mouseZoneManager=s},a.prototype.linkifyRows=function(n,s){var t=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=n,this._rowsToLinkify.end=s):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,n),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,s)),this._mouseZoneManager.clearAll(n,s),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return t._linkifyRows()},a._timeBeforeLatency))},a.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var n=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var s=n.ydisp+this._rowsToLinkify.start;if(!(s>=n.lines.length)){for(var t=n.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),e=this._bufferService.buffer.iterator(!1,s,t,i,i);e.hasNext();)for(var r=e.next(),c=0;c<this._linkMatchers.length;c++)this._doLinkifyRow(r.range.first,r.content,this._linkMatchers[c]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},a.prototype.registerLinkMatcher=function(n,s,t){if(t===void 0&&(t={}),!s)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:n,handler:s,matchIndex:t.matchIndex,validationCallback:t.validationCallback,hoverTooltipCallback:t.tooltipCallback,hoverLeaveCallback:t.leaveCallback,willLinkActivate:t.willLinkActivate,priority:t.priority||0};return this._addLinkMatcherToList(i),i.id},a.prototype._addLinkMatcherToList=function(n){if(this._linkMatchers.length!==0){for(var s=this._linkMatchers.length-1;s>=0;s--)if(n.priority<=this._linkMatchers[s].priority)return void this._linkMatchers.splice(s+1,0,n);this._linkMatchers.splice(0,0,n)}else this._linkMatchers.push(n)},a.prototype.deregisterLinkMatcher=function(n){for(var s=0;s<this._linkMatchers.length;s++)if(this._linkMatchers[s].id===n)return this._linkMatchers.splice(s,1),!0;return!1},a.prototype._doLinkifyRow=function(n,s,t){for(var i,e=this,r=new RegExp(t.regex.source,(t.regex.flags||"")+"g"),c=-1,u=function(){var m=i[typeof t.matchIndex!="number"?0:t.matchIndex];if(!m)return f._logService.debug("match found without corresponding matchIndex",i,t),"break";if(c=s.indexOf(m,c+1),r.lastIndex=c+m.length,c<0)return"break";var l=f._bufferService.buffer.stringIndexToBufferIndex(n,c);if(l[0]<0)return"break";var E=f._bufferService.buffer.lines.get(l[0]);if(!E)return"break";var b=E.getFg(l[1]),D=b?b>>9&511:void 0;t.validationCallback?t.validationCallback(m,function(C){e._rowsTimeoutId||C&&e._addLink(l[1],l[0]-e._bufferService.buffer.ydisp,m,t,D)}):f._addLink(l[1],l[0]-f._bufferService.buffer.ydisp,m,t,D)},f=this;(i=r.exec(s))!==null&&!(u()==="break"););},a.prototype._addLink=function(n,s,t,i,e){var r=this;if(this._mouseZoneManager&&this._element){var c=this._unicodeService.getStringCellWidth(t),u=n%this._bufferService.cols,f=s+Math.floor(n/this._bufferService.cols),m=(u+c)%this._bufferService.cols,l=f+Math.floor((u+c)/this._bufferService.cols);m===0&&(m=this._bufferService.cols,l--),this._mouseZoneManager.add(new d(u+1,f+1,m+1,l+1,function(E){if(i.handler)return i.handler(E,t);var b=window.open();b?(b.opener=null,b.location.href=t):console.warn("Opening link blocked as opener could not be cleared")},function(){r._onShowLinkUnderline.fire(r._createLinkHoverEvent(u,f,m,l,e)),r._element.classList.add("xterm-cursor-pointer")},function(E){r._onLinkTooltip.fire(r._createLinkHoverEvent(u,f,m,l,e)),i.hoverTooltipCallback&&i.hoverTooltipCallback(E,t,{start:{x:u,y:f},end:{x:m,y:l}})},function(){r._onHideLinkUnderline.fire(r._createLinkHoverEvent(u,f,m,l,e)),r._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()},function(E){return!i.willLinkActivate||i.willLinkActivate(E,t)}))}},a.prototype._createLinkHoverEvent=function(n,s,t,i,e){return{x1:n,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:e}},a._timeBeforeLatency=200,a=y([v(0,g.IBufferService),v(1,g.ILogService),v(2,g.IUnicodeService)],a)}();_.Linkifier=p;var d=function(a,n,s,t,i,e,r,c,u){this.x1=a,this.y1=n,this.x2=s,this.y2=t,this.clickCallback=i,this.hoverCallback=e,this.tooltipCallback=r,this.leaveCallback=c,this.willLinkActivate=u};_.MouseZone=d},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(m,l){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var D in b)b.hasOwnProperty(D)&&(E[D]=b[D])})(m,l)},function(m,l){function E(){this.constructor=m}y(m,l),m.prototype=l===null?Object.create(l):(E.prototype=l.prototype,new E)}),o=this&&this.__decorate||function(m,l,E,b){var D,C=arguments.length,w=C<3?l:b===null?b=Object.getOwnPropertyDescriptor(l,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(m,l,E,b);else for(var S=m.length-1;S>=0;S--)(D=m[S])&&(w=(C<3?D(w):C>3?D(l,E,w):D(l,E))||w);return C>3&&w&&Object.defineProperty(l,E,w),w},g=this&&this.__param||function(m,l){return function(E,b){l(E,b,m)}};Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionService=void 0;var p=O(11),d=O(52),a=O(4),n=O(0),s=O(5),t=O(1),i=O(30),e=O(53),r=O(2),c=String.fromCharCode(160),u=new RegExp(c,"g"),f=function(m){function l(E,b,D,C,w,S,A){var R=m.call(this)||this;return R._element=E,R._screenElement=b,R._bufferService=D,R._coreService=C,R._mouseService=w,R._optionsService=S,R._renderService=A,R._dragScrollAmount=0,R._enabled=!0,R._workCell=new a.CellData,R._mouseDownTimeStamp=0,R._onLinuxMouseSelection=R.register(new n.EventEmitter),R._onRedrawRequest=R.register(new n.EventEmitter),R._onSelectionChange=R.register(new n.EventEmitter),R._onRequestScrollLines=R.register(new n.EventEmitter),R._mouseMoveListener=function(k){return R._onMouseMove(k)},R._mouseUpListener=function(k){return R._onMouseUp(k)},R._coreService.onUserInput(function(){R.hasSelection&&R.clearSelection()}),R._trimListener=R._bufferService.buffer.lines.onTrim(function(k){return R._onTrim(k)}),R.register(R._bufferService.buffers.onBufferActivate(function(k){return R._onBufferActivate(k)})),R.enable(),R._model=new d.SelectionModel(R._bufferService),R._activeSelectionMode=0,R}return v(l,m),Object.defineProperty(l.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),l.prototype.dispose=function(){this._removeMouseDownListeners()},l.prototype.reset=function(){this.clearSelection()},l.prototype.disable=function(){this.clearSelection(),this._enabled=!1},l.prototype.enable=function(){this._enabled=!0},Object.defineProperty(l.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"hasSelection",{get:function(){var E=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!E||!b)&&(E[0]!==b[0]||E[1]!==b[1])},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"selectionText",{get:function(){var E=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!E||!b)return"";var D=this._bufferService.buffer,C=[];if(this._activeSelectionMode===3){if(E[0]===b[0])return"";for(var w=E[1];w<=b[1];w++){var S=D.translateBufferLineToString(w,!0,E[0],b[0]);C.push(S)}}else{var A=E[1]===b[1]?b[0]:void 0;for(C.push(D.translateBufferLineToString(E[1],!0,E[0],A)),w=E[1]+1;w<=b[1]-1;w++){var R=D.lines.get(w);S=D.translateBufferLineToString(w,!0),R&&R.isWrapped?C[C.length-1]+=S:C.push(S)}E[1]!==b[1]&&(R=D.lines.get(b[1]),S=D.translateBufferLineToString(b[1],!0,0,b[0]),R&&R.isWrapped?C[C.length-1]+=S:C.push(S))}return C.map(function(k){return k.replace(u," ")}).join(p.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),l.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},l.prototype.refresh=function(E){var b=this;(this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return b._refresh()})),p.isLinux&&E)&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},l.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},l.prototype.isClickInSelection=function(E){var b=this._getMouseBufferCoords(E),D=this._model.finalSelectionStart,C=this._model.finalSelectionEnd;return!!(D&&C&&b)&&this._areCoordsInSelection(b,D,C)},l.prototype._areCoordsInSelection=function(E,b,D){return E[1]>b[1]&&E[1]<D[1]||b[1]===D[1]&&E[1]===b[1]&&E[0]>=b[0]&&E[0]<D[0]||b[1]<D[1]&&E[1]===D[1]&&E[0]<D[0]||b[1]<D[1]&&E[1]===b[1]&&E[0]>=b[0]},l.prototype.selectWordAtCursor=function(E){var b=this._getMouseBufferCoords(E);b&&(this._selectWordAt(b,!1),this._model.selectionEnd=void 0,this.refresh(!0))},l.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},l.prototype.selectLines=function(E,b){this._model.clearSelection(),E=Math.max(E,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,E],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()},l.prototype._onTrim=function(E){this._model.onTrim(E)&&this.refresh()},l.prototype._getMouseBufferCoords=function(E){var b=this._mouseService.getCoords(E,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b},l.prototype._getMouseEventScrollAmount=function(E){var b=i.getCoordsRelativeToElement(E,this._screenElement)[1],D=this._renderService.dimensions.canvasHeight;return b>=0&&b<=D?0:(b>D&&(b-=D),b=Math.min(Math.max(b,-50),50),(b/=50)/Math.abs(b)+Math.round(14*b))},l.prototype.shouldForceSelection=function(E){return p.isMac?E.altKey&&this._optionsService.options.macOptionClickForcesSelection:E.shiftKey},l.prototype.onMouseDown=function(E){if(this._mouseDownTimeStamp=E.timeStamp,(E.button!==2||!this.hasSelection)&&E.button===0){if(!this._enabled){if(!this.shouldForceSelection(E))return;E.stopPropagation()}E.preventDefault(),this._dragScrollAmount=0,this._enabled&&E.shiftKey?this._onIncrementalClick(E):E.detail===1?this._onSingleClick(E):E.detail===2?this._onDoubleClick(E):E.detail===3&&this._onTripleClick(E),this._addMouseDownListeners(),this.refresh(!0)}},l.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)},l.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},l.prototype._onIncrementalClick=function(E){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(E))},l.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 b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&b.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},l.prototype._onDoubleClick=function(E){var b=this._getMouseBufferCoords(E);b&&(this._activeSelectionMode=1,this._selectWordAt(b,!0))},l.prototype._onTripleClick=function(E){var b=this._getMouseBufferCoords(E);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))},l.prototype.shouldColumnSelect=function(E){return E.altKey&&!(p.isMac&&this._optionsService.options.macOptionClickForcesSelection)},l.prototype._onMouseMove=function(E){if(E.stopImmediatePropagation(),this._model.selectionStart){var b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(E),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(E),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var D=this._bufferService.buffer;if(this._model.selectionEnd[1]<D.lines.length){var C=D.lines.get(this._model.selectionEnd[1]);C&&C.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},l.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?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(E.ydisp+this._bufferService.rows,E.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=E.ydisp),this.refresh()}},l.prototype._onMouseUp=function(E){var b=E.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&E.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var D=this._mouseService.getCoords(E,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){var C=e.moveToCellSequence(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(C,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},l.prototype._onBufferActivate=function(E){var b=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=E.activeBuffer.lines.onTrim(function(D){return b._onTrim(D)})},l.prototype._convertViewportColToCharacterIndex=function(E,b){for(var D=b[0],C=0;b[0]>=C;C++){var w=E.loadCell(C,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:w>1&&b[0]!==C&&(D+=w-1)}return D},l.prototype.setSelection=function(E,b,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[E,b],this._model.selectionStartLength=D,this.refresh()},l.prototype._getWordAt=function(E,b,D,C){if(D===void 0&&(D=!0),C===void 0&&(C=!0),!(E[0]>=this._bufferService.cols)){var w=this._bufferService.buffer,S=w.lines.get(E[1]);if(S){var A=w.translateBufferLineToString(E[1],!1),R=this._convertViewportColToCharacterIndex(S,E),k=R,L=E[0]-R,M=0,G=0,W=0,N=0;if(A.charAt(R)===" "){for(;R>0&&A.charAt(R-1)===" ";)R--;for(;k<A.length&&A.charAt(k+1)===" ";)k++}else{var K=E[0],F=E[0];S.getWidth(K)===0&&(M++,K--),S.getWidth(F)===2&&(G++,F++);var P=S.getString(F).length;for(P>1&&(N+=P-1,k+=P-1);K>0&&R>0&&!this._isCharWordSeparator(S.loadCell(K-1,this._workCell));){S.loadCell(K-1,this._workCell);var B=this._workCell.getChars().length;this._workCell.getWidth()===0?(M++,K--):B>1&&(W+=B-1,R-=B-1),R--,K--}for(;F<S.length&&k+1<A.length&&!this._isCharWordSeparator(S.loadCell(F+1,this._workCell));){S.loadCell(F+1,this._workCell);var J=this._workCell.getChars().length;this._workCell.getWidth()===2?(G++,F++):J>1&&(N+=J-1,k+=J-1),k++,F++}}k++;var re=R+L-M+W,he=Math.min(this._bufferService.cols,k-R+M+G-W-N);if(b||A.slice(R,k).trim()!==""){if(D&&re===0&&S.getCodePoint(0)!==32){var we=w.lines.get(E[1]-1);if(we&&S.isWrapped&&we.getCodePoint(this._bufferService.cols-1)!==32){var ke=this._getWordAt([this._bufferService.cols-1,E[1]-1],!1,!0,!1);if(ke){var ne=this._bufferService.cols-ke.start;re-=ne,he+=ne}}}if(C&&re+he===this._bufferService.cols&&S.getCodePoint(this._bufferService.cols-1)!==32){var Oe=w.lines.get(E[1]+1);if(Oe&&Oe.isWrapped&&Oe.getCodePoint(0)!==32){var Ce=this._getWordAt([0,E[1]+1],!1,!1,!0);Ce&&(he+=Ce.length)}}return{start:re,length:he}}}}},l.prototype._selectWordAt=function(E,b){var D=this._getWordAt(E,b);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,E[1]--;this._model.selectionStart=[D.start,E[1]],this._model.selectionStartLength=D.length}},l.prototype._selectToWordAt=function(E){var b=this._getWordAt(E,!0);if(b){for(var D=E[1];b.start<0;)b.start+=this._bufferService.cols,D--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,D++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,D]}},l.prototype._isCharWordSeparator=function(E){return E.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(E.getChars())>=0},l.prototype._selectLineAt=function(E){var b=this._bufferService.buffer.getWrappedRangeForLine(E);this._model.selectionStart=[0,b.first],this._model.selectionEnd=[this._bufferService.cols,b.last],this._model.selectionStartLength=0},l=o([g(2,t.IBufferService),g(3,t.ICoreService),g(4,s.IMouseService),g(5,t.IOptionsService),g(6,s.IRenderService)],l)}(r.Disposable);_.SelectionService=f},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.SelectionModel=void 0;var y=function(){function v(o){this._bufferService=o,this.isSelectAllActive=!1,this.selectionStartLength=0}return v.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(v.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(v.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 o=this.selectionStart[0]+this.selectionStartLength;return o>this._bufferService.cols?[o%this._bufferService.cols,this.selectionStart[1]+Math.floor(o/this._bufferService.cols)]:[o,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}),v.prototype.areSelectionValuesReversed=function(){var o=this.selectionStart,g=this.selectionEnd;return!(!o||!g)&&(o[1]>g[1]||o[1]===g[1]&&o[0]>g[0])},v.prototype.onTrim=function(o){return this.selectionStart&&(this.selectionStart[1]-=o),this.selectionEnd&&(this.selectionEnd[1]-=o),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},v}();_.SelectionModel=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.moveToCellSequence=void 0;var y=O(12);function v(n,s,t,i){var e=n-o(t,n),r=s-o(t,s);return a(Math.abs(e-r)-function(c,u,f){for(var m=0,l=c-o(f,c),E=u-o(f,u),b=0;b<Math.abs(l-E);b++){var D=g(c,u)==="A"?-1:1,C=f.buffer.lines.get(l+D*b);C&&C.isWrapped&&m++}return m}(n,s,t),d(g(n,s),i))}function o(n,s){for(var t=0,i=n.buffer.lines.get(s),e=i&&i.isWrapped;e&&s>=0&&s<n.rows;)t++,e=(i=n.buffer.lines.get(--s))&&i.isWrapped;return t}function g(n,s){return n>s?"A":"B"}function p(n,s,t,i,e,r){for(var c=n,u=s,f="";c!==t||u!==i;)c+=e?1:-1,e&&c>r.cols-1?(f+=r.buffer.translateBufferLineToString(u,!1,n,c),c=0,n=0,u++):!e&&c<0&&(f+=r.buffer.translateBufferLineToString(u,!1,0,n+1),n=c=r.cols-1,u--);return f+r.buffer.translateBufferLineToString(u,!1,n,c)}function d(n,s){var t=s?"O":"[";return y.C0.ESC+t+n}function a(n,s){n=Math.floor(n);for(var t="",i=0;i<n;i++)t+=s;return t}_.moveToCellSequence=function(n,s,t,i){var e,r=t.buffer.x,c=t.buffer.y;if(!t.buffer.hasScrollback)return function(f,m,l,E,b,D){return v(m,E,b,D).length===0?"":a(p(f,m,f,m-o(b,m),!1,b).length,d("D",D))}(r,c,0,s,t,i)+v(c,s,t,i)+function(f,m,l,E,b,D){var C;C=v(m,E,b,D).length>0?E-o(b,E):m;var w=E,S=function(A,R,k,L,M,G){var W;return W=v(k,L,M,G).length>0?L-o(M,L):R,A<k&&W<=L||A>=k&&W<L?"C":"D"}(f,m,l,E,b,D);return a(p(f,C,l,w,S==="C",b).length,d(S,D))}(r,c,n,s,t,i);if(c===s)return e=r>n?"D":"C",a(Math.abs(r-n),d(e,i));e=c>s?"D":"C";var u=Math.abs(c-s);return a(function(f,m){return m.cols-f}(c>s?n:r,t)+(u-1)*t.cols+1+((c>s?r:n)-1),d(e,i))}},function(I,_,O){"use strict";var y=this&&this.__decorate||function(p,d,a,n){var s,t=arguments.length,i=t<3?d:n===null?n=Object.getOwnPropertyDescriptor(d,a):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,d,a,n);else for(var e=p.length-1;e>=0;e--)(s=p[e])&&(i=(t<3?s(i):t>3?s(d,a,i):s(d,a))||i);return t>3&&i&&Object.defineProperty(d,a,i),i},v=this&&this.__param||function(p,d){return function(a,n){d(a,n,p)}};Object.defineProperty(_,"__esModule",{value:!0}),_.SoundService=void 0;var o=O(1),g=function(){function p(d){this._optionsService=d}return Object.defineProperty(p,"audioContext",{get:function(){if(!p._audioContext){var d=window.AudioContext||window.webkitAudioContext;if(!d)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;p._audioContext=new d}return p._audioContext},enumerable:!1,configurable:!0}),p.prototype.playBellSound=function(){var d=p.audioContext;if(d){var a=d.createBufferSource();d.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(n){a.buffer=n,a.connect(d.destination),a.start(0)})}},p.prototype._base64ToArrayBuffer=function(d){for(var a=window.atob(d),n=a.length,s=new Uint8Array(n),t=0;t<n;t++)s[t]=a.charCodeAt(t);return s.buffer},p.prototype._removeMimeType=function(d){return d.split(",")[1]},p=y([v(0,o.IOptionsService)],p)}();_.SoundService=g},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),o=this&&this.__decorate||function(t,i,e,r){var c,u=arguments.length,f=u<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,i,e,r);else for(var m=t.length-1;m>=0;m--)(c=t[m])&&(f=(u<3?c(f):u>3?c(i,e,f):c(i,e))||f);return u>3&&f&&Object.defineProperty(i,e,f),f},g=this&&this.__param||function(t,i){return function(e,r){i(e,r,t)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseZoneManager=void 0;var p=O(2),d=O(7),a=O(5),n=O(1),s=function(t){function i(e,r,c,u,f,m){var l=t.call(this)||this;return l._element=e,l._screenElement=r,l._bufferService=c,l._mouseService=u,l._selectionService=f,l._optionsService=m,l._zones=[],l._areZonesActive=!1,l._lastHoverCoords=[void 0,void 0],l._initialSelectionLength=0,l.register(d.addDisposableDomListener(l._element,"mousedown",function(E){return l._onMouseDown(E)})),l._mouseMoveListener=function(E){return l._onMouseMove(E)},l._mouseLeaveListener=function(E){return l._onMouseLeave(E)},l._clickListener=function(E){return l._onClick(E)},l}return v(i,t),i.prototype.dispose=function(){t.prototype.dispose.call(this),this._deactivate()},i.prototype.add=function(e){this._zones.push(e),this._zones.length===1&&this._activate()},i.prototype.clearAll=function(e,r){if(this._zones.length!==0){e&&r||(e=0,r=this._bufferService.rows-1);for(var c=0;c<this._zones.length;c++){var u=this._zones[c];(u.y1>e&&u.y1<=r+1||u.y2>e&&u.y2<=r+1||u.y1<e&&u.y2>r+1)&&(this._currentZone&&this._currentZone===u&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(c--,1))}this._zones.length===0&&this._deactivate()}},i.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))},i.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))},i.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},i.prototype._onHover=function(e){var r=this,c=this._findZoneEventAt(e);c!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),c&&(this._currentZone=c,c.hoverCallback&&c.hoverCallback(e),this._tooltipTimeout=window.setTimeout(function(){return r._onTooltip(e)},this._optionsService.options.linkTooltipHoverDuration)))},i.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var r=this._findZoneEventAt(e);r&&r.tooltipCallback&&r.tooltipCallback(e)},i.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var r=this._findZoneEventAt(e);(r==null?void 0:r.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())}},i.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},i.prototype._onClick=function(e){var r=this._findZoneEventAt(e),c=this._getSelectionLength();r&&c===this._initialSelectionLength&&(r.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},i.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},i.prototype._findZoneEventAt=function(e){var r=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(r)for(var c=r[0],u=r[1],f=0;f<this._zones.length;f++){var m=this._zones[f];if(m.y1===m.y2){if(u===m.y1&&c>=m.x1&&c<m.x2)return m}else if(u===m.y1&&c>=m.x1||u===m.y2&&c<m.x2||u>m.y1&&u<m.y2)return m}},i=o([g(2,n.IBufferService),g(3,a.IMouseService),g(4,a.ISelectionService),g(5,n.IOptionsService)],i)}(p.Disposable);_.MouseZoneManager=s},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(i,e){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,c){r.__proto__=c}||function(r,c){for(var u in c)c.hasOwnProperty(u)&&(r[u]=c[u])})(i,e)},function(i,e){function r(){this.constructor=i}y(i,e),i.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(_,"__esModule",{value:!0}),_.AccessibilityManager=void 0;var o=O(18),g=O(11),p=O(31),d=O(7),a=O(2),n=O(32),s=O(17),t=function(i){function e(r,c){var u=i.call(this)||this;u._terminal=r,u._renderService=c,u._liveRegionLineCount=0,u._charsToConsume=[],u._charsToAnnounce="",u._accessibilityTreeRoot=document.createElement("div"),u._accessibilityTreeRoot.classList.add("xterm-accessibility"),u._rowContainer=document.createElement("div"),u._rowContainer.classList.add("xterm-accessibility-tree"),u._rowContainer.setAttribute("role","list"),u._rowElements=[];for(var f=0;f<u._terminal.rows;f++)u._rowElements[f]=u._createAccessibilityTreeNode(),u._rowContainer.appendChild(u._rowElements[f]);if(u._topBoundaryFocusListener=function(m){return u._onBoundaryFocus(m,0)},u._bottomBoundaryFocusListener=function(m){return u._onBoundaryFocus(m,1)},u._rowElements[0].addEventListener("focus",u._topBoundaryFocusListener),u._rowElements[u._rowElements.length-1].addEventListener("focus",u._bottomBoundaryFocusListener),u._refreshRowsDimensions(),u._accessibilityTreeRoot.appendChild(u._rowContainer),u._renderRowsDebouncer=new p.RenderDebouncer(u._renderRows.bind(u)),u._refreshRows(),u._liveRegion=document.createElement("div"),u._liveRegion.classList.add("live-region"),u._liveRegion.setAttribute("aria-live","assertive"),u._accessibilityTreeRoot.appendChild(u._liveRegion),!u._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return u._terminal.element.insertAdjacentElement("afterbegin",u._accessibilityTreeRoot),u.register(u._renderRowsDebouncer),u.register(u._terminal.onResize(function(m){return u._onResize(m.rows)})),u.register(u._terminal.onRender(function(m){return u._refreshRows(m.start,m.end)})),u.register(u._terminal.onScroll(function(){return u._refreshRows()})),u.register(u._terminal.onA11yChar(function(m){return u._onChar(m)})),u.register(u._terminal.onLineFeed(function(){return u._onChar(`
|
|
|
`)})),u.register(u._terminal.onA11yTab(function(m){return u._onTab(m)})),u.register(u._terminal.onKey(function(m){return u._onKey(m.key)})),u.register(u._terminal.onBlur(function(){return u._clearLiveRegion()})),u.register(u._renderService.onDimensionsChange(function(){return u._refreshRowsDimensions()})),u._screenDprMonitor=new n.ScreenDprMonitor,u.register(u._screenDprMonitor),u._screenDprMonitor.setListener(function(){return u._refreshRowsDimensions()}),u.register(d.addDisposableDomListener(window,"resize",function(){return u._refreshRowsDimensions()})),u}return v(e,i),e.prototype.dispose=function(){i.prototype.dispose.call(this),s.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},e.prototype._onBoundaryFocus=function(r,c){var u=r.target,f=this._rowElements[c===0?1:this._rowElements.length-2];if(u.getAttribute("aria-posinset")!==(c===0?"1":""+this._terminal.buffer.lines.length)&&r.relatedTarget===f){var m,l;if(c===0?(m=u,l=this._rowElements.pop(),this._rowContainer.removeChild(l)):(m=this._rowElements.shift(),l=u,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),l.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){var E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else E=this._createAccessibilityTreeNode(),this._rowElements.push(E),this._rowContainer.appendChild(E);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),r.preventDefault(),r.stopImmediatePropagation()}},e.prototype._onResize=function(r){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>r;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},e.prototype._createAccessibilityTreeNode=function(){var r=document.createElement("div");return r.setAttribute("role","listitem"),r.tabIndex=-1,this._refreshRowDimensions(r),r},e.prototype._onTab=function(r){for(var c=0;c<r;c++)this._onChar(" ")},e.prototype._onChar=function(r){var c=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==r&&(this._charsToAnnounce+=r):this._charsToAnnounce+=r,r===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=o.tooMuchOutput)),g.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){c._accessibilityTreeRoot.appendChild(c._liveRegion)},0))},e.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,g.isMac&&s.removeElementFromParent(this._liveRegion)},e.prototype._onKey=function(r){this._clearLiveRegion(),this._charsToConsume.push(r)},e.prototype._refreshRows=function(r,c){this._renderRowsDebouncer.refresh(r,c,this._terminal.rows)},e.prototype._renderRows=function(r,c){for(var u=this._terminal.buffer,f=u.lines.length.toString(),m=r;m<=c;m++){var l=u.translateBufferLineToString(u.ydisp+m,!0),E=(u.ydisp+m+1).toString(),b=this._rowElements[m];b&&(l.length===0?b.innerHTML=" ":b.textContent=l,b.setAttribute("aria-posinset",E),b.setAttribute("aria-setsize",f))}this._announceCharacters()},e.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var r=0;r<this._terminal.rows;r++)this._refreshRowDimensions(this._rowElements[r])}},e.prototype._refreshRowDimensions=function(r){r.style.height=this._renderService.dimensions.actualCellHeight+"px"},e.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},e}(a.Disposable);_.AccessibilityManager=t},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(u,f){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,l){m.__proto__=l}||function(m,l){for(var E in l)l.hasOwnProperty(E)&&(m[E]=l[E])})(u,f)},function(u,f){function m(){this.constructor=u}y(u,f),u.prototype=f===null?Object.create(f):(m.prototype=f.prototype,new m)}),o=this&&this.__decorate||function(u,f,m,l){var E,b=arguments.length,D=b<3?f:l===null?l=Object.getOwnPropertyDescriptor(f,m):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(u,f,m,l);else for(var C=u.length-1;C>=0;C--)(E=u[C])&&(D=(b<3?E(D):b>3?E(f,m,D):E(f,m))||D);return b>3&&D&&Object.defineProperty(f,m,D),D},g=this&&this.__param||function(u,f){return function(m,l){f(m,l,u)}};Object.defineProperty(_,"__esModule",{value:!0}),_.DomRenderer=void 0;var p=O(58),d=O(9),a=O(2),n=O(5),s=O(1),t=O(0),i=O(10),e=O(17),r=1,c=function(u){function f(m,l,E,b,D,C,w,S,A){var R=u.call(this)||this;return R._colors=m,R._element=l,R._screenElement=E,R._viewportElement=b,R._linkifier=D,R._linkifier2=C,R._charSizeService=w,R._optionsService=S,R._bufferService=A,R._terminalClass=r++,R._rowElements=[],R._rowContainer=document.createElement("div"),R._rowContainer.classList.add("xterm-rows"),R._rowContainer.style.lineHeight="normal",R._rowContainer.setAttribute("aria-hidden","true"),R._refreshRowElements(R._bufferService.cols,R._bufferService.rows),R._selectionContainer=document.createElement("div"),R._selectionContainer.classList.add("xterm-selection"),R._selectionContainer.setAttribute("aria-hidden","true"),R.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},R._updateDimensions(),R._injectCss(),R._rowFactory=new p.DomRendererRowFactory(document,R._optionsService,R._colors),R._element.classList.add("xterm-dom-renderer-owner-"+R._terminalClass),R._screenElement.appendChild(R._rowContainer),R._screenElement.appendChild(R._selectionContainer),R._linkifier.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R._linkifier2.onShowLinkUnderline(function(k){return R._onLinkHover(k)}),R._linkifier2.onHideLinkUnderline(function(k){return R._onLinkLeave(k)}),R}return v(f,u),Object.defineProperty(f.prototype,"onRequestRedraw",{get:function(){return new t.EventEmitter().event},enumerable:!1,configurable:!0}),f.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),e.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),u.prototype.dispose.call(this)},f.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 m=0,l=this._rowElements;m<l.length;m++){var E=l[m];E.style.width=this.dimensions.canvasWidth+"px",E.style.height=this.dimensions.actualCellHeight+"px",E.style.lineHeight=this.dimensions.actualCellHeight+"px",E.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var b=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=b,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},f.prototype.setColors=function(m){this._colors=m,this._injectCss()},f.prototype._injectCss=function(){var m=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var l=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";l+=this._terminalSelector+" span:not(."+p.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+p.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+p.ITALIC_CLASS+" { font-style: italic;}",l+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",l+="@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+"; }}",l+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+p.CURSOR_CLASS+"."+p.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+p.CURSOR_CLASS+"."+p.CURSOR_BLINK_CLASS+":not(."+p.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+p.CURSOR_CLASS+"."+p.CURSOR_BLINK_CLASS+"."+p.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+p.CURSOR_CLASS+"."+p.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+p.CURSOR_CLASS+"."+p.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+p.CURSOR_CLASS+"."+p.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",l+=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(E,b){l+=m._terminalSelector+" .xterm-fg-"+b+" { color: "+E.css+"; }"+m._terminalSelector+" .xterm-bg-"+b+" { background-color: "+E.css+"; }"}),l+=this._terminalSelector+" .xterm-fg-"+d.INVERTED_DEFAULT_COLOR+" { color: "+i.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+d.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=l},f.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},f.prototype._refreshRowElements=function(m,l){for(var E=this._rowElements.length;E<=l;E++){var b=document.createElement("div");this._rowContainer.appendChild(b),this._rowElements.push(b)}for(;this._rowElements.length>l;)this._rowContainer.removeChild(this._rowElements.pop())},f.prototype.onResize=function(m,l){this._refreshRowElements(m,l),this._updateDimensions()},f.prototype.onCharSizeChanged=function(){this._updateDimensions()},f.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},f.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},f.prototype.onSelectionChanged=function(m,l,E){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(m&&l){var b=m[1]-this._bufferService.buffer.ydisp,D=l[1]-this._bufferService.buffer.ydisp,C=Math.max(b,0),w=Math.min(D,this._bufferService.rows-1);if(!(C>=this._bufferService.rows||w<0)){var S=document.createDocumentFragment();if(E)S.appendChild(this._createSelectionElement(C,m[0],l[0],w-C+1));else{var A=b===C?m[0]:0,R=C===w?l[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(C,A,R));var k=w-C-1;if(S.appendChild(this._createSelectionElement(C+1,0,this._bufferService.cols,k)),C!==w){var L=D===w?l[0]:this._bufferService.cols;S.appendChild(this._createSelectionElement(w,0,L))}}this._selectionContainer.appendChild(S)}}},f.prototype._createSelectionElement=function(m,l,E,b){b===void 0&&(b=1);var D=document.createElement("div");return D.style.height=b*this.dimensions.actualCellHeight+"px",D.style.top=m*this.dimensions.actualCellHeight+"px",D.style.left=l*this.dimensions.actualCellWidth+"px",D.style.width=this.dimensions.actualCellWidth*(E-l)+"px",D},f.prototype.onCursorMove=function(){},f.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},f.prototype.clear=function(){for(var m=0,l=this._rowElements;m<l.length;m++)l[m].innerHTML=""},f.prototype.renderRows=function(m,l){for(var E=this._bufferService.buffer.ybase+this._bufferService.buffer.y,b=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),D=this._optionsService.options.cursorBlink,C=m;C<=l;C++){var w=this._rowElements[C];w.innerHTML="";var S=C+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.lines.get(S),R=this._optionsService.options.cursorStyle;w.appendChild(this._rowFactory.createRow(A,S===E,R,b,D,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(f.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),f.prototype.registerCharacterJoiner=function(m){return-1},f.prototype.deregisterCharacterJoiner=function(m){return!1},f.prototype._onLinkHover=function(m){this._setCellUnderline(m.x1,m.x2,m.y1,m.y2,m.cols,!0)},f.prototype._onLinkLeave=function(m){this._setCellUnderline(m.x1,m.x2,m.y1,m.y2,m.cols,!1)},f.prototype._setCellUnderline=function(m,l,E,b,D,C){for(;m!==l||E!==b;){var w=this._rowElements[E];if(!w)return;var S=w.children[m];S&&(S.style.textDecoration=C?"underline":"none"),++m>=D&&(m=0,E++)}},f=o([g(6,n.ICharSizeService),g(7,s.IOptionsService),g(8,s.IBufferService)],f)}(a.Disposable);_.DomRenderer=c},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.DomRendererRowFactory=_.CURSOR_STYLE_UNDERLINE_CLASS=_.CURSOR_STYLE_BAR_CLASS=_.CURSOR_STYLE_BLOCK_CLASS=_.CURSOR_BLINK_CLASS=_.CURSOR_CLASS=_.UNDERLINE_CLASS=_.ITALIC_CLASS=_.DIM_CLASS=_.BOLD_CLASS=void 0;var y=O(9),v=O(3),o=O(4),g=O(10);_.BOLD_CLASS="xterm-bold",_.DIM_CLASS="xterm-dim",_.ITALIC_CLASS="xterm-italic",_.UNDERLINE_CLASS="xterm-underline",_.CURSOR_CLASS="xterm-cursor",_.CURSOR_BLINK_CLASS="xterm-cursor-blink",_.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",_.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",_.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var p=function(){function a(n,s,t){this._document=n,this._optionsService=s,this._colors=t,this._workCell=new o.CellData}return a.prototype.setColors=function(n){this._colors=n},a.prototype.createRow=function(n,s,t,i,e,r,c){for(var u=this._document.createDocumentFragment(),f=0,m=Math.min(n.length,c)-1;m>=0;m--)if(n.loadCell(m,this._workCell).getCode()!==v.NULL_CELL_CODE||s&&m===i){f=m+1;break}for(m=0;m<f;m++){n.loadCell(m,this._workCell);var l=this._workCell.getWidth();if(l!==0){var E=this._document.createElement("span");if(l>1&&(E.style.width=r*l+"px"),s&&m===i)switch(E.classList.add(_.CURSOR_CLASS),e&&E.classList.add(_.CURSOR_BLINK_CLASS),t){case"bar":E.classList.add(_.CURSOR_STYLE_BAR_CLASS);break;case"underline":E.classList.add(_.CURSOR_STYLE_UNDERLINE_CLASS);break;default:E.classList.add(_.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&E.classList.add(_.BOLD_CLASS),this._workCell.isItalic()&&E.classList.add(_.ITALIC_CLASS),this._workCell.isDim()&&E.classList.add(_.DIM_CLASS),this._workCell.isUnderline()&&E.classList.add(_.UNDERLINE_CLASS),this._workCell.isInvisible()?E.textContent=v.WHITESPACE_CELL_CHAR:E.textContent=this._workCell.getChars()||v.WHITESPACE_CELL_CHAR;var b=this._workCell.getFgColor(),D=this._workCell.getFgColorMode(),C=this._workCell.getBgColor(),w=this._workCell.getBgColorMode(),S=!!this._workCell.isInverse();if(S){var A=b;b=C,C=A;var R=D;D=w,w=R}switch(D){case 16777216:case 33554432:this._workCell.isBold()&&b<8&&this._optionsService.options.drawBoldTextInBrightColors&&(b+=8),this._applyMinimumContrast(E,this._colors.background,this._colors.ansi[b])||E.classList.add("xterm-fg-"+b);break;case 50331648:var k=g.rgba.toColor(b>>16&255,b>>8&255,255&b);this._applyMinimumContrast(E,this._colors.background,k)||this._addStyle(E,"color:#"+d(b.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(E,this._colors.background,this._colors.foreground)||S&&E.classList.add("xterm-fg-"+y.INVERTED_DEFAULT_COLOR)}switch(w){case 16777216:case 33554432:E.classList.add("xterm-bg-"+C);break;case 50331648:this._addStyle(E,"background-color:#"+d(C.toString(16),"0",6));break;case 0:default:S&&E.classList.add("xterm-bg-"+y.INVERTED_DEFAULT_COLOR)}u.appendChild(E)}}return u},a.prototype._applyMinimumContrast=function(n,s,t){if(this._optionsService.options.minimumContrastRatio===1)return!1;var i=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return i===void 0&&(i=g.color.ensureContrastRatio(s,t,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,i!=null?i:null)),!!i&&(this._addStyle(n,"color:"+i.css),!0)},a.prototype._addStyle=function(n,s){n.setAttribute("style",""+(n.getAttribute("style")||"")+s+";")},a}();function d(a,n,s){for(;a.length<s;)a=n+a;return a}_.DomRendererRowFactory=p},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.evaluateKeyboardEvent=void 0;var y=O(12),v={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:["'",'"']};_.evaluateKeyboardEvent=function(o,g,p,d){var a={type:0,cancel:!1,key:void 0},n=(o.shiftKey?1:0)|(o.altKey?2:0)|(o.ctrlKey?4:0)|(o.metaKey?8:0);switch(o.keyCode){case 0:o.key==="UIKeyInputUpArrow"?a.key=g?y.C0.ESC+"OA":y.C0.ESC+"[A":o.key==="UIKeyInputLeftArrow"?a.key=g?y.C0.ESC+"OD":y.C0.ESC+"[D":o.key==="UIKeyInputRightArrow"?a.key=g?y.C0.ESC+"OC":y.C0.ESC+"[C":o.key==="UIKeyInputDownArrow"&&(a.key=g?y.C0.ESC+"OB":y.C0.ESC+"[B");break;case 8:if(o.shiftKey){a.key=y.C0.BS;break}if(o.altKey){a.key=y.C0.ESC+y.C0.DEL;break}a.key=y.C0.DEL;break;case 9:if(o.shiftKey){a.key=y.C0.ESC+"[Z";break}a.key=y.C0.HT,a.cancel=!0;break;case 13:a.key=o.altKey?y.C0.ESC+y.C0.CR:y.C0.CR,a.cancel=!0;break;case 27:a.key=y.C0.ESC,o.altKey&&(a.key=y.C0.ESC+y.C0.ESC),a.cancel=!0;break;case 37:if(o.metaKey)break;n?(a.key=y.C0.ESC+"[1;"+(n+1)+"D",a.key===y.C0.ESC+"[1;3D"&&(a.key=y.C0.ESC+(p?"b":"[1;5D"))):a.key=g?y.C0.ESC+"OD":y.C0.ESC+"[D";break;case 39:if(o.metaKey)break;n?(a.key=y.C0.ESC+"[1;"+(n+1)+"C",a.key===y.C0.ESC+"[1;3C"&&(a.key=y.C0.ESC+(p?"f":"[1;5C"))):a.key=g?y.C0.ESC+"OC":y.C0.ESC+"[C";break;case 38:if(o.metaKey)break;n?(a.key=y.C0.ESC+"[1;"+(n+1)+"A",p||a.key!==y.C0.ESC+"[1;3A"||(a.key=y.C0.ESC+"[1;5A")):a.key=g?y.C0.ESC+"OA":y.C0.ESC+"[A";break;case 40:if(o.metaKey)break;n?(a.key=y.C0.ESC+"[1;"+(n+1)+"B",p||a.key!==y.C0.ESC+"[1;3B"||(a.key=y.C0.ESC+"[1;5B")):a.key=g?y.C0.ESC+"OB":y.C0.ESC+"[B";break;case 45:o.shiftKey||o.ctrlKey||(a.key=y.C0.ESC+"[2~");break;case 46:a.key=n?y.C0.ESC+"[3;"+(n+1)+"~":y.C0.ESC+"[3~";break;case 36:a.key=n?y.C0.ESC+"[1;"+(n+1)+"H":g?y.C0.ESC+"OH":y.C0.ESC+"[H";break;case 35:a.key=n?y.C0.ESC+"[1;"+(n+1)+"F":g?y.C0.ESC+"OF":y.C0.ESC+"[F";break;case 33:o.shiftKey?a.type=2:a.key=y.C0.ESC+"[5~";break;case 34:o.shiftKey?a.type=3:a.key=y.C0.ESC+"[6~";break;case 112:a.key=n?y.C0.ESC+"[1;"+(n+1)+"P":y.C0.ESC+"OP";break;case 113:a.key=n?y.C0.ESC+"[1;"+(n+1)+"Q":y.C0.ESC+"OQ";break;case 114:a.key=n?y.C0.ESC+"[1;"+(n+1)+"R":y.C0.ESC+"OR";break;case 115:a.key=n?y.C0.ESC+"[1;"+(n+1)+"S":y.C0.ESC+"OS";break;case 116:a.key=n?y.C0.ESC+"[15;"+(n+1)+"~":y.C0.ESC+"[15~";break;case 117:a.key=n?y.C0.ESC+"[17;"+(n+1)+"~":y.C0.ESC+"[17~";break;case 118:a.key=n?y.C0.ESC+"[18;"+(n+1)+"~":y.C0.ESC+"[18~";break;case 119:a.key=n?y.C0.ESC+"[19;"+(n+1)+"~":y.C0.ESC+"[19~";break;case 120:a.key=n?y.C0.ESC+"[20;"+(n+1)+"~":y.C0.ESC+"[20~";break;case 121:a.key=n?y.C0.ESC+"[21;"+(n+1)+"~":y.C0.ESC+"[21~";break;case 122:a.key=n?y.C0.ESC+"[23;"+(n+1)+"~":y.C0.ESC+"[23~";break;case 123:a.key=n?y.C0.ESC+"[24;"+(n+1)+"~":y.C0.ESC+"[24~";break;default:if(!o.ctrlKey||o.shiftKey||o.altKey||o.metaKey)if(p&&!d||!o.altKey||o.metaKey)p&&!o.altKey&&!o.ctrlKey&&o.metaKey?o.keyCode===65&&(a.type=1):o.key&&!o.ctrlKey&&!o.altKey&&!o.metaKey&&o.keyCode>=48&&o.key.length===1?a.key=o.key:o.key&&o.ctrlKey&&o.key==="_"&&(a.key=y.C0.US);else{var s=v[o.keyCode],t=s&&s[o.shiftKey?1:0];if(t)a.key=y.C0.ESC+t;else if(o.keyCode>=65&&o.keyCode<=90){var i=o.ctrlKey?o.keyCode-64:o.keyCode+32;a.key=y.C0.ESC+String.fromCharCode(i)}}else o.keyCode>=65&&o.keyCode<=90?a.key=String.fromCharCode(o.keyCode-64):o.keyCode===32?a.key=y.C0.NUL:o.keyCode>=51&&o.keyCode<=55?a.key=String.fromCharCode(o.keyCode-51+27):o.keyCode===56?a.key=y.C0.DEL:o.keyCode===219?a.key=y.C0.ESC:o.keyCode===220?a.key=y.C0.FS:o.keyCode===221&&(a.key=y.C0.GS)}return a}},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(r,c){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var m in f)f.hasOwnProperty(m)&&(u[m]=f[m])})(r,c)},function(r,c){function u(){this.constructor=r}y(r,c),r.prototype=c===null?Object.create(c):(u.prototype=c.prototype,new u)}),o=this&&this.__decorate||function(r,c,u,f){var m,l=arguments.length,E=l<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,u):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(r,c,u,f);else for(var b=r.length-1;b>=0;b--)(m=r[b])&&(E=(l<3?m(E):l>3?m(c,u,E):m(c,u))||E);return l>3&&E&&Object.defineProperty(c,u,E),E},g=this&&this.__param||function(r,c){return function(u,f){c(u,f,r)}};Object.defineProperty(_,"__esModule",{value:!0}),_.RenderService=void 0;var p=O(31),d=O(0),a=O(2),n=O(32),s=O(7),t=O(1),i=O(5),e=function(r){function c(u,f,m,l,E,b){var D=r.call(this)||this;if(D._renderer=u,D._rowCount=f,D._isPaused=!1,D._needsFullRefresh=!1,D._isNextRenderRedrawOnly=!0,D._needsSelectionRefresh=!1,D._canvasWidth=0,D._canvasHeight=0,D._selectionState={start:void 0,end:void 0,columnSelectMode:!1},D._onDimensionsChange=new d.EventEmitter,D._onRender=new d.EventEmitter,D._onRefreshRequest=new d.EventEmitter,D.register({dispose:function(){return D._renderer.dispose()}}),D._renderDebouncer=new p.RenderDebouncer(function(w,S){return D._renderRows(w,S)}),D.register(D._renderDebouncer),D._screenDprMonitor=new n.ScreenDprMonitor,D._screenDprMonitor.setListener(function(){return D.onDevicePixelRatioChange()}),D.register(D._screenDprMonitor),D.register(b.onResize(function(w){return D._fullRefresh()})),D.register(l.onOptionChange(function(){return D._renderer.onOptionsChanged()})),D.register(E.onCharSizeChange(function(){return D.onCharSizeChanged()})),D._renderer.onRequestRedraw(function(w){return D.refreshRows(w.start,w.end,!0)}),D.register(s.addDisposableDomListener(window,"resize",function(){return D.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var C=new IntersectionObserver(function(w){return D._onIntersectionChange(w[w.length-1])},{threshold:0});C.observe(m),D.register({dispose:function(){return C.disconnect()}})}return D}return v(c,r),Object.defineProperty(c.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),c.prototype._onIntersectionChange=function(u){this._isPaused=u.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},c.prototype.refreshRows=function(u,f,m){m===void 0&&(m=!1),this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(u,f,this._rowCount))},c.prototype._renderRows=function(u,f){this._renderer.renderRows(u,f),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:u,end:f}),this._isNextRenderRedrawOnly=!0},c.prototype.resize=function(u,f){this._rowCount=f,this._fireOnCanvasResize()},c.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},c.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},c.prototype.dispose=function(){r.prototype.dispose.call(this)},c.prototype.setRenderer=function(u){var f=this;this._renderer.dispose(),this._renderer=u,this._renderer.onRequestRedraw(function(m){return f.refreshRows(m.start,m.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},c.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},c.prototype.setColors=function(u){this._renderer.setColors(u),this._fullRefresh()},c.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},c.prototype.onResize=function(u,f){this._renderer.onResize(u,f),this._fullRefresh()},c.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},c.prototype.onBlur=function(){this._renderer.onBlur()},c.prototype.onFocus=function(){this._renderer.onFocus()},c.prototype.onSelectionChanged=function(u,f,m){this._selectionState.start=u,this._selectionState.end=f,this._selectionState.columnSelectMode=m,this._renderer.onSelectionChanged(u,f,m)},c.prototype.onCursorMove=function(){this._renderer.onCursorMove()},c.prototype.clear=function(){this._renderer.clear()},c.prototype.registerCharacterJoiner=function(u){return this._renderer.registerCharacterJoiner(u)},c.prototype.deregisterCharacterJoiner=function(u){return this._renderer.deregisterCharacterJoiner(u)},c=o([g(3,t.IOptionsService),g(4,i.ICharSizeService),g(5,t.IBufferService)],c)}(a.Disposable);_.RenderService=e},function(I,_,O){"use strict";var y=this&&this.__decorate||function(a,n,s,t){var i,e=arguments.length,r=e<3?n:t===null?t=Object.getOwnPropertyDescriptor(n,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(a,n,s,t);else for(var c=a.length-1;c>=0;c--)(i=a[c])&&(r=(e<3?i(r):e>3?i(n,s,r):i(n,s))||r);return e>3&&r&&Object.defineProperty(n,s,r),r},v=this&&this.__param||function(a,n){return function(s,t){n(s,t,a)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CharSizeService=void 0;var o=O(1),g=O(0),p=function(){function a(n,s,t){this._optionsService=t,this.width=0,this.height=0,this._onCharSizeChange=new g.EventEmitter,this._measureStrategy=new d(n,s,this._optionsService)}return Object.defineProperty(a.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),a.prototype.measure=function(){var n=this._measureStrategy.measure();n.width===this.width&&n.height===this.height||(this.width=n.width,this.height=n.height,this._onCharSizeChange.fire())},a=y([v(2,o.IOptionsService)],a)}();_.CharSizeService=p;var d=function(){function a(n,s,t){this._document=n,this._parentElement=s,this._optionsService=t,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 a.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var n=this._measureElement.getBoundingClientRect();return n.width!==0&&n.height!==0&&(this._result.width=n.width,this._result.height=Math.ceil(n.height)),this._result},a}()},function(I,_,O){"use strict";var y=this&&this.__decorate||function(d,a,n,s){var t,i=arguments.length,e=i<3?a:s===null?s=Object.getOwnPropertyDescriptor(a,n):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(d,a,n,s);else for(var r=d.length-1;r>=0;r--)(t=d[r])&&(e=(i<3?t(e):i>3?t(a,n,e):t(a,n))||e);return i>3&&e&&Object.defineProperty(a,n,e),e},v=this&&this.__param||function(d,a){return function(n,s){a(n,s,d)}};Object.defineProperty(_,"__esModule",{value:!0}),_.MouseService=void 0;var o=O(5),g=O(30),p=function(){function d(a,n){this._renderService=a,this._charSizeService=n}return d.prototype.getCoords=function(a,n,s,t,i){return g.getCoords(a,n,s,t,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,i)},d.prototype.getRawByteCoords=function(a,n,s,t){var i=this.getCoords(a,n,s,t);return g.getRawByteCoords(i)},d=y([v(0,o.IRenderService),v(1,o.ICharSizeService)],d)}();_.MouseService=p},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),o=this&&this.__decorate||function(t,i,e,r){var c,u=arguments.length,f=u<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,i,e,r);else for(var m=t.length-1;m>=0;m--)(c=t[m])&&(f=(u<3?c(f):u>3?c(i,e,f):c(i,e))||f);return u>3&&f&&Object.defineProperty(i,e,f),f},g=this&&this.__param||function(t,i){return function(e,r){i(e,r,t)}};Object.defineProperty(_,"__esModule",{value:!0}),_.Linkifier2=void 0;var p=O(1),d=O(0),a=O(2),n=O(7),s=function(t){function i(e){var r=t.call(this)||this;return r._bufferService=e,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new d.EventEmitter),r._onHideLinkUnderline=r.register(new d.EventEmitter),r.register(a.getDisposeArrayDisposable(r._linkCacheDisposables)),r}return v(i,t),Object.defineProperty(i.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),i.prototype.registerLinkProvider=function(e){var r=this;return this._linkProviders.push(e),{dispose:function(){var c=r._linkProviders.indexOf(e);c!==-1&&r._linkProviders.splice(c,1)}}},i.prototype.attachToDom=function(e,r,c){var u=this;this._element=e,this._mouseService=r,this._renderService=c,this.register(n.addDisposableDomListener(this._element,"mouseleave",function(){u._isMouseOut=!0,u._clearCurrentLink()})),this.register(n.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(n.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},i.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);if(r){this._isMouseOut=!1;for(var c=e.composedPath(),u=0;u<c.length;u++){var f=c[u];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&r.x===this._lastBufferCell.x&&r.y===this._lastBufferCell.y||(this._onHover(r),this._lastBufferCell=r)}}},i.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))},i.prototype._askForLink=function(e,r){var c=this;this._activeProviderReplies&&r||(this._activeProviderReplies=new Map,this._activeLine=e.y);var u=!1;this._linkProviders.forEach(function(f,m){var l;r?((l=c._activeProviderReplies)===null||l===void 0?void 0:l.get(m))&&(u=c._checkLinkProviderResult(m,e,u)):f.provideLinks(e.y,function(E){var b,D;if(!c._isMouseOut){var C=E==null?void 0:E.map(function(w){return{link:w}});(b=c._activeProviderReplies)===null||b===void 0||b.set(m,C),u=c._checkLinkProviderResult(m,e,u),((D=c._activeProviderReplies)===null||D===void 0?void 0:D.size)===c._linkProviders.length&&c._removeIntersectingLinks(e.y,c._activeProviderReplies)}})})},i.prototype._removeIntersectingLinks=function(e,r){for(var c=new Set,u=0;u<r.size;u++){var f=r.get(u);if(f)for(var m=0;m<f.length;m++)for(var l=f[m],E=l.link.range.start.y<e?0:l.link.range.start.x,b=l.link.range.end.y>e?this._bufferService.cols:l.link.range.end.x,D=E;D<=b;D++){if(c.has(D)){f.splice(m--,1);break}c.add(D)}}},i.prototype._checkLinkProviderResult=function(e,r,c){var u,f=this;if(!this._activeProviderReplies)return c;for(var m=this._activeProviderReplies.get(e),l=!1,E=0;E<e;E++)this._activeProviderReplies.has(E)&&!this._activeProviderReplies.get(E)||(l=!0);if(!l&&m){var b=m.find(function(C){return f._linkAtPosition(C.link,r)});b&&(c=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviders.length&&!c)for(E=0;E<this._activeProviderReplies.size;E++){var D=(u=this._activeProviderReplies.get(E))===null||u===void 0?void 0:u.find(function(C){return f._linkAtPosition(C.link,r)});if(D){c=!0,this._handleNewLink(D);break}}return c},i.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},i.prototype._clearCurrentLink=function(e,r){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!r||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=r)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,a.disposeArray(this._linkCacheDisposables))},i.prototype._handleNewLink=function(e){var r=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var c=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);c&&this._linkAtPosition(e.link,c)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||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 u,f;return(f=(u=r._currentLink)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.decorations.pointerCursor},set:function(u){var f,m;((f=r._currentLink)===null||f===void 0?void 0:f.state)&&r._currentLink.state.decorations.pointerCursor!==u&&(r._currentLink.state.decorations.pointerCursor=u,r._currentLink.state.isHovered&&((m=r._element)===null||m===void 0||m.classList.toggle("xterm-cursor-pointer",u)))}},underline:{get:function(){var u,f;return(f=(u=r._currentLink)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.decorations.underline},set:function(u){var f,m,l;((f=r._currentLink)===null||f===void 0?void 0:f.state)&&((l=(m=r._currentLink)===null||m===void 0?void 0:m.state)===null||l===void 0?void 0:l.decorations.underline)!==u&&(r._currentLink.state.decorations.underline=u,r._currentLink.state.isHovered&&r._fireUnderlineEvent(e.link,u))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(u){var f=u.start===0?0:u.start+1+r._bufferService.buffer.ydisp;r._clearCurrentLink(f,u.end+1+r._bufferService.buffer.ydisp)})))}},i.prototype._linkHover=function(e,r,c){var u;((u=this._currentLink)===null||u===void 0?void 0:u.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),r.hover&&r.hover(c,r.text)},i.prototype._fireUnderlineEvent=function(e,r){var c=e.range,u=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-u-1,c.end.x,c.end.y-u-1,void 0);(r?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)},i.prototype._linkLeave=function(e,r,c){var u;((u=this._currentLink)===null||u===void 0?void 0:u.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(r,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),r.leave&&r.leave(c,r.text)},i.prototype._linkAtPosition=function(e,r){var c=e.range.start.y===e.range.end.y,u=e.range.start.y<r.y,f=e.range.end.y>r.y;return(c&&e.range.start.x<=r.x&&e.range.end.x>=r.x||u&&e.range.end.x>=r.x||f&&e.range.start.x<=r.x||u&&f)&&e.range.start.y<=r.y&&e.range.end.y>=r.y},i.prototype._positionFromMouseEvent=function(e,r,c){var u=c.getCoords(e,r,this._bufferService.cols,this._bufferService.rows);if(u)return{x:u[0],y:u[1]+this._bufferService.buffer.ydisp}},i.prototype._createLinkUnderlineEvent=function(e,r,c,u,f){return{x1:e,y1:r,x2:c,y2:u,cols:this._bufferService.cols,fg:f}},i=o([g(0,p.IBufferService)],i)}(a.Disposable);_.Linkifier2=s},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CoreBrowserService=void 0;var y=function(){function v(o){this._textarea=o}return Object.defineProperty(v.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),v}();_.CoreBrowserService=y},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(E,b){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,C){D.__proto__=C}||function(D,C){for(var w in C)C.hasOwnProperty(w)&&(D[w]=C[w])})(E,b)},function(E,b){function D(){this.constructor=E}y(E,b),E.prototype=b===null?Object.create(b):(D.prototype=b.prototype,new D)});Object.defineProperty(_,"__esModule",{value:!0}),_.CoreTerminal=void 0;var o=O(2),g=O(1),p=O(66),d=O(67),a=O(68),n=O(74),s=O(75),t=O(0),i=O(76),e=O(77),r=O(78),c=O(80),u=O(81),f=O(19),m=O(82),l=function(E){function b(D){var C=E.call(this)||this;return C._onBinary=new t.EventEmitter,C._onData=new t.EventEmitter,C._onLineFeed=new t.EventEmitter,C._onResize=new t.EventEmitter,C._onScroll=new t.EventEmitter,C._instantiationService=new p.InstantiationService,C.optionsService=new n.OptionsService(D),C._instantiationService.setService(g.IOptionsService,C.optionsService),C._bufferService=C.register(C._instantiationService.createInstance(a.BufferService)),C._instantiationService.setService(g.IBufferService,C._bufferService),C._logService=C._instantiationService.createInstance(d.LogService),C._instantiationService.setService(g.ILogService,C._logService),C._coreService=C.register(C._instantiationService.createInstance(s.CoreService,function(){return C.scrollToBottom()})),C._instantiationService.setService(g.ICoreService,C._coreService),C._coreMouseService=C._instantiationService.createInstance(i.CoreMouseService),C._instantiationService.setService(g.ICoreMouseService,C._coreMouseService),C._dirtyRowService=C._instantiationService.createInstance(e.DirtyRowService),C._instantiationService.setService(g.IDirtyRowService,C._dirtyRowService),C.unicodeService=C._instantiationService.createInstance(r.UnicodeService),C._instantiationService.setService(g.IUnicodeService,C.unicodeService),C._charsetService=C._instantiationService.createInstance(c.CharsetService),C._instantiationService.setService(g.ICharsetService,C._charsetService),C._inputHandler=new f.InputHandler(C._bufferService,C._charsetService,C._coreService,C._dirtyRowService,C._logService,C.optionsService,C._coreMouseService,C.unicodeService),C.register(t.forwardEvent(C._inputHandler.onLineFeed,C._onLineFeed)),C.register(C._inputHandler),C.register(t.forwardEvent(C._bufferService.onResize,C._onResize)),C.register(t.forwardEvent(C._coreService.onData,C._onData)),C.register(t.forwardEvent(C._coreService.onBinary,C._onBinary)),C.register(C.optionsService.onOptionChange(function(w){return C._updateOptions(w)})),C._writeBuffer=new m.WriteBuffer(function(w){return C._inputHandler.parse(w)}),C}return v(b,E),Object.defineProperty(b.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),b.prototype.dispose=function(){var D;this._isDisposed||(E.prototype.dispose.call(this),(D=this._windowsMode)===null||D===void 0||D.dispose(),this._windowsMode=void 0)},b.prototype.write=function(D,C){this._writeBuffer.write(D,C)},b.prototype.writeSync=function(D){this._writeBuffer.writeSync(D)},b.prototype.resize=function(D,C){isNaN(D)||isNaN(C)||(D=Math.max(D,a.MINIMUM_COLS),C=Math.max(C,a.MINIMUM_ROWS),this._bufferService.resize(D,C))},b.prototype.scroll=function(D,C){C===void 0&&(C=!1);var w,S=this._bufferService.buffer;(w=this._cachedBlankLine)&&w.length===this.cols&&w.getFg(0)===D.fg&&w.getBg(0)===D.bg||(w=S.getBlankLine(D,C),this._cachedBlankLine=w),w.isWrapped=C;var A=S.ybase+S.scrollTop,R=S.ybase+S.scrollBottom;if(S.scrollTop===0){var k=S.lines.isFull;R===S.lines.length-1?k?S.lines.recycle().copyFrom(w):S.lines.push(w.clone()):S.lines.splice(R+1,0,w.clone()),k?this._bufferService.isUserScrolling&&(S.ydisp=Math.max(S.ydisp-1,0)):(S.ybase++,this._bufferService.isUserScrolling||S.ydisp++)}else{var L=R-A+1;S.lines.shiftElements(A+1,L-1,-1),S.lines.set(R,w.clone())}this._bufferService.isUserScrolling||(S.ydisp=S.ybase),this._dirtyRowService.markRangeDirty(S.scrollTop,S.scrollBottom),this._onScroll.fire(S.ydisp)},b.prototype.scrollLines=function(D,C){var w=this._bufferService.buffer;if(D<0){if(w.ydisp===0)return;this._bufferService.isUserScrolling=!0}else D+w.ydisp>=w.ybase&&(this._bufferService.isUserScrolling=!1);var S=w.ydisp;w.ydisp=Math.max(Math.min(w.ydisp+D,w.ybase),0),S!==w.ydisp&&(C||this._onScroll.fire(w.ydisp))},b.prototype.scrollPages=function(D){this.scrollLines(D*(this.rows-1))},b.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},b.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},b.prototype.scrollToLine=function(D){var C=D-this._bufferService.buffer.ydisp;C!==0&&this.scrollLines(C)},b.prototype.addEscHandler=function(D,C){return this._inputHandler.addEscHandler(D,C)},b.prototype.addDcsHandler=function(D,C){return this._inputHandler.addDcsHandler(D,C)},b.prototype.addCsiHandler=function(D,C){return this._inputHandler.addCsiHandler(D,C)},b.prototype.addOscHandler=function(D,C){return this._inputHandler.addOscHandler(D,C)},b.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},b.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},b.prototype._updateOptions=function(D){var C;switch(D){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((C=this._windowsMode)===null||C===void 0||C.dispose(),this._windowsMode=void 0)}},b.prototype._enableWindowsMode=function(){var D=this;if(!this._windowsMode){var C=[];C.push(this.onLineFeed(u.updateWindowsModeWrappedState.bind(null,this._bufferService))),C.push(this.addCsiHandler({final:"H"},function(){return u.updateWindowsModeWrappedState(D._bufferService),!1})),this._windowsMode={dispose:function(){for(var w=0,S=C;w<S.length;w++)S[w].dispose()}}}},b}(o.Disposable);_.CoreTerminal=l},function(I,_,O){"use strict";var y=this&&this.__spreadArrays||function(){for(var d=0,a=0,n=arguments.length;a<n;a++)d+=arguments[a].length;var s=Array(d),t=0;for(a=0;a<n;a++)for(var i=arguments[a],e=0,r=i.length;e<r;e++,t++)s[t]=i[e];return s};Object.defineProperty(_,"__esModule",{value:!0}),_.InstantiationService=_.ServiceCollection=void 0;var v=O(1),o=O(14),g=function(){function d(){for(var a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];this._entries=new Map;for(var s=0,t=a;s<t.length;s++){var i=t[s],e=i[0],r=i[1];this.set(e,r)}}return d.prototype.set=function(a,n){var s=this._entries.get(a);return this._entries.set(a,n),s},d.prototype.forEach=function(a){this._entries.forEach(function(n,s){return a(s,n)})},d.prototype.has=function(a){return this._entries.has(a)},d.prototype.get=function(a){return this._entries.get(a)},d}();_.ServiceCollection=g;var p=function(){function d(){this._services=new g,this._services.set(v.IInstantiationService,this)}return d.prototype.setService=function(a,n){this._services.set(a,n)},d.prototype.getService=function(a){return this._services.get(a)},d.prototype.createInstance=function(a){for(var n=[],s=1;s<arguments.length;s++)n[s-1]=arguments[s];for(var t=o.getServiceDependencies(a).sort(function(m,l){return m.index-l.index}),i=[],e=0,r=t;e<r.length;e++){var c=r[e],u=this._services.get(c.id);if(!u)throw new Error("[createInstance] "+a.name+" depends on UNKNOWN service "+c.id+".");i.push(u)}var f=t.length>0?t[0].index:n.length;if(n.length!==f)throw new Error("[createInstance] First service dependency of "+a.name+" at position "+(f+1)+" conflicts with "+n.length+" static arguments");return new(a.bind.apply(a,y([void 0],y(n,i))))},d}();_.InstantiationService=p},function(I,_,O){"use strict";var y=this&&this.__decorate||function(n,s,t,i){var e,r=arguments.length,c=r<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(n,s,t,i);else for(var u=n.length-1;u>=0;u--)(e=n[u])&&(c=(r<3?e(c):r>3?e(s,t,c):e(s,t))||c);return r>3&&c&&Object.defineProperty(s,t,c),c},v=this&&this.__param||function(n,s){return function(t,i){s(t,i,n)}},o=this&&this.__spreadArrays||function(){for(var n=0,s=0,t=arguments.length;s<t;s++)n+=arguments[s].length;var i=Array(n),e=0;for(s=0;s<t;s++)for(var r=arguments[s],c=0,u=r.length;c<u;c++,e++)i[e]=r[c];return i};Object.defineProperty(_,"__esModule",{value:!0}),_.LogService=_.LogLevel=void 0;var g,p=O(1);!function(n){n[n.DEBUG=0]="DEBUG",n[n.INFO=1]="INFO",n[n.WARN=2]="WARN",n[n.ERROR=3]="ERROR",n[n.OFF=4]="OFF"}(g=_.LogLevel||(_.LogLevel={}));var d={debug:g.DEBUG,info:g.INFO,warn:g.WARN,error:g.ERROR,off:g.OFF},a=function(){function n(s){var t=this;this._optionsService=s,this._updateLogLevel(),this._optionsService.onOptionChange(function(i){i==="logLevel"&&t._updateLogLevel()})}return n.prototype._updateLogLevel=function(){this._logLevel=d[this._optionsService.options.logLevel]},n.prototype._evalLazyOptionalParams=function(s){for(var t=0;t<s.length;t++)typeof s[t]=="function"&&(s[t]=s[t]())},n.prototype._log=function(s,t,i){this._evalLazyOptionalParams(i),s.call.apply(s,o([console,"xterm.js: "+t],i))},n.prototype.debug=function(s){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this._logLevel<=g.DEBUG&&this._log(console.log,s,t)},n.prototype.info=function(s){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this._logLevel<=g.INFO&&this._log(console.info,s,t)},n.prototype.warn=function(s){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this._logLevel<=g.WARN&&this._log(console.warn,s,t)},n.prototype.error=function(s){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];this._logLevel<=g.ERROR&&this._log(console.error,s,t)},n=y([v(0,p.IOptionsService)],n)}();_.LogService=a},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(t,i){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var c in r)r.hasOwnProperty(c)&&(e[c]=r[c])})(t,i)},function(t,i){function e(){this.constructor=t}y(t,i),t.prototype=i===null?Object.create(i):(e.prototype=i.prototype,new e)}),o=this&&this.__decorate||function(t,i,e,r){var c,u=arguments.length,f=u<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,i,e,r);else for(var m=t.length-1;m>=0;m--)(c=t[m])&&(f=(u<3?c(f):u>3?c(i,e,f):c(i,e))||f);return u>3&&f&&Object.defineProperty(i,e,f),f},g=this&&this.__param||function(t,i){return function(e,r){i(e,r,t)}};Object.defineProperty(_,"__esModule",{value:!0}),_.BufferService=_.MINIMUM_ROWS=_.MINIMUM_COLS=void 0;var p=O(1),d=O(69),a=O(0),n=O(2);_.MINIMUM_COLS=2,_.MINIMUM_ROWS=1;var s=function(t){function i(e){var r=t.call(this)||this;return r._optionsService=e,r.isUserScrolling=!1,r._onResize=new a.EventEmitter,r.cols=Math.max(e.options.cols,_.MINIMUM_COLS),r.rows=Math.max(e.options.rows,_.MINIMUM_ROWS),r.buffers=new d.BufferSet(e,r),r}return v(i,t),Object.defineProperty(i.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),i.prototype.dispose=function(){t.prototype.dispose.call(this),this.buffers.dispose()},i.prototype.resize=function(e,r){this.cols=e,this.rows=r,this.buffers.resize(e,r),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:r})},i.prototype.reset=function(){this.buffers.dispose(),this.buffers=new d.BufferSet(this._optionsService,this),this.isUserScrolling=!1},i=o([g(0,p.IOptionsService)],i)}(n.Disposable);_.BufferService=s},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(d,a){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var t in s)s.hasOwnProperty(t)&&(n[t]=s[t])})(d,a)},function(d,a){function n(){this.constructor=d}y(d,a),d.prototype=a===null?Object.create(a):(n.prototype=a.prototype,new n)});Object.defineProperty(_,"__esModule",{value:!0}),_.BufferSet=void 0;var o=O(70),g=O(0),p=function(d){function a(n,s){var t=d.call(this)||this;return t._onBufferActivate=t.register(new g.EventEmitter),t._normal=new o.Buffer(!0,n,s),t._normal.fillViewportRows(),t._alt=new o.Buffer(!1,n,s),t._activeBuffer=t._normal,t.setupTabStops(),t}return v(a,d),Object.defineProperty(a.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),a.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}))},a.prototype.activateAltBuffer=function(n){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(n),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}))},a.prototype.resize=function(n,s){this._normal.resize(n,s),this._alt.resize(n,s)},a.prototype.setupTabStops=function(n){this._normal.setupTabStops(n),this._alt.setupTabStops(n)},a}(O(2).Disposable);_.BufferSet=p},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.BufferStringIterator=_.Buffer=_.MAX_BUFFER_SIZE=void 0;var y=O(71),v=O(16),o=O(4),g=O(3),p=O(72),d=O(73),a=O(20),n=O(6);_.MAX_BUFFER_SIZE=4294967295;var s=function(){function i(e,r,c){this._hasScrollback=e,this._optionsService=r,this._bufferService=c,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=o.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=o.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return i.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 n.ExtendedAttrs),this._nullCell},i.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 n.ExtendedAttrs),this._whitespaceCell},i.prototype.getBlankLine=function(e,r){return new v.BufferLine(this._bufferService.cols,this.getNullCell(e),r)},Object.defineProperty(i.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),i.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.options.scrollback;return r>_.MAX_BUFFER_SIZE?_.MAX_BUFFER_SIZE:r},i.prototype.fillViewportRows=function(e){if(this.lines.length===0){e===void 0&&(e=v.DEFAULT_ATTR_DATA);for(var r=this._rows;r--;)this.lines.push(this.getBlankLine(e))}},i.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new y.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},i.prototype.resize=function(e,r){var c=this.getNullCell(v.DEFAULT_ATTR_DATA),u=this._getCorrectBufferLength(r);if(u>this.lines.maxLength&&(this.lines.maxLength=u),this.lines.length>0){if(this._cols<e)for(var f=0;f<this.lines.length;f++)this.lines.get(f).resize(e,c);var m=0;if(this._rows<r)for(var l=this._rows;l<r;l++)this.lines.length<r+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new v.BufferLine(e,c)):this.ybase>0&&this.lines.length<=this.ybase+this.y+m+1?(this.ybase--,m++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(e,c)));else for(l=this._rows;l>r;l--)this.lines.length>r+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(u<this.lines.maxLength){var E=this.lines.length-u;E>0&&(this.lines.trimStart(E),this.ybase=Math.max(this.ybase-E,0),this.ydisp=Math.max(this.ydisp-E,0),this.savedY=Math.max(this.savedY-E,0)),this.lines.maxLength=u}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,r-1),m&&(this.y+=m),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=r-1,this._isReflowEnabled&&(this._reflow(e,r),this._cols>e))for(f=0;f<this.lines.length;f++)this.lines.get(f).resize(e,c);this._cols=e,this._rows=r},Object.defineProperty(i.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),i.prototype._reflow=function(e,r){this._cols!==e&&(e>this._cols?this._reflowLarger(e,r):this._reflowSmaller(e,r))},i.prototype._reflowLarger=function(e,r){var c=p.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(c.length>0){var u=p.reflowLargerCreateNewLayout(this.lines,c);p.reflowLargerApplyNewLayout(this.lines,u.layout),this._reflowLargerAdjustViewport(e,r,u.countRemoved)}},i.prototype._reflowLargerAdjustViewport=function(e,r,c){for(var u=this.getNullCell(v.DEFAULT_ATTR_DATA),f=c;f-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<r&&this.lines.push(new v.BufferLine(e,u))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-c,0)},i.prototype._reflowSmaller=function(e,r){for(var c=this.getNullCell(v.DEFAULT_ATTR_DATA),u=[],f=0,m=this.lines.length-1;m>=0;m--){var l=this.lines.get(m);if(!(!l||!l.isWrapped&&l.getTrimmedLength()<=e)){for(var E=[l];l.isWrapped&&m>0;)l=this.lines.get(--m),E.unshift(l);var b=this.ybase+this.y;if(!(b>=m&&b<m+E.length)){var D=E[E.length-1].getTrimmedLength(),C=p.reflowSmallerGetNewLineLengths(E,this._cols,e),w=C.length-E.length,S=void 0;S=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+w):Math.max(0,this.lines.length-this.lines.maxLength+w);for(var A=[],R=0;R<w;R++){var k=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);A.push(k)}A.length>0&&(u.push({start:m+E.length+f,newLines:A}),f+=A.length),E.push.apply(E,A);var L=C.length-1,M=C[L];M===0&&(M=C[--L]);for(var G=E.length-w-1,W=D;G>=0;){var N=Math.min(W,M);if(E[L].copyCellsFrom(E[G],W-N,M-N,N,!0),(M-=N)===0&&(M=C[--L]),(W-=N)===0){G--;var K=Math.max(G,0);W=p.getWrappedLineTrimmedLength(E,K,this._cols)}}for(R=0;R<E.length;R++)C[R]<e&&E[R].setCell(C[R],c);for(var F=w-S;F-- >0;)this.ybase===0?this.y<r-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+f)-r&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+w,this.ybase+r-1)}}}if(u.length>0){var P=[],B=[];for(R=0;R<this.lines.length;R++)B.push(this.lines.get(R));var J=this.lines.length,re=J-1,he=0,we=u[he];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+f);var ke=0;for(R=Math.min(this.lines.maxLength-1,J+f-1);R>=0;R--)if(we&&we.start>re+ke){for(var ne=we.newLines.length-1;ne>=0;ne--)this.lines.set(R--,we.newLines[ne]);R++,P.push({index:re+1,amount:we.newLines.length}),ke+=we.newLines.length,we=u[++he]}else this.lines.set(R,B[re--]);var Oe=0;for(R=P.length-1;R>=0;R--)P[R].index+=Oe,this.lines.onInsertEmitter.fire(P[R]),Oe+=P[R].amount;var Ce=Math.max(0,J+f-this.lines.maxLength);Ce>0&&this.lines.onTrimEmitter.fire(Ce)}},i.prototype.stringIndexToBufferIndex=function(e,r,c){for(c===void 0&&(c=!1);r;){var u=this.lines.get(e);if(!u)return[-1,-1];for(var f=c?u.getTrimmedLength():u.length,m=0;m<f;++m)if(u.get(m)[g.CHAR_DATA_WIDTH_INDEX]&&(r-=u.get(m)[g.CHAR_DATA_CHAR_INDEX].length||1),r<0)return[e,m];e++}return[e,0]},i.prototype.translateBufferLineToString=function(e,r,c,u){c===void 0&&(c=0);var f=this.lines.get(e);return f?f.translateToString(r,c,u):""},i.prototype.getWrappedRangeForLine=function(e){for(var r=e,c=e;r>0&&this.lines.get(r).isWrapped;)r--;for(;c+1<this.lines.length&&this.lines.get(c+1).isWrapped;)c++;return{first:r,last:c}},i.prototype.setupTabStops=function(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.options.tabStopWidth)this.tabs[e]=!0},i.prototype.prevStop=function(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},i.prototype.nextStop=function(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},i.prototype.addMarker=function(e){var r=this,c=new d.Marker(e);return this.markers.push(c),c.register(this.lines.onTrim(function(u){c.line-=u,c.line<0&&c.dispose()})),c.register(this.lines.onInsert(function(u){c.line>=u.index&&(c.line+=u.amount)})),c.register(this.lines.onDelete(function(u){c.line>=u.index&&c.line<u.index+u.amount&&c.dispose(),c.line>u.index&&(c.line-=u.amount)})),c.register(c.onDispose(function(){return r._removeMarker(c)})),c},i.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},i.prototype.iterator=function(e,r,c,u,f){return new t(this,e,r,c,u,f)},i}();_.Buffer=s;var t=function(){function i(e,r,c,u,f,m){c===void 0&&(c=0),u===void 0&&(u=e.lines.length),f===void 0&&(f=0),m===void 0&&(m=0),this._buffer=e,this._trimRight=r,this._startIndex=c,this._endIndex=u,this._startOverscan=f,this._endOverscan=m,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return i.prototype.hasNext=function(){return this._current<this._endIndex},i.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 r="",c=e.first;c<=e.last;++c)r+=this._buffer.translateBufferLineToString(c,this._trimRight);return this._current=e.last+1,{range:e,content:r}},i}();_.BufferStringIterator=t},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CircularList=void 0;var y=O(0),v=function(){function o(g){this._maxLength=g,this.onDeleteEmitter=new y.EventEmitter,this.onInsertEmitter=new y.EventEmitter,this.onTrimEmitter=new y.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(o.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"maxLength",{get:function(){return this._maxLength},set:function(g){if(this._maxLength!==g){for(var p=new Array(g),d=0;d<Math.min(g,this.length);d++)p[d]=this._array[this._getCyclicIndex(d)];this._array=p,this._maxLength=g,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"length",{get:function(){return this._length},set:function(g){if(g>this._length)for(var p=this._length;p<g;p++)this._array[p]=void 0;this._length=g},enumerable:!1,configurable:!0}),o.prototype.get=function(g){return this._array[this._getCyclicIndex(g)]},o.prototype.set=function(g,p){this._array[this._getCyclicIndex(g)]=p},o.prototype.push=function(g){this._array[this._getCyclicIndex(this._length)]=g,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},o.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(o.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),o.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},o.prototype.splice=function(g,p){for(var d=[],a=2;a<arguments.length;a++)d[a-2]=arguments[a];if(p){for(var n=g;n<this._length-p;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+p)];this._length-=p}for(n=this._length-1;n>=g;n--)this._array[this._getCyclicIndex(n+d.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<d.length;n++)this._array[this._getCyclicIndex(g+n)]=d[n];if(this._length+d.length>this._maxLength){var s=this._length+d.length-this._maxLength;this._startIndex+=s,this._length=this._maxLength,this.onTrimEmitter.fire(s)}else this._length+=d.length},o.prototype.trimStart=function(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)},o.prototype.shiftElements=function(g,p,d){if(!(p<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(var a=p-1;a>=0;a--)this.set(g+a+d,this.get(g+a));var n=g+p+d-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(a=0;a<p;a++)this.set(g+a+d,this.get(g+a))}},o.prototype._getCyclicIndex=function(g){return(this._startIndex+g)%this._maxLength},o}();_.CircularList=v},function(I,_,O){"use strict";function y(v,o,g){if(o===v.length-1)return v[o].getTrimmedLength();var p=!v[o].hasContent(g-1)&&v[o].getWidth(g-1)===1,d=v[o+1].getWidth(0)===2;return p&&d?g-1:g}Object.defineProperty(_,"__esModule",{value:!0}),_.getWrappedLineTrimmedLength=_.reflowSmallerGetNewLineLengths=_.reflowLargerApplyNewLayout=_.reflowLargerCreateNewLayout=_.reflowLargerGetLinesToRemove=void 0,_.reflowLargerGetLinesToRemove=function(v,o,g,p,d){for(var a=[],n=0;n<v.length-1;n++){var s=n,t=v.get(++s);if(t.isWrapped){for(var i=[v.get(n)];s<v.length&&t.isWrapped;)i.push(t),t=v.get(++s);if(p>=n&&p<s)n+=i.length-1;else{for(var e=0,r=y(i,e,o),c=1,u=0;c<i.length;){var f=y(i,c,o),m=f-u,l=g-r,E=Math.min(m,l);i[e].copyCellsFrom(i[c],u,r,E,!1),(r+=E)===g&&(e++,r=0),(u+=E)===f&&(c++,u=0),r===0&&e!==0&&i[e-1].getWidth(g-1)===2&&(i[e].copyCellsFrom(i[e-1],g-1,r++,1,!1),i[e-1].setCell(g-1,d))}i[e].replaceCells(r,g,d);for(var b=0,D=i.length-1;D>0&&(D>e||i[D].getTrimmedLength()===0);D--)b++;b>0&&(a.push(n+i.length-b),a.push(b)),n+=i.length-1}}}return a},_.reflowLargerCreateNewLayout=function(v,o){for(var g=[],p=0,d=o[p],a=0,n=0;n<v.length;n++)if(d===n){var s=o[++p];v.onDeleteEmitter.fire({index:n-a,amount:s}),n+=s-1,a+=s,d=o[++p]}else g.push(n);return{layout:g,countRemoved:a}},_.reflowLargerApplyNewLayout=function(v,o){for(var g=[],p=0;p<o.length;p++)g.push(v.get(o[p]));for(p=0;p<g.length;p++)v.set(p,g[p]);v.length=o.length},_.reflowSmallerGetNewLineLengths=function(v,o,g){for(var p=[],d=v.map(function(r,c){return y(v,c,o)}).reduce(function(r,c){return r+c}),a=0,n=0,s=0;s<d;){if(d-s<g){p.push(d-s);break}a+=g;var t=y(v,n,o);a>t&&(a-=t,n++);var i=v[n].getWidth(a-1)===2;i&&a--;var e=i?g-1:g;p.push(e),s+=e}return p},_.getWrappedLineTrimmedLength=y},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(p,d){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,n){a.__proto__=n}||function(a,n){for(var s in n)n.hasOwnProperty(s)&&(a[s]=n[s])})(p,d)},function(p,d){function a(){this.constructor=p}y(p,d),p.prototype=d===null?Object.create(d):(a.prototype=d.prototype,new a)});Object.defineProperty(_,"__esModule",{value:!0}),_.Marker=void 0;var o=O(0),g=function(p){function d(a){var n=p.call(this)||this;return n.line=a,n._id=d._nextId++,n.isDisposed=!1,n._onDispose=new o.EventEmitter,n}return v(d,p),Object.defineProperty(d.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),d.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},d._nextId=1,d}(O(2).Disposable);_.Marker=g},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.OptionsService=_.DEFAULT_OPTIONS=_.DEFAULT_BELL_SOUND=void 0;var y=O(0),v=O(11),o=O(33);_.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",_.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:_.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:v.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var g=["cols","rows"],p=function(){function d(a){this._onOptionChange=new y.EventEmitter,this.options=o.clone(_.DEFAULT_OPTIONS);for(var n=0,s=Object.keys(a);n<s.length;n++){var t=s[n];if(t in this.options){var i=a[t];this.options[t]=i}}}return Object.defineProperty(d.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),d.prototype.setOption=function(a,n){if(!(a in _.DEFAULT_OPTIONS))throw new Error('No option with key "'+a+'"');if(g.indexOf(a)!==-1)throw new Error('Option "'+a+'" can only be set in the constructor');this.options[a]!==n&&(n=this._sanitizeAndValidateOption(a,n),this.options[a]!==n&&(this.options[a]=n,this._onOptionChange.fire(a)))},d.prototype._sanitizeAndValidateOption=function(a,n){switch(a){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":n||(n=_.DEFAULT_OPTIONS[a]);break;case"cursorWidth":n=Math.floor(n);case"lineHeight":case"tabStopWidth":if(n<1)throw new Error(a+" 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(a+" cannot be less than 0, value: "+n);break;case"fastScrollSensitivity":case"scrollSensitivity":if(n<=0)throw new Error(a+" cannot be less than or equal to 0, value: "+n)}return n},d.prototype.getOption=function(a){if(!(a in _.DEFAULT_OPTIONS))throw new Error('No option with key "'+a+'"');return this.options[a]},d}();_.OptionsService=p},function(I,_,O){"use strict";var y,v=this&&this.__extends||(y=function(e,r){return(y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,u){c.__proto__=u}||function(c,u){for(var f in u)u.hasOwnProperty(f)&&(c[f]=u[f])})(e,r)},function(e,r){function c(){this.constructor=e}y(e,r),e.prototype=r===null?Object.create(r):(c.prototype=r.prototype,new c)}),o=this&&this.__decorate||function(e,r,c,u){var f,m=arguments.length,l=m<3?r:u===null?u=Object.getOwnPropertyDescriptor(r,c):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(e,r,c,u);else for(var E=e.length-1;E>=0;E--)(f=e[E])&&(l=(m<3?f(l):m>3?f(r,c,l):f(r,c))||l);return m>3&&l&&Object.defineProperty(r,c,l),l},g=this&&this.__param||function(e,r){return function(c,u){r(c,u,e)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CoreService=void 0;var p=O(1),d=O(0),a=O(33),n=O(2),s=Object.freeze({insertMode:!1}),t=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),i=function(e){function r(c,u,f,m){var l=e.call(this)||this;return l._bufferService=u,l._logService=f,l._optionsService=m,l.isCursorInitialized=!1,l.isCursorHidden=!1,l._onData=l.register(new d.EventEmitter),l._onUserInput=l.register(new d.EventEmitter),l._onBinary=l.register(new d.EventEmitter),l._scrollToBottom=c,l.register({dispose:function(){return l._scrollToBottom=void 0}}),l.modes=a.clone(s),l.decPrivateModes=a.clone(t),l}return v(r,e),Object.defineProperty(r.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),r.prototype.reset=function(){this.modes=a.clone(s),this.decPrivateModes=a.clone(t)},r.prototype.triggerDataEvent=function(c,u){if(u===void 0&&(u=!1),!this._optionsService.options.disableStdin){var f=this._bufferService.buffer;f.ybase!==f.ydisp&&this._scrollToBottom(),u&&this._onUserInput.fire(),this._logService.debug('sending data "'+c+'"',function(){return c.split("").map(function(m){return m.charCodeAt(0)})}),this._onData.fire(c)}},r.prototype.triggerBinaryEvent=function(c){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+c+'"',function(){return c.split("").map(function(u){return u.charCodeAt(0)})}),this._onBinary.fire(c))},r=o([g(1,p.IBufferService),g(2,p.ILogService),g(3,p.IOptionsService)],r)}(n.Disposable);_.CoreService=i},function(I,_,O){"use strict";var y=this&&this.__decorate||function(t,i,e,r){var c,u=arguments.length,f=u<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,e):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,i,e,r);else for(var m=t.length-1;m>=0;m--)(c=t[m])&&(f=(u<3?c(f):u>3?c(i,e,f):c(i,e))||f);return u>3&&f&&Object.defineProperty(i,e,f),f},v=this&&this.__param||function(t,i){return function(e,r){i(e,r,t)}};Object.defineProperty(_,"__esModule",{value:!0}),_.CoreMouseService=void 0;var o=O(1),g=O(0),p={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(t){return t.button!==4&&t.action===1&&(t.ctrl=!1,t.alt=!1,t.shift=!1,!0)}},VT200:{events:19,restrict:function(t){return t.action!==32}},DRAG:{events:23,restrict:function(t){return t.action!==32||t.button!==3}},ANY:{events:31,restrict:function(t){return!0}}};function d(t,i){var e=(t.ctrl?16:0)|(t.shift?4:0)|(t.alt?8:0);return t.button===4?(e|=64,e|=t.action):(e|=3&t.button,4&t.button&&(e|=64),8&t.button&&(e|=128),t.action===32?e|=32:t.action!==0||i||(e|=3)),e}var a=String.fromCharCode,n={DEFAULT:function(t){var i=[d(t,!1)+32,t.col+32,t.row+32];return i[0]>255||i[1]>255||i[2]>255?"":"[M"+a(i[0])+a(i[1])+a(i[2])},SGR:function(t){var i=t.action===0&&t.button!==4?"m":"M";return"[<"+d(t,!0)+";"+t.col+";"+t.row+i}},s=function(){function t(i,e){this._bufferService=i,this._coreService=e,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new g.EventEmitter,this._lastEvent=null;for(var r=0,c=Object.keys(p);r<c.length;r++){var u=c[r];this.addProtocol(u,p[u])}for(var f=0,m=Object.keys(n);f<m.length;f++){var l=m[f];this.addEncoding(l,n[l])}this.reset()}return t.prototype.addProtocol=function(i,e){this._protocols[i]=e},t.prototype.addEncoding=function(i,e){this._encodings[i]=e},Object.defineProperty(t.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(i){if(!this._protocols[i])throw new Error('unknown protocol "'+i+'"');this._activeProtocol=i,this._onProtocolChange.fire(this._protocols[i].events)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(i){if(!this._encodings[i])throw new Error('unknown encoding "'+i+'"');this._activeEncoding=i},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(t.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),t.prototype.triggerMouseEvent=function(i){if(i.col<0||i.col>=this._bufferService.cols||i.row<0||i.row>=this._bufferService.rows)return!1;if(i.button===4&&i.action===32)return!1;if(i.button===3&&i.action!==32)return!1;if(i.button!==4&&(i.action===2||i.action===3))return!1;if(i.col++,i.row++,i.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,i))return!1;if(!this._protocols[this._activeProtocol].restrict(i))return!1;var e=this._encodings[this._activeEncoding](i);return e&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(e):this._coreService.triggerDataEvent(e,!0)),this._lastEvent=i,!0},t.prototype.explainEvents=function(i){return{down:!!(1&i),up:!!(2&i),drag:!!(4&i),move:!!(8&i),wheel:!!(16&i)}},t.prototype._compareEvents=function(i,e){return i.col===e.col&&(i.row===e.row&&(i.button===e.button&&(i.action===e.action&&(i.ctrl===e.ctrl&&i.alt===e.alt))))&&i.shift===e.shift},t=y([v(0,o.IBufferService),v(1,o.ICoreService)],t)}();_.CoreMouseService=s},function(I,_,O){"use strict";var y=this&&this.__decorate||function(p,d,a,n){var s,t=arguments.length,i=t<3?d:n===null?n=Object.getOwnPropertyDescriptor(d,a):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(p,d,a,n);else for(var e=p.length-1;e>=0;e--)(s=p[e])&&(i=(t<3?s(i):t>3?s(d,a,i):s(d,a))||i);return t>3&&i&&Object.defineProperty(d,a,i),i},v=this&&this.__param||function(p,d){return function(a,n){d(a,n,p)}};Object.defineProperty(_,"__esModule",{value:!0}),_.DirtyRowService=void 0;var o=O(1),g=function(){function p(d){this._bufferService=d,this.clearRange()}return Object.defineProperty(p.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),p.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},p.prototype.markDirty=function(d){d<this._start?this._start=d:d>this._end&&(this._end=d)},p.prototype.markRangeDirty=function(d,a){if(d>a){var n=d;d=a,a=n}d<this._start&&(this._start=d),a>this._end&&(this._end=a)},p.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},p=y([v(0,o.IBufferService)],p)}();_.DirtyRowService=g},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.UnicodeService=void 0;var y=O(0),v=O(79),o=function(){function g(){this._providers=Object.create(null),this._active="",this._onChange=new y.EventEmitter;var p=new v.UnicodeV6;this.register(p),this._active=p.version,this._activeProvider=p}return Object.defineProperty(g.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"activeVersion",{get:function(){return this._active},set:function(p){if(!this._providers[p])throw new Error('unknown Unicode version "'+p+'"');this._active=p,this._activeProvider=this._providers[p],this._onChange.fire(p)},enumerable:!1,configurable:!0}),g.prototype.register=function(p){this._providers[p.version]=p},g.prototype.wcwidth=function(p){return this._activeProvider.wcwidth(p)},g.prototype.getStringCellWidth=function(p){for(var d=0,a=p.length,n=0;n<a;++n){var s=p.charCodeAt(n);if(55296<=s&&s<=56319){if(++n>=a)return d+this.wcwidth(s);var t=p.charCodeAt(n);56320<=t&&t<=57343?s=1024*(s-55296)+t-56320+65536:d+=this.wcwidth(t)}d+=this.wcwidth(s)}return d},g}();_.UnicodeService=o},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.UnicodeV6=void 0;var y,v=O(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]],g=[[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]],p=function(){function d(){if(this.version="6",!y){y=new Uint8Array(65536),v.fill(y,1),y[0]=0,v.fill(y,0,1,32),v.fill(y,0,127,160),v.fill(y,2,4352,4448),y[9001]=2,y[9002]=2,v.fill(y,2,11904,42192),y[12351]=1,v.fill(y,2,44032,55204),v.fill(y,2,63744,64256),v.fill(y,2,65040,65050),v.fill(y,2,65072,65136),v.fill(y,2,65280,65377),v.fill(y,2,65504,65511);for(var a=0;a<o.length;++a)v.fill(y,0,o[a][0],o[a][1]+1)}}return d.prototype.wcwidth=function(a){return a<32?0:a<127?1:a<65536?y[a]:function(n,s){var t,i=0,e=s.length-1;if(n<s[0][0]||n>s[e][1])return!1;for(;e>=i;)if(n>s[t=i+e>>1][1])i=t+1;else{if(!(n<s[t][0]))return!0;e=t-1}return!1}(a,g)?0:a>=131072&&a<=196605||a>=196608&&a<=262141?2:1},d}();_.UnicodeV6=p},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.CharsetService=void 0;var y=function(){function v(){this.glevel=0,this._charsets=[]}return v.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},v.prototype.setgLevel=function(o){this.glevel=o,this.charset=this._charsets[o]},v.prototype.setgCharset=function(o,g){this._charsets[o]=g,this.glevel===o&&(this.charset=g)},v}();_.CharsetService=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.updateWindowsModeWrappedState=void 0;var y=O(3);_.updateWindowsModeWrappedState=function(v){var o=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=o==null?void 0:o.get(v.cols-1),p=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);p&&g&&(p.isWrapped=g[y.CHAR_DATA_CODE_INDEX]!==y.NULL_CELL_CODE&&g[y.CHAR_DATA_CODE_INDEX]!==y.WHITESPACE_CELL_CODE)}},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.WriteBuffer=void 0;var y=function(){function v(o){this._action=o,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return v.prototype.writeSync=function(o){if(this._writeBuffer.length){for(var g=this._bufferOffset;g<this._writeBuffer.length;++g){var p=this._writeBuffer[g],d=this._callbacks[g];this._action(p),d&&d()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(o)},v.prototype.write=function(o,g){var p=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 p._innerWrite()})),this._pendingData+=o.length,this._writeBuffer.push(o),this._callbacks.push(g)},v.prototype._innerWrite=function(){for(var o=this,g=Date.now();this._writeBuffer.length>this._bufferOffset;){var p=this._writeBuffer[this._bufferOffset],d=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(p),this._pendingData-=p.length,d&&d(),Date.now()-g>=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 o._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},v}();_.WriteBuffer=y},function(I,_,O){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.AddonManager=void 0;var y=function(){function v(){this._addons=[]}return v.prototype.dispose=function(){for(var o=this._addons.length-1;o>=0;o--)this._addons[o].instance.dispose()},v.prototype.loadAddon=function(o,g){var p=this,d={instance:g,dispose:g.dispose,isDisposed:!1};this._addons.push(d),g.dispose=function(){return p._wrappedAddonDispose(d)},g.activate(o)},v.prototype._wrappedAddonDispose=function(o){if(!o.isDisposed){for(var g=-1,p=0;p<this._addons.length;p++)if(this._addons[p]===o){g=p;break}if(g===-1)throw new Error("Could not dispose an addon that has not been loaded");o.isDisposed=!0,o.dispose.apply(o.instance),this._addons.splice(g,1)}},v}();_.AddonManager=y}])})},"/omn":function(U,X,x){},"0/SM":function(U,X,x){U.exports={flex_box_center:"flex_box_center___gv1YF",flex_space_between:"flex_space_between___pJTp_",flex_box_vertical_center:"flex_box_vertical_center___2X-O9",flex_box_center_end:"flex_box_center_end___21hK4",flex_box_column:"flex_box_column___psPJb",wrap:"wrap___QvUDk",full:"full___2gLfk"}},"07cG":function(U,X,x){U.exports={ldsRing:"ldsRing___2F8W7",idsRingWrapper:"idsRingWrapper___fC2cF",ldsring:"ldsring___3A88y"}},"0i5U":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAASCAYAAABSO15qAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjNEMUNCRTZCNDE1MzExRThBREM4QUVGRUEwQjY3M0FFIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjNEMUNCRTZDNDE1MzExRThBREM4QUVGRUEwQjY3M0FFIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6M0QxQ0JFNjk0MTUzMTFFOEFEQzhBRUZFQTBCNjczQUUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6M0QxQ0JFNkE0MTUzMTFFOEFEQzhBRUZFQTBCNjczQUUiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6xcnMrAAABN0lEQVR42qzTsUtCURTH8fskisZoa4ogcGhpcYuW+gsk+icyGiyEoNVB0i3EWYJwaG2Koj+gBiEqqIasRQlCHCJ8fU+cB4fLldS68BHO755zeQ/vi7L3q4vOuRMsu9HWNTZT/NTHGHY6U5cDMm78lUm5P65/OaDtZXsoB3or2PWythxQ9cInFHBrsjvNHr3eqhxQxIsJS5jAlsl29GlLJpOZooQ979HmsY9zHOMUZ8hjwfTJTC/iIkkR4RIruvmJJXQxhVhfaVr3ryCDcfIvSMM2+lpP4ghveMahGe5rb+z/jTeomXoNG1hH1uQ17f1ZySskaxYPmNH6FR9Ia/0O+XY6gy6SbByYes4MO93r/HYT5V40A3kzcGeCB3whF8hzujfUt3CBhqkbmo30McnFaan8oKZvAQYAarBDzHlRpVIAAAAASUVORK5CYII="},"19Vz":function(U,X,x){(function(I){I(x("VrN/"))})(function(I){I.defineOption("placeholder","",function(p,d,a){var n=a&&a!=I.Init;if(d&&!n)p.on("blur",v),p.on("change",o),p.on("swapDoc",o),I.on(p.getInputField(),"compositionupdate",p.state.placeholderCompose=function(){y(p)}),o(p);else if(!d&&n){p.off("blur",v),p.off("change",o),p.off("swapDoc",o),I.off(p.getInputField(),"compositionupdate",p.state.placeholderCompose),_(p);var s=p.getWrapperElement();s.className=s.className.replace(" CodeMirror-empty","")}d&&!p.hasFocus()&&v(p)});function _(p){p.state.placeholder&&(p.state.placeholder.parentNode.removeChild(p.state.placeholder),p.state.placeholder=null)}function O(p){_(p);var d=p.state.placeholder=document.createElement("pre");d.style.cssText="height: 0; overflow: visible",d.style.direction=p.getOption("direction"),d.className="CodeMirror-placeholder CodeMirror-line-like";var a=p.getOption("placeholder");typeof a=="string"&&(a=document.createTextNode(a)),d.appendChild(a),p.display.lineSpace.insertBefore(d,p.display.lineSpace.firstChild)}function y(p){setTimeout(function(){var d=!1,a=p.getInputField();a.nodeName=="TEXTAREA"?d=!a.value:p.lineCount()==1&&(d=!/[^\u200b]/.test(a.querySelector(".CodeMirror-line").textContent)),d?O(p):_(p)},20)}function v(p){g(p)&&O(p)}function o(p){var d=p.getWrapperElement(),a=g(p);d.className=d.className.replace(" CodeMirror-empty","")+(a?" CodeMirror-empty":""),a?O(p):_(p)}function g(p){return p.lineCount()===1&&p.getLine(0)===""}})},"1A8V":function(U,X,x){},"1ZF9":function(U,X,x){U.exports=x.p+"static/Authorize.cc9c212f.png"},"1Zrr":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAABZ0lEQVRYR+2YrU7FQBBGzzwEPAMSi+M6MARDggNJgiIkWLiSBIFCkyCuQECCQFIcEstb8AYf2ZvmhpbuT9ttUpJWdma+OZ3O7k5rRC5Jh8ARsBPzjdhvgXczew75WSyJpCdgP+aXaP8ws63OQJK2gbdSYJ6Y1Od2WRpmZlb4nIIVqgEFhUKwbXTGByRpDzgBdnu+kr7hD8CLSboGLvqqZYp/dEDK1LR9mZZNXwEys6u+ql3iJbm8E5C3eFOFYn2VrUKS1oADYL1M+gW8mtl3DOK3PQuQpE1gAWzUkn8CZ6Hzqg6bC+gcuPFU4s7MTlOrlAvITQFuGijMbOaSS/pzLwXKB+QdCQKiXqAUkJqP06rs1B00liFNFeqqVQEaXYXmbc6ypn7J3UNtgUa3ysa1D5XLfDw7dedl1BCYZWOcgHJWIKb1f15Z7EkGtq+G/NXEP3DCFPl79xnkTln3u+U4JWJAH/czo/gBVkc5pun3NGoAAAAASUVORK5CYII="},"1dTM":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=x("GQ8N"),_=S(x("Lo0S")),O=x("VSMT"),y=x("GdRQ"),v=x("SZEN"),o=x("vewr"),g=C(x("YJ9k")),p=C(x("MZdM")),d=C(x("ItS6")),a=C(x("whVF")),n=C(x("Fv0C")),s=C(x("LCi9")),t=C(x("rwxt")),i=C(x("Mmt2")),e=C(x("iUHT")),r=C(x("mHUz")),c=C(x("P2ho")),u=x("NBmB");x("mdZa");var f=C(x("34/K")),m=C(x("hXwI")),l=C(x("SgaC")),E=C(x("3690")),b=C(x("8K/p")),D=C(x("xO64"));function C(ve){return ve&&ve.__esModule?ve:{default:ve}}function w(){if(typeof WeakMap!="function")return null;var ve=new WeakMap;return w=function(){return ve},ve}function S(ve){if(ve&&ve.__esModule)return ve;if(ve===null||A(ve)!=="object"&&typeof ve!="function")return{default:ve};var pe=w();if(pe&&pe.has(ve))return pe.get(ve);var Te={},Ne=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var me in ve)if(Object.prototype.hasOwnProperty.call(ve,me)){var Ie=Ne?Object.getOwnPropertyDescriptor(ve,me):null;Ie&&(Ie.get||Ie.set)?Object.defineProperty(Te,me,Ie):Te[me]=ve[me]}return Te.default=ve,pe&&pe.set(ve,Te),Te}function A(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(Te){return typeof Te}:A=function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},A(ve)}function R(ve,pe){if(!(ve instanceof pe))throw new TypeError("Cannot call a class as a function")}function k(ve,pe){for(var Te=0;Te<pe.length;Te++){var Ne=pe[Te];Ne.enumerable=Ne.enumerable||!1,Ne.configurable=!0,"value"in Ne&&(Ne.writable=!0),Object.defineProperty(ve,Ne.key,Ne)}}function L(ve,pe,Te){return pe&&k(ve.prototype,pe),Te&&k(ve,Te),ve}function M(ve,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Super expression must either be null or a function");ve.prototype=Object.create(pe&&pe.prototype,{constructor:{value:ve,writable:!0,configurable:!0}}),pe&&G(ve,pe)}function G(ve,pe){return G=Object.setPrototypeOf||function(Ne,me){return Ne.__proto__=me,Ne},G(ve,pe)}function W(ve){var pe=F();return function(){var Ne=P(ve),me;if(pe){var Ie=P(this).constructor;me=Reflect.construct(Ne,arguments,Ie)}else me=Ne.apply(this,arguments);return N(this,me)}}function N(ve,pe){return pe&&(A(pe)==="object"||typeof pe=="function")?pe:K(ve)}function K(ve){if(ve===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ve}function F(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ve){return!1}}function P(ve){return P=Object.setPrototypeOf?Object.getPrototypeOf:function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},P(ve)}var B=3,J="rgb(40, 40, 40)",re=17,he=50,we=19,ke=75,ne=50,Oe=1e3,Ce=50,fe=1,oe=1<<1,se=1<<2,be=1<<3,ie=1<<4,de=1<<24,Fe=1<<25,ae=1<<26,Z=1<<27,Y=1<<28,q=function(ve){M(Te,ve);var pe=W(Te);function Te(Ne,me,Ie){var _e;if(R(this,Te),!Ne)throw new Error("Must specify target");if(!me)throw new Error("Must specify URL");_e=pe.call(this),_e._target=Ne,_e._url=me,Ie=Ie||{},_e._rfbCredentials=Ie.credentials||{},_e._shared="shared"in Ie?!!Ie.shared:!0,_e._repeaterID=Ie.repeaterID||"",_e._wsProtocols=Ie.wsProtocols||[],_e._rfbConnectionState="",_e._rfbInitState="",_e._rfbAuthScheme=-1,_e._rfbCleanDisconnect=!0,_e._rfbVersion=0,_e._rfbMaxVersion=3.8,_e._rfbTightVNC=!1,_e._rfbVeNCryptState=0,_e._rfbXvpVer=0,_e._fbWidth=0,_e._fbHeight=0,_e._fbName="",_e._capabilities={power:!1},_e._supportsFence=!1,_e._supportsContinuousUpdates=!1,_e._enabledContinuousUpdates=!1,_e._supportsSetDesktopSize=!1,_e._screenID=0,_e._screenFlags=0,_e._qemuExtKeyEventSupported=!1,_e._clipboardText=null,_e._clipboardServerCapabilitiesActions={},_e._clipboardServerCapabilitiesFormats={},_e._sock=null,_e._display=null,_e._flushing=!1,_e._keyboard=null,_e._gestures=null,_e._disconnTimer=null,_e._resizeTimeout=null,_e._mouseMoveTimer=null,_e._decoders={},_e._FBU={rects:0,x:0,y:0,width:0,height:0,encoding:null},_e._mousePos={},_e._mouseButtonMask=0,_e._mouseLastMoveTime=0,_e._viewportDragging=!1,_e._viewportDragPos={},_e._viewportHasMoved=!1,_e._accumulatedWheelDeltaX=0,_e._accumulatedWheelDeltaY=0,_e._gestureLastTapTime=null,_e._gestureFirstDoubleTapEv=null,_e._gestureLastMagnitudeX=0,_e._gestureLastMagnitudeY=0,_e._eventHandlers={focusCanvas:_e._focusCanvas.bind(K(_e)),windowResize:_e._windowResize.bind(K(_e)),handleMouse:_e._handleMouse.bind(K(_e)),handleWheel:_e._handleWheel.bind(K(_e)),handleGesture:_e._handleGesture.bind(K(_e))},_.Debug(">> RFB.constructor"),_e._screen=document.createElement("div"),_e._screen.style.display="flex",_e._screen.style.width="100%",_e._screen.style.height="100%",_e._screen.style.overflow="auto",_e._screen.style.background=J,_e._canvas=document.createElement("canvas"),_e._canvas.style.margin="auto",_e._canvas.style.outline="none",_e._canvas.style.flexShrink="0",_e._canvas.width=0,_e._canvas.height=0,_e._canvas.tabIndex=-1,_e._screen.appendChild(_e._canvas),_e._cursor=new t.default,_e._cursorImage=Te.cursors.none,_e._decoders[u.encodings.encodingRaw]=new f.default,_e._decoders[u.encodings.encodingCopyRect]=new m.default,_e._decoders[u.encodings.encodingRRE]=new l.default,_e._decoders[u.encodings.encodingHextile]=new E.default,_e._decoders[u.encodings.encodingTight]=new b.default,_e._decoders[u.encodings.encodingTightPNG]=new D.default;try{_e._display=new p.default(_e._canvas)}catch(Ve){throw _.Error("Display exception: "+Ve),Ve}return _e._display.onflush=_e._onFlush.bind(K(_e)),_e._keyboard=new n.default(_e._canvas),_e._keyboard.onkeyevent=_e._handleKeyEvent.bind(K(_e)),_e._gestures=new s.default,_e._sock=new i.default,_e._sock.on("message",function(){_e._handleMessage()}),_e._sock.on("open",function(){_e._rfbConnectionState==="connecting"&&_e._rfbInitState===""?(_e._rfbInitState="ProtocolVersion",_.Debug("Starting VNC handshake")):_e._fail("Unexpected server connection while "+_e._rfbConnectionState)}),_e._sock.on("close",function(Ve){_.Debug("WebSocket on-close event");var tt="";Ve.code&&(tt="(code: "+Ve.code,Ve.reason&&(tt+=", reason: "+Ve.reason),tt+=")");switch(_e._rfbConnectionState){case"connecting":_e._fail("Connection closed "+tt);break;case"connected":_e._updateConnectionState("disconnecting"),_e._updateConnectionState("disconnected");break;case"disconnecting":_e._updateConnectionState("disconnected");break;case"disconnected":_e._fail("Unexpected server disconnect when already disconnected "+tt);break;default:_e._fail("Unexpected server disconnect before connecting "+tt);break}_e._sock.off("close")}),_e._sock.on("error",function(Ve){return _.Warn("WebSocket on-error event")}),setTimeout(_e._updateConnectionState.bind(K(_e),"connecting")),_.Debug("<< RFB.constructor"),_e.dragViewport=!1,_e.focusOnClick=!0,_e._viewOnly=!1,_e._clipViewport=!1,_e._scaleViewport=!1,_e._resizeSession=!1,_e._showDotCursor=!1,Ie.showDotCursor!==void 0&&(_.Warn("Specifying showDotCursor as a RFB constructor argument is deprecated"),_e._showDotCursor=Ie.showDotCursor),_e._qualityLevel=6,_e._compressionLevel=2,_e}return L(Te,[{key:"disconnect",value:function(){this._updateConnectionState("disconnecting"),this._sock.off("error"),this._sock.off("message"),this._sock.off("open")}},{key:"sendCredentials",value:function(me){this._rfbCredentials=me,setTimeout(this._initMsg.bind(this),0)}},{key:"sendCtrlAltDel",value:function(){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;_.Info("Sending Ctrl-Alt-Del"),this.sendKey(r.default.XK_Control_L,"ControlLeft",!0),this.sendKey(r.default.XK_Alt_L,"AltLeft",!0),this.sendKey(r.default.XK_Delete,"Delete",!0),this.sendKey(r.default.XK_Delete,"Delete",!1),this.sendKey(r.default.XK_Alt_L,"AltLeft",!1),this.sendKey(r.default.XK_Control_L,"ControlLeft",!1)}},{key:"machineShutdown",value:function(){this._xvpOp(1,2)}},{key:"machineReboot",value:function(){this._xvpOp(1,3)}},{key:"machineReset",value:function(){this._xvpOp(1,4)}},{key:"sendKey",value:function(me,Ie,_e){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(_e===void 0){this.sendKey(me,Ie,!0),this.sendKey(me,Ie,!1);return}var Ve=c.default[Ie];if(this._qemuExtKeyEventSupported&&Ve)me=me||0,_.Info("Sending key ("+(_e?"down":"up")+"): keysym "+me+", scancode "+Ve),Te.messages.QEMUExtendedKeyEvent(this._sock,me,_e,Ve);else{if(!me)return;_.Info("Sending keysym ("+(_e?"down":"up")+"): "+me),Te.messages.keyEvent(this._sock,me,_e?1:0)}}},{key:"focus",value:function(){this._canvas.focus()}},{key:"blur",value:function(){this._canvas.blur()}},{key:"clipboardPasteFrom",value:function(me){if(this._rfbConnectionState!=="connected"||this._viewOnly)return;if(this._clipboardServerCapabilitiesFormats[fe]&&this._clipboardServerCapabilitiesActions[Z])this._clipboardText=me,Te.messages.extendedClipboardNotify(this._sock,[fe]);else{for(var Ie=new Uint8Array(me.length),_e=0;_e<me.length;_e++)Ie[_e]=me.charCodeAt(_e);Te.messages.clientCutText(this._sock,Ie)}}},{key:"_connect",value:function(){_.Debug(">> RFB.connect"),_.Info("connecting to "+this._url);try{this._sock.open(this._url,this._wsProtocols)}catch(me){me.name==="SyntaxError"?this._fail("Invalid host or port ("+me+")"):this._fail("Error when opening socket ("+me+")")}this._target.appendChild(this._screen),this._gestures.attach(this._canvas),this._cursor.attach(this._canvas),this._refreshCursor(),window.addEventListener("resize",this._eventHandlers.windowResize),this._canvas.addEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.addEventListener("touchstart",this._eventHandlers.focusCanvas),this._canvas.addEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.addEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.addEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.addEventListener("click",this._eventHandlers.handleMouse),this._canvas.addEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.addEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.addEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.addEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.addEventListener("gestureend",this._eventHandlers.handleGesture),_.Debug("<< RFB.connect")}},{key:"_disconnect",value:function(){_.Debug(">> RFB.disconnect"),this._cursor.detach(),this._canvas.removeEventListener("gesturestart",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gesturemove",this._eventHandlers.handleGesture),this._canvas.removeEventListener("gestureend",this._eventHandlers.handleGesture),this._canvas.removeEventListener("wheel",this._eventHandlers.handleWheel),this._canvas.removeEventListener("mousedown",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mouseup",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousemove",this._eventHandlers.handleMouse),this._canvas.removeEventListener("click",this._eventHandlers.handleMouse),this._canvas.removeEventListener("contextmenu",this._eventHandlers.handleMouse),this._canvas.removeEventListener("mousedown",this._eventHandlers.focusCanvas),this._canvas.removeEventListener("touchstart",this._eventHandlers.focusCanvas),window.removeEventListener("resize",this._eventHandlers.windowResize),this._keyboard.ungrab(),this._gestures.detach(),this._sock.close();try{this._target.removeChild(this._screen)}catch(me){if(!(me.name==="NotFoundError"))throw me}clearTimeout(this._resizeTimeout),clearTimeout(this._mouseMoveTimer),_.Debug("<< RFB.disconnect")}},{key:"_focusCanvas",value:function(me){if(!this.focusOnClick)return;this.focus()}},{key:"_setDesktopName",value:function(me){this._fbName=me,this.dispatchEvent(new CustomEvent("desktopname",{detail:{name:this._fbName}}))}},{key:"_windowResize",value:function(me){var Ie=this;window.requestAnimationFrame(function(){Ie._updateClip(),Ie._updateScale()}),this._resizeSession&&(clearTimeout(this._resizeTimeout),this._resizeTimeout=setTimeout(this._requestRemoteResize.bind(this),500))}},{key:"_updateClip",value:function(){var me=this._display.clipViewport,Ie=this._clipViewport;if(this._scaleViewport&&(Ie=!1),me!==Ie&&(this._display.clipViewport=Ie),Ie){var _e=this._screenSize();this._display.viewportChangeSize(_e.w,_e.h),this._fixScrollbars()}}},{key:"_updateScale",value:function(){if(!this._scaleViewport)this._display.scale=1;else{var me=this._screenSize();this._display.autoscale(me.w,me.h)}this._fixScrollbars()}},{key:"_requestRemoteResize",value:function(){if(clearTimeout(this._resizeTimeout),this._resizeTimeout=null,!this._resizeSession||this._viewOnly||!this._supportsSetDesktopSize)return;var me=this._screenSize();Te.messages.setDesktopSize(this._sock,Math.floor(me.w),Math.floor(me.h),this._screenID,this._screenFlags),_.Debug("Requested new desktop size: "+me.w+"x"+me.h)}},{key:"_screenSize",value:function(){var me=this._screen.getBoundingClientRect();return{w:me.width,h:me.height}}},{key:"_fixScrollbars",value:function(){var me=this._screen.style.overflow;this._screen.style.overflow="hidden",this._screen.getBoundingClientRect(),this._screen.style.overflow=me}},{key:"_updateConnectionState",value:function(me){var Ie=this,_e=this._rfbConnectionState;if(me===_e){_.Debug("Already in state '"+me+"', ignoring");return}if(_e==="disconnected"){_.Error("Tried changing state of a disconnected RFB object");return}switch(me){case"connected":if(_e!=="connecting"){_.Error("Bad transition to connected state, previous connection state: "+_e);return}break;case"disconnected":if(_e!=="disconnecting"){_.Error("Bad transition to disconnected state, previous connection state: "+_e);return}break;case"connecting":if(_e!==""){_.Error("Bad transition to connecting state, previous connection state: "+_e);return}break;case"disconnecting":if(_e!=="connected"&&_e!=="connecting"){_.Error("Bad transition to disconnecting state, previous connection state: "+_e);return}break;default:_.Error("Unknown connection state: "+me);return}this._rfbConnectionState=me,_.Debug("New state '"+me+"', was '"+_e+"'."),this._disconnTimer&&me!=="disconnecting"&&(_.Debug("Clearing disconnect timer"),clearTimeout(this._disconnTimer),this._disconnTimer=null,this._sock.off("close"));switch(me){case"connecting":this._connect();break;case"connected":this.dispatchEvent(new CustomEvent("connect",{detail:{}}));break;case"disconnecting":this._disconnect(),this._disconnTimer=setTimeout(function(){_.Error("Disconnection timed out."),Ie._updateConnectionState("disconnected")},B*1e3);break;case"disconnected":this.dispatchEvent(new CustomEvent("disconnect",{detail:{clean:this._rfbCleanDisconnect}}));break}}},{key:"_fail",value:function(me){switch(this._rfbConnectionState){case"disconnecting":_.Error("Failed when disconnecting: "+me);break;case"connected":_.Error("Failed while connected: "+me);break;case"connecting":_.Error("Failed when connecting: "+me);break;default:_.Error("RFB failure: "+me);break}return this._rfbCleanDisconnect=!1,this._updateConnectionState("disconnecting"),this._updateConnectionState("disconnected"),!1}},{key:"_setCapability",value:function(me,Ie){this._capabilities[me]=Ie,this.dispatchEvent(new CustomEvent("capabilities",{detail:{capabilities:this._capabilities}}))}},{key:"_handleMessage",value:function(){if(this._sock.rQlen===0){_.Warn("handleMessage called on an empty receive queue");return}switch(this._rfbConnectionState){case"disconnected":_.Error("Got data while disconnected");break;case"connected":for(;!this._flushing;){if(!this._normalMsg())break;if(this._sock.rQlen===0)break}break;default:this._initMsg();break}}},{key:"_handleKeyEvent",value:function(me,Ie,_e){this.sendKey(me,Ie,_e)}},{key:"_handleMouse",value:function(me){if(me.type==="click"&&me.target!==this._canvas)return;if(me.stopPropagation(),me.preventDefault(),me.type==="click"||me.type==="contextmenu")return;var Ie=(0,v.clientToElement)(me.clientX,me.clientY,this._canvas);switch(me.type){case"mousedown":(0,o.setCapture)(this._canvas),this._handleMouseButton(Ie.x,Ie.y,!0,1<<me.button);break;case"mouseup":this._handleMouseButton(Ie.x,Ie.y,!1,1<<me.button);break;case"mousemove":this._handleMouseMove(Ie.x,Ie.y);break}}},{key:"_handleMouseButton",value:function(me,Ie,_e,Ve){if(this.dragViewport)if(_e&&!this._viewportDragging){this._viewportDragging=!0,this._viewportDragPos={x:me,y:Ie},this._viewportHasMoved=!1;return}else{if(this._viewportDragging=!1,this._viewportHasMoved)return;this._sendMouse(me,Ie,Ve)}this._mouseMoveTimer!==null&&(clearTimeout(this._mouseMoveTimer),this._mouseMoveTimer=null,this._sendMouse(me,Ie,this._mouseButtonMask)),_e?this._mouseButtonMask|=Ve:this._mouseButtonMask&=~Ve,this._sendMouse(me,Ie,this._mouseButtonMask)}},{key:"_handleMouseMove",value:function(me,Ie){var _e=this;if(this._viewportDragging){var Ve=this._viewportDragPos.x-me,tt=this._viewportDragPos.y-Ie;(this._viewportHasMoved||Math.abs(Ve)>y.dragThreshold||Math.abs(tt)>y.dragThreshold)&&(this._viewportHasMoved=!0,this._viewportDragPos={x:me,y:Ie},this._display.viewportChangePos(Ve,tt));return}if(this._mousePos={x:me,y:Ie},this._mouseMoveTimer==null){var Ge=Date.now()-this._mouseLastMoveTime;Ge>re?(this._sendMouse(me,Ie,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()):this._mouseMoveTimer=setTimeout(function(){_e._handleDelayedMouseMove()},re-Ge)}}},{key:"_handleDelayedMouseMove",value:function(){this._mouseMoveTimer=null,this._sendMouse(this._mousePos.x,this._mousePos.y,this._mouseButtonMask),this._mouseLastMoveTime=Date.now()}},{key:"_sendMouse",value:function(me,Ie,_e){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;Te.messages.pointerEvent(this._sock,this._display.absX(me),this._display.absY(Ie),_e)}},{key:"_handleWheel",value:function(me){if(this._rfbConnectionState!=="connected")return;if(this._viewOnly)return;me.stopPropagation(),me.preventDefault();var Ie=(0,v.clientToElement)(me.clientX,me.clientY,this._canvas),_e=me.deltaX,Ve=me.deltaY;me.deltaMode!==0&&(_e*=we,Ve*=we),this._accumulatedWheelDeltaX+=_e,this._accumulatedWheelDeltaY+=Ve,Math.abs(this._accumulatedWheelDeltaX)>=he&&(this._accumulatedWheelDeltaX<0?(this._handleMouseButton(Ie.x,Ie.y,!0,1<<5),this._handleMouseButton(Ie.x,Ie.y,!1,1<<5)):this._accumulatedWheelDeltaX>0&&(this._handleMouseButton(Ie.x,Ie.y,!0,1<<6),this._handleMouseButton(Ie.x,Ie.y,!1,1<<6)),this._accumulatedWheelDeltaX=0),Math.abs(this._accumulatedWheelDeltaY)>=he&&(this._accumulatedWheelDeltaY<0?(this._handleMouseButton(Ie.x,Ie.y,!0,1<<3),this._handleMouseButton(Ie.x,Ie.y,!1,1<<3)):this._accumulatedWheelDeltaY>0&&(this._handleMouseButton(Ie.x,Ie.y,!0,1<<4),this._handleMouseButton(Ie.x,Ie.y,!1,1<<4)),this._accumulatedWheelDeltaY=0)}},{key:"_fakeMouseMove",value:function(me,Ie,_e){this._handleMouseMove(Ie,_e),this._cursor.move(me.detail.clientX,me.detail.clientY)}},{key:"_handleTapEvent",value:function(me,Ie){var _e=(0,v.clientToElement)(me.detail.clientX,me.detail.clientY,this._canvas);if(this._gestureLastTapTime!==null&&Date.now()-this._gestureLastTapTime<Oe&&this._gestureFirstDoubleTapEv.detail.type===me.detail.type){var Ve=this._gestureFirstDoubleTapEv.detail.clientX-me.detail.clientX,tt=this._gestureFirstDoubleTapEv.detail.clientY-me.detail.clientY,Ge=Math.hypot(Ve,tt);Ge<Ce?_e=(0,v.clientToElement)(this._gestureFirstDoubleTapEv.detail.clientX,this._gestureFirstDoubleTapEv.detail.clientY,this._canvas):this._gestureFirstDoubleTapEv=me}else this._gestureFirstDoubleTapEv=me;this._gestureLastTapTime=Date.now(),this._fakeMouseMove(this._gestureFirstDoubleTapEv,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,Ie),this._handleMouseButton(_e.x,_e.y,!1,Ie)}},{key:"_handleGesture",value:function(me){var Ie,_e=(0,v.clientToElement)(me.detail.clientX,me.detail.clientY,this._canvas);switch(me.type){case"gesturestart":switch(me.detail.type){case"onetap":this._handleTapEvent(me,1);break;case"twotap":this._handleTapEvent(me,4);break;case"threetap":this._handleTapEvent(me,2);break;case"drag":this._fakeMouseMove(me,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,1);break;case"longpress":this._fakeMouseMove(me,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!0,4);break;case"twodrag":this._gestureLastMagnitudeX=me.detail.magnitudeX,this._gestureLastMagnitudeY=me.detail.magnitudeY,this._fakeMouseMove(me,_e.x,_e.y);break;case"pinch":this._gestureLastMagnitudeX=Math.hypot(me.detail.magnitudeX,me.detail.magnitudeY),this._fakeMouseMove(me,_e.x,_e.y);break}break;case"gesturemove":switch(me.detail.type){case"onetap":case"twotap":case"threetap":break;case"drag":case"longpress":this._fakeMouseMove(me,_e.x,_e.y);break;case"twodrag":for(this._fakeMouseMove(me,_e.x,_e.y);me.detail.magnitudeY-this._gestureLastMagnitudeY>ne;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeY+=ne;for(;me.detail.magnitudeY-this._gestureLastMagnitudeY<-ne;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeY-=ne;for(;me.detail.magnitudeX-this._gestureLastMagnitudeX>ne;)this._handleMouseButton(_e.x,_e.y,!0,32),this._handleMouseButton(_e.x,_e.y,!1,32),this._gestureLastMagnitudeX+=ne;for(;me.detail.magnitudeX-this._gestureLastMagnitudeX<-ne;)this._handleMouseButton(_e.x,_e.y,!0,64),this._handleMouseButton(_e.x,_e.y,!1,64),this._gestureLastMagnitudeX-=ne;break;case"pinch":if(this._fakeMouseMove(me,_e.x,_e.y),Ie=Math.hypot(me.detail.magnitudeX,me.detail.magnitudeY),Math.abs(Ie-this._gestureLastMagnitudeX)>ke){for(this._handleKeyEvent(r.default.XK_Control_L,"ControlLeft",!0);Ie-this._gestureLastMagnitudeX>ke;)this._handleMouseButton(_e.x,_e.y,!0,8),this._handleMouseButton(_e.x,_e.y,!1,8),this._gestureLastMagnitudeX+=ke;for(;Ie-this._gestureLastMagnitudeX<-ke;)this._handleMouseButton(_e.x,_e.y,!0,16),this._handleMouseButton(_e.x,_e.y,!1,16),this._gestureLastMagnitudeX-=ke}this._handleKeyEvent(r.default.XK_Control_L,"ControlLeft",!1);break}break;case"gestureend":switch(me.detail.type){case"onetap":case"twotap":case"threetap":case"pinch":case"twodrag":break;case"drag":this._fakeMouseMove(me,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!1,1);break;case"longpress":this._fakeMouseMove(me,_e.x,_e.y),this._handleMouseButton(_e.x,_e.y,!1,4);break}break}}},{key:"_negotiateProtocolVersion",value:function(){if(this._sock.rQwait("version",12))return!1;var me=this._sock.rQshiftStr(12).substr(4,7);_.Info("Server ProtocolVersion: "+me);var Ie=0;switch(me){case"000.000":Ie=1;break;case"003.003":case"003.006":case"003.889":this._rfbVersion=3.3;break;case"003.007":this._rfbVersion=3.7;break;case"003.008":case"004.000":case"004.001":case"005.000":this._rfbVersion=3.8;break;default:return this._fail("Invalid server version "+me)}if(Ie){for(var _e="ID:"+this._repeaterID;_e.length<250;)_e+="\0";return this._sock.sendString(_e),!0}this._rfbVersion>this._rfbMaxVersion&&(this._rfbVersion=this._rfbMaxVersion);var Ve="00"+parseInt(this._rfbVersion,10)+".00"+this._rfbVersion*10%10;this._sock.sendString("RFB "+Ve+`
|
|
|
`),_.Debug("Sent ProtocolVersion: "+Ve),this._rfbInitState="Security"}},{key:"_negotiateSecurity",value:function(){function me(Ve,tt){for(var Ge=0;Ge<tt.length;Ge++)if(tt[Ge]===Ve)return!0;return!1}if(this._rfbVersion>=3.7){var Ie=this._sock.rQshift8();if(this._sock.rQwait("security type",Ie,1))return!1;if(Ie===0)return this._rfbInitState="SecurityReason",this._securityContext="no security types",this._securityStatus=1,this._initMsg();var _e=this._sock.rQshiftBytes(Ie);if(_.Debug("Server security types: "+_e),me(1,_e))this._rfbAuthScheme=1;else if(me(22,_e))this._rfbAuthScheme=22;else if(me(16,_e))this._rfbAuthScheme=16;else if(me(2,_e))this._rfbAuthScheme=2;else if(me(19,_e))this._rfbAuthScheme=19;else return this._fail("Unsupported security types (types: "+_e+")");this._sock.send([this._rfbAuthScheme])}else{if(this._sock.rQwait("security scheme",4))return!1;if(this._rfbAuthScheme=this._sock.rQshift32(),this._rfbAuthScheme==0)return this._rfbInitState="SecurityReason",this._securityContext="authentication scheme",this._securityStatus=1,this._initMsg()}return this._rfbInitState="Authentication",_.Debug("Authenticating using scheme: "+this._rfbAuthScheme),this._initMsg()}},{key:"_handleSecurityReason",value:function(){if(this._sock.rQwait("reason length",4))return!1;var me=this._sock.rQshift32(),Ie="";if(me>0){if(this._sock.rQwait("reason",me,4))return!1;Ie=this._sock.rQshiftStr(me)}return Ie!==""?(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus,reason:Ie}})),this._fail("Security negotiation failed on "+this._securityContext+" (reason: "+Ie+")")):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:this._securityStatus}})),this._fail("Security negotiation failed on "+this._securityContext))}},{key:"_negotiateXvpAuth",value:function(){if(this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0||this._rfbCredentials.target===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password","target"]}})),!1;var me=String.fromCharCode(this._rfbCredentials.username.length)+String.fromCharCode(this._rfbCredentials.target.length)+this._rfbCredentials.username+this._rfbCredentials.target;return this._sock.sendString(me),this._rfbAuthScheme=2,this._negotiateAuthentication()}},{key:"_negotiateVeNCryptAuth",value:function(){if(this._rfbVeNCryptState==0){if(this._sock.rQwait("vencrypt version",2))return!1;var me=this._sock.rQshift8(),Ie=this._sock.rQshift8();if(!(me==0&&Ie==2))return this._fail("Unsupported VeNCrypt version "+me+"."+Ie);this._sock.send([0,2]),this._rfbVeNCryptState=1}if(this._rfbVeNCryptState==1){if(this._sock.rQwait("vencrypt ack",1))return!1;var _e=this._sock.rQshift8();if(_e!=0)return this._fail("VeNCrypt failure "+_e);this._rfbVeNCryptState=2}if(this._rfbVeNCryptState==2){if(this._sock.rQwait("vencrypt subtypes length",1))return!1;var Ve=this._sock.rQshift8();if(Ve<1)return this._fail("VeNCrypt subtypes empty");this._rfbVeNCryptSubtypesLength=Ve,this._rfbVeNCryptState=3}if(this._rfbVeNCryptState==3){if(this._sock.rQwait("vencrypt subtypes",4*this._rfbVeNCryptSubtypesLength))return!1;for(var tt=[],Ge=0;Ge<this._rfbVeNCryptSubtypesLength;Ge++)tt.push(this._sock.rQshift32());if(tt.indexOf(256)!=-1)this._sock.send([0,0,1,0]),this._rfbVeNCryptState=4;else return this._fail("VeNCrypt Plain subtype not offered by server")}if(this._rfbVeNCryptState==4){if(!this._rfbCredentials.username||!this._rfbCredentials.password)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1;var Le=(0,O.encodeUTF8)(this._rfbCredentials.username),bt=(0,O.encodeUTF8)(this._rfbCredentials.password);return this._sock.send([0,0,0,Le.length]),this._sock.send([0,0,0,bt.length]),this._sock.sendString(Le),this._sock.sendString(bt),this._rfbInitState="SecurityResult",!0}}},{key:"_negotiateStdVNCAuth",value:function(){if(this._sock.rQwait("auth challenge",16))return!1;if(this._rfbCredentials.password===void 0)return this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["password"]}})),!1;var me=Array.prototype.slice.call(this._sock.rQshiftBytes(16)),Ie=Te.genDES(this._rfbCredentials.password,me);return this._sock.send(Ie),this._rfbInitState="SecurityResult",!0}},{key:"_negotiateTightUnixAuth",value:function(){return this._rfbCredentials.username===void 0||this._rfbCredentials.password===void 0?(this.dispatchEvent(new CustomEvent("credentialsrequired",{detail:{types:["username","password"]}})),!1):(this._sock.send([0,0,0,this._rfbCredentials.username.length]),this._sock.send([0,0,0,this._rfbCredentials.password.length]),this._sock.sendString(this._rfbCredentials.username),this._sock.sendString(this._rfbCredentials.password),this._rfbInitState="SecurityResult",!0)}},{key:"_negotiateTightTunnels",value:function(me){for(var Ie={0:{vendor:"TGHT",signature:"NOTUNNEL"}},_e={},Ve=0;Ve<me;Ve++){var tt=this._sock.rQshift32(),Ge=this._sock.rQshiftStr(4),Le=this._sock.rQshiftStr(8);_e[tt]={vendor:Ge,signature:Le}}return _.Debug("Server Tight tunnel types: "+_e),_e[1]&&_e[1].vendor==="SICR"&&_e[1].signature==="SCHANNEL"&&(_.Debug("Detected Siemens server. Assuming NOTUNNEL support."),_e[0]={vendor:"TGHT",signature:"NOTUNNEL"}),_e[0]?_e[0].vendor!=Ie[0].vendor||_e[0].signature!=Ie[0].signature?this._fail("Client's tunnel type had the incorrect vendor or signature"):(_.Debug("Selected tunnel type: "+Ie[0]),this._sock.send([0,0,0,0]),!1):this._fail("Server wanted tunnels, but doesn't support the notunnel type")}},{key:"_negotiateTightAuth",value:function(){if(!this._rfbTightVNC){if(this._sock.rQwait("num tunnels",4))return!1;var me=this._sock.rQshift32();if(me>0&&this._sock.rQwait("tunnel capabilities",16*me,4))return!1;if(this._rfbTightVNC=!0,me>0)return this._negotiateTightTunnels(me),!1}if(this._sock.rQwait("sub auth count",4))return!1;var Ie=this._sock.rQshift32();if(Ie===0)return this._rfbInitState="SecurityResult",!0;if(this._sock.rQwait("sub auth capabilities",16*Ie,4))return!1;for(var _e={STDVNOAUTH__:1,STDVVNCAUTH_:2,TGHTULGNAUTH:129},Ve=[],tt=0;tt<Ie;tt++){this._sock.rQshift32();var Ge=this._sock.rQshiftStr(12);Ve.push(Ge)}_.Debug("Server Tight authentication types: "+Ve);for(var Le in _e)if(Ve.indexOf(Le)!=-1){this._sock.send([0,0,0,_e[Le]]),_.Debug("Selected authentication type: "+Le);switch(Le){case"STDVNOAUTH__":return this._rfbInitState="SecurityResult",!0;case"STDVVNCAUTH_":return this._rfbAuthScheme=2,this._initMsg();case"TGHTULGNAUTH":return this._rfbAuthScheme=129,this._initMsg();default:return this._fail("Unsupported tiny auth scheme (scheme: "+Le+")")}}return this._fail("No supported sub-auth types!")}},{key:"_negotiateAuthentication",value:function(){switch(this._rfbAuthScheme){case 1:return this._rfbVersion>=3.8?(this._rfbInitState="SecurityResult",!0):(this._rfbInitState="ClientInitialisation",this._initMsg());case 22:return this._negotiateXvpAuth();case 2:return this._negotiateStdVNCAuth();case 16:return this._negotiateTightAuth();case 19:return this._negotiateVeNCryptAuth();case 129:return this._negotiateTightUnixAuth();default:return this._fail("Unsupported auth scheme (scheme: "+this._rfbAuthScheme+")")}}},{key:"_handleSecurityResult",value:function(){if(this._sock.rQwait("VNC auth response ",4))return!1;var me=this._sock.rQshift32();return me===0?(this._rfbInitState="ClientInitialisation",_.Debug("Authentication OK"),this._initMsg()):this._rfbVersion>=3.8?(this._rfbInitState="SecurityReason",this._securityContext="security result",this._securityStatus=me,this._initMsg()):(this.dispatchEvent(new CustomEvent("securityfailure",{detail:{status:me}})),this._fail("Security handshake failed"))}},{key:"_negotiateServerInit",value:function(){if(this._sock.rQwait("server initialization",24))return!1;var me=this._sock.rQshift16(),Ie=this._sock.rQshift16(),_e=this._sock.rQshift8(),Ve=this._sock.rQshift8(),tt=this._sock.rQshift8(),Ge=this._sock.rQshift8(),Le=this._sock.rQshift16(),bt=this._sock.rQshift16(),Re=this._sock.rQshift16(),Xe=this._sock.rQshift8(),et=this._sock.rQshift8(),Ye=this._sock.rQshift8();this._sock.rQskipBytes(3);var Me=this._sock.rQshift32();if(this._sock.rQwait("server init name",Me,24))return!1;var Ke=this._sock.rQshiftStr(Me);if(Ke=(0,O.decodeUTF8)(Ke,!0),this._rfbTightVNC){if(this._sock.rQwait("TightVNC extended server init header",8,24+Me))return!1;var ge=this._sock.rQshift16(),Ee=this._sock.rQshift16(),ce=this._sock.rQshift16();this._sock.rQskipBytes(2);var je=(ge+Ee+ce)*16;if(this._sock.rQwait("TightVNC extended server init header",je,32+Me))return!1;this._sock.rQskipBytes(16*ge),this._sock.rQskipBytes(16*Ee),this._sock.rQskipBytes(16*ce)}return _.Info("Screen: "+me+"x"+Ie+", bpp: "+_e+", depth: "+Ve+", bigEndian: "+tt+", trueColor: "+Ge+", redMax: "+Le+", greenMax: "+bt+", blueMax: "+Re+", redShift: "+Xe+", greenShift: "+et+", blueShift: "+Ye),this._setDesktopName(Ke),this._resize(me,Ie),this._viewOnly||this._keyboard.grab(),this._fbDepth=24,this._fbName==="Intel(r) AMT KVM"&&(_.Warn("Intel AMT KVM only supports 8/16 bit depths. Using low color mode."),this._fbDepth=8),Te.messages.pixelFormat(this._sock,this._fbDepth,!0),this._sendEncodings(),Te.messages.fbUpdateRequest(this._sock,!1,0,0,this._fbWidth,this._fbHeight),this._updateConnectionState("connected"),!0}},{key:"_sendEncodings",value:function(){var me=[];me.push(u.encodings.encodingCopyRect),this._fbDepth==24&&(me.push(u.encodings.encodingTight),me.push(u.encodings.encodingTightPNG),me.push(u.encodings.encodingHextile),me.push(u.encodings.encodingRRE)),me.push(u.encodings.encodingRaw),me.push(u.encodings.pseudoEncodingQualityLevel0+this._qualityLevel),me.push(u.encodings.pseudoEncodingCompressLevel0+this._compressionLevel),me.push(u.encodings.pseudoEncodingDesktopSize),me.push(u.encodings.pseudoEncodingLastRect),me.push(u.encodings.pseudoEncodingQEMUExtendedKeyEvent),me.push(u.encodings.pseudoEncodingExtendedDesktopSize),me.push(u.encodings.pseudoEncodingXvp),me.push(u.encodings.pseudoEncodingFence),me.push(u.encodings.pseudoEncodingContinuousUpdates),me.push(u.encodings.pseudoEncodingDesktopName),me.push(u.encodings.pseudoEncodingExtendedClipboard),this._fbDepth==24&&(me.push(u.encodings.pseudoEncodingVMwareCursor),me.push(u.encodings.pseudoEncodingCursor)),Te.messages.clientEncodings(this._sock,me)}},{key:"_initMsg",value:function(){switch(this._rfbInitState){case"ProtocolVersion":return this._negotiateProtocolVersion();case"Security":return this._negotiateSecurity();case"Authentication":return this._negotiateAuthentication();case"SecurityResult":return this._handleSecurityResult();case"SecurityReason":return this._handleSecurityReason();case"ClientInitialisation":return this._sock.send([this._shared?1:0]),this._rfbInitState="ServerInitialisation",!0;case"ServerInitialisation":return this._negotiateServerInit();default:return this._fail("Unknown init state (state: "+this._rfbInitState+")")}}},{key:"_handleSetColourMapMsg",value:function(){return _.Debug("SetColorMapEntries"),this._fail("Unexpected SetColorMapEntries message")}},{key:"_handleServerCutText",value:function(){if(_.Debug("ServerCutText"),this._sock.rQwait("ServerCutText header",7,1))return!1;this._sock.rQskipBytes(3);var me=this._sock.rQshift32();if(me=(0,I.toSigned32bit)(me),this._sock.rQwait("ServerCutText content",Math.abs(me),8))return!1;if(me>=0){var Ie=this._sock.rQshiftStr(me);if(this._viewOnly)return!0;this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:Ie}}))}else{me=Math.abs(me);var _e=this._sock.rQshift32(),Ve=_e&65535,tt=_e&4278190080,Ge=!!(tt&de);if(Ge){this._clipboardServerCapabilitiesFormats={},this._clipboardServerCapabilitiesActions={};for(var Le=0;Le<=15;Le++){var bt=1<<Le;Ve&bt&&(this._clipboardServerCapabilitiesFormats[bt]=!0,this._sock.rQshift32())}for(var Re=24;Re<=31;Re++){var Xe=1<<Re;this._clipboardServerCapabilitiesActions[Xe]=!!(tt&Xe)}var et=[de,Fe,ae,Z,Y];Te.messages.extendedClipboardCaps(this._sock,et,{extendedClipboardFormatText:0})}else if(tt===Fe){if(this._viewOnly)return!0;this._clipboardText!=null&&this._clipboardServerCapabilitiesActions[Y]&&(Ve&fe&&Te.messages.extendedClipboardProvide(this._sock,[fe],[this._clipboardText]))}else if(tt===ae){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[Z]&&(this._clipboardText!=null?Te.messages.extendedClipboardNotify(this._sock,[fe]):Te.messages.extendedClipboardNotify(this._sock,[]))}else if(tt===Z){if(this._viewOnly)return!0;this._clipboardServerCapabilitiesActions[Fe]&&(Ve&fe&&Te.messages.extendedClipboardRequest(this._sock,[fe]))}else if(tt===Y){if(this._viewOnly)return!0;if(!(Ve&fe))return!0;this._clipboardText=null;var Ye=this._sock.rQshiftBytes(me-4),Me=new d.default,Ke=null;Me.setInput(Ye);for(var ge=0;ge<=15;ge++){var Ee=1<<ge;if(Ve&Ee){var ce=0,je=Me.inflate(4);ce|=je[0]<<24,ce|=je[1]<<16,ce|=je[2]<<8,ce|=je[3];var Qe=Me.inflate(ce);Ee===fe&&(Ke=Qe)}}if(Me.setInput(null),Ke!==null){for(var te="",Je=0;Je<Ke.length;Je++)te+=String.fromCharCode(Ke[Je]);Ke=te,Ke=(0,O.decodeUTF8)(Ke),Ke.length>0&&Ke.charAt(Ke.length-1)==="\0"&&(Ke=Ke.slice(0,-1)),Ke=Ke.replace(`\r
|
|
|
`,`
|
|
|
`),this.dispatchEvent(new CustomEvent("clipboard",{detail:{text:Ke}}))}}else return this._fail("Unexpected action in extended clipboard message: "+tt)}return!0}},{key:"_handleServerFenceMsg",value:function(){if(this._sock.rQwait("ServerFence header",8,1))return!1;this._sock.rQskipBytes(3);var me=this._sock.rQshift32(),Ie=this._sock.rQshift8();if(this._sock.rQwait("ServerFence payload",Ie,9))return!1;Ie>64&&(_.Warn("Bad payload length ("+Ie+") in fence response"),Ie=64);var _e=this._sock.rQshiftStr(Ie);return this._supportsFence=!0,me&1<<31?(me&=1<<0|1<<1,Te.messages.clientFence(this._sock,me,_e),!0):this._fail("Unexpected fence response")}},{key:"_handleXvpMsg",value:function(){if(this._sock.rQwait("XVP version and message",3,1))return!1;this._sock.rQskipBytes(1);var me=this._sock.rQshift8(),Ie=this._sock.rQshift8();switch(Ie){case 0:_.Error("XVP Operation Failed");break;case 1:this._rfbXvpVer=me,_.Info("XVP extensions enabled (version "+this._rfbXvpVer+")"),this._setCapability("power",!0);break;default:this._fail("Illegal server XVP message (msg: "+Ie+")");break}return!0}},{key:"_normalMsg",value:function(){var me;this._FBU.rects>0?me=0:me=this._sock.rQshift8();var Ie,_e;switch(me){case 0:return _e=this._framebufferUpdate(),_e&&!this._enabledContinuousUpdates&&Te.messages.fbUpdateRequest(this._sock,!0,0,0,this._fbWidth,this._fbHeight),_e;case 1:return this._handleSetColourMapMsg();case 2:return _.Debug("Bell"),this.dispatchEvent(new CustomEvent("bell",{detail:{}})),!0;case 3:return this._handleServerCutText();case 150:return Ie=!this._supportsContinuousUpdates,this._supportsContinuousUpdates=!0,this._enabledContinuousUpdates=!1,Ie&&(this._enabledContinuousUpdates=!0,this._updateContinuousUpdates(),_.Info("Enabling continuous updates.")),!0;case 248:return this._handleServerFenceMsg();case 250:return this._handleXvpMsg();default:return this._fail("Unexpected server message (type "+me+")"),_.Debug("sock.rQslice(0, 30): "+this._sock.rQslice(0,30)),!0}}},{key:"_onFlush",value:function(){this._flushing=!1,this._sock.rQlen>0&&this._handleMessage()}},{key:"_framebufferUpdate",value:function(){if(this._FBU.rects===0){if(this._sock.rQwait("FBU header",3,1))return!1;if(this._sock.rQskipBytes(1),this._FBU.rects=this._sock.rQshift16(),this._display.pending())return this._flushing=!0,this._display.flush(),!1}for(;this._FBU.rects>0;){if(this._FBU.encoding===null){if(this._sock.rQwait("rect header",12))return!1;var me=this._sock.rQshiftBytes(12);this._FBU.x=(me[0]<<8)+me[1],this._FBU.y=(me[2]<<8)+me[3],this._FBU.width=(me[4]<<8)+me[5],this._FBU.height=(me[6]<<8)+me[7],this._FBU.encoding=parseInt((me[8]<<24)+(me[9]<<16)+(me[10]<<8)+me[11],10)}if(!this._handleRect())return!1;this._FBU.rects--,this._FBU.encoding=null}return this._display.flip(),!0}},{key:"_handleRect",value:function(){switch(this._FBU.encoding){case u.encodings.pseudoEncodingLastRect:return this._FBU.rects=1,!0;case u.encodings.pseudoEncodingVMwareCursor:return this._handleVMwareCursor();case u.encodings.pseudoEncodingCursor:return this._handleCursor();case u.encodings.pseudoEncodingQEMUExtendedKeyEvent:try{var me=document.createEvent("keyboardEvent");me.code!==void 0&&(this._qemuExtKeyEventSupported=!0)}catch(Ie){}return!0;case u.encodings.pseudoEncodingDesktopName:return this._handleDesktopName();case u.encodings.pseudoEncodingDesktopSize:return this._resize(this._FBU.width,this._FBU.height),!0;case u.encodings.pseudoEncodingExtendedDesktopSize:return this._handleExtendedDesktopSize();default:return this._handleDataRect()}}},{key:"_handleVMwareCursor",value:function(){var me=this._FBU.x,Ie=this._FBU.y,_e=this._FBU.width,Ve=this._FBU.height;if(this._sock.rQwait("VMware cursor encoding",1))return!1;var tt=this._sock.rQshift8();this._sock.rQshift8();var Ge,Le=4;if(tt==0){var bt=4294967040|0;if(Ge=new Array(_e*Ve*Le),this._sock.rQwait("VMware cursor classic encoding",_e*Ve*Le*2,2))return!1;for(var Re=new Array(_e*Ve),Xe=0;Xe<_e*Ve;Xe++)Re[Xe]=this._sock.rQshift32();for(var et=new Array(_e*Ve),Ye=0;Ye<_e*Ve;Ye++)et[Ye]=this._sock.rQshift32();for(var Me=0;Me<_e*Ve;Me++)if(Re[Me]==0){var Ke=et[Me],ge=Ke>>8&255,Ee=Ke>>16&255,ce=Ke>>24&255;Ge[Me*Le]=ge,Ge[Me*Le+1]=Ee,Ge[Me*Le+2]=ce,Ge[Me*Le+3]=255}else(Re[Me]&bt)==bt?et[Me]==0?(Ge[Me*Le]=0,Ge[Me*Le+1]=0,Ge[Me*Le+2]=0,Ge[Me*Le+3]=0):((et[Me]&bt)==bt,Ge[Me*Le]=0,Ge[Me*Le+1]=0,Ge[Me*Le+2]=0,Ge[Me*Le+3]=255):(Ge[Me*Le]=0,Ge[Me*Le+1]=0,Ge[Me*Le+2]=0,Ge[Me*Le+3]=255)}else if(tt==1){if(this._sock.rQwait("VMware cursor alpha encoding",_e*Ve*4,2))return!1;Ge=new Array(_e*Ve*Le);for(var je=0;je<_e*Ve;je++){var Qe=this._sock.rQshift32();Ge[je*4]=Qe>>24&255,Ge[je*4+1]=Qe>>16&255,Ge[je*4+2]=Qe>>8&255,Ge[je*4+3]=Qe&255}}else return _.Warn("The given cursor type is not supported: "+tt+" given."),!1;return this._updateCursor(Ge,me,Ie,_e,Ve),!0}},{key:"_handleCursor",value:function(){var me=this._FBU.x,Ie=this._FBU.y,_e=this._FBU.width,Ve=this._FBU.height,tt=_e*Ve*4,Ge=Math.ceil(_e/8)*Ve,Le=tt+Ge;if(this._sock.rQwait("cursor encoding",Le))return!1;for(var bt=this._sock.rQshiftBytes(tt),Re=this._sock.rQshiftBytes(Ge),Xe=new Uint8Array(_e*Ve*4),et=0,Ye=0;Ye<Ve;Ye++)for(var Me=0;Me<_e;Me++){var Ke=Ye*Math.ceil(_e/8)+Math.floor(Me/8),ge=Re[Ke]<<Me%8&128?255:0;Xe[et]=bt[et+2],Xe[et+1]=bt[et+1],Xe[et+2]=bt[et],Xe[et+3]=ge,et+=4}return this._updateCursor(Xe,me,Ie,_e,Ve),!0}},{key:"_handleDesktopName",value:function(){if(this._sock.rQwait("DesktopName",4))return!1;var me=this._sock.rQshift32();if(this._sock.rQwait("DesktopName",me,4))return!1;var Ie=this._sock.rQshiftStr(me);return Ie=(0,O.decodeUTF8)(Ie,!0),this._setDesktopName(Ie),!0}},{key:"_handleExtendedDesktopSize",value:function(){if(this._sock.rQwait("ExtendedDesktopSize",4))return!1;var me=this._sock.rQpeek8(),Ie=4+me*16;if(this._sock.rQwait("ExtendedDesktopSize",Ie))return!1;var _e=!this._supportsSetDesktopSize;this._supportsSetDesktopSize=!0,_e&&this._requestRemoteResize(),this._sock.rQskipBytes(1),this._sock.rQskipBytes(3);for(var Ve=0;Ve<me;Ve+=1)Ve===0?(this._screenID=this._sock.rQshiftBytes(4),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._sock.rQskipBytes(2),this._screenFlags=this._sock.rQshiftBytes(4)):this._sock.rQskipBytes(16);if(this._FBU.x===1&&this._FBU.y!==0){var tt="";switch(this._FBU.y){case 1:tt="Resize is administratively prohibited";break;case 2:tt="Out of resources";break;case 3:tt="Invalid screen layout";break;default:tt="Unknown reason";break}_.Warn("Server did not accept the resize request: "+tt)}else this._resize(this._FBU.width,this._FBU.height);return!0}},{key:"_handleDataRect",value:function(){var me=this._decoders[this._FBU.encoding];if(!me)return this._fail("Unsupported encoding (encoding: "+this._FBU.encoding+")"),!1;try{return me.decodeRect(this._FBU.x,this._FBU.y,this._FBU.width,this._FBU.height,this._sock,this._display,this._fbDepth)}catch(Ie){return this._fail("Error decoding rect: "+Ie),!1}}},{key:"_updateContinuousUpdates",value:function(){if(!this._enabledContinuousUpdates)return;Te.messages.enableContinuousUpdates(this._sock,!0,0,0,this._fbWidth,this._fbHeight)}},{key:"_resize",value:function(me,Ie){this._fbWidth=me,this._fbHeight=Ie,this._display.resize(this._fbWidth,this._fbHeight),this._updateClip(),this._updateScale(),this._updateContinuousUpdates()}},{key:"_xvpOp",value:function(me,Ie){if(this._rfbXvpVer<me)return;_.Info("Sending XVP operation "+Ie+" (version "+me+")"),Te.messages.xvpOp(this._sock,me,Ie)}},{key:"_updateCursor",value:function(me,Ie,_e,Ve,tt){this._cursorImage={rgbaPixels:me,hotx:Ie,hoty:_e,w:Ve,h:tt},this._refreshCursor()}},{key:"_shouldShowDotCursor",value:function(){if(!this._showDotCursor)return!1;for(var me=3;me<this._cursorImage.rgbaPixels.length;me+=4)if(this._cursorImage.rgbaPixels[me])return!1;return!0}},{key:"_refreshCursor",value:function(){if(this._rfbConnectionState!=="connecting"&&this._rfbConnectionState!=="connected")return;var me=this._shouldShowDotCursor()?Te.cursors.dot:this._cursorImage;this._cursor.change(me.rgbaPixels,me.hotx,me.hoty,me.w,me.h)}},{key:"viewOnly",get:function(){return this._viewOnly},set:function(me){this._viewOnly=me,(this._rfbConnectionState==="connecting"||this._rfbConnectionState==="connected")&&(me?this._keyboard.ungrab():this._keyboard.grab())}},{key:"capabilities",get:function(){return this._capabilities}},{key:"touchButton",get:function(){return 0},set:function(me){_.Warn("Using old API!")}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(me){this._clipViewport=me,this._updateClip()}},{key:"scaleViewport",get:function(){return this._scaleViewport},set:function(me){this._scaleViewport=me,me&&this._clipViewport&&this._updateClip(),this._updateScale(),!me&&this._clipViewport&&this._updateClip()}},{key:"resizeSession",get:function(){return this._resizeSession},set:function(me){this._resizeSession=me,me&&this._requestRemoteResize()}},{key:"showDotCursor",get:function(){return this._showDotCursor},set:function(me){this._showDotCursor=me,this._refreshCursor()}},{key:"background",get:function(){return this._screen.style.background},set:function(me){this._screen.style.background=me}},{key:"qualityLevel",get:function(){return this._qualityLevel},set:function(me){if(!Number.isInteger(me)||me<0||me>9){_.Error("qualityLevel must be an integer between 0 and 9");return}if(this._qualityLevel===me)return;this._qualityLevel=me,this._rfbConnectionState==="connected"&&this._sendEncodings()}},{key:"compressionLevel",get:function(){return this._compressionLevel},set:function(me){if(!Number.isInteger(me)||me<0||me>9){_.Error("compressionLevel must be an integer between 0 and 9");return}if(this._compressionLevel===me)return;this._compressionLevel=me,this._rfbConnectionState==="connected"&&this._sendEncodings()}}],[{key:"genDES",value:function(me,Ie){var _e=me.split("").map(function(Ve){return Ve.charCodeAt(0)});return new e.default(_e).encrypt(Ie)}}]),Te}(g.default);X.default=q,q.messages={keyEvent:function(pe,Te,Ne){var me=pe._sQ,Ie=pe._sQlen;me[Ie]=4,me[Ie+1]=Ne,me[Ie+2]=0,me[Ie+3]=0,me[Ie+4]=Te>>24,me[Ie+5]=Te>>16,me[Ie+6]=Te>>8,me[Ie+7]=Te,pe._sQlen+=8,pe.flush()},QEMUExtendedKeyEvent:function(pe,Te,Ne,me){function Ie(Ge){var Le=me>>8,bt=me&255;return Le===224&&bt<127?bt|128:Ge}var _e=pe._sQ,Ve=pe._sQlen;_e[Ve]=255,_e[Ve+1]=0,_e[Ve+2]=Ne>>8,_e[Ve+3]=Ne,_e[Ve+4]=Te>>24,_e[Ve+5]=Te>>16,_e[Ve+6]=Te>>8,_e[Ve+7]=Te;var tt=Ie(me);_e[Ve+8]=tt>>24,_e[Ve+9]=tt>>16,_e[Ve+10]=tt>>8,_e[Ve+11]=tt,pe._sQlen+=12,pe.flush()},pointerEvent:function(pe,Te,Ne,me){var Ie=pe._sQ,_e=pe._sQlen;Ie[_e]=5,Ie[_e+1]=me,Ie[_e+2]=Te>>8,Ie[_e+3]=Te,Ie[_e+4]=Ne>>8,Ie[_e+5]=Ne,pe._sQlen+=6,pe.flush()},_buildExtendedClipboardFlags:function(pe,Te){for(var Ne=new Uint8Array(4),me=0,Ie=0,_e=0;_e<pe.length;_e++)Ie|=pe[_e];for(var Ve=0;Ve<Te.length;Ve++)me|=Te[Ve];return Ne[0]=Ie>>24,Ne[1]=0,Ne[2]=0,Ne[3]=me,Ne},extendedClipboardProvide:function(pe,Te,Ne){for(var me=new a.default,Ie=[],_e=0;_e<Te.length;_e++){if(Te[_e]!=fe)throw new Error("Unsupported extended clipboard format for Provide message.");Ne[_e]=Ne[_e].replace(/\r\n|\r|\n/gm,`\r
|
|
|
`);var Ve=(0,O.encodeUTF8)(Ne[_e]+"\0");Ie.push(Ve.length>>24&255,Ve.length>>16&255,Ve.length>>8&255,Ve.length&255);for(var tt=0;tt<Ve.length;tt++)Ie.push(Ve.charCodeAt(tt))}var Ge=me.deflate(new Uint8Array(Ie)),Le=new Uint8Array(4+Ge.length);Le.set(q.messages._buildExtendedClipboardFlags([Y],Te)),Le.set(Ge,4),q.messages.clientCutText(pe,Le,!0)},extendedClipboardNotify:function(pe,Te){var Ne=q.messages._buildExtendedClipboardFlags([Z],Te);q.messages.clientCutText(pe,Ne,!0)},extendedClipboardRequest:function(pe,Te){var Ne=q.messages._buildExtendedClipboardFlags([Fe],Te);q.messages.clientCutText(pe,Ne,!0)},extendedClipboardCaps:function(pe,Te,Ne){var me=Object.keys(Ne),Ie=new Uint8Array(4+4*me.length);me.map(function(tt){return parseInt(tt)}),me.sort(function(tt,Ge){return tt-Ge}),Ie.set(q.messages._buildExtendedClipboardFlags(Te,[]));for(var _e=4,Ve=0;Ve<me.length;Ve++)Ie[_e]=Ne[me[Ve]]>>24,Ie[_e+1]=Ne[me[Ve]]>>16,Ie[_e+2]=Ne[me[Ve]]>>8,Ie[_e+3]=Ne[me[Ve]]>>0,_e+=4,Ie[3]|=1<<me[Ve];q.messages.clientCutText(pe,Ie,!0)},clientCutText:function(pe,Te){var Ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,me=pe._sQ,Ie=pe._sQlen;me[Ie]=6,me[Ie+1]=0,me[Ie+2]=0,me[Ie+3]=0;var _e;Ne?_e=(0,I.toUnsigned32bit)(-Te.length):_e=Te.length,me[Ie+4]=_e>>24,me[Ie+5]=_e>>16,me[Ie+6]=_e>>8,me[Ie+7]=_e,pe._sQlen+=8;for(var Ve=0,tt=Te.length;tt>0;){for(var Ge=Math.min(tt,pe._sQbufferSize-pe._sQlen),Le=0;Le<Ge;Le++)me[pe._sQlen+Le]=Te[Ve+Le];pe._sQlen+=Ge,pe.flush(),tt-=Ge,Ve+=Ge}},setDesktopSize:function(pe,Te,Ne,me,Ie){var _e=pe._sQ,Ve=pe._sQlen;_e[Ve]=251,_e[Ve+1]=0,_e[Ve+2]=Te>>8,_e[Ve+3]=Te,_e[Ve+4]=Ne>>8,_e[Ve+5]=Ne,_e[Ve+6]=1,_e[Ve+7]=0,_e[Ve+8]=me>>24,_e[Ve+9]=me>>16,_e[Ve+10]=me>>8,_e[Ve+11]=me,_e[Ve+12]=0,_e[Ve+13]=0,_e[Ve+14]=0,_e[Ve+15]=0,_e[Ve+16]=Te>>8,_e[Ve+17]=Te,_e[Ve+18]=Ne>>8,_e[Ve+19]=Ne,_e[Ve+20]=Ie>>24,_e[Ve+21]=Ie>>16,_e[Ve+22]=Ie>>8,_e[Ve+23]=Ie,pe._sQlen+=24,pe.flush()},clientFence:function(pe,Te,Ne){var me=pe._sQ,Ie=pe._sQlen;me[Ie]=248,me[Ie+1]=0,me[Ie+2]=0,me[Ie+3]=0,me[Ie+4]=Te>>24,me[Ie+5]=Te>>16,me[Ie+6]=Te>>8,me[Ie+7]=Te;var _e=Ne.length;me[Ie+8]=_e;for(var Ve=0;Ve<_e;Ve++)me[Ie+9+Ve]=Ne.charCodeAt(Ve);pe._sQlen+=9+_e,pe.flush()},enableContinuousUpdates:function(pe,Te,Ne,me,Ie,_e){var Ve=pe._sQ,tt=pe._sQlen;Ve[tt]=150,Ve[tt+1]=Te,Ve[tt+2]=Ne>>8,Ve[tt+3]=Ne,Ve[tt+4]=me>>8,Ve[tt+5]=me,Ve[tt+6]=Ie>>8,Ve[tt+7]=Ie,Ve[tt+8]=_e>>8,Ve[tt+9]=_e,pe._sQlen+=10,pe.flush()},pixelFormat:function(pe,Te,Ne){var me=pe._sQ,Ie=pe._sQlen,_e;Te>16?_e=32:Te>8?_e=16:_e=8;var Ve=Math.floor(Te/3);me[Ie]=0,me[Ie+1]=0,me[Ie+2]=0,me[Ie+3]=0,me[Ie+4]=_e,me[Ie+5]=Te,me[Ie+6]=0,me[Ie+7]=Ne?1:0,me[Ie+8]=0,me[Ie+9]=(1<<Ve)-1,me[Ie+10]=0,me[Ie+11]=(1<<Ve)-1,me[Ie+12]=0,me[Ie+13]=(1<<Ve)-1,me[Ie+14]=Ve*2,me[Ie+15]=Ve*1,me[Ie+16]=Ve*0,me[Ie+17]=0,me[Ie+18]=0,me[Ie+19]=0,pe._sQlen+=20,pe.flush()},clientEncodings:function(pe,Te){var Ne=pe._sQ,me=pe._sQlen;Ne[me]=2,Ne[me+1]=0,Ne[me+2]=Te.length>>8,Ne[me+3]=Te.length;for(var Ie=me+4,_e=0;_e<Te.length;_e++){var Ve=Te[_e];Ne[Ie]=Ve>>24,Ne[Ie+1]=Ve>>16,Ne[Ie+2]=Ve>>8,Ne[Ie+3]=Ve,Ie+=4}pe._sQlen+=Ie-me,pe.flush()},fbUpdateRequest:function(pe,Te,Ne,me,Ie,_e){var Ve=pe._sQ,tt=pe._sQlen;typeof Ne=="undefined"&&(Ne=0),typeof me=="undefined"&&(me=0),Ve[tt]=3,Ve[tt+1]=Te?1:0,Ve[tt+2]=Ne>>8&255,Ve[tt+3]=Ne&255,Ve[tt+4]=me>>8&255,Ve[tt+5]=me&255,Ve[tt+6]=Ie>>8&255,Ve[tt+7]=Ie&255,Ve[tt+8]=_e>>8&255,Ve[tt+9]=_e&255,pe._sQlen+=10,pe.flush()},xvpOp:function(pe,Te,Ne){var me=pe._sQ,Ie=pe._sQlen;me[Ie]=250,me[Ie+1]=0,me[Ie+2]=Te,me[Ie+3]=Ne,pe._sQlen+=4,pe.flush()}},q.cursors={none:{rgbaPixels:new Uint8Array,w:0,h:0,hotx:0,hoty:0},dot:{rgbaPixels:new Uint8Array([255,255,255,255,0,0,0,255,255,255,255,255,0,0,0,255,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,255,255,255,255,255]),w:3,h:3,hotx:1,hoty:1}}},"1eCo":function(U,X,x){(function(I){I(x("VrN/"))})(function(I){"use strict";var _={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},O={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};I.defineMode("xml",function(y,v){var o=y.indentUnit,g={},p=v.htmlMode?_:O;for(var d in p)g[d]=p[d];for(var d in v)g[d]=v[d];var a,n;function s(R,k){function L(W){return k.tokenize=W,W(R,k)}var M=R.next();if(M=="<")return R.eat("!")?R.eat("[")?R.match("CDATA[")?L(e("atom","]]>")):null:R.match("--")?L(e("comment","-->")):R.match("DOCTYPE",!0,!0)?(R.eatWhile(/[\w\._\-]/),L(r(1))):null:R.eat("?")?(R.eatWhile(/[\w\._\-]/),k.tokenize=e("meta","?>"),"meta"):(a=R.eat("/")?"closeTag":"openTag",k.tokenize=t,"tag bracket");if(M=="&"){var G;return R.eat("#")?R.eat("x")?G=R.eatWhile(/[a-fA-F\d]/)&&R.eat(";"):G=R.eatWhile(/[\d]/)&&R.eat(";"):G=R.eatWhile(/[\w\.\-:]/)&&R.eat(";"),G?"atom":"error"}else return R.eatWhile(/[^&<]/),null}s.isInText=!0;function t(R,k){var L=R.next();if(L==">"||L=="/"&&R.eat(">"))return k.tokenize=s,a=L==">"?"endTag":"selfcloseTag","tag bracket";if(L=="=")return a="equals",null;if(L=="<"){k.tokenize=s,k.state=m,k.tagName=k.tagStart=null;var M=k.tokenize(R,k);return M?M+" tag error":"tag error"}else return/[\'\"]/.test(L)?(k.tokenize=i(L),k.stringStartCol=R.column(),k.tokenize(R,k)):(R.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function i(R){var k=function(L,M){for(;!L.eol();)if(L.next()==R){M.tokenize=t;break}return"string"};return k.isInAttribute=!0,k}function e(R,k){return function(L,M){for(;!L.eol();){if(L.match(k)){M.tokenize=s;break}L.next()}return R}}function r(R){return function(k,L){for(var M;(M=k.next())!=null;){if(M=="<")return L.tokenize=r(R+1),L.tokenize(k,L);if(M==">")if(R==1){L.tokenize=s;break}else return L.tokenize=r(R-1),L.tokenize(k,L)}return"meta"}}function c(R,k,L){this.prev=R.context,this.tagName=k,this.indent=R.indented,this.startOfLine=L,(g.doNotIndent.hasOwnProperty(k)||R.context&&R.context.noIndent)&&(this.noIndent=!0)}function u(R){R.context&&(R.context=R.context.prev)}function f(R,k){for(var L;;){if(!R.context)return;if(L=R.context.tagName,!g.contextGrabbers.hasOwnProperty(L)||!g.contextGrabbers[L].hasOwnProperty(k))return;u(R)}}function m(R,k,L){return R=="openTag"?(L.tagStart=k.column(),l):R=="closeTag"?E:m}function l(R,k,L){return R=="word"?(L.tagName=k.current(),n="tag",C):g.allowMissingTagName&&R=="endTag"?(n="tag bracket",C(R,k,L)):(n="error",l)}function E(R,k,L){if(R=="word"){var M=k.current();return L.context&&L.context.tagName!=M&&g.implicitlyClosed.hasOwnProperty(L.context.tagName)&&u(L),L.context&&L.context.tagName==M||g.matchClosing===!1?(n="tag",b):(n="tag error",D)}else return g.allowMissingTagName&&R=="endTag"?(n="tag bracket",b(R,k,L)):(n="error",D)}function b(R,k,L){return R!="endTag"?(n="error",b):(u(L),m)}function D(R,k,L){return n="error",b(R,k,L)}function C(R,k,L){if(R=="word")return n="attribute",w;if(R=="endTag"||R=="selfcloseTag"){var M=L.tagName,G=L.tagStart;return L.tagName=L.tagStart=null,R=="selfcloseTag"||g.autoSelfClosers.hasOwnProperty(M)?f(L,M):(f(L,M),L.context=new c(L,M,G==L.indented)),m}return n="error",C}function w(R,k,L){return R=="equals"?S:(g.allowMissing||(n="error"),C(R,k,L))}function S(R,k,L){return R=="string"?A:R=="word"&&g.allowUnquoted?(n="string",C):(n="error",C(R,k,L))}function A(R,k,L){return R=="string"?A:C(R,k,L)}return{startState:function(R){var k={tokenize:s,state:m,indented:R||0,tagName:null,tagStart:null,context:null};return R!=null&&(k.baseIndent=R),k},token:function(R,k){if(!k.tagName&&R.sol()&&(k.indented=R.indentation()),R.eatSpace())return null;a=null;var L=k.tokenize(R,k);return(L||a)&&L!="comment"&&(n=null,k.state=k.state(a||L,R,k),n&&(L=n=="error"?L+" error":n)),L},indent:function(R,k,L){var M=R.context;if(R.tokenize.isInAttribute)return R.tagStart==R.indented?R.stringStartCol+1:R.indented+o;if(M&&M.noIndent)return I.Pass;if(R.tokenize!=t&&R.tokenize!=s)return L?L.match(/^(\s*)/)[0].length:0;if(R.tagName)return g.multilineTagIndentPastTag!==!1?R.tagStart+R.tagName.length+2:R.tagStart+o*(g.multilineTagIndentFactor||1);if(g.alignCDATA&&/<!\[CDATA\[/.test(k))return 0;var G=k&&/^<(\/)?([\w_:\.-]*)/.exec(k);if(G&&G[1])for(;M;)if(M.tagName==G[2]){M=M.prev;break}else if(g.implicitlyClosed.hasOwnProperty(M.tagName))M=M.prev;else break;else if(G)for(;M;){var W=g.contextGrabbers[M.tagName];if(W&&W.hasOwnProperty(G[2]))M=M.prev;else break}for(;M&&M.prev&&!M.startOfLine;)M=M.prev;return M?M.indent+o:R.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:g.htmlMode?"html":"xml",helperType:g.htmlMode?"html":"xml",skipAttribute:function(R){R.state==S&&(R.state=C)},xmlCurrentTag:function(R){return R.tagName?{name:R.tagName,close:R.type=="closeTag"}:null},xmlCurrentContext:function(R){for(var k=[],L=R.context;L;L=L.prev)L.tagName&&k.push(L.tagName);return k.reverse()}}}),I.defineMIME("text/xml","xml"),I.defineMIME("application/xml","xml"),I.mimeModes.hasOwnProperty("text/html")||I.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"1j5w":function(U,X,x){"use strict";x.d(X,"d",function(){return Ne}),x.d(X,"b",function(){return Qe}),x.d(X,"c",function(){return Je}),x.d(X,"a",function(){return Be});var I=x("VTBJ"),_=x("1OyB"),O=x("vuIU"),y=x("JX7q"),v=x("Ji7U"),o=x("LK+K"),g=x("q1tI"),p=x("I8Z2"),d=x("BGR+"),a=x("wx14"),n=x("rePB"),s=x("4IlW"),t=x("2GS6"),i=x("Gytx"),e=x.n(i),r=x("TSYQ"),c=x.n(r),u=x("U8pU"),f=x("ODXe"),m=/iPhone/i,l=/iPod/i,E=/iPad/i,b=/\bAndroid(?:.+)Mobile\b/i,D=/Android/i,C=/\bAndroid(?:.+)SD4930UR\b/i,w=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,S=/Windows Phone/i,A=/\bWindows(?:.+)ARM\b/i,R=/BlackBerry/i,k=/BB10/i,L=/Opera Mini/i,M=/\b(CriOS|Chrome)(?:.+)Mobile/i,G=/Mobile(?:.+)Firefox\b/i;function W(at,wt){return at.test(wt)}function N(at){var wt=at||(typeof navigator!="undefined"?navigator.userAgent:""),ft=wt.split("[FBAN");if(typeof ft[1]!="undefined"){var st=ft,Pe=Object(f.a)(st,1);wt=Pe[0]}if(ft=wt.split("Twitter"),typeof ft[1]!="undefined"){var ze=ft,yt=Object(f.a)(ze,1);wt=yt[0]}var pt={apple:{phone:W(m,wt)&&!W(S,wt),ipod:W(l,wt),tablet:!W(m,wt)&&W(E,wt)&&!W(S,wt),device:(W(m,wt)||W(l,wt)||W(E,wt))&&!W(S,wt)},amazon:{phone:W(C,wt),tablet:!W(C,wt)&&W(w,wt),device:W(C,wt)||W(w,wt)},android:{phone:!W(S,wt)&&W(C,wt)||!W(S,wt)&&W(b,wt),tablet:!W(S,wt)&&!W(C,wt)&&!W(b,wt)&&(W(w,wt)||W(D,wt)),device:!W(S,wt)&&(W(C,wt)||W(w,wt)||W(b,wt)||W(D,wt))||W(/\bokhttp\b/i,wt)},windows:{phone:W(S,wt),tablet:W(A,wt),device:W(S,wt)||W(A,wt)},other:{blackberry:W(R,wt),blackberry10:W(k,wt),opera:W(L,wt),firefox:W(G,wt),chrome:W(M,wt),device:W(R,wt)||W(k,wt)||W(L,wt)||W(G,wt)||W(M,wt)},any:null,phone:null,tablet:null};return pt.any=pt.apple.device||pt.android.device||pt.windows.device||pt.other.device,pt.phone=pt.apple.phone||pt.android.phone||pt.windows.phone,pt.tablet=pt.apple.tablet||pt.android.tablet||pt.windows.tablet,pt}var K=Object(I.a)(Object(I.a)({},N()),{},{isMobile:N}),F=K;function P(){}function B(at,wt,ft){var st=wt||"";return at.key||"".concat(st,"item_").concat(ft)}function J(at){return"".concat(at,"-menu-")}function re(at,wt){var ft=-1;g.Children.forEach(at,function(st){ft+=1,st&&st.type&&st.type.isMenuItemGroup?g.Children.forEach(st.props.children,function(Pe){ft+=1,wt(Pe,ft)}):wt(st,ft)})}function he(at,wt,ft){if(!at||ft.find)return;g.Children.forEach(at,function(st){if(st){var Pe=st.type;if(!Pe||!(Pe.isSubMenu||Pe.isMenuItem||Pe.isMenuItemGroup))return;wt.indexOf(st.key)!==-1?ft.find=!0:st.props.children&&he(st.props.children,wt,ft)}})}var we=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ke=function(wt){var ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st=wt&&typeof wt.getBoundingClientRect=="function"&&wt.getBoundingClientRect().width;if(st){if(ft){var Pe=getComputedStyle(wt),ze=Pe.marginLeft,yt=Pe.marginRight;st+=+ze.replace("px","")+ +yt.replace("px","")}st=+st.toFixed(6)}return st||0},ne=function(wt,ft,st){wt&&Object(u.a)(wt.style)==="object"&&(wt.style[ft]=st)},Oe=function(){return F.any},Ce=x("KQm4"),fe=x("Ff2n"),oe=x("i8i4"),se=x("bdgK"),be=x("uciX"),ie=x("8XRh"),de={adjustX:1,adjustY:1},Fe={topLeft:{points:["bl","tl"],overflow:de,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:de,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:de,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:de,offset:[4,0]}},ae={topLeft:{points:["bl","tl"],overflow:de,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:de,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:de,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:de,offset:[4,0]}},Z=Fe,Y=0,q={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ve=function(wt,ft,st){var Pe=J(ft),ze=wt.getState();wt.setState({defaultActiveFirst:Object(I.a)(Object(I.a)({},ze.defaultActiveFirst),{},Object(n.a)({},Pe,st))})},pe=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(st){var Pe;Object(_.a)(this,ft),Pe=wt.call(this,st),Pe.onDestroy=function(lt){Pe.props.onDestroy(lt)},Pe.onKeyDown=function(lt){var Lt=lt.keyCode,Dt=Pe.menuInstance,Mt=Pe.props,Wt=Mt.isOpen,Yt=Mt.store;if(Lt===s.a.ENTER)return Pe.onTitleClick(lt),ve(Yt,Pe.props.eventKey,!0),!0;if(Lt===s.a.RIGHT)return Wt?Dt.onKeyDown(lt):(Pe.triggerOpenChange(!0),ve(Yt,Pe.props.eventKey,!0)),!0;if(Lt===s.a.LEFT){var mn;if(Wt)mn=Dt.onKeyDown(lt);else return;return mn||(Pe.triggerOpenChange(!1),mn=!0),mn}return Wt&&(Lt===s.a.UP||Lt===s.a.DOWN)?Dt.onKeyDown(lt):void 0},Pe.onOpenChange=function(lt){Pe.props.onOpenChange(lt)},Pe.onPopupVisibleChange=function(lt){Pe.triggerOpenChange(lt,lt?"mouseenter":"mouseleave")},Pe.onMouseEnter=function(lt){var Lt=Pe.props,Dt=Lt.eventKey,Mt=Lt.onMouseEnter,Wt=Lt.store;ve(Wt,Pe.props.eventKey,!1),Mt({key:Dt,domEvent:lt})},Pe.onMouseLeave=function(lt){var Lt=Pe.props,Dt=Lt.parentMenu,Mt=Lt.eventKey,Wt=Lt.onMouseLeave;Dt.subMenuInstance=Object(y.a)(Pe),Wt({key:Mt,domEvent:lt})},Pe.onTitleMouseEnter=function(lt){var Lt=Pe.props,Dt=Lt.eventKey,Mt=Lt.onItemHover,Wt=Lt.onTitleMouseEnter;Mt({key:Dt,hover:!0}),Wt({key:Dt,domEvent:lt})},Pe.onTitleMouseLeave=function(lt){var Lt=Pe.props,Dt=Lt.parentMenu,Mt=Lt.eventKey,Wt=Lt.onItemHover,Yt=Lt.onTitleMouseLeave;Dt.subMenuInstance=Object(y.a)(Pe),Wt({key:Mt,hover:!1}),Yt({key:Mt,domEvent:lt})},Pe.onTitleClick=function(lt){var Lt=Object(y.a)(Pe),Dt=Lt.props;if(Dt.onTitleClick({key:Dt.eventKey,domEvent:lt}),Dt.triggerSubMenuAction==="hover")return;Pe.triggerOpenChange(!Dt.isOpen,"click"),ve(Dt.store,Pe.props.eventKey,!1)},Pe.onSubMenuClick=function(lt){typeof Pe.props.onClick=="function"&&Pe.props.onClick(Pe.addKeyPath(lt))},Pe.onSelect=function(lt){Pe.props.onSelect(lt)},Pe.onDeselect=function(lt){Pe.props.onDeselect(lt)},Pe.getPrefixCls=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu")},Pe.getActiveClassName=function(){return"".concat(Pe.getPrefixCls(),"-active")},Pe.getDisabledClassName=function(){return"".concat(Pe.getPrefixCls(),"-disabled")},Pe.getSelectedClassName=function(){return"".concat(Pe.getPrefixCls(),"-selected")},Pe.getOpenClassName=function(){return"".concat(Pe.props.rootPrefixCls,"-submenu-open")},Pe.saveMenuInstance=function(lt){Pe.menuInstance=lt},Pe.addKeyPath=function(lt){return Object(I.a)(Object(I.a)({},lt),{},{keyPath:(lt.keyPath||[]).concat(Pe.props.eventKey)})},Pe.triggerOpenChange=function(lt,Lt){var Dt=Pe.props.eventKey,Mt=function(){Pe.onOpenChange({key:Dt,item:Object(y.a)(Pe),trigger:Lt,open:lt})};Lt==="mouseenter"?Pe.mouseenterTimeout=setTimeout(function(){Mt()},0):Mt()},Pe.isChildrenSelected=function(){var lt={find:!1};return he(Pe.props.children,Pe.props.selectedKeys,lt),lt.find},Pe.isOpen=function(){return Pe.props.openKeys.indexOf(Pe.props.eventKey)!==-1},Pe.adjustWidth=function(){if(!Pe.subMenuTitle||!Pe.menuInstance)return;var lt=oe.findDOMNode(Pe.menuInstance);if(lt.offsetWidth>=Pe.subMenuTitle.offsetWidth)return;lt.style.minWidth="".concat(Pe.subMenuTitle.offsetWidth,"px")},Pe.saveSubMenuTitle=function(lt){Pe.subMenuTitle=lt},Pe.getBaseProps=function(){var lt=Object(y.a)(Pe),Lt=lt.props;return{mode:Lt.mode==="horizontal"?"vertical":Lt.mode,visible:Pe.props.isOpen,level:Lt.level+1,inlineIndent:Lt.inlineIndent,focusable:!1,onClick:Pe.onSubMenuClick,onSelect:Pe.onSelect,onDeselect:Pe.onDeselect,onDestroy:Pe.onDestroy,selectedKeys:Lt.selectedKeys,eventKey:"".concat(Lt.eventKey,"-menu-"),openKeys:Lt.openKeys,motion:Lt.motion,onOpenChange:Pe.onOpenChange,subMenuOpenDelay:Lt.subMenuOpenDelay,parentMenu:Object(y.a)(Pe),subMenuCloseDelay:Lt.subMenuCloseDelay,forceSubMenuRender:Lt.forceSubMenuRender,triggerSubMenuAction:Lt.triggerSubMenuAction,builtinPlacements:Lt.builtinPlacements,defaultActiveFirst:Lt.store.getState().defaultActiveFirst[J(Lt.eventKey)],multiple:Lt.multiple,prefixCls:Lt.rootPrefixCls,id:Pe.internalMenuId,manualRef:Pe.saveMenuInstance,itemIcon:Lt.itemIcon,expandIcon:Lt.expandIcon,direction:Lt.direction}},Pe.getMotion=function(lt,Lt){var Dt=Object(y.a)(Pe),Mt=Dt.haveRendered,Wt=Pe.props,Yt=Wt.motion,mn=Wt.rootPrefixCls,Qt=Object(I.a)(Object(I.a)({},Yt),{},{leavedClassName:"".concat(mn,"-hidden"),removeOnLeave:!1,motionAppear:Mt||!Lt||lt!=="inline"});return Qt};var ze=st.store,yt=st.eventKey,pt=ze.getState(),Bt=pt.defaultActiveFirst;Pe.isRootMenu=!1;var Ht=!1;return Bt&&(Ht=Bt[yt]),ve(ze,yt,Ht),Pe}return Object(O.a)(ft,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Pe=this,ze=this.props,yt=ze.mode,pt=ze.parentMenu,Bt=ze.manualRef;if(Bt&&Bt(this),yt!=="horizontal"||!pt.isRootMenu||!this.props.isOpen)return;this.minWidthTimeout=setTimeout(function(){return Pe.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Pe=this.props,ze=Pe.onDestroy,yt=Pe.eventKey;ze&&ze(yt),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(Pe){var ze=this,yt=this.getBaseProps(),pt=this.getMotion(yt.mode,yt.visible);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||yt.visible||yt.forceSubMenuRender,!this.haveOpened)return g.createElement("div",null);var Bt=yt.direction;return g.createElement(ie.default,Object.assign({visible:yt.visible},pt),function(Ht){var lt=Ht.className,Lt=Ht.style,Dt=c()("".concat(yt.prefixCls,"-sub"),lt,Object(n.a)({},"".concat(yt.prefixCls,"-rtl"),Bt==="rtl"));return g.createElement(Ye,Object.assign({},yt,{id:ze.internalMenuId,className:Dt,style:Lt}),Pe)})}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),yt=ze.isOpen,pt=this.getPrefixCls(),Bt=ze.mode==="inline",Ht=c()(pt,"".concat(pt,"-").concat(ze.mode),(Pe={},Object(n.a)(Pe,ze.className,!!ze.className),Object(n.a)(Pe,this.getOpenClassName(),yt),Object(n.a)(Pe,this.getActiveClassName(),ze.active||yt&&!Bt),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Object(n.a)(Pe,this.getSelectedClassName(),this.isChildrenSelected()),Pe));this.internalMenuId||(ze.eventKey?this.internalMenuId="".concat(ze.eventKey,"$Menu"):(Y+=1,this.internalMenuId="$__$".concat(Y,"$Menu")));var lt={},Lt={},Dt={};ze.disabled||(lt={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},Lt={onClick:this.onTitleClick},Dt={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var Mt={},Wt=ze.direction;Bt&&(Wt==="rtl"?Mt.paddingRight=ze.inlineIndent*ze.level:Mt.paddingLeft=ze.inlineIndent*ze.level);var Yt={};this.props.isOpen&&(Yt={"aria-owns":this.internalMenuId});var mn=null;ze.mode!=="horizontal"&&(mn=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(mn=g.createElement(this.props.expandIcon,Object(I.a)({},this.props))));var Qt=g.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:Mt,className:"".concat(pt,"-title"),role:"button"},Dt,Lt,{"aria-expanded":yt},Yt,{"aria-haspopup":"true",title:typeof ze.title=="string"?ze.title:void 0}),ze.title,mn||g.createElement("i",{className:"".concat(pt,"-arrow")})),$t=this.renderChildren(ze.children),Kn=ze.parentMenu.isRootMenu?ze.parentMenu.props.getPopupContainer:function(Ir){return Ir.parentNode},hn=q[ze.mode],Rn=ze.popupOffset?{offset:ze.popupOffset}:{},wn=ze.mode==="inline"?"":ze.popupClassName;wn+=Wt==="rtl"?" ".concat(pt,"-rtl"):"";var Pn=ze.disabled,Yn=ze.triggerSubMenuAction,or=ze.subMenuOpenDelay,Xt=ze.forceSubMenuRender,xn=ze.subMenuCloseDelay,Er=ze.builtinPlacements;we.forEach(function(Ir){return delete ze[Ir]}),delete ze.onClick;var nr=Wt==="rtl"?Object.assign({},ae,Er):Object.assign({},Fe,Er);return delete ze.direction,g.createElement("li",Object.assign({},ze,lt,{className:Ht,role:"menuitem"}),Bt&&Qt,Bt&&$t,!Bt&&g.createElement(be.a,{prefixCls:pt,popupClassName:c()("".concat(pt,"-popup"),wn),getPopupContainer:Kn,builtinPlacements:nr,popupPlacement:hn,popupVisible:yt,popupAlign:Rn,popup:$t,action:Pn?[]:[Yn],mouseEnterDelay:or,mouseLeaveDelay:xn,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:Xt},Qt))}}]),ft}(g.Component);pe.defaultProps={onMouseEnter:P,onMouseLeave:P,onTitleMouseEnter:P,onTitleMouseLeave:P,onTitleClick:P,manualRef:P,mode:"vertical",title:""};var Te=Object(p.b)(function(at,wt){var ft=at.openKeys,st=at.activeKey,Pe=at.selectedKeys,ze=wt.eventKey,yt=wt.subMenuKey;return{isOpen:ft.indexOf(ze)>-1,active:st[yt]===ze,selectedKeys:Pe}})(pe);Te.isSubMenu=!0;var Ne=Te,me="menuitem-overflowed",Ie=.5,_e=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(){var st;return Object(_.a)(this,ft),st=wt.apply(this,arguments),st.resizeObserver=null,st.mutationObserver=null,st.originalTotalWidth=0,st.overflowedItems=[],st.menuItemSizes=[],st.cancelFrameId=null,st.state={lastVisibleIndex:void 0},st.getMenuItemNodes=function(){var Pe=st.props.prefixCls,ze=oe.findDOMNode(Object(y.a)(st));return ze?[].slice.call(ze.children).filter(function(yt){return yt.className.split(" ").indexOf("".concat(Pe,"-overflowed-submenu"))<0}):[]},st.getOverflowedSubMenuItem=function(Pe,ze,yt){var pt=st.props,Bt=pt.overflowedIndicator,Ht=pt.level,lt=pt.mode,Lt=pt.prefixCls,Dt=pt.theme;if(Ht!==1||lt!=="horizontal")return null;var Mt=st.props.children[0],Wt=Mt.props,Yt=Wt.children,mn=Wt.title,Qt=Wt.style,$t=Object(fe.a)(Wt,["children","title","style"]),Kn=Object(I.a)({},Qt),hn="".concat(Pe,"-overflowed-indicator"),Rn="".concat(Pe,"-overflowed-indicator");ze.length===0&&yt!==!0?Kn=Object(I.a)(Object(I.a)({},Kn),{},{display:"none"}):yt&&(Kn=Object(I.a)(Object(I.a)({},Kn),{},{visibility:"hidden",position:"absolute"}),hn="".concat(hn,"-placeholder"),Rn="".concat(Rn,"-placeholder"));var wn=Dt?"".concat(Lt,"-").concat(Dt):"",Pn={};return we.forEach(function(Yn){$t[Yn]!==void 0&&(Pn[Yn]=$t[Yn])}),g.createElement(Ne,Object.assign({title:Bt,className:"".concat(Lt,"-overflowed-submenu"),popupClassName:wn},Pn,{key:hn,eventKey:Rn,disabled:!1,style:Kn}),ze)},st.setChildrenWidthAndResize=function(){if(st.props.mode!=="horizontal")return;var Pe=oe.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=Pe.children;if(!ze||ze.length===0)return;var yt=Pe.children[ze.length-1];ne(yt,"display","inline-block");var pt=st.getMenuItemNodes(),Bt=pt.filter(function(Ht){return Ht.className.split(" ").indexOf(me)>=0});Bt.forEach(function(Ht){ne(Ht,"display","inline-block")}),st.menuItemSizes=pt.map(function(Ht){return ke(Ht,!0)}),Bt.forEach(function(Ht){ne(Ht,"display","none")}),st.overflowedIndicatorWidth=ke(Pe.children[Pe.children.length-1],!0),st.originalTotalWidth=st.menuItemSizes.reduce(function(Ht,lt){return Ht+lt},0),st.handleResize(),ne(yt,"display","none")},st.handleResize=function(){if(st.props.mode!=="horizontal")return;var Pe=oe.findDOMNode(Object(y.a)(st));if(!Pe)return;var ze=ke(Pe);st.overflowedItems=[];var yt=0,pt;st.originalTotalWidth>ze+Ie&&(pt=-1,st.menuItemSizes.forEach(function(Bt){yt+=Bt,yt+st.overflowedIndicatorWidth<=ze&&(pt+=1)})),st.setState({lastVisibleIndex:pt})},st}return Object(O.a)(ft,[{key:"componentDidMount",value:function(){var Pe=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var ze=oe.findDOMNode(this);if(!ze)return;this.resizeObserver=new se.default(function(yt){yt.forEach(function(){var pt=Pe.cancelFrameId;cancelAnimationFrame(pt),Pe.cancelFrameId=requestAnimationFrame(Pe.setChildrenWidthAndResize)})}),[].slice.call(ze.children).concat(ze).forEach(function(yt){Pe.resizeObserver.observe(yt)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Pe.resizeObserver.disconnect(),[].slice.call(ze.children).concat(ze).forEach(function(yt){Pe.resizeObserver.observe(yt)}),Pe.setChildrenWidthAndResize()}),this.mutationObserver.observe(ze,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Pe){var ze=this,yt=this.state.lastVisibleIndex;return(Pe||[]).reduce(function(pt,Bt,Ht){var lt=Bt;if(ze.props.mode==="horizontal"){var Lt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,[]);yt!==void 0&&ze.props.className.indexOf("".concat(ze.props.prefixCls,"-root"))!==-1&&(Ht>yt&&(lt=g.cloneElement(Bt,{style:{display:"none"},eventKey:"".concat(Bt.props.eventKey,"-hidden"),className:"".concat(me)})),Ht===yt+1&&(ze.overflowedItems=Pe.slice(yt+1).map(function(Mt){return g.cloneElement(Mt,{key:Mt.props.eventKey,mode:"vertical-left"})}),Lt=ze.getOverflowedSubMenuItem(Bt.props.eventKey,ze.overflowedItems)));var Dt=[].concat(Object(Ce.a)(pt),[Lt,lt]);return Ht===Pe.length-1&&Dt.push(ze.getOverflowedSubMenuItem(Bt.props.eventKey,[],!0)),Dt}return[].concat(Object(Ce.a)(pt),[lt])},[])}},{key:"render",value:function(){var Pe=this.props,ze=Pe.visible,yt=Pe.prefixCls,pt=Pe.overflowedIndicator,Bt=Pe.mode,Ht=Pe.level,lt=Pe.tag,Lt=Pe.children,Dt=Pe.theme,Mt=Object(fe.a)(Pe,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),Wt=lt;return g.createElement(Wt,Object.assign({},Mt),this.renderChildren(Lt))}}]),ft}(g.Component);_e.defaultProps={tag:"div",className:""};var Ve=_e;function tt(at){return at.length?at.every(function(wt){return!!wt.props.disabled}):!0}function Ge(at,wt,ft){var st=at.getState();at.setState({activeKey:Object(I.a)(Object(I.a)({},st.activeKey),{},Object(n.a)({},wt,ft))})}function Le(at){return at.eventKey||"0-menu-"}function bt(at,wt){var ft=wt,st=at.children,Pe=at.eventKey;if(ft){var ze;if(re(st,function(yt,pt){yt&&yt.props&&!yt.props.disabled&&ft===B(yt,Pe,pt)&&(ze=!0)}),ze)return ft}return ft=null,at.defaultActiveFirst&&re(st,function(yt,pt){!ft&&yt&&!yt.props.disabled&&(ft=B(yt,Pe,pt))}),ft}function Re(at){if(at){var wt=this.instanceArray.indexOf(at);wt!==-1?this.instanceArray[wt]=at:this.instanceArray.push(at)}}var Xe=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(st){var Pe;return Object(_.a)(this,ft),Pe=wt.call(this,st),Pe.onKeyDown=function(ze,yt){var pt=ze.keyCode,Bt;if(Pe.getFlatInstanceArray().forEach(function(lt){lt&<.props.active&<.onKeyDown&&(Bt=lt.onKeyDown(ze))}),Bt)return 1;var Ht=null;return(pt===s.a.UP||pt===s.a.DOWN)&&(Ht=Pe.step(pt===s.a.UP?-1:1)),Ht?(ze.preventDefault(),Ge(Pe.props.store,Le(Pe.props),Ht.props.eventKey),typeof yt=="function"&&yt(Ht),1):void 0},Pe.onItemHover=function(ze){var yt=ze.key,pt=ze.hover;Ge(Pe.props.store,Le(Pe.props),pt?yt:null)},Pe.onDeselect=function(ze){Pe.props.onDeselect(ze)},Pe.onSelect=function(ze){Pe.props.onSelect(ze)},Pe.onClick=function(ze){Pe.props.onClick(ze)},Pe.onOpenChange=function(ze){Pe.props.onOpenChange(ze)},Pe.onDestroy=function(ze){Pe.props.onDestroy(ze)},Pe.getFlatInstanceArray=function(){return Pe.instanceArray},Pe.step=function(ze){var yt=Pe.getFlatInstanceArray(),pt=Pe.props.store.getState().activeKey[Le(Pe.props)],Bt=yt.length;if(!Bt)return null;ze<0&&(yt=yt.concat().reverse());var Ht=-1;if(yt.every(function(Mt,Wt){return Mt&&Mt.props.eventKey===pt?(Ht=Wt,!1):!0}),!Pe.props.defaultActiveFirst&&Ht!==-1&&tt(yt.slice(Ht,Bt-1)))return;var lt=(Ht+1)%Bt,Lt=lt;do{var Dt=yt[Lt];if(!Dt||Dt.props.disabled)Lt=(Lt+1)%Bt;else return Dt}while(Lt!==lt);return null},Pe.renderCommonMenuItem=function(ze,yt,pt){var Bt=Pe.props.store.getState(),Ht=Object(y.a)(Pe),lt=Ht.props,Lt=B(ze,lt.eventKey,yt),Dt=ze.props;if(!Dt||typeof ze.type=="string")return ze;var Mt=Lt===Bt.activeKey,Wt=Object(I.a)(Object(I.a)({mode:Dt.mode||lt.mode,level:lt.level,inlineIndent:lt.inlineIndent,renderMenuItem:Pe.renderMenuItem,rootPrefixCls:lt.prefixCls,index:yt,parentMenu:lt.parentMenu,manualRef:Dt.disabled?void 0:Object(t.a)(ze.ref,Re.bind(Object(y.a)(Pe))),eventKey:Lt,active:!Dt.disabled&&Mt,multiple:lt.multiple,onClick:function(mn){(Dt.onClick||P)(mn),Pe.onClick(mn)},onItemHover:Pe.onItemHover,motion:lt.motion,subMenuOpenDelay:lt.subMenuOpenDelay,subMenuCloseDelay:lt.subMenuCloseDelay,forceSubMenuRender:lt.forceSubMenuRender,onOpenChange:Pe.onOpenChange,onDeselect:Pe.onDeselect,onSelect:Pe.onSelect,builtinPlacements:lt.builtinPlacements,itemIcon:Dt.itemIcon||Pe.props.itemIcon,expandIcon:Dt.expandIcon||Pe.props.expandIcon},pt),{},{direction:lt.direction});return(lt.mode==="inline"||Oe())&&(Wt.triggerSubMenuAction="click"),g.cloneElement(ze,Wt)},Pe.renderMenuItem=function(ze,yt,pt){if(!ze)return null;var Bt=Pe.props.store.getState(),Ht={openKeys:Bt.openKeys,selectedKeys:Bt.selectedKeys,triggerSubMenuAction:Pe.props.triggerSubMenuAction,subMenuKey:pt};return Pe.renderCommonMenuItem(ze,yt,Ht)},st.store.setState({activeKey:Object(I.a)(Object(I.a)({},st.store.getState().activeKey),{},Object(n.a)({},st.eventKey,bt(st,st.activeKey)))}),Pe.instanceArray=[],Pe}return Object(O.a)(ft,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Pe){return this.props.visible||Pe.visible||this.props.className!==Pe.className||!e()(this.props.style,Pe.style)}},{key:"componentDidUpdate",value:function(Pe){var ze=this.props,yt="activeKey"in ze?ze.activeKey:ze.store.getState().activeKey[Le(ze)],pt=bt(ze,yt);if(pt!==yt)Ge(ze.store,Le(ze),pt);else if("activeKey"in Pe){var Bt=bt(Pe,Pe.activeKey);pt!==Bt&&Ge(ze.store,Le(ze),pt)}}},{key:"render",value:function(){var Pe=this,ze=Object(a.a)({},this.props);this.instanceArray=[];var yt=c()(ze.prefixCls,ze.className,"".concat(ze.prefixCls,"-").concat(ze.mode)),pt={className:yt,role:ze.role||"menu"};ze.id&&(pt.id=ze.id),ze.focusable&&(pt.tabIndex=0,pt.onKeyDown=this.onKeyDown);var Bt=ze.prefixCls,Ht=ze.eventKey,lt=ze.visible,Lt=ze.level,Dt=ze.mode,Mt=ze.overflowedIndicator,Wt=ze.theme;return we.forEach(function(Yt){return delete ze[Yt]}),delete ze.onClick,g.createElement(Ve,Object.assign({},ze,{prefixCls:Bt,mode:Dt,tag:"ul",level:Lt,theme:Wt,visible:lt,overflowedIndicator:Mt},pt),g.Children.map(ze.children,function(Yt,mn){return Pe.renderMenuItem(Yt,mn,Ht||"0-menu-")}))}}]),ft}(g.Component);Xe.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:P};var et=Object(p.b)()(Xe),Ye=et,Me=x("Kwbf");function Ke(at,wt,ft){var st=at.prefixCls,Pe=at.motion,ze=at.defaultMotions,yt=ze===void 0?{}:ze,pt=at.openAnimation,Bt=at.openTransitionName,Ht=wt.switchingModeFromInline;if(Pe)return Pe;if(Object(u.a)(pt)==="object"&&pt)Object(Me.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof pt=="string")return{motionName:"".concat(st,"-open-").concat(pt)};if(Bt)return{motionName:Bt};var lt=yt[ft];return lt||(Ht?null:yt.other)}var ge=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(st){var Pe;Object(_.a)(this,ft),Pe=wt.call(this,st),Pe.inlineOpenKeys=[],Pe.onSelect=function(pt){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var lt=Pe.store.getState(),Lt=lt.selectedKeys,Dt=pt.key;Ht.multiple?Lt=Lt.concat([Dt]):Lt=[Dt],"selectedKeys"in Ht||Pe.store.setState({selectedKeys:Lt}),Ht.onSelect(Object(I.a)(Object(I.a)({},pt),{},{selectedKeys:Lt}))}},Pe.onClick=function(pt){var Bt=Pe.getRealMenuMode(),Ht=Object(y.a)(Pe),lt=Ht.store,Lt=Ht.props.onOpenChange;Bt!=="inline"&&!("openKeys"in Pe.props)&&(lt.setState({openKeys:[]}),Lt([])),Pe.props.onClick(pt)},Pe.onKeyDown=function(pt,Bt){Pe.innerMenu.getWrappedInstance().onKeyDown(pt,Bt)},Pe.onOpenChange=function(pt){var Bt=Object(y.a)(Pe),Ht=Bt.props,lt=Pe.store.getState().openKeys.concat(),Lt=!1,Dt=function(Wt){var Yt=!1;if(Wt.open)Yt=lt.indexOf(Wt.key)===-1,Yt&<.push(Wt.key);else{var mn=lt.indexOf(Wt.key);Yt=mn!==-1,Yt&<.splice(mn,1)}Lt=Lt||Yt};Array.isArray(pt)?pt.forEach(Dt):Dt(pt),Lt&&("openKeys"in Pe.props||Pe.store.setState({openKeys:lt}),Ht.onOpenChange(lt))},Pe.onDeselect=function(pt){var Bt=Object(y.a)(Pe),Ht=Bt.props;if(Ht.selectable){var lt=Pe.store.getState().selectedKeys.concat(),Lt=pt.key,Dt=lt.indexOf(Lt);Dt!==-1&<.splice(Dt,1),"selectedKeys"in Ht||Pe.store.setState({selectedKeys:lt}),Ht.onDeselect(Object(I.a)(Object(I.a)({},pt),{},{selectedKeys:lt}))}},Pe.onMouseEnter=function(pt){Pe.restoreModeVerticalFromInline();var Bt=Pe.props.onMouseEnter;Bt&&Bt(pt)},Pe.onTransitionEnd=function(pt){var Bt=pt.propertyName==="width"&&pt.target===pt.currentTarget,Ht=pt.target.className,lt=Object.prototype.toString.call(Ht)==="[object SVGAnimatedString]"?Ht.animVal:Ht,Lt=pt.propertyName==="font-size"&<.indexOf("anticon")>=0;(Bt||Lt)&&Pe.restoreModeVerticalFromInline()},Pe.setInnerMenu=function(pt){Pe.innerMenu=pt},Pe.isRootMenu=!0;var ze=st.defaultSelectedKeys,yt=st.defaultOpenKeys;return"selectedKeys"in st&&(ze=st.selectedKeys||[]),"openKeys"in st&&(yt=st.openKeys||[]),Pe.store=Object(p.c)({selectedKeys:ze,openKeys:yt,activeKey:{"0-menu-":bt(st,st.activeKey)}}),Pe.state={switchingModeFromInline:!1},Pe}return Object(O.a)(ft,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Pe){this.updateOpentKeysWhenSwitchMode(Pe),this.updateMiniStore();var ze=this.props,yt=ze.siderCollapsed,pt=ze.inlineCollapsed,Bt=ze.onOpenChange;(!Pe.inlineCollapsed&&pt||!Pe.siderCollapsed&&yt)&&Bt([]),this.updateMenuDisplay()}},{key:"updateOpentKeysWhenSwitchMode",value:function(Pe){var ze=this.props,yt=this.store,pt=this.inlineOpenKeys,Bt=yt.getState(),Ht={};Pe.mode==="inline"&&ze.mode!=="inline"&&this.setState({switchingModeFromInline:!0}),"openKeys"in ze||((ze.inlineCollapsed&&!Pe.inlineCollapsed||ze.siderCollapsed&&!Pe.siderCollapsed)&&(this.setState({switchingModeFromInline:!0}),this.inlineOpenKeys=Bt.openKeys.concat(),Ht.openKeys=[]),(!ze.inlineCollapsed&&Pe.inlineCollapsed||!ze.siderCollapsed&&Pe.siderCollapsed)&&(Ht.openKeys=pt,this.inlineOpenKeys=[])),Object.keys(Ht).length&&yt.setState(Ht)}},{key:"updateMenuDisplay",value:function(){var Pe=this.props.collapsedWidth,ze=this.store,yt=this.prevOpenKeys,pt=this.getInlineCollapsed()&&(Pe===0||Pe==="0"||Pe==="0px");pt?(this.prevOpenKeys=ze.getState().openKeys.concat(),this.store.setState({openKeys:[]})):yt&&(this.store.setState({openKeys:yt}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Pe=this.props.mode,ze=this.state.switchingModeFromInline,yt=this.getInlineCollapsed();return ze&&yt?"inline":yt?"vertical":Pe}},{key:"getInlineCollapsed",value:function(){var Pe=this.props,ze=Pe.inlineCollapsed,yt=Pe.siderCollapsed;return yt!==void 0?yt:ze}},{key:"restoreModeVerticalFromInline",value:function(){var Pe=this.state.switchingModeFromInline;Pe&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Pe=Object(I.a)({},Object(d.default)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),ze=this.getRealMenuMode();return Pe.className+=" ".concat(Pe.prefixCls,"-root"),Pe.direction==="rtl"&&(Pe.className+=" ".concat(Pe.prefixCls,"-rtl")),Pe=Object(I.a)(Object(I.a)({},Pe),{},{mode:ze,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ke(this.props,this.state,ze)}),delete Pe.openAnimation,delete Pe.openTransitionName,g.createElement(p.a,{store:this.store},g.createElement(Ye,Object.assign({},Pe,{ref:this.setInnerMenu}),this.props.children))}}]),ft}(g.Component);ge.defaultProps={selectable:!0,onClick:P,onSelect:P,onOpenChange:P,onDeselect:P,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:g.createElement("span",null,"\xB7\xB7\xB7")};var Ee=ge,ce=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(){var st;return Object(_.a)(this,ft),st=wt.apply(this,arguments),st.onKeyDown=function(Pe){var ze=Pe.keyCode;return ze===s.a.ENTER?(st.onClick(Pe),!0):void 0},st.onMouseLeave=function(Pe){var ze=st.props,yt=ze.eventKey,pt=ze.onItemHover,Bt=ze.onMouseLeave;pt({key:yt,hover:!1}),Bt({key:yt,domEvent:Pe})},st.onMouseEnter=function(Pe){var ze=st.props,yt=ze.eventKey,pt=ze.onItemHover,Bt=ze.onMouseEnter;pt({key:yt,hover:!0}),Bt({key:yt,domEvent:Pe})},st.onClick=function(Pe){var ze=st.props,yt=ze.eventKey,pt=ze.multiple,Bt=ze.onClick,Ht=ze.onSelect,lt=ze.onDeselect,Lt=ze.isSelected,Dt={key:yt,keyPath:[yt],item:Object(y.a)(st),domEvent:Pe};Bt(Dt),pt?Lt?lt(Dt):Ht(Dt):Lt||Ht(Dt)},st.saveNode=function(Pe){st.node=Pe},st}return Object(O.a)(ft,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Pe=this.props;Pe.onDestroy&&Pe.onDestroy(Pe.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Pe,ze=Object(I.a)({},this.props),yt=c()(this.getPrefixCls(),ze.className,(Pe={},Object(n.a)(Pe,this.getActiveClassName(),!ze.disabled&&ze.active),Object(n.a)(Pe,this.getSelectedClassName(),ze.isSelected),Object(n.a)(Pe,this.getDisabledClassName(),ze.disabled),Pe)),pt=Object(I.a)(Object(I.a)({},ze.attribute),{},{title:typeof ze.title=="string"?ze.title:void 0,className:yt,role:ze.role||"menuitem","aria-disabled":ze.disabled});ze.role==="option"?pt=Object(I.a)(Object(I.a)({},pt),{},{role:"option","aria-selected":ze.isSelected}):(ze.role===null||ze.role==="none")&&(pt.role="none");var Bt={onClick:ze.disabled?null:this.onClick,onMouseLeave:ze.disabled?null:this.onMouseLeave,onMouseEnter:ze.disabled?null:this.onMouseEnter},Ht=Object(I.a)({},ze.style);ze.mode==="inline"&&(ze.direction==="rtl"?Ht.paddingRight=ze.inlineIndent*ze.level:Ht.paddingLeft=ze.inlineIndent*ze.level),we.forEach(function(Lt){return delete ze[Lt]}),delete ze.direction;var lt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(lt=g.createElement(this.props.itemIcon,this.props)),g.createElement("li",Object.assign({},Object(d.default)(ze,["onClick","onMouseEnter","onMouseLeave","onSelect"]),pt,Bt,{style:Ht,ref:this.saveNode}),ze.children,lt)}}]),ft}(g.Component);ce.isMenuItem=!0,ce.defaultProps={onSelect:P,onMouseEnter:P,onMouseLeave:P,manualRef:P};var je=Object(p.b)(function(at,wt){var ft=at.activeKey,st=at.selectedKeys,Pe=wt.eventKey,ze=wt.subMenuKey;return{active:ft[ze]===Pe,isSelected:st.indexOf(Pe)!==-1}})(ce),Qe=je,te=function(at){Object(v.a)(ft,at);var wt=Object(o.a)(ft);function ft(){var st;return Object(_.a)(this,ft),st=wt.apply(this,arguments),st.renderInnerMenuItem=function(Pe){var ze=st.props,yt=ze.renderMenuItem,pt=ze.index;return yt(Pe,pt,st.props.subMenuKey)},st}return Object(O.a)(ft,[{key:"render",value:function(){var Pe=Object(a.a)({},this.props),ze=Pe.className,yt=ze===void 0?"":ze,pt=Pe.rootPrefixCls,Bt="".concat(pt,"-item-group-title"),Ht="".concat(pt,"-item-group-list"),lt=Pe.title,Lt=Pe.children;return we.forEach(function(Dt){return delete Pe[Dt]}),delete Pe.onClick,delete Pe.direction,g.createElement("li",Object.assign({},Pe,{className:"".concat(yt," ").concat(pt,"-item-group")}),g.createElement("div",{className:Bt,title:typeof lt=="string"?lt:void 0},lt),g.createElement("ul",{className:Ht},g.Children.map(Lt,this.renderInnerMenuItem)))}}]),ft}(g.Component);te.isMenuItemGroup=!0,te.defaultProps={disabled:!0};var Je=te,ut=function(wt){var ft=wt.className,st=wt.rootPrefixCls,Pe=wt.style;return g.createElement("li",{className:"".concat(ft," ").concat(st,"-item-divider"),style:Pe})};ut.defaultProps={disabled:!0,className:"",style:{}};var Be=ut,qe=X.e=Ee},"1q3G":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=I;function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},"1uat":function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("MlIO"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.Hasher,v=_.x64,o=v.Word,g=v.WordArray,p=_.algo;function d(){return o.create.apply(o,arguments)}var a=[d(1116352408,3609767458),d(1899447441,602891725),d(3049323471,3964484399),d(3921009573,2173295548),d(961987163,4081628472),d(1508970993,3053834265),d(2453635748,2937671579),d(2870763221,3664609560),d(3624381080,2734883394),d(310598401,1164996542),d(607225278,1323610764),d(1426881987,3590304994),d(1925078388,4068182383),d(2162078206,991336113),d(2614888103,633803317),d(3248222580,3479774868),d(3835390401,2666613458),d(4022224774,944711139),d(264347078,2341262773),d(604807628,2007800933),d(770255983,1495990901),d(1249150122,1856431235),d(1555081692,3175218132),d(1996064986,2198950837),d(2554220882,3999719339),d(2821834349,766784016),d(2952996808,2566594879),d(3210313671,3203337956),d(3336571891,1034457026),d(3584528711,2466948901),d(113926993,3758326383),d(338241895,168717936),d(666307205,1188179964),d(773529912,1546045734),d(1294757372,1522805485),d(1396182291,2643833823),d(1695183700,2343527390),d(1986661051,1014477480),d(2177026350,1206759142),d(2456956037,344077627),d(2730485921,1290863460),d(2820302411,3158454273),d(3259730800,3505952657),d(3345764771,106217008),d(3516065817,3606008344),d(3600352804,1432725776),d(4094571909,1467031594),d(275423344,851169720),d(430227734,3100823752),d(506948616,1363258195),d(659060556,3750685593),d(883997877,3785050280),d(958139571,3318307427),d(1322822218,3812723403),d(1537002063,2003034995),d(1747873779,3602036899),d(1955562222,1575990012),d(2024104815,1125592928),d(2227730452,2716904306),d(2361852424,442776044),d(2428436474,593698344),d(2756734187,3733110249),d(3204031479,2999351573),d(3329325298,3815920427),d(3391569614,3928383900),d(3515267271,566280711),d(3940187606,3454069534),d(4118630271,4000239992),d(116418474,1914138554),d(174292421,2731055270),d(289380356,3203993006),d(460393269,320620315),d(685471733,587496836),d(852142971,1086792851),d(1017036298,365543100),d(1126000580,2618297676),d(1288033470,3409855158),d(1501505948,4234509866),d(1607167915,987167468),d(1816402316,1246189591)],n=[];(function(){for(var t=0;t<80;t++)n[t]=d()})();var s=p.SHA512=y.extend({_doReset:function(){this._hash=new g.init([new o.init(1779033703,4089235720),new o.init(3144134277,2227873595),new o.init(1013904242,4271175723),new o.init(2773480762,1595750129),new o.init(1359893119,2917565137),new o.init(2600822924,725511199),new o.init(528734635,4215389547),new o.init(1541459225,327033209)])},_doProcessBlock:function(t,i){for(var e=this._hash.words,r=e[0],c=e[1],u=e[2],f=e[3],m=e[4],l=e[5],E=e[6],b=e[7],D=r.high,C=r.low,w=c.high,S=c.low,A=u.high,R=u.low,k=f.high,L=f.low,M=m.high,G=m.low,W=l.high,N=l.low,K=E.high,F=E.low,P=b.high,B=b.low,J=D,re=C,he=w,we=S,ke=A,ne=R,Oe=k,Ce=L,fe=M,oe=G,se=W,be=N,ie=K,de=F,Fe=P,ae=B,Z=0;Z<80;Z++){var Y,q,ve=n[Z];if(Z<16)q=ve.high=t[i+Z*2]|0,Y=ve.low=t[i+Z*2+1]|0;else{var pe=n[Z-15],Te=pe.high,Ne=pe.low,me=(Te>>>1|Ne<<31)^(Te>>>8|Ne<<24)^Te>>>7,Ie=(Ne>>>1|Te<<31)^(Ne>>>8|Te<<24)^(Ne>>>7|Te<<25),_e=n[Z-2],Ve=_e.high,tt=_e.low,Ge=(Ve>>>19|tt<<13)^(Ve<<3|tt>>>29)^Ve>>>6,Le=(tt>>>19|Ve<<13)^(tt<<3|Ve>>>29)^(tt>>>6|Ve<<26),bt=n[Z-7],Re=bt.high,Xe=bt.low,et=n[Z-16],Ye=et.high,Me=et.low;Y=Ie+Xe,q=me+Re+(Y>>>0<Ie>>>0?1:0),Y=Y+Le,q=q+Ge+(Y>>>0<Le>>>0?1:0),Y=Y+Me,q=q+Ye+(Y>>>0<Me>>>0?1:0),ve.high=q,ve.low=Y}var Ke=fe&se^~fe&ie,ge=oe&be^~oe&de,Ee=J&he^J&ke^he&ke,ce=re&we^re&ne^we&ne,je=(J>>>28|re<<4)^(J<<30|re>>>2)^(J<<25|re>>>7),Qe=(re>>>28|J<<4)^(re<<30|J>>>2)^(re<<25|J>>>7),te=(fe>>>14|oe<<18)^(fe>>>18|oe<<14)^(fe<<23|oe>>>9),Je=(oe>>>14|fe<<18)^(oe>>>18|fe<<14)^(oe<<23|fe>>>9),ut=a[Z],Be=ut.high,qe=ut.low,at=ae+Je,wt=Fe+te+(at>>>0<ae>>>0?1:0),at=at+ge,wt=wt+Ke+(at>>>0<ge>>>0?1:0),at=at+qe,wt=wt+Be+(at>>>0<qe>>>0?1:0),at=at+Y,wt=wt+q+(at>>>0<Y>>>0?1:0),ft=Qe+ce,st=je+Ee+(ft>>>0<Qe>>>0?1:0);Fe=ie,ae=de,ie=se,de=be,se=fe,be=oe,oe=Ce+at|0,fe=Oe+wt+(oe>>>0<Ce>>>0?1:0)|0,Oe=ke,Ce=ne,ke=he,ne=we,he=J,we=re,re=at+ft|0,J=wt+st+(re>>>0<at>>>0?1:0)|0}C=r.low=C+re,r.high=D+J+(C>>>0<re>>>0?1:0),S=c.low=S+we,c.high=w+he+(S>>>0<we>>>0?1:0),R=u.low=R+ne,u.high=A+ke+(R>>>0<ne>>>0?1:0),L=f.low=L+Ce,f.high=k+Oe+(L>>>0<Ce>>>0?1:0),G=m.low=G+oe,m.high=M+fe+(G>>>0<oe>>>0?1:0),N=l.low=N+be,l.high=W+se+(N>>>0<be>>>0?1:0),F=E.low=F+de,E.high=K+ie+(F>>>0<de>>>0?1:0),B=b.low=B+ae,b.high=P+Fe+(B>>>0<ae>>>0?1:0)},_doFinalize:function(){var t=this._data,i=t.words,e=this._nDataBytes*8,r=t.sigBytes*8;i[r>>>5]|=128<<24-r%32,i[(r+128>>>10<<5)+30]=Math.floor(e/4294967296),i[(r+128>>>10<<5)+31]=e,t.sigBytes=i.length*4,this._process();var c=this._hash.toX32();return c},clone:function(){var t=y.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:1024/32});_.SHA512=y._createHelper(s),_.HmacSHA512=y._createHmacHelper(s)}(),I.SHA512})},"25Vc":function(U,X,x){U.exports={wrap:"wrap___3gf4v",title:"title___BnbVm",path:"path___1Prpu",colorBlue:"colorBlue___1sUTa"}},"34/K":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(v,o){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}function _(v,o){for(var g=0;g<o.length;g++){var p=o[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(v,p.key,p)}}function O(v,o,g){return o&&_(v.prototype,o),g&&_(v,g),v}var y=function(){function v(){I(this,v),this._lines=0}return O(v,[{key:"decodeRect",value:function(g,p,d,a,n,s,t){this._lines===0&&(this._lines=a);var i=t==8?1:4,e=d*i;if(n.rQwait("RAW",e))return!1;var r=p+(a-this._lines),c=Math.min(this._lines,Math.floor(n.rQlen/e)),u=n.rQ,f=n.rQi;if(t==8){for(var m=d*c,l=new Uint8Array(m*4),E=0;E<m;E++)l[E*4+0]=(u[f+E]>>0&3)*255/3,l[E*4+1]=(u[f+E]>>2&3)*255/3,l[E*4+2]=(u[f+E]>>4&3)*255/3,l[E*4+4]=0;u=l,f=0}return s.blitImage(g,r,d,c,u,f),n.rQskipBytes(c*e),this._lines-=c,!(this._lines>0)}}]),v}();X.default=y},"362i":function(U,X,x){U.exports=x.p+"static/passpart.cc679602.png"},"3690":function(U,X,x){"use strict";function I(d){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(n){return typeof n}:I=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},I(d)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=y(x("Lo0S"));function O(){if(typeof WeakMap!="function")return null;var d=new WeakMap;return O=function(){return d},d}function y(d){if(d&&d.__esModule)return d;if(d===null||I(d)!=="object"&&typeof d!="function")return{default:d};var a=O();if(a&&a.has(d))return a.get(d);var n={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var t in d)if(Object.prototype.hasOwnProperty.call(d,t)){var i=s?Object.getOwnPropertyDescriptor(d,t):null;i&&(i.get||i.set)?Object.defineProperty(n,t,i):n[t]=d[t]}return n.default=d,a&&a.set(d,n),n}function v(d,a){if(!(d instanceof a))throw new TypeError("Cannot call a class as a function")}function o(d,a){for(var n=0;n<a.length;n++){var s=a[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}function g(d,a,n){return a&&o(d.prototype,a),n&&o(d,n),d}var p=function(){function d(){v(this,d),this._tiles=0,this._lastsubencoding=0}return g(d,[{key:"decodeRect",value:function(n,s,t,i,e,r,c){for(this._tiles===0&&(this._tilesX=Math.ceil(t/16),this._tilesY=Math.ceil(i/16),this._totalTiles=this._tilesX*this._tilesY,this._tiles=this._totalTiles);this._tiles>0;){var u=1;if(e.rQwait("HEXTILE",u))return!1;var f=e.rQ,m=e.rQi,l=f[m];if(l>30)throw new Error("Illegal hextile subencoding (subencoding: "+l+")");var E=this._totalTiles-this._tiles,b=E%this._tilesX,D=Math.floor(E/this._tilesX),C=n+b*16,w=s+D*16,S=Math.min(16,n+t-C),A=Math.min(16,s+i-w);if(l&1)u+=S*A*4;else if(l&2&&(u+=4),l&4&&(u+=4),l&8){if(u++,e.rQwait("HEXTILE",u))return!1;var R=f[m+u-1];l&16?u+=R*(4+2):u+=R*2}if(e.rQwait("HEXTILE",u))return!1;if(m++,l===0)this._lastsubencoding&1?_.Debug(" Ignoring blank after RAW"):r.fillRect(C,w,S,A,this._background);else if(l&1)r.blitImage(C,w,S,A,f,m),m+=u-1;else{if(l&2&&(this._background=[f[m],f[m+1],f[m+2],f[m+3]],m+=4),l&4&&(this._foreground=[f[m],f[m+1],f[m+2],f[m+3]],m+=4),r.startTile(C,w,S,A,this._background),l&8){var k=f[m];m++;for(var L=0;L<k;L++){var M=void 0;l&16?(M=[f[m],f[m+1],f[m+2],f[m+3]],m+=4):M=this._foreground;var G=f[m];m++;var W=G>>4,N=G&15,K=f[m];m++;var F=(K>>4)+1,P=(K&15)+1;r.subTile(W,N,F,P,M)}}r.finishTile()}e.rQi=m,this._lastsubencoding=l,this._tiles--}return!0}}]),d}();X.default=p},"3y9D":function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=O.Hasher,o=_.algo,g=[],p=o.SHA1=v.extend({_doReset:function(){this._hash=new y.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(d,a){for(var n=this._hash.words,s=n[0],t=n[1],i=n[2],e=n[3],r=n[4],c=0;c<80;c++){if(c<16)g[c]=d[a+c]|0;else{var u=g[c-3]^g[c-8]^g[c-14]^g[c-16];g[c]=u<<1|u>>>31}var f=(s<<5|s>>>27)+r+g[c];c<20?f+=(t&i|~t&e)+1518500249:c<40?f+=(t^i^e)+1859775393:c<60?f+=(t&i|t&e|i&e)-1894007588:f+=(t^i^e)-899497514,r=e,e=i,i=t<<30|t>>>2,t=s,s=f}n[0]=n[0]+s|0,n[1]=n[1]+t|0,n[2]=n[2]+i|0,n[3]=n[3]+e|0,n[4]=n[4]+r|0},_doFinalize:function(){var d=this._data,a=d.words,n=this._nDataBytes*8,s=d.sigBytes*8;return a[s>>>5]|=128<<24-s%32,a[(s+64>>>9<<4)+14]=Math.floor(n/4294967296),a[(s+64>>>9<<4)+15]=n,d.sigBytes=a.length*4,this._process(),this._hash},clone:function(){var d=v.clone.call(this);return d._hash=this._hash.clone(),d}});_.SHA1=v._createHelper(p),_.HmacSHA1=v._createHmacHelper(p)}(),I.SHA1})},4:function(U,X){},"4K8j":function(U,X,x){"use strict";x.r(X);var I=x("14J3"),_=x("BMrR"),O=x("jCWc"),y=x("kPKH"),v=x("q1tI"),o=x.n(v),g=x("bntm"),p=x("1vsH"),d=x("0/SM"),a=x.n(d),n=x("2qtc"),s=x("kLXV"),t=x("+L6B"),i=x("2/Rp"),e=x("T2oS"),r=x("W9HT"),c=x("lUTK"),u=x("BvKs"),f=x("miYZ"),m=x("tsqr"),l=x("9og8"),E=x("5Dmo"),b=x("3S7+"),D=x("k1fw"),C=x("tJVT"),w=x("PpiC"),S=x("Znn+"),A=x("ZTPi"),R=x("WmNS"),k=x.n(R),L=x("5DcX"),M=x.n(L),G=x("Ty5D"),W=x("9kvl"),N=x("oBTY"),K=x("qVdP"),F=x("jsC+"),P=x("ozfa"),B=x("MJZm"),J=x("IZBM"),re=x("P5Jw"),he=x("5NDa"),we=x("5rEg"),ke=x("y8nQ"),ne=x("Vl3Y"),Oe=x("FfZY"),Ce=x.n(Oe),fe=function(ze){var yt=ze.shixunsDetail,pt=ze.globalSetting,Bt=ze.loading,Ht=ze.user,lt=ze.dispatch,Lt=ze.taskData,Dt=ze.isRepository,Mt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","taskData","isRepository"]),Wt=Object(G.h)(),Yt=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),mn=Object(v.useState)({}),Qt=Object(C.a)(mn,2),$t=Qt[0],Kn=Qt[1],hn=Object(v.useRef)(),Rn=ne.a.useForm(),wn=Object(C.a)(Rn,1),Pn=wn[0],Yn=Object(v.useState)(""),or=Object(C.a)(Yn,2),Xt=or[0],xn=or[1];Object(v.useEffect)(function(){Mt.visible&&Pn.resetFields()},[Mt.visible]),Object(v.useEffect)(function(){var Ir=sessionStorage.getItem("pathArray");if(Ir){var qn=Ir.split(",").join("/"),ue=qn.indexOf("/")===0?qn.substr(1):qn;xn(ue)}},[]),Object(v.useEffect)(function(){var Ir,qn;hn.current=(Ir=Wt.pathname)===null||Ir===void 0||((qn=Ir.split("/"))===null||qn===void 0)?void 0:qn[2]},[]);var Er=function(){var Ir=Object(l.a)(k.a.mark(function qn(){var ue,V,Q=arguments;return k.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return ue=Q.length>0&&Q[0]!==void 0?Q[0]:{},Se.next=3,lt({type:"shixunsDetail/addRepositoryFile",payload:{id:Lt.myshixun.identifier,message:ue.commitMessage,content:"",path:(Mt.defaultPath?Mt.defaultPath+"/":"")+ue.path+"/"+(ue.file||".gitkeep"),secret_repository:Dt?void 0:!0}});case 3:V=Se.sent,(V==null?void 0:V.status)===0&&(m.b.success("\u6DFB\u52A0\u6210\u529F"),Mt.onOK({path:(Mt.defaultPath?Mt.defaultPath+"/":"")+ue.path+"/"+(ue.file||".gitkeep"),name:ue.path.split("/")[ue.path.split("/").length-1]}),Mt.onClose());case 5:case"end":return Se.stop()}},qn)}));return function(){return Ir.apply(this,arguments)}}(),nr=function(){var qn,ue;W.d.push("/shixuns/".concat(hn.current,"/").concat((qn=Wt.pathname)===null||qn===void 0||((ue=qn.split("/"))===null||ue===void 0)?void 0:ue[3]).concat(Xt?"/master/shixun_show/".concat(Xt):""))};return o.a.createElement(s.a,{width:"60%",centered:!0,visible:Mt.visible,wrapClassName:Ce.a.modal,onOk:function(){Pn.submit()},onCancel:Mt.onClose,title:"\u65B0\u5EFA\u6587\u4EF6\u5939"},o.a.createElement("section",{className:Ce.a.bg},o.a.createElement("div",{className:Ce.a.wrap},o.a.createElement(ne.a,{className:"mt10",form:Pn,scrollToFirstError:!0,layout:"vertical",onFinish:Er,onChange:function(){var qn,ue,V,Q,ee=Object(D.a)({},Pn.getFieldsValue()),Se=ee==null||((qn=ee.path)===null||qn===void 0)?void 0:qn.split(""),le=ee==null||((ue=ee.file)===null||ue===void 0)?void 0:ue.split("");Se!=null&&(V=Se.filter(function(nt){return nt=="/"}))!==null&&V!==void 0&&V.length&&(ee.path=ee.path.substring(0,ee.path.length-1)),le!=null&&(Q=le.filter(function(nt){return nt=="/"}))!==null&&Q!==void 0&&Q.length&&(ee.file=ee.file.substring(0,ee.path.length-1)),Pn.setFieldsValue(Object(D.a)({},ee)),Kn(ee)}},o.a.createElement(ne.a.Item,{label:"\u6587\u4EF6\u5939\u540D\u79F0\uFF1A",name:"path"},o.a.createElement(_.a,null,o.a.createElement(y.a,null,o.a.createElement("span",{className:Ce.a.filePath},Mt.defaultPath+"/")),o.a.createElement(y.a,{flex:"1"},o.a.createElement(ne.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5939\u540D\u79F0",size:"large"}))))),o.a.createElement(ne.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\uFF1A",name:"file"},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0\uFF0C\u5982\u679C\u4E0D\u586B\u5199\u7CFB\u7EDF\u5C06\u5728\u6587\u4EF6\u5939\u4E0B\u521B\u5EFA.gitkeep\u7684\u9ED8\u8BA4\u6587\u4EF6",size:"large"})),o.a.createElement(ne.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"}))))))},oe=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Bt,loading:yt.models.index}})(fe),se=x("7ahc"),be=function(ze){var yt=ze.shixunsDetail,pt=ze.globalSetting,Bt=ze.loading,Ht=ze.user,lt=ze.taskData,Lt=ze.dispatch,Dt=ze.isRepository,Mt=ze.onClose,Wt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository","onClose"]),Yt=Object(G.h)(),mn=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),Qt=Object(v.useState)({}),$t=Object(C.a)(Qt,2),Kn=$t[0],hn=$t[1],Rn=Object(v.useRef)(),wn=ne.a.useForm(),Pn=Object(C.a)(wn,1),Yn=Pn[0],or=Object(v.useState)(""),Xt=Object(C.a)(or,2),xn=Xt[0],Er=Xt[1];Object(v.useEffect)(function(){Wt.visible&&Yn.resetFields()},[Wt.visible]),Object(v.useEffect)(function(){var qn=sessionStorage.getItem("pathArray");if(qn){var ue=qn.split(",").join("/"),V=ue.indexOf("/")===0?ue.substr(1):ue;Er(V)}},[]),Object(v.useEffect)(function(){var qn,ue;Rn.current=(qn=Yt.pathname)===null||qn===void 0||((ue=qn.split("/"))===null||ue===void 0)?void 0:ue[2]},[]);var nr=function(){var qn=Object(l.a)(k.a.mark(function ue(){var V,Q,ee=arguments;return k.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return V=ee.length>0&&ee[0]!==void 0?ee[0]:{},le.next=3,Object(J.b)({id:lt.myshixun.identifier,message:V.commitMessage,content:V.codeMirror,path:(Wt.defaultPath?Wt.defaultPath+"/":"")+V.path,secret_repository:Dt?void 0:!0});case 3:Q=le.sent,(Q==null?void 0:Q.status)===0&&(m.b.success("\u6DFB\u52A0\u6210\u529F"),Wt.onOK({path:(Wt.defaultPath?Wt.defaultPath+"/":"")+V.path,name:V.path.split("/")[V.path.split("/").length-1]}),Mt());case 5:case"end":return le.stop()}},ue)}));return function(){return qn.apply(this,arguments)}}(),Ir=function(){var ue,V;W.d.push("/shixuns/".concat(Rn.current,"/").concat((ue=Yt.pathname)===null||ue===void 0||((V=ue.split("/"))===null||V===void 0)?void 0:V[3]).concat(xn?"/master/shixun_show/".concat(xn):""))};return o.a.createElement(s.a,{width:"60%",visible:Wt.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Yn.submit()},onCancel:Mt,title:"\u65B0\u5EFA\u6587\u4EF6"},o.a.createElement("section",{className:Ce.a.bg},o.a.createElement("div",{className:Ce.a.wrap},o.a.createElement(ne.a,{className:"mt10",form:Yn,scrollToFirstError:!0,layout:"vertical",onFinish:nr,onChange:function(){var ue,V,Q=Object(D.a)({},Yn.getFieldsValue()),ee=Q==null||((ue=Q.path)===null||ue===void 0)?void 0:ue.split("");(ee==null||((V=ee.filter(function(Se){return Se=="/"}))===null||V===void 0)?void 0:V.length)>1&&(Q.path=Q.path.substring(0,Q.path.length-1)),Yn.setFieldsValue(Object(D.a)({},Q)),hn(Q)}},o.a.createElement(ne.a.Item,{label:"\u6587\u4EF6\u540D\u79F0\u6216\u6587\u4EF6\u8DEF\u5F84\uFF1A",name:"path"},o.a.createElement(_.a,null,o.a.createElement(y.a,null,o.a.createElement("span",{className:Ce.a.filePath},Wt.defaultPath+"/")),o.a.createElement(y.a,{flex:"1"},o.a.createElement(ne.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large"}))))),o.a.createElement(ne.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u672C\u6B21\u63D0\u4EA4\u7684\u4E3B\u8981\u4FE1\u606F\uFF0C\u5408\u7406\u7684\u63CF\u8FF0\u4FE1\u606F\u6709\u5229\u4E8E\u4EE3\u7801\u5386\u53F2\u8BB0\u5F55\u7684\u7BA1\u7406",size:"large"})),o.a.createElement("div",{className:"mt10 mb20"},o.a.createElement(ne.a.Item,{name:"codeMirror",label:"\u6587\u4EF6\u5185\u5BB9\uFF1A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u5185\u5BB9"}]},o.a.createElement(se.a,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}})))))))},ie=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Bt,loading:yt.models.index}})(be),de=function(ze){var yt=ze.shixunsDetail,pt=ze.globalSetting,Bt=ze.loading,Ht=ze.user,lt=ze.dispatch,Lt=ze.isRepository,Dt=ze.taskData,Mt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository","taskData"]),Wt=Object(G.h)(),Yt=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),mn=Object(v.useState)({}),Qt=Object(C.a)(mn,2),$t=Qt[0],Kn=Qt[1],hn=Object(v.useRef)(),Rn=ne.a.useForm(),wn=Object(C.a)(Rn,1),Pn=wn[0],Yn=Object(v.useState)(""),or=Object(C.a)(Yn,2),Xt=or[0],xn=or[1],Er=Object(v.useState)(""),nr=Object(C.a)(Er,2),Ir=nr[0],qn=nr[1];Object(v.useEffect)(function(){Mt.visible&&Pn.resetFields()},[Mt.visible]),Object(v.useEffect)(function(){var Q=Mt.defaultPath.split("/");Q.length===1?(xn(""),qn(Mt.defaultPath)):(qn(Q.pop()),xn(Q.join("/")+"/"))},[Mt.defaultPath]),Object(v.useEffect)(function(){var Q,ee;hn.current=(Q=Wt.pathname)===null||Q===void 0||((ee=Q.split("/"))===null||ee===void 0)?void 0:ee[2]},[]);var ue=function(){var Q=Object(l.a)(k.a.mark(function ee(){var Se,le,nt,Nt=arguments;return k.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return le=Nt.length>0&&Nt[0]!==void 0?Nt[0]:{},an.next=3,Object(J.w)({id:Dt==null||((Se=Dt.shixun)===null||Se===void 0)?void 0:Se.identifier,from:Mt.defaultPath,to:Xt+le.path,message:le.commitMessage||"".concat(Mt.defaultPath," rename to ").concat(Xt).concat(le.path," ")});case 3:nt=an.sent,(nt==null?void 0:nt.status)===0&&(m.b.success("\u64CD\u4F5C\u6210\u529F"),Mt.onOK({path:le.path,name:le.path}),Mt.onClose());case 5:case"end":return an.stop()}},ee)}));return function(){return Q.apply(this,arguments)}}(),V=function(){var ee,Se;W.d.push("/shixuns/".concat(hn.current,"/").concat((ee=Wt.pathname)===null||ee===void 0||((Se=ee.split("/"))===null||Se===void 0)?void 0:Se[3]).concat(Xt?"/master/shixun_show/".concat(Xt):""))};return o.a.createElement(s.a,{width:"40%",visible:Mt.visible,wrapClassName:Ce.a.modal,centered:!0,onOk:function(){Pn.submit()},onCancel:Mt.onClose,title:"\u63D0\u4EA4\u8BF4\u660E"},o.a.createElement("section",{className:Ce.a.bg},o.a.createElement("div",{className:Ce.a.wrap},o.a.createElement(ne.a,{className:"mt10",form:Pn,scrollToFirstError:!0,layout:"vertical",onFinish:ue,onChange:function(){var ee,Se,le=Object(D.a)({},Pn.getFieldsValue()),nt=le==null||((ee=le.path)===null||ee===void 0)?void 0:ee.split("");(nt==null||((Se=nt.filter(function(Nt){return Nt=="/"}))===null||Se===void 0)?void 0:Se.length)>1&&(le.path=le.path.substring(0,le.path.length-1)),Pn.setFieldsValue(Object(D.a)({},le)),Kn(le)}},o.a.createElement(ne.a.Item,{label:"\u91CD\u547D\u540D\uFF1A",name:"path"},o.a.createElement(_.a,null,o.a.createElement(y.a,{flex:"1"},o.a.createElement(ne.a.Item,{name:"path",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u6587\u4EF6\u540D\u79F0",size:"large",defaultValue:Ir}))))),o.a.createElement(ne.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage"},o.a.createElement(we.a,{placeholder:"\u5982\u4E0D\u586B\u5199\uFF0C\u9ED8\u8BA4\u63D0\u4EA4\u4FE1\u606F\u662F\uFF08".concat(Mt.defaultPath," rename to \u65B0\u7684\u540D\u79F0 \uFF09"),size:"large"}))))))},Fe=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Bt,loading:yt.models.index}})(de),ae=x("DZo9"),Z=x("8z0m"),Y=x("m3rI"),q=x("8j3D"),ve=x("25Vc"),pe=x.n(ve),Te=Z.a.Dragger,Ne=function(ze){var yt,pt=ze.shixunsDetail,Bt=ze.globalSetting,Ht=ze.loading,lt=ze.user,Lt=ze.taskData,Dt=ze.dispatch,Mt=ze.isRepository,Wt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository"]),Yt=Object(G.h)(),mn=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),Qt=Object(v.useState)({}),$t=Object(C.a)(Qt,2),Kn=$t[0],hn=$t[1],Rn=Object(v.useRef)(),wn=ne.a.useForm(),Pn=Object(C.a)(wn,1),Yn=Pn[0],or=Object(v.useState)([]),Xt=Object(C.a)(or,2),xn=Xt[0],Er=Xt[1],nr=Object(v.useState)(),Ir=Object(C.a)(nr,2),qn=Ir[0],ue=Ir[1],V;Object(v.useEffect)(function(){Wt.visible&&(Yn.resetFields(),Er([]))},[Wt.visible]),Object(v.useEffect)(function(){Rn.current=mn.id},[]),Object(v.useEffect)(function(){var Nt=sessionStorage.getItem("pathArray");if(Nt){var Jt=Nt.split(",").join("/"),an=Jt.indexOf("/")===0?Jt.substr(1):Jt;ue(an)}},[]);var Q=function(Jt){if(V=Jt.file.name,Jt.file.status==="done"||Jt.file.status==="uploading"){var an,Gt,Dn;if(Er(Jt.fileList),!Jt.file.response)return;if(((an=Jt.file.response)===null||an===void 0?void 0:an.status)===0){m.b.success("\u4E0A\u4F20\u6210\u529F\uFF01");return}Er(xn.filter(function(Xn){return Xn.uid!==Jt.file.uid})),((Gt=Jt.file.response)===null||Gt===void 0?void 0:Gt.message)&&m.b.info((Dn=Jt.file.response)===null||Dn===void 0?void 0:Dn.message)}},ee=function(){var Nt=Object(l.a)(k.a.mark(function Jt(an){var Gt;return k.a.wrap(function(Xn){for(;;)switch(Xn.prev=Xn.next){case 0:if(an.response){Xn.next=3;break}return m.b.info("\u8FD8\u672A\u4E0A\u4F20\u5B8C\u6210\uFF0C\u65E0\u6CD5\u8FDB\u884C\u5220\u9664\u64CD\u4F5C\uFF01"),Xn.abrupt("return");case 3:return Xn.next=5,Dt({type:"shixunsDetail/deleteGitFile",payload:{id:mn.id,path:qn?"".concat(qn,"/").concat(an.name):an.name,message:Yn.getFieldValue("commitMessage")||"\u5220\u9664\u4E86".concat(qn?"".concat(qn,"/").concat(an.name):an.name),secret_repository:Mt?null:!0}});case 5:Gt=Xn.sent,Gt.status===0&&(Er(xn.filter(function(sr){return sr.uid!==an.uid})),m.b.info("\u5220\u9664\u6210\u529F"));case 7:case"end":return Xn.stop()}},Jt)}));return function(an){return Nt.apply(this,arguments)}}(),Se={height:300,multiple:!0,withCredentials:!0,data:function(){var Nt=Object(l.a)(k.a.mark(function an(){return k.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.abrupt("return",new Promise(function(){var Xn=Object(l.a)(k.a.mark(function sr(Tr,gr){return k.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:setTimeout(Object(l.a)(k.a.mark(function qi(){var Gr,ai;return k.a.wrap(function(Fi){for(;;)switch(Fi.prev=Fi.next){case 0:return Fi.next=2,Yn.getFieldsValue();case 2:Gr=Fi.sent,ai=Object(D.a)(Object(D.a)({},{path:Wt.defaultPath?Wt.defaultPath:"",message:Kn.commitMessage||"\u4E0A\u4F20\u4E86".concat(V)}),Mt?{}:{secret_repository:!0}),Tr(ai);case 5:case"end":return Fi.stop()}},qi)})),200);case 1:case"end":return xr.stop()}},sr)}));return function(sr,Tr){return Xn.apply(this,arguments)}}()));case 1:case"end":return Dn.stop()}},an)}));function Jt(){return Nt.apply(this,arguments)}return Jt}(),fileList:xn,method:"post",action:"".concat(Y.a.API_SERVER,"/api/myshixuns/").concat(Lt==null||((yt=Lt.myshixun)===null||yt===void 0)?void 0:yt.identifier,"/upload_git_file.json"),onChange:Q,onRemove:ee,beforeUpload:function(Jt){V=Jt.name}},le=function(){var Nt=Object(l.a)(k.a.mark(function Jt(an){return k.a.wrap(function(Dn){for(;;)switch(Dn.prev=Dn.next){case 0:return Dn.next=2,Yn.validateFields();case 2:Wt.onClose(),Wt.onOK({path:Wt.defaultPath}),nt();case 5:case"end":return Dn.stop()}},Jt)}));return function(an){return Nt.apply(this,arguments)}}(),nt=function(){};return o.a.createElement(s.a,{visible:Wt.visible,onOk:le,centered:!0,onCancel:Wt.onClose,width:"70%"},o.a.createElement("section",{className:pe.a.bg},o.a.createElement("div",{className:pe.a.wrap},o.a.createElement("div",{className:pe.a.title},"\u4E0A\u4F20\u6587\u4EF6"),o.a.createElement(ne.a,{className:"mt10",form:Yn,scrollToFirstError:!0,layout:"vertical",onFinish:le,onValuesChange:function(){return hn(Object(D.a)({},Yn.getFieldsValue()))}},o.a.createElement(ne.a.Item,{label:"\u63D0\u4EA4\u4FE1\u606F\uFF1A",name:"commitMessage",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u63D0\u4EA4\u4FE1\u606F"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u5FC5\u586B\uFF0C\u63CF\u8FF0\u4E3B\u8981\u4FEE\u6539\u5185\u5BB9\uFF08\u76F8\u5F53\u4E8EGit Commit message\u7684Header\uFF09"})),o.a.createElement(ne.a.Item,{label:"\u9009\u62E9\u6587\u4EF6",name:"file",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u6587\u4EF6"}]},o.a.createElement(Te,Se,o.a.createElement("div",null,o.a.createElement("i",{className:"iconfont icon-shangchuan font50 ".concat(pe.a.colorBlue)})),o.a.createElement("div",{className:"font14 mt30"},"\u62D6\u62FD\u6587\u4EF6\u6216",o.a.createElement("span",{className:"".concat(pe.a.colorBlue," ml5")},"\u70B9\u51FB\u6B64\u5904\u4E0A\u4F20")))))),o.a.createElement(q.a,{onFinish:function(Jt){return ue(Jt)}})))},me=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Bt,loading:yt.models.index}})(Ne),Ie=x("aVK0"),_e=x.n(Ie),Ve=x("TXba"),tt=x.n(Ve),Ge=function(ze){var yt=ze.shixunsDetail,pt=ze.globalSetting,Bt=ze.loading,Ht=ze.dispatch,lt=ze.title,Lt=ze.pathList,Dt=Lt===void 0?[]:Lt,Mt=ze.showInputPath,Wt=Mt===void 0?!1:Mt,Yt=ze.isMergeSelectFile,mn=Yt===void 0?!1:Yt,Qt=ze.onFinish,$t=Qt===void 0?function(){}:Qt,Kn=ne.a.useForm(),hn=Object(C.a)(Kn,1),Rn=hn[0],wn=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),Pn=Object(G.h)(),Yn=Object(v.useRef)(),or=Object(v.useState)(""),Xt=Object(C.a)(or,2),xn=Xt[0],Er=Xt[1],nr=Object(v.useState)(""),Ir=Object(C.a)(nr,2),qn=Ir[0],ue=Ir[1],V=Object(v.useState)([]),Q=Object(C.a)(V,2),ee=Q[0],Se=Q[1],le=Object(v.useState)([]),nt=Object(C.a)(le,2),Nt=nt[0],Jt=nt[1];Object(v.useEffect)(function(){var Tr,gr;Yn.current=((Tr=Pn.pathname)===null||Tr===void 0||((gr=Tr.split("/"))===null||gr===void 0)?void 0:gr[3])==="repository"},[]),Object(v.useEffect)(function(){if(yt.actionTabs.key!=="Repository-SelectFilePath")return;var Tr=Dt.join("/"),gr=[];Dt.map(function(rr,xr){xr===0?gr.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(rr),path:Tr}):gr.push({val:"/".concat(rr),path:Tr})}),Se(gr),Er(Tr),ue(Tr),an(Tr)},[yt.actionTabs.key]);var an=function(){var Tr=Object(l.a)(k.a.mark(function gr(rr){var xr;return k.a.wrap(function(Gr){for(;;)switch(Gr.prev=Gr.next){case 0:return Gr.next=2,Ht({type:Yn.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:wn.id,path:rr}});case 2:xr=Gr.sent,xr&&Jt(xr.trees||[]);case 4:case"end":return Gr.stop()}},gr)}));return function(rr){return Tr.apply(this,arguments)}}(),Gt=function(gr){var rr=xn;gr.type==="tree"&&(ee.length?ee.push({val:"/".concat(gr.name),path:gr.name}):ee.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(gr.name),path:gr.name}),Se(ee),rr=xn?"".concat(xn,"/").concat(gr.name):gr.name,Er(rr)),an(rr)},Dn=function(gr,rr){var xr=ee.filter(function(Gr,ai){return ai<=rr});Se(xr);var qi=xr.filter(function(Gr,ai){return ai!==0}).map(function(Gr){return Gr.val}).join("").substr(1);Er(qi),an(qi)},Xn=function(){var Tr=Object(l.a)(k.a.mark(function gr(){var rr,xr,qi;return k.a.wrap(function(ai){for(;;)switch(ai.prev=ai.next){case 0:if(rr=Rn==null?void 0:Rn.getFieldsValue(),xr=xn?"".concat(xn).concat(rr!=null&&rr.name?"/".concat(rr==null?void 0:rr.name):""):rr==null?void 0:rr.name,!mn){ai.next=6;break}return $t(xr),sr(),ai.abrupt("return");case 6:if(!Wt){ai.next=16;break}return ai.next=9,Rn.validateFields();case 9:return ai.next=11,Ht({type:"shixunsDetail/uploadGitFolder",payload:Object(D.a)(Object(D.a)({},{id:wn.id,path:xr}),Yn.current?{}:{secret_repository:!0})});case 11:qi=ai.sent,$t(qn),qi.status===0&&m.b.info("\u65B0\u5EFA\u6210\u529F"),ai.next=18;break;case 16:$t(xr),m.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:sr();case 19:case"end":return ai.stop()}},gr)}));return function(){return Tr.apply(this,arguments)}}(),sr=function(){Ht({type:"shixunsDetail/setActionTabs",payload:{}}),Rn.resetFields()};return o.a.createElement(s.a,{centered:!0,title:lt||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:yt.actionTabs.key==="Repository-SelectFilePath",onOk:Xn,onCancel:sr},o.a.createElement("div",{className:tt.a.wrap},o.a.createElement("div",{className:tt.a.content},o.a.createElement("div",{className:tt.a.mainPathWrap},!!(ee!=null&&ee.length)&&ee.map(function(Tr,gr){return o.a.createElement("a",{key:gr,onClick:function(){return Dn(Tr,gr)}},Tr.val)})),!!(Nt!=null&&Nt.length)&&Nt.map(function(Tr,gr){return Tr.type==="tree"&&o.a.createElement("a",{key:gr,onClick:function(){return Gt(Tr)}},o.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(tt.a.colorBlue)}),Tr.name)})),o.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),o.a.createElement("div",{className:"mt5 mb5"},xn),Wt&&o.a.createElement(ne.a,{form:Rn,scrollToFirstError:!0,className:"mt20"},o.a.createElement(ne.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},o.a.createElement(we.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))},Le=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting;return{shixunsDetail:ze,globalSetting:pt,loading:yt.models.index}})(Ge),bt=x("GZ0F"),Re=x("8Skl"),Xe=x("HBuW"),et=x("LvDl"),Ye=x("NLgs"),Me=x("lzim"),Ke=B.a.DirectoryTree,ge=function(ze){var yt,pt,Bt,Ht=ze.shixunsDetail,lt=ze.globalSetting,Lt=ze.loading,Dt=ze.user,Mt=ze.activeKey,Wt=ze.dispatch,Yt=ze.taskData,mn=ze.practiceSetting,Qt=ze.isRepository,$t=ze.treeData,Kn=ze.setTreeData,hn=ze.params,Rn=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","activeKey","dispatch","taskData","practiceSetting","isRepository","treeData","setTreeData","params"]),wn=Object(G.h)(),Pn=Object(v.useState)(),Yn=Object(C.a)(Pn,2),or=Yn[0],Xt=Yn[1],xn=Object(v.useState)(!1),Er=Object(C.a)(xn,2),nr=Er[0],Ir=Er[1],qn=Object(v.useState)(!1),ue=Object(C.a)(qn,2),V=ue[0],Q=ue[1],ee=Object(v.useState)(!1),Se=Object(C.a)(ee,2),le=Se[0],nt=Se[1],Nt=Object(v.useState)(!1),Jt=Object(C.a)(Nt,2),an=Jt[0],Gt=Jt[1],Dn=Object(v.useState)(""),Xn=Object(C.a)(Dn,2),sr=Xn[0],Tr=Xn[1],gr=Object(v.useState)([]),rr=Object(C.a)(gr,2),xr=rr[0],qi=rr[1],Gr=Object(v.useState)([]),ai=Object(C.a)(Gr,2),da=ai[0],Fi=ai[1],ia=Object(v.useState)([]),Ca=Object(C.a)(ia,2),po=Ca[0],so=Ca[1],xo=Object(v.useState)(!1),ka=Object(C.a)(xo,2),Yi=ka[0],Nr=ka[1],Qr=Object(v.useState)(),yi=Object(C.a)(Qr,2),Fr=yi[0],wr=yi[1],ei=Object(v.useState)(),vr=Object(C.a)(ei,2),oi=vr[0],ir=vr[1],Wi=Object(v.useState)(""),Mi=Object(C.a)(Wi,2),$i=Mi[0],mo=Mi[1],Qi=Object(v.useState)(),Ha=Object(C.a)(Qi,2),La=Ha[0],ti=Ha[1],Bo=Object(v.useState)(!1),Ka=Object(C.a)(Bo,2),go=Ka[0],So=Ka[1];Object(v.useEffect)(function(){Kn([]),cr(""),localStorage.warehouseHideTip||Nr(!0)},[wn.pathname,Qt]),Object(v.useEffect)(function(){var Tn;if(Yt!=null&&(Tn=Yt.challenge)!==null&&Tn!==void 0&&Tn.path&&$t!==null&&$t!==void 0&&$t.length){var tn,In,vn,er=Yt==null||((tn=Yt.challenge)===null||tn===void 0||((In=tn.path)===null||In===void 0))?void 0:In.replaceAll("\uFF1B",""),Ar=(vn=Object(et.cloneDeep)($t))===null||vn===void 0?void 0:vn.filter(function(fi){var bi;return fi.name===(er==null||((bi=er.split("/"))===null||bi===void 0)?void 0:bi[0])});Wa(er),($t==null?void 0:$t.length)!==1&&(console.log(Ar,"filterTreeData"),Kn(Ar))}},[Yt==null||((yt=Yt.challenge)===null||yt===void 0)?void 0:yt.path,$t]);var Wa=function(tn){Jn(tn),da=[tn],Fi([tn])},Ho=function(){var Tn=Object(l.a)(k.a.mark(function tn(){var In,vn,er=arguments;return k.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return In=er.length>0&&er[0]!==void 0?er[0]:"",fi.next=3,Object(Xe.Gb)({id:hn.id,secret_dir_path:In});case 3:vn=fi.sent,vn&&ti(In);case 5:case"end":return fi.stop()}},tn)}));return function(){return Tn.apply(this,arguments)}}(),Qn=function(tn){return o.a.createElement(u.a,{className:_e.a.menu,onClick:function(vn){Tr(tn.path||"");switch(vn.key){case"1":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6"]),Ir(!0);break;case"2":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u65B0\u5EFA\u6587\u4EF6\u5939"]),nt(!0);break;case"3":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u4E0A\u4F20"]),Gt(!0);break;case"4":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u91CD\u547D\u540D"]),Q(!0);break;case"5":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u5220\u9664"]),jr(tn.path,tn.name,tn);break;case"6":Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93","\u590D\u5236\u8DEF\u5F84"]),qa(tn);break}}},(tn.type==="topTree"||tn.type==="tree")&&o.a.createElement(u.a.Item,{key:"1"},"\u65B0\u5EFA\u6587\u4EF6"),(tn.type==="topTree"||tn.type==="tree")&&o.a.createElement(u.a.Item,{key:"2"},"\u65B0\u5EFA\u6587\u4EF6\u5939"),(tn.type==="topTree"||tn.type==="tree")&&o.a.createElement(u.a.Item,{key:"3"},"\u4E0A\u4F20"),tn.type!=="topTree"&&tn.type!=="tree"&&o.a.createElement(u.a.Item,{key:"4"},"\u91CD\u547D\u540D"),tn.type!=="topTree"&&o.a.createElement(re.CopyToClipboard,{text:"/data/workspace/myshixun/".concat(Qt?"":"secret/").concat(tn==null?void 0:tn.path),onCopy:function(){return m.b.success("\u590D\u5236\u6210\u529F")}},o.a.createElement(u.a.Item,{key:"6"},o.a.createElement(o.a.Fragment,null,"\u590D\u5236\u8DEF\u5F84"))),tn.type!=="topTree"&&o.a.createElement(u.a.Item,{key:"5"},"\u5220\u9664"))},mr=function(tn,In){return tn.map(function(vn){return In==""?vn.path=In+vn.name:vn.path=In+"/"+vn.name,vn.title=o.a.createElement(_.a,{className:"font14"},o.a.createElement(y.a,{flex:"1"},o.a.createElement(_.a,null,o.a.createElement(y.a,{flex:"20px"},vn.type==="blob"&&o.a.createElement("span",{className:"iconfont icon-wenjian11 font12"})),o.a.createElement(y.a,{flex:"1"},o.a.createElement("span",{className:" multi_ellipsis1"},vn.name)))),o.a.createElement(y.a,null,(vn.type==="blob"||vn.type==="tree")&&o.a.createElement(F.a,{overlay:Qn(vn),className:_e.a.ellipsis},o.a.createElement("i",{className:"iconfont icon-gengduo2 c-555a88"})))),vn.disableCheckbox=or&&or!==vn.name,vn.className=vn.type==="tree"?_e.a.pl23:"",vn.checkable=vn.type!=="tree",vn.isLeaf=vn.type!=="tree",vn.children=vn.type==="tree"&&[],vn.key=vn.path,vn})},Jn=function(tn){Wt({type:"practiceSetting/setSideBarTabs",payload:{selectPath:tn}})},Lr=function(){var Tn=Object(l.a)(k.a.mark(function tn(In,vn){var er;return k.a.wrap(function(fi){for(;;)switch(fi.prev=fi.next){case 0:return er=In.split("/"),fi.next=3,cr(sr);case 3:setTimeout(function(){Jn(In),xr=[er[0]||""],da=[In],Fi(Object(N.a)(da)),qi(Object(N.a)(xr))},150);case 4:case"end":return fi.stop()}},tn)}));return function(In,vn){return Tn.apply(this,arguments)}}(),Kr=function(tn,In){if(console.log(tn,"data"),In=="")Kn(Object(N.a)(tn));else{var vn=gi($t,In,tn);Kn(Object(N.a)(vn))}};function gi(Tn,tn,In){return Tn.map(function(vn){return vn.key===tn?(vn.children=Object(N.a)(In),Object(D.a)({},vn)):vn.children?Object(D.a)(Object(D.a)({},vn),{},{children:gi(vn.children,tn,In)}):vn})}var cr=function(){var Tn=Object(l.a)(k.a.mark(function tn(){var In,vn,er,Ar,fi,bi,Ji=arguments;return k.a.wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:return vn=Ji.length>0&&Ji[0]!==void 0?Ji[0]:"",console.log("location:",wn),zi.next=4,Object(J.m)(Yt==null||((In=Yt.myshixun)===null||In===void 0)?void 0:In.identifier,{path:vn});case 4:return er=zi.sent,er&&((Ar=er.trees)!==null&&Ar!==void 0&&Ar.length?(bi=mr(Object(N.a)(er.trees),vn),Kr(bi,vn),so(er.trees||[]),ir((er==null?void 0:er.secret_dir_path)||""),console.log("handleGetRepository:",bi,vn),setTimeout(function(){return console.log($t)},2e3)):vn==""&&Kn([]),wr(((fi=er.commits)===null||fi===void 0?void 0:fi[0])||{})),zi.abrupt("return",er);case 7:case"end":return zi.stop()}},tn)}));return function(){return Tn.apply(this,arguments)}}(),Xi=function(){var Tn=Object(l.a)(k.a.mark(function tn(In){return k.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:return er.abrupt("return",new Promise(function(){var Ar=Object(l.a)(k.a.mark(function fi(bi,Ji){return k.a.wrap(function(zi){for(;;)switch(zi.prev=zi.next){case 0:return In.children.length&&bi(),mo(In.path),zi.next=4,cr(In.path);case 4:bi();case 5:case"end":return zi.stop()}},fi)}));return function(fi,bi){return Ar.apply(this,arguments)}}()));case 1:case"end":return er.stop()}},tn)}));return function(In){return Tn.apply(this,arguments)}}(),ga=function(){var Tn=Object(l.a)(k.a.mark(function tn(In,vn){var er,Ar;return k.a.wrap(function(bi){for(;;)switch(bi.prev=bi.next){case 0:if(console.log("handleSelectTree",In,vn.nativeEvent.target.nodeName,vn),er=function(){Jn(vn.node.path),In=[vn.node.path],Fi(Object(N.a)(In))},!(vn.nativeEvent.target.nodeName==="svg"||vn.nativeEvent.target.nodeName==="LI"||vn.nativeEvent.target.nodeName==="I")){bi.next=4;break}return bi.abrupt("return");case 4:vn.node.type==="blob"&&(mn!=null&&(Ar=mn.sideBar)!==null&&Ar!==void 0&&Ar.confirmLeave?s.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){er(),Wt({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})}}):er());case 5:case"end":return bi.stop()}},tn)}));return function(In,vn){return Tn.apply(this,arguments)}}(),jr=function(tn,In,vn){s.a.confirm({centered:!0,title:"\u786E\u8BA4\u9700\u8981\u5220\u9664\u8BE5\u6587\u4EF6".concat(vn.children?"\u5939":"","?"),okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var er=Object(l.a)(k.a.mark(function fi(){var bi,Ji,Pi,zi;return k.a.wrap(function(Ea){for(;;)switch(Ea.prev=Ea.next){case 0:return Ea.next=2,Object(J.h)({id:Yt==null||((bi=Yt.myshixun)===null||bi===void 0)?void 0:bi.identifier,path:tn,message:"\u5220\u9664".concat(tn)});case 2:if(Ji=Ea.sent,Pi=tn.split("/"),!((Ji==null?void 0:Ji.status)===0)){Ea.next=20;break}return m.b.info("\u5220\u9664\u6210\u529F"),Pi.splice(Pi.length-1,1),Ea.next=9,cr(Pi.length>1?Pi.join("/"):"");case 9:if(zi=Ea.sent,!(zi!=null&&zi.trees)){Ea.next=13;break}Ea.next=16;break;case 13:return Pi.splice(Pi.length-1,1),Ea.next=16,cr(Pi.length>1?Pi.join("/"):"");case 16:return Jn(""),Ea.abrupt("return",!0);case 20:(Ji==null?void 0:Ji.status)===-3&&s.a.info({title:"\u5220\u9664\u5931\u8D25",content:o.a.createElement("div",null,"\u8BE5\u6587\u4EF6\u201C",tn,"\u201D\u5DF2\u7ECF\u88AB\u4EFB\u52A1\u5173\u5361\u7684\u5B66\u5458\u4EFB\u52A1\u6587\u4EF6\u6216\u8BC4\u6D4B\u6267\u884C\u6587\u4EF6\u4F7F\u7528\uFF0C\u8BF7\u5148\u4FEE\u6539\u4EFB\u52A1\u5173\u5361\u4E2D\u8BC4\u6D4B\u8BBE\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u540E\u518D\u5220\u9664\u3002"),okText:"\u6211\u77E5\u9053\u4E86",onOk:function(){}});case 21:case"end":return Ea.stop()}},fi)}));function Ar(){return er.apply(this,arguments)}return Ar}()})},qa=function(tn){console.log(tn,"item")},di=function(){var Tn=Object(l.a)(k.a.mark(function tn(In,vn){return k.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:if(console.log("handleExpand",vn),!(vn.nativeEvent.target.nodeName==="svg"||vn.nativeEvent.target.nodeName==="path"||vn.nativeEvent.target.nodeName==="LI")){Ar.next=5;break}return Ar.abrupt("return",!0);case 5:return Ar.next=7,Xi(vn.node);case 7:xr.includes(vn.node.path)?xr.splice(xr.indexOf(vn.node.path),1):xr.push(vn.node.path);case 8:qi(Object(N.a)(xr));case 9:case"end":return Ar.stop()}},tn)}));return function(In,vn){return Tn.apply(this,arguments)}}(),Ai=function(){Nr(!1),localStorage.warehouseHideTip=!0},va=function(){var Tn=Object(l.a)(k.a.mark(function tn(In){var vn,er,Ar,fi,bi;return k.a.wrap(function(Pi){for(;;)switch(Pi.prev=Pi.next){case 0:Ar="",Pi.t0=Qt,Pi.next=Pi.t0===!0?4:Pi.t0===!1?9:11;break;case 4:return Ar="\u5F00\u542F\u7248\u672C\u5E93",fi="\u5F00\u542F",bi="\u4E0D\u5F00\u542F",er=o.a.createElement("div",null,"\u65B0\u5EFA\u5B9E\u8DF5\u9898\u5173\u5361\u65F6\uFF0C\u9700\u8981\u4F7F\u7528\u4EE3\u7801\u4ED3\u5E93\uFF1B\u5982\u679C\u53EA\u6709\u9009\u62E9\u9898\u5173\u5361\uFF0C\u5219\u4E0D\u9700\u8981\u4EE3\u7801\u4ED3\u5E93\u3002\u4EE3\u7801\u4ED3\u5E93\u542F\u7528\u540E\uFF0C\u5C06\u65E0\u6CD5\u5173\u95ED\u3002"),Pi.abrupt("break",11);case 9:return Ht!=null&&(vn=Ht.detail)!==null&&vn!==void 0&&vn.secret_repository?(Ar="\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",fi="\u786E\u5B9A",bi="\u53D6\u6D88",er=o.a.createElement("div",null,"\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u540E\uFF0C\u5DF2\u521B\u5EFA\u7684\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\u53CA\u5176\u5185\u5BB9\uFF0C\u5C06\u88AB\u5220\u9664\u3002\u786E\u8BA4\u8981\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93\uFF1F")):(Ar="\u5F00\u542F\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93",fi="\u4E0D\u4F7F\u7528",bi="\u4F7F\u7528",er=o.a.createElement("div",null,"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002\u9002\u7528\u4E8E\u547D\u4EE4\u884C\u3001\u56FE\u5F62\u5316\u684C\u9762\u4E24\u7C7B\u5B9E\u8BAD\uFF0C\u5176\u4ED6\u7C7B\u578B\u5B9E\u8BAD\u4E0D\u5EFA\u8BAE\u4F7F\u7528\u79C1\u5BC6\u7248\u672C\u5E93\u3002")),Pi.abrupt("break",11);case 11:if(!(!Qt&&Object(Ye.b)(Wt,"\u4E0D\u80FD\u5F00\u542F/\u5173\u95ED\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"))){Pi.next=13;break}return Pi.abrupt("return");case 13:s.a.confirm({title:Ar,okText:fi,cancelText:bi,content:er,onOk:function(){var Co;Object(p.cb)(["\u5B9E\u8DF5\u9879\u76EE","\u8BBE\u7F6E","\u4EE3\u7801\u4ED3\u5E93",Ar]),!Qt&&!(Ht!=null&&(Co=Ht.detail)!==null&&Co!==void 0&&Co.secret_repository)||Ma(In)},onCancel:function(){var Co;!Qt&&!(Ht!=null&&(Co=Ht.detail)!==null&&Co!==void 0&&Co.secret_repository)&&Ma(In)}});case 14:case"end":return Pi.stop()}},tn)}));return function(In){return Tn.apply(this,arguments)}}(),Ma=function(){var Tn=Object(l.a)(k.a.mark(function tn(In){return k.a.wrap(function(er){for(;;)switch(er.prev=er.next){case 0:if(!Qt){er.next=6;break}return er.next=3,Object(Xe.r)(Object(D.a)({},hn));case 3:Wt({type:"practiceSetting/getCommonData",payload:Object(D.a)({},hn)}),er.next=8;break;case 6:return er.next=8,Object(Xe.t)(Object(D.a)(Object(D.a)({},hn),{},{is_secret_repository:In}));case 8:cr(),Wt({type:"shixunsDetail/getShixunsDetail",payload:{id:hn.id}});case 10:case"end":return er.stop()}},tn)}));return function(In){return Tn.apply(this,arguments)}}(),Ko=function(tn){console.log(tn)},hi=function(){var Tn=Object(l.a)(k.a.mark(function tn(In){var vn,er,Ar,fi,bi,Ji,Pi,zi,Co,Ea,Is;return k.a.wrap(function(xa){for(;;)switch(xa.prev=xa.next){case 0:if(console.log(In),vn=In.node.key,er=In.dragNode.key,Ar=In.node.pos.split("-"),fi=In.dropPosition-Number(Ar[Ar.length-1]),!(In.node.type!=="tree"||In.dragNode.path.split("/").length===1)){xa.next=8;break}return m.b.warn("\u672A\u79FB\u52A8\u6587\u4EF6\u76EE\u5F55\u4F4D\u7F6E"),xa.abrupt("return");case 8:return xa.next=10,Wt({type:"shixunsDetail/moveGitFile",payload:{id:hn.id,from:In.dragNode.path,to:In.node.path+"/"+In.dragNode.name,message:"".concat(In.dragNode.path," move to ").concat(In.node.path+"/"+In.dragNode.name," ")}});case 10:if(bi=xa.sent,!(bi.status===0)){xa.next=22;break}return Jn(""),Ji=In.dragNode.path.split("/"),Ji.pop(),xa.next=17,cr(In.node.path);case 17:return xa.next=19,cr(Ji.join("/"));case 19:return Ji.pop(),xa.next=22,cr(Ji.join("/"));case 22:return xa.abrupt("return");case 28:case"end":return xa.stop()}},tn)}));return function(In){return Tn.apply(this,arguments)}}();return o.a.createElement("section",{className:_e.a.bg},o.a.createElement("div",{className:_e.a.contentbg},o.a.createElement("div",{className:_e.a.wrap},o.a.createElement(_.a,{className:_e.a.gitCode},o.a.createElement(y.a,{flex:"1"},o.a.createElement("span",{className:"iconfont icon-daimacangku2 mr8"}),Qt?"\u4EE3\u7801\u4ED3\u5E93":"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),o.a.createElement(y.a,null,o.a.createElement(F.a,{overlay:Qn({type:"topTree"}),className:"current"},o.a.createElement(b.a,{visible:Yi,title:o.a.createElement("div",{className:"font16"},o.a.createElement(bt.a,{style:{position:"relative",left:-35},onClick:function(){return Ai()}}),"\u70B9\u51FB\u6B64\u5904\u65B0\u5EFA\u6587\u4EF6\u3001\u65B0\u5EFA\u6587\u4EF6\u5939\u3001\u4E0A\u4F20\u6587\u4EF6\u3002",o.a.createElement("span",{onClick:function(){return Ai()},className:"iconfont icon-guanbi1 ml8 current font14"})),overlayClassName:_e.a.overlayClass,overlayStyle:{maxWidth:500},arrowPointAtCenter:!0,placement:"right",color:"#F7B500"})))),!!$t.length&&!Qt&&o.a.createElement("div",{className:"mt20 pl20 pr20 font14 c-white"},o.a.createElement("div",null,"\u5B9E\u8BAD\u8BC4\u6D4B\u7684\u65F6\u5019\uFF0C\u7CFB\u7EDF\u4F1A\u4E34\u65F6\u5C06\u79C1\u5BC6\u4EE3\u7801\u5E93\u79FB\u52A8\u666E\u901A\u4EE3\u7801\u5E93\u7684secret\u76EE\u5F55\u4E0B\u9762\uFF0C\u8BC4\u6D4B\u7ED3\u675F\u4F1A\u6E05\u7A7Asecret\u76EE\u5F55\u5185\u5BB9\u3002\u5982\u679C\u79C1\u5BC6\u4EE3\u7801\u5E93\u4E2D\u5B58\u5728\u6587\u4EF6src/test.sh\uFF0C\u5728\u666E\u901A\u4EE3\u7801\u5E93\u8C03\u7528\u8BE5\u6587\u4EF6\u5219\u4F7F\u7528\u8DEF\u5F84\uFF1Asecret/src/test.sh")),$t.length?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:_e.a.content},o.a.createElement(Ke,{disabled:!!Lt.effects["shixunsDetail/getFileContent"],multiple:!0,showIcon:!1,treeData:$t,switcherIcon:o.a.createElement(Re.a,{style:{fontWeight:"bold",fontSize:14,position:"relative",top:3,marginLeft:22}}),onExpand:di,expandedKeys:xr,selectedKeys:da,onSelect:ga,draggable:!0,onDragEnter:Ko,onDrop:hi,allowDrop:function(tn){var In=tn.dropNode,vn=tn.dropPosition;return!1}}))):"",!$t.length&&Qt&&(Ht==null||((pt=Ht.detail)===null||pt===void 0)?void 0:pt.init_repository)&&o.a.createElement(Ee,null),!$t.length&&!Qt&&(Ht==null||((Bt=Ht.detail)===null||Bt===void 0)?void 0:Bt.secret_repository)&&o.a.createElement(Ee,null))),o.a.createElement(Fe,{taskData:Yt,visible:V,defaultPath:sr,onClose:function(){return Q(!1)},isRepository:!Qt,onOK:function(){var Tn=Object(l.a)(k.a.mark(function tn(In){var vn;return k.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return vn=sr.split("/"),vn.pop(),Ar.next=4,cr(vn.join("/"));case 4:Jn("");case 5:case"end":return Ar.stop()}},tn)}));return function(tn){return Tn.apply(this,arguments)}}()}),o.a.createElement(ie,{taskData:Yt,visible:nr,defaultPath:sr,onClose:function(){return Ir(!1)},isRepository:Qt,onOK:function(tn){Lr(tn.path,tn.name)}}),o.a.createElement(oe,{taskData:Yt,visible:le,defaultPath:sr,onClose:function(){return nt(!1)},isRepository:Qt,onOK:function(tn){Lr(tn.path,tn.name)}}),o.a.createElement(me,{taskData:Yt,defaultPath:sr,visible:an,isRepository:Qt,onClose:function(){return Gt(!1)},onOK:function(){var Tn=Object(l.a)(k.a.mark(function tn(In){var vn;return k.a.wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return vn=sr.split("/"),Ar.next=3,cr(sr);case 3:xr=[vn[0]||""],da=[sr],Fi(Object(N.a)(da)),qi(Object(N.a)(xr));case 7:case"end":return Ar.stop()}},tn)}));return function(tn){return Tn.apply(this,arguments)}}()}),o.a.createElement(Le,{pathList:sr==null?void 0:sr.split("/"),showInputPath:!0,isMergeSelectFile:go,onFinish:function(tn){go?Ho(tn):cr(tn),So(!1)}}))},Ee=function(){return o.a.createElement("div",{className:"mt20 pb50 ".concat(_e.a.nodata)},o.a.createElement("div",{className:_e.a.headLeft},"\u63D0\u793A\uFF1A",o.a.createElement("br",null),"\u6B64\u5904\u5B58\u653E\u672C\u5B9E\u8BAD\u6240\u9700\u7684\u6240\u6709\u4EE3\u7801\u7B49\u76F8\u5173\u6587\u4EF6\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B",o.a.createElement("br",null),"\u4E24\u79CD\u65B9\u5F0F\u6765\u4F7F\u7528\uFF1A",o.a.createElement("br",null),"1\u3001",o.a.createElement("a",{href:"/forums/2784",target:"_blank"},"Git\u5BA2\u6237\u7AEF")," \u4E0A\u4F20\u5DF2\u6709\u6587\u4EF6\u6765\u5F00\u59CB\u4F7F\u7528\u3002",o.a.createElement("br",null),"2\u3001\u76F4\u63A5\u5728\u5E73\u53F0\u4E0A\u521B\u5EFA\u6587\u4EF6\u76EE\u5F55\u4EE5\u53CA\u76F8\u5173\u4EE3\u7801\u6587\u4EF6\u3002"),o.a.createElement("img",{width:"100%",src:Me.v}))},ce=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.practiceSetting,Ht=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Ht,practiceSetting:Bt,loading:yt}})(ge),je=x("/zsF"),Qe=x("PArb"),te=x("5GGG"),Je=x.n(te),ut=function(ze){var yt=ze.shixunsDetail,pt=ze.globalSetting,Bt=ze.loading,Ht=ze.user,lt=ze.dispatch,Lt=ze.isRepository,Dt=Object(w.a)(ze,["shixunsDetail","globalSetting","loading","user","dispatch","isRepository"]),Mt=Object(D.a)(Object(D.a)({},Object(G.i)()),Object(G.h)().query),Wt=Object(v.useState)([]),Yt=Object(C.a)(Wt,2),mn=Yt[0],Qt=Yt[1];Object(v.useEffect)(function(){$t()},[Lt]);var $t=function(){var Kn=Object(l.a)(k.a.mark(function hn(){var Rn;return k.a.wrap(function(Pn){for(;;)switch(Pn.prev=Pn.next){case 0:return Pn.next=2,lt({type:"shixunsDetail/getRepositoryCommit",payload:{id:Mt.id,secret_repository:Lt?void 0:!0}});case 2:Rn=Pn.sent,Rn&&Qt(Rn.commits||[]);case 4:case"end":return Pn.stop()}},hn)}));return function(){return Kn.apply(this,arguments)}}();return o.a.createElement(o.a.Fragment,null,mn==""&&o.a.createElement("div",{className:Je.a.empty},o.a.createElement("img",{src:Me.k,width:"258"}),o.a.createElement("br",null),o.a.createElement("span",{className:"c-grey-c font14"},"\u6682\u65E0\u63D0\u4EA4\u8BB0\u5F55")),mn!=""&&o.a.createElement("section",{className:Je.a.bg},o.a.createElement("div",{className:Je.a.wrap},o.a.createElement("div",{className:Je.a.content},mn==null?void 0:mn.map(function(Kn){var hn,Rn;return o.a.createElement("div",null,o.a.createElement(_.a,{align:"middle",className:"c-white font16"},o.a.createElement(y.a,null,Kn.title)),o.a.createElement(_.a,{align:"middle",className:"mt20 "},o.a.createElement(y.a,null,o.a.createElement("img",{className:Je.a.imageUrl,src:Y.a.IMG_SERVER+"/"+((hn=Kn.author)===null||hn===void 0?void 0:hn.image_url)})),o.a.createElement(y.a,{className:Je.a.blueLight},o.a.createElement("span",{className:"ml20"},(Rn=Kn.author)===null||Rn===void 0?void 0:Rn.username)),o.a.createElement(y.a,null,o.a.createElement("span",{className:"ml20 ".concat(Je.a.blueLight)},"\u63D0\u4EA4\u4E8E"),o.a.createElement("span",{className:"ml20 ".concat(Je.a.blueLight)},Kn.time))),o.a.createElement(Qe.a,{className:Je.a.divider}))})))))},Be=Object(W.a)(function(Pe){var ze=Pe.shixunsDetail,yt=Pe.loading,pt=Pe.globalSetting,Bt=Pe.user;return{shixunsDetail:ze,globalSetting:pt,user:Bt,loading:yt.models.index}})(ut),qe=x("p5ED"),at=A.a.TabPane,wt=function(ze){var yt,pt,Bt,Ht,lt,Lt,Dt=ze.globalSetting,Mt=ze.loading,Wt=ze.dispatch,Yt=ze.practiceSetting,mn=ze.shixunsDetail,Qt=ze.taskData,$t=ze.taskId,Kn=ze.onEditRepCode,hn=Object(w.a)(ze,["globalSetting","loading","dispatch","practiceSetting","shixunsDetail","taskData","taskId","onEditRepCode"]),Rn=!(Qt!=null&&Qt.is_last_game)&&((Qt==null?void 0:Qt.shixun.status)>0||(Qt==null||((yt=Qt.user)===null||yt===void 0)?void 0:yt.identity)<5),wn=Object(v.useState)("1"),Pn=Object(C.a)(wn,2),Yn=Pn[0],or=Pn[1],Xt=Object(v.useState)("1"),xn=Object(C.a)(Xt,2),Er=xn[0],nr=xn[1],Ir=Object(v.useState)(!0),qn=Object(C.a)(Ir,2),ue=qn[0],V=qn[1],Q=Object(v.useState)({}),ee=Object(C.a)(Q,2),Se=ee[0],le=ee[1],nt=Object(v.useRef)(),Nt=Object(v.useState)(!0),Jt=Object(C.a)(Nt,2),an=Jt[0],Gt=Jt[1],Dn=Object(v.useState)(["2","1"]),Xn=Object(C.a)(Dn,2),sr=Xn[0],Tr=Xn[1],gr=Object(v.useState)([]),rr=Object(C.a)(gr,2),xr=rr[0],qi=rr[1],Gr=Object(v.useRef)(),ai=Object(D.a)(Object(D.a)({},Object(G.i)()),{},{taskId:$t}),da=Object(v.useState)(!1),Fi=Object(C.a)(da,2),ia=Fi[0],Ca=Fi[1],po=[{id:"1",name:"\u4EE3\u7801\u4ED3\u5E93"},{id:"2",name:o.a.createElement("span",null,o.a.createElement("span",null,"\u79C1\u5BC6\u4EE3\u7801\u4ED3\u5E93"),o.a.createElement(b.a,{title:"\u79C1\u5BC6\u7248\u672C\u5E93\u7684\u6587\u4EF6\u5BF9\u5B66\u5458\u59CB\u7EC8\u9690\u85CF\uFF0C\u65E0\u6CD5\u8BBF\u95EE\u67E5\u770B\u3002"},o.a.createElement("i",{className:"iconfont icon-xiaowenhao",style:{marginLeft:2,fontSize:14}})))}];Object(v.useEffect)(function(){var Nr,Qr=Yt==null||((Nr=Yt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath.split("/");Tr(Qr)},[Yt==null||((pt=Yt.sideBar)===null||pt===void 0)?void 0:pt.selectPath]);var so=function(Qr){Qr.data==="compileResltDone"&&Ca(!1)};Object(v.useEffect)(function(){return window.addEventListener("message",so),function(){window.removeEventListener("message",so)}},[]);var xo=function(Qr){(Se==null?void 0:Se.file_type)==="txt"&&(Se.content=Qr,le(Object(D.a)({},Se)),Kn(Qr))};Object(v.useEffect)(function(){var Nr;console.log(Yt==null||((Nr=Yt.sideBar)===null||Nr===void 0)?void 0:Nr.selectPath,"sideBar"),new Promise(function(){var Qr=Object(l.a)(k.a.mark(function yi(Fr,wr){var ei,vr,oi,ir,Wi,Mi,$i;return k.a.wrap(function(Qi){for(;;)switch(Qi.prev=Qi.next){case 0:if(!((Yt==null||((ei=Yt.sideBar)===null||ei===void 0)?void 0:ei.selectPath)!==""&&Yt!==null&&Yt!==void 0&&(vr=Yt.sideBar)!==null&&vr!==void 0&&vr.selectPath)){Qi.next=5;break}return Qi.next=3,Object(J.j)($t,{path:Yt==null||((oi=Yt.sideBar)===null||oi===void 0)?void 0:oi.selectPath});case 3:if(ir=Qi.sent,ir!=null&&ir.content||(ir==null?void 0:ir.content)=="")try{(ir==null?void 0:ir.file_type)==="txt"?(ir.content=window.decodeURIComponent(escape(window.atob((Wi=ir.content)===null||Wi===void 0?void 0:Wi.content))),le(Object(D.a)({},ir))):(ir.content=(Mi=ir.content)===null||Mi===void 0?void 0:Mi.content,le(Object(D.a)({},ir)))}catch(Ha){Se.content&&(ir.content=window.atob(($i=ir.content)===null||$i===void 0?void 0:$i.content)),le(Object(D.a)({},ir)),m.b.warn("\u8BF7\u786E\u8BA4\u6587\u4EF6\u5B57\u7B26\u96C6\u7F16\u7801\u662F\u5426\u4E3AUTF-8")}else Wt({type:"practiceSetting/setSideBarTabs",payload:{selectPath:""}});case 5:case"end":return Qi.stop()}},yi)}));return function(yi,Fr){return Qr.apply(this,arguments)}}())},[Yt==null||((Bt=Yt.sideBar)===null||Bt===void 0)?void 0:Bt.selectPath]);var ka=o.a.createElement(u.a,{className:M.a.menu,onClick:function(Qr){var yi;!(mn!=null&&(yi=mn.detail)!==null&&yi!==void 0&&yi.secret_repository)&&Qr.key==="2"&&nr("1"),or(Qr.key),Qr.key==="1"?Gt(!0):Gt(!1)}},o.a.createElement(u.a.Item,{disabled:!0,key:"0"},"\u5207\u6362\u4ED3\u5E93"),po.filter(function(Nr){var Qr,yi;return!(mn!=null&&(Qr=mn.detail)!==null&&Qr!==void 0&&Qr.init_repository)||mn!=null&&(yi=mn.detail)!==null&&yi!==void 0&&yi.is_jupyter_lab?Nr.id!=="2":Nr}).map(function(Nr,Qr){return o.a.createElement(u.a.Item,{className:"leaveClick",key:Nr.id},Nr.name)})),Yi=function(){var Nr=Object(l.a)(k.a.mark(function Qr(){var yi,Fr,wr,ei,vr,oi;return k.a.wrap(function(Wi){for(;;)switch(Wi.prev=Wi.next){case 0:return Ca(!0),Wi.next=3,Object(J.L)(Qt==null||((yi=Qt.myshixun)===null||yi===void 0)?void 0:yi.identifier,Object(D.a)(Object(D.a)({path:Yt==null||((Fr=Yt.sideBar)===null||Fr===void 0)?void 0:Fr.selectPath},Se),{},{evaluate:0,game_id:Qt==null||((wr=Qt.game)===null||wr===void 0)?void 0:wr.id}));case 3:oi=Wi.sent,(ei=document.getElementById("latexIframeRef"))===null||ei===void 0||((vr=ei.contentWindow)===null||vr===void 0)||vr.postMessage("compile","*"),oi!=null&&oi.content&&Wt({type:"practiceSetting/setSideBarTabs",payload:Object(D.a)(Object(D.a)({},Yt.sideBar),{},{confirmLeave:!1})});case 6:case"end":return Wi.stop()}},Qr)}));return function(){return Nr.apply(this,arguments)}}();return o.a.createElement("div",{className:M.a.warehouse},o.a.createElement("div",{className:M.a.content},Er==="1"&&o.a.createElement(o.a.Fragment,null,o.a.createElement("aside",{className:M.a.left,id:"latex-drawer",style:{width:ue?"36%":"0%"}},o.a.createElement(r.a,{spinning:!!Mt.effects["shixunsDetail/getRepository"],wrapperClassName:"".concat(M.a.loading," ").concat(M.a.bottom0)},o.a.createElement(ce,{taskData:Qt,params:ai,setTreeData:qi,treeData:xr,activeKey:Yn,isRepository:an})),o.a.createElement("span",{onClick:function(){return V(!1)},className:"".concat(M.a.close," iconfont icon-quxiao")})),o.a.createElement("aside",{className:M.a.right,ref:Gr},(Yt==null||((Ht=Yt.sideBar)===null||Ht===void 0)?void 0:Ht.selectPath)!==""&&o.a.createElement(o.a.Fragment,null,o.a.createElement(r.a,{spinning:!!Mt.effects["shixunsDetail/getFileContent"],wrapperClassName:M.a.loading},o.a.createElement("div",{className:M.a.filePathWrp},o.a.createElement(_.a,{align:"middle",className:"w100"},o.a.createElement(y.a,null,o.a.createElement("span",{onClick:function(){return V(!0)},className:"iconfont icon-daimacangku2 c-white current"})),o.a.createElement(y.a,{flex:"40px"},o.a.createElement("div",{className:M.a.line,style:{marginLeft:20}})),o.a.createElement(y.a,{className:M.a.filePath},sr.map(function(Nr,Qr){return o.a.createElement("span",{className:"c-blue"},Nr)})))),o.a.createElement("div",{className:Mt.effects["shixunsDetail/getFileContent"]?"hide":"show"},o.a.createElement(qe.a,{className:"darkBlue",style:{top:66,height:"calc(100% - 60px)",position:"absolute"},filename:Se.filename,type:Se.file_type==="office"?"download":Se.file_type,data:Se.content,monacoEditor:{value:Se.content,language:Se.language,onChange:function(Qr){return xo(Qr)},options:{fontSize:14,minimap:{enabled:!1}}}}))),(Se==null?void 0:Se.file_type)==="txt"&&o.a.createElement("div",{className:M.a.footer},(Qt==null?void 0:Qt.prev_game)&&o.a.createElement("a",{href:"/tasks/".concat(Qt==null?void 0:Qt.prev_game).concat(location.search),style:{marginRight:"auto"},onClick:function(Qr){Qr.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(Qt==null?void 0:Qt.prev_game).concat(location.search)},300)}},"\u4E0A\u4E00\u5173"),o.a.createElement(i.a,{type:"primary",size:"large",loading:ia,onClick:Yi},"\u5F00\u59CB\u7F16\u8BD1"),Rn&&o.a.createElement("a",{href:"/tasks/".concat(Qt==null?void 0:Qt.next_game).concat(location.search),style:{marginLeft:"auto"},onClick:function(Qr){var yi,Fr;if(Qr.preventDefault(),Qt!=null&&(yi=Qt.shixun)!==null&&yi!==void 0&&yi.task_pass||(Qt==null?void 0:Qt.game.status)===2||(Qt==null||((Fr=Qt.user)===null||Fr===void 0)?void 0:Fr.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(Qt==null?void 0:Qt.next_game).concat(location.search)},300);return}s.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:o.a.createElement("p",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002")})}},"\u4E0B\u4E00\u5173"))),(Yt==null||((lt=Yt.sideBar)===null||lt===void 0)?void 0:lt.selectPath)==""&&(mn==null||((Lt=mn.detail)===null||Lt===void 0)?void 0:Lt.init_repository)&&o.a.createElement("div",{className:M.a.empty},o.a.createElement("img",{src:Me.j,width:"258"}),o.a.createElement("br",null),o.a.createElement("span",{className:"c-grey-c"},!!(xr!=null&&xr.length)&&"\u5728\u5DE6\u4FA7\u4EE3\u7801\u4ED3\u5E93\u533A\u57DF\u70B9\u51FB\u76EE\u5F55\u6253\u5F00\u6587\u4EF6",!(xr!=null&&xr.length)&&"\u8BF7\u5148\u5728\u5DE6\u4FA7\u4E0A\u4F20\u6587\u4EF6\u6216\u65B0\u5EFA\u6587\u4EF6\uFF01")))),Er==="2"&&o.a.createElement("div",{className:M.a.commit},o.a.createElement(Be,{isRepository:an}))))},ft=Object(W.a)(function(Pe){var ze=Pe.loading,yt=Pe.globalSetting,pt=Pe.practiceSetting,Bt=Pe.shixunsDetail;return{globalSetting:yt,loading:ze,practiceSetting:pt,shixunsDetail:Bt}})(wt),st=X.default=function(Pe){var ze=Pe.taskId,yt=Pe.taskData,pt=Pe.onEditRepCode,Bt=Object(v.useRef)(),Ht=Object(v.useRef)(),lt=Object(v.useMemo)(function(){if(yt){var Lt,Dt,Mt,Wt,Yt,mn=yt==null||((Lt=yt.challenge)===null||Lt===void 0||((Dt=Lt.path)===null||Dt===void 0||((Mt=Dt.replace("\uFF1B",";"))===null||Mt===void 0)))?void 0:Mt.split(";")[0];return"https://latexjs.educoder.net/index.html?id=".concat(yt==null||((Wt=yt.shixun)===null||Wt===void 0)?void 0:Wt.identifier,"&path=").concat(mn,"&taskId=").concat(ze,"&myshixunId=").concat(yt==null||((Yt=yt.myshixun)===null||Yt===void 0)?void 0:Yt.identifier,"&token=").concat(Object(p.F)("_educoder_session"))}},[yt]);return o.a.createElement(_.a,{style:{height:"100vh"},ref:Ht},o.a.createElement(y.a,{flex:"1"},(yt==null?void 0:yt.shixun)&&o.a.createElement(ft,{taskId:ze,taskData:yt,onEditRepCode:pt})),o.a.createElement(y.a,{flex:"1",className:a.a.wrap},o.a.createElement("iframe",{ref:Bt,id:"latexIframeRef",style:{width:"100%",border:"none",height:"100%"},src:lt}),o.a.createElement("span",{className:a.a.full,onClick:function(){Object(g.a)()?Object(g.b)():Object(g.d)(Ht.current)}},o.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F")))}},"4qgm":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC"},"4u4S":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII="},"500L":function(U,X,x){"use strict";x.d(X,"a",function(){return E});var I=x("+L6B"),_=x("2/Rp"),O=x("2qtc"),y=x("kLXV"),v=x("9og8"),o=x("k1fw"),g=x("miYZ"),p=x("tsqr"),d=x("oBTY"),a=x("tJVT"),n=x("DZo9"),s=x("8z0m"),t=x("WmNS"),i=x.n(t),e=x("q1tI"),r=x.n(e),c=x("m3rI"),u=x("wzkS"),f=x("y5JW"),m=x("LtfV"),l=s.a.Dragger;function E(b){var D=[];return b&&b.length>0&&(D=b.map(function(C){return{uid:C.id,id:C.id,name:C.title+f.c+C.filesize,url:C.url,filesize:C.filesize,status:"done",response:{id:C.id}}})),D}X.b=function(b){var D=b.value,C=b.onChange,w=b.action,S=b.className,A=b.maxSize,R=A===void 0?150:A,k=b.title,L=k===void 0?"\u4E0A\u4F20\u9644\u4EF6":k,M=b.showRemoveModal,G=M===void 0?!1:M,W=b.accept,N=W===void 0?"":W,K=b.additionalText,F=b.isDragger,P=b.number,B=P===void 0?1e3:P,J=b.aloneClear,re=J===void 0?!1:J,he=Object(e.useState)(!1),we=Object(a.a)(he,2),ke=we[0],ne=we[1],Oe=Object(e.useState)(D||[]),Ce=Object(a.a)(Oe,2),fe=Ce[0],oe=Ce[1];Object(e.useEffect)(function(){D&&(oe(Object(d.a)(D)),B===(D==null?void 0:D.length)&&ne(!0))},[D]);var se=function(){setTimeout(function(){fe.pop(),oe(Object(d.a)(fe))},500)},be={multiple:!0,disabled:ke,accept:N,withCredentials:!0,fileList:fe,beforeUpload:function(Fe,ae){var Z=Fe.size/1024/1024;return fe.concat(ae).length>B?(fe.pop(),oe(Object(d.a)(fe)),p.b.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(B,"\u4E2A\u6587\u4EF6")),re?Promise.reject():(se(),!1)):!0},action:w||"".concat(c.a.API_SERVER,"/api/attachments.json"),onChange:function(Fe){var ae,Z,Y=Object(d.a)(Fe.fileList);if(Fe.file.status==="done"&&((ae=Fe.file)===null||ae===void 0||((Z=ae.response)===null||Z===void 0)?void 0:Z.status)===-1){var q,ve;p.b.error((q=Fe.file)===null||q===void 0||((ve=q.response)===null||ve===void 0)?void 0:ve.message);return}Y.length>=B?ne(!0):ne(!1),oe(Object(d.a)(Y)),Y=Y.map(function(pe){var Te;if(pe!=null&&(Te=pe.response)!==null&&Te!==void 0&&Te.id){var Ne;pe.url="/api/attachments/".concat(pe==null||((Ne=pe.response)===null||Ne===void 0)?void 0:Ne.id)}return pe.name.indexOf(f.c)===-1&&(pe.name="".concat(pe.name).concat(f.c).concat(Object(f.a)(pe.size))),Object(o.a)({},pe)}),console.log("info:",Fe),C(Y)},onRemove:function(){var de=Object(v.a)(i.a.mark(function ae(Z){var Y;return i.a.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:if(Y=function(){var pe=Object(v.a)(i.a.mark(function Te(){var Ne,me;return i.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(Ne=Z.response?Z.response.id:Z.id,!Ne){_e.next=8;break}return _e.next=4,Object(u.d)(Z.response?Z.response.id:Z.uid);case 4:return me=_e.sent,_e.abrupt("return",me);case 8:return _e.abrupt("return",!0);case 9:case"end":return _e.stop()}},Te)}));return function(){return pe.apply(this,arguments)}}(),!G){ve.next=5;break}return ve.abrupt("return",new Promise(function(pe,Te){y.a.confirm({centered:!0,width:530,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:r.a.createElement("div",{className:"tc font16"},"\u662F\u5426\u786E\u8BA4\u5220\u9664?"),onOk:function(){var Ne=Object(v.a)(i.a.mark(function Ie(){var _e;return i.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,Y();case 2:_e=tt.sent,p.b.success("\u5220\u9664\u6210\u529F"),pe(!0);case 5:case"end":return tt.stop()}},Ie)}));function me(){return Ne.apply(this,arguments)}return me}(),onCancel:function(){return pe(!1)}})}));case 5:return ve.next=7,Y();case 7:return ve.abrupt("return",ve.sent);case 8:case"end":return ve.stop()}},ae)}));function Fe(ae){return de.apply(this,arguments)}return Fe}()};function ie(de){de.preventDefault(),de.stopPropagation()}return r.a.createElement("div",{className:"multi-upload ".concat(S||"")},F&&r.a.createElement(l,be,r.a.createElement("p",{className:"ant-upload-drag-icon"},r.a.createElement(m.a,null)),r.a.createElement("p",{className:"ant-upload-text"},"\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64",r.a.createElement("br",null),"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A",R,"MB)"," "),K),!F&&r.a.createElement(s.a,be,r.a.createElement(_.a,{disabled:ke},L),r.a.createElement("span",{onClick:ie,style:{marginLeft:10,color:"#FA6400"}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",R,"MB)"," ")))}},"55Ip":function(U,X,x){"use strict";x.d(X,"a",function(){return f});var I=x("Ty5D"),_=x("dI71"),O=x("q1tI"),y=x.n(O),v=x("YS25"),o=x("17x9"),g=x.n(o),p=x("wx14"),d=x("zLVn"),a=x("9R94"),n=function(S){Object(_.a)(A,S);function A(){for(var k,L=arguments.length,M=new Array(L),G=0;G<L;G++)M[G]=arguments[G];return k=S.call.apply(S,[this].concat(M))||this,k.history=Object(v.a)(k.props),k}var R=A.prototype;return R.render=function(){return y.a.createElement(I.c,{history:this.history,children:this.props.children})},A}(y.a.Component),s=function(S){Object(_.a)(A,S);function A(){for(var k,L=arguments.length,M=new Array(L),G=0;G<L;G++)M[G]=arguments[G];return k=S.call.apply(S,[this].concat(M))||this,k.history=Object(v.b)(k.props),k}var R=A.prototype;return R.render=function(){return y.a.createElement(I.c,{history:this.history,children:this.props.children})},A}(y.a.Component),t=function(A,R){return typeof A=="function"?A(R):A},i=function(A,R){return typeof A=="string"?Object(v.c)(A,null,null,R):A},e=function(A){return A},r=y.a.forwardRef;typeof r=="undefined"&&(r=e);function c(S){return!!(S.metaKey||S.altKey||S.ctrlKey||S.shiftKey)}var u=r(function(S,A){var R=S.innerRef,k=S.navigate,L=S.onClick,M=Object(d.a)(S,["innerRef","navigate","onClick"]),G=M.target,W=Object(p.a)({},M,{onClick:function(K){try{L&&L(K)}catch(F){throw K.preventDefault(),F}!K.defaultPrevented&&K.button===0&&(!G||G==="_self")&&!c(K)&&(K.preventDefault(),k())}});return e!==r?W.ref=A||R:W.ref=R,y.a.createElement("a",W)}),f=r(function(S,A){var R=S.component,k=R===void 0?u:R,L=S.replace,M=S.to,G=S.innerRef,W=Object(d.a)(S,["component","replace","to","innerRef"]);return y.a.createElement(I.e.Consumer,null,function(N){N||Object(a.a)(!1);var K=N.history,F=i(t(M,N.location),N.location),P=F?K.createHref(F):"",B=Object(p.a)({},W,{href:P,navigate:function(){var re=t(M,N.location),he=L?K.replace:K.push;he(re)}});return e!==r?B.ref=A||G:B.innerRef=G,y.a.createElement(k,B)})});if(!1)var m,l;var E=function(A){return A},b=y.a.forwardRef;typeof b=="undefined"&&(b=E);function D(){for(var S=arguments.length,A=new Array(S),R=0;R<S;R++)A[R]=arguments[R];return A.filter(function(k){return k}).join(" ")}var C=b(function(S,A){var R=S["aria-current"],k=R===void 0?"page":R,L=S.activeClassName,M=L===void 0?"active":L,G=S.activeStyle,W=S.className,N=S.exact,K=S.isActive,F=S.location,P=S.sensitive,B=S.strict,J=S.style,re=S.to,he=S.innerRef,we=Object(d.a)(S,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return y.a.createElement(I.e.Consumer,null,function(ke){ke||Object(a.a)(!1);var ne=F||ke.location,Oe=i(t(re,ne),ne),Ce=Oe.pathname,fe=Ce&&Ce.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),oe=fe?Object(I.f)(ne.pathname,{path:fe,exact:N,sensitive:P,strict:B}):null,se=!!(K?K(oe,ne):oe),be=se?D(W,M):W,ie=se?Object(p.a)({},J,{},G):J,de=Object(p.a)({"aria-current":se&&k||null,className:be,style:ie,to:Oe},we);return E!==b?de.ref=A||he:de.innerRef=he,y.a.createElement(f,de)})});if(!1)var w},"5D2P":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII="},"5DcX":function(U,X,x){U.exports={flex_box_center:"flex_box_center___ITCrt",flex_space_between:"flex_space_between___miKTU",flex_box_vertical_center:"flex_box_vertical_center___21Sc2",flex_box_center_end:"flex_box_center_end___3G7O1",flex_box_column:"flex_box_column___2UQvZ",menu:"menu___3WFLo",warehouse:"warehouse___2PwKB",header:"header___Sod9H",title:"title___1Y3oM",content:"content___1E7ip",left:"left___2pmQt",close:"close___37Pej",right:"right___1JM70",loading:"loading___2h7Lc",empty:"empty___2PqJB",tabs:"tabs___zn34y",line:"line___2Ft7K",footer:"footer___cQjHk",commit:"commit___1TgxV",blueLight:"blueLight___a6l-z",filePathWrp:"filePathWrp___104JD",filePath:"filePath___21Vqm",bottom0:"bottom0___3wcE2"}},"5GGG":function(U,X,x){U.exports={flex_box_center:"flex_box_center___jZegZ",flex_space_between:"flex_space_between___LWg4q",flex_box_vertical_center:"flex_box_vertical_center___29tJ6",flex_box_center_end:"flex_box_center_end___21Gx8",flex_box_column:"flex_box_column___1Vfub",commitWrap:"commitWrap___1Pjn4",wrap:"wrap___2rrrf",colorGray:"colorGray___qLOU5",content:"content___26EBx",itemTime:"itemTime___sQDA2",imageUrl:"imageUrl___29qPZ",blueLight:"blueLight___WsUcs",divider:"divider___1Yxuo",empty:"empty___1tN2T"}},"5VLF":function(U,X,x){"use strict";var I,_;function O(y,v,o){var g=function(p,d){return y.js_beautify(p,d)};return g.js=y.js_beautify,g.css=v.css_beautify,g.html=o.html_beautify,g.js_beautify=y.js_beautify,g.css_beautify=v.css_beautify,g.html_beautify=o.html_beautify,g}!(I=[x("6UM0"),x("TXwP"),x("psGv")],_=function(y,v,o){return O(y,v,o)}.apply(X,I),_!==void 0&&(U.exports=_))},"5hvy":function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("MlIO"))})(this,function(I){return function(_){var O=I,y=O.lib,v=y.WordArray,o=y.Hasher,g=O.x64,p=g.Word,d=O.algo,a=[],n=[],s=[];(function(){for(var e=1,r=0,c=0;c<24;c++){a[e+5*r]=(c+1)*(c+2)/2%64;var u=r%5,f=(2*e+3*r)%5;e=u,r=f}for(var e=0;e<5;e++)for(var r=0;r<5;r++)n[e+5*r]=r+(2*e+3*r)%5*5;for(var m=1,l=0;l<24;l++){for(var E=0,b=0,D=0;D<7;D++){if(m&1){var C=(1<<D)-1;C<32?b^=1<<C:E^=1<<C-32}m&128?m=m<<1^113:m<<=1}s[l]=p.create(E,b)}})();var t=[];(function(){for(var e=0;e<25;e++)t[e]=p.create()})();var i=d.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],r=0;r<25;r++)e[r]=new p.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,r){for(var c=this._state,u=this.blockSize/2,f=0;f<u;f++){var m=e[r+2*f],l=e[r+2*f+1];m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,l=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;var E=c[f];E.high^=l,E.low^=m}for(var b=0;b<24;b++){for(var D=0;D<5;D++){for(var C=0,w=0,S=0;S<5;S++){var E=c[D+5*S];C^=E.high,w^=E.low}var A=t[D];A.high=C,A.low=w}for(var D=0;D<5;D++)for(var R=t[(D+4)%5],k=t[(D+1)%5],L=k.high,M=k.low,C=R.high^(L<<1|M>>>31),w=R.low^(M<<1|L>>>31),S=0;S<5;S++){var E=c[D+5*S];E.high^=C,E.low^=w}for(var G=1;G<25;G++){var C,w,E=c[G],W=E.high,N=E.low,K=a[G];K<32?(C=W<<K|N>>>32-K,w=N<<K|W>>>32-K):(C=N<<K-32|W>>>64-K,w=W<<K-32|N>>>64-K);var F=t[n[G]];F.high=C,F.low=w}var P=t[0],B=c[0];P.high=B.high,P.low=B.low;for(var D=0;D<5;D++)for(var S=0;S<5;S++){var G=D+5*S,E=c[G],J=t[G],re=t[(D+1)%5+5*S],he=t[(D+2)%5+5*S];E.high=J.high^~re.high&he.high,E.low=J.low^~re.low&he.low}var E=c[0],we=s[b];E.high^=we.high,E.low^=we.low}},_doFinalize:function(){var e=this._data,r=e.words,c=this._nDataBytes*8,u=e.sigBytes*8,f=this.blockSize*32;r[u>>>5]|=1<<24-u%32,r[(_.ceil((u+1)/f)*f>>>5)-1]|=128,e.sigBytes=r.length*4,this._process();for(var m=this._state,l=this.cfg.outputLength/8,E=l/8,b=[],D=0;D<E;D++){var C=m[D],w=C.high,S=C.low;w=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,b.push(S),b.push(w)}return new v.init(b,l)},clone:function(){for(var e=o.clone.call(this),r=e._state=this._state.slice(0),c=0;c<25;c++)r[c]=r[c].clone();return e}});O.SHA3=o._createHelper(i),O.HmacSHA3=o._createHmacHelper(i)}(Math),I.SHA3})},"5nXd":function(U,X,x){var I=x("MFOe"),_=I.slice,O=I.pluck,y=I.each,v=I.bind,o=I.create,g=I.isList,p=I.isFunction,d=I.isObject;U.exports={createStore:s};var a={version:"2.0.12",enabled:!1,get:function(t,i){var e=this.storage.read(this._namespacePrefix+t);return this._deserialize(e,i)},set:function(t,i){return i===void 0?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(i)),i)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var i=this;this.storage.each(function(e,r){t.call(i,i._deserialize(e),(r||"").replace(i._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return s.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return s(this.storage,this.plugins,t)}};function n(){var t=typeof console=="undefined"?null:console;if(!t)return;var i=t.warn?t.warn:t.log;i.apply(t,arguments)}function s(t,i,e){e||(e=""),t&&!g(t)&&(t=[t]),i&&!g(i)&&(i=[i]);var r=e?"__storejs_"+e+"_":"",c=e?new RegExp("^"+r):null,u=/^[a-zA-Z0-9_\-]*$/;if(!u.test(e))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var f={_namespacePrefix:r,_namespaceRegexp:c,_testStorage:function(l){try{var E="__storejs__test__";l.write(E,E);var b=l.read(E)===E;return l.remove(E),b}catch(D){return!1}},_assignPluginFnProp:function(l,E){var b=this[E];this[E]=function(){var C=_(arguments,0),w=this;function S(){return b?(y(arguments,function(R,k){C[k]=R}),b.apply(w,C)):void 0}var A=[S].concat(C);return l.apply(w,A)}},_serialize:function(l){return JSON.stringify(l)},_deserialize:function(l,E){if(!l)return E;var b="";try{b=JSON.parse(l)}catch(D){b=l}return b!==void 0?b:E},_addStorage:function(l){if(this.enabled)return;this._testStorage(l)&&(this.storage=l,this.enabled=!0)},_addPlugin:function(l){var E=this;if(g(l)){y(l,function(C){E._addPlugin(C)});return}var b=O(this.plugins,function(C){return l===C});if(b)return;if(this.plugins.push(l),!p(l))throw new Error("Plugins must be function values that return objects");var D=l.call(this);if(!d(D))throw new Error("Plugins must return an object of function properties");y(D,function(C,w){if(!p(C))throw new Error("Bad plugin property: "+w+" from plugin "+l.name+". Plugins should only return functions.");E._assignPluginFnProp(C,w)})},addStorage:function(l){n("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(l)}},m=o(f,a,{plugins:[]});return m.raw={},y(m,function(l,E){p(l)&&(m.raw[E]=v(m,l))}),y(t,function(l){m._addStorage(l)}),y(i,function(l){m._addPlugin(l)}),m}},"6+eU":function(U,X,x){"use strict";x.d(X,"a",function(){return b});var I=x("wx14"),_=x("rePB"),O=x("VTBJ"),y=x("1OyB"),v=x("vuIU"),o=x("Ji7U"),g=x("LK+K"),p=x("q1tI"),d=x.n(p),a=x("TSYQ"),n=x.n(a),s=function(C){var w,S="".concat(C.rootPrefixCls,"-item"),A=n()(S,"".concat(S,"-").concat(C.page),(w={},Object(_.a)(w,"".concat(S,"-active"),C.active),Object(_.a)(w,C.className,!!C.className),Object(_.a)(w,"".concat(S,"-disabled"),!C.page),w)),R=function(){C.onClick(C.page)},k=function(M){C.onKeyPress(M,C.onClick,C.page)};return d.a.createElement("li",{title:C.showTitle?C.page:null,className:A,onClick:R,onKeyPress:k,tabIndex:"0"},C.itemRender(C.page,"page",d.a.createElement("a",{rel:"nofollow"},C.page)))},t=s,i={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},e=function(D){Object(o.a)(w,D);var C=Object(g.a)(w);function w(){var S;Object(y.a)(this,w);for(var A=arguments.length,R=new Array(A),k=0;k<A;k++)R[k]=arguments[k];return S=C.call.apply(C,[this].concat(R)),S.state={goInputText:""},S.buildOptionText=function(L){return"".concat(L," ").concat(S.props.locale.items_per_page)},S.changeSize=function(L){S.props.changeSize(Number(L))},S.handleChange=function(L){S.setState({goInputText:L.target.value})},S.handleBlur=function(L){var M=S.props,G=M.goButton,W=M.quickGo,N=M.rootPrefixCls,K=S.state.goInputText;if(G||K==="")return;if(L.relatedTarget&&(L.relatedTarget.className.indexOf("".concat(N,"-prev"))>=0||L.relatedTarget.className.indexOf("".concat(N,"-next"))>=0))return;S.setState({goInputText:""}),W(S.getValidValue())},S.go=function(L){var M=S.state.goInputText;if(M==="")return;(L.keyCode===i.ENTER||L.type==="click")&&(S.setState({goInputText:""}),S.props.quickGo(S.getValidValue()))},S}return Object(v.a)(w,[{key:"getValidValue",value:function(){var A=this.state,R=A.goInputText,k=A.current;return!R||isNaN(R)?k:Number(R)}},{key:"getPageSizeOptions",value:function(){var A=this.props,R=A.pageSize,k=A.pageSizeOptions;return k.some(function(L){return L.toString()===R.toString()})?k:k.concat([R.toString()]).sort(function(L,M){var G=isNaN(Number(L))?0:Number(L),W=isNaN(Number(M))?0:Number(M);return G-W})}},{key:"render",value:function(){var A=this,R=this.props,k=R.pageSize,L=R.locale,M=R.rootPrefixCls,G=R.changeSize,W=R.quickGo,N=R.goButton,K=R.selectComponentClass,F=R.buildOptionText,P=R.selectPrefixCls,B=R.disabled,J=this.state.goInputText,re="".concat(M,"-options"),he=K,we=null,ke=null,ne=null;if(!G&&!W)return null;var Oe=this.getPageSizeOptions();if(G&&he){var Ce=Oe.map(function(fe,oe){return d.a.createElement(he.Option,{key:oe,value:fe.toString()},(F||A.buildOptionText)(fe))});we=d.a.createElement(he,{disabled:B,prefixCls:P,showSearch:!1,className:"".concat(re,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(k||Oe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(oe){return oe.parentNode}},Ce)}return W&&(N&&(ne=typeof N=="boolean"?d.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:B,className:"".concat(re,"-quick-jumper-button")},L.jump_to_confirm):d.a.createElement("span",{onClick:this.go,onKeyUp:this.go},N)),ke=d.a.createElement("div",{className:"".concat(re,"-quick-jumper")},L.jump_to,d.a.createElement("input",{disabled:B,type:"text",value:J,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),L.page,ne)),d.a.createElement("li",{className:"".concat(re)},we,ke)}}]),w}(d.a.Component);e.defaultProps={pageSizeOptions:["10","20","50","100"]};var r=e,c=x("N2Kk");function u(){}function f(D){return typeof D=="number"&&isFinite(D)&&Math.floor(D)===D}function m(D,C,w){return w}function l(D,C,w){var S=typeof D=="undefined"?C.pageSize:D;return Math.floor((w.total-1)/S)+1}var E=function(D){Object(o.a)(w,D);var C=Object(g.a)(w);function w(S){var A;Object(y.a)(this,w),A=C.call(this,S),A.getJumpPrevPage=function(){return Math.max(1,A.state.current-(A.props.showLessItems?3:5))},A.getJumpNextPage=function(){return Math.min(l(void 0,A.state,A.props),A.state.current+(A.props.showLessItems?3:5))},A.getItemIcon=function(G,W){var N=A.props.prefixCls,K=G||d.a.createElement("button",{type:"button","aria-label":W,className:"".concat(N,"-item-link")});return typeof G=="function"&&(K=d.a.createElement(G,Object(O.a)({},A.props))),K},A.savePaginationNode=function(G){A.paginationNode=G},A.isValid=function(G){return f(G)&&G!==A.state.current},A.shouldDisplayQuickJumper=function(){var G=A.props,W=G.showQuickJumper,N=G.pageSize,K=G.total;return K<=N?!1:W},A.handleKeyDown=function(G){(G.keyCode===i.ARROW_UP||G.keyCode===i.ARROW_DOWN)&&G.preventDefault()},A.handleKeyUp=function(G){var W=A.getValidValue(G),N=A.state.currentInputValue;W!==N&&A.setState({currentInputValue:W}),G.keyCode===i.ENTER?A.handleChange(W):G.keyCode===i.ARROW_UP?A.handleChange(W-1):G.keyCode===i.ARROW_DOWN&&A.handleChange(W+1)},A.changePageSize=function(G){var W=A.state.current,N=l(G,A.state,A.props);W=W>N?N:W,N===0&&(W=A.state.current),typeof G=="number"&&("pageSize"in A.props||A.setState({pageSize:G}),"current"in A.props||A.setState({current:W,currentInputValue:W})),A.props.onShowSizeChange(W,G),"onChange"in A.props&&A.props.onChange&&A.props.onChange(W,G)},A.handleChange=function(G){var W=A.props.disabled,N=G;if(A.isValid(N)&&!W){var K=l(void 0,A.state,A.props);N>K?N=K:N<1&&(N=1),"current"in A.props||A.setState({current:N,currentInputValue:N});var F=A.state.pageSize;return A.props.onChange(N,F),N}return A.state.current},A.prev=function(){A.hasPrev()&&A.handleChange(A.state.current-1)},A.next=function(){A.hasNext()&&A.handleChange(A.state.current+1)},A.jumpPrev=function(){A.handleChange(A.getJumpPrevPage())},A.jumpNext=function(){A.handleChange(A.getJumpNextPage())},A.hasPrev=function(){return A.state.current>1},A.hasNext=function(){return A.state.current<l(void 0,A.state,A.props)},A.runIfEnter=function(G,W){if(G.key==="Enter"||G.charCode===13){for(var N=arguments.length,K=new Array(N>2?N-2:0),F=2;F<N;F++)K[F-2]=arguments[F];W.apply(void 0,K)}},A.runIfEnterPrev=function(G){A.runIfEnter(G,A.prev)},A.runIfEnterNext=function(G){A.runIfEnter(G,A.next)},A.runIfEnterJumpPrev=function(G){A.runIfEnter(G,A.jumpPrev)},A.runIfEnterJumpNext=function(G){A.runIfEnter(G,A.jumpNext)},A.handleGoTO=function(G){(G.keyCode===i.ENTER||G.type==="click")&&A.handleChange(A.state.currentInputValue)};var R=S.onChange!==u,k="current"in S;k&&!R&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var L=S.defaultCurrent;"current"in S&&(L=S.current);var M=S.defaultPageSize;return"pageSize"in S&&(M=S.pageSize),L=Math.min(L,l(M,void 0,S)),A.state={current:L,currentInputValue:L,pageSize:M},A}return Object(v.a)(w,[{key:"componentDidUpdate",value:function(A,R){var k=this.props.prefixCls;if(R.current!==this.state.current&&this.paginationNode){var L=this.paginationNode.querySelector(".".concat(k,"-item-").concat(R.current));L&&document.activeElement===L&&L.blur()}}},{key:"getValidValue",value:function(A){var R=A.target.value,k=l(void 0,this.state,this.props),L=this.state.currentInputValue,M;return R===""?M=R:isNaN(Number(R))?M=L:R>=k?M=k:M=Number(R),M}},{key:"getShowSizeChanger",value:function(){var A=this.props,R=A.showSizeChanger,k=A.total,L=A.totalBoundaryShowSizeChanger;return typeof R!="undefined"?R:k>L}},{key:"renderPrev",value:function(A){var R=this.props,k=R.prevIcon,L=R.itemRender,M=L(A,"prev",this.getItemIcon(k,"prev page")),G=!this.hasPrev();return Object(p.isValidElement)(M)?Object(p.cloneElement)(M,{disabled:G}):M}},{key:"renderNext",value:function(A){var R=this.props,k=R.nextIcon,L=R.itemRender,M=L(A,"next",this.getItemIcon(k,"next page")),G=!this.hasNext();return Object(p.isValidElement)(M)?Object(p.cloneElement)(M,{disabled:G}):M}},{key:"render",value:function(){var A=this,R=this.props,k=R.prefixCls,L=R.className,M=R.style,G=R.disabled,W=R.hideOnSinglePage,N=R.total,K=R.locale,F=R.showQuickJumper,P=R.showLessItems,B=R.showTitle,J=R.showTotal,re=R.simple,he=R.itemRender,we=R.showPrevNextJumpers,ke=R.jumpPrevIcon,ne=R.jumpNextIcon,Oe=R.selectComponentClass,Ce=R.selectPrefixCls,fe=R.pageSizeOptions,oe=this.state,se=oe.current,be=oe.pageSize,ie=oe.currentInputValue;if(W===!0&&N<=be)return null;var de=l(void 0,this.state,this.props),Fe=[],ae=null,Z=null,Y=null,q=null,ve=null,pe=F&&F.goButton,Te=P?1:2,Ne=se-1>0?se-1:0,me=se+1<de?se+1:de,Ie=Object.keys(this.props).reduce(function(ge,Ee){return(Ee.substr(0,5)==="data-"||Ee.substr(0,5)==="aria-"||Ee==="role")&&(ge[Ee]=A.props[Ee]),ge},{});if(re)return pe&&(typeof pe=="boolean"?ve=d.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},K.jump_to_confirm):ve=d.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},pe),ve=d.a.createElement("li",{title:B?"".concat(K.jump_to).concat(se,"/").concat(de):null,className:"".concat(k,"-simple-pager")},ve)),d.a.createElement("ul",Object(I.a)({className:n()(k,"".concat(k,"-simple"),Object(_.a)({},"".concat(k,"-disabled"),G),L),style:M,ref:this.savePaginationNode},Ie),d.a.createElement("li",{title:B?K.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(_.a)({},"".concat(k,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Ne)),d.a.createElement("li",{title:B?"".concat(se,"/").concat(de):null,className:"".concat(k,"-simple-pager")},d.a.createElement("input",{type:"text",value:ie,disabled:G,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),d.a.createElement("span",{className:"".concat(k,"-slash")},"/"),de),d.a.createElement("li",{title:B?K.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(_.a)({},"".concat(k,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(me)),ve);if(de<=3+Te*2){var _e={locale:K,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:B,itemRender:he};de||Fe.push(d.a.createElement(t,Object(I.a)({},_e,{key:"noPager",page:de,className:"".concat(k,"-disabled")})));for(var Ve=1;Ve<=de;Ve+=1){var tt=se===Ve;Fe.push(d.a.createElement(t,Object(I.a)({},_e,{key:Ve,page:Ve,active:tt})))}}else{var Ge=P?K.prev_3:K.prev_5,Le=P?K.next_3:K.next_5;we&&(ae=d.a.createElement("li",{title:B?Ge:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:n()("".concat(k,"-jump-prev"),Object(_.a)({},"".concat(k,"-jump-prev-custom-icon"),!!ke))},he(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(ke,"prev page"))),Z=d.a.createElement("li",{title:B?Le:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:n()("".concat(k,"-jump-next"),Object(_.a)({},"".concat(k,"-jump-next-custom-icon"),!!ne))},he(this.getJumpNextPage(),"jump-next",this.getItemIcon(ne,"next page")))),q=d.a.createElement(t,{locale:K,last:!0,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:de,page:de,active:!1,showTitle:B,itemRender:he}),Y=d.a.createElement(t,{locale:K,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:B,itemRender:he});var bt=Math.max(1,se-Te),Re=Math.min(se+Te,de);se-1<=Te&&(Re=1+Te*2),de-se<=Te&&(bt=de-Te*2);for(var Xe=bt;Xe<=Re;Xe+=1){var et=se===Xe;Fe.push(d.a.createElement(t,{locale:K,rootPrefixCls:k,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Xe,page:Xe,active:et,showTitle:B,itemRender:he}))}se-1>=Te*2&&se!==1+2&&(Fe[0]=Object(p.cloneElement)(Fe[0],{className:"".concat(k,"-item-after-jump-prev")}),Fe.unshift(ae)),de-se>=Te*2&&se!==de-2&&(Fe[Fe.length-1]=Object(p.cloneElement)(Fe[Fe.length-1],{className:"".concat(k,"-item-before-jump-next")}),Fe.push(Z)),bt!==1&&Fe.unshift(Y),Re!==de&&Fe.push(q)}var Ye=null;J&&(Ye=d.a.createElement("li",{className:"".concat(k,"-total-text")},J(N,[N===0?0:(se-1)*be+1,se*be>N?N:se*be])));var Me=!this.hasPrev()||!de,Ke=!this.hasNext()||!de;return d.a.createElement("ul",Object(I.a)({className:n()(k,L,Object(_.a)({},"".concat(k,"-disabled"),G)),style:M,unselectable:"unselectable",ref:this.savePaginationNode},Ie),Ye,d.a.createElement("li",{title:B?K.prev_page:null,onClick:this.prev,tabIndex:Me?null:0,onKeyPress:this.runIfEnterPrev,className:n()("".concat(k,"-prev"),Object(_.a)({},"".concat(k,"-disabled"),Me)),"aria-disabled":Me},this.renderPrev(Ne)),Fe,d.a.createElement("li",{title:B?K.next_page:null,onClick:this.next,tabIndex:Ke?null:0,onKeyPress:this.runIfEnterNext,className:n()("".concat(k,"-next"),Object(_.a)({},"".concat(k,"-disabled"),Ke)),"aria-disabled":Ke},this.renderNext(me)),d.a.createElement(r,{disabled:G,locale:K,rootPrefixCls:k,selectComponentClass:Oe,selectPrefixCls:Ce,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:se,pageSize:be,pageSizeOptions:fe,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:pe}))}}],[{key:"getDerivedStateFromProps",value:function(A,R){var k={};if("current"in A&&(k.current=A.current,A.current!==R.current&&(k.currentInputValue=k.current)),"pageSize"in A&&A.pageSize!==R.pageSize){var L=R.current,M=l(A.pageSize,R,A);L=L>M?M:L,"current"in A||(k.current=L,k.currentInputValue=L),k.pageSize=A.pageSize}return k}}]),w}(d.a.Component);E.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:u,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:u,locale:c.a,style:{},itemRender:m,totalBoundaryShowSizeChanger:50};var b=E},"6/vW":function(U,X,x){"use strict";x.d(X,"b",function(){return g});var I=x("tJVT"),_=x("q1tI"),O=x.n(_),y=x("9VGf"),v=x("dhSg");function o(p){return p.toString().padStart(2,"0")}function g(p){var d=Math.floor(p/60),a=p%60,n=Math.floor(d/60);return"".concat(o(n),":").concat(o(d-n*60),":").concat(o(a))}X.a=function(p){var d=p.defaultTime,a=p.status,n=p.onUpdateCostTime,s=p.lastedGetTaskInfoTime,t=p.title,i=t===void 0?"":t,e=Object(_.useState)(d||0),r=Object(I.a)(e,2),c=r[0],u=r[1],f=Object(_.useRef)();return Object(_.useEffect)(function(){s&&(u(d),f.current=d)},[d,s]),Object(_.useEffect)(function(){if(s){var m=v.a.subscribe("update-cost-time",function(){a!==2&&n(f.current)});return m}},[s]),Object(y.a)(function(){u(c+1),f.current=f.current+1},a===2?null:1e3),O.a.createElement("span",null,i?"".concat(i,"\uFF1A"):null,g(c))}},"6BzB":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.shrinkBuf=I,X.arraySet=_,X.flattenChunks=O,X.Buf32=X.Buf16=X.Buf8=void 0;function I(g,p){return g.length===p?g:g.subarray?g.subarray(0,p):(g.length=p,g)}function _(g,p,d,a,n){if(p.subarray&&g.subarray){g.set(p.subarray(d,d+a),n);return}for(var s=0;s<a;s++)g[n+s]=p[d+s]}function O(g){var p,d,a,n,s,t;for(a=0,p=0,d=g.length;p<d;p++)a+=g[p].length;for(t=new Uint8Array(a),n=0,p=0,d=g.length;p<d;p++)s=g[p],t.set(s,n),n+=s.length;return t}var y=Uint8Array;X.Buf8=y;var v=Uint16Array;X.Buf16=v;var o=Int32Array;X.Buf32=o},"6Qwc":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={8:"Backspace",9:"Tab",10:"NumpadClear",12:"Numpad5",13:"Enter",16:"ShiftLeft",17:"ControlLeft",18:"AltLeft",19:"Pause",20:"CapsLock",21:"Lang1",25:"Lang2",27:"Escape",28:"Convert",29:"NonConvert",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",44:"PrintScreen",45:"Insert",46:"Delete",47:"Help",48:"Digit0",49:"Digit1",50:"Digit2",51:"Digit3",52:"Digit4",53:"Digit5",54:"Digit6",55:"Digit7",56:"Digit8",57:"Digit9",91:"MetaLeft",92:"MetaRight",93:"ContextMenu",95:"Sleep",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",108:"NumpadDecimal",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",124:"F13",125:"F14",126:"F15",127:"F16",128:"F17",129:"F18",130:"F19",131:"F20",132:"F21",133:"F22",134:"F23",135:"F24",144:"NumLock",145:"ScrollLock",166:"BrowserBack",167:"BrowserForward",168:"BrowserRefresh",169:"BrowserStop",170:"BrowserSearch",171:"BrowserFavorites",172:"BrowserHome",173:"AudioVolumeMute",174:"AudioVolumeDown",175:"AudioVolumeUp",176:"MediaTrackNext",177:"MediaTrackPrevious",178:"MediaStop",179:"MediaPlayPause",180:"LaunchMail",181:"MediaSelect",182:"LaunchApp1",183:"LaunchApp2",225:"AltRight"};X.default=I},"6RRn":function(U,X,x){"use strict";var I=x("wCXF"),_=x("n6Qo");x.d(X,"b",function(){return _.a});var O=x("IBYe"),y=x("6eGT"),v=x("hW8S");x.d(X,"a",function(){return v.a}),X.c=I.b},"6UM0":function(U,X,x){var I,_;(function(){var O;(function(){"use strict";var v=[function(d,a,n){var s=n(1).Beautifier,t=n(5).Options;function i(e,r){var c=new s(e,r);return c.beautify()}d.exports=i,d.exports.defaultOptions=function(){return new t}},function(d,a,n){var s=n(2).Output,t=n(3).Token,i=n(4),e=n(5).Options,r=n(7).Tokenizer,c=n(7).line_starters,u=n(7).positionable_operators,f=n(7).TOKEN;function m(P,B){return B.indexOf(P)!==-1}function l(P){return P.replace(/^\s+/g,"")}function E(P){for(var B={},J=0;J<P.length;J++)B[P[J].replace(/-/g,"_")]=P[J];return B}function b(P,B){return P&&P.type===f.RESERVED&&P.text===B}function D(P,B){return P&&P.type===f.RESERVED&&m(P.text,B)}var C=["case","return","do","if","throw","else","await","break","continue","async"],w=["before-newline","after-newline","preserve-newline"],S=E(w),A=[S.before_newline,S.preserve_newline],R={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function k(P,B){if(B.multiline_frame||B.mode===R.ForInitializer||B.mode===R.Conditional)return;P.remove_indent(B.start_line_index)}function L(P){P=P.replace(i.allLineBreaks,`
|
|
|
`);for(var B=[],J=P.indexOf(`
|
|
|
`);J!==-1;)B.push(P.substring(0,J)),P=P.substring(J+1),J=P.indexOf(`
|
|
|
`);return P.length&&B.push(P),B}function M(P){return P===R.ArrayLiteral}function G(P){return m(P,[R.Expression,R.ForInitializer,R.Conditional])}function W(P,B){for(var J=0;J<P.length;J++){var re=P[J].trim();if(re.charAt(0)!==B)return!1}return!0}function N(P,B){for(var J=0,re=P.length,he;J<re;J++)if(he=P[J],he&&he.indexOf(B)!==0)return!1;return!0}function K(P,B){B=B||{},this._source_text=P||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new e(B)}K.prototype.create_flags=function(P,B){var J=0;P&&(J=P.indentation_level,!this._output.just_added_newline()&&P.line_indent_level>J&&(J=P.line_indent_level));var re={mode:B,parent:P,last_token:P?P.last_token:new t(f.START_BLOCK,""),last_word:P?P.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:J,alignment:0,line_indent_level:P?P.line_indent_level:J,start_line_index:this._output.get_line_number(),ternary_depth:0};return re},K.prototype._reset=function(P){var B=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new s(this._options,B),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(R.BlockStatement);var J=new r(P,this._options);return this._tokens=J.tokenize(),P},K.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,B=this._reset(this._source_text),J=this._options.eol;this._options.eol==="auto"&&(J=`
|
|
|
`,B&&i.lineBreak.test(B||"")&&(J=B.match(i.lineBreak)[0]));for(var re=this._tokens.next();re;)this.handle_token(re),this._last_last_text=this._flags.last_token.text,this._flags.last_token=re,re=this._tokens.next();return P=this._output.get_code(J),P},K.prototype.handle_token=function(P,B){P.type===f.START_EXPR?this.handle_start_expr(P):P.type===f.END_EXPR?this.handle_end_expr(P):P.type===f.START_BLOCK?this.handle_start_block(P):P.type===f.END_BLOCK?this.handle_end_block(P):P.type===f.WORD?this.handle_word(P):P.type===f.RESERVED?this.handle_word(P):P.type===f.SEMICOLON?this.handle_semicolon(P):P.type===f.STRING?this.handle_string(P):P.type===f.EQUALS?this.handle_equals(P):P.type===f.OPERATOR?this.handle_operator(P):P.type===f.COMMA?this.handle_comma(P):P.type===f.BLOCK_COMMENT?this.handle_block_comment(P,B):P.type===f.COMMENT?this.handle_comment(P,B):P.type===f.DOT?this.handle_dot(P):P.type===f.EOF?this.handle_eof(P):P.type===f.UNKNOWN?this.handle_unknown(P,B):this.handle_unknown(P,B)},K.prototype.handle_whitespace_and_comments=function(P,B){var J=P.newlines,re=this._options.keep_array_indentation&&M(this._flags.mode);if(P.comments_before)for(var he=P.comments_before.next();he;)this.handle_whitespace_and_comments(he,B),this.handle_token(he,B),he=P.comments_before.next();if(re)for(var we=0;we<J;we+=1)this.print_newline(we>0,B);else if(this._options.max_preserve_newlines&&J>this._options.max_preserve_newlines&&(J=this._options.max_preserve_newlines),this._options.preserve_newlines&&J>1){this.print_newline(!1,B);for(var ke=1;ke<J;ke+=1)this.print_newline(!0,B)}};var F=["async","break","continue","return","throw","yield"];K.prototype.allow_wrap_or_preserved_newline=function(P,B){if(B=B===void 0?!1:B,this._output.just_added_newline())return;var J=this._options.preserve_newlines&&P.newlines||B,re=m(this._flags.last_token.text,u)||m(P.text,u);if(re){var he=m(this._flags.last_token.text,u)&&m(this._options.operator_position,A)||m(P.text,u);J=J&&he}if(J)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(D(this._flags.last_token,F))return;this._output.set_wrap_point()}},K.prototype.print_newline=function(P,B){if(!B&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==f.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var J=this._tokens.peek();this._flags.mode===R.Statement&&!(this._flags.if_block&&b(J,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},K.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||M(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},K.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===f.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var B=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(B),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},K.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},K.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},K.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},K.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===R.Statement&&k(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},K.prototype.start_of_object_property=function(){return this._flags.parent.mode===R.ObjectLiteral&&this._flags.mode===R.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"]))},K.prototype.start_of_statement=function(P){var B=!1;return B=B||D(this._flags.last_token,["var","let","const"])&&P.type===f.WORD,B=B||b(this._flags.last_token,"do"),B=B||!(this._flags.parent.mode===R.ObjectLiteral&&this._flags.mode===R.Statement)&&D(this._flags.last_token,F)&&!P.newlines,B=B||b(this._flags.last_token,"else")&&!(b(P,"if")&&!P.comments_before),B=B||this._flags.last_token.type===f.END_EXPR&&(this._previous_flags.mode===R.ForInitializer||this._previous_flags.mode===R.Conditional),B=B||this._flags.last_token.type===f.WORD&&this._flags.mode===R.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==f.WORD&&P.type!==f.RESERVED,B=B||this._flags.mode===R.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||D(this._flags.last_token,["get","set"])),B?(this.set_mode(R.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,D(P,["do","for","if","while"])),!0):!1},K.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var B=R.Expression;if(P.text==="["){if(this._flags.last_token.type===f.WORD||this._flags.last_token.text===")"){D(this._flags.last_token,c)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(B),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}B=R.ArrayLiteral,M(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),m(this._flags.last_token.type,[f.START_EXPR,f.END_EXPR,f.WORD,f.OPERATOR,f.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===f.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,B=R.ForInitializer):m(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,B=R.Conditional):m(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(m(this._flags.last_token.text,c)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===f.EQUALS||this._flags.last_token.type===f.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===f.WORD){this._output.space_before_token=!1;var J=this._tokens.peek(-3);if(this._options.space_after_named_function&&J){var re=this._tokens.peek(-4);D(J,["async","function"])||J.text==="*"&&D(re,["async","function"])?this._output.space_before_token=!0:this._flags.mode===R.ObjectLiteral?(J.text==="{"||J.text===","||J.text==="*"&&(re.text==="{"||re.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(P);(this._flags.last_token.type===f.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(m(this._last_last_text,["function","yield"])||this._flags.mode===R.ObjectLiteral&&m(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===f.START_BLOCK?this.print_newline():(this._flags.last_token.type===f.END_EXPR||this._flags.last_token.type===f.START_EXPR||this._flags.last_token.type===f.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===f.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(B),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},K.prototype.handle_end_expr=function(P){for(;this._flags.mode===R.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&M(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===f.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(P),this.restore_mode(),k(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===R.Conditional&&(this._previous_flags.mode=R.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},K.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var B=this._tokens.peek(),J=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===f.END_EXPR?(this.set_mode(R.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(R.BlockStatement):J&&(m(J.text,[":",","])&&m(B.type,[f.STRING,f.WORD,f.RESERVED])||m(B.text,["get","set","..."])&&m(J.type,[f.WORD,f.RESERVED]))?m(this._last_last_text,["class","interface"])&&!m(J.text,[":",","])?this.set_mode(R.BlockStatement):this.set_mode(R.ObjectLiteral):this._flags.last_token.type===f.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(R.BlockStatement):m(this._flags.last_token.type,[f.EQUALS,f.START_EXPR,f.COMMA,f.OPERATOR])||D(this._flags.last_token,["return","throw","import","default"])?this.set_mode(R.ObjectLiteral):this.set_mode(R.BlockStatement),this._flags.last_token&&(D(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var re=!B.comments_before&&B.text==="}",he=re&&this._flags.last_word==="function"&&this._flags.last_token.type===f.END_EXPR;if(this._options.brace_preserve_inline){var we=0,ke=null;this._flags.inline_frame=!0;do if(we+=1,ke=this._tokens.peek(we-1),ke.newlines){this._flags.inline_frame=!1;break}while(ke.type!==f.EOF&&!(ke.type===f.END_BLOCK&&ke.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==f.OPERATOR&&(he||this._flags.last_token.type===f.EQUALS||D(this._flags.last_token,C)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(M(this._previous_flags.mode)&&(this._flags.last_token.type===f.START_EXPR||this._flags.last_token.type===f.COMMA)&&((this._flags.last_token.type===f.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==f.OPERATOR&&this._flags.last_token.type!==f.START_EXPR&&(this._flags.last_token.type===f.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!re&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},K.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===R.Statement;)this.restore_mode();var B=this._flags.last_token.type===f.START_BLOCK;this._flags.inline_frame&&!B?this._output.space_before_token=!0:this._options.brace_style==="expand"?B||this.print_newline():B||(M(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(P)},K.prototype.handle_word=function(P){if(P.type===f.RESERVED){if(m(P.text,["set","get"])&&this._flags.mode!==R.ObjectLiteral)P.type=f.WORD;else if(P.text==="import"&&m(this._tokens.peek().text,["(","."]))P.type=f.WORD;else if(m(P.text,["as","from"])&&!this._flags.import_block)P.type=f.WORD;else if(this._flags.mode===R.ObjectLiteral){var B=this._tokens.peek();B.text===":"&&(P.type=f.WORD)}}if(this.start_of_statement(P)?D(this._flags.last_token,["var","let","const"])&&P.type===f.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!G(this._flags.mode)&&(this._flags.last_token.type!==f.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==f.EQUALS&&(this._options.preserve_newlines||!D(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(b(P,"while")){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&b(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===R.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&D(P,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR||this._flags.last_token.type===f.EQUALS||this._flags.last_token.type===f.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),b(P,"function")){(m(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(m(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===f.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD?D(this._flags.last_token,["get","set","new","export"])||D(this._flags.last_token,F)?this._output.space_before_token=!0:b(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===f.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(G(this._flags.mode)||M(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var J="NONE";if(this._flags.last_token.type===f.END_BLOCK?this._previous_flags.inline_frame?J="SPACE":D(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?J="NEWLINE":(J="SPACE",this._output.space_before_token=!0):J="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&this._flags.mode===R.BlockStatement?J="NEWLINE":this._flags.last_token.type===f.SEMICOLON&&G(this._flags.mode)?J="SPACE":this._flags.last_token.type===f.STRING?J="NEWLINE":this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD||this._flags.last_token.text==="*"&&(m(this._last_last_text,["function","yield"])||this._flags.mode===R.ObjectLiteral&&m(this._last_last_text,["{",","]))?J="SPACE":this._flags.last_token.type===f.START_BLOCK?this._flags.inline_frame?J="SPACE":J="NEWLINE":this._flags.last_token.type===f.END_EXPR&&(this._output.space_before_token=!0,J="NEWLINE"),D(P,c)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?J="SPACE":J="NEWLINE"),D(P,["else","catch","finally"]))if((!(this._flags.last_token.type===f.END_BLOCK&&this._previous_flags.mode===R.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var re=this._output.current_line;re.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else J==="NEWLINE"?D(this._flags.last_token,C)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&D(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==f.END_EXPR?(this._flags.last_token.type!==f.START_EXPR||!D(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(b(P,"if")&&b(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):D(P,c)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&M(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():J==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===f.WORD||P.previous.type===f.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===f.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&b(P,"from")&&(this._flags.import_block=!1))},K.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var B=this._tokens.peek();this._flags.mode===R.Statement&&!(this._flags.if_block&&b(B,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},K.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===f.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===f.RESERVED||this._flags.last_token.type===f.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR||this._flags.last_token.type===f.EQUALS||this._flags.last_token.type===f.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===f.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},K.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},K.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(G(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)):this._flags.mode===R.ObjectLiteral||this._flags.mode===R.Statement&&this._flags.parent.mode===R.ObjectLiteral?(this._flags.mode===R.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},K.prototype.handle_operator=function(P){var B=P.text==="*"&&(D(this._flags.last_token,["function","yield"])||m(this._flags.last_token.type,[f.START_BLOCK,f.COMMA,f.END_BLOCK,f.SEMICOLON])),J=m(P.text,["-","+"])&&(m(this._flags.last_token.type,[f.START_BLOCK,f.START_EXPR,f.EQUALS,f.OPERATOR])||m(this._flags.last_token.text,c)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var re=!B;this.handle_whitespace_and_comments(P,re)}if(P.text==="*"&&this._flags.last_token.type===f.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===f.OPERATOR&&m(this._options.operator_position,A)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==f.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var he=!0,we=!0,ke=!1;if(P.text===":"?this._flags.ternary_depth===0?he=!1:(this._flags.ternary_depth-=1,ke=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!J&&!B&&this._options.preserve_newlines&&m(P.text,u)){var ne=P.text===":",Oe=ne&&ke,Ce=ne&&!ke;switch(this._options.operator_position){case S.before_newline:this._output.space_before_token=!Ce,this.print_token(P),(!ne||Oe)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case S.after_newline:this._output.space_before_token=!0,!ne||Oe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case S.preserve_newline:Ce||this.allow_wrap_or_preserved_newline(P),he=!(this._output.just_added_newline()||Ce),this._output.space_before_token=he,this.print_token(P),this._output.space_before_token=!0;return}}if(B){this.allow_wrap_or_preserved_newline(P),he=!1;var fe=this._tokens.peek();we=fe&&m(fe.type,[f.WORD,f.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),he=this._flags.last_token.type===f.START_BLOCK,we=!1;else if(m(P.text,["--","++","!","~"])||J){if((this._flags.last_token.type===f.COMMA||this._flags.last_token.type===f.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),he=!1,we=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var oe=D(this._flags.last_token,C)&&P.newlines;oe&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(oe,!0)}this._flags.last_token.text===";"&&G(this._flags.mode)&&(he=!0),this._flags.last_token.type===f.RESERVED?he=!0:this._flags.last_token.type===f.END_EXPR?he=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===f.OPERATOR&&(he=m(P.text,["--","-","++","+"])&&m(this._flags.last_token.text,["--","-","++","+"]),m(P.text,["+","-"])&&m(this._flags.last_token.text,["--","++"])&&(we=!0)),(this._flags.mode===R.BlockStatement&&!this._flags.inline_frame||this._flags.mode===R.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||he,this.print_token(P),this._output.space_before_token=we},K.prototype.handle_block_comment=function(P,B){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,B),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!i.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,B)},K.prototype.print_block_commment=function(P,B){var J=L(P.text),re,he=!1,we=!1,ke=P.whitespace_before,ne=ke.length;if(this.print_newline(!1,B),this.print_token_line_indentation(P),this._output.add_token(J[0]),this.print_newline(!1,B),J.length>1){for(J=J.slice(1),he=W(J,"*"),we=N(J,ke),he&&(this._flags.alignment=1),re=0;re<J.length;re++)he?(this.print_token_line_indentation(P),this._output.add_token(l(J[re]))):we&&J[re]?(this.print_token_line_indentation(P),this._output.add_token(J[re].substring(ne))):(this._output.current_line.set_indent(-1),this._output.add_token(J[re])),this.print_newline(!1,B);this._flags.alignment=0}},K.prototype.handle_comment=function(P,B){P.newlines?this.print_newline(!1,B):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,B)},K.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),D(this._flags.last_token,C)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(P)},K.prototype.handle_unknown=function(P,B){this.print_token(P),P.text[P.text.length-1]===`
|
|
|
`&&this.print_newline(!1,B)},K.prototype.handle_eof=function(P){for(;this._flags.mode===R.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},d.exports.Beautifier=K},function(d){function a(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}a.prototype.clone_empty=function(){var t=new a(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},a.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},a.prototype.has_match=function(t){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(t))return!0;return!1},a.prototype.set_indent=function(t,i){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},a.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},a.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},a.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},a.prototype.is_empty=function(){return this.__items.length===0},a.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},a.prototype.push=function(t){this.__items.push(t);var i=t.lastIndexOf(`
|
|
|
`);i!==-1?this.__character_count=t.length-i:this.__character_count+=t.length},a.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},a.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},a.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},a.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},a.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function n(t,i){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),i=i||"",t.indent_level>0&&(i=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(t,i){var e=this.__base_string_length;return i=i||0,t<0&&(e=0),e+=t*this.__indent_size,e+=i,e},n.prototype.get_indent_string=function(t,i){var e=this.__base_string;return i=i||0,t<0&&(t=0,e=""),i+=t*this.__indent_size,this.__ensure_cache(i),e+=this.__cache[i],e},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,i=0,e="";this.__indent_size&&t>=this.__indent_size&&(i=Math.floor(t/this.__indent_size),t-=i*this.__indent_size,e=new Array(i+1).join(this.__indent_string)),t&&(e+=new Array(t+1).join(" ")),this.__cache.push(e)};function s(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new a(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(t,i){return this.__indent_cache.get_indent_string(t,i)},s.prototype.get_indent_size=function(t,i){return this.__indent_cache.get_indent_size(t,i)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(t){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
|
|
|
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var e=this.__lines.join(`
|
|
|
`);return t!==`
|
|
|
`&&(e=e.replace(/[\n]/g,t)),e},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(t,i){return t=t||0,i=i||0,this.next_line.set_indent(t,i),this.__lines.length>1?(this.current_line.set_indent(t,i),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(t){for(var i=0;i<t.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(t){for(var i=this.__lines.length;t<i;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(t){for(t=t===void 0?!1:t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(t,i){for(var e=this.__lines.length-2;e>=0;){var r=this.__lines[e];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==i){this.__lines.splice(e+1,0,new a(this)),this.previous_line=this.__lines[this.__lines.length-2];break}e--}},d.exports.Output=s},function(d){function a(n,s,t,i){this.type=n,this.text=s,this.comments_before=null,this.newlines=t||0,this.whitespace_before=i||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}d.exports.Token=a},function(d,a){var n="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",s="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",t="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",e="(?:\\\\u[0-9a-fA-F]{4}|["+n+t+"])",r="(?:\\\\u[0-9a-fA-F]{4}|["+s+t+i+"])*";a.identifier=new RegExp(e+r,"g"),a.identifierStart=new RegExp(e),a.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+s+t+i+"])+");var c=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;a.newline=/[\n\r\u2028\u2029]/,a.lineBreak=new RegExp(`\r
|
|
|
|`+a.newline.source),a.allLineBreaks=new RegExp(a.lineBreak.source,"g")},function(d,a,n){var s=n(6).Options,t=["before-newline","after-newline","preserve-newline"];function i(e){s.call(this,e,"js");var r=this.raw_options.brace_style||null;r==="expand-strict"?this.raw_options.brace_style="expand":r==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var u=0;u<c.length;u++)c[u]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=c[u];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",t),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}i.prototype=new s,d.exports.Options=i},function(d){function a(t,i){this.raw_options=n(t,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}a.prototype._get_array=function(t,i){var e=this.raw_options[t],r=i||[];return typeof e=="object"?e!==null&&typeof e.concat=="function"&&(r=e.concat()):typeof e=="string"&&(r=e.split(/[^a-zA-Z0-9_\/\-]+/)),r},a.prototype._get_boolean=function(t,i){var e=this.raw_options[t],r=e===void 0?!!i:!!e;return r},a.prototype._get_characters=function(t,i){var e=this.raw_options[t],r=i||"";return typeof e=="string"&&(r=e.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),r},a.prototype._get_number=function(t,i){var e=this.raw_options[t];i=parseInt(i,10),isNaN(i)&&(i=0);var r=parseInt(e,10);return isNaN(r)&&(r=i),r},a.prototype._get_selection=function(t,i,e){var r=this._get_selection_list(t,i,e);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return r[0]},a.prototype._get_selection_list=function(t,i,e){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(e=e||[i[0]],!this._is_valid_selection(e,i))throw new Error("Invalid Default Value!");var r=this._get_array(t,e);if(!this._is_valid_selection(r,i))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return r},a.prototype._is_valid_selection=function(t,i){return t.length&&i.length&&!t.some(function(e){return i.indexOf(e)===-1})};function n(t,i){var e={};t=s(t);var r;for(r in t)r!==i&&(e[r]=t[r]);if(i&&t[i])for(r in t[i])e[r]=t[i][r];return e}function s(t){var i={},e;for(e in t){var r=e.replace(/-/g,"_");i[r]=t[e]}return i}d.exports.Options=a,d.exports.normalizeOpts=s,d.exports.mergeOpts=n},function(d,a,n){var s=n(8).InputScanner,t=n(9).Tokenizer,i=n(9).TOKEN,e=n(13).Directives,r=n(4),c=n(12).Pattern,u=n(14).TemplatablePattern;function f(W,N){return N.indexOf(W)!==-1}var m={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},l=new e(/\/\*/,/\*\//),E=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,b=/[0-9]/,D=/[^\d\.]/,C=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),w=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";w=w.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),w="\\?\\.(?!\\d) "+w,w=w.replace(/ /g,"|");var S=new RegExp(w),A="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),R=A.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),k=new RegExp("^(?:"+R.join("|")+")$"),L,M=function(W,N){t.call(this,W,N),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var K=new c(this._input),F=new u(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(r.identifier).matching(r.identifierMatch),number:K.matching(E),punct:K.matching(S),comment:K.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:K.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:K.matching(/<!--/),html_comment_end:K.matching(/-->/),include:K.starting_with(/#include/).until_after(r.lineBreak),shebang:K.starting_with(/#!/).until_after(r.lineBreak),xml:K.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:F.until(/['\\\n\r\u2028\u2029]/),double_quote:F.until(/["\\\n\r\u2028\u2029]/),template_text:F.until(/[`\\$]/),template_expression:F.until(/[`}\\]/)}};M.prototype=new t,M.prototype._is_comment=function(W){return W.type===m.COMMENT||W.type===m.BLOCK_COMMENT||W.type===m.UNKNOWN},M.prototype._is_opening=function(W){return W.type===m.START_BLOCK||W.type===m.START_EXPR},M.prototype._is_closing=function(W,N){return(W.type===m.END_BLOCK||W.type===m.END_EXPR)&&N&&(W.text==="]"&&N.text==="["||W.text===")"&&N.text==="("||W.text==="}"&&N.text==="{")},M.prototype._reset=function(){L=!1},M.prototype._get_next_token=function(W,N){var K=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(m.EOF,""):(K=K||this._read_non_javascript(F),K=K||this._read_string(F),K=K||this._read_word(W),K=K||this._read_singles(F),K=K||this._read_comment(F),K=K||this._read_regexp(F,W),K=K||this._read_xml(F,W),K=K||this._read_punctuation(),K=K||this._create_token(m.UNKNOWN,this._input.next()),K)},M.prototype._read_word=function(W){var N;if(N=this.__patterns.identifier.read(),N!=="")return N=N.replace(r.allLineBreaks,`
|
|
|
`),!(W.type===m.DOT||W.type===m.RESERVED&&(W.text==="set"||W.text==="get"))&&k.test(N)?(N==="in"||N==="of")&&(W.type===m.WORD||W.type===m.STRING)?this._create_token(m.OPERATOR,N):this._create_token(m.RESERVED,N):this._create_token(m.WORD,N);if(N=this.__patterns.number.read(),N!=="")return this._create_token(m.WORD,N)},M.prototype._read_singles=function(W){var N=null;return W==="("||W==="["?N=this._create_token(m.START_EXPR,W):W===")"||W==="]"?N=this._create_token(m.END_EXPR,W):W==="{"?N=this._create_token(m.START_BLOCK,W):W==="}"?N=this._create_token(m.END_BLOCK,W):W===";"?N=this._create_token(m.SEMICOLON,W):W==="."&&D.test(this._input.peek(1))?N=this._create_token(m.DOT,W):W===","&&(N=this._create_token(m.COMMA,W)),N&&this._input.next(),N},M.prototype._read_punctuation=function(){var W=this.__patterns.punct.read();if(W!=="")return W==="="?this._create_token(m.EQUALS,W):W==="?."?this._create_token(m.DOT,W):this._create_token(m.OPERATOR,W)},M.prototype._read_non_javascript=function(W){var N="";if(W==="#"){if(this._is_first_token()&&(N=this.__patterns.shebang.read(),N))return this._create_token(m.UNKNOWN,N.trim()+`
|
|
|
`);if(N=this.__patterns.include.read(),N)return this._create_token(m.UNKNOWN,N.trim()+`
|
|
|
`);W=this._input.next();var K="#";if(this._input.hasNext()&&this._input.testChar(b)){do W=this._input.next(),K+=W;while(this._input.hasNext()&&W!=="#"&&W!=="=");return W==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(K+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(K+="{}",this._input.next(),this._input.next())),this._create_token(m.WORD,K)}this._input.back()}else if(W==="<"&&this._is_first_token()){if(N=this.__patterns.html_comment_start.read(),N){for(;this._input.hasNext()&&!this._input.testChar(r.newline);)N+=this._input.next();return L=!0,this._create_token(m.COMMENT,N)}}else if(L&&W==="-"&&(N=this.__patterns.html_comment_end.read(),N))return L=!1,this._create_token(m.COMMENT,N);return null},M.prototype._read_comment=function(W){var N=null;if(W==="/"){var K="";if(this._input.peek(1)==="*"){K=this.__patterns.block_comment.read();var F=l.get_directives(K);F&&F.ignore==="start"&&(K+=l.readIgnored(this._input)),K=K.replace(r.allLineBreaks,`
|
|
|
`),N=this._create_token(m.BLOCK_COMMENT,K),N.directives=F}else this._input.peek(1)==="/"&&(K=this.__patterns.comment.read(),N=this._create_token(m.COMMENT,K))}return N},M.prototype._read_string=function(W){if(W==="`"||W==="'"||W==='"'){var N=this._input.next();return this.has_char_escapes=!1,W==="`"?N+=this._read_string_recursive("`",!0,"${"):N+=this._read_string_recursive(W),this.has_char_escapes&&this._options.unescape_strings&&(N=G(N)),this._input.peek()===W&&(N+=this._input.next()),N=N.replace(r.allLineBreaks,`
|
|
|
`),this._create_token(m.STRING,N)}return null},M.prototype._allow_regexp_or_xml=function(W){return W.type===m.RESERVED&&f(W.text,["return","case","throw","else","do","typeof","yield"])||W.type===m.END_EXPR&&W.text===")"&&W.opened.previous.type===m.RESERVED&&f(W.opened.previous.text,["if","while","for"])||f(W.type,[m.COMMENT,m.START_EXPR,m.START_BLOCK,m.START,m.END_BLOCK,m.OPERATOR,m.EQUALS,m.EOF,m.SEMICOLON,m.COMMA])},M.prototype._read_regexp=function(W,N){if(W==="/"&&this._allow_regexp_or_xml(N)){for(var K=this._input.next(),F=!1,P=!1;this._input.hasNext()&&(F||P||this._input.peek()!==W)&&!this._input.testChar(r.newline);)K+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===W&&(K+=this._input.next(),K+=this._input.read(r.identifier)),this._create_token(m.STRING,K)}return null},M.prototype._read_xml=function(W,N){if(this._options.e4x&&W==="<"&&this._allow_regexp_or_xml(N)){var K="",F=this.__patterns.xml.read_match();if(F){for(var P=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),B=P.indexOf("{")===0,J=0;F;){var re=!!F[1],he=F[2],we=!!F[F.length-1]||he.slice(0,8)==="![CDATA[";if(!we&&(he===P||B&&he.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(re?--J:++J),K+=F[0],J<=0)break;F=this.__patterns.xml.read_match()}return F||(K+=this._input.match(/[\s\S]*/g)[0]),K=K.replace(r.allLineBreaks,`
|
|
|
`),this._create_token(m.STRING,K)}}return null};function G(W){for(var N="",K=0,F=new s(W),P=null;F.hasNext();)if(P=F.match(/([\s]|[^\\]|\\\\)+/g),P&&(N+=P[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")P=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")P=F.match(/u([0-9A-Fa-f]{4})/g);else{N+="\\",F.hasNext()&&(N+=F.next());continue}if(!P)return W;if(K=parseInt(P[1],16),K>126&&K<=255&&P[0].indexOf("x")===0)return W;if(K>=0&&K<32){N+="\\"+P[0];continue}else K===34||K===39||K===92?N+="\\"+String.fromCharCode(K):N+=String.fromCharCode(K)}return N}M.prototype._read_string_recursive=function(W,N,K){var F,P;W==="'"?P=this.__patterns.single_quote:W==='"'?P=this.__patterns.double_quote:W==="`"?P=this.__patterns.template_text:W==="}"&&(P=this.__patterns.template_expression);for(var B=P.read(),J="";this._input.hasNext();){if(J=this._input.next(),J===W||!N&&r.newline.test(J)){this._input.back();break}else J==="\\"&&this._input.hasNext()?(F=this._input.peek(),F==="x"||F==="u"?this.has_char_escapes=!0:F==="\r"&&this._input.peek(1)===`
|
|
|
`&&this._input.next(),J+=this._input.next()):K&&(K==="${"&&J==="$"&&this._input.peek()==="{"&&(J+=this._input.next()),K===J&&(W==="`"?J+=this._read_string_recursive("}",N,"`"):J+=this._read_string_recursive("`",N,"${"),this._input.hasNext()&&(J+=this._input.next())));J+=P.read(),B+=J}return B},d.exports.Tokenizer=M,d.exports.TOKEN=m,d.exports.positionable_operators=C.slice(),d.exports.line_starters=A.slice()},function(d){var a=RegExp.prototype.hasOwnProperty("sticky");function n(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},n.prototype.peek=function(s){var t=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(t=this.__input.charAt(s)),t},n.prototype.__match=function(s,t){s.lastIndex=t;var i=s.exec(this.__input);return i&&!(a&&s.sticky)&&(i.index!==t&&(i=null)),i},n.prototype.test=function(s,t){return t=t||0,t+=this.__position,t>=0&&t<this.__input_length?!!this.__match(s,t):!1},n.prototype.testChar=function(s,t){var i=this.peek(t);return s.lastIndex=0,i!==null&&s.test(i)},n.prototype.match=function(s){var t=this.__match(s,this.__position);return t?this.__position+=t[0].length:t=null,t},n.prototype.read=function(s,t,i){var e="",r;return s&&(r=this.match(s),r&&(e+=r[0])),t&&(r||!s)&&(e+=this.readUntil(t,i)),e},n.prototype.readUntil=function(s,t){var i="",e=this.__position;s.lastIndex=this.__position;var r=s.exec(this.__input);return r?(e=r.index,t&&(e+=r[0].length)):e=this.__input_length,i=this.__input.substring(this.__position,e),this.__position=e,i},n.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},n.prototype.get_regexp=function(s,t){var i=null,e="g";return t&&a&&(e="y"),typeof s=="string"&&s!==""?i=new RegExp(s,e):s&&(i=new RegExp(s.source,e)),i},n.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(s){var t=this.__position,i=this.readUntilAfter(s);return this.__position=t,i},n.prototype.lookBack=function(s){var t=this.__position-1;return t>=s.length&&this.__input.substring(t-s.length,t).toLowerCase()===s},d.exports.InputScanner=n},function(d,a,n){var s=n(8).InputScanner,t=n(3).Token,i=n(10).TokenStream,e=n(11).WhitespacePattern,r={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},c=function(u,f){this._input=new s(u),this._options=f||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new e(this._input)};c.prototype.tokenize=function(){this._input.restart(),this.__tokens=new i,this._reset();for(var u,f=new t(r.START,""),m=null,l=[],E=new i;f.type!==r.EOF;){for(u=this._get_next_token(f,m);this._is_comment(u);)E.add(u),u=this._get_next_token(f,m);E.isEmpty()||(u.comments_before=E,E=new i),u.parent=m,this._is_opening(u)?(l.push(m),m=u):m&&this._is_closing(u,m)&&(u.opened=m,m.closed=u,m=l.pop(),u.parent=m),u.previous=f,f.next=u,this.__tokens.add(u),f=u}return this.__tokens},c.prototype._is_first_token=function(){return this.__tokens.isEmpty()},c.prototype._reset=function(){},c.prototype._get_next_token=function(u,f){this._readWhitespace();var m=this._input.read(/.+/g);return m?this._create_token(r.RAW,m):this._create_token(r.EOF,"")},c.prototype._is_comment=function(u){return!1},c.prototype._is_opening=function(u){return!1},c.prototype._is_closing=function(u,f){return!1},c.prototype._create_token=function(u,f){var m=new t(u,f,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return m},c.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},d.exports.Tokenizer=c,d.exports.TOKEN=r},function(d){function a(n){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=n}a.prototype.restart=function(){this.__position=0},a.prototype.isEmpty=function(){return this.__tokens_length===0},a.prototype.hasNext=function(){return this.__position<this.__tokens_length},a.prototype.next=function(){var n=null;return this.hasNext()&&(n=this.__tokens[this.__position],this.__position+=1),n},a.prototype.peek=function(n){var s=null;return n=n||0,n+=this.__position,n>=0&&n<this.__tokens_length&&(s=this.__tokens[n]),s},a.prototype.add=function(n){this.__parent_token&&(n.parent=this.__parent_token),this.__tokens.push(n),this.__tokens_length+=1},d.exports.TokenStream=a},function(d,a,n){var s=n(12).Pattern;function t(i,e){s.call(this,i,e),e?this._line_regexp=this._input.get_regexp(e._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}t.prototype=new s,t.prototype.__set_whitespace_patterns=function(i,e){i+="\\t ",e+="\\n\\r",this._match_pattern=this._input.get_regexp("["+i+e+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+e+"]")},t.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var i=this._input.read(this._match_pattern);if(i===" ")this.whitespace_before_token=" ";else if(i){var e=this.__split(this._newline_regexp,i);this.newline_count=e.length-1,this.whitespace_before_token=e[this.newline_count]}return i},t.prototype.matching=function(i,e){var r=this._create();return r.__set_whitespace_patterns(i,e),r._update(),r},t.prototype._create=function(){return new t(this._input,this)},t.prototype.__split=function(i,e){i.lastIndex=0;for(var r=0,c=[],u=i.exec(e);u;)c.push(e.substring(r,u.index)),r=u.index+u[0].length,u=i.exec(e);return r<e.length?c.push(e.substring(r,e.length)):c.push(""),c},d.exports.WhitespacePattern=t},function(d){function a(n,s){this._input=n,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}a.prototype.read=function(){var n=this._input.read(this._starting_pattern);return(!this._starting_pattern||n)&&(n+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),n},a.prototype.read_match=function(){return this._input.match(this._match_pattern)},a.prototype.until_after=function(n){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(n),s._update(),s},a.prototype.until=function(n){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(n),s._update(),s},a.prototype.starting_with=function(n){var s=this._create();return s._starting_pattern=this._input.get_regexp(n,!0),s._update(),s},a.prototype.matching=function(n){var s=this._create();return s._match_pattern=this._input.get_regexp(n,!0),s._update(),s},a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){},d.exports.Pattern=a},function(d){function a(n,s){n=typeof n=="string"?n:n.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+s,"g")}a.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var t=this.__directive_pattern.exec(n);t;)s[t[1]]=t[2],t=this.__directive_pattern.exec(n);return s},a.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},d.exports.Directives=a},function(d,a,n){var s=n(12).Pattern,t={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function i(e,r){s.call(this,e,r),this.__template_pattern=null,this._disabled=Object.assign({},t),this._excluded=Object.assign({},t),r&&(this.__template_pattern=this._input.get_regexp(r.__template_pattern),this._excluded=Object.assign(this._excluded,r._excluded),this._disabled=Object.assign(this._disabled,r._disabled));var c=new s(e);this.__patterns={handlebars_comment:c.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:c.starting_with(/{{{/).until_after(/}}}/),handlebars:c.starting_with(/{{/).until_after(/}}/),php:c.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:c.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:c.starting_with(/{%/).until_after(/%}/),django_value:c.starting_with(/{{/).until_after(/}}/),django_comment:c.starting_with(/{#/).until_after(/#}/),smarty:c.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:c.starting_with(/{\*/).until_after(/\*}/),smarty_literal:c.starting_with(/{literal}/).until_after(/{\/literal}/)}}i.prototype=new s,i.prototype._create=function(){return new i(this._input,this)},i.prototype._update=function(){this.__set_templated_pattern()},i.prototype.disable=function(e){var r=this._create();return r._disabled[e]=!0,r._update(),r},i.prototype.read_options=function(e){var r=this._create();for(var c in t)r._disabled[c]=e.templating.indexOf(c)===-1;return r._update(),r},i.prototype.exclude=function(e){var r=this._create();return r._excluded[e]=!0,r._update(),r},i.prototype.read=function(){var e="";this._match_pattern?e=this._input.read(this._starting_pattern):e=this._input.read(this._starting_pattern,this.__template_pattern);for(var r=this._read_template();r;)this._match_pattern?r+=this._input.read(this._match_pattern):r+=this._input.readUntil(this.__template_pattern),e+=r,r=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e},i.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")},i.prototype._read_template=function(){var e="",r=this._input.peek();if(r==="<"){var c=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&c==="?"&&(e=e||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&c==="%"&&(e=e||this.__patterns.erb.read())}else r==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(e=e||this.__patterns.handlebars_comment.read(),e=e||this.__patterns.handlebars_unescaped.read(),e=e||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=e||this.__patterns.django_comment.read(),e=e||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=e||this.__patterns.smarty_comment.read(),e=e||this.__patterns.smarty_literal.read(),e=e||this.__patterns.smarty.read()));return e},d.exports.TemplatablePattern=i}],o={};function g(d){var a=o[d];if(a!==void 0)return a.exports;var n=o[d]={exports:{}};return v[d](n,n.exports,g),n.exports}var p=g(0);O=p})();var y=O;!(I=[],_=function(){return{js_beautify:y}}.apply(X,I),_!==void 0&&(U.exports=_))})()},"6eGT":function(U,X,x){"use strict";function I(_){return null}X.a=I},"6lC8":function(U,X,x){},"7Cbv":function(U,X,x){"use strict";var I=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),_=new Uint8Array(16);function O(){if(!I)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return I(_)}var y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function v(t){return typeof t=="string"&&y.test(t)}for(var o=v,g=[],p=0;p<256;++p)g.push((p+256).toString(16).substr(1));function d(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(g[t[i+0]]+g[t[i+1]]+g[t[i+2]]+g[t[i+3]]+"-"+g[t[i+4]]+g[t[i+5]]+"-"+g[t[i+6]]+g[t[i+7]]+"-"+g[t[i+8]]+g[t[i+9]]+"-"+g[t[i+10]]+g[t[i+11]]+g[t[i+12]]+g[t[i+13]]+g[t[i+14]]+g[t[i+15]]).toLowerCase();if(!o(e))throw TypeError("Stringified UUID is invalid");return e}var a=d;function n(t,i,e){t=t||{};var r=t.random||(t.rng||O)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,i){e=e||0;for(var c=0;c<16;++c)i[e+c]=r[c];return i}return a(r)}var s=X.a=n},"7ZXX":function(U,X,x){U.exports=x.p+"static/err.6e7c5817.png"},"7ahc":function(U,X,x){"use strict";x.d(X,"a",function(){return l});var I=x("k1fw"),_=x("0Owb"),O=x("+L6B"),y=x("2/Rp"),v=x("y8nQ"),o=x("Vl3Y"),g=x("tJVT"),p=x("OaEy"),d=x("2fM7"),a=x("q1tI"),n=x.n(a),s=x("VrN/"),t=x.n(s),i=x("p77/"),e=x.n(i),r=x("c5Ni"),c=x.n(r),u=d.a.Option,f={labelCol:{span:4},wrapperCol:{span:20}},m={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"]};X.b=function(E){var b=E.callback,D=E.onCancel,C=Object(a.useState)("python"),w=Object(g.a)(C,2),S=w[0],A=w[1];function R(L){A(m[L][1])}function k(L){b(L)}return n.a.createElement(o.a,Object(_.a)({},f,{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:k}),n.a.createElement(o.a.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},n.a.createElement(d.a,{onChange:R},Object.keys(m).map(function(L){return n.a.createElement(u,{key:L,value:L},m[L][0])}))),n.a.createElement(o.a.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},n.a.createElement(l,{mode:S})),n.a.createElement("div",{className:"flex-container flex-end"},n.a.createElement(y.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),n.a.createElement(y.a,{type:"ghost",onClick:D},"\u53D6\u6D88")))};function l(E){var b=E.value,D=E.onChange,C=E.mode,w=E.options,S=w===void 0?{}:w,A=Object(a.useRef)(),R=Object(a.useState)(),k=Object(g.a)(R,2),L=k[0],M=k[1];return Object(a.useEffect)(function(){if(L){function G(W){var N=W.getValue();D&&D(N)}return L.on("change",G),function(){L.off("change",G)}}},[L,D]),Object(a.useEffect)(function(){L&&L.setOption("mode",C)},[L,C]),Object(a.useEffect)(function(){L&&((b!==L.getValue()||b==="")&&setTimeout(function(){L.setValue(b||" ")},300))},[L,b]),Object(a.useEffect)(function(){if(A.current&&!L){var G=t.a.fromTextArea(A.current,Object(I.a)({mode:C,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},S));M(G)}},[A.current,L]),n.a.createElement("div",{className:"my-codemirror-container"},n.a.createElement("textarea",{ref:A}))}},"7ixt":function(U,X,x){"use strict";x.d(X,"a",function(){return O});var I={adjustX:1,adjustY:1},_=[0,0],O={left:{points:["cr","cl"],overflow:I,offset:[-4,0],targetOffset:_},right:{points:["cl","cr"],overflow:I,offset:[4,0],targetOffset:_},top:{points:["bc","tc"],overflow:I,offset:[0,-4],targetOffset:_},bottom:{points:["tc","bc"],overflow:I,offset:[0,4],targetOffset:_},topLeft:{points:["bl","tl"],overflow:I,offset:[0,-4],targetOffset:_},leftTop:{points:["tr","tl"],overflow:I,offset:[-4,0],targetOffset:_},topRight:{points:["br","tr"],overflow:I,offset:[0,-4],targetOffset:_},rightTop:{points:["tl","tr"],overflow:I,offset:[4,0],targetOffset:_},bottomRight:{points:["tr","br"],overflow:I,offset:[0,4],targetOffset:_},rightBottom:{points:["bl","br"],overflow:I,offset:[4,0],targetOffset:_},bottomLeft:{points:["tl","bl"],overflow:I,offset:[0,4],targetOffset:_},leftBottom:{points:["br","bl"],overflow:I,offset:[-4,0],targetOffset:_}},y=O},"7v3h":function(U,X,x){U.exports=x.p+"static/empty2.dd73f390.png"},"8+yF":function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={256:960,257:992,258:451,259:483,260:417,261:433,262:454,263:486,264:710,265:742,266:709,267:741,268:456,269:488,270:463,271:495,272:464,273:496,274:938,275:954,278:972,279:1004,280:458,281:490,282:460,283:492,284:728,285:760,286:683,287:699,288:725,289:757,290:939,291:955,292:678,293:694,294:673,295:689,296:933,297:949,298:975,299:1007,302:967,303:999,304:681,305:697,308:684,309:700,310:979,311:1011,312:930,313:453,314:485,315:934,316:950,317:421,318:437,321:419,322:435,323:465,324:497,325:977,326:1009,327:466,328:498,330:957,331:959,332:978,333:1010,336:469,337:501,338:5052,339:5053,340:448,341:480,342:931,343:947,344:472,345:504,346:422,347:438,348:734,349:766,350:426,351:442,352:425,353:441,354:478,355:510,356:427,357:443,358:940,359:956,360:989,361:1021,362:990,363:1022,364:733,365:765,366:473,367:505,368:475,369:507,370:985,371:1017,376:5054,377:428,378:444,379:431,380:447,381:430,382:446,402:2294,466:16777681,711:439,728:418,729:511,731:434,733:445,901:1966,902:1953,904:1954,905:1955,906:1956,908:1959,910:1960,911:1963,912:1974,913:1985,914:1986,915:1987,916:1988,917:1989,918:1990,919:1991,920:1992,921:1993,922:1994,923:1995,924:1996,925:1997,926:1998,927:1999,928:2e3,929:2001,931:2002,932:2004,933:2005,934:2006,935:2007,936:2008,937:2009,938:1957,939:1961,940:1969,941:1970,942:1971,943:1972,944:1978,945:2017,946:2018,947:2019,948:2020,949:2021,950:2022,951:2023,952:2024,953:2025,954:2026,955:2027,956:2028,957:2029,958:2030,959:2031,960:2032,961:2033,962:2035,963:2034,964:2036,965:2037,966:2038,967:2039,968:2040,969:2041,970:1973,971:1977,972:1975,973:1976,974:1979,1025:1715,1026:1713,1027:1714,1028:1716,1029:1717,1030:1718,1031:1719,1032:1720,1033:1721,1034:1722,1035:1723,1036:1724,1038:1726,1039:1727,1040:1761,1041:1762,1042:1783,1043:1767,1044:1764,1045:1765,1046:1782,1047:1786,1048:1769,1049:1770,1050:1771,1051:1772,1052:1773,1053:1774,1054:1775,1055:1776,1056:1778,1057:1779,1058:1780,1059:1781,1060:1766,1061:1768,1062:1763,1063:1790,1064:1787,1065:1789,1066:1791,1067:1785,1068:1784,1069:1788,1070:1760,1071:1777,1072:1729,1073:1730,1074:1751,1075:1735,1076:1732,1077:1733,1078:1750,1079:1754,1080:1737,1081:1738,1082:1739,1083:1740,1084:1741,1085:1742,1086:1743,1087:1744,1088:1746,1089:1747,1090:1748,1091:1749,1092:1734,1093:1736,1094:1731,1095:1758,1096:1755,1097:1757,1098:1759,1099:1753,1100:1752,1101:1756,1102:1728,1103:1745,1105:1699,1106:1697,1107:1698,1108:1700,1109:1701,1110:1702,1111:1703,1112:1704,1113:1705,1114:1706,1115:1707,1116:1708,1118:1710,1119:1711,1168:1725,1169:1709,1488:3296,1489:3297,1490:3298,1491:3299,1492:3300,1493:3301,1494:3302,1495:3303,1496:3304,1497:3305,1498:3306,1499:3307,1500:3308,1501:3309,1502:3310,1503:3311,1504:3312,1505:3313,1506:3314,1507:3315,1508:3316,1509:3317,1510:3318,1511:3319,1512:3320,1513:3321,1514:3322,1548:1452,1563:1467,1567:1471,1569:1473,1570:1474,1571:1475,1572:1476,1573:1477,1574:1478,1575:1479,1576:1480,1577:1481,1578:1482,1579:1483,1580:1484,1581:1485,1582:1486,1583:1487,1584:1488,1585:1489,1586:1490,1587:1491,1588:1492,1589:1493,1590:1494,1591:1495,1592:1496,1593:1497,1594:1498,1600:1504,1601:1505,1602:1506,1603:1507,1604:1508,1605:1509,1606:1510,1607:1511,1608:1512,1609:1513,1610:1514,1611:1515,1612:1516,1613:1517,1614:1518,1615:1519,1616:1520,1617:1521,1618:1522,3585:3489,3586:3490,3587:3491,3588:3492,3589:3493,3590:3494,3591:3495,3592:3496,3593:3497,3594:3498,3595:3499,3596:3500,3597:3501,3598:3502,3599:3503,3600:3504,3601:3505,3602:3506,3603:3507,3604:3508,3605:3509,3606:3510,3607:3511,3608:3512,3609:3513,3610:3514,3611:3515,3612:3516,3613:3517,3614:3518,3615:3519,3616:3520,3617:3521,3618:3522,3619:3523,3620:3524,3621:3525,3622:3526,3623:3527,3624:3528,3625:3529,3626:3530,3627:3531,3628:3532,3629:3533,3630:3534,3631:3535,3632:3536,3633:3537,3634:3538,3635:3539,3636:3540,3637:3541,3638:3542,3639:3543,3640:3544,3641:3545,3642:3546,3647:3551,3648:3552,3649:3553,3650:3554,3651:3555,3652:3556,3653:3557,3654:3558,3655:3559,3656:3560,3657:3561,3658:3562,3659:3563,3660:3564,3661:3565,3664:3568,3665:3569,3666:3570,3667:3571,3668:3572,3669:3573,3670:3574,3671:3575,3672:3576,3673:3577,8194:2722,8195:2721,8196:2723,8197:2724,8199:2725,8200:2726,8201:2727,8202:2728,8210:2747,8211:2730,8212:2729,8213:1967,8215:3295,8216:2768,8217:2769,8218:2813,8220:2770,8221:2771,8222:2814,8224:2801,8225:2802,8226:2790,8229:2735,8230:2734,8240:2773,8242:2774,8243:2775,8248:2812,8254:1150,8361:3839,8364:8364,8453:2744,8470:1712,8471:2811,8478:2772,8482:2761,8531:2736,8532:2737,8533:2738,8534:2739,8535:2740,8536:2741,8537:2742,8538:2743,8539:2755,8540:2756,8541:2757,8542:2758,8592:2299,8593:2300,8594:2301,8595:2302,8658:2254,8660:2253,8706:2287,8711:2245,8728:3018,8730:2262,8733:2241,8734:2242,8743:2270,8744:2271,8745:2268,8746:2269,8747:2239,8756:2240,8764:2248,8771:2249,8773:16785992,8800:2237,8801:2255,8804:2236,8805:2238,8834:2266,8835:2267,8866:3068,8867:3036,8868:3010,8869:3022,8968:3027,8970:3012,8981:2810,8992:2212,8993:2213,9109:3020,9115:2219,9117:2220,9118:2221,9120:2222,9121:2215,9123:2216,9124:2217,9126:2218,9128:2223,9132:2224,9143:2209,9146:2543,9147:2544,9148:2546,9149:2547,9225:2530,9226:2533,9227:2537,9228:2531,9229:2532,9251:2732,9252:2536,9472:2211,9474:2214,9484:2210,9488:2539,9492:2541,9496:2538,9500:2548,9508:2549,9516:2551,9524:2550,9532:2542,9618:2529,9642:2791,9643:2785,9644:2779,9645:2786,9646:2783,9647:2767,9650:2792,9651:2787,9654:2781,9655:2765,9660:2793,9661:2788,9664:2780,9665:2764,9670:2528,9675:2766,9679:2782,9702:2784,9734:2789,9742:2809,9747:2762,9756:2794,9758:2795,9792:2808,9794:2807,9827:2796,9829:2798,9830:2797,9837:2806,9839:2805,10003:2803,10007:2804,10013:2777,10016:2800,10216:2748,10217:2750,12289:1188,12290:1185,12300:1186,12301:1187,12443:1246,12444:1247,12449:1191,12450:1201,12451:1192,12452:1202,12453:1193,12454:1203,12455:1194,12456:1204,12457:1195,12458:1205,12459:1206,12461:1207,12463:1208,12465:1209,12467:1210,12469:1211,12471:1212,12473:1213,12475:1214,12477:1215,12479:1216,12481:1217,12483:1199,12484:1218,12486:1219,12488:1220,12490:1221,12491:1222,12492:1223,12493:1224,12494:1225,12495:1226,12498:1227,12501:1228,12504:1229,12507:1230,12510:1231,12511:1232,12512:1233,12513:1234,12514:1235,12515:1196,12516:1236,12517:1197,12518:1237,12519:1198,12520:1238,12521:1239,12522:1240,12523:1241,12524:1242,12525:1243,12527:1244,12530:1190,12531:1245,12539:1189,12540:1200},_={lookup:function(y){if(y>=32&&y<=255)return y;var v=I[y];return v!==void 0?v:16777216|y}};X.default=_},"8/bI":function(U,X,x){U.exports=x.p+"static/empty.8918e228.png"},"815F":function(U,X,x){"use strict";x.d(X,"e",function(){return g}),x.d(X,"c",function(){return d}),x.d(X,"d",function(){return a}),x.d(X,"a",function(){return s}),x.d(X,"f",function(){return t}),x.d(X,"b",function(){return i});var I=x("KQm4"),_=x("VTBJ"),O=x("Ff2n"),y=x("Zm9Q"),v=x("Kwbf"),o=x("OZM5");function g(e,r){return e!=null?e:r}function p(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=new Map;function c(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(u||[]).forEach(function(m){var l=m.key,E=m.children;Object(v.a)(l!=null,"Tree node must have a certain key: [".concat(f).concat(l,"]"));var b=String(l);Object(v.a)(!r.has(b)||l===null||l===void 0,"Same 'key' exist in the Tree: ".concat(b)),r.set(b,!0),c(E,"".concat(f).concat(b," > "))})}c(e)}function d(e){function r(c){var u=Object(y.a)(c);return u.map(function(f){if(!Object(o.i)(f))return Object(v.a)(!f,"Tree/TreeNode can only accept TreeNode as children."),null;var m=f.key,l=f.props,E=l.children,b=Object(O.a)(l,["children"]),D=Object(_.a)({key:m},b),C=r(E);return C.length&&(D.children=C),D}).filter(function(f){return f})}return r(e)}function a(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],c=new Set(r===!0?[]:r),u=[];function f(m){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return m.map(function(E,b){var D=Object(o.h)(l?l.pos:"0",b),C=g(E.key,D),w=Object(_.a)(Object(_.a)({},E),{},{parent:l,pos:D,children:null,data:E,isStart:[].concat(Object(I.a)(l?l.isStart:[]),[b===0]),isEnd:[].concat(Object(I.a)(l?l.isEnd:[]),[b===m.length-1])});return u.push(w),r===!0||c.has(C)?w.children=f(E.children||[],w):w.children=[],w})}return f(e),u}function n(e,r,c){var u;c?typeof c=="string"?u=function(l){return l[c]}:typeof c=="function"&&(u=function(l){return c(l)}):u=function(l,E){return g(l.key,E)};function f(m,l,E){var b=m?m.children:e,D=m?Object(o.h)(E.pos,l):"0";if(m){var C=u(m,D),w={node:m,index:l,pos:D,key:C,parentPos:E.node?E.pos:null,level:E.level+1};r(w)}b&&b.forEach(function(S,A){f(S,A,{node:m,pos:D,level:E?E.level+1:-1})})}f(null)}function s(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=r.initWrapper,u=r.processEntity,f=r.onProcessFinished,m=arguments.length>2?arguments[2]:void 0,l={},E={},b={posEntities:l,keyEntities:E};return c&&(b=c(b)||b),n(e,function(D){var C=D.node,w=D.index,S=D.pos,A=D.key,R=D.parentPos,k=D.level,L={node:C,index:w,key:A,pos:S,level:k},M=g(A,S);l[S]=L,E[M]=L,L.parent=l[R],L.parent&&(L.parent.children=L.parent.children||[],L.parent.children.push(L)),u&&u(L,b)},m),f&&f(b),b}function t(e,r){var c=r.expandedKeys,u=r.selectedKeys,f=r.loadedKeys,m=r.loadingKeys,l=r.checkedKeys,E=r.halfCheckedKeys,b=r.dragOverNodeKey,D=r.dropPosition,C=r.keyEntities,w=C[e],S={eventKey:e,expanded:c.indexOf(e)!==-1,selected:u.indexOf(e)!==-1,loaded:f.indexOf(e)!==-1,loading:m.indexOf(e)!==-1,checked:l.indexOf(e)!==-1,halfChecked:E.indexOf(e)!==-1,pos:String(w?w.pos:""),dragOver:b===e&&D===0,dragOverGapTop:b===e&&D===-1,dragOverGapBottom:b===e&&D===1};return S}function i(e){var r=e.data,c=e.expanded,u=e.selected,f=e.checked,m=e.loaded,l=e.loading,E=e.halfChecked,b=e.dragOver,D=e.dragOverGapTop,C=e.dragOverGapBottom,w=e.pos,S=e.active,A=Object(_.a)(Object(_.a)({},r),{},{expanded:c,selected:u,checked:f,loaded:m,loading:l,halfChecked:E,dragOver:b,dragOverGapTop:D,dragOverGapBottom:C,pos:w,active:S});return"props"in A||Object.defineProperty(A,"props",{get:function(){return Object(v.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),A}},"88g3":function(U,X,x){U.exports={tree:"tree___noxec"}},"8Abk":function(U,X,x){},"8CQX":function(U,X,x){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(r){return typeof r}:I=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},I(i)}Object.defineProperty(X,"__esModule",{value:!0}),X.getKeycode=n,X.getKey=s,X.getKeysym=t;var _=a(x("mHUz")),O=a(x("8+yF")),y=a(x("6Qwc")),v=a(x("gIYZ")),o=a(x("mTgk")),g=d(x("GdRQ"));function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function d(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var e=p();if(e&&e.has(i))return e.get(i);var r={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(Object.prototype.hasOwnProperty.call(i,u)){var f=c?Object.getOwnPropertyDescriptor(i,u):null;f&&(f.get||f.set)?Object.defineProperty(r,u,f):r[u]=i[u]}return r.default=i,e&&e.set(i,r),r}function a(i){return i&&i.__esModule?i:{default:i}}function n(i){if(i.code){switch(i.code){case"OSLeft":return"MetaLeft";case"OSRight":return"MetaRight"}return i.code}if(i.type!=="keypress"&&i.keyCode in y.default){var e=y.default[i.keyCode];if(g.isMac()&&e==="ContextMenu"&&(e="MetaRight"),i.location===2)switch(e){case"ShiftLeft":return"ShiftRight";case"ControlLeft":return"ControlRight";case"AltLeft":return"AltRight"}if(i.location===3)switch(e){case"Delete":return"NumpadDecimal";case"Insert":return"Numpad0";case"End":return"Numpad1";case"ArrowDown":return"Numpad2";case"PageDown":return"Numpad3";case"ArrowLeft":return"Numpad4";case"ArrowRight":return"Numpad6";case"Home":return"Numpad7";case"ArrowUp":return"Numpad8";case"PageUp":return"Numpad9";case"Enter":return"NumpadEnter"}return e}return"Unidentified"}function s(i){if(i.key!==void 0){switch(i.key){case"Spacebar":return" ";case"Esc":return"Escape";case"Scroll":return"ScrollLock";case"Win":return"Meta";case"Apps":return"ContextMenu";case"Up":return"ArrowUp";case"Left":return"ArrowLeft";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Del":return"Delete";case"Divide":return"/";case"Multiply":return"*";case"Subtract":return"-";case"Add":return"+";case"Decimal":return i.char}switch(i.key){case"OS":return"Meta";case"LaunchMyComputer":return"LaunchApplication1";case"LaunchCalculator":return"LaunchApplication2"}switch(i.key){case"UIKeyInputUpArrow":return"ArrowUp";case"UIKeyInputDownArrow":return"ArrowDown";case"UIKeyInputLeftArrow":return"ArrowLeft";case"UIKeyInputRightArrow":return"ArrowRight";case"UIKeyInputEscape":return"Escape"}if(i.key==="\0"&&i.code==="NumpadDecimal")return"Delete";if(!g.isIE()&&!g.isEdge())return i.key;if(i.key.length!==1&&i.key!=="Unidentified")return i.key}var e=n(i);return e in v.default?v.default[e]:i.charCode?String.fromCharCode(i.charCode):"Unidentified"}function t(i){var e=s(i);if(e==="Unidentified")return null;if(e in o.default){var r=i.location;if(e==="Meta"&&r===0&&(r=2),e==="Clear"&&r===3){var c=n(i);c==="NumLock"&&(r=0)}if((r===void 0||r>3)&&(r=0),e==="Meta"){var u=n(i);if(u==="AltLeft")return _.default.XK_Meta_L;if(u==="AltRight")return _.default.XK_Meta_R}if(e==="Clear"){var f=n(i);if(f==="NumLock")return _.default.XK_Num_Lock}return o.default[e][r]}if(e.length!==1)return null;var m=e.charCodeAt();return m?O.default.lookup(m):null}},"8EBN":function(U,X,x){(function(I){I(x("VrN/"))})(function(I){"use strict";I.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 _=0;_<I.modeInfo.length;_++){var O=I.modeInfo[_];O.mimes&&(O.mime=O.mimes[0])}I.findModeByMIME=function(y){y=y.toLowerCase();for(var v=0;v<I.modeInfo.length;v++){var o=I.modeInfo[v];if(o.mime==y)return o;if(o.mimes){for(var g=0;g<o.mimes.length;g++)if(o.mimes[g]==y)return o}}if(/\+xml$/.test(y))return I.findModeByMIME("application/xml");if(/\+json$/.test(y))return I.findModeByMIME("application/json")},I.findModeByExtension=function(y){y=y.toLowerCase();for(var v=0;v<I.modeInfo.length;v++){var o=I.modeInfo[v];if(o.ext){for(var g=0;g<o.ext.length;g++)if(o.ext[g]==y)return o}}},I.findModeByFileName=function(y){for(var v=0;v<I.modeInfo.length;v++){var o=I.modeInfo[v];if(o.file&&o.file.test(y))return o}var g=y.lastIndexOf("."),p=g>-1&&y.substring(g+1,y.length);if(p)return I.findModeByExtension(p)},I.findModeByName=function(y){y=y.toLowerCase();for(var v=0;v<I.modeInfo.length;v++){var o=I.modeInfo[v];if(o.name.toLowerCase()==y)return o;if(o.alias){for(var g=0;g<o.alias.length;g++)if(o.alias[g].toLowerCase()==y)return o}}}})},"8Enf":function(U,X,x){},"8K/p":function(U,X,x){"use strict";function I(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(t){return typeof t}:I=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(n)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=o(x("Lo0S")),O=y(x("ItS6"));function y(n){return n&&n.__esModule?n:{default:n}}function v(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return v=function(){return n},n}function o(n){if(n&&n.__esModule)return n;if(n===null||I(n)!=="object"&&typeof n!="function")return{default:n};var s=v();if(s&&s.has(n))return s.get(n);var t={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var r=i?Object.getOwnPropertyDescriptor(n,e):null;r&&(r.get||r.set)?Object.defineProperty(t,e,r):t[e]=n[e]}return t.default=n,s&&s.set(n,t),t}function g(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function p(n,s){for(var t=0;t<s.length;t++){var i=s[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function d(n,s,t){return s&&p(n.prototype,s),t&&p(n,t),n}var a=function(){function n(){g(this,n),this._ctl=null,this._filter=null,this._numColors=0,this._palette=new Uint8Array(1024),this._len=0,this._zlibs=[];for(var s=0;s<4;s++)this._zlibs[s]=new O.default}return d(n,[{key:"decodeRect",value:function(t,i,e,r,c,u,f){if(this._ctl===null){if(c.rQwait("TIGHT compression-control",1))return!1;this._ctl=c.rQshift8();for(var m=0;m<4;m++)this._ctl>>m&1&&(this._zlibs[m].reset(),_.Info("Reset zlib stream "+m));this._ctl=this._ctl>>4}var l;if(this._ctl===8)l=this._fillRect(t,i,e,r,c,u,f);else if(this._ctl===9)l=this._jpegRect(t,i,e,r,c,u,f);else if(this._ctl===10)l=this._pngRect(t,i,e,r,c,u,f);else if((this._ctl&128)==0)l=this._basicRect(this._ctl,t,i,e,r,c,u,f);else throw new Error("Illegal tight compression received (ctl: "+this._ctl+")");return l&&(this._ctl=null),l}},{key:"_fillRect",value:function(t,i,e,r,c,u,f){if(c.rQwait("TIGHT",3))return!1;var m=c.rQi,l=c.rQ;return u.fillRect(t,i,e,r,[l[m+2],l[m+1],l[m]],!1),c.rQskipBytes(3),!0}},{key:"_jpegRect",value:function(t,i,e,r,c,u,f){var m=this._readData(c);return m===null?!1:(u.imageRect(t,i,e,r,"image/jpeg",m),!0)}},{key:"_pngRect",value:function(t,i,e,r,c,u,f){throw new Error("PNG received in standard Tight rect")}},{key:"_basicRect",value:function(t,i,e,r,c,u,f,m){if(this._filter===null)if(t&4){if(u.rQwait("TIGHT",1))return!1;this._filter=u.rQshift8()}else this._filter=0;var l=t&3,E;switch(this._filter){case 0:E=this._copyFilter(l,i,e,r,c,u,f,m);break;case 1:E=this._paletteFilter(l,i,e,r,c,u,f,m);break;case 2:E=this._gradientFilter(l,i,e,r,c,u,f,m);break;default:throw new Error("Illegal tight filter received (ctl: "+this._filter+")")}return E&&(this._filter=null),E}},{key:"_copyFilter",value:function(t,i,e,r,c,u,f,m){var l=r*c*3,E;if(l<12){if(u.rQwait("TIGHT",l))return!1;E=u.rQshiftBytes(l)}else{if(E=this._readData(u),E===null)return!1;this._zlibs[t].setInput(E),E=this._zlibs[t].inflate(l),this._zlibs[t].setInput(null)}return f.blitRgbImage(i,e,r,c,E,0,!1),!0}},{key:"_paletteFilter",value:function(t,i,e,r,c,u,f,m){if(this._numColors===0){if(u.rQwait("TIGHT palette",1))return!1;var l=u.rQpeek8()+1,E=l*3;if(u.rQwait("TIGHT palette",1+E))return!1;this._numColors=l,u.rQskipBytes(1),u.rQshiftTo(this._palette,E)}var b=this._numColors<=2?1:8,D=Math.floor((r*b+7)/8),C=D*c,w;if(C<12){if(u.rQwait("TIGHT",C))return!1;w=u.rQshiftBytes(C)}else{if(w=this._readData(u),w===null)return!1;this._zlibs[t].setInput(w),w=this._zlibs[t].inflate(C),this._zlibs[t].setInput(null)}return this._numColors==2?this._monoRect(i,e,r,c,w,this._palette,f):this._paletteRect(i,e,r,c,w,this._palette,f),this._numColors=0,!0}},{key:"_monoRect",value:function(t,i,e,r,c,u,f){for(var m=this._getScratchBuffer(e*r*4),l=Math.floor((e+7)/8),E=Math.floor(e/8),b=0;b<r;b++){var D=void 0,C=void 0,w=void 0;for(w=0;w<E;w++)for(var S=7;S>=0;S--)D=(b*e+w*8+7-S)*4,C=(c[b*l+w]>>S&1)*3,m[D]=u[C],m[D+1]=u[C+1],m[D+2]=u[C+2],m[D+3]=255;for(var A=7;A>=8-e%8;A--)D=(b*e+w*8+7-A)*4,C=(c[b*l+w]>>A&1)*3,m[D]=u[C],m[D+1]=u[C+1],m[D+2]=u[C+2],m[D+3]=255}f.blitRgbxImage(t,i,e,r,m,0,!1)}},{key:"_paletteRect",value:function(t,i,e,r,c,u,f){for(var m=this._getScratchBuffer(e*r*4),l=e*r*4,E=0,b=0;E<l;E+=4,b++){var D=c[b]*3;m[E]=u[D],m[E+1]=u[D+1],m[E+2]=u[D+2],m[E+3]=255}f.blitRgbxImage(t,i,e,r,m,0,!1)}},{key:"_gradientFilter",value:function(t,i,e,r,c,u,f,m){throw new Error("Gradient filter not implemented")}},{key:"_readData",value:function(t){if(this._len===0){if(t.rQwait("TIGHT",3))return null;var i;i=t.rQshift8(),this._len=i&127,i&128&&(i=t.rQshift8(),this._len|=(i&127)<<7,i&128&&(i=t.rQshift8(),this._len|=i<<14))}if(t.rQwait("TIGHT",this._len))return null;var e=t.rQshiftBytes(this._len);return this._len=0,e}},{key:"_getScratchBuffer",value:function(t){return(!this._scratchBuffer||this._scratchBuffer.length<t)&&(this._scratchBuffer=new Uint8Array(t)),this._scratchBuffer}}]),n}();X.default=a},"8hTe":function(U,X,x){U.exports={button:"button___1wy9m"}},"8j3D":function(U,X,x){"use strict";var I=x("2qtc"),_=x("kLXV"),O=x("5NDa"),y=x("5rEg"),v=x("miYZ"),o=x("tsqr"),g=x("k1fw"),p=x("9og8"),d=x("y8nQ"),a=x("Vl3Y"),n=x("tJVT"),s=x("WmNS"),t=x.n(s),i=x("q1tI"),e=x.n(i),r=x("Ty5D"),c=x("9kvl"),u=x("KVXO"),f=x.n(u),m=function(E){var b=E.shixunsDetail,D=E.globalSetting,C=E.loading,w=E.dispatch,S=E.title,A=E.pathList,R=A===void 0?[]:A,k=E.showInputPath,L=k===void 0?!1:k,M=E.isMergeSelectFile,G=M===void 0?!1:M,W=E.onFinish,N=W===void 0?function(){}:W,K=a.a.useForm(),F=Object(n.a)(K,1),P=F[0],B=Object(r.i)(),J=Object(r.h)(),re=Object(i.useRef)(),he=Object(i.useState)(""),we=Object(n.a)(he,2),ke=we[0],ne=we[1],Oe=Object(i.useState)(""),Ce=Object(n.a)(Oe,2),fe=Ce[0],oe=Ce[1],se=Object(i.useState)([]),be=Object(n.a)(se,2),ie=be[0],de=be[1],Fe=Object(i.useState)([]),ae=Object(n.a)(Fe,2),Z=ae[0],Y=ae[1];Object(i.useEffect)(function(){var me,Ie;re.current=((me=J.pathname)===null||me===void 0||((Ie=me.split("/"))===null||Ie===void 0)?void 0:Ie[3])==="repository"},[]),Object(i.useEffect)(function(){if(b.actionTabs.key!=="Repository-SelectFilePath")return;var me=R.join("/"),Ie=[];R.map(function(_e,Ve){Ve===0?Ie.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(_e),path:me}):Ie.push({val:"/".concat(_e),path:me})}),de(Ie),ne(me),oe(me),q(me)},[b.actionTabs.key]);var q=function(){var me=Object(p.a)(t.a.mark(function Ie(_e){var Ve;return t.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:return Ge.next=2,w({type:re.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:B.id,path:_e}});case 2:Ve=Ge.sent,Ve&&Y(Ve.trees||[]);case 4:case"end":return Ge.stop()}},Ie)}));return function(_e){return me.apply(this,arguments)}}(),ve=function(Ie){var _e=ke;Ie.type==="tree"&&(ie.length?ie.push({val:"/".concat(Ie.name),path:Ie.name}):ie.push({val:"\u6839\u76EE\u5F55",path:""},{val:"/".concat(Ie.name),path:Ie.name}),de(ie),_e=ke?"".concat(ke,"/").concat(Ie.name):Ie.name,ne(_e)),q(_e)},pe=function(Ie,_e){var Ve=ie.filter(function(Ge,Le){return Le<=_e});de(Ve);var tt=Ve.filter(function(Ge,Le){return Le!==0}).map(function(Ge){return Ge.val}).join("").substr(1);ne(tt),q(tt)},Te=function(){var me=Object(p.a)(t.a.mark(function Ie(){var _e,Ve,tt;return t.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(_e=P==null?void 0:P.getFieldsValue(),Ve=ke?"".concat(ke).concat(_e!=null&&_e.name?"/".concat(_e==null?void 0:_e.name):""):_e==null?void 0:_e.name,!G){Le.next=6;break}return N(Ve),Ne(),Le.abrupt("return");case 6:if(!L){Le.next=16;break}return Le.next=9,P.validateFields();case 9:return Le.next=11,w({type:"shixunsDetail/uploadGitFolder",payload:Object(g.a)(Object(g.a)({},{id:B.id,path:Ve}),re.current?{}:{secret_repository:!0})});case 11:tt=Le.sent,N(fe),tt.status===0&&o.b.info("\u65B0\u5EFA\u6210\u529F"),Le.next=18;break;case 16:N(Ve),o.b.success("\u9009\u62E9\u6587\u4EF6\u76EE\u5F55\u6210\u529F");case 18:Ne();case 19:case"end":return Le.stop()}},Ie)}));return function(){return me.apply(this,arguments)}}(),Ne=function(){w({type:"shixunsDetail/setActionTabs",payload:{}}),P.resetFields()};return e.a.createElement(_.a,{centered:!0,title:S||"\u65B0\u5EFA\u6587\u4EF6\u5939",closable:!1,keyboard:!1,visible:b.actionTabs.key==="Repository-SelectFilePath",onOk:Te,onCancel:Ne},e.a.createElement("div",{className:f.a.wrap},e.a.createElement("div",{className:f.a.content},e.a.createElement("div",{className:f.a.mainPathWrap},!!(ie!=null&&ie.length)&&ie.map(function(me,Ie){return e.a.createElement("a",{key:Ie,onClick:function(){return pe(me,Ie)}},me.val)})),!!(Z!=null&&Z.length)&&Z.map(function(me,Ie){return me.type==="tree"&&e.a.createElement("a",{key:Ie,onClick:function(){return ve(me)}},e.a.createElement("i",{className:"iconfont icon-wenjianjia ".concat(f.a.colorBlue)}),me.name)})),e.a.createElement("label",{className:"mt5"},"\u9009\u4E2D\u7684\u65B0\u5EFA\u6587\u4EF6\u5939\u76EE\u5F55\uFF1A"),e.a.createElement("div",{className:"mt5 mb5"},ke),L&&e.a.createElement(a.a,{form:P,scrollToFirstError:!0,className:"mt20"},e.a.createElement(a.a.Item,{name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},e.a.createElement(y.a,{placeholder:"\u8BF7\u8F93\u5165\u65B0\u6587\u4EF6\u5939\u540D/\u5B50\u6587\u4EF6\u5939\u540D\u3002\uFF08\u5982\uFF1Asrc/step1\uFF09"})))))};X.a=Object(c.a)(function(l){var E=l.shixunsDetail,b=l.loading,D=l.globalSetting;return{shixunsDetail:E,globalSetting:D,loading:b.models.index}})(m)},"8mKB":function(U,X,x){"use strict";var I=x("rePB"),_=x("1OyB"),O=x("vuIU"),y=x("Ji7U"),v=x("md7G"),o=x("foSv"),g=x("q1tI"),p=x.n(g),d=x("m+aA"),a=x("TSYQ"),n=x.n(a),s=x("4IlW");function t(S){var A=S.pageXOffset,R="scrollLeft";if(typeof A!="number"){var k=S.document;A=k.documentElement[R],typeof A!="number"&&(A=k.body[R])}return A}function i(S){var A,R,k=S.ownerDocument,L=k.body,M=k&&k.documentElement,G=S.getBoundingClientRect();return A=G.left,R=G.top,A-=M.clientLeft||L.clientLeft||0,R-=M.clientTop||L.clientTop||0,{left:A,top:R}}function e(S){var A=i(S),R=S.ownerDocument,k=R.defaultView||R.parentWindow;return A.left+=t(k),A.left}function r(S){var A=c();return function(){var k=Object(o.a)(S),L;if(A){var M=Object(o.a)(this).constructor;L=Reflect.construct(k,arguments,M)}else L=k.apply(this,arguments);return Object(v.a)(this,L)}}function c(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(S){return!1}}var u=function(S){Object(y.a)(R,S);var A=r(R);function R(){var k;return Object(_.a)(this,R),k=A.apply(this,arguments),k.onHover=function(L){var M=k.props,G=M.onHover,W=M.index;G(L,W)},k.onClick=function(L){var M=k.props,G=M.onClick,W=M.index;G(L,W)},k.onKeyDown=function(L){var M=k.props,G=M.onClick,W=M.index;L.keyCode===13&&G(L,W)},k}return Object(O.a)(R,[{key:"getClassName",value:function(){var L=this.props,M=L.prefixCls,G=L.index,W=L.value,N=L.allowHalf,K=L.focused,F=G+1,P=M;return W===0&&G===0&&K?P+=" ".concat(M,"-focused"):N&&W+.5>=F&&W<F?(P+=" ".concat(M,"-half ").concat(M,"-active"),K&&(P+=" ".concat(M,"-focused"))):(P+=F<=W?" ".concat(M,"-full"):" ".concat(M,"-zero"),F===W&&K&&(P+=" ".concat(M,"-focused"))),P}},{key:"render",value:function(){var L=this.onHover,M=this.onClick,G=this.onKeyDown,W=this.props,N=W.disabled,K=W.prefixCls,F=W.character,P=W.characterRender,B=W.index,J=W.count,re=W.value,he=typeof F=="function"?F(this.props):F,we=p.a.createElement("li",{className:this.getClassName()},p.a.createElement("div",{onClick:N?null:M,onKeyDown:N?null:G,onMouseMove:N?null:L,role:"radio","aria-checked":re>B?"true":"false","aria-posinset":B+1,"aria-setsize":J,tabIndex:N?-1:0},p.a.createElement("div",{className:"".concat(K,"-first")},he),p.a.createElement("div",{className:"".concat(K,"-second")},he)));return P&&(we=P(we,this.props)),we}}]),R}(p.a.Component);function f(S,A){var R=Object.keys(S);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(S);A&&(k=k.filter(function(L){return Object.getOwnPropertyDescriptor(S,L).enumerable})),R.push.apply(R,k)}return R}function m(S){for(var A=1;A<arguments.length;A++){var R=arguments[A]!=null?arguments[A]:{};A%2?f(Object(R),!0).forEach(function(k){Object(I.a)(S,k,R[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(S,Object.getOwnPropertyDescriptors(R)):f(Object(R)).forEach(function(k){Object.defineProperty(S,k,Object.getOwnPropertyDescriptor(R,k))})}return S}function l(S){var A=E();return function(){var k=Object(o.a)(S),L;if(A){var M=Object(o.a)(this).constructor;L=Reflect.construct(k,arguments,M)}else L=k.apply(this,arguments);return Object(v.a)(this,L)}}function E(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(S){return!1}}function b(){}var D=function(S){Object(y.a)(R,S);var A=l(R);function R(k){var L;Object(_.a)(this,R),L=A.call(this,k),L.onHover=function(G,W){var N=L.props.onHoverChange,K=L.getStarValue(W,G.pageX),F=L.state.cleanedValue;K!==F&&L.setState({hoverValue:K,cleanedValue:null}),N(K)},L.onMouseLeave=function(){var G=L.props.onHoverChange;L.setState({hoverValue:void 0,cleanedValue:null}),G(void 0)},L.onClick=function(G,W){var N=L.props.allowClear,K=L.state.value,F=L.getStarValue(W,G.pageX),P=!1;N&&(P=F===K),L.onMouseLeave(),L.changeValue(P?0:F),L.setState({cleanedValue:P?F:null})},L.onFocus=function(){var G=L.props.onFocus;L.setState({focused:!0}),G&&G()},L.onBlur=function(){var G=L.props.onBlur;L.setState({focused:!1}),G&&G()},L.onKeyDown=function(G){var W=G.keyCode,N=L.props,K=N.count,F=N.allowHalf,P=N.onKeyDown,B=N.direction,J=B==="rtl",re=L.state.value;W===s.a.RIGHT&&re<K&&!J?(F?re+=.5:re+=1,L.changeValue(re),G.preventDefault()):W===s.a.LEFT&&re>0&&!J||W===s.a.RIGHT&&re>0&&J?(F?re-=.5:re-=1,L.changeValue(re),G.preventDefault()):W===s.a.LEFT&&re<K&&J&&(F?re+=.5:re+=1,L.changeValue(re),G.preventDefault()),P&&P(G)},L.saveRef=function(G){return function(W){L.stars[G]=W}},L.saveRate=function(G){L.rate=G};var M=k.value;return M===void 0&&(M=k.defaultValue),L.stars={},L.state={value:M,focused:!1,cleanedValue:null},L}return Object(O.a)(R,[{key:"componentDidMount",value:function(){var L=this.props,M=L.autoFocus,G=L.disabled;M&&!G&&this.focus()}},{key:"getStarDOM",value:function(L){return Object(d.a)(this.stars[L])}},{key:"getStarValue",value:function(L,M){var G=this.props,W=G.allowHalf,N=G.direction,K=N==="rtl",F=L+1;if(W){var P=this.getStarDOM(L),B=e(P),J=P.clientWidth;(K&&M-B>J/2||!K&&M-B<J/2)&&(F-=.5)}return F}},{key:"focus",value:function(){var L=this.props.disabled;L||this.rate.focus()}},{key:"blur",value:function(){var L=this.props.disabled;L||this.rate.blur()}},{key:"changeValue",value:function(L){var M=this.props.onChange;"value"in this.props||this.setState({value:L}),M(L)}},{key:"render",value:function(){for(var L=this.props,M=L.count,G=L.allowHalf,W=L.style,N=L.prefixCls,K=L.disabled,F=L.className,P=L.character,B=L.characterRender,J=L.tabIndex,re=L.direction,he=this.state,we=he.value,ke=he.hoverValue,ne=he.focused,Oe=[],Ce=K?"".concat(N,"-disabled"):"",fe=0;fe<M;fe+=1)Oe.push(p.a.createElement(u,{ref:this.saveRef(fe),index:fe,count:M,disabled:K,prefixCls:"".concat(N,"-star"),allowHalf:G,value:ke===void 0?we:ke,onClick:this.onClick,onHover:this.onHover,key:fe,character:P,characterRender:B,focused:ne}));var oe=n()(N,Ce,F,Object(I.a)({},"".concat(N,"-rtl"),re==="rtl"));return p.a.createElement("ul",{className:oe,style:W,onMouseLeave:K?null:this.onMouseLeave,tabIndex:K?-1:J,onFocus:K?null:this.onFocus,onBlur:K?null:this.onBlur,onKeyDown:K?null:this.onKeyDown,ref:this.saveRate,role:"radiogroup"},Oe)}}],[{key:"getDerivedStateFromProps",value:function(L,M){return"value"in L&&L.value!==void 0?m(m({},M),{},{value:L.value}):M}}]),R}(p.a.Component);D.defaultProps={defaultValue:0,count:5,allowHalf:!1,allowClear:!0,style:{},prefixCls:"rc-rate",onChange:b,character:"\u2605",onHoverChange:b,tabIndex:0,direction:"ltr"};var C=D,w=X.a=C},"9Bee":function(U,X,x){"use strict";var I=x("DYRE"),_=x("zeV3"),O=x("+L6B"),y=x("2/Rp"),v=x("k1fw"),o=x("9og8"),g=x("tJVT"),p=x("WmNS"),d=x.n(p),a=x("q1tI"),n=x.n(a),s=x("vg9a"),t=x("DlQD"),i=x.n(t),e=x("rUJ1");function r(ue,V){var Q=ue.match(/^(\s+)(?:```)/);if(Q===null)return V;var ee=Q[1];return V.split(`
|
|
|
`).map(function(Se){var le=Se.match(/^\s+/);if(le===null)return Se;var nt=Object(g.a)(le,1),Nt=nt[0];return Nt.length>=ee.length?Se.slice(ee.length):Se}).join(`
|
|
|
`)}var c=[],u=["<ul>"],f=new i.a.Renderer,m=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function l(){c.length=0,u=["<ul>"]}var E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function b(ue,V,Q,ee){if(V>=ue.length||ue[V].level<=Q)return V;var Se=ue[V];ee.push("<li><a href='#"+Se.anchor+"'>"+Se.text+"</a>"),V++;var le=[];return V=b(ue,V,Se.level,le),le.length>0&&(ee.push("<ul>"),le.forEach(function(nt){ee.push(nt)}),ee.push("</ul>")),ee.push("</li>"),V=b(ue,V,Q,ee),V}function D(){return b(c,0,0,u),u.push("</ul>"),u.join("")}var C={heading:function(V){var Q=m.exec(V);if(Q)return{type:"heading",raw:Q[0],depth:Q[1].length,text:Q[2]}},fences:function(V){var Q=this.rules.block.fences.exec(V);if(Q){var ee=Q[0],Se=r(ee,Q[3]||""),le=Q[2]?Q[2].trim():Q[2];if(["latex","katex","math"].indexOf(le)>=0){var nt=A(),Nt=Se;Se=nt,R[nt]={type:"block",expression:Nt}}return{type:"code",raw:ee,lang:le,text:Se}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,A=function(){return"__special_katext_id_".concat(S++,"__")},R={};function k(){return R}function L(){S=0,R={}}function M(ue){return ue=ue.replace(w,function(V,Q){var ee=A();return R[ee]={type:"inline",expression:Q},ee}),ue}var G=f.listitem;f.listitem=function(ue){return G(M(ue))};var W=f.paragraph;f.paragraph=function(ue){return W(M(ue))};var N=f.tablecell;f.tablecell=function(ue,V){return N(M(ue),V)},f.code=function(ue,V,Q){var ee=(V||"").match(/\S*/)[0];return ee?["latex","katex","math"].indexOf(ee)>=0?"<p class='editormd-tex'>".concat(ue,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(V,'">').concat(Q?ue:Object(e.escape)(ue,!0),`</code></pre>
|
|
|
`):'<pre class="prettyprint linenums"><code>'+(Q?ue:Object(e.escape)(ue,!0))+"</code></pre>"},f.heading=function(ue,V,Q){var ee=this.options.headerPrefix+Q.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:ee,level:V,text:ue}),"<h"+V+' id="'+ee+'">'+ue+"</h"+V+">"},i.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),i.a.use({tokenizer:C,renderer:f});var K=i.a,F=x("SJMd"),P=x("ulZh"),B=x.n(P),J=x("m3rI"),re=x("Oy/b"),he=x("p5ED"),we=x("ErOA");/*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var ke=function(ue,V){return(ke=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,ee){Q.__proto__=ee}||function(Q,ee){for(var Se in ee)Object.prototype.hasOwnProperty.call(ee,Se)&&(Q[Se]=ee[Se])})(ue,V)};function ne(ue,V){function Q(){this.constructor=ue}ke(ue,V),ue.prototype=V===null?Object.create(V):(Q.prototype=V.prototype,new Q)}function Oe(ue,V,Q,ee){return new(Q||(Q=Promise))(function(Se,le){function nt(an){try{Jt(ee.next(an))}catch(Gt){le(Gt)}}function Nt(an){try{Jt(ee.throw(an))}catch(Gt){le(Gt)}}function Jt(an){var Gt;an.done?Se(an.value):(Gt=an.value,Gt instanceof Q?Gt:new Q(function(Dn){Dn(Gt)})).then(nt,Nt)}Jt((ee=ee.apply(ue,V||[])).next())})}function Ce(ue,V){var Q,ee,Se,le,nt={label:0,sent:function(){if(1&Se[0])throw Se[1];return Se[1]},trys:[],ops:[]};return le={next:Nt(0),throw:Nt(1),return:Nt(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function Nt(Jt){return function(an){return function(Gt){if(Q)throw new TypeError("Generator is already executing.");for(;nt;)try{if(Q=1,ee&&(Se=2&Gt[0]?ee.return:Gt[0]?ee.throw||((Se=ee.return)&&Se.call(ee),0):ee.next)&&!(Se=Se.call(ee,Gt[1])).done)return Se;switch(ee=0,Se&&(Gt=[2&Gt[0],Se.value]),Gt[0]){case 0:case 1:Se=Gt;break;case 4:return nt.label++,{value:Gt[1],done:!1};case 5:nt.label++,ee=Gt[1],Gt=[0];continue;case 7:Gt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Se=nt.trys,(Se=Se.length>0&&Se[Se.length-1])||Gt[0]!==6&&Gt[0]!==2)){nt=0;continue}if(Gt[0]===3&&(!Se||Gt[1]>Se[0]&&Gt[1]<Se[3])){nt.label=Gt[1];break}if(Gt[0]===6&&nt.label<Se[1]){nt.label=Se[1],Se=Gt;break}if(Se&&nt.label<Se[2]){nt.label=Se[2],nt.ops.push(Gt);break}Se[2]&&nt.ops.pop(),nt.trys.pop();continue}Gt=V.call(ue,nt)}catch(Dn){Gt=[6,Dn],ee=0}finally{Q=Se=0}if(5&Gt[0])throw Gt[1];return{value:Gt[0]?Gt[1]:void 0,done:!0}}([Jt,an])}}}function fe(){for(var ue=0,V=0,Q=arguments.length;V<Q;V++)ue+=arguments[V].length;var ee=Array(ue),Se=0;for(V=0;V<Q;V++)for(var le=arguments[V],nt=0,Nt=le.length;nt<Nt;nt++,Se++)ee[Se]=le[nt];return ee}var oe=function(){function ue(){}return ue.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ue.setAttributes=function(V,Q){for(var ee=0,Se=Q;ee<Se.length;ee++){var le=Se[ee],nt=le[0],Nt=le[1];V.setAttribute(nt,Nt)}},ue.createRect=function(V,Q,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","rect");return Se.setAttribute("width",V.toString()),Se.setAttribute("height",Q.toString()),ee&&ue.setAttributes(Se,ee),Se},ue.createLine=function(V,Q,ee,Se,le){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",V.toString()),nt.setAttribute("y1",Q.toString()),nt.setAttribute("x2",ee.toString()),nt.setAttribute("y2",Se.toString()),le&&ue.setAttributes(nt,le),nt},ue.createPolygon=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),Q&&ue.setAttributes(ee,Q),ee},ue.createCircle=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(V/2).toString()),ee.setAttribute("cy",(V/2).toString()),ee.setAttribute("r",V.toString()),Q&&ue.setAttributes(ee,Q),ee},ue.createEllipse=function(V,Q,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Se.setAttribute("cx",(V/2).toString()),Se.setAttribute("cy",(Q/2).toString()),Se.setAttribute("rx",(V/2).toString()),Se.setAttribute("ry",(Q/2).toString()),ee&&ue.setAttributes(Se,ee),Se},ue.createGroup=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ue.setAttributes(Q,V),Q},ue.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ue.createMarker=function(V,Q,ee,Se,le,nt,Nt){var Jt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ue.setAttributes(Jt,[["id",V],["orient",Q],["markerWidth",ee.toString()],["markerHeight",Se.toString()],["refX",le.toString()],["refY",nt.toString()]]),Jt.appendChild(Nt),Jt},ue.createText=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","text");return Q.setAttribute("x","0"),Q.setAttribute("y","0"),V&&ue.setAttributes(Q,V),Q},ue.createTSpan=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,Q&&ue.setAttributes(ee,Q),ee},ue.createImage=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ue.setAttributes(Q,V),Q},ue.createPoint=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=Q,ee},ue.createPath=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),Q&&ue.setAttributes(ee,Q),ee},ue}(),se=function(){function ue(){}return ue.addKey=function(V){ue.key=V},Object.defineProperty(ue,"isLicensed",{get:function(){return!!ue.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ue.key)},enumerable:!1,configurable:!0}),ue}(),be=function(){function ue(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ue.prototype.rasterize=function(V,Q,ee){var Se=this;return new Promise(function(le){var nt=ee!==void 0?ee:document.createElement("canvas");V===null&&(Se.markersOnly=!0,Se.naturalSize=!1);var Nt=document.createElementNS("http://www.w3.org/2000/svg","svg");Nt.setAttribute("xmlns","http://www.w3.org/2000/svg"),Nt.setAttribute("width",Q.width.baseVal.valueAsString),Nt.setAttribute("height",Q.height.baseVal.valueAsString),Nt.setAttribute("viewBox","0 0 "+Q.viewBox.baseVal.width.toString()+" "+Q.viewBox.baseVal.height.toString()),Nt.innerHTML=Q.innerHTML,Se.naturalSize===!0?(Nt.width.baseVal.value=V.naturalWidth,Nt.height.baseVal.value=V.naturalHeight):Se.width!==void 0&&Se.height!==void 0&&(Nt.width.baseVal.value=Se.width,Nt.height.baseVal.value=Se.height),nt.width=Nt.width.baseVal.value,nt.height=Nt.height.baseVal.value;var Jt=Nt.outerHTML,an=nt.getContext("2d");Se.markersOnly!==!0&&an.drawImage(V,0,0,nt.width,nt.height);var Gt=window.URL,Dn=new Image(nt.width,nt.height);Dn.setAttribute("crossOrigin","anonymous");var Xn=new Blob([Jt],{type:"image/svg+xml"}),sr=Gt.createObjectURL(Xn);Dn.onload=function(){an.drawImage(Dn,0,0),Gt.revokeObjectURL(sr);var Tr=nt.toDataURL(Se.imageType,Se.imageQuality);le(Tr)},Dn.src=sr})},ue}(),ie=function(){},de=function(){function ue(V){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ue.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ue.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(ue.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ue.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},ue.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},ue.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Fe("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Fe("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Fe("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new ae("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new ae("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ue.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ue}(),Fe=function(ue,V){this.selector=ue,this.style=V},ae=function(ue,V){this.localName=ue,this.style=V},Z=function(){function ue(V,Q,ee,Se,le){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=V,this.displayMode=Q,this.markerItems=ee,this.uiStyleSettings=Se,this.styles=le,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ue.prototype.show=function(V){var Q=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var ee=document.createElement("div");ee.className=this.toolbarBlockStyleClass.name,ee.style.whiteSpace="nowrap",this.uiContainer.appendChild(ee),this.addActionButton(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(ee,'<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(le){var nt=document.createElement("div");nt.className=""+Q.toolbarButtonStyleClass.name,nt.setAttribute("data-type-name",le.typeName),nt.innerHTML=le.icon,nt.addEventListener("click",function(){Q.markerToolbarButtonClicked(nt,le)}),Q.buttons.push(nt),Q.markerButtons.push(nt)}),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 Se=document.createElement("div");Se.className=this.toolbarBlockStyleClass.name,Se.style.whiteSpace="nowrap",Se.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Se),this.addActionButton(Se,'<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(Se,'<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()},ue.prototype.addButtonClickListener=function(V){this.buttonClickListeners.push(V)},ue.prototype.removeButtonClickListener=function(V){this.buttonClickListeners.indexOf(V)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(V),1)},ue.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ue.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var V=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Q=0;Q<this.markerButtons.length;Q++)Q<V||Q===V&&this.markerButtons.length-1===V?this.markerButtonBlock.appendChild(this.markerButtons[Q]):(Q===V&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Q]))}},ue.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},ue.prototype.resetButtonStyles=function(){var V=this;this.buttons.forEach(function(Q){Q.className=Q.className.replace(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name,"").trim(),Q.className=Q.className.replace(V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?V.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:V.toolbarActiveButtonStyleColorsClass.name,"").trim(),Q.className+=" "+(V.uiStyleSettings.toolbarButtonStyleColorsClassName?V.uiStyleSettings.toolbarButtonStyleColorsClassName:V.toolbarButtonStyleColorsClass.name)})},ue.prototype.addActionButton=function(V,Q,ee){var Se=this,le=document.createElement("div");switch(le.className=""+this.toolbarButtonStyleClass.name,le.innerHTML=Q,le.setAttribute("data-action",ee),le.addEventListener("click",function(){Se.actionToolbarButtonClicked(le,ee)}),ee){case"select":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":le.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":le.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":le.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":le.style.fill=this.uiStyleSettings.closeButtonColor}V.appendChild(le),this.buttons.push(le)},ue.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new ae("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new ae("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new ae("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new ae("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new ae("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var V=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new ae("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},ue.prototype.markerToolbarButtonClicked=function(V,Q){this.setActiveButton(V),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("marker",Q)}),this.markerButtonOverflowBlock.style.display="none"},ue.prototype.actionToolbarButtonClicked=function(V,Q){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(ee){return ee("action",Q)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ue.prototype.setActiveButton=function(V){this.resetButtonStyles(),V.className=V.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),V.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ue.prototype.setActiveMarkerButton=function(V){var Q=this.markerButtons.find(function(ee){return ee.getAttribute("data-type-name")===V});Q&&this.setActiveButton(Q)},ue.prototype.setCurrentMarker=function(V){var Q=this;this.currentMarker=V,this.buttons.filter(function(ee){return/delete|notes/.test(ee.getAttribute("data-action"))}).forEach(function(ee){Q.currentMarker===void 0?(ee.style.fillOpacity="0.4",ee.style.pointerEvents="none"):(ee.style.fillOpacity="1",ee.style.pointerEvents="all")})},ue}(),Y=function(){function ue(V,Q,ee,Se){this.panels=[],this.panelButtons=[],this.markerjsContainer=V,this.displayMode=Q,this.uiStyleSettings=ee,this.styles=Se,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ue.prototype.addStyles=function(){var V;this.toolboxStyleClass=this.styles.addClass(new ae("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new ae("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Q=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new ae("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new ae("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new ae("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new ae("toolbox-panel-row_colors",`
|
|
|
background-color: `+((V=this.uiStyleSettings.toolboxBackgroundColor)!==null&&V!==void 0?V:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new ae("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Q)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Q)+`px;
|
|
|
padding: `+Q+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new ae("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new Fe("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},ue.prototype.show=function(V){var Q;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=V,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Q=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Q!==void 0?Q:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ue.prototype.setPanelButtons=function(V){var Q,ee,Se=this;this.panels=V,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Q=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Q!==void 0?Q:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((ee=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&ee!==void 0?ee:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(le){var nt;le.uiStyleSettings=Se.uiStyleSettings;var Nt=document.createElement("div");Nt.className=Se.toolboxButtonStyleClass.name+" "+((nt=Se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&nt!==void 0?nt:Se.toolboxButtonStyleColorsClass.name),Nt.innerHTML=le.icon,Nt.title=le.title,Nt.addEventListener("click",function(){Se.panelButtonClick(le)}),Se.panelButtons.push(Nt),Se.buttonRow.appendChild(Nt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ue.prototype.panelButtonClick=function(V){var Q=this,ee=-1;if(V!==this.activePanel){ee=this.panels.indexOf(V),this.panelRow.innerHTML="";var Se=V.getUi();Se.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Se),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=V}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Q.displayMode==="inline"?Q.panelRow.style.display="none":Q.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(le,nt){var Nt,Jt;le.className=Q.toolboxButtonStyleClass.name+" "+(nt===ee?""+((Nt=Q.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Nt!==void 0?Nt:Q.toolboxActiveButtonStyleColorsClass.name):""+((Jt=Q.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Jt!==void 0?Jt:Q.toolboxButtonStyleColorsClass.name))})},ue}(),q=function(ue,V){this.title=ue,this.icon=V},ve=function(ue){function V(Q,ee,Se,le){var nt=ue.call(this,Q,le||'<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 nt.colors=[],nt.addTransparent=!1,nt.colorBoxes=[],nt.colors=ee,nt.currentColor=Se,nt.setCurrentColor=nt.setCurrentColor.bind(nt),nt.getColorBox=nt.getColorBox.bind(nt),nt}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.whiteSpace="nowrap",this.colors.forEach(function(Se){var le=Q.getColorBox(Se);ee.appendChild(le),Q.colorBoxes.push(le)}),ee},V.prototype.getColorBox=function(Q){var ee=this,Se=this.uiStyleSettings.toolbarHeight/4,le=this.uiStyleSettings.toolbarHeight-Se,nt=document.createElement("div");nt.style.display="inline-block",nt.style.boxSizing="content-box",nt.style.width=le-2+"px",nt.style.height=le-2+"px",nt.style.padding="1px",nt.style.marginRight="2px",nt.style.marginBottom="2px",nt.style.borderWidth="2px",nt.style.borderStyle="solid",nt.style.borderRadius=(le+2)/2+"px",nt.style.borderColor=Q===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",nt.addEventListener("click",function(){ee.setCurrentColor(Q,nt)});var Nt=document.createElement("div");return Nt.style.display="inline-block",Nt.style.width=le-2+"px",Nt.style.height=le-2+"px",Nt.style.backgroundColor=Q,Nt.style.borderRadius=le/2+"px",Q==="transparent"&&(Nt.style.fill=this.uiStyleSettings.toolboxAccentColor,Nt.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),nt.appendChild(Nt),nt},V.prototype.setCurrentColor=function(Q,ee){var Se=this;this.currentColor=Q,this.colorBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Q)},V}(q),pe=function(){function ue(V,Q,ee){this._state="new",this._isSelected=!1,this._container=V,this._overlayContainer=Q,this.globalSettings=ee,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ue.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ue.prototype.ownsTarget=function(V){return!1},Object.defineProperty(ue.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ue.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ue.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ue.prototype.pointerDown=function(V,Q){},ue.prototype.dblClick=function(V,Q){},ue.prototype.manipulate=function(V){},ue.prototype.pointerUp=function(V){this.stateChanged()},ue.prototype.dispose=function(){},ue.prototype.addMarkerVisualToContainer=function(V){this.container.childNodes.length>0?this.container.insertBefore(V,this.container.childNodes[0]):this.container.appendChild(V)},ue.prototype.getState=function(){return{typeName:ue.typeName,state:this.state,notes:this.notes}},ue.prototype.restoreState=function(V){this._state=V.state,this.notes=V.notes},ue.prototype.scale=function(V,Q){},ue.prototype.colorChanged=function(V){this.onColorChanged&&this.onColorChanged(V),this.stateChanged()},ue.prototype.fillColorChanged=function(V){this.onFillColorChanged&&this.onFillColorChanged(V),this.stateChanged()},ue.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var V=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),V.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(V)&&this.onStateChanged(this)}},ue.typeName="MarkerBase",ue}(),Te=function(){function ue(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ue.prototype.findGripByVisual=function(V){return this.topLeft.ownsTarget(V)?this.topLeft:this.topCenter.ownsTarget(V)?this.topCenter:this.topRight.ownsTarget(V)?this.topRight:this.centerLeft.ownsTarget(V)?this.centerLeft:this.centerRight.ownsTarget(V)?this.centerRight:this.bottomLeft.ownsTarget(V)?this.bottomLeft:this.bottomCenter.ownsTarget(V)?this.bottomCenter:this.bottomRight.ownsTarget(V)?this.bottomRight:void 0},ue}(),Ne=function(){function ue(){this.GRIP_SIZE=10,this.visual=oe.createGroup(),this.visual.appendChild(oe.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(oe.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ue.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ue}(),me=function(){function ue(){}return ue.toITransformMatrix=function(V){return{a:V.a,b:V.b,c:V.c,d:V.d,e:V.e,f:V.f}},ue.toSVGMatrix=function(V,Q){return V.a=Q.a,V.b=Q.b,V.c=Q.c,V.d=Q.d,V.e=Q.e,V.f=Q.f,V},ue}(),Ie=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.left=0,le.top=0,le.width=0,le.height=0,le.defaultSize={x:50,y:20},le.offsetX=0,le.offsetY=0,le.rotationAngle=0,le.CB_DISTANCE=10,le._suppressMarkerCreateEvent=!1,le.container.transform.baseVal.appendItem(oe.createTransform()),le.setupControlBox(),le}return ne(V,ue),Object.defineProperty(V.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(V.prototype,"visual",{get:function(){return this._visual},set:function(Q){this._visual=Q;var ee=oe.createTransform();this._visual.transform.baseVal.appendItem(ee)},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Q){return!!ue.prototype.ownsTarget.call(this,Q)||!!(this.controlGrips.findGripByVisual(Q)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Q))},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="new"&&(this.left=Q.x,this.top=Q.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Se=this.unrotatePoint(Q);if(this.manipulationStartX=Se.x,this.manipulationStartY=Se.y,this.offsetX=Se.x-this.left,this.offsetY=Se.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(ee),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(ee)){this.activeGrip=this.rotatorGrip;var le=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=le.x-this.width/2,this.top=le.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var nt=this.container.transform.baseVal.getItem(0);nt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(nt,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},V.prototype.pointerUp=function(Q){var ee=this.state;ue.prototype.pointerUp.call(this,Q),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Q),this._state="select",ee==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},V.prototype.moveVisual=function(Q){this.visual.style.transform="translate("+Q.x+"px, "+Q.y+"px)"},V.prototype.manipulate=function(Q){var ee=this.unrotatePoint(Q);this.state==="creating"?this.resize(Q):this.state==="move"?(this.left=this.manipulationStartLeft+(ee.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(ee.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(ee):this.state==="rotate"&&this.rotate(Q)},V.prototype.resize=function(Q){var ee=this.manipulationStartLeft,Se=this.manipulationStartWidth,le=this.manipulationStartTop,nt=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:ee=this.manipulationStartLeft+Q.x-this.manipulationStartX,Se=this.manipulationStartWidth+this.manipulationStartLeft-ee;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Se=this.manipulationStartWidth+Q.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:le=this.manipulationStartTop+Q.y-this.manipulationStartY,nt=this.manipulationStartHeight+this.manipulationStartTop-le;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:nt=this.manipulationStartHeight+Q.y-this.manipulationStartY}Se>=0?(this.left=ee,this.width=Se):(this.left=ee+Se,this.width=-Se),nt>=0?(this.top=le,this.height=nt):(this.top=le+nt,this.height=-nt),this.setSize()},V.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},V.prototype.rotate=function(Q){if(Math.abs(Q.x-this.centerX)>.1){var ee=Math.sign(Q.x-this.centerX);this.rotationAngle=180*Math.atan((Q.y-this.centerY)/(Q.x-this.centerX))/Math.PI+90*ee,this.applyRotation()}},V.prototype.applyRotation=function(){var Q=this.container.transform.baseVal.getItem(0);Q.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Q,0)},V.prototype.rotatePoint=function(Q){if(this.rotationAngle===0)return Q;var ee=this.container.getCTM(),Se=oe.createPoint(Q.x,Q.y);return{x:(Se=Se.matrixTransform(ee)).x,y:Se.y}},V.prototype.unrotatePoint=function(Q){if(this.rotationAngle===0)return Q;var ee=this.container.getCTM();ee=ee.inverse();var Se=oe.createPoint(Q.x,Q.y);return{x:(Se=Se.matrixTransform(ee)).x,y:Se.y}},V.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=oe.createGroup();var Q=oe.createTransform();Q.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Q),this.container.appendChild(this.controlBox),this.controlRect=oe.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=oe.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 Te,this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){var Q=this.controlBox.transform.baseVal.getItem(0);Q.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Q,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},V.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},V.prototype.createGrip=function(){var Q=new Ne;return Q.visual.transform.baseVal.appendItem(oe.createTransform()),this.controlBox.appendChild(Q.visual),Q},V.prototype.positionGrips=function(){var Q=this.controlGrips.topLeft.GRIP_SIZE,ee=-Q/2,Se=ee,le=(this.width+this.CB_DISTANCE)/2-Q/2,nt=(this.height+this.CB_DISTANCE)/2-Q/2,Nt=this.height+this.CB_DISTANCE-Q/2,Jt=this.width+this.CB_DISTANCE-Q/2;this.positionGrip(this.controlGrips.topLeft.visual,ee,Se),this.positionGrip(this.controlGrips.topCenter.visual,le,Se),this.positionGrip(this.controlGrips.topRight.visual,Jt,Se),this.positionGrip(this.controlGrips.centerLeft.visual,ee,nt),this.positionGrip(this.controlGrips.centerRight.visual,Jt,nt),this.positionGrip(this.controlGrips.bottomLeft.visual,ee,Nt),this.positionGrip(this.controlGrips.bottomCenter.visual,le,Nt),this.positionGrip(this.controlGrips.bottomRight.visual,Jt,Nt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,le,Se-3*this.CB_DISTANCE)},V.prototype.positionGrip=function(Q,ee,Se){var le=Q.transform.baseVal.getItem(0);le.setTranslate(ee,Se),Q.transform.baseVal.replaceItem(le,0)},V.prototype.hideControlBox=function(){this.controlBox.style.display="none"},V.prototype.showControlBox=function(){this.controlBox.style.display=""},V.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:me.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:me.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q);var ee=Q;this.left=ee.left,this.top=ee.top,this.width=ee.width,this.height=ee.height,this.rotationAngle=ee.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,ee.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(me.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,ee.containerTransformMatrix))},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee);var Se=this.rotatePoint({x:this.left,y:this.top}),le=this.unrotatePoint({x:Se.x*Q,y:Se.y*ee});this.left=le.x,this.top=le.y,this.width=this.width*Q,this.height=this.height*ee,this.adjustControlBox()},V}(pe),_e=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.createVisual=le.createVisual.bind(le),le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.visual)},V.prototype.createVisual=function(){this.visual=oe.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)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Q),this._state="creating")},V.prototype.manipulate=function(Q){ue.prototype.manipulate.call(this,Q)},V.prototype.resize=function(Q){ue.prototype.resize.call(this,Q),this.setSize()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),oe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Q){ue.prototype.pointerUp.call(this,Q),this.setSize()},V.prototype.setStrokeColor=function(Q){this.strokeColor=Q,this.visual&&oe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Q),this.stateChanged()},V.prototype.setFillColor=function(Q){this.fillColor=Q,this.visual&&oe.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},V.prototype.setStrokeWidth=function(Q){this.strokeWidth=Q,this.visual&&oe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Q){this.strokeDasharray=Q,this.visual&&oe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Q){var ee=Q;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ue.prototype.restoreState.call(this,Q),this.setSize()},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.setSize()},V.title="Rectangle marker",V}(Ie),Ve=function(ue){function V(Q,ee,Se,le){var nt=ue.call(this,Q,le||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return nt.widths=[],nt.widthBoxes=[],nt.widths=ee,nt.currentWidth=Se,nt.setCurrentWidth=nt.setCurrentWidth.bind(nt),nt}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.widths.forEach(function(Se){var le=document.createElement("div");le.style.display="flex",le.style.flexGrow="2",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=Se===Q.currentWidth?Q.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){Q.setCurrentWidth(Se,le)}),ee.appendChild(le);var nt=document.createElement("div");nt.innerText=Se.toString(),nt.style.marginRight="5px",le.appendChild(nt);var Nt=document.createElement("div");Nt.style.minHeight="20px",Nt.style.flexGrow="2",Nt.style.display="flex",Nt.style.alignItems="center";var Jt=document.createElement("hr");Jt.style.minWidth="20px",Jt.style.border="0px",Jt.style.borderTop=Se+"px solid "+Q.uiStyleSettings.toolboxColor,Jt.style.flexGrow="2",Nt.appendChild(Jt),le.appendChild(Nt),Q.widthBoxes.push(le)}),ee},V.prototype.setCurrentWidth=function(Q,ee){var Se=this;this.currentWidth=Q,this.widthBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},V}(q),tt=function(ue){function V(Q,ee,Se,le){var nt=ue.call(this,Q,le||'<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 nt.styles=[],nt.styleBoxes=[],nt.styles=ee,nt.currentStyle=Se,nt.setCurrentStyle=nt.setCurrentStyle.bind(nt),nt}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",this.styles.forEach(function(Se){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/Q.styles.length-5+"%",le.style.borderColor=Se===Q.currentStyle?Q.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){Q.setCurrentStyle(Se,le)}),ee.appendChild(le);var nt=document.createElement("div");nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.overflow="hidden";var Nt=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Q.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Se!==""?'stroke-dasharray="'+Se+'"':"")+` />
|
|
|
</svg>`;nt.innerHTML=Nt,le.appendChild(nt),Q.styleBoxes.push(le)}),ee},V.prototype.setCurrentStyle=function(Q,ee){var Se=this;this.currentStyle=Q,this.styleBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},V}(q),Ge=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.strokeColor=Se.defaultColor,le.strokeWidth=Se.defaultStrokeWidth,le.strokeDasharray=Se.defaultStrokeDasharray,le.strokePanel=new ve("Line color",Se.defaultColorSet,Se.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ve("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=ue.prototype.getState.call(this);return Q.typeName=V.typeName,Q},V.typeName="FrameMarker",V.title="Frame marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',V}(_e),Le=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},bt=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.x1=0,le.y1=0,le.x2=0,le.y2=0,le.defaultLength=50,le.manipulationStartX=0,le.manipulationStartY=0,le.manipulationStartX1=0,le.manipulationStartY1=0,le.manipulationStartX2=0,le.manipulationStartY2=0,le.setupControlBox(),le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!!ue.prototype.ownsTarget.call(this,Q)||!(!this.grip1.ownsTarget(Q)&&!this.grip2.ownsTarget(Q))},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.manipulationStartX=Q.x,this.manipulationStartY=Q.y,this.state==="new"&&(this.x1=Q.x,this.y1=Q.y,this.x2=Q.x,this.y2=Q.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(ee)?this.activeGrip=this.grip1:this.grip2.ownsTarget(ee)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},V.prototype.pointerUp=function(Q){var ee=this.state;ue.prototype.pointerUp.call(this,Q),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(Q),this._state="select",ee==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},V.prototype.adjustVisual=function(){},V.prototype.manipulate=function(Q){this.state==="creating"?this.resize(Q):this.state==="move"?(this.x1=this.manipulationStartX1+Q.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Q.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Q.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Q.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Q)},V.prototype.resize=function(Q){switch(this.activeGrip){case this.grip1:this.x1=Q.x,this.y1=Q.y;break;case this.grip2:case void 0:this.x2=Q.x,this.y2=Q.y}this.adjustVisual(),this.adjustControlBox()},V.prototype.select=function(){ue.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},V.prototype.deselect=function(){ue.prototype.deselect.call(this),this.controlBox.style.display="none"},V.prototype.setupControlBox=function(){this.controlBox=oe.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},V.prototype.adjustControlBox=function(){this.positionGrips()},V.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},V.prototype.createGrip=function(){var Q=new Ne;return Q.visual.transform.baseVal.appendItem(oe.createTransform()),this.controlBox.appendChild(Q.visual),Q},V.prototype.positionGrips=function(){var Q=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Q/2,this.y1-Q/2),this.positionGrip(this.grip2.visual,this.x2-Q/2,this.y2-Q/2)},V.prototype.positionGrip=function(Q,ee,Se){var le=Q.transform.baseVal.getItem(0);le.setTranslate(ee,Se),Q.transform.baseVal.replaceItem(le,0)},V.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ue.prototype.getState.call(this))},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q);var ee=Q;this.x1=ee.x1,this.y1=ee.y1,this.x2=ee.x2,this.y2=ee.y2},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.x1=this.x1*Q,this.y1=this.y1*ee,this.x2=this.x2*Q,this.y2=this.y2*ee,this.adjustVisual(),this.adjustControlBox()},V}(pe),Re=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.strokeColor=Se.defaultColor,le.strokeWidth=Se.defaultStrokeWidth,le.strokeDasharray=Se.defaultStrokeDasharray,le.strokePanel=new ve("Line color",Se.defaultColorSet,Se.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ve("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.visual&&Q!==this.selectorLine&&Q!==this.visibleLine)},V.prototype.createVisual=function(){this.visual=oe.createGroup(),this.selectorLine=oe.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=oe.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)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},V.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()),oe.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),oe.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),oe.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setStrokeColor=function(Q){this.strokeColor=Q,this.adjustVisual(),this.colorChanged(Q)},V.prototype.setStrokeWidth=function(Q){this.strokeWidth=Q,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Q){this.strokeDasharray=Q,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q);var ee=Q;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.createVisual(),this.adjustVisual()},V.typeName="LineMarker",V.title="Line marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',V}(bt),Xe=function(ue){function V(Q,ee,Se,le){var nt=ue.call(this,Q,le||'<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 nt.fonts=[],nt.fontBoxes=[],nt.fonts=ee,nt.currentFont=Se,nt.setCurrentFont=nt.setCurrentFont.bind(nt),nt}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");return ee.style.overflow="hidden",ee.style.flexGrow="2",this.fonts.forEach(function(Se){var le=document.createElement("div");le.style.display="inline-block",le.style.alignItems="center",le.style.justifyContent="space-between",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.overflow="hidden",le.style.maxWidth=100/Q.fonts.length-5+"%",le.style.borderColor=Se===Q.currentFont?Q.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){Q.setCurrentFont(Se,le)}),ee.appendChild(le);var nt=document.createElement("div");nt.style.display="flex",nt.style.minHeight="20px",nt.style.flexGrow="2",nt.style.fontFamily=Se,nt.style.overflow="hidden";var Nt=document.createElement("div");Nt.style.whiteSpace="nowrap",Nt.style.overflow="hidden",Nt.style.textOverflow="ellipsis",Nt.innerHTML="The quick brown fox jumps over the lazy dog",nt.appendChild(Nt),le.appendChild(nt),Q.fontBoxes.push(le)}),ee},V.prototype.setCurrentFont=function(Q,ee){var Se=this;this.currentFont=Q,this.fontBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},V}(q),et=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.color="transparent",le.padding=5,le.DEFAULT_TEXT="your text here",le.text=le.DEFAULT_TEXT,le.isMoved=!1,le.color=Se.defaultColor,le.fontFamily=Se.defaultFontFamily,le.defaultSize={x:100,y:30},le.setColor=le.setColor.bind(le),le.setFont=le.setFont.bind(le),le.renderText=le.renderText.bind(le),le.sizeText=le.sizeText.bind(le),le.textEditDivClicked=le.textEditDivClicked.bind(le),le.showTextEditor=le.showTextEditor.bind(le),le.setSize=le.setSize.bind(le),le.positionTextEditor=le.positionTextEditor.bind(le),le.colorPanel=new ve("Color",Se.defaultColorSet,Se.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.fontFamilyPanel=new Xe("Font",Se.defaultFontFamilies,Se.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){if(ue.prototype.ownsTarget.call(this,Q)||Q===this.visual||Q===this.textElement||Q===this.bgRectangle)return!0;var ee=!1;return this.textElement.childNodes.forEach(function(Se){Se===Q&&(ee=!0)}),ee},V.prototype.createVisual=function(){this.visual=oe.createGroup(),this.bgRectangle=oe.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=oe.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(oe.createTransform()),this.textElement.transform.baseVal.appendItem(oe.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.isMoved=!1,this.pointerDownPoint=Q,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Q),this._state="creating")},V.prototype.renderText=function(){var Q=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(ee){Q.textElement.appendChild(oe.createTSpan(ee.trim()===""?" ":ee.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},V.prototype.getTextScale=function(){var Q=this.textElement.getBBox(),ee=1;if(Q.width>0&&Q.height>0){var Se=(1*this.width-this.width*this.padding*2/100)/Q.width,le=(1*this.height-this.height*this.padding*2/100)/Q.height;ee=Math.min(Se,le)}return ee},V.prototype.getTextPosition=function(Q){var ee=this.textElement.getBBox(),Se=0,le=0;return ee.width>0&&ee.height>0&&(Se=(this.width-ee.width*Q)/2,le=this.height/2-ee.height*Q/2),{x:Se,y:le}},V.prototype.sizeText=function(){var Q=this.textElement.getBBox(),ee=this.getTextScale(),Se=this.getTextPosition(ee);Se.y-=Q.y*ee,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Se.x+"px, "+Se.y+"px) scale("+ee+", "+ee+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Se.x,Se.y),this.textElement.transform.baseVal.getItem(1).setScale(ee,ee))},V.prototype.manipulate=function(Q){ue.prototype.manipulate.call(this,Q),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Q.x-this.pointerDownPoint.x)>5||Math.abs(Q.y-this.pointerDownPoint.y)>5)},V.prototype.resize=function(Q){ue.prototype.resize.call(this,Q),this.isMoved=!0,this.setSize(),this.sizeText()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(oe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),oe.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},V.prototype.pointerUp=function(Q){var ee=this.state;ee==="creating"&&(this._suppressMarkerCreateEvent=!0),ue.prototype.pointerUp.call(this,Q),this.setSize(),(ee==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},V.prototype.showTextEditor=function(){var Q=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(ee){ee.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var ee=Number.parseFloat(Q.textEditor.style.fontSize);Q.textEditor.clientWidth>=Number.parseInt(Q.textEditor.style.maxWidth)&&ee>.9;)ee-=.1,Q.textEditor.style.fontSize=Math.max(ee,.9)+"em"}),this.textEditor.addEventListener("keyup",function(ee){ee.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(ee){if(ee.clipboardData){var Se=ee.clipboardData.getData("text"),le=window.getSelection();if(!le.rangeCount)return!1;le.deleteFromDocument(),le.getRangeAt(0).insertNode(document.createTextNode(Se)),ee.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Q.textEditDivClicked(Q.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},V.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Q=this.getTextScale(),ee=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Se=this.textElement.getBBox(),le={x:Se.width*Q,y:Se.height*Q};ee.x-=le.x/2,ee.y-=le.y/2,this.textEditor.style.top=ee.y+"px",this.textEditor.style.left=ee.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-ee.x+"px",this.textEditor.style.fontSize=Math.max(16*Q,12)+"px",this.textElement.style.display="none"}},V.prototype.textEditDivClicked=function(Q){this.text=Q.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},V.prototype.select=function(){ue.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},V.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ue.prototype.deselect.call(this)},V.prototype.dblClick=function(Q,ee){ue.prototype.dblClick.call(this,Q,ee),this.showTextEditor()},V.prototype.setColor=function(Q){this.textElement&&oe.setAttributes(this.textElement,[["fill",Q]]),this.color=Q,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Q)},V.prototype.setFont=function(Q){this.textElement&&oe.setAttributes(this.textElement,[["font-family",Q]]),this.fontFamily=Q,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},V.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},V.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){var ee=Q;this.color=ee.color,this.fontFamily=ee.fontFamily,this.padding=ee.padding,this.text=ee.text,this.createVisual(),ue.prototype.restoreState.call(this,Q),this.setSize()},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.setSize(),this.sizeText(),this.positionTextEditor()},V.typeName="TextMarker",V.title="Text marker",V.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>',V}(Ie),Ye=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.color="transparent",le.lineWidth=3,le.drawing=!1,le.pixelRatio=1,le.color=Se.defaultColor,le.lineWidth=Se.defaultStrokeWidth,le.pixelRatio=Se.freehandPixelRatio,le.setColor=le.setColor.bind(le),le.addCanvas=le.addCanvas.bind(le),le.finishCreation=le.finishCreation.bind(le),le.setLineWidth=le.setLineWidth.bind(le),le.colorPanel=new ve("Color",Se.defaultColorSet,Se.defaultColor),le.colorPanel.onColorChanged=le.setColor,le.lineWidthPanel=new Ve("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),le.lineWidthPanel.onWidthChanged=le.setLineWidth,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.visual&&Q!==this.drawingImage)},V.prototype.createVisual=function(){this.visual=oe.createGroup(),this.drawingImage=oe.createImage(),this.visual.appendChild(this.drawingImage);var Q=oe.createTransform();this.visual.transform.baseVal.appendItem(Q),this.addMarkerVisualToContainer(this.visual)},V.prototype.pointerDown=function(Q,ee){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Q.x,Q.y),this.drawing=!0):ue.prototype.pointerDown.call(this,Q,ee)},V.prototype.manipulate=function(Q){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Q.x,Q.y),this.canvasContext.stroke()):ue.prototype.manipulate.call(this,Q)},V.prototype.resize=function(Q){ue.prototype.resize.call(this,Q),oe.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),oe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},V.prototype.pointerUp=function(Q){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ue.prototype.pointerUp.call(this,Q)},V.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)},V.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ue.prototype.select.call(this)},V.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ue.prototype.deselect.call(this)},V.prototype.finishCreation=function(){for(var Q=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),ee=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Se=ee[0],le=ee[1],nt=ee[2],Nt=ee[3],Jt=!1,an=0;an<this.canvasElement.height;an++)for(var Gt=0;Gt<this.canvasElement.width;Gt++)Q.data[an*this.canvasElement.width*4+4*Gt+3]>0&&(Jt=!0,an<le&&(le=an),Gt<Se&&(Se=Gt),an>Nt&&(Nt=an),Gt>nt&&(nt=Gt));if(Jt){this.left=Se/this.pixelRatio,this.top=le/this.pixelRatio,this.width=(nt-Se)/this.pixelRatio,this.height=(Nt-le)/this.pixelRatio;var Dn=document.createElement("canvas");Dn.width=nt-Se,Dn.height=Nt-le,Dn.getContext("2d").putImageData(this.canvasContext.getImageData(Se,le,nt-Se,Nt-le),0,0),this.drawingImgUrl=Dn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},V.prototype.setDrawingImage=function(){oe.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),oe.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},V.prototype.setColor=function(Q){this.color=Q,this.colorChanged(Q)},V.prototype.setLineWidth=function(Q){this.lineWidth=Q},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({drawingImgUrl:this.drawingImgUrl},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){this.createVisual(),ue.prototype.restoreState.call(this,Q),this.drawingImgUrl=Q.drawingImgUrl,this.setDrawingImage()},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.setDrawingImage()},V.typeName="FreehandMarker",V.title="Freehand marker",V.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>',V}(Ie),Me=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,Se||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return le.typeBoxes=[],le.currentType=ee,le.setCurrentType=le.setCurrentType.bind(le),le}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2";for(var Se=function(Nt){var Jt="both";switch(Nt){case 0:Jt="both";break;case 1:Jt="start";break;case 2:Jt="end";break;case 3:Jt="none"}var an=document.createElement("div");if(an.style.display="flex",an.style.flexGrow="2",an.style.alignItems="center",an.style.justifyContent="space-between",an.style.padding="5px",an.style.borderWidth="2px",an.style.borderStyle="solid",an.style.borderColor=Jt===le.currentType?le.uiStyleSettings.toolboxAccentColor:"transparent",an.addEventListener("click",function(){Q.setCurrentType(Jt,an)}),ee.appendChild(an),Jt==="both"||Jt==="start"){var Gt=document.createElement("div");Gt.style.display="flex",Gt.style.alignItems="center",Gt.style.minHeight="20px",Gt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Gt.style.marginLeft="5px",an.appendChild(Gt)}var Dn=document.createElement("div");Dn.style.display="flex",Dn.style.alignItems="center",Dn.style.minHeight="20px",Dn.style.flexGrow="2";var Xn=document.createElement("hr");if(Xn.style.minWidth="20px",Xn.style.border="0px",Xn.style.borderTop="3px solid "+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee"),Xn.style.flexGrow="2",Dn.appendChild(Xn),an.appendChild(Dn),Jt==="both"||Jt==="end"){var sr=document.createElement("div");sr.style.display="flex",sr.style.alignItems="center",sr.style.minHeight="20px",sr.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(le.uiStyleSettings!==void 0?le.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,sr.style.marginRight="5px",an.appendChild(sr)}le.typeBoxes.push(an)},le=this,nt=0;nt<4;nt++)Se(nt);return ee},V.prototype.setCurrentType=function(Q,ee){var Se=this;this.currentType=Q,this.typeBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings!==void 0?Se.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},V}(q),Ke=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.arrowType="end",le.arrowBaseHeight=10,le.arrowBaseWidth=10,le.getArrowPoints=le.getArrowPoints.bind(le),le.setArrowType=le.setArrowType.bind(le),le.arrowTypePanel=new Me("Arrow type","end"),le.arrowTypePanel.onArrowTypeChanged=le.setArrowType,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.arrow1&&Q!==this.arrow2)},V.prototype.getArrowPoints=function(Q,ee){var Se=this.arrowBaseWidth+2*this.strokeWidth,le=this.arrowBaseHeight+2*this.strokeWidth;return Q-Se/2+","+(ee+le/2)+" "+Q+","+(ee-le/2)+" "+(Q+Se/2)+","+(ee+le/2)},V.prototype.createTips=function(){this.arrow1=oe.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(oe.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=oe.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(oe.createTransform()),this.visual.appendChild(this.arrow2)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ue.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2&&(this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",oe.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),oe.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var Q=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.arrow1.transform.baseVal.getItem(0);ee.setRotate(Q,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(ee,0);var Se=this.arrow2.transform.baseVal.getItem(0);Se.setRotate(Q+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Se,0)}},V.prototype.setArrowType=function(Q){this.arrowType=Q,this.adjustVisual(),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({arrowType:this.arrowType},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q);var ee=Q;this.arrowType=ee.arrowType,this.createTips(),this.adjustVisual()},V.typeName="ArrowMarker",V.title="Arrow marker",V.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',V}(Re),ge=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.fillColor=Se.defaultFillColor,le.strokeWidth=0,le.fillPanel=new ve("Color",Se.defaultColorSet,Se.defaultFillColor),le.fillPanel.onColorChanged=le.setFillColor,le}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=ue.prototype.getState.call(this);return Q.typeName=V.typeName,Q},V.typeName="CoverMarker",V.title="Cover marker",V.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',V}(_e),Ee=function(ue){function V(Q,ee,Se,le){var nt=ue.call(this,Q,le||'<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 nt.opacities=[],nt.opacityBoxes=[],nt.opacities=ee,nt.currentOpacity=Se,nt.setCurrentOpacity=nt.setCurrentOpacity.bind(nt),nt}return ne(V,ue),V.prototype.getUi=function(){var Q=this,ee=document.createElement("div");return ee.style.display="flex",ee.style.overflow="hidden",ee.style.flexGrow="2",ee.style.justifyContent="space-between",this.opacities.forEach(function(Se){var le=document.createElement("div");le.style.display="flex",le.style.alignItems="center",le.style.justifyContent="center",le.style.padding="5px",le.style.borderWidth="2px",le.style.borderStyle="solid",le.style.borderColor=Se===Q.currentOpacity?Q.uiStyleSettings.toolboxAccentColor:"transparent",le.addEventListener("click",function(){Q.setCurrentOpacity(Se,le)}),ee.appendChild(le);var nt=document.createElement("div");nt.innerText=100*Se+"%",le.appendChild(nt),Q.opacityBoxes.push(le)}),ee},V.prototype.setCurrentOpacity=function(Q,ee){var Se=this;this.currentOpacity=Q,this.opacityBoxes.forEach(function(le){le.style.borderColor=le===ee?Se.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},V}(q),ce=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.setOpacity=le.setOpacity.bind(le),le.fillColor=Se.defaultHighlightColor,le.strokeWidth=0,le.opacity=Se.defaultHighlightOpacity,le.fillPanel=new ve("Color",Se.defaultColorSet,le.fillColor),le.fillPanel.onColorChanged=le.setFillColor,le.opacityPanel=new Ee("Opacity",Se.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return ne(V,ue),V.prototype.setOpacity=function(Q){this.opacity=Q,this.visual&&oe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=ue.prototype.getState.call(this);return Q.typeName=V.typeName,Q},V.typeName="HighlightMarker",V.title="Highlight marker",V.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>',V}(ge),je='<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>',Qe=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.bgColor="transparent",le.tipPosition={x:0,y:0},le.tipBase1Position={x:0,y:0},le.tipBase2Position={x:0,y:0},le.tipMoving=!1,le.color=Se.defaultStrokeColor,le.bgColor=Se.defaultFillColor,le.fontFamily=Se.defaultFontFamily,le.defaultSize={x:100,y:30},le.setBgColor=le.setBgColor.bind(le),le.getTipPoints=le.getTipPoints.bind(le),le.positionTip=le.positionTip.bind(le),le.setTipPoints=le.setTipPoints.bind(le),le.colorPanel=new ve("Text color",Se.defaultColorSet,le.color,'<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>'),le.colorPanel.onColorChanged=le.setColor,le.bgColorPanel=new ve("Fill color",Se.defaultColorSet,le.bgColor,je),le.bgColorPanel.onColorChanged=le.setBgColor,le.fontFamilyPanel=new Xe("Font",Se.defaultFontFamilies,Se.defaultFontFamily),le.fontFamilyPanel.onFontChanged=le.setFont,le.tipGrip=new Ne,le.tipGrip.visual.transform.baseVal.appendItem(oe.createTransform()),le.controlBox.appendChild(le.tipGrip.visual),le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return ue.prototype.ownsTarget.call(this,Q)||this.tipGrip.ownsTarget(Q)||this.tip===Q},V.prototype.createTip=function(){oe.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=oe.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},V.prototype.pointerDown=function(Q,ee){this.state==="new"&&ue.prototype.pointerDown.call(this,Q,ee),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(ee)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ue.prototype.pointerDown.call(this,Q,ee)},V.prototype.pointerUp=function(Q){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ue.prototype.pointerUp.call(this,Q);else{var ee=this.state==="creating";ue.prototype.pointerUp.call(this,Q),this.setTipPoints(ee),this.positionTip()}},V.prototype.manipulate=function(Q){if(this.tipMoving){var ee=this.unrotatePoint(Q);this.tipPosition={x:ee.x-this.manipulationStartLeft,y:ee.y-this.manipulationStartTop},this.positionTip()}else ue.prototype.manipulate.call(this,Q)},V.prototype.setBgColor=function(Q){this.bgRectangle&&this.tip&&(oe.setAttributes(this.bgRectangle,[["fill",Q]]),oe.setAttributes(this.tip,[["fill",Q]])),this.bgColor=Q,this.fillColorChanged(Q)},V.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},V.prototype.setTipPoints=function(Q){Q===void 0&&(Q=!1);var ee=Math.min(this.height/2,15),Se=this.height/5;Q&&(this.tipPosition={x:ee+Se/2,y:this.height+20});var le=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Se=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:0},this.tipBase2Position={x:ee+Se,y:0}):(this.tipBase1Position={x:0,y:ee},this.tipBase2Position={x:0,y:ee+Se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?le<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Se=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-Se,y:0},this.tipBase2Position={x:this.width-ee,y:0}):(this.tipBase1Position={x:this.width,y:ee},this.tipBase2Position={x:this.width,y:ee+Se}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?le<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Se=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-ee-Se,y:this.height},this.tipBase2Position={x:this.width-ee,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-ee-Se},this.tipBase2Position={x:this.width,y:this.height-ee}):le<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Se=this.width/5,ee=Math.min(this.width/2,15),this.tipBase1Position={x:ee,y:this.height},this.tipBase2Position={x:ee+Se,y:this.height}):(this.tipBase1Position={x:0,y:this.height-ee},this.tipBase2Position={x:0,y:this.height-ee-Se})},V.prototype.resize=function(Q){ue.prototype.resize.call(this,Q),this.positionTip()},V.prototype.positionTip=function(){oe.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Q=this.tipGrip.visual.transform.baseVal.getItem(0);Q.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Q,0)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),V.prototype.select=function(){this.positionTip(),ue.prototype.select.call(this)},V.prototype.getState=function(){var Q=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){var ee=Q;this.bgColor=ee.bgColor,this.tipPosition=ee.tipPosition,ue.prototype.restoreState.call(this,Q),this.createTip(),this.setTipPoints()},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.tipPosition={x:this.tipPosition.x*Q,y:this.tipPosition.y*ee},this.positionTip()},V.typeName="CalloutMarker",V.title="Callout marker",V.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>',V}(et),te=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.fillColor="transparent",le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.opacity=1,le.strokeColor=Se.defaultColor,le.strokeWidth=Se.defaultStrokeWidth,le.strokeDasharray=Se.defaultStrokeDasharray,le.fillColor=Se.defaultFillColor,le.setStrokeColor=le.setStrokeColor.bind(le),le.setFillColor=le.setFillColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.setOpacity=le.setOpacity.bind(le),le.createVisual=le.createVisual.bind(le),le.strokePanel=new ve("Line color",fe(Se.defaultColorSet,["transparent"]),Se.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.fillPanel=new ve("Fill color",fe(Se.defaultColorSet,["transparent"]),le.fillColor,je),le.fillPanel.onColorChanged=le.setFillColor,le.strokeWidthPanel=new Ve("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le.opacityPanel=new Ee("Opacity",Se.defaultOpacitySteps,le.opacity),le.opacityPanel.onOpacityChanged=le.setOpacity,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.visual)},V.prototype.createVisual=function(){this.visual=oe.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)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="new"&&(this.createVisual(),this.moveVisual(Q),this._state="creating")},V.prototype.manipulate=function(Q){ue.prototype.manipulate.call(this,Q)},V.prototype.resize=function(Q){ue.prototype.resize.call(this,Q),this.setSize()},V.prototype.setSize=function(){ue.prototype.setSize.call(this),oe.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},V.prototype.pointerUp=function(Q){ue.prototype.pointerUp.call(this,Q),this.setSize()},V.prototype.setStrokeColor=function(Q){this.strokeColor=Q,this.visual&&oe.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Q),this.stateChanged()},V.prototype.setFillColor=function(Q){this.fillColor=Q,this.visual&&oe.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Q),this.stateChanged()},V.prototype.setStrokeWidth=function(Q){this.strokeWidth=Q,this.visual&&oe.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},V.prototype.setStrokeDasharray=function(Q){this.strokeDasharray=Q,this.visual&&oe.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},V.prototype.setOpacity=function(Q){this.opacity=Q,this.visual&&oe.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){var ee=Q;this.fillColor=ee.fillColor,this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.opacity=ee.opacity,this.createVisual(),ue.prototype.restoreState.call(this,Q),this.setSize()},V.prototype.scale=function(Q,ee){ue.prototype.scale.call(this,Q,ee),this.setSize()},V.typeName="EllipseMarker",V.title="Ellipse marker",V.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>',V}(Ie),Je=function(ue){function V(Q,ee,Se){return ue.call(this,Q,ee,Se)||this}return ne(V,ue),Object.defineProperty(V.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.tip1&&Q!==this.tip2)},V.prototype.createTips=function(){this.tip1=oe.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(oe.createTransform()),this.visual.appendChild(this.tip1),this.tip2=oe.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(oe.createTransform()),this.visual.appendChild(this.tip2)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.state==="creating"&&this.createTips()},V.prototype.adjustVisual=function(){if(ue.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(oe.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()]]),oe.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 Q=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),ee=this.tip1.transform.baseVal.getItem(0);ee.setRotate(Q,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(ee,0);var Se=this.tip2.transform.baseVal.getItem(0);Se.setRotate(Q+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Se,0)}},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=ue.prototype.getState.call(this);return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q),this.createTips(),this.adjustVisual()},V.typeName="MeasurementMarker",V.title="Measurement marker",V.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>',V}(Re),ut=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.strokePanel.colors=Se.defaultColorSet,le.fillColor="transparent",le}return ne(V,ue),Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=ue.prototype.getState.call(this);return Q.typeName=V.typeName,Q},V.typeName="EllipseFrameMarker",V.title="Ellipse frame marker",V.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>',V}(te),Be=function(){function ue(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ue.prototype.addUndoStep=function(V){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(V)||(this.undoStack.push(V),JSON.stringify(this.lastRedoStep)!==JSON.stringify(V)&&this.redoStack.splice(0,this.redoStack.length))},ue.prototype.replaceLastUndoStep=function(V){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=V)},ue.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ue.prototype.undo=function(){if(this.undoStack.length>1){var V=this.undoStack.pop();return V!==void 0&&this.redoStack.push(V),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ue.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ue}(),qe=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee,Se)||this;return le.strokeColor="transparent",le.strokeWidth=0,le.strokeDasharray="",le.curveX=0,le.curveY=0,le.manipulationStartCurveX=0,le.manipulationStartCurveY=0,le.setStrokeColor=le.setStrokeColor.bind(le),le.setStrokeWidth=le.setStrokeWidth.bind(le),le.setStrokeDasharray=le.setStrokeDasharray.bind(le),le.positionGrips=le.positionGrips.bind(le),le.addControlGrips=le.addControlGrips.bind(le),le.adjustVisual=le.adjustVisual.bind(le),le.setupControlBox=le.setupControlBox.bind(le),le.resize=le.resize.bind(le),le.strokeColor=Se.defaultColor,le.strokeWidth=Se.defaultStrokeWidth,le.strokeDasharray=Se.defaultStrokeDasharray,le.strokePanel=new ve("Line color",Se.defaultColorSet,Se.defaultColor),le.strokePanel.onColorChanged=le.setStrokeColor,le.strokeWidthPanel=new Ve("Line width",Se.defaultStrokeWidths,Se.defaultStrokeWidth),le.strokeWidthPanel.onWidthChanged=le.setStrokeWidth,le.strokeStylePanel=new tt("Line style",Se.defaultStrokeDasharrays,Se.defaultStrokeDasharray),le.strokeStylePanel.onStyleChanged=le.setStrokeDasharray,le}return ne(V,ue),V.prototype.ownsTarget=function(Q){return!(!ue.prototype.ownsTarget.call(this,Q)&&Q!==this.visual&&Q!==this.selectorCurve&&Q!==this.visibleCurve&&!this.curveGrip.ownsTarget(Q))},V.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},V.prototype.createVisual=function(){this.visual=oe.createGroup(),this.selectorCurve=oe.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=oe.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)},V.prototype.pointerDown=function(Q,ee){ue.prototype.pointerDown.call(this,Q,ee),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Q.x,this.curveY=Q.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(ee)&&(this.activeGrip=this.curveGrip,this._state="resize")},V.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),oe.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),oe.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),oe.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},V.prototype.setupControlBox=function(){ue.prototype.setupControlBox.call(this),this.curveControlLine1=oe.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=oe.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)},V.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ue.prototype.addControlGrips.call(this)},V.prototype.positionGrips=function(){ue.prototype.positionGrips.call(this);var Q=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Q/2,this.curveY-Q/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()))},V.prototype.manipulate=function(Q){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Q.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Q.y-this.manipulationStartY),ue.prototype.manipulate.call(this,Q)},V.prototype.resize=function(Q){this.activeGrip===this.curveGrip&&(this.curveX=Q.x,this.curveY=Q.y),ue.prototype.resize.call(this,Q),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},V.prototype.setStrokeColor=function(Q){this.strokeColor=Q,this.adjustVisual(),this.colorChanged(Q)},V.prototype.setStrokeWidth=function(Q){this.strokeWidth=Q,this.adjustVisual()},V.prototype.setStrokeDasharray=function(Q){this.strokeDasharray=Q,this.adjustVisual()},V.prototype.scale=function(Q,ee){this.curveX=this.curveX*Q,this.curveY=this.curveY*ee,ue.prototype.scale.call(this,Q,ee)},Object.defineProperty(V.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),V.prototype.getState=function(){var Q=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ue.prototype.getState.call(this));return Q.typeName=V.typeName,Q},V.prototype.restoreState=function(Q){ue.prototype.restoreState.call(this,Q);var ee=Q;this.strokeColor=ee.strokeColor,this.strokeWidth=ee.strokeWidth,this.strokeDasharray=ee.strokeDasharray,this.curveX=ee.curveX,this.curveY=ee.curveY,this.createVisual(),this.adjustVisual()},V.typeName="CurveMarker",V.title="Curve marker",V.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>',V}(bt),at=function(){function ue(V,Q){Q===void 0&&(Q=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=V,this.cancelable=Q}return Object.defineProperty(ue.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ue.prototype.preventDefault=function(){this._defaultPrevented=!0},ue}(),wt=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,!1)||this;return le.dataUrl=ee,le.state=Se,le}return ne(V,ue),V}(at),ft=function(ue){function V(Q,ee,Se){Se===void 0&&(Se=!1);var le=ue.call(this,Q,Se)||this;return le.marker=ee,le}return ne(V,ue),V}(at),st=function(){function ue(){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 ue.prototype.addEventListener=function(V,Q){this[V].push(Q)},ue.prototype.removeEventListener=function(V,Q){var ee=this[V].indexOf(Q);ee>-1&&this[V].splice(ee,1)},ue}(),Pe=function(){function ue(V){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Le,this._isOpen=!1,this.undoRedoManager=new Be,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 st,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ue.instanceCounter++,this.styles=new de(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=V,this.targetRoot=document.body,this.width=V.clientWidth,this.height=V.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(ue.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ge,Ye,Ke,et,ut,te,ce,Qe,Je,ge,Re,qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ge,Ye,Ke,et,te,ce,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ge,Ye,Ke,et,ce]},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(V){var Q=this;this._availableMarkerTypes.splice(0),V.forEach(function(ee){if(typeof ee=="string"){var Se=Q.ALL_MARKER_TYPES.find(function(le){return le.typeName===ee});Se!==void 0&&Q._availableMarkerTypes.push(Se)}else Q._availableMarkerTypes.push(ee)})},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(V){this._zoomLevel=V,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(ue.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ue.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),se.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ue.prototype.show=function(){var V=this;this.styles.styleSheetRoot===void 0&&ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Q){return Q(new at(V))})},ue.prototype.render=function(){return Oe(this,void 0,void 0,function(){var V;return Ce(this,function(Q){switch(Q.label){case 0:return this.setCurrentMarker(),(V=new be).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.markersOnly=this.renderMarkersOnly,V.width=this.renderWidth,V.height=this.renderHeight,[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Q.sent(),[4,V.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Q.sent()]}})})},ue.prototype.close=function(V){var Q=this;if(V===void 0&&(V=!1),this.isOpen){var ee=!1;V||this.eventListeners.beforeclose.forEach(function(Se){var le=new at(Q,!0);Se(le),le.defaultPrevented&&(ee=!0)}),ee||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Se){return Se(new at(Q))}),this.detachEvents(),this._isOpen=!1)}},ue.prototype.addMarkersToToolbar=function(){for(var V,Q=[],ee=0;ee<arguments.length;ee++)Q[ee]=arguments[ee];(V=this._availableMarkerTypes).push.apply(V,Q)},ue.prototype.addRenderEventListener=function(V){this.addEventListener("render",function(Q){V(Q.dataUrl,Q.state)})},ue.prototype.removeRenderEventListener=function(V){},ue.prototype.addCloseEventListener=function(V){this.addEventListener("close",function(){V()})},ue.prototype.removeCloseEventListener=function(V){},ue.prototype.setupResizeObserver=function(){var V=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return V.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ue.prototype.onPopupTargetResize=function(){var V=1*this.target.clientWidth/this.target.clientHeight,Q=this.editorCanvas.clientWidth/V>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*V:this.editorCanvas.clientWidth,ee=Q<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/V;this.resize(Q,ee)},ue.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ue.prototype.resize=function(V,Q){this._isResizing=!0;var ee=V/this.imageWidth,Se=Q/this.imageHeight;this.imageWidth=Math.round(V),this.imageHeight=Math.round(Q),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(ee,Se),this._isResizing=!1},ue.prototype.scaleMarkers=function(V,Q){var ee,Se=this;this._currentMarker&&this._currentMarker instanceof et?this._currentMarker.scale(V,Q):(ee=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(le){le!==Se._currentMarker&&le.scale(V,Q)}),ee!==void 0&&this.setCurrentMarker(ee)},ue.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"},ue.prototype.setTopLeft=function(){var V=this.editingTarget.getBoundingClientRect(),Q=this.editorCanvas.getBoundingClientRect();this.left=V.left-Q.left,this.top=V.top-Q.top},ue.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)},ue.prototype.addDefs=function(){for(var V,Q=[],ee=0;ee<arguments.length;ee++)Q[ee]=arguments[ee];this.defs=oe.createDefs(),this.addDefsToImage(),(V=this.defs).append.apply(V,Q)},ue.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ue.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)},ue.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ue.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ue.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)},ue.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ue.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)},ue.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 V=document.createElement("a");V.href="https://markerjs.com/",V.target="_blank",V.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>',V.title="Powered by marker.js",V.style.display="grid",V.style.alignItems="center",V.style.justifyItems="center",V.style.padding="3px",V.style.width="20px",V.style.height="20px",this.logoUI.appendChild(V),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ue.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},ue.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"},ue.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ue.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new Y(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ue.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ue.prototype.removeMarker=function(V){this.markerImage.removeChild(V.container),this.markers.indexOf(V)>-1&&this.markers.splice(this.markers.indexOf(V),1),V.dispose()},ue.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},ue.prototype.toolbarButtonClicked=function(V,Q){if(V==="marker"&&Q!==void 0)this.createNewMarker(Q);else if(V==="action")switch(Q){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},ue.prototype.deleteSelectedMarker=function(){var V=this;if(this._currentMarker!==void 0){var Q=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Se){var le=new ft(V,V._currentMarker,!0);Se(le),le.defaultPrevented&&(Q=!0)}),!Q){var ee=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(Se){return Se(new ft(V,ee))})}}},ue.prototype.clear=function(){var V=this,Q=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(nt){var Nt=new ft(V,void 0,!0);nt(Nt),Nt.defaultPrevented&&(Q=!0)}),!Q)){this.setCurrentMarker();for(var ee=function(nt){var Nt=Se.markers[nt];Se.setCurrentMarker(Se.markers[nt]),Se._currentMarker.dispose(),Se.markerImage.removeChild(Se._currentMarker.container),Se.markers.splice(Se.markers.indexOf(Se._currentMarker),1),Se.eventListeners.markerdelete.forEach(function(Jt){return Jt(new ft(V,Nt))})},Se=this,le=this.markers.length-1;le>=0;le--)ee(le);this.addUndoStep()}},Object.defineProperty(ue.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ue.prototype.showNotesEditor=function(){var V;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(V=this._currentMarker.notes)!==null&&V!==void 0?V:"",this.overlayContainer.appendChild(this.notesArea))},ue.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},ue.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ue.prototype.addUndoStep=function(){var V=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Q=this.getState(),ee=this.undoRedoManager.getLastUndoStep();if(!ee||ee.width===Q.width&&ee.height===Q.height){var Se=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Q),Se<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(le){return le(new at(V))})}else this.undoRedoManager.replaceLastUndoStep(Q),this.eventListeners.statechange.forEach(function(le){return le(new at(V))})}},ue.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ue.prototype.undoStep=function(){var V=this,Q=this.undoRedoManager.undo();Q!==void 0&&(this.restoreState(Q),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new at(V))}))},ue.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ue.prototype.redoStep=function(){var V=this,Q=this.undoRedoManager.redo();Q!==void 0&&(this.restoreState(Q),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(ee){return ee(new at(V))}))},ue.prototype.stepZoom=function(){var V=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=V<this.zoomSteps.length-1?this.zoomSteps[V+1]:this.zoomSteps[0]},ue.prototype.panTo=function(V){this.contentDiv.scrollBy({left:this.prevPanPoint.x-V.x,top:this.prevPanPoint.y-V.y}),this.prevPanPoint=V},ue.prototype.startRenderAndClose=function(){return Oe(this,void 0,void 0,function(){var V,Q,ee=this;return Ce(this,function(Se){switch(Se.label){case 0:return[4,this.render()];case 1:return V=Se.sent(),Q=this.getState(),this.eventListeners.render.forEach(function(le){return le(new wt(ee,V,Q))}),this.close(!0),[2]}})})},ue.prototype.getState=function(V){V===!0&&this.setCurrentMarker();var Q={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(ee){return Q.markers.push(ee.getState())}),Q},ue.prototype.restoreState=function(V){var Q=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);V.markers.forEach(function(ee){var Se=Q._availableMarkerTypes.find(function(nt){return nt.typeName===ee.typeName});if(Se!==void 0){var le=Q.addNewMarker(Se);le.restoreState(ee),Q.markers.push(le)}}),V.width&&V.height&&(V.width!==this.imageWidth||V.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/V.width,this.imageHeight/V.height),this.eventListeners.restorestate.forEach(function(ee){return ee(new at(Q))})},ue.prototype.addNewMarker=function(V){var Q=oe.createGroup();return this.markerImage.appendChild(Q),new V(Q,this.overlayContainer,this.settings)},ue.prototype.createNewMarker=function(V){var Q,ee=this;(Q=typeof V=="string"?this._availableMarkerTypes.find(function(Se){return Se.typeName===V}):V)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Q),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(Q.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Se){return Se(new ft(ee,ee._currentMarker))}))},ue.prototype.markerCreated=function(V){var Q=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(V),this.setCurrentMarker(V),V instanceof Ye&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ye):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(ee){return ee(new ft(Q,Q._currentMarker))})},ue.prototype.colorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=V,this.settings.defaultStrokeColor=V)},ue.prototype.fillColorChanged=function(V){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=V)},ue.prototype.markerStateChanged=function(V){var Q=this;this.eventListeners.markerchange.forEach(function(ee){return ee(new ft(Q,V))})},ue.prototype.setCurrentMarker=function(V){var Q=this;this._currentMarker!==V&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(ee){return ee(new ft(Q,Q._currentMarker))})),this._currentMarker=V,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(ee){return ee(new ft(Q,Q._currentMarker))}))},ue.prototype.onPointerDown=function(V){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||V.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Q=this.markers.find(function(ee){return ee.ownsTarget(V.target)});Q!==void 0?(this.setCurrentMarker(Q),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:V.clientX,y:V.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(V.clientX,V.clientY))},ue.prototype.onDblClick=function(V){if(this._isFocused||this.focus(),this.mode==="select"){var Q=this.markers.find(function(ee){return ee.ownsTarget(V.target)});Q!==void 0&&Q!==this._currentMarker&&this.setCurrentMarker(Q),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(V.clientX,V.clientY),V.target):this.setCurrentMarker()}},ue.prototype.onPointerMove=function(V){this.touchPoints!==1&&V.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||V.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(V.clientX,V.clientY)):this.zoomLevel>1&&this.panTo({x:V.clientX,y:V.clientY}))},ue.prototype.onPointerUp=function(V){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(V.clientX,V.clientY)),this.isDragging=!1,this.addUndoStep()},ue.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ue.prototype.onKeyUp=function(V){this._currentMarker===void 0||this.notesArea!==void 0||V.key!=="Delete"&&V.key!=="Backspace"||this.deleteSelectedMarker()},ue.prototype.clientToLocalCoordinates=function(V,Q){var ee=this.markerImage.getBoundingClientRect();return{x:(V-ee.left)/this.zoomLevel,y:(Q-ee.top)/this.zoomLevel}},ue.prototype.onWindowResize=function(){this.positionUI()},ue.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var V=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=V+"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()},ue.prototype.addLicenseKey=function(V){se.addKey(V)},ue.prototype.addEventListener=function(V,Q){this.eventListeners.addEventListener(V,Q)},ue.prototype.removeEventListener=function(V,Q){this.eventListeners.removeEventListener(V,Q)},ue.prototype.renderState=function(V){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(V),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ue.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ue.prototype.focus=function(){var V=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Q){return Q(new at(V))}))},ue.prototype.blur=function(){var V=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Q){return Q(new at(V))}))},ue.instanceCounter=0,ue}();/* **********************************
|
|
|
cropro version 1.2.0
|
|
|
@license SEE LICENSE IN LICENSE
|
|
|
|
|
|
copyright Alan Mendelevich
|
|
|
see README and LICENSE for details
|
|
|
********************************** *//*! *****************************************************************************
|
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
purpose with or without fee is hereby granted.
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
***************************************************************************** */var ze=function(ue,V){return(ze=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Q,ee){Q.__proto__=ee}||function(Q,ee){for(var Se in ee)Object.prototype.hasOwnProperty.call(ee,Se)&&(Q[Se]=ee[Se])})(ue,V)};function yt(ue,V){if(typeof V!="function"&&V!==null)throw new TypeError("Class extends value "+String(V)+" is not a constructor or null");function Q(){this.constructor=ue}ze(ue,V),ue.prototype=V===null?Object.create(V):(Q.prototype=V.prototype,new Q)}function pt(ue,V,Q,ee){return new(Q||(Q=Promise))(function(Se,le){function nt(an){try{Jt(ee.next(an))}catch(Gt){le(Gt)}}function Nt(an){try{Jt(ee.throw(an))}catch(Gt){le(Gt)}}function Jt(an){var Gt;an.done?Se(an.value):(Gt=an.value,Gt instanceof Q?Gt:new Q(function(Dn){Dn(Gt)})).then(nt,Nt)}Jt((ee=ee.apply(ue,V||[])).next())})}function Bt(ue,V){var Q,ee,Se,le,nt={label:0,sent:function(){if(1&Se[0])throw Se[1];return Se[1]},trys:[],ops:[]};return le={next:Nt(0),throw:Nt(1),return:Nt(2)},typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function Nt(Jt){return function(an){return function(Gt){if(Q)throw new TypeError("Generator is already executing.");for(;nt;)try{if(Q=1,ee&&(Se=2&Gt[0]?ee.return:Gt[0]?ee.throw||((Se=ee.return)&&Se.call(ee),0):ee.next)&&!(Se=Se.call(ee,Gt[1])).done)return Se;switch(ee=0,Se&&(Gt=[2&Gt[0],Se.value]),Gt[0]){case 0:case 1:Se=Gt;break;case 4:return nt.label++,{value:Gt[1],done:!1};case 5:nt.label++,ee=Gt[1],Gt=[0];continue;case 7:Gt=nt.ops.pop(),nt.trys.pop();continue;default:if(!(Se=nt.trys,(Se=Se.length>0&&Se[Se.length-1])||Gt[0]!==6&&Gt[0]!==2)){nt=0;continue}if(Gt[0]===3&&(!Se||Gt[1]>Se[0]&&Gt[1]<Se[3])){nt.label=Gt[1];break}if(Gt[0]===6&&nt.label<Se[1]){nt.label=Se[1],Se=Gt;break}if(Se&&nt.label<Se[2]){nt.label=Se[2],nt.ops.push(Gt);break}Se[2]&&nt.ops.pop(),nt.trys.pop();continue}Gt=V.call(ue,nt)}catch(Dn){Gt=[6,Dn],ee=0}finally{Q=Se=0}if(5&Gt[0])throw Gt[1];return{value:Gt[0]?Gt[1]:void 0,done:!0}}([Jt,an])}}}var Ht=function(){function ue(){}return ue.addKey=function(V){ue.key=V},Object.defineProperty(ue,"isLicensed",{get:function(){return!!ue.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ue.key)},enumerable:!1,configurable:!0}),ue}(),lt=function(){function ue(){}return ue.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ue.setAttributes=function(V,Q){for(var ee=0,Se=Q;ee<Se.length;ee++){var le=Se[ee],nt=le[0],Nt=le[1];V.setAttribute(nt,Nt)}},ue.createRect=function(V,Q,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","rect");return Se.setAttribute("width",V.toString()),Se.setAttribute("height",Q.toString()),ee&&ue.setAttributes(Se,ee),Se},ue.createLine=function(V,Q,ee,Se,le){var nt=document.createElementNS("http://www.w3.org/2000/svg","line");return nt.setAttribute("x1",V.toString()),nt.setAttribute("y1",Q.toString()),nt.setAttribute("x2",ee.toString()),nt.setAttribute("y2",Se.toString()),le&&ue.setAttributes(nt,le),nt},ue.createPolygon=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","polygon");return ee.setAttribute("points",V),Q&&ue.setAttributes(ee,Q),ee},ue.createCircle=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","circle");return ee.setAttribute("cx",(V/2).toString()),ee.setAttribute("cy",(V/2).toString()),ee.setAttribute("r",V.toString()),Q&&ue.setAttributes(ee,Q),ee},ue.createEllipse=function(V,Q,ee){var Se=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Se.setAttribute("cx",(V/2).toString()),Se.setAttribute("cy",(Q/2).toString()),Se.setAttribute("rx",(V/2).toString()),Se.setAttribute("ry",(Q/2).toString()),ee&&ue.setAttributes(Se,ee),Se},ue.createGroup=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","g");return V&&ue.setAttributes(Q,V),Q},ue.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ue.createMarker=function(V,Q,ee,Se,le,nt,Nt){var Jt=document.createElementNS("http://www.w3.org/2000/svg","marker");return ue.setAttributes(Jt,[["id",V],["orient",Q],["markerWidth",ee.toString()],["markerHeight",Se.toString()],["refX",le.toString()],["refY",nt.toString()]]),Jt.appendChild(Nt),Jt},ue.createText=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","text");return Q.setAttribute("x","0"),Q.setAttribute("y","0"),V&&ue.setAttributes(Q,V),Q},ue.createTSpan=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","tspan");return ee.textContent=V,Q&&ue.setAttributes(ee,Q),ee},ue.createImage=function(V){var Q=document.createElementNS("http://www.w3.org/2000/svg","image");return V&&ue.setAttributes(Q,V),Q},ue.createPoint=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return ee.x=V,ee.y=Q,ee},ue.createPath=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg","path");return ee.setAttribute("d",V),Q&&ue.setAttributes(ee,Q),ee},ue.createElement=function(V,Q){var ee=document.createElementNS("http://www.w3.org/2000/svg",V);return Q&&ue.setAttributes(ee,Q),ee},ue.getHollowRectanglePath=function(V,Q,ee,Se,le,nt,Nt,Jt){return"M"+V+","+Q+"V"+(Q+Se)+"H"+(V+ee)+"V"+Q+"H"+le+"V"+nt+"H"+(le+Nt)+"V"+(nt+Jt)+"H"+le+"V"+Q+"Z"},ue}(),Lt=function(){function ue(V){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+V+"_"}return Object.defineProperty(ue.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#333333",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarBackgroundActiveColor:"#282828",toolbarColor:"#eeeeee",cropShadeColor:"#ffffff",cropFrameColor:"#ffffff",gripColor:"#333333",gripFillColor:"#cccccc",toolbarHeight:40}},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),ue.prototype.addClass=function(V){return this.styleSheet===void 0&&this.addStyleSheet(),V.name=""+this.classNamePrefix+V.localName,this.classes.push(V),this.styleSheet.sheet.insertRule("."+V.name+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length),V},ue.prototype.addRule=function(V){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(V),this.styleSheet.sheet.insertRule(V.selector+" {"+V.style+"}",this.styleSheet.sheet.cssRules.length)},ue.prototype.addStyleSheet=function(){var V;this.styleSheet=document.createElement("style"),((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).appendChild(this.styleSheet),this.addRule(new Dt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Dt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new Dt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new Mt("_fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new Mt("_fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},ue.prototype.removeStyleSheet=function(){var V;this.styleSheet&&(((V=this.styleSheetRoot)!==null&&V!==void 0?V:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ue}(),Dt=function(ue,V){this.selector=ue,this.style=V},Mt=function(ue,V){this.localName=ue,this.style=V},Wt=function(){function ue(){this.blocks=[],this.display=""}return ue.prototype.addButtonBlock=function(V){V.className=this.blockClassName,V.buttonClassName=this.buttonClassName,V.buttonColorsClassName=this.buttonColorsClassName,V.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(V)},ue.prototype.addElementBlock=function(V){V.className===void 0&&(V.className=this.blockClassName),this.blocks.push(V)},ue.prototype.getUI=function(){var V=document.createElement("div");return V.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,V.style.display=this.display,this.blocks.forEach(function(Q){return V.appendChild(Q.getUI())}),V},ue}(),Yt=function(){function ue(){}return ue.prototype.getUI=function(){var V=document.createElement("div");if(V.className=this.className,this.minWidth!==void 0&&(V.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":V.style.justifyContent="flex-start";break;case"center":V.style.justifyContent="center";break;case"end":V.style.justifyContent="flex-end"}return V.style.whiteSpace="nowrap",V},ue}(),mn=function(ue){function V(){var Q=ue!==null&&ue.apply(this,arguments)||this;return Q.buttons=[],Q}return yt(V,ue),V.prototype.addButton=function(Q){Q.className=this.buttonClassName,Q.colorsClassName=this.buttonColorsClassName,Q.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(Q)},V.prototype.getUI=function(){var Q=ue.prototype.getUI.call(this);return this.buttons.forEach(function(ee){return Q.appendChild(ee.getUI())}),Q},V}(Yt),Qt=function(){function ue(V,Q){this._isActive=!1,this._isHidden=!1,this._icon=V,this.title=Q,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(ue.prototype,"icon",{get:function(){return this._icon},set:function(V){this._icon=V,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isActive",{get:function(){return this._isActive},set:function(V){this._isActive=V,this.adjustClassName()},enumerable:!1,configurable:!0}),ue.prototype.getUI=function(){var V=this;return this.buttonContainer=document.createElement("div"),this.buttonContainer.title=this.title,this.buttonContainer.className=this.className+" "+this.colorsClassName,this.adjustClassName(),this.buttonContainer.innerHTML=this._icon,this.onClick&&this.buttonContainer.addEventListener("click",function(){return V.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},ue.prototype.adjustClassName=function(){this.activeColorsClassName&&(this._isActive&&this.buttonContainer.className.indexOf(this.activeColorsClassName)<0?this.buttonContainer.className+=" "+this.activeColorsClassName:this._isActive||(this.buttonContainer.className=this.buttonContainer.className.replace(this.activeColorsClassName,"")))},ue.prototype.hide=function(){this._isHidden=!0},ue}(),$t=function(ue){function V(){var Q=ue!==null&&ue.apply(this,arguments)||this;return Q.elements=[],Q}return yt(V,ue),V.prototype.addElement=function(Q){this.elements.push(Q)},V.prototype.getUI=function(){var Q=ue.prototype.getUI.call(this);return this.elements.forEach(function(ee){return Q.appendChild(ee)}),Q},V}(Yt),Kn=function(){function ue(V,Q){this.horizontal=V,this.vertical=Q}return Object.defineProperty(ue.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),ue.prototype.getVerticalLength=function(V){return V/this.ratio},ue.prototype.getHorizontalLength=function(V){return V*this.ratio},ue}(),hn=function(){function ue(){}return ue.getIcon=function(V,Q){if(V>0&&Q>0){var ee=new Kn(V,Q),Se=ee.ratio>=1?20:ee.getHorizontalLength(20),le=ee.ratio<1?20:ee.getVerticalLength(20),nt=document.createElementNS("http://www.w3.org/2000/svg","svg");nt.setAttribute("xmlns","http://www.w3.org/2000/svg"),nt.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(nt);var Nt=lt.createDefs();nt.appendChild(Nt);var Jt=lt.createElement("clipPath",[["id","text-bg-clip"]]);Nt.appendChild(Jt);var an=lt.createPath(lt.getHollowRectanglePath((24-Se)/2,(24-le)/2,Se,le,(24-Se)/2+2,(24-le)/2+2,Se-4,le-4));nt.appendChild(an);var Gt=lt.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Gt.appendChild(lt.createTSpan(V+":"+Q)),nt.appendChild(Gt);var Dn=Gt.getBBox();lt.setAttributes(Gt,[["x",((24-Dn.width)/2).toString()],["y",((24-Dn.height)/2-Dn.y).toString()]]);var Xn=lt.createPath(lt.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Dn.width))/2,(24-Math.ceil(Dn.height))/2,Math.ceil(Dn.width),Math.ceil(Dn.height)));return Jt.appendChild(Xn),lt.setAttributes(an,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(nt),nt.outerHTML}return'<svg viewBox="0 0 24 24"><path d="M19 12h-2v3h-3v2h5v-5M7 9h3V7H5v5h2V9m14-6H3a2 2 0 00-2 2v14a2 2 0 002 2h18a2 2 0 002-2V5a2 2 0 00-2-2m0 16H3V5h18v14z"/></svg>'},ue}(),Rn=function(ue){function V(Q,ee,Se){var le=ue.call(this,Q,ee)||this;return le.isDropdownOpen=!1,le.onClick=le.dropdownButtonClicked,le.dropdownButtons=Se,le}return yt(V,ue),V.prototype.setupDropdown=function(){var Q=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(ee){ee.className=Q.className,ee.colorsClassName=Q.colorsClassName,Q.dropdownBlock.appendChild(ee.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},V.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},V.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},V.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},V.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},V.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},V}(Qt),wn=function(){function ue(V,Q){this.GRIP_SIZE=10,this.color=V,this.fillColor=Q,this.visual=lt.createGroup(),this.visual.appendChild(lt.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(lt.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ue.prototype.ownsTarget=function(V){return V===this.visual||V===this.visual.childNodes[0]||V===this.visual.childNodes[1]},ue.prototype.setCenter=function(V,Q){this.visual.childNodes.forEach(function(ee){return lt.setAttributes(ee,[["cx",V.toString()],["cy",Q.toString()]])})},ue}(),Pn=function(){function ue(V,Q,ee,Se){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=V,this.canvasHeight=Q,this.margin=ee,this.container=Se,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(ue.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(V){this._aspectRatio=V,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.gridContainer&<.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(V){this._zoomFactor=V,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),ue.prototype.open=function(){var V=this;this.cropShadeElement=lt.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=lt.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var Q=0;Q<this.numberOfGridLines;Q++)this.horizontalGridLines.push(lt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(lt.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(ee){return V.gridContainer.appendChild(ee)}),this.verticalGridLines.forEach(function(ee){return V.gridContainer.appendChild(ee)}),this.cropRectElement=lt.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new wn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new wn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new wn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new wn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},ue.prototype.setCropRectangle=function(V){this.cropRect=V;var Q=Object.assign({},this.cropRect);this.zoomFactor!==1&&(Q.width=this.cropRect.width*this.zoomFactor,Q.height=this.cropRect.height*this.zoomFactor,Q.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-Q.width/2,Q.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-Q.height/2),lt.setAttributes(this.cropRectElement,[["x",Q.x.toString()],["y",Q.y.toString()],["width",Q.width.toString()],["height",Q.height.toString()]]);var ee=Q.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(le,nt){var Nt=Q.y+ee*(nt+1);lt.setAttributes(le,[["x1",""+Q.x],["y1",""+Nt],["x2",""+(Q.x+Q.width)],["y2",""+Nt]])});var Se=Q.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(le,nt){var Nt=Q.x+Se*(nt+1);lt.setAttributes(le,[["x1",""+Nt],["y1",""+Q.y],["x2",""+Nt],["y2",""+(Q.y+Q.height)]])}),lt.setAttributes(this.cropShadeElement,[["d",lt.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,Q.x,Q.y,Q.width,Q.height)]]),this.topLeftGrip.setCenter(Q.x,Q.y),this.topRightGrip.setCenter(Q.x+Q.width,Q.y),this.bottomLeftGrip.setCenter(Q.x,Q.y+Q.height),this.bottomRightGrip.setCenter(Q.x+Q.width,Q.y+Q.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},ue.prototype.attachEvents=function(){this.container.style.touchAction="none",this.container.addEventListener("pointerdown",this.onPointerDown),this.container.addEventListener("pointermove",this.onPointerMove),this.container.addEventListener("pointerup",this.onPointerUp)},ue.prototype.clientToLocalCoordinates=function(V,Q){var ee=this.container.getBoundingClientRect();return{x:V-ee.left+this.margin,y:Q-ee.top+this.margin}},ue.prototype.onPointerDown=function(V){this.container.setPointerCapture(V.pointerId),this.previousPoint=this.clientToLocalCoordinates(V.clientX,V.clientY),this.cropRectElement===V.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(V.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(V.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(V.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(V.target)&&(this.activeGrip=this.bottomRightGrip)},ue.prototype.onPointerMove=function(V){if(this.isMoving)this.move(this.clientToLocalCoordinates(V.clientX,V.clientY));else if(this.activeGrip){var Q=this.clientToLocalCoordinates(V.clientX,V.clientY);this.resize(Q)}V.preventDefault()},ue.prototype.onPointerUp=function(V){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(V.pointerId)},ue.prototype.move=function(V){var Q=V.x-this.previousPoint.x,ee=V.y-this.previousPoint.y;this.zoomFactor!==1&&(Q=-Q/this.zoomFactor,ee=-ee/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+Q),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+ee),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=V},ue.prototype.resize=function(V){var Q=Object.assign({},this.cropRect),ee=V.x-this.previousPoint.x,Se=V.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:Q.x+ee<this.margin&&(ee=this.margin-Q.x),Q.x+=ee,Q.width=this.cropRect.x+this.cropRect.width-Q.x;break;case this.bottomRightGrip:case this.topRightGrip:Q.width+ee>this.canvasWidth*this.zoomFactor&&(ee=this.canvasWidth*this.zoomFactor-Q.width),Q.width+=ee}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(Q.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(ee),Q.height=this.aspectRatio.getVerticalLength(Q.width)):(Q.y+=Se,Q.height=this.cropRect.y+this.cropRect.height-Q.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?Q.height=this.aspectRatio.getVerticalLength(Q.width):Q.height+=Se}Q.width<10&&(Q.x=this.cropRect.x,Q.width=10),Q.height<10&&(Q.y=this.cropRect.y,Q.height=10),this.previousPoint=V,Q.x>=this.margin&&Q.y>=this.margin&&Q.x-this.margin+Q.width<=this.canvasWidth&&Q.y-this.margin+Q.height<=this.canvasHeight&&(this.cropRect=Q,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},ue.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var V=this.cropRect.x+this.cropRect.width/2,Q=this.cropRect.y+this.cropRect.height/2,ee=this.aspectRatio.getHorizontalLength(this.cropRect.height),Se=this.aspectRatio.getVerticalLength(this.cropRect.width);ee/this.canvasWidth<Se/this.canvasHeight?this.cropRect.width=ee:this.cropRect.height=Se,this.cropRect.width>this.canvasWidth&&(this.cropRect.height/=this.cropRect.width/this.canvasWidth,this.cropRect.width=this.canvasWidth),this.cropRect.height>this.canvasHeight&&(this.cropRect.width/=this.cropRect.height/this.canvasHeight,this.cropRect.height=this.canvasHeight),this.cropRect.x=V-this.cropRect.width/2,this.cropRect.y=Q-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},ue.prototype.getRescaledRect=function(V,Q,ee,Se,le,nt){var Nt=ee/V,Jt=Se/Q;return{x:(le.x-nt)*Nt+nt,y:(le.y-nt)*Jt+nt,width:le.width*Nt,height:le.height*Jt}},ue.prototype.scaleCanvas=function(V,Q){var ee=this.getRescaledRect(this.canvasWidth,this.canvasHeight,V,Q,this.cropRect,this.margin);this.canvasWidth=V,this.canvasHeight=Q,this.onCropChange&&this.onCropChange(ee),this.setCropRectangle(ee)},ue}(),Yn=function(){function ue(V){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=V,this.uiContainer=document.createElement("div"),this.getUI=this.getUI.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.setAngleLabel=this.setAngleLabel.bind(this),this.positionScaleShape=this.positionScaleShape.bind(this)}return Object.defineProperty(ue.prototype,"angle",{get:function(){return this._angle},set:function(V){this._angle=V,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),ue.prototype.getUI=function(){return this.controlContainer=document.createElement("div"),this.controlContainer.title=this.title,this.controlContainer.className=this.className+" "+this.colorsClassName,this.controlContainer.appendChild(this.getVisual()),this.controlContainer.addEventListener("pointerdown",this.onPointerDown),this.controlContainer.addEventListener("pointermove",this.onPointerMove),this.controlContainer.addEventListener("pointerup",this.onPointerUp),this.uiContainer.appendChild(this.controlContainer),this.uiContainer.style.display="inline-block",this.uiContainer.style.touchAction="none",this.setAngleLabel(),this.positionScaleShape(),this.uiContainer},ue.prototype.onPointerDown=function(V){this.controlContainer.setPointerCapture(V.pointerId),this.isDragging=!0,this.previousPoint={x:V.clientX,y:V.clientY}},ue.prototype.onPointerMove=function(V){this.isDragging&&(this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.previousPoint.x=V.clientX)},ue.prototype.onPointerUp=function(V){this.isDragging&&this.onAngleChange&&this.onAngleChange((V.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(V.pointerId)},ue.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var V=this.angleLabelText.getBBox();lt.setAttributes(this.angleLabelElement,[["x",((this.width-V.width)/2).toString()],["y",(this.height/2).toString()]])}},ue.prototype.positionScaleShape=function(){if(this.scaleShape){var V=this.scaleShape.transform.baseVal.getItem(0);V.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(V,0)}},ue.prototype.getVisual=function(){var V=document.createElementNS("http://www.w3.org/2000/svg","svg");V.setAttribute("xmlns","http://www.w3.org/2000/svg"),V.setAttribute("width",this.width+"px"),V.setAttribute("height",this.height+"px"),V.setAttribute("viewBox","0 0 "+this.width+" "+this.height),V.style.flexShrink="0",document.body.appendChild(V);for(var Q="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,ee=1;ee<=this.width/5+10;ee++){var Se=ee%5==0?this.height/3:this.height/6;Q+="h4v"+-Se+"h1v"+Se}Q+="v1H0Z",this.scaleShape=lt.createPath(Q);var le=lt.createTransform();this.scaleShape.transform.baseVal.appendItem(le),V.appendChild(this.scaleShape),this.angleLabelElement=lt.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=lt.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var nt=lt.createTSpan("");return nt.innerHTML="°",this.angleLabelElement.appendChild(nt),V.appendChild(this.angleLabelElement),document.body.removeChild(V),V},ue}(),or=function(){function ue(){this.naturalSize=!1,this.imageType="image/png"}return ue.prototype.rasterize=function(V,Q,ee,Se,le,nt,Nt){var Jt=this;return new Promise(function(an){var Gt=document.createElement("canvas");Gt.width=V.width.baseVal.value-2*Se,Gt.height=V.height.baseVal.value-2*Se;var Dn=1,Xn=1;Jt.naturalSize===!0?(Dn=Q.naturalWidth/(V.width.baseVal.value-2*Se)/nt,Xn=Q.naturalHeight/(V.height.baseVal.value-2*Se)/Nt,Gt.width=Q.naturalWidth/nt,Gt.height=Q.naturalHeight/Nt):Jt.width!==void 0&&Jt.height!==void 0&&(Dn=Jt.width/ee.width,Xn=Jt.height/ee.height,Gt.width*=Dn,Gt.height*=Xn);var sr=Gt.getContext("2d");sr.translate(Gt.width/2,Gt.height/2),sr.rotate(le*Math.PI/180),sr.scale(nt,Nt),sr.translate(-Gt.width/2,-Gt.height/2),sr.drawImage(Q,0,0,Gt.width,Gt.height);var Tr=document.createElement("canvas");Tr.width=ee.width*Dn,Tr.height=ee.height*Xn,Tr.getContext("2d").putImageData(sr.getImageData((ee.x-Se)*Dn,(ee.y-Se)*Xn,ee.width*Dn,ee.height*Xn),0,0),an(Tr.toDataURL(Jt.imageType,Jt.imageQuality))})},ue}(),Xt=function(){function ue(V){this._zoomToCropEnabled=!0,this.zoomFactor=1,this.flippedHorizontally=!1,this.flippedVertically=!1,this._isGridVisible=!0,this._gridLines=2,this._rotationAngle=0,this.scaleFactor=1,this.renderEventListeners=[],this.closeEventListeners=[],this._isOpen=!1,this.CANVAS_MARGIN=20,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.displayMode="inline",this.popupMargin=30,this.toolbarHeight=40,this.aspectRatios=[{horizontal:0,vertical:0},{horizontal:4,vertical:3},{horizontal:3,vertical:2},{horizontal:16,vertical:9},{horizontal:1,vertical:1},{horizontal:3,vertical:4},{horizontal:2,vertical:3},{horizontal:9,vertical:16}],this._instanceNo=ue.instanceCounter++,this.styles=new Lt(this.instanceNo),this.target=V,this.targetRoot=document.body,this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.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.setWindowHeight=this.setWindowHeight.bind(this),this.rotateBy=this.rotateBy.bind(this),this.applyRotation=this.applyRotation.bind(this),this.cropRectChanged=this.cropRectChanged.bind(this),this.zoomToCrop=this.zoomToCrop.bind(this),this.unzoomFromCrop=this.unzoomFromCrop.bind(this),this.rotateLeftButtonClicked=this.rotateLeftButtonClicked.bind(this),this.rotateRightButtonClicked=this.rotateRightButtonClicked.bind(this),this.flipHorizontallyButtonClicked=this.flipHorizontallyButtonClicked.bind(this),this.flipVerticallyButtonClicked=this.flipVerticallyButtonClicked.bind(this),this.applyFlip=this.applyFlip.bind(this),this.startRenderAndClose=this.startRenderAndClose.bind(this),this.render=this.render.bind(this),this.onPopupResize=this.onPopupResize.bind(this),this.applyAspectRatio=this.applyAspectRatio.bind(this)}return Object.defineProperty(ue.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(V){this._zoomToCropEnabled=V,V?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(V){this._isGridVisible=V,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"gridLines",{get:function(){return this._gridLines},set:function(V){this._gridLines=V,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(V){this._rotationAngle=V,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"aspectRatio",{get:function(){var V;return(V=this._aspectRatio)!==null&&V!==void 0?V:this.aspectRatios[0]},set:function(V){this._aspectRatio=V},enumerable:!1,configurable:!0}),ue.prototype.open=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.setupResizeObserver(),this.initCropCanvas(),this.setEditingTarget(),this.setTopLeft(),this.initCropLayer(),this.attachEvents(),this.applyAspectRatio(),this.displayMode==="popup"&&this.onPopupResize(),this._isOpen=!0},ue.prototype.show=function(){this.showUI(),this.open()},ue.prototype.close=function(V){V===void 0&&(V=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),V||this.closeEventListeners.forEach(function(Q){return Q()}),this._isOpen=!1)},ue.prototype.addRenderEventListener=function(V){this.renderEventListeners.push(V)},ue.prototype.removeRenderEventListener=function(V){this.renderEventListeners.indexOf(V)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(V),1)},ue.prototype.addCloseEventListener=function(V){this.closeEventListeners.push(V)},ue.prototype.removeCloseEventListener=function(V){this.closeEventListeners.indexOf(V)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(V),1)},ue.prototype.setupResizeObserver=function(){var V=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){V.resize(V.target.clientWidth,V.target.clientHeight)}),this.targetObserver.observe(this.target)):this.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(this.onPopupResize),this.targetObserver.observe(this.contentDiv)),window.addEventListener("resize",this.setWindowHeight))},ue.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var V=1*this.target.clientWidth/this.target.clientHeight,Q=this.contentDiv.clientWidth/V>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*V:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,ee=Q+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/V;this.resize(Q,ee)}},ue.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ue.prototype.setEditingTargetSize=function(){this.editorCanvas.style.width=this.imageWidth+2*this.CANVAS_MARGIN+"px",this.editorCanvas.style.height=this.imageHeight+2*this.CANVAS_MARGIN+"px",lt.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},ue.prototype.resize=function(V,Q){this.imageWidth=Math.round(V),this.imageHeight=Math.round(Q),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},ue.prototype.setEditingTarget=function(){var V=document.createElement("canvas");V.width=this.target.naturalWidth,V.height=this.target.naturalHeight,V.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var Q=V.toDataURL();lt.setAttributes(this.editingTarget,[["href",Q]]),this.setEditingTargetSize()},ue.prototype.setTopLeft=function(){var V=this.target.getBoundingClientRect(),Q=this.editorCanvas.getBoundingClientRect();this.left=V.left-Q.left-this.CANVAS_MARGIN,this.top=V.top-Q.top-this.CANVAS_MARGIN},ue.prototype.initCropCanvas=function(){this.cropImageHolder=document.createElement("div"),this.cropImageHolder.style.setProperty("touch-action","none"),this.cropImageHolder.style.setProperty("-ms-touch-action","none"),this.cropImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.cropImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImage.style.pointerEvents="auto",this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.cropImageHolder.style.transformOrigin="top left",this.positionCropImage(),this.defs=lt.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=lt.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=lt.createGroup(),this.editingTargetRotationScaleContainer=lt.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var V=lt.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(V);var Q=lt.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(Q),this.editingTargetContainer=lt.createGroup(),this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px)",this.editingTargetContainer.appendChild(this.editingTargetRotationContainer),this.cropImage.appendChild(this.editingTargetContainer),this.cropImageHolder.appendChild(this.cropImage),this.editorCanvas.appendChild(this.cropImageHolder)},ue.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},ue.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=lt.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Pn(this.imageWidth,this.imageHeight,this.CANVAS_MARGIN,this.cropLayerContainer),this.cropLayer.onCropChange=this.cropRectChanged,this.cropLayer.numberOfGridLines=this.gridLines,this.cropLayer.isGridVisible=this.isGridVisible,this.cropLayer.cropShadeColor=this.styles.settings.cropShadeColor,this.cropLayer.cropFrameColor=this.styles.settings.cropFrameColor,this.cropLayer.gripColor=this.styles.settings.gripColor,this.cropLayer.gripFillColor=this.styles.settings.gripFillColor,this.cropLayer.open(),this.cropLayer.setCropRectangle(this.cropRect),this.zoomToCropEnabled&&this.zoomToCrop()},ue.prototype.zoomToCrop=function(){if(this.cropRect){var V=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,Q=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=V+"px "+Q+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-V+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-Q+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},ue.prototype.unzoomFromCrop=function(){this.zoomFactor=1,this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin="center",this.editingTargetContainer.style.transform="translate("+this.CANVAS_MARGIN+"px, "+this.CANVAS_MARGIN+"px) scale(1)",this.cropLayer.zoomFactor=this.zoomFactor)},ue.prototype.cropRectChanged=function(V){this.cropRect=V,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},ue.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},ue.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"},ue.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ue.prototype.showUI=function(){switch(this.addStyles(),this.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.displayMode){case"inline":this.coverDiv.style.position="absolute";var V=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,Q=this.target.offsetTop>V+this.CANVAS_MARGIN?this.target.offsetTop-(V+this.CANVAS_MARGIN):0;this.coverDiv.style.top=Q+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},ue.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},ue.prototype.addTopToolbar=function(){var V=this;this.topToolbar=new Wt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var Q=new mn;Q.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(Q);var ee=[];this.aspectRatios.forEach(function(Xn){var sr=new Qt(hn.getIcon(Xn.horizontal,Xn.vertical),Xn.horizontal===0&&Xn.vertical===0?"FREE":Xn.horizontal+":"+Xn.vertical);sr.onClick=function(){return V.ratioButtonClicked(Xn)},ee.push(sr)}),this.aspectRatioButton=new Rn(hn.getIcon(0,0),"Aspect ratio",ee),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,Q.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Se=new Qt('<svg viewBox="0 0 24 24"><path d="M10 4v4h4V4h-4m6 0v4h4V4h-4m0 6v4h4v-4h-4m0 6v4h4v-4h-4m-2 4v-4h-4v4h4m-6 0v-4H4v4h4m0-6v-4H4v4h4m0-6V4H4v4h4m2 6h4v-4h-4v4M4 2h16a2 2 0 012 2v16a2 2 0 01-2 2H4c-1.08 0-2-.9-2-2V4a2 2 0 012-2z"/></svg>',"Toggle grid");Se.isActive=this.isGridVisible,Se.onClick=function(){V.isGridVisible=!V.isGridVisible,Se.isActive=V.isGridVisible},Q.addButton(Se);var le=new Qt('<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 to selection");if(le.isActive=this.zoomToCropEnabled,le.onClick=function(){V.zoomToCropEnabled=!V.zoomToCropEnabled,le.isActive=V.zoomToCropEnabled},Q.addButton(le),!Ht.isLicensed){var nt=new $t;this.topToolbar.addElementBlock(nt);var Nt=document.createElement("div");Nt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Jt=document.createElement("a");Jt.style.color="currentColor",Jt.href="https://markerjs.com/products/cropro",Jt.target="_blank",Jt.innerHTML='<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M16.326 14.895c0 1.126-.558 1.688-1.673 1.688H9.931c-1.116 0-1.674-.562-1.674-1.688V3.733c0-1.126.558-1.688 1.674-1.688h4.722c1.115 0 1.673.562 1.673 1.688v2.899h-1.957V3.793h-4.124v11.042h4.124v-3.242h1.957v3.302z" fill="currentColor"/><path d="M15.94 7.364a.783.783 0 00-1.065-.304l-11.01 6.126a.783.783 0 00-.303 1.065l4.498 8.085a.783.783 0 001.065.304l11.01-6.126a.783.783 0 00.303-1.065L15.94 7.364zM5.311 14.173l3.737 6.718 9.641-5.364-3.737-6.718-9.641 5.364z" fill="#eef762"/></svg>',Nt.appendChild(Jt),nt.addElement(Nt)}var an=new mn;an.minWidth=3*this.toolbarHeight+"px",an.contentAlign="end",this.topToolbar.addButtonBlock(an);var Gt=new Qt('<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>',"OK");Gt.onClick=this.startRenderAndClose,an.addButton(Gt),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Gt.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Dn=new Qt('<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");Dn.onClick=this.close,an.addButton(Dn),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Dn.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},ue.prototype.addBottomToolbar=function(){var V=this;this.bottomToolbar=new Wt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var Q=new mn;Q.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(Q);var ee=new Qt('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");ee.onClick=this.rotateLeftButtonClicked,Q.addButton(ee);var Se=new Qt('<svg viewBox="0 0 24 24"><path d="M16.89 15.5l1.42 1.39c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.5M13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03m6.93-6.9a7.906 7.906 0 00-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47m-2.36-5.45L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45z"/></svg>',"Rotate right");Se.onClick=this.rotateRightButtonClicked,Q.addButton(Se);var le=new $t;le.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(le),this.straightener=new Yn("Straighten"),this.straightener.className=this.toolbarStraightenerStyleClass.name,this.straightener.colorsClassName=this.styles.settings.toolbarStraightenerColorsClassName?this.styles.settings.toolbarStraightenerColorsClassName:this.toolbarStraightenerStyleColorsClass.name,this.straightener.onAngleChange=function(an){V.rotateBy(an),V.straightener.angle=V.rotationAngle},le.addElement(this.straightener.getUI());var nt=new mn;nt.minWidth=2*this.toolbarHeight+"px",nt.contentAlign="end",this.bottomToolbar.addButtonBlock(nt);var Nt=new Qt('<svg viewBox="0 0 24 24"><path d="M15 21h2v-2h-2m4-10h2V7h-2M3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2m16-2v2h2c0-1.1-.9-2-2-2m-8 20h2V1h-2m8 16h2v-2h-2M15 5h2V3h-2m4 10h2v-2h-2m0 10c1.1 0 2-.9 2-2h-2z"/></svg>',"Flip horizontal");Nt.onClick=this.flipHorizontallyButtonClicked,nt.addButton(Nt);var Jt=new Qt('<svg viewBox="0 0 24 24"><path d="M3 15v2h2v-2m10 4v2h2v-2m2-16H5c-1.1 0-2 .9-2 2v4h2V5h14v4h2V5c0-1.1-.9-2-2-2m2 16h-2v2c1.1 0 2-.9 2-2M1 11v2h22v-2M7 19v2h2v-2m10-4v2h2v-2m-10 4v2h2v-2M3 19c0 1.1.9 2 2 2v-2z"/></svg>',"Flip vertical");Jt.onClick=this.flipVerticallyButtonClicked,nt.addButton(Jt)},ue.prototype.ratioButtonClicked=function(V){this.aspectRatio=V,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},ue.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=hn.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},ue.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Kn(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},ue.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ue.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},ue.prototype.restoreState=function(V){if(V){var Q=this.cropLayer.getRescaledRect(V.width,V.height,this.imageWidth,this.imageHeight,V.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(Q),this.cropRectChanged(Q),this.flippedHorizontally=V.flippedHorizontally,this.flippedVertically=V.flippedVertically,this.applyFlip(),this.rotationAngle=V.rotationAngle,this.applyRotation()}},ue.prototype.clientToLocalCoordinates=function(V,Q){var ee=this.cropImage.getBoundingClientRect();return{x:V-ee.left,y:Q-ee.top}},ue.prototype.onWindowResize=function(){this.positionUI()},ue.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var V=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=V+"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="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)"}this.positionCropImage()},ue.prototype.rotateLeftButtonClicked=function(){var V=this.rotationAngle-90;this.rotationAngle%90!=0&&(V+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(V)},ue.prototype.rotateRightButtonClicked=function(){var V=this.rotationAngle+90;this.rotationAngle%90!=0&&(V-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(V)},ue.prototype.rotateTo=function(V){V=(V=V>180?V-360:V)<=-180?V+360:V,this.rotationAngle=V,this.applyRotation()},ue.prototype.rotateBy=function(V){this.rotateTo((this.rotationAngle+V)%360)},ue.prototype.applyRotation=function(){var V=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var Q=this.editingTargetRotationContainer.transform.baseVal.getItem(0);Q.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(Q,0);var ee=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/ee.width,this.imageHeight/ee.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=V},ue.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},ue.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},ue.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},ue.prototype.startRenderAndClose=function(){return pt(this,void 0,void 0,function(){var V,Q;return Bt(this,function(ee){switch(ee.label){case 0:return[4,this.render()];case 1:return V=ee.sent(),Q=this.getState(),this.renderEventListeners.forEach(function(Se){return Se(V,Q)}),this.close(!0),[2]}})})},ue.prototype.render=function(){return pt(this,void 0,void 0,function(){var V;return Bt(this,function(Q){switch(Q.label){case 0:return(V=new or).naturalSize=this.renderAtNaturalSize,V.imageType=this.renderImageType,V.imageQuality=this.renderImageQuality,V.width=this.renderWidth,V.height=this.renderHeight,this.unzoomFromCrop(),lt.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return Q.sent(),[4,V.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,Q.sent()]}})})},ue.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Mt("toolbar",`
|
|
|
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
overflow: hidden;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new Mt("toolbar_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Mt("toolbar-block",`
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
box-sizing: content-box;
|
|
|
`));var V=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Mt("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.toolbarHeight-2*V)+`px;
|
|
|
height: `+(this.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Mt("toolbar_button_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Mt("toolbar_active_button",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
|
`)),this.styles.addRule(new Dt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new Dt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Mt("toolbar_dropdown",`
|
|
|
position: absolute;
|
|
|
max-width: `+4*this.toolbarHeight+`px;
|
|
|
z-index: 20;
|
|
|
white-space: normal;
|
|
|
box-sizing: content-box;
|
|
|
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
|
|
|
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
|
|
|
line-height: 0px;
|
|
|
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new Mt("toolbar_dropdown_colors",`
|
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Mt("toolbar_straightener_block",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
|
|
|
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new Mt("toolbar_straightener",`
|
|
|
display: flex;
|
|
|
overflow: hidden;
|
|
|
justify-content: center;
|
|
|
height: `+(this.toolbarHeight-2*V)+`px;
|
|
|
padding: `+V+`px;
|
|
|
cursor: default;
|
|
|
user-select: none;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Mt("toolbar_straightener_colors",`
|
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
|
fill: currentColor;
|
|
|
`))},ue.instanceCounter=0,ue}(),xn=x("8hTe"),Er=x.n(xn),nr=/<pre[^>]*>/g;function Ir(ue){var V=document.createElement("div");return V.innerHTML=ue,V.childNodes.length===0?"":V.childNodes[0].nodeValue}var qn=X.a=function(ue){var V=ue.value,Q=V===void 0?"":V,ee=ue.edit,Se=ee===void 0?!1:ee,le=ue.className,nt=ue.showTextOnly,Nt=ue.showLines,Jt=ue.replaces,an=ue.zoomImg,Gt=ue.hasMask,Dn=ue.style,Xn=Dn===void 0?{}:Dn,sr=ue.stylesPrev,Tr=sr===void 0?{}:sr,gr=String(Q),rr=Object(a.useRef)(),xr=Object(a.useRef)(),qi=Object(a.useState)(""),Gr=Object(g.a)(qi,2),ai=Gr[0],da=Gr[1],Fi=Object(a.useState)("office"),ia=Object(g.a)(Fi,2),Ca=ia[0],po=ia[1],so=function(){var wr=new Xt(xr.current);wr.displayMode="popup",wr.addRenderEventListener(function(){var ei=Object(o.a)(d.a.mark(function vr(oi){var ir;return d.a.wrap(function(Mi){for(;;)switch(Mi.prev=Mi.next){case 0:return rr.current.style.display="none",Mi.next=3,Object(we.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:oi}});case 3:ir=Mi.sent,ir!=null&&ir.id&&Jt(xr.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(ir==null?void 0:ir.id,"?type=").concat(ir.content_type));case 5:case"end":return Mi.stop()}},vr)}));return function(vr){return ei.apply(this,arguments)}}()),wr.show()},xo=function(){var wr=new Pe(xr.current);wr.settings.displayMode="popup",wr.addEventListener("render",function(){var ei=Object(o.a)(d.a.mark(function vr(oi){var ir;return d.a.wrap(function(Mi){for(;;)switch(Mi.prev=Mi.next){case 0:if(rr.current.style.display="none",!xr.current){Mi.next=6;break}return Mi.next=4,Object(we.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:oi.dataUrl}});case 4:ir=Mi.sent,ir!=null&&ir.id&&Jt(xr.current.getAttribute("src").replace(J.a.API_SERVER,""),"/api/attachments/".concat(ir==null?void 0:ir.id,"?type=").concat(ir.content_type));case 6:case"end":return Mi.stop()}},vr)}));return function(vr){return ei.apply(this,arguments)}}()),wr.show(),window.markerArea=wr},ka=Object(a.useMemo)(function(){rr.current&&(rr.current.style.zIndex=-1);try{var Fr=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,wr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ei=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;gr=gr.replace(Fr,"("+J.a.API_SERVER+"/api/attachments/").replace(wr,'"'+J.a.API_SERVER+"/api/attachments/").replace(ei,'"'+J.a.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,`
|
|
|
`)}catch(Wi){}var vr=K(gr),oi=k();if(gr.match(/\[TOC\]/)&&(vr=vr.replace("<p>[TOC]</p>",D()),l()),vr=vr.replace(/(__special_katext_id_\d+__)/g,function(Wi,Mi){var $i=oi[Mi],mo=$i.type,Qi=$i.expression;return Object(re.renderToString)(Ir(Qi)||"",{displayMode:mo==="block",throwOnError:!1,output:"html"})}),vr=vr.replace(/▁/g,"\u2581\u2581\u2581"),L(),nt){var ir=document.createElement("div");return ir.innerHTML=vr,ir.innerText}return setTimeout(function(){return Qr()},500),vr},[gr]),Yi=Object(a.useRef)();E.WebkitLineClamp=Nt,Nt&&(Xn=Object(v.a)(Object(v.a)({},Xn),E));function Nr(Fr){var wr=Fr.target;if(wr.tagName.toUpperCase()==="IMG"){if(an){var ei=wr.getAttribute("src");da(ei),po("image")}}else if(wr.tagName.toUpperCase()==="A"){var vr=wr.getAttribute("href");if(vr.indexOf("office")>-1)Fr.preventDefault(),da(vr),po("office");else if(vr.indexOf("application/pdf")>-1)Fr.preventDefault(),da(vr),po("pdf");else if(vr.indexOf("text/html")>-1)Fr.preventDefault(),da(vr),po("html");else if(vr.startsWith("#")){Fr.preventDefault();var oi=document.getElementById(vr.replace("#",""));oi&&oi.scrollIntoView(!0)}}}var Qr=function(){var wr,ei=(wr=Yi.current)===null||wr===void 0?void 0:wr.querySelectorAll("video");ei==null||ei.forEach(function(vr){if(vr.oncontextmenu=function(){return!1},vr.src.indexOf(".m3u8")>-1&&!vr.canPlayType("application/vnd.apple.mpegurl")){if(B.a.isSupported()){var oi=new B.a;oi.loadSource(vr.src),oi.attachMedia(vr)}}})};Object(a.useEffect)(function(){if(Yi.current&&ka&&(ka.match(nr)&&window.PR.prettyPrint()),Yi.current)return Yi.current.addEventListener("click",Nr),function(){Yi.current.removeEventListener("click",Nr),L(),l()}},[ka,Yi.current,Nr]);var yi=function(wr){if(!Se)return;wr.target.nodeName==="IMG"?(rr.current.style.zIndex=1,rr.current.style.display="flex",rr.current.style.width=wr.target.clientWidth+"px",rr.current.style.height=wr.target.clientHeight+"px",rr.current.style.top=wr.target.offsetTop+"px",rr.current.style.left=wr.target.offsetLeft+"px",xr.current.src=wr.target.getAttribute("src")):rr.current.style.display="none"};return n.a.createElement("div",{style:{position:"relative"}},n.a.createElement("div",{ref:Yi,style:Object(v.a)({},Xn),className:"".concat(le||""," markdown-body ").concat(Er.a.mdBody),onMouseOver:yi,dangerouslySetInnerHTML:{__html:ka}}),n.a.createElement("div",{ref:rr,className:Er.a.button},n.a.createElement(_.a,null,n.a.createElement(y.a,{onClick:function(){return so()}},"\u88C1\u526A"),n.a.createElement(y.a,{onClick:function(){return xo()}},"\u7F16\u8F91"))),n.a.createElement("img",{ref:xr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),n.a.createElement(he.a,{close:!0,data:ai,type:ai!=null&&ai.length?Ca:"",style:Object(v.a)({},Tr),onClose:function(){return da("")}}))}},"9OqN":function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.mode.CTR=function(){var _=I.lib.BlockCipherMode.extend(),O=_.Encryptor=_.extend({processBlock:function(y,v){var o=this._cipher,g=o.blockSize,p=this._iv,d=this._counter;p&&(d=this._counter=p.slice(0),this._iv=void 0);var a=d.slice(0);o.encryptBlock(a,0),d[g-1]=d[g-1]+1|0;for(var n=0;n<g;n++)y[v+n]^=a[n]}});return _.Decryptor=O,_}(),I.mode.CTR})},"9VGf":function(U,X,x){"use strict";x.d(X,"a",function(){return O});var I=x("q1tI"),_=x.n(I);function O(y,v){var o=Object(I.useRef)();Object(I.useEffect)(function(){o.current=y}),Object(I.useEffect)(function(){function g(){o.current()}if(v!==null){var p=setInterval(g,v);return function(){return clearInterval(p)}}},[v])}},"9odi":function(U,X,x){U.exports={"action-container":"action-container___UsSFw","eval-btn-group":"eval-btn-group___3FHdc","eval-desc":"eval-desc___2RSnM","btn-run":"btn-run___3Xli0","btn-run-self":"btn-run-self___2DnEi","ghost-link":"ghost-link___21xwP",link:"link___2BUFk"}},"A/g1":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF92lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDMgNzkuMTY0NTI3LCAyMDIwLzEwLzE1LTE3OjQ4OjMyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgeG1wOkNyZWF0ZURhdGU9IjIwMjEtMDctMDJUMTk6Mzg6MjMrMDg6MDAiIHhtcDpNb2RpZnlEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBkYzpmb3JtYXQ9ImltYWdlL3BuZyIgcGhvdG9zaG9wOkNvbG9yTW9kZT0iMyIgcGhvdG9zaG9wOklDQ1Byb2ZpbGU9InNSR0IgSUVDNjE5NjYtMi4xIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOmVkYzRhODM0LTVjNWQtNDQ1My04MDYzLWNkNzcwODQyODg5ZSIgeG1wTU06RG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjQ4MTE0OTVlLTVkMDctZTk0YS1iNWEwLWYxOWJmZmM0NGUyNyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMwNjQyYzA1LTg5MzQtNDdlYy04MTFiLTlkYjdhZGNkYjFiMCI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzA2NDJjMDUtODkzNC00N2VjLTgxMWItOWRiN2FkY2RiMWIwIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjM4OjIzKzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIvPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0ic2F2ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6ZWRjNGE4MzQtNWM1ZC00NDUzLTgwNjMtY2Q3NzA4NDI4ODllIiBzdEV2dDp3aGVuPSIyMDIxLTA3LTAyVDE5OjQxOjQ2KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgMjIuMSAoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5fJkpyAAAGoElEQVRogc2abWxbVxnH/8+59/rdTpx2GW3UNWJJV7Ylaxp3LUFsWgJDiI5R8bK2GppAmsgQLKQthS8IEJ9okibrREf3gX2Y1K2bxAoDtog60RBSVxKnWUO7kpSppXJZK2ja2HFi33vPw4cmpbN9r++1k8Lv2znnf577f+zje95Mhw4dQqUkwljpF7kuv0EdHkm1HklRr6TQq2tn5xcklwhIMnMSQJIJxykTiSce+1am0mer5XacqM7uDJjiqbAuWlvSygrBnmKyxcoIA+tBBAAgAAikjNZ47zCIh8E8mOjYO1aOD3L7DYzXZJurs8qhuzLqFsH22hcbUs6CMudAol8Ic2Dkkb0fuvEj3IinwvobjTOeRP1safOuIPIA/AMpxbsb4z3fc9PVUQLvRY37L/vMDxtT2peCBpU97BywlkD9sXjvbzcfG7jTSYeSCZyK6l9tTCkn75xXHAVcChh4zCDzLy1DfQ+U0tomcDaSO9A8rb0WWN5P3QK+SzCPx471bLdTWSYwFdZfXz/j+e7SG3MHE73SGu+19FE0gTNV+o8aU9pXls+Waw7E4r2fL9ZQkMB4jd5xd1r96fJ7cgeDX944vL8hv74ggdUZccRrLsw4/1fQCpLyYH7tRxKYCutv1M4rK26fKdd8Nn+euJnAySp9w+o5dettt+QSItHV+nb/qsXyzddj1KAXlnmSsuIMgV8v1sCgHxdWcj002QXgh8BCAqdq9B33T2tbltOlBWcEia+NtO86nd/QOtR3EGyxXmHZHXun78jow7tPCgAI6NixpGsbZ1ibj/d2gvkZy55EHpbcDiz8BkK62LRsNotjaX5TvK8NzH0lI5j0aQAQ4z69pjarfGwZTFphab55sCdogntAFCgZhfgLn3xtv19oPnTexuFjaR4ANJV6CWhzGEvNrpQPiYBOt+vVaWu+Nd7bCaDTTUCS9LDwSNQuiT17bM3fGPd4zn1YWSc8kqJO5e9H9P6LAeNvLp9ia755sCcoiftAKLqptoOI6oRXUsiJ+FxIf/MTM9quNRl1/XhN7p7zQWPUQTdb88CNcQ9GWXMQA3XCb5JWSngxYJxtSGtfXCxvuOqZrJ9VN53wpcMfhIxhs8jSb0aT2VLmyxn3edQ52hOnNf5dsfrN86H0x9Nqu8KgqbBxdF5hCdwwfyFkPmFnflO8rw3AL8qy/V9YzCmsl1I1pNTdp6N6t52mMaVu85mkTEb0ly6EzCeaprXfWGmbB3uCTHgOLk9FCqGkmhWcBlBjJ9MkUX1K3TcRzV5qmvYesdOum9G+Weqxmop+Zo65dFsAEydFTvC0E3HQIHVNWnvpvRVGRYu+G+Oenq4kxiIk+ZLIKbjitEO1Lvyr0/SHieD8qtLqQhbG/Qvl9C2OSIqMWvwHasUdWSW6Umojbh/VPNgTlOCCLWElsOB3hO7BL6XLHfCqOaXuYsA466aPR6XnAZQ8qHKB4fWJP4kNV7SrV3ymqwNVAFiTUe85HzLedaKNxfd/h4FvuPdoA9Hvj7ftmhMAkFbZyaxaQH1a3XwurL9tp4kN7fsUQz5fTnxbGH8GFt7DcwpecTuMFmlIaZ+bjOgvF2u7d/gnIWZR+Q1KPowcIIaAhQSarqmH/xE0TpQbb92M9uT7kdz+/HqfDB0EcF/ZRi1ggYFER/cYcMtMOO3jzlmVjXKDrkt5uv9are9ZLJ8L6UcJ+HplVotygVRlYLFwM4GWf2njl/ymq1fqrSgM3J1Sfz5Rnd15ulp/tiGtPV6h0aIwaCDxUPc/F8sfOQdqTKnbrvjMf9fOK7ZLCyv8Jom1s9qvsHANttQw4dhY++6BW+sKFlNJr7E9K6wOZEoT0YU3ogvXm5OSMK5KQ347v7oggZbr3j/+PWwUnoj9jyHCk+OP7p3Kry+6nL33uvazqbD+6+W35RDmrtGOPW8Va7JcjzemtC+frTKWfgJyCQmxI/GZ7x+warfdUKy/rj47UZXdnlHZXHprJWBcFKZsGX1k16t2spI7oqbr3iOTkdzGyz7z8tK5s4eAN4UiHxx5dO94Ka2jLd2Gq95TI/e9tXoqbBytZLJzwAUGdY+273nc6Y294z3p1sRW2ZhSt02Gsg+eDxknyl07FYWRY8I+aZptYx27B0Bw/Bp3faHRcs13EsCWiWpjZ8DEU+Ecxe7IKjVl5GMy8zAJMQSIwbH27rL+7FH2jUzTNfUwgMMAkFiFlf5MrstviA4PU61HIuo1KQRCdkGeJCDJoCQkkkzyOFVF4mOxyv9u8x8opnU6UeBF0wAAAABJRU5ErkJggg=="},AKST:function(U,X,x){},ALsQ:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.mode.CFB=function(){var _=I.lib.BlockCipherMode.extend();_.Encryptor=_.extend({processBlock:function(y,v){var o=this._cipher,g=o.blockSize;O.call(this,y,v,g,o),this._prevBlock=y.slice(v,v+g)}}),_.Decryptor=_.extend({processBlock:function(y,v){var o=this._cipher,g=o.blockSize,p=y.slice(v,v+g);O.call(this,y,v,g,o),this._prevBlock=p}});function O(y,v,o,g){var p,d=this._iv;d?(p=d.slice(0),this._iv=void 0):p=this._prevBlock,g.encryptBlock(p,0);for(var a=0;a<o;a++)y[v+a]^=p[a]}return _}(),I.mode.CFB})},AMnG:function(U,X,x){"use strict";var I=x("miYZ"),_=x("tsqr"),O=x("tJVT"),y=x("q1tI"),v=x.n(y),o=x("nWbc"),g=x.n(o),p=x("Ot1p");X.a=function(d){var a=d.id,n=d.activeDiscussIndex,s=d.onReplyDiscuss,t=Object(y.useState)(""),i=Object(O.a)(t,2),e=i[0],r=i[1];function c(f){r(f)}function u(){if(!e){_.b.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}s(a,e),r("")}return v.a.createElement("div",{key:a,className:"discuss-item-editor",style:{display:n===a?"block":"none",width:"100%"}},v.a.createElement(p.a,{miniToolbar:!0,startInit:n===a,defaultValue:e,id:a,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:c}),v.a.createElement("a",{onClick:u,className:"btn-send"},"\u53D1\u9001"))}},ARon:function(U,X,x){},BU3w:function(U,X,x){"use strict";x.d(X,"a",function(){return o});var I=x("MNnm"),_="rc-util-key";function O(g){if(g.attachTo)return g.attachTo;var p=document.querySelector("head");return p||document.body}function y(g){var p,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(I.a)())return null;var a=document.createElement("style");if((p=d.csp)===null||p===void 0?void 0:p.nonce){var n;a.nonce=(n=d.csp)===null||n===void 0?void 0:n.nonce}a.innerHTML=g;var s=O(d),t=s.firstChild;return d.prepend&&s.prepend?s.prepend(a):d.prepend&&t?s.insertBefore(a,t):s.appendChild(a),a}var v=new Map;function o(g,p){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=O(d);if(!v.has(a)){var n=y("",d),s=n.parentNode;v.set(a,s),s.removeChild(n)}var t=Array.from(v.get(a).children).find(function(u){return u.tagName==="STYLE"&&u[_]===p});if(t){var i,e;if(((i=d.csp)===null||i===void 0?void 0:i.nonce)&&t.nonce!==((e=d.csp)===null||e===void 0?void 0:e.nonce)){var r;t.nonce=(r=d.csp)===null||r===void 0?void 0:r.nonce}return t.innerHTML!==g&&(t.innerHTML=g),t}var c=y(g,d);return c[_]=p,c}},Bd2K:function(U,X,x){(function(I){I(x("VrN/"),x("osHv"))})(function(I){I.defineOption("autoCloseTags",!1,function(d,a,n){if(n!=I.Init&&n&&d.removeKeyMap("autoCloseTags"),!a)return;var s={name:"autoCloseTags"};(typeof a!="object"||a.whenClosing!==!1)&&(s["'/'"]=function(t){return o(t)}),(typeof a!="object"||a.whenOpening!==!1)&&(s["'>'"]=function(t){return y(t)}),d.addKeyMap(s)});var _=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],O=["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 y(d){if(d.getOption("disableInput"))return I.Pass;for(var a=d.listSelections(),n=[],s=d.getOption("autoCloseTags"),t=0;t<a.length;t++){if(!a[t].empty())return I.Pass;var i=a[t].head,e=d.getTokenAt(i),r=I.innerMode(d.getMode(),e.state),c=r.state,u=r.mode.xmlCurrentTag&&r.mode.xmlCurrentTag(c),f=u&&u.name;if(!f)return I.Pass;var m=r.mode.configuration=="html",l=typeof s=="object"&&s.dontCloseTags||m&&_,E=typeof s=="object"&&s.indentTags||m&&O;e.end>i.ch&&(f=f.slice(0,f.length-e.end+i.ch));var b=f.toLowerCase();if(!f||e.type=="string"&&(e.end!=i.ch||!/[\"\']/.test(e.string.charAt(e.string.length-1))||e.string.length==1)||e.type=="tag"&&u.close||e.string.indexOf("/")==i.ch-e.start-1||l&&g(l,b)>-1||p(d,r.mode.xmlCurrentContext&&r.mode.xmlCurrentContext(c)||[],f,i,!0))return I.Pass;var D=typeof s=="object"&&s.emptyTags;if(D&&g(D,f)>-1){n[t]={text:"/>",newPos:I.Pos(i.line,i.ch+2)};continue}var C=E&&g(E,b)>-1;n[t]={indent:C,text:">"+(C?`
|
|
|
|
|
|
`:"")+"</"+f+">",newPos:C?I.Pos(i.line+1,0):I.Pos(i.line,i.ch+1)}}for(var w=typeof s=="object"&&s.dontIndentOnAutoClose,t=a.length-1;t>=0;t--){var S=n[t];d.replaceRange(S.text,a[t].head,a[t].anchor,"+insert");var A=d.listSelections().slice(0);A[t]={head:S.newPos,anchor:S.newPos},d.setSelections(A),!w&&S.indent&&(d.indentLine(S.newPos.line,null,!0),d.indentLine(S.newPos.line+1,null,!0))}}function v(d,a){for(var n=d.listSelections(),s=[],t=a?"/":"</",i=d.getOption("autoCloseTags"),e=typeof i=="object"&&i.dontIndentOnSlash,r=0;r<n.length;r++){if(!n[r].empty())return I.Pass;var c=n[r].head,u=d.getTokenAt(c),f=I.innerMode(d.getMode(),u.state),m=f.state;if(a&&(u.type=="string"||u.string.charAt(0)!="<"||u.start!=c.ch-1))return I.Pass;var l,E=f.mode.name!="xml"&&d.getMode().name=="htmlmixed";if(E&&f.mode.name=="javascript")l=t+"script";else if(E&&f.mode.name=="css")l=t+"style";else{var b=f.mode.xmlCurrentContext&&f.mode.xmlCurrentContext(m);if(!b||b.length&&p(d,b,b[b.length-1],c))return I.Pass;l=t+b[b.length-1]}d.getLine(c.line).charAt(u.end)!=">"&&(l+=">"),s[r]=l}if(d.replaceSelections(s),n=d.listSelections(),!e)for(var r=0;r<n.length;r++)(r==n.length-1||n[r].head.line<n[r+1].head.line)&&d.indentLine(n[r].head.line)}function o(d){return d.getOption("disableInput")?I.Pass:v(d,!0)}I.commands.closeTag=function(d){return v(d)};function g(d,a){if(d.indexOf)return d.indexOf(a);for(var n=0,s=d.length;n<s;++n)if(d[n]==a)return n;return-1}function p(d,a,n,s,t){if(!I.scanForClosingTag)return!1;var i=Math.min(d.lastLine()+1,s.line+500),e=I.scanForClosingTag(d,s,null,i);if(!e||e.tag!=n)return!1;for(var r=t?1:0,c=a.length-1;c>=0&&a[c]==n;c--)++r;s=e.to;for(var c=1;c<r;c++){var u=I.scanForClosingTag(d,s,null,i);if(!u||u.tag!=n)return!1;s=u.to}return!0}})},BdwD:function(U,X,x){"use strict";var I=x("+L6B"),_=x("2/Rp"),O=x("0Owb"),y=x("k1fw"),v=x("q1tI"),o=x.n(v),g=x("FOrL"),p=x.n(g),d=function(n){var s=n.buttonProps,t=s===void 0?{}:s,i=n.styles,e=i===void 0?{}:i,r=n.customText,c=n.ButtonText,u=n.ButtonClick,f=n.Buttonclass,m=n.ButtonTwo;return o.a.createElement("section",{className:"tc animated fadeIn",style:Object(y.a)(Object(y.a)({},{color:"#999",margin:"200px auto"}),e)},o.a.createElement("img",{src:p.a}),o.a.createElement("p",{className:"mt20 font14"},r||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),c&&o.a.createElement(_.a,Object(O.a)({className:f,onClick:u},t),c),m&&m)};X.a=d},BjJ7:function(U,X,x){"use strict";x.d(X,"d",function(){return _}),x.d(X,"c",function(){return O}),x.d(X,"e",function(){return y}),x.d(X,"b",function(){return v}),x.d(X,"a",function(){return g});var I=x("m3rI");function _(p){var d=!0;if(p.length>0){for(var a=0;a<p.length;a++)if(p[a].compile_success==0||!p[a].compile_success){d=!1;break}}else d=!1;return d}function O(p){for(var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=[],n=0;n<p.length;n++){var s=p[n],t=d?"".concat(d,"/").concat(s.name):"".concat(s.name);a.push({title:s.name,isLeaf:!(s.type==="tree"),key:t})}return a}function y(p,d,a){for(var n=0;n<p.length;n++){var s=p[n];if(s.key===d){s.children=a;break}s.children&&y(s.children,d,a)}return p}function v(p,d,a){var n;return function(){var s=this,t=arguments,i=function(){n=null,a||p.apply(s,t)},e=a&&!n;clearTimeout(n),n=setTimeout(i,d),e&&p.apply(s,t)}}var o=!0,g=I.a.API_SERVER},Bwpq:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAaBJREFUWEftmLtKA0EUhr8zaxAVKy0FsRBsxRfxKRRRK219gWBnEkkqfQHxAvoSIhZioYUIloqBoBKyO0dGswpe2F01m0EyxW5xZuf/5p/ZuRyhXVRVVqmNNGFUsAMhauJYJ96K2D7MUz/crjN3JyLqdMQ95rRaKNCasJjhTogntWmwjRaFq5rMt8Q5s0R5slswMayDKrF4KStaHX0kGk/qRR7xQYJrWdLqVEQ0lIdgkkZA8CDLujnd6QmcBBLH+xArC1qZSftBHvV6QEku/wuHZgxmDWgCWxZ7lNTrLPHMDhnMLujYu4icGiiG2Isswt/V/QGQHH9uTCKFHUNQiWg1fgP2R0AxgtSBUgh7BvuyWWYtfwz0Ki/IuWKLFs68AGpjKei+ISiFhPdpwTri0AfxhsKKoidpoPIAcoN4Y7GzPaBvHPBlyNwZWQ8MwUbXJ7VHv73UFSlH6G6XF8aubh2eba7A2/FDkO2I6DDN+pK2TuaFMW3DP63XA0pyzj+HfLoouoyIf1dp75IN3qVj3Kz3KmEV/4Z5p/RcpkO/SOk9A+rl+LLPZpxgAAAAAElFTkSuQmCC"},"C+DQ":function(U,X,x){},CrYA:function(U,X,x){var I=x("MFOe"),_=I.Global;U.exports={name:"sessionStorage",read:y,write:v,each:o,remove:g,clearAll:p};function O(){return _.sessionStorage}function y(d){return O().getItem(d)}function v(d,a){return O().setItem(d,a)}function o(d){for(var a=O().length-1;a>=0;a--){var n=O().key(a);d(y(n),n)}}function g(d){return O().removeItem(d)}function p(){return O().clear()}},DVFL:function(U,X,x){},DlQD:function(U,X,x){(function(I,_){U.exports=_()})(this,function(){"use strict";function I(Ye,Me){for(var Ke=0;Ke<Me.length;Ke++){var ge=Me[Ke];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(Ye,ge.key,ge)}}function _(Ye,Me,Ke){return Me&&I(Ye.prototype,Me),Ke&&I(Ye,Ke),Ye}function O(Ye,Me){if(!Ye)return;if(typeof Ye=="string")return y(Ye,Me);var Ke=Object.prototype.toString.call(Ye).slice(8,-1);if(Ke==="Object"&&Ye.constructor&&(Ke=Ye.constructor.name),Ke==="Map"||Ke==="Set")return Array.from(Ye);if(Ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ke))return y(Ye,Me)}function y(Ye,Me){(Me==null||Me>Ye.length)&&(Me=Ye.length);for(var Ke=0,ge=new Array(Me);Ke<Me;Ke++)ge[Ke]=Ye[Ke];return ge}function v(Ye,Me){var Ke;if(typeof Symbol=="undefined"||Ye[Symbol.iterator]==null){if(Array.isArray(Ye)||(Ke=O(Ye))||Me&&Ye&&typeof Ye.length=="number"){Ke&&(Ye=Ke);var ge=0;return function(){return ge>=Ye.length?{done:!0}:{done:!1,value:Ye[ge++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return Ke=Ye[Symbol.iterator](),Ke.next.bind(Ke)}function o(Ye,Me){return Me={exports:{}},Ye(Me,Me.exports),Me.exports}var g=o(function(Ye){function Me(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function Ke(ge){Ye.exports.defaults=ge}Ye.exports={defaults:Me(),getDefaults:Me,changeDefaults:Ke}}),p=g.defaults,d=g.getDefaults,a=g.changeDefaults,n=/[&<>"']/,s=/[&<>"']/g,t=/[<>"']|&(?!#?\w+;)/,i=/[<>"']|&(?!#?\w+;)/g,e={"&":"&","<":"<",">":">",'"':""","'":"'"},r=function(Me){return e[Me]};function c(Ye,Me){if(Me){if(n.test(Ye))return Ye.replace(s,r)}else if(t.test(Ye))return Ye.replace(i,r);return Ye}var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function f(Ye){return Ye.replace(u,function(Me,Ke){return Ke=Ke.toLowerCase(),Ke==="colon"?":":Ke.charAt(0)==="#"?Ke.charAt(1)==="x"?String.fromCharCode(parseInt(Ke.substring(2),16)):String.fromCharCode(+Ke.substring(1)):""})}var m=/(^|[^\[])\^/g;function l(Ye,Me){Ye=Ye.source||Ye,Me=Me||"";var Ke={replace:function(Ee,ce){return ce=ce.source||ce,ce=ce.replace(m,"$1"),Ye=Ye.replace(Ee,ce),Ke},getRegex:function(){return new RegExp(Ye,Me)}};return Ke}var E=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function D(Ye,Me,Ke){if(Ye){var ge;try{ge=decodeURIComponent(f(Ke)).replace(E,"").toLowerCase()}catch(Ee){return null}if(ge.indexOf("javascript:")===0||ge.indexOf("vbscript:")===0||ge.indexOf("data:")===0)return null}Me&&!b.test(Ke)&&(Ke=R(Me,Ke));try{Ke=encodeURI(Ke).replace(/%25/g,"%")}catch(Ee){return null}return Ke}var C={},w=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function R(Ye,Me){C[" "+Ye]||(w.test(Ye)?C[" "+Ye]=Ye+"/":C[" "+Ye]=G(Ye,"/",!0)),Ye=C[" "+Ye];var Ke=Ye.indexOf(":")===-1;return Me.substring(0,2)==="//"?Ke?Me:Ye.replace(S,"$1")+Me:Me.charAt(0)==="/"?Ke?Me:Ye.replace(A,"$1")+Me:Ye+Me}var k={exec:function(){}};function L(Ye){for(var Me=1,Ke,ge;Me<arguments.length;Me++){Ke=arguments[Me];for(ge in Ke)Object.prototype.hasOwnProperty.call(Ke,ge)&&(Ye[ge]=Ke[ge])}return Ye}function M(Ye,Me){var Ke=Ye.replace(/\|/g,function(ce,je,Qe){for(var te=!1,Je=je;--Je>=0&&Qe[Je]==="\\";)te=!te;return te?"|":" |"}),ge=Ke.split(/ \|/),Ee=0;if(ge.length>Me)ge.splice(Me);else for(;ge.length<Me;)ge.push("");for(;Ee<ge.length;Ee++)ge[Ee]=ge[Ee].trim().replace(/\\\|/g,"|");return ge}function G(Ye,Me,Ke){var ge=Ye.length;if(ge===0)return"";for(var Ee=0;Ee<ge;){var ce=Ye.charAt(ge-Ee-1);if(ce===Me&&!Ke)Ee++;else if(ce!==Me&&Ke)Ee++;else break}return Ye.substr(0,ge-Ee)}function W(Ye,Me){if(Ye.indexOf(Me[1])===-1)return-1;for(var Ke=Ye.length,ge=0,Ee=0;Ee<Ke;Ee++)if(Ye[Ee]==="\\")Ee++;else if(Ye[Ee]===Me[0])ge++;else if(Ye[Ee]===Me[1]&&(ge--,ge<0))return Ee;return-1}function N(Ye){Ye&&Ye.sanitize&&!Ye.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}var K={escape:c,unescape:f,edit:l,cleanUrl:D,resolveUrl:R,noopTest:k,merge:L,splitCells:M,rtrim:G,findClosingBracket:W,checkSanitizeDeprecation:N},F=g.defaults,P=K.rtrim,B=K.splitCells,J=K.escape,re=K.findClosingBracket;function he(Ye,Me,Ke){var ge=Me.href,Ee=Me.title?J(Me.title):null,ce=Ye[1].replace(/\\([\[\]])/g,"$1");return Ye[0].charAt(0)!=="!"?{type:"link",raw:Ke,href:ge,title:Ee,text:ce}:{type:"image",raw:Ke,href:ge,title:Ee,text:J(ce)}}function we(Ye,Me){var Ke=Ye.match(/^(\s+)(?:```)/);if(Ke===null)return Me;var ge=Ke[1];return Me.split(`
|
|
|
`).map(function(Ee){var ce=Ee.match(/^\s+/);if(ce===null)return Ee;var je=ce[0];return je.length>=ge.length?Ee.slice(ge.length):Ee}).join(`
|
|
|
`)}var ke=function(){function Ye(Ke){this.options=Ke||F}var Me=Ye.prototype;return Me.space=function(ge){var Ee=this.rules.block.newline.exec(ge);if(Ee)return Ee[0].length>1?{type:"space",raw:Ee[0]}:{raw:`
|
|
|
`}},Me.code=function(ge,Ee){var ce=this.rules.block.code.exec(ge);if(ce){var je=Ee[Ee.length-1];if(je&&je.type==="paragraph")return{raw:ce[0],text:ce[0].trimRight()};var Qe=ce[0].replace(/^ {4}/gm,"");return{type:"code",raw:ce[0],codeBlockStyle:"indented",text:this.options.pedantic?Qe:P(Qe,`
|
|
|
`)}}},Me.fences=function(ge){var Ee=this.rules.block.fences.exec(ge);if(Ee){var ce=Ee[0],je=we(ce,Ee[3]||"");return{type:"code",raw:ce,lang:Ee[2]?Ee[2].trim():Ee[2],text:je}}},Me.heading=function(ge){var Ee=this.rules.block.heading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[1].length,text:Ee[2]}},Me.nptable=function(ge){var Ee=this.rules.block.nptable.exec(ge);if(Ee){var ce={type:"table",header:B(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[],raw:Ee[0]};if(ce.header.length===ce.align.length){var je=ce.align.length,Qe;for(Qe=0;Qe<je;Qe++)/^ *-+: *$/.test(ce.align[Qe])?ce.align[Qe]="right":/^ *:-+: *$/.test(ce.align[Qe])?ce.align[Qe]="center":/^ *:-+ *$/.test(ce.align[Qe])?ce.align[Qe]="left":ce.align[Qe]=null;for(je=ce.cells.length,Qe=0;Qe<je;Qe++)ce.cells[Qe]=B(ce.cells[Qe],ce.header.length);return ce}}},Me.hr=function(ge){var Ee=this.rules.block.hr.exec(ge);if(Ee)return{type:"hr",raw:Ee[0]}},Me.blockquote=function(ge){var Ee=this.rules.block.blockquote.exec(ge);if(Ee){var ce=Ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Ee[0],text:ce}}},Me.list=function(ge){var Ee=this.rules.block.list.exec(ge);if(Ee){for(var ce=Ee[0],je=Ee[2],Qe=je.length>1,te=je[je.length-1]===")",Je={type:"list",raw:ce,ordered:Qe,start:Qe?+je.slice(0,-1):"",loose:!1,items:[]},ut=Ee[0].match(this.rules.block.item),Be=!1,qe,at,wt,ft,st,Pe,ze,yt=ut.length,pt=0;pt<yt;pt++)qe=ut[pt],ce=qe,at=qe.length,qe=qe.replace(/^ *([*+-]|\d+[.)]) */,""),~qe.indexOf(`
|
|
|
`)&&(at-=qe.length,qe=this.options.pedantic?qe.replace(/^ {1,4}/gm,""):qe.replace(new RegExp("^ {1,"+at+"}","gm"),"")),pt!==yt-1&&(wt=this.rules.block.bullet.exec(ut[pt+1])[0],(Qe?wt.length===1||!te&&wt[wt.length-1]===")":wt.length>1||this.options.smartLists&&wt!==je)&&(ft=ut.slice(pt+1).join(`
|
|
|
`),Je.raw=Je.raw.substring(0,Je.raw.length-ft.length),pt=yt-1)),st=Be||/\n\n(?!\s*$)/.test(qe),pt!==yt-1&&(Be=qe.charAt(qe.length-1)===`
|
|
|
`,st||(st=Be)),st&&(Je.loose=!0),Pe=/^\[[ xX]\] /.test(qe),ze=void 0,Pe&&(ze=qe[1]!==" ",qe=qe.replace(/^\[[ xX]\] +/,"")),Je.items.push({type:"list_item",raw:ce,task:Pe,checked:ze,loose:st,text:qe});return Je}},Me.html=function(ge){var Ee=this.rules.block.html.exec(ge);if(Ee)return{type:this.options.sanitize?"paragraph":"html",raw:Ee[0],pre:!this.options.sanitizer&&(Ee[1]==="pre"||Ee[1]==="script"||Ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ee[0]):J(Ee[0]):Ee[0]}},Me.def=function(ge){var Ee=this.rules.block.def.exec(ge);if(Ee){Ee[3]&&(Ee[3]=Ee[3].substring(1,Ee[3].length-1));var ce=Ee[1].toLowerCase().replace(/\s+/g," ");return{tag:ce,raw:Ee[0],href:Ee[2],title:Ee[3]}}},Me.table=function(ge){var Ee=this.rules.block.table.exec(ge);if(Ee){var ce={type:"table",header:B(Ee[1].replace(/^ *| *\| *$/g,"")),align:Ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Ee[3]?Ee[3].replace(/\n$/,"").split(`
|
|
|
`):[]};if(ce.header.length===ce.align.length){ce.raw=Ee[0];var je=ce.align.length,Qe;for(Qe=0;Qe<je;Qe++)/^ *-+: *$/.test(ce.align[Qe])?ce.align[Qe]="right":/^ *:-+: *$/.test(ce.align[Qe])?ce.align[Qe]="center":/^ *:-+ *$/.test(ce.align[Qe])?ce.align[Qe]="left":ce.align[Qe]=null;for(je=ce.cells.length,Qe=0;Qe<je;Qe++)ce.cells[Qe]=B(ce.cells[Qe].replace(/^ *\| *| *\| *$/g,""),ce.header.length);return ce}}},Me.lheading=function(ge){var Ee=this.rules.block.lheading.exec(ge);if(Ee)return{type:"heading",raw:Ee[0],depth:Ee[2].charAt(0)==="="?1:2,text:Ee[1]}},Me.paragraph=function(ge){var Ee=this.rules.block.paragraph.exec(ge);if(Ee)return{type:"paragraph",raw:Ee[0],text:Ee[1].charAt(Ee[1].length-1)===`
|
|
|
`?Ee[1].slice(0,-1):Ee[1]}},Me.text=function(ge,Ee){var ce=this.rules.block.text.exec(ge);if(ce){var je=Ee[Ee.length-1];return je&&je.type==="text"?{raw:ce[0],text:ce[0]}:{type:"text",raw:ce[0],text:ce[0]}}},Me.escape=function(ge){var Ee=this.rules.inline.escape.exec(ge);if(Ee)return{type:"escape",raw:Ee[0],text:J(Ee[1])}},Me.tag=function(ge,Ee,ce){var je=this.rules.inline.tag.exec(ge);if(je)return!Ee&&/^<a /i.test(je[0])?Ee=!0:Ee&&/^<\/a>/i.test(je[0])&&(Ee=!1),!ce&&/^<(pre|code|kbd|script)(\s|>)/i.test(je[0])?ce=!0:ce&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(je[0])&&(ce=!1),{type:this.options.sanitize?"text":"html",raw:je[0],inLink:Ee,inRawBlock:ce,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):J(je[0]):je[0]}},Me.link=function(ge){var Ee=this.rules.inline.link.exec(ge);if(Ee){var ce=re(Ee[2],"()");if(ce>-1){var je=Ee[0].indexOf("!")===0?5:4,Qe=je+Ee[1].length+ce;Ee[2]=Ee[2].substring(0,ce),Ee[0]=Ee[0].substring(0,Qe).trim(),Ee[3]=""}var te=Ee[2],Je="";if(this.options.pedantic){var ut=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(te);ut?(te=ut[1],Je=ut[3]):Je=""}else Je=Ee[3]?Ee[3].slice(1,-1):"";te=te.trim().replace(/^<([\s\S]*)>$/,"$1");var Be=he(Ee,{href:te&&te.replace(this.rules.inline._escapes,"$1"),title:Je&&Je.replace(this.rules.inline._escapes,"$1")},Ee[0]);return Be}},Me.reflink=function(ge,Ee){var ce;if((ce=this.rules.inline.reflink.exec(ge))||(ce=this.rules.inline.nolink.exec(ge))){var je=(ce[2]||ce[1]).replace(/\s+/g," ");if(je=Ee[je.toLowerCase()],!je||!je.href){var Qe=ce[0].charAt(0);return{type:"text",raw:Qe,text:Qe}}var te=he(ce,je,ce[0]);return te}},Me.strong=function(ge,Ee,ce){ce===void 0&&(ce="");var je=this.rules.inline.strong.start.exec(ge);if(je&&(!je[1]||je[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){Ee=Ee.slice(-1*ge.length);var Qe=je[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Qe.lastIndex=0;for(var te;(je=Qe.exec(Ee))!=null;)if(te=this.rules.inline.strong.middle.exec(Ee.slice(0,je.index+3)),te)return{type:"strong",raw:ge.slice(0,te[0].length),text:ge.slice(2,te[0].length-2)}}},Me.em=function(ge,Ee,ce){ce===void 0&&(ce="");var je=this.rules.inline.em.start.exec(ge);if(je&&(!je[1]||je[1]&&(ce===""||this.rules.inline.punctuation.exec(ce)))){Ee=Ee.slice(-1*ge.length);var Qe=je[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Qe.lastIndex=0;for(var te;(je=Qe.exec(Ee))!=null;)if(te=this.rules.inline.em.middle.exec(Ee.slice(0,je.index+2)),te)return{type:"em",raw:ge.slice(0,te[0].length),text:ge.slice(1,te[0].length-1)}}},Me.codespan=function(ge){var Ee=this.rules.inline.code.exec(ge);if(Ee){var ce=Ee[2].replace(/\n/g," "),je=/[^ ]/.test(ce),Qe=ce.startsWith(" ")&&ce.endsWith(" ");return je&&Qe&&(ce=ce.substring(1,ce.length-1)),ce=J(ce,!0),{type:"codespan",raw:Ee[0],text:ce}}},Me.br=function(ge){var Ee=this.rules.inline.br.exec(ge);if(Ee)return{type:"br",raw:Ee[0]}},Me.del=function(ge){var Ee=this.rules.inline.del.exec(ge);if(Ee)return{type:"del",raw:Ee[0],text:Ee[1]}},Me.autolink=function(ge,Ee){var ce=this.rules.inline.autolink.exec(ge);if(ce){var je,Qe;return ce[2]==="@"?(je=J(this.options.mangle?Ee(ce[1]):ce[1]),Qe="mailto:"+je):(je=J(ce[1]),Qe=je),{type:"link",raw:ce[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Me.url=function(ge,Ee){var ce;if(ce=this.rules.inline.url.exec(ge)){var je,Qe;if(ce[2]==="@")je=J(this.options.mangle?Ee(ce[0]):ce[0]),Qe="mailto:"+je;else{var te;do te=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(te!==ce[0]);je=J(ce[0]),ce[1]==="www."?Qe="http://"+je:Qe=je}return{type:"link",raw:ce[0],text:je,href:Qe,tokens:[{type:"text",raw:je,text:je}]}}},Me.inlineText=function(ge,Ee,ce){var je=this.rules.inline.text.exec(ge);if(je){var Qe;return Ee?Qe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(je[0]):J(je[0]):je[0]:Qe=J(this.options.smartypants?ce(je[0]):je[0]),{type:"text",raw:je[0],text:Qe}}},Ye}(),ne=K.noopTest,Oe=K.edit,Ce=K.merge,fe={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|<![A-Z][\\s\\S]*?>\\n*|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>\\n*|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:ne,table:ne,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};fe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,fe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,fe.def=Oe(fe.def).replace("label",fe._label).replace("title",fe._title).getRegex(),fe.bullet=/(?:[*+-]|\d{1,9}[.)])/,fe.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,fe.item=Oe(fe.item,"gm").replace(/bull/g,fe.bullet).getRegex(),fe.list=Oe(fe.list).replace(/bull/g,fe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+fe.def.source+")").getRegex(),fe._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fe._comment=/<!--(?!-?>)[\s\S]*?-->/,fe.html=Oe(fe.html,"i").replace("comment",fe._comment).replace("tag",fe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fe.paragraph=Oe(fe._paragraph).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.blockquote=Oe(fe.blockquote).replace("paragraph",fe.paragraph).getRegex(),fe.normal=Ce({},fe),fe.gfm=Ce({},fe.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),fe.gfm.nptable=Oe(fe.gfm.nptable).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.gfm.table=Oe(fe.gfm.table).replace("hr",fe.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",fe._tag).getRegex(),fe.pedantic=Ce({},fe.normal,{html:Oe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fe._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:ne,paragraph:Oe(fe.normal._paragraph).replace("hr",fe.hr).replace("heading",` *#{1,6} *[^
|
|
|
]`).replace("lheading",fe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ne,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:ne,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",oe.punctuation=Oe(oe.punctuation).replace(/punctuation/g,oe._punctuation).getRegex(),oe._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",oe._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",oe.em.start=Oe(oe.em.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.middle=Oe(oe.em.middle).replace(/punctuation/g,oe._punctuation).replace(/overlapSkip/g,oe._overlapSkip).getRegex(),oe.em.endAst=Oe(oe.em.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.em.endUnd=Oe(oe.em.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.start=Oe(oe.strong.start).replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.middle=Oe(oe.strong.middle).replace(/punctuation/g,oe._punctuation).replace(/blockSkip/g,oe._blockSkip).getRegex(),oe.strong.endAst=Oe(oe.strong.endAst,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.strong.endUnd=Oe(oe.strong.endUnd,"g").replace(/punctuation/g,oe._punctuation).getRegex(),oe.blockSkip=Oe(oe._blockSkip,"g").getRegex(),oe.overlapSkip=Oe(oe._overlapSkip,"g").getRegex(),oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,oe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,oe.autolink=Oe(oe.autolink).replace("scheme",oe._scheme).replace("email",oe._email).getRegex(),oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,oe.tag=Oe(oe.tag).replace("comment",fe._comment).replace("attribute",oe._attribute).getRegex(),oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,oe._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,oe.link=Oe(oe.link).replace("label",oe._label).replace("href",oe._href).replace("title",oe._title).getRegex(),oe.reflink=Oe(oe.reflink).replace("label",oe._label).getRegex(),oe.reflinkSearch=Oe(oe.reflinkSearch,"g").replace("reflink",oe.reflink).replace("nolink",oe.nolink).getRegex(),oe.normal=Ce({},oe),oe.pedantic=Ce({},oe.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Oe(/^!?\[(label)\]\((.*?)\)/).replace("label",oe._label).getRegex(),reflink:Oe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe._label).getRegex()}),oe.gfm=Ce({},oe.normal,{escape:Oe(oe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*~]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?= {2,}\n|[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/}),oe.gfm.url=Oe(oe.gfm.url,"i").replace("email",oe.gfm._extended_email).getRegex(),oe.breaks=Ce({},oe.gfm,{br:Oe(oe.br).replace("{2,}","*").getRegex(),text:Oe(oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var se={block:fe,inline:oe},be=g.defaults,ie=se.block,de=se.inline;function Fe(Ye){return Ye.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function ae(Ye){var Me="",Ke,ge,Ee=Ye.length;for(Ke=0;Ke<Ee;Ke++)ge=Ye.charCodeAt(Ke),Math.random()>.5&&(ge="x"+ge.toString(16)),Me+="&#"+ge+";";return Me}var Z=function(){function Ye(Ke){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ke||be,this.options.tokenizer=this.options.tokenizer||new ke,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ge={block:ie.normal,inline:de.normal};this.options.pedantic?(ge.block=ie.pedantic,ge.inline=de.pedantic):this.options.gfm&&(ge.block=ie.gfm,this.options.breaks?ge.inline=de.breaks:ge.inline=de.gfm),this.tokenizer.rules=ge}Ye.lex=function(ge,Ee){var ce=new Ye(Ee);return ce.lex(ge)};var Me=Ye.prototype;return Me.lex=function(ge){return ge=ge.replace(/\r\n|\r/g,`
|
|
|
`).replace(/\t/g," "),this.blockTokens(ge,this.tokens,!0),this.inline(this.tokens),this.tokens},Me.blockTokens=function(ge,Ee,ce){Ee===void 0&&(Ee=[]),ce===void 0&&(ce=!0),ge=ge.replace(/^ +$/gm,"");for(var je,Qe,te,Je;ge;){if(je=this.tokenizer.space(ge)){ge=ge.substring(je.raw.length),je.type&&Ee.push(je);continue}if(je=this.tokenizer.code(ge,Ee)){ge=ge.substring(je.raw.length),je.type?Ee.push(je):(Je=Ee[Ee.length-1],Je.raw+=`
|
|
|
`+je.raw,Je.text+=`
|
|
|
`+je.text);continue}if(je=this.tokenizer.fences(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.heading(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.nptable(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.hr(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.blockquote(ge)){ge=ge.substring(je.raw.length),je.tokens=this.blockTokens(je.text,[],ce),Ee.push(je);continue}if(je=this.tokenizer.list(ge)){for(ge=ge.substring(je.raw.length),te=je.items.length,Qe=0;Qe<te;Qe++)je.items[Qe].tokens=this.blockTokens(je.items[Qe].text,[],!1);Ee.push(je);continue}if(je=this.tokenizer.html(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(ce&&(je=this.tokenizer.def(ge))){ge=ge.substring(je.raw.length),this.tokens.links[je.tag]||(this.tokens.links[je.tag]={href:je.href,title:je.title});continue}if(je=this.tokenizer.table(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.lheading(ge)){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(ce&&(je=this.tokenizer.paragraph(ge))){ge=ge.substring(je.raw.length),Ee.push(je);continue}if(je=this.tokenizer.text(ge,Ee)){ge=ge.substring(je.raw.length),je.type?Ee.push(je):(Je=Ee[Ee.length-1],Je.raw+=`
|
|
|
`+je.raw,Je.text+=`
|
|
|
`+je.text);continue}if(ge){var ut="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(ut);break}else throw new Error(ut)}}return Ee},Me.inline=function(ge){var Ee,ce,je,Qe,te,Je,ut=ge.length;for(Ee=0;Ee<ut;Ee++){Je=ge[Ee];switch(Je.type){case"paragraph":case"text":case"heading":{Je.tokens=[],this.inlineTokens(Je.text,Je.tokens);break}case"table":{for(Je.tokens={header:[],cells:[]},Qe=Je.header.length,ce=0;ce<Qe;ce++)Je.tokens.header[ce]=[],this.inlineTokens(Je.header[ce],Je.tokens.header[ce]);for(Qe=Je.cells.length,ce=0;ce<Qe;ce++)for(te=Je.cells[ce],Je.tokens.cells[ce]=[],je=0;je<te.length;je++)Je.tokens.cells[ce][je]=[],this.inlineTokens(te[je],Je.tokens.cells[ce][je]);break}case"blockquote":{this.inline(Je.tokens);break}case"list":{for(Qe=Je.items.length,ce=0;ce<Qe;ce++)this.inline(Je.items[ce].tokens);break}}}return ge},Me.inlineTokens=function(ge,Ee,ce,je,Qe){Ee===void 0&&(Ee=[]),ce===void 0&&(ce=!1),je===void 0&&(je=!1),Qe===void 0&&(Qe="");var te,Je=ge,ut;if(this.tokens.links){var Be=Object.keys(this.tokens.links);if(Be.length>0)for(;(ut=this.tokenizer.rules.inline.reflinkSearch.exec(Je))!=null;)Be.includes(ut[0].slice(ut[0].lastIndexOf("[")+1,-1))&&(Je=Je.slice(0,ut.index)+"["+"a".repeat(ut[0].length-2)+"]"+Je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ut=this.tokenizer.rules.inline.blockSkip.exec(Je))!=null;)Je=Je.slice(0,ut.index)+"["+"a".repeat(ut[0].length-2)+"]"+Je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;ge;){if(te=this.tokenizer.escape(ge)){ge=ge.substring(te.raw.length),Ee.push(te);continue}if(te=this.tokenizer.tag(ge,ce,je)){ge=ge.substring(te.raw.length),ce=te.inLink,je=te.inRawBlock,Ee.push(te);continue}if(te=this.tokenizer.link(ge)){ge=ge.substring(te.raw.length),te.type==="link"&&(te.tokens=this.inlineTokens(te.text,[],!0,je)),Ee.push(te);continue}if(te=this.tokenizer.reflink(ge,this.tokens.links)){ge=ge.substring(te.raw.length),te.type==="link"&&(te.tokens=this.inlineTokens(te.text,[],!0,je)),Ee.push(te);continue}if(te=this.tokenizer.strong(ge,Je,Qe)){ge=ge.substring(te.raw.length),te.tokens=this.inlineTokens(te.text,[],ce,je),Ee.push(te);continue}if(te=this.tokenizer.em(ge,Je,Qe)){ge=ge.substring(te.raw.length),te.tokens=this.inlineTokens(te.text,[],ce,je),Ee.push(te);continue}if(te=this.tokenizer.codespan(ge)){ge=ge.substring(te.raw.length),Ee.push(te);continue}if(te=this.tokenizer.br(ge)){ge=ge.substring(te.raw.length),Ee.push(te);continue}if(te=this.tokenizer.del(ge)){ge=ge.substring(te.raw.length),te.tokens=this.inlineTokens(te.text,[],ce,je),Ee.push(te);continue}if(te=this.tokenizer.autolink(ge,ae)){ge=ge.substring(te.raw.length),Ee.push(te);continue}if(!ce&&(te=this.tokenizer.url(ge,ae))){ge=ge.substring(te.raw.length),Ee.push(te);continue}if(te=this.tokenizer.inlineText(ge,je,Fe)){ge=ge.substring(te.raw.length),Qe=te.raw.slice(-1),Ee.push(te);continue}if(ge){var qe="Infinite loop on byte: "+ge.charCodeAt(0);if(this.options.silent){console.error(qe);break}else throw new Error(qe)}}return Ee},_(Ye,null,[{key:"rules",get:function(){return{block:ie,inline:de}}}]),Ye}(),Y=g.defaults,q=K.cleanUrl,ve=K.escape,pe=function(){function Ye(Ke){this.options=Ke||Y}var Me=Ye.prototype;return Me.code=function(ge,Ee,ce){var je=(Ee||"").match(/\S*/)[0];if(this.options.highlight){var Qe=this.options.highlight(ge,je);Qe!=null&&Qe!==ge&&(ce=!0,ge=Qe)}return je?'<pre><code class="'+this.options.langPrefix+ve(je,!0)+'">'+(ce?ge:ve(ge,!0))+`</code></pre>
|
|
|
`:"<pre><code>"+(ce?ge:ve(ge,!0))+`</code></pre>
|
|
|
`},Me.blockquote=function(ge){return`<blockquote>
|
|
|
`+ge+`</blockquote>
|
|
|
`},Me.html=function(ge){return ge},Me.heading=function(ge,Ee,ce,je){return this.options.headerIds?"<h"+Ee+' id="'+this.options.headerPrefix+je.slug(ce)+'">'+ge+"</h"+Ee+`>
|
|
|
`:"<h"+Ee+">"+ge+"</h"+Ee+`>
|
|
|
`},Me.hr=function(){return this.options.xhtml?`<hr/>
|
|
|
`:`<hr>
|
|
|
`},Me.list=function(ge,Ee,ce){var je=Ee?"ol":"ul",Qe=Ee&&ce!==1?' start="'+ce+'"':"";return"<"+je+Qe+`>
|
|
|
`+ge+"</"+je+`>
|
|
|
`},Me.listitem=function(ge){return"<li>"+ge+`</li>
|
|
|
`},Me.checkbox=function(ge){return"<input "+(ge?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Me.paragraph=function(ge){return"<p>"+ge+`</p>
|
|
|
`},Me.table=function(ge,Ee){return Ee&&(Ee="<tbody>"+Ee+"</tbody>"),`<table>
|
|
|
<thead>
|
|
|
`+ge+`</thead>
|
|
|
`+Ee+`</table>
|
|
|
`},Me.tablerow=function(ge){return`<tr>
|
|
|
`+ge+`</tr>
|
|
|
`},Me.tablecell=function(ge,Ee){var ce=Ee.header?"th":"td",je=Ee.align?"<"+ce+' align="'+Ee.align+'">':"<"+ce+">";return je+ge+"</"+ce+`>
|
|
|
`},Me.strong=function(ge){return"<strong>"+ge+"</strong>"},Me.em=function(ge){return"<em>"+ge+"</em>"},Me.codespan=function(ge){return"<code>"+ge+"</code>"},Me.br=function(){return this.options.xhtml?"<br/>":"<br>"},Me.del=function(ge){return"<del>"+ge+"</del>"},Me.link=function(ge,Ee,ce){if(ge=q(this.options.sanitize,this.options.baseUrl,ge),ge===null)return ce;var je='<a href="'+ve(ge)+'"';return Ee&&(je+=' title="'+Ee+'"'),je+=">"+ce+"</a>",je},Me.image=function(ge,Ee,ce){if(ge=q(this.options.sanitize,this.options.baseUrl,ge),ge===null)return ce;var je='<img src="'+ge+'" alt="'+ce+'"';return Ee&&(je+=' title="'+Ee+'"'),je+=this.options.xhtml?"/>":">",je},Me.text=function(ge){return ge},Ye}(),Te=function(){function Ye(){}var Me=Ye.prototype;return Me.strong=function(ge){return ge},Me.em=function(ge){return ge},Me.codespan=function(ge){return ge},Me.del=function(ge){return ge},Me.html=function(ge){return ge},Me.text=function(ge){return ge},Me.link=function(ge,Ee,ce){return""+ce},Me.image=function(ge,Ee,ce){return""+ce},Me.br=function(){return""},Ye}(),Ne=function(){function Ye(){this.seen={}}var Me=Ye.prototype;return Me.slug=function(ge){var Ee=ge.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Ee)){var ce=Ee;do this.seen[ce]++,Ee=ce+"-"+this.seen[ce];while(this.seen.hasOwnProperty(Ee))}return this.seen[Ee]=0,Ee},Ye}(),me=g.defaults,Ie=K.unescape,_e=function(){function Ye(Ke){this.options=Ke||me,this.options.renderer=this.options.renderer||new pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Te,this.slugger=new Ne}Ye.parse=function(ge,Ee){var ce=new Ye(Ee);return ce.parse(ge)};var Me=Ye.prototype;return Me.parse=function(ge,Ee){Ee===void 0&&(Ee=!0);var ce="",je,Qe,te,Je,ut,Be,qe,at,wt,ft,st,Pe,ze,yt,pt,Bt,Ht,lt,Lt=ge.length;for(je=0;je<Lt;je++){ft=ge[je];switch(ft.type){case"space":continue;case"hr":{ce+=this.renderer.hr();continue}case"heading":{ce+=this.renderer.heading(this.parseInline(ft.tokens),ft.depth,Ie(this.parseInline(ft.tokens,this.textRenderer)),this.slugger);continue}case"code":{ce+=this.renderer.code(ft.text,ft.lang,ft.escaped);continue}case"table":{for(at="",qe="",Je=ft.header.length,Qe=0;Qe<Je;Qe++)qe+=this.renderer.tablecell(this.parseInline(ft.tokens.header[Qe]),{header:!0,align:ft.align[Qe]});for(at+=this.renderer.tablerow(qe),wt="",Je=ft.cells.length,Qe=0;Qe<Je;Qe++){for(Be=ft.tokens.cells[Qe],qe="",ut=Be.length,te=0;te<ut;te++)qe+=this.renderer.tablecell(this.parseInline(Be[te]),{header:!1,align:ft.align[te]});wt+=this.renderer.tablerow(qe)}ce+=this.renderer.table(at,wt);continue}case"blockquote":{wt=this.parse(ft.tokens),ce+=this.renderer.blockquote(wt);continue}case"list":{for(st=ft.ordered,Pe=ft.start,ze=ft.loose,Je=ft.items.length,wt="",Qe=0;Qe<Je;Qe++)pt=ft.items[Qe],Bt=pt.checked,Ht=pt.task,yt="",pt.task&&(lt=this.renderer.checkbox(Bt),ze?pt.tokens.length>0&&pt.tokens[0].type==="text"?(pt.tokens[0].text=lt+" "+pt.tokens[0].text,pt.tokens[0].tokens&&pt.tokens[0].tokens.length>0&&pt.tokens[0].tokens[0].type==="text"&&(pt.tokens[0].tokens[0].text=lt+" "+pt.tokens[0].tokens[0].text)):pt.tokens.unshift({type:"text",text:lt}):yt+=lt),yt+=this.parse(pt.tokens,ze),wt+=this.renderer.listitem(yt,Ht,Bt);ce+=this.renderer.list(wt,st,Pe);continue}case"html":{ce+=this.renderer.html(ft.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(ft.tokens));continue}case"text":{for(wt=ft.tokens?this.parseInline(ft.tokens):ft.text;je+1<Lt&&ge[je+1].type==="text";)ft=ge[++je],wt+=`
|
|
|
`+(ft.tokens?this.parseInline(ft.tokens):ft.text);ce+=Ee?this.renderer.paragraph(wt):wt;continue}default:{var Dt='Token with "'+ft.type+'" type was not found.';if(this.options.silent){console.error(Dt);return}else throw new Error(Dt)}}}return ce},Me.parseInline=function(ge,Ee){Ee=Ee||this.renderer;var ce="",je,Qe,te=ge.length;for(je=0;je<te;je++){Qe=ge[je];switch(Qe.type){case"escape":{ce+=Ee.text(Qe.text);break}case"html":{ce+=Ee.html(Qe.text);break}case"link":{ce+=Ee.link(Qe.href,Qe.title,this.parseInline(Qe.tokens,Ee));break}case"image":{ce+=Ee.image(Qe.href,Qe.title,Qe.text);break}case"strong":{ce+=Ee.strong(this.parseInline(Qe.tokens,Ee));break}case"em":{ce+=Ee.em(this.parseInline(Qe.tokens,Ee));break}case"codespan":{ce+=Ee.codespan(Qe.text);break}case"br":{ce+=Ee.br();break}case"del":{ce+=Ee.del(this.parseInline(Qe.tokens,Ee));break}case"text":{ce+=Ee.text(Qe.text);break}default:{var Je='Token with "'+Qe.type+'" type was not found.';if(this.options.silent){console.error(Je);return}else throw new Error(Je)}}}return ce},Ye}(),Ve=K.merge,tt=K.checkSanitizeDeprecation,Ge=K.escape,Le=g.getDefaults,bt=g.changeDefaults,Re=g.defaults;function Xe(Ye,Me,Ke){if(typeof Ye=="undefined"||Ye===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ye!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ye)+", string expected");if(typeof Me=="function"&&(Ke=Me,Me=null),Me=Ve({},Xe.defaults,Me||{}),tt(Me),Ke){var ge=Me.highlight,Ee;try{Ee=Z.lex(Ye,Me)}catch(te){return Ke(te)}var ce=function(Je){var ut;if(!Je)try{ut=_e.parse(Ee,Me)}catch(Be){Je=Be}return Me.highlight=ge,Je?Ke(Je):Ke(null,ut)};if(!ge||ge.length<3)return ce();if(delete Me.highlight,!Ee.length)return ce();var je=0;Xe.walkTokens(Ee,function(te){te.type==="code"&&(je++,setTimeout(function(){ge(te.text,te.lang,function(Je,ut){if(Je)return ce(Je);ut!=null&&ut!==te.text&&(te.text=ut,te.escaped=!0),je--,je===0&&ce()})},0))}),je===0&&ce();return}try{var Qe=Z.lex(Ye,Me);return Me.walkTokens&&Xe.walkTokens(Qe,Me.walkTokens),_e.parse(Qe,Me)}catch(te){if(te.message+=`
|
|
|
Please report this to https://github.com/markedjs/marked.`,Me.silent)return"<p>An error occurred:</p><pre>"+Ge(te.message+"",!0)+"</pre>";throw te}}Xe.options=Xe.setOptions=function(Ye){return Ve(Xe.defaults,Ye),bt(Xe.defaults),Xe},Xe.getDefaults=Le,Xe.defaults=Re,Xe.use=function(Ye){var Me=Ve({},Ye);if(Ye.renderer&&function(){var ge=Xe.defaults.renderer||new pe,Ee=function(Qe){var te=ge[Qe];ge[Qe]=function(){for(var Je=arguments.length,ut=new Array(Je),Be=0;Be<Je;Be++)ut[Be]=arguments[Be];var qe=Ye.renderer[Qe].apply(ge,ut);return qe===!1&&(qe=te.apply(ge,ut)),qe}};for(var ce in Ye.renderer)Ee(ce);Me.renderer=ge}(),Ye.tokenizer&&function(){var ge=Xe.defaults.tokenizer||new ke,Ee=function(Qe){var te=ge[Qe];ge[Qe]=function(){for(var Je=arguments.length,ut=new Array(Je),Be=0;Be<Je;Be++)ut[Be]=arguments[Be];var qe=Ye.tokenizer[Qe].apply(ge,ut);return qe===!1&&(qe=te.apply(ge,ut)),qe}};for(var ce in Ye.tokenizer)Ee(ce);Me.tokenizer=ge}(),Ye.walkTokens){var Ke=Xe.defaults.walkTokens;Me.walkTokens=function(ge){Ye.walkTokens(ge),Ke&&Ke(ge)}}Xe.setOptions(Me)},Xe.walkTokens=function(Ye,Me){for(var Ke=v(Ye),ge;!(ge=Ke()).done;){var Ee=ge.value;Me(Ee);switch(Ee.type){case"table":{for(var ce=v(Ee.tokens.header),je;!(je=ce()).done;){var Qe=je.value;Xe.walkTokens(Qe,Me)}for(var te=v(Ee.tokens.cells),Je;!(Je=te()).done;)for(var ut=Je.value,Be=v(ut),qe;!(qe=Be()).done;){var at=qe.value;Xe.walkTokens(at,Me)}break}case"list":{Xe.walkTokens(Ee.items,Me);break}default:Ee.tokens&&Xe.walkTokens(Ee.tokens,Me)}}},Xe.Parser=_e,Xe.parser=_e.parse,Xe.Renderer=pe,Xe.TextRenderer=Te,Xe.Lexer=Z,Xe.lexer=Z.lex,Xe.Tokenizer=ke,Xe.Slugger=Ne,Xe.parse=Xe;var et=Xe;return et})},"DlR+":function(U,X,x){var I=x("MFOe"),_=I.Global,O=I.trim;U.exports={name:"cookieStorage",read:v,write:g,each:o,remove:p,clearAll:d};var y=_.document;function v(n){if(!n||!a(n))return null;var s="(?:^|.*;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(y.cookie.replace(new RegExp(s),"$1"))}function o(n){for(var s=y.cookie.split(/; ?/g),t=s.length-1;t>=0;t--){if(!O(s[t]))continue;var i=s[t].split("="),e=unescape(i[0]),r=unescape(i[1]);n(r,e)}}function g(n,s){if(!n)return;y.cookie=escape(n)+"="+escape(s)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/"}function p(n){if(!n||!a(n))return;y.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/"}function d(){o(function(n,s){p(s)})}function a(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(y.cookie)}},Dqnf:function(U,X,x){"use strict";var I=x("k1fw"),_=x("tJVT"),O=x("rAM+"),y=x("q1tI"),v=x.n(y),o=x("J66h"),g=x.n(o),p=x("/POA"),d=x.n(p),a=x("q7KB"),n=x.n(a),s=x("ER/M"),t=x.n(s),i=x("dhSg"),e=x("bdgK");function r(f,m,l){var E=l._core._renderService.dimensions.actualCellWidth||9.5,b=l._core._renderService.dimensions.actualCellHeight||18,D=Math.floor(m/b),C=Math.floor(f/E);return[C,D]}function c(f,m){var l=new e.default(function(E){var b=Object(O.a)(E),D;try{for(b.s();!(D=b.n()).done;){var C=D.value;if(C.target.offsetHeight>0||C.target.offsetWidth>0){var w=r(C.target.offsetWidth,C.target.offsetHeight,f),S=Object(_.a)(w,2),A=S[0],R=S[1];console.log("cols, rows",A,R),i.a.publish("ssh-xterm-resize",{columns:A,rows:R,width:C.target.offsetWidth,height:C.target.offsetHeight}),f.resize(A,R);var k=o.Base64.decode("IA=="),L=o.Base64.decode("CBtbSw==");f.write(k),f.write(L)}}}catch(M){b.e(M)}finally{b.f()}});return l.observe(m),l}var u=3e4;X.a=function(f){var m=f.sshConfigData,l=f.sid,E=Object(y.useState)(null),b=Object(_.a)(E,2),D=b[0],C=b[1],w=m.link_url,S=m.password,A=m.port,R=Object(y.useRef)(),k=Object(y.useRef)(),L=Object(y.useRef)(!1);return Object(y.useEffect)(function(){if(R.current&&w){var M=new p.Terminal({fontSize:16,rendererType:"dom"});M.open(R.current),M.onData(function(W){k.current&&(k.current.readyState===1&&(k.current.send(JSON.stringify({tp:"client",data:W})),i.a.publish("on-operating-ssh")))}),M.write("Connecting..."),C(M);var G=c(M,R.current);return function(){M.dispose(),G.unobserve(R.current)}}},[w,R.current]),Object(y.useEffect)(function(){if(D&&w){function M(){var P=new WebSocket(w);k.current=P,P.onopen=function(){var B=D.element.parentElement;if(B){var J=B.offsetWidth,re=B.offsetHeight;console.log("init",{tp:"init",data:Object(I.a)(Object(I.a)({},m),{},{secret:S,width:J,height:re,rows:D.rows,columns:D.cols})}),P.send(JSON.stringify({tp:"init",data:Object(I.a)(Object(I.a)({},m),{},{secret:S,width:J,height:re,rows:D.rows,columns:D.cols})}))}D.focus()},P.onerror=function(B){console.log("------in socket error----",B,P,w)},P.onmessage=function(B){L.current||(D.write("\r"),setTimeout(function(){},1e3)),L.current=!0,console.log("event:",B);var J=o.Base64.decode(B.data.toString()),re=D._core._renderService.dimensions.actualCellWidth||9.5;console.log("data:",J,re,D),D.write(J)},P.onclose=function(B){G&&clearInterval(G),D.write(`\r
|
|
|
connection closed`)}}var G=setInterval(function(){k.current&&k.current.send(JSON.stringify({tp:"h"}))},u),W=i.a.subscribe("create-socket",function(P){l==P&&(k.current&&k.current.readyState===1?D.focus():M(),D.focus())}),N=i.a.subscribe("close-socket",function(P){l===P&&(k.current&&(k.current.close(),L.current=!1,D.clear()),k.current=null)}),K=i.a.subscribe("ssh-xterm-resize",function(P){k.current&&k.current.readyState===1&&k.current.send(JSON.stringify({tp:"resize",data:Object(I.a)({},P)}))}),F=i.a.subscribe("ssh-add-connect-time",function(){k.current&&k.current.readyState===1&&k.current.send(JSON.stringify({tp:"overtime"}))});return function(){N(),W(),K(),F(),k.current&&(k.current.close(),L.current=!1)}}},[D,w,A]),v.a.createElement("div",{ref:R,className:t.a["xterm-panel"]},w?null:v.a.createElement("p",{style:{color:"#fff"}},"\u6B63\u5728\u8FDE\u63A5\u547D\u4EE4\u884C\u670D\u52A1..."))}},E4JC:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("ETIr"),x("cv67"),x("K3mO"),x("OLod"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.StreamCipher,v=_.algo,o=[],g=[],p=[],d=v.Rabbit=y.extend({_doReset:function(){for(var n=this._key.words,s=this.cfg.iv,t=0;t<4;t++)n[t]=(n[t]<<8|n[t]>>>24)&16711935|(n[t]<<24|n[t]>>>8)&4278255360;var i=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],e=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var t=0;t<4;t++)a.call(this);for(var t=0;t<8;t++)e[t]^=i[t+4&7];if(s){var r=s.words,c=r[0],u=r[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,m=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,l=f>>>16|m&4294901760,E=m<<16|f&65535;e[0]^=f,e[1]^=l,e[2]^=m,e[3]^=E,e[4]^=f,e[5]^=l,e[6]^=m,e[7]^=E;for(var t=0;t<4;t++)a.call(this)}},_doProcessBlock:function(n,s){var t=this._X;a.call(this),o[0]=t[0]^t[5]>>>16^t[3]<<16,o[1]=t[2]^t[7]>>>16^t[5]<<16,o[2]=t[4]^t[1]>>>16^t[7]<<16,o[3]=t[6]^t[3]>>>16^t[1]<<16;for(var i=0;i<4;i++)o[i]=(o[i]<<8|o[i]>>>24)&16711935|(o[i]<<24|o[i]>>>8)&4278255360,n[s+i]^=o[i]},blockSize:128/32,ivSize:64/32});function a(){for(var n=this._X,s=this._C,t=0;t<8;t++)g[t]=s[t];s[0]=s[0]+1295307597+this._b|0,s[1]=s[1]+3545052371+(s[0]>>>0<g[0]>>>0?1:0)|0,s[2]=s[2]+886263092+(s[1]>>>0<g[1]>>>0?1:0)|0,s[3]=s[3]+1295307597+(s[2]>>>0<g[2]>>>0?1:0)|0,s[4]=s[4]+3545052371+(s[3]>>>0<g[3]>>>0?1:0)|0,s[5]=s[5]+886263092+(s[4]>>>0<g[4]>>>0?1:0)|0,s[6]=s[6]+1295307597+(s[5]>>>0<g[5]>>>0?1:0)|0,s[7]=s[7]+3545052371+(s[6]>>>0<g[6]>>>0?1:0)|0,this._b=s[7]>>>0<g[7]>>>0?1:0;for(var t=0;t<8;t++){var i=n[t]+s[t],e=i&65535,r=i>>>16,c=((e*e>>>17)+e*r>>>15)+r*r,u=((i&4294901760)*i|0)+((i&65535)*i|0);p[t]=c^u}n[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,n[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,n[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,n[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,n[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,n[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,n[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,n[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}_.Rabbit=y._createHelper(d)}(),I.Rabbit})},E7E6:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADUCAYAAADZTGx+AAAgAElEQVR4Xu2dC3BU13nHv7MrIQkQQoCEtAIEAmxig4GACxhogpM6NY7jOKZO4nimwcFot23SNNNO02napJN0JjN9TNMm5eG3x4+YSeI3ftUGjCDGQMBgG4wxb+0u4mEeQhJI2tP539WR7i77uPfuvXfvar8zs7Mr7bnn8Z3vt9/5zlMQB5aAQQmsW7fO397eHujp6Rkfi8XGExFeDX2vABHVSSlrhBDDiKhdSnlOCBGWUu4mol1lZWWv3nfffccNZueJaMITpeBCeEICjz/++LCOjo5GIpogpWwUQjT2vU/A/wCClNJvtbBCCCml3CaEeGzChAmPLF269LLVtNx6jgFxS9IeyOehhx6q7OnpmSilnEhE2gsA4L0PhjHZillRUUHl5WUUf6+giopyKi+Pv8rKyrSX3++nnp4e7XXpUgedP3+ezp37lE6ebKPe3l4tCyFEhIj+UwjxaHNz8+ls+ebrewYkX5J3IN9169YNv3DhwsRYLIbXJAWBDoZRmbKFYkPRhw4dqgEwdCgAwOfyPiDKyefzWS454Dh58iQdPPiJBk0fKN1E9KyU8gehUKjVcuIOPciAOCRYJ5J95JFHyq9cuaJZACHEJCklIOgHQUqZ0QIAACg/FB+//niPwxD/H3793QqwJkePHqW2tjaSUsKinCOibwWDwfVulcFIPgyIESm5FGfDhg0lBw8ehOM7qbe3dxIggCXAe58VgBOcts0AgP6XfwCACho2bBgNGTLEpZoYz6arq4vee2+PBooQosvv999y//33bzaegrMxGRBn5ZuQOpR77dq1dVB4BQCsQB8AgGB8JicY3RsAgNewYQO//EOHDnPdAtgttr1736cjR44g2VPl5eXXLF++HBYl74EBsbkJHnnkkZFQ/p6eHk3xdd2gpj6nuDxTlvAB8GufDAH+h+8Ga0A365133qHTp8/AkvwiGAx+3wt1ZUBMtsL69evLTpw4gZEfKH+THoC+z9WZkkQ3RwEQ7wLFf/2VY5yLE2yyKp6LfuHCBdq06W0A0j1kyJCG++6771S+C8mAJLUAukEPP/xw/ZUrVyb5/f4m+AAAgYia+iwCJsTSDuUMOMJD+7tB8e5Q3A/A9xzSS2DHjh0UiUQxWvY3zc3N/5VvWRUlIE888cSI9vZ2TfH7+v8AAD5A1m6QEKLPEcbIT/yl/AG8e9ERzreSmck/Go3S9u078MjOUCg018yzTsQdlIBgNOjw4cMTYAWSfv2VFcg4HBrvBsWdYLzHQYh3hWAJAAkHZyQQi8Xo1Vdfw4RirLKysvree++94ExOxlIt2JZes2bNmL5hUK37owehb6lE2r6M6gYpRxjKz90gYwpjNhac766uy9TRcYk6O7u09+7uborFpDYBWVVVRaNHj06YgNyyZSudPXsWP0S3BIPBN8zmaWd8zwICZzgSiUzs7e3VlL8PANUNwt+VRkaDBrpAcR8Af7s5IWZnY3k1LcxldHZ2UkdHh/bCZywxUf8DJNkGLhobJ9DUqVM1H+2DDz6kQ4cO4ZEfhUKhf81nvT0DyNq1a2+MxWJfIaIFRDSNiAKZJsVKS0v7h0KVBdDPChfzaJDdCnX5MixAJ3V2dmiK39UVB0DBgG5RuqB8tsrKSs1a4F11UzFq1draSqdPx5di4f9z5syhixcvaJOHRPRgKBS63+76mEkv74A8+OCDs7u7u39JRDfpC64mxdTSiEQIKtgZNtPKWeJeuXKlX/HjVgDW4FIfFJ39CwzTJQPFhuKPGDFCe1efhw8frv0v248VZtFbWlq02XRYkGuvvYY+/HAfulhvBIPBW2ysqumk8grImjVrvheLxf6DiEpgEcaPH081NWMIgmVn2HRbpn0AAMS7O3ErgPdLl+ATxLtFaoVtugQwQakUX1kCtJH6nA0AIzVBN2zTpk20f/9+gi7ATxFC7A8Gg58x8rxTcfIGyOrVq38gpQQcNG7cOLrhhhk8R2CxlaFMeuUf8AXiXaJsAMAnS7YA+r9LSkoslsz8Y6+++qpacoKHw6FQCBuy8hbyAsgDDzywuLe3dwPWHV133XU0eTIGojikkwD2Vaj+frIVwP/xfaaAYet0FgBdIPxieyXA4X/yySeVBTkfDAZH5rNsrgMCx3vNmjXvSSlnTJzYSDNmzMhn/T2RN37hVd9fdYGUD4D/w0IYAUD1+fUwAIBCm7zcunUr7dmjOek9oVAor/S6DsiaNWtui8ViL6HRliz5fME1nhWiAIDq7ytfYGA49BLBR8gU8Auv+vypukKDbREjRrZefPFF+CAyGAxa36FlpbGSnnEdkFWrVj1ARCumTZtGU6dOsaEK+U8Cw5z6ro8aDlXWAMOkmQL6+AoA/UiQsgQYsCimgB+Mhx9+uDgBWb169T4p5bTPfe6PtSHAQggAAL/8A5Nh8dEf9Tf6zZkChi4zWQAMZXNIlMDq1auLE5BVq1ZhM/KIW2/9U3JzdCSTAmKIMXkYVO8DGAEAs/T6OQC9H4DvOJiTAABBCIVCrvdy9CV1PfNVq1Zp6w5uv/3L5iSWQ+z4eiCsAxr41U+cGe7S9kWnCxjnzwQArAMHeyXAgNgMCIY6sXRBr/jKB4B1yAQAlkPoAUh2hAEAr+C1F4BsqTEgNgCC0aFjx47RsWPHNTjSBSg3+vnpukAAwI7Z4GyNzt8blwADkiMgODZm7969mu+AAEcYy6bVKFDyaBADYFw5vRCTAckBkMOHD9P773+gtWNtbS199rOfpQkTJrAV8IJm21QGBsQiIJhE+sMfdmnNcP3119PChQsZDJuU0kvJMCAWAMFI1IYNG7W1RwsWLKCZM2d6qU25LDZKgAGxAMiePXu14yrHjh1Ld955p43NwUl5TQIMiElA1GZ+vC9btkxzyDkMXgkwICYBuXjxIm3cuImtx+BlIqFmDIhJQM6cOUNbt/5e8zvgf3AY3BJgQEwCgnsl3n13Ozvng5uL/toxICYBiUZP0vbt22nRokU0ffr0IlGT4q0mA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtSkeKMwIAxI8Wq/gZozIAyIATUp3igMCANSvNpvoOYMCANiQE2KNwoDwoAUr/YbqDkDwoAYUJPijcKAMCDFq/0Gas6AMCAG1KR4ozAgDEjxar+BmjMgDIgBNSneKAwIA1K82m+g5gwIA2JATYo3CgPCgBSv9huoOQPCgBhQk+KNwoAwIMWr/QZqzoAwIAbUpHijMCAMSPFqv4GaMyAMiAE1Kd4oDAgDUrzab6DmDAgDYkBNijcKA8KAFK/2G6g5A8KAGFCT4o3CgDAgxav9BmrOgDAgBtTEu1FwrXZ3d7f2unLlivaO/6nbhHMtOQPCgOSqQ44/j8uKlPInw4Br8NKF6upqqqmpyal8DAgDkpMC2fUwFF0pv94a4DPuobcScC99U1OTdjW31cCAMCBWdcf0c+kAwP9hJZwIjY2NVFZWZjlpBoQBsaw8yQ+m8geUNYCFwPduBlgOWBBYEquBAWFATOmOVX/AVCY2RPb5fFRfX0/Dhg3LKTUGhAG5SoGc8Ady0tIMD8M6lJSUUGlpKQ0ZMqT/HaNYuVgOlSUDUqSA5MMfsAoJrAEgUAAABj0QVtM18hwDMkgB8Zo/kE0Z4S8oxU8GAHDkKzAgBQxIofgDSrlVV0j/669gyGUo1kl4GBCPA1Lo/oDeGtjhEzgJQ6q0GRCPAdLR0UHnz5/vnzl2an7AqqLl0x+wWuZcnmNAPATIxYsXKRqNuj5fkKxAgCCdQ5xPfyAXRbf6LAPiIUCOHDmiWQ43QiH6A27IJTkPBsRDgHzyySeW1x0lN2yq+YFC9wcYEBclsGrVKm3dw+0eAiQSiRC6WUYDIEg1IqS6R0bT4XjpJcAWxEOAYNVqa2srdXV19bcY+wP5xZcB8RAgShXgh2CiD36CV+cH8qu27uXOgHgQEPean3PKJgEGhAHJpiNF/T0DwoAUNQDZKs+AMCDZdKSov2dAGJCiBiBb5RkQBiSbjhT19wwIA1LUAGSrPAPCgGTTkaL+ngFhQIoagGyVZ0AYkGw6UlDfY/8MViHYtQKBAWFACgoAVVh13haW5ehf6hRGHBaHY3+wcDOXwIAwILnoj6PPqj336lxePQhGDqHDSudJkyblVEYGhAHJSYHseBj77pMtAf7OdDC10Xz56FGjkkqK58X9IBarUhCP4Rc/FQROnssLwcCCwJJYDWxB2IJY1Z2UzyVbA/1J7bZmZCCx4cOHUyAQMBAzfRQGhAExrUDKGqRylPN9Cgt2WcIxBxyjRo3K+fhRBoQBSQsIRoTS+QZGnGTT5Jl4AMO4ACH5lUt3KlX2DAgDchUEyjJYvbjGhJ5njKrfc68HARDYNc+RrawMSJEAAmVP1SVSd/plUxQnv9dbA3UIhQLCyXyNpM2ADDJAsk2gGVEKJ+KoY4hSdYvcsgZW6sWAFCAg+gk0vY/gBWugTmFJ5Rvw2bxWEI0/Y/2OLIt5FsI8iH6IVA+CHRNoFsUWb6y+S2sUBPpu0WA7mpQtiMcsCA6uVodX53vIFNYg2SdQUBSiNbDyo8CAeAiQc+fOUVtbm5V2zOkZdXtTcrdosFkDK0JiQDwEyOHDh7WRJieCmkBL1S2CpeCQWgIMiIcAsePwarcm0IoFKAbEQ4Cge4VuVraQbgIN1oGtQTbpmfueAfEQIFi+gQt02tvb+3fFubGcwpzKFFdsBsRDgCjVAyh4sTXIP4wMiAcByb9acAmUBBgQBoRpyCABBoQBYUAYkKslUAhLTVhz8y8BtiBsQfKvhR4uAQPCgHhYPZ0tGhaAYlj91KlT2vo3vDo6OrTVDGpFg9o0JoTYRkQHhRAfE9GOIUOGbFm+fHn2SSubqsCreW0SJCeTWQKAACsWDh06RGfOnNGG0y2GGBG9J4T4HRE9EwwGAY5jgQFxTLScMCSA24N37NhBuGrbiSCEaCGinwSDwTcdSd+JRDOlyU662xLPT37hcJi2b9/uGBgparXZ5/P9uLm5eYOdNWYLYqc0OS2t+7R161bNcmQKlZWVNGHCBKqpqaERI0YQ/sa5vmqpPzanXb58mS5evEgXLlzQtiMcP35c+ztTEEJsLCkp+cGKFSt22dEcDIgdUuQ0NAns27ePWlpaKN2pLA0NDRoUeFVXV1uS2qeffkrHjh3TXhkgvOzz+b7X3Ny81lImuocYkFwlWIDPY8ckfp3xwoiSesdqZfyajxkzxlSt8Gu/efNm+uijj1I+h2NI586dS6NHjzaVbrbIsFbwb7CfJ1UQQjwuhAg1Nzd3ZEsr3fcMiFXJFcBz6iTGZBiy7a3HyYhGIcHo1GuvvUZnz569SiITJ06kG2+80XYwkjMCKPB3jhw5kqpV3vf7/XetXLnygJUmY0CsSM2Dz2D+IBkEq6etwA9oamrKWkv4A88++6w2h6EP2CqwZMmSnK9AyFqApAiwJBs2bNCsYlKIEtGCUCiUkqBM+TAgZlshz/HVIdXJ3SM7D5owAgjyf+655wg+gT7A8txyyy1aVy0fAQ7966+/TqdPn07IXgixv6SkZOGKFSuuNnUZCsqA5KMVDeSp/AS9jwCldONY0mxdLJThpZdeumoId9q0abR48WLXjidNJ0aUDz7R/v37kyHZUlZW9sXly5d3GWgCLQoDYlRSDsXT39+h7yI5dYhEpmpgX31VVVVW/wO/0JgR14drrrmGbr75ZoekZC3Zt956iw4cSHQ9MAPf3Nz8Z0IIzMhnDQxIVhHZF0H5CcoqAAirfkIupVJ76zHvgBd8BrwbOaF97969tGXLloTsx48fT7feeqvndmLCCr/yyiva/Ik+CCG+HwwGf2FEhgyIESmZjAMTr/cR1Gc7/QSjRVIH0OlBABBWDqCDU75u3bqEI5Iw0XfHHXf0T/AZLZdb8eCzPf/889rCSBWEEJf8fv+M+++/P/X4sK5wDEgOLaXO6k2GwQ0/IbnY6tihZKtg5/56DOfq5xwA3ze+8Q0aNmxYDlJ0/tFLly7Rr3/96wSwhRDPB4PBr2bLnQHJJqG+7/XdIvU5H36C/pBqPQxOn8aIpR6/+x0W0A6E+fPn06xZswxKML/Rdu/eTe+8805CIfx+/x+tXLlye6aSMSBJ0lEHV+sdZgCRw/JsS5qh9xOUj2DUT7CUYZaH0Jc/evRofyw481//+tc953ekqwas/TPPPKPtPdF1tdYHg8HbGBADGoNxcwgvH90j/Pond42s+gkGqmo6CnyPp556KuFHYunSpdqaqkIKWL+1fv16fZExkjU50wQiWxAibVIp1VIJuxtf7yforYKdfoLdZUZ6WMaxc+fO/qQxGbhs2TInsnI8zd/85jfJk4g/DYVC/5wuYwaESBvTz7Y+yUzLqesLkq2C036CmTKaiYuuiX7GfN68eTR79mwzSXgm7q5du2jbNuzijQfMsAeDwc8wIBmayCog+rN69TDAOgyWgONYn3jiiYTq3HPPPXlbSpKrXLEUBd1FffD5fI3Nzc3HUqXNFoRI2+SDV6ag7vJItgpW5hNybWQ3n8cSdiwAVAHzHnfddZebRbA9r9/+9rcJ8yJ+v/87K1eufJgBySBqAAInHaNV6uBqPQxevvDSdg3SJYjdgXv27On/D5avz5kzx8ksHU8b/hT8Kl036xfBYPD7DIjjoh98Gbz88ssJSzW+9KUvub6M3W6pYrITk546QN4IBoO3MCB2S7oI0nv66acT5g4wcz5y5MiCrjnugsHMug6QT4LB4BQGpKCbNT+Ff+yxx6izs7M/829/+9tUXl6en8LYlGtXVxc9+uijekBOB4PBGgbEJgEXUzIPPPBAwuTpypUrC2b2PF07YVZ97dqB8xyEEFeCwWAZA1JMmm1TXRkQmwRpNBk+OM6opLwRj7tYLrcDA+KywHPMjp30HAVo5HEpZXk0Gv5mLEbffeGFF7Q1Crfz6e5GRJf3ODzM62ATnDlzZtzly50hIrFSSqmdRvbCCy9qOTIgDgrexqR5otBGYaqkotHopFis5ydE4h4pZYk+CwbEAYE7mCQvNbFRuKdOnQp0d3f/iCi2QkoqTZU0A2KjwF1Iihcr2iDkcDg8Rkr590TyL4moIlOSDIgNAnc5CV7ublHgUkpfJBL5KyL5MyllpZFkGBAjUvJWHN4wZaE9otHo9Fis50EpaZ6ZxxkQM9LyRlzecmuiHaSUQ8Lh8D8KIf8hnZ/BXSwTAi2QqHxog4GGiluN3nVSyrRbFLMlwxYkm4S8+f1gPPaHiOaFQqF3M0nc8I7CcDj8NSL5mJRyeC5NyIDkIr38PssHx6WQv5RSRCKRfyGSP8LnXJuIAclVgvl7frAcPVpSUiLnz5//y+nTp/+1ECLjfdQZFb6trW14d3f3k0TyK3Y1CwNilyTzk85gOLx6+vTr+y4IEi+UlpZ+q7a2tj2dNNMCgvVTkUjrK1LS5+1sCgbETmnmJ61Cvv6gvr6ebrxxbr/ghKCN9fUNtwohUt4ZkhIQLA8Jh8PPEskv290EDIjdEnU/vUK9QAcXAy1YMD/FBT/ipUAgcKcQoidZmlcBEp/8Cz8hpfymE6JnQJyQqvtp4uxi3E+I/d364NUr2IYPH0aLFi3STqxJFYQQT9fXB+5NvljnKkBaW1v/jUj+rVMiZ0Cckqz76RbKJZ44vmnx4kU0dOjQLEIS/97Q0PB3+kgJgLS2ti4SgjbBijglbgbEKcnmJ12vXwNdWVmpXUUNC5ItwHpISZ9raGhoUXH7AZFSVoTD4d1E8ppsCeXyPQOSi/S8+SzONX777bevug9QlXbSpEk0d+5c2+9Lx2F/O3bsSLjURy8hXA13ww0zTF4qKg4EAoFZQgjtKJd+QJzuWqmCMyDeVHI7SrVv3z5qaWlJe4VEQ0ODdmUCXtXV1ZayxCHauMYAr9bW1pRp4PDwGTOmU2Njo6U8iAa6WhogbW1tU3p6uvdLKf0WUzT8GANiWFQFGRG/6rjkMxwOZyw//AFYFpz1izvV0RWCr6BOwIdVwkAA/BwcOI07BgEF/s4URo8eTdOnT6eqKuv3tAshektKSqfV1tYe1AAJh8OrpIwF3WgRBsQNKec/DwCCZfKRSMSVwmAId9q0a7NeYW20MEL4VgcCgZCA7xGJhE9JKbN7MUZTzxCPAbFBiAWUBLpB8BOcAgVgXHvttVRTox15YFvATbj19YEaEQ6H75Qylng7o23ZXJ0QA+KgcD2aNEa6sCvRrmuw0X2qrw9QIFBPw4fntHY2o8SE8H1NtLa2/rJvq6wr4mVAXBGzpzJJXpqCa6MnT55M0WhUu5dFfy+kuo4O103AH8E5wIiP18iRVQSLgeun3QniVwBkK5Fc4E6GfOyPW3L2Qj6wGAcOHKCNGzdmLA4gaGpqokmTJpocknW6luL3IhxujUgp65zOSqXPFsQtSbubD0adcBkqLAJGnNTFqKm6Vcoa4CppLE3x6nUKQoioaG09gQkR186zZ0DcVVwncsO98QBA/8L8hJG75OfPn0+1tSlvGnCiqLmm2cWA5CrCQf487tJQICjLAKc7OcB3qKwcTrAKVVUjtbkN3Cjb0dHRHzV5qXkBiK6Lu1gF0EpuFRHKnAxDqok5ONAAAKNJAAJdJEz06e97P3jwE/rwww/7i47vliz5vOZsF0ro62Kxk14oDWZnOXFiorIIgAKf9b/2Ki+MJMVhiIMAKABDptt9r1zppjfffJO6u7v7iwwnHDv5CiuIrTzMW1gtZqm06BLpLQNgwDKO5IDh0zgI6CbFu0pGVsEmp7N37/sJCwiR7he+cHPavRiWKuXKQ+JXPFHoiqDdyQROMjYwKYugoIBTnRyw7ikOwQAQ2fdLZK8HLNPGjZsSJgWvv/56mjy5KfvDHoshhO9OXmrisUYxWhwMn2LkSHWT8I4hVgy3JoeKioo+fwFdJEAxgvA/J8L27YnLSgDdzTcvKbh7DfuXmkBIbi5WfPnl9drM6dKlt5qaFIpGT2qL37BtEqs1iylAXlB+vWU4e/ZsymXlUEjlK8Tfq1zr2qBMLS1bEppmzpw51NAQKLjm6l+siJK7udz9zTffokuXLmm/KmZGNIoFEDi2+sk2WAZ0m1JNuGEdkt55xmf3lmFcrfObN7doVk0F7PnAVtdCC1ctd0cF3Now9e677xKUfebMG7SNM0bDYAQEjnKqOYbkCTeMGGHkaMB5jvsOGG71SsCq3Z07/5BQHFj7UaOsbYzKb72SNkyhMG5tuT127Djt3r1b2355003Gl4DhbNht294lzMTOmjUrv/KzkHtnZ2dCFwmWIdUcA+YL1LAqfAV0k/C3fo7BQvaOPgLr9tZbGxKGiQOBAM2dO8fRfJ1JPM2W2z4r4vihDehCoJuFkRUc4FVXZ2wZGLodW7f+nmbMmEELFy50RjY2pYoupN55hpXA/5IDLEB8sm3AeQYMmeYYbCqirckMhklBCCTjoQ1KYm50tQ4fPkI4whJnFC1ceJOhNf1QMPxKYXHbsmXLbG3gXBLDdtDkYVVYi+Sg5hj0s89O7mXIpU5mnh08k4IaIpmP/enrajl6cJwSvhoOxHj87NmztL3JmQL65a+99ro2O3v33Xdr+wLcDnCWk4dVU024AfyBOYb47LOZAQm365VLfoNlUtDwwXF9kDh29KhqDAxdAhL4FghTpkymadOmZexefPDBh3To0CHCcS633XZbLu2a8Vk1x6B3oNHF0y+dUAlgL4PyFdTsc0WFa4ujHZOBkYQHz6SgiaNHlWCcOrw6WfAHDx6kffv2a0ulq6tH0nXXXZfWOij/Be84DAxj7LkG/RyDAiJ5l5vKA3MMybPPsIDFGgbDpKClw6tVgztx/UEqZTp79lPauXMnqb47xs+bmiYRlkcnO6zo4mA0C0DNnDmT5s2bZ3iER23q0VsGjNtn3tQz4ECnO9e1GAEZHJOCOVx/oLMktl6gk06ZYBUOHTqsLXJTa4fQfRk7dqw2lg6fQ60VOnGild577z1NsfGLPnv2bJo4caK2f1kF/aYe5TfAh0g1xzBkSCmNHFmtnYyhhlXV+UzFqPxG6vz225sTDq4upEnB+KU54mf19fU/zukCHb2g7LqCLZvw0eXBpBOGDtHH1Yd4f79KO2AM8WAJlJMMSwOA8B0sUaqRJKSFoVXEw2gYTsUAEF6acMsmHy98X8iTgkKIdiLx54FAwNBJPqauVLPjEk8zDYzuD7pf8Alg0lOtSs2UHqABVJhbqKsbq3XZuJtkpgWujgurjXks/Q9QoUwKCiH2+Xz+u+vq6t43KgVTgCBRXAMdiUR+RBT7oZVroI0WLFW89vZL1N5+kTD2DljQLevuxnuPZgUw2xyfbxhB1dWjqFhGk3KRqdlnjx8/Trt27e5/rBB2CgpB3US+n9fX1/9MCHH12v8MQjANiEorbk16HpSS5pkVMscvXAmoSV5VA6/vFBSCtvl8JSvMWA1961gGpM+a+CKRyHeJ5E+llJWF2+xccqMSgNXetm2b1vXFwMn8+fP6D5w2moYb8YQQF4nEP9XX1/9P8q1RZvLPCRCVUTgcHiOl/CGR/AsicmYnjplacVzHJYAhc4+O9HUSif8VQvw8EAiczlUQtgCiCnHq1KlAd3f3PxHFvuO2f5KrIPj5wpZAn5/xUGlp6U9ramoy371goqq2AqLyPXnyZFNvb/ePicQ9uDHXRHk4KkvAlATiN9PKp3y+kp/U1dUdNvWwgciOAKLyPXPmzLjLlztDRGKllNLe8+kNVI6jDF4JCCFOE8m1ZWUVq0aPHn3CqZo6CogqNNZ1RaPhb8Zi9D0iWXi7nZySPqdrQQJit89H/11XF3haCNFlIQFTj7gCiL5E4XB4MZEMEdEdUsps9/KaqgxHHpwSEELg/NLnicSqQCCw2c1aug6IqhwWQvb09HyVSH6LiL7Ivoqbze79vOK+Bf0fkXiypKTkudra2sR1Ry5VIW+A6OsXjUZre3t778DBmPAAAAI6SURBVO6DZb5LdedsvCmBdwCF3+9fV1dXF98slMfgCUCSumCNQsgvSymXSklLeF4lj9rhTtadQtAGIcR6KbWNS0fdydZYLp4DRF9snLQSjUZvjsViS4Wg26SUVi++NiYNjuWKBIQQR6Wkl30+3/q6urq3hBBXb+J3pSTZM/E0IMnFj0Qi10kp/4QotphILJJSjs1eRY6RbwkIIU4SyRYi32YhxBv19fUD9yLku3BZ8i8oQJLrcurUiWt6e8Wi3l7CyBiO8JvicXkXS/EOEokWv582+/2ypaZm3IFCrXhBA5Is9La2trqenp6biGi2lJhv0eZcxhVq4xRIuU8Qid1CCKyB31VSUrK1trY2WiBlz1rMQQVIqtpeuHBidEcHzZIy/iLSXtfyWrGsupEQIb7WiT4iot1CxF9Dh9LuESPGnTGXUmHFHvSApGoOzLm0tbU19vb2TpVSThGCphLJKVLSVCFoYrHCAwikpCNC0MdE4qCU9LEQ4qDf7/+4trb2aN/cRGFpeI6lLUpAMslMSulva2ub2NPT0+TzyUAsJup9PgpIKQNSinohtM/1RFRo5/1cFkJEpKSwEDIihAjHYhT2+WQkFhPhkpKSQ7W1tUdwsnmOOjWoHmdALDbn+fPnR3V2dgKW0ULEqmIxUSWlHCmErJJSVAlBVVIS3kcS4X9ULoQolVKWZnpHcaSU3UKI7szv1EUkzuNSKSEI7+eFkOelFOeFEOd8Pnz24fOZioqKcFVV1VmLVS3qx/4fQLyzKIIkCJoAAAAASUVORK5CYII="},E9nw:function(U,X){U.exports=function(){var x=document.getSelection();if(!x.rangeCount)return function(){};for(var I=document.activeElement,_=[],O=0;O<x.rangeCount;O++)_.push(x.getRangeAt(O));switch(I.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":I.blur();break;default:I=null;break}return x.removeAllRanges(),function(){x.type==="Caret"&&x.removeAllRanges(),x.rangeCount||_.forEach(function(y){x.addRange(y)}),I&&I.focus()}}},ELLl:function(U,X,x){(function(I){I(x("VrN/"))})(function(I){var _={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},O=I.Pos;I.defineOption("autoCloseBrackets",!1,function(e,r,c){c&&c!=I.Init&&(e.removeKeyMap(v),e.state.closeBrackets=null),r&&(o(y(r,"pairs")),e.state.closeBrackets=r,e.addKeyMap(v))});function y(e,r){return r=="pairs"&&typeof e=="string"?e:typeof e=="object"&&e[r]!=null?e[r]:_[r]}var v={Backspace:d,Enter:a};function o(e){for(var r=0;r<e.length;r++){var c=e.charAt(r),u="'"+c+"'";v[u]||(v[u]=g(c))}}o(_.pairs+"`");function g(e){return function(r){return s(r,e)}}function p(e){var r=e.state.closeBrackets;if(!r||r.override)return r;var c=e.getModeAt(e.getCursor());return c.closeBrackets||r}function d(e){var r=p(e);if(!r||e.getOption("disableInput"))return I.Pass;for(var c=y(r,"pairs"),u=e.listSelections(),f=0;f<u.length;f++){if(!u[f].empty())return I.Pass;var m=t(e,u[f].head);if(!m||c.indexOf(m)%2!=0)return I.Pass}for(var f=u.length-1;f>=0;f--){var l=u[f].head;e.replaceRange("",O(l.line,l.ch-1),O(l.line,l.ch+1),"+delete")}}function a(e){var r=p(e),c=r&&y(r,"explode");if(!c||e.getOption("disableInput"))return I.Pass;for(var u=e.listSelections(),f=0;f<u.length;f++){if(!u[f].empty())return I.Pass;var m=t(e,u[f].head);if(!m||c.indexOf(m)%2!=0)return I.Pass}e.operation(function(){var l=e.lineSeparator()||`
|
|
|
`;e.replaceSelection(l+l,null),e.execCommand("goCharLeft"),u=e.listSelections();for(var E=0;E<u.length;E++){var b=u[E].head.line;e.indentLine(b,null,!0),e.indentLine(b+1,null,!0)}})}function n(e){var r=I.cmpPos(e.anchor,e.head)>0;return{anchor:new O(e.anchor.line,e.anchor.ch+(r?-1:1)),head:new O(e.head.line,e.head.ch+(r?1:-1))}}function s(e,r){var c=p(e);if(!c||e.getOption("disableInput"))return I.Pass;var u=y(c,"pairs"),f=u.indexOf(r);if(f==-1)return I.Pass;for(var m=y(c,"closeBefore"),l=y(c,"triples"),E=u.charAt(f+1)==r,b=e.listSelections(),D=f%2==0,C,w=0;w<b.length;w++){var S=b[w],A=S.head,R,k=e.getRange(A,O(A.line,A.ch+1));if(D&&!S.empty())R="surround";else if((E||!D)&&k==r)E&&i(e,A)?R="both":l.indexOf(r)>=0&&e.getRange(A,O(A.line,A.ch+3))==r+r+r?R="skipThree":R="skip";else if(E&&A.ch>1&&l.indexOf(r)>=0&&e.getRange(O(A.line,A.ch-2),A)==r+r){if(A.ch>2&&/\bstring/.test(e.getTokenTypeAt(O(A.line,A.ch-2))))return I.Pass;R="addFour"}else if(E){var L=A.ch==0?" ":e.getRange(O(A.line,A.ch-1),A);if(!I.isWordChar(k)&&L!=r&&!I.isWordChar(L))R="both";else return I.Pass}else if(D&&(k.length===0||/\s/.test(k)||m.indexOf(k)>-1))R="both";else return I.Pass;if(!C)C=R;else if(C!=R)return I.Pass}var M=f%2?u.charAt(f-1):r,G=f%2?r:u.charAt(f+1);e.operation(function(){if(C=="skip")e.execCommand("goCharRight");else if(C=="skipThree")for(var W=0;W<3;W++)e.execCommand("goCharRight");else if(C=="surround"){for(var N=e.getSelections(),W=0;W<N.length;W++)N[W]=M+N[W]+G;e.replaceSelections(N,"around"),N=e.listSelections().slice();for(var W=0;W<N.length;W++)N[W]=n(N[W]);e.setSelections(N)}else C=="both"?(e.replaceSelection(M+G,null),e.triggerElectric(M+G),e.execCommand("goCharLeft")):C=="addFour"&&(e.replaceSelection(M+M+M+M,"before"),e.execCommand("goCharRight"))})}function t(e,r){var c=e.getRange(O(r.line,r.ch-1),O(r.line,r.ch+1));return c.length==2?c:null}function i(e,r){var c=e.getTokenAt(O(r.line,r.ch+1));return/\bstring/.test(c.type)&&c.start==r.ch&&(r.ch==0||!/\bstring/.test(e.getTokenTypeAt(r)))}})},ELcG:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){/** @preserve
|
|
|
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
|
|
|
|
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
|
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
*/return function(_){var O=I,y=O.lib,v=y.WordArray,o=y.Hasher,g=O.algo,p=v.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),d=v.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),a=v.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),n=v.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),s=v.create([0,1518500249,1859775393,2400959708,2840853838]),t=v.create([1352829926,1548603684,1836072691,2053994217,0]),i=g.RIPEMD160=o.extend({_doReset:function(){this._hash=v.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,E){for(var b=0;b<16;b++){var D=E+b,C=l[D];l[D]=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360}var w=this._hash.words,S=s.words,A=t.words,R=p.words,k=d.words,L=a.words,M=n.words,G,W,N,K,F,P,B,J,re,he;P=G=w[0],B=W=w[1],J=N=w[2],re=K=w[3],he=F=w[4];for(var we,b=0;b<80;b+=1)we=G+l[E+R[b]]|0,b<16?we+=e(W,N,K)+S[0]:b<32?we+=r(W,N,K)+S[1]:b<48?we+=c(W,N,K)+S[2]:b<64?we+=u(W,N,K)+S[3]:we+=f(W,N,K)+S[4],we=we|0,we=m(we,L[b]),we=we+F|0,G=F,F=K,K=m(N,10),N=W,W=we,we=P+l[E+k[b]]|0,b<16?we+=f(B,J,re)+A[0]:b<32?we+=u(B,J,re)+A[1]:b<48?we+=c(B,J,re)+A[2]:b<64?we+=r(B,J,re)+A[3]:we+=e(B,J,re)+A[4],we=we|0,we=m(we,M[b]),we=we+he|0,P=he,he=re,re=m(J,10),J=B,B=we;we=w[1]+N+re|0,w[1]=w[2]+K+he|0,w[2]=w[3]+F+P|0,w[3]=w[4]+G+B|0,w[4]=w[0]+W+J|0,w[0]=we},_doFinalize:function(){var l=this._data,E=l.words,b=this._nDataBytes*8,D=l.sigBytes*8;E[D>>>5]|=128<<24-D%32,E[(D+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,l.sigBytes=(E.length+1)*4,this._process();for(var C=this._hash,w=C.words,S=0;S<5;S++){var A=w[S];w[S]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return C},clone:function(){var l=o.clone.call(this);return l._hash=this._hash.clone(),l}});function e(l,E,b){return l^E^b}function r(l,E,b){return l&E|~l&b}function c(l,E,b){return(l|~E)^b}function u(l,E,b){return l&b|E&~b}function f(l,E,b){return l^(E|~b)}function m(l,E){return l<<E|l>>>32-E}O.RIPEMD160=o._createHelper(i),O.HmacRIPEMD160=o._createHmacHelper(i)}(Math),I.RIPEMD160})},"ER/M":function(U,X,x){U.exports={"xterm-panel":"xterm-panel___2r2xx"}},ETIr:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=_.enc,o=v.Base64={stringify:function(p){var d=p.words,a=p.sigBytes,n=this._map;p.clamp();for(var s=[],t=0;t<a;t+=3)for(var i=d[t>>>2]>>>24-t%4*8&255,e=d[t+1>>>2]>>>24-(t+1)%4*8&255,r=d[t+2>>>2]>>>24-(t+2)%4*8&255,c=i<<16|e<<8|r,u=0;u<4&&t+u*.75<a;u++)s.push(n.charAt(c>>>6*(3-u)&63));var f=n.charAt(64);if(f)for(;s.length%4;)s.push(f);return s.join("")},parse:function(p){var d=p.length,a=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var s=0;s<a.length;s++)n[a.charCodeAt(s)]=s}var t=a.charAt(64);if(t){var i=p.indexOf(t);i!==-1&&(d=i)}return g(p,d,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function g(p,d,a){for(var n=[],s=0,t=0;t<d;t++)if(t%4){var i=a[p.charCodeAt(t-1)]<<t%4*2,e=a[p.charCodeAt(t)]>>>6-t%4*2,r=i|e;n[s>>>2]|=r<<24-s%4*8,s++}return y.create(n,s)}}(),I.enc.Base64})},"F+F2":function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(){if(typeof ArrayBuffer!="function")return;var _=I,O=_.lib,y=O.WordArray,v=y.init,o=y.init=function(g){if(g instanceof ArrayBuffer&&(g=new Uint8Array(g)),(g instanceof Int8Array||typeof Uint8ClampedArray!="undefined"&&g instanceof Uint8ClampedArray||g instanceof Int16Array||g instanceof Uint16Array||g instanceof Int32Array||g instanceof Uint32Array||g instanceof Float32Array||g instanceof Float64Array)&&(g=new Uint8Array(g.buffer,g.byteOffset,g.byteLength)),g instanceof Uint8Array){for(var p=g.byteLength,d=[],a=0;a<p;a++)d[a>>>2]|=g[a]<<24-a%4*8;v.call(this,d,p)}else v.apply(this,arguments)};o.prototype=y}(),I.lib.WordArray})},FOrL:function(U,X,x){U.exports=x.p+"static/nodata.a6b3f948.png"},FPkq:function(U,X,x){U.exports=x.p+"static/qrCode.dd0fe9b2.png"},FfZY:function(U,X,x){U.exports={wrap:"wrap___2UNvJ",modal:"modal___i6_bN",title:"title___ae-La",path:"path___3AJgW",colorBlue:"colorBlue___afQvH",width240:"width240___9YsKN",filePath:"filePath___2-i4S"}},Fv0C:function(U,X,x){"use strict";function I(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(r){return typeof r}:I=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},I(i)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=d(x("Lo0S")),O=x("vewr"),y=d(x("8CQX")),v=g(x("mHUz")),o=d(x("GdRQ"));function g(i){return i&&i.__esModule?i:{default:i}}function p(){if(typeof WeakMap!="function")return null;var i=new WeakMap;return p=function(){return i},i}function d(i){if(i&&i.__esModule)return i;if(i===null||I(i)!=="object"&&typeof i!="function")return{default:i};var e=p();if(e&&e.has(i))return e.get(i);var r={},c=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in i)if(Object.prototype.hasOwnProperty.call(i,u)){var f=c?Object.getOwnPropertyDescriptor(i,u):null;f&&(f.get||f.set)?Object.defineProperty(r,u,f):r[u]=i[u]}return r.default=i,e&&e.set(i,r),r}function a(i,e){if(!(i instanceof e))throw new TypeError("Cannot call a class as a function")}function n(i,e){for(var r=0;r<e.length;r++){var c=e[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function s(i,e,r){return e&&n(i.prototype,e),r&&n(i,r),i}var t=function(){function i(e){a(this,i),this._target=e||null,this._keyDownList={},this._pendingKey=null,this._altGrArmed=!1,this._eventHandlers={keyup:this._handleKeyUp.bind(this),keydown:this._handleKeyDown.bind(this),keypress:this._handleKeyPress.bind(this),blur:this._allKeysUp.bind(this),checkalt:this._checkAlt.bind(this)},this.onkeyevent=function(){}}return s(i,[{key:"_sendKeyEvent",value:function(r,c,u){if(u)this._keyDownList[c]=r;else{if(!(c in this._keyDownList))return;delete this._keyDownList[c]}_.Debug("onkeyevent "+(u?"down":"up")+", keysym: "+r,", code: "+c),this.onkeyevent(r,c,u)}},{key:"_getKeyCode",value:function(r){var c=y.getKeycode(r);if(c!=="Unidentified")return c;if(r.keyCode&&r.type!=="keypress"&&r.keyCode!==229)return"Platform"+r.keyCode;if(r.keyIdentifier){if(r.keyIdentifier.substr(0,2)!=="U+")return r.keyIdentifier;var u=parseInt(r.keyIdentifier.substr(2),16),f=String.fromCharCode(u).toUpperCase();return"Platform"+f.charCodeAt()}return"Unidentified"}},{key:"_handleKeyDown",value:function(r){var c=this._getKeyCode(r),u=y.getKeysym(r);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),c==="AltRight"&&r.timeStamp-this._altGrCtrlTime<50?u=v.default.XK_ISO_Level3_Shift:this._sendKeyEvent(v.default.XK_Control_L,"ControlLeft",!0)),c==="Unidentified"){u&&(this._sendKeyEvent(u,c,!0),this._sendKeyEvent(u,c,!1)),(0,O.stopEvent)(r);return}if(o.isMac()||o.isIOS())switch(u){case v.default.XK_Super_L:u=v.default.XK_Alt_L;break;case v.default.XK_Super_R:u=v.default.XK_Super_L;break;case v.default.XK_Alt_L:u=v.default.XK_Mode_switch;break;case v.default.XK_Alt_R:u=v.default.XK_ISO_Level3_Shift;break}if(c in this._keyDownList&&(u=this._keyDownList[c]),(o.isMac()||o.isIOS())&&c==="CapsLock"){this._sendKeyEvent(v.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(v.default.XK_Caps_Lock,"CapsLock",!1),(0,O.stopEvent)(r);return}if(!u&&(!r.key||o.isIE()||o.isEdge())){this._pendingKey=c,setTimeout(this._handleKeyPressTimeout.bind(this),10,r);return}if(this._pendingKey=null,(0,O.stopEvent)(r),c==="ControlLeft"&&o.isWindows()&&!("ControlLeft"in this._keyDownList)){this._altGrArmed=!0,this._altGrTimeout=setTimeout(this._handleAltGrTimeout.bind(this),100),this._altGrCtrlTime=r.timeStamp;return}this._sendKeyEvent(u,c,!0)}},{key:"_handleKeyPress",value:function(r){if((0,O.stopEvent)(r),this._pendingKey===null)return;var c=this._getKeyCode(r),u=y.getKeysym(r);if(c!=="Unidentified"&&c!=this._pendingKey)return;if(c=this._pendingKey,this._pendingKey=null,!u){_.Info("keypress with no keysym:",r);return}this._sendKeyEvent(u,c,!0)}},{key:"_handleKeyPressTimeout",value:function(r){if(this._pendingKey===null)return;var c,u=this._pendingKey;if(this._pendingKey=null,r.keyCode>=48&&r.keyCode<=57)c=r.keyCode;else if(r.keyCode>=65&&r.keyCode<=90){var f=String.fromCharCode(r.keyCode);r.shiftKey?f=f.toUpperCase():f=f.toLowerCase(),c=f.charCodeAt()}else c=0;this._sendKeyEvent(c,u,!0)}},{key:"_handleKeyUp",value:function(r){(0,O.stopEvent)(r);var c=this._getKeyCode(r);if(this._altGrArmed&&(this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(v.default.XK_Control_L,"ControlLeft",!0)),(o.isMac()||o.isIOS())&&c==="CapsLock"){this._sendKeyEvent(v.default.XK_Caps_Lock,"CapsLock",!0),this._sendKeyEvent(v.default.XK_Caps_Lock,"CapsLock",!1);return}this._sendKeyEvent(this._keyDownList[c],c,!1),o.isWindows()&&(c==="ShiftLeft"||c==="ShiftRight")&&("ShiftRight"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftRight,"ShiftRight",!1),"ShiftLeft"in this._keyDownList&&this._sendKeyEvent(this._keyDownList.ShiftLeft,"ShiftLeft",!1))}},{key:"_handleAltGrTimeout",value:function(){this._altGrArmed=!1,clearTimeout(this._altGrTimeout),this._sendKeyEvent(v.default.XK_Control_L,"ControlLeft",!0)}},{key:"_allKeysUp",value:function(){_.Debug(">> Keyboard.allKeysUp");for(var r in this._keyDownList)this._sendKeyEvent(this._keyDownList[r],r,!1);_.Debug("<< Keyboard.allKeysUp")}},{key:"_checkAlt",value:function(r){if(r.skipCheckAlt)return;if(r.altKey)return;var c=this._target,u=this._keyDownList;["AltLeft","AltRight"].forEach(function(f){if(!(f in u))return;var m=new KeyboardEvent("keyup",{key:u[f],code:f});m.skipCheckAlt=!0,c.dispatchEvent(m)})}},{key:"grab",value:function(){if(this._target.addEventListener("keydown",this._eventHandlers.keydown),this._target.addEventListener("keyup",this._eventHandlers.keyup),this._target.addEventListener("keypress",this._eventHandlers.keypress),window.addEventListener("blur",this._eventHandlers.blur),o.isWindows()&&o.isFirefox()){var r=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.addEventListener(c,r,{capture:!0,passive:!0})})}}},{key:"ungrab",value:function(){if(o.isWindows()&&o.isFirefox()){var r=this._eventHandlers.checkalt;["mousedown","mouseup","mousemove","wheel","touchstart","touchend","touchmove","keydown","keyup"].forEach(function(c){return document.removeEventListener(c,r)})}this._target.removeEventListener("keydown",this._eventHandlers.keydown),this._target.removeEventListener("keyup",this._eventHandlers.keyup),this._target.removeEventListener("keypress",this._eventHandlers.keypress),window.removeEventListener("blur",this._eventHandlers.blur),this._allKeysUp()}}]),i}();X.default=t},GABl:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAKi0lEQVRoQ71ae3BU1Rn//e7dzYuioNRsHlSqRiUB2eUx0hbaKAHEAMWxiQ6PTUAUGCuIQNVOZ0xnrHUE5GHHIqOwCag8BlQiQnnUokgt5AEIK5GnBpIFXwjkAdl7vs7dkJCETXLvEj3/5d7v9/u+337nfN8554bowBHo16+3YRh3K7IPBHcRSIDI9QJ0AWkA8h0E3xM8DWAvde5x6Pqe+D17jnVUGLxWogqPp78SGSeC3wP4ZUR8pJ+Ct50O7e344uKjEXFcBkUkSERY6e43RkE9JcCgawngaiw3O6A/l7CvaHckvLYFhTKi5B8C3B2JQ6sYEhvpcMxKKioqs4ox7SwLkvT0mFNnz82HqKkCaHacRGxL1gDybHJp6WKSYoXHkqBytzuF4FoR6WOFtKNtCP4b0c7s5N27v22Pu11B5e7+6ZTgBgE6t0f2Y74n8IUjOuo+1+7dx9vy06agcrf7fgjXARLzYwZrnZsB6BzevaRkf2uYVgWdcruHKnAjRJzWHf4ElmSl5nTcnbRnT3k4b2EFVfTt29NQ8l+zKf4EIUbi4kAnhz7ohuLiH1qCwwo62cf9ccf3l0jibh1DckPy3lKzmTcbYQWV9+k7HlArOjaEjmejRm9yaWmzOMMKMncCp9x9dwlkYEeEQUCBrO0IrqYcApx1xsV6XLt2nWl43kyQqyB38dQJPZ7MY56qdLsHGIL/iY3m24R0p2jc6BDZrkVHf3XTiBFfMy9PdbSgNotCYv6kDAPGVhCTT3vz3zCNT7o9PhHJsRoIwUJN518TS0qKrWI62q4xQ/H5uTsB+Q3I0521zrcfGf/KuTMDBrguXar7or2mSuCCRm1q4t6SN5sGOGZBTQ9DsRdgJEFpQeo8pRvRJe/MYeMUMe2lYlQczl4cBki7jT78DyCVTN32qfkuRJC8Mrd3nSGNzYoa5wYm+P5kvivv43kakBdbbWTk1zqRnlBa6jdt8j4UR1Fx9WQAUyG4aqtEUIHYBWJh4ay4dQ28ciBjJiAvR5Qx8jtEOROZsuliSFBCQc4LSvBs4xogLjmjolPLH156VLKyok4ePuKHyK1XOSN/0Bz6PUlFRaXmuzELLrmNYHCVQO6wEhjBT5zReHj99LiToUwdGPIYgNesYMPE8hDTtq0JCYovyD0KkVuaGZHvnfb6xpjPTnk8o5WS91qSNC2bo+fWZiqq1RDpZDOggMPhHPHuzKi99aIy8gHx2uQwJ9t69tr2IBPfyr3TqJPPwxE4dGScGp+//XKB2CIiQ6/YcXP3faUjGjITNII7IxBTT0eeitJjB6yfyUr5MrMrLtT6IXDZFHUWaTd0Y8LKieOVEb6JkjgwOCbTvTY726j0eFINwT4RcYRi0LVfJZeUfGqumeKimgNWp1kbQX7w/pxOmaEsHRw6BaKW2BRkBjWQCQUTFylR01td9ODjgRzfq6Gp18ezSEGmEyxJ3lfaz3w2en7VNKUQen+tQ9O0ezfMiv1QjmZcj1oJQGBvl09tKl0Fuf8Rkd+1Koj4NkqPS/lq3D+/PztoUNcLF6oOQ7AweV/p8yZm5LyqveGqWSTiSK4pnB33UH2WMtZAJMsWD7HIFHRQRFLbBnLR6Rzfk6G15PFM05R2NHFf8RazzwSDqs0Dl52ACJ6PuTm229psXhJ/xjQosZl5vs/4/NxKQNpegERQd7B3xVjfIcnK0iuPHYtOLC6uHjW/dqQoo9BO0O3ZRkfpt6+bEXNY/BmZUPJ+e/bN3pM76crPrRVIdHtAkpsDXl+oqjWMUfOrpoiC/cXbhjPqWnrhU7E75NB9dyFYt6+9uFq838/4gpwfILjOCpBkZsDr+6DBduTcmomAWmYFa9VGc3DQhplxn4h/aAqU+sIqLmRHfkZXQU6ZCG63AiRZlpQa1bu4/9K6UEGYXzMESm2zgrVqQ2i3FM6JPS7+jIEwT832xi668nN2CPBbqziN2lOV3uULTPusl6uTahTKIZFuKpt7JXGm36y4hDxSiX/YI1DG61bjupyhzaag1QJkWwfyrO6MSqkYu/QbEzNqXvV2EbnXOr51S2p4o3BWJ3Nja5btAohMsMfLV80qtxCQGXaAJJcEvL5pJmb0vJpxStRKO/hwtuYunE7ds+HJ6P1yfEwXVJ+vgCDWFi8xg64Vk7JFGattAg2nw9n35NjX92etEb32qxpzn3dNWSKxvHB2p0n12RkyHYJFtmIyjXUtnT3eye1Sc16+gUC3Q0CyJCk1aqBZIB6YKzfVsdrcMSTY4WiwJbC/C+J+vWIOq0TyHPDvNI8rKba4iBpERXUNHR9cBTkfi9j/LEJqLwW8y582OR6Ye7FXHYx3gTDnpjYiM8U4o5nZeCbyD50BpRbaEmMaE1uZtn3Y5fPQxGch6gXbJKDSdW1ExfhlW0zsmAXSxQjW+ARy1X1ZS+76k6vkd5G4J8zMhKZa2ahuqKs+DPOLn91BPsK0bctCghJXTLrDUMoPiO3PJAQvApwSyFme3xDD6PmXPCJ1MwA+KCI/axqbWZpBFFJ3LDYLQNN3cnDIEgim2NWC+unmYsqmc42XEq6C3FUiEtrpRjIIzBscm/mMeXZqih+9UOIhNbeFMhBkRb/ZMV+afaalDykb3gdBowRi/0cFtcVM2xqq1FcErZyYKoZ8FkmWGoMjjwGy6MaYTsv82a9eaOuHue2DJ6KP3P/KxQYbOThkB8R6g2/i8xwcsbfyjsJQX2x50XhNWboigGcBrKam7RKRMqce+vodYwiSIOihREYAPN5wJJGDGdkQsdc6Gpxp/AtTt/2t4c9mghIKJvcU1O0VQVQk084yhjgHxKac9i45I+VZsTj3/SGI/MIyvjF6VqBrbAoTC6vDCjIfulZM/KMo9YptchsAEk8HvPkvhdbVwYznIJJnA97EVBvLXlvfblZ0whG58nPWCvCHyJy0gyKPde7WOdVcP3JkWHfUqkOAxNn2Rcxn2vbZLXFhr15vW/nEdeeNcyUArr5ctO25OUAjH6z0+tZfzs4qRFJZiU1IHTySvPoDQKt3yeb1cFDJNhHcdI0amhQk7gh4fen1YoYPhgQ/ss/NzxHtHGj2nHDYNi/Hk9/MTQka2CoiN9t3fNVkUDr0/hU5b5SK5Gnw7yyCiMcWL+GH5sxkz80nWsO1e9uftHJysqHqtoigpy3nLYxJLgt4fY+EsnMg41FAltriIzciyjm2tcy0WuXCOUnKf/xGg1VvishwW0Fc8XIhNoYpJ7J9gfpLRByGyM8tc5FzkTromXBrxlJRaM2ReW0sSi0QQTfLwZiG1P582rv876Hs+DNehpKZFvEnoWE2U7dbbrrtTrmWjhPfeqybEby0ECLjrARF8ETML9DzxD2+WikbdifqDHND2vb/PpDm5/oXcV3XRey+tsaKH1tTLhyh661H0xCsmyaQCW1dg1HTHwpMWLbmcpneBJH7Wg+QVdCwFKI/z7R/fWdHyDULaiCIL5jdScM3Y6X+m04/aXIPQGJnwJs/OCTm8yEjYSDMLSurQPkI5CrcoK2ja0vobBTpsD3l2nKU/mGe43DFiV5Ksb8SNUCj9lrlhOUl5r8JwG9evjMBhDmdjkJYBp2luLPHHrL+nq8jxv8BV2A7FHmr6w0AAAAASUVORK5CYII="},GQ8N:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.toUnsigned32bit=I,X.toSigned32bit=_;function I(O){return O>>>0}function _(O){return O|0}},GRuw:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("lPiR"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=_.algo,o=v.SHA256,g=v.SHA224=o.extend({_doReset:function(){this._hash=new y.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var p=o._doFinalize.call(this);return p.sigBytes-=4,p}});_.SHA224=o._createHelper(g),_.HmacSHA224=o._createHmacHelper(g)}(),I.SHA224})},GdRQ:function(U,X,x){"use strict";function I(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(w){return typeof w}:I=function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},I(D)}Object.defineProperty(X,"__esModule",{value:!0}),X.isMac=c,X.isWindows=u,X.isIOS=f,X.isSafari=m,X.isIE=l,X.isEdge=E,X.isFirefox=b,X.hasScrollbarGutter=X.supportsImageMetadata=X.supportsCursorURIs=X.dragThreshold=X.isTouchDevice=void 0;var _=y(x("Lo0S"));function O(){if(typeof WeakMap!="function")return null;var D=new WeakMap;return O=function(){return D},D}function y(D){if(D&&D.__esModule)return D;if(D===null||I(D)!=="object"&&typeof D!="function")return{default:D};var C=O();if(C&&C.has(D))return C.get(D);var w={},S=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var A in D)if(Object.prototype.hasOwnProperty.call(D,A)){var R=S?Object.getOwnPropertyDescriptor(D,A):null;R&&(R.get||R.set)?Object.defineProperty(w,A,R):w[A]=D[A]}return w.default=D,C&&C.set(D,w),w}var v="ontouchstart"in document.documentElement||document.ontouchstart!==void 0||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;X.isTouchDevice=v,window.addEventListener("touchstart",function D(){X.isTouchDevice=v=!0,window.removeEventListener("touchstart",D,!1)},!1);var o=10*(window.devicePixelRatio||1);X.dragThreshold=o;var g=!1;try{var p=document.createElement("canvas");p.style.cursor='url("data:image/x-icon;base64,AAACAAEACAgAAAIAAgA4AQAAFgAAACgAAAAIAAAAEAAAAAEAIAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAD/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAAAAAAAAAAAAAAAAAAAA==") 2 2, default',p.style.cursor.indexOf("url")===0?(_.Info("Data URI scheme cursor supported"),g=!0):_.Warn("Data URI scheme cursor not supported")}catch(D){_.Error("Data URI scheme cursor test exception: "+D)}var d=g;X.supportsCursorURIs=d;var a=!1;try{new ImageData(new Uint8ClampedArray(4),1,1),a=!0}catch(D){}var n=a;X.supportsImageMetadata=n;var s=!0;try{var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);var i=document.createElement("div");t.appendChild(i);var e=t.offsetWidth-i.offsetWidth;t.parentNode.removeChild(t),s=e!=0}catch(D){_.Error("Scrollbar test exception: "+D)}var r=s;X.hasScrollbarGutter=r;function c(){return navigator&&!!/mac/i.exec(navigator.platform)}function u(){return navigator&&!!/win/i.exec(navigator.platform)}function f(){return navigator&&(!!/ipad/i.exec(navigator.platform)||!!/iphone/i.exec(navigator.platform)||!!/ipod/i.exec(navigator.platform))}function m(){return navigator&&navigator.userAgent.indexOf("Safari")!==-1&&navigator.userAgent.indexOf("Chrome")===-1}function l(){return navigator&&!!/trident/i.exec(navigator.userAgent)}function E(){return navigator&&!!/edge/i.exec(navigator.userAgent)}function b(){return navigator&&!!/firefox/i.exec(navigator.userAgent)}},GfqC:function(U,X,x){"use strict";var I=x("q1tI"),_=x.n(I),O=x("TSYQ"),y=x.n(O);function v(K,F){var P="cannot "+K.method+" "+K.action+" "+F.status+"'",B=new Error(P);return B.status=F.status,B.method=K.method,B.url=K.action,B}function o(K){var F=K.responseText||K.response;if(!F)return F;try{return JSON.parse(F)}catch(P){return F}}function g(K){var F=new XMLHttpRequest;K.onProgress&&F.upload&&(F.upload.onprogress=function(re){re.total>0&&(re.percent=re.loaded/re.total*100),K.onProgress(re)});var P=new FormData;K.data&&Object.keys(K.data).forEach(function(J){var re=K.data[J];if(Array.isArray(re)){re.forEach(function(he){P.append(J+"[]",he)});return}P.append(J,K.data[J])}),K.file instanceof Blob?P.append(K.filename,K.file,K.file.name):P.append(K.filename,K.file),F.onerror=function(re){K.onError(re)},F.onload=function(){return F.status<200||F.status>=300?K.onError(v(K,F),o(F)):K.onSuccess(o(F),F)},F.open(K.method,K.action,!0),K.withCredentials&&"withCredentials"in F&&(F.withCredentials=!0);var B=K.headers||{};return B["X-Requested-With"]!==null&&F.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(B).forEach(function(J){B[J]!==null&&F.setRequestHeader(J,B[J])}),F.send(P),{abort:function(){F.abort()}}}var p=+new Date,d=0;function a(){return"rc-upload-"+p+"-"+ ++d}function n(K,F){return K.indexOf(F,K.length-F.length)!==-1}var s=function(K,F){if(K&&F){var P=Array.isArray(F)?F:F.split(","),B=K.name||"",J=K.type||"",re=J.replace(/\/.*$/,"");return P.some(function(he){var we=he.trim();return we.charAt(0)==="."?n(B.toLowerCase(),we.toLowerCase()):/\/\*$/.test(we)?re===we.replace(/\/.*$/,""):J===we})}return!0};function t(K,F){var P=K.createReader(),B=[];function J(){P.readEntries(function(re){var he=Array.prototype.slice.apply(re);B=B.concat(he);var we=!he.length;we?F(B):J()})}J()}var i=function(F,P,B){var J=function re(he,we){we=we||"",he.isFile?he.file(function(ke){B(ke)&&(he.fullPath&&!ke.webkitRelativePath&&(Object.defineProperties(ke,{webkitRelativePath:{writable:!0}}),ke.webkitRelativePath=he.fullPath.replace(/^\//,""),Object.defineProperties(ke,{webkitRelativePath:{writable:!1}})),P([ke]))}):he.isDirectory&&t(he,function(ke){ke.forEach(function(ne){re(ne,""+we+he.name+"/")})})};F.forEach(function(re){J(re.webkitGetAsEntry())})},e=i,r=Object.assign||function(K){for(var F=1;F<arguments.length;F++){var P=arguments[F];for(var B in P)Object.prototype.hasOwnProperty.call(P,B)&&(K[B]=P[B])}return K},c=function(){function K(F,P){var B=[],J=!0,re=!1,he=void 0;try{for(var we=F[Symbol.iterator](),ke;!(J=(ke=we.next()).done)&&!(B.push(ke.value),P&&B.length===P);J=!0);}catch(ne){re=!0,he=ne}finally{try{!J&&we.return&&we.return()}finally{if(re)throw he}}return B}return function(F,P){if(Array.isArray(F))return F;if(Symbol.iterator in Object(F))return K(F,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function K(F,P){for(var B=0;B<P.length;B++){var J=P[B];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(F,J.key,J)}}return function(F,P,B){return P&&K(F.prototype,P),B&&K(F,B),F}}();function f(K,F,P){return F in K?Object.defineProperty(K,F,{value:P,enumerable:!0,configurable:!0,writable:!0}):K[F]=P,K}function m(K,F){var P={};for(var B in K){if(F.indexOf(B)>=0)continue;if(!Object.prototype.hasOwnProperty.call(K,B))continue;P[B]=K[B]}return P}function l(K,F){if(!(K instanceof F))throw new TypeError("Cannot call a class as a function")}function E(K,F){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:K}function b(K,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);K.prototype=Object.create(F&&F.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(K,F):K.__proto__=F)}var D=function(F){return Object.keys(F).reduce(function(P,B){return(B.substr(0,5)==="data-"||B.substr(0,5)==="aria-"||B==="role")&&(P[B]=F[B]),P},{})},C=function(K){b(F,K);function F(){var P,B,J,re;l(this,F);for(var he=arguments.length,we=Array(he),ke=0;ke<he;ke++)we[ke]=arguments[ke];return re=(B=(J=E(this,(P=F.__proto__||Object.getPrototypeOf(F)).call.apply(P,[this].concat(we))),J),J.state={uid:a()},J.reqs={},J.onChange=function(ne){var Oe=ne.target.files;J.uploadFiles(Oe),J.reset()},J.onClick=function(ne){var Oe=J.fileInput;if(!Oe)return;var Ce=J.props,fe=Ce.children,oe=Ce.onClick;fe&&fe.type==="button"&&(Oe.parentNode.focus(),Oe.parentNode.querySelector("button").blur()),Oe.click(),oe&&oe(ne)},J.onKeyDown=function(ne){ne.key==="Enter"&&J.onClick()},J.onFileDrop=function(ne){var Oe=J.props.multiple;if(ne.preventDefault(),ne.type==="dragover")return;if(J.props.directory)e(Array.prototype.slice.call(ne.dataTransfer.items),J.uploadFiles,function(fe){return s(fe,J.props.accept)});else{var Ce=Array.prototype.slice.call(ne.dataTransfer.files).filter(function(fe){return s(fe,J.props.accept)});Oe===!1&&(Ce=Ce.slice(0,1)),J.uploadFiles(Ce)}},J.uploadFiles=function(ne){var Oe=Array.prototype.slice.call(ne);Oe.map(function(Ce){return Ce.uid=a(),Ce}).forEach(function(Ce){J.upload(Ce,Oe)})},J.saveFileInput=function(ne){J.fileInput=ne},B),E(J,re)}return u(F,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"upload",value:function(B,J){var re=this,he=this.props;if(!he.beforeUpload)return setTimeout(function(){return re.post(B)},0);var we=he.beforeUpload(B,J);we&&we.then?we.then(function(ke){var ne=Object.prototype.toString.call(ke);return ne==="[object File]"||ne==="[object Blob]"?re.post(ke):re.post(B)}).catch(function(ke){console.log(ke)}):we!==!1&&setTimeout(function(){return re.post(B)},0);return}},{key:"post",value:function(B){var J=this;if(!this._isMounted)return;var re=this.props,he=re.onStart,we=re.onProgress,ke=re.transformFile,ne=ke===void 0?function(Oe){return Oe}:ke;new Promise(function(Oe){var Ce=re.action;return typeof Ce=="function"&&(Ce=Ce(B)),Oe(Ce)}).then(function(Oe){var Ce=B.uid,fe=re.customRequest||g,oe=Promise.resolve(ne(B)).then(function(se){var be=re.data;return typeof be=="function"&&(be=be(se)),Promise.all([se,be])}).catch(function(se){console.error(se)});oe.then(function(se){var be=c(se,2),ie=be[0],de=be[1],Fe={action:Oe,filename:re.name,data:de,file:ie,headers:re.headers,withCredentials:re.withCredentials,method:re.method||"post",onProgress:we?function(ae){we(ae,B)}:null,onSuccess:function(Z,Y){delete J.reqs[Ce],re.onSuccess(Z,B,Y)},onError:function(Z,Y){delete J.reqs[Ce],re.onError(Z,Y,B)}};he(B),J.reqs[Ce]=fe(Fe)})})}},{key:"reset",value:function(){this.setState({uid:a()})}},{key:"abort",value:function(B){var J=this.reqs;if(B){var re=B;B&&B.uid&&(re=B.uid),J[re]&&J[re].abort&&J[re].abort(),delete J[re]}else Object.keys(J).forEach(function(he){J[he]&&J[he].abort&&J[he].abort(),delete J[he]})}},{key:"render",value:function(){var B,J=this.props,re=J.component,he=J.prefixCls,we=J.className,ke=J.disabled,ne=J.id,Oe=J.style,Ce=J.multiple,fe=J.accept,oe=J.children,se=J.directory,be=J.openFileDialogOnClick,ie=J.onMouseEnter,de=J.onMouseLeave,Fe=m(J,["component","prefixCls","className","disabled","id","style","multiple","accept","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"]),ae=y()((B={},f(B,he,!0),f(B,he+"-disabled",ke),f(B,we,we),B)),Z=ke?{}:{onClick:be?this.onClick:function(){},onKeyDown:be?this.onKeyDown:function(){},onMouseEnter:ie,onMouseLeave:de,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return _.a.createElement(re,r({},Z,{className:ae,role:"button",style:Oe}),_.a.createElement("input",r({},D(Fe),{id:ne,type:"file",ref:this.saveFileInput,onClick:function(q){return q.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:fe,directory:se?"directory":null,webkitdirectory:se?"webkitdirectory":null,multiple:Ce,onChange:this.onChange})),oe)}}]),F}(I.Component),w=C,S=Object.assign||function(K){for(var F=1;F<arguments.length;F++){var P=arguments[F];for(var B in P)Object.prototype.hasOwnProperty.call(P,B)&&(K[B]=P[B])}return K},A=function(){function K(F,P){for(var B=0;B<P.length;B++){var J=P[B];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(F,J.key,J)}}return function(F,P,B){return P&&K(F.prototype,P),B&&K(F,B),F}}();function R(K,F){if(!(K instanceof F))throw new TypeError("Cannot call a class as a function")}function k(K,F){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F&&(typeof F=="object"||typeof F=="function")?F:K}function L(K,F){if(typeof F!="function"&&F!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof F);K.prototype=Object.create(F&&F.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),F&&(Object.setPrototypeOf?Object.setPrototypeOf(K,F):K.__proto__=F)}function M(){}var G=function(K){L(F,K);function F(){var P,B,J,re;R(this,F);for(var he=arguments.length,we=Array(he),ke=0;ke<he;ke++)we[ke]=arguments[ke];return re=(B=(J=k(this,(P=F.__proto__||Object.getPrototypeOf(F)).call.apply(P,[this].concat(we))),J),J.saveUploader=function(ne){J.uploader=ne},B),k(J,re)}return A(F,[{key:"abort",value:function(B){this.uploader.abort(B)}},{key:"render",value:function(){return _.a.createElement(w,S({},this.props,{ref:this.saveUploader}))}}]),F}(I.Component);G.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:M,onError:M,onSuccess:M,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var W=G,N=X.a=W},Gytx:function(U,X){U.exports=function(I,_,O,y){var v=O?O.call(y,I,_):void 0;if(v!==void 0)return!!v;if(I===_)return!0;if(typeof I!="object"||!I||typeof _!="object"||!_)return!1;var o=Object.keys(I),g=Object.keys(_);if(o.length!==g.length)return!1;for(var p=Object.prototype.hasOwnProperty.bind(_),d=0;d<o.length;d++){var a=o[d];if(!p(a))return!1;var n=I[a],s=_[a];if(v=O?O.call(y,n,s,a):void 0,v===!1||v===void 0&&n!==s)return!1}return!0}},H4Hw:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAUFJREFUWEftWE1KxDAYzUsrRYqgOHtxIbgVPYJziB6g9AiewSOUFrprL+ERvIELca/MYihSbPMk4MAgDkkH2omQLtLF9/fy+sqXfBA/D0k0TXPedd1iGIZjknJjm+INQAVB8BlF0XuSJB8AqOtAL3meHwG4BHAyRXFTTpJrkq9Zln1BM1MUxdWhwGx9oXWapi+o63rRtu2FaRdz2OM4fkNVVdd938dzFDTVCMOwRVmWN1ML2ARkY9dC1/q5tQ2Yw88DMrH8fxkieU/yQQhxZtrlL/sKwCOAJ5s4a4aUUjrhqU3SP3xWUsqlTewYQM82CXf5SCnvbOI9IBNLniHPkP/LTBrwDHmGdjHgXHMVQiyVUvr4MbbjT3P82Fc7Y+Ose9nYxPv6e0Am5ty7KDp3lXZu2ODcOEaLzKmB1dbAyImR3jebF/Oh3a3UogAAAABJRU5ErkJggg=="},H65k:function(U,X,x){},HmJG:function(U,X,x){},HpTS:function(U,X,x){U.exports=x.p+"static/small_program.f74069ec.png"},I8Z2:function(U,X,x){"use strict";x.d(X,"a",function(){return y}),x.d(X,"b",function(){return t}),x.d(X,"c",function(){return e});var I=x("q1tI"),_=function(){var r=function(c,u){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var l in m)m.hasOwnProperty(l)&&(f[l]=m[l])},r(c,u)};return function(c,u){r(c,u);function f(){this.constructor=c}c.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}}(),O=I.createContext(null),y=function(r){_(c,r);function c(){return r!==null&&r.apply(this,arguments)||this}return c.prototype.render=function(){return I.createElement(O.Provider,{value:this.props.store},this.props.children)},c}(I.Component),v=x("Gytx"),o=x.n(v),g=x("2mql"),p=x.n(g),d=function(){var r=function(c,u){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,m){f.__proto__=m}||function(f,m){for(var l in m)m.hasOwnProperty(l)&&(f[l]=m[l])},r(c,u)};return function(c,u){r(c,u);function f(){this.constructor=c}c.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}}(),a=function(){return a=Object.assign||function(r){for(var c,u=1,f=arguments.length;u<f;u++){c=arguments[u];for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(r[m]=c[m])}return r},a.apply(this,arguments)};function n(r){return r.displayName||r.name||"Component"}var s=function(){return{}};function t(r,c){c===void 0&&(c={});var u=!!r,f=r||s;return function(l){var E=function(D){d(C,D);function C(w,S){var A=D.call(this,w,S)||this;return A.unsubscribe=null,A.handleChange=function(){if(!A.unsubscribe)return;var R=f(A.store.getState(),A.props);A.setState({subscribed:R})},A.store=A.context,A.state={subscribed:f(A.store.getState(),w),store:A.store,props:w},A}return C.getDerivedStateFromProps=function(w,S){return r&&r.length===2&&w!==S.props?{subscribed:f(S.store.getState(),w),props:w}:{props:w}},C.prototype.componentDidMount=function(){this.trySubscribe()},C.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},C.prototype.shouldComponentUpdate=function(w,S){return!o()(this.props,w)||!o()(this.state.subscribed,S.subscribed)},C.prototype.trySubscribe=function(){u&&(this.unsubscribe=this.store.subscribe(this.handleChange),this.handleChange())},C.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},C.prototype.render=function(){var w=a(a(a({},this.props),this.state.subscribed),{store:this.store});return I.createElement(l,a({},w,{ref:this.props.miniStoreForwardedRef}))},C.displayName="Connect("+n(l)+")",C.contextType=O,C}(I.Component);if(c.forwardRef){var b=I.forwardRef(function(D,C){return I.createElement(E,a({},D,{miniStoreForwardedRef:C}))});return p()(b,l)}return p()(E,l)}}var i=function(){return i=Object.assign||function(r){for(var c,u=1,f=arguments.length;u<f;u++){c=arguments[u];for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(r[m]=c[m])}return r},i.apply(this,arguments)};function e(r){var c=r,u=[];function f(E){c=i(i({},c),E);for(var b=0;b<u.length;b++)u[b]()}function m(){return c}function l(E){return u.push(E),function(){var D=u.indexOf(E);u.splice(D,1)}}return{setState:f,getState:m,subscribe:l}}},IBYe:function(U,X,x){"use strict";function I(_){return null}X.a=I},IWh4:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjczMUZFNjhCMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjczMUZFNjhDMDE3NzExRUJCOEU5RDg5RTZBOTI5QTU3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzMxRkU2ODkwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzMxRkU2OEEwMTc3MTFFQkI4RTlEODlFNkE5MjlBNTciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7zBaLcAAACAElEQVR42uzdzyvDcRzH8ffsZiVc/IjbkOTuShN/gXIgYi5y2AlpFBL/AAdLiXBgBwfUxplmyU2tRK4sTey0+H6+RbKD7Gtfb/V817t963t59Nnn9f58+7aap6LO/yq6KmN13OoJq1MehcD3erS6rUT0VrnVC5qBpgLagWXagQIQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAABUCD6Lbkr5L2W2uv9bS3LR4vd6iAb/9BaaBfa7K+oa8+0exEwmOheT5+UXnV9zd2SEHeztSU12ldw+2tjRLbH/X/lQbktqaansluwLtelPs85XKZmRFggN9eseMSbVJ9+Js2HHCizoHRwb7ZWN12V5VtYPaacJdOUmcJNy1o67QhLt6FheScNcfFkyqmxr9eoGHsWMZD8/qBCYvLmV4NCS5XE4f8PrmVnoHRySbzeoLyf1DWnr6huxPdWPGrJhZObOC6ga12Wtmz5m9p/Kom5yZt1Or8mFhbWNLIuubOh+3fjrrXAUWMutcAxY661wBOpl1RQc6nXVFBf7GrHMEPEskP65PE+d5901anc46R68+/rp4/QYQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAAECBAgQIECAAP8dMKMdGNcMNH9eMaUR+GR11Oo2q6/eBBgA/5+hicfO9/sAAAAASUVORK5CYII="},IZBM:function(U,X,x){"use strict";x.d(X,"n",function(){return a}),x.d(X,"o",function(){return n}),x.d(X,"k",function(){return s}),x.d(X,"H",function(){return t}),x.d(X,"j",function(){return i}),x.d(X,"L",function(){return e}),x.d(X,"G",function(){return r}),x.d(X,"B",function(){return c}),x.d(X,"D",function(){return u}),x.d(X,"g",function(){return f}),x.d(X,"s",function(){return m}),x.d(X,"i",function(){return l}),x.d(X,"l",function(){return E}),x.d(X,"z",function(){return C}),x.d(X,"m",function(){return w}),x.d(X,"x",function(){return S}),x.d(X,"y",function(){return A}),x.d(X,"e",function(){return R}),x.d(X,"E",function(){return k}),x.d(X,"F",function(){return L}),x.d(X,"C",function(){return M}),x.d(X,"K",function(){return G}),x.d(X,"p",function(){return W}),x.d(X,"q",function(){return N}),x.d(X,"r",function(){return K}),x.d(X,"u",function(){return F}),x.d(X,"I",function(){return P}),x.d(X,"c",function(){return B}),x.d(X,"d",function(){return J}),x.d(X,"a",function(){return re}),x.d(X,"t",function(){return he}),x.d(X,"f",function(){return we}),x.d(X,"A",function(){return ke}),x.d(X,"v",function(){return ne}),x.d(X,"J",function(){return Oe}),x.d(X,"b",function(){return Ce}),x.d(X,"h",function(){return oe}),x.d(X,"w",function(){return be});var I=x("9og8"),_=x("k1fw"),O=x("WmNS"),y=x.n(O),v=x("ErOA"),o=x("1vsH"),g,p,d=(g=Object(o.I)())!==null&&g!==void 0&&g.homework_common_id?{homework_common_id:(p=Object(o.I)())===null||p===void 0?void 0:p.homework_common_id}:{};function a(ae){return Object(v.c)("tasks/".concat(ae,".json"),d)}function n(ae){return Object(v.c)("myshixuns/".concat(ae,"/challenges.json"))}function s(ae,Z){return Object(v.c)("myshixuns/".concat(ae,"/subject_challenges.json"),Z)}function t(ae,Z,Y){return Object(v.c)("tasks/".concat(ae,"/star.json?shixun_id=").concat(Z,"&star=").concat(Y))}function i(ae,Z){return Object(v.c)("tasks/".concat(ae,"/rep_content.json"),Object(_.a)(Object(_.a)({},Z),d))}function e(ae,Z){return Object(v.f)("myshixuns/".concat(ae,"/update_file.json"),Z)}function r(ae,Z){return Object(v.c)("tasks/".concat(ae,"/reset_original_code.json"),Object(_.a)(Object(_.a)({},Z),d))}function c(ae,Z){return Object(v.f)("myshixuns/".concat(ae,"/reset_repository.json"),Z)}function u(ae,Z){return Object(v.c)("tasks/".concat(ae,"/reset_passed_code.json"),Object(_.a)(Object(_.a)({},Z),d))}function f(ae,Z){return Object(v.f)("tasks/".concat(ae,"/game_build.json"),Object(_.a)(Object(_.a)({},Z),d))}function m(ae,Z){return Object(v.c)("tasks/".concat(ae,"/game_status.json"),Object(_.a)(Object(_.a)({},Z),d))}function l(ae,Z){return Object(v.f)("tasks/".concat(ae,"/choose_build.json"),Object(_.a)(Object(_.a)({},Z),d))}function E(ae){return Object(v.c)("tasks/".concat(ae,"/picture_display.json"),d)}function b(ae,Z){return Object(v.c)("tasks/".concat(ae,"/cost_time.json"),Object(_.a)(Object(_.a)({},Z),d))}function D(ae,Z){return Object(v.c)("courses/".concat(ae,"/inform_detail.json"),Z)}function C(ae){return Object(v.f)("tasks/".concat(ae,"/plus_or_cancel_praise.json"))}function w(ae){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object(v.f)("myshixuns/".concat(ae,"/repository.json"),Z)}function S(ae,Z){return Object(v.c)("myshixuns/".concat(ae,"/start.json"),Z||{})}function A(ae,Z){return Object(v.c)("myshixuns/".concat(ae,"/start.json"),Z||{})}function R(ae){return Object(v.c)("myshixuns/".concat(ae,"/reset_pod.json"))}function k(ae){return Object(v.c)("myshixuns/".concat(ae.myshixunId,"/reset_pod.json"),{game_id:ae.game_id})}function L(ae){return Object(v.c)("myshixuns/".concat(ae.myshixunId,"/reset_pod.json"),{game_id:ae.game_id})}function M(ae){var Z=ae.myshixunId;return delete ae.myshixunId,Object(v.c)("myshixuns/".concat(Z,"/reset_pod.json"),Object(_.a)({game_id:ae.game_id},ae))}function G(ae){return Object(v.c)("tasks/".concat(ae,"/check_test_sets.json"))}function W(ae){return Object(v.c)("tasks/".concat(ae,"/get_answer_info.json"))}function N(ae){return Object(v.c)("tasks/".concat(ae,"/get_choose_answer.json"))}function K(ae){return Object(v.c)("tasks/".concat(ae,"/unlock_choose_answer.json"))}function F(ae,Z){return Object(v.c)("tasks/".concat(ae,"/unlock_answer.json?answer_id=").concat(Z))}function P(ae,Z,Y){return Object(v.f)("tasks/".concat(ae,"/set_games_status.json"),{result:Z,data:Y})}function B(ae,Z){return Object(v.c)("myshixuns/".concat(ae,"/active_pod.json?game_id=").concat(Z))}function J(ae,Z){return Object(v.a)("/api/myshixuns/".concat(ae,"/active_pod.json"),{method:"get",params:{template_id:window.sessionStorage.imageId||"",game_id:Z}})}function re(ae,Z){return Object(v.c)("myshixuns/".concat(ae,"/active_pod.json?game_id=").concat(Z))}function he(ae,Z){return Object(v.c)("tasks/".concat(ae,"/rank_list.json"),Z)}function we(ae,Z){return Object(v.f)("tasks/".concat(ae,"/close_windows_vnc.json"),{tpi_id:Z})}function ke(ae){return Object(v.c)("tasks/".concat(ae,"/pull_files.json"))}function ne(ae,Z){return Object(v.f)("tasks/".concat(ae,"/log_output"),Z)}function Oe(ae){return Object(v.c)("tasks/".concat(ae,"/stop_log_output.json"))}function Ce(ae){return fe.apply(this,arguments)}function fe(){return fe=Object(I.a)(y.a.mark(function ae(Z){return y.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.abrupt("return",Object(v.a)("/api/myshixuns/".concat(Z.id,"/add_file.json"),{method:"post",body:Z}));case 1:case"end":return q.stop()}},ae)})),fe.apply(this,arguments)}function oe(ae){return se.apply(this,arguments)}function se(){return se=Object(I.a)(y.a.mark(function ae(Z){return y.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.abrupt("return",Object(v.a)("/api/myshixuns/".concat(Z.id,"/delete_git_file.json"),{method:"Delete",body:Z}));case 1:case"end":return q.stop()}},ae)})),se.apply(this,arguments)}function be(ae){return ie.apply(this,arguments)}function ie(){return ie=Object(I.a)(y.a.mark(function ae(Z){return y.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.abrupt("return",Object(v.a)("/api/myshixuns/".concat(Z.id,"/mv_file.json"),{method:"post",body:Z}));case 1:case"end":return q.stop()}},ae)})),ie.apply(this,arguments)}function de(ae){return Fe.apply(this,arguments)}function Fe(){return Fe=Object(I.a)(y.a.mark(function ae(Z){return y.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:return q.abrupt("return",Object(v.a)("/api/tasks/".concat(Z.id,"/rep_content.json"),{method:"get",params:Z}));case 1:case"end":return q.stop()}},ae)})),Fe.apply(this,arguments)}},Ib8C:function(U,X,x){(function(I){(function(_,O){U.exports=X=O()})(this,function(){var _=_||function(O,y){var v;if(typeof window!="undefined"&&window.crypto&&(v=window.crypto),typeof self!="undefined"&&self.crypto&&(v=self.crypto),typeof globalThis!="undefined"&&globalThis.crypto&&(v=globalThis.crypto),!v&&typeof window!="undefined"&&window.msCrypto&&(v=window.msCrypto),!v&&typeof I!="undefined"&&I.crypto&&(v=I.crypto),!v&&!0)try{v=x(4)}catch(f){}var o=function(){if(v){if(typeof v.getRandomValues=="function")try{return v.getRandomValues(new Uint32Array(1))[0]}catch(f){}if(typeof v.randomBytes=="function")try{return v.randomBytes(4).readInt32LE()}catch(f){}}throw new Error("Native crypto module could not be used to get secure random number.")},g=Object.create||function(){function f(){}return function(m){var l;return f.prototype=m,l=new f,f.prototype=null,l}}(),p={},d=p.lib={},a=d.Base=function(){return{extend:function(f){var m=g(this);return f&&m.mixIn(f),(!m.hasOwnProperty("init")||this.init===m.init)&&(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var f=this.extend();return f.init.apply(f,arguments),f},init:function(){},mixIn:function(f){for(var m in f)f.hasOwnProperty(m)&&(this[m]=f[m]);f.hasOwnProperty("toString")&&(this.toString=f.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),n=d.WordArray=a.extend({init:function(f,m){f=this.words=f||[],m!=y?this.sigBytes=m:this.sigBytes=f.length*4},toString:function(f){return(f||t).stringify(this)},concat:function(f){var m=this.words,l=f.words,E=this.sigBytes,b=f.sigBytes;if(this.clamp(),E%4)for(var D=0;D<b;D++){var C=l[D>>>2]>>>24-D%4*8&255;m[E+D>>>2]|=C<<24-(E+D)%4*8}else for(var w=0;w<b;w+=4)m[E+w>>>2]=l[w>>>2];return this.sigBytes+=b,this},clamp:function(){var f=this.words,m=this.sigBytes;f[m>>>2]&=4294967295<<32-m%4*8,f.length=O.ceil(m/4)},clone:function(){var f=a.clone.call(this);return f.words=this.words.slice(0),f},random:function(f){for(var m=[],l=0;l<f;l+=4)m.push(o());return new n.init(m,f)}}),s=p.enc={},t=s.Hex={stringify:function(f){for(var m=f.words,l=f.sigBytes,E=[],b=0;b<l;b++){var D=m[b>>>2]>>>24-b%4*8&255;E.push((D>>>4).toString(16)),E.push((D&15).toString(16))}return E.join("")},parse:function(f){for(var m=f.length,l=[],E=0;E<m;E+=2)l[E>>>3]|=parseInt(f.substr(E,2),16)<<24-E%8*4;return new n.init(l,m/2)}},i=s.Latin1={stringify:function(f){for(var m=f.words,l=f.sigBytes,E=[],b=0;b<l;b++){var D=m[b>>>2]>>>24-b%4*8&255;E.push(String.fromCharCode(D))}return E.join("")},parse:function(f){for(var m=f.length,l=[],E=0;E<m;E++)l[E>>>2]|=(f.charCodeAt(E)&255)<<24-E%4*8;return new n.init(l,m)}},e=s.Utf8={stringify:function(f){try{return decodeURIComponent(escape(i.stringify(f)))}catch(m){throw new Error("Malformed UTF-8 data")}},parse:function(f){return i.parse(unescape(encodeURIComponent(f)))}},r=d.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new n.init,this._nDataBytes=0},_append:function(f){typeof f=="string"&&(f=e.parse(f)),this._data.concat(f),this._nDataBytes+=f.sigBytes},_process:function(f){var m,l=this._data,E=l.words,b=l.sigBytes,D=this.blockSize,C=D*4,w=b/C;f?w=O.ceil(w):w=O.max((w|0)-this._minBufferSize,0);var S=w*D,A=O.min(S*4,b);if(S){for(var R=0;R<S;R+=D)this._doProcessBlock(E,R);m=E.splice(0,S),l.sigBytes-=A}return new n.init(m,A)},clone:function(){var f=a.clone.call(this);return f._data=this._data.clone(),f},_minBufferSize:0}),c=d.Hasher=r.extend({cfg:a.extend(),init:function(f){this.cfg=this.cfg.extend(f),this.reset()},reset:function(){r.reset.call(this),this._doReset()},update:function(f){return this._append(f),this._process(),this},finalize:function(f){f&&this._append(f);var m=this._doFinalize();return m},blockSize:512/32,_createHelper:function(f){return function(m,l){return new f.init(l).finalize(m)}},_createHmacHelper:function(f){return function(m,l){return new u.HMAC.init(f,l).finalize(m)}}}),u=p.algo={};return p}(Math);return _})}).call(this,x("IyRk"))},ItS6:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=x("eP3c"),_=O(x("1q3G"));function O(p){return p&&p.__esModule?p:{default:p}}function y(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function v(p,d){for(var a=0;a<d.length;a++){var n=d[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function o(p,d,a){return d&&v(p.prototype,d),a&&v(p,a),p}var g=function(){function p(){y(this,p),this.strm=new _.default,this.chunkSize=1024*10*10,this.strm.output=new Uint8Array(this.chunkSize),this.windowBits=5,(0,I.inflateInit)(this.strm,this.windowBits)}return o(p,[{key:"setInput",value:function(a){a?(this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0):(this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0)}},{key:"inflate",value:function(a){a>this.chunkSize&&(this.chunkSize=a,this.strm.output=new Uint8Array(this.chunkSize)),this.strm.next_out=0,this.strm.avail_out=a;var n=(0,I.inflate)(this.strm,0);if(n<0)throw new Error("zlib inflate failed");if(this.strm.next_out!=a)throw new Error("Incomplete zlib block");return new Uint8Array(this.strm.output.buffer,0,this.strm.next_out)}},{key:"reset",value:function(){(0,I.inflateReset)(this.strm)}}]),p}();X.default=g},IxHN:function(U,X,x){"use strict";var I=x("q1tI"),_=x.n(I),O=x("07cG"),y=x.n(O);X.a=function(v){var o=v.message,g=v.className,p=v.children,d=v.style,a=d===void 0?{}:d;return _.a.createElement("div",{className:"".concat(y.a.idsRingWrapper," ").concat(g)},_.a.createElement("div",{className:y.a.ldsRing},_.a.createElement("div",null),_.a.createElement("div",null),_.a.createElement("div",null),_.a.createElement("div",null)),o?_.a.createElement("p",{style:a},o):null,p)}},J66h:function(U,X,x){(function(I){var _,O;(function(y,v){U.exports=v(y)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof I!="undefined"?I:this,function(y){"use strict";y=y||{};var v=y.Base64,o="2.6.4",g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=function(M){for(var G={},W=0,N=M.length;W<N;W++)G[M.charAt(W)]=W;return G}(g),d=String.fromCharCode,a=function(M){if(M.length<2){var G=M.charCodeAt(0);return G<128?M:G<2048?d(192|G>>>6)+d(128|G&63):d(224|G>>>12&15)+d(128|G>>>6&63)+d(128|G&63)}else{var G=65536+(M.charCodeAt(0)-55296)*1024+(M.charCodeAt(1)-56320);return d(240|G>>>18&7)+d(128|G>>>12&63)+d(128|G>>>6&63)+d(128|G&63)}},n=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,s=function(M){return M.replace(n,a)},t=function(M){var G=[0,2,1][M.length%3],W=M.charCodeAt(0)<<16|(M.length>1?M.charCodeAt(1):0)<<8|(M.length>2?M.charCodeAt(2):0),N=[g.charAt(W>>>18),g.charAt(W>>>12&63),G>=2?"=":g.charAt(W>>>6&63),G>=1?"=":g.charAt(W&63)];return N.join("")},i=y.btoa&&typeof y.btoa=="function"?function(M){return y.btoa(M)}:function(M){if(M.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return M.replace(/[\s\S]{1,3}/g,t)},e=function(M){return i(s(String(M)))},r=function(M){return M.replace(/[+\/]/g,function(G){return G=="+"?"-":"_"}).replace(/=/g,"")},c=function(M,G){return G?r(e(M)):e(M)},u=function(M){return c(M,!0)},f;y.Uint8Array&&(f=function(M,G){for(var W="",N=0,K=M.length;N<K;N+=3){var F=M[N],P=M[N+1],B=M[N+2],J=F<<16|P<<8|B;W+=g.charAt(J>>>18)+g.charAt(J>>>12&63)+(typeof P!="undefined"?g.charAt(J>>>6&63):"=")+(typeof B!="undefined"?g.charAt(J&63):"=")}return G?r(W):W});var m=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,l=function(M){switch(M.length){case 4:var G=(7&M.charCodeAt(0))<<18|(63&M.charCodeAt(1))<<12|(63&M.charCodeAt(2))<<6|63&M.charCodeAt(3),W=G-65536;return d((W>>>10)+55296)+d((W&1023)+56320);case 3:return d((15&M.charCodeAt(0))<<12|(63&M.charCodeAt(1))<<6|63&M.charCodeAt(2));default:return d((31&M.charCodeAt(0))<<6|63&M.charCodeAt(1))}},E=function(M){return M.replace(m,l)},b=function(M){var G=M.length,W=G%4,N=(G>0?p[M.charAt(0)]<<18:0)|(G>1?p[M.charAt(1)]<<12:0)|(G>2?p[M.charAt(2)]<<6:0)|(G>3?p[M.charAt(3)]:0),K=[d(N>>>16),d(N>>>8&255),d(N&255)];return K.length-=[0,0,2,1][W],K.join("")},D=y.atob&&typeof y.atob=="function"?function(M){return y.atob(M)}:function(M){return M.replace(/\S{1,4}/g,b)},C=function(M){return D(String(M).replace(/[^A-Za-z0-9\+\/]/g,""))},w=function(M){return E(D(M))},S=function(M){return String(M).replace(/[-_]/g,function(G){return G=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},A=function(M){return w(S(M))},R;y.Uint8Array&&(R=function(M){return Uint8Array.from(C(S(M)),function(G){return G.charCodeAt(0)})});var k=function(){var M=y.Base64;return y.Base64=v,M};if(y.Base64={VERSION:o,atob:C,btoa:i,fromBase64:A,toBase64:c,utob:s,encode:c,encodeURI:u,btou:E,decode:A,noConflict:k,fromUint8Array:f,toUint8Array:R},typeof Object.defineProperty=="function"){var L=function(M){return{value:M,enumerable:!1,writable:!0,configurable:!0}};y.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",L(function(){return A(this)})),Object.defineProperty(String.prototype,"toBase64",L(function(M){return c(this,M)})),Object.defineProperty(String.prototype,"toBase64URI",L(function(){return c(this,!0)}))}}return y.Meteor&&(Base64=y.Base64),U.exports?U.exports.Base64=y.Base64:!(_=[],O=function(){return y.Base64}.apply(X,_),O!==void 0&&(U.exports=O)),{Base64:y.Base64}})}).call(this,x("IyRk"))},JSwD:function(U,X,x){"use strict";function I(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(u){return typeof u}:I=function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},I(r)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=e;var _=y(x("6BzB"));function O(){if(typeof WeakMap!="function")return null;var r=new WeakMap;return O=function(){return r},r}function y(r){if(r&&r.__esModule)return r;if(r===null||I(r)!=="object"&&typeof r!="function")return{default:r};var c=O();if(c&&c.has(r))return c.get(r);var u={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var m in r)if(Object.prototype.hasOwnProperty.call(r,m)){var l=f?Object.getOwnPropertyDescriptor(r,m):null;l&&(l.get||l.set)?Object.defineProperty(u,m,l):u[m]=r[m]}return u.default=r,c&&c.set(r,u),u}var v=15,o=852,g=592,p=0,d=1,a=2,n=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],s=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],t=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],i=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function e(r,c,u,f,m,l,E,b){var D=b.bits,C=0,w=0,S=0,A=0,R=0,k=0,L=0,M=0,G=0,W=0,N,K,F,P,B,J=null,re=0,he,we=new _.Buf16(v+1),ke=new _.Buf16(v+1),ne=null,Oe=0,Ce,fe,oe;for(C=0;C<=v;C++)we[C]=0;for(w=0;w<f;w++)we[c[u+w]]++;for(R=D,A=v;A>=1&&!(we[A]!==0);A--);if(R>A&&(R=A),A===0)return m[l++]=1<<24|64<<16|0,m[l++]=1<<24|64<<16|0,b.bits=1,0;for(S=1;S<A&&!(we[S]!==0);S++);for(R<S&&(R=S),M=1,C=1;C<=v;C++)if(M<<=1,M-=we[C],M<0)return-1;if(M>0&&(r===p||A!==1))return-1;for(ke[1]=0,C=1;C<v;C++)ke[C+1]=ke[C]+we[C];for(w=0;w<f;w++)c[u+w]!==0&&(E[ke[c[u+w]]++]=w);if(r===p?(J=ne=E,he=19):r===d?(J=n,re-=257,ne=s,Oe-=257,he=256):(J=t,ne=i,he=-1),W=0,w=0,C=S,B=l,k=R,L=0,F=-1,G=1<<R,P=G-1,r===d&&G>o||r===a&&G>g)return 1;for(;;){Ce=C-L,E[w]<he?(fe=0,oe=E[w]):E[w]>he?(fe=ne[Oe+E[w]],oe=J[re+E[w]]):(fe=32+64,oe=0),N=1<<C-L,K=1<<k,S=K;do K-=N,m[B+(W>>L)+K]=Ce<<24|fe<<16|oe|0;while(K!==0);for(N=1<<C-1;W&N;)N>>=1;if(N!==0?(W&=N-1,W+=N):W=0,w++,--we[C]===0){if(C===A)break;C=c[u+E[w]]}if(C>R&&(W&P)!==F){for(L===0&&(L=R),B+=S,k=C-L,M=1<<k;k+L<A&&!(M-=we[k+L],M<=0);)k++,M<<=1;if(G+=1<<k,r===d&&G>o||r===a&&G>g)return 1;F=W&P,m[F]=R<<24|k<<16|B-l|0}}return W!==0&&(m[B+W]=C-L<<24|64<<16|0),b.bits=R,0}},JWDV:function(U,X,x){U.exports=x.p+"static/charpter-white.5fa14f93.svg"},JeFH:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGgAAAAwCAYAAAD9wT87AAAe2UlEQVR4XtVcB5QUVbr+blV1T+ieGWaYBAwgOSgooJLjENeA6a2KCVfZNbum3VXXsG9VdFfc1TXtGlfXLCKgEiRnUAHJWRzAyTl3V9V957vV1dPTM+M4Hn2Pd8/xIHRV9f3vn77/+/9qgVaWlHIggHMB+AA8K4TIbe2ek/FzKWUmgLGw7THQtLlCiBUn4z6j9ySa26SUMg3A+ZDyaljBMTC87mXrAUwSQtT+fxBOSqmbpjnaMIyrYJnToRvtQ/sOAJgihFh1ssvRSEFSysEAroJlXQZdp8VhXUEAS07UYGavBPSIQz10vacQ4vjJLJiUMgPAhZByJoQYyr0erZFYmFOFZK+GK7szGOB3Qoi/nsxycG9KQVLKKyDltbDMbBge5NYD87+twvxjNdhbZiIoJZZMysRpPqsShreXECL/ZBRMSjkAwM2wzIugG2k2gOW59fjgaDU2FNbjRI2Fm/r48eigdtz+TUKIF05GOSL3JKSUDwN4SALYXBRQwqzIrUNBvQ1DAIYm4BHAJxMz0TPOLoJu9BFClJxsglVVVWXGx8d/IYTIOl4rsSCnGvNzarCvIghLAl5NoN6WuKVPAu4dkMjtXyuEeP1kk6NJDpJSHgTQ8+Ht5Xj5UBWoqBhNQAsFP/6dwi2alIlTYq1caEY/IUT5zyGYlLIvgD4AugLIgm0zF3qgaccDgcCbMTExu1v6Xinl6YDc/lWxiWvWF6E04BiYxxUEQK0lcUe/BNx9qlLQFUKIt38mOVIAnA6gG4AugM104Qe0ajo1gA+FEHTwVhc96CoAbzy9txJP7KpAPKWKWFRQrCawZEoHZHnN4yEFVbX65DZeIKW8DVI+DiHimrtVSnlCCDFUCHGihc+TYJl7jwf1DlOW5KHWltCiLqSCfndqIm7vlwDLsi41DOP9Nm6z1cullL0BLATAP1tavxZCvNTqw5iDpJSnwrZ2rC60tKvXFTayOCc/AXGGwNIpHdDRCOZA9/QXQtASfrIlpdQg5TYpxMDXDlVhf7mJ/DoLZQEbNabEnf0TMbVTLL+PCHJZy15kL5EQk6ctK8De8mATWaige09LxC19lYIuMQxj7k8mROhBUsrbAfydOW/pd3XIr7VQXG+jImjjtHYePHlmMmDb7wpdv/yHfDcV5Idt7c0NalmTl+Sh2pTh8OYqiF5FBXXwWEeh6acKIWp+yMPbco2U9icS4pyJSwuwsywQDrM1lsQDA5JwW78EPu4iIcS8lhUkHwfw+1s3l2LesRrE6o2jARV032mJuLlv689qy94bRRwpL2YIe3F/Fe7bVqYiEqMs82CvBAOrpmQA0vpUaAZry1ZXCMXZS22ISVM/L8CBSlPFbnfRg/53FCQfAXD/7VtKMTen4XB5qDf38eO+AUm0+usMw3j1exR0GYB3nttXicd2VSDu/0ZB/WCZuzaU2NqMNYUKZHFRQR3jdKyclgGvZa0XhjGqVe2EYbZlzYGm3fmbjSX47EQtYiIEaxTiPNa3IQ/6SUOc46nyUgDvRh8uFXRlNx+eGKKg8d1CiDktCRYIBM7wGPrW5flBce36IgVuIldkiANwsRDiox9ySG25RkqZEIpInRiRGKKFAGwJtPNqWD4tE8nC3AXNOEMIYbX2bLcOugbA63N2V+CpvZWNLK8RSPCYx6ErFPdzgIRBsK2tn+ebuG5Dw+HWWRLnZsXhxWEERnhMCHH/93hQMqzggaP1RuovPs9TsDpSRZEgAcAvhRAftHZAP+ZzadurLCHGTl5agMNVTkRyz3HxlA7o7LVyoOk/KJe7ChoKyE0Lj9fhpk0ljT0oBLs/m9QBp8SYuSEF/eQwW0oZDyuYc7BWb3/usjyY0qmiA7bEqLQYvD0mlWf1ohDixu9RkICUGwJCDJu4OB/HaixERrn/RZj9NIDbZq4vxvLcOnWeVBBR5fzsTPT3WaXQPb2FEEWtGYBSUHV1dYd4r+fA7hrNf8HyfBCgu5bHB//UhaqUkoVIOoBhAPrRBmzbLtSAWyul1mnSkjzk19nqcIO2xMBkLxZOSCP6eU/oOvNMRI6UQgjBbaolpXwZwHUz1hRhXWF9ozBHBf2UhaqUMgYA+T3Wb8Nh2+2haWUASDBf/PDX5XjpYFU4ItHo3hmThuFJMgiPt4sQIu/7ZOFnrgcZsO3tFdBOzV6Up2BhZKFKzX+cnYFTfXZFdV2gt9/v/1FUjySdBDkLltUVUqbD8BjRFsRYfeGqQmwvCSiYTKG6+XR8PjkDBuQ2CLEItt0NQrSDgAe2TIG0bWh6IYTYzLINwB/u31qG149UNwrXVND1Pf340xlJ/NofTfXU19f39Xq9s2Gb/WHLTjA8ityLXm8crsa928rCe6i3JF4a3h5TM3UJ3fMEbDsTQhB3xwOaH9KKhRAVEPpRAK8KIdaEQ7S07XkQ4oJzlxcqmBtZgfPQPhiXjiGJdn2IizvWmmtGfy6lZFW9RwKxJC4Lak10idPw6M5yFNbb+GXXeFzcNV7ddsvmEnx8rFbBZKKf9FgNi7LTkRLTUHrSy/k3opWgDSRqzt8BnABkp1cPVeOB7eVNFBQBOO4RQjzZVjlCXsrcdUlREDhaaSIzVmDZd3X49EQtuvkN/On0JFU7rs6rw9Xri8NnSQN5cnA7XO6QtY0WQ0CpBcTrjoUBKCAb0aAgKWfT8m7cVIKFx53DcRfDzH9Gp2F0CiQML0HC/rYKpmgcK7hnY4kUV68rUjH53yPb456vSrG33MRV3X145uxk9di/7KrA0/scsELj8BsCn2WnI8unozJo48ZNpThYaeLBgYnYWFiPuTm1qgh8a0wqvJBFsILJK4ulPnNdUSNDI+C4oHMcnh2qAMd/CyEeaqscIQV9CuAXF64sxLqCekUd8bQe31WBjDgNyyZloFO8joMVJs5fUYiAdMAKEd0fByTiJqcOwz8PVOH1w1U4MyUGl54Shxs3l6qQPOesZIzLYItHnBGpoGvpVpGH426ervmv4e0xrRNDrhgshNjWVsEU/LTMfTlBvePUJXmqsv7nsBS8eaQaq/LrMSkzFm+Odto17x2twV1fliojoSKJguaPT0PfJI8SctLnBYoE/duZyYoxeOVQNXonGlg5NQMeKbfBtjKP1GkdiOSCIbDB51KOiR1i8dpI9T1/F0Lc0VY5Qgr6C4B7fr2xRBXE/9UlHqPSY3DP1jL4DIF549JwajuPYkKmLisI51N6ENn0+weoEKsMcfaucozJiFVsyTXrihXyZBg8t5MHEPrASAWNAbD6g6M1uCN0OO7m+WAexi9PUSFoLGPjjxLMNldYQh9PtmBPWQCzB7XDzrIg3jlag8EpHiwYn6YKu/UF9bhibTGMUMyiF707JhVnp3ph2sD0lYX4orgejw9uh5wqCy8erELfRAMrpmRAk3I5YPtroA9lPs0LgQ3ul4hwWGoM3h+bSsDxutB1GmWbl5TySgBv/m1PpTrg4WkxuKG3Hzdsckj+N0elYkxGjArPF6wsxI5SJ2XwHGd08+GvTk2Hlw86bMPZqTGKgmI4DNAZRrTHtEwD0IwBkQrqBjO4f0s5PJeuLmwCTx8+PQmzevn53POFECQD27yklH8D8NvrNhRj/rFaxSxz46y9uvsNLMpOQ5JXw+FKE+etKAzXMTzYV4a3x6SOTnS+bE0RluXW4bFB7VBYZ+Mf+yrRN8nAyikZENL6BEJUAtrl01cUYnvocHgfQzUtm+ESkB8LoV3YZiEcpDgYtvXVkrwgfrWhGF19BmYPSsJvNpWi0rTxzFnJ4XxKL1sUKv7pwdM6xeFfw1WIxYff1uCWLaUYlOzBg6cn4ep1xUqJLzUo6LRIBfnJBp8IGllTluaiNlQB80G86bd9E3DPaYqmv0YI8caPFGwmgNfo2k/srsDlp8Qr6/n91jKkxmjq4Dr79CahgbnjqQYPBhmPD3Nq8OczklAdlHhyTwX6JXlCCpLzIcQOAA+wplsQkU9p0V18uvI0XVqrhWaM+5FyJMMyD3xTr6VOXZoHQwhVSN/5ZamqvR6MyDN/+roc/wpB7UYeDCgjo1JoNGwiXrWuSHGhLSlIwLLWB3R9+ITF+ar76OIEKmhmD5/bibxTCEFPaPOSUp4FaW9ZeCKAK9cWIjszFtf38mPWphIFBOaOS1PJngfJ5LorhCb5/Q8NTMKveysPxj1fluLFA1UqxFF5j+wsR/8kD9ZOy2SIWwCHwnl99s4KPLu/gRlhqGwf49AticLeAaExn7ZKt0QLKqXkWa0L6vqIMZ/l43BVEO+NTsXsXRXYURpU3OEDpzt55pWDVXjwawdN0oO5zwUT0lTk2FJUjwtWFqFPoqFY7l+uLkKVaePVkak4p0NUiOPDpGW9BU2bcdGqQnxV3AC1eQjnd47D8w76mS2EuK/N2nFCQxos8+CROi3pmT3lGJcRi3GZMThQEYTf0NAtwQjDYoaOz79zqnAq6Na+CfiD48F4dl8l3v6mBvcPSFR55aUDVciM1/HyiPZU0GIIQVZ7Fa8hSnRJUwIO/j97W508P5xuaU5WaVkvQdOuZzTgc6/p4VP1I/dDUjQjTle3LT5Ri1kbHXaGhpcVr6tQ7vdoCuUxb9Eo7+yfgPu3laOo3sJ9A5MwJt3DQqIBxSkFSevPgPbHyDqE/67olvQYvD1a0S0vCyFm/UgFMe0vAHBOa/f/cVsZXjvsFJqKMO3uwxODneRKS9SEaJQnSeqSlARAmuVvsM0ja4tsjZ7q1nSN6Ra7HLpBuoX1RpuXlJKMxluhcqzF+1lwX7LaKSu4Rw6tUEHpcboqIUwpm5C6vFYA3wEYFD3Vo6B2dGhwkqsXn2Wn8VsWCE2b3maJQjdIy3oWmnbzoUoTu0sD4J8Mp2VBG+MzY1U9xPX8/ipVxFJBTK6/6BSHf4aSKwWl0tgrMm2pckCiV7iCPsueECwz51Cd3v6cz3PDvB6fy+v/MyYNo5Jhw/D2FUKw5d/mFQgEzvZ4PBtKA7bOsMYocLTKVF6UYGi4f2CiYq+P11j4xfICVAUdVpvjBJ9MSEP3BIdEoWyUg+iNy+fRVLiHo6Ah0QrKZu76z5Fqlbjd0MB7WXitmJoBr5QbhaaNaLNEroKkZKv3+ivWOkhMF05Di0ZwVmqMgtr8+8c5DsJhLUQPJpR9zyFMwVKAwIAWqLwJAt0SdLwxJg0+2NugaUMh7a8qpDYgmrpiuH5uaAqmdyYiFMOEQw+1eUkpR3IqjWiUYcqlxnig3Ne8cakYmhajCutpywuVEfIafv7h2FSckeLF8WoLszYWozhgKzaEi2TJY4OSMaFDDEzTHButIDabdq8sssQ16xoof35hokdg2bQOSBXBQ8Lw9mqzRA0Kuo1h6IHtZSAdE2kEGaR0JqarMECGYMba4jBhyuRKwpR10ltHqnHXV2WID6EY7o/UysppHZCpBQ/C8PRh11IKfdoUNiErzHBNRc8jFUNwYprmVI/Hs+THyCKl7MjWxs4qzXfhinwVwtzD5HfMGZKMy7rFK2WRcXDhPg3qjVGpGJsRg9waC5OXFaAiKMPhmt7E8uFXPX1sUJ4TraBUwsd9NVry+cvyQHjDC9xqfmF2Jnr7ZAU0/WYyF5ZlBXVdZ+uBtHkhgJLWUJGUcjyAFe+G2ILIBO4RAgsmpKJ3ogeHKkyct7IAAduxSCZXwvAEj8CSUOL1hhTkTh4tntwBXY3AMeGN6SKlfB7AjVeuLcaagrpwnHc6tAm4zxm9eoZgIiQiaT1WmoW5ublFHTt2/N62vpTSoJdWSW1g9uI8VY+5XsTvuK1vAn4fAjXXbyjGkhDgoQeTaiLlRDZl2rJCfFcbgZhNiQcGJuGGPgqxXhKtIC9sc0exbfSZuCgX5cGG+QTGblbgrFuaLCtILZZBEzmAthuatgXAJgC7opt7UsosWOb+rytF/EUr8xs11BTnNyoVozNiUFRnYeryQpTUO77PeM7kSnS0pSigilXG9EgD+nRSB/SMDeZB92ax+0p67O4vy/Du0eowt8jDu7RrPJ46y+H9Gi9m7WA9OH+uaQcgxVZo2kYAXzU3TSSl/A/Ht/5rdRE2FzW0NqiECzvH4x9Dne+4f1sZXncBjynxyKAkXNvTr8IzywnSVW5rnB70+9DkkRoNa7LFEB2TvSQfR6ut8HwCFXR1D78q9MgxsQ3AhMeDIyLJ8nnQJUFHsoMunWWrIRNO4XDQYzWngVQNIe2vK0P5gUx2ZL311JBkXNotXiXPc1YUKhDBz0kiMrn2SDAUPD1vRUGYZ6MH8WvnT8xEvzirCIansxr9Bd5+anclntxbEQ6HlKN/Oy+u6BavWHQeJnOyz9CQGqujY7yBLgkecIgozJ1bZiU0fSOEmA/gUyHEtxRPSnkngDkPbCvHq4cb+j7MmUNDlBIP+B97SQk5I200kDv7JeAuZzYPl68pwvqIvlXU5zObKsiy3oCmXXXxKvJdgUYQkBqnYoii3EUrpiAMN0keTYUi4nomyKEZcch05+5tcz804zXCdABPsKl2yaoibClusDxu7u7+ibijv8P2snDbVFQfhslMroNSvMirtVTiLQ84YcWN//MmZGCAzy6F4ekCgHPmq9/5pgZ3R9RCym4kFI0ULQc/Y5jlQTIf9kr04Mz2XgzPiMOApJDlUVm6MS8YDD7r8XiINFa/d7RGuOQun+H2sBiSmRvfP1qjWAYCnqiiHzdvLlG0l9s9iKr5rm+qIOlM1xCZfBLVdmgmJoT/ycX5lnSUyAezah+c4sW5WfGY2iUOPgVx7G+gaXyFZURkrcMHcXNXdPPhLyEy8abNJVgQ2jyN4/WR7RUUJ2SdtrxAQVh6l2svH43PwOl+uxyGh72nNNjmvpWFtrhmXWGTWqM1WYhc6W18NsEIPZdM+PSufvTya4AVtKF7lsK2sr8utz00aNdQ3AERNySvyqvDNaG+ED32vKw4vODMWOCh0ESvm4sV493bj/sHKibixuYUdAOAF6Lbtc0JFIlcmvvchcG8jo2sy06Jx8zeCfCFYke0dTOsTciMxb9HOW0HjiO/dMgJHRTs6RAJGc0Su8Yxd3w6BiXKSuieHirxm8HDe2q0xOlRbfwmYT0CgbUkJ5VFKEwyl3u8oU8CBrRzapnSehtTlxegIMScu6Dq4/FpiiPcWRoE2RlmUxrayLQYvBMqGUj0so8UqaAbeoWpojuaU9D5DOccvPtzqFBsbtOM26xhyoO2StbMEU0eFnEjvYqxmXCZMHdkeoxqa7PKdhc3f1o7L+YTTgsWq5V4dKez+Wg+jiTjyvw6lQe5qDR2fc9MlNUwPD0BFMO29hVYeveJi3OV10VNYYW/l8+vNKkAp6qPGqdrJD4Pn8aSYAjF7nOgkgn+stVF2BgBFKhQth0IeFjvqGLVlGCEcUqGdAX93/3GKRkiFeS25W3bvrc5BZ0NyM3zcupw65aSJtOZ7mEwRr8wNEX1c5Z8V4ttJQGF+qIH1qOVSyUxIb86IgUDkr3IXpoftjx3uI+MBS2VdPxvv2iI3bf2ScAfHHiMO74oxQffNgw48t73xqbj7CS7FoaX7zB9J01zY0DXh41flN8IykbuiV5Lqp9Tn5wJZIf0WLXDn5IiakmpjA40mut6+vDIoHaNvJ33Rno8cyVzZm6t81wW/Qx/CR5NFevkHd0ZPj7zVz39iqlnBGxOQd3ZF9pQCmPGmoIw/IsUyn0Dgl/S1e+4OamOJSfqlJD7Kkz1by1ZIjcxOdTZvDTC8sLt7YnpCmxExu7oZtdjO8rx3IHGEzPvjk3DsCRZF1LQCWnbH0GIC5ubs3DlIay9JwKYENZTSQuP1SqPYK0SPQDp3suQReiwYnK6Ipdd5oOfc78kc2/qk6A8k/0twmlGHRofzy4zTse24gAuWeNEESqD913bw1E6gEeaU1AKK+QDofk0WmZzoYskH2sWkqiRix7yRVFAdQpzqhvPpbnXEUGNSY/BW6NTG1meS2Z+NC4NA5I9qhN58aoiFbvJVU3uGItXRjj5iQz2wzsahkIYUt4Zm47h7WR4sEVKSV7uZhUO8xxmPHrR0i/uEo+nQ/MQkZ/nVJsKIr//bU2TQXxe5+6XHs9zohLckTUe9KyefjzseEIYTtMrvRoUpUWU+E2liXNXFKIuNGTJ+8iMk00g2m1OQSxWdxbZRm8Wq6QhmnNzh85oh8u6NZ5QIXTlLNjf91Y2mex0hWdTikPst/ZLULxaZIs9Eq19W+Vsntczdg9J8aqeEXNeJFfH51JBb49Jx4hkOwAjhm8B5kgp2RZ59M4vStUhRw/T8z4a1NntY/DBuNQmhsgcee/WMhURmosGBA0MjQuz05SXTF3mhDFeq1o0WXF4PoTWIuE0IwV5xbNSvYpc5dyCO+qmFNTdh8cc5v6pZvO6NM11AV0fOWFRPk5E0BCR1sUH3d43Ab8L0Rn8jNwS0R/Hj2itzT2c3tPDb+DDcWmqixqJcHh9ZPeU4YZwmuiI1trDr+PT7HR10Gvz63HVuoa5BSrorTHpGJksAzC8bCN868zhNWXnI+Wg5XcO0Uh+TmiGPOONQ9X4y+4K1cJuLsRxP/Tqv4eQJf9OApjhkddHd08f3F6OV0KIVPWwhrXHlE6xSt5zlheGR4R5rld392G2o6B/NK8g254LIS4i8thd1vQ9G94ZNcKkRlypnCNVZpO3CsKhzZJIi9Xx0vAUDGmvKlirPGjrfJ8nt9ZhFLhB9x0efgeti/PNZKzTYjUsmZiu6ivuiwMZbkihBb/ltBGCIQUdlVKy7/QJhzMeCnU1o0McrZmTOJ9mp6GLz1Dv8/x5RznmH69VRWtz0YP38JDZRAzxbWpMj/ex00tERtRK7yL7QWNlRGEbh0Uw5XpySDtc0d2nDI811JchUoDyX9XNh8edWvCF5hUk5XOcvKRFrA1ZRLRgbmh4dWQKnttXpV6fpBVHDjy691Agbur0ZA/+OiQZpyWzWwjONbAiunJGhOU5yMiP/z4jSVX6v95UonIRn8HD+mBMKrr4DQe6rnD6LG67Qs3uJUsTHhXiqKCz+eotK3WGmOZCHDfCZ88dm6qg9h+3l6mhlehXVyKNjAq9q38iZjkt+BO2bc/RNDw1L6c+jHzpmWkxDjtPg/oop0bVOxSYaeOWvn4FILhmbSjG4ojuccRw5cstKehBAH+6dUsp5kW8qxOpJB4eebgOcbqi0psLaS6lQgqI3NftpybB7zAmfHn3N7ZtX6tp2ov0vGdCg4pU5PSsOLzqzK6pxR81CNJrTaB9aFiY0JXexbEqV0Fvjk7D2BSYMLx80fmIlLIXrODedSVSvzLiXZ1oY6MVD2znwd4KE7Wm3fQtw1CByetGcMhlQJIaEwPkIUCws3oIZvDYvlo9gQM3zE0uA7F0UrpiIbiIbflfre30fZw5WuAPX5XhzW8cQleh1VPinTfxgH+3pKDf8E2C1tgEKoDJO9JruDGGG1oQc8yUjnG4rlcC+iTqpHlKoWlU/nMceJdSjgawhvnk42M1yIo3kBqroXeiF0NTlZftA+R+SMpix4PDj0KvghBZpo0uVNCByqCK+QpcjErD+BRuKIY56JDk/LcZPLCnRk+avjyv0UsB0Uri/Sw4Iw+EMjBSsBgelOLBzB5+nNfZfYXWfh/Q7uJvRvAHMyDlF3UQgx7dXoZYQ1NcXlqsgeyOsTTKenBWAjYhbxxs6YemG3B+EGQY5xo4ekbPZF7j/OEcR0FzW1IQmeCPommI5iyPnkQlURgqhxU26Y3JHeNwXhcfsuL4/p9pQTdIzfP9ngPuc6SU3AU7mo0bgCYrXg/Hi2dETrHyXVa+HS2l5Ft21+6usMBuhMtidE/UECdlDYSggk6oV1psa893Qb3rlCW54ZepouXg37l3d0aAfzL/cNSYZcT0LvEYnuqyvnIrIChHo/dbZYjDbPxslSFLAfGUEIIcZ3gppTpvd6zLqweOVZuI0TUVDRgSOzjVy5yWFKSmTNn6vv2LxlMx7jdEMtiZcbR6h/kdmh7nkIlctlUCiLnQNL7Xs7W5g6mrq+sTExNDg6gM9eE5xFEM4HhLL4pJKYdwvg5msCsgg4AwFceueyptKZ/XNO3pkIdqkPaXVdAGjfwkt1FTzeXveCAN7QYNp/gMDEzxYFhaLAaneaH8xTY5hrvasu1/5ebmzuvcuXOTn8KRUpLZ5sQpWVD+EgvfAKEcBWQ1mjUK554XYFvnw7YEhAhCSr6pYULTv2R6aklBAwC5Y3uJief2VyqtEoHGG5rT/4nVVN+EPaCsBB0pkT0gyyyDpq+HEB8DWNTSa/PNbbgt/yal5NkxyzI90VRVdI3+HSFpmyuk0MeTeGXnkspgrE/0aGgfyxxqoJPPQGe/BxxcDYtiBiQ042to2mfsZwkheGA/ywr9NhJlIBekZBFqOrZ5kgCFhYUJqampbAWzp9LCsgDLrgB/t0foByDkdkB1UrdFv5j0s0j1Ax8qpfxdqP/U8h1mIABN5EEYhyHELgBUBv87IAS98/9utUhA19TUZMXFxc0AcCZbIqG5A+YFvhvEMEQXVm4s6Jon6VKzA053dTI46OH8hMARhbwa5OCbboU/9e8//BRH8j9mLdQoDqqNCwAAAABJRU5ErkJggg=="},Jq4h:function(U,X,x){U.exports=x.p+"static/qrcode.2267e4d5.png"},K3mO:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("3y9D"),x("WYAk"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.Base,v=O.WordArray,o=_.algo,g=o.MD5,p=o.EvpKDF=y.extend({cfg:y.extend({keySize:128/32,hasher:g,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,a){for(var n,s=this.cfg,t=s.hasher.create(),i=v.create(),e=i.words,r=s.keySize,c=s.iterations;e.length<r;){n&&t.update(n),n=t.update(d).finalize(a),t.reset();for(var u=1;u<c;u++)n=t.finalize(n),t.reset();i.concat(n)}return i.sigBytes=r*4,i}});_.EvpKDF=function(d,a,n){return p.create(n).compute(d,a)}}(),I.EvpKDF})},KJ0q:function(U,X,x){},KVXO:function(U,X,x){U.exports={wrap:"wrap___1VfLE",content:"content___20B4M",mainPathWrap:"mainPathWrap___3qDeg",colorBlue:"colorBlue___2ZjUq"}},KmYQ:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.pad.ZeroPadding={pad:function(_,O){var y=O*4;_.clamp(),_.sigBytes+=y-(_.sigBytes%y||y)},unpad:function(_){for(var O=_.words,y=_.sigBytes-1,y=_.sigBytes-1;y>=0;y--)if(O[y>>>2]>>>24-y%4*8&255){_.sigBytes=y+1;break}}},I.pad.ZeroPadding})},LCi9:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(m,l){if(!(m instanceof l))throw new TypeError("Cannot call a class as a function")}function _(m,l){for(var E=0;E<l.length;E++){var b=l[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}function O(m,l,E){return l&&_(m.prototype,l),E&&_(m,E),m}var y=0,v=1,o=2,g=4,p=8,d=16,a=32,n=64,s=127,t=50,i=90,e=250,r=1e3,c=1e3,u=50,f=function(){function m(){I(this,m),this._target=null,this._state=s,this._tracked=[],this._ignored=[],this._waitingRelease=!1,this._releaseStart=0,this._longpressTimeoutId=null,this._twoTouchTimeoutId=null,this._boundEventHandler=this._eventHandler.bind(this)}return O(m,[{key:"attach",value:function(E){this.detach(),this._target=E,this._target.addEventListener("touchstart",this._boundEventHandler),this._target.addEventListener("touchmove",this._boundEventHandler),this._target.addEventListener("touchend",this._boundEventHandler),this._target.addEventListener("touchcancel",this._boundEventHandler)}},{key:"detach",value:function(){if(!this._target)return;this._stopLongpressTimeout(),this._stopTwoTouchTimeout(),this._target.removeEventListener("touchstart",this._boundEventHandler),this._target.removeEventListener("touchmove",this._boundEventHandler),this._target.removeEventListener("touchend",this._boundEventHandler),this._target.removeEventListener("touchcancel",this._boundEventHandler),this._target=null}},{key:"_eventHandler",value:function(E){var b;E.stopPropagation(),E.preventDefault();switch(E.type){case"touchstart":b=this._touchStart;break;case"touchmove":b=this._touchMove;break;case"touchend":case"touchcancel":b=this._touchEnd;break}for(var D=0;D<E.changedTouches.length;D++){var C=E.changedTouches[D];b.call(this,C.identifier,C.clientX,C.clientY)}}},{key:"_touchStart",value:function(E,b,D){if(this._hasDetectedGesture()||this._state===y){this._ignored.push(E);return}if(this._tracked.length>0&&Date.now()-this._tracked[0].started>e){this._state=y,this._ignored.push(E);return}if(this._waitingRelease){this._state=y,this._ignored.push(E);return}this._tracked.push({id:E,started:Date.now(),active:!0,firstX:b,firstY:D,lastX:b,lastY:D,angle:0});switch(this._tracked.length){case 1:this._startLongpressTimeout();break;case 2:this._state&=~(v|p|d),this._stopLongpressTimeout();break;case 3:this._state&=~(o|a|n);break;default:this._state=y}}},{key:"_touchMove",value:function(E,b,D){var C=this._tracked.find(function(L){return L.id===E});if(C===void 0)return;C.lastX=b,C.lastY=D;var w=b-C.firstX,S=D-C.firstY;if((C.firstX!==C.lastX||C.firstY!==C.lastY)&&(C.angle=Math.atan2(S,w)*180/Math.PI),!this._hasDetectedGesture()){if(Math.hypot(w,S)<t)return;if(this._state&=~(v|o|g|d),this._stopLongpressTimeout(),this._tracked.length!==1&&(this._state&=~p),this._tracked.length!==2&&(this._state&=~(a|n)),this._tracked.length===2){var A=this._tracked.find(function(L){return L.id!==E}),R=Math.hypot(A.firstX-A.lastX,A.firstY-A.lastY);if(R>t){var k=Math.abs(C.angle-A.angle);k=Math.abs((k+180)%360-180),k>i?this._state&=~a:this._state&=~n,this._isTwoTouchTimeoutRunning()&&this._stopTwoTouchTimeout()}else this._isTwoTouchTimeoutRunning()||this._startTwoTouchTimeout()}if(!this._hasDetectedGesture())return;this._pushEvent("gesturestart")}this._pushEvent("gesturemove")}},{key:"_touchEnd",value:function(E,b,D){if(this._ignored.indexOf(E)!==-1){this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&this._tracked.length===0&&(this._state=s,this._waitingRelease=!1);return}if(!this._hasDetectedGesture()&&this._isTwoTouchTimeoutRunning()&&(this._stopTwoTouchTimeout(),this._state=y),!this._hasDetectedGesture()&&(this._state&=~(p|a|n),this._state&=~d,this._stopLongpressTimeout(),!this._waitingRelease)){this._releaseStart=Date.now(),this._waitingRelease=!0;switch(this._tracked.length){case 1:this._state&=~(o|g);break;case 2:this._state&=~(v|g);break}}if(this._waitingRelease){Date.now()-this._releaseStart>e&&(this._state=y),this._tracked.some(function(S){return Date.now()-S.started>r})&&(this._state=y);var C=this._tracked.find(function(S){return S.id===E});if(C.active=!1,this._hasDetectedGesture())this._pushEvent("gesturestart");else if(this._state!==y)return}this._hasDetectedGesture()&&this._pushEvent("gestureend");for(var w=0;w<this._tracked.length;w++)this._tracked[w].active&&this._ignored.push(this._tracked[w].id);this._tracked=[],this._state=y,this._ignored.indexOf(E)!==-1&&this._ignored.splice(this._ignored.indexOf(E),1),this._ignored.length===0&&(this._state=s,this._waitingRelease=!1)}},{key:"_hasDetectedGesture",value:function(){return this._state===y||this._state&this._state-1?!1:!(this._state&(v|o|g)&&this._tracked.some(function(E){return E.active}))}},{key:"_startLongpressTimeout",value:function(){var E=this;this._stopLongpressTimeout(),this._longpressTimeoutId=setTimeout(function(){return E._longpressTimeout()},c)}},{key:"_stopLongpressTimeout",value:function(){clearTimeout(this._longpressTimeoutId),this._longpressTimeoutId=null}},{key:"_longpressTimeout",value:function(){if(this._hasDetectedGesture())throw new Error("A longpress gesture failed, conflict with a different gesture");this._state=d,this._pushEvent("gesturestart")}},{key:"_startTwoTouchTimeout",value:function(){var E=this;this._stopTwoTouchTimeout(),this._twoTouchTimeoutId=setTimeout(function(){return E._twoTouchTimeout()},u)}},{key:"_stopTwoTouchTimeout",value:function(){clearTimeout(this._twoTouchTimeoutId),this._twoTouchTimeoutId=null}},{key:"_isTwoTouchTimeoutRunning",value:function(){return this._twoTouchTimeoutId!==null}},{key:"_twoTouchTimeout",value:function(){if(this._tracked.length===0)throw new Error("A pinch or two drag gesture failed, no tracked touches");var E=this._getAverageMovement(),b=Math.abs(E.x),D=Math.abs(E.y),C=this._getAverageDistance(),w=Math.abs(Math.hypot(C.first.x,C.first.y)-Math.hypot(C.last.x,C.last.y));D<w&&b<w?this._state=n:this._state=a,this._pushEvent("gesturestart"),this._pushEvent("gesturemove")}},{key:"_pushEvent",value:function(E){var b={type:this._stateToGesture(this._state)},D=this._getPosition(),C=D.last;E==="gesturestart"&&(C=D.first);switch(this._state){case a:case n:C=D.first;break}if(b.clientX=C.x,b.clientY=C.y,this._state===n){var w=this._getAverageDistance();E==="gesturestart"?(b.magnitudeX=w.first.x,b.magnitudeY=w.first.y):(b.magnitudeX=w.last.x,b.magnitudeY=w.last.y)}else if(this._state===a)if(E==="gesturestart")b.magnitudeX=0,b.magnitudeY=0;else{var S=this._getAverageMovement();b.magnitudeX=S.x,b.magnitudeY=S.y}var A=new CustomEvent(E,{detail:b});this._target.dispatchEvent(A)}},{key:"_stateToGesture",value:function(E){switch(E){case v:return"onetap";case o:return"twotap";case g:return"threetap";case p:return"drag";case d:return"longpress";case a:return"twodrag";case n:return"pinch"}throw new Error("Unknown gesture state: "+E)}},{key:"_getPosition",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture position, no tracked touches");for(var E=this._tracked.length,b=0,D=0,C=0,w=0,S=0;S<this._tracked.length;S++)b+=this._tracked[S].firstX,D+=this._tracked[S].firstY,C+=this._tracked[S].lastX,w+=this._tracked[S].lastY;return{first:{x:b/E,y:D/E},last:{x:C/E,y:w/E}}}},{key:"_getAverageMovement",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture movement, no tracked touches");var E,b;E=b=0;for(var D=this._tracked.length,C=0;C<this._tracked.length;C++)E+=this._tracked[C].lastX-this._tracked[C].firstX,b+=this._tracked[C].lastY-this._tracked[C].firstY;return{x:E/D,y:b/D}}},{key:"_getAverageDistance",value:function(){if(this._tracked.length===0)throw new Error("Failed to get gesture distance, no tracked touches");var E=this._tracked[0],b=this._tracked[this._tracked.length-1],D=Math.abs(b.firstX-E.firstX),C=Math.abs(b.firstY-E.firstY),w=Math.abs(b.lastX-E.lastX),S=Math.abs(b.lastY-E.lastY);return{first:{x:D,y:C},last:{x:w,y:S}}}}]),m}();X.default=f},LYID:function(U,X,x){U.exports=x.p+"static/failer.5e83e9b8.svg"},LdHM:function(U,X,x){"use strict";x.d(X,"b",function(){return m}),x.d(X,"a",function(){return E});var I=x("1OyB"),_=x("vuIU"),O=x("Ji7U"),y=x("LK+K"),v=x("q1tI"),o=x("rePB"),g=x("Ff2n"),p=x("ODXe"),d=x("4IlW"),a=x("bX4T"),n=x("YrtM"),s=x("TSYQ"),t=x.n(s),i=x("+nKL"),e=x("8OUc"),r=function(B,J){var re=B.prefixCls,he=B.id,we=B.flattenOptions,ke=B.childrenAsData,ne=B.values,Oe=B.searchValue,Ce=B.multiple,fe=B.defaultActiveFirstOption,oe=B.height,se=B.itemHeight,be=B.notFoundContent,ie=B.open,de=B.menuItemSelectedIcon,Fe=B.virtual,ae=B.onSelect,Z=B.onToggleOpen,Y=B.onActiveValue,q=B.onScroll,ve=B.onMouseEnter,pe="".concat(re,"-item"),Te=Object(n.a)(function(){return we},[ie,we],function(et,Ye){return Ye[0]&&et[1]!==Ye[1]}),Ne=v.useRef(null),me=function(Ye){Ye.preventDefault()},Ie=function(Ye){Ne.current&&Ne.current.scrollTo({index:Ye})},_e=function(Ye){for(var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Ke=Te.length,ge=0;ge<Ke;ge+=1){var Ee=(Ye+ge*Me+Ke)%Ke,ce=Te[Ee],je=ce.group,Qe=ce.data;if(!je&&!Qe.disabled)return Ee}return-1},Ve=v.useState(function(){return _e(0)}),tt=Object(p.a)(Ve,2),Ge=tt[0],Le=tt[1],bt=function(Ye){Le(Ye);var Me=Te[Ye];if(!Me){Y(null,-1);return}Y(Me.data.value,Ye)};v.useEffect(function(){bt(fe!==!1?_e(0):-1)},[Te.length,Oe]),v.useEffect(function(){var et=setTimeout(function(){if(!Ce&&ie&&ne.size===1){var Ye=Array.from(ne)[0],Me=Te.findIndex(function(Ke){var ge=Ke.data;return ge.value===Ye});bt(Me),Ie(Me)}});return function(){return clearTimeout(et)}},[ie]);var Re=function(Ye){Ye!==void 0&&ae(Ye,{selected:!ne.has(Ye)}),Ce||Z(!1)};if(v.useImperativeHandle(J,function(){return{onKeyDown:function(Ye){var Me=Ye.which;switch(Me){case d.a.UP:case d.a.DOWN:{var Ke=0;if(Me===d.a.UP?Ke=-1:Me===d.a.DOWN&&(Ke=1),Ke!==0){var ge=_e(Ge+Ke,Ke);Ie(ge),bt(ge)}break}case d.a.ENTER:{var Ee=Te[Ge];Ee&&!Ee.data.disabled?Re(Ee.data.value):Re(void 0),ie&&Ye.preventDefault();break}case d.a.ESC:Z(!1)}},onKeyUp:function(){},scrollTo:function(Ye){Ie(Ye)}}}),Te.length===0)return v.createElement("div",{role:"listbox",id:"".concat(he,"_list"),className:"".concat(pe,"-empty"),onMouseDown:me},be);function Xe(et){var Ye=Te[et];if(!Ye)return null;var Me=Ye.data||{},Ke=Me.value,ge=Me.label,Ee=Me.children,ce=Object(a.a)(Me,!0),je=ke?Ee:ge;return Ye?v.createElement("div",Object.assign({"aria-label":typeof je=="string"?je:null},ce,{key:et,role:"option",id:"".concat(he,"_list_").concat(et),"aria-selected":ne.has(Ke)}),Ke):null}return v.createElement(v.Fragment,null,v.createElement("div",{role:"listbox",id:"".concat(he,"_list"),style:{height:0,width:0,overflow:"hidden"}},Xe(Ge-1),Xe(Ge),Xe(Ge+1)),v.createElement(i.a,{itemKey:"key",ref:Ne,data:Te,height:oe,itemHeight:se,fullHeight:!1,onMouseDown:me,onScroll:q,virtual:Fe,onMouseEnter:ve},function(et,Ye){var Me,Ke=et.group,ge=et.groupOption,Ee=et.data,ce=Ee.label,je=Ee.key;if(Ke)return v.createElement("div",{className:t()(pe,"".concat(pe,"-group"))},ce!==void 0?ce:je);var Qe=Ee.disabled,te=Ee.value,Je=Ee.title,ut=Ee.children,Be=Ee.style,qe=Ee.className,at=Object(g.a)(Ee,["disabled","value","title","children","style","className"]),wt=ne.has(te),ft="".concat(pe,"-option"),st=t()(pe,ft,qe,(Me={},Object(o.a)(Me,"".concat(ft,"-grouped"),ge),Object(o.a)(Me,"".concat(ft,"-active"),Ge===Ye&&!Qe),Object(o.a)(Me,"".concat(ft,"-disabled"),Qe),Object(o.a)(Me,"".concat(ft,"-selected"),wt),Me)),Pe=ke?ut:ce,ze=!de||typeof de=="function"||wt;return v.createElement("div",Object.assign({},at,{"aria-selected":wt,className:st,title:Je,onMouseMove:function(){if(Ge===Ye||Qe)return;bt(Ye)},onClick:function(){Qe||Re(te)},style:Be}),v.createElement("div",{className:"".concat(ft,"-content")},Pe||te),v.isValidElement(de)||wt,ze&&v.createElement(e.a,{className:"".concat(pe,"-option-state"),customizeIcon:de,customizeIconProps:{isSelected:wt}},wt?"\u2713":null))}))},c=v.forwardRef(r);c.displayName="OptionList";var u=c,f=function(){return null};f.isSelectOption=!0;var m=f,l=function(){return null};l.isSelectOptGroup=!0;var E=l,b=x("VTBJ"),D=x("Zm9Q");function C(P){var B=P.key,J=P.props,re=J.children,he=J.value,we=Object(g.a)(J,["children","value"]);return Object(b.a)({key:B,value:he!==void 0?he:B,children:re},we)}function w(P){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(D.a)(P).map(function(J,re){if(!v.isValidElement(J)||!J.type)return null;var he=J.type.isSelectOptGroup,we=J.key,ke=J.props,ne=ke.children,Oe=Object(g.a)(ke,["children"]);return B||!he?C(J):Object(b.a)(Object(b.a)({key:"__RC_SELECT_GRP__".concat(we===null?re:we,"__"),label:we},Oe),{},{options:w(ne)})}).filter(function(J){return J})}var S=x("2Qr1"),A=x("qNPg"),R=x("U8pU"),k=x("Kwbf"),L=x("WKfj");function M(P){var B=P.mode,J=P.options,re=P.children,he=P.backfill,we=P.allowClear,ke=P.placeholder,ne=P.getInputElement,Oe=P.showSearch,Ce=P.onSearch,fe=P.defaultOpen,oe=P.autoFocus,se=P.labelInValue,be=P.value,ie=P.inputValue,de=P.optionLabelProp,Fe=B==="multiple"||B==="tags",ae=Oe!==void 0?Oe:Fe||B==="combobox",Z=J||w(re);if(Object(k.a)(B!=="tags"||Z.every(function(pe){return!pe.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),B==="tags"||B==="combobox"){var Y=Z.some(function(pe){return pe.options?pe.options.some(function(Te){return typeof("value"in Te?Te.value:Te.key)=="number"}):typeof("value"in pe?pe.value:pe.key)=="number"});Object(k.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(k.a)(B!=="combobox"||!de,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(k.a)(B==="combobox"||!he,"`backfill` only works with `combobox` mode."),Object(k.a)(B==="combobox"||!ne,"`getInputElement` only work with `combobox` mode."),Object(k.b)(B!=="combobox"||!ne||!we||!ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ce&&!ae&&B!=="combobox"&&B!=="tags"&&Object(k.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(k.b)(!fe||oe,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),be!=null){var q=Object(L.d)(be);Object(k.a)(!se||q.every(function(pe){return Object(R.a)(pe)==="object"&&("key"in pe||"value"in pe)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(k.a)(!Fe||Array.isArray(be),"`value` should be array when `mode` is `multiple` or `tags`")}if(re){var ve=null;Object(D.a)(re).some(function(pe){if(!v.isValidElement(pe)||!pe.type)return!1;var Te=pe.type;if(Te.isSelectOption)return!1;if(Te.isSelectOptGroup){var Ne=Object(D.a)(pe.props.children).every(function(me){return!v.isValidElement(me)||!pe.type||me.type.isSelectOption?!0:(ve=me.type,!1)});return!Ne}return ve=Te,!0}),ve&&Object(k.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ve.displayName||ve.name||ve,"`.")),Object(k.a)(ie===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var G=M,W=Object(A.a)({prefixCls:"rc-select",components:{optionList:u},convertChildrenToData:w,flattenOptions:S.d,getLabeledValue:S.e,filterOptions:S.b,isValueDisabled:S.g,findValueOption:S.c,warningProps:G,fillOptionsWithMissingValue:S.a}),N=function(P){Object(O.a)(J,P);var B=Object(y.a)(J);function J(){var re;return Object(I.a)(this,J),re=B.apply(this,arguments),re.selectRef=v.createRef(),re.focus=function(){re.selectRef.current.focus()},re.blur=function(){re.selectRef.current.blur()},re}return Object(_.a)(J,[{key:"render",value:function(){return v.createElement(W,Object.assign({ref:this.selectRef},this.props))}}]),J}(v.Component);N.Option=m,N.OptGroup=E;var K=N,F=X.c=K},Lmeb:function(U,X,x){},Lo0S:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.initLogging=o,X.getLogging=g,X.Error=X.Warn=X.Info=X.Debug=void 0;var I="warn",_=function(){};X.Debug=_;var O=function(){};X.Info=O;var y=function(){};X.Warn=y;var v=function(){};X.Error=v;function o(p){if(typeof p=="undefined"?p=I:I=p,X.Debug=_=X.Info=O=X.Warn=y=X.Error=v=function(){},typeof window.console!="undefined")switch(p){case"debug":X.Debug=_=console.debug.bind(window.console);case"info":X.Info=O=console.info.bind(window.console);case"warn":X.Warn=y=console.warn.bind(window.console);case"error":X.Error=v=console.error.bind(window.console);case"none":break;default:throw new window.Error("invalid logging type '"+p+"'")}}function g(){return I}o()},M8RZ:function(U,X,x){"use strict";x.d(X,"a",function(){return d});var I=x("fWQN"),_=x("mtLc"),O=x("yKVA"),y=x("879j"),v=x("q1tI"),o=x.n(v),g=x("i8i4"),p=x.n(g),d=function(a){Object(O.a)(s,a);var n=Object(y.a)(s);function s(t){var i;Object(I.a)(this,s),i=n.call(this,t);var e=window.document;return i.node=e.createElement("div"),e.body.appendChild(i.node),i}return Object(_.a)(s,[{key:"render",value:function(){var i=this.props.children;return Object(g.createPortal)(i,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),s}(o.a.Component)},MAU4:function(U,X,x){U.exports=x.p+"static/disappoint1.7e763f4d.svg"},MFOe:function(U,X,x){(function(I){var _=o(),O=g(),y=p(),v=typeof window!="undefined"?window:I;U.exports={assign:_,create:O,trim:y,bind:d,slice:a,each:n,map:s,pluck:t,isList:i,isFunction:e,isObject:r,Global:v};function o(){return Object.assign?Object.assign:function(u,f,m,l){for(var E=1;E<arguments.length;E++)n(Object(arguments[E]),function(b,D){u[D]=b});return u}}function g(){if(Object.create)return function(f,m,l,E){var b=a(arguments,1);return _.apply(this,[Object.create(f)].concat(b))};{function c(){}return function(f,m,l,E){var b=a(arguments,1);return c.prototype=f,_.apply(this,[new c].concat(b))}}}function p(){return String.prototype.trim?function(u){return String.prototype.trim.call(u)}:function(u){return u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function d(c,u){return function(){return u.apply(c,Array.prototype.slice.call(arguments,0))}}function a(c,u){return Array.prototype.slice.call(c,u||0)}function n(c,u){t(c,function(f,m){return u(f,m),!1})}function s(c,u){var f=i(c)?[]:{};return t(c,function(m,l){return f[l]=u(m,l),!1}),f}function t(c,u){if(i(c)){for(var f=0;f<c.length;f++)if(u(c[f],f))return c[f]}else for(var m in c)if(c.hasOwnProperty(m)&&u(c[m],m))return c[m]}function i(c){return c!=null&&typeof c!="function"&&typeof c.length=="number"}function e(c){return c&&{}.toString.call(c)==="[object Function]"}function r(c){return c&&{}.toString.call(c)==="[object Object]"}}).call(this,x("IyRk"))},MZdM:function(U,X,x){"use strict";function I(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(e){return typeof e}:I=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(t)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=p(x("Lo0S")),O=o(x("N/zr")),y=x("GdRQ"),v=x("GQ8N");function o(t){return t&&t.__esModule?t:{default:t}}function g(){if(typeof WeakMap!="function")return null;var t=new WeakMap;return g=function(){return t},t}function p(t){if(t&&t.__esModule)return t;if(t===null||I(t)!=="object"&&typeof t!="function")return{default:t};var i=g();if(i&&i.has(t))return i.get(t);var e={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var c in t)if(Object.prototype.hasOwnProperty.call(t,c)){var u=r?Object.getOwnPropertyDescriptor(t,c):null;u&&(u.get||u.set)?Object.defineProperty(e,c,u):e[c]=t[c]}return e.default=t,i&&i.set(t,e),e}function d(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}function a(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,i,e){return i&&a(t.prototype,i),e&&a(t,e),t}var s=function(){function t(i){if(d(this,t),this._drawCtx=null,this._renderQ=[],this._flushing=!1,this._fbWidth=0,this._fbHeight=0,this._prevDrawStyle="",this._tile=null,this._tile16x16=null,this._tileX=0,this._tileY=0,_.Debug(">> Display.constructor"),this._target=i,!this._target)throw new Error("Target must be set");if(typeof this._target=="string")throw new Error("target must be a DOM element");if(!this._target.getContext)throw new Error("no getContext method");if(this._targetCtx=this._target.getContext("2d"),this._viewportLoc={x:0,y:0,w:this._target.width,h:this._target.height},this._backbuffer=document.createElement("canvas"),this._drawCtx=this._backbuffer.getContext("2d"),this._damageBounds={left:0,top:0,right:this._backbuffer.width,bottom:this._backbuffer.height},_.Debug("User Agent: "+navigator.userAgent),!("createImageData"in this._drawCtx))throw new Error("Canvas does not support createImageData");this._tile16x16=this._drawCtx.createImageData(16,16),_.Debug("<< Display.constructor"),this._scale=1,this._clipViewport=!1,this.onflush=function(){}}return n(t,[{key:"viewportChangePos",value:function(e,r){var c=this._viewportLoc;e=Math.floor(e),r=Math.floor(r),this._clipViewport||(e=-c.w,r=-c.h);var u=c.x+c.w-1,f=c.y+c.h-1;if(e<0&&c.x+e<0&&(e=-c.x),u+e>=this._fbWidth&&(e-=u+e-this._fbWidth+1),c.y+r<0&&(r=-c.y),f+r>=this._fbHeight&&(r-=f+r-this._fbHeight+1),e===0&&r===0)return;_.Debug("viewportChange deltaX: "+e+", deltaY: "+r),c.x+=e,c.y+=r,this._damage(c.x,c.y,c.w,c.h),this.flip()}},{key:"viewportChangeSize",value:function(e,r){(!this._clipViewport||typeof e=="undefined"||typeof r=="undefined")&&(_.Debug("Setting viewport to full display region"),e=this._fbWidth,r=this._fbHeight),e=Math.floor(e),r=Math.floor(r),e>this._fbWidth&&(e=this._fbWidth),r>this._fbHeight&&(r=this._fbHeight);var c=this._viewportLoc;if(c.w!==e||c.h!==r){c.w=e,c.h=r;var u=this._target;u.width=e,u.height=r,this.viewportChangePos(0,0),this._damage(c.x,c.y,c.w,c.h),this.flip(),this._rescale(this._scale)}}},{key:"absX",value:function(e){return this._scale===0?0:(0,v.toSigned32bit)(e/this._scale+this._viewportLoc.x)}},{key:"absY",value:function(e){return this._scale===0?0:(0,v.toSigned32bit)(e/this._scale+this._viewportLoc.y)}},{key:"resize",value:function(e,r){this._prevDrawStyle="",this._fbWidth=e,this._fbHeight=r;var c=this._backbuffer;if(c.width!==e||c.height!==r){var u=null;c.width>0&&c.height>0&&(u=this._drawCtx.getImageData(0,0,c.width,c.height)),c.width!==e&&(c.width=e),c.height!==r&&(c.height=r),u&&this._drawCtx.putImageData(u,0,0)}var f=this._viewportLoc;this.viewportChangeSize(f.w,f.h),this.viewportChangePos(0,0)}},{key:"_damage",value:function(e,r,c,u){e<this._damageBounds.left&&(this._damageBounds.left=e),r<this._damageBounds.top&&(this._damageBounds.top=r),e+c>this._damageBounds.right&&(this._damageBounds.right=e+c),r+u>this._damageBounds.bottom&&(this._damageBounds.bottom=r+u)}},{key:"flip",value:function(e){if(this._renderQ.length!==0&&!e)this._renderQPush({type:"flip"});else{var r=this._damageBounds.left,c=this._damageBounds.top,u=this._damageBounds.right-r,f=this._damageBounds.bottom-c,m=r-this._viewportLoc.x,l=c-this._viewportLoc.y;m<0&&(u+=m,r-=m,m=0),l<0&&(f+=l,c-=l,l=0),m+u>this._viewportLoc.w&&(u=this._viewportLoc.w-m),l+f>this._viewportLoc.h&&(f=this._viewportLoc.h-l),u>0&&f>0&&this._targetCtx.drawImage(this._backbuffer,r,c,u,f,m,l,u,f),this._damageBounds.left=this._damageBounds.top=65535,this._damageBounds.right=this._damageBounds.bottom=0}}},{key:"pending",value:function(){return this._renderQ.length>0}},{key:"flush",value:function(){this._renderQ.length===0?this.onflush():this._flushing=!0}},{key:"fillRect",value:function(e,r,c,u,f,m){this._renderQ.length!==0&&!m?this._renderQPush({type:"fill",x:e,y:r,width:c,height:u,color:f}):(this._setFillColor(f),this._drawCtx.fillRect(e,r,c,u),this._damage(e,r,c,u))}},{key:"copyImage",value:function(e,r,c,u,f,m,l){this._renderQ.length!==0&&!l?this._renderQPush({type:"copy",oldX:e,oldY:r,x:c,y:u,width:f,height:m}):(this._drawCtx.mozImageSmoothingEnabled=!1,this._drawCtx.webkitImageSmoothingEnabled=!1,this._drawCtx.msImageSmoothingEnabled=!1,this._drawCtx.imageSmoothingEnabled=!1,this._drawCtx.drawImage(this._backbuffer,e,r,f,m,c,u,f,m),this._damage(c,u,f,m))}},{key:"imageRect",value:function(e,r,c,u,f,m){if(c===0||u===0)return;var l=new Image;l.src="data: "+f+";base64,"+O.default.encode(m),this._renderQPush({type:"img",img:l,x:e,y:r,width:c,height:u})}},{key:"startTile",value:function(e,r,c,u,f){this._tileX=e,this._tileY=r,c===16&&u===16?this._tile=this._tile16x16:this._tile=this._drawCtx.createImageData(c,u);for(var m=f[2],l=f[1],E=f[0],b=this._tile.data,D=0;D<c*u*4;D+=4)b[D]=m,b[D+1]=l,b[D+2]=E,b[D+3]=255}},{key:"subTile",value:function(e,r,c,u,f){for(var m=f[2],l=f[1],E=f[0],b=e+c,D=r+u,C=this._tile.data,w=this._tile.width,S=r;S<D;S++)for(var A=e;A<b;A++){var R=(A+S*w)*4;C[R]=m,C[R+1]=l,C[R+2]=E,C[R+3]=255}}},{key:"finishTile",value:function(){this._drawCtx.putImageData(this._tile,this._tileX,this._tileY),this._damage(this._tileX,this._tileY,this._tile.width,this._tile.height)}},{key:"blitImage",value:function(e,r,c,u,f,m,l){if(this._renderQ.length!==0&&!l){var E=new Uint8Array(c*u*4);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blit",data:E,x:e,y:r,width:c,height:u})}else this._bgrxImageData(e,r,c,u,f,m)}},{key:"blitRgbImage",value:function(e,r,c,u,f,m,l){if(this._renderQ.length!==0&&!l){var E=new Uint8Array(c*u*3);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blitRgb",data:E,x:e,y:r,width:c,height:u})}else this._rgbImageData(e,r,c,u,f,m)}},{key:"blitRgbxImage",value:function(e,r,c,u,f,m,l){if(this._renderQ.length!==0&&!l){var E=new Uint8Array(c*u*4);E.set(new Uint8Array(f.buffer,0,E.length)),this._renderQPush({type:"blitRgbx",data:E,x:e,y:r,width:c,height:u})}else this._rgbxImageData(e,r,c,u,f,m)}},{key:"drawImage",value:function(e,r,c){this._drawCtx.drawImage(e,r,c),this._damage(r,c,e.width,e.height)}},{key:"autoscale",value:function(e,r){var c;if(e===0||r===0)c=0;else{var u=this._viewportLoc,f=e/r,m=u.w/u.h;m>=f?c=e/u.w:c=r/u.h}this._rescale(c)}},{key:"_rescale",value:function(e){this._scale=e;var r=this._viewportLoc,c=e*r.w+"px",u=e*r.h+"px";(this._target.style.width!==c||this._target.style.height!==u)&&(this._target.style.width=c,this._target.style.height=u)}},{key:"_setFillColor",value:function(e){var r="rgb("+e[2]+","+e[1]+","+e[0]+")";r!==this._prevDrawStyle&&(this._drawCtx.fillStyle=r,this._prevDrawStyle=r)}},{key:"_rgbImageData",value:function(e,r,c,u,f,m){for(var l=this._drawCtx.createImageData(c,u),E=l.data,b=0,D=m;b<c*u*4;b+=4,D+=3)E[b]=f[D],E[b+1]=f[D+1],E[b+2]=f[D+2],E[b+3]=255;this._drawCtx.putImageData(l,e,r),this._damage(e,r,l.width,l.height)}},{key:"_bgrxImageData",value:function(e,r,c,u,f,m){for(var l=this._drawCtx.createImageData(c,u),E=l.data,b=0,D=m;b<c*u*4;b+=4,D+=4)E[b]=f[D+2],E[b+1]=f[D+1],E[b+2]=f[D],E[b+3]=255;this._drawCtx.putImageData(l,e,r),this._damage(e,r,l.width,l.height)}},{key:"_rgbxImageData",value:function(e,r,c,u,f,m){var l;y.supportsImageMetadata?l=new ImageData(new Uint8ClampedArray(f.buffer,f.byteOffset,c*u*4),c,u):(l=this._drawCtx.createImageData(c,u),l.data.set(new Uint8ClampedArray(f.buffer,f.byteOffset,c*u*4))),this._drawCtx.putImageData(l,e,r),this._damage(e,r,l.width,l.height)}},{key:"_renderQPush",value:function(e){this._renderQ.push(e),this._renderQ.length===1&&this._scanRenderQ()}},{key:"_resumeRenderQ",value:function(){this.removeEventListener("load",this._noVNCDisplay._resumeRenderQ),this._noVNCDisplay._scanRenderQ()}},{key:"_scanRenderQ",value:function(){for(var e=!0;e&&this._renderQ.length>0;){var r=this._renderQ[0];switch(r.type){case"flip":this.flip(!0);break;case"copy":this.copyImage(r.oldX,r.oldY,r.x,r.y,r.width,r.height,!0);break;case"fill":this.fillRect(r.x,r.y,r.width,r.height,r.color,!0);break;case"blit":this.blitImage(r.x,r.y,r.width,r.height,r.data,0,!0);break;case"blitRgb":this.blitRgbImage(r.x,r.y,r.width,r.height,r.data,0,!0);break;case"blitRgbx":this.blitRgbxImage(r.x,r.y,r.width,r.height,r.data,0,!0);break;case"img":if(r.img.complete&&r.img.width!==0&&r.img.height!==0){if(r.img.width!==r.width||r.img.height!==r.height){_.Error("Decoded image has incorrect dimensions. Got "+r.img.width+"x"+r.img.height+". Expected "+r.width+"x"+r.height+".");return}this.drawImage(r.img,r.x,r.y)}else r.img._noVNCDisplay=this,r.img.addEventListener("load",this._resumeRenderQ),e=!1;break}e&&this._renderQ.shift()}this._renderQ.length===0&&this._flushing&&(this._flushing=!1,this.onflush())}},{key:"scale",get:function(){return this._scale},set:function(e){this._rescale(e)}},{key:"clipViewport",get:function(){return this._clipViewport},set:function(e){this._clipViewport=e;var r=this._viewportLoc;this.viewportChangeSize(r.w,r.h),this.viewportChangePos(0,0)}},{key:"width",get:function(){return this._fbWidth}},{key:"height",get:function(){return this._fbHeight}}]),t}();X.default=s},MlIO:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(_){var O=I,y=O.lib,v=y.Base,o=y.WordArray,g=O.x64={},p=g.Word=v.extend({init:function(a,n){this.high=a,this.low=n}}),d=g.WordArray=v.extend({init:function(a,n){a=this.words=a||[],n!=_?this.sigBytes=n:this.sigBytes=a.length*8},toX32:function(){for(var a=this.words,n=a.length,s=[],t=0;t<n;t++){var i=a[t];s.push(i.high),s.push(i.low)}return o.create(s,this.sigBytes)},clone:function(){for(var a=v.clone.call(this),n=a.words=this.words.slice(0),s=n.length,t=0;t<s;t++)n[t]=n[t].clone();return a}})}(),I})},Mm8t:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADJElEQVRYR72Xy4vOYRTHP98FGzsRw8al2FGMBWUyRJmZlFxKsnKZnT+ABRbsWRmXlaKMIrks5JIpyhiFlZExG7fIig3p6EznmX7vO7/L+/6m5tRb7++5nOf7nNvzPaINMbNNwE5gPTA/fq7he/yeAzclPWlVraoWmlkH0A/sA1ZUrY/5UeAaMCDpS9meUgBmdhI4DCwKJX+AB8Az4BvwNcYXAguADcBWYHaMfwYuSnI9uVIIwMyeAhtj1whwAbgh6WfZjcxsLrAbOAKsjbVDkrry9uUCMDP36bzY0C/JD58iZrbHByUNFsw7iIGY+yHJ46ZBpgAws4/AkljVI+l+gXIPyMcx110UeGa2HbgX68YlLc3qawBgZteBdKuq+GgJQDrMzCz+D0ram8YnD4mAOxETqyW9qfB1uwBWAa9D56kUmBMAItVeRrQX+jwLKGpCpQua9qSY8Ozo9BRNADxN/PYjkjrLbp4xaVsWyOzzi3p2TFghAfgALPOCUxTxzaDqWCCsnawwJmm5zKwHuAv8BRZL8hSslGkA8FT8BMwCeh3A+Si1jyRtqTw5FtQFEFZ4CGyeKNVm9gJYBxyXdGaGABwDTgPDDiAVnkOSLs8QgIPAJWDcAfwC5gB9kjwWWpImF0zmdSubzawXuAP8rg0gfJlSyj/3S7paB0AtFwQAL9tevpNsk+TPdamYWYMLagVhprA0g+iSNFSGwMwagvAscNRrgaS+KvR58/EsJ0v8c8omabhIl5m5/z0OznkMpJLqbKejinCUKM1a4j2wS9Lb5vVBWJymOWvqTqX4XfC9lktxC5a4JckJbIOYWSrFo5JW1n6MWrBEbmqaWe5j5My3ree4ZqzkP8eRUulJ9s9CKlbn4NCfpWaNhCSTUpNMWFJlz9AOmAwla2DIeaQ0y4grqVkVCDPLUrEpzLiIlmeZce3MyES845zCiH2wrDGZZMhO1aIx8b6vlLCYmRMOT79sY9LAhLNWq6Leza2ZsyYvs04o8lozJzTeTTnbcanfmmUCMzWnB4I3Vrnd58eAK9NuTnOqmPPHHcCagvb8FXBbUuqEKsH+B6mvmv9ZL+YKAAAAAElFTkSuQmCC"},Mmt2:function(U,X,x){"use strict";function I(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(t){return typeof t}:I=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(n)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=y(x("Lo0S"));function O(){if(typeof WeakMap!="function")return null;var n=new WeakMap;return O=function(){return n},n}function y(n){if(n&&n.__esModule)return n;if(n===null||I(n)!=="object"&&typeof n!="function")return{default:n};var s=O();if(s&&s.has(n))return s.get(n);var t={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e)){var r=i?Object.getOwnPropertyDescriptor(n,e):null;r&&(r.get||r.set)?Object.defineProperty(t,e,r):t[e]=n[e]}return t.default=n,s&&s.set(n,t),t}function v(n,s){if(!(n instanceof s))throw new TypeError("Cannot call a class as a function")}function o(n,s){for(var t=0;t<s.length;t++){var i=s[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function g(n,s,t){return s&&o(n.prototype,s),t&&o(n,t),n}var p=!1,d=40*1024*1024,a=function(){function n(){v(this,n),this._websocket=null,this._rQi=0,this._rQlen=0,this._rQbufferSize=1024*1024*4,this._rQ=null,this._sQbufferSize=1024*10,this._sQlen=0,this._sQ=null,this._eventHandlers={message:function(){},open:function(){},close:function(){},error:function(){}}}return g(n,[{key:"rQpeek8",value:function(){return this._rQ[this._rQi]}},{key:"rQskipBytes",value:function(t){this._rQi+=t}},{key:"rQshift8",value:function(){return this._rQshift(1)}},{key:"rQshift16",value:function(){return this._rQshift(2)}},{key:"rQshift32",value:function(){return this._rQshift(4)}},{key:"_rQshift",value:function(t){for(var i=0,e=t-1;e>=0;e--)i+=this._rQ[this._rQi++]<<e*8;return i}},{key:"rQshiftStr",value:function(t){typeof t=="undefined"&&(t=this.rQlen);for(var i="",e=0;e<t;e+=4096){var r=this.rQshiftBytes(Math.min(4096,t-e));i+=String.fromCharCode.apply(null,r)}return i}},{key:"rQshiftBytes",value:function(t){return typeof t=="undefined"&&(t=this.rQlen),this._rQi+=t,new Uint8Array(this._rQ.buffer,this._rQi-t,t)}},{key:"rQshiftTo",value:function(t,i){i===void 0&&(i=this.rQlen),t.set(new Uint8Array(this._rQ.buffer,this._rQi,i)),this._rQi+=i}},{key:"rQslice",value:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.rQlen;return new Uint8Array(this._rQ.buffer,this._rQi+t,i-t)}},{key:"rQwait",value:function(t,i,e){if(this.rQlen<i){if(e){if(this._rQi<e)throw new Error("rQwait cannot backup "+e+" bytes");this._rQi-=e}return!0}return!1}},{key:"flush",value:function(){this._sQlen>0&&this._websocket.readyState===WebSocket.OPEN&&(this._websocket.send(this._encodeMessage()),this._sQlen=0)}},{key:"send",value:function(t){this._sQ.set(t,this._sQlen),this._sQlen+=t.length,this.flush()}},{key:"sendString",value:function(t){this.send(t.split("").map(function(i){return i.charCodeAt(0)}))}},{key:"off",value:function(t){this._eventHandlers[t]=function(){}}},{key:"on",value:function(t,i){this._eventHandlers[t]=i}},{key:"_allocateBuffers",value:function(){this._rQ=new Uint8Array(this._rQbufferSize),this._sQ=new Uint8Array(this._sQbufferSize)}},{key:"init",value:function(){this._allocateBuffers(),this._rQi=0,this._websocket=null}},{key:"open",value:function(t,i){var e=this;this.init(),this._websocket=new WebSocket(t,i),this._websocket.binaryType="arraybuffer",this._websocket.onmessage=this._recvMessage.bind(this),this._websocket.onopen=function(){_.Debug(">> WebSock.onopen"),e._websocket.protocol&&_.Info("Server choose sub-protocol: "+e._websocket.protocol),e._eventHandlers.open(),_.Debug("<< WebSock.onopen")},this._websocket.onclose=function(r){_.Debug(">> WebSock.onclose"),e._eventHandlers.close(r),_.Debug("<< WebSock.onclose")},this._websocket.onerror=function(r){_.Debug(">> WebSock.onerror: "+r),e._eventHandlers.error(r),_.Debug("<< WebSock.onerror: "+r)}}},{key:"close",value:function(){this._websocket&&((this._websocket.readyState===WebSocket.OPEN||this._websocket.readyState===WebSocket.CONNECTING)&&(_.Info("Closing WebSocket connection"),this._websocket.close()),this._websocket.onmessage=function(){})}},{key:"_encodeMessage",value:function(){return new Uint8Array(this._sQ.buffer,0,this._sQlen)}},{key:"_expandCompactRQ",value:function(t){var i=(this._rQlen-this._rQi+t)*8,e=this._rQbufferSize<i;if(e&&(this._rQbufferSize=Math.max(this._rQbufferSize*2,i)),this._rQbufferSize>d&&(this._rQbufferSize=d,this._rQbufferSize-this.rQlen<t))throw new Error("Receive Queue buffer exceeded "+d+" bytes, and the new message could not fit");if(e){var r=this._rQ.buffer;this._rQ=new Uint8Array(this._rQbufferSize),this._rQ.set(new Uint8Array(r,this._rQi,this._rQlen-this._rQi))}else p?this._rQ.copyWithin(0,this._rQi,this._rQlen):this._rQ.set(new Uint8Array(this._rQ.buffer,this._rQi,this._rQlen-this._rQi));this._rQlen=this._rQlen-this._rQi,this._rQi=0}},{key:"_DecodeMessage",value:function(t){var i=new Uint8Array(t);i.length>this._rQbufferSize-this._rQlen&&this._expandCompactRQ(i.length),this._rQ.set(i,this._rQlen),this._rQlen+=i.length}},{key:"_recvMessage",value:function(t){this._DecodeMessage(t.data),this.rQlen>0?(this._eventHandlers.message(),this._rQlen==this._rQi&&(this._rQlen=0,this._rQi=0)):_.Debug("Ignoring empty message")}},{key:"sQ",get:function(){return this._sQ}},{key:"rQ",get:function(){return this._rQ}},{key:"rQi",get:function(){return this._rQi},set:function(t){this._rQi=t}},{key:"rQlen",get:function(){return this._rQlen-this._rQi}}]),n}();X.default=a},"N/zr":function(U,X,x){"use strict";function I(o){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(p){return typeof p}:I=function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},I(o)}Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var _=y(x("Lo0S"));function O(){if(typeof WeakMap!="function")return null;var o=new WeakMap;return O=function(){return o},o}function y(o){if(o&&o.__esModule)return o;if(o===null||I(o)!=="object"&&typeof o!="function")return{default:o};var g=O();if(g&&g.has(o))return g.get(o);var p={},d=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)){var n=d?Object.getOwnPropertyDescriptor(o,a):null;n&&(n.get||n.set)?Object.defineProperty(p,a,n):p[a]=o[a]}return p.default=o,g&&g.set(o,p),p}var v={toBase64Table:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),base64Pad:"=",encode:function(g){"use strict";for(var p="",d=g.length,a=d%3,n=0;n<d-2;n+=3)p+=this.toBase64Table[g[n]>>2],p+=this.toBase64Table[((g[n]&3)<<4)+(g[n+1]>>4)],p+=this.toBase64Table[((g[n+1]&15)<<2)+(g[n+2]>>6)],p+=this.toBase64Table[g[n+2]&63];var s=d-a;return a===2?(p+=this.toBase64Table[g[s]>>2],p+=this.toBase64Table[((g[s]&3)<<4)+(g[s+1]>>4)],p+=this.toBase64Table[(g[s+1]&15)<<2],p+=this.toBase64Table[64]):a===1&&(p+=this.toBase64Table[g[s]>>2],p+=this.toBase64Table[(g[s]&3)<<4],p+=this.toBase64Table[64],p+=this.toBase64Table[64]),p},toBinaryTable:[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,0,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1],decode:function(g){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,d=g.indexOf("=")-p;d<0&&(d=g.length-p);for(var a=(d>>2)*3+Math.floor(d%4/1.5),n=new Array(a),s=0,t=0,i=0,e=p;e<g.length;e++){var r=this.toBinaryTable[g.charCodeAt(e)&127],c=g.charAt(e)===this.base64Pad;if(r===-1){_.Error("Illegal character code "+g.charCodeAt(e)+" at position "+e);continue}t=t<<6|r,s+=6,s>=8&&(s-=8,c||(n[i++]=t>>s&255),t&=(1<<s)-1)}if(s){var u=new Error("Corrupted base64 string");throw u.name="Base64-Error",u}return n}};X.default=v},NBmB:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.encodingName=_,X.encodings=void 0;var I={encodingRaw:0,encodingCopyRect:1,encodingRRE:2,encodingHextile:5,encodingTight:7,encodingTightPNG:-260,pseudoEncodingQualityLevel9:-23,pseudoEncodingQualityLevel0:-32,pseudoEncodingDesktopSize:-223,pseudoEncodingLastRect:-224,pseudoEncodingCursor:-239,pseudoEncodingQEMUExtendedKeyEvent:-258,pseudoEncodingDesktopName:-307,pseudoEncodingExtendedDesktopSize:-308,pseudoEncodingXvp:-309,pseudoEncodingFence:-312,pseudoEncodingContinuousUpdates:-313,pseudoEncodingCompressLevel9:-247,pseudoEncodingCompressLevel0:-256,pseudoEncodingVMwareCursor:1464686180,pseudoEncodingExtendedClipboard:3231835598};X.encodings=I;function _(O){switch(O){case I.encodingRaw:return"Raw";case I.encodingCopyRect:return"CopyRect";case I.encodingRRE:return"RRE";case I.encodingHextile:return"Hextile";case I.encodingTight:return"Tight";case I.encodingTightPNG:return"TightPNG";default:return"[unknown encoding "+O+"]"}}},NFKh:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("MlIO"),x("F+F2"),x("qM6L"),x("ETIr"),x("wbyO"),x("cv67"),x("3y9D"),x("lPiR"),x("GRuw"),x("1uat"),x("uGsb"),x("5hvy"),x("ELcG"),x("WYAk"),x("e7zE"),x("K3mO"),x("OLod"),x("ALsQ"),x("9OqN"),x("qu8F"),x("S6kV"),x("gb/T"),x("qBft"),x("oRuE"),x("jO9C"),x("KmYQ"),x("uGxW"),x("bQjk"),x("wZgz"),x("pA7S"),x("w7YG"),x("E4JC"),x("PVpz"))})(this,function(I){return I})},NLgs:function(U,X,x){"use strict";x.d(X,"e",function(){return m}),x.d(X,"f",function(){return l}),x.d(X,"d",function(){return b}),x.d(X,"c",function(){return D}),x.d(X,"a",function(){return C}),x.d(X,"b",function(){return w});var I=x("miYZ"),_=x("tsqr"),O=x("9og8"),y=x("2qtc"),v=x("kLXV"),o=x("WmNS"),g=x.n(o),p=x("q1tI"),d=x.n(p),a=x("9kvl"),n=x("xKgJ"),s=x("1vsH"),t=x("RCxd"),i=x("yTi+"),e=x.n(i),r=x("1ZF9"),c=x.n(r),u=x("NoGO"),f=x.n(u),m=function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!!(l(A)&&E(R))},l=function(A){return Object(n.p)()?!0:(A({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!0}}),!1)},E=function(){var A,R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,k=Object(a.c)()._store.getState(),L=k.user;return(A=L.userInfo)!==null&&A!==void 0&&A.profile_completed?!0:(v.a.confirm({title:"\u63D0\u793A",width:530,centered:!0,content:R?"\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801":"\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){a.d.push("/account/profile/edit")}}),!1)},b=function(){var A,R=Object(a.c)()._store.getState(),k=R.user;return(A=k.userInfo)!==null&&A!==void 0&&A.professional_certification?!0:(v.a.confirm({title:"\u63D0\u793A",centered:!0,content:d.a.createElement("div",{className:"tc"},"\u60A8\u9700\u8981\u53BB\u5B8C\u6210\u60A8\u7684\u804C\u4E1A\u8BA4\u8BC1\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD"),okText:"\u7ACB\u5373\u5B8C\u5584",cancelText:"\u7A0D\u540E\u5B8C\u5584",onOk:function(){Object(s.S)("/account/certification")}}),!1)},D=function(){return Object(n.a)()?!0:(v.a.warning({centered:!0,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("p",null,"\u626B\u7801\u52A0\u5934\u6B4C\u52A9\u6559\uFF0C\u7533\u8BF7\u64CD\u4F5C\u6743\u9650"),d.a.createElement("img",{src:f.a,width:200})),okText:"\u6211\u77E5\u9053\u4E86",maskClosable:!0}),!1)},C=function(A,R){return A?!0:(v.a.confirm({centered:!0,zIndex:1e4,width:530,title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("p",null,R||"\u8BE5\u5B9E\u8DF5\u8D44\u6E90\u9700\u6388\u6743\u540E\u624D\u53EF\u4F7F\u7528\u3002 \u60A8\u53EF\u4EE5\u5728QQ\u670D\u52A1\u7FA4\u5411\u7BA1\u7406\u5458\u7533\u8BF7\uFF0C\u83B7\u5F97\u7EE7\u7EED\u64CD\u4F5C\u7684\u6743\u9650\u3002"),d.a.createElement("div",{style:{marginLeft:"110px"}},d.a.createElement("img",{src:c.a,width:200}),d.a.createElement("div",{style:{marginLeft:"35px"}},"\u7FA4\u53F7\uFF1A","714336072"))),okText:"\u7ACB\u5373\u8054\u7CFB",cancelText:"\u53D6\u6D88",onOk:function(){Object(s.S)("https://qm.qq.com/cgi-bin/qm/qr?k=tIyDPXUtE0yEk-MOJxhH55lTUJS-nYAM&jump_from=webapi")}}),!1)},w=function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",k=Object(a.c)()._store.getState(),L=k.shixunsDetail.detail;return(L==null?void 0:L.public)===2||(L==null?void 0:L.public)===1||(L==null?void 0:L.shixun_status)===3?(v.a.info({centered:!0,icon:d.a.createElement(t.a,{style:{color:"#faad14"}}),width:460,title:"\u63D0\u793A",content:d.a.createElement("div",{className:"tc",style:{marginLeft:-38}},d.a.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-start",paddingLeft:38,margin:"12px 0"}},d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u7684\u72B6\u6001\u4E3A",(L==null?void 0:L.public)===2?"\u5DF2\u516C\u5F00":(L==null?void 0:L.public)===1?"\u5F85\u5BA1\u6838":"\u5DF2\u5173\u95ED","\uFF0C",R,"\u3002"),d.a.createElement("p",null,"\u5982\u6709\u9700\u8981\uFF0C\u8BF7\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u8FDB\u884C\u6280\u672F\u652F\u6301\u3002")),d.a.createElement("img",{style:{border:"4px solid #0152d9",borderRadius:"4px"},src:e.a,alt:"\u4E8C\u7EF4\u7801",width:160})),okText:"\u6211\u77E5\u9053\u4E86"}),!0):(L==null?void 0:L.shixun_status)===2?(v.a.confirm({centered:!0,icon:d.a.createElement(t.a,null),title:"\u63D0\u793A",content:d.a.createElement("div",null,d.a.createElement("span",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5DF2\u53D1\u5E03\uFF0C",R,"\u3002"),d.a.createElement("br",null),d.a.createElement("span",null,"\u5982\u6709\u9700\u8981\uFF0C\u60A8\u53EF\u4EE5\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u518D\u8FDB\u884C\u64CD\u4F5C\u3002")),okText:"\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){v.a.confirm({width:440,centered:!0,icon:d.a.createElement(t.a,{style:{color:"#faad14"}}),title:"\u63D0\u793A",content:"\u64A4\u9500\u53D1\u5E03\u540E\uFF0C\u5B66\u5458\u5C06\u65E0\u6CD5\u8FDB\u884C\u7EC3\u4E60\u3002\u662F\u5426\u786E\u8BA4\u64A4\u9500\u53D1\u5E03\uFF1F",okText:"\u786E\u5B9A\u64A4\u9500\u53D1\u5E03",cancelText:"\u53D6\u6D88",onOk:function(){var G=Object(O.a)(g.a.mark(function N(){var K;return g.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:return P.next=2,A({type:"shixunsDetail/cancelRelease",payload:{id:L==null?void 0:L.identifier}});case 2:K=P.sent,K.status!==401&&(_.b.success("\u64A4\u9500\u53D1\u5E03\u6210\u529F\u3002\u5B9E\u8BAD\u56DE\u5230\u672A\u53D1\u5E03\u7684\u72B6\u6001\u3002"),A({type:"shixunsDetail/getShixunsDetail",payload:{id:L==null?void 0:L.identifier}}),A({type:"practiceSetting/getCommonData",payload:{id:L==null?void 0:L.identifier}}));case 4:case"end":return P.stop()}},N)}));function W(){return G.apply(this,arguments)}return W}()})}}),!0):!1}},Nmxd:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAF4ElEQVRoQ91aW2wUVRj+/rPbSivURIgKjZcHjUYTgZ0lthgv3V0LSqB9IAQeNNEIaKKwZbcFnuQJoZ1piyYawJjIiwZDwiVBaHd28QItaWeLD4KJPgimiA+YCAZj6Z7fzPZiu7e57WriJE0f5v++//tm/j3nn3MOoQyXcmJ/LdfeCBOjEUA9EdUzUA9g0ST9VQJGmXkU5n/CAN2q043Vm295TU9uCRS9MwCiFWBqAmD++R1yjQNIgTgF5tNGuCPtEJ8Nd2xgWarzPil9UbBsA1G1m6R5GOYxkOgRItM71NRxzQmnIwMBvStKoCiAB50kcRB7mcG96XB7r12MLQNPJXrvzdD4QQZW2yX2EkfACR/7N56PRH+14rE0sDSpLRaM4wA/YEVW3vt0RRLWjIRi35biLWkgmOhaz0SflleYMzZi3jAcaf+sGKqoAUVX3wbwnrN0FYveYoTj7xdiL2ggqKsvMnCyYnJcEBPw0nA4/kUuNM9AINX9MMnMIEDzXeSpIISvs/A1pJu2/TgzSZ4BRVf7ALxQQSVeqPuNcLy5qIHJcb7HS4ZKYxncNnOemH4DyqmehaiW58D8UKVFeOIn+gljYrmxsu2XWa2Eomt7AN7uidwd+CKBPy8EZdA7hSlprxGO7Zg2EPxSW8q35WDZehv7Ri4KEuuGQtu+y4UoSe0DML9ZkIp5jKpEw/BzsZFsCSkpNQYJ1X7eskQWF6+rbwD4sGQWgbjRFNcmDCS0oyBuKYsseyRFxS/TteWSZT+IaktSMR0zIrFWajzcXTM2X95w0c/bk5ofVVT8k6e77vT7qY+A5TbIx6uvizoKJNUVxDhlA1COkKLis5Wgq2bZmOVj62LCSlIS2m4Q77SF8BZkJd667nPzM71LSqLrExC94k2bJbqk+Im65xQIzr7wmA9RUFcTDIQtJWQDaB3A5lT+ur34bFRJ8WbdV1VRAowGB5wTagCdFF29BOAxSzAjbkTiWrZWU+oCSJgTScwCV1K8m7rPyfe9acAcgeaVFsIHjXD7ptyYxw/vqq5ZMHcHGOZvaE7OfTvindf97CQ3bRkgorXDodiRUiYDuhYlZAeDe6zKxuTJ1j34awDC8u0XD7hht4RuwkctxvOxlFWyYFJ7jUDnC7UHU1iz7qurxBlmDlrxlb5Pl5z8iC8LIVuHmjoueEtqjvddBwDa6JWHCQlnwyjjAu7wtxjPRK+4Ta7Y6XPskpvDqJLUdoMdTWTJOX9kWs+2bL9pN89U3GTdn3WKKxpvTmRuWglmPpKOtK91IiQ73vvJFL/YCa5UbLaVaDzXXTP2p4tmjvGREYnbruOgrn7MwKvlEg9gvLpG1E2000ntKNh5O82EznQobvkVF9S732LIgus6rg0RHTNCsdYJA7oWB7jLJdlOIxzfUwwbTHY+zSy+ccldAkbtRjimThroCYAzA46bqUl6JmxOh+IH8mbq1K65NXLuIIAnymqAMQbyNRrhtvT0qkQgqe4lRof7RHKdEe6Y9XEe0NVDBLzsnrMwcmbp/rOs8lXPQtzODHhY+/9LEq0aCcV0M22wX21jge5yiwdwGVW+RuPZnGUVM9FkP+NlYesaIFcJ8s+TLM9UQDwY1JYOx6Y3QPLXRpNqPzEiHpJfBOAD8KgHjoJQs3VIh+Kzlj3zDCzp63zEJ8QgCHeXW4AnPsZvGSkbLjR3/DCT5/+3vD7lTkl0bQHRPk9PrVxg5q1GpL3gZkvpLaZU93qW8r/dYhJiw3DTNudbTFMPb1lf5xIpxHEQ7i/XA7XFw/hZSLlmqLn094flLqWZzNzcZikO/JvbrCTkJjub3rYMZJ8YgwJJbSuBK7zRTb3pUGwfCGznTdk3MMm2tG/vIvL7tpJE1G3vlCeMMcYCvTye2TfSvP2qHeFTMY4NTI9Sek8AJFewlCGi7IEPc/JycmWYOUVCJMHitNmYOQF7NjAzmTK8v5Z/N4/biEYI1BN46riNeeTGvEazx21Ao5DmcRs5QHfV6UbQ+3GbvwHH7EQQahyMxwAAAABJRU5ErkJggg=="},NoGO:function(U,X,x){U.exports=x.p+"static/newqrcode.d852fdfc.png"},NvD2:function(U,X,x){"use strict";x.d(X,"a",function(){return o});var I=x("Kwbf");function _(g,p){var d=new Set;return g.forEach(function(a){p.has(a)||d.add(a)}),d}function O(g){var p=g||{},d=p.disabled,a=p.disableCheckbox,n=p.checkable;return!!(d||a)||n===!1}function y(g,p,d,a){for(var n=new Set(g),s=new Set,t=0;t<=d;t+=1){var i=p.get(t)||new Set;i.forEach(function(u){var f=u.key,m=u.node,l=u.children,E=l===void 0?[]:l;n.has(f)&&!a(m)&&E.filter(function(b){return!a(b.node)}).forEach(function(b){n.add(b.key)})})}for(var e=new Set,r=d;r>=0;r-=1){var c=p.get(r)||new Set;c.forEach(function(u){var f=u.parent,m=u.node;if(a(m)||!u.parent||e.has(u.parent.key))return;if(a(u.parent.node)){e.add(f.key);return}var l=!0,E=!1;(f.children||[]).filter(function(b){return!a(b.node)}).forEach(function(b){var D=b.key,C=n.has(D);l&&!C&&(l=!1),!E&&(C||s.has(D))&&(E=!0)}),l&&n.add(f.key),E&&s.add(f.key),e.add(f.key)})}return{checkedKeys:Array.from(n),halfCheckedKeys:Array.from(_(s,n))}}function v(g,p,d,a,n){for(var s=new Set(g),t=new Set(p),i=0;i<=a;i+=1){var e=d.get(i)||new Set;e.forEach(function(f){var m=f.key,l=f.node,E=f.children,b=E===void 0?[]:E;!s.has(m)&&!t.has(m)&&!n(l)&&b.filter(function(D){return!n(D.node)}).forEach(function(D){s.delete(D.key)})})}t=new Set;for(var r=new Set,c=a;c>=0;c-=1){var u=d.get(c)||new Set;u.forEach(function(f){var m=f.parent,l=f.node;if(n(l)||!f.parent||r.has(f.parent.key))return;if(n(f.parent.node)){r.add(m.key);return}var E=!0,b=!1;(m.children||[]).filter(function(D){return!n(D.node)}).forEach(function(D){var C=D.key,w=s.has(C);E&&!w&&(E=!1),!b&&(w||t.has(C))&&(b=!0)}),E||s.delete(m.key),b&&t.add(m.key),r.add(m.key)})}return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(_(t,s))}}function o(g,p,d,a){var n=[],s;a?s=a:s=O;var t=new Set(g.filter(function(c){var u=!!d[c];return u||n.push(c),u})),i=new Map,e=0;Object.keys(d).forEach(function(c){var u=d[c],f=u.level,m=i.get(f);m||(m=new Set,i.set(f,m)),m.add(u),e=Math.max(e,f)}),Object(I.a)(!n.length,"Tree missing follow keys: ".concat(n.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var r;return p===!0?r=y(t,i,e,s):r=v(t,p.halfCheckedKeys,i,e,s),r}},OLES:function(U,X,x){"use strict";var I=x("U8pU"),_=x("VTBJ"),O=x("Ff2n"),y=x("q1tI"),v=x("uciX"),o=x("7ixt"),g=function(t){var i=t.overlay,e=t.prefixCls,r=t.id,c=t.overlayInnerStyle;return y.createElement("div",{className:"".concat(e,"-inner"),id:r,role:"tooltip",style:c},typeof i=="function"?i():i)},p=g,d=function(t,i){var e=t.overlayClassName,r=t.trigger,c=r===void 0?["hover"]:r,u=t.mouseEnterDelay,f=u===void 0?0:u,m=t.mouseLeaveDelay,l=m===void 0?.1:m,E=t.overlayStyle,b=t.prefixCls,D=b===void 0?"rc-tooltip":b,C=t.children,w=t.onVisibleChange,S=t.afterVisibleChange,A=t.transitionName,R=t.animation,k=t.placement,L=k===void 0?"right":k,M=t.align,G=M===void 0?{}:M,W=t.destroyTooltipOnHide,N=W===void 0?!1:W,K=t.defaultVisible,F=t.getTooltipContainer,P=t.overlayInnerStyle,B=Object(O.a)(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),J=Object(y.useRef)(null);Object(y.useImperativeHandle)(i,function(){return J.current});var re=Object(_.a)({},B);"visible"in t&&(re.popupVisible=t.visible);var he=function(){var Ce=t.arrowContent,fe=Ce===void 0?null:Ce,oe=t.overlay,se=t.id;return[y.createElement("div",{className:"".concat(D,"-arrow"),key:"arrow"},fe),y.createElement(p,{key:"content",prefixCls:D,id:se,overlay:oe,overlayInnerStyle:P})]},we=!1,ke=!1;if(typeof N=="boolean")we=N;else if(N&&Object(I.a)(N)==="object"){var ne=N.keepParent;we=ne===!0,ke=ne===!1}return y.createElement(v.a,Object.assign({popupClassName:e,prefixCls:D,popup:he,action:c,builtinPlacements:o.a,popupPlacement:L,ref:J,popupAlign:G,getPopupContainer:F,onPopupVisibleChange:w,afterPopupVisibleChange:S,popupTransitionName:A,popupAnimation:R,defaultPopupVisible:K,destroyPopupOnHide:we,autoDestroy:ke,mouseLeaveDelay:l,popupStyle:E,mouseEnterDelay:f},re),C)},a=Object(y.forwardRef)(d),n=X.a=a},OLod:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("K3mO"))})(this,function(I){I.lib.Cipher||function(_){var O=I,y=O.lib,v=y.Base,o=y.WordArray,g=y.BufferedBlockAlgorithm,p=O.enc,d=p.Utf8,a=p.Base64,n=O.algo,s=n.EvpKDF,t=y.Cipher=g.extend({cfg:v.extend(),createEncryptor:function(A,R){return this.create(this._ENC_XFORM_MODE,A,R)},createDecryptor:function(A,R){return this.create(this._DEC_XFORM_MODE,A,R)},init:function(A,R,k){this.cfg=this.cfg.extend(k),this._xformMode=A,this._key=R,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(A){return this._append(A),this._process()},finalize:function(A){A&&this._append(A);var R=this._doFinalize();return R},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function A(R){return typeof R=="string"?S:D}return function(R){return{encrypt:function(k,L,M){return A(L).encrypt(R,k,L,M)},decrypt:function(k,L,M){return A(L).decrypt(R,k,L,M)}}}}()}),i=y.StreamCipher=t.extend({_doFinalize:function(){var A=this._process(!0);return A},blockSize:1}),e=O.mode={},r=y.BlockCipherMode=v.extend({createEncryptor:function(A,R){return this.Encryptor.create(A,R)},createDecryptor:function(A,R){return this.Decryptor.create(A,R)},init:function(A,R){this._cipher=A,this._iv=R}}),c=e.CBC=function(){var A=r.extend();A.Encryptor=A.extend({processBlock:function(k,L){var M=this._cipher,G=M.blockSize;R.call(this,k,L,G),M.encryptBlock(k,L),this._prevBlock=k.slice(L,L+G)}}),A.Decryptor=A.extend({processBlock:function(k,L){var M=this._cipher,G=M.blockSize,W=k.slice(L,L+G);M.decryptBlock(k,L),R.call(this,k,L,G),this._prevBlock=W}});function R(k,L,M){var G,W=this._iv;W?(G=W,this._iv=_):G=this._prevBlock;for(var N=0;N<M;N++)k[L+N]^=G[N]}return A}(),u=O.pad={},f=u.Pkcs7={pad:function(A,R){for(var k=R*4,L=k-A.sigBytes%k,M=L<<24|L<<16|L<<8|L,G=[],W=0;W<L;W+=4)G.push(M);var N=o.create(G,L);A.concat(N)},unpad:function(A){var R=A.words[A.sigBytes-1>>>2]&255;A.sigBytes-=R}},m=y.BlockCipher=t.extend({cfg:t.cfg.extend({mode:c,padding:f}),reset:function(){var A;t.reset.call(this);var R=this.cfg,k=R.iv,L=R.mode;this._xformMode==this._ENC_XFORM_MODE?A=L.createEncryptor:(A=L.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==A?this._mode.init(this,k&&k.words):(this._mode=A.call(L,this,k&&k.words),this._mode.__creator=A)},_doProcessBlock:function(A,R){this._mode.processBlock(A,R)},_doFinalize:function(){var A,R=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(R.pad(this._data,this.blockSize),A=this._process(!0)):(A=this._process(!0),R.unpad(A)),A},blockSize:128/32}),l=y.CipherParams=v.extend({init:function(A){this.mixIn(A)},toString:function(A){return(A||this.formatter).stringify(this)}}),E=O.format={},b=E.OpenSSL={stringify:function(A){var R,k=A.ciphertext,L=A.salt;return L?R=o.create([1398893684,1701076831]).concat(L).concat(k):R=k,R.toString(a)},parse:function(A){var R,k=a.parse(A),L=k.words;return L[0]==1398893684&&L[1]==1701076831&&(R=o.create(L.slice(2,4)),L.splice(0,4),k.sigBytes-=16),l.create({ciphertext:k,salt:R})}},D=y.SerializableCipher=v.extend({cfg:v.extend({format:b}),encrypt:function(A,R,k,L){L=this.cfg.extend(L);var M=A.createEncryptor(k,L),G=M.finalize(R),W=M.cfg;return l.create({ciphertext:G,key:k,iv:W.iv,algorithm:A,mode:W.mode,padding:W.padding,blockSize:A.blockSize,formatter:L.format})},decrypt:function(A,R,k,L){L=this.cfg.extend(L),R=this._parse(R,L.format);var M=A.createDecryptor(k,L).finalize(R.ciphertext);return M},_parse:function(A,R){return typeof A=="string"?R.parse(A,this):A}}),C=O.kdf={},w=C.OpenSSL={execute:function(A,R,k,L){L||(L=o.random(64/8));var M=s.create({keySize:R+k}).compute(A,L),G=o.create(M.words.slice(R),k*4);return M.sigBytes=R*4,l.create({key:M,iv:G,salt:L})}},S=y.PasswordBasedCipher=D.extend({cfg:D.cfg.extend({kdf:w}),encrypt:function(A,R,k,L){L=this.cfg.extend(L);var M=L.kdf.execute(k,A.keySize,A.ivSize);L.iv=M.iv;var G=D.encrypt.call(this,A,R,M.key,L);return G.mixIn(M),G},decrypt:function(A,R,k,L){L=this.cfg.extend(L),R=this._parse(R,L.format);var M=L.kdf.execute(k,A.keySize,A.ivSize,R.salt);L.iv=M.iv;var G=D.decrypt.call(this,A,R,M.key,L);return G}})}()})},OZM5:function(U,X,x){"use strict";x.d(X,"b",function(){return a}),x.d(X,"a",function(){return n}),x.d(X,"k",function(){return s}),x.d(X,"h",function(){return t}),x.d(X,"i",function(){return i}),x.d(X,"g",function(){return e}),x.d(X,"c",function(){return r}),x.d(X,"d",function(){return c}),x.d(X,"j",function(){return m}),x.d(X,"e",function(){return l}),x.d(X,"f",function(){return E});var I=x("KQm4"),_=x("U8pU"),O=x("Ff2n"),y=x("q1tI"),v=x.n(y),o=x("Kwbf"),g=x("WaYH"),p=.25,d=2;function a(b,D){var C=b.slice(),w=C.indexOf(D);return w>=0&&C.splice(w,1),C}function n(b,D){var C=b.slice();return C.indexOf(D)===-1&&C.push(D),C}function s(b){return b.split("-")}function t(b,D){return"".concat(b,"-").concat(D)}function i(b){return b&&b.type&&b.type.isTreeNode}function e(b,D){var C=[b],w=D[b];function S(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(R){var k=R.key,L=R.children;C.push(k),S(L)})}return S(w.children),C}function r(b,D){var C=b.clientY,w=D.selectHandle.getBoundingClientRect(),S=w.top,A=w.bottom,R=w.height,k=Math.max(R*p,d);return C<=S+k?-1:C>=A-k?1:0}function c(b,D){if(!b)return;var C=D.multiple;return C?b.slice():b.length?[b[0]]:b}var u=function(D){return D};function f(b,D){if(!b)return[];var C=D||{},w=C.processProps,S=w===void 0?u:w,A=Array.isArray(b)?b:[b];return A.map(function(R){var k=R.children,L=Object(O.a)(R,["children"]),M=f(k,D);return v.a.createElement(g.a,Object.assign({},S(L)),M)})}function m(b){if(!b)return null;var D;if(Array.isArray(b))D={checkedKeys:b,halfCheckedKeys:void 0};else if(Object(_.a)(b)==="object")D={checkedKeys:b.checked||void 0,halfCheckedKeys:b.halfChecked||void 0};else return Object(o.a)(!1,"`checkedKeys` is not an array or an object"),null;return D}function l(b,D){var C=new Set;function w(S){if(C.has(S))return;var A=D[S];if(!A)return;C.add(S);var R=A.parent,k=A.node;if(k.disabled)return;R&&w(R.key)}return(b||[]).forEach(function(S){w(S)}),Object(I.a)(C)}function E(b){var D={};return Object.keys(b).forEach(function(C){(C.startsWith("data-")||C.startsWith("aria-"))&&(D[C]=b[C])}),D}},Ohmc:function(U,X,x){U.exports=x.p+"static/certificate.fc32dc1b.jpg"},OoWo:function(U,X,x){},Ot1p:function(U,X,x){"use strict";var I=x("2qtc"),_=x("kLXV"),O=x("rAM+"),y=x("miYZ"),v=x("tsqr"),o=x("9og8"),g=x("tJVT"),p=x("jrin"),d=x("WmNS"),a=x.n(d),n=x("q1tI"),s=x.n(n),t=x("VrN/"),i=x.n(t),e=x("bdgK"),r=x("p77/"),c=x("Bd2K"),u=x("ELLl"),f=x("19Vz"),m=x("lZu9"),l=x("+NIl"),E=x("kSUc"),b=x("9Bee"),D=function(Qe){var te=Qe.value,Je=te===void 0?"":te,ut=Qe.className,Be=Qe.showTextOnly,qe=Qe.showLines,at=Qe.style,wt=at===void 0?{}:at,ft=Object(n.useMemo)(function(){return""},[Je]);return s.a.createElement(s.a.Fragment,null,s.a.createElement("div",{dangerouslySetInnerHTML:{__html:ft}}))},C=x("0Owb"),w=x("dejd"),S=x("C+DQ"),A=x("1vsH"),R=x("m3rI"),k=[{title:"\u7C97\u4F53",icon:"icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"icon-sum",actionName:"inline-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"icon-picture",actionName:"upload-image"},{title:"\u8868\u683C",icon:"icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"icon-eraser",actionName:"eraser"}];function L(Qe){var te=Qe.onActionCallback,Je=Qe.title,ut=Qe.icon,Be=Qe.actionName,qe=Qe.className,at=qe===void 0?"":qe,wt=Qe.children;function ft(){te(Be)}return s.a.createElement("a",{title:Je,className:at,onClick:ft},s.a.createElement("i",{className:"md-iconfont ".concat(ut)}),wt)}var M=function(Qe){var te=Qe.watch,Je=Qe.showNullButton,ut=Qe.onActionCallback,Be=Qe.fullScreen,qe=Qe.insertTemp,at=Qe.hidetoolBar,wt=Qe.uuid,ft=Qe.setOpenPhones;console.log("link:","".concat(location.origin,"/upload.html?_educoder_session_login=").concat(Object(A.F)("_educoder_session_login"),"&_educoder_session=").concat(Object(A.F)("_educoder_session"),"&key=").concat(wt,"&api=").concat(encodeURIComponent(R.a.PROXY_SERVER)));var st=[].concat(k,[{title:"".concat(te?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"),icon:"".concat(te?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return s.a.createElement("ul",{className:"markdown-toolbar-container"},!at&&st.map(function(Pe,ze){return s.a.createElement("li",{key:ze},Pe.actionName?s.a.createElement(L,Object(C.a)({},Pe,{onActionCallback:ut})):s.a.createElement("span",{className:"v-line"}))}),Je?s.a.createElement("li",null,s.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:ut},s.a.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,qe&&s.a.createElement("li",null,s.a.createElement(L,{icon:"icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:"inster-template-".concat(qe),onActionCallback:ut},s.a.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),s.a.createElement("li",{className:"btn-full-screen"},s.a.createElement(L,{icon:"".concat(Be?"icon-shrink":"icon-enlarge"),title:Be?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:ut})))},G=x("M8RZ"),W=x("+L6B"),N=x("2/Rp"),K=x("y8nQ"),F=x("Vl3Y"),P=x("5NDa"),B=x("5rEg"),J={labelCol:{span:4},wrapperCol:{span:20}},re=function(Qe){var te=Qe.callback,Je=Qe.onCancel;function ut(Be){te(Be)}return s.a.createElement(F.a,Object(C.a)({},J,{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:ut}),s.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},s.a.createElement(B.a,null)),s.a.createElement(F.a.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},s.a.createElement(B.a,null)),s.a.createElement("div",{className:"flex-container flex-end"},s.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(N.a,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},he=x("7ahc"),we=x("HmJG"),ke=x("BjJ7"),ne=F.a.useForm,Oe={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}},fe=function(Qe){var te=Qe.callback,Je=Qe.onCancel,ut=ne(),Be=Object(g.a)(ut,1),qe=Be[0];function at(st){te(st)}function wt(st,Pe){if(st.status===-1){v.b.error(st.message);return}qe.setFieldsValue({src:"/api/attachments/".concat(st.id),type:Pe.type})}function ft(st){var Pe=st.target.files[0];se(Pe,wt)}return s.a.createElement(F.a,Object(C.a)({form:qe},Ce,{className:"upload-image-panel",onFinish:at}),s.a.createElement(F.a.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},s.a.createElement("div",{className:"flex-container"},s.a.createElement(F.a.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},s.a.createElement(B.a,{style:Oe})),s.a.createElement(oe,{onFileChange:ft}))),s.a.createElement(F.a.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},s.a.createElement(B.a,{style:{width:264}})),s.a.createElement(F.a.Item,{style:{textAlign:"right"}},s.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(N.a,{type:"ghost",onClick:Je},"\u53D6\u6D88")))};function oe(Qe){var te=Qe.onFileChange;return s.a.createElement("a",{className:"upload-button"},"\u672C\u5730\u4E0A\u4F20",s.a.createElement("input",{type:"file",onChange:te}))}function se(Qe,te){if(!Qe)throw new String("\u6CA1\u6709\u6587\u4EF6");var Je=new FormData;Je.append("editormd-image-file",Qe),Je.append("file_param_name","editormd-image-file"),Je.append("byxhr","true");var ut=new window.XMLHttpRequest;ut.withCredentials=!0,ut.addEventListener("load",function(Be){te(JSON.parse(Be.target.responseText),Qe)},!1),ut.addEventListener("error",function(Be){console.error(Be)},!1),ut.open("POST","".concat(ke.a,"/api/attachments.json")),ut.send(Je)}var be=x("giR+"),ie=x("fyUT"),de=x("7Kak"),Fe=x("9yH6"),ae=Fe.a.Group,Z={margin:"0 8px"},Y=function(Qe){var te=Qe.callback,Je=Qe.onCancel;function ut(Be){te(Be)}return s.a.createElement(F.a,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:ut},s.a.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},s.a.createElement("span",{style:Z},"\u5355\u5143\u683C\u6570\uFF1A"),s.a.createElement("span",{style:Z},"\u884C\u6570"),s.a.createElement(F.a.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},s.a.createElement(ie.a,null)),s.a.createElement("span",{style:Z},"\u5217\u6570"),s.a.createElement(F.a.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},s.a.createElement(ie.a,null))),s.a.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},s.a.createElement("span",{style:Z},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),s.a.createElement(F.a.Item,{name:"align"},s.a.createElement(ae,null,s.a.createElement(Fe.a,{value:"default"},s.a.createElement("i",{className:"fa fa-align-justify"})),s.a.createElement(Fe.a,{value:"left"},s.a.createElement("i",{className:"fa fa-align-left"})),s.a.createElement(Fe.a,{value:"center"},s.a.createElement("i",{className:"fa fa-align-center"})),s.a.createElement(Fe.a,{value:"right"},s.a.createElement("i",{className:"fa fa-align-right"}))))),s.a.createElement("div",{className:"flex-container flex-end"},s.a.createElement(N.a,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),s.a.createElement(N.a,{type:"ghost",onClick:Je},"\u53D6\u6D88")))},q=x("ErOA"),ve=x("7Cbv"),pe="link",Te="upload-image",Ne="code-block",me="add-table",Ie="------------",_e={default:Ie,left:":".concat(Ie),center:":".concat(Ie,":"),right:"".concat(Ie,":")},Ve=x("9VGf"),tt,Ge;function Le(){}var bt=0,Re=1e4,Xe="\u2581",et=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`;function Ye(Qe){return/^\d+$/.test(Qe)?"".concat(Qe,"px"):Qe}var Me=navigator.platform.toUpperCase().indexOf("MAC")>=0,Ke=Me?"Cmd":"Ctrl",ge=["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"],Ee=(tt={},Object(p.a)(tt,Ke+"-B","bold"),Object(p.a)(tt,Ke+"-I","italic"),tt),ce=(Ge={},Object(p.a)(Ge,pe,"\u6DFB\u52A0\u94FE\u63A5"),Object(p.a)(Ge,Ne,"\u6DFB\u52A0\u4EE3\u7801\u5757"),Object(p.a)(Ge,Te,"\u6DFB\u52A0\u6587\u4EF6"),Object(p.a)(Ge,me,"\u6DFB\u52A0\u8868\u683C"),Ge),je=X.a=function(Qe){var te=Qe.defaultValue,Je=te===void 0?"":te,ut=Qe.onChange,Be=Qe.width,qe=Be===void 0?"100%":Be,at=Qe.height,wt=at===void 0?400:at,ft=Qe.miniToolbar,st=ft===void 0?!1:ft,Pe=Qe.isFocus,ze=Pe===void 0?!1:Pe,yt=Qe.watch,pt=Qe.insertTemp,Bt=Qe.mode,Ht=Bt===void 0?"markdown":Bt,lt=Qe.id,Lt=lt===void 0?"markdown-editor-id":lt,Dt=Qe.showResizeBar,Mt=Dt===void 0?!1:Dt,Wt=Qe.noStorage,Yt=Wt===void 0?!1:Wt,mn=Qe.showNullButton,Qt=mn===void 0?!1:mn,$t=Qe.hidetoolBar,Kn=$t===void 0?!1:$t,hn=Qe.fullScreen,Rn=hn===void 0?!1:hn,wn=Qe.onBlur,Pn=Qe.onCMBeforeChange,Yn=Qe.onFullScreen,or=Qe.className,Xt=or===void 0?"":or,xn=Qe.disablePaste,Er=xn===void 0?!1:xn,nr=Qe.placeholder,Ir=nr===void 0?"":nr,qn=Qe.values,ue=qn===void 0?"":qn,V=Object(n.useState)(null),Q=Object(g.a)(V,2),ee=Q[0],Se=Q[1],le=Object(n.useState)(Je),nt=Object(g.a)(le,2),Nt=nt[0],Jt=nt[1],an=Object(n.useState)(yt),Gt=Object(g.a)(an,2),Dn=Gt[0],Xn=Gt[1],sr=Object(n.useState)(Rn),Tr=Object(g.a)(sr,2),gr=Tr[0],rr=Tr[1],xr=Object(n.useState)(""),qi=Object(g.a)(xr,2),Gr=qi[0],ai=qi[1],da=Object(n.useState)(0),Fi=Object(g.a)(da,2),ia=Fi[0],Ca=Fi[1],po=Object(n.useState)(wt),so=Object(g.a)(po,2),xo=so[0],ka=so[1],Yi=Object(n.useState)(!1),Nr=Object(g.a)(Yi,2),Qr=Nr[0],yi=Nr[1],Fr=Object(n.useRef)(Object(ve.a)()),wr=Object(n.useRef)(!1),ei=Object(n.useRef)(),vr=Object(n.useRef)(),oi=Object(n.useRef)(),ir=Object(n.useRef)(),Wi=Object(n.useRef)(),Mi=function(){var Qn=Object(o.a)(a.a.mark(function mr(){var Jn,Lr;return a.a.wrap(function(gi){for(;;)switch(gi.prev=gi.next){case 0:return gi.next=2,Object(q.a)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:Fr.current}});case 2:Lr=gi.sent,Lr!=null&&(Jn=Lr.attachments)!==null&&Jn!==void 0&&Jn.length&&(console.log("cm:",ee,vr),Lr.attachments.map(function(cr){cr.content_type.indexOf("image")>-1?ee.replaceSelection(".concat(cr.content_type,")")):cr.content_type.indexOf("video")>-1?ee.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):cr.content_type.indexOf("pdf")>-1?ee.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(cr.id,"?type=").concat(cr.content_type,'&disposition=inline" target="_blank">').concat(cr.name,"</a>")):ee.replaceSelection("[".concat(cr.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(cr.id,"?type=").concat(cr.content_type,")"))}));case 4:case"end":return gi.stop()}},mr)}));return function(){return Qn.apply(this,arguments)}}();Object(n.useEffect)(function(){Jt(ue),ee==null||ee.setValue(ue)},[ue]),Object(n.useEffect)(function(){Yn==null||Yn(gr)},[gr]),Object(n.useEffect)(function(){if(vr.current){var Qn=i.a.fromTextArea(vr.current,{mode:Ht,lineNumbers:!st,lineWrapping:!0,value:Je,autoCloseTags:!0,autoCloseBrackets:!0});ze&&Qn.focus();function mr(Jn,Lr){if(Er){Lr.preventDefault();return}var Kr=Lr.clipboardData;if(Kr){var gi=Kr.types.toString(),cr=Kr.items;if(gi==="Files"||Kr.types.indexOf("Files")>-1){if(Lr.preventDefault(),Ht=="stex")return;try{var Xi,ga=cr[1];((Xi=cr[0])===null||Xi===void 0?void 0:Xi.kind)==="file"&&(ga=cr[0]);var jr=ga.getAsFile(),qa=jr.name.split(".").pop();se(jr,function(di){if(di.id){var Ai,va,Ma;(jr==null||((Ai=jr.type)===null||Ai===void 0)?void 0:Ai.indexOf("image"))>-1?Qn.replaceSelection(".concat(di.content_type,")")):(jr==null||((va=jr.type)===null||va===void 0)?void 0:va.indexOf("video"))>-1?Qn.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,'"></video>')):(jr==null||((Ma=jr.type)===null||Ma===void 0)?void 0:Ma.indexOf("pdf"))>-1?Qn.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(jr.type,'&disposition=inline" target="_blank">').concat(jr.name,"</a>")):ge.includes(qa)?Qn.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,'?type=office&disposition=inline" target="_blank">').concat(jr.name,"</a>")):Qn.replaceSelection("[".concat(jr.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(di.content_type,")"))}else(di==null?void 0:di.status)===401&&(document.location.href="/user/login")})}catch(di){v.b.warn("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0}return Qn.on("paste",mr),Qn.on("dragleave",function(Jn,Lr){oi.current.classList.remove("mouse-hover-md")}),Qn.on("dragover",function(Jn,Lr){oi.current.classList.add("mouse-hover-md")}),Qn.on("drop",function(Jn,Lr){oi.current.classList.add("mouse-hover-md");var Kr;if(Kr=Lr.dataTransfer.files,Kr.length>0){Lr.preventDefault(),Lr.stopPropagation();for(var gi=function(ga){var jr=Kr[ga],qa=jr.name.split(".").pop();se(jr,function(di){if(di.id){var Ai,va,Ma;(jr==null||((Ai=jr.type)===null||Ai===void 0)?void 0:Ai.indexOf("image"))>-1?Qn.replaceSelection(".concat(di.content_type,")")):(jr==null||((va=jr.type)===null||va===void 0)?void 0:va.indexOf("video"))>-1?Qn.replaceSelection('<video width="100%" controls src="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,'"></video>')):(jr==null||((Ma=jr.type)===null||Ma===void 0)?void 0:Ma.indexOf("pdf"))>-1?Qn.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(jr.type,'&disposition=inline" target="_blank">').concat(jr.name,"</a>")):ge.includes(qa)?Qn.replaceSelection('<a href="'.concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,'?type=office&disposition=inline" target="_blank">').concat(jr.name,"</a>")):Qn.replaceSelection("[".concat(jr.name,"](").concat(R.a.API_SERVER,"/api/attachments/").concat(di.id,"?type=").concat(di.content_type,")"))}else(di==null?void 0:di.status)===401&&(document.location.href="/user/login")})},cr=0;cr<Kr.length;cr++)gi(cr)}}),Se(Qn),function(){Qn.off("paste",mr)}}},[]);var $i=Object(n.useCallback)(function(){if(oi.current)try{}catch(Qn){console.log(Qn,"---- to set md editor body height")}},[xo,oi,gr]);Object(n.useEffect)(function(){function Qn(){var Jn=new e.default(function(Lr){var Kr=Object(O.a)(Lr),gi;try{for(Kr.s();!(gi=Kr.n()).done;){var cr=gi.value;(cr.target.offsetHeight>0||cr.target.offsetWidth>0)&&($i(),ee.setSize("100%","100%"),ee.refresh())}}catch(Xi){Kr.e(Xi)}finally{Kr.f()}});return Jn.observe(vr.current.parentElement),Jn}if(ee){var mr=Qn();return function(){mr.unobserve(vr.current.parentElement)}}},[ee,$i]),Object(n.useEffect)(function(){if(ee){for(var Qn=[],mr=function(){var cr=Lr[Jn];Kr=Object(g.a)(cr,2);var Xi=Kr[0],ga=Kr[1],jr=Object(p.a)({},Xi,function(){mo(ga)});Qn.push(jr),ee.addKeyMap(jr)},Jn=0,Lr=Object.entries(Ee);Jn<Lr.length;Jn++){var Kr;mr()}return ei.current=setInterval(function(){wr.current&&Mi()},4e3),function(){clearInterval(ei.current);var gi=Object(O.a)(Qn),cr;try{for(gi.s();!(cr=gi.n()).done;){var Xi=cr.value;ee.removeKeyMap(Xi)}}catch(ga){gi.e(ga)}finally{gi.f()}}}},[ee]),Object(n.useEffect)(function(){Rn!==gr&&rr(Rn)},[Rn]),Object(Ve.a)(function(){if(!Yt&&ia>0){var Qn=new Date().getTime(),mr=window.sessionStorage.getItem(Lt);Qn>=ia+Re&&(!mr||mr!==Nt)&&(window.sessionStorage.setItem(Lt,Nt),yi(!0))}},Re),Object(n.useEffect)(function(){Xn(yt)},[ee,yt]),Object(n.useEffect)(function(){ee&&(ze&&ee.focus())},[ee,ze]),Object(n.useEffect)(function(){if(Dn&&ee){var Qn=ee.getScrollerElement();function mr(Jn){var Lr=Jn.target;if(Wi.current){var Kr=Lr.scrollTop/Lr.scrollHeight;Wi.current.scrollTop=Wi.current.scrollHeight*Kr}}return Qn.addEventListener("scroll",mr),function(){Qn.removeEventListener("scroll",mr)}}},[ee,Dn]),Object(n.useEffect)(function(){if(ee&&Pn){function Qn(mr,Jn){Pn(mr,Jn)}return ee.on("beforeChange",Qn),function(){ee.off("beforeChange",Qn)}}},[ee,Pn]),Object(n.useEffect)(function(){if(ee&&wn){function Qn(){wn(ee.getValue())}return ee.on("blur",Qn),function(){ee.off("blur",Qn)}}},[ee,wn]),Object(n.useEffect)(function(){if(ee){function Qn(mr){var Jn=mr.getValue();Jt(Jn),Ca(new Date().getTime()),mr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),ut&&ut(Jn)}return ee.on("change",Qn),function(){ee.off("change",Qn)}}},[ee,ut]),Object(n.useEffect)(function(){ee&&(Je==null?(ee.setValue(""),Jt("")):Je!==ee.getValue()&&(ee.setValue(Je),Jt(Je),ee.setCursor(ee.lineCount(),0)))},[ee,Je]);var mo=Object(n.useCallback)(function(Qn){var mr=ee.getCursor(),Jn=ee.getSelection(),Lr=Jn.split(`
|
|
|
`);switch(Qn){case"bold":return ee.replaceSelection("**"+Jn+"**"),Jn===""&&ee.setCursor(mr.line,mr.ch+2),ee.focus();case"italic":return ee.replaceSelection("*"+Jn+"*"),Jn===""&&ee.setCursor(mr.line,mr.ch+1),ee.focus();case"code":return ee.replaceSelection("`"+Jn+"`"),Jn===""&&ee.setCursor(mr.line,mr.ch+1),ee.focus();case"inline-latex":return ee.replaceSelection("`$$"+Jn+"$$`"),Jn===""&&ee.setCursor(mr.line,mr.ch+3),ee.focus();case"latex":return ee.replaceSelection("```latex\n"+Jn+"\n```"),ee.setCursor(mr.line+1,Jn.length+1),ee.focus();case"line-break":return ee.replaceSelection(`<br/>
|
|
|
`),ee.focus();case"list-ul":return Jn===""?ee.replaceSelection("- "+Jn):ee.replaceSelection(Lr.map(function(Kr){return Kr===""?"":"- ".concat(Kr)}).join(`
|
|
|
`)),ee.focus();case"list-ol":return Jn===""?ee.replaceSelection("1. "+Jn):ee.replaceSelection(Lr.map(function(Kr,gi){return Kr===""?"":"".concat(gi+1,". ").concat(Kr)}).join(`
|
|
|
`)),ee.focus();case"add-null-ch":return Jn===""&&ee.setCursor(mr.line,mr.ch+1),ee.replaceSelection(Xe),ee.focus();case"inster-template-1":return Jn===""&&ee.setCursor(mr.line,mr.ch),ee.replaceSelection(et),ee.focus();case"eraser":return ee.setValue(""),ee.focus();case"trigger-watch":return Xn(!Dn),ee.focus();case"trigger-full-screen":return rr(!gr),ee.focus();case pe:ai(pe);return;case Ne:ai(Ne);return;case Te:ai(Te);return;case me:ai(me);return;default:throw new Error}},[ee,Dn,gr]),Qi=Object(n.useCallback)(function(Qn){ai("");switch(Gr){case pe:var mr=Qn.title,Jn=Qn.link;return ee.replaceSelection("[".concat(mr,"](").concat(Jn,")")),ee.focus();case Ne:var Lr=Qn.language,Kr=Qn.content;return ee.replaceSelection(["```"+Lr,Kr,"```"].join(`
|
|
|
`)),ee.focus();case Te:var gi=Qn.src,cr=Qn.alt;return cr?ee.replaceSelection(".concat(gi,' "').concat(cr,'" )')):ee.replaceSelection("")),ee.focus();case me:for(var Xi=Qn.row,ga=Qn.col,jr=Qn.align,qa=`
|
|
|
`,di=0;di<Xi;di++){for(var Ai=[],va=[],Ma=0;Ma<ga;Ma++)di===1&&va.push(_e[jr]),Ai.push(" ");di===1&&(qa+="| ".concat(va.join(" | "),` |
|
|
|
`)),qa+="| ".concat(Ai.join(ga===1?"":" | "),` |
|
|
|
`)}return ee.replaceSelection(qa+`
|
|
|
`),ee.focus();default:throw new Error}},[ee,Gr]),Ha=Object(n.useMemo)(function(){switch(Gr){case pe:return s.a.createElement(re,{callback:Qi,onCancel:La});case Ne:return s.a.createElement(he.b,{callback:Qi,onCancel:La});case Te:return s.a.createElement(fe,{callback:Qi,onCancel:La});case me:return s.a.createElement(Y,{callback:Qi,onCancel:La});default:return null}},[Gr]);function La(){ai("")}Object(n.useEffect)(function(){if(ir.current){var Qn=ir.current,mr=!1,Jn=0;function Lr(cr){mr=!0,Jn=cr.pageY}function Kr(){mr=!1}function gi(cr){if(mr){var Xi=cr.pageY-Jn;Xi<0&&(Xi=0),Xi>300&&(Xi=300);var ga=wt+Xi+"px";ka(ga)}}return Qn.addEventListener("mousedown",Lr),document.addEventListener("mousemove",gi),document.addEventListener("mouseup",Kr),function(){Qn.removeEventListener("mousedown",Lr),document.removeEventListener("mousemove",gi),document.removeEventListener("mouseup",Kr)}}},[ee,ir]),Object(n.useEffect)(function(){ka(wt)},[wt]);var ti=Ye(qe),Bo=Ye(xo),Ka={width:ti,height:Bo},go=Object(n.useMemo)(function(){if(ia){var Qn=new Date(ia),mr=Qn.getHours(),Jn=Qn.getMinutes(),Lr=Qn.getSeconds();return mr=mr<10?"0"+mr:mr,Jn=Jn<10?"0"+Jn:Jn,Lr=Lr<10?"0"+Lr:Lr,"".concat(mr,":").concat(Jn,":").concat(Lr)}return 0},[ia]);function So(){window.sessionStorage.removeItem(Lt),yi(!1),Ca(0)}function Wa(){yi(!1),Ca(0),ee.setValue(window.sessionStorage.getItem(Lt))}function Ho(Qn,mr){var Jn=ee.getValue();Jn=Jn.replace(Qn,mr),Jt(Jn),ee==null||ee.setValue(Jn)}return s.a.createElement(n.Fragment,null,s.a.createElement("div",{className:"markdown-editor-wrapper",ref:oi},s.a.createElement("div",{className:"markdown-editor-container ".concat(Xt," ").concat(Dn?"on-preview":""," ").concat(st?"mini":""," ").concat(gr?"full-screen":""),style:Ka},s.a.createElement(M,{insertTemp:pt,watch:Dn,fullScreen:gr,showNullButton:Qt,onActionCallback:mo,hidetoolBar:Kn,uuid:Fr.current,setOpenPhones:function(){wr.current=!0}}),s.a.createElement("div",{className:"markdown-editor-body"},s.a.createElement("div",{className:"codemirror-container"},s.a.createElement("textarea",{ref:vr,placeholder:Ir})),Dn?s.a.createElement("div",{ref:Wi,className:"preview-container"},Ht==="stex"&&s.a.createElement(D,{value:Nt}),Ht!=="stex"&&s.a.createElement(b.a,{edit:!0,value:Nt,replaces:Ho})):null))),Mt?s.a.createElement("a",{ref:ir,className:"editor-resize"}):null,s.a.createElement(G.a,null,ce[Gr]?s.a.createElement(_.a,{centered:!0,title:ce[Gr],visible:!0,onCancel:La,footer:null,className:"markdown-popup-form"},Ha):null))}},P2ho:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={Again:57349,AltLeft:56,AltRight:57400,ArrowDown:57424,ArrowLeft:57419,ArrowRight:57421,ArrowUp:57416,AudioVolumeDown:57390,AudioVolumeMute:57376,AudioVolumeUp:57392,Backquote:41,Backslash:43,Backspace:14,BracketLeft:26,BracketRight:27,BrowserBack:57450,BrowserFavorites:57446,BrowserForward:57449,BrowserHome:57394,BrowserRefresh:57447,BrowserSearch:57445,BrowserStop:57448,CapsLock:58,Comma:51,ContextMenu:57437,ControlLeft:29,ControlRight:57373,Convert:121,Copy:57464,Cut:57404,Delete:57427,Digit0:11,Digit1:2,Digit2:3,Digit3:4,Digit4:5,Digit5:6,Digit6:7,Digit7:8,Digit8:9,Digit9:10,Eject:57469,End:57423,Enter:28,Equal:13,Escape:1,F1:59,F10:68,F11:87,F12:88,F13:93,F14:94,F15:95,F16:85,F17:57347,F18:57463,F19:57348,F2:60,F20:90,F21:116,F22:57465,F23:109,F24:111,F3:61,F4:62,F5:63,F6:64,F7:65,F8:66,F9:67,Find:57409,Help:57461,Hiragana:119,Home:57415,Insert:57426,IntlBackslash:86,IntlRo:115,IntlYen:125,KanaMode:112,Katakana:120,KeyA:30,KeyB:48,KeyC:46,KeyD:32,KeyE:18,KeyF:33,KeyG:34,KeyH:35,KeyI:23,KeyJ:36,KeyK:37,KeyL:38,KeyM:50,KeyN:49,KeyO:24,KeyP:25,KeyQ:16,KeyR:19,KeyS:31,KeyT:20,KeyU:22,KeyV:47,KeyW:17,KeyX:45,KeyY:21,KeyZ:44,Lang3:120,Lang4:119,Lang5:118,LaunchApp1:57451,LaunchApp2:57377,LaunchMail:57452,MediaPlayPause:57378,MediaSelect:57453,MediaStop:57380,MediaTrackNext:57369,MediaTrackPrevious:57360,MetaLeft:57435,MetaRight:57436,Minus:12,NonConvert:123,NumLock:69,Numpad0:82,Numpad1:79,Numpad2:80,Numpad3:81,Numpad4:75,Numpad5:76,Numpad6:77,Numpad7:71,Numpad8:72,Numpad9:73,NumpadAdd:78,NumpadComma:126,NumpadDecimal:83,NumpadDivide:57397,NumpadEnter:57372,NumpadEqual:89,NumpadMultiply:55,NumpadParenLeft:57462,NumpadParenRight:57467,NumpadSubtract:74,Open:100,PageDown:57425,PageUp:57417,Paste:101,Pause:57414,Period:52,Power:57438,PrintScreen:84,Props:57350,Quote:40,ScrollLock:70,Semicolon:39,ShiftLeft:42,ShiftRight:54,Slash:53,Sleep:57439,Space:57,Suspend:57381,Tab:15,Undo:57351,WakeUp:57443};X.default=I},P5Jw:function(U,X,x){"use strict";var I=x("rHrb"),_=I.CopyToClipboard;_.CopyToClipboard=_,U.exports=_},PD8m:function(U,X){U.exports={name:"memoryStorage",read:I,write:_,each:O,remove:y,clearAll:v};var x={};function I(o){return x[o]}function _(o,g){x[o]=g}function O(o){for(var g in x)x.hasOwnProperty(g)&&o(x[g],g)}function y(o){delete x[o]}function v(o){x={}}},PVpz:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("ETIr"),x("cv67"),x("K3mO"),x("OLod"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.StreamCipher,v=_.algo,o=[],g=[],p=[],d=v.RabbitLegacy=y.extend({_doReset:function(){var n=this._key.words,s=this.cfg.iv,t=this._X=[n[0],n[3]<<16|n[2]>>>16,n[1],n[0]<<16|n[3]>>>16,n[2],n[1]<<16|n[0]>>>16,n[3],n[2]<<16|n[1]>>>16],i=this._C=[n[2]<<16|n[2]>>>16,n[0]&4294901760|n[1]&65535,n[3]<<16|n[3]>>>16,n[1]&4294901760|n[2]&65535,n[0]<<16|n[0]>>>16,n[2]&4294901760|n[3]&65535,n[1]<<16|n[1]>>>16,n[3]&4294901760|n[0]&65535];this._b=0;for(var e=0;e<4;e++)a.call(this);for(var e=0;e<8;e++)i[e]^=t[e+4&7];if(s){var r=s.words,c=r[0],u=r[1],f=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,m=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,l=f>>>16|m&4294901760,E=m<<16|f&65535;i[0]^=f,i[1]^=l,i[2]^=m,i[3]^=E,i[4]^=f,i[5]^=l,i[6]^=m,i[7]^=E;for(var e=0;e<4;e++)a.call(this)}},_doProcessBlock:function(n,s){var t=this._X;a.call(this),o[0]=t[0]^t[5]>>>16^t[3]<<16,o[1]=t[2]^t[7]>>>16^t[5]<<16,o[2]=t[4]^t[1]>>>16^t[7]<<16,o[3]=t[6]^t[3]>>>16^t[1]<<16;for(var i=0;i<4;i++)o[i]=(o[i]<<8|o[i]>>>24)&16711935|(o[i]<<24|o[i]>>>8)&4278255360,n[s+i]^=o[i]},blockSize:128/32,ivSize:64/32});function a(){for(var n=this._X,s=this._C,t=0;t<8;t++)g[t]=s[t];s[0]=s[0]+1295307597+this._b|0,s[1]=s[1]+3545052371+(s[0]>>>0<g[0]>>>0?1:0)|0,s[2]=s[2]+886263092+(s[1]>>>0<g[1]>>>0?1:0)|0,s[3]=s[3]+1295307597+(s[2]>>>0<g[2]>>>0?1:0)|0,s[4]=s[4]+3545052371+(s[3]>>>0<g[3]>>>0?1:0)|0,s[5]=s[5]+886263092+(s[4]>>>0<g[4]>>>0?1:0)|0,s[6]=s[6]+1295307597+(s[5]>>>0<g[5]>>>0?1:0)|0,s[7]=s[7]+3545052371+(s[6]>>>0<g[6]>>>0?1:0)|0,this._b=s[7]>>>0<g[7]>>>0?1:0;for(var t=0;t<8;t++){var i=n[t]+s[t],e=i&65535,r=i>>>16,c=((e*e>>>17)+e*r>>>15)+r*r,u=((i&4294901760)*i|0)+((i&65535)*i|0);p[t]=c^u}n[0]=p[0]+(p[7]<<16|p[7]>>>16)+(p[6]<<16|p[6]>>>16)|0,n[1]=p[1]+(p[0]<<8|p[0]>>>24)+p[7]|0,n[2]=p[2]+(p[1]<<16|p[1]>>>16)+(p[0]<<16|p[0]>>>16)|0,n[3]=p[3]+(p[2]<<8|p[2]>>>24)+p[1]|0,n[4]=p[4]+(p[3]<<16|p[3]>>>16)+(p[2]<<16|p[2]>>>16)|0,n[5]=p[5]+(p[4]<<8|p[4]>>>24)+p[3]|0,n[6]=p[6]+(p[5]<<16|p[5]>>>16)+(p[4]<<16|p[4]>>>16)|0,n[7]=p[7]+(p[6]<<8|p[6]>>>24)+p[5]|0}_.RabbitLegacy=y._createHelper(d)}(),I.RabbitLegacy})},Plam:function(U,X,x){"use strict";var I=x("giR+"),_=x("fyUT"),O=x("2qtc"),y=x("kLXV"),v=x("DjyN"),o=x("NUBc"),g=x("+L6B"),p=x("2/Rp"),d=x("9og8"),a=x("tJVT"),n=x("k1fw"),s=x("WmNS"),t=x.n(s),i=x("q1tI"),e=x.n(i),r=x("8Abk"),c=x("IxHN"),u=x("M8RZ"),f=x("BdwD"),m=x("cWXX"),l=x("/ezw"),E=x("14J3"),b=x("BMrR"),D=x("jCWc"),C=x("kPKH"),w=x("Q9mQ"),S=x("diRs"),A=x("y8nQ"),R=x("Vl3Y"),k=x("9kvl"),L=x("dhSg"),M=x("mCJh"),G=x("lzim"),W=function(pe){var Te=pe.pathsList,Ne=pe.dispatch,me=R.a.useForm(),Ie=Object(a.a)(me,1),_e=Ie[0],Ve=Object(i.useState)(),tt=Object(a.a)(Ve,2),Ge=tt[0],Le=tt[1],bt=Object(i.useState)(!0),Re=Object(a.a)(bt,2),Xe=Re[0],et=Re[1],Ye=Object(i.useState)(!1),Me=Object(a.a)(Ye,2),Ke=Me[0],ge=Me[1],Ee=Object(i.useState)({}),ce=Object(a.a)(Ee,2),je=ce[0],Qe=ce[1],te=Object(i.useState)({keyword:je,robot:!0,page:1}),Je=Object(a.a)(te,2),ut=Je[0],Be=Je[1];Object(i.useEffect)(function(){L.a.subscribe("ai-replay-show",function(ft){Qe(ft),ge(!0)})},[]),Object(i.useEffect)(function(){je!=null&&je.id&&qe()},[je]);var qe=function(){var ft=Object(d.a)(t.a.mark(function st(Pe){var ze;return t.a.wrap(function(pt){for(;;)switch(pt.prev=pt.next){case 0:return et(!0),pt.next=3,Object(M.a)(Object(n.a)(Object(n.a)({},ut),{},{keyword:je==null?void 0:je.content,id:je==null?void 0:je.id}));case 3:ze=pt.sent,et(!1),ze!=null&&ze.data&&(ut.page++,Be(Object(n.a)({},ut)),Le(ze==null?void 0:ze.data));case 6:case"end":return pt.stop()}},st)}));return function(Pe){return ft.apply(this,arguments)}}(),at=function(){var ft=Object(d.a)(t.a.mark(function st(){return t.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:qe();case 1:case"end":return ze.stop()}},st)}));return function(){return ft.apply(this,arguments)}}(),wt=e.a.createElement("div",null,e.a.createElement("img",{src:G.t,width:150}));return e.a.createElement(e.a.Fragment,null,e.a.createElement(y.a,{title:"\u5176\u4ED6\u56DE\u7B54",mask:!0,visible:Ke,okText:"\u6362\u4E00\u6362",cancelText:"",onOk:at,width:800,height:500,footer:e.a.createElement(b.a,{align:"middle",justify:"center"},e.a.createElement(C.a,{className:"tc"},e.a.createElement(p.a,{type:"primary",onClick:qe},"\u6362\u4E00\u6362"),e.a.createElement(S.a,{content:wt,title:"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"},e.a.createElement(p.a,{type:"dashed"},"\u4EBA\u5DE5\u670D\u52A1")))),onCancel:function(){ge(!1)}},e.a.createElement("aside",{style:{minHeight:300}},e.a.createElement(b.a,null,e.a.createElement(l.a,{loading:Xe},Ge==null?void 0:Ge.map(function(ft){return e.a.createElement(C.a,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24},ft.text)}),!(Ge!=null&&Ge.length)&&e.a.createElement("div",{style:{width:"100%",textAlign:"center"}},e.a.createElement("br",null),e.a.createElement("img",{src:G.t,width:150}),e.a.createElement("br",null),e.a.createElement("br",null),"\u6559\u5E08\u4EA4\u6D41\u793E\u533A"))))))},N=Object(k.a)(function(ve){var pe=ve.pathsList;return{pathsList:pe}})(W),K=x("fXAG"),F=x("5Dmo"),P=x("3S7+"),B=x("m3rI"),J=x("9Bee"),re=x("Ypxr"),he=x("AMnG"),we=x("kaH+"),ke=x("xKgJ"),ne=x("dPi7"),Oe=x.n(ne),Ce=x("SzL9"),fe=x.n(Ce),oe=x("MAU4"),se=x.n(oe),be=x("n0Id"),ie=x.n(be),de=x("Ty5D");function Fe(ve){var pe=ve.data,Te=ve.index,Ne=ve.adminOrOperator,me=ve.parentDiscussIndex,Ie=ve.shixunIdentifier,_e=ve.user,Ve=ve.onSetRewardData,tt=ve.onSetActionType,Ge=ve.onHandleSubmitDiscusses,Le=ve.onTopOrDownDiscuss,bt=ve.handleChildrenPlus,Re=ve.anserAuthor,Xe=ve.onPlus,et=ve.onHandleRepaly,Ye=ve.userInfomation,Me=pe.author,Ke=pe.can_delete,ge=pe.content,Ee=pe.hidden,ce=pe.id,je=pe.reward,Qe=pe.time,te=pe.reply_status,Je=pe.user_praise,ut=pe.praise_count,Be=Object(i.useState)(!1),qe=Object(a.a)(Be,2),at=qe[0],wt=qe[1],ft=Object(i.useState)(!1),st=Object(a.a)(ft,2),Pe=st[0],ze=st[1],yt=Object(i.useState)(!1),pt=Object(a.a)(yt,2),Bt=pt[0],Ht=pt[1],lt=Object(i.useState)(!1),Lt=Object(a.a)(lt,2),Dt=Lt[0],Mt=Lt[1],Wt=function(){if(!at)return;Ge(ce,{reply_status:2})},Yt=function(){if(!Pe)return;Ge(ce,{reply_status:3})},mn=function(){Ge(ce,{reply_status:1})},Qt=function(){Ge(ce,{reply_status:4})},$t=function(){switch(te){case 0:return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{onClick:mn,className:"whether-satisfied ".concat(Bt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Ht(!0)},onMouseLeave:function(){Ht(!1)}},e.a.createElement("img",{src:Bt?fe.a:Oe.a,className:"whether-img SVGColor"}),"\u6EE1\u610F"),e.a.createElement(S.a,{placement:"bottomLeft",content:e.a.createElement("div",{className:"content"},e.a.createElement("div",{className:"content-disappoint"},"\u62B1\u6B49\u8BA9\u4F60\u5931\u671B\u4E86\uFF0C\u8BF7\u7EE7\u7EED\u5C1D\u8BD5:"),e.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(at?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){wt(!0)},onMouseLeave:function(){wt(!1)},onClick:Wt},"\u8BF7",Me==null?void 0:Me.name.trim(),"\u8001\u5E08\u518D\u5C1D\u8BD5\u56DE\u7B54\u4E00\u6B21\u3002"),e.a.createElement("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(Pe?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){ze(!0)},onMouseLeave:function(){ze(!1)},onClick:Yt},"\u53EF\u80FD\u542F\u7528\u4E86\u673A\u5668\u4EBA\uFF0C\u8BF7\u5176\u4ED6\u8001\u5E08\u56DE\u7B54\u3002")),trigger:"click"},e.a.createElement("div",{className:"whether-satisfied ".concat(Dt?"cursorPoint blue-text-color":""),onMouseEnter:function(){Mt(!0)},onMouseLeave:function(){Mt(!1)}},e.a.createElement("img",{src:Dt?ie.a:se.a,className:"whether-img SVGColor"}),"\u4E0D\u6EE1\u610F")));case 1:return e.a.createElement("div",{className:"radius-box cursorPoint height30 ".concat(Te>0?"gray-background":"blue-background"),onClick:Qt},"\u6211\u5F88\u6EE1\u610F");case 2:return e.a.createElement("div",{className:"radius-box height30 ".concat(Te>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 3:return e.a.createElement("div",{className:"radius-box height30 ".concat(Te>0?"gray-background":"blue-background")},"\u4E0D\u6EE1\u610F \u7B49\u5F85\u5176\u4ED6\u8001\u5E08\u518D\u6B21\u56DE\u7B54");case 4:return e.a.createElement("div",{className:"radius-box height30 ".concat(Te>0?"gray-background":"blue-background")},"\u6211\u5F88\u6EE1\u610F");default:return e.a.createElement(e.a.Fragment,null)}};function Kn(){Ve({id:ce,index:Te,user_id:Me.user_id,parentDiscussIndex:me})}function hn(){tt({id:ce,index:Te,params:{hidden:Ee?"0":"1",container_identifier:Ie},type:"hidden-discuss",parentDiscussIndex:me,message:Ee?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function Rn(){tt({id:ce,index:Te,type:"delete-discuss",parentDiscussIndex:me,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}var wn=function(){et(ce,!Je,me,Te)},Pn=Ne||Ke||Me.user_id===_e.user_id||Me.login===_e.login,Yn=Object(de.h)().pathname.split("/")[1]==="tasks";return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:"second-level-discuss"},e.a.createElement("div",{className:"discuss-info-body"},e.a.createElement("div",{className:"discuss-info"},e.a.createElement("a",{href:"/users/".concat(Me.login),target:"_blank"},Me.name),e.a.createElement("span",{className:"grey"},Qe),je?e.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(je)},e.a.createElement("i",{className:"iconfont icon-gift c-orange "}),e.a.createElement("span",null,je)):null)),e.a.createElement(J.a,{className:"discuss-content ".concat(Te>0?"content-gray":""),value:ge})),Yn&&e.a.createElement("div",{className:"btn-group-succes"},e.a.createElement("div",{className:"btn-group-gratify"},$t()),e.a.createElement("div",{className:"btn-group-other"},e.a.createElement("div",{className:"discuss-info-body"},e.a.createElement("div",{className:"btn-group"},_e.identity===1?e.a.createElement("a",{onClick:Kn,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},e.a.createElement("i",{className:"iconfont icon-jiangli"})):null,Ne?e.a.createElement("a",{onClick:hn,title:Ee?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.a.createElement("i",{className:Ee?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Pn?e.a.createElement("a",{onClick:Rn,title:"\u5220\u9664"},e.a.createElement("i",{className:"iconfont icon-shanchu"})):null,e.a.createElement("a",{onClick:wn,className:Je?"c-orange":""},e.a.createElement("i",{className:Je?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.a.createElement("span",null,ut||"")))))))}var ae=function(ve){var pe=ve.data,Te=ve.index,Ne=ve.shixunIdentifier,me=ve.adminOrOperator,Ie=ve.identity,_e=ve.onTopOrDownDiscuss,Ve=ve.onPlusDiscuss,tt=ve.onDisableDiscuss,Ge=ve.onSetActionType,Le=ve.onSetRewardData,bt=ve.user,Re=ve.activeDiscussIndex,Xe=ve.onReplyDiscuss,et=ve.onSetActiveDiscussIndex,Ye=ve.allowDisableDiscuss,Me=ve.onHandleSubmitDiscusses,Ke=ve.onHandleRepaly,ge=ve.userInfomation,Ee=pe.content,ce=pe.children,je=pe.game_url,Qe=pe.hidden,te=pe.id,Je=pe.position,ut=pe.praise_count,Be=pe.reward,qe=pe.sticky,at=pe.time,wt=pe.user_praise,ft=pe.game_passed,st=pe.ai_reply_text,Pe=pe.ai_reply_flag,ze=pe.author,yt=pe.disable_discuss_status,pt=pe.reply_status,Bt=Object(i.useState)(!1),Ht=Object(a.a)(Bt,2),lt=Ht[0],Lt=Ht[1];Object(i.useEffect)(function(){lt&&setTimeout(function(){return Lt(!1)},800)},[lt]);function Dt(){var hn;if(!((hn=Object(ke.x)())!==null&&hn!==void 0&&hn.authentication)){y.a.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:function(){window.open("/account/certification")}});return}et(te)}function Mt(){_e(te,!qe,Te)}function Wt(){Ve(te,!wt,Te)}function Yt(){Le({id:te,index:Te,user_id:ze.user_id})}function mn(){Ge({id:te,index:Te,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function Qt(){Ge({id:te,index:Te,params:{hidden:Qe?"0":"1",container_identifier:Ne},type:"hidden-discuss",message:Qe?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}function $t(){tt(te,yt===0?2:0,Te)}var Kn=function(Rn){var wn=Rn.target,Pn=wn.nodeName,Yn=wn.src;Pn==="IMG"&&(L.a.publish("preview-image",Yn),console.log("src:",Yn))};return e.a.createElement("div",{className:"discuss-item-container",key:te},e.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},e.a.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",src:"".concat(B.a.IMG_SERVER,"/images/").concat(ze.image_url),width:"50"})),e.a.createElement("section",null,e.a.createElement("div",{className:"discuss-info"},e.a.createElement("a",{href:"/users/".concat(ze.login),target:"_blank"},ze.name),e.a.createElement("span",{className:"grey"},at),Je?e.a.createElement("span",{className:"c-green"}," [\u7B2C",Je,"\u5173] "):null,je?e.a.createElement("a",{href:je,target:"_blank",className:"view-code",title:"\u70B9\u51FB\u67E5\u770BTA\u7684\u4EE3\u7801\u9875\u9762"},"\u67E5\u770B"):null,Ye&&e.a.createElement(e.a.Fragment,null,yt===0&&e.a.createElement(P.a,{title:"\u7981\u6B62\u8BE5\u7528\u6237\u5728\u6B64\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},e.a.createElement("span",{onClick:$t,className:"c-red current"},"\u7981\u6B62\u8BC4\u8BBA\u529F\u80FD")),yt===2&&e.a.createElement(P.a,{title:"\u6062\u590D\u8BE5\u7528\u6237\u5728\u6B64\u5B9E\u8DF5\u9879\u76EE\u7684\u8BC4\u8BBA\u529F\u80FD"},e.a.createElement("span",{onClick:$t,className:"c-light-primary current"},"\u6062\u590D\u8BC4\u8BBA\u529F\u80FD")),yt===1&&e.a.createElement(P.a,{title:"\u8BE5\u7528\u6237\u5DF2\u88AB\u7CFB\u7EDF\u7BA1\u7406\u5458\u7981\u8A00"},e.a.createElement("span",{className:"c-red"},"\u88AB\u7BA1\u7406\u5458\u7981\u6B62\u8BC4\u8BBA"))),qe?e.a.createElement("span",{className:"top"},"\u7F6E\u9876"):null,Be?e.a.createElement("a",{className:"c-orange gift",title:"\u5DF2\u5956\u52B1\u91D1\u5E01".concat(Be)},e.a.createElement("i",{className:"iconfont icon-gift c-orange "}),e.a.createElement("span",null,Be)):null,Ie<=5?e.a.createElement("span",{style:{flex:"1",textAlign:"right",color:ft===1?"#29bd8b":""}},ft===1?"\u5DF2\u901A\u5173":"\u672A\u901A\u5173"):null),e.a.createElement("div",{onClick:Kn},e.a.createElement(J.a,{className:"discuss-content",value:Ee})),Pe&&e.a.createElement("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"}},e.a.createElement("br",null),e.a.createElement("div",{style:{padding:"6px 0"}},st),e.a.createElement(p.a,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return Lt(!0)},className:"mr10 mr5 relative c-blue"},e.a.createElement("span",{className:lt?"plus-one-animate":"hide",style:{position:"absolute"}}," ","+1"),e.a.createElement("span",{className:"c-blue icon-duiwoyouyong mr5"}),e.a.createElement("span",{className:"c-blue"},"\u5BF9\u6211\u6709\u7528")),e.a.createElement("span",{className:"c-orange current",onClick:function(){L.a.publish("ai-replay-show",{content:Ee,id:te})}},"\u5176\u4ED6\u56DE\u7B54")),ce&&ce.length>0?e.a.createElement("div",{className:"reply-discuss-containerActive",onClick:Kn},ce.map(function(hn,Rn){return e.a.createElement(Fe,{key:hn.id,data:hn,index:Rn,userInfomation:ge,onTopOrDownDiscuss:_e,shixunIdentifier:Ne,onHandleSubmitDiscusses:Me,adminOrOperator:me,user:bt,onSetRewardData:Le,onSetActionType:Ge,parentDiscussIndex:Te,anserAuthor:ze,onHandleRepaly:Ke})})):null,e.a.createElement("div",{className:"btn-group"},e.a.createElement("div",{className:"btn-group-other"},bt.identity===1?e.a.createElement("a",{onClick:Yt,title:"\u7ED9TA\u5956\u52B1\u91D1\u5E01"},e.a.createElement("i",{className:"iconfont icon-jiangli"})):null,me?e.a.createElement("a",{onClick:Qt,title:Qe?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.a.createElement("i",{className:Qe?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Ie<=5?e.a.createElement("a",{onClick:Mt,className:qe?"btn-top":"btn-down",title:qe?"\u53D6\u6D88\u7F6E\u9876":"\u7F6E\u9876"},e.a.createElement("i",{className:"iconfont icon-zhiding1 "})):null,me&&(!ce||ce.length==0)?e.a.createElement("a",{onClick:mn,title:"\u5220\u9664"},e.a.createElement("i",{className:"iconfont icon-shanchu"})):null,e.a.createElement("a",{onClick:Dt,title:"\u56DE\u590D"},e.a.createElement("i",{className:"iconfont icon-huifu1"})),e.a.createElement("a",{onClick:Wt,className:wt?"c-orange":""},e.a.createElement("i",{className:wt?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.a.createElement("span",null,ut||"")))),e.a.createElement(he.a,{id:te,activeDiscussIndex:Re,onReplyDiscuss:Xe})))},Z={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Y(ve,pe){switch(pe.type){case K.Q:return Object(n.a)(Object(n.a)({},ve),{},{loading:!0});case K.X:return Object(n.a)(Object(n.a)({},ve),{},{showRewardDialog:!0});case K.b:return Object(n.a)(Object(n.a)({},ve),{},{showRewardDialog:!1});case K.l:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.ab:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.x:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.c:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.z:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.H:return Object(n.a)(Object(n.a)({},ve),pe.payload);case K.a:return Object(n.a)(Object(n.a)({},ve),pe.payload);default:throw new Error}}var q=X.a=function(ve){var pe=ve.shixunIdentifier,Te=ve.identity,Ne=ve.activeIndex,me=ve.user,Ie=ve.allowDisableDiscuss,_e=ve.userInfo,Ve=ve.isShixunDetail,tt=Ve===void 0?!1:Ve,Ge=ve.taskData,Le=Object(i.useReducer)(Y,Z),bt=Object(a.a)(Le,2),Re=bt[0],Xe=bt[1],et=Object(i.useState)(!0),Ye=Object(a.a)(et,2),Me=Ye[0],Ke=Ye[1],ge=Object(i.useState)(null),Ee=Object(a.a)(ge,2),ce=Ee[0],je=Ee[1],Qe=Re.page,te=Re.loading,Je=Re.data,ut=Re.actionType,Be=Re.showRewardDialog,qe=Re.activeDiscussIndex,at=Object(i.useRef)(),wt=Object(i.useRef)();function ft(ue,V){return st.apply(this,arguments)}function st(){return st=Object(d.a)(t.a.mark(function ue(V,Q){var ee;return t.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:if(!te){le.next=2;break}return le.abrupt("return");case 2:return le.prev=2,Xe({type:K.Q}),le.next=6,Object(M.e)(pe,V);case 6:ee=le.sent,Xe({type:K.l,payload:{activeDiscussIndex:Q?qe:null,page:V,data:ee,loading:!1}}),le.next=13;break;case 10:le.prev=10,le.t0=le.catch(2),console.log(le.t0);case 13:case"end":return le.stop()}},ue,null,[[2,10]])})),st.apply(this,arguments)}Object(i.useEffect)(function(){return Me||(clearInterval(ce),je(setInterval(function(){ft(Qe,!0)},5e3))),function(){clearInterval(ce)}},[Me,Qe,qe]);function Pe(ue){ft(ue)}function ze(ue,V,Q){return yt.apply(this,arguments)}function yt(){return yt=Object(d.a)(t.a.mark(function ue(V,Q,ee){var Se;return t.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(M.g)(V,Q);case 3:Se=nt.sent,nr[ee].user_praise=Q,nr[ee].praise_count=Se.praise_count,Xe({type:K.x,payload:{data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}}),nt.next=12;break;case 9:nt.prev=9,nt.t0=nt.catch(0),console.log(nt.t0);case 12:case"end":return nt.stop()}},ue,null,[[0,9]])})),yt.apply(this,arguments)}function pt(ue,V,Q,ee){return Bt.apply(this,arguments)}function Bt(){return Bt=Object(d.a)(t.a.mark(function ue(V,Q,ee,Se){var le;return t.a.wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Nt.prev=0,Nt.next=3,Object(M.g)(V,Q);case 3:le=Nt.sent,nr[ee].children[Se].user_praise=Q,nr[ee].children[Se].praise_count=le.praise_count,Xe({type:K.x,payload:{data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}}),Nt.next=12;break;case 9:Nt.prev=9,Nt.t0=Nt.catch(0),console.log(Nt.t0);case 12:case"end":return Nt.stop()}},ue,null,[[0,9]])})),Bt.apply(this,arguments)}function Ht(ue,V,Q){return lt.apply(this,arguments)}function lt(){return lt=Object(d.a)(t.a.mark(function ue(V,Q,ee){var Se,le,nt;return t.a.wrap(function(Jt){for(;;)switch(Jt.prev=Jt.next){case 0:return Jt.prev=0,Jt.next=3,Object(M.d)(V,Q);case 3:if(Se=Jt.sent,!(Se.status!==0)){Jt.next=6;break}return Jt.abrupt("return");case 6:le=nr[ee].author.user_id,nt=nr.map(function(an){return an.author.user_id===le?Object(n.a)(Object(n.a)({},an),{},{disable_discuss_status:Q}):an}),Xe({type:K.c,payload:{data:Object(n.a)(Object(n.a)({},Je),{},{comments:nt})}}),Jt.next=14;break;case 11:Jt.prev=11,Jt.t0=Jt.catch(0),console.log(Jt.t0);case 14:case"end":return Jt.stop()}},ue,null,[[0,11]])})),lt.apply(this,arguments)}function Lt(ue,V,Q){return Dt.apply(this,arguments)}function Dt(){return Dt=Object(d.a)(t.a.mark(function ue(V,Q,ee){return t.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.prev=0,le.next=3,Object(M.k)(V,Q);case 3:nr[ee].sticky=Q,Xe({type:K.ab,payload:{data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}}),ft(Re.page),le.next=11;break;case 8:le.prev=8,le.t0=le.catch(0),console.log(le.t0);case 11:case"end":return le.stop()}},ue,null,[[0,8]])})),Dt.apply(this,arguments)}function Mt(){Xe({type:K.z,payload:{actionType:null}})}function Wt(){return Yt.apply(this,arguments)}function Yt(){return Yt=Object(d.a)(t.a.mark(function ue(){var V,Q,ee,Se,le,nt,Nt,Jt;return t.a.wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(V=ut.id,Q=ut.params,ee=ut.type,Se=ut.index,le=ut.parentDiscussIndex,!(ee==="hidden-discuss")){Gt.next=6;break}return Gt.next=4,Object(M.f)(V,Q);case 4:le?nr[le].children[Se].hidden=Q.hidden==1:nr[Se].hidden=Q.hidden==1,Xe({type:K.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}});case 6:if(!(ee==="delete-discuss")){Gt.next=31;break}return Gt.next=9,Object(M.c)(V);case 9:if(!(le||le===0)){Gt.next=22;break}nt=nr[le].children,Nt=nt.length-1;case 12:if(!(Nt>=0)){Gt.next=19;break}if(!(nt[Nt].id===V)){Gt.next=16;break}return nt.splice(Nt,1),Gt.abrupt("break",19);case 16:Nt--,Gt.next=12;break;case 19:nr[le].children=nt,Gt.next=30;break;case 22:Jt=nr.length-1;case 23:if(!(Jt>=0)){Gt.next=30;break}if(!(nr[Jt].id===V)){Gt.next=27;break}return nr.splice(Jt,1),Gt.abrupt("break",30);case 27:Jt--,Gt.next=23;break;case 30:Xe({type:K.z,payload:{actionType:null,data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}});case 31:case"end":return Gt.stop()}},ue)})),Yt.apply(this,arguments)}function mn(ue){Xe({type:K.z,payload:{actionType:ue}})}function Qt(){Xe({type:K.b})}function $t(){return Kn.apply(this,arguments)}function Kn(){return Kn=Object(d.a)(t.a.mark(function ue(){var V,Q,ee,Se,le,nt,Nt;return t.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return V=at.current,Q=V.id,ee=V.index,Se=V.score,le=V.user_id,nt=V.parentDiscussIndex,an.next=3,Object(M.i)(Q,{container_type:"Discusses",score:Se,user_id:le});case 3:Nt=an.sent,nt?nr[nt].children[ee].reward=Nt.code:nr[ee].reward=Nt.code,Xe({type:K.H,payload:{showRewardDialog:!1,data:Object(n.a)(Object(n.a)({},Je),{},{comments:nr})}}),at.current=null;case 7:case"end":return an.stop()}},ue)})),Kn.apply(this,arguments)}function hn(ue){at.current=ue,Xe({type:K.X})}function Rn(ue){at.current.score=ue}function wn(ue,V){return Pn.apply(this,arguments)}function Pn(){return Pn=Object(d.a)(t.a.mark(function ue(V,Q){var ee;return t.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.prev=0,le.next=3,Object(M.h)(V,Q);case 3:if(ee=le.sent,!(ee.status===-3)){le.next=8;break}return y.a.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),Xt(null),le.abrupt("return");case 8:ft(Qe),le.next=14;break;case 11:le.prev=11,le.t0=le.catch(0),console.log(le.t0);case 14:case"end":return le.stop()}},ue,null,[[0,11]])})),Pn.apply(this,arguments)}function Yn(ue,V){return or.apply(this,arguments)}function or(){return or=Object(d.a)(t.a.mark(function ue(V,Q){var ee,Se;return t.a.wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:return nt.prev=0,nt.next=3,Object(M.j)(V,Q);case 3:if(ee=nt.sent,Se=ee.status,!(Se!==1)){nt.next=7;break}return nt.abrupt("return");case 7:ft(Qe),nt.next=13;break;case 10:nt.prev=10,nt.t0=nt.catch(0),console.log(nt.t0);case 13:case"end":return nt.stop()}},ue,null,[[0,10]])})),or.apply(this,arguments)}function Xt(ue){qe===ue?Xe({type:K.a,payload:{activeDiscussIndex:null}}):Xe({type:K.a,payload:{activeDiscussIndex:ue}})}if(Object(i.useEffect)(function(){function ue(){return V.apply(this,arguments)}function V(){return V=Object(d.a)(t.a.mark(function Q(){return t.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:if(!(Ne===3&&!Je&&pe)){Se.next=3;break}return Se.next=3,ft(Qe);case 3:case"end":return Se.stop()}},Q)})),V.apply(this,arguments)}ue()},[pe,Ne,Qe,Xe]),Object(i.useEffect)(function(){var ue=L.a.subscribe("create-discuss",function(){ft(Qe)});return ue},[pe]),!Je)return e.a.createElement(c.a,null);var xn=function(){Ke(!Me),Me?je(setInterval(function(){ft(Qe,!0)},5e3)):clearInterval(ce)},Er=Je.disscuss_count,nr=Je.comments,Ir=Je.all,qn=Je.can_hidden;return e.a.createElement(i.Fragment,null,e.a.createElement("div",{className:"discuss-container",ref:wt},(Ge==null?void 0:Ge.myshixun_manager)&&e.a.createElement(p.a,{style:{float:"right",marginBottom:10},type:"primary",onClick:xn},Me?"\u5F00\u542F\u5B9E\u65F6\u5237\u65B0":"\u505C\u6B62\u5B9E\u65F6\u5237\u65B0"),Er===0?e.a.createElement(f.a,{styles:{clear:"both",pointerEvents:"none"}}):null,nr.map(function(ue,V){return e.a.createElement(ae,{user:me,key:ue.id,userInfomation:_e,data:ue,index:V,identity:Te,onPaginationChange:Pe,shixunIdentifier:pe,onSetActionType:mn,onTopOrDownDiscuss:Lt,adminOrOperator:qn,onPlusDiscuss:ze,onDisableDiscuss:Ht,onSetRewardData:hn,activeDiscussIndex:qe,onHandleSubmitDiscusses:Yn,onSetActiveDiscussIndex:Xt,onReplyDiscuss:wn,allowDisableDiscuss:Ie,onHandleRepaly:pt})}),Er>10?e.a.createElement("div",{className:"pagination-container"},e.a.createElement(o.a,{showQuickJumper:!0,showSizeChanger:!1,onChange:Pe,current:Qe,total:Er})):null,e.a.createElement(N,null)),e.a.createElement(u.a,null,e.a.createElement(y.a,{centered:!0,title:"\u63D0\u793A",visible:!!ut,onOk:Wt,onCancel:Mt},e.a.createElement("p",null,ut?ut.message:"")),e.a.createElement(y.a,{centered:!0,width:400,title:"\u5956\u52B1\u8BBE\u7F6E",visible:Be,onCancel:Qt,onOk:$t},e.a.createElement(_.a,{placeholder:"\u8BF7\u8F93\u5165\u5956\u52B1\u7684\u91D1\u5E01\u6570\u91CF",min:1,onChange:Rn,style:{width:"228px"}}))))}},"Q+I+":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAeFBMVEUAAACvv7+nt8elusWmusKnt8OmucKmucGlt8KmuMKlt8GmuMKmuMGluMKmt8KluMKmuMKmt8KluMGmuMKmuMGlt8KluMGmuMGmuMK+y9PQ2d/W3uPb4ubg5unk6ezo7O/r7/Hu8vTx9Pb09/j3+fr6+/z9/f7///9IiVUSAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAACAElEQVRYw+3X2XaCMBAG4CzFYtSgIiRYu7rk/d+wCJwUy8wk0V72v9KjfCdMhoQwNkm22loy64Vk4ci1jciKh5ystlHZBQYlI51Wose0s9HRlJPbhAgCKlKgJQGlOHYzufx5se4y40lQzWb9dYvnfqJ8gVUG/L15Ozrnzl+v05+YGjeD+JlwCNqf3JDTHodsLZi2FNScnc+lwaG2GWoSenejfBLQbjxRANQN6NzsL53U4JANQN31H9Yeuw8vD0LvfwhdHoReBujgwjUqyREN6e/sRMzaZvycolA/MPdGQMV45UChU7ghc8ZNEHqFBzSGTLteqhDU9FN2Jh5aq9qnn/tyKwlCHw6a+xuo7BZwYTwLOXv4QWuv9pAZVl1ZUdARrvR1xgeo8lsT1wNUoZU+WBTS441JanOFCqzSX+Di30JGT3ZKmQk2RyoN3Ji1GRMZtt9KpKcPUPHIndaAPT3kePNTQUIKHBAI5SQkoqEq8FqjY6E8AInIbbYKvmmpOCgLv/ttHn0T8Tdnwk7JWczrqPkbJyyZSCcklZJFhxMV15ylBOsCM2OJERpiFGfpEctfC2Y5v4fprbm3yvxu5bbPFWP/0KS9n67xh8lV91UkMxly4NrKxOHgJ5C0LiDOW2nFqlNOV+y+g1saVOFQkQRpHJonQRxdI8vEPuIavLsSnbNvHF76qBcgeTgAAAAASUVORK5CYII="},Q7Vx:function(U,X,x){},QV2g:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=I;function I(){for(var y,v=[],o=0;o<256;o++){y=o;for(var g=0;g<8;g++)y=y&1?3988292384^y>>>1:y>>>1;v[o]=y}return v}var _=I();function O(y,v,o,g){var p=_,d=g+o;y^=-1;for(var a=g;a<d;a++)y=y>>>8^p[(y^v[a])&255];return y^-1}},RELg:function(U,X,x){var I=x("MFOe"),_=I.Global;U.exports={name:"oldIE-userDataStorage",write:g,read:p,each:d,remove:a,clearAll:n};var O="storejs",y=_.document,v=i(),o=(_.navigator?_.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function g(e,r){if(o)return;var c=t(e);v(function(u){u.setAttribute(c,r),u.save(O)})}function p(e){if(o)return;var r=t(e),c=null;return v(function(u){c=u.getAttribute(r)}),c}function d(e){v(function(r){for(var c=r.XMLDocument.documentElement.attributes,u=c.length-1;u>=0;u--){var f=c[u];e(r.getAttribute(f.name),f.name)}})}function a(e){var r=t(e);v(function(c){c.removeAttribute(r),c.save(O)})}function n(){v(function(e){var r=e.XMLDocument.documentElement.attributes;e.load(O);for(var c=r.length-1;c>=0;c--)e.removeAttribute(r[c].name);e.save(O)})}var s=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function t(e){return e.replace(/^\d/,"___$&").replace(s,"___")}function i(){if(!y||!y.documentElement||!y.documentElement.addBehavior)return null;var e="script",r,c,u;try{c=new ActiveXObject("htmlfile"),c.open(),c.write("<"+e+">document.w=window</"+e+'><iframe src="/favicon.ico"></iframe>'),c.close(),r=c.w.frames[0].document,u=r.createElement("div")}catch(f){u=y.createElement("div"),r=y.body}return function(f){var m=[].slice.call(arguments,0);m.unshift(u),r.appendChild(u),u.addBehavior("#default#userData"),u.load(O),f.apply(this,m),r.removeChild(u);return}}},RMFE:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAAFyCAYAAADYqEAoAAAAAXNSR0IArs4c6QAADetJREFUeAHt1jFqXUEQRUHLaP9b/jZObmYU9MAJSlGDxNBUPw76+vz9+eWHAAECBHICv3MbWYgAAQIE/gkItA+BAAECUQGBjh7GWgQIEBBo3wABAgSiAgIdPYy1CBAgINC+AQIECEQFBDp6GGsRIEBAoH0DBAgQiAoIdPQw1iJAgIBA+wYIECAQFRDo6GGsRYAAAYH2DRAgQCAqINDRw1iLAAECAu0bIECAQFRAoKOHsRYBAgQE2jdAgACBqIBARw9jLQIECAi0b4AAAQJRAYGOHsZaBAgQEGjfAAECBKICAh09jLUIECAg0L4BAgQIRAUEOnoYaxEgQECgfQMECBCICgh09DDWIkCAgED7BggQIBAVEOjoYaxFgAABgfYNECBAICog0NHDWIsAAQIC7RsgQIBAVECgo4exFgECBATaN0CAAIGogEBHD2MtAgQICLRvgAABAlEBgY4exloECBAQaN8AAQIEogICHT2MtQgQICDQvgECBAhEBQQ6ehhrESBAQKB9AwQIEIgKCHT0MNYiQICAQPsGCBAgEBUQ6OhhrEWAAAGB9g0QIEAgKiDQ0cNYiwABAgLtGyBAgEBUQKCjh7EWAQIEBNo3QIAAgaiAQEcPYy0CBAh8/5Tg6+vrp3/q7wgQIEDgPwKfz+c/v92v/Ac9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICQh06hyWIUCAwAQEehYmAgQIpAQEOnUOyxAgQGACAj0LEwECBFICAp06h2UIECAwAYGehYkAAQIpAYFOncMyBAgQmIBAz8JEgACBlIBAp85hGQIECExAoGdhIkCAQEpAoFPnsAwBAgQmINCzMBEgQCAlINCpc1iGAAECExDoWZgIECCQEhDo1DksQ4AAgQkI9CxMBAgQSAkIdOocliFAgMAEBHoWJgIECKQEBDp1DssQIEBgAgI9CxMBAgRSAgKdOodlCBAgMAGBnoWJAAECKQGBTp3DMgQIEJiAQM/CRIAAgZSAQKfOYRkCBAhMQKBnYSJAgEBKQKBT57AMAQIEJiDQszARIEAgJSDQqXNYhgABAhMQ6FmYCBAgkBIQ6NQ5LEOAAIEJCPQsTAQIEEgJCHTqHJYhQIDABAR6FiYCBAikBAQ6dQ7LECBAYAICPQsTAQIEUgICnTqHZQgQIDABgZ6FiQABAikBgU6dwzIECBCYgEDPwkSAAIGUgECnzmEZAgQITECgZ2EiQIBASkCgU+ewDAECBCYg0LMwESBAICUg0KlzWIYAAQITEOhZmAgQIJASEOjUOSxDgACBCQj0LEwECBBICXz/dJvP5/PTP/V3BAgQIHAg4D/oA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IWAQL9Q9SYBAgQOBAT6ANETBAgQeCEg0C9UvUmAAIEDAYE+QPQEAQIEXggI9AtVbxIgQOBAQKAPED1BgACBFwIC/ULVmwQIEDgQEOgDRE8QIEDghYBAv1D1JgECBA4EBPoA0RMECBB4ISDQL1S9SYAAgQMBgT5A9AQBAgReCAj0C1VvEiBA4EBAoA8QPUGAAIEXAgL9QtWbBAgQOBAQ6ANETxAgQOCFgEC/UPUmAQIEDgQE+gDREwQIEHghINAvVL1JgACBAwGBPkD0BAECBF4ICPQLVW8SIEDgQECgDxA9QYAAgRcCAv1C1ZsECBA4EBDoA0RPECBA4IXAH7PYDOHnuk1pAAAAAElFTkSuQmCC"},RTVd:function(U,X,x){U.exports={"code-area-container":"code-area-container___37oB0","only-view":"only-view___1om7F","monaco-editor-container":"monaco-editor-container___2UFXm",frame:"frame___2B67h"}},"S+dL":function(U,X){U.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},S6kV:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.mode.OFB=function(){var _=I.lib.BlockCipherMode.extend(),O=_.Encryptor=_.extend({processBlock:function(y,v){var o=this._cipher,g=o.blockSize,p=this._iv,d=this._keystream;p&&(d=this._keystream=p.slice(0),this._iv=void 0),o.encryptBlock(d,0);for(var a=0;a<g;a++)y[v+a]^=d[a]}});return _.Decryptor=O,_}(),I.mode.OFB})},"SA+Z":function(U,X,x){var I=x("wTVA"),_=x("EbDI"),O=x("ZhPi"),y=x("wkBT");function v(o){return I(o)||_(o)||O(o)||y()}U.exports=v,U.exports.__esModule=!0,U.exports.default=U.exports},SJMd:function(U,X){/**
|
|
|
* @license
|
|
|
* Copyright (C) 2006 Google Inc.
|
|
|
*
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
* You may obtain a copy of the License at
|
|
|
*
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
*
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
* See the License for the specific language governing permissions and
|
|
|
* limitations under the License.
|
|
|
*/var x,I,_,O=!1,y,v;window.PR_SHOULD_USE_CONTINUATION=!0;var o,g;(function(){var p=window,d=["break,continue,do,else,for,if,return,while"],a=[d,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],n=[a,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],s=[n,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],t=[n,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],i=[n,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],e="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",r=[n,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],c="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",u=[d,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],f=[d,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],m=[d,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],l=[s,i,t,r,c,u,f,m],E=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,b="str",D="kwd",C="com",w="typ",S="lit",A="pun",R="pln",k="tag",L="dec",M="src",G="atn",W="atv",N="nocode",K="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(ae){for(var Z=0,Y=!1,q=!1,ve=0,pe=ae.length;ve<pe;++ve){var Te=ae[ve];if(Te.ignoreCase)q=!0;else if(/[a-z]/i.test(Te.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Y=!0,q=!1;break}}var Ne={b:8,t:9,n:10,v:11,f:12,r:13};function me(Ge){var Le=Ge.charCodeAt(0);if(Le!==92)return Le;var bt=Ge.charAt(1);return Le=Ne[bt],Le||("0"<=bt&&bt<="7"?parseInt(Ge.substring(1),8):bt==="u"||bt==="x"?parseInt(Ge.substring(2),16):Ge.charCodeAt(1))}function Ie(Ge){if(Ge<32)return(Ge<16?"\\x0":"\\x")+Ge.toString(16);var Le=String.fromCharCode(Ge);return Le==="\\"||Le==="-"||Le==="]"||Le==="^"?"\\"+Le:Le}function _e(Ge){var Le=Ge.substring(1,Ge.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),bt=[],Re=Le[0]==="^",Xe=["["];Re&&Xe.push("^");for(var et=Re?1:0,Ye=Le.length;et<Ye;++et){var Me=Le[et];if(/\\[bdsw]/i.test(Me))Xe.push(Me);else{var Ke=me(Me),ge;et+2<Ye&&Le[et+1]==="-"?(ge=me(Le[et+2]),et+=2):ge=Ke,bt.push([Ke,ge]),ge<65||Ke>122||(ge<65||Ke>90||bt.push([Math.max(65,Ke)|32,Math.min(ge,90)|32]),ge<97||Ke>122||bt.push([Math.max(97,Ke)&~32,Math.min(ge,122)&~32]))}}bt.sort(function(Qe,te){return Qe[0]-te[0]||te[1]-Qe[1]});for(var Ee=[],ce=[],et=0;et<bt.length;++et){var je=bt[et];je[0]<=ce[1]+1?ce[1]=Math.max(ce[1],je[1]):Ee.push(ce=je)}for(var et=0;et<Ee.length;++et){var je=Ee[et];Xe.push(Ie(je[0])),je[1]>je[0]&&(je[1]+1>je[0]&&Xe.push("-"),Xe.push(Ie(je[1])))}return Xe.push("]"),Xe.join("")}function Ve(Ge){for(var Le=Ge.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),bt=Le.length,Re=[],Xe=0,et=0;Xe<bt;++Xe){var Ye=Le[Xe];if(Ye==="(")++et;else if(Ye.charAt(0)==="\\"){var Me=+Ye.substring(1);Me&&(Me<=et?Re[Me]=-1:Le[Xe]=Ie(Me))}}for(var Xe=1;Xe<Re.length;++Xe)Re[Xe]===-1&&(Re[Xe]=++Z);for(var Xe=0,et=0;Xe<bt;++Xe){var Ye=Le[Xe];if(Ye==="(")++et,Re[et]||(Le[Xe]="(?:");else if(Ye.charAt(0)==="\\"){var Me=+Ye.substring(1);Me&&Me<=et&&(Le[Xe]="\\"+Re[Me])}}for(var Xe=0;Xe<bt;++Xe)Le[Xe]==="^"&&Le[Xe+1]!=="^"&&(Le[Xe]="");if(Ge.ignoreCase&&Y)for(var Xe=0;Xe<bt;++Xe){var Ye=Le[Xe],Ke=Ye.charAt(0);Ye.length>=2&&Ke==="["?Le[Xe]=_e(Ye):Ke!=="\\"&&(Le[Xe]=Ye.replace(/[a-zA-Z]/g,function(ce){var je=ce.charCodeAt(0);return"["+String.fromCharCode(je&~32,je|32)+"]"}))}return Le.join("")}for(var tt=[],ve=0,pe=ae.length;ve<pe;++ve){var Te=ae[ve];if(Te.global||Te.multiline)throw new Error(""+Te);tt.push("(?:"+Ve(Te)+")")}return new RegExp(tt.join("|"),q?"gi":"g")}function P(ae,Z){var Y=/(?:^|\s)nocode(?:\s|$)/,q=[],ve=0,pe=[],Te=0;function Ne(me){var Ie=me.nodeType;if(Ie==1){if(Y.test(me.className))return;for(var _e=me.firstChild;_e;_e=_e.nextSibling)Ne(_e);var Ve=me.nodeName.toLowerCase();(Ve==="br"||Ve==="li")&&(q[Te]=`
|
|
|
`,pe[Te<<1]=ve++,pe[Te++<<1|1]=me)}else if(Ie==3||Ie==4){var tt=me.nodeValue;tt.length&&(Z?tt=tt.replace(/\r\n?/g,`
|
|
|
`):tt=tt.replace(/[ \t\r\n]+/g," "),q[Te]=tt,pe[Te<<1]=ve,ve+=tt.length,pe[Te++<<1|1]=me)}}return Ne(ae),{sourceCode:q.join("").replace(/\n$/,""),spans:pe}}function B(ae,Z,Y,q,ve){if(!Y)return;var pe={sourceNode:ae,pre:1,langExtension:null,numberLines:null,sourceCode:Y,spans:null,basePos:Z,decorations:null};q(pe),ve.push.apply(ve,pe.decorations)}var J=/\S/;function re(ae){for(var Z=void 0,Y=ae.firstChild;Y;Y=Y.nextSibling){var q=Y.nodeType;Z=q===1?Z?ae:Y:q===3&&J.test(Y.nodeValue)?ae:Z}return Z===ae?void 0:Z}function he(ae,Z){var Y={},q;(function(){for(var Te=ae.concat(Z),Ne=[],me={},Ie=0,_e=Te.length;Ie<_e;++Ie){var Ve=Te[Ie],tt=Ve[3];if(tt)for(var Ge=tt.length;--Ge>=0;)Y[tt.charAt(Ge)]=Ve;var Le=Ve[1],bt=""+Le;me.hasOwnProperty(bt)||(Ne.push(Le),me[bt]=null)}Ne.push(/[\0-\uffff]/),q=F(Ne)})();var ve=Z.length,pe=function(Te){for(var Ne=Te.sourceCode,me=Te.basePos,Ie=Te.sourceNode,_e=[me,R],Ve=0,tt=Ne.match(q)||[],Ge={},Le=0,bt=tt.length;Le<bt;++Le){var Re=tt[Le],Xe=Ge[Re],et=void 0,Ye;if(typeof Xe=="string")Ye=!1;else{var Me=Y[Re.charAt(0)];if(Me)et=Re.match(Me[1]),Xe=Me[0];else{for(var Ke=0;Ke<ve;++Ke)if(Me=Z[Ke],et=Re.match(Me[1]),et){Xe=Me[0];break}et||(Xe=R)}Ye=Xe.length>=5&&Xe.substring(0,5)==="lang-",Ye&&!(et&&typeof et[1]=="string")&&(Ye=!1,Xe=M),Ye||(Ge[Re]=Xe)}var ge=Ve;if(Ve+=Re.length,!Ye)_e.push(me+ge,Xe);else{var Ee=et[1],ce=Re.indexOf(Ee),je=ce+Ee.length;et[2]&&(je=Re.length-et[2].length,ce=je-Ee.length);var Qe=Xe.substring(5);B(Ie,me+ge,Re.substring(0,ce),pe,_e),B(Ie,me+ge+ce,Ee,oe(Qe,Ee),_e),B(Ie,me+ge+je,Re.substring(je),pe,_e)}}Te.decorations=_e};return pe}function we(ae){var Z=[],Y=[];ae.tripleQuotedStrings?Z.push([b,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ae.multiLineStrings?Z.push([b,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Z.push([b,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ae.verbatimStrings&&Y.push([b,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var q=ae.hashComments;q&&(ae.cStyleComments?(q>1?Z.push([C,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Z.push([C,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([b,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Z.push([C,/^#[^\r\n]*/,null,"#"])),ae.cStyleComments&&(Y.push([C,/^\/\/[^\r\n]*/,null]),Y.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ve=ae.regexLiterals;if(ve){var pe=ve>1?"":`
|
|
|
\r`,Te=pe?".":"[\\S\\s]",Ne="/(?=[^/*"+pe+"])(?:[^/\\x5B\\x5C"+pe+"]|\\x5C"+Te+"|\\x5B(?:[^\\x5C\\x5D"+pe+"]|\\x5C"+Te+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+K+"("+Ne+")")])}var me=ae.types;me&&Y.push([w,me]);var Ie=(""+ae.keywords).replace(/^ | $/g,"");Ie.length&&Y.push([D,new RegExp("^(?:"+Ie.replace(/[\s,]+/g,"|")+")\\b"),null]),Z.push([R,/^\s+/,null,` \r
|
|
|
\xA0`]);var _e="^.[^\\s\\w.$@'\"`/\\\\]*";return ae.regexLiterals&&(_e+="(?!s*/)"),Y.push([S,/^@[a-z_$][a-z_$@0-9]*/i,null],[w,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[R,/^[a-z_$][a-z_$@0-9]*/i,null],[S,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[R,/^\\[\s\S]?/,null],[A,new RegExp(_e),null]),he(Z,Y)}var ke=we({keywords:l,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ne(ae,Z,Y){for(var q=/(?:^|\s)nocode(?:\s|$)/,ve=/\r\n?|\n/,pe=ae.ownerDocument,Te=pe.createElement("li");ae.firstChild;)Te.appendChild(ae.firstChild);var Ne=[Te];function me(Le){var bt=Le.nodeType;if(bt==1&&!q.test(Le.className))if(Le.nodeName==="br")Ie(Le),Le.parentNode&&Le.parentNode.removeChild(Le);else for(var Re=Le.firstChild;Re;Re=Re.nextSibling)me(Re);else if((bt==3||bt==4)&&Y){var Xe=Le.nodeValue,et=Xe.match(ve);if(et){var Ye=Xe.substring(0,et.index);Le.nodeValue=Ye;var Me=Xe.substring(et.index+et[0].length);if(Me){var Ke=Le.parentNode;Ke.insertBefore(pe.createTextNode(Me),Le.nextSibling)}Ie(Le),Ye||Le.parentNode.removeChild(Le)}}}function Ie(Le){for(;!Le.nextSibling;)if(Le=Le.parentNode,!Le)return;function bt(et,Ye){var Me=Ye?et.cloneNode(!1):et,Ke=et.parentNode;if(Ke){var ge=bt(Ke,1),Ee=et.nextSibling;ge.appendChild(Me);for(var ce=Ee;ce;ce=Ee)Ee=ce.nextSibling,ge.appendChild(ce)}return Me}for(var Re=bt(Le.nextSibling,0),Xe;(Xe=Re.parentNode)&&Xe.nodeType===1;)Re=Xe;Ne.push(Re)}for(var _e=0;_e<Ne.length;++_e)me(Ne[_e]);Z===(Z|0)&&Ne[0].setAttribute("value",Z);var Ve=pe.createElement("ol");Ve.className="linenums";for(var tt=Math.max(0,Z-1|0)||0,_e=0,Ge=Ne.length;_e<Ge;++_e)Te=Ne[_e],Te.className="L"+(_e+tt)%10,Te.firstChild||Te.appendChild(pe.createTextNode("\xA0")),Ve.appendChild(Te);ae.appendChild(Ve)}function Oe(ae){var Z=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Z=Z&&+Z[1]<=8;var Y=/\n/g,q=ae.sourceCode,ve=q.length,pe=0,Te=ae.spans,Ne=Te.length,me=0,Ie=ae.decorations,_e=Ie.length,Ve=0;Ie[_e]=ve;var tt,Ge;for(Ge=tt=0;Ge<_e;)Ie[Ge]!==Ie[Ge+2]?(Ie[tt++]=Ie[Ge++],Ie[tt++]=Ie[Ge++]):Ge+=2;for(_e=tt,Ge=tt=0;Ge<_e;){for(var Le=Ie[Ge],bt=Ie[Ge+1],Re=Ge+2;Re+2<=_e&&Ie[Re+1]===bt;)Re+=2;Ie[tt++]=Le,Ie[tt++]=bt,Ge=Re}_e=Ie.length=tt;var Xe=ae.sourceNode,et="";Xe&&(et=Xe.style.display,Xe.style.display="none");try{for(var Ye=null;me<Ne;){var Me=Te[me],Ke=Te[me+2]||ve,ge=Ie[Ve+2]||ve,Re=Math.min(Ke,ge),Ee=Te[me+1],ce;if(Ee.nodeType!==1&&(ce=q.substring(pe,Re))){Z&&(ce=ce.replace(Y,"\r")),Ee.nodeValue=ce;var je=Ee.ownerDocument,Qe=je.createElement("span");Qe.className=Ie[Ve+1];var te=Ee.parentNode;te.replaceChild(Qe,Ee),Qe.appendChild(Ee),pe<Ke&&(Te[me+1]=Ee=je.createTextNode(q.substring(Re,Ke)),te.insertBefore(Ee,Qe.nextSibling))}pe=Re,pe>=Ke&&(me+=2),pe>=ge&&(Ve+=2)}}finally{Xe&&(Xe.style.display=et)}}var Ce={};function fe(ae,Z){for(var Y=Z.length;--Y>=0;){var q=Z[Y];Ce.hasOwnProperty(q)?p.console&&console.warn("cannot override language handler %s",q):Ce[q]=ae}}function oe(ae,Z){return ae&&Ce.hasOwnProperty(ae)||(ae=/^\s*</.test(Z)?"default-markup":"default-code"),Ce[ae]}fe(ke,["default-code"]),fe(he([],[[R,/^[^<?]+/],[L,/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[A,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),fe(he([[R,/^[\s]+/,null,` \r
|
|
|
`],[W,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[k,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[G,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[A,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),fe(he([],[[W,/^[\s\S]+/]]),["uq.val"]),fe(we({keywords:s,hashComments:!0,cStyleComments:!0,types:E}),["c","cc","cpp","cxx","cyc","m"]),fe(we({keywords:"null,true,false"}),["json"]),fe(we({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:E}),["cs"]),fe(we({keywords:t,cStyleComments:!0}),["java"]),fe(we({keywords:m,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),fe(we({keywords:u,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),fe(we({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),fe(we({keywords:f,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),fe(we({keywords:r,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),fe(we({keywords:e,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),fe(he([],[[b,/^[\s\S]+/]]),["regex"]);function se(ae){var Z=ae.langExtension;try{var Y=P(ae.sourceNode,ae.pre),q=Y.sourceCode;ae.sourceCode=q,ae.spans=Y.spans,ae.basePos=0,oe(Z,q)(ae),Oe(ae)}catch(ve){p.console&&console.log(ve&&ve.stack||ve)}}function be(ae,Z,Y){var q=Y||!1,ve=Z||null,pe=document.createElement("div");pe.innerHTML="<pre>"+ae+"</pre>",pe=pe.firstChild,q&&ne(pe,q,!0);var Te={langExtension:ve,numberLines:q,sourceNode:pe,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return se(Te),pe.innerHTML}function ie(ae,Z){var Y=Z||document.body,q=Y.ownerDocument||document;function ve(Me){return Y.getElementsByTagName(Me)}for(var pe=[ve("pre"),ve("code"),ve("xmp")],Te=[],Ne=0;Ne<pe.length;++Ne)for(var me=0,Ie=pe[Ne].length;me<Ie;++me)Te.push(pe[Ne][me]);pe=null;var _e=Date;_e.now||(_e={now:function(){return+new Date}});var Ve=0,tt=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ge=/\bprettyprint\b/,Le=/\bprettyprinted\b/,bt=/pre|xmp/i,Re=/^code$/i,Xe=/^(?:pre|code|xmp)$/i,et={};function Ye(){for(var Me=p.PR_SHOULD_USE_CONTINUATION?_e.now()+250:Infinity;Ve<Te.length&&_e.now()<Me;Ve++){for(var Ke=Te[Ve],ge=et,Ee=Ke;Ee=Ee.previousSibling;){var ce=Ee.nodeType,je=(ce===7||ce===8)&&Ee.nodeValue;if(je?!/^\??prettify\b/.test(je):ce!==3||/\S/.test(Ee.nodeValue))break;if(je){ge={},je.replace(/\b(\w+)=([\w:.%+-]+)/g,function(yt,pt,Bt){ge[pt]=Bt});break}}var Qe=Ke.className;if((ge!==et||Ge.test(Qe))&&!Le.test(Qe)){for(var te=!1,Je=Ke.parentNode;Je;Je=Je.parentNode){var ut=Je.tagName;if(Xe.test(ut)&&Je.className&&Ge.test(Je.className)){te=!0;break}}if(!te){Ke.className+=" prettyprinted";var Be=ge.lang;if(!Be){Be=Qe.match(tt);var qe;!Be&&(qe=re(Ke))&&Re.test(qe.tagName)&&(Be=qe.className.match(tt)),Be&&(Be=Be[1])}var at;if(bt.test(Ke.tagName))at=1;else{var wt=Ke.currentStyle,ft=q.defaultView,st=wt?wt.whiteSpace:ft&&ft.getComputedStyle?ft.getComputedStyle(Ke,null).getPropertyValue("white-space"):0;at=st&&st.substring(0,3)==="pre"}var Pe=ge.linenums;(Pe=Pe==="true"||+Pe)||(Pe=Qe.match(/\blinenums\b(?::(\d+))?/),Pe=Pe?Pe[1]&&Pe[1].length?+Pe[1]:!0:!1),Pe&&ne(Ke,Pe,at);var ze={langExtension:Be,sourceNode:Ke,numberLines:Pe,pre:at,sourceCode:null,basePos:null,spans:null,decorations:null};se(ze)}}}Ve<Te.length?p.setTimeout(Ye,250):typeof ae=="function"&&ae()}Ye()}var de=p.PR={createSimpleLexer:he,registerLangHandler:fe,sourceDecorator:we,PR_ATTRIB_NAME:G,PR_ATTRIB_VALUE:W,PR_COMMENT:C,PR_DECLARATION:L,PR_KEYWORD:D,PR_LITERAL:S,PR_NOCODE:N,PR_PLAIN:R,PR_PUNCTUATION:A,PR_SOURCE:M,PR_STRING:b,PR_TAG:k,PR_TYPE:w,prettyPrintOne:O?p.prettyPrintOne=be:o=be,prettyPrint:g=O?p.prettyPrint=ie:g=ie},Fe=p.define;typeof Fe=="function"&&Fe.amd&&Fe("google-code-prettify",[],function(){return de})})()},SMhR:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAAHGCAYAAADuYispAAAAAklEQVR4AewaftIAABHTSURBVO3BQY4cy5IEQdNA3//KNo2/8NU8XzCQyCpSReivSJKk/zmRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiB/s7a5AWTTNhsgN9pmA2TTNp8MyI22uQHkv7TNDSCbttkAudE2bwJyo22eBGTTNhsgf7O2ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTD9c2nwzIk9pmA2TTNjeAPAnIpm1uANm0zQbIDSBPAXIDyKZtPhmQG22zAfLN2uaTAflUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT74ckCe1zZOAbNpm0zYbIDfaZgPkRts8qW1utM0GyKZtntI2GyBPArJpmw2QTds8CcimbW4A+WRAntQ23+pEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0viJXtU2T2qbDZA3Adm0zZOAbNpm0zYbIJu2+VZtswGyaZsbbbMBsmmbDZBN29xoG32mE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJ3oVkCe1zZPaZgNk0zYbIJu2eRKQJwF5S9vcAPIkIJu2uQFk0zY32kbf6USSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnS+MmXa5t/WdtsgGza5psB+WRt8xQgN4DcaJtv1jYbIDfa5pO1jf5/J5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGTz4ckH9Z22yAbNpmA2TTNhsgm7bZANm0zQbIpm02QDZtswFyA8h/aZsbbbMBsmmbDZBN22yAbNpmA2TTNhsgm7bZALkBZNM2N4Doz5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX9LGAvKltNkA2bXMDyJvaZgNk0zZPAfLN2mYD5EbbPAnIk9pG7ziRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7y4YBs2uYGkE3bbIBs2mYD5Ebb/Mva5klAbgB5S9tsgGza5gaQDZBN2zwJyJPaZgNkA2TTNhsgN9pmA2TTNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdKgv/IPA3KjbW4AeVLb3ADyzdrmBpAntc2nAnKjbTZANm1zA8gna5sNkH9Z27zlRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZcDcqNtbgDZtM2mbTZANm1zA8imbTZANm1zA8iTgGza5gaQpwDZtM2NttkAudE2b2qbDZAbbbMB8qa20f/vRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4ycuA3GibDZANkBttswHyJCA32uZJQDZt8yQgTwKyaZsNkD/VNk8CsmmbDZA3tc0GyI222QDZtM0NIJu2eRKQTdt8qxNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4yf/uLbZANkA2bTNDSBPAnKjbd7UNhsgN4Bs2uZG27wFyKZtbrTNBsimbW4AudE2N9pmA+RG29wAsmmbJwHZtM1bTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3w5IJu2udE2N4DcaJsbQDZtswGyAfIvA7Jpmz8F5EbbPAnIpm1uANm0zZuAbNpm0zYbIBsgm7a5AeRJbfOpTiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNn3y4ttkAuQFk0zYbIDfa5gaQN7XNk4A8qW02QG4A+VNtswHyzdpmA+RJbfMkIJu2eVPbbIBs2uZvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/ERX2kb/DcimbW4AuQFk0zYbIDfa5i1t8yYgm7a50TYbIN+sbW4A2bTNk4Bs2uYtJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGT/5yQDZtswHypLbZAHlT29xomw2QTdvcAHIDyKdqmze1zZuAvKltNkCeBOSTAflWJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUPBuRG22yAbNrmBpAbbbMBcqNtNkA2bbMBsmmbDZBN2zwJyFvaZgNk0zYbIDfaZgNk0zYbIG9qm08GZNM2GyCbttkA2bTNtzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7yMiBPAvIkIN8MyA0gm7bZALkB5Elt8yQgf6pt9N/aZgPkTUA2bbNpmycB+VedSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRr0V/5iQDZt882AbNrmBpBN22yAbNpmA+RG2zwJyKZt/hSQTds8CcimbW4A2bTNk4B8s7bZALnRNhsgm7bZANm0zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDggm7bZtM0GyJvaZgPkBpBN2zypbTZAbrTNBsimbZ4E5ClAbrTNNwOyaZsbbXMDyI222QDZtM0GyAbIDSCbtvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZV/GJAbbbMB8qa22QDZtM0GyKZtbgDZtM0NIJu22QC50Tb/BciNttkAeVLbbIDcaJsNkE3bbIA8qW02QN7UNv+qE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8DcqNt3gTkkwH5ZECeBOSTAXkKkE3bbIA8qW2e1DY32mYDZNM2GyD6TCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSxk++HJBN29xomycB2bTNm4Bs2mYD5JsBudE2TwGyaZsNkCcBudE2N4C8CciNtnkSkBtAbrTNpzqRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNH7ysrb5ZkA2bXMDyI22eRKQTds8CcimbTZANm2zAXIDyH9pmye1zQbIpm02QG4A+WRtswHyJCCbtnlT23yrE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0vjJy4A8qW2e1DZvapsbQDZtswFyA8imbTZtc6Nt3tQ2TwGyaZtN22yA3GibDZBN22yAPAnIm9rmSUA2bbMBcqNt3nIiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAfLN2mYD5Ebb3AByo202QPSOttkA2bTNm4Bs2uYGEP25tvlUJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpHEiSZIG/ZUXAbnRNjeA3GibG0ButM03A/LJ2mYDZNM2fwrIJ2ubG0A2bXMDyI22uQFk0zY3gNxomxtANm3zrU4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkDforLwKyaZsNkE3bPAnIpm02QJ7UNk8CcqNtNkButM0GyJPaZgPkT7XNBsiNttkA+Ze1zQ0gN9pmA+RNbbMBsmmbt5xIkqRxIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGvRX/mJANm3zzYDcaJsbQG60zQ0gm7a5AeRJbfMWIE9qmw2QG22zAXKjbTZANm2zAfKktrkB5E1t85YTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeMnLwOyaZsbbbMB8qa2udE2GyBvapsNkE3bbNrmTW2zAbIB8l/a5kltswHypLZ5U9s8CciNtnkSkE3b/KtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2fvKxtbgDZtM2NtvlmbbMB8iQgTwKyaZsNkG8F5Elt8yYgm7Z5EpBN2zwJyCcDcqNtPtWJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpPGTDwdk0zY32uYGkE3b3ACyaZtP1jZvArJpmw2QDZBN22yA/Bcgm7bZALkB5Ebb6L8B2bTNDSCbttkAudE2GyCbtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRBf+UvBmTTNhsgm7a5AeSTtc2TgNxomw2QG22zAbJpmz8F5EbbbIC8qW2+GZBN2zwJyKZtNkButM0GyI22ecuJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRpnEiSpEF/5UVAbrTNk4DcaJsNkG/WNk8C8qS22QDZtM0GyKZtPhWQN7XNk4Bs2mYD5Elt8yQgN9rmb3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBfeRGQN7XNk4Bs2uabAdm0zQbIm9rmUwHZtM0GyI222QB5U9tsgDypbZ4EZNM2bwKyaZtvdSJJksaJJEkaJ5IkaZxIkqRxIkmSxokkSRonkiRp/OTDtc0GyJOA3GibDZAbbXMDyKZtntQ23wzIjbb5L21zo21uALnRNhsgn6xtNkA2bfMmIG8CsmmbT3UiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkadBf+WBANm2zAbJpmw2QTdv8y4DcaJsbQDZtswFyo202QDZt8xQgm7a5AeRG23wzIDfa5k1ANm1zA8iNtnnLiSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxk79c2zwJyI222QDZtM2TgGzaZgNkA+RNbbMBcqNtNkD+VNvcALJpmzcB2bTNBsimbT4ZkE3bvAnIpm2+1YkkSRonkiRpnEiSpHEiSZLGiSRJGieSJGmcSJKkQX/lgwF5Uts8CciNtrkB5EltcwPIjbbZANm0zQbIp2qbJwHZtM0NIG9qmzcB2bTNBsiNttkAeVLbfKoTSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSYP+youAPKltngRk0zY3gGza5klAntQ2N4A8qW02QL5V22yAfLK22QC50TYbIJu22QD5Zm2zAXKjbd5yIkmSxokkSRonkiRpnEiSpHEiSZLGiSRJGieSJGnQX9FrgGzaZgNk0zYbIDfaZgNk0zYbIJu22QDZtM0NIJu2eQqQG21zA8imbTZANm3zJiBvapsnAbnRNn+rE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjJy8D8jdrm03b3GibDZA3tc2NtnkSkDcB+S9tc6NtntQ2N9rmBpAbbXOjbW4AuQFk0zZPAnKjbT7ViSRJGieSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqTxkw/XNp8MyJOAbNrmRts8CcimbT5Z22yA3GibpwDZtM0NIJ+sbTZAbgB5U9s8qW02QDZt861OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI2ffDkgT2qbJwF5UttsgLwJyJPa5gaQG0De0jY3gGza5gaQG22zAXKjbZ4EZAPkTUBuANm0zac6kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjR+ole1zZvaZgPkRtvcAPIkIJu22QDZtM3fCsiNttkAudE2TwKyaZtN22yAbNrmBpAbbbMBsgGyaZu3nEiSpHEiSZLGiSRJGieSJGmcSJKkcSJJksaJJEkaP9FHA3KjbTZAngRk0zafDMiTgPyptrkB5Eltc6Nt3gTkTW1zA8imbZ7UNt/qRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdL4yZdrm28G5JO1zQ0gN9pmA2QDZNM2GyCbtrnRNk8BcqNtNkA2QN7UNhsgTwKyaZsNkE3bvAnIjbb5VCeSJGmcSJKkcSJJksaJJEkaJ5IkaZxIkqRxIkmSBv2VFwH5m7XNk4Bs2uZJQJ7UNjeA3GibTwXkRttsgNxomw2QG22zAXKjbW4AeVLbbIDcaJsNkCe1zVtOJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJA36K5Ik6X9OJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ40SSJI0TSZI0TiRJ0jiRJEnjRJIkjRNJkjROJEnSOJEkSeNEkiSNE0mSNE4kSdI4kSRJ4/8ATrCgy9kbxW8AAAAASUVORK5CYII="},SZEN:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.clientToElement=I;function I(_,O,y){var v=y.getBoundingClientRect(),o={x:0,y:0};return _<v.left?o.x=0:_>=v.right?o.x=v.width-1:o.x=_-v.left,O<v.top?o.y=0:O>=v.bottom?o.y=v.height-1:o.y=O-v.top,o}},Sa5k:function(U,X,x){U.exports=x.p+"static/nothing.4d201a0a.png"},Scqh:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAAZ5JREFUWEftmM9Kw0AQxuebJBQJnuxREA+CV+mLeO0DlD6AZ1+gV6tQWqhe2ptUBX0JEQ/iQQ8ieFQshCDBZEdWGglCSVKbdJHmkBxmsvPbb2f/DWjyiAiGw+FaEATVKIpWRIRjWxFfAMqyrI9KpfJar9ffAIiOA/3qdDoOgE0Aq0UET2tTRDwReWo2m5/QynS73a1FwSRGyGs0Go8YDAZV3/c30npRht113Wf0+/3tMAzdMgKmxbBt20ev19spOoHTQGK7TnSdP7WsP5ThtwRKU/lfKFRTSu0DCIjoGMBVWq/z2HMrpJQaEdF6YmbcAmgR0UOewNN8ZwG6/t0YgEhETpn5iIi8v4DNBSgBMAbQtizrTCn1vVnmfeYNFMe/J6IWM9+ZAkST48S5bdvtKIres4IVpVAyvgdgD8BNFqgygDTHCzPvLoGmKGDGkOmkFpELx3EOTEhqY6b9mJkPmXm00IVx0VuHWZsrEf0cP0TkhJkvs6wvWX1yL4xZG57VbwmUppx5Chl3UTTuKm1cscG4cozOeqMKVvE0NKWk9wWBdSawQzyy4QAAAABJRU5ErkJggg=="},SgaC:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(v,o){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}function _(v,o){for(var g=0;g<o.length;g++){var p=o[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(v,p.key,p)}}function O(v,o,g){return o&&_(v.prototype,o),g&&_(v,g),v}var y=function(){function v(){I(this,v),this._subrects=0}return O(v,[{key:"decodeRect",value:function(g,p,d,a,n,s,t){if(this._subrects===0){if(n.rQwait("RRE",4+4))return!1;this._subrects=n.rQshift32();var i=n.rQshiftBytes(4);s.fillRect(g,p,d,a,i)}for(;this._subrects>0;){if(n.rQwait("RRE",4+8))return!1;var e=n.rQshiftBytes(4),r=n.rQshift16(),c=n.rQshift16(),u=n.rQshift16(),f=n.rQshift16();s.fillRect(g+r,p+c,u,f,e),this._subrects--}return!0}}]),v}();X.default=y},SzL9:function(U,X,x){U.exports=x.p+"static/appoint2.ec9f16d8.svg"},TGq3:function(U,X,x){U.exports=x.p+"static/lockclose.365036e8.svg"},TXba:function(U,X,x){U.exports={wrap:"wrap___3g908",content:"content___DKfAL",mainPathWrap:"mainPathWrap___1gVR9",colorBlue:"colorBlue___10YHC"}},TXwP:function(U,X,x){var I,_;(function(){var O;(function(){"use strict";var v=[,,function(d){function a(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}a.prototype.clone_empty=function(){var t=new a(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},a.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},a.prototype.has_match=function(t){for(var i=this.__items.length-1;i>=0;i--)if(this.__items[i].match(t))return!0;return!1},a.prototype.set_indent=function(t,i){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=i||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},a.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},a.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},a.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},a.prototype.is_empty=function(){return this.__items.length===0},a.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},a.prototype.push=function(t){this.__items.push(t);var i=t.lastIndexOf(`
|
|
|
`);i!==-1?this.__character_count=t.length-i:this.__character_count+=t.length},a.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},a.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},a.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},a.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},a.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function n(t,i){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),i=i||"",t.indent_level>0&&(i=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=i,this.__base_string_length=i.length}n.prototype.get_indent_size=function(t,i){var e=this.__base_string_length;return i=i||0,t<0&&(e=0),e+=t*this.__indent_size,e+=i,e},n.prototype.get_indent_string=function(t,i){var e=this.__base_string;return i=i||0,t<0&&(t=0,e=""),i+=t*this.__indent_size,this.__ensure_cache(i),e+=this.__cache[i],e},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,i=0,e="";this.__indent_size&&t>=this.__indent_size&&(i=Math.floor(t/this.__indent_size),t-=i*this.__indent_size,e=new Array(i+1).join(this.__indent_string)),t&&(e+=new Array(t+1).join(" ")),this.__cache.push(e)};function s(t,i){this.__indent_cache=new n(t,i),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new a(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(t,i){return this.__indent_cache.get_indent_string(t,i)},s.prototype.get_indent_size=function(t,i){return this.__indent_cache.get_indent_size(t,i)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(t){this.trim(!0);var i=this.current_line.pop();i&&(i[i.length-1]===`
|
|
|
`&&(i=i.replace(/\n+$/g,"")),this.current_line.push(i)),this._end_with_newline&&this.__add_outputline();var e=this.__lines.join(`
|
|
|
`);return t!==`
|
|
|
`&&(e=e.replace(/[\n]/g,t)),e},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(t,i){return t=t||0,i=i||0,this.next_line.set_indent(t,i),this.__lines.length>1?(this.current_line.set_indent(t,i),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(t){for(var i=0;i<t.newlines;i++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(t.whitespace_before),this.current_line.push(t.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(t){this.__add_space_before_token(),this.current_line.push(t),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(t){for(var i=this.__lines.length;t<i;)this.__lines[t]._remove_indent(),t++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(t){for(t=t===void 0?!1:t,this.current_line.trim();t&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(t,i){for(var e=this.__lines.length-2;e>=0;){var r=this.__lines[e];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==i){this.__lines.splice(e+1,0,new a(this)),this.previous_line=this.__lines[this.__lines.length-2];break}e--}},d.exports.Output=s},,,,function(d){function a(t,i){this.raw_options=n(t,i),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}a.prototype._get_array=function(t,i){var e=this.raw_options[t],r=i||[];return typeof e=="object"?e!==null&&typeof e.concat=="function"&&(r=e.concat()):typeof e=="string"&&(r=e.split(/[^a-zA-Z0-9_\/\-]+/)),r},a.prototype._get_boolean=function(t,i){var e=this.raw_options[t],r=e===void 0?!!i:!!e;return r},a.prototype._get_characters=function(t,i){var e=this.raw_options[t],r=i||"";return typeof e=="string"&&(r=e.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),r},a.prototype._get_number=function(t,i){var e=this.raw_options[t];i=parseInt(i,10),isNaN(i)&&(i=0);var r=parseInt(e,10);return isNaN(r)&&(r=i),r},a.prototype._get_selection=function(t,i,e){var r=this._get_selection_list(t,i,e);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return r[0]},a.prototype._get_selection_list=function(t,i,e){if(!i||i.length===0)throw new Error("Selection list cannot be empty.");if(e=e||[i[0]],!this._is_valid_selection(e,i))throw new Error("Invalid Default Value!");var r=this._get_array(t,e);if(!this._is_valid_selection(r,i))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values:
|
|
|
`+i+`
|
|
|
You passed in: '`+this.raw_options[t]+"'");return r},a.prototype._is_valid_selection=function(t,i){return t.length&&i.length&&!t.some(function(e){return i.indexOf(e)===-1})};function n(t,i){var e={};t=s(t);var r;for(r in t)r!==i&&(e[r]=t[r]);if(i&&t[i])for(r in t[i])e[r]=t[i][r];return e}function s(t){var i={},e;for(e in t){var r=e.replace(/-/g,"_");i[r]=t[e]}return i}d.exports.Options=a,d.exports.normalizeOpts=s,d.exports.mergeOpts=n},,function(d){var a=RegExp.prototype.hasOwnProperty("sticky");function n(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position<this.__input_length},n.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},n.prototype.peek=function(s){var t=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(t=this.__input.charAt(s)),t},n.prototype.__match=function(s,t){s.lastIndex=t;var i=s.exec(this.__input);return i&&!(a&&s.sticky)&&(i.index!==t&&(i=null)),i},n.prototype.test=function(s,t){return t=t||0,t+=this.__position,t>=0&&t<this.__input_length?!!this.__match(s,t):!1},n.prototype.testChar=function(s,t){var i=this.peek(t);return s.lastIndex=0,i!==null&&s.test(i)},n.prototype.match=function(s){var t=this.__match(s,this.__position);return t?this.__position+=t[0].length:t=null,t},n.prototype.read=function(s,t,i){var e="",r;return s&&(r=this.match(s),r&&(e+=r[0])),t&&(r||!s)&&(e+=this.readUntil(t,i)),e},n.prototype.readUntil=function(s,t){var i="",e=this.__position;s.lastIndex=this.__position;var r=s.exec(this.__input);return r?(e=r.index,t&&(e+=r[0].length)):e=this.__input_length,i=this.__input.substring(this.__position,e),this.__position=e,i},n.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},n.prototype.get_regexp=function(s,t){var i=null,e="g";return t&&a&&(e="y"),typeof s=="string"&&s!==""?i=new RegExp(s,e):s&&(i=new RegExp(s.source,e)),i},n.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},n.prototype.peekUntilAfter=function(s){var t=this.__position,i=this.readUntilAfter(s);return this.__position=t,i},n.prototype.lookBack=function(s){var t=this.__position-1;return t>=s.length&&this.__input.substring(t-s.length,t).toLowerCase()===s},d.exports.InputScanner=n},,,,,function(d){function a(n,s){n=typeof n=="string"?n:n.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(n+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(n+/\sbeautify\signore:end\s/.source+s,"g")}a.prototype.get_directives=function(n){if(!n.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var t=this.__directive_pattern.exec(n);t;)s[t[1]]=t[2],t=this.__directive_pattern.exec(n);return s},a.prototype.readIgnored=function(n){return n.readUntilAfter(this.__directives_end_ignore_pattern)},d.exports.Directives=a},,function(d,a,n){var s=n(16).Beautifier,t=n(17).Options;function i(e,r){var c=new s(e,r);return c.beautify()}d.exports=i,d.exports.defaultOptions=function(){return new t}},function(d,a,n){var s=n(17).Options,t=n(2).Output,i=n(8).InputScanner,e=n(13).Directives,r=new e(/\/\*/,/\*\//),c=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,f=/\s/,m=/(?:\s|\n)+/g,l=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,E=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function b(D,C){this._source_text=D||"",this._options=new s(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}b.prototype.eatString=function(D){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(D.indexOf(this._ch)!==-1||this._ch===`
|
|
|
`)break;this._ch=this._input.next()}return C},b.prototype.eatWhitespace=function(D){for(var C=f.test(this._input.peek()),w=0;f.test(this._input.peek());)this._ch=this._input.next(),D&&this._ch===`
|
|
|
`&&((w===0||w<this._options.max_preserve_newlines)&&(w++,this._output.add_new_line(!0)));return C},b.prototype.foundNestedPseudoClass=function(){for(var D=0,C=1,w=this._input.peek(C);w;){if(w==="{")return!0;if(w==="(")D+=1;else if(w===")"){if(D===0)return!1;D-=1}else if(w===";"||w==="}")return!1;C++,w=this._input.peek(C)}return!1},b.prototype.print_string=function(D){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(D)},b.prototype.preserveSingleSpace=function(D){D&&(this._output.space_before_token=!0)},b.prototype.indent=function(){this._indentLevel++},b.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var D=this._source_text,C=this._options.eol;C==="auto"&&(C=`
|
|
|
`,D&&c.test(D||"")&&(C=D.match(c)[0])),D=D.replace(u,`
|
|
|
`);var w=D.match(/^[\t ]*/)[0];this._output=new t(this._options,w),this._input=new i(D),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var S=0,A=!1,R=!1,k=!1,L=!1,M=!1,G=!1,W=this._ch,N=!1,K,F,P;K=this._input.read(m),F=K!=="",P=W,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),W=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var B=this._input.read(l),J=r.get_directives(B);J&&J.ignore==="start"&&(B+=r.readIgnored(this._input)),this.print_string(B),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(E)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(F),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var re=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);re.match(/[ :]$/)&&(re=this.eatString(": ").replace(/\s$/,""),this.print_string(re),this._output.space_before_token=!0),re=re.replace(/\s$/,""),re==="extend"?L=!0:re==="import"&&(M=!0),re in this.NESTED_AT_RULE?(this._nestedLevel+=1,re in this.CONDITIONAL_GROUP_RULE&&(k=!0)):!A&&S===0&&re.indexOf(":")!==-1&&(R=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(F),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")R&&(R=!1,this.outdent()),k?(k=!1,A=this._indentLevel>=this._nestedLevel):A=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&A&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),P==="{"&&this._output.trim(!0),M=!1,L=!1,R&&(this.outdent(),R=!1),this.print_string(this._ch),A=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var he=0;he<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;he++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[he])){N=!0;break}(A||k)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!L&&S===0?(this.print_string(":"),R||(R=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var we=P==='"'||P==="'";this.preserveSingleSpace(we||F),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")N=!1,S===0?(R&&(this.outdent(),R=!1),L=!1,M=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),S++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),S&&(S--,this.outdent()));else{var ke=!1;this._input.lookBack("with")&&(ke=!0),this.preserveSingleSpace(F||ke),this.print_string(this._ch),R&&P==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),G=!0):(this.eatWhitespace(),S++,this.indent())}else if(this._ch===")")S&&(S--,this.outdent()),G&&this._input.peek()===";"&&this._options.selector_separator_newline&&(G=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!R||G)&&S===0&&!M&&!L?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!R&&S===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&f.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(F),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),f.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var ne=P==='"'||P==="'";this.preserveSingleSpace(ne||F),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
|
`&&N&&this._output.add_new_line()}var Oe=this._output.get_code(C);return Oe},d.exports.Beautifier=b},function(d,a,n){var s=n(6).Options;function t(i){s.call(this,i,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var e=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||e;var r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var c=0;c<r.length;c++)r[c]!=="expand"?this.brace_style="collapse":this.brace_style=r[c]}t.prototype=new s,d.exports.Options=t}],o={};function g(d){var a=o[d];if(a!==void 0)return a.exports;var n=o[d]={exports:{}};return v[d](n,n.exports,g),n.exports}var p=g(15);O=p})();var y=O;!(I=[],_=function(){return{css_beautify:y}}.apply(X,I),_!==void 0&&(U.exports=_))})()},Tl6Z:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIsAAABuCAYAAAAXkODOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjY4Qjc0NjM3NTI4RTExRThBQTE0QjdDODQ4MEFBMzdGIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjY4Qjc0NjM4NTI4RTExRThBQTE0QjdDODQ4MEFBMzdGIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjhCNzQ2MzU1MjhFMTFFOEFBMTRCN0M4NDgwQUEzN0YiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NjhCNzQ2MzY1MjhFMTFFOEFBMTRCN0M4NDgwQUEzN0YiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6LemY3AAAa7klEQVR42uxdCXPaytY8ArEaYzt2cm/efe///6+v3ktu4ngBm13Ah1zdUTMeLYCEuYmnSuUFEKOZnj7rnAnW67X94q21ucLN1cbvc1z1zVXzXG5byRXJtcDP36YFvxhY4sk+21yNzTXcXL3N1Y+fs6LvWwF4M1zTzbV+B8vptxgUFynssA8Igj1AtgZgJriid7CcRmticuKJvd5cnYIgmIkIiUTELPHz1RhBZNUhzkIwF68sQMXAGW2uccq938FyBJB8gP6R1+aYsBl+j8A8nOi6XAHAp7rLygFThJ8EW4D+tADWVgp41gDNE/rxDpaKWzyhl9BD8gAyxuREAEUbVyB6BpXUZc6qr3nYpYGfa9yH+orhe2LgdFNE4gT61PQdLNXpI5cZlM9JH2Di2pisOl4ju1QhChpiadXwPSP0JwbNOV736Tbs7ztYyujf5rrBxPvaGAM+hzjoASBjrOC30BMI1BB9GAFEffQvEMU3xOsPANc7WA5oH1OAMscAT2EqdzEBTydkgQRglp70bSlM0xQxtcbzPL2DpTxGoah5wiR0sXqfT9y/0RB/zwCi8QKiVVsskn6cqsl9imBpgFEazv9jgDxiVfYgap5LBGdNlNm5/L4qEYghQGJ4lhBmf8PRZ+5LfLZfFiwdACVwRM4dBvEKq2+45wTWoIiqnySEnqOm8j2YoCWAWWGCRyWZ/5cQo08A0IXznpE89ztYPBbPlbPCHmUwwz0UwUB8IG2AY2FJfCgS30me+cw+lTlgZ7geRfSGzkK5PRWxdCpg+QDFT03hW/x+BUoe73C/FlZvV8zZiVUfuwnxHMMdQF3D88+xMK6csYjv891OwJn31mDxKbJjKHm0cu4KDnwAXeYcA/soK5LW0jzjs80SfB4hJr4tZv1iB5bpQgQ2MS7qSf57h3v9cmCJJ+iT47AaYpKvREcocp8+rjnuMXHecwUg3afoHB30ZVKSo4wM07PE+VaEGRoA2xDA+CTKbwSGWfxuYPEBhRN5bUnwLa9xQug1naWIpE+ySv923teGUs3X/69EUVVDH/sAzUMB/SMAYB5FqW/JGE1/N7B8siRKvIbYGWNQVgVWTxOgqkG3me+gD333ME8HtD/DJJWtH9QsiWsNwTR5A9/Fe9jXP2C1fQFzRb8DWK4tCQYuoJPsQvvnGPhHxxlXT9Ft4on6S5hjiBXuview6l3uDTx/HQukyHO3wSY38rnPYMjoVwaLei1joHyz7VhJHj1fYPB8Xs4rvGfiYY4bfN8QA/7WpigDo8MCelkPTDLA58biYvhhR4x/HRMsbVAp2xc86Acxk7M+ew0mGaRQNsXSBKLGVThPzYXehK4U4flXOQpzA0x0iTH4BFb9toeOpf6nDsTujyJa+zFaDatbrZ4lBuuuwMq6wsNMUt4zxf3SUipPMdYST9BXgPxzjqUTYVKXIkKnljgy7wtaaHROdmzbS14/JWZRhXYOeXsD0GTJ7Uv4H4qYjGeWeGP/abmvNO2/54zHB7ArUzI+ZyjtgQCjba9jbTMR2Z+sgOPvGGBRPWUN8dPD5I9yBrALYB0716MsJ90ujYp7FmACsPE9FgQXYYRxrYtoaTvssbLtZPKlY3REKSL+aGKoZdth+DtLkpxHOYzSKRkotYLKYCjOsO8Zoq/s9iQsnAaYNcawi/cvME5xn//tEcMR+j/G/dKYYYzF8aY6i2bcj4Ds6xyFtg+RUjajXOH75wDCOKW/N+jrCL9/PaJYU8CkufeXeJ+7VaUGMMwEIEX7PSmyKKoES1ucYRGo8xoK2jpDme1XAJSmOMQiUHkffZkJm/VtO5eEFsvfORZHYOV5fZ+E3f4GG6rl0gDoW+Ibmsh1SD8y2bcKneUCD3Bl2y72Bv4eZoisa1g9ZXtQ/8AqvZfJvQaDTfB3aIk3WJVDJlr9SFEeOxkm/SHOu0/iLAwcUTQT/WNe8uK+PQazBJbEakLHTGYa4feUz9axgqsIxXfAELfyd9uSJKe26AJtAIjZ9w/o/1+W7HXm/qClJXGaZgljp+Bz52Uh4KgqzWJpr3chVCqGao7NvsKKo3s+rd1g9e4LlL5tb1xfYkADSyLYdUviThP0tW2vM+3pr+ngs2s8Q8+Sfc1TWfVjAGzXFjqiRbeqrAQYkyNZgwt8b9tSgpVlgSW+z58e5w7d60EGEJj7sW/OacOSdEvdXRiJvvRNGKAjsnkqTi6OBbdxcOtpICsukIlc4D5d+d5lQfYgm83xcyF9vrW3S3SaoH+VgqXrAcoKYLm214E7ZaIiCmQeUCPcQ8VaCHDULYmlMBttJczSF1BNxUrqiNk/syRSTMD1BXBUOMcZ7NEUVlo41supbDSbYKweqgKLTob7xQ2stmWGMjy2wxJ6NDDImEdbLAUVby2x0FYOOKjgjQQ4ExFJl8KQNEtrwlQtAY06xcaWeKpD/G9hp7l1hX30smRZ1tAfHuWIWx0eU8DSgOj6cqBMvrRk/5DZ9lZVbi0NHStiLave95qa8jXxz5hjxjY9TrN9/Byn1P7AgnmuSgwNPWBZ4P5ZrPIcBMFBytsG7C/6xeY+D5vf6+iHpkFMNq9Fm9eoM1yIfvDyWsbtn3F/fq7t8ZKqnyPuR6UpA5v+NDffMZe/q9JbKgFLbAl8cP7HQNcwQ3TEHfpfST6JzZitb2TiHjYDGv+vIZPbxesDvBYzRBcgWgO4KwFVWywVX2Otl/hz46oBImZ9c/N3/HzDCvWWS5+j8VCwcEedW91ggAdL00XOgdzVnoNHXaFLH0o8YfL/S6y4uSOeXsSHvEaAxIDobX5qaY6sRr1lvPn84hgAER3rafOd+1qOTXEhzDJM6KXoYKWBxTew9IhOMkzIM8d6KTJ4qjg2xSk2wGpj/m4sWkZgiPh/fYAogph4xt/xfa4AkLxxWKpT7FDRmfGMfLZMgMT931Hctez1BrYpnKA+OTb1mdCHgqWWAiB6RNPM7PkuSu1mcLhVYyq+m4b4KqZgiBDM0RMvLMVOE68VrRrFiO1o8/nKTFv0tSWKONu3zfdOPUB6WTCbv7dez7EWP3nmiqVBRhmi6KFMsKxSvmidIWLOrdh+IBfpMWN8x6QvNr8/gSHigb4Ak1ChfRJl9xoDnZcNtnbYY1EhQLoYB5bdoP9nDlZ5KdOxeR/3WzfFnxT38a4gULg4axlqRNp4h+akox4KlqlHlmfVh6XM3GnvS8wMth1X6gIMpOlHsEcbuofPrKUfYS4yuW6JW32G7zlmGwCYcwERrUrGowgkfV8IRupY/h6rWo7ulaW8d0xqxhwKlqV4Q2lCn1l6UZpzO7yUREiTm2Invi+A4jNr55aUzdBQwHNVukcB8L8ox1RiNz+vbLu4D8XnlhjC+9qizxQJC8yz2LqACV0aWLSqAEVPlm+lvati61hATGC6ADgaKYPAWEtosjFe/RMliJJriMNhihXTEUtt6vl8/Cx9S/ZgP+DnZ0zUCmKo44grAmlc0M/C8dCxGlt+ovzUNaEPBUtDdIGZbYftfe3Hvt5aKLAs5OMqohpvaeIBqedU5SQLYYU9Qy9QJZWrfpAhkgdQnueyGHrisLwSIA1gpkcUVzGQCvpa1ligXYzLbAdGYhR6UgZYmh6lKK0jHdszmirihg9Pl/pCABtgQB+t4gbQciD/4/heZkWcdAB/DexxJmPJ+nNzMhLYqiu6GF0BRR1zqz3FP0XRpCxmUeWxlSEHlzkiSifD3QRFv809vqcmfX+qWjEFWJU9fInRmutS5J7/EdGitVkY3GxD1LXFKqG4qomPqMqN8oxCW9nMMs/x2gYZXkNlD3pR6X299ZixK6s4SIf+XOAZm6p44jmpn1FRjJX3j/js3KHypUdkxDpDJGKoL2L0L/m+J4/F1JLxrxIsWyZ0WU45WkVpictMuZw5/2uBWpU9Yrr88QZmrG8hNGXVjyE6+hi8r1h1cWDvDtYNPcMt+XzTJwI8okqT2wfiaPRZTFNZnMMKx2DLhD4ELAEGoSWrfJ1hBbGkOcHREvb4nhP9rVr/6EAZnrrmrfNebhe9QyR7AqcfI8F0ntEieoAndpXTh76wPPNkrgGUUETVSEBLa6rofqhDRNHBYGH5CDKLr9PUPUjnfyp7xOO0efBjg8M1bZUdpzkT+pJFJnGaOZ7lQiZWzwbo5FksYKMLS/J6NQPvpwiSVAk3ntW1asugTtC/4FBmUX2lIXK8Y9snh43sjYoBYzJc01Zl8ggTEuX4d3pgishxjqklNBEL5hre5LygH6s/PECsxP37n7gKznCvpuvRhY7UqhgsP03ossCyBvpaeOCpsscbiZamY5K6A/0Z4uY54z5dS/Y/TS05/CqybTd85BFrbRHB4wy2ir9jCPYgs/wBJlFH3IMAsS33bx5hSF9E0b5gCbHSlgIGmrZvwR5ppi3FxMRVKDefmUJxzFr5c3GKcYLcaHDT42klmMiyaX6XuG/1OMsPwJ1u7sUCzQ8EIp9v8/PctoOKkTBcVTsCmFi+E1i0Q6yC8GDllivfh0GuHIcWc3DHOUrzRAAwTnGccWsGxZHBaxs6Fo+a1Wrmfs5a+QDpgweg1P/OhSVfBRXRp1pFC7QOC62LZ7sPc97MEp1NgINi5fENQFHzmJscpAf1eGawz0pYZC6e5SIe13jVR7a9rWSuZi5BBfHFrP84QhzuYO3REfbRJ4I8XuBVSezRFlbmRr1nnes0sNB7+mS7Ff6t0mKZu5OKCfhawCzm6uR2VJ38XWQ+RctXJ2m66dFVVBR1d/CHEBRV5tlSUrC/TNXI3B6bBhbd+FRFGL8r5mWWxTIXj2kzz7IQkKnushKNvuWZ/O4OK3+GfobMvBMdYiXueBVFL95o8bwus0AA8fK1zAi5sId6yLmN966oGGNhu2MyB3chvtSV2wzMWYbOQWo/K8BGNUvKZqliSwviDw+LTDD5RVf+WESEmswzjwLtY8dVQZE3L5k9OrJQfsAQ2VnPZB2QojVZy2htx7FHxTErp3SeJy4gv+fQbb6m6QLxSpfvmYrYtQKTGEnc59YxmUOH1cI04Fa8EBUcdTBdyxmHvQySUFbXsffbzrDKWPI0KyhWVIkbARBNz+rU8hhTZ/LbO/R7QJZI8edEjuJbtStB2YPzyeSmG+idl8JseyvEvPnlEUESKgCgaE4tOXolbcUUVUDJXnOPLhDZ6+DbS4lQh3GydCKazVqsaOrqKhV7pLXIIM+MfvAs+LWM9cEmNkPsDas+IKWix5zJjNH/MXaj00HlWT1FxASdWh0FhFgqNGVVUZ65jJMySbqf+6d73460ZVUAUhf2IGv4zgIgOEKxyg4GyxoDG9px6oI05WHILmOwSxxLeUqh7nnBSaFntp9iFU0cgI0BsLxw/4iTdKwIOWJQHUsqP/1w9KSzDKcowUFL08oASwDHS+sIz18TsLgWyB2smY/qO4Hi2LTiJ5nRvL0S5TIv1THKM80P2DJaFBhk3HOwbzwngxSm1YW3zGDweYoT8yD9gbVpq25dx/HnWhoDKKjXSChS66moAk7zdpgz0KoD1Fy2OwJrhI5pzXTKxx3EWtPS6wlzgX3w6HQHiaG2Hac4cCfLFI6dVbJJ3QCYMwFBUfN2nOVMhIMsdD3EVYoX5BW7tfNf9I59TGrJU77PYPG1YxzMymCWlh3ntHImGDP+8SrhOAYI9sL0oNg1dzVBN+/NO2XkTFiO+TbPFbHHmTg+zwCQl/MFNv28P+D2eQd5BaJrda2EYGMoNz7LQaqLWuZisBTYY4EBZ1nweZYFAsCsLKn3VrZoGIglE5UMELrTOTYzS+rYBWKlHKojdjKkQQvfq9mMU8zx6FCwLPAFPUx61uQE4kRjq6NTM8sOHdw5ylYnwwKZCFji+M1fANvoUF8GPl/m7kQyFfWrZ0zKuSURXZbOWEJPWpcAlscMBn+W79fxPhgsc9jr9GaOcyi8mdHJonEmmsqvLBBJZSTAGpaUau/DuTYHlT/Y2zdm27NSVB1guGW5DtSP6WFD/0sViAP9LmGOnrl0DIpaWToLc2hHlp/f0cwxQYu2GQDgSzhmQtMzTVZYSj1REkPb7WDwQ5ijbkmy0xK+Ft2Y37RkpySrSb14WiUIykpTS7lvnNC9j2HRQx/Wnr3O3J3ZsO1jfg/WS3X7wdK2CwSntVUGUKY7rkbK12fHEdWDdXInooN1dYeyP6dq64VbS2m5jDEZF+jDz3owwh7nUg7kpQqVsAGZ5Rn9j8uZ/XcXDzD6xQO70twTM4dVaH2W4mfhSg+FPeYZnsy+45fhAdW7yOHINaHhdeVWiG8ZOseqClbBRDYA1JgdWL+WrMJDvR/x+kvBINRKMWGWpTALN6QvRTxc43sme/h2XgopZlSjqlsSBtAFPjp0fNxtER/wAK0MsCwAjHNLtqQ+7Wmx/IwSY7X8BErV8RaatvDLXAAIZMcadkoyQy9miIGwB+vUpbGHlntfilhlwtGD7V886CLDKAgFME2xQOM+35YNFrPtmitZIqSM3AyNEvMIllFVkVsnYvuykxIOPB7jy8pUL8nowh4dhz2GkpjVANh+lvsSnUVr8n45tPQY9J+sU+B6EHFNx3pdWwkJbqHDGJElMYVjuL65v2iakuleBkDcagy0XPiMVAinaqHEugHEYgD2eBZHWxua5QwAGDjMEgqzrLEAyshGvABQ1xnjGdn2kchhWQ7H0GfOYjVEZci5Au0OA13W/dL2Uz9ixfEEMCYn83iZDkQP389ofF2sGnpM+bma5NYG4g3WY2hCMFgZ3u+4PaXcqyHzF4qUCMuax9DjYe2J0+cYYCmj0Q/TlknrQLdqWRIoHYMFftbINSnNbttnD51hwpfCgFT+zy0pPqzH0FAJpp9lauXs6wmgT2adrnIJveTC+dyzlZR072OWdUET+i2bHs0yFdF5KxPzGc8wVPawpLTFzHlNTcumbR8107EkoLmQCeBrHxxmiZzxPXSyrkQ59rU++tTzzOmgzEHfEvGW5OTSEXUqZ+HovpyVWBWLDKdfAwNZF/ZwGaLmMS2nwhBkj5HDHqxixSNwmYTUEFOZUf1DwMLdiIMMVmni9X95rM2oKrBQFHVFFJ0CWPril3gs6M+ZgZrvhCEalgT4VsIedfHELvD/J0tC/Mosc4dZeuJ/4YYt13A4VMRmVSS/AlCuqmSVNLBMRBR17XhbVWviou46Hsp9duYx71RPq1/i/h0ByMrDOi2ZeDLLvaz0QCaqBwfi1DO2dTssqezGYTW3UbFe2OtzGsdW8n4wH1g4OBoUq6q4sFahvJRJKUOx5gGRTRnYpSikDSiDXy05eVTZY2zJyfUBQEHP8VwUyEmKzyk6UATQkXefofTG/fth2zsNXL9ZpWAhKjuiK5RlFbmHSi5lRVeRfMXKliwHMvc8/2d890iek+cqr8RCXNr2mdNNMODXCvrds+TklDRf1yXGrWGvawM/WQXJXGlgmThUdyhYWCqMTHVv+XkzZbTvBXw8DYwDdbMu6H9kyTbPIfr/J+7J0MhzQarvi/8lr/GI4O8ZzEQROfYotQsrlsBWGlio5bds94wuX8VKlqC4xb2L1PC/wUNXCag1+vRZdJs+xNSTMx73+J/GXwY54/DZEi/xssCii8eIh6FnBQov0G9Xqc06uqcUpdIyRBHpNm+TFwu/fDL/Sawc+GsBYpEDoT5b+rFzZbUI4oXBxO8ZIlF9HV9zmILxmLo8+0XG+7sAym2GvhHIImqLz4jtoUrrtQhYTPSXrBVBU+0+ZUJohnL/bZ7yx9X9Z4HvP7RNAJKvOyiGKxGx9ZSJbTo+j6zTUq7Rh6xkqGtxnF575qvSpPtazoqjfU8fRN9jopkoqLMcU5aDW3Tyh1j1N55VVAVgiugUerhFG2wapoztLfrPIOkqxeq5SDG/tV1Ysq/ZPZlsUaX4+Yn+nAAX83JvLMkUm+9pErJaAtvjDk6jBih6WpXy5mGFWgp4KC6WApq7HB3Ml0xWx7gSVFljei5m9CfbDsWswYiLtwZL3RJXeRmKJs86VFHDA62mOSubIsxktZbNsnTSUQFPy8b7l6NLrdCnovm0XYiRseUX1mlaEiS89jD7DztSwDevlIWeBFYW1Q9FXFGbn1pSPDhLR6CVEFSgx3Bz/CdL3PtBxri44/jR4+/wLb6PeNZ7MNI6h9mpdF95gDKwI2YGBBWcOL4rw9wBRKsM6ve1j+I0K2vr7aVjsTx7dAGXHU0YYpkh1s4tKbt+n/OcAQBFXefKo7M9H0NPKeJnqbpNsCLOIH8/QIcZQgEukrBzC4r+BPY7tGAzrReCNk2nqovexAMaHlMmn5n4VE6LiCqy1ARGg0/0jI8NlLdkFrYPzop5xkT0AZx1wUnm8backOWBoLkGAPLAV4fS/sUz4T15tkGKAswiSsyF0eKME/ze9jDKXgUE/+lgoaavZSH0JPMPGLio4CTXLNkxudgBcL57Ff2c5ipT12Hp1qFlb1lhQjez9Roioj7aa4fkzzq+b9FOASwc5BvbPvL3ESuXR8Ht4nBigtISk8eCwLOSVyQPGmdwdA1wFI0ZEZgXuPi5C4+y/6ZAOSWwkJLp4GK0+BkDdG7JYU/RHkBk8jarGtBXxGuZY/HxTEZeTPyuW3Iu4sR232zPlMw83XEXn9RvARY1LTV4OYMeQoVydoC5WLNkd2FDrkDM55Xzfj28aiEXt5PsM4AUVd2c901thwrYvxtYSMs3lhSgYR4rvZTtkn0/CgoFx1rAsyxxMTBgGeT4fB6s2kOnfgmwqFnfEJ/Go0zc+AT7y+NsvnmAHIIV80BycmxyCn6WIi0SYHAj1xDg+WLbB2Od41kGdqQCgims8V2+n15mlgkp0uaWURDgnVmygcyKSQ0xMRtYeYzjsMoj41j8/7jC1Uk/Sih6C4sEMF/3zIpXBj8Ja+efDBafLsOSHNzbRP9EIJYTj4o5syQIuospWxQsugvyEIbmnqDhyU/APwgsChoW1mvCUupZ4gFtil+FWymmtr3LktbMogD7cLvFyrYrKjGDsLbnc3AHwb7lSt7BsodvZiFKI5OtfY07CWZi3UQO41w6k08Tu1ZCXwmO6QEm9ztYSmxuRJjOtsijZEaWVNdc2GvnXGBJCIFH1zUwyS0rtnmMPqHJKVo3vztYTJTcmqOz+ML8ZTdWTuCpHctfaWB/RbD4wLO2JJ2hzDMKmKc8t+RcyV92QH8HsLjKMTeu86LJTZHjRpzVi0tRRdH1Ww3e/wswAKUTk3Afdk5AAAAAAElFTkSuQmCC"},UZu5:function(U,X,x){},UbZX:function(U,X,x){U.exports=x.p+"static/success.2e2721eb.svg"},UlFV:function(U,X,x){},VPUa:function(U,X,x){U.exports=x.p+"static/passall.2673ac21.png"},VSMT:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.decodeUTF8=I,X.encodeUTF8=_;function I(O){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;try{return decodeURIComponent(escape(O))}catch(v){if(v instanceof URIError&&y)return O;throw v}}function _(O){return unescape(encodeURIComponent(O))}},Vbye:function(U,X,x){U.exports={"diff-panel-container":"diff-panel-container___APxdS",enter:"enter___2JYCH","line-break":"line-break___1Ly2e",empty:"empty___2h7RZ","diff-panel-container-2":"diff-panel-container-2___GRUnn"}},VjRW:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjk3RTBEMDM2MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjk3RTBEMDM3MDE3ODExRUI4QzEzQUNFNDcxODM2QjJDIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTdFMEQwMzQwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6OTdFMEQwMzUwMTc4MTFFQjhDMTNBQ0U0NzE4MzZCMkMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6ejzPSAAACsUlEQVR42ryYz08TQRTHp9vQQkFPlAAHDXjxR2LwoEbhpCXon1DPpf0PbP8UwOhV/QOM8QIXIIRwASNtYo0RIye9FIF4Yf2O+U7ysmnrzM5uX/JJu7sz730zOzvz3mTCMFSONgOWwAK4Aa6CS3x2Ar6BJtgEH8BXJ+9akAVZUAZb4CK0twv2KdPHf2PZiCmBpghyAt6CGrgPJkCeTPCefvaGbY016Su2oGGwKhx+AVUwZjmqim0r7Gtslb6dBBXBLh2cg+cg5yAkSo4+zulzlzGsBOmGLTEqcx5CosyJ0Wp1ExXtUAA77PARTCYoxjBJ3yFjFfoJesGGnzlBVUoUGSNkzK6CSmLO3ElRjHx9Zk6VooICcMiHjQGIMTTEkpCVgsp80AZDls5WPL88xVhtxi5LQZu8uezgLOQqPOUpqip8/RM0wyVer6qjjoK0/QAPPASNMrbWMBtgO3sCMuAdOFXuNg02wLKKZ6eMrTUsaUHzfLCu4lserIEVkIvR38Se14Ju8WJf+VuNozXl2O+Avzf1O/zJuTDu+O77meu8Gme/X4FIrjoqOXOdVyb2WKDStYxrh4Bpp7bLCQo5Bo840W3MxP6tBX3nxbWExGyDu/y1NRP7SAs65MXtBMSscWSOHfuZ2J8CVgfaHnsI+cNPvsb/rmZib+lPbpbLdsdj63jouXV0zNaRxOY67bm5VqKbq0/6kU8r/ciK2qs+wASt3itBkynsWcKVRr8U9owxF3sl+a9Ekl8cUJL/0rYMOkixDNq3LYMGUSi2XQpFg67J9kRZ1EiglK6LsmevV93Xz8lIl8OGiuPiWWCftu9hg2RRvEJzHPOa1cI9DvsQKfJelW3kcUxLfk0+guSB1bbjgVXIPs9sD6wyMY/0nvJI7zq4IvIZnfkdgRY37feuR3p/BRgAhrFnXQBvMBoAAAAASUVORK5CYII="},"VrN/":function(U,X,x){(function(I,_){U.exports=_()})(this,function(){"use strict";var I=navigator.userAgent,_=navigator.platform,O=/gecko\/\d/i.test(I),y=/MSIE \d/.test(I),v=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I),o=/Edge\/(\d+)/.exec(I),g=y||v||o,p=g&&(y?document.documentMode||6:+(o||v)[1]),d=!o&&/WebKit\//.test(I),a=d&&/Qt\/\d+\.\d+/.test(I),n=!o&&/Chrome\//.test(I),s=/Opera\//.test(I),t=/Apple Computer/.test(navigator.vendor),i=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(I),e=/PhantomJS/.test(I),r=!o&&/AppleWebKit/.test(I)&&/Mobile\/\w+/.test(I),c=/Android/.test(I),u=r||c||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(I),f=r||/Mac/.test(_),m=/\bCrOS\b/.test(I),l=/win/i.test(_),E=s&&I.match(/Version\/(\d*\.\d*)/);E&&(E=Number(E[1])),E&&E>=15&&(s=!1,d=!0);var b=f&&(a||s&&(E==null||E<12.11)),D=O||g&&p>=9;function C(h){return new RegExp("(^|\\s)"+h+"(?:$|\\s)\\s*")}var w=function(h,T){var H=h.className,j=C(T).exec(H);if(j){var z=H.slice(j.index+j[0].length);h.className=H.slice(0,j.index)+(z?j[1]+z:"")}};function S(h){for(var T=h.childNodes.length;T>0;--T)h.removeChild(h.firstChild);return h}function A(h,T){return S(h).appendChild(T)}function R(h,T,H,j){var z=document.createElement(h);if(H&&(z.className=H),j&&(z.style.cssText=j),typeof T=="string")z.appendChild(document.createTextNode(T));else if(T)for(var $=0;$<T.length;++$)z.appendChild(T[$]);return z}function k(h,T,H,j){var z=R(h,T,H,j);return z.setAttribute("role","presentation"),z}var L;document.createRange?L=function(h,T,H,j){var z=document.createRange();return z.setEnd(j||h,H),z.setStart(h,T),z}:L=function(h,T,H){var j=document.body.createTextRange();try{j.moveToElementText(h.parentNode)}catch(z){return j}return j.collapse(!0),j.moveEnd("character",H),j.moveStart("character",T),j};function M(h,T){if(T.nodeType==3&&(T=T.parentNode),h.contains)return h.contains(T);do if(T.nodeType==11&&(T=T.host),T==h)return!0;while(T=T.parentNode)}function G(){var h;try{h=document.activeElement}catch(T){h=document.body||null}for(;h&&h.shadowRoot&&h.shadowRoot.activeElement;)h=h.shadowRoot.activeElement;return h}function W(h,T){var H=h.className;C(T).test(H)||(h.className+=(H?" ":"")+T)}function N(h,T){for(var H=h.split(" "),j=0;j<H.length;j++)H[j]&&!C(H[j]).test(T)&&(T+=" "+H[j]);return T}var K=function(h){h.select()};r?K=function(h){h.selectionStart=0,h.selectionEnd=h.value.length}:g&&(K=function(h){try{h.select()}catch(T){}});function F(h){var T=Array.prototype.slice.call(arguments,1);return function(){return h.apply(null,T)}}function P(h,T,H){T||(T={});for(var j in h)h.hasOwnProperty(j)&&(H!==!1||!T.hasOwnProperty(j))&&(T[j]=h[j]);return T}function B(h,T,H,j,z){T==null&&(T=h.search(/[^\s\u00a0]/),T==-1&&(T=h.length));for(var $=j||0,ye=z||0;;){var Ae=h.indexOf(" ",$);if(Ae<0||Ae>=T)return ye+(T-$);ye+=Ae-$,ye+=H-ye%H,$=Ae+1}}var J=function(){this.id=null,this.f=null,this.time=0,this.handler=F(this.onTimeout,this)};J.prototype.onTimeout=function(h){h.id=0,h.time<=+new Date?h.f():setTimeout(h.handler,h.time-+new Date)},J.prototype.set=function(h,T){this.f=T;var H=+new Date+h;(!this.id||H<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,h),this.time=H)};function re(h,T){for(var H=0;H<h.length;++H)if(h[H]==T)return H;return-1}var he=50,we={toString:function(){return"CodeMirror.Pass"}},ke={scroll:!1},ne={origin:"*mouse"},Oe={origin:"+move"};function Ce(h,T,H){for(var j=0,z=0;;){var $=h.indexOf(" ",j);$==-1&&($=h.length);var ye=$-j;if($==h.length||z+ye>=T)return j+Math.min(ye,T-z);if(z+=$-j,z+=H-z%H,j=$+1,z>=T)return j}}var fe=[""];function oe(h){for(;fe.length<=h;)fe.push(se(fe)+" ");return fe[h]}function se(h){return h[h.length-1]}function be(h,T){for(var H=[],j=0;j<h.length;j++)H[j]=T(h[j],j);return H}function ie(h,T,H){for(var j=0,z=H(T);j<h.length&&H(h[j])<=z;)j++;h.splice(j,0,T)}function de(){}function Fe(h,T){var H;return Object.create?H=Object.create(h):(de.prototype=h,H=new de),T&&P(T,H),H}var ae=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Z(h){return/\w/.test(h)||h>"\x80"&&(h.toUpperCase()!=h.toLowerCase()||ae.test(h))}function Y(h,T){return T?T.source.indexOf("\\w")>-1&&Z(h)?!0:T.test(h):Z(h)}function q(h){for(var T in h)if(h.hasOwnProperty(T)&&h[T])return!1;return!0}var ve=/[\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 pe(h){return h.charCodeAt(0)>=768&&ve.test(h)}function Te(h,T,H){for(;(H<0?T>0:T<h.length)&&pe(h.charAt(T));)T+=H;return T}function Ne(h,T,H){for(var j=T>H?-1:1;;){if(T==H)return T;var z=(T+H)/2,$=j<0?Math.ceil(z):Math.floor(z);if($==T)return h($)?T:H;h($)?H=$:T=$+j}}function me(h,T,H,j){if(!h)return j(T,H,"ltr",0);for(var z=!1,$=0;$<h.length;++$){var ye=h[$];(ye.from<H&&ye.to>T||T==H&&ye.to==T)&&(j(Math.max(ye.from,T),Math.min(ye.to,H),ye.level==1?"rtl":"ltr",$),z=!0)}z||j(T,H,"ltr")}var Ie=null;function _e(h,T,H){var j;Ie=null;for(var z=0;z<h.length;++z){var $=h[z];if($.from<T&&$.to>T)return z;$.to==T&&($.from!=$.to&&H=="before"?j=z:Ie=z),$.from==T&&($.from!=$.to&&H!="before"?j=z:Ie=z)}return j!=null?j:Ie}var Ve=function(){var h="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",T="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function H(He){return He<=247?h.charAt(He):1424<=He&&He<=1524?"R":1536<=He&&He<=1785?T.charAt(He-1536):1774<=He&&He<=2220?"r":8192<=He&&He<=8203?"w":He==8204?"b":"L"}var j=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,z=/[stwN]/,$=/[LRr]/,ye=/[Lb1n]/,Ae=/[1n]/;function De(He,ht,Et){this.level=He,this.from=ht,this.to=Et}return function(He,ht){var Et=ht=="ltr"?"L":"R";if(He.length==0||ht=="ltr"&&!j.test(He))return!1;for(var Kt=He.length,Ft=[],en=0;en<Kt;++en)Ft.push(H(He.charCodeAt(en)));for(var on=0,En=Et;on<Kt;++on){var Ln=Ft[on];Ln=="m"?Ft[on]=En:En=Ln}for(var Vn=0,Mn=Et;Vn<Kt;++Vn){var Zn=Ft[Vn];Zn=="1"&&Mn=="r"?Ft[Vn]="n":$.test(Zn)&&(Mn=Zn,Zn=="r"&&(Ft[Vn]="R"))}for(var Cr=1,pr=Ft[0];Cr<Kt-1;++Cr){var ii=Ft[Cr];ii=="+"&&pr=="1"&&Ft[Cr+1]=="1"?Ft[Cr]="1":ii==","&&pr==Ft[Cr+1]&&(pr=="1"||pr=="n")&&(Ft[Cr]=pr),pr=ii}for(var ra=0;ra<Kt;++ra){var ao=Ft[ra];if(ao==",")Ft[ra]="N";else if(ao=="%"){var ba=void 0;for(ba=ra+1;ba<Kt&&Ft[ba]=="%";++ba);for(var jo=ra&&Ft[ra-1]=="!"||ba<Kt&&Ft[ba]=="1"?"1":"N",ko=ra;ko<ba;++ko)Ft[ko]=jo;ra=ba-1}}for(var ja=0,Lo=Et;ja<Kt;++ja){var fo=Ft[ja];Lo=="L"&&fo=="1"?Ft[ja]="L":$.test(fo)&&(Lo=fo)}for(var Za=0;Za<Kt;++Za)if(z.test(Ft[Za])){var Ba=void 0;for(Ba=Za+1;Ba<Kt&&z.test(Ft[Ba]);++Ba);for(var Sa=(Za?Ft[Za-1]:Et)=="L",Mo=(Ba<Kt?Ft[Ba]:Et)=="L",Ml=Sa==Mo?Sa?"L":"R":Et,$s=Za;$s<Ba;++$s)Ft[$s]=Ml;Za=Ba-1}for(var Eo=[],Ss,oo=0;oo<Kt;)if(ye.test(Ft[oo])){var $l=oo;for(++oo;oo<Kt&&ye.test(Ft[oo]);++oo);Eo.push(new De(0,$l,oo))}else{var Ds=oo,_l=Eo.length,yl=ht=="rtl"?1:0;for(++oo;oo<Kt&&Ft[oo]!="L";++oo);for(var wo=Ds;wo<oo;)if(Ae.test(Ft[wo])){Ds<wo&&(Eo.splice(_l,0,new De(1,Ds,wo)),_l+=yl);var Pl=wo;for(++wo;wo<oo&&Ae.test(Ft[wo]);++wo);Eo.splice(_l,0,new De(2,Pl,wo)),_l+=yl,Ds=wo}else++wo;Ds<oo&&Eo.splice(_l,0,new De(1,Ds,oo))}return ht=="ltr"&&(Eo[0].level==1&&(Ss=He.match(/^\s+/))&&(Eo[0].from=Ss[0].length,Eo.unshift(new De(0,0,Ss[0].length))),se(Eo).level==1&&(Ss=He.match(/\s+$/))&&(se(Eo).to-=Ss[0].length,Eo.push(new De(0,Kt-Ss[0].length,Kt)))),ht=="rtl"?Eo.reverse():Eo}}();function tt(h,T){var H=h.order;return H==null&&(H=h.order=Ve(h.text,T)),H}var Ge=[],Le=function(h,T,H){if(h.addEventListener)h.addEventListener(T,H,!1);else if(h.attachEvent)h.attachEvent("on"+T,H);else{var j=h._handlers||(h._handlers={});j[T]=(j[T]||Ge).concat(H)}};function bt(h,T){return h._handlers&&h._handlers[T]||Ge}function Re(h,T,H){if(h.removeEventListener)h.removeEventListener(T,H,!1);else if(h.detachEvent)h.detachEvent("on"+T,H);else{var j=h._handlers,z=j&&j[T];if(z){var $=re(z,H);$>-1&&(j[T]=z.slice(0,$).concat(z.slice($+1)))}}}function Xe(h,T){var H=bt(h,T);if(!H.length)return;for(var j=Array.prototype.slice.call(arguments,2),z=0;z<H.length;++z)H[z].apply(null,j)}function et(h,T,H){return typeof T=="string"&&(T={type:T,preventDefault:function(){this.defaultPrevented=!0}}),Xe(h,H||T.type,h,T),ce(T)||T.codemirrorIgnore}function Ye(h){var T=h._handlers&&h._handlers.cursorActivity;if(!T)return;for(var H=h.curOp.cursorActivityHandlers||(h.curOp.cursorActivityHandlers=[]),j=0;j<T.length;++j)re(H,T[j])==-1&&H.push(T[j])}function Me(h,T){return bt(h,T).length>0}function Ke(h){h.prototype.on=function(T,H){Le(this,T,H)},h.prototype.off=function(T,H){Re(this,T,H)}}function ge(h){h.preventDefault?h.preventDefault():h.returnValue=!1}function Ee(h){h.stopPropagation?h.stopPropagation():h.cancelBubble=!0}function ce(h){return h.defaultPrevented!=null?h.defaultPrevented:h.returnValue==!1}function je(h){ge(h),Ee(h)}function Qe(h){return h.target||h.srcElement}function te(h){var T=h.which;return T==null&&(h.button&1?T=1:h.button&2?T=3:h.button&4&&(T=2)),f&&h.ctrlKey&&T==1&&(T=3),T}var Je=function(){if(g&&p<9)return!1;var h=R("div");return"draggable"in h||"dragDrop"in h}(),ut;function Be(h){if(ut==null){var T=R("span","\u200B");A(h,R("span",[T,document.createTextNode("x")])),h.firstChild.offsetHeight!=0&&(ut=T.offsetWidth<=1&&T.offsetHeight>2&&!(g&&p<8))}var H=ut?R("span","\u200B"):R("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return H.setAttribute("cm-text",""),H}var qe;function at(h){if(qe!=null)return qe;var T=A(h,document.createTextNode("A\u062EA")),H=L(T,0,1).getBoundingClientRect(),j=L(T,1,2).getBoundingClientRect();return S(h),!H||H.left==H.right?!1:qe=j.right-H.right<3}var wt=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(h){for(var T=0,H=[],j=h.length;T<=j;){var z=h.indexOf(`
|
|
|
`,T);z==-1&&(z=h.length);var $=h.slice(T,h.charAt(z-1)=="\r"?z-1:z),ye=$.indexOf("\r");ye!=-1?(H.push($.slice(0,ye)),T+=ye+1):(H.push($),T=z+1)}return H}:function(h){return h.split(/\r\n?|\n/)},ft=window.getSelection?function(h){try{return h.selectionStart!=h.selectionEnd}catch(T){return!1}}:function(h){var T;try{T=h.ownerDocument.selection.createRange()}catch(H){}return!T||T.parentElement()!=h?!1:T.compareEndPoints("StartToEnd",T)!=0},st=function(){var h=R("div");return"oncopy"in h?!0:(h.setAttribute("oncopy","return;"),typeof h.oncopy=="function")}(),Pe=null;function ze(h){if(Pe!=null)return Pe;var T=A(h,R("span","x")),H=T.getBoundingClientRect(),j=L(T,0,1).getBoundingClientRect();return Pe=Math.abs(H.left-j.left)>1}var yt={},pt={};function Bt(h,T){arguments.length>2&&(T.dependencies=Array.prototype.slice.call(arguments,2)),yt[h]=T}function Ht(h,T){pt[h]=T}function lt(h){if(typeof h=="string"&&pt.hasOwnProperty(h))h=pt[h];else if(h&&typeof h.name=="string"&&pt.hasOwnProperty(h.name)){var T=pt[h.name];typeof T=="string"&&(T={name:T}),h=Fe(T,h),h.name=T.name}else{if(typeof h=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(h))return lt("application/xml");if(typeof h=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(h))return lt("application/json")}return typeof h=="string"?{name:h}:h||{name:"null"}}function Lt(h,T){T=lt(T);var H=yt[T.name];if(!H)return Lt(h,"text/plain");var j=H(h,T);if(Dt.hasOwnProperty(T.name)){var z=Dt[T.name];for(var $ in z){if(!z.hasOwnProperty($))continue;j.hasOwnProperty($)&&(j["_"+$]=j[$]),j[$]=z[$]}}if(j.name=T.name,T.helperType&&(j.helperType=T.helperType),T.modeProps)for(var ye in T.modeProps)j[ye]=T.modeProps[ye];return j}var Dt={};function Mt(h,T){var H=Dt.hasOwnProperty(h)?Dt[h]:Dt[h]={};P(T,H)}function Wt(h,T){if(T===!0)return T;if(h.copyState)return h.copyState(T);var H={};for(var j in T){var z=T[j];z instanceof Array&&(z=z.concat([])),H[j]=z}return H}function Yt(h,T){for(var H;h.innerMode&&!(H=h.innerMode(T),!H||H.mode==h);)T=H.state,h=H.mode;return H||{mode:h,state:T}}function mn(h,T,H){return h.startState?h.startState(T,H):!0}var Qt=function(h,T,H){this.pos=this.start=0,this.string=h,this.tabSize=T||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=H};Qt.prototype.eol=function(){return this.pos>=this.string.length},Qt.prototype.sol=function(){return this.pos==this.lineStart},Qt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Qt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Qt.prototype.eat=function(h){var T=this.string.charAt(this.pos),H;if(typeof h=="string"?H=T==h:H=T&&(h.test?h.test(T):h(T)),H)return++this.pos,T},Qt.prototype.eatWhile=function(h){for(var T=this.pos;this.eat(h););return this.pos>T},Qt.prototype.eatSpace=function(){for(var h=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>h},Qt.prototype.skipToEnd=function(){this.pos=this.string.length},Qt.prototype.skipTo=function(h){var T=this.string.indexOf(h,this.pos);if(T>-1)return this.pos=T,!0},Qt.prototype.backUp=function(h){this.pos-=h},Qt.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)},Qt.prototype.indentation=function(){return B(this.string,null,this.tabSize)-(this.lineStart?B(this.string,this.lineStart,this.tabSize):0)},Qt.prototype.match=function(h,T,H){if(typeof h=="string"){var j=function(ye){return H?ye.toLowerCase():ye},z=this.string.substr(this.pos,h.length);if(j(z)==j(h))return T!==!1&&(this.pos+=h.length),!0}else{var $=this.string.slice(this.pos).match(h);return $&&$.index>0?null:($&&T!==!1&&(this.pos+=$[0].length),$)}},Qt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Qt.prototype.hideFirstChars=function(h,T){this.lineStart+=h;try{return T()}finally{this.lineStart-=h}},Qt.prototype.lookAhead=function(h){var T=this.lineOracle;return T&&T.lookAhead(h)},Qt.prototype.baseToken=function(){var h=this.lineOracle;return h&&h.baseToken(this.pos)};function $t(h,T){if(T-=h.first,T<0||T>=h.size)throw new Error("There is no line "+(T+h.first)+" in the document.");for(var H=h;!H.lines;)for(var j=0;;++j){var z=H.children[j],$=z.chunkSize();if(T<$){H=z;break}T-=$}return H.lines[T]}function Kn(h,T,H){var j=[],z=T.line;return h.iter(T.line,H.line+1,function($){var ye=$.text;z==H.line&&(ye=ye.slice(0,H.ch)),z==T.line&&(ye=ye.slice(T.ch)),j.push(ye),++z}),j}function hn(h,T,H){var j=[];return h.iter(T,H,function(z){j.push(z.text)}),j}function Rn(h,T){var H=T-h.height;if(H)for(var j=h;j;j=j.parent)j.height+=H}function wn(h){if(h.parent==null)return null;for(var T=h.parent,H=re(T.lines,h),j=T.parent;j;T=j,j=j.parent)for(var z=0;!(j.children[z]==T);++z)H+=j.children[z].chunkSize();return H+T.first}function Pn(h,T){var H=h.first;e:do{for(var j=0;j<h.children.length;++j){var z=h.children[j],$=z.height;if(T<$){h=z;continue e}T-=$,H+=z.chunkSize()}return H}while(!h.lines);for(var ye=0;ye<h.lines.length;++ye){var Ae=h.lines[ye],De=Ae.height;if(T<De)break;T-=De}return H+ye}function Yn(h,T){return T>=h.first&&T<h.first+h.size}function or(h,T){return String(h.lineNumberFormatter(T+h.firstLineNumber))}function Xt(h,T,H){if(H===void 0&&(H=null),!(this instanceof Xt))return new Xt(h,T,H);this.line=h,this.ch=T,this.sticky=H}function xn(h,T){return h.line-T.line||h.ch-T.ch}function Er(h,T){return h.sticky==T.sticky&&xn(h,T)==0}function nr(h){return Xt(h.line,h.ch)}function Ir(h,T){return xn(h,T)<0?T:h}function qn(h,T){return xn(h,T)<0?h:T}function ue(h,T){return Math.max(h.first,Math.min(T,h.first+h.size-1))}function V(h,T){if(T.line<h.first)return Xt(h.first,0);var H=h.first+h.size-1;return T.line>H?Xt(H,$t(h,H).text.length):Q(T,$t(h,T.line).text.length)}function Q(h,T){var H=h.ch;return H==null||H>T?Xt(h.line,T):H<0?Xt(h.line,0):h}function ee(h,T){for(var H=[],j=0;j<T.length;j++)H[j]=V(h,T[j]);return H}var Se=function(h,T){this.state=h,this.lookAhead=T},le=function(h,T,H,j){this.state=T,this.doc=h,this.line=H,this.maxLookAhead=j||0,this.baseTokens=null,this.baseTokenPos=1};le.prototype.lookAhead=function(h){var T=this.doc.getLine(this.line+h);return T!=null&&h>this.maxLookAhead&&(this.maxLookAhead=h),T},le.prototype.baseToken=function(h){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=h;)this.baseTokenPos+=2;var T=this.baseTokens[this.baseTokenPos+1];return{type:T&&T.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-h}},le.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},le.fromSaved=function(h,T,H){return T instanceof Se?new le(h,Wt(h.mode,T.state),H,T.lookAhead):new le(h,Wt(h.mode,T),H)},le.prototype.save=function(h){var T=h!==!1?Wt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Se(T,this.maxLookAhead):T};function nt(h,T,H,j){var z=[h.state.modeGen],$={};gr(h,T.text,h.doc.mode,H,function(He,ht){return z.push(He,ht)},$,j);for(var ye=H.state,Ae=function(He){H.baseTokens=z;var ht=h.state.overlays[He],Et=1,Kt=0;H.state=!0,gr(h,T.text,ht.mode,H,function(Ft,en){for(var on=Et;Kt<Ft;){var En=z[Et];En>Ft&&z.splice(Et,1,Ft,z[Et+1],En),Et+=2,Kt=Math.min(Ft,En)}if(!en)return;if(ht.opaque)z.splice(on,Et-on,Ft,"overlay "+en),Et=on+2;else for(;on<Et;on+=2){var Ln=z[on+1];z[on+1]=(Ln?Ln+" ":"")+"overlay "+en}},$),H.state=ye,H.baseTokens=null,H.baseTokenPos=1},De=0;De<h.state.overlays.length;++De)Ae(De);return{styles:z,classes:$.bgClass||$.textClass?$:null}}function Nt(h,T,H){if(!T.styles||T.styles[0]!=h.state.modeGen){var j=Jt(h,wn(T)),z=T.text.length>h.options.maxHighlightLength&&Wt(h.doc.mode,j.state),$=nt(h,T,j);z&&(j.state=z),T.stateAfter=j.save(!z),T.styles=$.styles,$.classes?T.styleClasses=$.classes:T.styleClasses&&(T.styleClasses=null),H===h.doc.highlightFrontier&&(h.doc.modeFrontier=Math.max(h.doc.modeFrontier,++h.doc.highlightFrontier))}return T.styles}function Jt(h,T,H){var j=h.doc,z=h.display;if(!j.mode.startState)return new le(j,!0,T);var $=rr(h,T,H),ye=$>j.first&&$t(j,$-1).stateAfter,Ae=ye?le.fromSaved(j,ye,$):new le(j,mn(j.mode),$);return j.iter($,T,function(De){an(h,De.text,Ae);var He=Ae.line;De.stateAfter=He==T-1||He%5==0||He>=z.viewFrom&&He<z.viewTo?Ae.save():null,Ae.nextLine()}),H&&(j.modeFrontier=Ae.line),Ae}function an(h,T,H,j){var z=h.doc.mode,$=new Qt(T,h.options.tabSize,H);for($.start=$.pos=j||0,T==""&&Gt(z,H.state);!$.eol();)Dn(z,$,H.state),$.start=$.pos}function Gt(h,T){if(h.blankLine)return h.blankLine(T);if(!h.innerMode)return;var H=Yt(h,T);if(H.mode.blankLine)return H.mode.blankLine(H.state)}function Dn(h,T,H,j){for(var z=0;z<10;z++){j&&(j[0]=Yt(h,H).mode);var $=h.token(T,H);if(T.pos>T.start)return $}throw new Error("Mode "+h.name+" failed to advance stream.")}var Xn=function(h,T,H){this.start=h.start,this.end=h.pos,this.string=h.current(),this.type=T||null,this.state=H};function sr(h,T,H,j){var z=h.doc,$=z.mode,ye;T=V(z,T);var Ae=$t(z,T.line),De=Jt(h,T.line,H),He=new Qt(Ae.text,h.options.tabSize,De),ht;for(j&&(ht=[]);(j||He.pos<T.ch)&&!He.eol();)He.start=He.pos,ye=Dn($,He,De.state),j&&ht.push(new Xn(He,ye,Wt(z.mode,De.state)));return j?ht:new Xn(He,ye,De.state)}function Tr(h,T){if(h)for(;;){var H=h.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!H)break;h=h.slice(0,H.index)+h.slice(H.index+H[0].length);var j=H[1]?"bgClass":"textClass";T[j]==null?T[j]=H[2]:new RegExp("(?:^|\\s)"+H[2]+"(?:$|\\s)").test(T[j])||(T[j]+=" "+H[2])}return h}function gr(h,T,H,j,z,$,ye){var Ae=H.flattenSpans;Ae==null&&(Ae=h.options.flattenSpans);var De=0,He=null,ht=new Qt(T,h.options.tabSize,j),Et,Kt=h.options.addModeClass&&[null];for(T==""&&Tr(Gt(H,j.state),$);!ht.eol();){if(ht.pos>h.options.maxHighlightLength?(Ae=!1,ye&&an(h,T,j,ht.pos),ht.pos=T.length,Et=null):Et=Tr(Dn(H,ht,j.state,Kt),$),Kt){var Ft=Kt[0].name;Ft&&(Et="m-"+(Et?Ft+" "+Et:Ft))}if(!Ae||He!=Et){for(;De<ht.start;)De=Math.min(ht.start,De+5e3),z(De,He);He=Et}ht.start=ht.pos}for(;De<ht.pos;){var en=Math.min(ht.pos,De+5e3);z(en,He),De=en}}function rr(h,T,H){for(var j,z,$=h.doc,ye=H?-1:T-(h.doc.mode.innerMode?1e3:100),Ae=T;Ae>ye;--Ae){if(Ae<=$.first)return $.first;var De=$t($,Ae-1),He=De.stateAfter;if(He&&(!H||Ae+(He instanceof Se?He.lookAhead:0)<=$.modeFrontier))return Ae;var ht=B(De.text,null,h.options.tabSize);(z==null||j>ht)&&(z=Ae-1,j=ht)}return z}function xr(h,T){if(h.modeFrontier=Math.min(h.modeFrontier,T),h.highlightFrontier<T-10)return;for(var H=h.first,j=T-1;j>H;j--){var z=$t(h,j).stateAfter;if(z&&(!(z instanceof Se)||j+z.lookAhead<T)){H=j+1;break}}h.highlightFrontier=Math.min(h.highlightFrontier,H)}var qi=!1,Gr=!1;function ai(){qi=!0}function da(){Gr=!0}function Fi(h,T,H){this.marker=h,this.from=T,this.to=H}function ia(h,T){if(h)for(var H=0;H<h.length;++H){var j=h[H];if(j.marker==T)return j}}function Ca(h,T){for(var H,j=0;j<h.length;++j)h[j]!=T&&(H||(H=[])).push(h[j]);return H}function po(h,T){h.markedSpans=h.markedSpans?h.markedSpans.concat([T]):[T],T.marker.attachLine(h)}function so(h,T,H){var j;if(h)for(var z=0;z<h.length;++z){var $=h[z],ye=$.marker,Ae=$.from==null||(ye.inclusiveLeft?$.from<=T:$.from<T);if(Ae||$.from==T&&ye.type=="bookmark"&&(!H||!$.marker.insertLeft)){var De=$.to==null||(ye.inclusiveRight?$.to>=T:$.to>T);(j||(j=[])).push(new Fi(ye,$.from,De?null:$.to))}}return j}function xo(h,T,H){var j;if(h)for(var z=0;z<h.length;++z){var $=h[z],ye=$.marker,Ae=$.to==null||(ye.inclusiveRight?$.to>=T:$.to>T);if(Ae||$.from==T&&ye.type=="bookmark"&&(!H||$.marker.insertLeft)){var De=$.from==null||(ye.inclusiveLeft?$.from<=T:$.from<T);(j||(j=[])).push(new Fi(ye,De?null:$.from-T,$.to==null?null:$.to-T))}}return j}function ka(h,T){if(T.full)return null;var H=Yn(h,T.from.line)&&$t(h,T.from.line).markedSpans,j=Yn(h,T.to.line)&&$t(h,T.to.line).markedSpans;if(!H&&!j)return null;var z=T.from.ch,$=T.to.ch,ye=xn(T.from,T.to)==0,Ae=so(H,z,ye),De=xo(j,$,ye),He=T.text.length==1,ht=se(T.text).length+(He?z:0);if(Ae)for(var Et=0;Et<Ae.length;++Et){var Kt=Ae[Et];if(Kt.to==null){var Ft=ia(De,Kt.marker);Ft?He&&(Kt.to=Ft.to==null?null:Ft.to+ht):Kt.to=z}}if(De)for(var en=0;en<De.length;++en){var on=De[en];if(on.to!=null&&(on.to+=ht),on.from==null){var En=ia(Ae,on.marker);En||(on.from=ht,He&&(Ae||(Ae=[])).push(on))}else on.from+=ht,He&&(Ae||(Ae=[])).push(on)}Ae&&(Ae=Yi(Ae)),De&&De!=Ae&&(De=Yi(De));var Ln=[Ae];if(!He){var Vn=T.text.length-2,Mn;if(Vn>0&&Ae)for(var Zn=0;Zn<Ae.length;++Zn)Ae[Zn].to==null&&(Mn||(Mn=[])).push(new Fi(Ae[Zn].marker,null,null));for(var Cr=0;Cr<Vn;++Cr)Ln.push(Mn);Ln.push(De)}return Ln}function Yi(h){for(var T=0;T<h.length;++T){var H=h[T];H.from!=null&&H.from==H.to&&H.marker.clearWhenEmpty!==!1&&h.splice(T--,1)}return h.length?h:null}function Nr(h,T,H){var j=null;if(h.iter(T.line,H.line+1,function(Ft){if(Ft.markedSpans)for(var en=0;en<Ft.markedSpans.length;++en){var on=Ft.markedSpans[en].marker;on.readOnly&&(!j||re(j,on)==-1)&&(j||(j=[])).push(on)}}),!j)return null;for(var z=[{from:T,to:H}],$=0;$<j.length;++$)for(var ye=j[$],Ae=ye.find(0),De=0;De<z.length;++De){var He=z[De];if(xn(He.to,Ae.from)<0||xn(He.from,Ae.to)>0)continue;var ht=[De,1],Et=xn(He.from,Ae.from),Kt=xn(He.to,Ae.to);(Et<0||!ye.inclusiveLeft&&!Et)&&ht.push({from:He.from,to:Ae.from}),(Kt>0||!ye.inclusiveRight&&!Kt)&&ht.push({from:Ae.to,to:He.to}),z.splice.apply(z,ht),De+=ht.length-3}return z}function Qr(h){var T=h.markedSpans;if(!T)return;for(var H=0;H<T.length;++H)T[H].marker.detachLine(h);h.markedSpans=null}function yi(h,T){if(!T)return;for(var H=0;H<T.length;++H)T[H].marker.attachLine(h);h.markedSpans=T}function Fr(h){return h.inclusiveLeft?-1:0}function wr(h){return h.inclusiveRight?1:0}function ei(h,T){var H=h.lines.length-T.lines.length;if(H!=0)return H;var j=h.find(),z=T.find(),$=xn(j.from,z.from)||Fr(h)-Fr(T);if($)return-$;var ye=xn(j.to,z.to)||wr(h)-wr(T);return ye||T.id-h.id}function vr(h,T){var H=Gr&&h.markedSpans,j;if(H)for(var z=void 0,$=0;$<H.length;++$)z=H[$],z.marker.collapsed&&(T?z.from:z.to)==null&&(!j||ei(j,z.marker)<0)&&(j=z.marker);return j}function oi(h){return vr(h,!0)}function ir(h){return vr(h,!1)}function Wi(h,T){var H=Gr&&h.markedSpans,j;if(H)for(var z=0;z<H.length;++z){var $=H[z];$.marker.collapsed&&($.from==null||$.from<T)&&($.to==null||$.to>T)&&(!j||ei(j,$.marker)<0)&&(j=$.marker)}return j}function Mi(h,T,H,j,z){var $=$t(h,T),ye=Gr&&$.markedSpans;if(ye)for(var Ae=0;Ae<ye.length;++Ae){var De=ye[Ae];if(!De.marker.collapsed)continue;var He=De.marker.find(0),ht=xn(He.from,H)||Fr(De.marker)-Fr(z),Et=xn(He.to,j)||wr(De.marker)-wr(z);if(ht>=0&&Et<=0||ht<=0&&Et>=0)continue;if(ht<=0&&(De.marker.inclusiveRight&&z.inclusiveLeft?xn(He.to,H)>=0:xn(He.to,H)>0)||ht>=0&&(De.marker.inclusiveRight&&z.inclusiveLeft?xn(He.from,j)<=0:xn(He.from,j)<0))return!0}}function $i(h){for(var T;T=oi(h);)h=T.find(-1,!0).line;return h}function mo(h){for(var T;T=ir(h);)h=T.find(1,!0).line;return h}function Qi(h){for(var T,H;T=ir(h);)h=T.find(1,!0).line,(H||(H=[])).push(h);return H}function Ha(h,T){var H=$t(h,T),j=$i(H);return H==j?T:wn(j)}function La(h,T){if(T>h.lastLine())return T;var H=$t(h,T),j;if(!ti(h,H))return T;for(;j=ir(H);)H=j.find(1,!0).line;return wn(H)+1}function ti(h,T){var H=Gr&&T.markedSpans;if(H)for(var j=void 0,z=0;z<H.length;++z){if(j=H[z],!j.marker.collapsed)continue;if(j.from==null)return!0;if(j.marker.widgetNode)continue;if(j.from==0&&j.marker.inclusiveLeft&&Bo(h,T,j))return!0}}function Bo(h,T,H){if(H.to==null){var j=H.marker.find(1,!0);return Bo(h,j.line,ia(j.line.markedSpans,H.marker))}if(H.marker.inclusiveRight&&H.to==T.text.length)return!0;for(var z=void 0,$=0;$<T.markedSpans.length;++$)if(z=T.markedSpans[$],z.marker.collapsed&&!z.marker.widgetNode&&z.from==H.to&&(z.to==null||z.to!=H.from)&&(z.marker.inclusiveLeft||H.marker.inclusiveRight)&&Bo(h,T,z))return!0}function Ka(h){h=$i(h);for(var T=0,H=h.parent,j=0;j<H.lines.length;++j){var z=H.lines[j];if(z==h)break;T+=z.height}for(var $=H.parent;$;H=$,$=H.parent)for(var ye=0;ye<$.children.length;++ye){var Ae=$.children[ye];if(Ae==H)break;T+=Ae.height}return T}function go(h){if(h.height==0)return 0;for(var T=h.text.length,H,j=h;H=oi(j);){var z=H.find(0,!0);j=z.from.line,T+=z.from.ch-z.to.ch}for(j=h;H=ir(j);){var $=H.find(0,!0);T-=j.text.length-$.from.ch,j=$.to.line,T+=j.text.length-$.to.ch}return T}function So(h){var T=h.display,H=h.doc;T.maxLine=$t(H,H.first),T.maxLineLength=go(T.maxLine),T.maxLineChanged=!0,H.iter(function(j){var z=go(j);z>T.maxLineLength&&(T.maxLineLength=z,T.maxLine=j)})}var Wa=function(h,T,H){this.text=h,yi(this,T),this.height=H?H(this):1};Wa.prototype.lineNo=function(){return wn(this)},Ke(Wa);function Ho(h,T,H,j){h.text=T,h.stateAfter&&(h.stateAfter=null),h.styles&&(h.styles=null),h.order!=null&&(h.order=null),Qr(h),yi(h,H);var z=j?j(h):1;z!=h.height&&Rn(h,z)}function Qn(h){h.parent=null,Qr(h)}var mr={},Jn={};function Lr(h,T){if(!h||/^\s*$/.test(h))return null;var H=T.addModeClass?Jn:mr;return H[h]||(H[h]=h.replace(/\S+/g,"cm-$&"))}function Kr(h,T){var H=k("span",null,null,d?"padding-right: .1px":null),j={pre:k("pre",[H],"CodeMirror-line"),content:H,col:0,pos:0,cm:h,trailingSpace:!1,splitSpaces:h.getOption("lineWrapping")};T.measure={};for(var z=0;z<=(T.rest?T.rest.length:0);z++){var $=z?T.rest[z-1]:T.line,ye=void 0;j.pos=0,j.addToken=cr,at(h.display.measure)&&(ye=tt($,h.doc.direction))&&(j.addToken=ga(j.addToken,ye)),j.map=[];var Ae=T!=h.display.externalMeasured&&wn($);qa($,j,Nt(h,$,Ae)),$.styleClasses&&($.styleClasses.bgClass&&(j.bgClass=N($.styleClasses.bgClass,j.bgClass||"")),$.styleClasses.textClass&&(j.textClass=N($.styleClasses.textClass,j.textClass||""))),j.map.length==0&&j.map.push(0,0,j.content.appendChild(Be(h.display.measure))),z==0?(T.measure.map=j.map,T.measure.cache={}):((T.measure.maps||(T.measure.maps=[])).push(j.map),(T.measure.caches||(T.measure.caches=[])).push({}))}if(d){var De=j.content.lastChild;(/\bcm-tab\b/.test(De.className)||De.querySelector&&De.querySelector(".cm-tab"))&&(j.content.className="cm-tab-wrap-hack")}return Xe(h,"renderLine",h,T.line,j.pre),j.pre.className&&(j.textClass=N(j.pre.className,j.textClass||"")),j}function gi(h){var T=R("span","\u2022","cm-invalidchar");return T.title="\\u"+h.charCodeAt(0).toString(16),T.setAttribute("aria-label",T.title),T}function cr(h,T,H,j,z,$,ye){if(!T)return;var Ae=h.splitSpaces?Xi(T,h.trailingSpace):T,De=h.cm.state.specialChars,He=!1,ht;if(!De.test(T))h.col+=T.length,ht=document.createTextNode(Ae),h.map.push(h.pos,h.pos+T.length,ht),g&&p<9&&(He=!0),h.pos+=T.length;else{ht=document.createDocumentFragment();for(var Et=0;;){De.lastIndex=Et;var Kt=De.exec(T),Ft=Kt?Kt.index-Et:T.length-Et;if(Ft){var en=document.createTextNode(Ae.slice(Et,Et+Ft));g&&p<9?ht.appendChild(R("span",[en])):ht.appendChild(en),h.map.push(h.pos,h.pos+Ft,en),h.col+=Ft,h.pos+=Ft}if(!Kt)break;Et+=Ft+1;var on=void 0;if(Kt[0]==" "){var En=h.cm.options.tabSize,Ln=En-h.col%En;on=ht.appendChild(R("span",oe(Ln),"cm-tab")),on.setAttribute("role","presentation"),on.setAttribute("cm-text"," "),h.col+=Ln}else Kt[0]=="\r"||Kt[0]==`
|
|
|
`?(on=ht.appendChild(R("span",Kt[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),on.setAttribute("cm-text",Kt[0]),h.col+=1):(on=h.cm.options.specialCharPlaceholder(Kt[0]),on.setAttribute("cm-text",Kt[0]),g&&p<9?ht.appendChild(R("span",[on])):ht.appendChild(on),h.col+=1);h.map.push(h.pos,h.pos+1,on),h.pos++}}if(h.trailingSpace=Ae.charCodeAt(T.length-1)==32,H||j||z||He||$||ye){var Vn=H||"";j&&(Vn+=j),z&&(Vn+=z);var Mn=R("span",[ht],Vn,$);if(ye)for(var Zn in ye)ye.hasOwnProperty(Zn)&&Zn!="style"&&Zn!="class"&&Mn.setAttribute(Zn,ye[Zn]);return h.content.appendChild(Mn)}h.content.appendChild(ht)}function Xi(h,T){if(h.length>1&&!/ /.test(h))return h;for(var H=T,j="",z=0;z<h.length;z++){var $=h.charAt(z);$==" "&&H&&(z==h.length-1||h.charCodeAt(z+1)==32)&&($="\xA0"),j+=$,H=$==" "}return j}function ga(h,T){return function(H,j,z,$,ye,Ae,De){z=z?z+" cm-force-border":"cm-force-border";for(var He=H.pos,ht=He+j.length;;){for(var Et=void 0,Kt=0;Kt<T.length&&!(Et=T[Kt],Et.to>He&&Et.from<=He);Kt++);if(Et.to>=ht)return h(H,j,z,$,ye,Ae,De);h(H,j.slice(0,Et.to-He),z,$,null,Ae,De),$=null,j=j.slice(Et.to-He),He=Et.to}}}function jr(h,T,H,j){var z=!j&&H.widgetNode;z&&h.map.push(h.pos,h.pos+T,z),!j&&h.cm.display.input.needsContentAttribute&&(z||(z=h.content.appendChild(document.createElement("span"))),z.setAttribute("cm-marker",H.id)),z&&(h.cm.display.input.setUneditable(z),h.content.appendChild(z)),h.pos+=T,h.trailingSpace=!1}function qa(h,T,H){var j=h.markedSpans,z=h.text,$=0;if(!j){for(var ye=1;ye<H.length;ye+=2)T.addToken(T,z.slice($,$=H[ye]),Lr(H[ye+1],T.cm.options));return}for(var Ae=z.length,De=0,He=1,ht="",Et,Kt,Ft=0,en,on,En,Ln,Vn;;){if(Ft==De){en=on=En=Kt="",Vn=null,Ln=null,Ft=Infinity;for(var Mn=[],Zn=void 0,Cr=0;Cr<j.length;++Cr){var pr=j[Cr],ii=pr.marker;if(ii.type=="bookmark"&&pr.from==De&&ii.widgetNode)Mn.push(ii);else if(pr.from<=De&&(pr.to==null||pr.to>De||ii.collapsed&&pr.to==De&&pr.from==De)){if(pr.to!=null&&pr.to!=De&&Ft>pr.to&&(Ft=pr.to,on=""),ii.className&&(en+=" "+ii.className),ii.css&&(Kt=(Kt?Kt+";":"")+ii.css),ii.startStyle&&pr.from==De&&(En+=" "+ii.startStyle),ii.endStyle&&pr.to==Ft&&(Zn||(Zn=[])).push(ii.endStyle,pr.to),ii.title&&((Vn||(Vn={})).title=ii.title),ii.attributes)for(var ra in ii.attributes)(Vn||(Vn={}))[ra]=ii.attributes[ra];ii.collapsed&&(!Ln||ei(Ln.marker,ii)<0)&&(Ln=pr)}else pr.from>De&&Ft>pr.from&&(Ft=pr.from)}if(Zn)for(var ao=0;ao<Zn.length;ao+=2)Zn[ao+1]==Ft&&(on+=" "+Zn[ao]);if(!Ln||Ln.from==De)for(var ba=0;ba<Mn.length;++ba)jr(T,0,Mn[ba]);if(Ln&&(Ln.from||0)==De){if(jr(T,(Ln.to==null?Ae+1:Ln.to)-De,Ln.marker,Ln.from==null),Ln.to==null)return;Ln.to==De&&(Ln=!1)}}if(De>=Ae)break;for(var jo=Math.min(Ae,Ft);;){if(ht){var ko=De+ht.length;if(!Ln){var ja=ko>jo?ht.slice(0,jo-De):ht;T.addToken(T,ja,Et?Et+en:en,En,De+ja.length==Ft?on:"",Kt,Vn)}if(ko>=jo){ht=ht.slice(jo-De),De=jo;break}De=ko,En=""}ht=z.slice($,$=H[He++]),Et=Lr(H[He++],T.cm.options)}}}function di(h,T,H){this.line=T,this.rest=Qi(T),this.size=this.rest?wn(se(this.rest))-H+1:1,this.node=this.text=null,this.hidden=ti(h,T)}function Ai(h,T,H){for(var j=[],z,$=T;$<H;$=z){var ye=new di(h.doc,$t(h.doc,$),$);z=$+ye.size,j.push(ye)}return j}var va=null;function Ma(h){va?va.ops.push(h):h.ownsGroup=va={ops:[h],delayedCallbacks:[]}}function Ko(h){var T=h.delayedCallbacks,H=0;do{for(;H<T.length;H++)T[H].call(null);for(var j=0;j<h.ops.length;j++){var z=h.ops[j];if(z.cursorActivityHandlers)for(;z.cursorActivityCalled<z.cursorActivityHandlers.length;)z.cursorActivityHandlers[z.cursorActivityCalled++].call(null,z.cm)}}while(H<T.length)}function hi(h,T){var H=h.ownsGroup;if(!H)return;try{Ko(H)}finally{va=null,T(H)}}var Tn=null;function tn(h,T){var H=bt(h,T);if(!H.length)return;var j=Array.prototype.slice.call(arguments,2),z;va?z=va.delayedCallbacks:Tn?z=Tn:(z=Tn=[],setTimeout(In,0));for(var $=function(Ae){z.push(function(){return H[Ae].apply(null,j)})},ye=0;ye<H.length;++ye)$(ye)}function In(){var h=Tn;Tn=null;for(var T=0;T<h.length;++T)h[T]()}function vn(h,T,H,j){for(var z=0;z<T.changes.length;z++){var $=T.changes[z];$=="text"?bi(h,T):$=="gutter"?Pi(h,T,H,j):$=="class"?Ji(h,T):$=="widget"&&zi(h,T,j)}T.changes=null}function er(h){return h.node==h.text&&(h.node=R("div",null,null,"position: relative"),h.text.parentNode&&h.text.parentNode.replaceChild(h.node,h.text),h.node.appendChild(h.text),g&&p<8&&(h.node.style.zIndex=2)),h.node}function Ar(h,T){var H=T.bgClass?T.bgClass+" "+(T.line.bgClass||""):T.line.bgClass;if(H&&(H+=" CodeMirror-linebackground"),T.background)H?T.background.className=H:(T.background.parentNode.removeChild(T.background),T.background=null);else if(H){var j=er(T);T.background=j.insertBefore(R("div",null,H),j.firstChild),h.display.input.setUneditable(T.background)}}function fi(h,T){var H=h.display.externalMeasured;return H&&H.line==T.line?(h.display.externalMeasured=null,T.measure=H.measure,H.built):Kr(h,T)}function bi(h,T){var H=T.text.className,j=fi(h,T);T.text==T.node&&(T.node=j.pre),T.text.parentNode.replaceChild(j.pre,T.text),T.text=j.pre,j.bgClass!=T.bgClass||j.textClass!=T.textClass?(T.bgClass=j.bgClass,T.textClass=j.textClass,Ji(h,T)):H&&(T.text.className=H)}function Ji(h,T){Ar(h,T),T.line.wrapClass?er(T).className=T.line.wrapClass:T.node!=T.text&&(T.node.className="");var H=T.textClass?T.textClass+" "+(T.line.textClass||""):T.line.textClass;T.text.className=H||""}function Pi(h,T,H,j){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 z=er(T);T.gutterBackground=R("div",null,"CodeMirror-gutter-background "+T.line.gutterClass,"left: "+(h.options.fixedGutter?j.fixedPos:-j.gutterTotalWidth)+"px; width: "+j.gutterTotalWidth+"px"),h.display.input.setUneditable(T.gutterBackground),z.insertBefore(T.gutterBackground,T.text)}var $=T.line.gutterMarkers;if(h.options.lineNumbers||$){var ye=er(T),Ae=T.gutter=R("div",null,"CodeMirror-gutter-wrapper","left: "+(h.options.fixedGutter?j.fixedPos:-j.gutterTotalWidth)+"px");if(h.display.input.setUneditable(Ae),ye.insertBefore(Ae,T.text),T.line.gutterClass&&(Ae.className+=" "+T.line.gutterClass),h.options.lineNumbers&&(!$||!$["CodeMirror-linenumbers"])&&(T.lineNumber=Ae.appendChild(R("div",or(h.options,H),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+j.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+h.display.lineNumInnerWidth+"px"))),$)for(var De=0;De<h.display.gutterSpecs.length;++De){var He=h.display.gutterSpecs[De].className,ht=$.hasOwnProperty(He)&&$[He];ht&&Ae.appendChild(R("div",[ht],"CodeMirror-gutter-elt","left: "+j.gutterLeft[He]+"px; width: "+j.gutterWidth[He]+"px"))}}}function zi(h,T,H){T.alignable&&(T.alignable=null);for(var j=C("CodeMirror-linewidget"),z=T.node.firstChild,$=void 0;z;z=$)$=z.nextSibling,j.test(z.className)&&T.node.removeChild(z);Ea(h,T,H)}function Co(h,T,H,j){var z=fi(h,T);return T.text=T.node=z.pre,z.bgClass&&(T.bgClass=z.bgClass),z.textClass&&(T.textClass=z.textClass),Ji(h,T),Pi(h,T,H,j),Ea(h,T,j),T.node}function Ea(h,T,H){if(Is(h,T.line,T,H,!0),T.rest)for(var j=0;j<T.rest.length;j++)Is(h,T.rest[j],T,H,!1)}function Is(h,T,H,j,z){if(!T.widgets)return;for(var $=er(H),ye=0,Ae=T.widgets;ye<Ae.length;++ye){var De=Ae[ye],He=R("div",[De.node],"CodeMirror-linewidget"+(De.className?" "+De.className:""));De.handleMouseEvents||He.setAttribute("cm-ignore-events","true"),el(De,He,H,j),h.display.input.setUneditable(He),z&&De.above?$.insertBefore(He,H.gutter||H.text):$.appendChild(He),tn(De,"redraw")}}function el(h,T,H,j){if(h.noHScroll){(H.alignable||(H.alignable=[])).push(T);var z=j.wrapperWidth;T.style.left=j.fixedPos+"px",h.coverGutter||(z-=j.gutterTotalWidth,T.style.paddingLeft=j.gutterTotalWidth+"px"),T.style.width=z+"px"}h.coverGutter&&(T.style.zIndex=5,T.style.position="relative",h.noHScroll||(T.style.marginLeft=-j.gutterTotalWidth+"px"))}function xa(h){if(h.height!=null)return h.height;var T=h.doc.cm;if(!T)return 0;if(!M(document.body,h.node)){var H="position: relative;";h.coverGutter&&(H+="margin-left: -"+T.display.gutters.offsetWidth+"px;"),h.noHScroll&&(H+="width: "+T.display.wrapper.clientWidth+"px;"),A(T.display.measure,R("div",[h.node],null,H))}return h.height=h.node.parentNode.offsetHeight}function Wo(h,T){for(var H=Qe(T);H!=h.wrapper;H=H.parentNode)if(!H||H.nodeType==1&&H.getAttribute("cm-ignore-events")=="true"||H.parentNode==h.sizer&&H!=h.mover)return!0}function tl(h){return h.lineSpace.offsetTop}function ot(h){return h.mover.offsetHeight-h.lineSpace.offsetHeight}function xt(h){if(h.cachedPaddingH)return h.cachedPaddingH;var T=A(h.measure,R("pre","x","CodeMirror-line-like")),H=window.getComputedStyle?window.getComputedStyle(T):T.currentStyle,j={left:parseInt(H.paddingLeft),right:parseInt(H.paddingRight)};return!isNaN(j.left)&&!isNaN(j.right)&&(h.cachedPaddingH=j),j}function Rt(h){return he-h.display.nativeBarWidth}function ct(h){return h.display.scroller.clientWidth-Rt(h)-h.display.barWidth}function Ue(h){return h.display.scroller.clientHeight-Rt(h)-h.display.barHeight}function $e(h,T,H){var j=h.options.lineWrapping,z=j&&ct(h);if(!T.measure.heights||j&&T.measure.width!=z){var $=T.measure.heights=[];if(j){T.measure.width=z;for(var ye=T.text.firstChild.getClientRects(),Ae=0;Ae<ye.length-1;Ae++){var De=ye[Ae],He=ye[Ae+1];Math.abs(De.bottom-He.bottom)>2&&$.push((De.bottom+He.top)/2-H.top)}}$.push(H.bottom-H.top)}}function We(h,T,H){if(h.line==T)return{map:h.measure.map,cache:h.measure.cache};for(var j=0;j<h.rest.length;j++)if(h.rest[j]==T)return{map:h.measure.maps[j],cache:h.measure.caches[j]};for(var z=0;z<h.rest.length;z++)if(wn(h.rest[z])>H)return{map:h.measure.maps[z],cache:h.measure.caches[z],before:!0}}function dt(h,T){T=$i(T);var H=wn(T),j=h.display.externalMeasured=new di(h.doc,T,H);j.lineN=H;var z=j.built=Kr(h,j);return j.text=z.pre,A(h.display.lineMeasure,z.pre),j}function mt(h,T,H,j){return Ut(h,Tt(h,T),H,j)}function Ot(h,T){if(T>=h.display.viewFrom&&T<h.display.viewTo)return h.display.view[Gi(h,T)];var H=h.display.externalMeasured;if(H&&T>=H.lineN&&T<H.lineN+H.size)return H}function Tt(h,T){var H=wn(T),j=Ot(h,H);j&&!j.text?j=null:j&&j.changes&&(vn(h,j,H,aa(h)),h.curOp.forceUpdate=!0),j||(j=dt(h,T));var z=We(j,T,H);return{line:T,view:j,rect:null,map:z.map,cache:z.cache,before:z.before,hasHeights:!1}}function Ut(h,T,H,j,z){T.before&&(H=-1);var $=H+(j||""),ye;return T.cache.hasOwnProperty($)?ye=T.cache[$]:(T.rect||(T.rect=T.view.text.getBoundingClientRect()),T.hasHeights||($e(h,T.view,T.rect),T.hasHeights=!0),ye=An(h,T,H,j),ye.bogus||(T.cache[$]=ye)),{left:ye.left,right:ye.right,top:z?ye.rtop:ye.top,bottom:z?ye.rbottom:ye.bottom}}var Zt={left:0,right:0,top:0,bottom:0};function cn(h,T,H){for(var j,z,$,ye,Ae,De,He=0;He<h.length;He+=3)if(Ae=h[He],De=h[He+1],T<Ae?(z=0,$=1,ye="left"):T<De?(z=T-Ae,$=z+1):(He==h.length-3||T==De&&h[He+3]>T)&&($=De-Ae,z=$-1,T>=De&&(ye="right")),z!=null){if(j=h[He+2],Ae==De&&H==(j.insertLeft?"left":"right")&&(ye=H),H=="left"&&z==0)for(;He&&h[He-2]==h[He-3]&&h[He-1].insertLeft;)j=h[(He-=3)+2],ye="left";if(H=="right"&&z==De-Ae)for(;He<h.length-3&&h[He+3]==h[He+4]&&!h[He+5].insertLeft;)j=h[(He+=3)+2],ye="right";break}return{node:j,start:z,end:$,collapse:ye,coverStart:Ae,coverEnd:De}}function dn(h,T){var H=Zt;if(T=="left")for(var j=0;j<h.length&&!((H=h[j]).left!=H.right);j++);else for(var z=h.length-1;z>=0&&!((H=h[z]).left!=H.right);z--);return H}function An(h,T,H,j){var z=cn(T.map,H,j),$=z.node,ye=z.start,Ae=z.end,De=z.collapse,He;if($.nodeType==3){for(var ht=0;ht<4;ht++){for(;ye&&pe(T.line.text.charAt(z.coverStart+ye));)--ye;for(;z.coverStart+Ae<z.coverEnd&&pe(T.line.text.charAt(z.coverStart+Ae));)++Ae;if(g&&p<9&&ye==0&&Ae==z.coverEnd-z.coverStart?He=$.parentNode.getBoundingClientRect():He=dn(L($,ye,Ae).getClientRects(),j),He.left||He.right||ye==0)break;Ae=ye,ye=ye-1,De="right"}g&&p<11&&(He=_r(h.display.measure,He))}else{ye>0&&(De=j="right");var Et;h.options.lineWrapping&&(Et=$.getClientRects()).length>1?He=Et[j=="right"?Et.length-1:0]:He=$.getBoundingClientRect()}if(g&&p<9&&!ye&&(!He||!He.left&&!He.right)){var Kt=$.parentNode.getClientRects()[0];Kt?He={left:Kt.left,right:Kt.left+Ta(h.display),top:Kt.top,bottom:Kt.bottom}:He=Zt}for(var Ft=He.top-T.rect.top,en=He.bottom-T.rect.top,on=(Ft+en)/2,En=T.view.measure.heights,Ln=0;Ln<En.length-1&&!(on<En[Ln]);Ln++);var Vn=Ln?En[Ln-1]:0,Mn=En[Ln],Zn={left:(De=="right"?He.right:He.left)-T.rect.left,right:(De=="left"?He.left:He.right)-T.rect.left,top:Vn,bottom:Mn};return!He.left&&!He.right&&(Zn.bogus=!0),h.options.singleCursorHeightPerLine||(Zn.rtop=Ft,Zn.rbottom=en),Zn}function _r(h,T){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ze(h))return T;var H=screen.logicalXDPI/screen.deviceXDPI,j=screen.logicalYDPI/screen.deviceYDPI;return{left:T.left*H,right:T.right*H,top:T.top*j,bottom:T.bottom*j}}function Vr(h){if(h.measure&&(h.measure.cache={},h.measure.heights=null,h.rest))for(var T=0;T<h.rest.length;T++)h.measure.caches[T]={}}function Mr(h){h.display.externalMeasure=null,S(h.display.lineMeasure);for(var T=0;T<h.display.view.length;T++)Vr(h.display.view[T])}function Wr(h){Mr(h),h.display.cachedCharWidth=h.display.cachedTextHeight=h.display.cachedPaddingH=null,h.options.lineWrapping||(h.display.maxLineChanged=!0),h.display.lineNumChars=null}function Yr(){return n&&c?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Xr(){return n&&c?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function zr(h){var T=0;if(h.widgets)for(var H=0;H<h.widgets.length;++H)h.widgets[H].above&&(T+=xa(h.widgets[H]));return T}function si(h,T,H,j,z){if(!z){var $=zr(T);H.top+=$,H.bottom+=$}if(j=="line")return H;j||(j="local");var ye=Ka(T);if(j=="local"?ye+=tl(h.display):ye-=h.display.viewOffset,j=="page"||j=="window"){var Ae=h.display.lineSpace.getBoundingClientRect();ye+=Ae.top+(j=="window"?0:Xr());var De=Ae.left+(j=="window"?0:Yr());H.left+=De,H.right+=De}return H.top+=ye,H.bottom+=ye,H}function Jr(h,T,H){if(H=="div")return T;var j=T.left,z=T.top;if(H=="page")j-=Yr(),z-=Xr();else if(H=="local"||!H){var $=h.display.sizer.getBoundingClientRect();j+=$.left,z+=$.top}var ye=h.display.lineSpace.getBoundingClientRect();return{left:j-ye.left,top:z-ye.top}}function Zi(h,T,H,j,z){return j||(j=$t(h.doc,T.line)),si(h,j,mt(h,j,T.ch,z),H)}function Zr(h,T,H,j,z,$){j=j||$t(h.doc,T.line),z||(z=Tt(h,j));function ye(en,on){var En=Ut(h,z,en,on?"right":"left",$);return on?En.left=En.right:En.right=En.left,si(h,j,En,H)}var Ae=tt(j,h.doc.direction),De=T.ch,He=T.sticky;if(De>=j.text.length?(De=j.text.length,He="before"):De<=0&&(De=0,He="after"),!Ae)return ye(He=="before"?De-1:De,He=="before");function ht(en,on,En){var Ln=Ae[on],Vn=Ln.level==1;return ye(En?en-1:en,Vn!=En)}var Et=_e(Ae,De,He),Kt=Ie,Ft=ht(De,Et,He=="before");return Kt!=null&&(Ft.other=ht(De,Kt,He!="before")),Ft}function dr(h,T){var H=0;T=V(h.doc,T),h.options.lineWrapping||(H=Ta(h.display)*T.ch);var j=$t(h.doc,T.line),z=Ka(j)+tl(h.display);return{left:H,right:H,top:z,bottom:z+j.height}}function lr(h,T,H,j,z){var $=Xt(h,T,H);return $.xRel=z,j&&($.outside=j),$}function ni(h,T,H){var j=h.doc;if(H+=h.display.viewOffset,H<0)return lr(j.first,0,null,-1,-1);var z=Pn(j,H),$=j.first+j.size-1;if(z>$)return lr(j.first+j.size-1,$t(j,$).text.length,null,1,1);T<0&&(T=0);for(var ye=$t(j,z);;){var Ae=ea(h,ye,z,T,H),De=Wi(ye,Ae.ch+(Ae.xRel>0||Ae.outside>0?1:0));if(!De)return Ae;var He=De.find(1);if(He.line==z)return He;ye=$t(j,z=He.line)}}function pi(h,T,H,j){j-=zr(T);var z=T.text.length,$=Ne(function(ye){return Ut(h,H,ye-1).bottom<=j},z,0);return z=Ne(function(ye){return Ut(h,H,ye).top>j},$,z),{begin:$,end:z}}function $n(h,T,H,j){H||(H=Tt(h,T));var z=si(h,T,Ut(h,H,j),"line").top;return pi(h,T,H,z)}function vi(h,T,H,j){return h.bottom<=H?!1:h.top>H?!0:(j?h.left:h.right)>T}function ea(h,T,H,j,z){z-=Ka(T);var $=Tt(h,T),ye=zr(T),Ae=0,De=T.text.length,He=!0,ht=tt(T,h.doc.direction);if(ht){var Et=(h.options.lineWrapping?Si:xi)(h,T,H,$,ht,j,z);He=Et.level!=1,Ae=He?Et.from:Et.to-1,De=He?Et.to:Et.from-1}var Kt=null,Ft=null,en=Ne(function(Cr){var pr=Ut(h,$,Cr);return pr.top+=ye,pr.bottom+=ye,vi(pr,j,z,!1)?(pr.top<=z&&pr.left<=j&&(Kt=Cr,Ft=pr),!0):!1},Ae,De),on,En,Ln=!1;if(Ft){var Vn=j-Ft.left<Ft.right-j,Mn=Vn==He;en=Kt+(Mn?0:1),En=Mn?"after":"before",on=Vn?Ft.left:Ft.right}else{!He&&(en==De||en==Ae)&&en++,En=en==0?"after":en==T.text.length?"before":Ut(h,$,en-(He?1:0)).bottom+ye<=z==He?"after":"before";var Zn=Zr(h,Xt(H,en,En),"line",T,$);on=Zn.left,Ln=z<Zn.top?-1:z>=Zn.bottom?1:0}return en=Te(T.text,en,1),lr(H,en,En,Ln,j-on)}function xi(h,T,H,j,z,$,ye){var Ae=Ne(function(Et){var Kt=z[Et],Ft=Kt.level!=1;return vi(Zr(h,Xt(H,Ft?Kt.to:Kt.from,Ft?"before":"after"),"line",T,j),$,ye,!0)},0,z.length-1),De=z[Ae];if(Ae>0){var He=De.level!=1,ht=Zr(h,Xt(H,He?De.from:De.to,He?"after":"before"),"line",T,j);vi(ht,$,ye,!0)&&ht.top>ye&&(De=z[Ae-1])}return De}function Si(h,T,H,j,z,$,ye){var Ae=pi(h,T,j,ye),De=Ae.begin,He=Ae.end;/\s/.test(T.text.charAt(He-1))&&He--;for(var ht=null,Et=null,Kt=0;Kt<z.length;Kt++){var Ft=z[Kt];if(Ft.from>=He||Ft.to<=De)continue;var en=Ft.level!=1,on=Ut(h,j,en?Math.min(He,Ft.to)-1:Math.max(De,Ft.from)).right,En=on<$?$-on+1e9:on-$;(!ht||Et>En)&&(ht=Ft,Et=En)}return ht||(ht=z[z.length-1]),ht.from<De&&(ht={from:De,to:ht.to,level:ht.level}),ht.to>He&&(ht={from:ht.from,to:He,level:ht.level}),ht}var Ii;function ha(h){if(h.cachedTextHeight!=null)return h.cachedTextHeight;if(Ii==null){Ii=R("pre",null,"CodeMirror-line-like");for(var T=0;T<49;++T)Ii.appendChild(document.createTextNode("x")),Ii.appendChild(R("br"));Ii.appendChild(document.createTextNode("x"))}A(h.measure,Ii);var H=Ii.offsetHeight/50;return H>3&&(h.cachedTextHeight=H),S(h.measure),H||1}function Ta(h){if(h.cachedCharWidth!=null)return h.cachedCharWidth;var T=R("span","xxxxxxxxxx"),H=R("pre",[T],"CodeMirror-line-like");A(h.measure,H);var j=T.getBoundingClientRect(),z=(j.right-j.left)/10;return z>2&&(h.cachedCharWidth=z),z||10}function aa(h){for(var T=h.display,H={},j={},z=T.gutters.clientLeft,$=T.gutters.firstChild,ye=0;$;$=$.nextSibling,++ye){var Ae=h.display.gutterSpecs[ye].className;H[Ae]=$.offsetLeft+$.clientLeft+z,j[Ae]=$.clientWidth}return{fixedPos:$a(T),gutterTotalWidth:T.gutters.offsetWidth,gutterLeft:H,gutterWidth:j,wrapperWidth:T.wrapper.clientWidth}}function $a(h){return h.scroller.getBoundingClientRect().left-h.sizer.getBoundingClientRect().left}function To(h){var T=ha(h.display),H=h.options.lineWrapping,j=H&&Math.max(5,h.display.scroller.clientWidth/Ta(h.display)-3);return function(z){if(ti(h.doc,z))return 0;var $=0;if(z.widgets)for(var ye=0;ye<z.widgets.length;ye++)z.widgets[ye].height&&($+=z.widgets[ye].height);return H?$+(Math.ceil(z.text.length/j)||1)*T:$+T}}function vo(h){var T=h.doc,H=To(h);T.iter(function(j){var z=H(j);z!=j.height&&Rn(j,z)})}function Aa(h,T,H,j){var z=h.display;if(!H&&Qe(T).getAttribute("cm-not-content")=="true")return null;var $,ye,Ae=z.lineSpace.getBoundingClientRect();try{$=T.clientX-Ae.left,ye=T.clientY-Ae.top}catch(Et){return null}var De=ni(h,$,ye),He;if(j&&De.xRel>0&&(He=$t(h.doc,De.line).text).length==De.ch){var ht=B(He,He.length,h.options.tabSize)-He.length;De=Xt(De.line,Math.max(0,Math.round(($-xt(h.display).left)/Ta(h.display))-ht))}return De}function Gi(h,T){if(T>=h.display.viewTo)return null;if(T-=h.display.viewFrom,T<0)return null;for(var H=h.display.view,j=0;j<H.length;j++)if(T-=H[j].size,T<0)return j}function ji(h,T,H,j){T==null&&(T=h.doc.first),H==null&&(H=h.doc.first+h.doc.size),j||(j=0);var z=h.display;if(j&&H<z.viewTo&&(z.updateLineNumbers==null||z.updateLineNumbers>T)&&(z.updateLineNumbers=T),h.curOp.viewChanged=!0,T>=z.viewTo)Gr&&Ha(h.doc,T)<z.viewTo&&ta(h);else if(H<=z.viewFrom)Gr&&La(h.doc,H+j)>z.viewFrom?ta(h):(z.viewFrom+=j,z.viewTo+=j);else if(T<=z.viewFrom&&H>=z.viewTo)ta(h);else if(T<=z.viewFrom){var $=Ao(h,H,H+j,1);$?(z.view=z.view.slice($.index),z.viewFrom=$.lineN,z.viewTo+=j):ta(h)}else if(H>=z.viewTo){var ye=Ao(h,T,T,-1);ye?(z.view=z.view.slice(0,ye.index),z.viewTo=ye.lineN):ta(h)}else{var Ae=Ao(h,T,T,-1),De=Ao(h,H,H+j,1);Ae&&De?(z.view=z.view.slice(0,Ae.index).concat(Ai(h,Ae.lineN,De.lineN)).concat(z.view.slice(De.index)),z.viewTo+=j):ta(h)}var He=z.externalMeasured;He&&(H<He.lineN?He.lineN+=j:T<He.lineN+He.size&&(z.externalMeasured=null))}function oa(h,T,H){h.curOp.viewChanged=!0;var j=h.display,z=h.display.externalMeasured;if(z&&T>=z.lineN&&T<z.lineN+z.size&&(j.externalMeasured=null),T<j.viewFrom||T>=j.viewTo)return;var $=j.view[Gi(h,T)];if($.node==null)return;var ye=$.changes||($.changes=[]);re(ye,H)==-1&&ye.push(H)}function ta(h){h.display.viewFrom=h.display.viewTo=h.doc.first,h.display.view=[],h.display.viewOffset=0}function Ao(h,T,H,j){var z=Gi(h,T),$,ye=h.display.view;if(!Gr||H==h.doc.first+h.doc.size)return{index:z,lineN:H};for(var Ae=h.display.viewFrom,De=0;De<z;De++)Ae+=ye[De].size;if(Ae!=T){if(j>0){if(z==ye.length-1)return null;$=Ae+ye[z].size-T,z++}else $=Ae-T;T+=$,H+=$}for(;Ha(h.doc,H)!=H;){if(z==(j<0?0:ye.length-1))return null;H+=j*ye[z-(j<0?1:0)].size,z+=j}return{index:z,lineN:H}}function Vo(h,T,H){var j=h.display,z=j.view;z.length==0||T>=j.viewTo||H<=j.viewFrom?(j.view=Ai(h,T,H),j.viewFrom=T):(j.viewFrom>T?j.view=Ai(h,T,j.viewFrom).concat(j.view):j.viewFrom<T&&(j.view=j.view.slice(Gi(h,T))),j.viewFrom=T,j.viewTo<H?j.view=j.view.concat(Ai(h,j.viewTo,H)):j.viewTo>H&&(j.view=j.view.slice(0,Gi(h,H)))),j.viewTo=H}function Yo(h){for(var T=h.display.view,H=0,j=0;j<T.length;j++){var z=T[j];!z.hidden&&(!z.node||z.changes)&&++H}return H}function ki(h){h.display.input.showSelection(h.display.input.prepareSelection())}function Xo(h,T){T===void 0&&(T=!0);for(var H=h.doc,j={},z=j.cursors=document.createDocumentFragment(),$=j.selection=document.createDocumentFragment(),ye=0;ye<H.sel.ranges.length;ye++){if(!T&&ye==H.sel.primIndex)continue;var Ae=H.sel.ranges[ye];if(Ae.from().line>=h.display.viewTo||Ae.to().line<h.display.viewFrom)continue;var De=Ae.empty();(De||h.options.showCursorWhenSelecting)&&Qo(h,Ae.head,z),De||Oi(h,Ae,$)}return j}function Qo(h,T,H){var j=Zr(h,T,"div",null,null,!h.options.singleCursorHeightPerLine),z=H.appendChild(R("div","\xA0","CodeMirror-cursor"));if(z.style.left=j.left+"px",z.style.top=j.top+"px",z.style.height=Math.max(0,j.bottom-j.top)*h.options.cursorHeight+"px",j.other){var $=H.appendChild(R("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));$.style.display="",$.style.left=j.other.left+"px",$.style.top=j.other.top+"px",$.style.height=(j.other.bottom-j.other.top)*.85+"px"}}function Ni(h,T){return h.top-T.top||h.left-T.left}function Oi(h,T,H){var j=h.display,z=h.doc,$=document.createDocumentFragment(),ye=xt(h.display),Ae=ye.left,De=Math.max(j.sizerWidth,ct(h)-j.sizer.offsetLeft)-ye.right,He=z.direction=="ltr";function ht(Mn,Zn,Cr,pr){Zn<0&&(Zn=0),Zn=Math.round(Zn),pr=Math.round(pr),$.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+Mn+`px;
|
|
|
top: `+Zn+"px; width: "+(Cr==null?De-Mn:Cr)+`px;
|
|
|
height: `+(pr-Zn)+"px"))}function Et(Mn,Zn,Cr){var pr=$t(z,Mn),ii=pr.text.length,ra,ao;function ba(ja,Lo){return Zi(h,Xt(Mn,ja),"div",pr,Lo)}function jo(ja,Lo,fo){var Za=$n(h,pr,null,ja),Ba=Lo=="ltr"==(fo=="after")?"left":"right",Sa=fo=="after"?Za.begin:Za.end-(/\s/.test(pr.text.charAt(Za.end-1))?2:1);return ba(Sa,Ba)[Ba]}var ko=tt(pr,z.direction);return me(ko,Zn||0,Cr==null?ii:Cr,function(ja,Lo,fo,Za){var Ba=fo=="ltr",Sa=ba(ja,Ba?"left":"right"),Mo=ba(Lo-1,Ba?"right":"left"),Ml=Zn==null&&ja==0,$s=Cr==null&&Lo==ii,Eo=Za==0,Ss=!ko||Za==ko.length-1;if(Mo.top-Sa.top<=3){var oo=(He?Ml:$s)&&Eo,$l=(He?$s:Ml)&&Ss,Ds=oo?Ae:(Ba?Sa:Mo).left,_l=$l?De:(Ba?Mo:Sa).right;ht(Ds,Sa.top,_l-Ds,Sa.bottom)}else{var yl,wo,Pl,eu;Ba?(yl=He&&Ml&&Eo?Ae:Sa.left,wo=He?De:jo(ja,fo,"before"),Pl=He?Ae:jo(Lo,fo,"after"),eu=He&&$s&&Ss?De:Mo.right):(yl=He?jo(ja,fo,"before"):Ae,wo=!He&&Ml&&Eo?De:Sa.right,Pl=!He&&$s&&Ss?Ae:Mo.left,eu=He?jo(Lo,fo,"after"):De),ht(yl,Sa.top,wo-yl,Sa.bottom),Sa.bottom<Mo.top&&ht(Ae,Sa.bottom,null,Mo.top),ht(Pl,Mo.top,eu-Pl,Mo.bottom)}(!ra||Ni(Sa,ra)<0)&&(ra=Sa),Ni(Mo,ra)<0&&(ra=Mo),(!ao||Ni(Sa,ao)<0)&&(ao=Sa),Ni(Mo,ao)<0&&(ao=Mo)}),{start:ra,end:ao}}var Kt=T.from(),Ft=T.to();if(Kt.line==Ft.line)Et(Kt.line,Kt.ch,Ft.ch);else{var en=$t(z,Kt.line),on=$t(z,Ft.line),En=$i(en)==$i(on),Ln=Et(Kt.line,Kt.ch,En?en.text.length+1:null).end,Vn=Et(Ft.line,En?0:null,Ft.ch).start;En&&(Ln.top<Vn.top-2?(ht(Ln.right,Ln.top,null,Ln.bottom),ht(Ae,Vn.top,Vn.left,Vn.bottom)):ht(Ln.right,Ln.top,Vn.left-Ln.right,Ln.bottom)),Ln.bottom<Vn.top&&ht(Ae,Ln.bottom,null,Vn.top)}H.appendChild($)}function Oa(h){if(!h.state.focused)return;var T=h.display;clearInterval(T.blinker);var H=!0;T.cursorDiv.style.visibility="",h.options.cursorBlinkRate>0?T.blinker=setInterval(function(){h.hasFocus()||is(h),T.cursorDiv.style.visibility=(H=!H)?"":"hidden"},h.options.cursorBlinkRate):h.options.cursorBlinkRate<0&&(T.cursorDiv.style.visibility="hidden")}function ks(h){h.state.focused||(h.display.input.focus(),Jo(h))}function nl(h){h.state.delayingBlurEvent=!0,setTimeout(function(){h.state.delayingBlurEvent&&(h.state.delayingBlurEvent=!1,is(h))},100)}function Jo(h,T){if(h.state.delayingBlurEvent&&(h.state.delayingBlurEvent=!1),h.options.readOnly=="nocursor")return;h.state.focused||(Xe(h,"focus",h,T),h.state.focused=!0,W(h.display.wrapper,"CodeMirror-focused"),!h.curOp&&h.display.selForContextMenu!=h.doc.sel&&(h.display.input.reset(),d&&setTimeout(function(){return h.display.input.reset(!0)},20)),h.display.input.receivedFocus()),Oa(h)}function is(h,T){if(h.state.delayingBlurEvent)return;h.state.focused&&(Xe(h,"blur",h,T),h.state.focused=!1,w(h.display.wrapper,"CodeMirror-focused")),clearInterval(h.display.blinker),setTimeout(function(){h.state.focused||(h.display.shift=!1)},150)}function Ls(h){for(var T=h.display,H=T.lineDiv.offsetTop,j=0;j<T.view.length;j++){var z=T.view[j],$=h.options.lineWrapping,ye=void 0,Ae=0;if(z.hidden)continue;if(g&&p<8){var De=z.node.offsetTop+z.node.offsetHeight;ye=De-H,H=De}else{var He=z.node.getBoundingClientRect();ye=He.bottom-He.top,!$&&z.text.firstChild&&(Ae=z.text.firstChild.getBoundingClientRect().right-He.left-1)}var ht=z.line.height-ye;if((ht>.005||ht<-.005)&&(Rn(z.line,ye),bl(z.line),z.rest))for(var Et=0;Et<z.rest.length;Et++)bl(z.rest[Et]);if(Ae>h.display.sizerWidth){var Kt=Math.ceil(Ae/Ta(h.display));Kt>h.display.maxLineLength&&(h.display.maxLineLength=Kt,h.display.maxLine=z.line,h.display.maxLineChanged=!0)}}}function bl(h){if(h.widgets)for(var T=0;T<h.widgets.length;++T){var H=h.widgets[T],j=H.node.parentNode;j&&(H.height=j.offsetHeight)}}function Ms(h,T,H){var j=H&&H.top!=null?Math.max(0,H.top):h.scroller.scrollTop;j=Math.floor(j-tl(h));var z=H&&H.bottom!=null?H.bottom:j+h.wrapper.clientHeight,$=Pn(T,j),ye=Pn(T,z);if(H&&H.ensure){var Ae=H.ensure.from.line,De=H.ensure.to.line;Ae<$?($=Ae,ye=Pn(T,Ka($t(T,Ae))+h.wrapper.clientHeight)):Math.min(De,T.lastLine())>=ye&&($=Pn(T,Ka($t(T,De))-h.wrapper.clientHeight),ye=De)}return{from:$,to:Math.max(ye,$+1)}}function El(h,T){if(et(h,"scrollCursorIntoView"))return;var H=h.display,j=H.sizer.getBoundingClientRect(),z=null;if(T.top+j.top<0?z=!0:T.bottom+j.top>(window.innerHeight||document.documentElement.clientHeight)&&(z=!1),z!=null&&!e){var $=R("div","\u200B",null,`position: absolute;
|
|
|
top: `+(T.top-H.viewOffset-tl(h.display))+`px;
|
|
|
height: `+(T.bottom-T.top+Rt(h)+H.barHeight)+`px;
|
|
|
left: `+T.left+"px; width: "+Math.max(2,T.right-T.left)+"px;");h.display.lineSpace.appendChild($),$.scrollIntoView(z),h.display.lineSpace.removeChild($)}}function Nl(h,T,H,j){j==null&&(j=0);var z;!h.options.lineWrapping&&T==H&&(T=T.ch?Xt(T.line,T.sticky=="before"?T.ch-1:T.ch,"after"):T,H=T.sticky=="before"?Xt(T.line,T.ch+1,"before"):T);for(var $=0;$<5;$++){var ye=!1,Ae=Zr(h,T),De=!H||H==T?Ae:Zr(h,H);z={left:Math.min(Ae.left,De.left),top:Math.min(Ae.top,De.top)-j,right:Math.max(Ae.left,De.left),bottom:Math.max(Ae.bottom,De.bottom)+j};var He=rl(h,z),ht=h.doc.scrollTop,Et=h.doc.scrollLeft;if(He.scrollTop!=null&&(os(h,He.scrollTop),Math.abs(h.doc.scrollTop-ht)>1&&(ye=!0)),He.scrollLeft!=null&&(Oo(h,He.scrollLeft),Math.abs(h.doc.scrollLeft-Et)>1&&(ye=!0)),!ye)break}return z}function xl(h,T){var H=rl(h,T);H.scrollTop!=null&&os(h,H.scrollTop),H.scrollLeft!=null&&Oo(h,H.scrollLeft)}function rl(h,T){var H=h.display,j=ha(h.display);T.top<0&&(T.top=0);var z=h.curOp&&h.curOp.scrollTop!=null?h.curOp.scrollTop:H.scroller.scrollTop,$=Ue(h),ye={};T.bottom-T.top>$&&(T.bottom=T.top+$);var Ae=h.doc.height+ot(H),De=T.top<j,He=T.bottom>Ae-j;if(T.top<z)ye.scrollTop=De?0:T.top;else if(T.bottom>z+$){var ht=Math.min(T.top,(He?Ae:T.bottom)-$);ht!=z&&(ye.scrollTop=ht)}var Et=h.options.fixedGutter?0:H.gutters.offsetWidth,Kt=h.curOp&&h.curOp.scrollLeft!=null?h.curOp.scrollLeft:H.scroller.scrollLeft-Et,Ft=ct(h)-H.gutters.offsetWidth,en=T.right-T.left>Ft;return en&&(T.right=T.left+Ft),T.left<10?ye.scrollLeft=0:T.left<Kt?ye.scrollLeft=Math.max(0,T.left+Et-(en?0:10)):T.right>Ft+Kt-3&&(ye.scrollLeft=T.right+(en?0:10)-Ft),ye}function il(h,T){if(T==null)return;Cs(h),h.curOp.scrollTop=(h.curOp.scrollTop==null?h.doc.scrollTop:h.curOp.scrollTop)+T}function vs(h){Cs(h);var T=h.getCursor();h.curOp.scrollToPos={from:T,to:T,margin:h.options.cursorScrollMargin}}function as(h,T,H){(T!=null||H!=null)&&Cs(h),T!=null&&(h.curOp.scrollLeft=T),H!=null&&(h.curOp.scrollTop=H)}function Ul(h,T){Cs(h),h.curOp.scrollToPos=T}function Cs(h){var T=h.curOp.scrollToPos;if(T){h.curOp.scrollToPos=null;var H=dr(h,T.from),j=dr(h,T.to);Ts(h,H,j,T.margin)}}function Ts(h,T,H,j){var z=rl(h,{left:Math.min(T.left,H.left),top:Math.min(T.top,H.top)-j,right:Math.max(T.right,H.right),bottom:Math.max(T.bottom,H.bottom)+j});as(h,z.scrollLeft,z.scrollTop)}function os(h,T){if(Math.abs(h.doc.scrollTop-T)<2)return;O||Fs(h,{top:T}),_s(h,T,!0),O&&Fs(h),As(h,100)}function _s(h,T,H){if(T=Math.max(0,Math.min(h.display.scroller.scrollHeight-h.display.scroller.clientHeight,T)),h.display.scroller.scrollTop==T&&!H)return;h.doc.scrollTop=T,h.display.scrollbars.setScrollTop(T),h.display.scroller.scrollTop!=T&&(h.display.scroller.scrollTop=T)}function Oo(h,T,H,j){if(T=Math.max(0,Math.min(T,h.display.scroller.scrollWidth-h.display.scroller.clientWidth)),(H?T==h.doc.scrollLeft:Math.abs(h.doc.scrollLeft-T)<2)&&!j)return;h.doc.scrollLeft=T,Ze(h),h.display.scroller.scrollLeft!=T&&(h.display.scroller.scrollLeft=T),h.display.scrollbars.setScrollLeft(T)}function ss(h){var T=h.display,H=T.gutters.offsetWidth,j=Math.round(h.doc.height+ot(h.display));return{clientHeight:T.scroller.clientHeight,viewHeight:T.wrapper.clientHeight,scrollWidth:T.scroller.scrollWidth,clientWidth:T.scroller.clientWidth,viewWidth:T.wrapper.clientWidth,barLeft:h.options.fixedGutter?H:0,docHeight:j,scrollHeight:j+Rt(h)+T.barHeight,nativeBarWidth:T.nativeBarWidth,gutterWidth:H}}var Zo=function(h,T,H){this.cm=H;var j=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),z=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");j.tabIndex=z.tabIndex=-1,h(j),h(z),Le(j,"scroll",function(){j.clientHeight&&T(j.scrollTop,"vertical")}),Le(z,"scroll",function(){z.clientWidth&&T(z.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,g&&p<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Zo.prototype.update=function(h){var T=h.scrollWidth>h.clientWidth+1,H=h.scrollHeight>h.clientHeight+1,j=h.nativeBarWidth;if(H){this.vert.style.display="block",this.vert.style.bottom=T?j+"px":"0";var z=h.viewHeight-(T?j:0);this.vert.firstChild.style.height=Math.max(0,h.scrollHeight-h.clientHeight+z)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(T){this.horiz.style.display="block",this.horiz.style.right=H?j+"px":"0",this.horiz.style.left=h.barLeft+"px";var $=h.viewWidth-h.barLeft-(H?j:0);this.horiz.firstChild.style.width=Math.max(0,h.scrollWidth-h.clientWidth+$)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&h.clientHeight>0&&(j==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:H?j:0,bottom:T?j:0}},Zo.prototype.setScrollLeft=function(h){this.horiz.scrollLeft!=h&&(this.horiz.scrollLeft=h),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Zo.prototype.setScrollTop=function(h){this.vert.scrollTop!=h&&(this.vert.scrollTop=h),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Zo.prototype.zeroWidthHack=function(){var h=f&&!i?"12px":"18px";this.horiz.style.height=this.vert.style.width=h,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new J,this.disableVert=new J},Zo.prototype.enableZeroWidthBar=function(h,T,H){h.style.pointerEvents="auto";function j(){var z=h.getBoundingClientRect(),$=H=="vert"?document.elementFromPoint(z.right-1,(z.top+z.bottom)/2):document.elementFromPoint((z.right+z.left)/2,z.bottom-1);$!=h?h.style.pointerEvents="none":T.set(1e3,j)}T.set(1e3,j)},Zo.prototype.clear=function(){var h=this.horiz.parentNode;h.removeChild(this.horiz),h.removeChild(this.vert)};var ls=function(){};ls.prototype.update=function(){return{bottom:0,right:0}},ls.prototype.setScrollLeft=function(){},ls.prototype.setScrollTop=function(){},ls.prototype.clear=function(){};function ys(h,T){T||(T=ss(h));var H=h.display.barWidth,j=h.display.barHeight;Ps(h,T);for(var z=0;z<4&&H!=h.display.barWidth||j!=h.display.barHeight;z++)H!=h.display.barWidth&&h.options.lineWrapping&&Ls(h),Ps(h,ss(h)),H=h.display.barWidth,j=h.display.barHeight}function Ps(h,T){var H=h.display,j=H.scrollbars.update(T);H.sizer.style.paddingRight=(H.barWidth=j.right)+"px",H.sizer.style.paddingBottom=(H.barHeight=j.bottom)+"px",H.heightForcer.style.borderBottom=j.bottom+"px solid transparent",j.right&&j.bottom?(H.scrollbarFiller.style.display="block",H.scrollbarFiller.style.height=j.bottom+"px",H.scrollbarFiller.style.width=j.right+"px"):H.scrollbarFiller.style.display="",j.bottom&&h.options.coverGutterNextToScrollbar&&h.options.fixedGutter?(H.gutterFiller.style.display="block",H.gutterFiller.style.height=j.bottom+"px",H.gutterFiller.style.width=T.gutterWidth+"px"):H.gutterFiller.style.display=""}var wl={native:Zo,null:ls};function Ns(h){h.display.scrollbars&&(h.display.scrollbars.clear(),h.display.scrollbars.addClass&&w(h.display.wrapper,h.display.scrollbars.addClass)),h.display.scrollbars=new wl[h.options.scrollbarStyle](function(T){h.display.wrapper.insertBefore(T,h.display.scrollbarFiller),Le(T,"mousedown",function(){h.state.focused&&setTimeout(function(){return h.display.input.focus()},0)}),T.setAttribute("cm-not-content","true")},function(T,H){H=="horizontal"?Oo(h,T):os(h,T)},h),h.display.scrollbars.addClass&&W(h.display.wrapper,h.display.scrollbars.addClass)}var al=0;function qo(h){h.curOp={cm:h,viewChanged:!1,startHeight:h.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:++al},Ma(h.curOp)}function us(h){var T=h.curOp;T&&hi(T,function(H){for(var j=0;j<H.ops.length;j++)H.ops[j].cm.curOp=null;Sl(H)})}function Sl(h){for(var T=h.ops,H=0;H<T.length;H++)Fl(T[H]);for(var j=0;j<T.length;j++)ol(T[j]);for(var z=0;z<T.length;z++)sl(T[z]);for(var $=0;$<T.length;$++)ll(T[$]);for(var ye=0;ye<T.length;ye++)jl(T[ye])}function Fl(h){var T=h.cm,H=T.display;Hl(T),h.updateMaxLine&&So(T),h.mustUpdate=h.viewChanged||h.forceUpdate||h.scrollTop!=null||h.scrollToPos&&(h.scrollToPos.from.line<H.viewFrom||h.scrollToPos.to.line>=H.viewTo)||H.maxLineChanged&&T.options.lineWrapping,h.update=h.mustUpdate&&new Ro(T,h.mustUpdate&&{top:h.scrollTop,ensure:h.scrollToPos},h.forceUpdate)}function ol(h){h.updatedDisplay=h.mustUpdate&&cs(h.cm,h.update)}function sl(h){var T=h.cm,H=T.display;h.updatedDisplay&&Ls(T),h.barMeasure=ss(T),H.maxLineChanged&&!T.options.lineWrapping&&(h.adjustWidthTo=mt(T,H.maxLine,H.maxLine.text.length).left+3,T.display.sizerWidth=h.adjustWidthTo,h.barMeasure.scrollWidth=Math.max(H.scroller.clientWidth,H.sizer.offsetLeft+h.adjustWidthTo+Rt(T)+T.display.barWidth),h.maxScrollLeft=Math.max(0,H.sizer.offsetLeft+h.adjustWidthTo-ct(T))),(h.updatedDisplay||h.selectionChanged)&&(h.preparedSelection=H.input.prepareSelection())}function ll(h){var T=h.cm;h.adjustWidthTo!=null&&(T.display.sizer.style.minWidth=h.adjustWidthTo+"px",h.maxScrollLeft<T.doc.scrollLeft&&Oo(T,Math.min(T.display.scroller.scrollLeft,h.maxScrollLeft),!0),T.display.maxLineChanged=!1);var H=h.focus&&h.focus==G();h.preparedSelection&&T.display.input.showSelection(h.preparedSelection,H),(h.updatedDisplay||h.startHeight!=T.doc.height)&&ys(T,h.barMeasure),h.updatedDisplay&&xe(T,h.barMeasure),h.selectionChanged&&Oa(T),T.state.focused&&h.updateInput&&T.display.input.reset(h.typing),H&&ks(h.cm)}function jl(h){var T=h.cm,H=T.display,j=T.doc;if(h.updatedDisplay&&Us(T,h.update),H.wheelStartX!=null&&(h.scrollTop!=null||h.scrollLeft!=null||h.scrollToPos)&&(H.wheelStartX=H.wheelStartY=null),h.scrollTop!=null&&_s(T,h.scrollTop,h.forceScroll),h.scrollLeft!=null&&Oo(T,h.scrollLeft,!0,!0),h.scrollToPos){var z=Nl(T,V(j,h.scrollToPos.from),V(j,h.scrollToPos.to),h.scrollToPos.margin);El(T,z)}var $=h.maybeHiddenMarkers,ye=h.maybeUnhiddenMarkers;if($)for(var Ae=0;Ae<$.length;++Ae)$[Ae].lines.length||Xe($[Ae],"hide");if(ye)for(var De=0;De<ye.length;++De)ye[De].lines.length&&Xe(ye[De],"unhide");H.wrapper.offsetHeight&&(j.scrollTop=T.display.scroller.scrollTop),h.changeObjs&&Xe(T,"changes",T,h.changeObjs),h.update&&h.update.finish()}function lo(h,T){if(h.curOp)return T();qo(h);try{return T()}finally{us(h)}}function sa(h,T){return function(){if(h.curOp)return T.apply(h,arguments);qo(h);try{return T.apply(h,arguments)}finally{us(h)}}}function Xa(h){return function(){if(this.curOp)return h.apply(this,arguments);qo(this);try{return h.apply(this,arguments)}finally{us(this)}}}function _a(h){return function(){var T=this.cm;if(!T||T.curOp)return h.apply(this,arguments);qo(T);try{return h.apply(this,arguments)}finally{us(T)}}}function As(h,T){h.doc.highlightFrontier<h.display.viewTo&&h.state.highlight.set(T,F(Bl,h))}function Bl(h){var T=h.doc;if(T.highlightFrontier>=h.display.viewTo)return;var H=+new Date+h.options.workTime,j=Jt(h,T.highlightFrontier),z=[];T.iter(j.line,Math.min(T.first+T.size,h.display.viewTo+500),function($){if(j.line>=h.display.viewFrom){var ye=$.styles,Ae=$.text.length>h.options.maxHighlightLength?Wt(T.mode,j.state):null,De=nt(h,$,j,!0);Ae&&(j.state=Ae),$.styles=De.styles;var He=$.styleClasses,ht=De.classes;ht?$.styleClasses=ht:He&&($.styleClasses=null);for(var Et=!ye||ye.length!=$.styles.length||He!=ht&&(!He||!ht||He.bgClass!=ht.bgClass||He.textClass!=ht.textClass),Kt=0;!Et&&Kt<ye.length;++Kt)Et=ye[Kt]!=$.styles[Kt];Et&&z.push(j.line),$.stateAfter=j.save(),j.nextLine()}else $.text.length<=h.options.maxHighlightLength&&an(h,$.text,j),$.stateAfter=j.line%5==0?j.save():null,j.nextLine();if(+new Date>H)return As(h,h.options.workDelay),!0}),T.highlightFrontier=j.line,T.modeFrontier=Math.max(T.modeFrontier,j.line),z.length&&lo(h,function(){for(var $=0;$<z.length;$++)oa(h,z[$],"text")})}var Ro=function(h,T,H){var j=h.display;this.viewport=T,this.visible=Ms(j,h.doc,T),this.editorIsHidden=!j.wrapper.offsetWidth,this.wrapperHeight=j.wrapper.clientHeight,this.wrapperWidth=j.wrapper.clientWidth,this.oldDisplayWidth=ct(h),this.force=H,this.dims=aa(h),this.events=[]};Ro.prototype.signal=function(h,T){Me(h,T)&&this.events.push(arguments)},Ro.prototype.finish=function(){for(var h=0;h<this.events.length;h++)Xe.apply(null,this.events[h])};function Hl(h){var T=h.display;!T.scrollbarsClipped&&T.scroller.offsetWidth&&(T.nativeBarWidth=T.scroller.offsetWidth-T.scroller.clientWidth,T.heightForcer.style.height=Rt(h)+"px",T.sizer.style.marginBottom=-T.nativeBarWidth+"px",T.sizer.style.borderRightWidth=Rt(h)+"px",T.scrollbarsClipped=!0)}function Cl(h){if(h.hasFocus())return null;var T=G();if(!T||!M(h.display.lineDiv,T))return null;var H={activeElt:T};if(window.getSelection){var j=window.getSelection();j.anchorNode&&j.extend&&M(h.display.lineDiv,j.anchorNode)&&(H.anchorNode=j.anchorNode,H.anchorOffset=j.anchorOffset,H.focusNode=j.focusNode,H.focusOffset=j.focusOffset)}return H}function Kl(h){if(!h||!h.activeElt||h.activeElt==G())return;if(h.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(h.activeElt.nodeName)&&h.anchorNode&&M(document.body,h.anchorNode)&&M(document.body,h.focusNode)){var T=window.getSelection(),H=document.createRange();H.setEnd(h.anchorNode,h.anchorOffset),H.collapse(!1),T.removeAllRanges(),T.addRange(H),T.extend(h.focusNode,h.focusOffset)}}function cs(h,T){var H=h.display,j=h.doc;if(T.editorIsHidden)return ta(h),!1;if(!T.force&&T.visible.from>=H.viewFrom&&T.visible.to<=H.viewTo&&(H.updateLineNumbers==null||H.updateLineNumbers>=H.viewTo)&&H.renderedView==H.view&&Yo(h)==0)return!1;rt(h)&&(ta(h),T.dims=aa(h));var z=j.first+j.size,$=Math.max(T.visible.from-h.options.viewportMargin,j.first),ye=Math.min(z,T.visible.to+h.options.viewportMargin);H.viewFrom<$&&$-H.viewFrom<20&&($=Math.max(j.first,H.viewFrom)),H.viewTo>ye&&H.viewTo-ye<20&&(ye=Math.min(z,H.viewTo)),Gr&&($=Ha(h.doc,$),ye=La(h.doc,ye));var Ae=$!=H.viewFrom||ye!=H.viewTo||H.lastWrapHeight!=T.wrapperHeight||H.lastWrapWidth!=T.wrapperWidth;Vo(h,$,ye),H.viewOffset=Ka($t(h.doc,H.viewFrom)),h.display.mover.style.top=H.viewOffset+"px";var De=Yo(h);if(!Ae&&De==0&&!T.force&&H.renderedView==H.view&&(H.updateLineNumbers==null||H.updateLineNumbers>=H.viewTo))return!1;var He=Cl(h);return De>4&&(H.lineDiv.style.display="none"),Tl(h,H.updateLineNumbers,T.dims),De>4&&(H.lineDiv.style.display=""),H.renderedView=H.view,Kl(He),S(H.cursorDiv),S(H.selectionDiv),H.gutters.style.height=H.sizer.style.minHeight=0,Ae&&(H.lastWrapHeight=T.wrapperHeight,H.lastWrapWidth=T.wrapperWidth,As(h,400)),H.updateLineNumbers=null,!0}function Us(h,T){for(var H=T.viewport,j=!0;;j=!1){if(!j||!h.options.lineWrapping||T.oldDisplayWidth==ct(h)){if(H&&H.top!=null&&(H={top:Math.min(h.doc.height+ot(h.display)-Ue(h),H.top)}),T.visible=Ms(h.display,h.doc,H),T.visible.from>=h.display.viewFrom&&T.visible.to<=h.display.viewTo)break}else j&&(T.visible=Ms(h.display,h.doc,H));if(!cs(h,T))break;Ls(h);var z=ss(h);ki(h),ys(h,z),xe(h,z),T.force=!1}T.signal(h,"update",h),(h.display.viewFrom!=h.display.reportedViewFrom||h.display.viewTo!=h.display.reportedViewTo)&&(T.signal(h,"viewportChange",h,h.display.viewFrom,h.display.viewTo),h.display.reportedViewFrom=h.display.viewFrom,h.display.reportedViewTo=h.display.viewTo)}function Fs(h,T){var H=new Ro(h,T);if(cs(h,H)){Ls(h),Us(h,H);var j=ss(h);ki(h),ys(h,j),xe(h,j),H.finish()}}function Tl(h,T,H){var j=h.display,z=h.options.lineNumbers,$=j.lineDiv,ye=$.firstChild;function Ae(en){var on=en.nextSibling;return d&&f&&h.display.currentWheelTarget==en?en.style.display="none":en.parentNode.removeChild(en),on}for(var De=j.view,He=j.viewFrom,ht=0;ht<De.length;ht++){var Et=De[ht];if(!Et.hidden)if(!Et.node||Et.node.parentNode!=$){var Kt=Co(h,Et,He,H);$.insertBefore(Kt,ye)}else{for(;ye!=Et.node;)ye=Ae(ye);var Ft=z&&T!=null&&T<=He&&Et.lineNumber;Et.changes&&(re(Et.changes,"gutter")>-1&&(Ft=!1),vn(h,Et,He,H)),Ft&&(S(Et.lineNumber),Et.lineNumber.appendChild(document.createTextNode(or(h.options,He)))),ye=Et.node.nextSibling}He+=Et.size}for(;ye;)ye=Ae(ye)}function js(h){var T=h.gutters.offsetWidth;h.sizer.style.marginLeft=T+"px"}function xe(h,T){h.display.sizer.style.minHeight=T.docHeight+"px",h.display.heightForcer.style.top=T.docHeight+"px",h.display.gutters.style.height=T.docHeight+h.display.barHeight+Rt(h)+"px"}function Ze(h){var T=h.display,H=T.view;if(!T.alignWidgets&&(!T.gutters.firstChild||!h.options.fixedGutter))return;for(var j=$a(T)-T.scroller.scrollLeft+h.doc.scrollLeft,z=T.gutters.offsetWidth,$=j+"px",ye=0;ye<H.length;ye++)if(!H[ye].hidden){h.options.fixedGutter&&(H[ye].gutter&&(H[ye].gutter.style.left=$),H[ye].gutterBackground&&(H[ye].gutterBackground.style.left=$));var Ae=H[ye].alignable;if(Ae)for(var De=0;De<Ae.length;De++)Ae[De].style.left=$}h.options.fixedGutter&&(T.gutters.style.left=j+z+"px")}function rt(h){if(!h.options.lineNumbers)return!1;var T=h.doc,H=or(h.options,T.first+T.size-1),j=h.display;if(H.length!=j.lineNumChars){var z=j.measure.appendChild(R("div",[R("div",H)],"CodeMirror-linenumber CodeMirror-gutter-elt")),$=z.firstChild.offsetWidth,ye=z.offsetWidth-$;return j.lineGutter.style.width="",j.lineNumInnerWidth=Math.max($,j.lineGutter.offsetWidth-ye)+1,j.lineNumWidth=j.lineNumInnerWidth+ye,j.lineNumChars=j.lineNumInnerWidth?H.length:-1,j.lineGutter.style.width=j.lineNumWidth+"px",js(h.display),!0}return!1}function At(h,T){for(var H=[],j=!1,z=0;z<h.length;z++){var $=h[z],ye=null;if(typeof $!="string"&&(ye=$.style,$=$.className),$=="CodeMirror-linenumbers")if(T)j=!0;else continue;H.push({className:$,style:ye})}return T&&!j&&H.push({className:"CodeMirror-linenumbers",style:null}),H}function Pt(h){var T=h.gutters,H=h.gutterSpecs;S(T),h.lineGutter=null;for(var j=0;j<H.length;++j){var z=H[j],$=z.className,ye=z.style,Ae=T.appendChild(R("div",null,"CodeMirror-gutter "+$));ye&&(Ae.style.cssText=ye),$=="CodeMirror-linenumbers"&&(h.lineGutter=Ae,Ae.style.width=(h.lineNumWidth||1)+"px")}T.style.display=H.length?"":"none",js(h)}function vt(h){Pt(h.display),ji(h),Ze(h)}function it(h,T,H,j){var z=this;this.input=H,z.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),z.scrollbarFiller.setAttribute("cm-not-content","true"),z.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),z.gutterFiller.setAttribute("cm-not-content","true"),z.lineDiv=k("div",null,"CodeMirror-code"),z.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),z.cursorDiv=R("div",null,"CodeMirror-cursors"),z.measure=R("div",null,"CodeMirror-measure"),z.lineMeasure=R("div",null,"CodeMirror-measure"),z.lineSpace=k("div",[z.measure,z.lineMeasure,z.selectionDiv,z.cursorDiv,z.lineDiv],null,"position: relative; outline: none");var $=k("div",[z.lineSpace],"CodeMirror-lines");z.mover=R("div",[$],null,"position: relative"),z.sizer=R("div",[z.mover],"CodeMirror-sizer"),z.sizerWidth=null,z.heightForcer=R("div",null,null,"position: absolute; height: "+he+"px; width: 1px;"),z.gutters=R("div",null,"CodeMirror-gutters"),z.lineGutter=null,z.scroller=R("div",[z.sizer,z.heightForcer,z.gutters],"CodeMirror-scroll"),z.scroller.setAttribute("tabIndex","-1"),z.wrapper=R("div",[z.scrollbarFiller,z.gutterFiller,z.scroller],"CodeMirror"),g&&p<8&&(z.gutters.style.zIndex=-1,z.scroller.style.paddingRight=0),!d&&!(O&&u)&&(z.scroller.draggable=!0),h&&(h.appendChild?h.appendChild(z.wrapper):h(z.wrapper)),z.viewFrom=z.viewTo=T.first,z.reportedViewFrom=z.reportedViewTo=T.first,z.view=[],z.renderedView=null,z.externalMeasured=null,z.viewOffset=0,z.lastWrapHeight=z.lastWrapWidth=0,z.updateLineNumbers=null,z.nativeBarWidth=z.barHeight=z.barWidth=0,z.scrollbarsClipped=!1,z.lineNumWidth=z.lineNumInnerWidth=z.lineNumChars=null,z.alignWidgets=!1,z.cachedCharWidth=z.cachedTextHeight=z.cachedPaddingH=null,z.maxLine=null,z.maxLineLength=0,z.maxLineChanged=!1,z.wheelDX=z.wheelDY=z.wheelStartX=z.wheelStartY=null,z.shift=!1,z.selForContextMenu=null,z.activeTouch=null,z.gutterSpecs=At(j.gutters,j.lineNumbers),Pt(z),H.init(z)}var It=0,Ct=null;g?Ct=-.53:O?Ct=15:n?Ct=-.7:t&&(Ct=-1/3);function _t(h){var T=h.wheelDeltaX,H=h.wheelDeltaY;return T==null&&h.detail&&h.axis==h.HORIZONTAL_AXIS&&(T=h.detail),H==null&&h.detail&&h.axis==h.VERTICAL_AXIS?H=h.detail:H==null&&(H=h.wheelDelta),{x:T,y:H}}function St(h){var T=_t(h);return T.x*=Ct,T.y*=Ct,T}function Vt(h,T){var H=_t(T),j=H.x,z=H.y,$=h.display,ye=$.scroller,Ae=ye.scrollWidth>ye.clientWidth,De=ye.scrollHeight>ye.clientHeight;if(!(j&&Ae||z&&De))return;if(z&&f&&d){e:for(var He=T.target,ht=$.view;He!=ye;He=He.parentNode)for(var Et=0;Et<ht.length;Et++)if(ht[Et].node==He){h.display.currentWheelTarget=He;break e}}if(j&&!O&&!s&&Ct!=null){z&&De&&os(h,Math.max(0,ye.scrollTop+z*Ct)),Oo(h,Math.max(0,ye.scrollLeft+j*Ct)),(!z||z&&De)&&ge(T),$.wheelStartX=null;return}if(z&&Ct!=null){var Kt=z*Ct,Ft=h.doc.scrollTop,en=Ft+$.wrapper.clientHeight;Kt<0?Ft=Math.max(0,Ft+Kt-50):en=Math.min(h.doc.height,en+Kt+50),Fs(h,{top:Ft,bottom:en})}It<20&&($.wheelStartX==null?($.wheelStartX=ye.scrollLeft,$.wheelStartY=ye.scrollTop,$.wheelDX=j,$.wheelDY=z,setTimeout(function(){if($.wheelStartX==null)return;var on=ye.scrollLeft-$.wheelStartX,En=ye.scrollTop-$.wheelStartY,Ln=En&&$.wheelDY&&En/$.wheelDY||on&&$.wheelDX&&on/$.wheelDX;if($.wheelStartX=$.wheelStartY=null,!Ln)return;Ct=(Ct*It+Ln)/(It+1),++It},200)):($.wheelDX+=j,$.wheelDY+=z))}var jt=function(h,T){this.ranges=h,this.primIndex=T};jt.prototype.primary=function(){return this.ranges[this.primIndex]},jt.prototype.equals=function(h){if(h==this)return!0;if(h.primIndex!=this.primIndex||h.ranges.length!=this.ranges.length)return!1;for(var T=0;T<this.ranges.length;T++){var H=this.ranges[T],j=h.ranges[T];if(!Er(H.anchor,j.anchor)||!Er(H.head,j.head))return!1}return!0},jt.prototype.deepCopy=function(){for(var h=[],T=0;T<this.ranges.length;T++)h[T]=new kt(nr(this.ranges[T].anchor),nr(this.ranges[T].head));return new jt(h,this.primIndex)},jt.prototype.somethingSelected=function(){for(var h=0;h<this.ranges.length;h++)if(!this.ranges[h].empty())return!0;return!1},jt.prototype.contains=function(h,T){T||(T=h);for(var H=0;H<this.ranges.length;H++){var j=this.ranges[H];if(xn(T,j.from())>=0&&xn(h,j.to())<=0)return H}return-1};var kt=function(h,T){this.anchor=h,this.head=T};kt.prototype.from=function(){return qn(this.anchor,this.head)},kt.prototype.to=function(){return Ir(this.anchor,this.head)},kt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function zt(h,T,H){var j=h&&h.options.selectionsMayTouch,z=T[H];T.sort(function(Kt,Ft){return xn(Kt.from(),Ft.from())}),H=re(T,z);for(var $=1;$<T.length;$++){var ye=T[$],Ae=T[$-1],De=xn(Ae.to(),ye.from());if(j&&!ye.empty()?De>0:De>=0){var He=qn(Ae.from(),ye.from()),ht=Ir(Ae.to(),ye.to()),Et=Ae.empty()?ye.from()==ye.head:Ae.from()==Ae.head;$<=H&&--H,T.splice(--$,2,new kt(Et?ht:He,Et?He:ht))}}return new jt(T,H)}function qt(h,T){return new jt([new kt(h,T||h)],0)}function sn(h){return h.text?Xt(h.from.line+h.text.length-1,se(h.text).length+(h.text.length==1?h.from.ch:0)):h.to}function pn(h,T){if(xn(h,T.from)<0)return h;if(xn(h,T.to)<=0)return sn(T);var H=h.line+T.text.length-(T.to.line-T.from.line)-1,j=h.ch;return h.line==T.to.line&&(j+=sn(T).ch-T.to.ch),Xt(H,j)}function Sn(h,T){for(var H=[],j=0;j<h.sel.ranges.length;j++){var z=h.sel.ranges[j];H.push(new kt(pn(z.anchor,T),pn(z.head,T)))}return zt(h.cm,H,h.sel.primIndex)}function Wn(h,T,H){return h.line==T.line?Xt(H.line,h.ch-T.ch+H.ch):Xt(H.line+(h.line-T.line),h.ch)}function _n(h,T,H){for(var j=[],z=Xt(h.first,0),$=z,ye=0;ye<T.length;ye++){var Ae=T[ye],De=Wn(Ae.from,z,$),He=Wn(sn(Ae),z,$);if(z=Ae.to,$=He,H=="around"){var ht=h.sel.ranges[ye],Et=xn(ht.head,ht.anchor)<0;j[ye]=new kt(Et?He:De,Et?De:He)}else j[ye]=new kt(De,De)}return new jt(j,h.sel.primIndex)}function gn(h){h.doc.mode=Lt(h.options,h.doc.modeOption),nn(h)}function nn(h){h.doc.iter(function(T){T.stateAfter&&(T.stateAfter=null),T.styles&&(T.styles=null)}),h.doc.modeFrontier=h.doc.highlightFrontier=h.doc.first,As(h,100),h.state.modeGen++,h.curOp&&ji(h)}function Nn(h,T){return T.from.ch==0&&T.to.ch==0&&se(T.text)==""&&(!h.cm||h.cm.options.wholeLineUpdateBefore)}function gt(h,T,H,j){function z(Vn){return H?H[Vn]:null}function $(Vn,Mn,Zn){Ho(Vn,Mn,Zn,j),tn(Vn,"change",Vn,T)}function ye(Vn,Mn){for(var Zn=[],Cr=Vn;Cr<Mn;++Cr)Zn.push(new Wa(He[Cr],z(Cr),j));return Zn}var Ae=T.from,De=T.to,He=T.text,ht=$t(h,Ae.line),Et=$t(h,De.line),Kt=se(He),Ft=z(He.length-1),en=De.line-Ae.line;if(T.full)h.insert(0,ye(0,He.length)),h.remove(He.length,h.size-He.length);else if(Nn(h,T)){var on=ye(0,He.length-1);$(Et,Et.text,Ft),en&&h.remove(Ae.line,en),on.length&&h.insert(Ae.line,on)}else if(ht==Et)if(He.length==1)$(ht,ht.text.slice(0,Ae.ch)+Kt+ht.text.slice(De.ch),Ft);else{var En=ye(1,He.length-1);En.push(new Wa(Kt+ht.text.slice(De.ch),Ft,j)),$(ht,ht.text.slice(0,Ae.ch)+He[0],z(0)),h.insert(Ae.line+1,En)}else if(He.length==1)$(ht,ht.text.slice(0,Ae.ch)+He[0]+Et.text.slice(De.ch),z(0)),h.remove(Ae.line+1,en);else{$(ht,ht.text.slice(0,Ae.ch)+He[0],z(0)),$(Et,Kt+Et.text.slice(De.ch),Ft);var Ln=ye(1,He.length-1);en>1&&h.remove(Ae.line+1,en-1),h.insert(Ae.line+1,Ln)}tn(h,"change",h,T)}function rn(h,T,H){function j(z,$,ye){if(z.linked)for(var Ae=0;Ae<z.linked.length;++Ae){var De=z.linked[Ae];if(De.doc==$)continue;var He=ye&&De.sharedHist;if(H&&!He)continue;T(De.doc,He),j(De.doc,z,He)}}j(h,null,!0)}function fn(h,T){if(T.cm)throw new Error("This document is already in use.");h.doc=T,T.cm=h,vo(h),gn(h),bn(h),h.options.lineWrapping||So(h),h.options.mode=T.modeOption,ji(h)}function bn(h){(h.doc.direction=="rtl"?W:w)(h.display.lineDiv,"CodeMirror-rtl")}function Un(h){lo(h,function(){bn(h),ji(h)})}function zn(h){this.done=[],this.undone=[],this.undoDepth=Infinity,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=h||1}function Bn(h,T){var H={from:nr(T.from),to:sn(T),text:Kn(h,T.from,T.to)};return Cn(h,H,T.from.line,T.to.line+1),rn(h,function(j){return Cn(j,H,T.from.line,T.to.line+1)},!0),H}function un(h){for(;h.length;){var T=se(h);if(T.ranges)h.pop();else break}}function ln(h,T){if(T)return un(h.done),se(h.done);if(h.done.length&&!se(h.done).ranges)return se(h.done);if(h.done.length>1&&!h.done[h.done.length-2].ranges)return h.done.pop(),se(h.done)}function yn(h,T,H,j){var z=h.history;z.undone.length=0;var $=+new Date,ye,Ae;if((z.lastOp==j||z.lastOrigin==T.origin&&T.origin&&(T.origin.charAt(0)=="+"&&z.lastModTime>$-(h.cm?h.cm.options.historyEventDelay:500)||T.origin.charAt(0)=="*"))&&(ye=ln(z,z.lastOp==j)))Ae=se(ye.changes),xn(T.from,T.to)==0&&xn(T.from,Ae.to)==0?Ae.to=sn(T):ye.changes.push(Bn(h,T));else{var De=se(z.done);for((!De||!De.ranges)&&Br(h.sel,z.done),ye={changes:[Bn(h,T)],generation:z.generation},z.done.push(ye);z.done.length>z.undoDepth;)z.done.shift(),z.done[0].ranges||z.done.shift()}z.done.push(H),z.generation=++z.maxGeneration,z.lastModTime=z.lastSelTime=$,z.lastOp=z.lastSelOp=j,z.lastOrigin=z.lastSelOrigin=T.origin,Ae||Xe(h,"historyAdded")}function kn(h,T,H,j){var z=T.charAt(0);return z=="*"||z=="+"&&H.ranges.length==j.ranges.length&&H.somethingSelected()==j.somethingSelected()&&new Date-h.history.lastSelTime<=(h.cm?h.cm.options.historyEventDelay:500)}function ar(h,T,H,j){var z=h.history,$=j&&j.origin;H==z.lastSelOp||$&&z.lastSelOrigin==$&&(z.lastModTime==z.lastSelTime&&z.lastOrigin==$||kn(h,$,se(z.done),T))?z.done[z.done.length-1]=T:Br(T,z.done),z.lastSelTime=+new Date,z.lastSelOrigin=$,z.lastSelOp=H,j&&j.clearRedo!==!1&&un(z.undone)}function Br(h,T){var H=se(T);H&&H.ranges&&H.equals(h)||T.push(h)}function Cn(h,T,H,j){var z=T["spans_"+h.id],$=0;h.iter(Math.max(h.first,H),Math.min(h.first+h.size,j),function(ye){ye.markedSpans&&((z||(z=T["spans_"+h.id]={}))[$]=ye.markedSpans),++$})}function ri(h){if(!h)return null;for(var T,H=0;H<h.length;++H)h[H].marker.explicitlyCleared?T||(T=h.slice(0,H)):T&&T.push(h[H]);return T?T.length?T:null:h}function Ra(h,T){var H=T["spans_"+h.id];if(!H)return null;for(var j=[],z=0;z<T.text.length;++z)j.push(ri(H[z]));return j}function Vi(h,T){var H=Ra(h,T),j=ka(h,T);if(!H)return j;if(!j)return H;for(var z=0;z<H.length;++z){var $=H[z],ye=j[z];if($&&ye){e:for(var Ae=0;Ae<ye.length;++Ae){for(var De=ye[Ae],He=0;He<$.length;++He)if($[He].marker==De.marker)continue e;$.push(De)}}else ye&&(H[z]=ye)}return H}function qr(h,T,H){for(var j=[],z=0;z<h.length;++z){var $=h[z];if($.ranges){j.push(H?jt.prototype.deepCopy.call($):$);continue}var ye=$.changes,Ae=[];j.push({changes:Ae});for(var De=0;De<ye.length;++De){var He=ye[De],ht=void 0;if(Ae.push({from:He.from,to:He.to,text:He.text}),T)for(var Et in He)(ht=Et.match(/^spans_(\d+)$/))&&(re(T,Number(ht[1]))>-1&&(se(Ae)[Et]=He[Et],delete He[Et]))}}return j}function li(h,T,H,j){if(j){var z=h.anchor;if(H){var $=xn(T,z)<0;$!=xn(H,z)<0?(z=T,T=H):$!=xn(T,H)<0&&(T=H)}return new kt(z,T)}else return new kt(H||T,T)}function Gn(h,T,H,j,z){z==null&&(z=h.cm&&(h.cm.display.shift||h.extend)),mi(h,new jt([li(h.sel.primary(),T,H,z)],0),j)}function kr(h,T,H){for(var j=[],z=h.cm&&(h.cm.display.shift||h.extend),$=0;$<h.sel.ranges.length;$++)j[$]=li(h.sel.ranges[$],T[$],null,z);var ye=zt(h.cm,j,h.sel.primIndex);mi(h,ye,H)}function Li(h,T,H,j){var z=h.sel.ranges.slice(0);z[T]=H,mi(h,zt(h.cm,z,h.sel.primIndex),j)}function Ri(h,T,H,j){mi(h,qt(T,H),j)}function uo(h,T,H){var j={ranges:T.ranges,update:function(z){this.ranges=[];for(var $=0;$<z.length;$++)this.ranges[$]=new kt(V(h,z[$].anchor),V(h,z[$].head))},origin:H&&H.origin};return Xe(h,"beforeSelectionChange",h,j),h.cm&&Xe(h.cm,"beforeSelectionChange",h.cm,j),j.ranges!=T.ranges?zt(h.cm,j.ranges,j.ranges.length-1):T}function Da(h,T,H){var j=h.history.done,z=se(j);z&&z.ranges?(j[j.length-1]=T,za(h,T,H)):mi(h,T,H)}function mi(h,T,H){za(h,T,H),ar(h,h.sel,h.cm?h.cm.curOp.id:NaN,H)}function za(h,T,H){(Me(h,"beforeSelectionChange")||h.cm&&Me(h.cm,"beforeSelectionChange"))&&(T=uo(h,T,H));var j=H&&H.bias||(xn(T.primary().head,h.sel.primary().head)<0?-1:1);na(h,zo(h,T,j,!0)),!(H&&H.scroll===!1)&&h.cm&&vs(h.cm)}function na(h,T){if(T.equals(h.sel))return;h.sel=T,h.cm&&(h.cm.curOp.updateInput=1,h.cm.curOp.selectionChanged=!0,Ye(h.cm)),tn(h,"cursorActivity",h)}function la(h){na(h,zo(h,h.sel,null,!1))}function zo(h,T,H,j){for(var z,$=0;$<T.ranges.length;$++){var ye=T.ranges[$],Ae=T.ranges.length==h.sel.ranges.length&&h.sel.ranges[$],De=ya(h,ye.anchor,Ae&&Ae.anchor,H,j),He=ya(h,ye.head,Ae&&Ae.head,H,j);(z||De!=ye.anchor||He!=ye.head)&&(z||(z=T.ranges.slice(0,$)),z[$]=new kt(De,He))}return z?zt(h.cm,z,T.primIndex):T}function co(h,T,H,j,z){var $=$t(h,T.line);if($.markedSpans)for(var ye=0;ye<$.markedSpans.length;++ye){var Ae=$.markedSpans[ye],De=Ae.marker,He="selectLeft"in De?!De.selectLeft:De.inclusiveLeft,ht="selectRight"in De?!De.selectRight:De.inclusiveRight;if((Ae.from==null||(He?Ae.from<=T.ch:Ae.from<T.ch))&&(Ae.to==null||(ht?Ae.to>=T.ch:Ae.to>T.ch))){if(z&&(Xe(De,"beforeCursorEnter"),De.explicitlyCleared))if($.markedSpans){--ye;continue}else break;if(!De.atomic)continue;if(H){var Et=De.find(j<0?1:-1),Kt=void 0;if((j<0?ht:He)&&(Et=eo(h,Et,-j,Et&&Et.line==T.line?$:null)),Et&&Et.line==T.line&&(Kt=xn(Et,H))&&(j<0?Kt<0:Kt>0))return co(h,Et,T,j,z)}var Ft=De.find(j<0?-1:1);return(j<0?He:ht)&&(Ft=eo(h,Ft,j,Ft.line==T.line?$:null)),Ft?co(h,Ft,T,j,z):null}}return T}function ya(h,T,H,j,z){var $=j||1,ye=co(h,T,H,$,z)||!z&&co(h,T,H,$,!0)||co(h,T,H,-$,z)||!z&&co(h,T,H,-$,!0);return ye||(h.cantEdit=!0,Xt(h.first,0))}function eo(h,T,H,j){return H<0&&T.ch==0?T.line>h.first?V(h,Xt(T.line-1)):null:H>0&&T.ch==(j||$t(h,T.line)).text.length?T.line<h.first+h.size-1?Xt(T.line+1,0):null:new Xt(T.line,T.ch+H)}function ho(h){h.setSelection(Xt(h.firstLine(),0),Xt(h.lastLine()),ke)}function _o(h,T,H){var j={canceled:!1,from:T.from,to:T.to,text:T.text,origin:T.origin,cancel:function(){return j.canceled=!0}};return H&&(j.update=function(z,$,ye,Ae){z&&(j.from=V(h,z)),$&&(j.to=V(h,$)),ye&&(j.text=ye),Ae!==void 0&&(j.origin=Ae)}),Xe(h,"beforeChange",h,j),h.cm&&Xe(h.cm,"beforeChange",h.cm,j),j.canceled?(h.cm&&(h.cm.curOp.updateInput=2),null):{from:j.from,to:j.to,text:j.text,origin:j.origin}}function Pa(h,T,H){if(h.cm){if(!h.cm.curOp)return sa(h.cm,Pa)(h,T,H);if(h.cm.state.suppressEdits)return}if((Me(h,"beforeChange")||h.cm&&Me(h.cm,"beforeChange"))&&(T=_o(h,T,!0),!T))return;var j=qi&&!H&&Nr(h,T.from,T.to);if(j)for(var z=j.length-1;z>=0;--z)Ga(h,{from:j[z].from,to:j[z].to,text:z?[""]:T.text,origin:T.origin});else Ga(h,T)}function Ga(h,T){if(T.text.length==1&&T.text[0]==""&&xn(T.from,T.to)==0)return;var H=Sn(h,T);yn(h,T,H,h.cm?h.cm.curOp.id:NaN),Ui(h,T,H,ka(h,T));var j=[];rn(h,function(z,$){!$&&re(j,z.history)==-1&&(fa(z.history,T),j.push(z.history)),Ui(z,T,null,ka(z,T))})}function Hr(h,T,H){var j=h.cm&&h.cm.state.suppressEdits;if(j&&!H)return;for(var z=h.history,$,ye=h.sel,Ae=T=="undo"?z.done:z.undone,De=T=="undo"?z.undone:z.done,He=0;He<Ae.length&&!($=Ae[He],H?$.ranges&&!$.equals(h.sel):!$.ranges);He++);if(He==Ae.length)return;for(z.lastOrigin=z.lastSelOrigin=null;;)if($=Ae.pop(),$.ranges){if(Br($,De),H&&!$.equals(h.sel)){mi(h,$,{clearRedo:!1});return}ye=$}else if(j){Ae.push($);return}else break;var ht=[];Br(ye,De),De.push({changes:ht,generation:z.generation}),z.generation=$.generation||++z.maxGeneration;for(var Et=Me(h,"beforeChange")||h.cm&&Me(h.cm,"beforeChange"),Kt=function(on){var En=$.changes[on];if(En.origin=T,Et&&!_o(h,En,!1))return Ae.length=0,{};ht.push(Bn(h,En));var Ln=on?Sn(h,En):se(Ae);Ui(h,En,Ln,Vi(h,En)),!on&&h.cm&&h.cm.scrollIntoView({from:En.from,to:sn(En)});var Vn=[];rn(h,function(Mn,Zn){!Zn&&re(Vn,Mn.history)==-1&&(fa(Mn.history,En),Vn.push(Mn.history)),Ui(Mn,En,null,Vi(Mn,En))})},Ft=$.changes.length-1;Ft>=0;--Ft){var en=Kt(Ft);if(en)return en.v}}function yr(h,T){if(T==0)return;if(h.first+=T,h.sel=new jt(be(h.sel.ranges,function(z){return new kt(Xt(z.anchor.line+T,z.anchor.ch),Xt(z.head.line+T,z.head.ch))}),h.sel.primIndex),h.cm){ji(h.cm,h.first,h.first-T,T);for(var H=h.cm.display,j=H.viewFrom;j<H.viewTo;j++)oa(h.cm,j,"gutter")}}function Ui(h,T,H,j){if(h.cm&&!h.cm.curOp)return sa(h.cm,Ui)(h,T,H,j);if(T.to.line<h.first){yr(h,T.text.length-1-(T.to.line-T.from.line));return}if(T.from.line>h.lastLine())return;if(T.from.line<h.first){var z=T.text.length-1-(h.first-T.from.line);yr(h,z),T={from:Xt(h.first,0),to:Xt(T.to.line+z,T.to.ch),text:[se(T.text)],origin:T.origin}}var $=h.lastLine();T.to.line>$&&(T={from:T.from,to:Xt($,$t(h,$).text.length),text:[T.text[0]],origin:T.origin}),T.removed=Kn(h,T.from,T.to),H||(H=Sn(h,T)),h.cm?Po(h.cm,T,j):gt(h,T,j),za(h,H,ke),h.cantEdit&&ya(h,Xt(h.firstLine(),0))&&(h.cantEdit=!1)}function Po(h,T,H){var j=h.doc,z=h.display,$=T.from,ye=T.to,Ae=!1,De=$.line;h.options.lineWrapping||(De=wn($i($t(j,$.line))),j.iter(De,ye.line+1,function(Ft){if(Ft==z.maxLine)return Ae=!0,!0})),j.sel.contains(T.from,T.to)>-1&&Ye(h),gt(j,T,H,To(h)),h.options.lineWrapping||(j.iter(De,$.line+T.text.length,function(Ft){var en=go(Ft);en>z.maxLineLength&&(z.maxLine=Ft,z.maxLineLength=en,z.maxLineChanged=!0,Ae=!1)}),Ae&&(h.curOp.updateMaxLine=!0)),xr(j,$.line),As(h,400);var He=T.text.length-(ye.line-$.line)-1;T.full?ji(h):$.line==ye.line&&T.text.length==1&&!Nn(h.doc,T)?oa(h,$.line,"text"):ji(h,$.line,ye.line+1,He);var ht=Me(h,"changes"),Et=Me(h,"change");if(Et||ht){var Kt={from:$,to:ye,text:T.text,removed:T.removed,origin:T.origin};Et&&tn(h,"change",h,Kt),ht&&(h.curOp.changeObjs||(h.curOp.changeObjs=[])).push(Kt)}h.display.selForContextMenu=null}function Va(h,T,H,j,z){var $;j||(j=H),xn(j,H)<0&&($=[j,H],H=$[0],j=$[1]),typeof T=="string"&&(T=h.splitLines(T)),Pa(h,{from:H,to:j,text:T,origin:z})}function ui(h,T,H,j){H<h.line?h.line+=j:T<h.line&&(h.line=T,h.ch=0)}function Ci(h,T,H,j){for(var z=0;z<h.length;++z){var $=h[z],ye=!0;if($.ranges){$.copied||($=h[z]=$.deepCopy(),$.copied=!0);for(var Ae=0;Ae<$.ranges.length;Ae++)ui($.ranges[Ae].anchor,T,H,j),ui($.ranges[Ae].head,T,H,j);continue}for(var De=0;De<$.changes.length;++De){var He=$.changes[De];if(H<He.from.line)He.from=Xt(He.from.line+j,He.from.ch),He.to=Xt(He.to.line+j,He.to.ch);else if(T<=He.to.line){ye=!1;break}}ye||(h.splice(0,z+1),z=0)}}function fa(h,T){var H=T.from.line,j=T.to.line,z=T.text.length-(j-H)-1;Ci(h.done,H,j,z),Ci(h.undone,H,j,z)}function ua(h,T,H,j){var z=T,$=T;return typeof T=="number"?$=$t(h,ue(h,T)):z=wn(T),z==null?null:(j($,z)&&h.cm&&oa(h.cm,z,H),$)}function Ya(h){this.lines=h,this.parent=null;for(var T=0,H=0;H<h.length;++H)h[H].parent=this,T+=h[H].height;this.height=T}Ya.prototype={chunkSize:function(){return this.lines.length},removeInner:function(h,T){for(var H=h,j=h+T;H<j;++H){var z=this.lines[H];this.height-=z.height,Qn(z),tn(z,"delete")}this.lines.splice(h,T)},collapse:function(h){h.push.apply(h,this.lines)},insertInner:function(h,T,H){this.height+=H,this.lines=this.lines.slice(0,h).concat(T).concat(this.lines.slice(h));for(var j=0;j<T.length;++j)T[j].parent=this},iterN:function(h,T,H){for(var j=h+T;h<j;++h)if(H(this.lines[h]))return!0}};function to(h){this.children=h;for(var T=0,H=0,j=0;j<h.length;++j){var z=h[j];T+=z.chunkSize(),H+=z.height,z.parent=this}this.size=T,this.height=H,this.parent=null}to.prototype={chunkSize:function(){return this.size},removeInner:function(h,T){this.size-=T;for(var H=0;H<this.children.length;++H){var j=this.children[H],z=j.chunkSize();if(h<z){var $=Math.min(T,z-h),ye=j.height;if(j.removeInner(h,$),this.height-=ye-j.height,z==$&&(this.children.splice(H--,1),j.parent=null),(T-=$)==0)break;h=0}else h-=z}if(this.size-T<25&&(this.children.length>1||!(this.children[0]instanceof Ya))){var Ae=[];this.collapse(Ae),this.children=[new Ya(Ae)],this.children[0].parent=this}},collapse:function(h){for(var T=0;T<this.children.length;++T)this.children[T].collapse(h)},insertInner:function(h,T,H){this.size+=T.length,this.height+=H;for(var j=0;j<this.children.length;++j){var z=this.children[j],$=z.chunkSize();if(h<=$){if(z.insertInner(h,T,H),z.lines&&z.lines.length>50){for(var ye=z.lines.length%25+25,Ae=ye;Ae<z.lines.length;){var De=new Ya(z.lines.slice(Ae,Ae+=25));z.height-=De.height,this.children.splice(++j,0,De),De.parent=this}z.lines=z.lines.slice(0,ye),this.maybeSpill()}break}h-=$}},maybeSpill:function(){if(this.children.length<=10)return;var h=this;do{var T=h.children.splice(h.children.length-5,5),H=new to(T);if(h.parent){h.size-=H.size,h.height-=H.height;var z=re(h.parent.children,h);h.parent.children.splice(z+1,0,H)}else{var j=new to(h.children);j.parent=h,h.children=[j,H],h=j}H.parent=h.parent}while(h.children.length>10);h.parent.maybeSpill()},iterN:function(h,T,H){for(var j=0;j<this.children.length;++j){var z=this.children[j],$=z.chunkSize();if(h<$){var ye=Math.min(T,$-h);if(z.iterN(h,ye,H))return!0;if((T-=ye)==0)break;h=0}else h-=$}}};var wa=function(h,T,H){if(H)for(var j in H)H.hasOwnProperty(j)&&(this[j]=H[j]);this.doc=h,this.node=T};wa.prototype.clear=function(){var h=this.doc.cm,T=this.line.widgets,H=this.line,j=wn(H);if(j==null||!T)return;for(var z=0;z<T.length;++z)T[z]==this&&T.splice(z--,1);T.length||(H.widgets=null);var $=xa(this);Rn(H,Math.max(0,H.height-$)),h&&(lo(h,function(){Na(h,H,-$),oa(h,j,"widget")}),tn(h,"lineWidgetCleared",h,this,j))},wa.prototype.changed=function(){var h=this,T=this.height,H=this.doc.cm,j=this.line;this.height=null;var z=xa(this)-T;if(!z)return;ti(this.doc,j)||Rn(j,j.height+z),H&&lo(H,function(){H.curOp.forceUpdate=!0,Na(H,j,z),tn(H,"lineWidgetChanged",H,h,wn(j))})},Ke(wa);function Na(h,T,H){Ka(T)<(h.curOp&&h.curOp.scrollTop||h.doc.scrollTop)&&il(h,H)}function no(h,T,H,j){var z=new wa(h,H,j),$=h.cm;return $&&z.noHScroll&&($.display.alignWidgets=!0),ua(h,T,"widget",function(ye){var Ae=ye.widgets||(ye.widgets=[]);if(z.insertAt==null?Ae.push(z):Ae.splice(Math.min(Ae.length-1,Math.max(0,z.insertAt)),0,z),z.line=ye,$&&!ti(h,ye)){var De=Ka(ye)<h.scrollTop;Rn(ye,ye.height+xa(z)),De&&il($,z.height),$.curOp.forceUpdate=!0}return!0}),$&&tn($,"lineWidgetAdded",$,z,typeof T=="number"?T:wn(T)),z}var ci=0,Pr=function(h,T){this.lines=[],this.type=T,this.doc=h,this.id=++ci};Pr.prototype.clear=function(){if(this.explicitlyCleared)return;var h=this.doc.cm,T=h&&!h.curOp;if(T&&qo(h),Me(this,"clear")){var H=this.find();H&&tn(this,"clear",H.from,H.to)}for(var j=null,z=null,$=0;$<this.lines.length;++$){var ye=this.lines[$],Ae=ia(ye.markedSpans,this);h&&!this.collapsed?oa(h,wn(ye),"text"):h&&(Ae.to!=null&&(z=wn(ye)),Ae.from!=null&&(j=wn(ye))),ye.markedSpans=Ca(ye.markedSpans,Ae),Ae.from==null&&this.collapsed&&!ti(this.doc,ye)&&h&&Rn(ye,ha(h.display))}if(h&&this.collapsed&&!h.options.lineWrapping)for(var De=0;De<this.lines.length;++De){var He=$i(this.lines[De]),ht=go(He);ht>h.display.maxLineLength&&(h.display.maxLine=He,h.display.maxLineLength=ht,h.display.maxLineChanged=!0)}j!=null&&h&&this.collapsed&&ji(h,j,z+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,h&&la(h.doc)),h&&tn(h,"markerCleared",h,this,j,z),T&&us(h),this.parent&&this.parent.clear()},Pr.prototype.find=function(h,T){h==null&&this.type=="bookmark"&&(h=1);for(var H,j,z=0;z<this.lines.length;++z){var $=this.lines[z],ye=ia($.markedSpans,this);if(ye.from!=null&&(H=Xt(T?$:wn($),ye.from),h==-1))return H;if(ye.to!=null&&(j=Xt(T?$:wn($),ye.to),h==1))return j}return H&&{from:H,to:j}},Pr.prototype.changed=function(){var h=this,T=this.find(-1,!0),H=this,j=this.doc.cm;if(!T||!j)return;lo(j,function(){var z=T.line,$=wn(T.line),ye=Ot(j,$);if(ye&&(Vr(ye),j.curOp.selectionChanged=j.curOp.forceUpdate=!0),j.curOp.updateMaxLine=!0,!ti(H.doc,z)&&H.height!=null){var Ae=H.height;H.height=null;var De=xa(H)-Ae;De&&Rn(z,z.height+De)}tn(j,"markerChanged",j,h)})},Pr.prototype.attachLine=function(h){if(!this.lines.length&&this.doc.cm){var T=this.doc.cm.curOp;(!T.maybeHiddenMarkers||re(T.maybeHiddenMarkers,this)==-1)&&(T.maybeUnhiddenMarkers||(T.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(h)},Pr.prototype.detachLine=function(h){if(this.lines.splice(re(this.lines,h),1),!this.lines.length&&this.doc.cm){var T=this.doc.cm.curOp;(T.maybeHiddenMarkers||(T.maybeHiddenMarkers=[])).push(this)}},Ke(Pr);function Sr(h,T,H,j,z){if(j&&j.shared)return Hi(h,T,H,j,z);if(h.cm&&!h.cm.curOp)return sa(h.cm,Sr)(h,T,H,j,z);var $=new Pr(h,z),ye=xn(T,H);if(j&&P(j,$,!1),ye>0||ye==0&&$.clearWhenEmpty!==!1)return $;if($.replacedWith&&($.collapsed=!0,$.widgetNode=k("span",[$.replacedWith],"CodeMirror-widget"),j.handleMouseEvents||$.widgetNode.setAttribute("cm-ignore-events","true"),j.insertLeft&&($.widgetNode.insertLeft=!0)),$.collapsed){if(Mi(h,T.line,T,H,$)||T.line!=H.line&&Mi(h,H.line,T,H,$))throw new Error("Inserting collapsed marker partially overlapping an existing one");da()}$.addToHistory&&yn(h,{from:T,to:H,origin:"markText"},h.sel,NaN);var Ae=T.line,De=h.cm,He;if(h.iter(Ae,H.line+1,function(Et){De&&$.collapsed&&!De.options.lineWrapping&&$i(Et)==De.display.maxLine&&(He=!0),$.collapsed&&Ae!=T.line&&Rn(Et,0),po(Et,new Fi($,Ae==T.line?T.ch:null,Ae==H.line?H.ch:null)),++Ae}),$.collapsed&&h.iter(T.line,H.line+1,function(Et){ti(h,Et)&&Rn(Et,0)}),$.clearOnEnter&&Le($,"beforeCursorEnter",function(){return $.clear()}),$.readOnly&&(ai(),(h.history.done.length||h.history.undone.length)&&h.clearHistory()),$.collapsed&&($.id=++ci,$.atomic=!0),De){if(He&&(De.curOp.updateMaxLine=!0),$.collapsed)ji(De,T.line,H.line+1);else if($.className||$.startStyle||$.endStyle||$.css||$.attributes||$.title)for(var ht=T.line;ht<=H.line;ht++)oa(De,ht,"text");$.atomic&&la(De.doc),tn(De,"markerAdded",De,$)}return $}var Bi=function(h,T){this.markers=h,this.primary=T;for(var H=0;H<h.length;++H)h[H].parent=this};Bi.prototype.clear=function(){if(this.explicitlyCleared)return;this.explicitlyCleared=!0;for(var h=0;h<this.markers.length;++h)this.markers[h].clear();tn(this,"clear")},Bi.prototype.find=function(h,T){return this.primary.find(h,T)},Ke(Bi);function Hi(h,T,H,j,z){j=P(j),j.shared=!1;var $=[Sr(h,T,H,j,z)],ye=$[0],Ae=j.widgetNode;return rn(h,function(De){Ae&&(j.widgetNode=Ae.cloneNode(!0)),$.push(Sr(De,V(De,T),V(De,H),j,z));for(var He=0;He<De.linked.length;++He)if(De.linked[He].isParent)return;ye=se($)}),new Bi($,ye)}function ur(h){return h.findMarks(Xt(h.first,0),h.clipPos(Xt(h.lastLine())),function(T){return T.parent})}function Or(h,T){for(var H=0;H<T.length;H++){var j=T[H],z=j.find(),$=h.clipPos(z.from),ye=h.clipPos(z.to);if(xn($,ye)){var Ae=Sr(h,$,ye,j.primary,j.primary.type);j.markers.push(Ae),Ae.parent=j}}}function Rr(h){for(var T=function(j){var z=h[j],$=[z.primary.doc];rn(z.primary.doc,function(De){return $.push(De)});for(var ye=0;ye<z.markers.length;ye++){var Ae=z.markers[ye];re($,Ae.doc)==-1&&(Ae.parent=null,z.markers.splice(ye--,1))}},H=0;H<h.length;H++)T(H)}var Ei=0,br=function(h,T,H,j,z){if(!(this instanceof br))return new br(h,T,H,j,z);H==null&&(H=0),to.call(this,[new Ya([new Wa("",null)])]),this.first=H,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=H;var $=Xt(H,0);this.sel=qt($),this.history=new zn(null),this.id=++Ei,this.modeOption=T,this.lineSep=j,this.direction=z=="rtl"?"rtl":"ltr",this.extend=!1,typeof h=="string"&&(h=this.splitLines(h)),gt(this,{from:$,to:$,text:h}),mi(this,qt($),ke)};br.prototype=Fe(to.prototype,{constructor:br,iter:function(h,T,H){H?this.iterN(h-this.first,T-h,H):this.iterN(this.first,this.first+this.size,h)},insert:function(h,T){for(var H=0,j=0;j<T.length;++j)H+=T[j].height;this.insertInner(h-this.first,T,H)},remove:function(h,T){this.removeInner(h-this.first,T)},getValue:function(h){var T=hn(this,this.first,this.first+this.size);return h===!1?T:T.join(h||this.lineSeparator())},setValue:_a(function(h){var T=Xt(this.first,0),H=this.first+this.size-1;Pa(this,{from:T,to:Xt(H,$t(this,H).text.length),text:this.splitLines(h),origin:"setValue",full:!0},!0),this.cm&&as(this.cm,0,0),mi(this,qt(T),ke)}),replaceRange:function(h,T,H,j){T=V(this,T),H=H?V(this,H):T,Va(this,h,T,H,j)},getRange:function(h,T,H){var j=Kn(this,V(this,h),V(this,T));return H===!1?j:j.join(H||this.lineSeparator())},getLine:function(h){var T=this.getLineHandle(h);return T&&T.text},getLineHandle:function(h){if(Yn(this,h))return $t(this,h)},getLineNumber:function(h){return wn(h)},getLineHandleVisualStart:function(h){return typeof h=="number"&&(h=$t(this,h)),$i(h)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(h){return V(this,h)},getCursor:function(h){var T=this.sel.primary(),H;return h==null||h=="head"?H=T.head:h=="anchor"?H=T.anchor:h=="end"||h=="to"||h===!1?H=T.to():H=T.from(),H},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:_a(function(h,T,H){Ri(this,V(this,typeof h=="number"?Xt(h,T||0):h),null,H)}),setSelection:_a(function(h,T,H){Ri(this,V(this,h),V(this,T||h),H)}),extendSelection:_a(function(h,T,H){Gn(this,V(this,h),T&&V(this,T),H)}),extendSelections:_a(function(h,T){kr(this,ee(this,h),T)}),extendSelectionsBy:_a(function(h,T){var H=be(this.sel.ranges,h);kr(this,ee(this,H),T)}),setSelections:_a(function(h,T,H){if(!h.length)return;for(var j=[],z=0;z<h.length;z++)j[z]=new kt(V(this,h[z].anchor),V(this,h[z].head));T==null&&(T=Math.min(h.length-1,this.sel.primIndex)),mi(this,zt(this.cm,j,T),H)}),addSelection:_a(function(h,T,H){var j=this.sel.ranges.slice(0);j.push(new kt(V(this,h),V(this,T||h))),mi(this,zt(this.cm,j,j.length-1),H)}),getSelection:function(h){for(var T=this.sel.ranges,H,j=0;j<T.length;j++){var z=Kn(this,T[j].from(),T[j].to());H=H?H.concat(z):z}return h===!1?H:H.join(h||this.lineSeparator())},getSelections:function(h){for(var T=[],H=this.sel.ranges,j=0;j<H.length;j++){var z=Kn(this,H[j].from(),H[j].to());h!==!1&&(z=z.join(h||this.lineSeparator())),T[j]=z}return T},replaceSelection:function(h,T,H){for(var j=[],z=0;z<this.sel.ranges.length;z++)j[z]=h;this.replaceSelections(j,T,H||"+input")},replaceSelections:_a(function(h,T,H){for(var j=[],z=this.sel,$=0;$<z.ranges.length;$++){var ye=z.ranges[$];j[$]={from:ye.from(),to:ye.to(),text:this.splitLines(h[$]),origin:H}}for(var Ae=T&&T!="end"&&_n(this,j,T),De=j.length-1;De>=0;De--)Pa(this,j[De]);Ae?Da(this,Ae):this.cm&&vs(this.cm)}),undo:_a(function(){Hr(this,"undo")}),redo:_a(function(){Hr(this,"redo")}),undoSelection:_a(function(){Hr(this,"undo",!0)}),redoSelection:_a(function(){Hr(this,"redo",!0)}),setExtending:function(h){this.extend=h},getExtending:function(){return this.extend},historySize:function(){for(var h=this.history,T=0,H=0,j=0;j<h.done.length;j++)h.done[j].ranges||++T;for(var z=0;z<h.undone.length;z++)h.undone[z].ranges||++H;return{undo:T,redo:H}},clearHistory:function(){var h=this;this.history=new zn(this.history.maxGeneration),rn(this,function(T){return T.history=h.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(h){return h&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(h){return this.history.generation==(h||this.cleanGeneration)},getHistory:function(){return{done:qr(this.history.done),undone:qr(this.history.undone)}},setHistory:function(h){var T=this.history=new zn(this.history.maxGeneration);T.done=qr(h.done.slice(0),null,!0),T.undone=qr(h.undone.slice(0),null,!0)},setGutterMarker:_a(function(h,T,H){return ua(this,h,"gutter",function(j){var z=j.gutterMarkers||(j.gutterMarkers={});return z[T]=H,!H&&q(z)&&(j.gutterMarkers=null),!0})}),clearGutter:_a(function(h){var T=this;this.iter(function(H){H.gutterMarkers&&H.gutterMarkers[h]&&ua(T,H,"gutter",function(){return H.gutterMarkers[h]=null,q(H.gutterMarkers)&&(H.gutterMarkers=null),!0})})}),lineInfo:function(h){var T;if(typeof h=="number"){if(!Yn(this,h))return null;if(T=h,h=$t(this,h),!h)return null}else if(T=wn(h),T==null)return null;return{line:T,handle:h,text:h.text,gutterMarkers:h.gutterMarkers,textClass:h.textClass,bgClass:h.bgClass,wrapClass:h.wrapClass,widgets:h.widgets}},addLineClass:_a(function(h,T,H){return ua(this,h,T=="gutter"?"gutter":"class",function(j){var z=T=="text"?"textClass":T=="background"?"bgClass":T=="gutter"?"gutterClass":"wrapClass";if(!j[z])j[z]=H;else{if(C(H).test(j[z]))return!1;j[z]+=" "+H}return!0})}),removeLineClass:_a(function(h,T,H){return ua(this,h,T=="gutter"?"gutter":"class",function(j){var z=T=="text"?"textClass":T=="background"?"bgClass":T=="gutter"?"gutterClass":"wrapClass",$=j[z];if($)if(H==null)j[z]=null;else{var ye=$.match(C(H));if(!ye)return!1;var Ae=ye.index+ye[0].length;j[z]=$.slice(0,ye.index)+(!ye.index||Ae==$.length?"":" ")+$.slice(Ae)||null}else return!1;return!0})}),addLineWidget:_a(function(h,T,H){return no(this,h,T,H)}),removeLineWidget:function(h){h.clear()},markText:function(h,T,H){return Sr(this,V(this,h),V(this,T),H,H&&H.type||"range")},setBookmark:function(h,T){var H={replacedWith:T&&(T.nodeType==null?T.widget:T),insertLeft:T&&T.insertLeft,clearWhenEmpty:!1,shared:T&&T.shared,handleMouseEvents:T&&T.handleMouseEvents};return h=V(this,h),Sr(this,h,h,H,"bookmark")},findMarksAt:function(h){h=V(this,h);var T=[],H=$t(this,h.line).markedSpans;if(H)for(var j=0;j<H.length;++j){var z=H[j];(z.from==null||z.from<=h.ch)&&(z.to==null||z.to>=h.ch)&&T.push(z.marker.parent||z.marker)}return T},findMarks:function(h,T,H){h=V(this,h),T=V(this,T);var j=[],z=h.line;return this.iter(h.line,T.line+1,function($){var ye=$.markedSpans;if(ye)for(var Ae=0;Ae<ye.length;Ae++){var De=ye[Ae];!(De.to!=null&&z==h.line&&h.ch>=De.to||De.from==null&&z!=h.line||De.from!=null&&z==T.line&&De.from>=T.ch)&&(!H||H(De.marker))&&j.push(De.marker.parent||De.marker)}++z}),j},getAllMarks:function(){var h=[];return this.iter(function(T){var H=T.markedSpans;if(H)for(var j=0;j<H.length;++j)H[j].from!=null&&h.push(H[j].marker)}),h},posFromIndex:function(h){var T,H=this.first,j=this.lineSeparator().length;return this.iter(function(z){var $=z.text.length+j;if($>h)return T=h,!0;h-=$,++H}),V(this,Xt(H,T))},indexFromPos:function(h){h=V(this,h);var T=h.ch;if(h.line<this.first||h.ch<0)return 0;var H=this.lineSeparator().length;return this.iter(this.first,h.line,function(j){T+=j.text.length+H}),T},copy:function(h){var T=new br(hn(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,h&&(T.history.undoDepth=this.history.undoDepth,T.setHistory(this.getHistory())),T},linkedDoc:function(h){h||(h={});var T=this.first,H=this.first+this.size;h.from!=null&&h.from>T&&(T=h.from),h.to!=null&&h.to<H&&(H=h.to);var j=new br(hn(this,T,H),h.mode||this.modeOption,T,this.lineSep,this.direction);return h.sharedHist&&(j.history=this.history),(this.linked||(this.linked=[])).push({doc:j,sharedHist:h.sharedHist}),j.linked=[{doc:this,isParent:!0,sharedHist:h.sharedHist}],Or(j,ur(this)),j},unlinkDoc:function(h){if(h instanceof ca&&(h=h.doc),this.linked)for(var T=0;T<this.linked.length;++T){var H=this.linked[T];if(H.doc!=h)continue;this.linked.splice(T,1),h.unlinkDoc(this),Rr(ur(this));break}if(h.history==this.history){var j=[h.id];rn(h,function(z){return j.push(z.id)},!0),h.history=new zn(null),h.history.done=qr(this.history.done,j),h.history.undone=qr(this.history.undone,j)}},iterLinkedDocs:function(h){rn(this,h)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(h){return this.lineSep?h.split(this.lineSep):wt(h)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:_a(function(h){if(h!="rtl"&&(h="ltr"),h==this.direction)return;this.direction=h,this.iter(function(T){return T.order=null}),this.cm&&Un(this.cm)})}),br.prototype.eachLine=br.prototype.iter;var Ti=0;function $o(h){var T=this;if(ro(T),et(T,h)||Wo(T.display,h))return;ge(h),g&&(Ti=+new Date);var H=Aa(T,h,!0),j=h.dataTransfer.files;if(!H||T.isReadOnly())return;if(j&&j.length&&window.FileReader&&window.File)for(var z=j.length,$=Array(z),ye=0,Ae=function(){++ye==z&&sa(T,function(){H=V(T.doc,H);var Ft={from:H,to:H,text:T.doc.splitLines($.filter(function(en){return en!=null}).join(T.doc.lineSeparator())),origin:"paste"};Pa(T.doc,Ft),Da(T.doc,qt(V(T.doc,H),V(T.doc,sn(Ft))))})()},De=function(Ft,en){if(T.options.allowDropFileTypes&&re(T.options.allowDropFileTypes,Ft.type)==-1){Ae();return}var on=new FileReader;on.onerror=function(){return Ae()},on.onload=function(){var En=on.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(En)){Ae();return}$[en]=En,Ae()},on.readAsText(Ft)},He=0;He<j.length;He++)De(j[He],He);else{if(T.state.draggingText&&T.doc.sel.contains(H)>-1){T.state.draggingText(h),setTimeout(function(){return T.display.input.focus()},20);return}try{var ht=h.dataTransfer.getData("Text");if(ht){var Et;if(T.state.draggingText&&!T.state.draggingText.copy&&(Et=T.listSelections()),za(T.doc,qt(H,H)),Et)for(var Kt=0;Kt<Et.length;++Kt)Va(T.doc,"",Et[Kt].anchor,Et[Kt].head,"drag");T.replaceSelection(ht,"around","paste"),T.display.input.focus()}}catch(Ft){}}}function Qa(h,T){if(g&&(!h.state.draggingText||+new Date-Ti<100)){je(T);return}if(et(h,T)||Wo(h.display,T))return;if(T.dataTransfer.setData("Text",h.getSelection()),T.dataTransfer.effectAllowed="copyMove",T.dataTransfer.setDragImage&&!t){var H=R("img",null,null,"position: fixed; left: 0; top: 0;");H.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s&&(H.width=H.height=1,h.display.wrapper.appendChild(H),H._top=H.offsetTop),T.dataTransfer.setDragImage(H,0,0),s&&H.parentNode.removeChild(H)}}function ds(h,T){var H=Aa(h,T);if(!H)return;var j=document.createDocumentFragment();Qo(h,H,j),h.display.dragCursor||(h.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),h.display.lineSpace.insertBefore(h.display.dragCursor,h.display.cursorDiv)),A(h.display.dragCursor,j)}function ro(h){h.display.dragCursor&&(h.display.lineSpace.removeChild(h.display.dragCursor),h.display.dragCursor=null)}function Bs(h){if(!document.getElementsByClassName)return;for(var T=document.getElementsByClassName("CodeMirror"),H=[],j=0;j<T.length;j++){var z=T[j].CodeMirror;z&&H.push(z)}H.length&&H[0].operation(function(){for(var $=0;$<H.length;$++)h(H[$])})}var Go=!1;function Os(){if(Go)return;Wl(),Go=!0}function Wl(){var h;Le(window,"resize",function(){h==null&&(h=setTimeout(function(){h=null,Bs(ul)},100))}),Le(window,"blur",function(){return Bs(is)})}function ul(h){var T=h.display;T.cachedCharWidth=T.cachedTextHeight=T.cachedPaddingH=null,T.scrollbarsClipped=!1,h.setSize()}for(var es={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},hs=0;hs<10;hs++)es[hs+48]=es[hs+96]=String(hs);for(var Hs=65;Hs<=90;Hs++)es[Hs]=String.fromCharCode(Hs);for(var ts=1;ts<=12;ts++)es[ts+111]=es[ts+63235]="F"+ts;var yo={};yo.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"},yo.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"},yo.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"},yo.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"]},yo.default=f?yo.macDefault:yo.pcDefault;function Al(h){var T=h.split(/-(?!$)/);h=T[T.length-1];for(var H,j,z,$,ye=0;ye<T.length-1;ye++){var Ae=T[ye];if(/^(cmd|meta|m)$/i.test(Ae))$=!0;else if(/^a(lt)?$/i.test(Ae))H=!0;else if(/^(c|ctrl|control)$/i.test(Ae))j=!0;else if(/^s(hift)?$/i.test(Ae))z=!0;else throw new Error("Unrecognized modifier name: "+Ae)}return H&&(h="Alt-"+h),j&&(h="Ctrl-"+h),$&&(h="Cmd-"+h),z&&(h="Shift-"+h),h}function cl(h){var T={};for(var H in h)if(h.hasOwnProperty(H)){var j=h[H];if(/^(name|fallthrough|(de|at)tach)$/.test(H))continue;if(j=="..."){delete h[H];continue}for(var z=be(H.split(" "),Al),$=0;$<z.length;$++){var ye=void 0,Ae=void 0;$==z.length-1?(Ae=z.join(" "),ye=j):(Ae=z.slice(0,$+1).join(" "),ye="...");var De=T[Ae];if(!De)T[Ae]=ye;else if(De!=ye)throw new Error("Inconsistent bindings for "+Ae)}delete h[H]}for(var He in T)h[He]=T[He];return h}function ns(h,T,H,j){T=Ks(T);var z=T.call?T.call(h,j):T[h];if(z===!1)return"nothing";if(z==="...")return"multi";if(z!=null&&H(z))return"handled";if(T.fallthrough){if(Object.prototype.toString.call(T.fallthrough)!="[object Array]")return ns(h,T.fallthrough,H,j);for(var $=0;$<T.fallthrough.length;$++){var ye=ns(h,T.fallthrough[$],H,j);if(ye)return ye}}}function bs(h){var T=typeof h=="string"?h:es[h.keyCode];return T=="Ctrl"||T=="Alt"||T=="Shift"||T=="Mod"}function dl(h,T,H){var j=h;return T.altKey&&j!="Alt"&&(h="Alt-"+h),(b?T.metaKey:T.ctrlKey)&&j!="Ctrl"&&(h="Ctrl-"+h),(b?T.ctrlKey:T.metaKey)&&j!="Mod"&&(h="Cmd-"+h),!H&&T.shiftKey&&j!="Shift"&&(h="Shift-"+h),h}function Ol(h,T){if(s&&h.keyCode==34&&h.char)return!1;var H=es[h.keyCode];return H==null||h.altGraphKey?!1:(h.keyCode==3&&h.code&&(H=h.code),dl(H,h,T))}function Ks(h){return typeof h=="string"?yo[h]:h}function rs(h,T){for(var H=h.doc.sel.ranges,j=[],z=0;z<H.length;z++){for(var $=T(H[z]);j.length&&xn($.from,se(j).to)<=0;){var ye=j.pop();if(xn(ye.from,$.from)<0){$.from=ye.from;break}}j.push($)}lo(h,function(){for(var Ae=j.length-1;Ae>=0;Ae--)Va(h.doc,"",j[Ae].from,j[Ae].to,"+delete");vs(h)})}function Ws(h,T,H){var j=Te(h.text,T+H,H);return j<0||j>h.text.length?null:j}function hl(h,T,H){var j=Ws(h,T.ch,H);return j==null?null:new Xt(T.line,j,H<0?"after":"before")}function fl(h,T,H,j,z){if(h){T.doc.direction=="rtl"&&(z=-z);var $=tt(H,T.doc.direction);if($){var ye=z<0?se($):$[0],Ae=z<0==(ye.level==1),De=Ae?"after":"before",He;if(ye.level>0||T.doc.direction=="rtl"){var ht=Tt(T,H);He=z<0?H.text.length-1:0;var Et=Ut(T,ht,He).top;He=Ne(function(Kt){return Ut(T,ht,Kt).top==Et},z<0==(ye.level==1)?ye.from:ye.to-1,He),De=="before"&&(He=Ws(H,He,1))}else He=z<0?ye.to:ye.from;return new Xt(j,He,De)}}return new Xt(j,z<0?H.text.length:0,z<0?"before":"after")}function Ur(h,T,H,j){var z=tt(T,h.doc.direction);if(!z)return hl(T,H,j);H.ch>=T.text.length?(H.ch=T.text.length,H.sticky="before"):H.ch<=0&&(H.ch=0,H.sticky="after");var $=_e(z,H.ch,H.sticky),ye=z[$];if(h.doc.direction=="ltr"&&ye.level%2==0&&(j>0?ye.to>H.ch:ye.from<H.ch))return hl(T,H,j);var Ae=function(Ln,Vn){return Ws(T,Ln instanceof Xt?Ln.ch:Ln,Vn)},De,He=function(Ln){return h.options.lineWrapping?(De=De||Tt(h,T),$n(h,T,De,Ln)):{begin:0,end:T.text.length}},ht=He(H.sticky=="before"?Ae(H,-1):H.ch);if(h.doc.direction=="rtl"||ye.level==1){var Et=ye.level==1==j<0,Kt=Ae(H,Et?1:-1);if(Kt!=null&&(Et?Kt<=ye.to&&Kt<=ht.end:Kt>=ye.from&&Kt>=ht.begin)){var Ft=Et?"before":"after";return new Xt(H.line,Kt,Ft)}}var en=function(Ln,Vn,Mn){for(var Zn=function(ra,ao){return ao?new Xt(H.line,Ae(ra,1),"before"):new Xt(H.line,ra,"after")};Ln>=0&&Ln<z.length;Ln+=Vn){var Cr=z[Ln],pr=Vn>0==(Cr.level!=1),ii=pr?Mn.begin:Ae(Mn.end,-1);if(Cr.from<=ii&&ii<Cr.to)return Zn(ii,pr);if(ii=pr?Cr.from:Ae(Cr.to,-1),Mn.begin<=ii&&ii<Mn.end)return Zn(ii,pr)}},on=en($+j,j,ht);if(on)return on;var En=j>0?ht.end:Ae(ht.begin,-1);return En!=null&&!(j>0&&En==T.text.length)&&(on=en(j>0?0:z.length-1,j,He(En)),on)?on:null}var _i={selectAll:ho,singleSelection:function(h){return h.setSelection(h.getCursor("anchor"),h.getCursor("head"),ke)},killLine:function(h){return rs(h,function(T){if(T.empty()){var H=$t(h.doc,T.head.line).text.length;return T.head.ch==H&&T.head.line<h.lastLine()?{from:T.head,to:Xt(T.head.line+1,0)}:{from:T.head,to:Xt(T.head.line,H)}}else return{from:T.from(),to:T.to()}})},deleteLine:function(h){return rs(h,function(T){return{from:Xt(T.from().line,0),to:V(h.doc,Xt(T.to().line+1,0))}})},delLineLeft:function(h){return rs(h,function(T){return{from:Xt(T.from().line,0),to:T.from()}})},delWrappedLineLeft:function(h){return rs(h,function(T){var H=h.charCoords(T.head,"div").top+5,j=h.coordsChar({left:0,top:H},"div");return{from:j,to:T.from()}})},delWrappedLineRight:function(h){return rs(h,function(T){var H=h.charCoords(T.head,"div").top+5,j=h.coordsChar({left:h.display.lineDiv.offsetWidth+100,top:H},"div");return{from:T.from(),to:j}})},undo:function(h){return h.undo()},redo:function(h){return h.redo()},undoSelection:function(h){return h.undoSelection()},redoSelection:function(h){return h.redoSelection()},goDocStart:function(h){return h.extendSelection(Xt(h.firstLine(),0))},goDocEnd:function(h){return h.extendSelection(Xt(h.lastLine()))},goLineStart:function(h){return h.extendSelectionsBy(function(T){return Ua(h,T.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(h){return h.extendSelectionsBy(function(T){return io(h,T.head)},{origin:"+move",bias:1})},goLineEnd:function(h){return h.extendSelectionsBy(function(T){return No(h,T.head.line)},{origin:"+move",bias:-1})},goLineRight:function(h){return h.extendSelectionsBy(function(T){var H=h.cursorCoords(T.head,"div").top+5;return h.coordsChar({left:h.display.lineDiv.offsetWidth+100,top:H},"div")},Oe)},goLineLeft:function(h){return h.extendSelectionsBy(function(T){var H=h.cursorCoords(T.head,"div").top+5;return h.coordsChar({left:0,top:H},"div")},Oe)},goLineLeftSmart:function(h){return h.extendSelectionsBy(function(T){var H=h.cursorCoords(T.head,"div").top+5,j=h.coordsChar({left:0,top:H},"div");return j.ch<h.getLine(j.line).search(/\S/)?io(h,T.head):j},Oe)},goLineUp:function(h){return h.moveV(-1,"line")},goLineDown:function(h){return h.moveV(1,"line")},goPageUp:function(h){return h.moveV(-1,"page")},goPageDown:function(h){return h.moveV(1,"page")},goCharLeft:function(h){return h.moveH(-1,"char")},goCharRight:function(h){return h.moveH(1,"char")},goColumnLeft:function(h){return h.moveH(-1,"column")},goColumnRight:function(h){return h.moveH(1,"column")},goWordLeft:function(h){return h.moveH(-1,"word")},goGroupRight:function(h){return h.moveH(1,"group")},goGroupLeft:function(h){return h.moveH(-1,"group")},goWordRight:function(h){return h.moveH(1,"word")},delCharBefore:function(h){return h.deleteH(-1,"codepoint")},delCharAfter:function(h){return h.deleteH(1,"char")},delWordBefore:function(h){return h.deleteH(-1,"word")},delWordAfter:function(h){return h.deleteH(1,"word")},delGroupBefore:function(h){return h.deleteH(-1,"group")},delGroupAfter:function(h){return h.deleteH(1,"group")},indentAuto:function(h){return h.indentSelection("smart")},indentMore:function(h){return h.indentSelection("add")},indentLess:function(h){return h.indentSelection("subtract")},insertTab:function(h){return h.replaceSelection(" ")},insertSoftTab:function(h){for(var T=[],H=h.listSelections(),j=h.options.tabSize,z=0;z<H.length;z++){var $=H[z].from(),ye=B(h.getLine($.line),$.ch,j);T.push(oe(j-ye%j))}h.replaceSelections(T)},defaultTab:function(h){h.somethingSelected()?h.indentSelection("add"):h.execCommand("insertTab")},transposeChars:function(h){return lo(h,function(){for(var T=h.listSelections(),H=[],j=0;j<T.length;j++){if(!T[j].empty())continue;var z=T[j].head,$=$t(h.doc,z.line).text;if($){if(z.ch==$.length&&(z=new Xt(z.line,z.ch-1)),z.ch>0)z=new Xt(z.line,z.ch+1),h.replaceRange($.charAt(z.ch-1)+$.charAt(z.ch-2),Xt(z.line,z.ch-2),z,"+transpose");else if(z.line>h.doc.first){var ye=$t(h.doc,z.line-1).text;ye&&(z=new Xt(z.line,1),h.replaceRange($.charAt(0)+h.doc.lineSeparator()+ye.charAt(ye.length-1),Xt(z.line-1,ye.length-1),z,"+transpose"))}}H.push(new kt(z,z))}h.setSelections(H)})},newlineAndIndent:function(h){return lo(h,function(){for(var T=h.listSelections(),H=T.length-1;H>=0;H--)h.replaceRange(h.doc.lineSeparator(),T[H].anchor,T[H].head,"+input");T=h.listSelections();for(var j=0;j<T.length;j++)h.indentLine(T[j].from().line,null,!0);vs(h)})},openLine:function(h){return h.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(h){return h.toggleOverwrite()}};function Ua(h,T){var H=$t(h.doc,T),j=$i(H);return j!=H&&(T=wn(j)),fl(!0,h,j,T,1)}function No(h,T){var H=$t(h.doc,T),j=mo(H);return j!=H&&(T=wn(j)),fl(!0,h,H,T,-1)}function io(h,T){var H=Ua(h,T.line),j=$t(h.doc,H.line),z=tt(j,h.doc.direction);if(!z||z[0].level==0){var $=Math.max(H.ch,j.text.search(/\S/)),ye=T.line==H.line&&T.ch<=$&&T.ch;return Xt(H.line,ye?0:$,H.sticky)}return H}function Do(h,T,H){if(typeof T=="string"&&(T=_i[T],!T))return!1;h.display.input.ensurePolled();var j=h.display.shift,z=!1;try{h.isReadOnly()&&(h.state.suppressEdits=!0),H&&(h.display.shift=!1),z=T(h)!=we}finally{h.display.shift=j,h.state.suppressEdits=!1}return z}function Io(h,T,H){for(var j=0;j<h.state.keyMaps.length;j++){var z=ns(T,h.state.keyMaps[j],H,h);if(z)return z}return h.options.extraKeys&&ns(T,h.options.extraKeys,H,h)||ns(T,h.options.keyMap,H,h)}var pl=new J;function fs(h,T,H,j){var z=h.state.keySeq;if(z){if(bs(T))return"handled";if(/\'$/.test(T)?h.state.keySeq=null:pl.set(50,function(){h.state.keySeq==z&&(h.state.keySeq=null,h.display.input.reset())}),Xs(h,z+" "+T,H,j))return!0}return Xs(h,T,H,j)}function Xs(h,T,H,j){var z=Io(h,T,j);return z=="multi"&&(h.state.keySeq=T),z=="handled"&&tn(h,"keyHandled",h,T,H),(z=="handled"||z=="multi")&&(ge(H),Oa(h)),!!z}function Es(h,T){var H=Ol(T,!0);return H?T.shiftKey&&!h.state.keySeq?fs(h,"Shift-"+H,T,function(j){return Do(h,j,!0)})||fs(h,H,T,function(j){if(typeof j=="string"?/^go[A-Z]/.test(j):j.motion)return Do(h,j)}):fs(h,H,T,function(j){return Do(h,j)}):!1}function zs(h,T,H){return fs(h,"'"+H+"'",T,function(j){return Do(h,j,!0)})}var ps=null;function Xl(h){var T=this;if(h.target&&h.target!=T.display.input.getField())return;if(T.curOp.focus=G(),et(T,h))return;g&&p<11&&h.keyCode==27&&(h.returnValue=!1);var H=h.keyCode;T.display.shift=H==16||h.shiftKey;var j=Es(T,h);s&&(ps=j?H:null,!j&&H==88&&!st&&(f?h.metaKey:h.ctrlKey)&&T.replaceSelection("",null,"cut")),O&&!f&&!j&&H==46&&h.shiftKey&&!h.ctrlKey&&document.execCommand&&document.execCommand("cut"),H==18&&!/\bCodeMirror-crosshair\b/.test(T.display.lineDiv.className)&&bo(T)}function bo(h){var T=h.display.lineDiv;W(T,"CodeMirror-crosshair");function H(j){(j.keyCode==18||!j.altKey)&&(w(T,"CodeMirror-crosshair"),Re(document,"keyup",H),Re(document,"mouseover",H))}Le(document,"keyup",H),Le(document,"mouseover",H)}function Gs(h){h.keyCode==16&&(this.doc.sel.shift=!1),et(this,h)}function Vs(h){var T=this;if(h.target&&h.target!=T.display.input.getField())return;if(Wo(T.display,h)||et(T,h)||h.ctrlKey&&!h.altKey||f&&h.metaKey)return;var H=h.keyCode,j=h.charCode;if(s&&H==ps){ps=null,ge(h);return}if(s&&(!h.which||h.which<10)&&Es(T,h))return;var z=String.fromCharCode(j==null?H:j);if(z=="\b")return;if(zs(T,h,z))return;T.display.input.onKeyPress(h)}var zl=400,Rl=function(h,T,H){this.time=h,this.pos=T,this.button=H};Rl.prototype.compare=function(h,T,H){return this.time+zl>h&&xn(T,this.pos)==0&&H==this.button};var Ys,ms;function Dl(h,T){var H=+new Date;return ms&&ms.compare(H,h,T)?(Ys=ms=null,"triple"):Ys&&Ys.compare(H,h,T)?(ms=new Rl(H,h,T),Ys=null,"double"):(Ys=new Rl(H,h,T),ms=null,"single")}function Fn(h){var T=this,H=T.display;if(et(T,h)||H.activeTouch&&H.input.supportsTouch())return;if(H.input.ensurePolled(),H.shift=h.shiftKey,Wo(H,h)){d||(H.scroller.draggable=!1,setTimeout(function(){return H.scroller.draggable=!0},100));return}if(fr(T,h))return;var j=Aa(T,h),z=te(h),$=j?Dl(j,z):"single";if(window.focus(),z==1&&T.state.selectingText&&T.state.selectingText(h),j&&jn(T,z,j,$,h))return;z==1?j?tr(T,j,$,h):Qe(h)==H.scroller&&ge(h):z==2?(j&&Gn(T.doc,j),setTimeout(function(){return H.input.focus()},20)):z==3&&(D?T.display.input.onContextMenu(h):nl(T))}function jn(h,T,H,j,z){var $="Click";return j=="double"?$="Double"+$:j=="triple"&&($="Triple"+$),$=(T==1?"Left":T==2?"Middle":"Right")+$,fs(h,dl($,z),z,function(ye){if(typeof ye=="string"&&(ye=_i[ye]),!ye)return!1;var Ae=!1;try{h.isReadOnly()&&(h.state.suppressEdits=!0),Ae=ye(h,H)!=we}finally{h.state.suppressEdits=!1}return Ae})}function Hn(h,T,H){var j=h.getOption("configureMouse"),z=j?j(h,T,H):{};if(z.unit==null){var $=m?H.shiftKey&&H.metaKey:H.altKey;z.unit=$?"rectangle":T=="single"?"char":T=="double"?"word":"line"}return(z.extend==null||h.doc.extend)&&(z.extend=h.doc.extend||H.shiftKey),z.addNew==null&&(z.addNew=f?H.metaKey:H.ctrlKey),z.moveOnDrag==null&&(z.moveOnDrag=!(f?H.altKey:H.ctrlKey)),z}function tr(h,T,H,j){g?setTimeout(F(ks,h),0):h.curOp.focus=G();var z=Hn(h,H,j),$=h.doc.sel,ye;h.options.dragDrop&&Je&&!h.isReadOnly()&&H=="single"&&(ye=$.contains(T))>-1&&(xn((ye=$.ranges[ye]).from(),T)<0||T.xRel>0)&&(xn(ye.to(),T)>0||T.xRel<0)?On(h,j,T,z):$r(h,j,T,z)}function On(h,T,H,j){var z=h.display,$=!1,ye=sa(h,function(He){d&&(z.scroller.draggable=!1),h.state.draggingText=!1,Re(z.wrapper.ownerDocument,"mouseup",ye),Re(z.wrapper.ownerDocument,"mousemove",Ae),Re(z.scroller,"dragstart",De),Re(z.scroller,"drop",ye),$||(ge(He),j.addNew||Gn(h.doc,H,null,null,j.extend),d&&!t||g&&p==9?setTimeout(function(){z.wrapper.ownerDocument.body.focus({preventScroll:!0}),z.input.focus()},20):z.input.focus())}),Ae=function(He){$=$||Math.abs(T.clientX-He.clientX)+Math.abs(T.clientY-He.clientY)>=10},De=function(){return $=!0};d&&(z.scroller.draggable=!0),h.state.draggingText=ye,ye.copy=!j.moveOnDrag,z.scroller.dragDrop&&z.scroller.dragDrop(),Le(z.wrapper.ownerDocument,"mouseup",ye),Le(z.wrapper.ownerDocument,"mousemove",Ae),Le(z.scroller,"dragstart",De),Le(z.scroller,"drop",ye),nl(h),setTimeout(function(){return z.input.focus()},20)}function hr(h,T,H){if(H=="char")return new kt(T,T);if(H=="word")return h.findWordAt(T);if(H=="line")return new kt(Xt(T.line,0),V(h.doc,Xt(T.line+1,0)));var j=H(h,T);return new kt(j.from,j.to)}function $r(h,T,H,j){var z=h.display,$=h.doc;ge(T);var ye,Ae,De=$.sel,He=De.ranges;if(j.addNew&&!j.extend?(Ae=$.sel.contains(H),Ae>-1?ye=He[Ae]:ye=new kt(H,H)):(ye=$.sel.primary(),Ae=$.sel.primIndex),j.unit=="rectangle")j.addNew||(ye=new kt(H,H)),H=Aa(h,T,!0,!0),Ae=-1;else{var ht=hr(h,H,j.unit);j.extend?ye=li(ye,ht.anchor,ht.head,j.extend):ye=ht}j.addNew?Ae==-1?(Ae=He.length,mi($,zt(h,He.concat([ye]),Ae),{scroll:!1,origin:"*mouse"})):He.length>1&&He[Ae].empty()&&j.unit=="char"&&!j.extend?(mi($,zt(h,He.slice(0,Ae).concat(He.slice(Ae+1)),0),{scroll:!1,origin:"*mouse"}),De=$.sel):Li($,Ae,ye,ne):(Ae=0,mi($,new jt([ye],0),ne),De=$.sel);var Et=H;function Kt(Mn){if(xn(Et,Mn)==0)return;if(Et=Mn,j.unit=="rectangle"){for(var Zn=[],Cr=h.options.tabSize,pr=B($t($,H.line).text,H.ch,Cr),ii=B($t($,Mn.line).text,Mn.ch,Cr),ra=Math.min(pr,ii),ao=Math.max(pr,ii),ba=Math.min(H.line,Mn.line),jo=Math.min(h.lastLine(),Math.max(H.line,Mn.line));ba<=jo;ba++){var ko=$t($,ba).text,ja=Ce(ko,ra,Cr);ra==ao?Zn.push(new kt(Xt(ba,ja),Xt(ba,ja))):ko.length>ja&&Zn.push(new kt(Xt(ba,ja),Xt(ba,Ce(ko,ao,Cr))))}Zn.length||Zn.push(new kt(H,H)),mi($,zt(h,De.ranges.slice(0,Ae).concat(Zn),Ae),{origin:"*mouse",scroll:!1}),h.scrollIntoView(Mn)}else{var Lo=ye,fo=hr(h,Mn,j.unit),Za=Lo.anchor,Ba;xn(fo.anchor,Za)>0?(Ba=fo.head,Za=qn(Lo.from(),fo.anchor)):(Ba=fo.anchor,Za=Ir(Lo.to(),fo.head));var Sa=De.ranges.slice(0);Sa[Ae]=Dr(h,new kt(V($,Za),Ba)),mi($,zt(h,Sa,Ae),ne)}}var Ft=z.wrapper.getBoundingClientRect(),en=0;function on(Mn){var Zn=++en,Cr=Aa(h,Mn,!0,j.unit=="rectangle");if(!Cr)return;if(xn(Cr,Et)!=0){h.curOp.focus=G(),Kt(Cr);var pr=Ms(z,$);(Cr.line>=pr.to||Cr.line<pr.from)&&setTimeout(sa(h,function(){en==Zn&&on(Mn)}),150)}else{var ii=Mn.clientY<Ft.top?-20:Mn.clientY>Ft.bottom?20:0;ii&&setTimeout(sa(h,function(){if(en!=Zn)return;z.scroller.scrollTop+=ii,on(Mn)}),50)}}function En(Mn){h.state.selectingText=!1,en=Infinity,Mn&&(ge(Mn),z.input.focus()),Re(z.wrapper.ownerDocument,"mousemove",Ln),Re(z.wrapper.ownerDocument,"mouseup",Vn),$.history.lastSelOrigin=null}var Ln=sa(h,function(Mn){Mn.buttons===0||!te(Mn)?En(Mn):on(Mn)}),Vn=sa(h,En);h.state.selectingText=Vn,Le(z.wrapper.ownerDocument,"mousemove",Ln),Le(z.wrapper.ownerDocument,"mouseup",Vn)}function Dr(h,T){var H=T.anchor,j=T.head,z=$t(h.doc,H.line);if(xn(H,j)==0&&H.sticky==j.sticky)return T;var $=tt(z);if(!$)return T;var ye=_e($,H.ch,H.sticky),Ae=$[ye];if(Ae.from!=H.ch&&Ae.to!=H.ch)return T;var De=ye+(Ae.from==H.ch==(Ae.level!=1)?0:1);if(De==0||De==$.length)return T;var He;if(j.line!=H.line)He=(j.line-H.line)*(h.doc.direction=="ltr"?1:-1)>0;else{var ht=_e($,j.ch,j.sticky),Et=ht-ye||(j.ch-H.ch)*(Ae.level==1?-1:1);ht==De-1||ht==De?He=Et<0:He=Et>0}var Kt=$[De+(He?-1:0)],Ft=He==(Kt.level==1),en=Ft?Kt.from:Kt.to,on=Ft?"after":"before";return H.ch==en&&H.sticky==on?T:new kt(new Xt(H.line,en,on),j)}function Ki(h,T,H,j){var z,$;if(T.touches)z=T.touches[0].clientX,$=T.touches[0].clientY;else try{z=T.clientX,$=T.clientY}catch(Kt){return!1}if(z>=Math.floor(h.display.gutters.getBoundingClientRect().right))return!1;j&&ge(T);var ye=h.display,Ae=ye.lineDiv.getBoundingClientRect();if($>Ae.bottom||!Me(h,H))return ce(T);$-=Ae.top-ye.viewOffset;for(var De=0;De<h.display.gutterSpecs.length;++De){var He=ye.gutters.childNodes[De];if(He&&He.getBoundingClientRect().right>=z){var ht=Pn(h.doc,$),Et=h.display.gutterSpecs[De];return Xe(h,H,h,ht,Et.className,T),ce(T)}}}function fr(h,T){return Ki(h,T,"gutterClick",!0)}function wi(h,T){if(Wo(h.display,T)||Ja(h,T))return;if(et(h,T,"contextmenu"))return;D||h.display.input.onContextMenu(T)}function Ja(h,T){return Me(h,"gutterContextMenu")?Ki(h,T,"gutterContextMenu",!1):!1}function gs(h){h.display.wrapper.className=h.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+h.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Wr(h)}var pa={toString:function(){return"CodeMirror.Init"}},Uo={},Qs={};function Il(h){var T=h.optionHandlers;function H(j,z,$,ye){h.defaults[j]=z,$&&(T[j]=ye?function(Ae,De,He){He!=pa&&$(Ae,De,He)}:$)}h.defineOption=H,h.Init=pa,H("value","",function(j,z){return j.setValue(z)},!0),H("mode",null,function(j,z){j.doc.modeOption=z,gn(j)},!0),H("indentUnit",2,gn,!0),H("indentWithTabs",!1),H("smartIndent",!0),H("tabSize",4,function(j){nn(j),Wr(j),ji(j)},!0),H("lineSeparator",null,function(j,z){if(j.doc.lineSep=z,!z)return;var $=[],ye=j.doc.first;j.doc.iter(function(De){for(var He=0;;){var ht=De.text.indexOf(z,He);if(ht==-1)break;He=ht+z.length,$.push(Xt(ye,ht))}ye++});for(var Ae=$.length-1;Ae>=0;Ae--)Va(j.doc,z,$[Ae],Xt($[Ae].line,$[Ae].ch+z.length))}),H("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(j,z,$){j.state.specialChars=new RegExp(z.source+(z.test(" ")?"":"| "),"g"),$!=pa&&j.refresh()}),H("specialCharPlaceholder",gi,function(j){return j.refresh()},!0),H("electricChars",!0),H("inputStyle",u?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),H("spellcheck",!1,function(j,z){return j.getInputField().spellcheck=z},!0),H("autocorrect",!1,function(j,z){return j.getInputField().autocorrect=z},!0),H("autocapitalize",!1,function(j,z){return j.getInputField().autocapitalize=z},!0),H("rtlMoveVisually",!l),H("wholeLineUpdateBefore",!0),H("theme","default",function(j){gs(j),vt(j)},!0),H("keyMap","default",function(j,z,$){var ye=Ks(z),Ae=$!=pa&&Ks($);Ae&&Ae.detach&&Ae.detach(j,ye),ye.attach&&ye.attach(j,Ae||null)}),H("extraKeys",null),H("configureMouse",null),H("lineWrapping",!1,Fa,!0),H("gutters",[],function(j,z){j.display.gutterSpecs=At(z,j.options.lineNumbers),vt(j)},!0),H("fixedGutter",!0,function(j,z){j.display.gutters.style.left=z?$a(j.display)+"px":"0",j.refresh()},!0),H("coverGutterNextToScrollbar",!1,function(j){return ys(j)},!0),H("scrollbarStyle","native",function(j){Ns(j),ys(j),j.display.scrollbars.setScrollTop(j.doc.scrollTop),j.display.scrollbars.setScrollLeft(j.doc.scrollLeft)},!0),H("lineNumbers",!1,function(j,z){j.display.gutterSpecs=At(j.options.gutters,z),vt(j)},!0),H("firstLineNumber",1,vt,!0),H("lineNumberFormatter",function(j){return j},vt,!0),H("showCursorWhenSelecting",!1,ki,!0),H("resetSelectionOnContextMenu",!0),H("lineWiseCopyCut",!0),H("pasteLinesPerSelection",!0),H("selectionsMayTouch",!1),H("readOnly",!1,function(j,z){z=="nocursor"&&(is(j),j.display.input.blur()),j.display.input.readOnlyChanged(z)}),H("screenReaderLabel",null,function(j,z){z=z===""?null:z,j.display.input.screenReaderLabelChanged(z)}),H("disableInput",!1,function(j,z){z||j.display.input.reset()},!0),H("dragDrop",!0,tu),H("allowDropFileTypes",null),H("cursorBlinkRate",530),H("cursorScrollMargin",0),H("cursorHeight",1,ki,!0),H("singleCursorHeightPerLine",!0,ki,!0),H("workTime",100),H("workDelay",100),H("flattenSpans",!0,nn,!0),H("addModeClass",!1,nn,!0),H("pollInterval",100),H("undoDepth",200,function(j,z){return j.doc.history.undoDepth=z}),H("historyEventDelay",1250),H("viewportMargin",10,function(j){return j.refresh()},!0),H("maxHighlightLength",1e4,nn,!0),H("moveInputWithCursor",!0,function(j,z){z||j.display.input.resetPosition()}),H("tabindex",null,function(j,z){return j.display.input.getField().tabIndex=z||""}),H("autofocus",null),H("direction","ltr",function(j,z){return j.doc.setDirection(z)},!0),H("phrases",null)}function tu(h,T,H){var j=H&&H!=pa;if(!T!=!j){var z=h.display.dragFunctions,$=T?Le:Re;$(h.display.scroller,"dragstart",z.start),$(h.display.scroller,"dragenter",z.enter),$(h.display.scroller,"dragover",z.over),$(h.display.scroller,"dragleave",z.leave),$(h.display.scroller,"drop",z.drop)}}function Fa(h){h.options.lineWrapping?(W(h.display.wrapper,"CodeMirror-wrap"),h.display.sizer.style.minWidth="",h.display.sizerWidth=null):(w(h.display.wrapper,"CodeMirror-wrap"),So(h)),vo(h),ji(h),Wr(h),setTimeout(function(){return ys(h)},100)}function ca(h,T){var H=this;if(!(this instanceof ca))return new ca(h,T);this.options=T=T?P(T):{},P(Uo,T,!1);var j=T.value;typeof j=="string"?j=new br(j,T.mode,null,T.lineSeparator,T.direction):T.mode&&(j.modeOption=T.mode),this.doc=j;var z=new ca.inputStyles[T.inputStyle](this),$=this.display=new it(h,j,z,T);$.wrapper.CodeMirror=this,gs(this),T.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Ns(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 J,keySeq:null,specialChars:null},T.autofocus&&!u&&$.input.focus(),g&&p<11&&setTimeout(function(){return H.display.input.reset(!0)},20),Zl(this),Os(),qo(this),this.curOp.forceUpdate=!0,fn(this,j),T.autofocus&&!u||this.hasFocus()?setTimeout(function(){H.hasFocus()&&!H.state.focused&&Jo(H)},20):is(this);for(var ye in Qs)Qs.hasOwnProperty(ye)&&Qs[ye](this,T[ye],pa);rt(this),T.finishInit&&T.finishInit(this);for(var Ae=0;Ae<Js.length;++Ae)Js[Ae](this);us(this),d&&T.lineWrapping&&getComputedStyle($.lineDiv).textRendering=="optimizelegibility"&&($.lineDiv.style.textRendering="auto")}ca.defaults=Uo,ca.optionHandlers=Qs;function Zl(h){var T=h.display;Le(T.scroller,"mousedown",sa(h,Fn)),g&&p<11?Le(T.scroller,"dblclick",sa(h,function(De){if(et(h,De))return;var He=Aa(h,De);if(!He||fr(h,De)||Wo(h.display,De))return;ge(De);var ht=h.findWordAt(He);Gn(h.doc,ht.anchor,ht.head)})):Le(T.scroller,"dblclick",function(De){return et(h,De)||ge(De)}),Le(T.scroller,"contextmenu",function(De){return wi(h,De)}),Le(T.input.getField(),"contextmenu",function(De){T.scroller.contains(De.target)||wi(h,De)});var H,j={end:0};function z(){T.activeTouch&&(H=setTimeout(function(){return T.activeTouch=null},1e3),j=T.activeTouch,j.end=+new Date)}function $(De){if(De.touches.length!=1)return!1;var He=De.touches[0];return He.radiusX<=1&&He.radiusY<=1}function ye(De,He){if(He.left==null)return!0;var ht=He.left-De.left,Et=He.top-De.top;return ht*ht+Et*Et>20*20}Le(T.scroller,"touchstart",function(De){if(!et(h,De)&&!$(De)&&!fr(h,De)){T.input.ensurePolled(),clearTimeout(H);var He=+new Date;T.activeTouch={start:He,moved:!1,prev:He-j.end<=300?j:null},De.touches.length==1&&(T.activeTouch.left=De.touches[0].pageX,T.activeTouch.top=De.touches[0].pageY)}}),Le(T.scroller,"touchmove",function(){T.activeTouch&&(T.activeTouch.moved=!0)}),Le(T.scroller,"touchend",function(De){var He=T.activeTouch;if(He&&!Wo(T,De)&&He.left!=null&&!He.moved&&new Date-He.start<300){var ht=h.coordsChar(T.activeTouch,"page"),Et;!He.prev||ye(He,He.prev)?Et=new kt(ht,ht):!He.prev.prev||ye(He,He.prev.prev)?Et=h.findWordAt(ht):Et=new kt(Xt(ht.line,0),V(h.doc,Xt(ht.line+1,0))),h.setSelection(Et.anchor,Et.head),h.focus(),ge(De)}z()}),Le(T.scroller,"touchcancel",z),Le(T.scroller,"scroll",function(){T.scroller.clientHeight&&(os(h,T.scroller.scrollTop),Oo(h,T.scroller.scrollLeft,!0),Xe(h,"scroll",h))}),Le(T.scroller,"mousewheel",function(De){return Vt(h,De)}),Le(T.scroller,"DOMMouseScroll",function(De){return Vt(h,De)}),Le(T.wrapper,"scroll",function(){return T.wrapper.scrollTop=T.wrapper.scrollLeft=0}),T.dragFunctions={enter:function(De){et(h,De)||je(De)},over:function(De){et(h,De)||(ds(h,De),je(De))},start:function(De){return Qa(h,De)},drop:sa(h,$o),leave:function(De){et(h,De)||ro(h)}};var Ae=T.input.getField();Le(Ae,"keyup",function(De){return Gs.call(h,De)}),Le(Ae,"keydown",sa(h,Xl)),Le(Ae,"keypress",sa(h,Vs)),Le(Ae,"focus",function(De){return Jo(h,De)}),Le(Ae,"blur",function(De){return is(h,De)})}var Js=[];ca.defineInitHook=function(h){return Js.push(h)};function Rs(h,T,H,j){var z=h.doc,$;H==null&&(H="add"),H=="smart"&&(z.mode.indent?$=Jt(h,T).state:H="prev");var ye=h.options.tabSize,Ae=$t(z,T),De=B(Ae.text,null,ye);Ae.stateAfter&&(Ae.stateAfter=null);var He=Ae.text.match(/^\s*/)[0],ht;if(!j&&!/\S/.test(Ae.text))ht=0,H="not";else if(H=="smart"&&(ht=z.mode.indent($,Ae.text.slice(He.length),Ae.text),ht==we||ht>150)){if(!j)return;H="prev"}H=="prev"?T>z.first?ht=B($t(z,T-1).text,null,ye):ht=0:H=="add"?ht=De+h.options.indentUnit:H=="subtract"?ht=De-h.options.indentUnit:typeof H=="number"&&(ht=De+H),ht=Math.max(0,ht);var Et="",Kt=0;if(h.options.indentWithTabs)for(var Ft=Math.floor(ht/ye);Ft;--Ft)Kt+=ye,Et+=" ";if(Kt<ht&&(Et+=oe(ht-Kt)),Et!=He)return Va(z,Et,Xt(T,0),Xt(T,He.length),"+input"),Ae.stateAfter=null,!0;for(var en=0;en<z.sel.ranges.length;en++){var on=z.sel.ranges[en];if(on.head.line==T&&on.head.ch<He.length){var En=Xt(T,He.length);Li(z,en,new kt(En,En));break}}}var Fo=null;function Zs(h){Fo=h}function ml(h,T,H,j,z){var $=h.doc;h.display.shift=!1,j||(j=$.sel);var ye=+new Date-200,Ae=z=="paste"||h.state.pasteIncoming>ye,De=wt(T),He=null;if(Ae&&j.ranges.length>1)if(Fo&&Fo.text.join(`
|
|
|
`)==T){if(j.ranges.length%Fo.text.length==0){He=[];for(var ht=0;ht<Fo.text.length;ht++)He.push($.splitLines(Fo.text[ht]))}}else De.length==j.ranges.length&&h.options.pasteLinesPerSelection&&(He=be(De,function(Ln){return[Ln]}));for(var Et=h.curOp.updateInput,Kt=j.ranges.length-1;Kt>=0;Kt--){var Ft=j.ranges[Kt],en=Ft.from(),on=Ft.to();Ft.empty()&&(H&&H>0?en=Xt(en.line,en.ch-H):h.state.overwrite&&!Ae?on=Xt(on.line,Math.min($t($,on.line).text.length,on.ch+se(De).length)):Ae&&Fo&&Fo.lineWise&&Fo.text.join(`
|
|
|
`)==De.join(`
|
|
|
`)&&(en=on=Xt(en.line,0)));var En={from:en,to:on,text:He?He[Kt%He.length]:De,origin:z||(Ae?"paste":h.state.cutIncoming>ye?"cut":"+input")};Pa(h.doc,En),tn(h,"inputRead",h,En)}T&&!Ae&&ma(h,T),vs(h),h.curOp.updateInput<2&&(h.curOp.updateInput=Et),h.curOp.typing=!0,h.state.pasteIncoming=h.state.cutIncoming=-1}function Gl(h,T){var H=h.clipboardData&&h.clipboardData.getData("Text");if(H)return h.preventDefault(),!T.isReadOnly()&&!T.options.disableInput&&lo(T,function(){return ml(T,H,0,null,"paste")}),!0}function ma(h,T){if(!h.options.electricChars||!h.options.smartIndent)return;for(var H=h.doc.sel,j=H.ranges.length-1;j>=0;j--){var z=H.ranges[j];if(z.head.ch>100||j&&H.ranges[j-1].head.line==z.head.line)continue;var $=h.getModeAt(z.head),ye=!1;if($.electricChars){for(var Ae=0;Ae<$.electricChars.length;Ae++)if(T.indexOf($.electricChars.charAt(Ae))>-1){ye=Rs(h,z.head.line,"smart");break}}else $.electricInput&&($.electricInput.test($t(h.doc,z.head.line).text.slice(0,z.head.ch))&&(ye=Rs(h,z.head.line,"smart")));ye&&tn(h,"electricInput",h,z.head.line)}}function gl(h){for(var T=[],H=[],j=0;j<h.doc.sel.ranges.length;j++){var z=h.doc.sel.ranges[j].head.line,$={anchor:Xt(z,0),head:Xt(z+1,0)};H.push($),T.push(h.getRange($.anchor,$.head))}return{text:T,ranges:H}}function Vl(h,T,H,j){h.setAttribute("autocorrect",H?"":"off"),h.setAttribute("autocapitalize",j?"":"off"),h.setAttribute("spellcheck",!!T)}function kl(){var h=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),T=R("div",[h],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return d?h.style.width="1000px":h.setAttribute("wrap","off"),r&&(h.style.border="1px solid black"),Vl(h),T}function Yl(h){var T=h.optionHandlers,H=h.helpers={};h.prototype={constructor:h,focus:function(){window.focus(),this.display.input.focus()},setOption:function(j,z){var $=this.options,ye=$[j];if($[j]==z&&j!="mode")return;$[j]=z,T.hasOwnProperty(j)&&sa(this,T[j])(this,z,ye),Xe(this,"optionChange",this,j)},getOption:function(j){return this.options[j]},getDoc:function(){return this.doc},addKeyMap:function(j,z){this.state.keyMaps[z?"push":"unshift"](Ks(j))},removeKeyMap:function(j){for(var z=this.state.keyMaps,$=0;$<z.length;++$)if(z[$]==j||z[$].name==j)return z.splice($,1),!0},addOverlay:Xa(function(j,z){var $=j.token?j:h.getMode(this.options,j);if($.startState)throw new Error("Overlays may not be stateful.");ie(this.state.overlays,{mode:$,modeSpec:j,opaque:z&&z.opaque,priority:z&&z.priority||0},function(ye){return ye.priority}),this.state.modeGen++,ji(this)}),removeOverlay:Xa(function(j){for(var z=this.state.overlays,$=0;$<z.length;++$){var ye=z[$].modeSpec;if(ye==j||typeof j=="string"&&ye.name==j){z.splice($,1),this.state.modeGen++,ji(this);return}}}),indentLine:Xa(function(j,z,$){typeof z!="string"&&typeof z!="number"&&(z==null?z=this.options.smartIndent?"smart":"prev":z=z?"add":"subtract"),Yn(this.doc,j)&&Rs(this,j,z,$)}),indentSelection:Xa(function(j){for(var z=this.doc.sel.ranges,$=-1,ye=0;ye<z.length;ye++){var Ae=z[ye];if(Ae.empty())Ae.head.line>$&&(Rs(this,Ae.head.line,j,!0),$=Ae.head.line,ye==this.doc.sel.primIndex&&vs(this));else{var De=Ae.from(),He=Ae.to(),ht=Math.max($,De.line);$=Math.min(this.lastLine(),He.line-(He.ch?0:1))+1;for(var Et=ht;Et<$;++Et)Rs(this,Et,j);var Kt=this.doc.sel.ranges;De.ch==0&&z.length==Kt.length&&Kt[ye].from().ch>0&&Li(this.doc,ye,new kt(De,Kt[ye].to()),ke)}}}),getTokenAt:function(j,z){return sr(this,j,z)},getLineTokens:function(j,z){return sr(this,Xt(j),z,!0)},getTokenTypeAt:function(j){j=V(this.doc,j);var z=Nt(this,$t(this.doc,j.line)),$=0,ye=(z.length-1)/2,Ae=j.ch,De;if(Ae==0)De=z[2];else for(;;){var He=$+ye>>1;if((He?z[He*2-1]:0)>=Ae)ye=He;else if(z[He*2+1]<Ae)$=He+1;else{De=z[He*2+2];break}}var ht=De?De.indexOf("overlay "):-1;return ht<0?De:ht==0?null:De.slice(0,ht-1)},getModeAt:function(j){var z=this.doc.mode;return z.innerMode?h.innerMode(z,this.getTokenAt(j).state).mode:z},getHelper:function(j,z){return this.getHelpers(j,z)[0]},getHelpers:function(j,z){var $=[];if(!H.hasOwnProperty(z))return $;var ye=H[z],Ae=this.getModeAt(j);if(typeof Ae[z]=="string")ye[Ae[z]]&&$.push(ye[Ae[z]]);else if(Ae[z])for(var De=0;De<Ae[z].length;De++){var He=ye[Ae[z][De]];He&&$.push(He)}else Ae.helperType&&ye[Ae.helperType]?$.push(ye[Ae.helperType]):ye[Ae.name]&&$.push(ye[Ae.name]);for(var ht=0;ht<ye._global.length;ht++){var Et=ye._global[ht];Et.pred(Ae,this)&&re($,Et.val)==-1&&$.push(Et.val)}return $},getStateAfter:function(j,z){var $=this.doc;return j=ue($,j==null?$.first+$.size-1:j),Jt(this,j+1,z).state},cursorCoords:function(j,z){var $,ye=this.doc.sel.primary();return j==null?$=ye.head:typeof j=="object"?$=V(this.doc,j):$=j?ye.from():ye.to(),Zr(this,$,z||"page")},charCoords:function(j,z){return Zi(this,V(this.doc,j),z||"page")},coordsChar:function(j,z){return j=Jr(this,j,z||"page"),ni(this,j.left,j.top)},lineAtHeight:function(j,z){return j=Jr(this,{top:j,left:0},z||"page").top,Pn(this.doc,j+this.display.viewOffset)},heightAtLine:function(j,z,$){var ye=!1,Ae;if(typeof j=="number"){var De=this.doc.first+this.doc.size-1;j<this.doc.first?j=this.doc.first:j>De&&(j=De,ye=!0),Ae=$t(this.doc,j)}else Ae=j;return si(this,Ae,{top:0,left:0},z||"page",$||ye).top+(ye?this.doc.height-Ka(Ae):0)},defaultTextHeight:function(){return ha(this.display)},defaultCharWidth:function(){return Ta(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(j,z,$,ye,Ae){var De=this.display;j=Zr(this,V(this.doc,j));var He=j.bottom,ht=j.left;if(z.style.position="absolute",z.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(z),De.sizer.appendChild(z),ye=="over")He=j.top;else if(ye=="above"||ye=="near"){var Et=Math.max(De.wrapper.clientHeight,this.doc.height),Kt=Math.max(De.sizer.clientWidth,De.lineSpace.clientWidth);(ye=="above"||j.bottom+z.offsetHeight>Et)&&j.top>z.offsetHeight?He=j.top-z.offsetHeight:j.bottom+z.offsetHeight<=Et&&(He=j.bottom),ht+z.offsetWidth>Kt&&(ht=Kt-z.offsetWidth)}z.style.top=He+"px",z.style.left=z.style.right="",Ae=="right"?(ht=De.sizer.clientWidth-z.offsetWidth,z.style.right="0px"):(Ae=="left"?ht=0:Ae=="middle"&&(ht=(De.sizer.clientWidth-z.offsetWidth)/2),z.style.left=ht+"px"),$&&xl(this,{left:ht,top:He,right:ht+z.offsetWidth,bottom:He+z.offsetHeight})},triggerOnKeyDown:Xa(Xl),triggerOnKeyPress:Xa(Vs),triggerOnKeyUp:Gs,triggerOnMouseDown:Xa(Fn),execCommand:function(j){if(_i.hasOwnProperty(j))return _i[j].call(null,this)},triggerElectric:Xa(function(j){ma(this,j)}),findPosH:function(j,z,$,ye){var Ae=1;z<0&&(Ae=-1,z=-z);for(var De=V(this.doc,j),He=0;He<z&&!(De=vl(this.doc,De,Ae,$,ye),De.hitSide);++He);return De},moveH:Xa(function(j,z){var $=this;this.extendSelectionsBy(function(ye){return $.display.shift||$.doc.extend||ye.empty()?vl($.doc,ye.head,j,z,$.options.rtlMoveVisually):j<0?ye.from():ye.to()},Oe)}),deleteH:Xa(function(j,z){var $=this.doc.sel,ye=this.doc;$.somethingSelected()?ye.replaceSelection("",null,"+delete"):rs(this,function(Ae){var De=vl(ye,Ae.head,j,z,!1);return j<0?{from:De,to:Ae.head}:{from:Ae.head,to:De}})}),findPosV:function(j,z,$,ye){var Ae=1,De=ye;z<0&&(Ae=-1,z=-z);for(var He=V(this.doc,j),ht=0;ht<z;++ht){var Et=Zr(this,He,"div");if(De==null?De=Et.left:Et.left=De,He=Ql(this,Et,Ae,$),He.hitSide)break}return He},moveV:Xa(function(j,z){var $=this,ye=this.doc,Ae=[],De=!this.display.shift&&!ye.extend&&ye.sel.somethingSelected();if(ye.extendSelectionsBy(function(ht){if(De)return j<0?ht.from():ht.to();var Et=Zr($,ht.head,"div");ht.goalColumn!=null&&(Et.left=ht.goalColumn),Ae.push(Et.left);var Kt=Ql($,Et,j,z);return z=="page"&&ht==ye.sel.primary()&&il($,Zi($,Kt,"div").top-Et.top),Kt},Oe),Ae.length)for(var He=0;He<ye.sel.ranges.length;He++)ye.sel.ranges[He].goalColumn=Ae[He]}),findWordAt:function(j){var z=this.doc,$=$t(z,j.line).text,ye=j.ch,Ae=j.ch;if($){var De=this.getHelper(j,"wordChars");(j.sticky=="before"||Ae==$.length)&&ye?--ye:++Ae;for(var He=$.charAt(ye),ht=Y(He,De)?function(Et){return Y(Et,De)}:/\s/.test(He)?function(Et){return/\s/.test(Et)}:function(Et){return!/\s/.test(Et)&&!Y(Et)};ye>0&&ht($.charAt(ye-1));)--ye;for(;Ae<$.length&&ht($.charAt(Ae));)++Ae}return new kt(Xt(j.line,ye),Xt(j.line,Ae))},toggleOverwrite:function(j){if(j!=null&&j==this.state.overwrite)return;(this.state.overwrite=!this.state.overwrite)?W(this.display.cursorDiv,"CodeMirror-overwrite"):w(this.display.cursorDiv,"CodeMirror-overwrite"),Xe(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==G()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Xa(function(j,z){as(this,j,z)}),getScrollInfo:function(){var j=this.display.scroller;return{left:j.scrollLeft,top:j.scrollTop,height:j.scrollHeight-Rt(this)-this.display.barHeight,width:j.scrollWidth-Rt(this)-this.display.barWidth,clientHeight:Ue(this),clientWidth:ct(this)}},scrollIntoView:Xa(function(j,z){j==null?(j={from:this.doc.sel.primary().head,to:null},z==null&&(z=this.options.cursorScrollMargin)):typeof j=="number"?j={from:Xt(j,0),to:null}:j.from==null&&(j={from:j,to:null}),j.to||(j.to=j.from),j.margin=z||0,j.from.line!=null?Ul(this,j):Ts(this,j.from,j.to,j.margin)}),setSize:Xa(function(j,z){var $=this,ye=function(De){return typeof De=="number"||/^\d+$/.test(String(De))?De+"px":De};j!=null&&(this.display.wrapper.style.width=ye(j)),z!=null&&(this.display.wrapper.style.height=ye(z)),this.options.lineWrapping&&Mr(this);var Ae=this.display.viewFrom;this.doc.iter(Ae,this.display.viewTo,function(De){if(De.widgets){for(var He=0;He<De.widgets.length;He++)if(De.widgets[He].noHScroll){oa($,Ae,"widget");break}}++Ae}),this.curOp.forceUpdate=!0,Xe(this,"refresh",this)}),operation:function(j){return lo(this,j)},startOperation:function(){return qo(this)},endOperation:function(){return us(this)},refresh:Xa(function(){var j=this.display.cachedTextHeight;ji(this),this.curOp.forceUpdate=!0,Wr(this),as(this,this.doc.scrollLeft,this.doc.scrollTop),js(this.display),(j==null||Math.abs(j-ha(this.display))>.5||this.options.lineWrapping)&&vo(this),Xe(this,"refresh",this)}),swapDoc:Xa(function(j){var z=this.doc;return z.cm=null,this.state.selectingText&&this.state.selectingText(),fn(this,j),Wr(this),this.display.input.reset(),as(this,j.scrollLeft,j.scrollTop),this.curOp.forceScroll=!0,tn(this,"swapDoc",this,z),z}),phrase:function(j){var z=this.options.phrases;return z&&Object.prototype.hasOwnProperty.call(z,j)?z[j]:j},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}},Ke(h),h.registerHelper=function(j,z,$){H.hasOwnProperty(j)||(H[j]=h[j]={_global:[]}),H[j][z]=$},h.registerGlobalHelper=function(j,z,$,ye){h.registerHelper(j,z,ye),H[j]._global.push({pred:$,val:ye})}}function vl(h,T,H,j,z){var $=T,ye=H,Ae=$t(h,T.line),De=z&&h.direction=="rtl"?-H:H;function He(){var Vn=T.line+De;return Vn<h.first||Vn>=h.first+h.size?!1:(T=new Xt(Vn,T.ch,T.sticky),Ae=$t(h,Vn))}function ht(Vn){var Mn;if(j=="codepoint"){var Zn=Ae.text.charCodeAt(T.ch+(j>0?0:-1));isNaN(Zn)?Mn=null:Mn=new Xt(T.line,Math.max(0,Math.min(Ae.text.length,T.ch+H*(Zn>=55296&&Zn<56320?2:1))),-H)}else z?Mn=Ur(h.cm,Ae,T,H):Mn=hl(Ae,T,H);if(Mn==null)if(!Vn&&He())T=fl(z,h.cm,Ae,T.line,De);else return!1;else T=Mn;return!0}if(j=="char"||j=="codepoint")ht();else if(j=="column")ht(!0);else if(j=="word"||j=="group")for(var Et=null,Kt=j=="group",Ft=h.cm&&h.cm.getHelper(T,"wordChars"),en=!0;!(H<0&&!ht(!en));en=!1){var on=Ae.text.charAt(T.ch)||`
|
|
|
`,En=Y(on,Ft)?"w":Kt&&on==`
|
|
|
`?"n":!Kt||/\s/.test(on)?null:"p";if(Kt&&!en&&!En&&(En="s"),Et&&Et!=En){H<0&&(H=1,ht(),T.sticky="after");break}if(En&&(Et=En),H>0&&!ht(!en))break}var Ln=ya(h,T,$,ye,!0);return Er($,Ln)&&(Ln.hitSide=!0),Ln}function Ql(h,T,H,j){var z=h.doc,$=T.left,ye;if(j=="page"){var Ae=Math.min(h.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),De=Math.max(Ae-.5*ha(h.display),3);ye=(H>0?T.bottom:T.top)+H*De}else j=="line"&&(ye=H>0?T.bottom+3:T.top-3);for(var He;!(He=ni(h,$,ye),!He.outside);){if(H<0?ye<=0:ye>=z.height){He.hitSide=!0;break}ye+=H*5}return He}var Di=function(h){this.cm=h,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new J,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Di.prototype.init=function(h){var T=this,H=this,j=H.cm,z=H.div=h.lineDiv;Vl(z,j.options.spellcheck,j.options.autocorrect,j.options.autocapitalize);function $(Ae){for(var De=Ae.target;De;De=De.parentNode){if(De==z)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(De.className))break}return!1}Le(z,"paste",function(Ae){if(!$(Ae)||et(j,Ae)||Gl(Ae,j))return;p<=11&&setTimeout(sa(j,function(){return T.updateFromDOM()}),20)}),Le(z,"compositionstart",function(Ae){T.composing={data:Ae.data,done:!1}}),Le(z,"compositionupdate",function(Ae){T.composing||(T.composing={data:Ae.data,done:!1})}),Le(z,"compositionend",function(Ae){T.composing&&(Ae.data!=T.composing.data&&T.readFromDOMSoon(),T.composing.done=!0)}),Le(z,"touchstart",function(){return H.forceCompositionEnd()}),Le(z,"input",function(){T.composing||T.readFromDOMSoon()});function ye(Ae){if(!$(Ae)||et(j,Ae))return;if(j.somethingSelected())Zs({lineWise:!1,text:j.getSelections()}),Ae.type=="cut"&&j.replaceSelection("",null,"cut");else if(j.options.lineWiseCopyCut){var De=gl(j);Zs({lineWise:!0,text:De.text}),Ae.type=="cut"&&j.operation(function(){j.setSelections(De.ranges,0,ke),j.replaceSelection("",null,"cut")})}else return;if(Ae.clipboardData){Ae.clipboardData.clearData();var He=Fo.text.join(`
|
|
|
`);if(Ae.clipboardData.setData("Text",He),Ae.clipboardData.getData("Text")==He){Ae.preventDefault();return}}var ht=kl(),Et=ht.firstChild;j.display.lineSpace.insertBefore(ht,j.display.lineSpace.firstChild),Et.value=Fo.text.join(`
|
|
|
`);var Kt=document.activeElement;K(Et),setTimeout(function(){j.display.lineSpace.removeChild(ht),Kt.focus(),Kt==z&&H.showPrimarySelection()},50)}Le(z,"copy",ye),Le(z,"cut",ye)},Di.prototype.screenReaderLabelChanged=function(h){h?this.div.setAttribute("aria-label",h):this.div.removeAttribute("aria-label")},Di.prototype.prepareSelection=function(){var h=Xo(this.cm,!1);return h.focus=document.activeElement==this.div,h},Di.prototype.showSelection=function(h,T){if(!h||!this.cm.display.view.length)return;(h.focus||T)&&this.showPrimarySelection(),this.showMultipleSelections(h)},Di.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Di.prototype.showPrimarySelection=function(){var h=this.getSelection(),T=this.cm,H=T.doc.sel.primary(),j=H.from(),z=H.to();if(T.display.viewTo==T.display.viewFrom||j.line>=T.display.viewTo||z.line<T.display.viewFrom){h.removeAllRanges();return}var $=ws(T,h.anchorNode,h.anchorOffset),ye=ws(T,h.focusNode,h.focusOffset);if($&&!$.bad&&ye&&!ye.bad&&xn(qn($,ye),j)==0&&xn(Ir($,ye),z)==0)return;var Ae=T.display.view,De=j.line>=T.display.viewFrom&&Ll(T,j)||{node:Ae[0].measure.map[2],offset:0},He=z.line<T.display.viewTo&&Ll(T,z);if(!He){var ht=Ae[Ae.length-1].measure,Et=ht.maps?ht.maps[ht.maps.length-1]:ht.map;He={node:Et[Et.length-1],offset:Et[Et.length-2]-Et[Et.length-3]}}if(!De||!He){h.removeAllRanges();return}var Kt=h.rangeCount&&h.getRangeAt(0),Ft;try{Ft=L(De.node,De.offset,He.offset,He.node)}catch(en){}Ft&&(!O&&T.state.focused?(h.collapse(De.node,De.offset),Ft.collapsed||(h.removeAllRanges(),h.addRange(Ft))):(h.removeAllRanges(),h.addRange(Ft)),Kt&&h.anchorNode==null?h.addRange(Kt):O&&this.startGracePeriod()),this.rememberSelection()},Di.prototype.startGracePeriod=function(){var h=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){h.gracePeriod=!1,h.selectionChanged()&&h.cm.operation(function(){return h.cm.curOp.selectionChanged=!0})},20)},Di.prototype.showMultipleSelections=function(h){A(this.cm.display.cursorDiv,h.cursors),A(this.cm.display.selectionDiv,h.selection)},Di.prototype.rememberSelection=function(){var h=this.getSelection();this.lastAnchorNode=h.anchorNode,this.lastAnchorOffset=h.anchorOffset,this.lastFocusNode=h.focusNode,this.lastFocusOffset=h.focusOffset},Di.prototype.selectionInEditor=function(){var h=this.getSelection();if(!h.rangeCount)return!1;var T=h.getRangeAt(0).commonAncestorContainer;return M(this.div,T)},Di.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Di.prototype.blur=function(){this.div.blur()},Di.prototype.getField=function(){return this.div},Di.prototype.supportsTouch=function(){return!0},Di.prototype.receivedFocus=function(){var h=this;this.selectionInEditor()?this.pollSelection():lo(this.cm,function(){return h.cm.curOp.selectionChanged=!0});function T(){h.cm.state.focused&&(h.pollSelection(),h.polling.set(h.cm.options.pollInterval,T))}this.polling.set(this.cm.options.pollInterval,T)},Di.prototype.selectionChanged=function(){var h=this.getSelection();return h.anchorNode!=this.lastAnchorNode||h.anchorOffset!=this.lastAnchorOffset||h.focusNode!=this.lastFocusNode||h.focusOffset!=this.lastFocusOffset},Di.prototype.pollSelection=function(){if(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())return;var h=this.getSelection(),T=this.cm;if(c&&n&&this.cm.display.gutterSpecs.length&&Jl(h.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(this.composing)return;this.rememberSelection();var H=ws(T,h.anchorNode,h.anchorOffset),j=ws(T,h.focusNode,h.focusOffset);H&&j&&lo(T,function(){mi(T.doc,qt(H,j),ke),(H.bad||j.bad)&&(T.curOp.selectionChanged=!0)})},Di.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var h=this.cm,T=h.display,H=h.doc.sel.primary(),j=H.from(),z=H.to();if(j.ch==0&&j.line>h.firstLine()&&(j=Xt(j.line-1,$t(h.doc,j.line-1).length)),z.ch==$t(h.doc,z.line).text.length&&z.line<h.lastLine()&&(z=Xt(z.line+1,0)),j.line<T.viewFrom||z.line>T.viewTo-1)return!1;var $,ye,Ae;j.line==T.viewFrom||($=Gi(h,j.line))==0?(ye=wn(T.view[0].line),Ae=T.view[0].node):(ye=wn(T.view[$].line),Ae=T.view[$-1].node.nextSibling);var De=Gi(h,z.line),He,ht;if(De==T.view.length-1?(He=T.viewTo-1,ht=T.lineDiv.lastChild):(He=wn(T.view[De+1].line)-1,ht=T.view[De+1].node.previousSibling),!Ae)return!1;for(var Et=h.doc.splitLines(nu(h,Ae,ht,ye,He)),Kt=Kn(h.doc,Xt(ye,0),Xt(He,$t(h.doc,He).text.length));Et.length>1&&Kt.length>1;)if(se(Et)==se(Kt))Et.pop(),Kt.pop(),He--;else if(Et[0]==Kt[0])Et.shift(),Kt.shift(),ye++;else break;for(var Ft=0,en=0,on=Et[0],En=Kt[0],Ln=Math.min(on.length,En.length);Ft<Ln&&on.charCodeAt(Ft)==En.charCodeAt(Ft);)++Ft;for(var Vn=se(Et),Mn=se(Kt),Zn=Math.min(Vn.length-(Et.length==1?Ft:0),Mn.length-(Kt.length==1?Ft:0));en<Zn&&Vn.charCodeAt(Vn.length-en-1)==Mn.charCodeAt(Mn.length-en-1);)++en;if(Et.length==1&&Kt.length==1&&ye==j.line)for(;Ft&&Ft>j.ch&&Vn.charCodeAt(Vn.length-en-1)==Mn.charCodeAt(Mn.length-en-1);)Ft--,en++;Et[Et.length-1]=Vn.slice(0,Vn.length-en).replace(/^\u200b+/,""),Et[0]=Et[0].slice(Ft).replace(/\u200b+$/,"");var Cr=Xt(ye,Ft),pr=Xt(He,Kt.length?se(Kt).length-en:0);if(Et.length>1||Et[0]||xn(Cr,pr))return Va(h.doc,Et,Cr,pr,"+input"),!0},Di.prototype.ensurePolled=function(){this.forceCompositionEnd()},Di.prototype.reset=function(){this.forceCompositionEnd()},Di.prototype.forceCompositionEnd=function(){if(!this.composing)return;clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus()},Di.prototype.readFromDOMSoon=function(){var h=this;if(this.readDOMTimeout!=null)return;this.readDOMTimeout=setTimeout(function(){if(h.readDOMTimeout=null,h.composing)if(h.composing.done)h.composing=null;else return;h.updateFromDOM()},80)},Di.prototype.updateFromDOM=function(){var h=this;(this.cm.isReadOnly()||!this.pollContent())&&lo(this.cm,function(){return ji(h.cm)})},Di.prototype.setUneditable=function(h){h.contentEditable="false"},Di.prototype.onKeyPress=function(h){if(h.charCode==0||this.composing)return;h.preventDefault(),this.cm.isReadOnly()||sa(this.cm,ml)(this.cm,String.fromCharCode(h.charCode==null?h.keyCode:h.charCode),0)},Di.prototype.readOnlyChanged=function(h){this.div.contentEditable=String(h!="nocursor")},Di.prototype.onContextMenu=function(){},Di.prototype.resetPosition=function(){},Di.prototype.needsContentAttribute=!0;function Ll(h,T){var H=Ot(h,T.line);if(!H||H.hidden)return null;var j=$t(h.doc,T.line),z=We(H,j,T.line),$=tt(j,h.doc.direction),ye="left";if($){var Ae=_e($,T.ch);ye=Ae%2?"right":"left"}var De=cn(z.map,T.ch,ye);return De.offset=De.collapse=="right"?De.end:De.start,De}function Jl(h){for(var T=h;T;T=T.parentNode)if(/CodeMirror-gutter-wrapper/.test(T.className))return!0;return!1}function xs(h,T){return T&&(h.bad=!0),h}function nu(h,T,H,j,z){var $="",ye=!1,Ae=h.doc.lineSeparator(),De=!1;function He(Ft){return function(en){return en.id==Ft}}function ht(){ye&&($+=Ae,De&&($+=Ae),ye=De=!1)}function Et(Ft){Ft&&(ht(),$+=Ft)}function Kt(Ft){if(Ft.nodeType==1){var en=Ft.getAttribute("cm-text");if(en){Et(en);return}var on=Ft.getAttribute("cm-marker"),En;if(on){var Ln=h.findMarks(Xt(j,0),Xt(z+1,0),He(+on));Ln.length&&(En=Ln[0].find(0))&&Et(Kn(h.doc,En.from,En.to).join(Ae));return}if(Ft.getAttribute("contenteditable")=="false")return;var Vn=/^(pre|div|p|li|table|br)$/i.test(Ft.nodeName);if(!/^br$/i.test(Ft.nodeName)&&Ft.textContent.length==0)return;Vn&&ht();for(var Mn=0;Mn<Ft.childNodes.length;Mn++)Kt(Ft.childNodes[Mn]);/^(pre|p)$/i.test(Ft.nodeName)&&(De=!0),Vn&&(ye=!0)}else Ft.nodeType==3&&Et(Ft.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;!(Kt(T),T==H);)T=T.nextSibling,De=!1;return $}function ws(h,T,H){var j;if(T==h.display.lineDiv){if(j=h.display.lineDiv.childNodes[H],!j)return xs(h.clipPos(Xt(h.display.viewTo-1)),!0);T=null,H=0}else for(j=T;;j=j.parentNode){if(!j||j==h.display.lineDiv)return null;if(j.parentNode&&j.parentNode==h.display.lineDiv)break}for(var z=0;z<h.display.view.length;z++){var $=h.display.view[z];if($.node==j)return ru($,T,H)}}function ru(h,T,H){var j=h.text.firstChild,z=!1;if(!T||!M(j,T))return xs(Xt(wn(h.line),0),!0);if(T==j&&(z=!0,T=j.childNodes[H],H=0,!T)){var $=h.rest?se(h.rest):h.line;return xs(Xt(wn($),$.text.length),z)}var ye=T.nodeType==3?T:null,Ae=T;for(!ye&&T.childNodes.length==1&&T.firstChild.nodeType==3&&(ye=T.firstChild,H&&(H=ye.nodeValue.length));Ae.parentNode!=j;)Ae=Ae.parentNode;var De=h.measure,He=De.maps;function ht(En,Ln,Vn){for(var Mn=-1;Mn<(He?He.length:0);Mn++)for(var Zn=Mn<0?De.map:He[Mn],Cr=0;Cr<Zn.length;Cr+=3){var pr=Zn[Cr+2];if(pr==En||pr==Ln){var ii=wn(Mn<0?h.line:h.rest[Mn]),ra=Zn[Cr]+Vn;return(Vn<0||pr!=En)&&(ra=Zn[Cr+(Vn?1:0)]),Xt(ii,ra)}}}var Et=ht(ye,Ae,H);if(Et)return xs(Et,z);for(var Kt=Ae.nextSibling,Ft=ye?ye.nodeValue.length-H:0;Kt;Kt=Kt.nextSibling){if(Et=ht(Kt,Kt.firstChild,0),Et)return xs(Xt(Et.line,Et.ch-Ft),z);Ft+=Kt.textContent.length}for(var en=Ae.previousSibling,on=H;en;en=en.previousSibling){if(Et=ht(en,en.firstChild,-1),Et)return xs(Xt(Et.line,Et.ch+on),z);on+=en.textContent.length}}var Ia=function(h){this.cm=h,this.prevInput="",this.pollingFast=!1,this.polling=new J,this.hasSelection=!1,this.composing=null};Ia.prototype.init=function(h){var T=this,H=this,j=this.cm;this.createField(h);var z=this.textarea;h.wrapper.insertBefore(this.wrapper,h.wrapper.firstChild),r&&(z.style.width="0px"),Le(z,"input",function(){g&&p>=9&&T.hasSelection&&(T.hasSelection=null),H.poll()}),Le(z,"paste",function(ye){if(et(j,ye)||Gl(ye,j))return;j.state.pasteIncoming=+new Date,H.fastPoll()});function $(ye){if(et(j,ye))return;if(j.somethingSelected())Zs({lineWise:!1,text:j.getSelections()});else if(j.options.lineWiseCopyCut){var Ae=gl(j);Zs({lineWise:!0,text:Ae.text}),ye.type=="cut"?j.setSelections(Ae.ranges,null,ke):(H.prevInput="",z.value=Ae.text.join(`
|
|
|
`),K(z))}else return;ye.type=="cut"&&(j.state.cutIncoming=+new Date)}Le(z,"cut",$),Le(z,"copy",$),Le(h.scroller,"paste",function(ye){if(Wo(h,ye)||et(j,ye))return;if(!z.dispatchEvent){j.state.pasteIncoming=+new Date,H.focus();return}var Ae=new Event("paste");Ae.clipboardData=ye.clipboardData,z.dispatchEvent(Ae)}),Le(h.lineSpace,"selectstart",function(ye){Wo(h,ye)||ge(ye)}),Le(z,"compositionstart",function(){var ye=j.getCursor("from");H.composing&&H.composing.range.clear(),H.composing={start:ye,range:j.markText(ye,j.getCursor("to"),{className:"CodeMirror-composing"})}}),Le(z,"compositionend",function(){H.composing&&(H.poll(),H.composing.range.clear(),H.composing=null)})},Ia.prototype.createField=function(h){this.wrapper=kl(),this.textarea=this.wrapper.firstChild},Ia.prototype.screenReaderLabelChanged=function(h){h?this.textarea.setAttribute("aria-label",h):this.textarea.removeAttribute("aria-label")},Ia.prototype.prepareSelection=function(){var h=this.cm,T=h.display,H=h.doc,j=Xo(h);if(h.options.moveInputWithCursor){var z=Zr(h,H.sel.primary().head,"div"),$=T.wrapper.getBoundingClientRect(),ye=T.lineDiv.getBoundingClientRect();j.teTop=Math.max(0,Math.min(T.wrapper.clientHeight-10,z.top+ye.top-$.top)),j.teLeft=Math.max(0,Math.min(T.wrapper.clientWidth-10,z.left+ye.left-$.left))}return j},Ia.prototype.showSelection=function(h){var T=this.cm,H=T.display;A(H.cursorDiv,h.cursors),A(H.selectionDiv,h.selection),h.teTop!=null&&(this.wrapper.style.top=h.teTop+"px",this.wrapper.style.left=h.teLeft+"px")},Ia.prototype.reset=function(h){if(this.contextMenuPending||this.composing)return;var T=this.cm;if(T.somethingSelected()){this.prevInput="";var H=T.getSelection();this.textarea.value=H,T.state.focused&&K(this.textarea),g&&p>=9&&(this.hasSelection=H)}else h||(this.prevInput=this.textarea.value="",g&&p>=9&&(this.hasSelection=null))},Ia.prototype.getField=function(){return this.textarea},Ia.prototype.supportsTouch=function(){return!1},Ia.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!u||G()!=this.textarea))try{this.textarea.focus()}catch(h){}},Ia.prototype.blur=function(){this.textarea.blur()},Ia.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ia.prototype.receivedFocus=function(){this.slowPoll()},Ia.prototype.slowPoll=function(){var h=this;if(this.pollingFast)return;this.polling.set(this.cm.options.pollInterval,function(){h.poll(),h.cm.state.focused&&h.slowPoll()})},Ia.prototype.fastPoll=function(){var h=!1,T=this;T.pollingFast=!0;function H(){var j=T.poll();!j&&!h?(h=!0,T.polling.set(60,H)):(T.pollingFast=!1,T.slowPoll())}T.polling.set(20,H)},Ia.prototype.poll=function(){var h=this,T=this.cm,H=this.textarea,j=this.prevInput;if(this.contextMenuPending||!T.state.focused||ft(H)&&!j&&!this.composing||T.isReadOnly()||T.options.disableInput||T.state.keySeq)return!1;var z=H.value;if(z==j&&!T.somethingSelected())return!1;if(g&&p>=9&&this.hasSelection===z||f&&/[\uf700-\uf7ff]/.test(z))return T.display.input.reset(),!1;if(T.doc.sel==T.display.selForContextMenu){var $=z.charCodeAt(0);if($==8203&&!j&&(j="\u200B"),$==8666)return this.reset(),this.cm.execCommand("undo")}for(var ye=0,Ae=Math.min(j.length,z.length);ye<Ae&&j.charCodeAt(ye)==z.charCodeAt(ye);)++ye;return lo(T,function(){ml(T,z.slice(ye),j.length-ye,null,h.composing?"*compose":null),z.length>1e3||z.indexOf(`
|
|
|
`)>-1?H.value=h.prevInput="":h.prevInput=z,h.composing&&(h.composing.range.clear(),h.composing.range=T.markText(h.composing.start,T.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ia.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ia.prototype.onKeyPress=function(){g&&p>=9&&(this.hasSelection=null),this.fastPoll()},Ia.prototype.onContextMenu=function(h){var T=this,H=T.cm,j=H.display,z=T.textarea;T.contextMenuPending&&T.contextMenuPending();var $=Aa(H,h),ye=j.scroller.scrollTop;if(!$||s)return;var Ae=H.options.resetSelectionOnContextMenu;Ae&&H.doc.sel.contains($)==-1&&sa(H,mi)(H.doc,qt($),ke);var De=z.style.cssText,He=T.wrapper.style.cssText,ht=T.wrapper.offsetParent.getBoundingClientRect();T.wrapper.style.cssText="position: static",z.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(h.clientY-ht.top-5)+"px; left: "+(h.clientX-ht.left-5)+`px;
|
|
|
z-index: 1000; background: `+(g?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Et;d&&(Et=window.scrollY),j.input.focus(),d&&window.scrollTo(null,Et),j.input.reset(),H.somethingSelected()||(z.value=T.prevInput=" "),T.contextMenuPending=Ft,j.selForContextMenu=H.doc.sel,clearTimeout(j.detectingSelectAll);function Kt(){if(z.selectionStart!=null){var on=H.somethingSelected(),En="\u200B"+(on?z.value:"");z.value="\u21DA",z.value=En,T.prevInput=on?"":"\u200B",z.selectionStart=1,z.selectionEnd=En.length,j.selForContextMenu=H.doc.sel}}function Ft(){if(T.contextMenuPending!=Ft)return;if(T.contextMenuPending=!1,T.wrapper.style.cssText=He,z.style.cssText=De,g&&p<9&&j.scrollbars.setScrollTop(j.scroller.scrollTop=ye),z.selectionStart!=null){(!g||g&&p<9)&&Kt();var on=0,En=function(){j.selForContextMenu==H.doc.sel&&z.selectionStart==0&&z.selectionEnd>0&&T.prevInput=="\u200B"?sa(H,ho)(H):on++<10?j.detectingSelectAll=setTimeout(En,500):(j.selForContextMenu=null,j.input.reset())};j.detectingSelectAll=setTimeout(En,200)}}if(g&&p>=9&&Kt(),D){je(h);var en=function(){Re(window,"mouseup",en),setTimeout(Ft,20)};Le(window,"mouseup",en)}else setTimeout(Ft,50)},Ia.prototype.readOnlyChanged=function(h){h||this.reset(),this.textarea.disabled=h=="nocursor",this.textarea.readOnly=!!h},Ia.prototype.setUneditable=function(){},Ia.prototype.needsContentAttribute=!1;function iu(h,T){if(T=T?P(T):{},T.value=h.value,!T.tabindex&&h.tabIndex&&(T.tabindex=h.tabIndex),!T.placeholder&&h.placeholder&&(T.placeholder=h.placeholder),T.autofocus==null){var H=G();T.autofocus=H==h||h.getAttribute("autofocus")!=null&&H==document.body}function j(){h.value=Ae.getValue()}var z;if(h.form&&(Le(h.form,"submit",j),!T.leaveSubmitMethodAlone)){var $=h.form;z=$.submit;try{var ye=$.submit=function(){j(),$.submit=z,$.submit(),$.submit=ye}}catch(De){}}T.finishInit=function(De){De.save=j,De.getTextArea=function(){return h},De.toTextArea=function(){De.toTextArea=isNaN,j(),h.parentNode.removeChild(De.getWrapperElement()),h.style.display="",h.form&&(Re(h.form,"submit",j),!T.leaveSubmitMethodAlone&&typeof h.form.submit=="function"&&(h.form.submit=z))}},h.style.display="none";var Ae=ca(function(De){return h.parentNode.insertBefore(De,h.nextSibling)},T);return Ae}function au(h){h.off=Re,h.on=Le,h.wheelEventPixels=St,h.Doc=br,h.splitLines=wt,h.countColumn=B,h.findColumn=Ce,h.isWordChar=Z,h.Pass=we,h.signal=Xe,h.Line=Wa,h.changeEnd=sn,h.scrollbarModel=wl,h.Pos=Xt,h.cmpPos=xn,h.modes=yt,h.mimeModes=pt,h.resolveMode=lt,h.getMode=Lt,h.modeExtensions=Dt,h.extendMode=Mt,h.copyState=Wt,h.startState=mn,h.innerMode=Yt,h.commands=_i,h.keyMap=yo,h.keyName=Ol,h.isModifierKey=bs,h.lookupKey=ns,h.normalizeKeyMap=cl,h.StringStream=Qt,h.SharedTextMarker=Bi,h.TextMarker=Pr,h.LineWidget=wa,h.e_preventDefault=ge,h.e_stopPropagation=Ee,h.e_stop=je,h.addClass=W,h.contains=M,h.rmClass=w,h.keyNames=es}Il(ca),Yl(ca);var ou="iter insert remove copy getEditor constructor".split(" ");for(var ql in br.prototype)br.prototype.hasOwnProperty(ql)&&re(ou,ql)<0&&(ca.prototype[ql]=function(h){return function(){return h.apply(this.doc,arguments)}}(br.prototype[ql]));return Ke(br),ca.inputStyles={textarea:Ia,contenteditable:Di},ca.defineMode=function(h){!ca.defaults.mode&&h!="null"&&(ca.defaults.mode=h),Bt.apply(this,arguments)},ca.defineMIME=Ht,ca.defineMode("null",function(){return{token:function(h){return h.skipToEnd()}}}),ca.defineMIME("text/plain","null"),ca.defineExtension=function(h,T){ca.prototype[h]=T},ca.defineDocExtension=function(h,T){br.prototype[h]=T},ca.fromTextArea=iu,au(ca),ca.version="5.58.2",ca})},W6BS:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAYAAACohjseAAAVs0lEQVRoQ+2aa6xlZ3nff++677Xv+9zPHM/YHo+xwQ4E14GKKESkiFsSM8bYQBIEkaBEAkqbRmo/9FulSoX2Qz9GVVQJqUJBhKKA1KRJCIlowwdDDDa+jOd65syc275f1v1d1fOufYYE2ZhJZKRWXjOjvffaa6/1/p//8/yfyzuqLMuS/48P9RrA/8fZfY3B2yXQBHQpf185tBUK+SvH8uV2H/eK1/+jGfwRIBC5ks/Vq/yplq2Wqz+B/ONg5LNlrlz+Qhnot373iih+wgX/YIAivrJgjTKA9BKcYa/Uy/MnUEpD0S2AyzdKkMslZYklbwVYWZpXQSygrSVoc+4fcPzUAKtsom4xpIGiLCkMZbJGs1LkvOHPfJbrhRX5/CM/NDwJZlXiqBKlc7AEjg1aI2iVDXZpoeS9AFXlkmV1W8z+VACLE7dbMiWLE2CFADLgqig6SakCSs4jizcvAvBHMVkqxxhKkePqAs8S1mxyLUxqw6AYKLdtbMtGINpiKKUM07bc96dk9BUBykIFoNYVC/JewMkCDDh18p0so6w+GzfT+FoWC7Yl11curQpFVCoyJQsvDThP6crNdVldi0KLcwogyzJGssVrxYWXAOWzwWg84eXd92UByoK0WHEJqBCA4oC6ChstYHRJIW6lZHWQlsoYQH6rypyOLZ5Xuahx3NIi1TAvLBIcHIlUw8rfcWFLFmzhmPBUxi0NKIRdAVi5qmPAL88LrS9z/AigmHBpCcOaCIUA1BVj4ma6LCi1FkjLBZRoVRrLR9piXjhkysI2mqJxhY2lQUrDjG3iVv5k5YmgyHI1ngLPBqfUxg21nC5LbGUhHJbGUPKu8hTbUthKGcZP3Palks3fY/BECQVQLoDk0QWURYFVFuTaNudtS+Pb8mCNZcQEYmMQi8KymCSQGLJLIx7zKCFKi1uuJNZvNXxDvLBVszUtW5xSm0WL8Mh9hV0xoGFfKRItVzjYJmaFSQtHAFqVwY3i/pi7Kl2e6N9SOJaxkJk4q0CmqcZVBaGtybFY5OIaCscqKqsaUYBE6LYU08Jimi/dxrIYjudM5ynCohzCyvZaw3iCLEviqW3ntDxR1SreTDCbQ1OI65c2qZKQsY0RKlUVFoVxWcsS5DLdnHisKk6iX1iTeBOXlNgqK4kXxmTdgapAVlWKYpKLsuVYykSJictxVtKPNMq1K0saFiym8wWzKKkiSnKeDSud9i1llOe0XE3PrUTMLEmerys1zpVEYCVWIjqVS1aGEjYlJKrvKvYrAVoWGcKgxIkBYmKuurlRTuOqmkIrdCEOJ8qpyIuc/iInL7R5oAEoOVEXRv0cx8HyHBZxZAySJilplqFE8i3bGLHXqZvFlEp4qOJOKM6zrJKkUuN7Lp6t8GxxxcqIEtfCsnFNw1yViuQuxlVNbJ6AFNUuSjEUmbFWBfJEZITF6rywalW5ryyJc21czpSSy/RmErpSFIU2bJWWRRTFVcqwHPOdo3I8HbO60mVi1Y31qwqmYkN+Ox5Nl/Kv2V7t4DhWJWoSfZZFzy3whTUJCxNA4m02meVWgAWcASr31Kgk1+XJwitfl3ykDaPyWdzTiIeW9xKDBWlREkkgVmloWTdWorBIcwajiTlryZOkJClSVDRARUN0HvPut7+NuarxbD8hKqrEbcJTjDePTfiJiKy267iOu8yBot6KrgC0xWMkHiUMSiNsri2GqAoCCYETJlWU6VJcRpiTxUp6yMU1JQ7lPMJKFZvGXUXic4ijtKodxY7KIs8LFlFElC4rEbFwFsGsTzk74sbNI/70UsQDd67zyXe9mSKes3XnnVxZKK7sz8yzxcWWkWMW3mk3cB1xzyqXmtRg2LRMvMn13tItxXVFeBwJF0kfAlIqHgEoYPJSJFjyU0kugITJQlVgTYo4UVlFlmvyRFxUtNliMl2wWLqlZTuUyZxkvE/Wv8rFG2P+aq/g/yR1Um+dT53L+MyvvoUXD2esFGPO7qyhWqs8f3PGMMEsrCpQFM1miOvYOLbCtW2U5EgKE2+uFANWWamnI6AroTEKWyocAxDULClKEXsBUrEkqlm5ZxQXZLkIx7INEoYtG5NC4qxSYsthOJ+RZZp8MSUeXGF84wYv7A74q8OSZ4Yp+dadnGpYvKkW88vr8L5feQffGyo8yyU/usIDpwJ2du7gRuJyaRBRaI1rKxqdLkVekC5mzIaHnFnv4DRWsFWBrWxciTeTSKRIKAlcSTlV2hG3NwAnaVFKjFUsanItLiklmMUsTsky0dOTvk5R2DapUaXCKKhtW+xd36W/+zyH13Z5+uox3+6XXKWH17D4OTfi/tWQerLg2qjgvtNNPvbrv8K1m4c49R5Huk6jHtCY3eTcVkh9ZZtn+xnXb+4zH+9x/cJFJkf7BI7iNz78OO3tc9xc5NSEIaEsLxhNMpo1m9W2Z0SryqXiriVqnIjICIPaMJMLuKIqdhdJsgQoNQMMo4RUa0rbMbknGRxwcOUZLj73It/dnfA3U8U4Vpzq+Lxho8YOBcPpnCuJy1z5lG6Dd52Gjzx+nmf6BSvJDWppjFrZ5jj2qLs5O/6cuzZX+fZ3nuS//+GXTBz11k/R7K7yofe/lzu21om8JoeLAlvUM8lJC00YWKw0PcNelUbEVUvUKClLkf7MKKcxyDIdWEQnDJYWgac4mMdEGYz3d7n5/JNcuHCZJ/cWPD0u0Y7L2Y0G9wXgZDHXJhl7sUWSlnTXemzVYcsvOde1eeyD57kwUEROm3h0zE4zJcgXxO0dJrGibo24by0kmy/4ytf+mJuHx3RX1njiA49gez5NV+H1Nrl0nOFIzyhdia/otURxJVVonGUNqwaxLiVXSb4TIalctYrJJMlMvSe+/fyFF/iDL/1PvLCGH+3zv184Znde0Gp1eF3PYtWF/qzg4njBOLOot2qcabqc8nNCzyaKNLtzhwd26nzqo49xae+ItZpN4nWIW6tMR2N27DmBnTMPegwjm1P1jJ265vf/4IvYrsfjH3iUYPUU2XxA09J47TVujIQQi1oAnaazLCGlIKjKctWP88pFDbglwEK0o2oFnn3+Al/6+p/x7aeukRSKaf8Kd6+vMCngbCekKHN2+ykHixw3CNgRUC2bhl0yTkpuTguGqkFpe4jCvn1b87GPfYQfzBp0VETQ32WzV6OwA7LmNkk8o82Y0C4ZuqvU0hHf/PrXSCn5zQ9+AK97iv7xDVp1H0+VtFpdrs5sfNun2zzpMERdq/e3AIqWSCKXMksi8LtPP88Xv/a/+NZTV8nckE5vlWQ8ZHF4kbee7nF5EHMwzU2SXW/4nGo51FyYRQV7EfQz1whVqFLarQYbtYL1oGDdhw9/8AOo+ip7WY3RPKPXaaCm+3TtCK/WQNfXiZKYlrWg6RR8+ctfQyv40KPncbobFOni1vjEL2Ka7R6TMsCWErEs8BwIPZMt/w5AuUNZ8L3v/5D/9kd/yp8/dY1ZaRHW5IeKmhdiJxGL4R4bjYBpUrDTklbHYZzAzUXJsLDNA9qBzXrDZTVMWbczPJWT5jAvA+qBy71ntui26txz5gy9nTNE3gr9eY5da6KSEV0VmfxXNnqo6JBvfPUbaKX4yGOP0tjc4ehgn3araepbycV2HtNqNJmoJnkSUQsCVpoOlkwNbrmoFMXzOe/55L/nuVFCKwywpf6TYrdWJ2h2SKcT5jee5+c26xzNcg4XmrEWkCVrocVGqFi1clyVkOUpi8Iz8ZSqOkVjg6y+wYP+DX73n3+YZy5cZTE6IjoesNkOWNvcpLW6Req0SLyAdD6l5cQ0SPnDr3wdbdt86PwjWO0ViiTC93ziNMb1fMosMa+DhUWjXqfmO6w07R8HqEgWc9772f/M1cEY31Km0pdaUqoL16uhkgXp+AYrgccwKdgKNWtuQSiAsoJRDlOrSeT2SFtr0tNj1+u4cUJYU0S5zZnkAr/z6c8xi2BnewWdxswnxyz6+4wPbtDwLLa3t2msbuGvbZH29/jjr3wV7Xg88egjhJtnGPf3qbmeSc8iMKpIsL0ax4uSXqtJ4Dn0mnZVthkGpZBGkUYR7/7MF7g6nOJL3yWjBNfFDgLCRodiPjYJ/RdWC/L5hJG2megaU7tDFrSw7Rp23aNt2fRaHuuhzXY7pBfa3H/XFg/9k7dw/dJz2BtneXFvhvbq6DwhsApWuy08pyAeDTjcvUg02SdUDmfvOcuf/OW3cJ2Ax87/GrG3SjQfs73eIY1j07WUeY7teAwSixWpX215vsx8LNQgLpbdBESLiPd++j9ydTjDcaW6kxYILFtUyiFfLJiOD+gGAX4yZNy+h17DpRf6bPd8tkOHjW6dhqcME4WCRZwxj1LuP3c373/fO43r1ms1U8DPEs3hLGV3MKe/kM8JUvkHrk27XuNo90W+9T++SKfbpdXu8eivvYeodZpo2qfu26gix5f8kEZYtscwdel1mqau3Oh4+I6NGsZSqkFSwmgScf53/xPX+hPDoJQ7ruPg+QFOo0OnXKDGN7h7Z53NsKTVWaHpS5uSsUil77N5dnfI6TWfb//wiMZaB3824Wri8W/Pv4kHf+k9PHPtJg+tWBzqBmE559RaD6U1YehXRUSiORhF9Oea4+Njvvnl368YWVvn8fe/jwNrnWgyYLXbrCZudombx3h+jWHqGE+QY7O9BDgyAEtSA3DB+c99gWujObbkQXFyS4avVWvyxBtabDUcRrOUSVS1TtcOI06thTy1N+EX7+rx/Rsj3nhmhfF0SiMMaDnC4oI3PvB6nnjsPP3RhHbD5zD2IBkztQLy+QisOg07QzkO6w1PujrT9gyPjti7ecizL77Im99wP/vuafJkTCusUeYyJbDwSHFdj1R5rHVbpszcarumWVaTWGpRTYZiNIt55LNf4NJghGu7ph0x/ZhfpxO43FeLqXslea6o+VIO2SRFSTdUHExj1kOPZ/s59/U8vrM7YbXXppgOuZGF/Kt338tb3/M437uyyy+s+xxlLr4V0wzqFDqiXu9CnphFinpHmSbRBTXXIQzrXHnuaXScct2/h2S+T7veQBUpjhuaKYHjunhByEq3bXjZ7Mj9S9Q0LctqyFRw4dI1/sV/+K8cLyK6niKwLZM0m3aKVh5d1yJzfKJE5iZVz9Wf5ex0PK4Mc16/6nBtmnNn1zV5re471FTGPNE8/MbX8Vsf/U1GozHtekA/d3CKiKT0ydMZuRXg6oyFVrQ8mftUfZ909rWgxqXnnyXPUi6rM+hE7tEwY/6isPDLBa4XENbrZqxhpgwWPHimi5qnupQkOhsN+czv/TuSLEZJ01qYmbXpEeVGMq5r1VxKp40uJcFKV20xiXN6fsneXHNHy+IHfYsHVkue2Yuot+t48Zy9LOR33nGGdz72cf724lUe2nA50CENEiyvgU6m1MI6vjTctk3o2qSZNN/g26IZFrsXLpDGC75nvw4VjWj5MrbQxvA15vhuwFqnUc1mtAzKSt567ypqkelSW4pR/5hPfvbfEEuBbfYKSjKkMpFZSEGuLDphCH6DPNfVwMjCjCg6gc0gUWzVUo5ih9VAM4+1WV1YZIzTkrf9/Dk+8clPMZjO6dUcxri42YKs9CjSOTpo4Ocps1yKe5uiyMhKaXxdiiJl/9JFoijiyDmFThY4gWcmfalWODrFdXy2N1bJZcBVajNyfMu5VVSSlbJlwHH/iI9/4tNMU/BktKRcclVgaRtLi2UVnaAOQYM0l8FrhrJtJqliJdDsRTZ3hylPj33e0Em51M+pd3uEi0P2dIPf/qen+PWPfoKnL+/x4JrPXuYTFlMIOuTRGK/eoVbGLAqLRijViSbTOTU3QArR65dfZL6IcdbvIs1TdocF3bpPJ3RMzGWzASvr22C7ZpIn/x6+W+LUzPXgsN/nN574CEmSUtrVjo4lvaFTYDlSiSt6Gx1Cv0vhxliJTe6UlEnN7CRpw7QiLmVvopoOoF0sO2MclfzSm+/hM//y95guUtpShARtnCJmEeUoFeM1mziZJo4WeEHN7EUUSUpk73P95vfZvTYAvUa+ukGez9g7njPqF7Rd6RwKiugKi/llHMfHsnwzZG76ddTBwWGZZinD4YjPfvpzTGYzijwxsxBJxt07MlpnE1RmYbuKQG+iuhP0wEe1c+ILr8d2UhOrWldjDKu7TznaJFjbZX58Cqt2mTfd+y5+6+Nv53jyIr3mvYRunX5ymZ71MK6q4Qc+cVYwi2IaNR/PtdGpx7Xoqzx3+CeE84d54NR5IYhWo8Zf/s03+Oo3/wtrvW1Ct0PgrhA6K9TcDqV2jSAJc+rzn/98OZ1Ol/MVl7IsiOOINM0YTw4ZRJeJ9ZDpZEzQ9fGKDexmRJkVqMBn+twOyo5pNJsEYcjx8QG9h55kcel1hGcvMnvhHGrlBR66/1f55X+2zQvX/5q13r2QOQzzH/Lz7X/NYfEAvaZiePOQsrfOSnJIOwiNmz23+xccHr3AweGc8RjCIOD05lksakyjIzrBnRRimNmYXGdmHTs7pzh37pypadW1a9dKqRgODg7Y399nMhmTZZm5ecIxUTpgkR4yiQ+IFhPiLCeOZpSFB3GTXDdwdIv17hmarR4//MGT3PGL+1z/bo/em6/S/84pmg89zwPrj/COd55mMDkirNWwkx3G0QsUB2/Ba57jjq0OZTxGOS46ryYJ82jApetPcTDYJ6yt4tshtVoIuUMz7NI/HqJ1SthscMfOHZy9+y62trbwPO/WbuHf3z7TmvlcLDVmMBgwHIwYjSbMJ3Nm0ZxI5p3JjHk6RkbCgVfDsgN8ArP3N5juM5jdJD26xrOjq9TzCcfzkGYYcXrrbTz6xDs5OrrMeHzIjck+2eiA65OYdrjOPace5NzOw/hO10zW5ZDm27VDUxdLnMtwOctSk+NqtYDNzU3W1tfpdbvm2pc6bgE0u7IvsRUs56M4Yj6dmfJrOhwyGE8YjkaMxkNmszlpLDGbkeUx02RAlC2Y5UeUSZ+pdYyaz1k4Y9OdhE4D5dVoB6dZWbuLlneaXm2DPC1NR5BGCbF0CWVJEAQ0GnXanTb1sE69Xmdzc4uNjQ1ardZy4+dlN3fNF6+4R/9SP5eHJ0nMYhEh8TscDun3+0aoJuMJi8WCJMnRZgRZkJOR5FMKvWBz/QyN2gqqsEjTBE1q7iU5znZsfN83i2+32zSbTXq9HisrK6yurtJoNH4ympf49rYAvhzL1b5JSZqmZqGTyZT+4Jj+cd+4+mg4Yh7F5Kk0xqK4Jb7rVP87w1KGpU6nR6vVNMAEkPzrdDqGxX/McVsAb/dBsh0mKWgxnzMajxgOhhwf9+n3j5nNZ7RbbbrdrgElYE5Aua57u4962etfNYAvx7YISJIkxrXFxdvtlnFJW+Yiy+MnecrtIn/VAN7uQl6t618D+GpZ9md139cY/FlZ+tV6zmsMvlqW/Vnd9/8CAe3hZpCQX/4AAAAASUVORK5CYII="},WYAk:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){(function(){var _=I,O=_.lib,y=O.Base,v=_.enc,o=v.Utf8,g=_.algo,p=g.HMAC=y.extend({init:function(d,a){d=this._hasher=new d.init,typeof a=="string"&&(a=o.parse(a));var n=d.blockSize,s=n*4;a.sigBytes>s&&(a=d.finalize(a)),a.clamp();for(var t=this._oKey=a.clone(),i=this._iKey=a.clone(),e=t.words,r=i.words,c=0;c<n;c++)e[c]^=1549556828,r[c]^=909522486;t.sigBytes=i.sigBytes=s,this.reset()},reset:function(){var d=this._hasher;d.reset(),d.update(this._iKey)},update:function(d){return this._hasher.update(d),this},finalize:function(d){var a=this._hasher,n=a.finalize(d);a.reset();var s=a.finalize(this._oKey.clone().concat(n));return s}})})()})},WaYH:function(U,X,x){"use strict";var I=x("rePB"),_=x("Ff2n"),O=x("VTBJ"),y=x("1OyB"),v=x("vuIU"),o=x("JX7q"),g=x("Ji7U"),p=x("LK+K"),d=x("q1tI"),a=x("TSYQ"),n=x.n(a),s=x("sboe"),t=x("OZM5"),i=function(D){var C=D.prefixCls,w=D.level,S=D.isStart,A=D.isEnd;if(!w)return null;for(var R="".concat(C,"-indent-unit"),k=[],L=0;L<w;L+=1){var M;k.push(d.createElement("span",{key:L,className:n()(R,(M={},Object(I.a)(M,"".concat(R,"-start"),S[L+1]),Object(I.a)(M,"".concat(R,"-end"),A[L+1]),Object(I.a)(M,"".concat(R,"-end-first-level"),!L&&A[0]),M))}))}return d.createElement("span",{"aria-hidden":"true",className:"".concat(C,"-indent")},k)},e=i,r=x("815F"),c="open",u="close",f="---",m=function(b){Object(g.a)(C,b);var D=Object(p.a)(C);function C(){var w;return Object(y.a)(this,C),w=D.apply(this,arguments),w.state={dragNodeHighlight:!1},w.onSelectorClick=function(S){var A=w.props.context.onNodeClick;A(S,Object(r.b)(w.props)),w.isSelectable()?w.onSelect(S):w.onCheck(S)},w.onSelectorDoubleClick=function(S){var A=w.props.context.onNodeDoubleClick;A(S,Object(r.b)(w.props))},w.onSelect=function(S){if(w.isDisabled())return;var A=w.props.context.onNodeSelect;S.preventDefault(),A(S,Object(r.b)(w.props))},w.onCheck=function(S){if(w.isDisabled())return;var A=w.props,R=A.disableCheckbox,k=A.checked,L=w.props.context.onNodeCheck;if(!w.isCheckable()||R)return;S.preventDefault();var M=!k;L(S,Object(r.b)(w.props),M)},w.onMouseEnter=function(S){var A=w.props.context.onNodeMouseEnter;A(S,Object(r.b)(w.props))},w.onMouseLeave=function(S){var A=w.props.context.onNodeMouseLeave;A(S,Object(r.b)(w.props))},w.onContextMenu=function(S){var A=w.props.context.onNodeContextMenu;A(S,Object(r.b)(w.props))},w.onDragStart=function(S){var A=w.props.context.onNodeDragStart;S.stopPropagation(),w.setState({dragNodeHighlight:!0}),A(S,Object(o.a)(w));try{S.dataTransfer.setData("text/plain","")}catch(R){}},w.onDragEnter=function(S){var A=w.props.context.onNodeDragEnter;S.preventDefault(),S.stopPropagation(),A(S,Object(o.a)(w))},w.onDragOver=function(S){var A=w.props.context.onNodeDragOver;S.preventDefault(),S.stopPropagation(),A(S,Object(o.a)(w))},w.onDragLeave=function(S){var A=w.props.context.onNodeDragLeave;S.stopPropagation(),A(S,Object(o.a)(w))},w.onDragEnd=function(S){var A=w.props.context.onNodeDragEnd;S.stopPropagation(),w.setState({dragNodeHighlight:!1}),A(S,Object(o.a)(w))},w.onDrop=function(S){var A=w.props.context.onNodeDrop;S.preventDefault(),S.stopPropagation(),w.setState({dragNodeHighlight:!1}),A(S,Object(o.a)(w))},w.onExpand=function(S){var A=w.props.context.onNodeExpand;A(S,Object(r.b)(w.props))},w.setSelectHandle=function(S){w.selectHandle=S},w.getNodeState=function(){var S=w.props.expanded;return w.isLeaf()?null:S?c:u},w.hasChildren=function(){var S=w.props.eventKey,A=w.props.context.keyEntities,R=A[S]||{},k=R.children;return!!(k||[]).length},w.isLeaf=function(){var S=w.props,A=S.isLeaf,R=S.loaded,k=w.props.context.loadData,L=w.hasChildren();return A===!1?!1:A||!k&&!L||k&&R&&!L},w.isDisabled=function(){var S=w.props.disabled,A=w.props.context.disabled;return!!(A||S)},w.isCheckable=function(){var S=w.props.checkable,A=w.props.context.checkable;return!A||S===!1?!1:A},w.syncLoadData=function(S){var A=S.expanded,R=S.loading,k=S.loaded,L=w.props.context,M=L.loadData,G=L.onNodeLoad;if(R)return;M&&A&&!w.isLeaf()&&(!w.hasChildren()&&!k&&G(Object(r.b)(w.props)))},w.renderSwitcher=function(){var S=w.props,A=S.expanded,R=S.switcherIcon,k=w.props.context,L=k.prefixCls,M=k.switcherIcon,G=R||M;if(w.isLeaf())return d.createElement("span",{className:n()("".concat(L,"-switcher"),"".concat(L,"-switcher-noop"))},typeof G=="function"?G(Object(O.a)(Object(O.a)({},w.props),{},{isLeaf:!0})):G);var W=n()("".concat(L,"-switcher"),"".concat(L,"-switcher_").concat(A?c:u));return d.createElement("span",{onClick:w.onExpand,className:W},typeof G=="function"?G(Object(O.a)(Object(O.a)({},w.props),{},{isLeaf:!1})):G)},w.renderCheckbox=function(){var S=w.props,A=S.checked,R=S.halfChecked,k=S.disableCheckbox,L=w.props.context.prefixCls,M=w.isDisabled(),G=w.isCheckable();if(!G)return null;var W=typeof G!="boolean"?G:null;return d.createElement("span",{className:n()("".concat(L,"-checkbox"),A&&"".concat(L,"-checkbox-checked"),!A&&R&&"".concat(L,"-checkbox-indeterminate"),(M||k)&&"".concat(L,"-checkbox-disabled")),onClick:w.onCheck},W)},w.renderIcon=function(){var S=w.props.loading,A=w.props.context.prefixCls;return d.createElement("span",{className:n()("".concat(A,"-iconEle"),"".concat(A,"-icon__").concat(w.getNodeState()||"docu"),S&&"".concat(A,"-icon_loading"))})},w.renderSelector=function(){var S=w.state.dragNodeHighlight,A=w.props,R=A.title,k=A.selected,L=A.icon,M=A.loading,G=A.data,W=w.props.context,N=W.prefixCls,K=W.showIcon,F=W.icon,P=W.draggable,B=W.loadData,J=W.titleRender,re=w.isDisabled(),he="".concat(N,"-node-content-wrapper"),we;if(K){var ke=L||F;we=ke?d.createElement("span",{className:n()("".concat(N,"-iconEle"),"".concat(N,"-icon__customize"))},typeof ke=="function"?ke(w.props):ke):w.renderIcon()}else B&&M&&(we=w.renderIcon());var ne;typeof R=="function"?ne=R(G):J?ne=J(G):ne=R;var Oe=d.createElement("span",{className:"".concat(N,"-title")},ne);return d.createElement("span",{ref:w.setSelectHandle,title:typeof R=="string"?R:"",className:n()("".concat(he),"".concat(he,"-").concat(w.getNodeState()||"normal"),!re&&(k||S)&&"".concat(N,"-node-selected"),!re&&P&&"draggable"),draggable:!re&&P||void 0,"aria-grabbed":!re&&P||void 0,onMouseEnter:w.onMouseEnter,onMouseLeave:w.onMouseLeave,onContextMenu:w.onContextMenu,onClick:w.onSelectorClick,onDoubleClick:w.onSelectorDoubleClick,onDragStart:P?w.onDragStart:void 0},we,Oe)},w}return Object(v.a)(C,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var S=this.props.selectable,A=this.props.context.selectable;return typeof S=="boolean"?S:A}},{key:"render",value:function(){var S,A=this.props,R=A.eventKey,k=A.className,L=A.style,M=A.dragOver,G=A.dragOverGapTop,W=A.dragOverGapBottom,N=A.isLeaf,K=A.isStart,F=A.isEnd,P=A.expanded,B=A.selected,J=A.checked,re=A.halfChecked,he=A.loading,we=A.domRef,ke=A.active,ne=A.onMouseMove,Oe=Object(_.a)(A,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ce=this.props.context,fe=Ce.prefixCls,oe=Ce.filterTreeNode,se=Ce.draggable,be=Ce.keyEntities,ie=this.isDisabled(),de=Object(t.f)(Oe),Fe=be[R]||{},ae=Fe.level,Z=F[F.length-1];return d.createElement("div",Object.assign({ref:we,className:n()(k,"".concat(fe,"-treenode"),(S={},Object(I.a)(S,"".concat(fe,"-treenode-disabled"),ie),Object(I.a)(S,"".concat(fe,"-treenode-switcher-").concat(P?"open":"close"),!N),Object(I.a)(S,"".concat(fe,"-treenode-checkbox-checked"),J),Object(I.a)(S,"".concat(fe,"-treenode-checkbox-indeterminate"),re),Object(I.a)(S,"".concat(fe,"-treenode-selected"),B),Object(I.a)(S,"".concat(fe,"-treenode-loading"),he),Object(I.a)(S,"".concat(fe,"-treenode-active"),ke),Object(I.a)(S,"".concat(fe,"-treenode-leaf-last"),Z),Object(I.a)(S,"drag-over",!ie&&M),Object(I.a)(S,"drag-over-gap-top",!ie&&G),Object(I.a)(S,"drag-over-gap-bottom",!ie&&W),Object(I.a)(S,"filter-node",oe&&oe(Object(r.b)(this.props))),S)),style:L,onDragEnter:se?this.onDragEnter:void 0,onDragOver:se?this.onDragOver:void 0,onDragLeave:se?this.onDragLeave:void 0,onDrop:se?this.onDrop:void 0,onDragEnd:se?this.onDragEnd:void 0,onMouseMove:ne},de),d.createElement(e,{prefixCls:fe,level:ae,isStart:K,isEnd:F}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),C}(d.Component),l=function(D){return d.createElement(s.a.Consumer,null,function(C){return d.createElement(m,Object.assign({},D,{context:C}))})};l.displayName="TreeNode",l.defaultProps={title:f},l.isTreeNode=1;var E=X.a=l},X9zl:function(U,X,x){},XIdC:function(U,X,x){"use strict";var I=x("rePB"),_=x("ODXe"),O=x("Ff2n"),y=x("q1tI"),v=x.n(y),o=x("TSYQ"),g=x.n(o),p=x("6cGi"),d=x("4IlW"),a=y.forwardRef(function(n,s){var t,i=n.prefixCls,e=i===void 0?"rc-switch":i,r=n.className,c=n.checked,u=n.defaultChecked,f=n.disabled,m=n.loadingIcon,l=n.checkedChildren,E=n.unCheckedChildren,b=n.onClick,D=n.onChange,C=n.onKeyDown,w=Object(O.a)(n,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),S=Object(p.a)(!1,{value:c,defaultValue:u}),A=Object(_.a)(S,2),R=A[0],k=A[1];function L(N,K){var F=R;return f||(F=N,k(F),D==null||D(F,K)),F}function M(N){N.which===d.a.LEFT?L(!1,N):N.which===d.a.RIGHT&&L(!0,N),C==null||C(N)}function G(N){var K=L(!R,N);b==null||b(K,N)}var W=g()(e,r,(t={},Object(I.a)(t,"".concat(e,"-checked"),R),Object(I.a)(t,"".concat(e,"-disabled"),f),t));return y.createElement("button",Object.assign({},w,{type:"button",role:"switch","aria-checked":R,disabled:f,className:W,ref:s,onKeyDown:M,onClick:G}),m,y.createElement("span",{className:"".concat(e,"-inner")},R?l:E))});a.displayName="Switch",X.a=a},XZCF:function(U,X,x){},Xsq0:function(U,X,x){U.exports=x.p+"static/mainbanner.0a951716.jpg"},Y1PL:function(U,X,x){"use strict";x.r(X),x.d(X,"ResizableTextArea",function(){return re});var I=x("wx14"),_=x("1OyB"),O=x("vuIU"),y=x("Ji7U"),v=x("LK+K"),o=x("q1tI"),g=x("VTBJ"),p=x("rePB"),d=x("Zm9Q"),a=x("Kwbf"),n=x("c+Xe"),s=x("m+aA"),t=x("bdgK"),i=new Map;function e(ke){ke.forEach(function(ne){var Oe,Ce=ne.target;(Oe=i.get(Ce))===null||Oe===void 0||Oe.forEach(function(fe){return fe(Ce)})})}var r=new t.default(e),c=null,u=null;function f(ke,ne){i.has(ke)||(i.set(ke,new Set),r.observe(ke)),i.get(ke).add(ne)}function m(ke,ne){i.has(ke)&&(i.get(ke).delete(ne),i.get(ke).size||(r.unobserve(ke),i.delete(ke)))}var l=function(ke){Object(y.a)(Oe,ke);var ne=Object(v.a)(Oe);function Oe(){return Object(_.a)(this,Oe),ne.apply(this,arguments)}return Object(O.a)(Oe,[{key:"render",value:function(){return this.props.children}}]),Oe}(o.Component),E=o.createContext(null);function b(ke){var ne=ke.children,Oe=ke.onBatchResize,Ce=o.useRef(0),fe=o.useRef([]),oe=o.useContext(E),se=o.useCallback(function(be,ie,de){Ce.current+=1;var Fe=Ce.current;fe.current.push({size:be,element:ie,data:de}),Promise.resolve().then(function(){Fe===Ce.current&&(Oe==null||Oe(fe.current),fe.current=[])}),oe==null||oe(be,ie,de)},[Oe,oe]);return o.createElement(E.Provider,{value:se},ne)}function D(ke){var ne=ke.children,Oe=ke.disabled,Ce=o.useRef(null),fe=o.useRef(null),oe=o.useContext(E),se=o.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),be=o.isValidElement(ne)&&Object(n.c)(ne),ie=be?ne.ref:null,de=o.useMemo(function(){return Object(n.a)(ie,Ce)},[ie,Ce]),Fe=o.useRef(ke);Fe.current=ke;var ae=o.useCallback(function(Z){var Y=Fe.current,q=Y.onResize,ve=Y.data,pe=Z.getBoundingClientRect(),Te=pe.width,Ne=pe.height,me=Z.offsetWidth,Ie=Z.offsetHeight,_e=Math.floor(Te),Ve=Math.floor(Ne);if(se.current.width!==_e||se.current.height!==Ve||se.current.offsetWidth!==me||se.current.offsetHeight!==Ie){var tt={width:_e,height:Ve,offsetWidth:me,offsetHeight:Ie};se.current=tt;var Ge=me===Math.round(Te)?Te:me,Le=Ie===Math.round(Ne)?Ne:Ie,bt=Object(g.a)(Object(g.a)({},tt),{},{offsetWidth:Ge,offsetHeight:Le});oe==null||oe(bt,Z,ve),q&&Promise.resolve().then(function(){q(bt,Z)})}},[]);return o.useEffect(function(){var Z=Object(s.a)(Ce.current)||Object(s.a)(fe.current);return Z&&!Oe&&f(Z,ae),function(){return m(Z,ae)}},[Ce.current,Oe]),o.createElement(l,{ref:fe},be?o.cloneElement(ne,{ref:de}):ne)}var C="rc-observer-key";function w(ke){var ne=ke.children,Oe=Object(d.a)(ne);return Oe.map(function(Ce,fe){var oe=(Ce==null?void 0:Ce.key)||"".concat(C,"-").concat(fe);return o.createElement(D,Object(I.a)({},ke,{key:oe}),Ce)})}w.Collection=b;var S=w,A=x("bT9E"),R=x("TSYQ"),k=x.n(R),L=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important
|
|
|
`,M=["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"],G={},W;function N(ke){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=ke.getAttribute("id")||ke.getAttribute("data-reactid")||ke.getAttribute("name");if(ne&&G[Oe])return G[Oe];var Ce=window.getComputedStyle(ke),fe=Ce.getPropertyValue("box-sizing")||Ce.getPropertyValue("-moz-box-sizing")||Ce.getPropertyValue("-webkit-box-sizing"),oe=parseFloat(Ce.getPropertyValue("padding-bottom"))+parseFloat(Ce.getPropertyValue("padding-top")),se=parseFloat(Ce.getPropertyValue("border-bottom-width"))+parseFloat(Ce.getPropertyValue("border-top-width")),be=M.map(function(de){return"".concat(de,":").concat(Ce.getPropertyValue(de))}).join(";"),ie={sizingStyle:be,paddingSize:oe,borderSize:se,boxSizing:fe};return ne&&Oe&&(G[Oe]=ie),ie}function K(ke){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ce=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;W||(W=document.createElement("textarea"),W.setAttribute("tab-index","-1"),W.setAttribute("aria-hidden","true"),document.body.appendChild(W)),ke.getAttribute("wrap")?W.setAttribute("wrap",ke.getAttribute("wrap")):W.removeAttribute("wrap");var fe=N(ke,ne),oe=fe.paddingSize,se=fe.borderSize,be=fe.boxSizing,ie=fe.sizingStyle;W.setAttribute("style","".concat(ie,";").concat(L)),W.value=ke.value||ke.placeholder||"";var de=Number.MIN_SAFE_INTEGER,Fe=Number.MAX_SAFE_INTEGER,ae=W.scrollHeight,Z;if(be==="border-box"?ae+=se:be==="content-box"&&(ae-=oe),Oe!==null||Ce!==null){W.value=" ";var Y=W.scrollHeight-oe;Oe!==null&&(de=Y*Oe,be==="border-box"&&(de=de+oe+se),ae=Math.max(de,ae)),Ce!==null&&(Fe=Y*Ce,be==="border-box"&&(Fe=Fe+oe+se),Z=ae>Fe?"":"hidden",ae=Math.min(Fe,ae))}return{height:ae,minHeight:de,maxHeight:Fe,overflowY:Z,resize:"none"}}var F=x("Gytx"),P=x.n(F),B;(function(ke){ke[ke.NONE=0]="NONE",ke[ke.RESIZING=1]="RESIZING",ke[ke.RESIZED=2]="RESIZED"})(B||(B={}));var J=function(ke){Object(y.a)(Oe,ke);var ne=Object(v.a)(Oe);function Oe(Ce){var fe;return Object(_.a)(this,Oe),fe=ne.call(this,Ce),fe.nextFrameActionId=void 0,fe.resizeFrameId=void 0,fe.textArea=void 0,fe.saveTextArea=function(oe){fe.textArea=oe},fe.handleResize=function(oe){var se=fe.state.resizeStatus,be=fe.props,ie=be.autoSize,de=be.onResize;if(se!==B.NONE)return;typeof de=="function"&&de(oe),ie&&fe.resizeOnNextFrame()},fe.resizeOnNextFrame=function(){cancelAnimationFrame(fe.nextFrameActionId),fe.nextFrameActionId=requestAnimationFrame(fe.resizeTextarea)},fe.resizeTextarea=function(){var oe=fe.props.autoSize;if(!oe||!fe.textArea)return;var se=oe.minRows,be=oe.maxRows,ie=K(fe.textArea,!1,se,be);fe.setState({textareaStyles:ie,resizeStatus:B.RESIZING},function(){cancelAnimationFrame(fe.resizeFrameId),fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:B.RESIZED},function(){fe.resizeFrameId=requestAnimationFrame(function(){fe.setState({resizeStatus:B.NONE}),fe.fixFirefoxAutoScroll()})})})})},fe.renderTextArea=function(){var oe=fe.props,se=oe.prefixCls,be=se===void 0?"rc-textarea":se,ie=oe.autoSize,de=oe.onResize,Fe=oe.className,ae=oe.disabled,Z=fe.state,Y=Z.textareaStyles,q=Z.resizeStatus,ve=Object(A.a)(fe.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),pe=k()(be,Fe,Object(p.a)({},"".concat(be,"-disabled"),ae));"value"in ve&&(ve.value=ve.value||"");var Te=Object(g.a)(Object(g.a)(Object(g.a)({},fe.props.style),Y),q===B.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return o.createElement(S,{onResize:fe.handleResize,disabled:!(ie||de)},o.createElement("textarea",Object(I.a)({},ve,{className:pe,style:Te,ref:fe.saveTextArea})))},fe.state={textareaStyles:{},resizeStatus:B.NONE},fe}return Object(O.a)(Oe,[{key:"componentDidUpdate",value:function(fe){(fe.value!==this.props.value||!P()(fe.autoSize,this.props.autoSize))&&this.resizeTextarea()}},{key:"componentWillUnmount",value:function(){cancelAnimationFrame(this.nextFrameActionId),cancelAnimationFrame(this.resizeFrameId)}},{key:"fixFirefoxAutoScroll",value:function(){try{if(document.activeElement===this.textArea){var fe=this.textArea.selectionStart,oe=this.textArea.selectionEnd;this.textArea.setSelectionRange(fe,oe)}}catch(se){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Oe}(o.Component),re=J,he=function(ke){Object(y.a)(Oe,ke);var ne=Object(v.a)(Oe);function Oe(Ce){var fe;Object(_.a)(this,Oe),fe=ne.call(this,Ce),fe.resizableTextArea=void 0,fe.focus=function(){fe.resizableTextArea.textArea.focus()},fe.saveTextArea=function(se){fe.resizableTextArea=se},fe.handleChange=function(se){var be=fe.props.onChange;fe.setValue(se.target.value,function(){fe.resizableTextArea.resizeTextarea()}),be&&be(se)},fe.handleKeyDown=function(se){var be=fe.props,ie=be.onPressEnter,de=be.onKeyDown;se.keyCode===13&&ie&&ie(se),de&&de(se)};var oe=typeof Ce.value=="undefined"||Ce.value===null?Ce.defaultValue:Ce.value;return fe.state={value:oe},fe}return Object(O.a)(Oe,[{key:"setValue",value:function(fe,oe){"value"in this.props||this.setState({value:fe},oe)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return o.createElement(re,Object(I.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(fe){return"value"in fe?{value:fe.value}:null}}]),Oe}(o.Component),we=X.default=he},YJ9k:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(v,o){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}function _(v,o){for(var g=0;g<o.length;g++){var p=o[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(v,p.key,p)}}function O(v,o,g){return o&&_(v.prototype,o),g&&_(v,g),v}var y=function(){function v(){I(this,v),this._listeners=new Map}return O(v,[{key:"addEventListener",value:function(g,p){this._listeners.has(g)||this._listeners.set(g,new Set),this._listeners.get(g).add(p)}},{key:"removeEventListener",value:function(g,p){this._listeners.has(g)&&this._listeners.get(g).delete(p)}},{key:"dispatchEvent",value:function(g){var p=this;return this._listeners.has(g.type)?(this._listeners.get(g.type).forEach(function(d){return d.call(p,g)}),!g.defaultPrevented):!0}}]),v}();X.default=y},Ypxr:function(U,X,x){},Yr8L:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAe1BMVEUAAAC/j1C3l1i1lVq2llmzl1i2llm0llm1lVi0llm1lVi0llm1lVm1lVi0lli1lVi0lli1llm1lVm0lli1lli1lVm0lVm1lli1llnJs4fSvpnYx6fdzrLh1Lzl2sTo38zs49Pu59nx6+D07+X28uv59vD7+fX9/Pr///9SRDJsAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAAB+klEQVRYw+3X2VbCMBAG4EliEQqkQGgTEBFRlvd/QksLMV0yyVQvvPC/4XCg38kyzQLQSTJfGTSLqYBwxMJEZM5CTlKYqKwDjRKRTinhbVqb6EjMGRtCOAJlFGiGQBTHLDuPP08XVUaMBBUwqp+bPtcTZQc4TXr+vv84Xcucjq+dnyB1i4F/T3gPtKmUOp8bL2QKDtJg0OHq5OiHymIoUOjkQtetH1q7E9UD1cDBfFSfb37IREG7excPfwBqDvrPoW096C8YpILQ7jFpe2T6l+57GoAOBoEyd+UItQgryDEwHQ21++ZAulwv0/Bgb/aXvia5j5ZvP7PDnQrv9B/r19YHqWoB59qygYJsQspC+r7qinwQtHxAud2amLxD+RBIuhuTkPoGZRRodoO07OyUIuEwaUMXBEqAJ779tjNtnxXwbj8bk4ZFt6D3xgq5c3/KUChtl+LFcZo9G6MQb/ft5ezZRfLAsUb2bGznal/bGUKDeprkSR48aaVxUBI++y1/ehKxndNhRzGIOY7q33HCko50QpISEB2GjLhkQImvCvQIiOGyj0kZ0MNnrQVTTYYwtTWxlhoPVpp1ngL8Q53yfrrFXibn1VdOZhLPhWsliM3x30BoVYDct2iDVVBuVzDs4kaDcj+UkSDphyYkiHnXSEWsIyZ7e6e8c/YFAVX9WNqVSc8AAAAASUVORK5CYII="},ZBwS:function(U,X){var x=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},I=-1,_=1,O=0;x.Diff=function(y,v){return[y,v]},x.prototype.diff_main=function(y,v,o,g){typeof g=="undefined"&&(this.Diff_Timeout<=0?g=Number.MAX_VALUE:g=new Date().getTime()+this.Diff_Timeout*1e3);var p=g;if(y==null||v==null)throw new Error("Null input. (diff_main)");if(y==v)return y?[new x.Diff(O,y)]:[];typeof o=="undefined"&&(o=!0);var d=o,a=this.diff_commonPrefix(y,v),n=y.substring(0,a);y=y.substring(a),v=v.substring(a),a=this.diff_commonSuffix(y,v);var s=y.substring(y.length-a);y=y.substring(0,y.length-a),v=v.substring(0,v.length-a);var t=this.diff_compute_(y,v,d,p);return n&&t.unshift(new x.Diff(O,n)),s&&t.push(new x.Diff(O,s)),this.diff_cleanupMerge(t),t},x.prototype.diff_compute_=function(y,v,o,g){var p;if(!y)return[new x.Diff(_,v)];if(!v)return[new x.Diff(I,y)];var d=y.length>v.length?y:v,a=y.length>v.length?v:y,n=d.indexOf(a);if(n!=-1)return p=[new x.Diff(_,d.substring(0,n)),new x.Diff(O,a),new x.Diff(_,d.substring(n+a.length))],y.length>v.length&&(p[0][0]=p[2][0]=I),p;if(a.length==1)return[new x.Diff(I,y),new x.Diff(_,v)];var s=this.diff_halfMatch_(y,v);if(s){var t=s[0],i=s[1],e=s[2],r=s[3],c=s[4],u=this.diff_main(t,e,o,g),f=this.diff_main(i,r,o,g);return u.concat([new x.Diff(O,c)],f)}return o&&y.length>100&&v.length>100?this.diff_lineMode_(y,v,g):this.diff_bisect_(y,v,g)},x.prototype.diff_lineMode_=function(y,v,o){var g=this.diff_linesToChars_(y,v);y=g.chars1,v=g.chars2;var p=g.lineArray,d=this.diff_main(y,v,!1,o);this.diff_charsToLines_(d,p),this.diff_cleanupSemantic(d),d.push(new x.Diff(O,""));for(var a=0,n=0,s=0,t="",i="";a<d.length;){switch(d[a][0]){case _:s++,i+=d[a][1];break;case I:n++,t+=d[a][1];break;case O:if(n>=1&&s>=1){d.splice(a-n-s,n+s),a=a-n-s;for(var e=this.diff_main(t,i,!1,o),r=e.length-1;r>=0;r--)d.splice(a,0,e[r]);a=a+e.length}s=0,n=0,t="",i="";break}a++}return d.pop(),d},x.prototype.diff_bisect_=function(y,v,o){for(var g=y.length,p=v.length,d=Math.ceil((g+p)/2),a=d,n=2*d,s=new Array(n),t=new Array(n),i=0;i<n;i++)s[i]=-1,t[i]=-1;s[a+1]=0,t[a+1]=0;for(var e=g-p,r=e%2!=0,c=0,u=0,f=0,m=0,l=0;l<d&&!(new Date().getTime()>o);l++){for(var E=-l+c;E<=l-u;E+=2){var b=a+E,D;E==-l||E!=l&&s[b-1]<s[b+1]?D=s[b+1]:D=s[b-1]+1;for(var C=D-E;D<g&&C<p&&y.charAt(D)==v.charAt(C);)D++,C++;if(s[b]=D,D>g)u+=2;else if(C>p)c+=2;else if(r){var w=a+e-E;if(w>=0&&w<n&&t[w]!=-1){var S=g-t[w];if(D>=S)return this.diff_bisectSplit_(y,v,D,C,o)}}}for(var A=-l+f;A<=l-m;A+=2){var w=a+A,S;A==-l||A!=l&&t[w-1]<t[w+1]?S=t[w+1]:S=t[w-1]+1;for(var R=S-A;S<g&&R<p&&y.charAt(g-S-1)==v.charAt(p-R-1);)S++,R++;if(t[w]=S,S>g)m+=2;else if(R>p)f+=2;else if(!r){var b=a+e-A;if(b>=0&&b<n&&s[b]!=-1){var D=s[b],C=a+D-b;if(S=g-S,D>=S)return this.diff_bisectSplit_(y,v,D,C,o)}}}}return[new x.Diff(I,y),new x.Diff(_,v)]},x.prototype.diff_bisectSplit_=function(y,v,o,g,p){var d=y.substring(0,o),a=v.substring(0,g),n=y.substring(o),s=v.substring(g),t=this.diff_main(d,a,!1,p),i=this.diff_main(n,s,!1,p);return t.concat(i)},x.prototype.diff_linesToChars_=function(y,v){var o=[],g={};o[0]="";function p(s){for(var t="",i=0,e=-1,r=o.length;e<s.length-1;){e=s.indexOf(`
|
|
|
`,i),e==-1&&(e=s.length-1);var c=s.substring(i,e+1);(g.hasOwnProperty?g.hasOwnProperty(c):g[c]!==void 0)?t+=String.fromCharCode(g[c]):(r==d&&(c=s.substring(i),e=s.length),t+=String.fromCharCode(r),g[c]=r,o[r++]=c),i=e+1}return t}var d=4e4,a=p(y);d=65535;var n=p(v);return{chars1:a,chars2:n,lineArray:o}},x.prototype.diff_charsToLines_=function(y,v){for(var o=0;o<y.length;o++){for(var g=y[o][1],p=[],d=0;d<g.length;d++)p[d]=v[g.charCodeAt(d)];y[o][1]=p.join("")}},x.prototype.diff_commonPrefix=function(y,v){if(!y||!v||y.charAt(0)!=v.charAt(0))return 0;for(var o=0,g=Math.min(y.length,v.length),p=g,d=0;o<p;)y.substring(d,p)==v.substring(d,p)?(o=p,d=o):g=p,p=Math.floor((g-o)/2+o);return p},x.prototype.diff_commonSuffix=function(y,v){if(!y||!v||y.charAt(y.length-1)!=v.charAt(v.length-1))return 0;for(var o=0,g=Math.min(y.length,v.length),p=g,d=0;o<p;)y.substring(y.length-p,y.length-d)==v.substring(v.length-p,v.length-d)?(o=p,d=o):g=p,p=Math.floor((g-o)/2+o);return p},x.prototype.diff_commonOverlap_=function(y,v){var o=y.length,g=v.length;if(o==0||g==0)return 0;o>g?y=y.substring(o-g):o<g&&(v=v.substring(0,o));var p=Math.min(o,g);if(y==v)return p;for(var d=0,a=1;;){var n=y.substring(p-a),s=v.indexOf(n);if(s==-1)return d;a+=s,(s==0||y.substring(p-a)==v.substring(0,a))&&(d=a,a++)}},x.prototype.diff_halfMatch_=function(y,v){if(this.Diff_Timeout<=0)return null;var o=y.length>v.length?y:v,g=y.length>v.length?v:y;if(o.length<4||g.length*2<o.length)return null;var p=this;function d(u,f,m){for(var l=u.substring(m,m+Math.floor(u.length/4)),E=-1,b="",D,C,w,S;(E=f.indexOf(l,E+1))!=-1;){var A=p.diff_commonPrefix(u.substring(m),f.substring(E)),R=p.diff_commonSuffix(u.substring(0,m),f.substring(0,E));b.length<R+A&&(b=f.substring(E-R,E)+f.substring(E,E+A),D=u.substring(0,m-R),C=u.substring(m+A),w=f.substring(0,E-R),S=f.substring(E+A))}return b.length*2>=u.length?[D,C,w,S,b]:null}var a=d(o,g,Math.ceil(o.length/4)),n=d(o,g,Math.ceil(o.length/2)),s;if(!a&&!n)return null;n?a?s=a[4].length>n[4].length?a:n:s=n:s=a;var t,i,e,r;y.length>v.length?(t=s[0],i=s[1],e=s[2],r=s[3]):(e=s[0],r=s[1],t=s[2],i=s[3]);var c=s[4];return[t,i,e,r,c]},x.prototype.diff_cleanupSemantic=function(y){for(var v=!1,o=[],g=0,p=null,d=0,a=0,n=0,s=0,t=0;d<y.length;)y[d][0]==O?(o[g++]=d,a=s,n=t,s=0,t=0,p=y[d][1]):(y[d][0]==_?s+=y[d][1].length:t+=y[d][1].length,p&&p.length<=Math.max(a,n)&&p.length<=Math.max(s,t)&&(y.splice(o[g-1],0,new x.Diff(I,p)),y[o[g-1]+1][0]=_,g--,g--,d=g>0?o[g-1]:-1,a=0,n=0,s=0,t=0,p=null,v=!0)),d++;for(v&&this.diff_cleanupMerge(y),this.diff_cleanupSemanticLossless(y),d=1;d<y.length;){if(y[d-1][0]==I&&y[d][0]==_){var i=y[d-1][1],e=y[d][1],r=this.diff_commonOverlap_(i,e),c=this.diff_commonOverlap_(e,i);r>=c?(r>=i.length/2||r>=e.length/2)&&(y.splice(d,0,new x.Diff(O,e.substring(0,r))),y[d-1][1]=i.substring(0,i.length-r),y[d+1][1]=e.substring(r),d++):(c>=i.length/2||c>=e.length/2)&&(y.splice(d,0,new x.Diff(O,i.substring(0,c))),y[d-1][0]=_,y[d-1][1]=e.substring(0,e.length-c),y[d+1][0]=I,y[d+1][1]=i.substring(c),d++),d++}d++}},x.prototype.diff_cleanupSemanticLossless=function(y){function v(c,u){if(!c||!u)return 6;var f=c.charAt(c.length-1),m=u.charAt(0),l=f.match(x.nonAlphaNumericRegex_),E=m.match(x.nonAlphaNumericRegex_),b=l&&f.match(x.whitespaceRegex_),D=E&&m.match(x.whitespaceRegex_),C=b&&f.match(x.linebreakRegex_),w=D&&m.match(x.linebreakRegex_),S=C&&c.match(x.blanklineEndRegex_),A=w&&u.match(x.blanklineStartRegex_);return S||A?5:C||w?4:l&&!b&&D?3:b||D?2:l||E?1:0}for(var o=1;o<y.length-1;){if(y[o-1][0]==O&&y[o+1][0]==O){var g=y[o-1][1],p=y[o][1],d=y[o+1][1],a=this.diff_commonSuffix(g,p);if(a){var n=p.substring(p.length-a);g=g.substring(0,g.length-a),p=n+p.substring(0,p.length-a),d=n+d}for(var s=g,t=p,i=d,e=v(g,p)+v(p,d);p.charAt(0)===d.charAt(0);){g+=p.charAt(0),p=p.substring(1)+d.charAt(0),d=d.substring(1);var r=v(g,p)+v(p,d);r>=e&&(e=r,s=g,t=p,i=d)}y[o-1][1]!=s&&(s?y[o-1][1]=s:(y.splice(o-1,1),o--),y[o][1]=t,i?y[o+1][1]=i:(y.splice(o+1,1),o--))}o++}},x.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,x.whitespaceRegex_=/\s/,x.linebreakRegex_=/[\r\n]/,x.blanklineEndRegex_=/\n\r?\n$/,x.blanklineStartRegex_=/^\r?\n\r?\n/,x.prototype.diff_cleanupEfficiency=function(y){for(var v=!1,o=[],g=0,p=null,d=0,a=!1,n=!1,s=!1,t=!1;d<y.length;)y[d][0]==O?(y[d][1].length<this.Diff_EditCost&&(s||t)?(o[g++]=d,a=s,n=t,p=y[d][1]):(g=0,p=null),s=t=!1):(y[d][0]==I?t=!0:s=!0,p&&(a&&n&&s&&t||p.length<this.Diff_EditCost/2&&a+n+s+t==3)&&(y.splice(o[g-1],0,new x.Diff(I,p)),y[o[g-1]+1][0]=_,g--,p=null,a&&n?(s=t=!0,g=0):(g--,d=g>0?o[g-1]:-1,s=t=!1),v=!0)),d++;v&&this.diff_cleanupMerge(y)},x.prototype.diff_cleanupMerge=function(y){y.push(new x.Diff(O,""));for(var v=0,o=0,g=0,p="",d="",a;v<y.length;)switch(y[v][0]){case _:g++,d+=y[v][1],v++;break;case I:o++,p+=y[v][1],v++;break;case O:o+g>1?(o!==0&&g!==0&&(a=this.diff_commonPrefix(d,p),a!==0&&(v-o-g>0&&y[v-o-g-1][0]==O?y[v-o-g-1][1]+=d.substring(0,a):(y.splice(0,0,new x.Diff(O,d.substring(0,a))),v++),d=d.substring(a),p=p.substring(a)),a=this.diff_commonSuffix(d,p),a!==0&&(y[v][1]=d.substring(d.length-a)+y[v][1],d=d.substring(0,d.length-a),p=p.substring(0,p.length-a))),v-=o+g,y.splice(v,o+g),p.length&&(y.splice(v,0,new x.Diff(I,p)),v++),d.length&&(y.splice(v,0,new x.Diff(_,d)),v++),v++):v!==0&&y[v-1][0]==O?(y[v-1][1]+=y[v][1],y.splice(v,1)):v++,g=0,o=0,p="",d="";break}y[y.length-1][1]===""&&y.pop();var n=!1;for(v=1;v<y.length-1;)y[v-1][0]==O&&y[v+1][0]==O&&(y[v][1].substring(y[v][1].length-y[v-1][1].length)==y[v-1][1]?(y[v][1]=y[v-1][1]+y[v][1].substring(0,y[v][1].length-y[v-1][1].length),y[v+1][1]=y[v-1][1]+y[v+1][1],y.splice(v-1,1),n=!0):y[v][1].substring(0,y[v+1][1].length)==y[v+1][1]&&(y[v-1][1]+=y[v+1][1],y[v][1]=y[v][1].substring(y[v+1][1].length)+y[v+1][1],y.splice(v+1,1),n=!0)),v++;n&&this.diff_cleanupMerge(y)},x.prototype.diff_xIndex=function(y,v){var o=0,g=0,p=0,d=0,a;for(a=0;a<y.length&&!(y[a][0]!==_&&(o+=y[a][1].length),y[a][0]!==I&&(g+=y[a][1].length),o>v);a++)p=o,d=g;return y.length!=a&&y[a][0]===I?d:d+(v-p)},x.prototype.diff_prettyHtml=function(y){for(var v=[],o=/&/g,g=/</g,p=/>/g,d=/\n/g,a=0;a<y.length;a++){var n=y[a][0],s=y[a][1],t=s.replace(o,"&").replace(g,"<").replace(p,">").replace(d,"¶<br>");switch(n){case _:v[a]='<ins style="background:#e6ffe6;">'+t+"</ins>";break;case I:v[a]='<del style="background:#ffe6e6;">'+t+"</del>";break;case O:v[a]="<span>"+t+"</span>";break}}return v.join("")},x.prototype.diff_text1=function(y){for(var v=[],o=0;o<y.length;o++)y[o][0]!==_&&(v[o]=y[o][1]);return v.join("")},x.prototype.diff_text2=function(y){for(var v=[],o=0;o<y.length;o++)y[o][0]!==I&&(v[o]=y[o][1]);return v.join("")},x.prototype.diff_levenshtein=function(y){for(var v=0,o=0,g=0,p=0;p<y.length;p++){var d=y[p][0],a=y[p][1];switch(d){case _:o+=a.length;break;case I:g+=a.length;break;case O:v+=Math.max(o,g),o=0,g=0;break}}return v+=Math.max(o,g),v},x.prototype.diff_toDelta=function(y){for(var v=[],o=0;o<y.length;o++)switch(y[o][0]){case _:v[o]="+"+encodeURI(y[o][1]);break;case I:v[o]="-"+y[o][1].length;break;case O:v[o]="="+y[o][1].length;break}return v.join(" ").replace(/%20/g," ")},x.prototype.diff_fromDelta=function(y,v){for(var o=[],g=0,p=0,d=v.split(/\t/g),a=0;a<d.length;a++){var n=d[a].substring(1);switch(d[a].charAt(0)){case"+":try{o[g++]=new x.Diff(_,decodeURI(n))}catch(i){throw new Error("Illegal escape in diff_fromDelta: "+n)}break;case"-":case"=":var s=parseInt(n,10);if(isNaN(s)||s<0)throw new Error("Invalid number in diff_fromDelta: "+n);var t=y.substring(p,p+=s);d[a].charAt(0)=="="?o[g++]=new x.Diff(O,t):o[g++]=new x.Diff(I,t);break;default:if(d[a])throw new Error("Invalid diff operation in diff_fromDelta: "+d[a])}}if(p!=y.length)throw new Error("Delta length ("+p+") does not equal source text length ("+y.length+").");return o},x.prototype.match_main=function(y,v,o){if(y==null||v==null||o==null)throw new Error("Null input. (match_main)");return o=Math.max(0,Math.min(o,y.length)),y==v?0:y.length?y.substring(o,o+v.length)==v?o:this.match_bitap_(y,v,o):-1},x.prototype.match_bitap_=function(y,v,o){if(v.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var g=this.match_alphabet_(v),p=this;function d(D,C){var w=D/v.length,S=Math.abs(o-C);return p.Match_Distance?w+S/p.Match_Distance:S?1:w}var a=this.Match_Threshold,n=y.indexOf(v,o);n!=-1&&(a=Math.min(d(0,n),a),n=y.lastIndexOf(v,o+v.length),n!=-1&&(a=Math.min(d(0,n),a)));var s=1<<v.length-1;n=-1;for(var t,i,e=v.length+y.length,r,c=0;c<v.length;c++){for(t=0,i=e;t<i;)d(c,o+i)<=a?t=i:e=i,i=Math.floor((e-t)/2+t);e=i;var u=Math.max(1,o-i+1),f=Math.min(o+i,y.length)+v.length,m=Array(f+2);m[f+1]=(1<<c)-1;for(var l=f;l>=u;l--){var E=g[y.charAt(l-1)];if(c===0?m[l]=(m[l+1]<<1|1)&E:m[l]=(m[l+1]<<1|1)&E|((r[l+1]|r[l])<<1|1)|r[l+1],m[l]&s){var b=d(c,l-1);if(b<=a)if(a=b,n=l-1,n>o)u=Math.max(1,2*o-n);else break}}if(d(c+1,o)>a)break;r=m}return n},x.prototype.match_alphabet_=function(y){for(var v={},o=0;o<y.length;o++)v[y.charAt(o)]=0;for(var o=0;o<y.length;o++)v[y.charAt(o)]|=1<<y.length-o-1;return v},x.prototype.patch_addContext_=function(y,v){if(v.length==0)return;if(y.start2===null)throw Error("patch not initialized");for(var o=v.substring(y.start2,y.start2+y.length1),g=0;v.indexOf(o)!=v.lastIndexOf(o)&&o.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)g+=this.Patch_Margin,o=v.substring(y.start2-g,y.start2+y.length1+g);g+=this.Patch_Margin;var p=v.substring(y.start2-g,y.start2);p&&y.diffs.unshift(new x.Diff(O,p));var d=v.substring(y.start2+y.length1,y.start2+y.length1+g);d&&y.diffs.push(new x.Diff(O,d)),y.start1-=p.length,y.start2-=p.length,y.length1+=p.length+d.length,y.length2+=p.length+d.length},x.prototype.patch_make=function(y,v,o){var g,p;if(typeof y=="string"&&typeof v=="string"&&typeof o=="undefined")g=y,p=this.diff_main(g,v,!0),p.length>2&&(this.diff_cleanupSemantic(p),this.diff_cleanupEfficiency(p));else if(y&&typeof y=="object"&&typeof v=="undefined"&&typeof o=="undefined")p=y,g=this.diff_text1(p);else if(typeof y=="string"&&v&&typeof v=="object"&&typeof o=="undefined")g=y,p=v;else if(typeof y=="string"&&typeof v=="string"&&o&&typeof o=="object")g=y,p=o;else throw new Error("Unknown call format to patch_make.");if(p.length===0)return[];for(var d=[],a=new x.patch_obj,n=0,s=0,t=0,i=g,e=g,r=0;r<p.length;r++){var c=p[r][0],u=p[r][1];!n&&c!==O&&(a.start1=s,a.start2=t);switch(c){case _:a.diffs[n++]=p[r],a.length2+=u.length,e=e.substring(0,t)+u+e.substring(t);break;case I:a.length1+=u.length,a.diffs[n++]=p[r],e=e.substring(0,t)+e.substring(t+u.length);break;case O:u.length<=2*this.Patch_Margin&&n&&p.length!=r+1?(a.diffs[n++]=p[r],a.length1+=u.length,a.length2+=u.length):u.length>=2*this.Patch_Margin&&(n&&(this.patch_addContext_(a,i),d.push(a),a=new x.patch_obj,n=0,i=e,s=t));break}c!==_&&(s+=u.length),c!==I&&(t+=u.length)}return n&&(this.patch_addContext_(a,i),d.push(a)),d},x.prototype.patch_deepCopy=function(y){for(var v=[],o=0;o<y.length;o++){var g=y[o],p=new x.patch_obj;p.diffs=[];for(var d=0;d<g.diffs.length;d++)p.diffs[d]=new x.Diff(g.diffs[d][0],g.diffs[d][1]);p.start1=g.start1,p.start2=g.start2,p.length1=g.length1,p.length2=g.length2,v[o]=p}return v},x.prototype.patch_apply=function(y,v){if(y.length==0)return[v,[]];y=this.patch_deepCopy(y);var o=this.patch_addPadding(y);v=o+v+o,this.patch_splitMax(y);for(var g=0,p=[],d=0;d<y.length;d++){var a=y[d].start2+g,n=this.diff_text1(y[d].diffs),s,t=-1;if(n.length>this.Match_MaxBits?(s=this.match_main(v,n.substring(0,this.Match_MaxBits),a),s!=-1&&(t=this.match_main(v,n.substring(n.length-this.Match_MaxBits),a+n.length-this.Match_MaxBits),(t==-1||s>=t)&&(s=-1))):s=this.match_main(v,n,a),s==-1)p[d]=!1,g-=y[d].length2-y[d].length1;else{p[d]=!0,g=s-a;var i;if(t==-1?i=v.substring(s,s+n.length):i=v.substring(s,t+this.Match_MaxBits),n==i)v=v.substring(0,s)+this.diff_text2(y[d].diffs)+v.substring(s+n.length);else{var e=this.diff_main(n,i,!1);if(n.length>this.Match_MaxBits&&this.diff_levenshtein(e)/n.length>this.Patch_DeleteThreshold)p[d]=!1;else{this.diff_cleanupSemanticLossless(e);for(var r=0,c,u=0;u<y[d].diffs.length;u++){var f=y[d].diffs[u];f[0]!==O&&(c=this.diff_xIndex(e,r)),f[0]===_?v=v.substring(0,s+c)+f[1]+v.substring(s+c):f[0]===I&&(v=v.substring(0,s+c)+v.substring(s+this.diff_xIndex(e,r+f[1].length))),f[0]!==I&&(r+=f[1].length)}}}}}return v=v.substring(o.length,v.length-o.length),[v,p]},x.prototype.patch_addPadding=function(y){for(var v=this.Patch_Margin,o="",g=1;g<=v;g++)o+=String.fromCharCode(g);for(var g=0;g<y.length;g++)y[g].start1+=v,y[g].start2+=v;var p=y[0],d=p.diffs;if(d.length==0||d[0][0]!=O)d.unshift(new x.Diff(O,o)),p.start1-=v,p.start2-=v,p.length1+=v,p.length2+=v;else if(v>d[0][1].length){var a=v-d[0][1].length;d[0][1]=o.substring(d[0][1].length)+d[0][1],p.start1-=a,p.start2-=a,p.length1+=a,p.length2+=a}if(p=y[y.length-1],d=p.diffs,d.length==0||d[d.length-1][0]!=O)d.push(new x.Diff(O,o)),p.length1+=v,p.length2+=v;else if(v>d[d.length-1][1].length){var a=v-d[d.length-1][1].length;d[d.length-1][1]+=o.substring(0,a),p.length1+=a,p.length2+=a}return o},x.prototype.patch_splitMax=function(y){for(var v=this.Match_MaxBits,o=0;o<y.length;o++){if(y[o].length1<=v)continue;var g=y[o];y.splice(o--,1);for(var p=g.start1,d=g.start2,a="";g.diffs.length!==0;){var n=new x.patch_obj,s=!0;for(n.start1=p-a.length,n.start2=d-a.length,a!==""&&(n.length1=n.length2=a.length,n.diffs.push(new x.Diff(O,a)));g.diffs.length!==0&&n.length1<v-this.Patch_Margin;){var t=g.diffs[0][0],i=g.diffs[0][1];t===_?(n.length2+=i.length,d+=i.length,n.diffs.push(g.diffs.shift()),s=!1):t===I&&n.diffs.length==1&&n.diffs[0][0]==O&&i.length>2*v?(n.length1+=i.length,p+=i.length,s=!1,n.diffs.push(new x.Diff(t,i)),g.diffs.shift()):(i=i.substring(0,v-n.length1-this.Patch_Margin),n.length1+=i.length,p+=i.length,t===O?(n.length2+=i.length,d+=i.length):s=!1,n.diffs.push(new x.Diff(t,i)),i==g.diffs[0][1]?g.diffs.shift():g.diffs[0][1]=g.diffs[0][1].substring(i.length))}a=this.diff_text2(n.diffs),a=a.substring(a.length-this.Patch_Margin);var e=this.diff_text1(g.diffs).substring(0,this.Patch_Margin);e!==""&&(n.length1+=e.length,n.length2+=e.length,n.diffs.length!==0&&n.diffs[n.diffs.length-1][0]===O?n.diffs[n.diffs.length-1][1]+=e:n.diffs.push(new x.Diff(O,e))),s||y.splice(++o,0,n)}}},x.prototype.patch_toText=function(y){for(var v=[],o=0;o<y.length;o++)v[o]=y[o];return v.join("")},x.prototype.patch_fromText=function(y){var v=[];if(!y)return v;for(var o=y.split(`
|
|
|
`),g=0,p=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;g<o.length;){var d=o[g].match(p);if(!d)throw new Error("Invalid patch string: "+o[g]);var a=new x.patch_obj;for(v.push(a),a.start1=parseInt(d[1],10),d[2]===""?(a.start1--,a.length1=1):d[2]=="0"?a.length1=0:(a.start1--,a.length1=parseInt(d[2],10)),a.start2=parseInt(d[3],10),d[4]===""?(a.start2--,a.length2=1):d[4]=="0"?a.length2=0:(a.start2--,a.length2=parseInt(d[4],10)),g++;g<o.length;){var n=o[g].charAt(0);try{var s=decodeURI(o[g].substring(1))}catch(t){throw new Error("Illegal escape in patch_fromText: "+s)}if(n=="-")a.diffs.push(new x.Diff(I,s));else if(n=="+")a.diffs.push(new x.Diff(_,s));else if(n==" ")a.diffs.push(new x.Diff(O,s));else{if(n=="@")break;if(!(n===""))throw new Error('Invalid patch mode "'+n+'" in: '+s)}g++}}return v},x.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},x.patch_obj.prototype.toString=function(){var y,v;this.length1===0?y=this.start1+",0":this.length1==1?y=this.start1+1:y=this.start1+1+","+this.length1,this.length2===0?v=this.start2+",0":this.length2==1?v=this.start2+1:v=this.start2+1+","+this.length2;for(var o=["@@ -"+y+" +"+v+` @@
|
|
|
`],g,p=0;p<this.diffs.length;p++){switch(this.diffs[p][0]){case _:g="+";break;case I:g="-";break;case O:g=" ";break}o[p+1]=g+encodeURI(this.diffs[p][1])+`
|
|
|
`}return o.join("").replace(/%20/g," ")},U.exports=x,U.exports.diff_match_patch=x,U.exports.DIFF_DELETE=I,U.exports.DIFF_INSERT=_,U.exports.DIFF_EQUAL=O},ZD9Y:function(U,X,x){"use strict";var I=x("BoS7"),_=x("Sdc0"),O=x("OaEy"),y=x("2fM7"),v=x("q1tI"),o=x.n(v),g=x("lOMy"),p=x.n(g),d=y.a.Option;X.a=function(a){var n=a.onFontSizeChange,s=a.cmFontSize,t=a.cmCodeMode,i=a.onCodeModeChange,e=a.onTabToSpace,r=a.className,c=r===void 0?"":r,u=a.tabToSpace,f=a.children;return o.a.createElement("div",{className:"tpi-code-setting ".concat(c)},o.a.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),o.a.createElement(y.a,{bordered:!1,size:"small",value:t,onChange:i},o.a.createElement(d,{value:"vs"},"\u767D\u8272\u80CC\u666F"),o.a.createElement(d,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),o.a.createElement(y.a,{bordered:!1,size:"small",value:s,onChange:n},o.a.createElement(d,{value:12},"12px"),o.a.createElement(d,{value:14},"14px"),o.a.createElement(d,{value:16},"16px"),o.a.createElement(d,{value:18},"18px"),o.a.createElement(d,{value:20},"20px"),o.a.createElement(d,{value:22},"22px"))),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"Tab\u8F6C\u6362"),o.a.createElement(_.a,{checked:u,onChange:e}))),o.a.createElement("h3",null,"\u5FEB\u6377\u952E"),o.a.createElement("section",null,o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),o.a.createElement("span",null,"Ctrl + S")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),o.a.createElement("span",null,"F1 / Alt + F1")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),o.a.createElement("span",null,"Ctrl + ]/[")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),o.a.createElement("span",null,"Ctrl + Shift + \\")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),o.a.createElement("span",null,"Home")),o.a.createElement("div",{className:"file-item"},o.a.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),o.a.createElement("span",null,"End"))),f)}},ZW9T:function(U,X,x){"use strict";x.d(X,"a",function(){return K});var I=x("k1fw"),_=x("miYZ"),O=x("tsqr"),y=x("rAM+"),v=x("tJVT"),o=x("PpiC"),g=x("q1tI"),p=x.n(g),d=x("bdgK"),a=x("oBTY"),n=x("9og8"),s=x("WmNS"),t=x.n(s),i={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},e={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},r={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","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"#include",content:'include "$0"'},{label:"printf",content:"printf($0)"},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for( ; ; ){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"#include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"#include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"#include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"#include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},c={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(`
|
|
|
`)}]},u=x("5VLF"),f=x.n(u),m={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"]}},l=function(P,B){return B.map(function(J){return{label:J,kind:P.languages.CompletionItemKind.Keyword,insertText:J}})},E=function(P){return Object.keys(m.tables).map(function(B){return{label:B,kind:P.languages.CompletionItemKind.Variable,insertText:B}})},b=function(P,B){var J=m.tables[P];return J?J.map(function(re){return{label:re,kind:B.languages.CompletionItemKind.Field,insertText:re}}):[]};function D(F,P,B,J,re){var he=P.getWordUntilPosition(B),we={startLineNumber:B.lineNumber,endLineNumber:B.lineNumber,startColumn:he.startColumn,endColumn:he.endColumn},ke=J.map(function(ne){return{label:ne,kind:F.languages.CompletionItemKind.Keyword,insertText:ne,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:we}});return re.map(function(ne){ke.push(Object(I.a)(Object(I.a)({},ne),{},{range:we}))}),ke}var C=function(F){m.languages.map(function(re){return F.languages.registerDocumentFormattingEditProvider(re,{provideDocumentFormattingEdits:function(we,ke,ne){return Object(n.a)(t.a.mark(function Oe(){var Ce;return t.a.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return Ce=f()(we.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}),oe.abrupt("return",[{range:we.getFullModelRange(),text:Ce}]);case 2:case"end":return oe.stop()}},Oe)}))()}}),re});var P=r.quickKey.map(function(re){return{label:re.label,kind:F.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),B=c.quickKey.map(function(re){return{label:re.label,kind:F.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),J=e.quickKey.map(function(re){return{label:re.label,kind:F.languages.CompletionItemKind.Method,insertText:re.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}});F.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(a.a)(r.keywords),Object(a.a)(r.quickKey.map(function(re){return re.label}))),provideCompletionItems:function(he,we){var ke=he.getValueInRange({startLineNumber:we.lineNumber,startColumn:1,endLineNumber:we.lineNumber,endColumn:we.column}),ne=ke.match(/cu/gim);console.log("match:",ne,we,ke,he);var Oe=[],Ce=we.lineNumber,fe=we.column,oe=he.getValueInRange({startLineNumber:Ce,startColumn:0,endLineNumber:Ce,endColumn:fe}),se=oe.trim().split(/\s+/),be=se[se.length-1];if(be.endsWith(".")){var ie=be.slice(0,be.length-1);Object.keys(m.tables).includes(ie)&&(Oe=Object(a.a)(b(ie,F)))}else be==="."?Oe=[]:Oe=[].concat(Object(a.a)(E(F)),Object(a.a)(l(F,r.keywords)),Object(a.a)(P));return{suggestions:Oe}}}),F.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(a.a)(i.keywords)),provideCompletionItems:function(he,we){var ke=he.getValueInRange({startLineNumber:we.lineNumber,startColumn:1,endLineNumber:we.lineNumber,endColumn:we.column}),ne=ke.match(/cu/gim);console.log("match:",ne,we,ke,he);var Oe=[],Ce=we.lineNumber,fe=we.column,oe=he.getValueInRange({startLineNumber:Ce,startColumn:0,endLineNumber:Ce,endColumn:fe}),se=oe.trim().split(/\s+/),be=se[se.length-1];if(be.endsWith(".")){var ie=be.slice(0,be.length-1);Object.keys(m.tables).includes(ie)&&(Oe=Object(a.a)(b(ie,F)))}else be==="."?Oe=[]:Oe=[].concat(Object(a.a)(E(F)),Object(a.a)(l(F,i.keywords)));return{suggestions:Oe}}}),F.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(a.a)(e.keywords)),provideCompletionItems:function(he,we){var ke=[],ne=we.lineNumber,Oe=we.column,Ce=he.getValueInRange({startLineNumber:ne,startColumn:0,endLineNumber:ne,endColumn:Oe}),fe=Ce.trim().split(/\s+/),oe=fe[fe.length-1];if(oe.endsWith(".")){var se=oe.slice(0,oe.length-1);Object.keys(m.tables).includes(se)&&(ke=Object(a.a)(b(se,F)))}else oe==="."?ke=[]:ke=[].concat(Object(a.a)(E(F)),Object(a.a)(l(F,e.keywords)),Object(a.a)(J));return{suggestions:ke}}}),F.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(a.a)(c.keywords)),provideCompletionItems:function(he,we){var ke=[],ne=we.lineNumber,Oe=we.column,Ce=he.getValueInRange({startLineNumber:ne,startColumn:0,endLineNumber:ne,endColumn:Oe}),fe=Ce.trim().split(/\s+/),oe=fe[fe.length-1];if(oe.endsWith(".")){var se=oe.slice(0,oe.length-1);Object.keys(m.tables).includes(se)&&(ke=Object(a.a)(b(se,F)))}else oe==="."?ke=[]:ke=[].concat(Object(a.a)(E(F)),Object(a.a)(l(F,c.keywords)),Object(a.a)(B));return{suggestions:ke}}})},w="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",S=x("LvDl"),A=x("+ua5");function R(F){return/^\d+$/.test(F)?"".concat(F,"px"):F}function k(){}var L=!1,M={"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"};function G(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],P=F;if(Array.isArray(F)){for(var B=0;B<F.length;B++){var J=M[F[B]];if(J)return J}return P[0]}return M[P]||P}var W=null,N=X.b=function(F){var P=F.width,B=P===void 0?"100%":P,J=F.height,re=J===void 0?"100%":J,he=F.value,we=F.language,ke=we===void 0?"javascript":we,ne=F.style,Oe=ne===void 0?{}:ne,Ce=F.options,fe=Ce===void 0?{}:Ce,oe=F.overrideServices,se=oe===void 0?{}:oe,be=F.theme,ie=be===void 0?"vs-dark":be,de=F.onEditBlur,Fe=F.onSave,ae=F.autoHeight,Z=ae===void 0?!1:ae,Y=F.forbidCopy,q=Y===void 0?!1:Y,ve=F.onChange,pe=ve===void 0?k:ve,Te=F.editorDidMount,Ne=Te===void 0?k:Te,me=F.onFocus,Ie=me===void 0?k:me,_e=F.filename,Ve=_e===void 0?"educoder.txt":_e,tt=F.errorLine,Ge=F.errorContent,Le=Ge===void 0?"":Ge,bt=Object(o.a)(F,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Re=Object(g.useRef)(),Xe=Object(g.useRef)({}),et=Object(g.useRef)(),Ye=Object(g.useRef)(!1),Me=Object(g.useRef)(),Ke=Object(g.useState)(!1),ge=Object(v.a)(Ke,2),Ee=ge[0],ce=ge[1];function je(){var lt;return Re.current&&(lt=new d.default(function(Lt){var Dt=Object(y.a)(Lt),Mt;try{for(Dt.s();!(Mt=Dt.n()).done;){var Wt=Mt.value;(Wt.target.offsetHeight>0||Wt.target.offsetWidth>0)&&Xe.current.instance.layout()}}catch(Yt){Dt.e(Yt)}finally{Dt.f()}}),lt.observe(Re.current)),lt}function Qe(){O.b.warn(decodeURIComponent(w))}var te=function(){var Lt=Xe.current.instance;if(he!=null&&Lt&&Ee){var Dt=Lt.getModel();Dt&&he!==Dt.getValue()&&(L=!0,Dt.setValue(he),Lt.layout(),L=!1)}};Object(g.useEffect)(function(){et.current&&clearTimeout(et.current),et.current=setTimeout(function(){te()},500)},[he,Ee,Xe.current]),Object(g.useEffect)(function(){if(tt&&Xe.current&&Xe.current.instance){var lt=Xe.current.instance;lt.changeViewZones(function(Dt){var Mt=document.createElement("div");Mt.style.padding="10px 20px",Mt.style.width="calc(100% - 20px)",Mt.className="my-error-line-wrp",Mt.innerHTML=Le,Dt.addZone({afterLineNumber:tt||11,heightInLines:3,domNode:Mt})});var Lt={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}};lt.addOverlayWidget(Lt),lt.revealPositionInCenter({lineNumber:20,column:1})}},[tt,Xe.current,Ee]);function Je(){var lt=Xe.current.instance;if(lt){var Lt=lt.getSelection(),Dt=Xe.current.pastePos||{},Mt=new W.Range(Dt.startLineNumber||Lt.endLineNumber,Dt.startColumn||Lt.endColumn,Dt.endLineNumber||Lt.endLineNumber,Dt.endColumn||Lt.endColumn);setTimeout(function(){lt.executeEdits("",[{range:Mt,text:""}])},300)}}function ut(lt){(window.navigator.platform.match("Mac")?lt.metaKey:lt.ctrlKey)&<.keyCode==83&&(lt.preventDefault(),Fe())}var Be=function(){if(Z&&Xe.current.instance){var Lt=Xe.current.instance.getContentHeight();Bt(Lt<re?re:Lt)}else Bt(re)};function qe(lt){var Lt=document.createEvent("MouseEvents");Lt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),lt.dispatchEvent(Lt)}function at(lt,Lt){var Dt=window.URL||window.webkitURL||window,Mt=new Blob([Lt]),Wt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wt.href=Dt.createObjectURL(Mt),Wt.download=lt,qe(Wt)}Object(g.useEffect)(function(){Be()},[Be]),Object(g.useEffect)(function(){Re.current&&!Ee&&x.e(27).then(x.t.bind(null,"M/lh",7)).then(function(lt){try{W=lt,Xe.current.instance=W.editor.create(Re.current,{value:he,language:G(ke),theme:ie,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},se);var Lt=Xe.current.instance;if(Ne(Lt,W),setTimeout(function(){Be(),Xe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){at(Ve||"educoder.txt",Lt.getValue())}})},500),Xe.current.subscription=Lt.onDidChangeModelContent(function(Mt){Ye.current?clearTimeout(Me.current):(Be(),pe(Lt.getValue(),Mt)),Me.current=setTimeout(function(){Ye.current=!1},500)}),window.Monaco||C(W),q&&(Lt.addCommand(W.KeyMod.CtrlCmd|W.KeyMod.Shift|W.KeyCode.KEY_V,function(){return Qe(),null}),Lt.addCommand(W.KeyMod.CtrlCmd|W.KeyCode.KEY_C,function(){return Qe(),null})),window.Monaco=W,de&&Lt.onDidBlurEditorWidget(function(){de(Lt.getValue())}),Ie&&Lt.onDidFocusEditorText(function(){Ie(Lt.getValue())}),q){Lt.addCommand(W.KeyMod.CtrlCmd|W.KeyCode.KEY_V,function(){return Qe(),null}),Lt.onDidPaste(function(Mt){Xe.current.pastePos=Mt});try{window.addEventListener("paste",Je)}catch(Mt){}}var Dt=je();return ce(!0),function(){var Mt=Xe.current.instance;Mt.dispose();var Wt=Mt.getModel();Wt&&Wt.dispose(),Xe.current.subscription&&Xe.current.subscription.dispose(),q&&window.removeEventListener("paste",Je),Dt.unobserve(Re.current)}}catch(Mt){}})},[]),Object(g.useEffect)(function(){var lt=Xe.current.instance;if(lt&&Ee)return document.addEventListener("keydown",ut,!1),function(){document.removeEventListener("keydown",ut)}},[Fe,Ee]),Object(g.useEffect)(function(){var lt=Xe.current.instance;if(lt&&Ee){var Lt=G(ke);W.editor.setModelLanguage(lt.getModel(),Lt),console.log("language:",ke,lt.getModel(),Lt)}},[ke,Ee]),Object(g.useEffect)(function(){var lt=Xe.current.instance;lt&&Ee&&W.editor.setTheme(ie)},[ie,Ee]),Object(g.useEffect)(function(){var lt=Xe.current.instance;lt&&Ee&&(lt.updateOptions(Object(I.a)({},fe)),setTimeout(function(){lt.getModel().updateOptions(Object(I.a)({},fe))},200))},[JSON.stringify(fe),Ee]),Object(g.useEffect)(function(){var lt=Xe.current.instance;lt&&Ee&<.layout()},[B,re,Ee]);var wt=Object(g.useState)(R(B)),ft=Object(v.a)(wt,2),st=ft[0],Pe=ft[1],ze=Object(g.useState)(R(re)),yt=Object(v.a)(ze,2),pt=yt[0],Bt=yt[1],Ht=Object(I.a)(Object(I.a)({},Oe),{},{width:st,height:pt});return p.a.createElement("div",{className:"my-monaco-editor",ref:Re,style:Ht})};function K(F){var P=F.width,B=P===void 0?"100%":P,J=F.height,re=J===void 0?"100%":J,he=F.original,we=F.modified,ke=F.language,ne=F.options,Oe=ne===void 0?{}:ne,Ce=Object(g.useRef)(),fe=Object(g.useState)(null),oe=Object(v.a)(fe,2),se=oe[0],be=oe[1];function ie(Z){var Y;return Ce.current&&(Y=new d.default(function(q){var ve=Object(y.a)(q),pe;try{for(ve.s();!(pe=ve.n()).done;){var Te=pe.value;(Te.target.offsetHeight>0||Te.target.offsetWidth>0)&&Z.layout()}}catch(Ne){ve.e(Ne)}finally{ve.f()}}),Y.observe(Ce.current)),Y}Object(g.useEffect)(function(){Ce.current&&x.e(27).then(x.t.bind(null,"M/lh",7)).then(function(Z){W=Z;var Y=W.editor.createDiffEditor(Ce.current,Object(I.a)(Object(I.a)({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",ignoreTrimWhitespace:!1,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Oe),{},{wordWrap:!0}));be(Y);var q=ie(Y);return function(){Y.dispose();var ve=Y.getModel();ve&&ve.dispose(),q.unobserve(Ce.current)}})},[]),Object(g.useEffect)(function(){se&&se.setModel({original:W.editor.createModel(he,ke),modified:W.editor.createModel(we,ke)})},[he,we,ke,se]);var de=R(B),Fe=R(re),ae={width:de,height:Fe};return p.a.createElement("div",{className:"my-diff-editor",ref:Ce,style:ae})}},ZpRC:function(U,X,x){"use strict";function I(n){return typeof n=="object"&&n!=null&&n.nodeType===1}function _(n,s){return(!s||n!=="hidden")&&n!=="visible"&&n!=="clip"}function O(n,s){if(n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth){var t=getComputedStyle(n,null);return _(t.overflowY,s)||_(t.overflowX,s)||function(i){var e=function(r){if(!r.ownerDocument||!r.ownerDocument.defaultView)return null;try{return r.ownerDocument.defaultView.frameElement}catch(c){return null}}(i);return!!e&&(e.clientHeight<i.scrollHeight||e.clientWidth<i.scrollWidth)}(n)}return!1}function y(n,s,t,i,e,r,c,u){return r<n&&c>s||r>n&&c<s?0:r<=n&&u<=t||c>=s&&u>=t?r-n-i:c>s&&u<t||r<n&&u>t?c-s+e:0}var v=function(n,s){var t=window,i=s.scrollMode,e=s.block,r=s.inline,c=s.boundary,u=s.skipOverflowHiddenElements,f=typeof c=="function"?c:function(Y){return Y!==c};if(!I(n))throw new TypeError("Invalid target");for(var m=document.scrollingElement||document.documentElement,l=[],E=n;I(E)&&f(E);){if((E=E.parentElement)===m){l.push(E);break}E!=null&&E===document.body&&O(E)&&!O(document.documentElement)||E!=null&&O(E,u)&&l.push(E)}for(var b=t.visualViewport?t.visualViewport.width:innerWidth,D=t.visualViewport?t.visualViewport.height:innerHeight,C=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,S=n.getBoundingClientRect(),A=S.height,R=S.width,k=S.top,L=S.right,M=S.bottom,G=S.left,W=e==="start"||e==="nearest"?k:e==="end"?M:k+A/2,N=r==="center"?G+R/2:r==="end"?L:G,K=[],F=0;F<l.length;F++){var P=l[F],B=P.getBoundingClientRect(),J=B.height,re=B.width,he=B.top,we=B.right,ke=B.bottom,ne=B.left;if(i==="if-needed"&&k>=0&&G>=0&&M<=D&&L<=b&&k>=he&&M<=ke&&G>=ne&&L<=we)return K;var Oe=getComputedStyle(P),Ce=parseInt(Oe.borderLeftWidth,10),fe=parseInt(Oe.borderTopWidth,10),oe=parseInt(Oe.borderRightWidth,10),se=parseInt(Oe.borderBottomWidth,10),be=0,ie=0,de="offsetWidth"in P?P.offsetWidth-P.clientWidth-Ce-oe:0,Fe="offsetHeight"in P?P.offsetHeight-P.clientHeight-fe-se:0;if(m===P)be=e==="start"?W:e==="end"?W-D:e==="nearest"?y(w,w+D,D,fe,se,w+W,w+W+A,A):W-D/2,ie=r==="start"?N:r==="center"?N-b/2:r==="end"?N-b:y(C,C+b,b,Ce,oe,C+N,C+N+R,R),be=Math.max(0,be+w),ie=Math.max(0,ie+C);else{be=e==="start"?W-he-fe:e==="end"?W-ke+se+Fe:e==="nearest"?y(he,ke,J,fe,se+Fe,W,W+A,A):W-(he+J/2)+Fe/2,ie=r==="start"?N-ne-Ce:r==="center"?N-(ne+re/2)+de/2:r==="end"?N-we+oe+de:y(ne,we,re,Ce,oe+de,N,N+R,R);var ae=P.scrollLeft,Z=P.scrollTop;W+=Z-(be=Math.max(0,Math.min(Z+be,P.scrollHeight-J+Fe))),N+=ae-(ie=Math.max(0,Math.min(ae+ie,P.scrollWidth-re+de)))}K.push({el:P,top:be,left:ie})}return K};function o(n){return n===Object(n)&&Object.keys(n).length!==0}function g(n,s){s===void 0&&(s="auto");var t="scrollBehavior"in document.body.style;n.forEach(function(i){var e=i.el,r=i.top,c=i.left;e.scroll&&t?e.scroll({top:r,left:c,behavior:s}):(e.scrollTop=r,e.scrollLeft=c)})}function p(n){return n===!1?{block:"end",inline:"nearest"}:o(n)?n:{block:"start",inline:"nearest"}}function d(n,s){var t=!n.ownerDocument.documentElement.contains(n);if(o(s)&&typeof s.behavior=="function")return s.behavior(t?[]:v(n,s));if(t)return;var i=p(s);return g(v(n,i),i.behavior)}var a=X.a=d},Zss7:function(U,X,x){var I;(function(_){var O=/^\s+/,y=/\s+$/,v=0,o=_.round,g=_.min,p=_.max,d=_.random;function a(se,be){if(se=se||"",be=be||{},se instanceof a)return se;if(!(this instanceof a))return new a(se,be);var ie=n(se);this._originalInput=se,this._r=ie.r,this._g=ie.g,this._b=ie.b,this._a=ie.a,this._roundA=o(100*this._a)/100,this._format=be.format||ie.format,this._gradientType=be.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=ie.ok,this._tc_id=v++}a.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var se=this.toRgb();return(se.r*299+se.g*587+se.b*114)/1e3},getLuminance:function(){var se=this.toRgb(),be,ie,de,Fe,ae,Z;return be=se.r/255,ie=se.g/255,de=se.b/255,be<=.03928?Fe=be/12.92:Fe=_.pow((be+.055)/1.055,2.4),ie<=.03928?ae=ie/12.92:ae=_.pow((ie+.055)/1.055,2.4),de<=.03928?Z=de/12.92:Z=_.pow((de+.055)/1.055,2.4),.2126*Fe+.7152*ae+.0722*Z},setAlpha:function(se){return this._a=K(se),this._roundA=o(100*this._a)/100,this},toHsv:function(){var se=e(this._r,this._g,this._b);return{h:se.h*360,s:se.s,v:se.v,a:this._a}},toHsvString:function(){var se=e(this._r,this._g,this._b),be=o(se.h*360),ie=o(se.s*100),de=o(se.v*100);return this._a==1?"hsv("+be+", "+ie+"%, "+de+"%)":"hsva("+be+", "+ie+"%, "+de+"%, "+this._roundA+")"},toHsl:function(){var se=t(this._r,this._g,this._b);return{h:se.h*360,s:se.s,l:se.l,a:this._a}},toHslString:function(){var se=t(this._r,this._g,this._b),be=o(se.h*360),ie=o(se.s*100),de=o(se.l*100);return this._a==1?"hsl("+be+", "+ie+"%, "+de+"%)":"hsla("+be+", "+ie+"%, "+de+"%, "+this._roundA+")"},toHex:function(se){return c(this._r,this._g,this._b,se)},toHexString:function(se){return"#"+this.toHex(se)},toHex8:function(se){return u(this._r,this._g,this._b,this._a,se)},toHex8String:function(se){return"#"+this.toHex8(se)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(F(this._r,255)*100)+"%",g:o(F(this._g,255)*100)+"%",b:o(F(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+o(F(this._r,255)*100)+"%, "+o(F(this._g,255)*100)+"%, "+o(F(this._b,255)*100)+"%)":"rgba("+o(F(this._r,255)*100)+"%, "+o(F(this._g,255)*100)+"%, "+o(F(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:W[c(this._r,this._g,this._b,!0)]||!1},toFilter:function(se){var be="#"+f(this._r,this._g,this._b,this._a),ie=be,de=this._gradientType?"GradientType = 1, ":"";if(se){var Fe=a(se);ie="#"+f(Fe._r,Fe._g,Fe._b,Fe._a)}return"progid:DXImageTransform.Microsoft.gradient("+de+"startColorstr="+be+",endColorstr="+ie+")"},toString:function(se){var be=!!se;se=se||this._format;var ie=!1,de=this._a<1&&this._a>=0,Fe=!be&&de&&(se==="hex"||se==="hex6"||se==="hex3"||se==="hex4"||se==="hex8"||se==="name");return Fe?se==="name"&&this._a===0?this.toName():this.toRgbString():(se==="rgb"&&(ie=this.toRgbString()),se==="prgb"&&(ie=this.toPercentageRgbString()),(se==="hex"||se==="hex6")&&(ie=this.toHexString()),se==="hex3"&&(ie=this.toHexString(!0)),se==="hex4"&&(ie=this.toHex8String(!0)),se==="hex8"&&(ie=this.toHex8String()),se==="name"&&(ie=this.toName()),se==="hsl"&&(ie=this.toHslString()),se==="hsv"&&(ie=this.toHsvString()),ie||this.toHexString())},clone:function(){return a(this.toString())},_applyModification:function(se,be){var ie=se.apply(null,[this].concat([].slice.call(be)));return this._r=ie._r,this._g=ie._g,this._b=ie._b,this.setAlpha(ie._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(D,arguments)},darken:function(){return this._applyModification(C,arguments)},desaturate:function(){return this._applyModification(m,arguments)},saturate:function(){return this._applyModification(l,arguments)},greyscale:function(){return this._applyModification(E,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(se,be){return se.apply(null,[this].concat([].slice.call(be)))},analogous:function(){return this._applyCombination(L,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(R,arguments)}},a.fromRatio=function(se,be){if(typeof se=="object"){var ie={};for(var de in se)se.hasOwnProperty(de)&&(de==="a"?ie[de]=se[de]:ie[de]=we(se[de]));se=ie}return a(se,be)};function n(se){var be={r:0,g:0,b:0},ie=1,de=null,Fe=null,ae=null,Z=!1,Y=!1;return typeof se=="string"&&(se=fe(se)),typeof se=="object"&&(Ce(se.r)&&Ce(se.g)&&Ce(se.b)?(be=s(se.r,se.g,se.b),Z=!0,Y=String(se.r).substr(-1)==="%"?"prgb":"rgb"):Ce(se.h)&&Ce(se.s)&&Ce(se.v)?(de=we(se.s),Fe=we(se.v),be=r(se.h,de,Fe),Z=!0,Y="hsv"):Ce(se.h)&&Ce(se.s)&&Ce(se.l)&&(de=we(se.s),ae=we(se.l),be=i(se.h,de,ae),Z=!0,Y="hsl"),se.hasOwnProperty("a")&&(ie=se.a)),ie=K(ie),{ok:Z,format:se.format||Y,r:g(255,p(be.r,0)),g:g(255,p(be.g,0)),b:g(255,p(be.b,0)),a:ie}}function s(se,be,ie){return{r:F(se,255)*255,g:F(be,255)*255,b:F(ie,255)*255}}function t(se,be,ie){se=F(se,255),be=F(be,255),ie=F(ie,255);var de=p(se,be,ie),Fe=g(se,be,ie),ae,Z,Y=(de+Fe)/2;if(de==Fe)ae=Z=0;else{var q=de-Fe;Z=Y>.5?q/(2-de-Fe):q/(de+Fe);switch(de){case se:ae=(be-ie)/q+(be<ie?6:0);break;case be:ae=(ie-se)/q+2;break;case ie:ae=(se-be)/q+4;break}ae/=6}return{h:ae,s:Z,l:Y}}function i(se,be,ie){var de,Fe,ae;se=F(se,360),be=F(be,100),ie=F(ie,100);function Z(ve,pe,Te){return Te<0&&(Te+=1),Te>1&&(Te-=1),Te<1/6?ve+(pe-ve)*6*Te:Te<1/2?pe:Te<2/3?ve+(pe-ve)*(2/3-Te)*6:ve}if(be===0)de=Fe=ae=ie;else{var Y=ie<.5?ie*(1+be):ie+be-ie*be,q=2*ie-Y;de=Z(q,Y,se+1/3),Fe=Z(q,Y,se),ae=Z(q,Y,se-1/3)}return{r:de*255,g:Fe*255,b:ae*255}}function e(se,be,ie){se=F(se,255),be=F(be,255),ie=F(ie,255);var de=p(se,be,ie),Fe=g(se,be,ie),ae,Z,Y=de,q=de-Fe;if(Z=de===0?0:q/de,de==Fe)ae=0;else{switch(de){case se:ae=(be-ie)/q+(be<ie?6:0);break;case be:ae=(ie-se)/q+2;break;case ie:ae=(se-be)/q+4;break}ae/=6}return{h:ae,s:Z,v:Y}}function r(se,be,ie){se=F(se,360)*6,be=F(be,100),ie=F(ie,100);var de=_.floor(se),Fe=se-de,ae=ie*(1-be),Z=ie*(1-Fe*be),Y=ie*(1-(1-Fe)*be),q=de%6,ve=[ie,Z,ae,ae,Y,ie][q],pe=[Y,ie,ie,Z,ae,ae][q],Te=[ae,ae,Y,ie,ie,Z][q];return{r:ve*255,g:pe*255,b:Te*255}}function c(se,be,ie,de){var Fe=[he(o(se).toString(16)),he(o(be).toString(16)),he(o(ie).toString(16))];return de&&Fe[0].charAt(0)==Fe[0].charAt(1)&&Fe[1].charAt(0)==Fe[1].charAt(1)&&Fe[2].charAt(0)==Fe[2].charAt(1)?Fe[0].charAt(0)+Fe[1].charAt(0)+Fe[2].charAt(0):Fe.join("")}function u(se,be,ie,de,Fe){var ae=[he(o(se).toString(16)),he(o(be).toString(16)),he(o(ie).toString(16)),he(ke(de))];return Fe&&ae[0].charAt(0)==ae[0].charAt(1)&&ae[1].charAt(0)==ae[1].charAt(1)&&ae[2].charAt(0)==ae[2].charAt(1)&&ae[3].charAt(0)==ae[3].charAt(1)?ae[0].charAt(0)+ae[1].charAt(0)+ae[2].charAt(0)+ae[3].charAt(0):ae.join("")}function f(se,be,ie,de){var Fe=[he(ke(de)),he(o(se).toString(16)),he(o(be).toString(16)),he(o(ie).toString(16))];return Fe.join("")}a.equals=function(se,be){return!se||!be?!1:a(se).toRgbString()==a(be).toRgbString()},a.random=function(){return a.fromRatio({r:d(),g:d(),b:d()})};function m(se,be){be=be===0?0:be||10;var ie=a(se).toHsl();return ie.s-=be/100,ie.s=P(ie.s),a(ie)}function l(se,be){be=be===0?0:be||10;var ie=a(se).toHsl();return ie.s+=be/100,ie.s=P(ie.s),a(ie)}function E(se){return a(se).desaturate(100)}function b(se,be){be=be===0?0:be||10;var ie=a(se).toHsl();return ie.l+=be/100,ie.l=P(ie.l),a(ie)}function D(se,be){be=be===0?0:be||10;var ie=a(se).toRgb();return ie.r=p(0,g(255,ie.r-o(255*-(be/100)))),ie.g=p(0,g(255,ie.g-o(255*-(be/100)))),ie.b=p(0,g(255,ie.b-o(255*-(be/100)))),a(ie)}function C(se,be){be=be===0?0:be||10;var ie=a(se).toHsl();return ie.l-=be/100,ie.l=P(ie.l),a(ie)}function w(se,be){var ie=a(se).toHsl(),de=(ie.h+be)%360;return ie.h=de<0?360+de:de,a(ie)}function S(se){var be=a(se).toHsl();return be.h=(be.h+180)%360,a(be)}function A(se){var be=a(se).toHsl(),ie=be.h;return[a(se),a({h:(ie+120)%360,s:be.s,l:be.l}),a({h:(ie+240)%360,s:be.s,l:be.l})]}function R(se){var be=a(se).toHsl(),ie=be.h;return[a(se),a({h:(ie+90)%360,s:be.s,l:be.l}),a({h:(ie+180)%360,s:be.s,l:be.l}),a({h:(ie+270)%360,s:be.s,l:be.l})]}function k(se){var be=a(se).toHsl(),ie=be.h;return[a(se),a({h:(ie+72)%360,s:be.s,l:be.l}),a({h:(ie+216)%360,s:be.s,l:be.l})]}function L(se,be,ie){be=be||6,ie=ie||30;var de=a(se).toHsl(),Fe=360/ie,ae=[a(se)];for(de.h=(de.h-(Fe*be>>1)+720)%360;--be;)de.h=(de.h+Fe)%360,ae.push(a(de));return ae}function M(se,be){be=be||6;for(var ie=a(se).toHsv(),de=ie.h,Fe=ie.s,ae=ie.v,Z=[],Y=1/be;be--;)Z.push(a({h:de,s:Fe,v:ae})),ae=(ae+Y)%1;return Z}a.mix=function(se,be,ie){ie=ie===0?0:ie||50;var de=a(se).toRgb(),Fe=a(be).toRgb(),ae=ie/100,Z={r:(Fe.r-de.r)*ae+de.r,g:(Fe.g-de.g)*ae+de.g,b:(Fe.b-de.b)*ae+de.b,a:(Fe.a-de.a)*ae+de.a};return a(Z)},a.readability=function(se,be){var ie=a(se),de=a(be);return(_.max(ie.getLuminance(),de.getLuminance())+.05)/(_.min(ie.getLuminance(),de.getLuminance())+.05)},a.isReadable=function(se,be,ie){var de=a.readability(se,be),Fe,ae;ae=!1,Fe=oe(ie);switch(Fe.level+Fe.size){case"AAsmall":case"AAAlarge":ae=de>=4.5;break;case"AAlarge":ae=de>=3;break;case"AAAsmall":ae=de>=7;break}return ae},a.mostReadable=function(se,be,ie){var de=null,Fe=0,ae,Z,Y,q;ie=ie||{},Z=ie.includeFallbackColors,Y=ie.level,q=ie.size;for(var ve=0;ve<be.length;ve++)ae=a.readability(se,be[ve]),ae>Fe&&(Fe=ae,de=a(be[ve]));return a.isReadable(se,de,{level:Y,size:q})||!Z?de:(ie.includeFallbackColors=!1,a.mostReadable(se,["#fff","#000"],ie))};var G=a.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},W=a.hexNames=N(G);function N(se){var be={};for(var ie in se)se.hasOwnProperty(ie)&&(be[se[ie]]=ie);return be}function K(se){return se=parseFloat(se),(isNaN(se)||se<0||se>1)&&(se=1),se}function F(se,be){J(se)&&(se="100%");var ie=re(se);return se=g(be,p(0,parseFloat(se))),ie&&(se=parseInt(se*be,10)/100),_.abs(se-be)<1e-6?1:se%be/parseFloat(be)}function P(se){return g(1,p(0,se))}function B(se){return parseInt(se,16)}function J(se){return typeof se=="string"&&se.indexOf(".")!=-1&&parseFloat(se)===1}function re(se){return typeof se=="string"&&se.indexOf("%")!=-1}function he(se){return se.length==1?"0"+se:""+se}function we(se){return se<=1&&(se=se*100+"%"),se}function ke(se){return _.round(parseFloat(se)*255).toString(16)}function ne(se){return B(se)/255}var Oe=function(){var se="[-\\+]?\\d+%?",be="[-\\+]?\\d*\\.\\d+%?",ie="(?:"+be+")|(?:"+se+")",de="[\\s|\\(]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?",Fe="[\\s|\\(]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")[,|\\s]+("+ie+")\\s*\\)?";return{CSS_UNIT:new RegExp(ie),rgb:new RegExp("rgb"+de),rgba:new RegExp("rgba"+Fe),hsl:new RegExp("hsl"+de),hsla:new RegExp("hsla"+Fe),hsv:new RegExp("hsv"+de),hsva:new RegExp("hsva"+Fe),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Ce(se){return!!Oe.CSS_UNIT.exec(se)}function fe(se){se=se.replace(O,"").replace(y,"").toLowerCase();var be=!1;if(G[se])se=G[se],be=!0;else if(se=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ie;return(ie=Oe.rgb.exec(se))?{r:ie[1],g:ie[2],b:ie[3]}:(ie=Oe.rgba.exec(se))?{r:ie[1],g:ie[2],b:ie[3],a:ie[4]}:(ie=Oe.hsl.exec(se))?{h:ie[1],s:ie[2],l:ie[3]}:(ie=Oe.hsla.exec(se))?{h:ie[1],s:ie[2],l:ie[3],a:ie[4]}:(ie=Oe.hsv.exec(se))?{h:ie[1],s:ie[2],v:ie[3]}:(ie=Oe.hsva.exec(se))?{h:ie[1],s:ie[2],v:ie[3],a:ie[4]}:(ie=Oe.hex8.exec(se))?{r:B(ie[1]),g:B(ie[2]),b:B(ie[3]),a:ne(ie[4]),format:be?"name":"hex8"}:(ie=Oe.hex6.exec(se))?{r:B(ie[1]),g:B(ie[2]),b:B(ie[3]),format:be?"name":"hex"}:(ie=Oe.hex4.exec(se))?{r:B(ie[1]+""+ie[1]),g:B(ie[2]+""+ie[2]),b:B(ie[3]+""+ie[3]),a:ne(ie[4]+""+ie[4]),format:be?"name":"hex8"}:(ie=Oe.hex3.exec(se))?{r:B(ie[1]+""+ie[1]),g:B(ie[2]+""+ie[2]),b:B(ie[3]+""+ie[3]),format:be?"name":"hex"}:!1}function oe(se){var be,ie;return se=se||{level:"AA",size:"small"},be=(se.level||"AA").toUpperCase(),ie=(se.size||"small").toLowerCase(),be!=="AA"&&be!=="AAA"&&(be="AA"),ie!=="small"&&ie!=="large"&&(ie="small"),{level:be,size:ie}}U.exports?U.exports=a:!(I=function(){return a}.call(X,x,X,U),I!==void 0&&(U.exports=I))})(Math)},aVK0:function(U,X,x){U.exports={flex_box_center:"flex_box_center___21Vfj",flex_space_between:"flex_space_between___uZYuI",flex_box_vertical_center:"flex_box_vertical_center___YbtWj",flex_box_center_end:"flex_box_center_end_____Dod",flex_box_column:"flex_box_column___38gQH",headLeft:"headLeft___2agg1",colorBlue:"colorBlue___3Vx0N",wrap:"wrap___2WfDC",nodata:"nodata___2f07p",nodataText:"nodataText___3TEWn",content:"content___2_atz",gitCode:"gitCode___3gBXU",ellipsis:"ellipsis___1HiNM",menu:"menu___1DQOO",overlayClass:"overlayClass___2EPCd",tips:"tips___3g6oq"}},b1fT:function(U,X,x){U.exports={"choose-game-item":"choose-game-item___3Vmdr","output-title-container":"output-title-container___15c7x","output-title":"output-title___wqGBh","test-case-list":"test-case-list___134lr","test-header":"test-header___3YSEo",active:"active___3o9Hq","test-result":"test-result___2OIUv","markdown-body":"markdown-body___1mq0e",success:"success___2M7U8",failer:"failer___3JK5X",count:"count___3ViIk","test-case-item":"test-case-item___JBhkJ","case-header":"case-header___27Lc0",iconfont:"iconfont___3UAOT",description:"description___1SgkG","item-desc":"item-desc___29cRg",show:"show___3qunF","item-tip":"item-tip___1pJqj","arrow-down":"arrow-down___3rUfL","test-title":"test-title___1eTn_","arrow-right":"arrow-right___36G7Q","case-info":"case-info___21-4n","test-case-run-header":"test-case-run-header___1BrpP","test-case-run-wrp":"test-case-run-wrp___2T5BC","diff-panel-container":"diff-panel-container___CQu-S","line-break":"line-break___1hJQp",empty:"empty___19Ozf"}},bCnd:function(U,X,x){"use strict";x.d(X,"b",function(){return y}),x.d(X,"a",function(){return v});var I=x("je13"),_=x.n(I),O=!1;function y(o,g){var p=_.a.get("__ec");p||(p={}),p[o]=g,_.a.set("__ec",p)}function v(o,g){var p=_.a.get("__ec");return p?p[o]===void 0?g:p[o]:g}},bPs0:function(U,X,x){"use strict";x.d(X,"b",function(){return m});var I=x("k1fw"),_=x("9og8"),O=x("2qtc"),y=x("kLXV"),v=x("tJVT"),o=x("PpiC"),g=x("aHsQ"),p=x("sGsY"),d=x("WmNS"),a=x.n(d),n=x("q1tI"),s=x.n(n),t=x("bntm"),i=x("V0Rq"),e=x("wd/R"),r=x.n(e),c=x("Ty5D"),u=x("9kvl"),f=p.a.Countdown,m=["fullscreenchange","msfullscreenchange","webkitfullscreenchange","mozfullscreenchange"],l=function(b){var D=b.globalSetting,C=b.loading,w=b.user,S=b.exercise,A=b.socket,R=b.dispatch,k=Object(o.a)(b,["globalSetting","loading","user","exercise","socket","dispatch"]),L=Object(n.useState)({}),M=Object(v.a)(L,2),G=M[0],W=M[1],N=y.a.useModal(),K=Object(v.a)(N,2),F=K[0],P=K[1],B=Object(n.useRef)(),J=Object(n.useRef)(null),re=Object(n.useRef)(null),he=Object(n.useState)(!0),we=Object(v.a)(he,2),ke=we[0],ne=we[1],Oe=Object(c.h)().query,Ce=Object(c.i)();Object(n.useEffect)(function(){var q,ve,pe,Te,Ne;if(clearTimeout(J.current),document.addEventListener(Object(t.c)(),Y,!1),window.addEventListener("blur",ae,!1),(q=S.exerciseUserInfo)!==null&&q!==void 0&&q.screen_open&&Object(t.a)()&&(R({type:"globalSetting/headerFooterToggle",payload:!1}),ne(!1)),(ve=S.exerciseUserInfo)!==null&&ve!==void 0&&ve.screen_at&&r()().diff(r()((pe=S.exerciseUserInfo)===null||pe===void 0?void 0:pe.screen_at),"seconds")>0)fe();else if((Te=S.exerciseUserInfo)!==null&&Te!==void 0&&Te.screen_open&&!Object(t.a)()){var me=document.domain==="kepukehuan.educoder.net"?30:S.exerciseUserInfo.screen_sec+10+1;B.current=y.a.info({icon:null,content:s.a.createElement("div",{className:"tc font16"},"\u672C\u573A\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\u9650\u5236\uFF0C",s.a.createElement("br",null),"\u5207\u6362\u9875\u9762 ",S.exerciseUserInfo.screen_num-S.exerciseUserInfo.used_screen_num," \u6B21\u540E\u5C06\u8FDB\u884C\u5F3A\u5236\u4EA4\u5377\uFF0C",s.a.createElement("br",null),"\u8BF7\u52FF\u5207\u5C4F\u53CA\u5237\u65B0\u9875\u9762"),okText:s.a.createElement("span",null,"\u5F00\u59CB\u8003\u8BD5\uFF08",s.a.createElement("span",{style:{display:"inline-block"}},s.a.createElement(f,{onFinish:function(){var _e;fe(),(_e=B.current)===null||_e===void 0||_e.destroy()},valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+me*1e3})),"S\uFF09"),onOk:function(){var _e;(_e=B.current)===null||_e===void 0||_e.destroy(),ne(!1),Object(t.d)(document.body),document.getElementById("root").addEventListener("click",oe,!1)}})}return(Ne=S.exerciseUserInfo)!==null&&Ne!==void 0&&Ne.screen_open&&!Object(t.a)()||document.getElementById("root").addEventListener("click",oe,!1),function(){document.getElementById("root").removeEventListener("click",oe,!1),document.removeEventListener(Object(t.c)(),Y,!1),window.removeEventListener("blur",ae,!1),clearTimeout(J.current)}},[]),Object(n.useEffect)(function(){setTimeout(function(){S.actionTabs.removeEventListenerExitScreen&&(clearTimeout(J.current),document.getElementById("root").removeEventListener("click",oe,!1),document.removeEventListener(Object(t.c)(),Y,!1))},500),se()},[S.actionTabs]),Object(n.useEffect)(function(){setTimeout(function(){S.exerciseUserInfo.used_screen_num>S.exerciseUserInfo.screen_num?de():!ke},500)},[S.exerciseUserInfo]);var fe=function(){var q=Object(_.a)(a.a.mark(function ve(){var pe;return a.a.wrap(function(Ne){for(;;)switch(Ne.prev=Ne.next){case 0:return Ne.next=2,Z();case 2:pe=Ne.sent,setTimeout(function(){var me,Ie;(me=B.current)===null||me===void 0||me.destroy(),B.current=y.a.info({okText:s.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:s.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",s.a.createElement("span",{className:"c-red"},pe.used_screen_num),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",s.a.createElement("span",{className:"c-red"},(Ie=S.exerciseUserInfo)===null||Ie===void 0?void 0:Ie.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377"),onOk:function(){var _e=Object(_.a)(a.a.mark(function tt(){return a.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:Object(t.d)(document.body);case 1:case"end":return Le.stop()}},tt)}));function Ve(){return _e.apply(this,arguments)}return Ve}()})},1e3);case 4:case"end":return Ne.stop()}},ve)}));return function(){return q.apply(this,arguments)}}(),oe=function(ve){!Object(t.a)()&&ve.target.nodeName!=="A"&&ve.target.nodeName!=="BUTTON"&&ve.target.innerHTML!=="\u786E \u5B9A"&&(Object(t.d)(document.body),console.log("documentClick.full"))},se=function(){var q=Object(_.a)(a.a.mark(function ve(){return a.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.abrupt("return",new Promise(function(){var Ne=Object(_.a)(a.a.mark(function me(Ie){var _e;return a.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return tt.next=2,R({type:"exercise/getExerciseUserInfo",payload:Object(I.a)({},Ce)});case 2:return _e=tt.sent,Ie(_e==null?void 0:_e.data),tt.abrupt("return",_e==null?void 0:_e.data);case 5:case"end":return tt.stop()}},me)}));return function(me){return Ne.apply(this,arguments)}}()));case 1:case"end":return Te.stop()}},ve)}));return function(){return q.apply(this,arguments)}}(),be=function(){var q=Object(_.a)(a.a.mark(function ve(pe){var Te,Ne,me;return a.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:(Te=B.current)===null||Te===void 0||((Ne=Te.destroyAll)===null||Ne===void 0)||Ne.call(Te),B.current=y.a.info({maskClosable:!1,keyboard:!1,okText:s.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5\uFF08",s.a.createElement("span",{style:{display:"inline-block"}},s.a.createElement(f,{onFinish:Z,valueStyle:{fontSize:14,lineHeight:1.4,color:"#FFF",display:"inline-block"},format:"ss",value:Date.now()+(S.exerciseUserInfo.screen_sec+1)*1e3})),"S\uFF09"),content:s.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",s.a.createElement("span",{className:"c-red"},pe),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",s.a.createElement("span",{className:"c-red"},(me=S.exerciseUserInfo)===null||me===void 0?void 0:me.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377,",s.a.createElement("span",{className:"c-red"},S.exerciseUserInfo.screen_sec),"\u79D2\u5185\u56DE\u5230",s.a.createElement("br",null),s.a.createElement("span",{style:{marginLeft:38}},"\u8003\u8BD5\u4E0D\u8BA1\u5207\u5C4F\u6B21\u6570\u3002")),onOk:function(){var Ve=Object(_.a)(a.a.mark(function Ge(){return a.a.wrap(function(bt){for(;;)switch(bt.prev=bt.next){case 0:clearTimeout(re.current),Object(t.d)(document.body),B.current.destroy();case 3:case"end":return bt.stop()}},Ge)}));function tt(){return Ve.apply(this,arguments)}return tt}()}),re.current=setTimeout(function(){var Ve;B.current.update({okText:s.a.createElement("span",null,"\u56DE\u5230\u8003\u8BD5"),content:s.a.createElement("div",null,"\u60A8\u5DF2\u5207\u5C4F",s.a.createElement("span",{className:"c-red"},pe+1),"\u6B21\uFF0C\u5207\u5C4F\u8D85\u8FC7",s.a.createElement("span",{className:"c-red"},(Ve=S.exerciseUserInfo)===null||Ve===void 0?void 0:Ve.screen_num),"\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377")})},(S.exerciseUserInfo.screen_sec+1)*1e3);case 3:case"end":return _e.stop()}},ve)}));return function(pe){return q.apply(this,arguments)}}(),ie=function(){location.href="/classrooms/".concat(Ce.coursesId,"/exercise/").concat(Ce.categoryId,"/detail")},de=function(){var q=Object(_.a)(a.a.mark(function ve(){var pe,Te,Ne;return a.a.wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return(pe=B.current)===null||pe===void 0||((Te=pe.destroyAll)===null||Te===void 0)||Te.call(pe),Ie.next=3,Object(i.Z)({categoryId:Ce.categoryId,commit_method:1});case 3:if(Ne=Ie.sent,Ne){try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(_e){}Fe()}case 5:case"end":return Ie.stop()}},ve)}));return function(){return q.apply(this,arguments)}}(),Fe=function(){var ve,pe;document.removeEventListener(Object(t.c)(),Y,!1),Object(t.b)(),(ve=B.current)===null||ve===void 0||((pe=ve.destroyAll)===null||pe===void 0)||pe.call(ve);try{A.send(JSON.stringify({type:"toggleLockExit",data:!1})),A.send(JSON.stringify({type:"network-open",data:""}))}catch(Te){}F.info({content:s.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",s.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){ie()}})},ae=function(ve){Object(t.a)()&&document.getElementById("iframeShixuns").style.display=="none"&&Object(t.b)()},Z=function(){var q=Object(_.a)(a.a.mark(function ve(){return a.a.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.abrupt("return",new Promise(function(){var Ne=Object(_.a)(a.a.mark(function me(Ie){var _e,Ve,tt;return a.a.wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:if(!((_e=S.exerciseUserInfo)!==null&&_e!==void 0&&_e.screen_at)){Le.next=3;break}return Le.next=3,Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0}));case 3:return Le.next=5,Object(i.R)({id:Ce.categoryId});case 5:if(Ve=Le.sent,!(Ve!=null&&Ve.is_commit)){Le.next=9;break}return Fe(),Le.abrupt("return");case 9:return Le.next=11,se();case 11:tt=Le.sent,Ie(tt);case 13:case"end":return Le.stop()}},me)}));return function(me){return Ne.apply(this,arguments)}}()));case 1:case"end":return Te.stop()}},ve)}));return function(){return q.apply(this,arguments)}}(),Y=function(){var q=Object(_.a)(a.a.mark(function ve(){var pe,Te,Ne,me;return a.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(pe=!1,console.log("fullscreen change"),!Object(t.a)()){_e.next=7;break}(Te=S.exerciseUserInfo)!==null&&Te!==void 0&&Te.screen_at&&Object(i.h)(Object(I.a)(Object(I.a)({},Ce),{},{reset:!0})),clearTimeout(J.current),_e.next=17;break;case 7:return pe=!0,_e.next=10,Object(i.h)(Object(I.a)({},Ce));case 10:return _e.next=12,se();case 12:Ne=_e.sent,be(Ne.used_screen_num),me=setTimeout(Object(_.a)(a.a.mark(function Ve(){return a.a.wrap(function(Ge){for(;;)switch(Ge.prev=Ge.next){case 0:case"end":return Ge.stop()}},Ve)})),S.exerciseUserInfo.screen_sec*1e3),window.frames.length!=parent.frames.length&&window.parent.postMessage("backExercise","*"),J.current=me;case 17:R({type:"globalSetting/headerFooterToggle",payload:pe});case 18:case"end":return _e.stop()}},ve)}));return function(){return q.apply(this,arguments)}}();return s.a.createElement("div",null,P)};X.a=Object(u.a)(function(E){var b=E.loading,D=E.user,C=E.exercise,w=E.globalSetting;return{globalSetting:w,user:D,exercise:C,loading:b.effects}})(l)},bQjk:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return function(_){var O=I,y=O.lib,v=y.CipherParams,o=O.enc,g=o.Hex,p=O.format,d=p.Hex={stringify:function(a){return a.ciphertext.toString(g)},parse:function(a){var n=g.parse(a);return v.create({ciphertext:n})}}}(),I.format.Hex})},bT9E:function(U,X,x){"use strict";x.d(X,"a",function(){return _});var I=x("VTBJ");function _(O,y){var v=Object(I.a)({},O);return Array.isArray(y)&&y.forEach(function(o){delete v[o]}),v}},biw7:function(U,X,x){"use strict";var I=x("q1tI"),_=x.n(I),O=I.createContext(null);X.a=O},c5Ni:function(U,X,x){},c5fP:function(U,X,x){"use strict";function I(Re){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(et){return typeof et}:I=function(et){return et&&typeof Symbol=="function"&&et.constructor===Symbol&&et!==Symbol.prototype?"symbol":typeof et},I(Re)}Object.defineProperty(X,"__esModule",{value:!0}),X._tr_init=Ve,X._tr_stored_block=tt,X._tr_flush_block=Le,X._tr_tally=bt,X._tr_align=Ge;var _=y(x("6BzB"));function O(){if(typeof WeakMap!="function")return null;var Re=new WeakMap;return O=function(){return Re},Re}function y(Re){if(Re&&Re.__esModule)return Re;if(Re===null||I(Re)!=="object"&&typeof Re!="function")return{default:Re};var Xe=O();if(Xe&&Xe.has(Re))return Xe.get(Re);var et={},Ye=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Me in Re)if(Object.prototype.hasOwnProperty.call(Re,Me)){var Ke=Ye?Object.getOwnPropertyDescriptor(Re,Me):null;Ke&&(Ke.get||Ke.set)?Object.defineProperty(et,Me,Ke):et[Me]=Re[Me]}return et.default=Re,Xe&&Xe.set(Re,et),et}var v=4,o=0,g=1,p=2;function d(Re){for(var Xe=Re.length;--Xe>=0;)Re[Xe]=0}var a=0,n=1,s=2,t=3,i=258,e=29,r=256,c=r+1+e,u=30,f=19,m=2*c+1,l=15,E=16,b=7,D=256,C=16,w=17,S=18,A=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=512,G=new Array((c+2)*2);d(G);var W=new Array(u*2);d(W);var N=new Array(M);d(N);var K=new Array(i-t+1);d(K);var F=new Array(e);d(F);var P=new Array(u);d(P);function B(Re,Xe,et,Ye,Me){this.static_tree=Re,this.extra_bits=Xe,this.extra_base=et,this.elems=Ye,this.max_length=Me,this.has_stree=Re&&Re.length}var J,re,he;function we(Re,Xe){this.dyn_tree=Re,this.max_code=0,this.stat_desc=Xe}function ke(Re){return Re<256?N[Re]:N[256+(Re>>>7)]}function ne(Re,Xe){Re.pending_buf[Re.pending++]=Xe&255,Re.pending_buf[Re.pending++]=Xe>>>8&255}function Oe(Re,Xe,et){Re.bi_valid>E-et?(Re.bi_buf|=Xe<<Re.bi_valid&65535,ne(Re,Re.bi_buf),Re.bi_buf=Xe>>E-Re.bi_valid,Re.bi_valid+=et-E):(Re.bi_buf|=Xe<<Re.bi_valid&65535,Re.bi_valid+=et)}function Ce(Re,Xe,et){Oe(Re,et[Xe*2],et[Xe*2+1])}function fe(Re,Xe){var et=0;do et|=Re&1,Re>>>=1,et<<=1;while(--Xe>0);return et>>>1}function oe(Re){Re.bi_valid===16?(ne(Re,Re.bi_buf),Re.bi_buf=0,Re.bi_valid=0):Re.bi_valid>=8&&(Re.pending_buf[Re.pending++]=Re.bi_buf&255,Re.bi_buf>>=8,Re.bi_valid-=8)}function se(Re,Xe){var et=Xe.dyn_tree,Ye=Xe.max_code,Me=Xe.stat_desc.static_tree,Ke=Xe.stat_desc.has_stree,ge=Xe.stat_desc.extra_bits,Ee=Xe.stat_desc.extra_base,ce=Xe.stat_desc.max_length,je,Qe,te,Je,ut,Be,qe=0;for(Je=0;Je<=l;Je++)Re.bl_count[Je]=0;for(et[Re.heap[Re.heap_max]*2+1]=0,je=Re.heap_max+1;je<m;je++){if(Qe=Re.heap[je],Je=et[et[Qe*2+1]*2+1]+1,Je>ce&&(Je=ce,qe++),et[Qe*2+1]=Je,Qe>Ye)continue;Re.bl_count[Je]++,ut=0,Qe>=Ee&&(ut=ge[Qe-Ee]),Be=et[Qe*2],Re.opt_len+=Be*(Je+ut),Ke&&(Re.static_len+=Be*(Me[Qe*2+1]+ut))}if(qe===0)return;do{for(Je=ce-1;Re.bl_count[Je]===0;)Je--;Re.bl_count[Je]--,Re.bl_count[Je+1]+=2,Re.bl_count[ce]--,qe-=2}while(qe>0);for(Je=ce;Je!==0;Je--)for(Qe=Re.bl_count[Je];Qe!==0;){if(te=Re.heap[--je],te>Ye)continue;et[te*2+1]!==Je&&(Re.opt_len+=(Je-et[te*2+1])*et[te*2],et[te*2+1]=Je),Qe--}}function be(Re,Xe,et){var Ye=new Array(l+1),Me=0,Ke,ge;for(Ke=1;Ke<=l;Ke++)Ye[Ke]=Me=Me+et[Ke-1]<<1;for(ge=0;ge<=Xe;ge++){var Ee=Re[ge*2+1];if(Ee===0)continue;Re[ge*2]=fe(Ye[Ee]++,Ee)}}function ie(){var Re,Xe,et,Ye,Me,Ke=new Array(l+1);for(et=0,Ye=0;Ye<e-1;Ye++)for(F[Ye]=et,Re=0;Re<1<<A[Ye];Re++)K[et++]=Ye;for(K[et-1]=Ye,Me=0,Ye=0;Ye<16;Ye++)for(P[Ye]=Me,Re=0;Re<1<<R[Ye];Re++)N[Me++]=Ye;for(Me>>=7;Ye<u;Ye++)for(P[Ye]=Me<<7,Re=0;Re<1<<R[Ye]-7;Re++)N[256+Me++]=Ye;for(Xe=0;Xe<=l;Xe++)Ke[Xe]=0;for(Re=0;Re<=143;)G[Re*2+1]=8,Re++,Ke[8]++;for(;Re<=255;)G[Re*2+1]=9,Re++,Ke[9]++;for(;Re<=279;)G[Re*2+1]=7,Re++,Ke[7]++;for(;Re<=287;)G[Re*2+1]=8,Re++,Ke[8]++;for(be(G,c+1,Ke),Re=0;Re<u;Re++)W[Re*2+1]=5,W[Re*2]=fe(Re,5);J=new B(G,A,r+1,c,l),re=new B(W,R,0,u,l),he=new B(new Array(0),k,0,f,b)}function de(Re){var Xe;for(Xe=0;Xe<c;Xe++)Re.dyn_ltree[Xe*2]=0;for(Xe=0;Xe<u;Xe++)Re.dyn_dtree[Xe*2]=0;for(Xe=0;Xe<f;Xe++)Re.bl_tree[Xe*2]=0;Re.dyn_ltree[D*2]=1,Re.opt_len=Re.static_len=0,Re.last_lit=Re.matches=0}function Fe(Re){Re.bi_valid>8?ne(Re,Re.bi_buf):Re.bi_valid>0&&(Re.pending_buf[Re.pending++]=Re.bi_buf),Re.bi_buf=0,Re.bi_valid=0}function ae(Re,Xe,et,Ye){Fe(Re),Ye&&(ne(Re,et),ne(Re,~et)),_.arraySet(Re.pending_buf,Re.window,Xe,et,Re.pending),Re.pending+=et}function Z(Re,Xe,et,Ye){var Me=Xe*2,Ke=et*2;return Re[Me]<Re[Ke]||Re[Me]===Re[Ke]&&Ye[Xe]<=Ye[et]}function Y(Re,Xe,et){for(var Ye=Re.heap[et],Me=et<<1;Me<=Re.heap_len&&!(Me<Re.heap_len&&Z(Xe,Re.heap[Me+1],Re.heap[Me],Re.depth)&&Me++,Z(Xe,Ye,Re.heap[Me],Re.depth));)Re.heap[et]=Re.heap[Me],et=Me,Me<<=1;Re.heap[et]=Ye}function q(Re,Xe,et){var Ye,Me,Ke=0,ge,Ee;if(Re.last_lit!==0)do Ye=Re.pending_buf[Re.d_buf+Ke*2]<<8|Re.pending_buf[Re.d_buf+Ke*2+1],Me=Re.pending_buf[Re.l_buf+Ke],Ke++,Ye===0?Ce(Re,Me,Xe):(ge=K[Me],Ce(Re,ge+r+1,Xe),Ee=A[ge],Ee!==0&&(Me-=F[ge],Oe(Re,Me,Ee)),Ye--,ge=ke(Ye),Ce(Re,ge,et),Ee=R[ge],Ee!==0&&(Ye-=P[ge],Oe(Re,Ye,Ee)));while(Ke<Re.last_lit);Ce(Re,D,Xe)}function ve(Re,Xe){var et=Xe.dyn_tree,Ye=Xe.stat_desc.static_tree,Me=Xe.stat_desc.has_stree,Ke=Xe.stat_desc.elems,ge,Ee,ce=-1,je;for(Re.heap_len=0,Re.heap_max=m,ge=0;ge<Ke;ge++)et[ge*2]!==0?(Re.heap[++Re.heap_len]=ce=ge,Re.depth[ge]=0):et[ge*2+1]=0;for(;Re.heap_len<2;)je=Re.heap[++Re.heap_len]=ce<2?++ce:0,et[je*2]=1,Re.depth[je]=0,Re.opt_len--,Me&&(Re.static_len-=Ye[je*2+1]);for(Xe.max_code=ce,ge=Re.heap_len>>1;ge>=1;ge--)Y(Re,et,ge);je=Ke;do ge=Re.heap[1],Re.heap[1]=Re.heap[Re.heap_len--],Y(Re,et,1),Ee=Re.heap[1],Re.heap[--Re.heap_max]=ge,Re.heap[--Re.heap_max]=Ee,et[je*2]=et[ge*2]+et[Ee*2],Re.depth[je]=(Re.depth[ge]>=Re.depth[Ee]?Re.depth[ge]:Re.depth[Ee])+1,et[ge*2+1]=et[Ee*2+1]=je,Re.heap[1]=je++,Y(Re,et,1);while(Re.heap_len>=2);Re.heap[--Re.heap_max]=Re.heap[1],se(Re,Xe),be(et,ce,Re.bl_count)}function pe(Re,Xe,et){var Ye,Me=-1,Ke,ge=Xe[0*2+1],Ee=0,ce=7,je=4;for(ge===0&&(ce=138,je=3),Xe[(et+1)*2+1]=65535,Ye=0;Ye<=et;Ye++){if(Ke=ge,ge=Xe[(Ye+1)*2+1],++Ee<ce&&Ke===ge)continue;Ee<je?Re.bl_tree[Ke*2]+=Ee:Ke!==0?(Ke!==Me&&Re.bl_tree[Ke*2]++,Re.bl_tree[C*2]++):Ee<=10?Re.bl_tree[w*2]++:Re.bl_tree[S*2]++,Ee=0,Me=Ke,ge===0?(ce=138,je=3):Ke===ge?(ce=6,je=3):(ce=7,je=4)}}function Te(Re,Xe,et){var Ye,Me=-1,Ke,ge=Xe[0*2+1],Ee=0,ce=7,je=4;for(ge===0&&(ce=138,je=3),Ye=0;Ye<=et;Ye++){if(Ke=ge,ge=Xe[(Ye+1)*2+1],++Ee<ce&&Ke===ge)continue;if(Ee<je)do Ce(Re,Ke,Re.bl_tree);while(--Ee!==0);else Ke!==0?(Ke!==Me&&(Ce(Re,Ke,Re.bl_tree),Ee--),Ce(Re,C,Re.bl_tree),Oe(Re,Ee-3,2)):Ee<=10?(Ce(Re,w,Re.bl_tree),Oe(Re,Ee-3,3)):(Ce(Re,S,Re.bl_tree),Oe(Re,Ee-11,7));Ee=0,Me=Ke,ge===0?(ce=138,je=3):Ke===ge?(ce=6,je=3):(ce=7,je=4)}}function Ne(Re){var Xe;for(pe(Re,Re.dyn_ltree,Re.l_desc.max_code),pe(Re,Re.dyn_dtree,Re.d_desc.max_code),ve(Re,Re.bl_desc),Xe=f-1;Xe>=3&&!(Re.bl_tree[L[Xe]*2+1]!==0);Xe--);return Re.opt_len+=3*(Xe+1)+5+5+4,Xe}function me(Re,Xe,et,Ye){var Me;for(Oe(Re,Xe-257,5),Oe(Re,et-1,5),Oe(Re,Ye-4,4),Me=0;Me<Ye;Me++)Oe(Re,Re.bl_tree[L[Me]*2+1],3);Te(Re,Re.dyn_ltree,Xe-1),Te(Re,Re.dyn_dtree,et-1)}function Ie(Re){var Xe=4093624447,et;for(et=0;et<=31;et++,Xe>>>=1)if(Xe&1&&Re.dyn_ltree[et*2]!==0)return o;if(Re.dyn_ltree[9*2]!==0||Re.dyn_ltree[10*2]!==0||Re.dyn_ltree[13*2]!==0)return g;for(et=32;et<r;et++)if(Re.dyn_ltree[et*2]!==0)return g;return o}var _e=!1;function Ve(Re){_e||(ie(),_e=!0),Re.l_desc=new we(Re.dyn_ltree,J),Re.d_desc=new we(Re.dyn_dtree,re),Re.bl_desc=new we(Re.bl_tree,he),Re.bi_buf=0,Re.bi_valid=0,de(Re)}function tt(Re,Xe,et,Ye){Oe(Re,(a<<1)+(Ye?1:0),3),ae(Re,Xe,et,!0)}function Ge(Re){Oe(Re,n<<1,3),Ce(Re,D,G),oe(Re)}function Le(Re,Xe,et,Ye){var Me,Ke,ge=0;Re.level>0?(Re.strm.data_type===p&&(Re.strm.data_type=Ie(Re)),ve(Re,Re.l_desc),ve(Re,Re.d_desc),ge=Ne(Re),Me=Re.opt_len+3+7>>>3,Ke=Re.static_len+3+7>>>3,Ke<=Me&&(Me=Ke)):Me=Ke=et+5,et+4<=Me&&Xe!==-1?tt(Re,Xe,et,Ye):Re.strategy===v||Ke===Me?(Oe(Re,(n<<1)+(Ye?1:0),3),q(Re,G,W)):(Oe(Re,(s<<1)+(Ye?1:0),3),me(Re,Re.l_desc.max_code+1,Re.d_desc.max_code+1,ge+1),q(Re,Re.dyn_ltree,Re.dyn_dtree)),de(Re),Ye&&Fe(Re)}function bt(Re,Xe,et){return Re.pending_buf[Re.d_buf+Re.last_lit*2]=Xe>>>8&255,Re.pending_buf[Re.d_buf+Re.last_lit*2+1]=Xe&255,Re.pending_buf[Re.l_buf+Re.last_lit]=et&255,Re.last_lit++,Xe===0?Re.dyn_ltree[et*2]++:(Re.matches++,Xe--,Re.dyn_ltree[(K[et]+r+1)*2]++,Re.dyn_dtree[ke(Xe)*2]++),Re.last_lit===Re.lit_bufsize-1}},cRFk:function(U,X,x){U.exports=x.p+"static/RepositoryNoneData.828085a8.png"},"cf+g":function(U,X,x){U.exports=x.p+"static/mark.ad150797.svg"},csWT:function(U,X,x){U.exports=x.p+"static/choose.4ad1045f.svg"},cv67:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(_){var O=I,y=O.lib,v=y.WordArray,o=y.Hasher,g=O.algo,p=[];(function(){for(var i=0;i<64;i++)p[i]=_.abs(_.sin(i+1))*4294967296|0})();var d=g.MD5=o.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(i,e){for(var r=0;r<16;r++){var c=e+r,u=i[c];i[c]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360}var f=this._hash.words,m=i[e+0],l=i[e+1],E=i[e+2],b=i[e+3],D=i[e+4],C=i[e+5],w=i[e+6],S=i[e+7],A=i[e+8],R=i[e+9],k=i[e+10],L=i[e+11],M=i[e+12],G=i[e+13],W=i[e+14],N=i[e+15],K=f[0],F=f[1],P=f[2],B=f[3];K=a(K,F,P,B,m,7,p[0]),B=a(B,K,F,P,l,12,p[1]),P=a(P,B,K,F,E,17,p[2]),F=a(F,P,B,K,b,22,p[3]),K=a(K,F,P,B,D,7,p[4]),B=a(B,K,F,P,C,12,p[5]),P=a(P,B,K,F,w,17,p[6]),F=a(F,P,B,K,S,22,p[7]),K=a(K,F,P,B,A,7,p[8]),B=a(B,K,F,P,R,12,p[9]),P=a(P,B,K,F,k,17,p[10]),F=a(F,P,B,K,L,22,p[11]),K=a(K,F,P,B,M,7,p[12]),B=a(B,K,F,P,G,12,p[13]),P=a(P,B,K,F,W,17,p[14]),F=a(F,P,B,K,N,22,p[15]),K=n(K,F,P,B,l,5,p[16]),B=n(B,K,F,P,w,9,p[17]),P=n(P,B,K,F,L,14,p[18]),F=n(F,P,B,K,m,20,p[19]),K=n(K,F,P,B,C,5,p[20]),B=n(B,K,F,P,k,9,p[21]),P=n(P,B,K,F,N,14,p[22]),F=n(F,P,B,K,D,20,p[23]),K=n(K,F,P,B,R,5,p[24]),B=n(B,K,F,P,W,9,p[25]),P=n(P,B,K,F,b,14,p[26]),F=n(F,P,B,K,A,20,p[27]),K=n(K,F,P,B,G,5,p[28]),B=n(B,K,F,P,E,9,p[29]),P=n(P,B,K,F,S,14,p[30]),F=n(F,P,B,K,M,20,p[31]),K=s(K,F,P,B,C,4,p[32]),B=s(B,K,F,P,A,11,p[33]),P=s(P,B,K,F,L,16,p[34]),F=s(F,P,B,K,W,23,p[35]),K=s(K,F,P,B,l,4,p[36]),B=s(B,K,F,P,D,11,p[37]),P=s(P,B,K,F,S,16,p[38]),F=s(F,P,B,K,k,23,p[39]),K=s(K,F,P,B,G,4,p[40]),B=s(B,K,F,P,m,11,p[41]),P=s(P,B,K,F,b,16,p[42]),F=s(F,P,B,K,w,23,p[43]),K=s(K,F,P,B,R,4,p[44]),B=s(B,K,F,P,M,11,p[45]),P=s(P,B,K,F,N,16,p[46]),F=s(F,P,B,K,E,23,p[47]),K=t(K,F,P,B,m,6,p[48]),B=t(B,K,F,P,S,10,p[49]),P=t(P,B,K,F,W,15,p[50]),F=t(F,P,B,K,C,21,p[51]),K=t(K,F,P,B,M,6,p[52]),B=t(B,K,F,P,b,10,p[53]),P=t(P,B,K,F,k,15,p[54]),F=t(F,P,B,K,l,21,p[55]),K=t(K,F,P,B,A,6,p[56]),B=t(B,K,F,P,N,10,p[57]),P=t(P,B,K,F,w,15,p[58]),F=t(F,P,B,K,G,21,p[59]),K=t(K,F,P,B,D,6,p[60]),B=t(B,K,F,P,L,10,p[61]),P=t(P,B,K,F,E,15,p[62]),F=t(F,P,B,K,R,21,p[63]),f[0]=f[0]+K|0,f[1]=f[1]+F|0,f[2]=f[2]+P|0,f[3]=f[3]+B|0},_doFinalize:function(){var i=this._data,e=i.words,r=this._nDataBytes*8,c=i.sigBytes*8;e[c>>>5]|=128<<24-c%32;var u=_.floor(r/4294967296),f=r;e[(c+64>>>9<<4)+15]=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,e[(c+64>>>9<<4)+14]=(f<<8|f>>>24)&16711935|(f<<24|f>>>8)&4278255360,i.sigBytes=(e.length+1)*4,this._process();for(var m=this._hash,l=m.words,E=0;E<4;E++){var b=l[E];l[E]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360}return m},clone:function(){var i=o.clone.call(this);return i._hash=this._hash.clone(),i}});function a(i,e,r,c,u,f,m){var l=i+(e&r|~e&c)+u+m;return(l<<f|l>>>32-f)+e}function n(i,e,r,c,u,f,m){var l=i+(e&c|r&~c)+u+m;return(l<<f|l>>>32-f)+e}function s(i,e,r,c,u,f,m){var l=i+(e^r^c)+u+m;return(l<<f|l>>>32-f)+e}function t(i,e,r,c,u,f,m){var l=i+(r^(e|~c))+u+m;return(l<<f|l>>>32-f)+e}O.MD5=o._createHelper(d),O.HmacMD5=o._createHmacHelper(d)}(Math),I.MD5})},dPi7:function(U,X,x){U.exports=x.p+"static/appoint1.9457cf22.svg"},dTJi:function(U,X,x){},dViP:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAAXNSR0IArs4c6QAAATxJREFUWEftmE9Kw1AQxr8ZYqhYoWL34kJwW/QIeoku2q7SI/QMPUK76z16BG/gQtxXurBiScMbeWIQxDLTQOITXhbJ4s2f7/0yYfKG8HWJCGE8Pkeed+HcMYqCy7VankniwPyONF1hNnshIvF5yN8ky46w3V6iKE5rSa4FTZJXtFpPNJ/v6JPMcHj1Z2JKsV7UYvFIkmVdbDYX2iYaWW+3n0lGo2vk+UkjCbUkafpGMhj0ai9gTcj3a3Mk/f6N1b4JuyhIo/yPCTl3B2AC4Ezb5Y/1NYApmJcWPzshkSVEOpagv9iswXxv8bULcu7BEnCvDfOtxT8K0ihFQpFQ/Mq0GoiEIqG9BIJrriK+W08qdPyafj8qF89hjvZedljcytZRkIYuwINicEfp4IYNoY1jfJEFNbAqqz6Ukd4H/d3NFUaXf7AAAAAASUVORK5CYII="},dejd:function(U,X,x){},djh8:function(U,X,x){U.exports=x.p+"static/qrCode.d852fdfc.png"},dmUQ:function(U,X,x){"use strict";var I=x("Ff2n"),_=x("rePB"),O=x("1OyB"),y=x("vuIU"),v=x("Ji7U"),o=x("md7G"),g=x("foSv"),p=x("q1tI"),d=x.n(p),a=x("TSYQ"),n=x.n(a),s=x("4IlW");function t(A,R){var k=Object.keys(A);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(A);R&&(L=L.filter(function(M){return Object.getOwnPropertyDescriptor(A,M).enumerable})),k.push.apply(k,L)}return k}function i(A){for(var R=1;R<arguments.length;R++){var k=arguments[R]!=null?arguments[R]:{};R%2?t(Object(k),!0).forEach(function(L){Object(_.a)(A,L,k[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(k)):t(Object(k)).forEach(function(L){Object.defineProperty(A,L,Object.getOwnPropertyDescriptor(k,L))})}return A}function e(A){var R=r();return function(){var L=Object(g.a)(A),M;if(R){var G=Object(g.a)(this).constructor;M=Reflect.construct(L,arguments,G)}else M=L.apply(this,arguments);return Object(o.a)(this,M)}}function r(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(A){return!1}}function c(){}function u(A){A.preventDefault()}var f=function(R){return R.replace(/[^\w.-]+/g,"")},m=200,l=600,E=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,b=function(R){return R!=null},D=function(R,k){return k===R||typeof k=="number"&&typeof R=="number"&&isNaN(k)&&isNaN(R)},C=function(A){Object(v.a)(k,A);var R=e(k);function k(L){var M;Object(O.a)(this,k),M=R.call(this,L),M.onKeyDown=function(N){var K=M.props,F=K.onKeyDown,P=K.onPressEnter;if(N.keyCode===s.a.UP){var B=M.getRatio(N);M.up(N,B,null),M.stop()}else if(N.keyCode===s.a.DOWN){var J=M.getRatio(N);M.down(N,J,null),M.stop()}else N.keyCode===s.a.ENTER&&P&&P(N);if(M.recordCursorPosition(),M.lastKeyCode=N.keyCode,F){for(var re=arguments.length,he=new Array(re>1?re-1:0),we=1;we<re;we++)he[we-1]=arguments[we];F.apply(void 0,[N].concat(he))}},M.onKeyUp=function(N){var K=M.props.onKeyUp;if(M.stop(),M.recordCursorPosition(),K){for(var F=arguments.length,P=new Array(F>1?F-1:0),B=1;B<F;B++)P[B-1]=arguments[B];K.apply(void 0,[N].concat(P))}},M.onChange=function(N){var K=M.props.onChange;M.state.focused&&(M.inputting=!0),M.rawInput=M.props.parser(M.getValueFromEvent(N)),M.setState({inputValue:M.rawInput}),K(M.toNumber(M.rawInput))},M.onMouseUp=function(){var N=M.props.onMouseUp;M.recordCursorPosition(),N&&N.apply(void 0,arguments)},M.onFocus=function(){var N;M.setState({focused:!0}),(N=M.props).onFocus.apply(N,arguments)},M.onBlur=function(){var N=M.props.onBlur;M.inputting=!1,M.setState({focused:!1});var K=M.getCurrentValidValue(M.state.inputValue),F=M.setValue(K,c);if(N){var P=M.input.value,B=M.getInputDisplayValue({focus:!1,value:F});M.input.value=B&&Number(B),N.apply(void 0,arguments),M.input.value=P}},M.getRatio=function(N){var K=1;return N.metaKey||N.ctrlKey?K=.1:N.shiftKey&&(K=10),K},M.getFullNum=function(N){return isNaN(N)?N:/e/i.test(String(N))?Number(N).toFixed(18).replace(/\.?0+$/,""):N},M.getPrecision=function(N){if(b(M.props.precision))return M.props.precision;var K=String(N);if(K.indexOf("e-")>=0)return parseInt(K.slice(K.indexOf("e-")+2),10);var F=0;return K.indexOf(".")>=0&&(F=K.length-K.indexOf(".")-1),F},M.getInputDisplayValue=function(N){var K=N||M.state,F=K.focused,P=K.inputValue,B=K.value,J;F?J=P:J=M.toPrecisionAsStep(B),J==null&&(J="");var re=M.formatWrapper(J);return b(M.props.decimalSeparator)&&(re=re.toString().replace(".",M.props.decimalSeparator)),re},M.recordCursorPosition=function(){try{M.cursorStart=M.input.selectionStart,M.cursorEnd=M.input.selectionEnd,M.currentValue=M.input.value,M.cursorBefore=M.input.value.substring(0,M.cursorStart),M.cursorAfter=M.input.value.substring(M.cursorEnd)}catch(N){}},M.restoreByAfter=function(N){if(N===void 0)return!1;var K=M.input.value,F=K.lastIndexOf(N);if(F===-1)return!1;var P=M.cursorBefore.length;return M.lastKeyCode===s.a.DELETE&&M.cursorBefore.charAt(P-1)===N[0]?(M.fixCaret(P,P),!0):F+N.length===K.length?(M.fixCaret(F,F),!0):!1},M.partRestoreByAfter=function(N){return N===void 0?!1:Array.prototype.some.call(N,function(K,F){var P=N.substring(F);return M.restoreByAfter(P)})},M.isNotCompleteNumber=function(N){return isNaN(N)||N===""||N===null||N&&N.toString().indexOf(".")===N.toString().length-1},M.stop=function(){M.autoStepTimer&&clearTimeout(M.autoStepTimer)},M.down=function(N,K,F){M.pressingUpOrDown=!0,M.step("down",N,K,F)},M.up=function(N,K,F){M.pressingUpOrDown=!0,M.step("up",N,K,F)},M.saveInput=function(N){M.input=N};var G=L.value;G===void 0&&(G=L.defaultValue),M.state={focused:L.autoFocus};var W=M.getValidValue(M.toNumber(G));return M.state=i(i({},M.state),{},{inputValue:M.toPrecisionAsStep(W),value:W}),M}return Object(y.a)(k,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(M){var G=this.props,W=G.value,N=G.onChange,K=G.max,F=G.min,P=this.state.focused;if(M){if(!D(M.value,W)||!D(M.max,K)||!D(M.min,F)){var B=P?W:this.getValidValue(W),J;this.pressingUpOrDown?J=B:this.inputting?J=this.rawInput:J=this.toPrecisionAsStep(B),this.setState({value:B,inputValue:J})}var re="value"in this.props?W:this.state.value;"max"in this.props&&M.max!==K&&typeof re=="number"&&re>K&&N&&N(K),"min"in this.props&&M.min!==F&&typeof re=="number"&&re<F&&N&&N(F)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var he=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===s.a.BACKSPACE?he=this.cursorStart-1:this.lastKeyCode===s.a.DELETE&&(he=this.cursorStart):he=this.input.value.length,this.fixCaret(he,he)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case s.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case s.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(we){}if(this.lastKeyCode=null,!this.pressingUpOrDown)return;this.props.focusOnUpDown&&this.state.focused&&(document.activeElement!==this.input&&this.focus())}},{key:"componentWillUnmount",value:function(){this.stop()}},{key:"getCurrentValidValue",value:function(M){var G=M;return G===""?G="":this.isNotCompleteNumber(parseFloat(G))?G=this.state.value:G=this.getValidValue(G),this.toNumber(G)}},{key:"getValueFromEvent",value:function(M){var G=M.target.value.trim().replace(/。/g,".");return b(this.props.decimalSeparator)&&(G=G.replace(this.props.decimalSeparator,".")),G}},{key:"getValidValue",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,W=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,N=parseFloat(M);return isNaN(N)?M:(N<G&&(N=G),N>W&&(N=W),N)}},{key:"setValue",value:function(M,G){var W=this.props.precision,N=this.isNotCompleteNumber(parseFloat(M))?null:parseFloat(M),K=this.state.value,F=K===void 0?null:K,P=this.state.inputValue,B=P===void 0?null:P,J=typeof N=="number"?N.toFixed(W):"".concat(N),re=N!==F||J!=="".concat(B);return"value"in this.props?(B=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:B},G)):this.setState({value:N,inputValue:this.toPrecisionAsStep(M)},G),re&&this.props.onChange(N),N}},{key:"getMaxPrecision",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.props,N=W.precision,K=W.step;if(b(N))return N;var F=this.getPrecision(G),P=this.getPrecision(K),B=this.getPrecision(M);return M?Math.max(B,F+P):F+P}},{key:"getPrecisionFactor",value:function(M){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,W=this.getMaxPrecision(M,G);return Math.pow(10,W)}},{key:"focus",value:function(){this.input.focus(),this.recordCursorPosition()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"formatWrapper",value:function(M){return this.props.formatter?this.props.formatter(M):M}},{key:"toPrecisionAsStep",value:function(M){if(this.isNotCompleteNumber(M)||M==="")return M;var G=Math.abs(this.getMaxPrecision(M));return isNaN(G)?M.toString():Number(M).toFixed(G)}},{key:"toNumber",value:function(M){var G=this.props.precision,W=this.state.focused,N=M&&M.length>16&&W;return this.isNotCompleteNumber(M)||N?M:b(G)?Math.round(M*Math.pow(10,G))/Math.pow(10,G):Number(M)}},{key:"upStep",value:function(M,G){var W=this.props.step,N=this.getPrecisionFactor(M,G),K=Math.abs(this.getMaxPrecision(M,G)),F=((N*M+N*W*G)/N).toFixed(K);return this.toNumber(F)}},{key:"downStep",value:function(M,G){var W=this.props.step,N=this.getPrecisionFactor(M,G),K=Math.abs(this.getMaxPrecision(M,G)),F=((N*M-N*W*G)/N).toFixed(K);return this.toNumber(F)}},{key:"step",value:function(M,G){var W=this,N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,K=arguments.length>3?arguments[3]:void 0;this.stop(),G&&(G.persist(),G.preventDefault());var F=this.props;if(F.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var B=this["".concat(M,"Step")](P,N),J=B>F.max||B<F.min;if(B>F.max?B=F.max:B<F.min&&(B=F.min),this.setValue(B,null),this.setState({focused:!0},function(){W.pressingUpOrDown=!1}),J)return;this.autoStepTimer=setTimeout(function(){W[M](G,N,!0)},K?m:l)}},{key:"fixCaret",value:function(M,G){if(M===void 0||G===void 0||!this.input||!this.input.value)return;try{var W=this.input.selectionStart,N=this.input.selectionEnd;(M!==W||G!==N)&&this.input.setSelectionRange(M,G)}catch(K){}}},{key:"render",value:function(){var M,G=this.props,W=G.prefixCls,N=G.disabled,K=G.readOnly,F=G.useTouch,P=G.autoComplete,B=G.upHandler,J=G.downHandler,re=G.className,he=G.max,we=G.min,ke=G.style,ne=G.title,Oe=G.onMouseEnter,Ce=G.onMouseLeave,fe=G.onMouseOver,oe=G.onMouseOut,se=G.required,be=G.onClick,ie=G.tabIndex,de=G.type,Fe=G.placeholder,ae=G.id,Z=G.inputMode,Y=G.pattern,q=G.step,ve=G.maxLength,pe=G.autoFocus,Te=G.name,Ne=G.onPaste,me=G.onInput,Ie=Object(I.a)(G,["prefixCls","disabled","readOnly","useTouch","autoComplete","upHandler","downHandler","className","max","min","style","title","onMouseEnter","onMouseLeave","onMouseOver","onMouseOut","required","onClick","tabIndex","type","placeholder","id","inputMode","pattern","step","maxLength","autoFocus","name","onPaste","onInput"]),_e=this.state,Ve=_e.value,tt=_e.focused,Ge=n()(W,(M={},Object(_.a)(M,re,!!re),Object(_.a)(M,"".concat(W,"-disabled"),N),Object(_.a)(M,"".concat(W,"-focused"),tt),M)),Le={};Object.keys(Ie).forEach(function(je){(je.substr(0,5)==="data-"||je.substr(0,5)==="aria-"||je==="role")&&(Le[je]=Ie[je])});var bt=!K&&!N,Re=this.getInputDisplayValue(null),Xe=(Ve||Ve===0)&&(isNaN(Ve)||Number(Ve)>=he),et=(Ve||Ve===0)&&(isNaN(Ve)||Number(Ve)<=we),Ye=Xe||N||K,Me=et||N||K,Ke=n()("".concat(W,"-handler"),"".concat(W,"-handler-up"),Object(_.a)({},"".concat(W,"-handler-up-disabled"),Ye)),ge=n()("".concat(W,"-handler"),"".concat(W,"-handler-down"),Object(_.a)({},"".concat(W,"-handler-down-disabled"),Me)),Ee=F?{onTouchStart:Ye?c:this.up,onTouchEnd:this.stop}:{onMouseDown:Ye?c:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},ce=F?{onTouchStart:Me?c:this.down,onTouchEnd:this.stop}:{onMouseDown:Me?c:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return d.a.createElement("div",{className:Ge,style:ke,title:ne,onMouseEnter:Oe,onMouseLeave:Ce,onMouseOver:fe,onMouseOut:oe,onFocus:function(){return null},onBlur:function(){return null}},d.a.createElement("div",{className:"".concat(W,"-handler-wrap")},d.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Increase Value","aria-disabled":Ye,className:Ke}),B||d.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-up-inner"),onClick:u})),d.a.createElement("span",Object.assign({unselectable:"on"},ce,{role:"button","aria-label":"Decrease Value","aria-disabled":Me,className:ge}),J||d.a.createElement("span",{unselectable:"on",className:"".concat(W,"-handler-down-inner"),onClick:u}))),d.a.createElement("div",{className:"".concat(W,"-input-wrap")},d.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":we,"aria-valuemax":he,"aria-valuenow":Ve,required:se,type:de,placeholder:Fe,onPaste:Ne,onClick:be,onMouseUp:this.onMouseUp,className:"".concat(W,"-input"),tabIndex:ie,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:bt?this.onKeyDown:c,onKeyUp:bt?this.onKeyUp:c,autoFocus:pe,maxLength:ve,readOnly:K,disabled:N,max:he,min:we,step:q,name:Te,title:ne,id:ae,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(Re),pattern:Y,inputMode:Z,onInput:me},Le))))}}]),k}(d.a.Component);C.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:E,min:-E,step:1,style:{},onChange:c,onKeyDown:c,onPressEnter:c,onFocus:c,onBlur:c,parser:f,required:!1,autoComplete:"off"};var w=C,S=X.a=w},e7zE:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("3y9D"),x("WYAk"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.Base,v=O.WordArray,o=_.algo,g=o.SHA1,p=o.HMAC,d=o.PBKDF2=y.extend({cfg:y.extend({keySize:128/32,hasher:g,iterations:1}),init:function(a){this.cfg=this.cfg.extend(a)},compute:function(a,n){for(var s=this.cfg,t=p.create(s.hasher,a),i=v.create(),e=v.create([1]),r=i.words,c=e.words,u=s.keySize,f=s.iterations;r.length<u;){var m=t.update(n).finalize(e);t.reset();for(var l=m.words,E=l.length,b=m,D=1;D<f;D++){b=t.finalize(b),t.reset();for(var C=b.words,w=0;w<E;w++)l[w]^=C[w]}i.concat(m),c[0]++}return i.sigBytes=u*4,i}});_.PBKDF2=function(a,n,s){return d.create(s).compute(a,n)}}(),I.PBKDF2})},eP3c:function(U,X,x){"use strict";function I(ge){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(ce){return typeof ce}:I=function(ce){return ce&&typeof Symbol=="function"&&ce.constructor===Symbol&&ce!==Symbol.prototype?"symbol":typeof ce},I(ge)}Object.defineProperty(X,"__esModule",{value:!0}),X.inflateReset=me,X.inflateReset2=Ie,X.inflateResetKeep=Ne,X.inflateInit=Ve,X.inflateInit2=_e,X.inflate=Xe,X.inflateEnd=et,X.inflateGetHeader=Ye,X.inflateSetDictionary=Me,X.inflateInfo=X.Z_DEFLATED=X.Z_BUF_ERROR=X.Z_MEM_ERROR=X.Z_DATA_ERROR=X.Z_STREAM_ERROR=X.Z_NEED_DICT=X.Z_STREAM_END=X.Z_OK=X.Z_TREES=X.Z_BLOCK=X.Z_FINISH=void 0;var _=d(x("6BzB")),O=g(x("xlC8")),y=g(x("QV2g")),v=g(x("sjKO")),o=g(x("JSwD"));function g(ge){return ge&&ge.__esModule?ge:{default:ge}}function p(){if(typeof WeakMap!="function")return null;var ge=new WeakMap;return p=function(){return ge},ge}function d(ge){if(ge&&ge.__esModule)return ge;if(ge===null||I(ge)!=="object"&&typeof ge!="function")return{default:ge};var Ee=p();if(Ee&&Ee.has(ge))return Ee.get(ge);var ce={},je=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Qe in ge)if(Object.prototype.hasOwnProperty.call(ge,Qe)){var te=je?Object.getOwnPropertyDescriptor(ge,Qe):null;te&&(te.get||te.set)?Object.defineProperty(ce,Qe,te):ce[Qe]=ge[Qe]}return ce.default=ge,Ee&&Ee.set(ge,ce),ce}var a=0,n=1,s=2,t=4;X.Z_FINISH=t;var i=5;X.Z_BLOCK=i;var e=6;X.Z_TREES=e;var r=0;X.Z_OK=r;var c=1;X.Z_STREAM_END=c;var u=2;X.Z_NEED_DICT=u;var f=-2;X.Z_STREAM_ERROR=f;var m=-3;X.Z_DATA_ERROR=m;var l=-4;X.Z_MEM_ERROR=l;var E=-5;X.Z_BUF_ERROR=E;var b=8;X.Z_DEFLATED=b;var D=1,C=2,w=3,S=4,A=5,R=6,k=7,L=8,M=9,G=10,W=11,N=12,K=13,F=14,P=15,B=16,J=17,re=18,he=19,we=20,ke=21,ne=22,Oe=23,Ce=24,fe=25,oe=26,se=27,be=28,ie=29,de=30,Fe=31,ae=32,Z=852,Y=592,q=15,ve=q;function pe(ge){return(ge>>>24&255)+(ge>>>8&65280)+((ge&65280)<<8)+((ge&255)<<24)}function Te(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new _.Buf16(320),this.work=new _.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function Ne(ge){var Ee;return!ge||!ge.state?f:(Ee=ge.state,ge.total_in=ge.total_out=Ee.total=0,ge.msg="",Ee.wrap&&(ge.adler=Ee.wrap&1),Ee.mode=D,Ee.last=0,Ee.havedict=0,Ee.dmax=32768,Ee.head=null,Ee.hold=0,Ee.bits=0,Ee.lencode=Ee.lendyn=new _.Buf32(Z),Ee.distcode=Ee.distdyn=new _.Buf32(Y),Ee.sane=1,Ee.back=-1,r)}function me(ge){var Ee;return!ge||!ge.state?f:(Ee=ge.state,Ee.wsize=0,Ee.whave=0,Ee.wnext=0,Ne(ge))}function Ie(ge,Ee){var ce,je;return!ge||!ge.state?f:(je=ge.state,Ee<0?(ce=0,Ee=-Ee):(ce=(Ee>>4)+1,Ee<48&&(Ee&=15)),Ee&&(Ee<8||Ee>15)?f:(je.window!==null&&je.wbits!==Ee&&(je.window=null),je.wrap=ce,je.wbits=Ee,me(ge)))}function _e(ge,Ee){var ce,je;return ge?(je=new Te,ge.state=je,je.window=null,ce=Ie(ge,Ee),ce!==r&&(ge.state=null),ce):f}function Ve(ge){return _e(ge,ve)}var tt=!0,Ge,Le;function bt(ge){if(tt){var Ee;for(Ge=new _.Buf32(512),Le=new _.Buf32(32),Ee=0;Ee<144;)ge.lens[Ee++]=8;for(;Ee<256;)ge.lens[Ee++]=9;for(;Ee<280;)ge.lens[Ee++]=7;for(;Ee<288;)ge.lens[Ee++]=8;for((0,o.default)(n,ge.lens,0,288,Ge,0,ge.work,{bits:9}),Ee=0;Ee<32;)ge.lens[Ee++]=5;(0,o.default)(s,ge.lens,0,32,Le,0,ge.work,{bits:5}),tt=!1}ge.lencode=Ge,ge.lenbits=9,ge.distcode=Le,ge.distbits=5}function Re(ge,Ee,ce,je){var Qe,te=ge.state;return te.window===null&&(te.wsize=1<<te.wbits,te.wnext=0,te.whave=0,te.window=new _.Buf8(te.wsize)),je>=te.wsize?(_.arraySet(te.window,Ee,ce-te.wsize,te.wsize,0),te.wnext=0,te.whave=te.wsize):(Qe=te.wsize-te.wnext,Qe>je&&(Qe=je),_.arraySet(te.window,Ee,ce-je,Qe,te.wnext),je-=Qe,je?(_.arraySet(te.window,Ee,ce-je,je,0),te.wnext=je,te.whave=te.wsize):(te.wnext+=Qe,te.wnext===te.wsize&&(te.wnext=0),te.whave<te.wsize&&(te.whave+=Qe))),0}function Xe(ge,Ee){var ce,je,Qe,te,Je,ut,Be,qe,at,wt,ft,st,Pe,ze,yt=0,pt,Bt,Ht,lt,Lt,Dt,Mt,Wt,Yt=new _.Buf8(4),mn,Qt,$t=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!ge||!ge.state||!ge.output||!ge.input&&ge.avail_in!==0)return f;ce=ge.state,ce.mode===N&&(ce.mode=K),Je=ge.next_out,Qe=ge.output,Be=ge.avail_out,te=ge.next_in,je=ge.input,ut=ge.avail_in,qe=ce.hold,at=ce.bits,wt=ut,ft=Be,Wt=r;e:for(;;)switch(ce.mode){case D:if(ce.wrap===0){ce.mode=K;break}for(;at<16;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(ce.wrap&2&&qe===35615){ce.check=0,Yt[0]=qe&255,Yt[1]=qe>>>8&255,ce.check=(0,y.default)(ce.check,Yt,2,0),qe=0,at=0,ce.mode=C;break}if(ce.flags=0,ce.head&&(ce.head.done=!1),!(ce.wrap&1)||(((qe&255)<<8)+(qe>>8))%31){ge.msg="incorrect header check",ce.mode=de;break}if((qe&15)!==b){ge.msg="unknown compression method",ce.mode=de;break}if(qe>>>=4,at-=4,Mt=(qe&15)+8,ce.wbits===0)ce.wbits=Mt;else if(Mt>ce.wbits){ge.msg="invalid window size",ce.mode=de;break}ce.dmax=1<<Mt,ge.adler=ce.check=1,ce.mode=qe&512?G:N,qe=0,at=0;break;case C:for(;at<16;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(ce.flags=qe,(ce.flags&255)!==b){ge.msg="unknown compression method",ce.mode=de;break}if(ce.flags&57344){ge.msg="unknown header flags set",ce.mode=de;break}ce.head&&(ce.head.text=qe>>8&1),ce.flags&512&&(Yt[0]=qe&255,Yt[1]=qe>>>8&255,ce.check=(0,y.default)(ce.check,Yt,2,0)),qe=0,at=0,ce.mode=w;case w:for(;at<32;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.head&&(ce.head.time=qe),ce.flags&512&&(Yt[0]=qe&255,Yt[1]=qe>>>8&255,Yt[2]=qe>>>16&255,Yt[3]=qe>>>24&255,ce.check=(0,y.default)(ce.check,Yt,4,0)),qe=0,at=0,ce.mode=S;case S:for(;at<16;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.head&&(ce.head.xflags=qe&255,ce.head.os=qe>>8),ce.flags&512&&(Yt[0]=qe&255,Yt[1]=qe>>>8&255,ce.check=(0,y.default)(ce.check,Yt,2,0)),qe=0,at=0,ce.mode=A;case A:if(ce.flags&1024){for(;at<16;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.length=qe,ce.head&&(ce.head.extra_len=qe),ce.flags&512&&(Yt[0]=qe&255,Yt[1]=qe>>>8&255,ce.check=(0,y.default)(ce.check,Yt,2,0)),qe=0,at=0}else ce.head&&(ce.head.extra=null);ce.mode=R;case R:if(ce.flags&1024&&(st=ce.length,st>ut&&(st=ut),st&&(ce.head&&(Mt=ce.head.extra_len-ce.length,ce.head.extra||(ce.head.extra=new Array(ce.head.extra_len)),_.arraySet(ce.head.extra,je,te,st,Mt)),ce.flags&512&&(ce.check=(0,y.default)(ce.check,je,st,te)),ut-=st,te+=st,ce.length-=st),ce.length))break e;ce.length=0,ce.mode=k;case k:if(ce.flags&2048){if(ut===0)break e;st=0;do Mt=je[te+st++],ce.head&&Mt&&ce.length<65536&&(ce.head.name+=String.fromCharCode(Mt));while(Mt&&st<ut);if(ce.flags&512&&(ce.check=(0,y.default)(ce.check,je,st,te)),ut-=st,te+=st,Mt)break e}else ce.head&&(ce.head.name=null);ce.length=0,ce.mode=L;case L:if(ce.flags&4096){if(ut===0)break e;st=0;do Mt=je[te+st++],ce.head&&Mt&&ce.length<65536&&(ce.head.comment+=String.fromCharCode(Mt));while(Mt&&st<ut);if(ce.flags&512&&(ce.check=(0,y.default)(ce.check,je,st,te)),ut-=st,te+=st,Mt)break e}else ce.head&&(ce.head.comment=null);ce.mode=M;case M:if(ce.flags&512){for(;at<16;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(qe!==(ce.check&65535)){ge.msg="header crc mismatch",ce.mode=de;break}qe=0,at=0}ce.head&&(ce.head.hcrc=ce.flags>>9&1,ce.head.done=!0),ge.adler=ce.check=0,ce.mode=N;break;case G:for(;at<32;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ge.adler=ce.check=pe(qe),qe=0,at=0,ce.mode=W;case W:if(ce.havedict===0)return ge.next_out=Je,ge.avail_out=Be,ge.next_in=te,ge.avail_in=ut,ce.hold=qe,ce.bits=at,u;ge.adler=ce.check=1,ce.mode=N;case N:if(Ee===i||Ee===e)break e;case K:if(ce.last){qe>>>=at&7,at-=at&7,ce.mode=se;break}for(;at<3;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.last=qe&1,qe>>>=1,at-=1;switch(qe&3){case 0:ce.mode=F;break;case 1:if(bt(ce),ce.mode=we,Ee===e){qe>>>=2,at-=2;break e}break;case 2:ce.mode=J;break;case 3:ge.msg="invalid block type",ce.mode=de}qe>>>=2,at-=2;break;case F:for(qe>>>=at&7,at-=at&7;at<32;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if((qe&65535)!==(qe>>>16^65535)){ge.msg="invalid stored block lengths",ce.mode=de;break}if(ce.length=qe&65535,qe=0,at=0,ce.mode=P,Ee===e)break e;case P:ce.mode=B;case B:if(st=ce.length,st){if(st>ut&&(st=ut),st>Be&&(st=Be),st===0)break e;_.arraySet(Qe,je,te,st,Je),ut-=st,te+=st,Be-=st,Je+=st,ce.length-=st;break}ce.mode=N;break;case J:for(;at<14;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(ce.nlen=(qe&31)+257,qe>>>=5,at-=5,ce.ndist=(qe&31)+1,qe>>>=5,at-=5,ce.ncode=(qe&15)+4,qe>>>=4,at-=4,ce.nlen>286||ce.ndist>30){ge.msg="too many length or distance symbols",ce.mode=de;break}ce.have=0,ce.mode=re;case re:for(;ce.have<ce.ncode;){for(;at<3;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.lens[$t[ce.have++]]=qe&7,qe>>>=3,at-=3}for(;ce.have<19;)ce.lens[$t[ce.have++]]=0;if(ce.lencode=ce.lendyn,ce.lenbits=7,mn={bits:ce.lenbits},Wt=(0,o.default)(a,ce.lens,0,19,ce.lencode,0,ce.work,mn),ce.lenbits=mn.bits,Wt){ge.msg="invalid code lengths set",ce.mode=de;break}ce.have=0,ce.mode=he;case he:for(;ce.have<ce.nlen+ce.ndist;){for(;!(yt=ce.lencode[qe&(1<<ce.lenbits)-1],pt=yt>>>24,Bt=yt>>>16&255,Ht=yt&65535,pt<=at);){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(Ht<16)qe>>>=pt,at-=pt,ce.lens[ce.have++]=Ht;else{if(Ht===16){for(Qt=pt+2;at<Qt;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(qe>>>=pt,at-=pt,ce.have===0){ge.msg="invalid bit length repeat",ce.mode=de;break}Mt=ce.lens[ce.have-1],st=3+(qe&3),qe>>>=2,at-=2}else if(Ht===17){for(Qt=pt+3;at<Qt;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}qe>>>=pt,at-=pt,Mt=0,st=3+(qe&7),qe>>>=3,at-=3}else{for(Qt=pt+7;at<Qt;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}qe>>>=pt,at-=pt,Mt=0,st=11+(qe&127),qe>>>=7,at-=7}if(ce.have+st>ce.nlen+ce.ndist){ge.msg="invalid bit length repeat",ce.mode=de;break}for(;st--;)ce.lens[ce.have++]=Mt}}if(ce.mode===de)break;if(ce.lens[256]===0){ge.msg="invalid code -- missing end-of-block",ce.mode=de;break}if(ce.lenbits=9,mn={bits:ce.lenbits},Wt=(0,o.default)(n,ce.lens,0,ce.nlen,ce.lencode,0,ce.work,mn),ce.lenbits=mn.bits,Wt){ge.msg="invalid literal/lengths set",ce.mode=de;break}if(ce.distbits=6,ce.distcode=ce.distdyn,mn={bits:ce.distbits},Wt=(0,o.default)(s,ce.lens,ce.nlen,ce.ndist,ce.distcode,0,ce.work,mn),ce.distbits=mn.bits,Wt){ge.msg="invalid distances set",ce.mode=de;break}if(ce.mode=we,Ee===e)break e;case we:ce.mode=ke;case ke:if(ut>=6&&Be>=258){ge.next_out=Je,ge.avail_out=Be,ge.next_in=te,ge.avail_in=ut,ce.hold=qe,ce.bits=at,(0,v.default)(ge,ft),Je=ge.next_out,Qe=ge.output,Be=ge.avail_out,te=ge.next_in,je=ge.input,ut=ge.avail_in,qe=ce.hold,at=ce.bits,ce.mode===N&&(ce.back=-1);break}for(ce.back=0;!(yt=ce.lencode[qe&(1<<ce.lenbits)-1],pt=yt>>>24,Bt=yt>>>16&255,Ht=yt&65535,pt<=at);){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(Bt&&(Bt&240)===0){for(lt=pt,Lt=Bt,Dt=Ht;!(yt=ce.lencode[Dt+((qe&(1<<lt+Lt)-1)>>lt)],pt=yt>>>24,Bt=yt>>>16&255,Ht=yt&65535,lt+pt<=at);){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}qe>>>=lt,at-=lt,ce.back+=lt}if(qe>>>=pt,at-=pt,ce.back+=pt,ce.length=Ht,Bt===0){ce.mode=oe;break}if(Bt&32){ce.back=-1,ce.mode=N;break}if(Bt&64){ge.msg="invalid literal/length code",ce.mode=de;break}ce.extra=Bt&15,ce.mode=ne;case ne:if(ce.extra){for(Qt=ce.extra;at<Qt;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.length+=qe&(1<<ce.extra)-1,qe>>>=ce.extra,at-=ce.extra,ce.back+=ce.extra}ce.was=ce.length,ce.mode=Oe;case Oe:for(;!(yt=ce.distcode[qe&(1<<ce.distbits)-1],pt=yt>>>24,Bt=yt>>>16&255,Ht=yt&65535,pt<=at);){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if((Bt&240)===0){for(lt=pt,Lt=Bt,Dt=Ht;!(yt=ce.distcode[Dt+((qe&(1<<lt+Lt)-1)>>lt)],pt=yt>>>24,Bt=yt>>>16&255,Ht=yt&65535,lt+pt<=at);){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}qe>>>=lt,at-=lt,ce.back+=lt}if(qe>>>=pt,at-=pt,ce.back+=pt,Bt&64){ge.msg="invalid distance code",ce.mode=de;break}ce.offset=Ht,ce.extra=Bt&15,ce.mode=Ce;case Ce:if(ce.extra){for(Qt=ce.extra;at<Qt;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}ce.offset+=qe&(1<<ce.extra)-1,qe>>>=ce.extra,at-=ce.extra,ce.back+=ce.extra}if(ce.offset>ce.dmax){ge.msg="invalid distance too far back",ce.mode=de;break}ce.mode=fe;case fe:if(Be===0)break e;if(st=ft-Be,ce.offset>st){if(st=ce.offset-st,st>ce.whave&&ce.sane){ge.msg="invalid distance too far back",ce.mode=de;break}st>ce.wnext?(st-=ce.wnext,Pe=ce.wsize-st):Pe=ce.wnext-st,st>ce.length&&(st=ce.length),ze=ce.window}else ze=Qe,Pe=Je-ce.offset,st=ce.length;st>Be&&(st=Be),Be-=st,ce.length-=st;do Qe[Je++]=ze[Pe++];while(--st);ce.length===0&&(ce.mode=ke);break;case oe:if(Be===0)break e;Qe[Je++]=ce.length,Be--,ce.mode=ke;break;case se:if(ce.wrap){for(;at<32;){if(ut===0)break e;ut--,qe|=je[te++]<<at,at+=8}if(ft-=Be,ge.total_out+=ft,ce.total+=ft,ft&&(ge.adler=ce.check=ce.flags?(0,y.default)(ce.check,Qe,ft,Je-ft):(0,O.default)(ce.check,Qe,ft,Je-ft)),ft=Be,(ce.flags?qe:pe(qe))!==ce.check){ge.msg="incorrect data check",ce.mode=de;break}qe=0,at=0}ce.mode=be;case be:if(ce.wrap&&ce.flags){for(;at<32;){if(ut===0)break e;ut--,qe+=je[te++]<<at,at+=8}if(qe!==(ce.total&4294967295)){ge.msg="incorrect length check",ce.mode=de;break}qe=0,at=0}ce.mode=ie;case ie:Wt=c;break e;case de:Wt=m;break e;case Fe:return l;case ae:default:return f}return ge.next_out=Je,ge.avail_out=Be,ge.next_in=te,ge.avail_in=ut,ce.hold=qe,ce.bits=at,(ce.wsize||ft!==ge.avail_out&&ce.mode<de&&(ce.mode<se||Ee!==t))&&Re(ge,ge.output,ge.next_out,ft-ge.avail_out)?(ce.mode=Fe,l):(wt-=ge.avail_in,ft-=ge.avail_out,ge.total_in+=wt,ge.total_out+=ft,ce.total+=ft,ce.wrap&&ft&&(ge.adler=ce.check=ce.flags?(0,y.default)(ce.check,Qe,ft,ge.next_out-ft):(0,O.default)(ce.check,Qe,ft,ge.next_out-ft)),ge.data_type=ce.bits+(ce.last?64:0)+(ce.mode===N?128:0)+(ce.mode===we||ce.mode===P?256:0),(wt===0&&ft===0||Ee===t)&&Wt===r&&(Wt=E),Wt)}function et(ge){if(!ge||!ge.state)return f;var Ee=ge.state;return Ee.window&&(Ee.window=null),ge.state=null,r}function Ye(ge,Ee){var ce;return!ge||!ge.state?f:(ce=ge.state,(ce.wrap&2)===0?f:(ce.head=Ee,Ee.done=!1,r))}function Me(ge,Ee){var ce=Ee.length,je,Qe,te;return!ge||!ge.state?f:(je=ge.state,je.wrap!==0&&je.mode!==W?f:je.mode===W&&(Qe=1,Qe=(0,O.default)(Qe,Ee,ce,0),Qe!==je.check)?m:(te=Re(ge,Ee,ce,ce),te?(je.mode=Fe,l):(je.havedict=1,r)))}var Ke="pako inflate (from Nodeca project)";X.inflateInfo=Ke},"f+oW":function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAABz0lEQVR4Xu3csU7DQBRE0V1+LNCn5DNT0mN+DCNoQzNjfBVWl/o9T3wYNiiyMq+3fR/+nC4whT7d+CdAaMZZaMhZaKEpASjHM1poSACKsdFCQwJQjI0WGhKAYmy00JAAFGOjhYYEoBgbLTQkAMXYaKEhASjGRgsNCUAxNlpoSACKsdFCQwJQjI0WGhKAYmz0YtDb2+t8ge4pirne9vcxxnO0VAxTjRYaeppUaAq6+GsjV5Y5Oki0h8yizuiHvHnyRQkNaQstNCQAxdhooSEBKMZGCw0JQDE2ejHobezj49A9PY19fI556Bq/Lc9x8dO7P1e9v6AfkwLI3xHLQR8+Os6CX+zoOIvp31zX/zqgX5XQQkMCUIyNFhoSgGJstNCQABRjo4WGBKAYqtEbdD9tzDIP0PhIGPVImE+TMt9NaqOhRrdn5zJ71JvhMmDtjQjdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy49wXyQzzmd6RVpQAAAABJRU5ErkJggg=="},fAei:function(U,X,x){"use strict";x.d(X,"a",function(){return m.a});var I=x("rePB"),_=x("VTBJ"),O=x("KQm4"),y=x("1OyB"),v=x("vuIU"),o=x("Ji7U"),g=x("LK+K"),p=x("q1tI"),d=x("4IlW"),a=x("Kwbf"),n=x("TSYQ"),s=x.n(n),t=x("sboe"),i=x("OZM5"),e=x("815F"),r=x("ODXe"),c=x("Ff2n"),u=x("+nKL"),f=x("8XRh"),m=x("WaYH"),l=function(we,ke){var ne=we.className,Oe=we.style,Ce=we.motion,fe=we.motionNodes,oe=we.motionType,se=we.onMotionStart,be=we.onMotionEnd,ie=we.active,de=we.treeNodeRequiredProps,Fe=Object(c.a)(we,["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"]),ae=p.useState(!0),Z=Object(r.a)(ae,2),Y=Z[0],q=Z[1],ve=p.useContext(t.a),pe=ve.prefixCls,Te=p.useRef(!1),Ne=function(){Te.current||be(),Te.current=!0};return Object(p.useEffect)(function(){fe&&oe==="hide"&&Y&&q(!1)},[fe]),Object(p.useEffect)(function(){return fe&&se(),function(){fe&&Ne()}},[]),fe?p.createElement(f.default,Object.assign({ref:ke,visible:Y},Ce,{motionAppear:oe==="show",onAppearEnd:Ne,onLeaveEnd:Ne}),function(me,Ie){var _e=me.className,Ve=me.style;return p.createElement("div",{ref:Ie,className:s()("".concat(pe,"-treenode-motion"),_e),style:Ve},fe.map(function(tt){var Ge=tt.data,Le=Ge.key,bt=Object(c.a)(Ge,["key"]),Re=tt.isStart,Xe=tt.isEnd;delete bt.children;var et=Object(e.f)(Le,de);return p.createElement(m.a,Object.assign({},bt,et,{active:ie,data:tt.data,key:Le,isStart:Re,isEnd:Xe}))}))}):p.createElement(m.a,Object.assign({domRef:ke,className:ne,style:Oe},Fe,{active:ie}))};l.displayName="MotionTreeNode";var E=p.forwardRef(l),b=E;function D(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ke=he.length,ne=we.length;if(Math.abs(ke-ne)!==1)return{add:!1,key:null};function Oe(Ce,fe){var oe=new Map;Ce.forEach(function(be){oe.set(be,!0)});var se=fe.filter(function(be){return!oe.has(be)});return se.length===1?se[0]:null}return ke<ne?{add:!0,key:Oe(he,we)}:{add:!1,key:Oe(we,he)}}function C(he,we,ke){var ne=he.findIndex(function(oe){var se=oe.data;return se.key===ke}),Oe=he[ne+1],Ce=we.findIndex(function(oe){var se=oe.data;return se.key===ke});if(Oe){var fe=we.findIndex(function(oe){var se=oe.data;return se.key===Oe.data.key});return we.slice(Ce+1,fe)}return we.slice(Ce+1)}var w={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},S=function(){},A="RC_TREE_MOTION_".concat(Math.random()),R={key:A},k={key:A,level:0,index:0,pos:"0",node:R},L={parent:null,children:[],pos:k.pos,data:R,isStart:[],isEnd:[]};function M(he,we,ke,ne){return we===!1||!ke?he:he.slice(0,Math.ceil(ke/ne)+1)}function G(he){var we=he.data.key,ke=he.pos;return Object(e.e)(we,ke)}function W(he){for(var we=String(he.data.key),ke=he;ke.parent;)ke=ke.parent,we="".concat(ke.data.key," > ").concat(we);return we}var N=function(we,ke){var ne=we.prefixCls,Oe=we.data,Ce=we.selectable,fe=we.checkable,oe=we.expandedKeys,se=we.selectedKeys,be=we.checkedKeys,ie=we.loadedKeys,de=we.loadingKeys,Fe=we.halfCheckedKeys,ae=we.keyEntities,Z=we.disabled,Y=we.dragging,q=we.dragOverNodeKey,ve=we.dropPosition,pe=we.motion,Te=we.height,Ne=we.itemHeight,me=we.virtual,Ie=we.focusable,_e=we.activeItem,Ve=we.focused,tt=we.tabIndex,Ge=we.onKeyDown,Le=we.onFocus,bt=we.onBlur,Re=we.onActiveChange,Xe=we.onListChangeStart,et=we.onListChangeEnd,Ye=Object(c.a)(we,["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"]),Me=p.useRef(null);p.useImperativeHandle(ke,function(){return{scrollTo:function(Mt){Me.current.scrollTo(Mt)}}});var Ke=p.useState(oe),ge=Object(r.a)(Ke,2),Ee=ge[0],ce=ge[1],je=p.useState(Oe),Qe=Object(r.a)(je,2),te=Qe[0],Je=Qe[1],ut=p.useState(Oe),Be=Object(r.a)(ut,2),qe=Be[0],at=Be[1],wt=p.useState([]),ft=Object(r.a)(wt,2),st=ft[0],Pe=ft[1],ze=p.useState(null),yt=Object(r.a)(ze,2),pt=yt[0],Bt=yt[1];function Ht(){Je(Oe),at(Oe),Pe([]),Bt(null),et()}p.useEffect(function(){ce(oe);var Dt=D(Ee,oe);if(Dt.key!==null)if(Dt.add){var Mt=te.findIndex(function(Kn){var hn=Kn.data.key;return hn===Dt.key}),Wt=M(C(te,Oe,Dt.key),me,Te,Ne),Yt=te.slice();Yt.splice(Mt+1,0,L),at(Yt),Pe(Wt),Bt("show")}else{var mn=Oe.findIndex(function(Kn){var hn=Kn.data.key;return hn===Dt.key}),Qt=M(C(Oe,te,Dt.key),me,Te,Ne),$t=Oe.slice();$t.splice(mn+1,0,L),at($t),Pe(Qt),Bt("hide")}else te!==Oe&&(Je(Oe),at(Oe))},[oe,Oe]),p.useEffect(function(){Y||Ht()},[Y]);var lt=pe?qe:Oe,Lt={expandedKeys:oe,selectedKeys:se,loadedKeys:ie,loadingKeys:de,checkedKeys:be,halfCheckedKeys:Fe,dragOverNodeKey:q,dropPosition:ve,keyEntities:ae};return p.createElement(p.Fragment,null,Ve&&_e&&p.createElement("span",{style:w,"aria-live":"assertive"},W(_e)),p.createElement("div",{role:"tree"},p.createElement("input",{style:w,disabled:Ie===!1||Z,tabIndex:Ie!==!1?tt:null,onKeyDown:Ge,onFocus:Le,onBlur:bt,value:"",onChange:S})),p.createElement(u.a,Object.assign({},Ye,{data:lt,itemKey:G,height:Te,fullHeight:!1,virtual:me,itemHeight:Ne,prefixCls:"".concat(ne,"-list"),ref:Me}),function(Dt){var Mt=Dt.pos,Wt=Dt.data,Yt=Wt.key,mn=Object(c.a)(Wt,["key"]),Qt=Dt.isStart,$t=Dt.isEnd,Kn=Object(e.e)(Yt,Mt);delete mn.children;var hn=Object(e.f)(Kn,Lt);return p.createElement(b,Object.assign({},mn,hn,{active:_e&&Yt===_e.data.key,pos:Mt,data:Dt.data,isStart:Qt,isEnd:$t,motion:pe,motionNodes:Yt===A?st:null,motionType:pt,onMotionStart:Xe,onMotionEnd:Ht,treeNodeRequiredProps:Lt,onMouseMove:function(){Re(null)}}))}))},K=p.forwardRef(N);K.displayName="NodeList";var F=K,P=x("NvD2"),B=function(he){Object(o.a)(ke,he);var we=Object(g.a)(ke);function ke(){var ne;return Object(y.a)(this,ke),ne=we.apply(this,arguments),ne.destroyed=!1,ne.state={keyEntities:{},selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],dragging:!1,dragNodesKeys:[],dragOverNodeKey:null,dropPosition:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null},ne.listRef=p.createRef(),ne.onNodeDragStart=function(Oe,Ce){var fe=ne.state,oe=fe.expandedKeys,se=fe.keyEntities,be=ne.props.onDragStart,ie=Ce.props.eventKey;ne.dragNode=Ce;var de=Object(i.b)(oe,ie);ne.setState({dragging:!0,dragNodesKeys:Object(i.g)(ie,se)}),ne.setExpandedKeys(de),be&&be({event:Oe,node:Object(e.b)(Ce.props)})},ne.onNodeDragEnter=function(Oe,Ce){var fe=ne.state,oe=fe.expandedKeys,se=fe.keyEntities,be=fe.dragNodesKeys,ie=ne.props.onDragEnter,de=Ce.props,Fe=de.pos,ae=de.eventKey;if(!ne.dragNode||be.indexOf(ae)!==-1)return;var Z=Object(i.c)(Oe,Ce);if(ne.dragNode.props.eventKey===ae&&Z===0){ne.setState({dragOverNodeKey:"",dropPosition:null});return}setTimeout(function(){ne.setState({dragOverNodeKey:ae,dropPosition:Z}),ne.delayedDragEnterLogic||(ne.delayedDragEnterLogic={}),Object.keys(ne.delayedDragEnterLogic).forEach(function(Y){clearTimeout(ne.delayedDragEnterLogic[Y])}),ne.delayedDragEnterLogic[Fe]=window.setTimeout(function(){if(!ne.state.dragging)return;var Y=Object(O.a)(oe),q=se[ae];q&&(q.children||[]).length&&(Y=Object(i.a)(oe,ae)),"expandedKeys"in ne.props||ne.setExpandedKeys(Y),ie&&ie({event:Oe,node:Object(e.b)(Ce.props),expandedKeys:Y})},400)},0)},ne.onNodeDragOver=function(Oe,Ce){var fe=ne.state.dragNodesKeys,oe=ne.props.onDragOver,se=Ce.props.eventKey;if(fe.indexOf(se)!==-1)return;if(ne.dragNode&&se===ne.state.dragOverNodeKey){var be=Object(i.c)(Oe,Ce);if(be===ne.state.dropPosition)return;ne.setState({dropPosition:be})}oe&&oe({event:Oe,node:Object(e.b)(Ce.props)})},ne.onNodeDragLeave=function(Oe,Ce){var fe=ne.props.onDragLeave;ne.setState({dragOverNodeKey:""}),fe&&fe({event:Oe,node:Object(e.b)(Ce.props)})},ne.onNodeDragEnd=function(Oe,Ce){var fe=ne.props.onDragEnd;ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),fe&&fe({event:Oe,node:Object(e.b)(Ce.props)}),ne.dragNode=null},ne.onNodeDrop=function(Oe,Ce){var fe=ne.state,oe=fe.dragNodesKeys,se=oe===void 0?[]:oe,be=fe.dropPosition,ie=ne.props.onDrop,de=Ce.props,Fe=de.eventKey,ae=de.pos;if(ne.setState({dragOverNodeKey:""}),ne.cleanDragState(),se.indexOf(Fe)!==-1){Object(a.a)(!1,"Can not drop to dragNode(include it's children node)");return}var Z=Object(i.k)(ae),Y={event:Oe,node:Object(e.b)(Ce.props),dragNode:ne.dragNode?Object(e.b)(ne.dragNode.props):null,dragNodesKeys:se.slice(),dropPosition:be+Number(Z[Z.length-1]),dropToGap:!1};be!==0&&(Y.dropToGap=!0),ie&&ie(Y),ne.dragNode=null},ne.cleanDragState=function(){var Oe=ne.state.dragging;Oe&&ne.setState({dragging:!1})},ne.onNodeClick=function(Oe,Ce){var fe=ne.props.onClick;fe&&fe(Oe,Ce)},ne.onNodeDoubleClick=function(Oe,Ce){var fe=ne.props.onDoubleClick;fe&&fe(Oe,Ce)},ne.onNodeSelect=function(Oe,Ce){var fe=ne.state.selectedKeys,oe=ne.state.keyEntities,se=ne.props,be=se.onSelect,ie=se.multiple,de=Ce.selected,Fe=Ce.key,ae=!de;ae?ie?fe=Object(i.a)(fe,Fe):fe=[Fe]:fe=Object(i.b)(fe,Fe);var Z=fe.map(function(Y){var q=oe[Y];return q?q.node:null}).filter(function(Y){return Y});ne.setUncontrolledState({selectedKeys:fe}),be&&be(fe,{event:"select",selected:ae,node:Ce,selectedNodes:Z,nativeEvent:Oe.nativeEvent})},ne.onNodeCheck=function(Oe,Ce,fe){var oe=ne.state,se=oe.keyEntities,be=oe.checkedKeys,ie=oe.halfCheckedKeys,de=ne.props,Fe=de.checkStrictly,ae=de.onCheck,Z=Ce.key,Y,q={event:"check",node:Ce,checked:fe,nativeEvent:Oe.nativeEvent};if(Fe){var ve=fe?Object(i.a)(be,Z):Object(i.b)(be,Z),pe=Object(i.b)(ie,Z);Y={checked:ve,halfChecked:pe},q.checkedNodes=ve.map(function(Ve){return se[Ve]}).filter(function(Ve){return Ve}).map(function(Ve){return Ve.node}),ne.setUncontrolledState({checkedKeys:ve})}else{var Te=Object(P.a)([].concat(Object(O.a)(be),[Z]),!0,se),Ne=Te.checkedKeys,me=Te.halfCheckedKeys;if(!fe){var Ie=new Set(Ne);Ie.delete(Z);var _e=Object(P.a)(Array.from(Ie),{checked:!1,halfCheckedKeys:me},se);Ne=_e.checkedKeys,me=_e.halfCheckedKeys}Y=Ne,q.checkedNodes=[],q.checkedNodesPositions=[],q.halfCheckedKeys=me,Ne.forEach(function(Ve){var tt=se[Ve];if(!tt)return;var Ge=tt.node,Le=tt.pos;q.checkedNodes.push(Ge),q.checkedNodesPositions.push({node:Ge,pos:Le})}),ne.setUncontrolledState({checkedKeys:Ne},!1,{halfCheckedKeys:me})}ae&&ae(Y,q)},ne.onNodeLoad=function(Oe){return new Promise(function(Ce){ne.setState(function(fe){var oe=fe.loadedKeys,se=oe===void 0?[]:oe,be=fe.loadingKeys,ie=be===void 0?[]:be,de=ne.props,Fe=de.loadData,ae=de.onLoad,Z=Oe.key;if(!Fe||se.indexOf(Z)!==-1||ie.indexOf(Z)!==-1)return{};var Y=Fe(Oe);return Y.then(function(){var q=ne.state,ve=q.loadedKeys,pe=q.loadingKeys,Te=Object(i.a)(ve,Z),Ne=Object(i.b)(pe,Z);ae&&ae(Te,{event:"load",node:Oe}),ne.setUncontrolledState({loadedKeys:Te}),ne.setState({loadingKeys:Ne}),Ce()}),{loadingKeys:Object(i.a)(ie,Z)}})})},ne.onNodeMouseEnter=function(Oe,Ce){var fe=ne.props.onMouseEnter;fe&&fe({event:Oe,node:Ce})},ne.onNodeMouseLeave=function(Oe,Ce){var fe=ne.props.onMouseLeave;fe&&fe({event:Oe,node:Ce})},ne.onNodeContextMenu=function(Oe,Ce){var fe=ne.props.onRightClick;fe&&(Oe.preventDefault(),fe({event:Oe,node:Ce}))},ne.onFocus=function(){var Oe=ne.props.onFocus;ne.setState({focused:!0}),Oe&&Oe.apply(void 0,arguments)},ne.onBlur=function(){var Oe=ne.props.onBlur;ne.setState({focused:!1}),ne.onActiveChange(null),Oe&&Oe.apply(void 0,arguments)},ne.getTreeNodeRequiredProps=function(){var Oe=ne.state,Ce=Oe.expandedKeys,fe=Oe.selectedKeys,oe=Oe.loadedKeys,se=Oe.loadingKeys,be=Oe.checkedKeys,ie=Oe.halfCheckedKeys,de=Oe.dragOverNodeKey,Fe=Oe.dropPosition,ae=Oe.keyEntities;return{expandedKeys:Ce||[],selectedKeys:fe||[],loadedKeys:oe||[],loadingKeys:se||[],checkedKeys:be||[],halfCheckedKeys:ie||[],dragOverNodeKey:de,dropPosition:Fe,keyEntities:ae}},ne.setExpandedKeys=function(Oe){var Ce=ne.state.treeData,fe=Object(e.d)(Ce,Oe);ne.setUncontrolledState({expandedKeys:Oe,flattenNodes:fe},!0)},ne.onNodeExpand=function(Oe,Ce){var fe=ne.state.expandedKeys,oe=ne.state.listChanging,se=ne.props,be=se.onExpand,ie=se.loadData,de=Ce.key,Fe=Ce.expanded;if(oe)return;var ae=fe.indexOf(de),Z=!Fe;if(Object(a.a)(Fe&&ae!==-1||!Fe&&ae===-1,"Expand state not sync with index check"),Z?fe=Object(i.a)(fe,de):fe=Object(i.b)(fe,de),ne.setExpandedKeys(fe),be&&be(fe,{node:Ce,expanded:Z,nativeEvent:Oe.nativeEvent}),Z&&ie){var Y=ne.onNodeLoad(Ce);Y&&Y.then(function(){var q=Object(e.d)(ne.state.treeData,fe);ne.setUncontrolledState({flattenNodes:q})})}},ne.onListChangeStart=function(){ne.setUncontrolledState({listChanging:!0})},ne.onListChangeEnd=function(){setTimeout(function(){ne.setUncontrolledState({listChanging:!1})})},ne.onActiveChange=function(Oe){var Ce=ne.state.activeKey,fe=ne.props.onActiveChange;if(Ce===Oe)return;ne.setState({activeKey:Oe}),Oe!==null&&ne.scrollTo({key:Oe}),fe&&fe(Oe)},ne.getActiveItem=function(){var Oe=ne.state,Ce=Oe.activeKey,fe=Oe.flattenNodes;return Ce===null?null:fe.find(function(oe){var se=oe.data.key;return se===Ce})||null},ne.offsetActiveKey=function(Oe){var Ce=ne.state,fe=Ce.flattenNodes,oe=Ce.activeKey,se=fe.findIndex(function(de){var Fe=de.data.key;return Fe===oe});se===-1&&Oe<0&&(se=fe.length),se=(se+Oe+fe.length)%fe.length;var be=fe[se];if(be){var ie=be.data.key;ne.onActiveChange(ie)}else ne.onActiveChange(null)},ne.onKeyDown=function(Oe){var Ce=ne.state,fe=Ce.activeKey,oe=Ce.expandedKeys,se=Ce.checkedKeys,be=ne.props,ie=be.onKeyDown,de=be.checkable,Fe=be.selectable;switch(Oe.which){case d.a.UP:{ne.offsetActiveKey(-1),Oe.preventDefault();break}case d.a.DOWN:{ne.offsetActiveKey(1),Oe.preventDefault();break}}var ae=ne.getActiveItem();if(ae&&ae.data){var Z=ne.getTreeNodeRequiredProps(),Y=ae.data.isLeaf===!1||!!(ae.data.children||[]).length,q=Object(e.b)(Object(_.a)(Object(_.a)({},Object(e.f)(fe,Z)),{},{data:ae.data,active:!0}));switch(Oe.which){case d.a.LEFT:{Y&&oe.includes(fe)?ne.onNodeExpand({},q):ae.parent&&ne.onActiveChange(ae.parent.data.key),Oe.preventDefault();break}case d.a.RIGHT:{Y&&!oe.includes(fe)?ne.onNodeExpand({},q):ae.children&&ae.children.length&&ne.onActiveChange(ae.children[0].data.key),Oe.preventDefault();break}case d.a.ENTER:case d.a.SPACE:{de&&!q.disabled&&q.checkable!==!1&&!q.disableCheckbox?ne.onNodeCheck({},q,!se.includes(fe)):!de&&Fe&&!q.disabled&&q.selectable!==!1&&ne.onNodeSelect({},q);break}}}ie&&ie(Oe)},ne.setUncontrolledState=function(Oe){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(ne.destroyed)return;var oe=!1,se=!0,be={};Object.keys(Oe).forEach(function(ie){if(ie in ne.props){se=!1;return}oe=!0,be[ie]=Oe[ie]}),oe&&(!Ce||se)&&ne.setState(Object(_.a)(Object(_.a)({},be),fe))},ne.scrollTo=function(Oe){ne.listRef.current.scrollTo(Oe)},ne}return Object(v.a)(ke,[{key:"componentWillUnmount",value:function(){this.destroyed=!0}},{key:"render",value:function(){var Oe,Ce=this.state,fe=Ce.focused,oe=Ce.flattenNodes,se=Ce.keyEntities,be=Ce.dragging,ie=Ce.activeKey,de=this.props,Fe=de.prefixCls,ae=de.className,Z=de.style,Y=de.showLine,q=de.focusable,ve=de.tabIndex,pe=ve===void 0?0:ve,Te=de.selectable,Ne=de.showIcon,me=de.icon,Ie=de.switcherIcon,_e=de.draggable,Ve=de.checkable,tt=de.checkStrictly,Ge=de.disabled,Le=de.motion,bt=de.loadData,Re=de.filterTreeNode,Xe=de.height,et=de.itemHeight,Ye=de.virtual,Me=de.titleRender,Ke=de.onContextMenu,ge=Object(i.f)(this.props);return p.createElement(t.a.Provider,{value:{prefixCls:Fe,selectable:Te,showIcon:Ne,icon:me,switcherIcon:Ie,draggable:_e,checkable:Ve,checkStrictly:tt,disabled:Ge,keyEntities:se,loadData:bt,filterTreeNode:Re,titleRender:Me,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}},p.createElement("div",{className:s()(Fe,ae,(Oe={},Object(I.a)(Oe,"".concat(Fe,"-show-line"),Y),Object(I.a)(Oe,"".concat(Fe,"-focused"),fe),Object(I.a)(Oe,"".concat(Fe,"-active-focused"),ie!==null),Oe))},p.createElement(F,Object.assign({ref:this.listRef,prefixCls:Fe,style:Z,data:oe,disabled:Ge,selectable:Te,checkable:!!Ve,motion:Le,dragging:be,height:Xe,itemHeight:et,virtual:Ye,focusable:q,focused:fe,tabIndex:pe,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ke},this.getTreeNodeRequiredProps(),ge))))}}],[{key:"getDerivedStateFromProps",value:function(Oe,Ce){var fe=Ce.prevProps,oe={prevProps:Oe};function se(me){return!fe&&me in Oe||fe&&fe[me]!==Oe[me]}var be;if(se("treeData")?be=Oe.treeData:se("children")&&(Object(a.a)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),be=Object(e.c)(Oe.children)),be){oe.treeData=be;var ie=Object(e.a)(be);oe.keyEntities=Object(_.a)(Object(I.a)({},A,k),ie.keyEntities)}var de=oe.keyEntities||Ce.keyEntities;if(se("expandedKeys")||fe&&se("autoExpandParent"))oe.expandedKeys=Oe.autoExpandParent||!fe&&Oe.defaultExpandParent?Object(i.e)(Oe.expandedKeys,de):Oe.expandedKeys;else if(!fe&&Oe.defaultExpandAll){var Fe=Object(_.a)({},de);delete Fe[A],oe.expandedKeys=Object.keys(Fe).map(function(me){return Fe[me].key})}else!fe&&Oe.defaultExpandedKeys&&(oe.expandedKeys=Oe.autoExpandParent||Oe.defaultExpandParent?Object(i.e)(Oe.defaultExpandedKeys,de):Oe.defaultExpandedKeys);if(oe.expandedKeys||delete oe.expandedKeys,be||oe.expandedKeys){var ae=Object(e.d)(be||Ce.treeData,oe.expandedKeys||Ce.expandedKeys);oe.flattenNodes=ae}if(Oe.selectable&&(se("selectedKeys")?oe.selectedKeys=Object(i.d)(Oe.selectedKeys,Oe):!fe&&Oe.defaultSelectedKeys&&(oe.selectedKeys=Object(i.d)(Oe.defaultSelectedKeys,Oe))),Oe.checkable){var Z;if(se("checkedKeys")?Z=Object(i.j)(Oe.checkedKeys)||{}:!fe&&Oe.defaultCheckedKeys?Z=Object(i.j)(Oe.defaultCheckedKeys)||{}:be&&(Z=Object(i.j)(Oe.checkedKeys)||{checkedKeys:Ce.checkedKeys,halfCheckedKeys:Ce.halfCheckedKeys}),Z){var Y=Z,q=Y.checkedKeys,ve=q===void 0?[]:q,pe=Y.halfCheckedKeys,Te=pe===void 0?[]:pe;if(!Oe.checkStrictly){var Ne=Object(P.a)(ve,!0,de);ve=Ne.checkedKeys,Te=Ne.halfCheckedKeys}oe.checkedKeys=ve,oe.halfCheckedKeys=Te}}return se("loadedKeys")&&(oe.loadedKeys=Oe.loadedKeys),oe}}]),ke}(p.Component);B.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:[]},B.TreeNode=m.a;var J=B,re=X.b=J},fXAG:function(U,X,x){"use strict";x.d(X,"j",function(){return I}),x.d(X,"i",function(){return _}),x.d(X,"k",function(){return O}),x.d(X,"eb",function(){return y}),x.d(X,"o",function(){return v}),x.d(X,"S",function(){return o}),x.d(X,"fb",function(){return g}),x.d(X,"u",function(){return p}),x.d(X,"v",function(){return d}),x.d(X,"cb",function(){return a}),x.d(X,"A",function(){return n}),x.d(X,"m",function(){return s}),x.d(X,"Y",function(){return t}),x.d(X,"s",function(){return i}),x.d(X,"N",function(){return e}),x.d(X,"bb",function(){return r}),x.d(X,"db",function(){return c}),x.d(X,"l",function(){return u}),x.d(X,"Q",function(){return f}),x.d(X,"ab",function(){return m}),x.d(X,"x",function(){return l}),x.d(X,"z",function(){return E}),x.d(X,"X",function(){return b}),x.d(X,"b",function(){return D}),x.d(X,"H",function(){return C}),x.d(X,"a",function(){return w}),x.d(X,"c",function(){return A}),x.d(X,"P",function(){return R}),x.d(X,"g",function(){return k}),x.d(X,"t",function(){return L}),x.d(X,"Z",function(){return M}),x.d(X,"y",function(){return G}),x.d(X,"B",function(){return W}),x.d(X,"f",function(){return N}),x.d(X,"e",function(){return K}),x.d(X,"W",function(){return F}),x.d(X,"h",function(){return P}),x.d(X,"d",function(){return B}),x.d(X,"R",function(){return re}),x.d(X,"n",function(){return he}),x.d(X,"F",function(){return we}),x.d(X,"I",function(){return ke}),x.d(X,"D",function(){return ne}),x.d(X,"E",function(){return Oe}),x.d(X,"C",function(){return Ce}),x.d(X,"G",function(){return fe}),x.d(X,"U",function(){return oe}),x.d(X,"q",function(){return se}),x.d(X,"r",function(){return be}),x.d(X,"V",function(){return ie}),x.d(X,"T",function(){return de}),x.d(X,"p",function(){return Fe}),x.d(X,"M",function(){return ae}),x.d(X,"L",function(){return Z}),x.d(X,"J",function(){return Y}),x.d(X,"K",function(){return q}),x.d(X,"O",function(){return ve}),x.d(X,"w",function(){return pe});var I="FETCH_TASK_START",_="FETCH_TASK_FAILURE",O="FETCH_TASK_SUCCESS",y="UPDATE_TASK_DATA",v="HIDE_EVALUATE_RESULT",o="SHOW_EVALUATE_RESULT",g="UPDATE_TIMESTRAP",p="MOVE_X",d="MOVE_Y",a="TRIGGER_RIGHT_PANEL_MASK ",n="SET_ACTIVE_INDEX",s="GET_TASK_LIST",t="SHOW_TASK_LIST",i="HIDE_TASK_LIST",e="SET_TASK_STAR",r="TRIGGER_ENLARGE_UNITY3D ",c="TRIGGER_TAB_FIXED ",u="GET_DISCUSSES",f="SHOW_DISCUSSES_LOADING",m="TOP_OR_DOWN_DISCUSS",l="PLUS_DISCUSS",E="SET_ACTION_TYPE",b="SHOW_REWARD_DIALOG",D="CANCEL_REWARD_DIALOG",C="SET_REWARD",w="ACTIVE_DISCUSS_INDEX",S="CREATE_DISCUSS",A="DISABLE_DISCUSS",R="SHOW_ANSWER_LOADING",k="FETCH_ANSWER_INFO",L="HIGH_TIP_MODAL",M="SHOW_TIP_MODAL",G="SELECT_UNLOCK_ANSWER",W="SET_CHOOSE_ANSWERS",N="EVAL_CHOOSE_START",K="EVAL_CHOOSE_END",F="SHOW_REP_loading",P="FETCH_REP_CONTENT",B="EDIT_REP_CONTENT",J="SET_REP_PATH",re="SHOW_EVALUATE_LOADING",he="HIDE_EVALUATE_LOADING",we="SET_EVALUATE_MESSAGE",ke="SET_SHOW_DIR",ne="SET_EDITOR_SETTING",Oe="SET_EDITOR_THEME",Ce="SET_EDITOR_FONTSIZE",fe="SET_REPOS",oe="SHOW_PATH_LIST",se="HIDE_PATH_LIST",be="HIDE_PICTURE_VIEW",ie="SHOW_PICTURE_VIEW",de="SHOW_NOTICE",Fe="HIDE_NOTICE",ae="SET_TAB_INDEX",Z="SET_SSH_TABS",Y="SET_SSH_CONFIGDATA",q="SET_SSH_CONFIGDATAARR",ve="SET_VNC_LOADING ",pe="ON_TAB_TO_SPACE "},fcSX:function(U,X,x){"use strict";var I=x("Ff2n"),_=x("1OyB"),O=x("vuIU"),y=x("Ji7U"),v=x("md7G"),o=x("foSv"),g=x("1W/9"),p=x("q1tI"),d=x("rePB"),a=x("JX7q"),n=x("TSYQ"),s=x.n(n),t=x("qx4F"),i=x("4IlW");function e(N){return Array.isArray(N)?N:[N]}var r={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},c=Object.keys(r).filter(function(N){if(typeof document=="undefined")return!1;var K=document.getElementsByTagName("html")[0];return N in(K?K.style:{})})[0],u=r[c];function f(N,K,F,P){N.addEventListener?N.addEventListener(K,F,P):N.attachEvent&&N.attachEvent("on".concat(K),F)}function m(N,K,F,P){N.removeEventListener?N.removeEventListener(K,F,P):N.attachEvent&&N.detachEvent("on".concat(K),F)}function l(N,K){var F=typeof N=="function"?N(K):N;return Array.isArray(F)?F.length===2?F:[F[0],F[1]]:[F]}var E=function(K){return!isNaN(parseFloat(K))&&isFinite(K)},b=!(typeof window!="undefined"&&window.document&&window.document.createElement),D=function N(K,F,P,B){if(!F||F===document||F instanceof Document)return!1;if(F===K.parentNode)return!0;var J=Math.max(Math.abs(P),Math.abs(B))===Math.abs(B),re=Math.max(Math.abs(P),Math.abs(B))===Math.abs(P),he=F.scrollHeight-F.clientHeight,we=F.scrollWidth-F.clientWidth,ke=document.defaultView.getComputedStyle(F),ne=ke.overflowY==="auto"||ke.overflowY==="scroll",Oe=ke.overflowX==="auto"||ke.overflowX==="scroll",Ce=he&&ne,fe=we&&Oe;return J&&(!Ce||Ce&&(F.scrollTop>=he&&B<0||F.scrollTop<=0&&B>0))||re&&(!fe||fe&&(F.scrollLeft>=we&&P<0||F.scrollLeft<=0&&P>0))?N(K,F.parentNode,P,B):!1};function C(N){var K=w();return function(){var P=Object(o.a)(N),B;if(K){var J=Object(o.a)(this).constructor;B=Reflect.construct(P,arguments,J)}else B=P.apply(this,arguments);return Object(v.a)(this,B)}}function w(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(N){return!1}}var S={},A=function(N){Object(y.a)(F,N);var K=C(F);function F(P){var B;return Object(_.a)(this,F),B=K.call(this,P),B.domFocus=function(){B.dom&&B.dom.focus()},B.removeStartHandler=function(J){if(J.touches.length>1)return;B.startPos={x:J.touches[0].clientX,y:J.touches[0].clientY}},B.removeMoveHandler=function(J){if(J.changedTouches.length>1)return;var re=J.currentTarget,he=J.changedTouches[0].clientX-B.startPos.x,we=J.changedTouches[0].clientY-B.startPos.y;(re===B.maskDom||re===B.handlerDom||re===B.contentDom&&D(re,J.target,he,we))&&J.cancelable&&J.preventDefault()},B.transitionEnd=function(J){var re=J.target;m(re,u,B.transitionEnd),re.style.transition=""},B.onKeyDown=function(J){if(J.keyCode===i.a.ESC){var re=B.props.onClose;J.stopPropagation(),re&&re(J)}},B.onWrapperTransitionEnd=function(J){var re=B.props,he=re.open,we=re.afterVisibleChange;J.target===B.contentWrapper&&J.propertyName.match(/transform$/)&&(B.dom.style.transition="",!he&&B.getCurrentDrawerSome()&&(document.body.style.overflowX="",B.maskDom&&(B.maskDom.style.left="",B.maskDom.style.width="")),we&&we(!!he))},B.openLevelTransition=function(){var J=B.props,re=J.open,he=J.width,we=J.height,ke=B.getHorizontalBoolAndPlacementName(),ne=ke.isHorizontal,Oe=ke.placementName,Ce=B.contentDom?B.contentDom.getBoundingClientRect()[ne?"width":"height"]:0,fe=(ne?he:we)||Ce;B.setLevelAndScrolling(re,Oe,fe)},B.setLevelTransform=function(J,re,he,we){var ke=B.props,ne=ke.placement,Oe=ke.levelMove,Ce=ke.duration,fe=ke.ease,oe=ke.showMask;B.levelDom.forEach(function(se){se.style.transition="transform ".concat(Ce," ").concat(fe),f(se,u,B.transitionEnd);var be=J?he:0;if(Oe){var ie=l(Oe,{target:se,open:J});be=J?ie[0]:ie[1]||0}var de=typeof be=="number"?"".concat(be,"px"):be,Fe=ne==="left"||ne==="top"?de:"-".concat(de);Fe=oe&&ne==="right"&&we?"calc(".concat(Fe," + ").concat(we,"px)"):Fe,se.style.transform=be?"".concat(re,"(").concat(Fe,")"):""})},B.setLevelAndScrolling=function(J,re,he){var we=B.props.onChange;if(!b){var ke=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?Object(t.a)(!0):0;B.setLevelTransform(J,re,he,ke),B.toggleScrollingToDrawerAndBody(ke)}we&&we(J)},B.toggleScrollingToDrawerAndBody=function(J){var re=B.props,he=re.getOpenCount,we=re.getContainer,ke=re.showMask,ne=re.open,Oe=we&&we(),Ce=he&&he();if(Oe&&Oe.parentNode===document.body&&ke){var fe=["touchstart"],oe=[document.body,B.maskDom,B.handlerDom,B.contentDom];ne&&document.body.style.overflow!=="hidden"?(J&&B.addScrollingEffect(J),Ce===1&&(document.body.style.overflow="hidden"),document.body.style.touchAction="none",oe.forEach(function(se,be){if(!se)return;f(se,fe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)})):B.getCurrentDrawerSome()&&(Ce||(document.body.style.overflow=""),document.body.style.touchAction="",J&&B.remScrollingEffect(J),oe.forEach(function(se,be){if(!se)return;m(se,fe[be]||"touchmove",be?B.removeMoveHandler:B.removeStartHandler,B.passive)}))}},B.addScrollingEffect=function(J){var re=B.props,he=re.placement,we=re.duration,ke=re.ease,ne=re.getOpenCount,Oe=re.switchScrollingEffect,Ce=ne&&ne();Ce===1&&Oe();var fe="width ".concat(we," ").concat(ke),oe="transform ".concat(we," ").concat(ke);B.dom.style.transition="none";switch(he){case"right":B.dom.style.transform="translateX(-".concat(J,"px)");break;case"top":case"bottom":B.dom.style.width="calc(100% - ".concat(J,"px)"),B.dom.style.transform="translateZ(0)";break;default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(oe,",").concat(fe),B.dom.style.width="",B.dom.style.transform="")})},B.remScrollingEffect=function(J){var re=B.props,he=re.placement,we=re.duration,ke=re.ease,ne=re.getOpenCount,Oe=re.switchScrollingEffect,Ce=ne&&ne();Ce||Oe(!0),c&&(document.body.style.overflowX="hidden"),B.dom.style.transition="none";var fe,oe="width ".concat(we," ").concat(ke),se="transform ".concat(we," ").concat(ke);switch(he){case"left":{B.dom.style.width="100%",oe="width 0s ".concat(ke," ").concat(we);break}case"right":{B.dom.style.transform="translateX(".concat(J,"px)"),B.dom.style.width="100%",oe="width 0s ".concat(ke," ").concat(we),B.maskDom&&(B.maskDom.style.left="-".concat(J,"px"),B.maskDom.style.width="calc(100% + ".concat(J,"px)"));break}case"top":case"bottom":{B.dom.style.width="calc(100% + ".concat(J,"px)"),B.dom.style.height="100%",B.dom.style.transform="translateZ(0)",fe="height 0s ".concat(ke," ").concat(we);break}default:break}clearTimeout(B.timeout),B.timeout=setTimeout(function(){B.dom&&(B.dom.style.transition="".concat(se,",").concat(fe?"".concat(fe,","):"").concat(oe),B.dom.style.transform="",B.dom.style.width="",B.dom.style.height="")})},B.getCurrentDrawerSome=function(){return!Object.keys(S).some(function(J){return S[J]})},B.getLevelDom=function(J){var re=J.level,he=J.getContainer;if(b)return;var we=he&&he(),ke=we?we.parentNode:null;if(B.levelDom=[],re==="all"){var ne=ke?Array.prototype.slice.call(ke.children):[];ne.forEach(function(Oe){Oe.nodeName!=="SCRIPT"&&Oe.nodeName!=="STYLE"&&Oe.nodeName!=="LINK"&&Oe!==we&&B.levelDom.push(Oe)})}else re&&e(re).forEach(function(Oe){document.querySelectorAll(Oe).forEach(function(Ce){B.levelDom.push(Ce)})})},B.getHorizontalBoolAndPlacementName=function(){var J=B.props.placement,re=J==="left"||J==="right",he="translate".concat(re?"X":"Y");return{isHorizontal:re,placementName:he}},B.state={_self:Object(a.a)(B)},B}return Object(O.a)(F,[{key:"componentDidMount",value:function(){var B=this;if(!b){var J=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){return J=!0,null}}))}catch(ne){}this.passive=J?{passive:!1}:!1}var re=this.props,he=re.open,we=re.getContainer,ke=we&&we();this.drawerId="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),this.getLevelDom(this.props),he&&(ke&&ke.parentNode===document.body&&(S[this.drawerId]=he),this.openLevelTransition(),this.forceUpdate(function(){B.domFocus()}))}},{key:"componentDidUpdate",value:function(B){var J=this.props,re=J.open,he=J.getContainer,we=he&&he();re!==B.open&&(re&&this.domFocus(),we&&we.parentNode===document.body&&(S[this.drawerId]=!!re),this.openLevelTransition())}},{key:"componentWillUnmount",value:function(){var B=this.props,J=B.getOpenCount,re=B.open,he=B.switchScrollingEffect,we=typeof J=="function"&&J();delete S[this.drawerId],re&&(this.setLevelTransform(!1),document.body.style.touchAction=""),we||(document.body.style.overflow="",he(!0))}},{key:"render",value:function(){var B,J=this,re=this.props,he=re.className,we=re.children,ke=re.style,ne=re.width,Oe=re.height,Ce=re.defaultOpen,fe=re.open,oe=re.prefixCls,se=re.placement,be=re.level,ie=re.levelMove,de=re.ease,Fe=re.duration,ae=re.getContainer,Z=re.handler,Y=re.onChange,q=re.afterVisibleChange,ve=re.showMask,pe=re.maskClosable,Te=re.maskStyle,Ne=re.onClose,me=re.onHandleClick,Ie=re.keyboard,_e=re.getOpenCount,Ve=re.switchScrollingEffect,tt=Object(I.a)(re,["className","children","style","width","height","defaultOpen","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","handler","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","onClose","onHandleClick","keyboard","getOpenCount","switchScrollingEffect"]),Ge=this.dom?fe:!1,Le=s()(oe,(B={},Object(d.a)(B,"".concat(oe,"-").concat(se),!0),Object(d.a)(B,"".concat(oe,"-open"),Ge),Object(d.a)(B,he||"",!!he),Object(d.a)(B,"no-mask",!ve),B)),bt=this.getHorizontalBoolAndPlacementName(),Re=bt.placementName,Xe=se==="left"||se==="top"?"-100%":"100%",et=Ge?"":"".concat(Re,"(").concat(Xe,")"),Ye=Z&&p.cloneElement(Z,{onClick:function(Ke){Z.props.onClick&&Z.props.onClick(),me&&me(Ke)},ref:function(Ke){J.handlerDom=Ke}});return p.createElement("div",Object.assign({},tt,{tabIndex:-1,className:Le,style:ke,ref:function(Ke){J.dom=Ke},onKeyDown:Ge&&Ie?this.onKeyDown:void 0,onTransitionEnd:this.onWrapperTransitionEnd}),ve&&p.createElement("div",{className:"".concat(oe,"-mask"),onClick:pe?Ne:void 0,style:Te,ref:function(Ke){J.maskDom=Ke}}),p.createElement("div",{className:"".concat(oe,"-content-wrapper"),style:{transform:et,msTransform:et,width:E(ne)?"".concat(ne,"px"):ne,height:E(Oe)?"".concat(Oe,"px"):Oe},ref:function(Ke){J.contentWrapper=Ke}},p.createElement("div",{className:"".concat(oe,"-content"),ref:function(Ke){J.contentDom=Ke},onTouchStart:Ge&&ve?this.removeStartHandler:void 0,onTouchMove:Ge&&ve?this.removeMoveHandler:void 0},we),Ye))}}],[{key:"getDerivedStateFromProps",value:function(B,J){var re=J.prevProps,he=J._self,we={prevProps:B};if(re!==void 0){var ke=B.placement,ne=B.level;ke!==re.placement&&(he.contentDom=null),ne!==re.level&&he.getLevelDom(B)}return we}}]),F}(p.Component);A.defaultProps={switchScrollingEffect:function(){}};var R=A;function k(N){var K=L();return function(){var P=Object(o.a)(N),B;if(K){var J=Object(o.a)(this).constructor;B=Reflect.construct(P,arguments,J)}else B=P.apply(this,arguments);return Object(v.a)(this,B)}}function L(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(N){return!1}}var M=function(N){Object(y.a)(F,N);var K=k(F);function F(P){var B;Object(_.a)(this,F),B=K.call(this,P),B.onHandleClick=function(re){var he=B.props,we=he.onHandleClick,ke=he.open;if(we&&we(re),typeof ke=="undefined"){var ne=B.state.open;B.setState({open:!ne})}},B.onClose=function(re){var he=B.props,we=he.onClose,ke=he.open;we&&we(re),typeof ke=="undefined"&&B.setState({open:!1})};var J=typeof P.open!="undefined"?P.open:!!P.defaultOpen;return B.state={open:J},"onMaskClick"in P&&console.warn("`onMaskClick` are removed, please use `onClose` instead."),B}return Object(O.a)(F,[{key:"render",value:function(){var B=this,J=this.props,re=J.defaultOpen,he=J.getContainer,we=J.wrapperClassName,ke=J.forceRender,ne=J.handler,Oe=Object(I.a)(J,["defaultOpen","getContainer","wrapperClassName","forceRender","handler"]),Ce=this.state.open;if(!he)return p.createElement("div",{className:we,ref:function(se){B.dom=se}},p.createElement(R,Object.assign({},Oe,{open:Ce,handler:ne,getContainer:function(){return B.dom},onClose:this.onClose,onHandleClick:this.onHandleClick})));var fe=!!ne||ke;return p.createElement(g.a,{visible:Ce,forceRender:fe,getContainer:he,wrapperClassName:we},function(oe){var se=oe.visible,be=oe.afterClose,ie=Object(I.a)(oe,["visible","afterClose"]);return p.createElement(R,Object.assign({},Oe,ie,{open:se!==void 0?se:Ce,afterVisibleChange:be!==void 0?be:Oe.afterVisibleChange,handler:ne,onClose:B.onClose,onHandleClick:B.onHandleClick}))})}}],[{key:"getDerivedStateFromProps",value:function(B,J){var re=J.prevProps,he={prevProps:B};return typeof re!="undefined"&&B.open!==re.open&&(he.open=B.open),he}}]),F}(p.Component);M.defaultProps={prefixCls:"drawer",placement:"left",getContainer:"body",defaultOpen:!1,level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",onChange:function(){},afterVisibleChange:function(){},handler:p.createElement("div",{className:"drawer-handle"},p.createElement("i",{className:"drawer-handle-icon"})),showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",className:"",keyboard:!0,forceRender:!1};var G=M,W=X.a=G},fxth:function(U,X,x){U.exports={"action-bar-container":"action-bar-container___3Et9N","edit-status":"edit-status___1BgGg","action-bar":"action-bar___Q-6Wi",iconfont:"iconfont___3Ar9E"}},fyJ8:function(U,X,x){"use strict";var I=x("rePB"),_=x("VTBJ"),O=x("Ff2n"),y=x("U8pU"),v=x("q1tI"),o=x.n(v),g=x("TSYQ"),p=x.n(g),d=x("c+Xe"),a=x("sR1s");function n(r){return r&&Object(y.a)(r)==="object"&&!Array.isArray(r)&&!v.isValidElement(r)}function s(r){return typeof r=="string"?!0:Object(d.c)(r)}function t(r,c){var u,f=r.prefixCls,m=r.className,l=r.record,E=r.index,b=r.dataIndex,D=r.render,C=r.children,w=r.component,S=w===void 0?"td":w,A=r.colSpan,R=r.rowSpan,k=r.fixLeft,L=r.fixRight,M=r.firstFixLeft,G=r.lastFixLeft,W=r.firstFixRight,N=r.lastFixRight,K=r.appendNode,F=r.additionalProps,P=F===void 0?{}:F,B=r.ellipsis,J=r.align,re=r.rowType,he=r.isSticky,we="".concat(f,"-cell"),ke,ne;if(C)ne=C;else{var Oe=Object(a.b)(l,b);if(ne=Oe,D){var Ce=D(Oe,l,E);n(Ce)?(ne=Ce.children,ke=Ce.props):ne=Ce}}Object(y.a)(ne)==="object"&&!Array.isArray(ne)&&!v.isValidElement(ne)&&(ne=null),B&&(G||W)&&(ne=v.createElement("span",{className:"".concat(we,"-content")},ne));var fe=ke||{},oe=fe.colSpan,se=fe.rowSpan,be=fe.style,ie=fe.className,de=Object(O.a)(fe,["colSpan","rowSpan","style","className"]),Fe=oe!==void 0?oe:A,ae=se!==void 0?se:R;if(Fe===0||ae===0)return null;var Z={},Y=typeof k=="number",q=typeof L=="number";Y&&(Z.position="sticky",Z.left=k),q&&(Z.position="sticky",Z.right=L);var ve={};J&&(ve.textAlign=J);var pe,Te=B===!0?{showTitle:!0}:B;Te&&(Te.showTitle||re==="header")&&(typeof ne=="string"||typeof ne=="number"?pe=ne.toString():v.isValidElement(ne)&&typeof ne.props.children=="string"&&(pe=ne.props.children));var Ne=Object(_.a)(Object(_.a)(Object(_.a)({title:pe},de),P),{},{colSpan:Fe&&Fe!==1?Fe:null,rowSpan:ae&&ae!==1?ae:null,className:p()(we,m,(u={},Object(I.a)(u,"".concat(we,"-fix-left"),Y),Object(I.a)(u,"".concat(we,"-fix-left-first"),M),Object(I.a)(u,"".concat(we,"-fix-left-last"),G),Object(I.a)(u,"".concat(we,"-fix-right"),q),Object(I.a)(u,"".concat(we,"-fix-right-first"),W),Object(I.a)(u,"".concat(we,"-fix-right-last"),N),Object(I.a)(u,"".concat(we,"-ellipsis"),B),Object(I.a)(u,"".concat(we,"-with-append"),K),Object(I.a)(u,"".concat(we,"-fix-sticky"),(Y||q)&&he),u),P.className,ie),style:Object(_.a)(Object(_.a)(Object(_.a)(Object(_.a)({},P.style),ve),Z),be),ref:s(S)?c:null});return v.createElement(S,Object.assign({},Ne),K,ne)}var i=v.forwardRef(t);i.displayName="Cell";var e=v.memo(i,function(r,c){return c.shouldCellUpdate?!c.shouldCellUpdate(c.record,r.record):!1});X.a=e},gIYZ:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={Backspace:"Backspace",AltLeft:"Alt",AltRight:"Alt",CapsLock:"CapsLock",ContextMenu:"ContextMenu",ControlLeft:"Control",ControlRight:"Control",Enter:"Enter",MetaLeft:"Meta",MetaRight:"Meta",ShiftLeft:"Shift",ShiftRight:"Shift",Tab:"Tab",Delete:"Delete",End:"End",Help:"Help",Home:"Home",Insert:"Insert",PageDown:"PageDown",PageUp:"PageUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight",ArrowUp:"ArrowUp",NumLock:"NumLock",NumpadBackspace:"Backspace",NumpadClear:"Clear",Escape:"Escape",F1:"F1",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",F10:"F10",F11:"F11",F12:"F12",F13:"F13",F14:"F14",F15:"F15",F16:"F16",F17:"F17",F18:"F18",F19:"F19",F20:"F20",F21:"F21",F22:"F22",F23:"F23",F24:"F24",F25:"F25",F26:"F26",F27:"F27",F28:"F28",F29:"F29",F30:"F30",F31:"F31",F32:"F32",F33:"F33",F34:"F34",F35:"F35",PrintScreen:"PrintScreen",ScrollLock:"ScrollLock",Pause:"Pause",BrowserBack:"BrowserBack",BrowserFavorites:"BrowserFavorites",BrowserForward:"BrowserForward",BrowserHome:"BrowserHome",BrowserRefresh:"BrowserRefresh",BrowserSearch:"BrowserSearch",BrowserStop:"BrowserStop",Eject:"Eject",LaunchApp1:"LaunchMyComputer",LaunchApp2:"LaunchCalendar",LaunchMail:"LaunchMail",MediaPlayPause:"MediaPlay",MediaStop:"MediaStop",MediaTrackNext:"MediaTrackNext",MediaTrackPrevious:"MediaTrackPrevious",Power:"Power",Sleep:"Sleep",AudioVolumeDown:"AudioVolumeDown",AudioVolumeMute:"AudioVolumeMute",AudioVolumeUp:"AudioVolumeUp",WakeUp:"WakeUp"};X.default=I},gRFJ:function(U,X,x){U.exports=[x("rdUC"),x("ynwM"),x("RELg"),x("DlR+"),x("CrYA"),x("PD8m")]},gaXo:function(module,exports){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(U){return U<10?"0"+U:U}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(U){return rx_escapable.lastIndex=0,rx_escapable.test(U)?'"'+U.replace(rx_escapable,function(X){var x=meta[X];return typeof x=="string"?x:"\\u"+("0000"+X.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+U+'"'}function str(U,X){var x,I,_,O,y=gap,v,o=X[U];o&&typeof o=="object"&&typeof o.toJSON=="function"&&(o=o.toJSON(U)),typeof rep=="function"&&(o=rep.call(X,U,o));switch(typeof o){case"string":return quote(o);case"number":return isFinite(o)?String(o):"null";case"boolean":case"null":return String(o);case"object":if(!o)return"null";if(gap+=indent,v=[],Object.prototype.toString.apply(o)==="[object Array]"){for(O=o.length,x=0;x<O;x+=1)v[x]=str(x,o)||"null";return _=v.length===0?"[]":gap?`[
|
|
|
`+gap+v.join(`,
|
|
|
`+gap)+`
|
|
|
`+y+"]":"["+v.join(",")+"]",gap=y,_}if(rep&&typeof rep=="object")for(O=rep.length,x=0;x<O;x+=1)typeof rep[x]=="string"&&(I=rep[x],_=str(I,o),_&&v.push(quote(I)+(gap?": ":":")+_));else for(I in o)Object.prototype.hasOwnProperty.call(o,I)&&(_=str(I,o),_&&v.push(quote(I)+(gap?": ":":")+_));return _=v.length===0?"{}":gap?`{
|
|
|
`+gap+v.join(`,
|
|
|
`+gap)+`
|
|
|
`+y+"}":"{"+v.join(",")+"}",gap=y,_}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(U,X,x){var I;if(gap="",indent="",typeof x=="number")for(I=0;I<x;I+=1)indent+=" ";else typeof x=="string"&&(indent=x);if(rep=X,X&&typeof X!="function"&&(typeof X!="object"||typeof X.length!="number"))throw new Error("JSON.stringify");return str("",{"":U})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(U,X){var x,I,_=U[X];if(_&&typeof _=="object")for(x in _)Object.prototype.hasOwnProperty.call(_,x)&&(I=walk(_,x),I!==void 0?_[x]=I:delete _[x]);return reviver.call(U,X,_)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(U){return"\\u"+("0000"+U.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},"gb/T":function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.mode.ECB=function(){var _=I.lib.BlockCipherMode.extend();return _.Encryptor=_.extend({processBlock:function(O,y){this._cipher.encryptBlock(O,y)}}),_.Decryptor=_.extend({processBlock:function(O,y){this._cipher.decryptBlock(O,y)}}),_}(),I.mode.ECB})},gflZ:function(U,X,x){},gp9y:function(U,X,x){},h78n:function(U,X,x){"use strict";x.d(X,"a",function(){return M});var I=x("q1tI"),_=x.n(I),O=x("TSYQ"),y=x.n(O),v={className:"",percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,style:{},trailColor:"#D9D9D9",trailWidth:1},o=function(N){var K=N.map(function(){return Object(I.useRef)()}),F=Object(I.useRef)();return Object(I.useEffect)(function(){var P=Date.now(),B=!1;Object.keys(K).forEach(function(J){var re=K[J].current;if(!re)return;B=!0;var he=re.style;he.transitionDuration=".3s, .3s, .3s, .06s",F.current&&P-F.current<100&&(he.transitionDuration="0s, 0s")}),B&&(F.current=Date.now())}),[K]};function g(){return g=Object.assign||function(W){for(var N=1;N<arguments.length;N++){var K=arguments[N];for(var F in K)Object.prototype.hasOwnProperty.call(K,F)&&(W[F]=K[F])}return W},g.apply(this,arguments)}function p(W,N){return t(W)||s(W,N)||a(W,N)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a(W,N){if(!W)return;if(typeof W=="string")return n(W,N);var K=Object.prototype.toString.call(W).slice(8,-1);if(K==="Object"&&W.constructor&&(K=W.constructor.name),K==="Map"||K==="Set")return Array.from(W);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return n(W,N)}function n(W,N){(N==null||N>W.length)&&(N=W.length);for(var K=0,F=new Array(N);K<N;K++)F[K]=W[K];return F}function s(W,N){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var K=[],F=!0,P=!1,B=void 0;try{for(var J=W[Symbol.iterator](),re;!(F=(re=J.next()).done)&&!(K.push(re.value),N&&K.length===N);F=!0);}catch(he){P=!0,B=he}finally{try{!F&&J.return!=null&&J.return()}finally{if(P)throw B}}return K}function t(W){if(Array.isArray(W))return W}function i(W,N){if(W==null)return{};var K=e(W,N),F,P;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(W);for(P=0;P<B.length;P++){if(F=B[P],N.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,F))continue;K[F]=W[F]}}return K}function e(W,N){if(W==null)return{};var K={},F=Object.keys(W),P,B;for(B=0;B<F.length;B++){if(P=F[B],N.indexOf(P)>=0)continue;K[P]=W[P]}return K}var r=function(N){var K=N.className,F=N.percent,P=N.prefixCls,B=N.strokeColor,J=N.strokeLinecap,re=N.strokeWidth,he=N.style,we=N.trailColor,ke=N.trailWidth,ne=N.transition,Oe=i(N,["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"]);delete Oe.gapPosition;var Ce=Array.isArray(F)?F:[F],fe=Array.isArray(B)?B:[B],oe=o(Ce),se=p(oe,1),be=se[0],ie=re/2,de=100-re/2,Fe="M ".concat(J==="round"?ie:0,",").concat(ie,`
|
|
|
L `).concat(J==="round"?de:100,",").concat(ie),ae="0 0 100 ".concat(re),Z=0;return _.a.createElement("svg",g({className:y()("".concat(P,"-line"),K),viewBox:ae,preserveAspectRatio:"none",style:he},Oe),_.a.createElement("path",{className:"".concat(P,"-line-trail"),d:Fe,strokeLinecap:J,stroke:we,strokeWidth:ke||re,fillOpacity:"0"}),Ce.map(function(Y,q){var ve={strokeDasharray:"".concat(Y,"px, 100px"),strokeDashoffset:"-".concat(Z,"px"),transition:ne||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},pe=fe[q]||fe[fe.length-1];return Z+=Y,_.a.createElement("path",{key:q,className:"".concat(P,"-line-path"),d:Fe,strokeLinecap:J,stroke:pe,strokeWidth:re,fillOpacity:"0",ref:be[q],style:ve})}))};r.defaultProps=v;var c=r;function u(){return u=Object.assign||function(W){for(var N=1;N<arguments.length;N++){var K=arguments[N];for(var F in K)Object.prototype.hasOwnProperty.call(K,F)&&(W[F]=K[F])}return W},u.apply(this,arguments)}function f(W,N){return D(W)||b(W,N)||l(W,N)||m()}function m(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(W,N){if(!W)return;if(typeof W=="string")return E(W,N);var K=Object.prototype.toString.call(W).slice(8,-1);if(K==="Object"&&W.constructor&&(K=W.constructor.name),K==="Map"||K==="Set")return Array.from(W);if(K==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(K))return E(W,N)}function E(W,N){(N==null||N>W.length)&&(N=W.length);for(var K=0,F=new Array(N);K<N;K++)F[K]=W[K];return F}function b(W,N){if(typeof Symbol=="undefined"||!(Symbol.iterator in Object(W)))return;var K=[],F=!0,P=!1,B=void 0;try{for(var J=W[Symbol.iterator](),re;!(F=(re=J.next()).done)&&!(K.push(re.value),N&&K.length===N);F=!0);}catch(he){P=!0,B=he}finally{try{!F&&J.return!=null&&J.return()}finally{if(P)throw B}}return K}function D(W){if(Array.isArray(W))return W}function C(W,N){if(W==null)return{};var K=w(W,N),F,P;if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(W);for(P=0;P<B.length;P++){if(F=B[P],N.indexOf(F)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(W,F))continue;K[F]=W[F]}}return K}function w(W,N){if(W==null)return{};var K={},F=Object.keys(W),P,B;for(B=0;B<F.length;B++){if(P=F[B],N.indexOf(P)>=0)continue;K[P]=W[P]}return K}var S=0;function A(W){return+W.replace("%","")}function R(W){return Array.isArray(W)?W:[W]}function k(W,N,K,F){var P=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,B=arguments.length>5?arguments[5]:void 0,J=50-F/2,re=0,he=-J,we=0,ke=-2*J;switch(B){case"left":re=-J,he=0,we=2*J,ke=0;break;case"right":re=J,he=0,we=-2*J,ke=0;break;case"bottom":he=J,ke=2*J;break;default:}var ne="M 50,50 m ".concat(re,",").concat(he,`
|
|
|
a `).concat(J,",").concat(J," 0 1 1 ").concat(we,",").concat(-ke,`
|
|
|
a `).concat(J,",").concat(J," 0 1 1 ").concat(-we,",").concat(ke),Oe=Math.PI*2*J,Ce={stroke:K,strokeDasharray:"".concat(N/100*(Oe-P),"px ").concat(Oe,"px"),strokeDashoffset:"-".concat(P/2+W/100*(Oe-P),"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s"};return{pathString:ne,pathStyle:Ce}}var L=function(N){var K=N.prefixCls,F=N.strokeWidth,P=N.trailWidth,B=N.gapDegree,J=N.gapPosition,re=N.trailColor,he=N.strokeLinecap,we=N.style,ke=N.className,ne=N.strokeColor,Oe=N.percent,Ce=C(N,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"]),fe=Object(I.useMemo)(function(){return S+=1,S},[]),oe=k(0,100,re,F,B,J),se=oe.pathString,be=oe.pathStyle,ie=R(Oe),de=R(ne),Fe=de.find(function(ve){return Object.prototype.toString.call(ve)==="[object Object]"}),ae=o(ie),Z=f(ae,1),Y=Z[0],q=function(){var pe=0;return ie.map(function(Te,Ne){var me=de[Ne]||de[de.length-1],Ie=Object.prototype.toString.call(me)==="[object Object]"?"url(#".concat(K,"-gradient-").concat(fe,")"):"",_e=k(pe,Te,me,F,B,J);return pe+=Te,_.a.createElement("path",{key:Ne,className:"".concat(K,"-circle-path"),d:_e.pathString,stroke:Ie,strokeLinecap:he,strokeWidth:F,opacity:Te===0?0:1,fillOpacity:"0",style:_e.pathStyle,ref:Y[Ne]})})};return _.a.createElement("svg",u({className:y()("".concat(K,"-circle"),ke),viewBox:"0 0 100 100",style:we},Ce),Fe&&_.a.createElement("defs",null,_.a.createElement("linearGradient",{id:"".concat(K,"-gradient-").concat(fe),x1:"100%",y1:"0%",x2:"0%",y2:"0%"},Object.keys(Fe).sort(function(ve,pe){return A(ve)-A(pe)}).map(function(ve,pe){return _.a.createElement("stop",{key:pe,offset:ve,stopColor:Fe[ve]})}))),_.a.createElement("path",{className:"".concat(K,"-circle-trail"),d:se,stroke:re,strokeLinecap:he,strokeWidth:P||F,fillOpacity:"0",style:be}),q().reverse())};L.defaultProps=v;var M=L,G={Line:c,Circle:M}},hW8S:function(U,X,x){"use strict";x.d(X,"a",function(){return y}),x.d(X,"c",function(){return v}),x.d(X,"b",function(){return o});var I=x("VTBJ"),_=x("Ff2n"),O=x("Kwbf"),y="RC_TABLE_INTERNAL_COL_DEFINE";function v(g){var p=g.expandable,d=Object(_.a)(g,["expandable"]);return"expandable"in g?Object(I.a)(Object(I.a)({},d),p):d}function o(g){return Object.keys(g).reduce(function(p,d){return(d.substr(0,5)==="data-"||d.substr(0,5)==="aria-")&&(p[d]=g[d]),p},{})}},hXwI:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(v,o){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}function _(v,o){for(var g=0;g<o.length;g++){var p=o[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(v,p.key,p)}}function O(v,o,g){return o&&_(v.prototype,o),g&&_(v,g),v}var y=function(){function v(){I(this,v)}return O(v,[{key:"decodeRect",value:function(g,p,d,a,n,s,t){if(n.rQwait("COPYRECT",4))return!1;var i=n.rQshift16(),e=n.rQshift16();return s.copyImage(i,e,g,p,d,a),!0}}]),v}();X.default=y},i72Y:function(U,X,x){U.exports={selectImage:"selectImage___3j6A8",container:"container___2tvXa"}},iNZB:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAACgCAYAAAB+HS7YAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjc0MDQ0OTA3MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjc0MDQ0OTA4MDE3NzExRUJCNjY1QzBDMDY3NUI5QTQ3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NzQwNDQ5MDUwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzQwNDQ5MDYwMTc3MTFFQkI2NjVDMEMwNjc1QjlBNDciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4CEd39AAACAklEQVR42uzYvyuFURjA8Yf7TpSw+BHbvSTZrXTFX6AMRLiLySSE8ismg8FAIsKAwcCA/eqSbEqJrEgMd7pxzi3iUgbn8KTvU0/37b7Lp/Oe5+k5JygoC4uJiMkpk1GTeaIoApOVJuMm80VhZJuc1Ip7BUZFcWRr23NfAQUgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQL8FWAoFJLpseFP/+9ur8v9zUU67fN3kVVQFn52jcvNzZH52RlpaqiXwvLIh3cW9j4y32dG4BpXUlwkG0vzUlNdpe8TW9T+zqYznFNgY7ROdrc2pLSkWF+RdLe3yurCXHrvuY7gp5U6MTIgsY42b20mcFGpPiPQUKlO96CPSnUG9FWpToA+K9UJsLIinK5atcNC39Co7O0f6gWmUinp6umVk9MzveNWMpmUlo6YXF5d650Hb+/upbm1M/2rdmC1K2hX0q6o2ona7kW7J+3eVDvy26ruHxnXfSZZWF6VxZU13Ycmnz3SCdBnj3Q28vvqkU4PTT56pPODu+se6eVmwWWP9Hb1YavaVndmxBPHb89HiZO/ufpQWyQAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECBAgQIAAAQIECPD/AB+1Aw+0AwdNPmgGnpusNblt8kkb8EWAAQAq85VNhqprywAAAABJRU5ErkJggg=="},iUHT:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;function I(E,b){if(!(E instanceof b))throw new TypeError("Cannot call a class as a function")}function _(E,b){for(var D=0;D<b.length;D++){var C=b[D];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(E,C.key,C)}}function O(E,b,D){return b&&_(E.prototype,b),D&&_(E,D),E}var y=[13,16,10,23,0,4,2,27,14,5,20,9,22,18,11,3,25,7,15,6,26,19,12,1,40,51,30,36,46,54,29,39,50,44,32,47,43,48,38,55,33,52,45,41,49,35,28,31],v=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],o=0,g,p,d,a,n,s;g=1<<16,p=1<<24,d=g|p,a=1<<2,n=1<<10,s=a|n;var t=[d|n,o|o,g|o,d|s,d|a,g|s,o|a,g|o,o|n,d|n,d|s,o|n,p|s,d|a,p|o,o|a,o|s,p|n,p|n,g|n,g|n,d|o,d|o,p|s,g|a,p|a,p|a,g|a,o|o,o|s,g|s,p|o,g|o,d|s,o|a,d|o,d|n,p|o,p|o,o|n,d|a,g|o,g|n,p|a,o|n,o|a,p|s,g|s,d|s,g|a,d|o,p|s,p|a,o|s,g|s,d|n,o|s,p|n,p|n,o|o,g|a,g|n,o|o,d|a];g=1<<20,p=1<<31,d=g|p,a=1<<5,n=1<<15,s=a|n;var i=[d|s,p|n,o|n,g|s,g|o,o|a,d|a,p|s,p|a,d|s,d|n,p|o,p|n,g|o,o|a,d|a,g|n,g|a,p|s,o|o,p|o,o|n,g|s,d|o,g|a,p|a,o|o,g|n,o|s,d|n,d|o,o|s,o|o,g|s,d|a,g|o,p|s,d|o,d|n,o|n,d|o,p|n,o|a,d|s,g|s,o|a,o|n,p|o,o|s,d|n,g|o,p|a,g|a,p|s,p|a,g|a,g|n,o|o,p|n,o|s,p|o,d|a,d|s,g|n];g=1<<17,p=1<<27,d=g|p,a=1<<3,n=1<<9,s=a|n;var e=[o|s,d|n,o|o,d|a,p|n,o|o,g|s,p|n,g|a,p|a,p|a,g|o,d|s,g|a,d|o,o|s,p|o,o|a,d|n,o|n,g|n,d|o,d|a,g|s,p|s,g|n,g|o,p|s,o|a,d|s,o|n,p|o,d|n,p|o,g|a,o|s,g|o,d|n,p|n,o|o,o|n,g|a,d|s,p|n,p|a,o|n,o|o,d|a,p|s,g|o,p|o,d|s,o|a,g|s,g|n,p|a,d|o,p|s,o|s,d|o,g|s,o|a,d|a,g|n];g=1<<13,p=1<<23,d=g|p,a=1<<0,n=1<<7,s=a|n;var r=[d|a,g|s,g|s,o|n,d|n,p|s,p|a,g|a,o|o,d|o,d|o,d|s,o|s,o|o,p|n,p|a,o|a,g|o,p|o,d|a,o|n,p|o,g|a,g|n,p|s,o|a,g|n,p|n,g|o,d|n,d|s,o|s,p|n,p|a,d|o,d|s,o|s,o|o,o|o,d|o,g|n,p|n,p|s,o|a,d|a,g|s,g|s,o|n,d|s,o|s,o|a,g|o,p|a,g|a,d|n,p|s,g|a,g|n,p|o,d|a,o|n,p|o,g|o,d|n];g=1<<25,p=1<<30,d=g|p,a=1<<8,n=1<<19,s=a|n;var c=[o|a,g|s,g|n,d|a,o|n,o|a,p|o,g|n,p|s,o|n,g|a,p|s,d|a,d|n,o|s,p|o,g|o,p|n,p|n,o|o,p|a,d|s,d|s,g|a,d|n,p|a,o|o,d|o,g|s,g|o,d|o,o|s,o|n,d|a,o|a,g|o,p|o,g|n,d|a,p|s,g|a,p|o,d|n,g|s,p|s,o|a,g|o,d|n,d|s,o|s,d|o,d|s,g|n,o|o,p|n,d|o,o|s,g|a,p|a,o|n,o|o,p|n,g|s,p|a];g=1<<22,p=1<<29,d=g|p,a=1<<4,n=1<<14,s=a|n;var u=[p|a,d|o,o|n,d|s,d|o,o|a,d|s,g|o,p|n,g|s,g|o,p|a,g|a,p|n,p|o,o|s,o|o,g|a,p|s,o|n,g|n,p|s,o|a,d|a,d|a,o|o,g|s,d|n,o|s,g|n,d|n,p|o,p|n,o|a,d|a,g|n,d|s,g|o,o|s,p|a,g|o,p|n,p|o,o|s,p|a,d|s,g|n,d|o,g|s,d|n,o|o,d|a,o|a,o|n,d|o,g|s,o|n,g|a,p|s,o|o,d|n,p|o,g|a,p|s];g=1<<21,p=1<<26,d=g|p,a=1<<1,n=1<<11,s=a|n;var f=[g|o,d|a,p|s,o|o,o|n,p|s,g|s,d|n,d|s,g|o,o|o,p|a,o|a,p|o,d|a,o|s,p|n,g|s,g|a,p|n,p|a,d|o,d|n,g|a,d|o,o|n,o|s,d|s,g|n,o|a,p|o,g|n,p|o,g|n,g|o,p|s,p|s,d|a,d|a,o|a,g|a,p|o,p|n,g|o,d|n,o|s,g|s,d|n,o|s,p|a,d|s,d|o,g|n,o|o,o|a,d|s,o|o,g|s,d|o,o|n,p|a,p|n,o|n,g|a];g=1<<18,p=1<<28,d=g|p,a=1<<6,n=1<<12,s=a|n;var m=[p|s,o|n,g|o,d|s,p|o,p|s,o|a,p|o,g|a,d|o,d|s,g|n,d|n,g|s,o|n,o|a,d|o,p|a,p|n,o|s,g|n,g|a,d|a,d|n,o|s,o|o,o|o,d|a,p|a,p|n,g|s,g|o,g|s,g|o,d|n,o|n,o|a,d|a,o|n,g|s,p|n,o|a,p|a,d|o,d|a,p|o,g|o,p|s,o|o,d|s,g|a,p|a,d|o,p|n,p|s,o|o,d|s,g|n,g|n,o|s,o|s,g|a,p|o,d|n],l=function(){function E(b){I(this,E),this.keys=[];for(var D=[],C=[],w=[],S=0,A=56;S<56;++S,A-=8){A+=A<-5?65:A<-3?31:A<-1?63:A===27?35:0;var R=A&7;D[S]=(b[A>>>3]&1<<R)!==0?1:0}for(var k=0;k<16;++k){var L=k<<1,M=L+1;w[L]=w[M]=0;for(var G=28;G<59;G+=28)for(var W=G-28;W<G;++W){var N=W+v[k];C[W]=N<G?D[N]:D[N-28]}for(var K=0;K<24;++K)C[y[K]]!==0&&(w[L]|=1<<23-K),C[y[K+24]]!==0&&(w[M]|=1<<23-K)}for(var F=0,P=0,B=0;F<16;++F){var J=w[P++],re=w[P++];this.keys[B]=(J&16515072)<<6,this.keys[B]|=(J&4032)<<10,this.keys[B]|=(re&16515072)>>>10,this.keys[B]|=(re&4032)>>>6,++B,this.keys[B]=(J&258048)<<12,this.keys[B]|=(J&63)<<16,this.keys[B]|=(re&258048)>>>4,this.keys[B]|=re&63,++B}}return O(E,[{key:"enc8",value:function(D){var C=D.slice(),w=0,S,A,R;S=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],A=C[w++]<<24|C[w++]<<16|C[w++]<<8|C[w++],R=(S>>>4^A)&252645135,A^=R,S^=R<<4,R=(S>>>16^A)&65535,A^=R,S^=R<<16,R=(A>>>2^S)&858993459,S^=R,A^=R<<2,R=(A>>>8^S)&16711935,S^=R,A^=R<<8,A=A<<1|A>>>31&1,R=(S^A)&2863311530,S^=R,A^=R,S=S<<1|S>>>31&1;for(var k=0,L=0;k<8;++k){R=A<<28|A>>>4,R^=this.keys[L++];var M=f[R&63];M|=c[R>>>8&63],M|=e[R>>>16&63],M|=t[R>>>24&63],R=A^this.keys[L++],M|=m[R&63],M|=u[R>>>8&63],M|=r[R>>>16&63],M|=i[R>>>24&63],S^=M,R=S<<28|S>>>4,R^=this.keys[L++],M=f[R&63],M|=c[R>>>8&63],M|=e[R>>>16&63],M|=t[R>>>24&63],R=S^this.keys[L++],M|=m[R&63],M|=u[R>>>8&63],M|=r[R>>>16&63],M|=i[R>>>24&63],A^=M}for(A=A<<31|A>>>1,R=(S^A)&2863311530,S^=R,A^=R,S=S<<31|S>>>1,R=(S>>>8^A)&16711935,A^=R,S^=R<<8,R=(S>>>2^A)&858993459,A^=R,S^=R<<2,R=(A>>>16^S)&65535,S^=R,A^=R<<16,R=(A>>>4^S)&252645135,S^=R,A^=R<<4,R=[A,S],w=0;w<8;w++)C[w]=(R[w>>>2]>>>8*(3-w%4))%256,C[w]<0&&(C[w]+=256);return C}},{key:"encrypt",value:function(D){return this.enc8(D.slice(0,8)).concat(this.enc8(D.slice(8,16)))}}]),E}();X.default=l},jO9C:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.pad.Iso97971={pad:function(_,O){_.concat(I.lib.WordArray.create([2147483648],1)),I.pad.ZeroPadding.pad(_,O)},unpad:function(_){I.pad.ZeroPadding.unpad(_),_.sigBytes--}},I.pad.Iso97971})},je13:function(U,X,x){var I=x("5nXd"),_=x("gRFJ"),O=[x("uQRt")];U.exports=I.createStore(_,O)},ji0R:function(U,X,x){U.exports=x.p+"static/douyu.3e6df9ee.jpg"},k3GJ:function(U,X,x){"use strict";x.d(X,"a",function(){return Co});var I=x("rePB"),_=x("ODXe"),O=x("Ff2n"),y=x("VTBJ"),v=x("q1tI"),o=x("TSYQ"),g=x.n(o),p=x("Zm9Q"),d=x("6cGi"),a=x("KQm4"),n=x("xEkU"),s=x.n(n),t=x("t23M");function i(ot){var xt=Object(v.useRef)(),Rt=Object(v.useRef)(!1);function ct(){for(var Ue=arguments.length,$e=new Array(Ue),We=0;We<Ue;We++)$e[We]=arguments[We];Rt.current||(s.a.cancel(xt.current),xt.current=s()(function(){ot.apply(void 0,$e)}))}return Object(v.useEffect)(function(){return function(){Rt.current=!0,s.a.cancel(xt.current)}},[]),ct}function e(ot){var xt=Object(v.useRef)([]),Rt=Object(v.useState)({}),ct=Object(_.a)(Rt,2),Ue=ct[1],$e=Object(v.useRef)(typeof ot=="function"?ot():ot),We=i(function(){var mt=$e.current;xt.current.forEach(function(Ot){mt=Ot(mt)}),xt.current=[],$e.current=mt,Ue({})});function dt(mt){xt.current.push(mt),We()}return[$e.current,dt]}var r=x("4IlW");function c(ot,xt){var Rt,ct=ot.prefixCls,Ue=ot.id,$e=ot.active,We=ot.rtl,dt=ot.tab,mt=dt.key,Ot=dt.tab,Tt=dt.disabled,Ut=dt.closeIcon,Zt=ot.tabBarGutter,cn=ot.tabPosition,dn=ot.closable,An=ot.renderWrapper,_r=ot.removeAriaLabel,Vr=ot.editable,Mr=ot.onClick,Wr=ot.onRemove,Yr=ot.onFocus,Xr="".concat(ct,"-tab");v.useEffect(function(){return Wr},[]);var zr={};cn==="top"||cn==="bottom"?zr[We?"marginLeft":"marginRight"]=Zt:zr.marginBottom=Zt;var si=Vr&&dn!==!1&&!Tt;function Jr(dr){if(Tt)return;Mr(dr)}function Zi(dr){dr.preventDefault(),dr.stopPropagation(),Vr.onEdit("remove",{key:mt,event:dr})}var Zr=v.createElement("div",{key:mt,ref:xt,className:g()(Xr,(Rt={},Object(I.a)(Rt,"".concat(Xr,"-with-remove"),si),Object(I.a)(Rt,"".concat(Xr,"-active"),$e),Object(I.a)(Rt,"".concat(Xr,"-disabled"),Tt),Rt)),style:zr,onClick:Jr},v.createElement("div",{role:"tab","aria-selected":$e,id:Ue&&"".concat(Ue,"-tab-").concat(mt),className:"".concat(Xr,"-btn"),"aria-controls":Ue&&"".concat(Ue,"-panel-").concat(mt),"aria-disabled":Tt,tabIndex:Tt?null:0,onClick:function(lr){lr.stopPropagation(),Jr(lr)},onKeyDown:function(lr){[r.a.SPACE,r.a.ENTER].includes(lr.which)&&(lr.preventDefault(),Jr(lr))},onFocus:Yr},Ot),si&&v.createElement("button",{type:"button","aria-label":_r||"remove",tabIndex:0,className:"".concat(Xr,"-remove"),onClick:function(lr){lr.stopPropagation(),Zi(lr)}},Ut||Vr.removeIcon||"\xD7"));return An&&(Zr=An(Zr)),Zr}var u=v.forwardRef(c),f={width:0,height:0,left:0,top:0};function m(ot,xt,Rt){return Object(v.useMemo)(function(){for(var ct,Ue=new Map,$e=xt.get((ct=ot[0])===null||ct===void 0?void 0:ct.key)||f,We=$e.left+$e.width,dt=0;dt<ot.length;dt+=1){var mt=ot[dt].key,Ot=xt.get(mt);if(!Ot){var Tt;Ot=xt.get((Tt=ot[dt-1])===null||Tt===void 0?void 0:Tt.key)||f}var Ut=Ue.get(mt)||Object(y.a)({},Ot);Ut.right=We-Ut.left-Ut.width,Ue.set(mt,Ut)}return Ue},[ot.map(function(ct){return ct.key}).join("_"),xt,Rt])}var l={width:0,height:0,left:0,top:0,right:0};function E(ot,xt,Rt,ct,Ue){var $e=Ue.tabs,We=Ue.tabPosition,dt=Ue.rtl,mt,Ot,Tt;["top","bottom"].includes(We)?(mt="width",Ot=dt?"right":"left",Tt=Math.abs(xt.left)):(mt="height",Ot="top",Tt=-xt.top);var Ut=xt[mt],Zt=Rt[mt],cn=ct[mt],dn=Ut;return Zt+cn>Ut&&(dn=Ut-cn),Object(v.useMemo)(function(){if(!$e.length)return[0,0];for(var An=$e.length,_r=An,Vr=0;Vr<An;Vr+=1){var Mr=ot.get($e[Vr].key)||l;if(Mr[Ot]+Mr[mt]>Tt+dn){_r=Vr-1;break}}for(var Wr=0,Yr=An-1;Yr>=0;Yr-=1){var Xr=ot.get($e[Yr].key)||l;if(Xr[Ot]<Tt){Wr=Yr+1;break}}return[Wr,_r]},[ot,Tt,dn,We,$e.map(function(An){return An.key}).join("_"),dt])}var b=x("wx14"),D=x("1OyB"),C=x("vuIU"),w=x("JX7q"),S=x("Ji7U"),A=x("LK+K"),R=x("I8Z2"),k=x("bT9E"),L=x("2GS6"),M=x("Gytx"),G=x.n(M),W=x("U8pU"),N=/iPhone/i,K=/iPod/i,F=/iPad/i,P=/\bAndroid(?:.+)Mobile\b/i,B=/Android/i,J=/\bAndroid(?:.+)SD4930UR\b/i,re=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,he=/Windows Phone/i,we=/\bWindows(?:.+)ARM\b/i,ke=/BlackBerry/i,ne=/BB10/i,Oe=/Opera Mini/i,Ce=/\b(CriOS|Chrome)(?:.+)Mobile/i,fe=/Mobile(?:.+)Firefox\b/i;function oe(ot,xt){return ot.test(xt)}function se(ot){var xt=ot||(typeof navigator!="undefined"?navigator.userAgent:""),Rt=(xt||"").split("[FBAN");if(typeof Rt[1]!="undefined"){var ct=Rt,Ue=Object(_.a)(ct,1);xt=Ue[0]}if(Rt=xt.split("Twitter"),typeof Rt[1]!="undefined"){var $e=Rt,We=Object(_.a)($e,1);xt=We[0]}var dt={apple:{phone:oe(N,xt)&&!oe(he,xt),ipod:oe(K,xt),tablet:!oe(N,xt)&&oe(F,xt)&&!oe(he,xt),device:(oe(N,xt)||oe(K,xt)||oe(F,xt))&&!oe(he,xt)},amazon:{phone:oe(J,xt),tablet:!oe(J,xt)&&oe(re,xt),device:oe(J,xt)||oe(re,xt)},android:{phone:!oe(he,xt)&&oe(J,xt)||!oe(he,xt)&&oe(P,xt),tablet:!oe(he,xt)&&!oe(J,xt)&&!oe(P,xt)&&(oe(re,xt)||oe(B,xt)),device:!oe(he,xt)&&(oe(J,xt)||oe(re,xt)||oe(P,xt)||oe(B,xt))||oe(/\bokhttp\b/i,xt)},windows:{phone:oe(he,xt),tablet:oe(we,xt),device:oe(he,xt)||oe(we,xt)},other:{blackberry:oe(ke,xt),blackberry10:oe(ne,xt),opera:oe(Oe,xt),firefox:oe(fe,xt),chrome:oe(Ce,xt),device:oe(ke,xt)||oe(ne,xt)||oe(Oe,xt)||oe(fe,xt)||oe(Ce,xt)},any:null,phone:null,tablet:null};return dt.any=dt.apple.device||dt.android.device||dt.windows.device||dt.other.device,dt.phone=dt.apple.phone||dt.android.phone||dt.windows.phone,dt.tablet=dt.apple.tablet||dt.android.tablet||dt.windows.tablet,dt}var be=Object(y.a)(Object(y.a)({},se()),{},{isMobile:se}),ie=be;function de(){}function Fe(ot,xt,Rt){var ct=xt||"";return ot.key||"".concat(ct,"item_").concat(Rt)}function ae(ot){return"".concat(ot,"-menu-")}function Z(ot,xt){var Rt=-1;v.Children.forEach(ot,function(ct){Rt+=1,ct&&ct.type&&ct.type.isMenuItemGroup?v.Children.forEach(ct.props.children,function(Ue){Rt+=1,xt(Ue,Rt)}):xt(ct,Rt)})}function Y(ot,xt,Rt){if(!ot||Rt.find)return;v.Children.forEach(ot,function(ct){if(ct){var Ue=ct.type;if(!Ue||!(Ue.isSubMenu||Ue.isMenuItem||Ue.isMenuItemGroup))return;xt.indexOf(ct.key)!==-1?Rt.find=!0:ct.props.children&&Y(ct.props.children,xt,Rt)}})}var q=["defaultSelectedKeys","selectedKeys","defaultOpenKeys","openKeys","mode","getPopupContainer","onSelect","onDeselect","onDestroy","openTransitionName","openAnimation","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","triggerSubMenuAction","level","selectable","multiple","onOpenChange","visible","focusable","defaultActiveFirst","prefixCls","inlineIndent","parentMenu","title","rootPrefixCls","eventKey","active","onItemHover","onTitleMouseEnter","onTitleMouseLeave","onTitleClick","popupAlign","popupOffset","isOpen","renderMenuItem","manualRef","subMenuKey","disabled","index","isSelected","store","activeKey","builtinPlacements","overflowedIndicator","motion","attribute","value","popupClassName","inlineCollapsed","menu","theme","itemIcon","expandIcon"],ve=function(xt){var Rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ct=xt&&typeof xt.getBoundingClientRect=="function"&&xt.getBoundingClientRect().width;if(ct){if(Rt){var Ue=getComputedStyle(xt),$e=Ue.marginLeft,We=Ue.marginRight;ct+=+$e.replace("px","")+ +We.replace("px","")}ct=+ct.toFixed(6)}return ct||0},pe=function(xt,Rt,ct){xt&&Object(W.a)(xt.style)==="object"&&(xt.style[Rt]=ct)},Te=function(){return ie.any},Ne=x("bdgK"),me=x("i8i4"),Ie=x.n(me),_e=x("wgJM"),Ve=x("l4aY"),tt=x("m+aA"),Ge=x("c+Xe"),Le=x("zT1h"),bt=x("QC+M");function Re(ot,xt,Rt){return Rt?ot[0]===xt[0]:ot[0]===xt[0]&&ot[1]===xt[1]}function Xe(ot,xt,Rt){var ct=ot[xt]||{};return Object(y.a)(Object(y.a)({},ct),Rt)}function et(ot,xt,Rt,ct){for(var Ue=Rt.points,$e=Object.keys(ot),We=0;We<$e.length;We+=1){var dt=$e[We];if(Re(ot[dt].points,Ue,ct))return"".concat(xt,"-placement-").concat(dt)}return""}var Ye=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ot=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ot)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ot==null?void 0:ot.substr(0,4)))},Me=x("MNnm");function Ke(ot,xt){var Rt={};return Rt[ot.toLowerCase()]=xt.toLowerCase(),Rt["Webkit".concat(ot)]="webkit".concat(xt),Rt["Moz".concat(ot)]="moz".concat(xt),Rt["ms".concat(ot)]="MS".concat(xt),Rt["O".concat(ot)]="o".concat(xt.toLowerCase()),Rt}function ge(ot,xt){var Rt={animationend:Ke("Animation","AnimationEnd"),transitionend:Ke("Transition","TransitionEnd")};return ot&&("AnimationEvent"in xt||delete Rt.animationend.animation,"TransitionEvent"in xt||delete Rt.transitionend.transition),Rt}var Ee=ge(Object(Me.a)(),typeof window!="undefined"?window:{}),ce={};if(Object(Me.a)()){var je=document.createElement("div");ce=je.style}var Qe={};function te(ot){if(Qe[ot])return Qe[ot];var xt=Ee[ot];if(xt)for(var Rt=Object.keys(xt),ct=Rt.length,Ue=0;Ue<ct;Ue+=1){var $e=Rt[Ue];if(Object.prototype.hasOwnProperty.call(xt,$e)&&$e in ce)return Qe[ot]=xt[$e],Qe[ot]}return""}var Je=te("animationend"),ut=te("transitionend"),Be=!!(Je&&ut),qe=Je||"animationend",at=ut||"transitionend";function wt(ot,xt){if(!ot)return null;if(Object(W.a)(ot)==="object"){var Rt=xt.replace(/-\w/g,function(ct){return ct[1].toUpperCase()});return ot[Rt]}return"".concat(ot,"-").concat(xt)}var ft="none",st="appear",Pe="enter",ze="leave",yt="none",pt="prepare",Bt="start",Ht="active",lt="end";function Lt(ot){var xt=Object(v.useRef)(!1),Rt=Object(v.useState)(ot),ct=Object(_.a)(Rt,2),Ue=ct[0],$e=ct[1];function We(dt){xt.current||$e(dt)}return Object(v.useEffect)(function(){return function(){xt.current=!0}},[]),[Ue,We]}var Dt=Object(Me.a)()?v.useLayoutEffect:v.useEffect,Mt=Dt,Wt=function(){var ot=v.useRef(null);function xt(){_e.a.cancel(ot.current)}function Rt(ct){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;xt();var $e=Object(_e.a)(function(){Ue<=1?ct({isCanceled:function(){return $e!==ot.current}}):Rt(ct,Ue-1)});ot.current=$e}return v.useEffect(function(){return function(){xt()}},[]),[Rt,xt]},Yt=[pt,Bt,Ht,lt],mn=!1,Qt=!0;function $t(ot){return ot===Ht||ot===lt}var Kn=function(ot,xt){var Rt=v.useState(yt),ct=Object(_.a)(Rt,2),Ue=ct[0],$e=ct[1],We=Wt(),dt=Object(_.a)(We,2),mt=dt[0],Ot=dt[1];function Tt(){$e(pt)}return Mt(function(){if(Ue!==yt&&Ue!==lt){var Ut=Yt.indexOf(Ue),Zt=Yt[Ut+1],cn=xt(Ue);cn===mn?$e(Zt):mt(function(dn){function An(){if(dn.isCanceled())return;$e(Zt)}cn===!0?An():Promise.resolve(cn).then(An)})}},[ot,Ue]),v.useEffect(function(){return function(){Ot()}},[]),[Tt,Ue]},hn=function(ot){var xt=Object(v.useRef)(),Rt=Object(v.useRef)(ot);Rt.current=ot;var ct=v.useCallback(function(We){Rt.current(We)},[]);function Ue(We){We&&(We.removeEventListener(at,ct),We.removeEventListener(qe,ct))}function $e(We){xt.current&&xt.current!==We&&Ue(xt.current),We&&We!==xt.current&&(We.addEventListener(at,ct),We.addEventListener(qe,ct),xt.current=We)}return v.useEffect(function(){return function(){Ue(xt.current)}},[]),[$e,Ue]};function Rn(ot,xt,Rt,ct){var Ue=ct.motionEnter,$e=Ue===void 0?!0:Ue,We=ct.motionAppear,dt=We===void 0?!0:We,mt=ct.motionLeave,Ot=mt===void 0?!0:mt,Tt=ct.motionDeadline,Ut=ct.motionLeaveImmediately,Zt=ct.onAppearPrepare,cn=ct.onEnterPrepare,dn=ct.onLeavePrepare,An=ct.onAppearStart,_r=ct.onEnterStart,Vr=ct.onLeaveStart,Mr=ct.onAppearActive,Wr=ct.onEnterActive,Yr=ct.onLeaveActive,Xr=ct.onAppearEnd,zr=ct.onEnterEnd,si=ct.onLeaveEnd,Jr=ct.onVisibleChanged,Zi=Lt(),Zr=Object(_.a)(Zi,2),dr=Zr[0],lr=Zr[1],ni=Lt(ft),pi=Object(_.a)(ni,2),$n=pi[0],vi=pi[1],ea=Lt(null),xi=Object(_.a)(ea,2),Si=xi[0],Ii=xi[1],ha=Object(v.useRef)(!1),Ta=Object(v.useRef)(null),aa=Object(v.useRef)(!1),$a=Object(v.useRef)(null);function To(){var Ni=Rt();return Ni||$a.current}var vo=Object(v.useRef)(!1);function Aa(Ni){var Oi=To();if(Ni&&!Ni.deadline&&Ni.target!==Oi)return;var Oa;$n===st&&vo.current?Oa=Xr==null?void 0:Xr(Oi,Ni):$n===Pe&&vo.current?Oa=zr==null?void 0:zr(Oi,Ni):$n===ze&&vo.current&&(Oa=si==null?void 0:si(Oi,Ni)),Oa!==!1&&!aa.current&&(vi(ft),Ii(null))}var Gi=hn(Aa),ji=Object(_.a)(Gi,1),oa=ji[0],ta=v.useMemo(function(){var Ni,Oi,Oa;switch($n){case"appear":return Ni={},Object(I.a)(Ni,pt,Zt),Object(I.a)(Ni,Bt,An),Object(I.a)(Ni,Ht,Mr),Ni;case"enter":return Oi={},Object(I.a)(Oi,pt,cn),Object(I.a)(Oi,Bt,_r),Object(I.a)(Oi,Ht,Wr),Oi;case"leave":return Oa={},Object(I.a)(Oa,pt,dn),Object(I.a)(Oa,Bt,Vr),Object(I.a)(Oa,Ht,Yr),Oa;default:return{}}},[$n]),Ao=Kn($n,function(Ni){if(Ni===pt){var Oi=ta[pt];return Oi?Oi(To()):mn}if(ki in ta){var Oa;Ii(((Oa=ta[ki])===null||Oa===void 0?void 0:Oa.call(ta,To(),null))||null)}return ki===Ht&&(oa(To()),Tt>0&&(clearTimeout(Ta.current),Ta.current=setTimeout(function(){Aa({deadline:!0})},Tt))),Qt}),Vo=Object(_.a)(Ao,2),Yo=Vo[0],ki=Vo[1],Xo=$t(ki);vo.current=Xo,Mt(function(){lr(xt);var Ni=ha.current;if(ha.current=!0,!ot)return;var Oi;!Ni&&xt&&dt&&(Oi=st),Ni&&xt&&$e&&(Oi=Pe),(Ni&&!xt&&Ot||!Ni&&Ut&&!xt&&Ot)&&(Oi=ze),Oi&&(vi(Oi),Yo())},[xt]),Object(v.useEffect)(function(){($n===st&&!dt||$n===Pe&&!$e||$n===ze&&!Ot)&&vi(ft)},[dt,$e,Ot]),Object(v.useEffect)(function(){return function(){clearTimeout(Ta.current),aa.current=!0}},[]),Object(v.useEffect)(function(){dr!==void 0&&$n===ft&&(Jr==null||Jr(dr))},[dr,$n]);var Qo=Si;return ta[pt]&&ki===Bt&&(Qo=Object(y.a)({transition:"none"},Qo)),[$n,ki,Qo,dr!=null?dr:xt]}var wn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){return Object(D.a)(this,Rt),xt.apply(this,arguments)}return Object(C.a)(Rt,[{key:"render",value:function(){return this.props.children}}]),Rt}(v.Component),Pn=wn;function Yn(ot){var xt=ot;Object(W.a)(ot)==="object"&&(xt=ot.transitionSupport);function Rt(Ue){return!!(Ue.motionName&&xt)}var ct=v.forwardRef(function(Ue,$e){var We=Ue.visible,dt=We===void 0?!0:We,mt=Ue.removeOnLeave,Ot=mt===void 0?!0:mt,Tt=Ue.forceRender,Ut=Ue.children,Zt=Ue.motionName,cn=Ue.leavedClassName,dn=Ue.eventProps,An=Rt(Ue),_r=Object(v.useRef)(),Vr=Object(v.useRef)();function Mr(){try{return Object(tt.a)(_r.current||Vr.current)}catch(vi){return null}}var Wr=Rn(An,dt,Mr,Ue),Yr=Object(_.a)(Wr,4),Xr=Yr[0],zr=Yr[1],si=Yr[2],Jr=Yr[3],Zi=v.useRef(Jr);Jr&&(Zi.current=!0);var Zr=Object(v.useRef)($e);Zr.current=$e;var dr=v.useCallback(function(vi){_r.current=vi,Object(Ge.b)(Zr.current,vi)},[]),lr,ni=Object(y.a)(Object(y.a)({},dn),{},{visible:dt});if(!Ut)lr=null;else if(Xr===ft||!Rt(Ue))Jr?lr=Ut(Object(y.a)({},ni),dr):!Ot&&Zi.current?lr=Ut(Object(y.a)(Object(y.a)({},ni),{},{className:cn}),dr):Tt?lr=Ut(Object(y.a)(Object(y.a)({},ni),{},{style:{display:"none"}}),dr):lr=null;else{var pi,$n;zr===pt?$n="prepare":$t(zr)?$n="active":zr===Bt&&($n="start"),lr=Ut(Object(y.a)(Object(y.a)({},ni),{},{className:g()(wt(Zt,Xr),(pi={},Object(I.a)(pi,wt(Zt,"".concat(Xr,"-").concat($n)),$n),Object(I.a)(pi,Zt,typeof Zt=="string"),pi)),style:si}),dr)}return v.createElement(Pn,{ref:Vr},lr)});return ct.displayName="CSSMotion",ct}var or=Yn(Be),Xt="add",xn="keep",Er="remove",nr="removed";function Ir(ot){var xt;return ot&&Object(W.a)(ot)==="object"&&"key"in ot?xt=ot:xt={key:ot},Object(y.a)(Object(y.a)({},xt),{},{key:String(xt.key)})}function qn(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ot.map(Ir)}function ue(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Rt=[],ct=0,Ue=xt.length,$e=qn(ot),We=qn(xt);$e.forEach(function(Ot){for(var Tt=!1,Ut=ct;Ut<Ue;Ut+=1){var Zt=We[Ut];if(Zt.key===Ot.key){ct<Ut&&(Rt=Rt.concat(We.slice(ct,Ut).map(function(cn){return Object(y.a)(Object(y.a)({},cn),{},{status:Xt})})),ct=Ut),Rt.push(Object(y.a)(Object(y.a)({},Zt),{},{status:xn})),ct+=1,Tt=!0;break}}Tt||Rt.push(Object(y.a)(Object(y.a)({},Ot),{},{status:Er}))}),ct<Ue&&(Rt=Rt.concat(We.slice(ct).map(function(Ot){return Object(y.a)(Object(y.a)({},Ot),{},{status:Xt})})));var dt={};Rt.forEach(function(Ot){var Tt=Ot.key;dt[Tt]=(dt[Tt]||0)+1});var mt=Object.keys(dt).filter(function(Ot){return dt[Ot]>1});return mt.forEach(function(Ot){Rt=Rt.filter(function(Tt){var Ut=Tt.key,Zt=Tt.status;return Ut!==Ot||Zt!==Er}),Rt.forEach(function(Tt){Tt.key===Ot&&(Tt.status=xn)})}),Rt}var V=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Q(ot){var xt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:or,Rt=function(ct){Object(S.a)($e,ct);var Ue=Object(A.a)($e);function $e(){var We;return Object(D.a)(this,$e),We=Ue.apply(this,arguments),We.state={keyEntities:[]},We.removeKey=function(dt){We.setState(function(mt){var Ot=mt.keyEntities;return{keyEntities:Ot.map(function(Tt){return Tt.key!==dt?Tt:Object(y.a)(Object(y.a)({},Tt),{},{status:nr})})}})},We}return Object(C.a)($e,[{key:"render",value:function(){var dt=this,mt=this.state.keyEntities,Ot=this.props,Tt=Ot.component,Ut=Ot.children,Zt=Ot.onVisibleChanged,cn=Object(O.a)(Ot,["component","children","onVisibleChanged"]),dn=Tt||v.Fragment,An={};return V.forEach(function(_r){An[_r]=cn[_r],delete cn[_r]}),delete cn.keys,v.createElement(dn,cn,mt.map(function(_r){var Vr=_r.status,Mr=Object(O.a)(_r,["status"]),Wr=Vr===Xt||Vr===xn;return v.createElement(xt,Object(b.a)({},An,{key:Mr.key,visible:Wr,eventProps:Mr,onVisibleChanged:function(Xr){Zt==null||Zt(Xr,{key:Mr.key}),Xr||dt.removeKey(Mr.key)}}),Ut)}))}}],[{key:"getDerivedStateFromProps",value:function(dt,mt){var Ot=dt.keys,Tt=mt.keyEntities,Ut=qn(Ot),Zt=ue(Tt,Ut);return{keyEntities:Zt.filter(function(cn){var dn=Tt.find(function(An){var _r=An.key;return cn.key===_r});return!(dn&&dn.status===nr&&cn.status===Er)})}}}]),$e}(v.Component);return Rt.defaultProps={component:"div"},Rt}var ee=Q(Be),Se=or;function le(ot){var xt=ot.prefixCls,Rt=ot.motion,ct=ot.animation,Ue=ot.transitionName;return Rt||(ct?{motionName:"".concat(xt,"-").concat(ct)}:Ue?{motionName:Ue}:null)}function nt(ot){var xt=ot.prefixCls,Rt=ot.visible,ct=ot.zIndex,Ue=ot.mask,$e=ot.maskMotion,We=ot.maskAnimation,dt=ot.maskTransitionName;if(!Ue)return null;var mt={};return($e||dt||We)&&(mt=Object(y.a)({motionAppear:!0},le({motion:$e,prefixCls:xt,transitionName:dt,animation:We}))),v.createElement(Se,Object(b.a)({},mt,{visible:Rt,removeOnLeave:!0}),function(Ot){var Tt=Ot.className;return v.createElement("div",{style:{zIndex:ct},className:g()("".concat(xt,"-mask"),Tt)})})}var Nt=x("9mu1"),Jt=x("o0o1"),an=x.n(Jt),Gt=x("HaE+"),Dn=["measure","align",null,"motion"],Xn=function(ot,xt){var Rt=Object(v.useState)(null),ct=Object(_.a)(Rt,2),Ue=ct[0],$e=ct[1],We=Object(v.useRef)(),dt=Object(v.useRef)(!1);function mt(Ut){dt.current||$e(Ut)}function Ot(){_e.a.cancel(We.current)}function Tt(Ut){Ot(),We.current=Object(_e.a)(function(){mt(function(Zt){switch(Ue){case"align":return"motion";case"motion":return"stable";default:}return Zt}),Ut==null||Ut()})}return Object(v.useEffect)(function(){mt("measure")},[ot]),Object(v.useEffect)(function(){switch(Ue){case"measure":xt();break;default:}Ue&&(We.current=Object(_e.a)(Object(Gt.a)(an.a.mark(function Ut(){var Zt,cn;return an.a.wrap(function(An){for(;;)switch(An.prev=An.next){case 0:Zt=Dn.indexOf(Ue),cn=Dn[Zt+1],cn&&Zt!==-1&&mt(cn);case 3:case"end":return An.stop()}},Ut)}))))},[Ue]),Object(v.useEffect)(function(){return function(){dt.current=!0,Ot()}},[]),[Ue,Tt]},sr=function(ot){var xt=v.useState({width:0,height:0}),Rt=Object(_.a)(xt,2),ct=Rt[0],Ue=Rt[1];function $e(dt){Ue({width:dt.offsetWidth,height:dt.offsetHeight})}var We=v.useMemo(function(){var dt={};if(ot){var mt=ct.width,Ot=ct.height;ot.indexOf("height")!==-1&&Ot?dt.height=Ot:ot.indexOf("minHeight")!==-1&&Ot&&(dt.minHeight=Ot),ot.indexOf("width")!==-1&&mt?dt.width=mt:ot.indexOf("minWidth")!==-1&&mt&&(dt.minWidth=mt)}return dt},[ot,ct]);return[We,$e]},Tr=v.forwardRef(function(ot,xt){var Rt=ot.visible,ct=ot.prefixCls,Ue=ot.className,$e=ot.style,We=ot.children,dt=ot.zIndex,mt=ot.stretch,Ot=ot.destroyPopupOnHide,Tt=ot.forceRender,Ut=ot.align,Zt=ot.point,cn=ot.getRootDomNode,dn=ot.getClassNameFromAlign,An=ot.onAlign,_r=ot.onMouseEnter,Vr=ot.onMouseLeave,Mr=ot.onMouseDown,Wr=ot.onTouchStart,Yr=Object(v.useRef)(),Xr=Object(v.useRef)(),zr=Object(v.useState)(),si=Object(_.a)(zr,2),Jr=si[0],Zi=si[1],Zr=sr(mt),dr=Object(_.a)(Zr,2),lr=dr[0],ni=dr[1];function pi(){mt&&ni(cn())}var $n=Xn(Rt,pi),vi=Object(_.a)($n,2),ea=vi[0],xi=vi[1],Si=Object(v.useRef)();function Ii(){return Zt||cn}function ha(){var Gi;(Gi=Yr.current)===null||Gi===void 0||Gi.forceAlign()}function Ta(Gi,ji){var oa=dn(ji);Jr!==oa&&Zi(oa),ea==="align"&&(Jr!==oa?Promise.resolve().then(function(){ha()}):xi(function(){var ta;(ta=Si.current)===null||ta===void 0||ta.call(Si)}),An==null||An(Gi,ji))}var aa=Object(y.a)({},le(ot));["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach(function(Gi){var ji=aa[Gi];aa[Gi]=function(oa,ta){return xi(),ji==null?void 0:ji(oa,ta)}});function $a(){return new Promise(function(Gi){Si.current=Gi})}v.useEffect(function(){!aa.motionName&&ea==="motion"&&xi()},[aa.motionName,ea]),v.useImperativeHandle(xt,function(){return{forceAlign:ha,getElement:function(){return Xr.current}}});var To=Object(y.a)(Object(y.a)({},lr),{},{zIndex:dt,opacity:ea==="motion"||ea==="stable"||!Rt?void 0:0,pointerEvents:ea==="stable"?void 0:"none"},$e),vo=!0;(Ut==null?void 0:Ut.points)&&(ea==="align"||ea==="stable")&&(vo=!1);var Aa=We;return v.Children.count(We)>1&&(Aa=v.createElement("div",{className:"".concat(ct,"-content")},We)),v.createElement(Se,Object(b.a)({visible:Rt,ref:Xr,leavedClassName:"".concat(ct,"-hidden")},aa,{onAppearPrepare:$a,onEnterPrepare:$a,removeOnLeave:Ot,forceRender:Tt}),function(Gi,ji){var oa=Gi.className,ta=Gi.style,Ao=g()(ct,Ue,Jr,oa);return v.createElement(Nt.a,{target:Ii(),key:"popup",ref:Yr,monitorWindowResize:!0,disabled:vo,align:Ut,onAlign:Ta},v.createElement("div",{ref:ji,className:Ao,onMouseEnter:_r,onMouseLeave:Vr,onMouseDownCapture:Mr,onTouchStartCapture:Wr,style:Object(y.a)(Object(y.a)({},ta),To)},Aa))})});Tr.displayName="PopupInner";var gr=Tr,rr=v.forwardRef(function(ot,xt){var Rt=ot.prefixCls,ct=ot.visible,Ue=ot.zIndex,$e=ot.children,We=ot.mobile;We=We===void 0?{}:We;var dt=We.popupClassName,mt=We.popupStyle,Ot=We.popupMotion,Tt=Ot===void 0?{}:Ot,Ut=We.popupRender,Zt=v.useRef();v.useImperativeHandle(xt,function(){return{forceAlign:function(){},getElement:function(){return Zt.current}}});var cn=Object(y.a)({zIndex:Ue},mt),dn=$e;return v.Children.count($e)>1&&(dn=v.createElement("div",{className:"".concat(Rt,"-content")},$e)),Ut&&(dn=Ut(dn)),v.createElement(Se,Object(b.a)({visible:ct,ref:Zt,removeOnLeave:!0},Tt),function(An,_r){var Vr=An.className,Mr=An.style,Wr=g()(Rt,dt,Vr);return v.createElement("div",{ref:_r,className:Wr,style:Object(y.a)(Object(y.a)({},Mr),cn)},dn)})});rr.displayName="MobilePopupInner";var xr=rr,qi=["visible","mobile"],Gr=v.forwardRef(function(ot,xt){var Rt=ot.visible,ct=ot.mobile,Ue=Object(O.a)(ot,qi),$e=Object(v.useState)(Rt),We=Object(_.a)($e,2),dt=We[0],mt=We[1],Ot=Object(v.useState)(!1),Tt=Object(_.a)(Ot,2),Ut=Tt[0],Zt=Tt[1],cn=Object(y.a)(Object(y.a)({},Ue),{},{visible:dt});Object(v.useEffect)(function(){mt(Rt),Rt&&ct&&Zt(Ye())},[Rt,ct]);var dn=Ut?v.createElement(xr,Object(b.a)({},cn,{mobile:ct,ref:xt})):v.createElement(gr,Object(b.a)({},cn,{ref:xt}));return v.createElement("div",null,v.createElement(nt,cn),dn)});Gr.displayName="Popup";var ai=Gr,da=v.createContext(null),Fi=da;function ia(){}function Ca(){return""}function po(ot){return ot?ot.ownerDocument:window.document}var so=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];function xo(ot){var xt=function(Rt){Object(S.a)(Ue,Rt);var ct=Object(A.a)(Ue);function Ue($e){var We;Object(D.a)(this,Ue),We=ct.call(this,$e),We.popupRef=v.createRef(),We.triggerRef=v.createRef(),We.attachId=void 0,We.clickOutsideHandler=void 0,We.touchOutsideHandler=void 0,We.contextMenuOutsideHandler1=void 0,We.contextMenuOutsideHandler2=void 0,We.mouseDownTimeout=void 0,We.focusTime=void 0,We.preClickTime=void 0,We.preTouchTime=void 0,We.delayTimer=void 0,We.hasPopupMouseDown=void 0,We.onMouseEnter=function(mt){var Ot=We.props.mouseEnterDelay;We.fireEvents("onMouseEnter",mt),We.delaySetPopupVisible(!0,Ot,Ot?null:mt)},We.onMouseMove=function(mt){We.fireEvents("onMouseMove",mt),We.setPoint(mt)},We.onMouseLeave=function(mt){We.fireEvents("onMouseLeave",mt),We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onPopupMouseEnter=function(){We.clearDelayTimer()},We.onPopupMouseLeave=function(mt){var Ot;if(mt.relatedTarget&&!mt.relatedTarget.setTimeout&&Object(Ve.a)((Ot=We.popupRef.current)===null||Ot===void 0?void 0:Ot.getElement(),mt.relatedTarget))return;We.delaySetPopupVisible(!1,We.props.mouseLeaveDelay)},We.onFocus=function(mt){We.fireEvents("onFocus",mt),We.clearDelayTimer(),We.isFocusToShow()&&(We.focusTime=Date.now(),We.delaySetPopupVisible(!0,We.props.focusDelay))},We.onMouseDown=function(mt){We.fireEvents("onMouseDown",mt),We.preClickTime=Date.now()},We.onTouchStart=function(mt){We.fireEvents("onTouchStart",mt),We.preTouchTime=Date.now()},We.onBlur=function(mt){We.fireEvents("onBlur",mt),We.clearDelayTimer(),We.isBlurToHide()&&We.delaySetPopupVisible(!1,We.props.blurDelay)},We.onContextMenu=function(mt){mt.preventDefault(),We.fireEvents("onContextMenu",mt),We.setPopupVisible(!0,mt)},We.onContextMenuClose=function(){We.isContextMenuToShow()&&We.close()},We.onClick=function(mt){if(We.fireEvents("onClick",mt),We.focusTime){var Ot;if(We.preClickTime&&We.preTouchTime?Ot=Math.min(We.preClickTime,We.preTouchTime):We.preClickTime?Ot=We.preClickTime:We.preTouchTime&&(Ot=We.preTouchTime),Math.abs(Ot-We.focusTime)<20)return;We.focusTime=0}We.preClickTime=0,We.preTouchTime=0,We.isClickToShow()&&(We.isClickToHide()||We.isBlurToHide())&&mt&&mt.preventDefault&&mt.preventDefault();var Tt=!We.state.popupVisible;(We.isClickToHide()&&!Tt||Tt&&We.isClickToShow())&&We.setPopupVisible(!We.state.popupVisible,mt)},We.onPopupMouseDown=function(){if(We.hasPopupMouseDown=!0,clearTimeout(We.mouseDownTimeout),We.mouseDownTimeout=window.setTimeout(function(){We.hasPopupMouseDown=!1},0),We.context){var mt;(mt=We.context).onPopupMouseDown.apply(mt,arguments)}},We.onDocumentClick=function(mt){if(We.props.mask&&!We.props.maskClosable)return;var Ot=mt.target,Tt=We.getRootDomNode(),Ut=We.getPopupDomNode();(!Object(Ve.a)(Tt,Ot)||We.isContextMenuOnly())&&!Object(Ve.a)(Ut,Ot)&&!We.hasPopupMouseDown&&We.close()},We.getRootDomNode=function(){var mt=We.props.getTriggerDOMNode;if(mt)return mt(We.triggerRef.current);try{var Ot=Object(tt.a)(We.triggerRef.current);if(Ot)return Ot}catch(Tt){}return Ie.a.findDOMNode(Object(w.a)(We))},We.getPopupClassNameFromAlign=function(mt){var Ot=[],Tt=We.props,Ut=Tt.popupPlacement,Zt=Tt.builtinPlacements,cn=Tt.prefixCls,dn=Tt.alignPoint,An=Tt.getPopupClassNameFromAlign;return Ut&&Zt&&Ot.push(et(Zt,cn,mt,dn)),An&&Ot.push(An(mt)),Ot.join(" ")},We.getComponent=function(){var mt=We.props,Ot=mt.prefixCls,Tt=mt.destroyPopupOnHide,Ut=mt.popupClassName,Zt=mt.onPopupAlign,cn=mt.popupMotion,dn=mt.popupAnimation,An=mt.popupTransitionName,_r=mt.popupStyle,Vr=mt.mask,Mr=mt.maskAnimation,Wr=mt.maskTransitionName,Yr=mt.maskMotion,Xr=mt.zIndex,zr=mt.popup,si=mt.stretch,Jr=mt.alignPoint,Zi=mt.mobile,Zr=mt.forceRender,dr=We.state,lr=dr.popupVisible,ni=dr.point,pi=We.getPopupAlign(),$n={};return We.isMouseEnterToShow()&&($n.onMouseEnter=We.onPopupMouseEnter),We.isMouseLeaveToHide()&&($n.onMouseLeave=We.onPopupMouseLeave),$n.onMouseDown=We.onPopupMouseDown,$n.onTouchStart=We.onPopupMouseDown,v.createElement(ai,Object(b.a)({prefixCls:Ot,destroyPopupOnHide:Tt,visible:lr,point:Jr&&ni,className:Ut,align:pi,onAlign:Zt,animation:dn,getClassNameFromAlign:We.getPopupClassNameFromAlign},$n,{stretch:si,getRootDomNode:We.getRootDomNode,style:_r,mask:Vr,zIndex:Xr,transitionName:An,maskAnimation:Mr,maskTransitionName:Wr,maskMotion:Yr,ref:We.popupRef,motion:cn,mobile:Zi,forceRender:Zr}),typeof zr=="function"?zr():zr)},We.attachParent=function(mt){_e.a.cancel(We.attachId);var Ot=We.props,Tt=Ot.getPopupContainer,Ut=Ot.getDocument,Zt=We.getRootDomNode(),cn;Tt?(Zt||Tt.length===0)&&(cn=Tt(Zt)):cn=Ut(We.getRootDomNode()).body,cn?cn.appendChild(mt):We.attachId=Object(_e.a)(function(){We.attachParent(mt)})},We.getContainer=function(){var mt=We.props.getDocument,Ot=mt(We.getRootDomNode()).createElement("div");return Ot.style.position="absolute",Ot.style.top="0",Ot.style.left="0",Ot.style.width="100%",We.attachParent(Ot),Ot},We.setPoint=function(mt){var Ot=We.props.alignPoint;if(!Ot||!mt)return;We.setState({point:{pageX:mt.pageX,pageY:mt.pageY}})},We.handlePortalUpdate=function(){We.state.prevPopupVisible!==We.state.popupVisible&&We.props.afterPopupVisibleChange(We.state.popupVisible)},We.triggerContextValue={onPopupMouseDown:We.onPopupMouseDown};var dt;return"popupVisible"in $e?dt=!!$e.popupVisible:dt=!!$e.defaultPopupVisible,We.state={prevPopupVisible:dt,popupVisible:dt},so.forEach(function(mt){We["fire".concat(mt)]=function(Ot){We.fireEvents(mt,Ot)}}),We}return Object(C.a)(Ue,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var We=this.props,dt=this.state;if(dt.popupVisible){var mt;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextMenuToShow())&&(mt=We.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(Le.a)(mt,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(mt=mt||We.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(Le.a)(mt,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(mt=mt||We.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(Le.a)(mt,"scroll",this.onContextMenuClose)),!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(Le.a)(window,"blur",this.onContextMenuClose));return}this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),_e.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var We;return((We=this.popupRef.current)===null||We===void 0?void 0:We.getElement())||null}},{key:"getPopupAlign",value:function(){var We=this.props,dt=We.popupPlacement,mt=We.popupAlign,Ot=We.builtinPlacements;return dt&&Ot?Xe(Ot,dt,mt):mt}},{key:"setPopupVisible",value:function(We,dt){var mt=this.props.alignPoint,Ot=this.state.popupVisible;this.clearDelayTimer(),Ot!==We&&("popupVisible"in this.props||this.setState({popupVisible:We,prevPopupVisible:Ot}),this.props.onPopupVisibleChange(We)),mt&&dt&&We&&this.setPoint(dt)}},{key:"delaySetPopupVisible",value:function(We,dt,mt){var Ot=this,Tt=dt*1e3;if(this.clearDelayTimer(),Tt){var Ut=mt?{pageX:mt.pageX,pageY:mt.pageY}:null;this.delayTimer=window.setTimeout(function(){Ot.setPopupVisible(We,Ut),Ot.clearDelayTimer()},Tt)}else this.setPopupVisible(We,mt)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(We){var dt=this.props.children.props,mt=this.props;return dt[We]&&mt[We]?this["fire".concat(We)]:dt[We]||mt[We]}},{key:"isClickToShow",value:function(){var We=this.props,dt=We.action,mt=We.showAction;return dt.indexOf("click")!==-1||mt.indexOf("click")!==-1}},{key:"isContextMenuOnly",value:function(){var We=this.props.action;return We==="contextMenu"||We.length===1&&We[0]==="contextMenu"}},{key:"isContextMenuToShow",value:function(){var We=this.props,dt=We.action,mt=We.showAction;return dt.indexOf("contextMenu")!==-1||mt.indexOf("contextMenu")!==-1}},{key:"isClickToHide",value:function(){var We=this.props,dt=We.action,mt=We.hideAction;return dt.indexOf("click")!==-1||mt.indexOf("click")!==-1}},{key:"isMouseEnterToShow",value:function(){var We=this.props,dt=We.action,mt=We.showAction;return dt.indexOf("hover")!==-1||mt.indexOf("mouseEnter")!==-1}},{key:"isMouseLeaveToHide",value:function(){var We=this.props,dt=We.action,mt=We.hideAction;return dt.indexOf("hover")!==-1||mt.indexOf("mouseLeave")!==-1}},{key:"isFocusToShow",value:function(){var We=this.props,dt=We.action,mt=We.showAction;return dt.indexOf("focus")!==-1||mt.indexOf("focus")!==-1}},{key:"isBlurToHide",value:function(){var We=this.props,dt=We.action,mt=We.hideAction;return dt.indexOf("focus")!==-1||mt.indexOf("blur")!==-1}},{key:"forcePopupAlign",value:function(){if(this.state.popupVisible){var We;(We=this.popupRef.current)===null||We===void 0||We.forceAlign()}}},{key:"fireEvents",value:function(We,dt){var mt=this.props.children.props[We];mt&&mt(dt);var Ot=this.props[We];Ot&&Ot(dt)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var We=this.state.popupVisible,dt=this.props,mt=dt.children,Ot=dt.forceRender,Tt=dt.alignPoint,Ut=dt.className,Zt=dt.autoDestroy,cn=v.Children.only(mt),dn={key:"trigger"};this.isContextMenuToShow()?dn.onContextMenu=this.onContextMenu:dn.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(dn.onClick=this.onClick,dn.onMouseDown=this.onMouseDown,dn.onTouchStart=this.onTouchStart):(dn.onClick=this.createTwoChains("onClick"),dn.onMouseDown=this.createTwoChains("onMouseDown"),dn.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(dn.onMouseEnter=this.onMouseEnter,Tt&&(dn.onMouseMove=this.onMouseMove)):dn.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?dn.onMouseLeave=this.onMouseLeave:dn.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(dn.onFocus=this.onFocus,dn.onBlur=this.onBlur):(dn.onFocus=this.createTwoChains("onFocus"),dn.onBlur=this.createTwoChains("onBlur"));var An=g()(cn&&cn.props&&cn.props.className,Ut);An&&(dn.className=An);var _r=Object(y.a)({},dn);Object(Ge.c)(cn)&&(_r.ref=Object(Ge.a)(this.triggerRef,cn.ref));var Vr=v.cloneElement(cn,_r),Mr;return(We||this.popupRef.current||Ot)&&(Mr=v.createElement(ot,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!We&&Zt&&(Mr=null),v.createElement(Fi.Provider,{value:this.triggerContextValue},Vr,Mr)}}],[{key:"getDerivedStateFromProps",value:function(We,dt){var mt=We.popupVisible,Ot={};return mt!==void 0&&dt.popupVisible!==mt&&(Ot.popupVisible=mt,Ot.prevPopupVisible=dt.popupVisible),Ot}}]),Ue}(v.Component);return xt.contextType=Fi,xt.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:Ca,getDocument:po,onPopupVisibleChange:ia,afterPopupVisibleChange:ia,onPopupAlign:ia,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},xt}var ka=xo(bt.a),Yi={adjustX:1,adjustY:1},Nr={topLeft:{points:["bl","tl"],overflow:Yi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Yi,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:Yi,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:Yi,offset:[4,0]}},Qr={topLeft:{points:["bl","tl"],overflow:Yi,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:Yi,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:Yi,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:Yi,offset:[4,0]}},yi=Nr,Fr=0,wr={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},ei=function(xt,Rt,ct){var Ue=ae(Rt),$e=xt.getState();xt.setState({defaultActiveFirst:Object(y.a)(Object(y.a)({},$e.defaultActiveFirst),{},Object(I.a)({},Ue,ct))})},vr=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ct){var Ue;Object(D.a)(this,Rt),Ue=xt.call(this,ct),Ue.onDestroy=function(Tt){Ue.props.onDestroy(Tt)},Ue.onKeyDown=function(Tt){var Ut=Tt.keyCode,Zt=Ue.menuInstance,cn=Ue.props.store,dn=Ue.getVisible();if(Ut===r.a.ENTER)return Ue.onTitleClick(Tt),ei(cn,Ue.props.eventKey,!0),!0;if(Ut===r.a.RIGHT)return dn?Zt.onKeyDown(Tt):(Ue.triggerOpenChange(!0),ei(cn,Ue.props.eventKey,!0)),!0;if(Ut===r.a.LEFT){var An;if(dn)An=Zt.onKeyDown(Tt);else return;return An||(Ue.triggerOpenChange(!1),An=!0),An}return dn&&(Ut===r.a.UP||Ut===r.a.DOWN)?Zt.onKeyDown(Tt):void 0},Ue.onOpenChange=function(Tt){Ue.props.onOpenChange(Tt)},Ue.onPopupVisibleChange=function(Tt){Ue.triggerOpenChange(Tt,Tt?"mouseenter":"mouseleave")},Ue.onMouseEnter=function(Tt){var Ut=Ue.props,Zt=Ut.eventKey,cn=Ut.onMouseEnter,dn=Ut.store;ei(dn,Ue.props.eventKey,!1),cn({key:Zt,domEvent:Tt})},Ue.onMouseLeave=function(Tt){var Ut=Ue.props,Zt=Ut.parentMenu,cn=Ut.eventKey,dn=Ut.onMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),dn({key:cn,domEvent:Tt})},Ue.onTitleMouseEnter=function(Tt){var Ut=Ue.props,Zt=Ut.eventKey,cn=Ut.onItemHover,dn=Ut.onTitleMouseEnter;cn({key:Zt,hover:!0}),dn({key:Zt,domEvent:Tt})},Ue.onTitleMouseLeave=function(Tt){var Ut=Ue.props,Zt=Ut.parentMenu,cn=Ut.eventKey,dn=Ut.onItemHover,An=Ut.onTitleMouseLeave;Zt.subMenuInstance=Object(w.a)(Ue),dn({key:cn,hover:!1}),An({key:cn,domEvent:Tt})},Ue.onTitleClick=function(Tt){var Ut=Object(w.a)(Ue),Zt=Ut.props;if(Zt.onTitleClick({key:Zt.eventKey,domEvent:Tt}),Zt.triggerSubMenuAction==="hover")return;Ue.triggerOpenChange(!Ue.getVisible(),"click"),ei(Zt.store,Ue.props.eventKey,!1)},Ue.onSubMenuClick=function(Tt){typeof Ue.props.onClick=="function"&&Ue.props.onClick(Ue.addKeyPath(Tt))},Ue.onSelect=function(Tt){Ue.props.onSelect(Tt)},Ue.onDeselect=function(Tt){Ue.props.onDeselect(Tt)},Ue.getPrefixCls=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu")},Ue.getActiveClassName=function(){return"".concat(Ue.getPrefixCls(),"-active")},Ue.getDisabledClassName=function(){return"".concat(Ue.getPrefixCls(),"-disabled")},Ue.getSelectedClassName=function(){return"".concat(Ue.getPrefixCls(),"-selected")},Ue.getOpenClassName=function(){return"".concat(Ue.props.rootPrefixCls,"-submenu-open")},Ue.getVisible=function(){return Ue.state.isOpen},Ue.getMode=function(){return Ue.state.mode},Ue.saveMenuInstance=function(Tt){Ue.menuInstance=Tt},Ue.addKeyPath=function(Tt){return Object(y.a)(Object(y.a)({},Tt),{},{keyPath:(Tt.keyPath||[]).concat(Ue.props.eventKey)})},Ue.triggerOpenChange=function(Tt,Ut){var Zt=Ue.props.eventKey,cn=function(){Ue.onOpenChange({key:Zt,item:Object(w.a)(Ue),trigger:Ut,open:Tt})};Ut==="mouseenter"?Ue.mouseenterTimeout=setTimeout(function(){cn()},0):cn()},Ue.isChildrenSelected=function(){var Tt={find:!1};return Y(Ue.props.children,Ue.props.selectedKeys,Tt),Tt.find},Ue.isInlineMode=function(){return Ue.getMode()==="inline"},Ue.adjustWidth=function(){if(!Ue.subMenuTitle||!Ue.menuInstance)return;var Tt=me.findDOMNode(Ue.menuInstance);if(Tt.offsetWidth>=Ue.subMenuTitle.offsetWidth)return;Tt.style.minWidth="".concat(Ue.subMenuTitle.offsetWidth,"px")},Ue.saveSubMenuTitle=function(Tt){Ue.subMenuTitle=Tt},Ue.getBaseProps=function(){var Tt=Object(w.a)(Ue),Ut=Tt.props,Zt=Ue.getMode();return{mode:Zt==="horizontal"?"vertical":Zt,visible:Ue.getVisible(),level:Ut.level+1,inlineIndent:Ut.inlineIndent,focusable:!1,onClick:Ue.onSubMenuClick,onSelect:Ue.onSelect,onDeselect:Ue.onDeselect,onDestroy:Ue.onDestroy,selectedKeys:Ut.selectedKeys,eventKey:"".concat(Ut.eventKey,"-menu-"),openKeys:Ut.openKeys,motion:Ut.motion,onOpenChange:Ue.onOpenChange,subMenuOpenDelay:Ut.subMenuOpenDelay,parentMenu:Object(w.a)(Ue),subMenuCloseDelay:Ut.subMenuCloseDelay,forceSubMenuRender:Ut.forceSubMenuRender,triggerSubMenuAction:Ut.triggerSubMenuAction,builtinPlacements:Ut.builtinPlacements,defaultActiveFirst:Ut.store.getState().defaultActiveFirst[ae(Ut.eventKey)],multiple:Ut.multiple,prefixCls:Ut.rootPrefixCls,id:Ue.internalMenuId,manualRef:Ue.saveMenuInstance,itemIcon:Ut.itemIcon,expandIcon:Ut.expandIcon,direction:Ut.direction}},Ue.getMotion=function(Tt,Ut){var Zt=Object(w.a)(Ue),cn=Zt.haveRendered,dn=Ue.props,An=dn.motion,_r=dn.rootPrefixCls,Vr=Object(y.a)(Object(y.a)({},An),{},{leavedClassName:"".concat(_r,"-hidden"),removeOnLeave:!1,motionAppear:cn||!Ut||Tt!=="inline"});return Vr};var $e=ct.store,We=ct.eventKey,dt=$e.getState(),mt=dt.defaultActiveFirst;Ue.isRootMenu=!1;var Ot=!1;return mt&&(Ot=mt[We]),ei($e,We,Ot),Ue.state={mode:ct.mode,isOpen:ct.isOpen},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var Ue=this,$e=this.props,We=$e.mode,dt=$e.parentMenu,mt=$e.manualRef,Ot=$e.isOpen,Tt=function(){Ue.setState({mode:We,isOpen:Ot})},Ut=Ot!==this.state.isOpen,Zt=We!==this.state.mode;if((Zt||Ut)&&(_e.a.cancel(this.updateStateRaf),Zt?this.updateStateRaf=Object(_e.a)(Tt):Tt()),mt&&mt(this),We!=="horizontal"||!(dt==null?void 0:dt.isRootMenu)||!Ot)return;this.minWidthTimeout=setTimeout(function(){return Ue.adjustWidth()},0)}},{key:"componentWillUnmount",value:function(){var Ue=this.props,$e=Ue.onDestroy,We=Ue.eventKey;$e&&$e(We),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout),_e.a.cancel(this.updateStateRaf)}},{key:"renderPopupMenu",value:function(Ue,$e){var We=this.getBaseProps();return v.createElement(So,Object(b.a)({},We,{id:this.internalMenuId,className:Ue,style:$e}),this.props.children)}},{key:"renderChildren",value:function(){var Ue=this,$e=this.getBaseProps(),We=$e.mode,dt=$e.visible,mt=$e.forceSubMenuRender,Ot=$e.direction,Tt=this.getMotion(We,dt);if(this.haveRendered=!0,this.haveOpened=this.haveOpened||dt||mt,!this.haveOpened)return v.createElement("div",null);var Ut=g()("".concat($e.prefixCls,"-sub"),Object(I.a)({},"".concat($e.prefixCls,"-rtl"),Ot==="rtl"));return this.isInlineMode()?v.createElement(Se,Object(b.a)({visible:$e.visible,forceRender:mt},Tt),function(Zt){var cn=Zt.className,dn=Zt.style,An=g()(Ut,cn);return Ue.renderPopupMenu(An,dn)}):this.renderPopupMenu(Ut)}},{key:"render",value:function(){var Ue,$e,We,dt=Object(y.a)({},this.props),mt=this.getVisible(),Ot=this.getPrefixCls(),Tt=this.isInlineMode(),Ut=this.getMode(),Zt=g()(Ot,"".concat(Ot,"-").concat(Ut),(Ue={},Object(I.a)(Ue,dt.className,!!dt.className),Object(I.a)(Ue,this.getOpenClassName(),mt),Object(I.a)(Ue,this.getActiveClassName(),dt.active||mt&&!Tt),Object(I.a)(Ue,this.getDisabledClassName(),dt.disabled),Object(I.a)(Ue,this.getSelectedClassName(),this.isChildrenSelected()),Ue));this.internalMenuId||(dt.eventKey?this.internalMenuId="".concat(dt.eventKey,"$Menu"):(Fr+=1,this.internalMenuId="$__$".concat(Fr,"$Menu")));var cn={},dn={},An={};dt.disabled||(cn={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},dn={onClick:this.onTitleClick},An={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var _r={},Vr=dt.direction,Mr=Vr==="rtl";Tt&&(Mr?_r.paddingRight=dt.inlineIndent*dt.level:_r.paddingLeft=dt.inlineIndent*dt.level);var Wr={};this.getVisible()&&(Wr={"aria-owns":this.internalMenuId});var Yr=null;Ut!=="horizontal"&&(Yr=this.props.expandIcon,typeof this.props.expandIcon=="function"&&(Yr=v.createElement(this.props.expandIcon,Object(y.a)({},this.props))));var Xr=v.createElement("div",Object(b.a)({ref:this.saveSubMenuTitle,style:_r,className:"".concat(Ot,"-title"),role:"button"},An,dn,{"aria-expanded":mt},Wr,{"aria-haspopup":"true",title:typeof dt.title=="string"?dt.title:void 0}),dt.title,Yr||v.createElement("i",{className:"".concat(Ot,"-arrow")})),zr=this.renderChildren(),si=(($e=dt.parentMenu)===null||$e===void 0?void 0:$e.isRootMenu)?dt.parentMenu.props.getPopupContainer:function(Ii){return Ii.parentNode},Jr=wr[Ut],Zi=dt.popupOffset?{offset:dt.popupOffset}:{},Zr=g()((We={},Object(I.a)(We,dt.popupClassName,dt.popupClassName&&!Tt),Object(I.a)(We,"".concat(Ot,"-rtl"),Mr),We)),dr=dt.disabled,lr=dt.triggerSubMenuAction,ni=dt.subMenuOpenDelay,pi=dt.forceSubMenuRender,$n=dt.subMenuCloseDelay,vi=dt.builtinPlacements;q.forEach(function(Ii){return delete dt[Ii]}),delete dt.onClick;var ea=Mr?Object(y.a)(Object(y.a)({},Qr),vi):Object(y.a)(Object(y.a)({},Nr),vi);delete dt.direction;var xi=this.getBaseProps(),Si=Tt?null:this.getMotion(xi.mode,xi.visible);return v.createElement("li",Object(b.a)({},dt,cn,{className:Zt,role:"menuitem"}),v.createElement(ka,{prefixCls:Ot,popupClassName:g()("".concat(Ot,"-popup"),Zr),getPopupContainer:si,builtinPlacements:ea,popupPlacement:Jr,popupVisible:Tt?!1:mt,popupAlign:Zi,popup:Tt?null:zr,action:dr||Tt?[]:[lr],mouseEnterDelay:ni,mouseLeaveDelay:$n,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:pi,popupMotion:Si},Xr),Tt?zr:null)}}]),Rt}(v.Component);vr.defaultProps={onMouseEnter:de,onMouseLeave:de,onTitleMouseEnter:de,onTitleMouseLeave:de,onTitleClick:de,manualRef:de,mode:"vertical",title:""};var oi=Object(R.b)(function(ot,xt){var Rt=ot.openKeys,ct=ot.activeKey,Ue=ot.selectedKeys,$e=xt.eventKey,We=xt.subMenuKey;return{isOpen:Rt.indexOf($e)>-1,active:ct[We]===$e,selectedKeys:Ue}})(vr);oi.isSubMenu=!0;var ir=oi,Wi="menuitem-overflowed",Mi=.5,$i=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ct;return Object(D.a)(this,Rt),ct=xt.apply(this,arguments),ct.resizeObserver=null,ct.mutationObserver=null,ct.originalTotalWidth=0,ct.overflowedItems=[],ct.menuItemSizes=[],ct.cancelFrameId=null,ct.state={lastVisibleIndex:void 0},ct.childRef=v.createRef(),ct.getMenuItemNodes=function(){var Ue=ct.props.prefixCls,$e=ct.childRef.current;return $e?[].slice.call($e.children).filter(function(We){return We.className.split(" ").indexOf("".concat(Ue,"-overflowed-submenu"))<0}):[]},ct.getOverflowedSubMenuItem=function(Ue,$e,We){var dt=ct.props,mt=dt.overflowedIndicator,Ot=dt.level,Tt=dt.mode,Ut=dt.prefixCls,Zt=dt.theme;if(Ot!==1||Tt!=="horizontal")return null;var cn=ct.props.children[0],dn=cn.props,An=dn.children,_r=dn.title,Vr=dn.style,Mr=Object(O.a)(dn,["children","title","style"]),Wr=Object(y.a)({},Vr),Yr="".concat(Ue,"-overflowed-indicator"),Xr="".concat(Ue,"-overflowed-indicator");$e.length===0&&We!==!0?Wr=Object(y.a)(Object(y.a)({},Wr),{},{display:"none"}):We&&(Wr=Object(y.a)(Object(y.a)({},Wr),{},{visibility:"hidden",position:"absolute"}),Yr="".concat(Yr,"-placeholder"),Xr="".concat(Xr,"-placeholder"));var zr=Zt?"".concat(Ut,"-").concat(Zt):"",si={};return q.forEach(function(Jr){Mr[Jr]!==void 0&&(si[Jr]=Mr[Jr])}),v.createElement(ir,Object(b.a)({title:mt,className:"".concat(Ut,"-overflowed-submenu"),popupClassName:zr},si,{key:Yr,eventKey:Xr,disabled:!1,style:Wr}),$e)},ct.setChildrenWidthAndResize=function(){if(ct.props.mode!=="horizontal")return;var Ue=ct.childRef.current;if(!Ue)return;var $e=Ue.children;if(!$e||$e.length===0)return;var We=Ue.children[$e.length-1];pe(We,"display","inline-block");var dt=ct.getMenuItemNodes(),mt=dt.filter(function(Ot){return Ot.className.split(" ").indexOf(Wi)>=0});mt.forEach(function(Ot){pe(Ot,"display","inline-block")}),ct.menuItemSizes=dt.map(function(Ot){return ve(Ot,!0)}),mt.forEach(function(Ot){pe(Ot,"display","none")}),ct.overflowedIndicatorWidth=ve(Ue.children[Ue.children.length-1],!0),ct.originalTotalWidth=ct.menuItemSizes.reduce(function(Ot,Tt){return Ot+Tt},0),ct.handleResize(),pe(We,"display","none")},ct.handleResize=function(){if(ct.props.mode!=="horizontal")return;var Ue=ct.childRef.current;if(!Ue)return;var $e=ve(Ue);ct.overflowedItems=[];var We=0,dt;ct.originalTotalWidth>$e+Mi&&(dt=-1,ct.menuItemSizes.forEach(function(mt){We+=mt,We+ct.overflowedIndicatorWidth<=$e&&(dt+=1)})),ct.setState({lastVisibleIndex:dt})},ct}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){var Ue=this;if(this.setChildrenWidthAndResize(),this.props.level===1&&this.props.mode==="horizontal"){var $e=this.childRef.current;if(!$e)return;this.resizeObserver=new Ne.default(function(We){We.forEach(function(){var dt=Ue.cancelFrameId;cancelAnimationFrame(dt),Ue.cancelFrameId=requestAnimationFrame(Ue.setChildrenWidthAndResize)})}),[].slice.call($e.children).concat($e).forEach(function(We){Ue.resizeObserver.observe(We)}),typeof MutationObserver!="undefined"&&(this.mutationObserver=new MutationObserver(function(){Ue.resizeObserver.disconnect(),[].slice.call($e.children).concat($e).forEach(function(We){Ue.resizeObserver.observe(We)}),Ue.setChildrenWidthAndResize()}),this.mutationObserver.observe($e,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect(),cancelAnimationFrame(this.cancelFrameId)}},{key:"renderChildren",value:function(Ue){var $e=this,We=this.state.lastVisibleIndex;return(Ue||[]).reduce(function(dt,mt,Ot){var Tt=mt;if($e.props.mode==="horizontal"){var Ut=$e.getOverflowedSubMenuItem(mt.props.eventKey,[]);We!==void 0&&$e.props.className.indexOf("".concat($e.props.prefixCls,"-root"))!==-1&&(Ot>We&&(Tt=v.cloneElement(mt,{style:{display:"none"},eventKey:"".concat(mt.props.eventKey,"-hidden"),className:"".concat(Wi)})),Ot===We+1&&($e.overflowedItems=Ue.slice(We+1).map(function(cn){return v.cloneElement(cn,{key:cn.props.eventKey,mode:"vertical-left"})}),Ut=$e.getOverflowedSubMenuItem(mt.props.eventKey,$e.overflowedItems)));var Zt=[].concat(Object(a.a)(dt),[Ut,Tt]);return Ot===Ue.length-1&&Zt.push($e.getOverflowedSubMenuItem(mt.props.eventKey,[],!0)),Zt}return[].concat(Object(a.a)(dt),[Tt])},[])}},{key:"render",value:function(){var Ue=this.props,$e=Ue.visible,We=Ue.prefixCls,dt=Ue.overflowedIndicator,mt=Ue.mode,Ot=Ue.level,Tt=Ue.tag,Ut=Ue.children,Zt=Ue.theme,cn=Object(O.a)(Ue,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"]),dn=Tt;return v.createElement(dn,Object(b.a)({ref:this.childRef},cn),this.renderChildren(Ut))}}]),Rt}(v.Component);$i.defaultProps={tag:"div",className:""};var mo=$i;function Qi(ot){return ot.length?ot.every(function(xt){return!!xt.props.disabled}):!0}function Ha(ot,xt,Rt){var ct=ot.getState();ot.setState({activeKey:Object(y.a)(Object(y.a)({},ct.activeKey),{},Object(I.a)({},xt,Rt))})}function La(ot){return ot.eventKey||"0-menu-"}function ti(ot,xt){var Rt=xt,ct=ot.children,Ue=ot.eventKey;if(Rt){var $e;if(Z(ct,function(We,dt){We&&We.props&&!We.props.disabled&&Rt===Fe(We,Ue,dt)&&($e=!0)}),$e)return Rt}return Rt=null,ot.defaultActiveFirst&&Z(ct,function(We,dt){!Rt&&We&&!We.props.disabled&&(Rt=Fe(We,Ue,dt))}),Rt}function Bo(ot){if(!ot)return;var xt=this.instanceArray.indexOf(ot);xt!==-1?this.instanceArray[xt]=ot:this.instanceArray.push(ot)}var Ka=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ct){var Ue;return Object(D.a)(this,Rt),Ue=xt.call(this,ct),Ue.onKeyDown=function($e,We){var dt=$e.keyCode,mt;if(Ue.getFlatInstanceArray().forEach(function(Tt){Tt&&Tt.props.active&&Tt.onKeyDown&&(mt=Tt.onKeyDown($e))}),mt)return 1;var Ot=null;return(dt===r.a.UP||dt===r.a.DOWN)&&(Ot=Ue.step(dt===r.a.UP?-1:1)),Ot?($e.preventDefault(),Ha(Ue.props.store,La(Ue.props),Ot.props.eventKey),typeof We=="function"&&We(Ot),1):void 0},Ue.onItemHover=function($e){var We=$e.key,dt=$e.hover;Ha(Ue.props.store,La(Ue.props),dt?We:null)},Ue.onDeselect=function($e){Ue.props.onDeselect($e)},Ue.onSelect=function($e){Ue.props.onSelect($e)},Ue.onClick=function($e){Ue.props.onClick($e)},Ue.onOpenChange=function($e){Ue.props.onOpenChange($e)},Ue.onDestroy=function($e){Ue.props.onDestroy($e)},Ue.getFlatInstanceArray=function(){return Ue.instanceArray},Ue.step=function($e){var We=Ue.getFlatInstanceArray(),dt=Ue.props.store.getState().activeKey[La(Ue.props)],mt=We.length;if(!mt)return null;$e<0&&(We=We.concat().reverse());var Ot=-1;if(We.every(function(cn,dn){return cn&&cn.props.eventKey===dt?(Ot=dn,!1):!0}),!Ue.props.defaultActiveFirst&&Ot!==-1&&Qi(We.slice(Ot,mt-1)))return;var Tt=(Ot+1)%mt,Ut=Tt;do{var Zt=We[Ut];if(!Zt||Zt.props.disabled)Ut=(Ut+1)%mt;else return Zt}while(Ut!==Tt);return null},Ue.renderCommonMenuItem=function($e,We,dt){var mt=Ue.props.store.getState(),Ot=Object(w.a)(Ue),Tt=Ot.props,Ut=Fe($e,Tt.eventKey,We),Zt=$e.props;if(!Zt||typeof $e.type=="string")return $e;var cn=Ut===mt.activeKey,dn=Object(y.a)(Object(y.a)({mode:Zt.mode||Tt.mode,level:Tt.level,inlineIndent:Tt.inlineIndent,renderMenuItem:Ue.renderMenuItem,rootPrefixCls:Tt.prefixCls,index:We,parentMenu:Tt.parentMenu,manualRef:Zt.disabled?void 0:Object(L.a)($e.ref,Bo.bind(Object(w.a)(Ue))),eventKey:Ut,active:!Zt.disabled&&cn,multiple:Tt.multiple,onClick:function(_r){(Zt.onClick||de)(_r),Ue.onClick(_r)},onItemHover:Ue.onItemHover,motion:Tt.motion,subMenuOpenDelay:Tt.subMenuOpenDelay,subMenuCloseDelay:Tt.subMenuCloseDelay,forceSubMenuRender:Tt.forceSubMenuRender,onOpenChange:Ue.onOpenChange,onDeselect:Ue.onDeselect,onSelect:Ue.onSelect,builtinPlacements:Tt.builtinPlacements,itemIcon:Zt.itemIcon||Ue.props.itemIcon,expandIcon:Zt.expandIcon||Ue.props.expandIcon},dt),{},{direction:Tt.direction});return(Tt.mode==="inline"||Te())&&(dn.triggerSubMenuAction="click"),v.cloneElement($e,Object(y.a)(Object(y.a)({},dn),{},{key:Ut||We}))},Ue.renderMenuItem=function($e,We,dt){if(!$e)return null;var mt=Ue.props.store.getState(),Ot={openKeys:mt.openKeys,selectedKeys:mt.selectedKeys,triggerSubMenuAction:Ue.props.triggerSubMenuAction,subMenuKey:dt};return Ue.renderCommonMenuItem($e,We,Ot)},ct.store.setState({activeKey:Object(y.a)(Object(y.a)({},ct.store.getState().activeKey),{},Object(I.a)({},ct.eventKey,ti(ct,ct.activeKey)))}),Ue.instanceArray=[],Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"shouldComponentUpdate",value:function(Ue){return this.props.visible||Ue.visible||this.props.className!==Ue.className||!G()(this.props.style,Ue.style)}},{key:"componentDidUpdate",value:function(Ue){var $e=this.props,We="activeKey"in $e?$e.activeKey:$e.store.getState().activeKey[La($e)],dt=ti($e,We);if(dt!==We)Ha($e.store,La($e),dt);else if("activeKey"in Ue){var mt=ti(Ue,Ue.activeKey);dt!==mt&&Ha($e.store,La($e),dt)}}},{key:"render",value:function(){var Ue=this,$e=Object(b.a)({},this.props);this.instanceArray=[];var We=g()($e.prefixCls,$e.className,"".concat($e.prefixCls,"-").concat($e.mode)),dt={className:We,role:$e.role||"menu"};$e.id&&(dt.id=$e.id),$e.focusable&&(dt.tabIndex=0,dt.onKeyDown=this.onKeyDown);var mt=$e.prefixCls,Ot=$e.eventKey,Tt=$e.visible,Ut=$e.level,Zt=$e.mode,cn=$e.overflowedIndicator,dn=$e.theme;return q.forEach(function(An){return delete $e[An]}),delete $e.onClick,v.createElement(mo,Object(b.a)({},$e,{prefixCls:mt,mode:Zt,tag:"ul",level:Ut,theme:dn,visible:Tt,overflowedIndicator:cn},dt),Object(p.a)($e.children).map(function(An,_r){return Ue.renderMenuItem(An,_r,Ot||"0-menu-")}))}}]),Rt}(v.Component);Ka.defaultProps={prefixCls:"rc-menu",className:"",mode:"vertical",level:1,inlineIndent:24,visible:!0,focusable:!0,style:{},manualRef:de};var go=Object(R.b)()(Ka),So=go,Wa=x("Kwbf");function Ho(ot,xt,Rt){var ct=ot.prefixCls,Ue=ot.motion,$e=ot.defaultMotions,We=$e===void 0?{}:$e,dt=ot.openAnimation,mt=ot.openTransitionName,Ot=xt.switchingModeFromInline;if(Ue)return Ue;if(Object(W.a)(dt)==="object"&&dt)Object(Wa.a)(!1,"Object type of `openAnimation` is removed. Please use `motion` instead.");else if(typeof dt=="string")return{motionName:"".concat(ct,"-open-").concat(dt)};if(mt)return{motionName:mt};var Tt=We[Rt];return Tt||(Ot?null:We.other)}var Qn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(ct){var Ue;Object(D.a)(this,Rt),Ue=xt.call(this,ct),Ue.onSelect=function(dt){var mt=Object(w.a)(Ue),Ot=mt.props;if(Ot.selectable){var Tt=Ue.store.getState(),Ut=Tt.selectedKeys,Zt=dt.key;Ot.multiple?Ut=Ut.concat([Zt]):Ut=[Zt],"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Ut}),Ot.onSelect(Object(y.a)(Object(y.a)({},dt),{},{selectedKeys:Ut}))}},Ue.onClick=function(dt){var mt=Ue.getRealMenuMode(),Ot=Object(w.a)(Ue),Tt=Ot.store,Ut=Ot.props.onOpenChange;mt!=="inline"&&!("openKeys"in Ue.props)&&(Tt.setState({openKeys:[]}),Ut([])),Ue.props.onClick(dt)},Ue.onKeyDown=function(dt,mt){Ue.innerMenu.getWrappedInstance().onKeyDown(dt,mt)},Ue.onOpenChange=function(dt){var mt=Object(w.a)(Ue),Ot=mt.props,Tt=Ue.store.getState().openKeys.concat(),Ut=!1,Zt=function(dn){var An=!1;if(dn.open)An=Tt.indexOf(dn.key)===-1,An&&Tt.push(dn.key);else{var _r=Tt.indexOf(dn.key);An=_r!==-1,An&&Tt.splice(_r,1)}Ut=Ut||An};Array.isArray(dt)?dt.forEach(Zt):Zt(dt),Ut&&("openKeys"in Ue.props||Ue.store.setState({openKeys:Tt}),Ot.onOpenChange(Tt))},Ue.onDeselect=function(dt){var mt=Object(w.a)(Ue),Ot=mt.props;if(Ot.selectable){var Tt=Ue.store.getState().selectedKeys.concat(),Ut=dt.key,Zt=Tt.indexOf(Ut);Zt!==-1&&Tt.splice(Zt,1),"selectedKeys"in Ot||Ue.store.setState({selectedKeys:Tt}),Ot.onDeselect(Object(y.a)(Object(y.a)({},dt),{},{selectedKeys:Tt}))}},Ue.onMouseEnter=function(dt){Ue.restoreModeVerticalFromInline();var mt=Ue.props.onMouseEnter;mt&&mt(dt)},Ue.onTransitionEnd=function(dt){var mt=dt.propertyName==="width"&&dt.target===dt.currentTarget,Ot=dt.target.className,Tt=Object.prototype.toString.call(Ot)==="[object SVGAnimatedString]"?Ot.animVal:Ot,Ut=dt.propertyName==="font-size"&&Tt.indexOf("anticon")>=0;(mt||Ut)&&Ue.restoreModeVerticalFromInline()},Ue.setInnerMenu=function(dt){Ue.innerMenu=dt},Ue.isRootMenu=!0;var $e=ct.defaultSelectedKeys,We=ct.defaultOpenKeys;return"selectedKeys"in ct&&($e=ct.selectedKeys||[]),"openKeys"in ct&&(We=ct.openKeys||[]),Ue.store=Object(R.c)({selectedKeys:$e,openKeys:We,activeKey:{"0-menu-":ti(ct,ct.activeKey)}}),Ue.state={switchingModeFromInline:!1,prevProps:ct,inlineOpenKeys:[],store:Ue.store},Ue}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.updateMiniStore(),this.updateMenuDisplay()}},{key:"componentDidUpdate",value:function(Ue){var $e=this.props,We=$e.siderCollapsed,dt=$e.inlineCollapsed,mt=$e.onOpenChange;(!Ue.inlineCollapsed&&dt||!Ue.siderCollapsed&&We)&&mt([]),this.updateMiniStore(),this.updateMenuDisplay()}},{key:"updateMenuDisplay",value:function(){var Ue=this.props.collapsedWidth,$e=this.store,We=this.prevOpenKeys,dt=this.getInlineCollapsed()&&(Ue===0||Ue==="0"||Ue==="0px");dt?(this.prevOpenKeys=$e.getState().openKeys.concat(),this.store.setState({openKeys:[]})):We&&(this.store.setState({openKeys:We}),this.prevOpenKeys=null)}},{key:"getRealMenuMode",value:function(){var Ue=this.props.mode,$e=this.state.switchingModeFromInline,We=this.getInlineCollapsed();return $e&&We?"inline":We?"vertical":Ue}},{key:"getInlineCollapsed",value:function(){var Ue=this.props,$e=Ue.inlineCollapsed,We=Ue.siderCollapsed;return We!==void 0?We:$e}},{key:"restoreModeVerticalFromInline",value:function(){var Ue=this.state.switchingModeFromInline;Ue&&this.setState({switchingModeFromInline:!1})}},{key:"updateMiniStore",value:function(){"selectedKeys"in this.props&&this.store.setState({selectedKeys:this.props.selectedKeys||[]}),"openKeys"in this.props&&this.store.setState({openKeys:this.props.openKeys||[]})}},{key:"render",value:function(){var Ue=Object(y.a)({},Object(k.a)(this.props,["collapsedWidth","siderCollapsed","defaultMotions"])),$e=this.getRealMenuMode();return Ue.className+=" ".concat(Ue.prefixCls,"-root"),Ue.direction==="rtl"&&(Ue.className+=" ".concat(Ue.prefixCls,"-rtl")),Ue=Object(y.a)(Object(y.a)({},Ue),{},{mode:$e,onClick:this.onClick,onOpenChange:this.onOpenChange,onDeselect:this.onDeselect,onSelect:this.onSelect,onMouseEnter:this.onMouseEnter,onTransitionEnd:this.onTransitionEnd,parentMenu:this,motion:Ho(this.props,this.state,$e)}),delete Ue.openAnimation,delete Ue.openTransitionName,v.createElement(R.a,{store:this.store},v.createElement(So,Object(b.a)({},Ue,{ref:this.setInnerMenu}),this.props.children))}}],[{key:"getDerivedStateFromProps",value:function(Ue,$e){var We=$e.prevProps,dt=$e.store,mt=dt.getState(),Ot={},Tt={prevProps:Ue};return We.mode==="inline"&&Ue.mode!=="inline"&&(Tt.switchingModeFromInline=!0),"openKeys"in Ue?Ot.openKeys=Ue.openKeys||[]:((Ue.inlineCollapsed&&!We.inlineCollapsed||Ue.siderCollapsed&&!We.siderCollapsed)&&(Tt.switchingModeFromInline=!0,Tt.inlineOpenKeys=mt.openKeys,Ot.openKeys=[]),(!Ue.inlineCollapsed&&We.inlineCollapsed||!Ue.siderCollapsed&&We.siderCollapsed)&&(Ot.openKeys=$e.inlineOpenKeys,Tt.inlineOpenKeys=[])),Object.keys(Ot).length&&dt.setState(Ot),Tt}}]),Rt}(v.Component);Qn.defaultProps={selectable:!0,onClick:de,onSelect:de,onOpenChange:de,onDeselect:de,defaultSelectedKeys:[],defaultOpenKeys:[],subMenuOpenDelay:.1,subMenuCloseDelay:.1,triggerSubMenuAction:"hover",prefixCls:"rc-menu",className:"",mode:"vertical",style:{},builtinPlacements:{},overflowedIndicator:v.createElement("span",null,"\xB7\xB7\xB7")};var mr=Qn,Jn=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ct;return Object(D.a)(this,Rt),ct=xt.apply(this,arguments),ct.onKeyDown=function(Ue){var $e=Ue.keyCode;return $e===r.a.ENTER?(ct.onClick(Ue),!0):void 0},ct.onMouseLeave=function(Ue){var $e=ct.props,We=$e.eventKey,dt=$e.onItemHover,mt=$e.onMouseLeave;dt({key:We,hover:!1}),mt({key:We,domEvent:Ue})},ct.onMouseEnter=function(Ue){var $e=ct.props,We=$e.eventKey,dt=$e.onItemHover,mt=$e.onMouseEnter;dt({key:We,hover:!0}),mt({key:We,domEvent:Ue})},ct.onClick=function(Ue){var $e=ct.props,We=$e.eventKey,dt=$e.multiple,mt=$e.onClick,Ot=$e.onSelect,Tt=$e.onDeselect,Ut=$e.isSelected,Zt={key:We,keyPath:[We],item:Object(w.a)(ct),domEvent:Ue};mt(Zt),dt?Ut?Tt(Zt):Ot(Zt):Ut||Ot(Zt)},ct.saveNode=function(Ue){ct.node=Ue},ct}return Object(C.a)(Rt,[{key:"componentDidMount",value:function(){this.callRef()}},{key:"componentDidUpdate",value:function(){this.callRef()}},{key:"componentWillUnmount",value:function(){var Ue=this.props;Ue.onDestroy&&Ue.onDestroy(Ue.eventKey)}},{key:"getPrefixCls",value:function(){return"".concat(this.props.rootPrefixCls,"-item")}},{key:"getActiveClassName",value:function(){return"".concat(this.getPrefixCls(),"-active")}},{key:"getSelectedClassName",value:function(){return"".concat(this.getPrefixCls(),"-selected")}},{key:"getDisabledClassName",value:function(){return"".concat(this.getPrefixCls(),"-disabled")}},{key:"callRef",value:function(){this.props.manualRef&&this.props.manualRef(this)}},{key:"render",value:function(){var Ue,$e=Object(y.a)({},this.props),We=g()(this.getPrefixCls(),$e.className,(Ue={},Object(I.a)(Ue,this.getActiveClassName(),!$e.disabled&&$e.active),Object(I.a)(Ue,this.getSelectedClassName(),$e.isSelected),Object(I.a)(Ue,this.getDisabledClassName(),$e.disabled),Ue)),dt=Object(y.a)(Object(y.a)({},$e.attribute),{},{title:typeof $e.title=="string"?$e.title:void 0,className:We,role:$e.role||"menuitem","aria-disabled":$e.disabled});$e.role==="option"?dt=Object(y.a)(Object(y.a)({},dt),{},{role:"option","aria-selected":$e.isSelected}):($e.role===null||$e.role==="none")&&(dt.role="none");var mt={onClick:$e.disabled?null:this.onClick,onMouseLeave:$e.disabled?null:this.onMouseLeave,onMouseEnter:$e.disabled?null:this.onMouseEnter},Ot=Object(y.a)({},$e.style);$e.mode==="inline"&&($e.direction==="rtl"?Ot.paddingRight=$e.inlineIndent*$e.level:Ot.paddingLeft=$e.inlineIndent*$e.level),q.forEach(function(Ut){return delete $e[Ut]}),delete $e.direction;var Tt=this.props.itemIcon;return typeof this.props.itemIcon=="function"&&(Tt=v.createElement(this.props.itemIcon,this.props)),v.createElement("li",Object(b.a)({},Object(k.a)($e,["onClick","onMouseEnter","onMouseLeave","onSelect"]),dt,mt,{style:Ot,ref:this.saveNode}),$e.children,Tt)}}]),Rt}(v.Component);Jn.isMenuItem=!0,Jn.defaultProps={onSelect:de,onMouseEnter:de,onMouseLeave:de,manualRef:de};var Lr=Object(R.b)(function(ot,xt){var Rt=ot.activeKey,ct=ot.selectedKeys,Ue=xt.eventKey,$e=xt.subMenuKey;return{active:Rt[$e]===Ue,isSelected:Array.isArray(ct)?ct.indexOf(Ue)!==-1:ct===Ue}})(Jn),Kr=Lr,gi=function(ot){Object(S.a)(Rt,ot);var xt=Object(A.a)(Rt);function Rt(){var ct;return Object(D.a)(this,Rt),ct=xt.apply(this,arguments),ct.renderInnerMenuItem=function(Ue){var $e=ct.props,We=$e.renderMenuItem,dt=$e.index;return We(Ue,dt,ct.props.subMenuKey)},ct}return Object(C.a)(Rt,[{key:"render",value:function(){var Ue=Object(b.a)({},this.props),$e=Ue.className,We=$e===void 0?"":$e,dt=Ue.rootPrefixCls,mt="".concat(dt,"-item-group-title"),Ot="".concat(dt,"-item-group-list"),Tt=Ue.title,Ut=Ue.children;return q.forEach(function(Zt){return delete Ue[Zt]}),delete Ue.direction,v.createElement("li",Object(b.a)({},Ue,{onClick:function(cn){return cn.stopPropagation()},className:"".concat(We," ").concat(dt,"-item-group")}),v.createElement("div",{className:mt,title:typeof Tt=="string"?Tt:void 0},Tt),v.createElement("ul",{className:Ot},v.Children.map(Ut,this.renderInnerMenuItem)))}}]),Rt}(v.Component);gi.isMenuItemGroup=!0,gi.defaultProps={disabled:!0};var cr=gi,Xi=function(xt){var Rt=xt.className,ct=xt.rootPrefixCls,Ue=xt.style;return v.createElement("li",{className:"".concat(Rt," ").concat(ct,"-item-divider"),style:Ue})};Xi.defaultProps={disabled:!0,className:"",style:{}};var ga=Xi,jr=mr,qa=x("eDIo");function di(ot,xt){var Rt=ot.prefixCls,ct=ot.editable,Ue=ot.locale,$e=ot.style;return!ct||ct.showAdd===!1?null:v.createElement("button",{ref:xt,type:"button",className:"".concat(Rt,"-nav-add"),style:$e,"aria-label":(Ue==null?void 0:Ue.addAriaLabel)||"Add tab",onClick:function(dt){ct.onEdit("add",{event:dt})}},ct.addIcon||"+")}var Ai=v.forwardRef(di);function va(ot,xt){var Rt=ot.prefixCls,ct=ot.id,Ue=ot.tabs,$e=ot.locale,We=ot.mobile,dt=ot.moreIcon,mt=dt===void 0?"More":dt,Ot=ot.moreTransitionName,Tt=ot.style,Ut=ot.className,Zt=ot.editable,cn=ot.tabBarGutter,dn=ot.rtl,An=ot.onTabClick,_r=Object(v.useState)(!1),Vr=Object(_.a)(_r,2),Mr=Vr[0],Wr=Vr[1],Yr=Object(v.useState)(null),Xr=Object(_.a)(Yr,2),zr=Xr[0],si=Xr[1],Jr="".concat(ct,"-more-popup"),Zi="".concat(Rt,"-dropdown"),Zr=zr!==null?"".concat(Jr,"-").concat(zr):null,dr=$e==null?void 0:$e.dropdownAriaLabel,lr=v.createElement(jr,{onClick:function(Si){var Ii=Si.key,ha=Si.domEvent;An(Ii,ha),Wr(!1)},id:Jr,tabIndex:-1,role:"listbox","aria-activedescendant":Zr,selectedKeys:[zr],"aria-label":dr!==void 0?dr:"expanded dropdown"},Ue.map(function(xi){return v.createElement(Kr,{key:xi.key,id:"".concat(Jr,"-").concat(xi.key),role:"option","aria-controls":ct&&"".concat(ct,"-panel-").concat(xi.key),disabled:xi.disabled},xi.tab)}));function ni(xi){for(var Si=Ue.filter(function($a){return!$a.disabled}),Ii=Si.findIndex(function($a){return $a.key===zr})||0,ha=Si.length,Ta=0;Ta<ha;Ta+=1){Ii=(Ii+xi+ha)%ha;var aa=Si[Ii];if(!aa.disabled){si(aa.key);return}}}function pi(xi){var Si=xi.which;if(!Mr){[r.a.DOWN,r.a.SPACE,r.a.ENTER].includes(Si)&&(Wr(!0),xi.preventDefault());return}switch(Si){case r.a.UP:ni(-1),xi.preventDefault();break;case r.a.DOWN:ni(1),xi.preventDefault();break;case r.a.ESC:Wr(!1);break;case r.a.SPACE:case r.a.ENTER:zr!==null&&An(zr,xi);break}}Object(v.useEffect)(function(){var xi=document.getElementById(Zr);xi&&xi.scrollIntoView&&xi.scrollIntoView(!1)},[zr]),Object(v.useEffect)(function(){Mr||si(null)},[Mr]);var $n=Object(I.a)({},dn?"marginLeft":"marginRight",cn);Ue.length||($n.visibility="hidden",$n.order=1);var vi=g()(Object(I.a)({},"".concat(Zi,"-rtl"),dn)),ea=We?null:v.createElement(qa.a,{prefixCls:Zi,overlay:lr,trigger:["hover"],visible:Mr,transitionName:Ot,onVisibleChange:Wr,overlayClassName:vi,mouseEnterDelay:.1,mouseLeaveDelay:.1},v.createElement("button",{type:"button",className:"".concat(Rt,"-nav-more"),style:$n,tabIndex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":Jr,id:"".concat(ct,"-more"),"aria-expanded":Mr,onKeyDown:pi},mt));return v.createElement("div",{className:g()("".concat(Rt,"-nav-operations"),Ut),style:Tt,ref:xt},ea,v.createElement(Ai,{prefixCls:Rt,locale:$e,editable:Zt}))}var Ma=v.forwardRef(va),Ko=Object(v.createContext)(null),hi=.1,Tn=.01,tn=20,In=Math.pow(.995,tn);function vn(){var ot=navigator.userAgent||navigator.vendor||window.opera;return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ot)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ot.substr(0,4)))}function er(ot,xt){var Rt=Object(v.useState)(),ct=Object(_.a)(Rt,2),Ue=ct[0],$e=ct[1],We=Object(v.useState)(0),dt=Object(_.a)(We,2),mt=dt[0],Ot=dt[1],Tt=Object(v.useState)(0),Ut=Object(_.a)(Tt,2),Zt=Ut[0],cn=Ut[1],dn=Object(v.useState)(),An=Object(_.a)(dn,2),_r=An[0],Vr=An[1],Mr=Object(v.useRef)();function Wr(dr){var lr=dr.touches[0],ni=lr.screenX,pi=lr.screenY;$e({x:ni,y:pi}),window.clearInterval(Mr.current)}function Yr(dr){if(!Ue)return;dr.preventDefault();var lr=dr.touches[0],ni=lr.screenX,pi=lr.screenY;$e({x:ni,y:pi});var $n=ni-Ue.x,vi=pi-Ue.y;xt($n,vi);var ea=Date.now();Ot(ea),cn(ea-mt),Vr({x:$n,y:vi})}function Xr(){if(!Ue)return;if($e(null),Vr(null),_r){var dr=_r.x/Zt,lr=_r.y/Zt,ni=Math.abs(dr),pi=Math.abs(lr);if(Math.max(ni,pi)<hi)return;var $n=dr,vi=lr;Mr.current=window.setInterval(function(){if(Math.abs($n)<Tn&&Math.abs(vi)<Tn){window.clearInterval(Mr.current);return}$n*=In,vi*=In,xt($n*tn,vi*tn)},tn)}}var zr=Object(v.useRef)(0),si=Object(v.useRef)(!1),Jr=Object(v.useRef)();function Zi(dr){var lr=dr.deltaX,ni=dr.deltaY,pi=0,$n=Math.abs(lr),vi=Math.abs(ni);$n===vi?pi=Jr.current==="x"?lr:ni:$n>vi?(pi=lr,Jr.current="x"):(pi=ni,Jr.current="y");var ea=Date.now();ea-zr.current>100&&(si.current=!1),(xt(-pi,-pi)||si.current)&&(dr.preventDefault(),si.current=!0),zr.current=ea}var Zr=Object(v.useRef)(null);Zr.current={onTouchStart:Wr,onTouchMove:Yr,onTouchEnd:Xr,onWheel:Zi},v.useEffect(function(){function dr($n){Zr.current.onTouchStart($n)}function lr($n){Zr.current.onTouchMove($n)}function ni($n){Zr.current.onTouchEnd($n)}function pi($n){Zr.current.onWheel($n)}return document.addEventListener("touchmove",lr,{passive:!1}),document.addEventListener("touchend",ni,{passive:!1}),ot.current.addEventListener("touchstart",dr,{passive:!1}),ot.current.addEventListener("wheel",pi),function(){document.removeEventListener("touchmove",lr),document.removeEventListener("touchend",ni)}},[])}function Ar(){var ot=Object(v.useRef)(new Map);function xt(ct){return ot.current.has(ct)||ot.current.set(ct,v.createRef()),ot.current.get(ct)}function Rt(ct){ot.current.delete(ct)}return[xt,Rt]}function fi(ot,xt){var Rt=v.useRef(ot),ct=v.useState({}),Ue=Object(_.a)(ct,2),$e=Ue[1];function We(dt){var mt=typeof dt=="function"?dt(Rt.current):dt;mt!==Rt.current&&xt(mt,Rt.current),Rt.current=mt,$e({})}return[Rt.current,We]}var bi=function(xt){var Rt=xt.position,ct=xt.prefixCls,Ue=xt.extra;if(!Ue)return null;var $e,We=Ue;return Rt==="right"&&($e=We.right||!We.left&&We||null),Rt==="left"&&($e=We.left||null),$e?v.createElement("div",{className:"".concat(ct,"-extra-content")},$e):null};function Ji(ot,xt){var Rt,ct=v.useContext(Ko),Ue=ct.prefixCls,$e=ct.tabs,We=ot.className,dt=ot.style,mt=ot.id,Ot=ot.animated,Tt=ot.activeKey,Ut=ot.rtl,Zt=ot.extra,cn=ot.editable,dn=ot.locale,An=ot.tabPosition,_r=ot.tabBarGutter,Vr=ot.children,Mr=ot.onTabClick,Wr=ot.onTabScroll,Yr=Object(v.useRef)(),Xr=Object(v.useRef)(),zr=Object(v.useRef)(),si=Object(v.useRef)(),Jr=Ar(),Zi=Object(_.a)(Jr,2),Zr=Zi[0],dr=Zi[1],lr=An==="top"||An==="bottom",ni=fi(0,function(xe,Ze){lr&&Wr&&Wr({direction:xe>Ze?"left":"right"})}),pi=Object(_.a)(ni,2),$n=pi[0],vi=pi[1],ea=fi(0,function(xe,Ze){!lr&&Wr&&Wr({direction:xe>Ze?"top":"bottom"})}),xi=Object(_.a)(ea,2),Si=xi[0],Ii=xi[1],ha=Object(v.useState)(0),Ta=Object(_.a)(ha,2),aa=Ta[0],$a=Ta[1],To=Object(v.useState)(0),vo=Object(_.a)(To,2),Aa=vo[0],Gi=vo[1],ji=Object(v.useState)(0),oa=Object(_.a)(ji,2),ta=oa[0],Ao=oa[1],Vo=Object(v.useState)(0),Yo=Object(_.a)(Vo,2),ki=Yo[0],Xo=Yo[1],Qo=Object(v.useState)(null),Ni=Object(_.a)(Qo,2),Oi=Ni[0],Oa=Ni[1],ks=Object(v.useState)(null),nl=Object(_.a)(ks,2),Jo=nl[0],is=nl[1],Ls=Object(v.useState)(0),bl=Object(_.a)(Ls,2),Ms=bl[0],El=bl[1],Nl=Object(v.useState)(0),xl=Object(_.a)(Nl,2),rl=xl[0],il=xl[1],vs=e(new Map),as=Object(_.a)(vs,2),Ul=as[0],Cs=as[1],Ts=m($e,Ul,aa),os="".concat(Ue,"-nav-operations-hidden"),_s=0,Oo=0;lr?Ut?(_s=0,Oo=Math.max(0,aa-Oi)):(_s=Math.min(0,Oi-aa),Oo=0):(_s=Math.min(0,Jo-Aa),Oo=0);function ss(xe){return xe<_s?[_s,!1]:xe>Oo?[Oo,!1]:[xe,!0]}var Zo=Object(v.useRef)(),ls=Object(v.useState)(),ys=Object(_.a)(ls,2),Ps=ys[0],wl=ys[1];function Ns(){wl(Date.now())}function al(){window.clearTimeout(Zo.current)}er(Yr,function(xe,Ze){var rt=!1;function At(Pt,vt){Pt(function(it){var It=ss(it+vt),Ct=Object(_.a)(It,2),_t=Ct[0],St=Ct[1];return rt=St,_t})}if(lr){if(Oi>=aa)return rt;At(vi,xe)}else{if(Jo>=Aa)return rt;At(Ii,Ze)}return al(),Ns(),rt}),Object(v.useEffect)(function(){return al(),Ps&&(Zo.current=window.setTimeout(function(){wl(0)},100)),al},[Ps]);function qo(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Tt,Ze=Ts.get(xe);if(!Ze)return;if(lr){var rt=$n;Ut?Ze.right<$n?rt=Ze.right:Ze.right+Ze.width>$n+Oi&&(rt=Ze.right+Ze.width-Oi):Ze.left<-$n?rt=-Ze.left:Ze.left+Ze.width>-$n+Oi&&(rt=-(Ze.left+Ze.width-Oi)),Ii(0),vi(ss(rt)[0])}else{var At=Si;Ze.top<-Si?At=-Ze.top:Ze.top+Ze.height>-Si+Jo&&(At=-(Ze.top+Ze.height-Jo)),vi(0),Ii(ss(At)[0])}}var us=E(Ts,{width:Oi,height:Jo,left:$n,top:Si},{width:ta,height:ki},{width:Ms,height:rl},Object(y.a)(Object(y.a)({},ot),{},{tabs:$e})),Sl=Object(_.a)(us,2),Fl=Sl[0],ol=Sl[1],sl=$e.map(function(xe){var Ze=xe.key;return v.createElement(u,{id:mt,prefixCls:Ue,key:Ze,rtl:Ut,tab:xe,closable:xe.closable,editable:cn,active:Ze===Tt,tabPosition:An,tabBarGutter:_r,renderWrapper:Vr,removeAriaLabel:dn==null?void 0:dn.removeAriaLabel,ref:Zr(Ze),onClick:function(At){Mr(Ze,At)},onRemove:function(){dr(Ze)},onFocus:function(){qo(Ze),Ns(),Ut||(Yr.current.scrollLeft=0),Yr.current.scrollTop=0}})}),ll=i(function(){var xe,Ze,rt,At,Pt,vt,it,It,Ct,_t=((xe=Yr.current)===null||xe===void 0?void 0:xe.offsetWidth)||0,St=((Ze=Yr.current)===null||Ze===void 0?void 0:Ze.offsetHeight)||0,Vt=((rt=si.current)===null||rt===void 0?void 0:rt.offsetWidth)||0,jt=((At=si.current)===null||At===void 0?void 0:At.offsetHeight)||0,kt=((Pt=zr.current)===null||Pt===void 0?void 0:Pt.offsetWidth)||0,zt=((vt=zr.current)===null||vt===void 0?void 0:vt.offsetHeight)||0;Oa(_t),is(St),El(Vt),il(jt);var qt=(((it=Xr.current)===null||it===void 0?void 0:it.offsetWidth)||0)-Vt,sn=(((It=Xr.current)===null||It===void 0?void 0:It.offsetHeight)||0)-jt;$a(qt),Gi(sn);var pn=(Ct=zr.current)===null||Ct===void 0?void 0:Ct.className.includes(os);Ao(qt-(pn?0:kt)),Xo(sn-(pn?0:zt)),Cs(function(){var Sn=new Map;return $e.forEach(function(Wn){var _n=Wn.key,gn=Zr(_n).current;gn&&Sn.set(_n,{width:gn.offsetWidth,height:gn.offsetHeight,left:gn.offsetLeft,top:gn.offsetTop})}),Sn})}),jl=$e.slice(0,Fl),lo=$e.slice(ol+1),sa=[].concat(Object(a.a)(jl),Object(a.a)(lo)),Xa=Object(v.useState)(),_a=Object(_.a)(Xa,2),As=_a[0],Bl=_a[1],Ro=Ts.get(Tt),Hl=Object(v.useRef)();function Cl(){s.a.cancel(Hl.current)}Object(v.useEffect)(function(){var xe={};return Ro&&(lr?(Ut?xe.right=Ro.right:xe.left=Ro.left,xe.width=Ro.width):(xe.top=Ro.top,xe.height=Ro.height)),Cl(),Hl.current=s()(function(){Bl(xe)}),Cl},[Ro,lr,Ut]),Object(v.useEffect)(function(){qo()},[Tt,Ro,Ts,lr]),Object(v.useEffect)(function(){ll()},[Ut,_r,Tt,$e.map(function(xe){return xe.key}).join("_")]);var Kl=!!sa.length,cs="".concat(Ue,"-nav-wrap"),Us,Fs,Tl,js;return lr?Ut?(Fs=$n>0,Us=$n+Oi<aa):(Us=$n<0,Fs=-$n+Oi<aa):(Tl=Si<0,js=-Si+Jo<Aa),v.createElement("div",{ref:xt,role:"tablist",className:g()("".concat(Ue,"-nav"),We),style:dt,onKeyDown:function(){Ns()}},v.createElement(bi,{position:"left",extra:Zt,prefixCls:Ue}),v.createElement(t.a,{onResize:ll},v.createElement("div",{className:g()(cs,(Rt={},Object(I.a)(Rt,"".concat(cs,"-ping-left"),Us),Object(I.a)(Rt,"".concat(cs,"-ping-right"),Fs),Object(I.a)(Rt,"".concat(cs,"-ping-top"),Tl),Object(I.a)(Rt,"".concat(cs,"-ping-bottom"),js),Rt)),ref:Yr},v.createElement(t.a,{onResize:ll},v.createElement("div",{ref:Xr,className:"".concat(Ue,"-nav-list"),style:{transform:"translate(".concat($n,"px, ").concat(Si,"px)"),transition:Ps?"none":void 0}},sl,v.createElement(Ai,{ref:si,prefixCls:Ue,locale:dn,editable:cn,style:{visibility:Kl?"hidden":null}}),v.createElement("div",{className:g()("".concat(Ue,"-ink-bar"),Object(I.a)({},"".concat(Ue,"-ink-bar-animated"),Ot.inkBar)),style:As}))))),v.createElement(Ma,Object.assign({},ot,{ref:zr,prefixCls:Ue,tabs:sa,className:!Kl&&os})),v.createElement(bi,{position:"right",extra:Zt,prefixCls:Ue}))}var Pi=v.forwardRef(Ji);function zi(ot){var xt=ot.id,Rt=ot.activeKey,ct=ot.animated,Ue=ot.tabPosition,$e=ot.rtl,We=ot.destroyInactiveTabPane,dt=v.useContext(Ko),mt=dt.prefixCls,Ot=dt.tabs,Tt=ct.tabPane,Ut=Ot.findIndex(function(Zt){return Zt.key===Rt});return v.createElement("div",{className:g()("".concat(mt,"-content-holder"))},v.createElement("div",{className:g()("".concat(mt,"-content"),"".concat(mt,"-content-").concat(Ue),Object(I.a)({},"".concat(mt,"-content-animated"),Tt)),style:Ut&&Tt?Object(I.a)({},$e?"marginRight":"marginLeft","-".concat(Ut,"00%")):null},Ot.map(function(Zt){return v.cloneElement(Zt.node,{key:Zt.key,prefixCls:mt,tabKey:Zt.key,id:xt,animated:Tt,active:Zt.key===Rt,destroyInactiveTabPane:We})})))}function Co(ot){var xt=ot.prefixCls,Rt=ot.forceRender,ct=ot.className,Ue=ot.style,$e=ot.id,We=ot.active,dt=ot.animated,mt=ot.destroyInactiveTabPane,Ot=ot.tabKey,Tt=ot.children,Ut=v.useState(Rt),Zt=Object(_.a)(Ut,2),cn=Zt[0],dn=Zt[1];v.useEffect(function(){We?dn(!0):mt&&dn(!1)},[We,mt]);var An={};return We||(dt?(An.visibility="hidden",An.height=0,An.overflowY="hidden"):An.display="none"),v.createElement("div",{id:$e&&"".concat($e,"-panel-").concat(Ot),role:"tabpanel",tabIndex:We?0:-1,"aria-labelledby":$e&&"".concat($e,"-tab-").concat(Ot),"aria-hidden":!We,style:Object(y.a)(Object(y.a)({},An),Ue),className:g()("".concat(xt,"-tabpane"),We&&"".concat(xt,"-tabpane-active"),ct)},(We||cn||Rt)&&Tt)}var Ea=0;function Is(ot){return Object(p.a)(ot).map(function(xt){if(v.isValidElement(xt)){var Rt=xt.key!==void 0?String(xt.key):void 0;return Object(y.a)(Object(y.a)({key:Rt},xt.props),{},{node:xt})}return null}).filter(function(xt){return xt})}function el(ot,xt){var Rt,ct=ot.id,Ue=ot.prefixCls,$e=Ue===void 0?"rc-tabs":Ue,We=ot.className,dt=ot.children,mt=ot.direction,Ot=ot.activeKey,Tt=ot.defaultActiveKey,Ut=ot.editable,Zt=ot.animated,cn=ot.tabPosition,dn=cn===void 0?"top":cn,An=ot.tabBarGutter,_r=ot.tabBarStyle,Vr=ot.tabBarExtraContent,Mr=ot.locale,Wr=ot.moreIcon,Yr=ot.moreTransitionName,Xr=ot.destroyInactiveTabPane,zr=ot.renderTabBar,si=ot.onChange,Jr=ot.onTabClick,Zi=ot.onTabScroll,Zr=Object(O.a)(ot,["id","prefixCls","className","children","direction","activeKey","defaultActiveKey","editable","animated","tabPosition","tabBarGutter","tabBarStyle","tabBarExtraContent","locale","moreIcon","moreTransitionName","destroyInactiveTabPane","renderTabBar","onChange","onTabClick","onTabScroll"]),dr=Is(dt),lr=mt==="rtl",ni;Zt===!1?ni={inkBar:!1,tabPane:!1}:ni=Object(y.a)({inkBar:!0,tabPane:!1},Zt!==!0?Zt:null);var pi=Object(v.useState)(!1),$n=Object(_.a)(pi,2),vi=$n[0],ea=$n[1];Object(v.useEffect)(function(){ea(vn())},[]);var xi=Object(d.a)(function(){var ki;return(ki=dr[0])===null||ki===void 0?void 0:ki.key},{value:Ot,defaultValue:Tt}),Si=Object(_.a)(xi,2),Ii=Si[0],ha=Si[1],Ta=Object(v.useState)(function(){return dr.findIndex(function(ki){return ki.key===Ii})}),aa=Object(_.a)(Ta,2),$a=aa[0],To=aa[1];Object(v.useEffect)(function(){var ki=dr.findIndex(function(Qo){return Qo.key===Ii});if(ki===-1){var Xo;ki=Math.max(0,Math.min($a,dr.length-1)),ha((Xo=dr[ki])===null||Xo===void 0?void 0:Xo.key)}To(ki)},[dr.map(function(ki){return ki.key}).join("_"),Ii,$a]);var vo=Object(d.a)(null,{value:ct}),Aa=Object(_.a)(vo,2),Gi=Aa[0],ji=Aa[1],oa=dn;vi&&!["left","right"].includes(dn)&&(oa="top"),Object(v.useEffect)(function(){ct||(ji("rc-tabs-".concat(Ea)),Ea+=1)},[]);function ta(ki,Xo){Jr==null||Jr(ki,Xo),ha(ki),si==null||si(ki)}var Ao={id:Gi,activeKey:Ii,animated:ni,tabPosition:oa,rtl:lr,mobile:vi},Vo,Yo=Object(y.a)(Object(y.a)({},Ao),{},{editable:Ut,locale:Mr,moreIcon:Wr,moreTransitionName:Yr,tabBarGutter:An,onTabClick:ta,onTabScroll:Zi,extra:Vr,style:_r,panes:dt});return zr?Vo=zr(Yo,Pi):Vo=v.createElement(Pi,Object.assign({},Yo)),v.createElement(Ko.Provider,{value:{tabs:dr,prefixCls:$e}},v.createElement("div",Object.assign({ref:xt,id:ct,className:g()($e,"".concat($e,"-").concat(oa),(Rt={},Object(I.a)(Rt,"".concat($e,"-mobile"),vi),Object(I.a)(Rt,"".concat($e,"-editable"),Ut),Object(I.a)(Rt,"".concat($e,"-rtl"),lr),Rt),We)},Zr),Vo,v.createElement(zi,Object.assign({destroyInactiveTabPane:Xr},Ao,{animated:ni}))))}var xa=v.forwardRef(el);xa.TabPane=Co;var Wo=xa,tl=X.b=Wo},kPWJ:function(U,X,x){U.exports=x.p+"static/question.cb52bef9.gif"},kPYp:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAF8AAAAUCAYAAADr0+FaAAANEklEQVRYR8WZe5RX1XXHP/vce3/zHoaXgFp5DQyOQLRgUTEtDW1qYyVmZUGNklRdiRpKE3lHfPyc4TngIBgfC0wx1ixt1NRWal2kotbE2lbRiCIISBCGhzDAvGd+87v37K5z5zfDzMCM46pr9fw1a+45+5zz3fvs/d3fn4yr1F8Do0UIUb74UFR8Gm3IO/Wf8MThat7mOYnaDZUmNUF/htpWLlePK4xwCcoQICHQbOGoKDuM4U1p5r0Px1DNrDPrezzQs+qNPUh/o4xXj6tRJhlhGEqeQNrCCYXdGvGfFt5JNHLoozJp7WyvdI0OtR4LEK7CstUIWyJLTSRcLfCnvlAiUKSgCEfV8o6NeMVE/G53itOUiXX3Sxcx2ov4qhG+qjBWoFChWYUqIt6VgFeblR0H5lEL0oGyjKvU1yHezPviyHdZ0Ro180basvD398n77svIFTokK5vrgW8LTELJRwgA6bTSHcaBckot/yWGX2YZtv5untT0dJ7SpOZrAX9mLTeIYarAIIQEYLrZTQNNFj7A8rx6/GrPfDncPmdihV6Y9nkA+Ot4nrIXaDSGElH6KfjdzpBSpVo8ttVU8Xitx/7hw/imWmYD4wXy6Iqjje9mOGYj/uX0bjYf/5nsaLcpY9fqDZ5hNTD8/wi+27bB+CzfOVcqSiq0BMPdRpiBUNANmHNvJUQo1ZFls0lTuXupnOw+0UVamMsCz+eHCuf3MWgUjZ3w76kUZQeW8j4iOnadXmCUNQI3xvsIbl7bX70MEdKpFLutcCA7iz/BxvfrfY2hNVXDb2v2s/TkU/Lf8SZXrtOcUxFfF8P1AiNVSYj0aihUGOoCu/vFFVpQlpmQX1iflQg3dMxxR1OaVHERfUIglXFKf6AIIbs97SnUq7I5VFZ+skiOt+NwSVIHpAu4wwgLBAZ04COkUGoytusEAhUGi9APyO+UTlWVfyPkrt0/kQ8y4FcI3NQF6zYnNAEn1VKtQuAJg1XiPRPOnnggFmwmicTIC/VqOa5wCiFHhCFGGGAtnkNUBGyaLVGKJXvvZXe8ZlpS/UP5DAh8cgPt8nTP8n+LZbS7vIHpdH2WzcBzUZp1njCTgB/HacYNQxS1sluFF4zwmgpHEpa09ckOleGkuUaEa70sRmrU4fgGG7L8VBOPnCiThgvXaU5ByE14rAGcwxA/vsxha3lJPF4ylv0mpCVKYBCGRRFXm5BvedlMcEEVgyY0hSHP+nn8XZiin1G6gu+At3watfC0l8MWIk5GBs+0UhxZbvSyuM545Gvn+ijYsIU9GvKkyeLVIOBUypIwKSbSyt94RUxHCeIgMNRFEauaDBt6fSrdkS+p0MnisUpgGtIlH7rc9nOU8pQyPmF4XGBY5v2G6RRvtp7irkFjeGf7bYTuyXfYVpUhi8gtLOCaoJA1KKPaL2aVHXjM+XievFm6Ti+JlE0GrupIDMqRps+4z6vh+f3DqHcF8MyZVSbdhl9lKCm8gBVBPn+pNq43qHBSlTujgNeDkJUo3+3Iw9BYF3F3i7K5eonUd9hLqhm2lz/IG8OaYADflgjPndMBGHkcqD3B4mMn+Gc2iaszbSOpZtDbFBdN4uFgINOJMAqOjGxLW77bJ/BHJDU7kcfXjOEeEa7s9NzdM65WeNK0sC5dQGjSrPDgB+1zVNiRqmbh7wO2dQWnm2tv0+C8Zq7rfxkbjOEC3AsQmtSyYnc9q8cW8kMDSYHB7saqHGs+xvLgQ36272VJ9Zajh92ukwtH8JCXxxWajvFSC1sjZYEPC0W4pT3RG3jj0xQ/qF8qe86ymVRTbLg2KOQxLBdkvkdWeLoR7qyaL6fOWqMqI+9jZvYAHsEyKP7eVtj//HPBn5bU7CP9uN4oi4GvSFdGcRhhgybYvHuunByzXqd4IZtEmNi2BzZSklrPQ/vKpK43gOJvEzWvZDZrvYCb1ZIDhBZeyE3xt01ZrDRwc5zqhCiyPNtaxZwD63tmRe37jbhZs/1i5iQKSGpIYeZs+7HcKYYZwPfb50bwSK2l/LNOtabzuUet0TGB4VdGmJD5f0qFiro6Ko7cL65OnDVcxjA+zwDFmY9H/TY62/OYuFbzQphthXIRzus8U4kLy10DhGfemi8u3zOuUv9K4Km4gLaF14kIbty7SF75XOAzE0rW6iwxPBxHOFiUt0Plx77HvSjXZiLntI0o/3iJrO+bXZWSCibh8QsjlMRnE06IZYWjiEgb+CLo6RQrm1t4oKbs3E4dnNSh/fLYkvCZHNtRmppDysOAh6oyOHQ/0+i1Ot6HZzyPS1TjunvcRFzVI/gZjn6rKPORzHNps+ro4A6F5aaef+1oXFSl9EFmqvIEkBunBstea5i9Z778T99AgnFr1dWTp0S4sO1u7ETj1LCItiLvEu1RQn6ya7H8Q5/tJnWEzecFz+PSDPtxKWIdMMJFvkNEDHq4iuU1dVSySWrPZXvkeh2SHfEi8EfGQBTRWFdLecLw0IEyaTnXmovX6ng1PC3CeNeuifCZCeP+5OxRXKEXGp95hrgouAjsGBZ+KxHLTCOvd+0YVUrXMUMVB0j70z4cRty0b7H8R19BKqnUGQY20kZnXU1511rm+R5LFa7J2KmOQpJ7lsijfbU7brVOwOcfRSiNIxaqjbBaLeNc5HeAf5DlNQ1fAPyQxoY6yv0vA/xxq3QEAcvFMCumR2eG476vRsKCPQvY0blNbp9y8Xr9YxvyhBFGZS4YRSFzCot4YvvtnVhAT4hN0mDsDSz1PRaoUuCYgcLWAO4IYbXAdzLNTGgtmz5exNxzneMs80n1i7P4TpDLOokY5KiWKlXAYhG+1iXyPw/8FTokO7tT5H8p4CfVlBbyFassFeE6IKvTJRqt5QVfWLVzoXzUE3bOcZpgjYGZmfTgmpBt0UkW71vJe70CNVO9QZbLBl7J3xufCY7tZJq29UPrufdIAYtNG1j9XEqzyq7mwyw+eIiXO2tJ5zrbebfoqKIxVPr5zNB03AOoVd6KWpkbJJwDubXPkf9lgz9powaNdUw1HveqMrUz8Erc6W0OI9bvW8T+Lhy9+003alDcyPd8pVKIu0uHU2O6medaPmP5oZ/KJ+d03DT1i6cy2eSzzE8wTV0P4agS7DeWH+1aJC+VPKhTRXlUNMOkhEhb2d58jLsPHuYNnusqmrXvM2i2DisazeKgkFsRCp1dFRpUWGYifolQDnzv/wV8p5XYfP5CPMpRLu0GzlGrrB9g+Gltbdwc9Dhyzke3HyEqzmKgn2CDSCxWuShzmk86XcvrErDR+vxGsqhNnESbwHiFDJYGvi4+3w8KmEK6Q/azqjzWYLjP8efipBb6eSwQj6XtnbVJQNTEzqiVjZ7PlpYWjuWCbR2ImFYKwkamGMstWf3jBivXVW91+lHIG4W5zKxpJbu9w+0r+CPW6NBcjxcVLo8Lbl/TjvCMmFjRPVNwix/Q0kDiAuc6xy6qoAqHULaKpVGlZ9WzLQtwysLbrR5vZaco1SDO0a6ixzbFgLUcUdhllE+d5OpSiIXhpq0IDnShHrMkSClsM5YluxbJh7HHVWXCaka2BpQb4Vsxo2pr192C084uzq5y2mk7GEaIk4SFi1xHlUmDroC/Z5V79iyUlztrOw58l45OVbMsFbLudEUPbGeFDsnJjsFvYzt9Bf9cbKe0Ui8DnlYY1z2sXcETzfSavdMKB0OI4/7C42EtD5tcLhef+w1c0U0DcpYcXXUauYOus8Mdns1W2eIpy3Y18FGXrjipZmzAMLIoM4ZZQqwmdh7Oaltv3E0id1lMlR1hRJnk8PK+H0mqu7DmHBDB4vw6HtneQ8N06YNalIp4HmF6X8EfV6ljRfk5EmNxJvIdn09ksdYIs7oV2d7h7uGrhUOEzP14ibzoNgXmC3wjQx3dbwZdwM6YcbHpNJFDKjxr4dHOunv3rcY9rANNC7dbR4WFkbhIP7ddFxSxTK3Cr0nzgFMz2+05Su37saTsWJRVS5VnuHnnAnmtp8vPnKne+1NY4jlZwtDfWpob6ijzhQ098fyLVmn/bJ97PMPtQJ5r8Dxck5VUMyqXP0wEzEHjNFHQR438rPPZtuyiKpTtmsdjrji7SGmJmBJrGYZSlIsyfYD7oaJVlVqEAwbejSJeafR5t6dOsfOGTuXMTTHeBExHmCzCaDTurLPEFWOlXqFKlI+s8prfwG92lnXVXkoq9HwTcD/KdSp8mGrmyVSaf+pJJmjff/gKHZaTxR3G8E1rKWyoY4MvbOwJfIdIcSUX+8Ic1yg6yT6Eb7Q1Wc4BORRk+RQZQ2DD3n8Y+Lwn4edT/cEcOd0xL6nmyn5knWghPzuL7JQQJMC0umjzafUbaG5J0XigjFSfeHuHYZXSJIH0Iz+VJtczBL6H58pLZAhTaVqKCmnYfoSWc4l6Tko/nscg8clvMtQPyOFUn/oRVCauJZcs+jeHJFLHOX1wFTW9MkEnyg0kP2EpitJ4+YVU/S8v1xqrW4H9MAAAAABJRU5ErkJggg=="},kSUc:function(U,X,x){},"kaH+":function(U,X,x){"use strict";var I=x("+L6B"),_=x("2/Rp"),O=x("tJVT"),y=x("q1tI"),v=x.n(y),o=x("UZu5"),g=x.n(o),p=x("dhSg"),d=x("rLCj"),a=x("dF/Y"),n=x("4i/N");X.a=function(){var s=Object(y.useState)(""),t=Object(O.a)(s,2),i=t[0],e=t[1],r=Object(y.useState)(0),c=Object(O.a)(r,2),u=c[0],f=c[1],m=Object(y.useRef)("");Object(y.useEffect)(function(){var S=p.a.subscribe("preview-image",function(A){e(A),document.body.style.overflow="hidden"});return S},[]),Object(y.useEffect)(function(){return document.addEventListener("keydown",l),function(){document.removeEventListener("keydown",l)}},[]),Object(y.useEffect)(function(){m.current=i},[i]);function l(S){S.keyCode==27&&m.current&&E()}function E(){document.body.style.overflow="auto",e("")}function b(){f(u+90)}var D=Object(y.useRef)(),C=Object(y.useRef)(),w=function(A){(A.nativeEvent.target===D.current||A.nativeEvent.target===C.current)&&E()};return v.a.createElement(y.Fragment,null,i?v.a.createElement("div",{className:"image-preview-container",ref:D,onClick:w},v.a.createElement("div",{className:"button-group"},v.a.createElement(_.a,{onClick:b},"\u65CB\u8F6C",v.a.createElement(d.a,null)),v.a.createElement(_.a,{href:i},"\u4E0B\u8F7D",v.a.createElement(a.a,null)),v.a.createElement(_.a,{onClick:E},"\u5173\u95ED",v.a.createElement(n.a,null))),v.a.createElement("div",{className:"preview-wrp-group",ref:C},v.a.createElement("img",{className:"image-preview",src:i,alt:"\u9884\u89C8\u5927\u56FE",style:{transform:"rotate(".concat(u,"deg)")}}))):null)}},"l/DK":function(U,X,x){U.exports={"path-container":"path-container___pFrW9",active:"active___38ez8"}},l2Kq:function(U,X,x){U.exports=x.p+"static/match_ad.24dc22fd.jpg"},l9Ud:function(U,X,x){U.exports={flex_box_center:"flex_box_center___1siF3",flex_space_between:"flex_space_between___1LIBe",flex_box_vertical_center:"flex_box_vertical_center___1SENm",flex_box_center_end:"flex_box_center_end___aKcm8",flex_box_column:"flex_box_column___3xSXM",wrap:"wrap___1JpHn",list:"list___eeGJr",page:"page___2LktT"}},lNSK:function(U,X,x){"use strict";function I(te){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(ut){return typeof ut}:I=function(ut){return ut&&typeof Symbol=="function"&&ut.constructor===Symbol&&ut!==Symbol.prototype?"symbol":typeof ut},I(te)}Object.defineProperty(X,"__esModule",{value:!0}),X.deflateInit=ge,X.deflateInit2=Ke,X.deflateReset=Ye,X.deflateResetKeep=et,X.deflateSetHeader=Me,X.deflate=Ee,X.deflateEnd=ce,X.deflateSetDictionary=je,X.deflateInfo=X.Z_DEFLATED=X.Z_UNKNOWN=X.Z_DEFAULT_STRATEGY=X.Z_FIXED=X.Z_RLE=X.Z_HUFFMAN_ONLY=X.Z_FILTERED=X.Z_DEFAULT_COMPRESSION=X.Z_BUF_ERROR=X.Z_DATA_ERROR=X.Z_STREAM_ERROR=X.Z_STREAM_END=X.Z_OK=X.Z_BLOCK=X.Z_FINISH=X.Z_FULL_FLUSH=X.Z_PARTIAL_FLUSH=X.Z_NO_FLUSH=void 0;var _=d(x("6BzB")),O=d(x("c5fP")),y=g(x("xlC8")),v=g(x("QV2g")),o=g(x("xSIq"));function g(te){return te&&te.__esModule?te:{default:te}}function p(){if(typeof WeakMap!="function")return null;var te=new WeakMap;return p=function(){return te},te}function d(te){if(te&&te.__esModule)return te;if(te===null||I(te)!=="object"&&typeof te!="function")return{default:te};var Je=p();if(Je&&Je.has(te))return Je.get(te);var ut={},Be=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var qe in te)if(Object.prototype.hasOwnProperty.call(te,qe)){var at=Be?Object.getOwnPropertyDescriptor(te,qe):null;at&&(at.get||at.set)?Object.defineProperty(ut,qe,at):ut[qe]=te[qe]}return ut.default=te,Je&&Je.set(te,ut),ut}var a=0;X.Z_NO_FLUSH=a;var n=1;X.Z_PARTIAL_FLUSH=n;var s=3;X.Z_FULL_FLUSH=s;var t=4;X.Z_FINISH=t;var i=5;X.Z_BLOCK=i;var e=0;X.Z_OK=e;var r=1;X.Z_STREAM_END=r;var c=-2;X.Z_STREAM_ERROR=c;var u=-3;X.Z_DATA_ERROR=u;var f=-5;X.Z_BUF_ERROR=f;var m=-1;X.Z_DEFAULT_COMPRESSION=m;var l=1;X.Z_FILTERED=l;var E=2;X.Z_HUFFMAN_ONLY=E;var b=3;X.Z_RLE=b;var D=4;X.Z_FIXED=D;var C=0;X.Z_DEFAULT_STRATEGY=C;var w=2;X.Z_UNKNOWN=w;var S=8;X.Z_DEFLATED=S;var A=9,R=15,k=8,L=29,M=256,G=M+1+L,W=30,N=19,K=2*G+1,F=15,P=3,B=258,J=B+P+1,re=32,he=42,we=69,ke=73,ne=91,Oe=103,Ce=113,fe=666,oe=1,se=2,be=3,ie=4,de=3;function Fe(te,Je){return te.msg=o.default[Je],Je}function ae(te){return(te<<1)-(te>4?9:0)}function Z(te){for(var Je=te.length;--Je>=0;)te[Je]=0}function Y(te){var Je=te.state,ut=Je.pending;if(ut>te.avail_out&&(ut=te.avail_out),ut===0)return;_.arraySet(te.output,Je.pending_buf,Je.pending_out,ut,te.next_out),te.next_out+=ut,Je.pending_out+=ut,te.total_out+=ut,te.avail_out-=ut,Je.pending-=ut,Je.pending===0&&(Je.pending_out=0)}function q(te,Je){O._tr_flush_block(te,te.block_start>=0?te.block_start:-1,te.strstart-te.block_start,Je),te.block_start=te.strstart,Y(te.strm)}function ve(te,Je){te.pending_buf[te.pending++]=Je}function pe(te,Je){te.pending_buf[te.pending++]=Je>>>8&255,te.pending_buf[te.pending++]=Je&255}function Te(te,Je,ut,Be){var qe=te.avail_in;return qe>Be&&(qe=Be),qe===0?0:(te.avail_in-=qe,_.arraySet(Je,te.input,te.next_in,qe,ut),te.state.wrap===1?te.adler=(0,y.default)(te.adler,Je,qe,ut):te.state.wrap===2&&(te.adler=(0,v.default)(te.adler,Je,qe,ut)),te.next_in+=qe,te.total_in+=qe,qe)}function Ne(te,Je){var ut=te.max_chain_length,Be=te.strstart,qe,at,wt=te.prev_length,ft=te.nice_match,st=te.strstart>te.w_size-J?te.strstart-(te.w_size-J):0,Pe=te.window,ze=te.w_mask,yt=te.prev,pt=te.strstart+B,Bt=Pe[Be+wt-1],Ht=Pe[Be+wt];te.prev_length>=te.good_match&&(ut>>=2),ft>te.lookahead&&(ft=te.lookahead);do{if(qe=Je,Pe[qe+wt]!==Ht||Pe[qe+wt-1]!==Bt||Pe[qe]!==Pe[Be]||Pe[++qe]!==Pe[Be+1])continue;Be+=2,qe++;do;while(Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Pe[++Be]===Pe[++qe]&&Be<pt);if(at=B-(pt-Be),Be=pt-B,at>wt){if(te.match_start=Je,wt=at,at>=ft)break;Bt=Pe[Be+wt-1],Ht=Pe[Be+wt]}}while((Je=yt[Je&ze])>st&&--ut!==0);return wt<=te.lookahead?wt:te.lookahead}function me(te){var Je=te.w_size,ut,Be,qe,at,wt;do{if(at=te.window_size-te.lookahead-te.strstart,te.strstart>=Je+(Je-J)){_.arraySet(te.window,te.window,Je,Je,0),te.match_start-=Je,te.strstart-=Je,te.block_start-=Je,Be=te.hash_size,ut=Be;do qe=te.head[--ut],te.head[ut]=qe>=Je?qe-Je:0;while(--Be);Be=Je,ut=Be;do qe=te.prev[--ut],te.prev[ut]=qe>=Je?qe-Je:0;while(--Be);at+=Je}if(te.strm.avail_in===0)break;if(Be=Te(te.strm,te.window,te.strstart+te.lookahead,at),te.lookahead+=Be,te.lookahead+te.insert>=P)for(wt=te.strstart-te.insert,te.ins_h=te.window[wt],te.ins_h=(te.ins_h<<te.hash_shift^te.window[wt+1])&te.hash_mask;te.insert&&!(te.ins_h=(te.ins_h<<te.hash_shift^te.window[wt+P-1])&te.hash_mask,te.prev[wt&te.w_mask]=te.head[te.ins_h],te.head[te.ins_h]=wt,wt++,te.insert--,te.lookahead+te.insert<P););}while(te.lookahead<J&&te.strm.avail_in!==0)}function Ie(te,Je){var ut=65535;for(ut>te.pending_buf_size-5&&(ut=te.pending_buf_size-5);;){if(te.lookahead<=1){if(me(te),te.lookahead===0&&Je===a)return oe;if(te.lookahead===0)break}te.strstart+=te.lookahead,te.lookahead=0;var Be=te.block_start+ut;if((te.strstart===0||te.strstart>=Be)&&(te.lookahead=te.strstart-Be,te.strstart=Be,q(te,!1),te.strm.avail_out===0))return oe;if(te.strstart-te.block_start>=te.w_size-J&&(q(te,!1),te.strm.avail_out===0))return oe}return te.insert=0,Je===t?(q(te,!0),te.strm.avail_out===0?be:ie):(te.strstart>te.block_start&&(q(te,!1),te.strm.avail_out===0),oe)}function _e(te,Je){for(var ut,Be;;){if(te.lookahead<J){if(me(te),te.lookahead<J&&Je===a)return oe;if(te.lookahead===0)break}if(ut=0,te.lookahead>=P&&(te.ins_h=(te.ins_h<<te.hash_shift^te.window[te.strstart+P-1])&te.hash_mask,ut=te.prev[te.strstart&te.w_mask]=te.head[te.ins_h],te.head[te.ins_h]=te.strstart),ut!==0&&te.strstart-ut<=te.w_size-J&&(te.match_length=Ne(te,ut)),te.match_length>=P)if(Be=O._tr_tally(te,te.strstart-te.match_start,te.match_length-P),te.lookahead-=te.match_length,te.match_length<=te.max_lazy_match&&te.lookahead>=P){te.match_length--;do te.strstart++,te.ins_h=(te.ins_h<<te.hash_shift^te.window[te.strstart+P-1])&te.hash_mask,ut=te.prev[te.strstart&te.w_mask]=te.head[te.ins_h],te.head[te.ins_h]=te.strstart;while(--te.match_length!==0);te.strstart++}else te.strstart+=te.match_length,te.match_length=0,te.ins_h=te.window[te.strstart],te.ins_h=(te.ins_h<<te.hash_shift^te.window[te.strstart+1])&te.hash_mask;else Be=O._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++;if(Be&&(q(te,!1),te.strm.avail_out===0))return oe}return te.insert=te.strstart<P-1?te.strstart:P-1,Je===t?(q(te,!0),te.strm.avail_out===0?be:ie):te.last_lit&&(q(te,!1),te.strm.avail_out===0)?oe:se}function Ve(te,Je){for(var ut,Be,qe;;){if(te.lookahead<J){if(me(te),te.lookahead<J&&Je===a)return oe;if(te.lookahead===0)break}if(ut=0,te.lookahead>=P&&(te.ins_h=(te.ins_h<<te.hash_shift^te.window[te.strstart+P-1])&te.hash_mask,ut=te.prev[te.strstart&te.w_mask]=te.head[te.ins_h],te.head[te.ins_h]=te.strstart),te.prev_length=te.match_length,te.prev_match=te.match_start,te.match_length=P-1,ut!==0&&te.prev_length<te.max_lazy_match&&te.strstart-ut<=te.w_size-J&&(te.match_length=Ne(te,ut),te.match_length<=5&&(te.strategy===l||te.match_length===P&&te.strstart-te.match_start>4096)&&(te.match_length=P-1)),te.prev_length>=P&&te.match_length<=te.prev_length){qe=te.strstart+te.lookahead-P,Be=O._tr_tally(te,te.strstart-1-te.prev_match,te.prev_length-P),te.lookahead-=te.prev_length-1,te.prev_length-=2;do++te.strstart<=qe&&(te.ins_h=(te.ins_h<<te.hash_shift^te.window[te.strstart+P-1])&te.hash_mask,ut=te.prev[te.strstart&te.w_mask]=te.head[te.ins_h],te.head[te.ins_h]=te.strstart);while(--te.prev_length!==0);if(te.match_available=0,te.match_length=P-1,te.strstart++,Be&&(q(te,!1),te.strm.avail_out===0))return oe}else if(te.match_available){if(Be=O._tr_tally(te,0,te.window[te.strstart-1]),Be&&q(te,!1),te.strstart++,te.lookahead--,te.strm.avail_out===0)return oe}else te.match_available=1,te.strstart++,te.lookahead--}return te.match_available&&(Be=O._tr_tally(te,0,te.window[te.strstart-1]),te.match_available=0),te.insert=te.strstart<P-1?te.strstart:P-1,Je===t?(q(te,!0),te.strm.avail_out===0?be:ie):te.last_lit&&(q(te,!1),te.strm.avail_out===0)?oe:se}function tt(te,Je){for(var ut,Be,qe,at,wt=te.window;;){if(te.lookahead<=B){if(me(te),te.lookahead<=B&&Je===a)return oe;if(te.lookahead===0)break}if(te.match_length=0,te.lookahead>=P&&te.strstart>0&&(qe=te.strstart-1,Be=wt[qe],Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe])){at=te.strstart+B;do;while(Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&Be===wt[++qe]&&qe<at);te.match_length=B-(at-qe),te.match_length>te.lookahead&&(te.match_length=te.lookahead)}if(te.match_length>=P?(ut=O._tr_tally(te,1,te.match_length-P),te.lookahead-=te.match_length,te.strstart+=te.match_length,te.match_length=0):(ut=O._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++),ut&&(q(te,!1),te.strm.avail_out===0))return oe}return te.insert=0,Je===t?(q(te,!0),te.strm.avail_out===0?be:ie):te.last_lit&&(q(te,!1),te.strm.avail_out===0)?oe:se}function Ge(te,Je){for(var ut;;){if(te.lookahead===0&&(me(te),te.lookahead===0)){if(Je===a)return oe;break}if(te.match_length=0,ut=O._tr_tally(te,0,te.window[te.strstart]),te.lookahead--,te.strstart++,ut&&(q(te,!1),te.strm.avail_out===0))return oe}return te.insert=0,Je===t?(q(te,!0),te.strm.avail_out===0?be:ie):te.last_lit&&(q(te,!1),te.strm.avail_out===0)?oe:se}function Le(te,Je,ut,Be,qe){this.good_length=te,this.max_lazy=Je,this.nice_length=ut,this.max_chain=Be,this.func=qe}var bt;bt=[new Le(0,0,0,0,Ie),new Le(4,4,8,4,_e),new Le(4,5,16,8,_e),new Le(4,6,32,32,_e),new Le(4,4,16,16,Ve),new Le(8,16,32,32,Ve),new Le(8,16,128,128,Ve),new Le(8,32,128,256,Ve),new Le(32,128,258,1024,Ve),new Le(32,258,258,4096,Ve)];function Re(te){te.window_size=2*te.w_size,Z(te.head),te.max_lazy_match=bt[te.level].max_lazy,te.good_match=bt[te.level].good_length,te.nice_match=bt[te.level].nice_length,te.max_chain_length=bt[te.level].max_chain,te.strstart=0,te.block_start=0,te.lookahead=0,te.insert=0,te.match_length=te.prev_length=P-1,te.match_available=0,te.ins_h=0}function Xe(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=S,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new _.Buf16(K*2),this.dyn_dtree=new _.Buf16((2*W+1)*2),this.bl_tree=new _.Buf16((2*N+1)*2),Z(this.dyn_ltree),Z(this.dyn_dtree),Z(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _.Buf16(F+1),this.heap=new _.Buf16(2*G+1),Z(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _.Buf16(2*G+1),Z(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function et(te){var Je;return!te||!te.state?Fe(te,c):(te.total_in=te.total_out=0,te.data_type=w,Je=te.state,Je.pending=0,Je.pending_out=0,Je.wrap<0&&(Je.wrap=-Je.wrap),Je.status=Je.wrap?he:Ce,te.adler=Je.wrap===2?0:1,Je.last_flush=a,O._tr_init(Je),e)}function Ye(te){var Je=et(te);return Je===e&&Re(te.state),Je}function Me(te,Je){return!te||!te.state||te.state.wrap!==2?c:(te.state.gzhead=Je,e)}function Ke(te,Je,ut,Be,qe,at){if(!te)return c;var wt=1;if(Je===m&&(Je=6),Be<0?(wt=0,Be=-Be):Be>15&&(wt=2,Be-=16),qe<1||qe>A||ut!==S||Be<8||Be>15||Je<0||Je>9||at<0||at>D)return Fe(te,c);Be===8&&(Be=9);var ft=new Xe;return te.state=ft,ft.strm=te,ft.wrap=wt,ft.gzhead=null,ft.w_bits=Be,ft.w_size=1<<ft.w_bits,ft.w_mask=ft.w_size-1,ft.hash_bits=qe+7,ft.hash_size=1<<ft.hash_bits,ft.hash_mask=ft.hash_size-1,ft.hash_shift=~~((ft.hash_bits+P-1)/P),ft.window=new _.Buf8(ft.w_size*2),ft.head=new _.Buf16(ft.hash_size),ft.prev=new _.Buf16(ft.w_size),ft.lit_bufsize=1<<qe+6,ft.pending_buf_size=ft.lit_bufsize*4,ft.pending_buf=new _.Buf8(ft.pending_buf_size),ft.d_buf=1*ft.lit_bufsize,ft.l_buf=(1+2)*ft.lit_bufsize,ft.level=Je,ft.strategy=at,ft.method=ut,Ye(te)}function ge(te,Je){return Ke(te,Je,S,R,k,C)}function Ee(te,Je){var ut,Be,qe,at;if(!te||!te.state||Je>i||Je<0)return te?Fe(te,c):c;if(Be=te.state,!te.output||!te.input&&te.avail_in!==0||Be.status===fe&&Je!==t)return Fe(te,te.avail_out===0?f:c);if(Be.strm=te,ut=Be.last_flush,Be.last_flush=Je,Be.status===he)if(Be.wrap===2)te.adler=0,ve(Be,31),ve(Be,139),ve(Be,8),Be.gzhead?(ve(Be,(Be.gzhead.text?1:0)+(Be.gzhead.hcrc?2:0)+(Be.gzhead.extra?4:0)+(Be.gzhead.name?8:0)+(Be.gzhead.comment?16:0)),ve(Be,Be.gzhead.time&255),ve(Be,Be.gzhead.time>>8&255),ve(Be,Be.gzhead.time>>16&255),ve(Be,Be.gzhead.time>>24&255),ve(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),ve(Be,Be.gzhead.os&255),Be.gzhead.extra&&Be.gzhead.extra.length&&(ve(Be,Be.gzhead.extra.length&255),ve(Be,Be.gzhead.extra.length>>8&255)),Be.gzhead.hcrc&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending,0)),Be.gzindex=0,Be.status=we):(ve(Be,0),ve(Be,0),ve(Be,0),ve(Be,0),ve(Be,0),ve(Be,Be.level===9?2:Be.strategy>=E||Be.level<2?4:0),ve(Be,de),Be.status=Ce);else{var wt=S+(Be.w_bits-8<<4)<<8,ft=-1;Be.strategy>=E||Be.level<2?ft=0:Be.level<6?ft=1:Be.level===6?ft=2:ft=3,wt|=ft<<6,Be.strstart!==0&&(wt|=re),wt+=31-wt%31,Be.status=Ce,pe(Be,wt),Be.strstart!==0&&(pe(Be,te.adler>>>16),pe(Be,te.adler&65535)),te.adler=1}if(Be.status===we)if(Be.gzhead.extra){for(qe=Be.pending;Be.gzindex<(Be.gzhead.extra.length&65535)&&!(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),Y(te),qe=Be.pending,Be.pending===Be.pending_buf_size));)ve(Be,Be.gzhead.extra[Be.gzindex]&255),Be.gzindex++;Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),Be.gzindex===Be.gzhead.extra.length&&(Be.gzindex=0,Be.status=ke)}else Be.status=ke;if(Be.status===ke)if(Be.gzhead.name){qe=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),Y(te),qe=Be.pending,Be.pending===Be.pending_buf_size)){at=1;break}Be.gzindex<Be.gzhead.name.length?at=Be.gzhead.name.charCodeAt(Be.gzindex++)&255:at=0,ve(Be,at)}while(at!==0);Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),at===0&&(Be.gzindex=0,Be.status=ne)}else Be.status=ne;if(Be.status===ne)if(Be.gzhead.comment){qe=Be.pending;do{if(Be.pending===Be.pending_buf_size&&(Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),Y(te),qe=Be.pending,Be.pending===Be.pending_buf_size)){at=1;break}Be.gzindex<Be.gzhead.comment.length?at=Be.gzhead.comment.charCodeAt(Be.gzindex++)&255:at=0,ve(Be,at)}while(at!==0);Be.gzhead.hcrc&&Be.pending>qe&&(te.adler=(0,v.default)(te.adler,Be.pending_buf,Be.pending-qe,qe)),at===0&&(Be.status=Oe)}else Be.status=Oe;if(Be.status===Oe&&(Be.gzhead.hcrc?(Be.pending+2>Be.pending_buf_size&&Y(te),Be.pending+2<=Be.pending_buf_size&&(ve(Be,te.adler&255),ve(Be,te.adler>>8&255),te.adler=0,Be.status=Ce)):Be.status=Ce),Be.pending!==0){if(Y(te),te.avail_out===0)return Be.last_flush=-1,e}else if(te.avail_in===0&&ae(Je)<=ae(ut)&&Je!==t)return Fe(te,f);if(Be.status===fe&&te.avail_in!==0)return Fe(te,f);if(te.avail_in!==0||Be.lookahead!==0||Je!==a&&Be.status!==fe){var st=Be.strategy===E?Ge(Be,Je):Be.strategy===b?tt(Be,Je):bt[Be.level].func(Be,Je);if((st===be||st===ie)&&(Be.status=fe),st===oe||st===be)return te.avail_out===0&&(Be.last_flush=-1),e;if(st===se&&(Je===n?O._tr_align(Be):Je!==i&&(O._tr_stored_block(Be,0,0,!1),Je===s&&(Z(Be.head),Be.lookahead===0&&(Be.strstart=0,Be.block_start=0,Be.insert=0))),Y(te),te.avail_out===0))return Be.last_flush=-1,e}return Je!==t?e:Be.wrap<=0?r:(Be.wrap===2?(ve(Be,te.adler&255),ve(Be,te.adler>>8&255),ve(Be,te.adler>>16&255),ve(Be,te.adler>>24&255),ve(Be,te.total_in&255),ve(Be,te.total_in>>8&255),ve(Be,te.total_in>>16&255),ve(Be,te.total_in>>24&255)):(pe(Be,te.adler>>>16),pe(Be,te.adler&65535)),Y(te),Be.wrap>0&&(Be.wrap=-Be.wrap),Be.pending!==0?e:r)}function ce(te){var Je;return!te||!te.state?c:(Je=te.state.status,Je!==he&&Je!==we&&Je!==ke&&Je!==ne&&Je!==Oe&&Je!==Ce&&Je!==fe?Fe(te,c):(te.state=null,Je===Ce?Fe(te,u):e))}function je(te,Je){var ut=Je.length,Be,qe,at,wt,ft,st,Pe,ze;if(!te||!te.state)return c;if(Be=te.state,wt=Be.wrap,wt===2||wt===1&&Be.status!==he||Be.lookahead)return c;for(wt===1&&(te.adler=(0,y.default)(te.adler,Je,ut,0)),Be.wrap=0,ut>=Be.w_size&&(wt===0&&(Z(Be.head),Be.strstart=0,Be.block_start=0,Be.insert=0),ze=new _.Buf8(Be.w_size),_.arraySet(ze,Je,ut-Be.w_size,Be.w_size,0),Je=ze,ut=Be.w_size),ft=te.avail_in,st=te.next_in,Pe=te.input,te.avail_in=ut,te.next_in=0,te.input=Je,me(Be);Be.lookahead>=P;){qe=Be.strstart,at=Be.lookahead-(P-1);do Be.ins_h=(Be.ins_h<<Be.hash_shift^Be.window[qe+P-1])&Be.hash_mask,Be.prev[qe&Be.w_mask]=Be.head[Be.ins_h],Be.head[Be.ins_h]=qe,qe++;while(--at);Be.strstart=qe,Be.lookahead=P-1,me(Be)}return Be.strstart+=Be.lookahead,Be.block_start=Be.strstart,Be.insert=Be.lookahead,Be.lookahead=0,Be.match_length=Be.prev_length=P-1,Be.match_available=0,te.next_in=st,te.input=Pe,te.avail_in=ft,Be.wrap=wt,e}var Qe="pako deflate (from Nodeca project)";X.deflateInfo=Qe},lOMy:function(U,X,x){},lPiR:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(_){var O=I,y=O.lib,v=y.WordArray,o=y.Hasher,g=O.algo,p=[],d=[];(function(){function s(r){for(var c=_.sqrt(r),u=2;u<=c;u++)if(!(r%u))return!1;return!0}function t(r){return(r-(r|0))*4294967296|0}for(var i=2,e=0;e<64;)s(i)&&(e<8&&(p[e]=t(_.pow(i,1/2))),d[e]=t(_.pow(i,1/3)),e++),i++})();var a=[],n=g.SHA256=o.extend({_doReset:function(){this._hash=new v.init(p.slice(0))},_doProcessBlock:function(s,t){for(var i=this._hash.words,e=i[0],r=i[1],c=i[2],u=i[3],f=i[4],m=i[5],l=i[6],E=i[7],b=0;b<64;b++){if(b<16)a[b]=s[t+b]|0;else{var D=a[b-15],C=(D<<25|D>>>7)^(D<<14|D>>>18)^D>>>3,w=a[b-2],S=(w<<15|w>>>17)^(w<<13|w>>>19)^w>>>10;a[b]=C+a[b-7]+S+a[b-16]}var A=f&m^~f&l,R=e&r^e&c^r&c,k=(e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22),L=(f<<26|f>>>6)^(f<<21|f>>>11)^(f<<7|f>>>25),M=E+L+A+d[b]+a[b],G=k+R;E=l,l=m,m=f,f=u+M|0,u=c,c=r,r=e,e=M+G|0}i[0]=i[0]+e|0,i[1]=i[1]+r|0,i[2]=i[2]+c|0,i[3]=i[3]+u|0,i[4]=i[4]+f|0,i[5]=i[5]+m|0,i[6]=i[6]+l|0,i[7]=i[7]+E|0},_doFinalize:function(){var s=this._data,t=s.words,i=this._nDataBytes*8,e=s.sigBytes*8;return t[e>>>5]|=128<<24-e%32,t[(e+64>>>9<<4)+14]=_.floor(i/4294967296),t[(e+64>>>9<<4)+15]=i,s.sigBytes=t.length*4,this._process(),this._hash},clone:function(){var s=o.clone.call(this);return s._hash=this._hash.clone(),s}});O.SHA256=o._createHelper(n),O.HmacSHA256=o._createHmacHelper(n)}(Math),I.SHA256})},lZu9:function(U,X,x){(function(I){I(x("VrN/"),x("1eCo"),x("8EBN"))})(function(I){"use strict";I.defineMode("markdown",function(_,O){var y=I.getMode(_,"text/html"),v=y.name=="null";function o(F){if(I.findModeByName){var P=I.findModeByName(F);P&&(F=P.mime||P.mimes[0])}var B=I.getMode(_,F);return B.name=="null"?null:B}O.highlightFormatting===void 0&&(O.highlightFormatting=!1),O.maxBlockquoteDepth===void 0&&(O.maxBlockquoteDepth=0),O.taskLists===void 0&&(O.taskLists=!1),O.strikethrough===void 0&&(O.strikethrough=!1),O.emoji===void 0&&(O.emoji=!1),O.fencedCodeBlockHighlighting===void 0&&(O.fencedCodeBlockHighlighting=!0),O.fencedCodeBlockDefaultMode===void 0&&(O.fencedCodeBlockDefaultMode="text/plain"),O.xml===void 0&&(O.xml=!0),O.tokenTypeOverrides===void 0&&(O.tokenTypeOverrides={});var g={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 p in g)g.hasOwnProperty(p)&&O.tokenTypeOverrides[p]&&(g[p]=O.tokenTypeOverrides[p]);var d=/^([*\-_])(?:\s*\1){2,}\s*$/,a=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,n=/^\[(x| )\](?=\s)/i,s=O.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,t=/^ {0,3}(?:\={1,}|-{2,})\s*$/,i=/^[^#!\[\]*_\\<>` "'(~:]+/,e=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,r=/^\s*\[[^\]]+?\]:.*$/,c=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,u=" ";function f(F,P,B){return P.f=P.inline=B,B(F,P)}function m(F,P,B){return P.f=P.block=B,B(F,P)}function l(F){return!F||!/\S/.test(F.string)}function E(F){if(F.linkTitle=!1,F.linkHref=!1,F.linkText=!1,F.em=!1,F.strong=!1,F.strikethrough=!1,F.quote=0,F.indentedCode=!1,F.f==D){var P=v;if(!P){var B=I.innerMode(y,F.htmlState);P=B.mode.name=="xml"&&B.state.tagStart===null&&!B.state.context&&B.state.tokenize.isInText}P&&(F.f=A,F.block=b,F.htmlState=null)}return F.trailingSpace=0,F.trailingSpaceNewLine=!1,F.prevLine=F.thisLine,F.thisLine={stream:null},null}function b(F,P){var B=F.column()===P.indentation,J=l(P.prevLine.stream),re=P.indentedCode,he=P.prevLine.hr,we=P.list!==!1,ke=(P.listStack[P.listStack.length-1]||0)+3;P.indentedCode=!1;var ne=P.indentation;if(P.indentationDiff===null&&(P.indentationDiff=P.indentation,we)){for(P.list=null;ne<P.listStack[P.listStack.length-1];)P.listStack.pop(),P.listStack.length?P.indentation=P.listStack[P.listStack.length-1]:P.list=!1;P.list!==!1&&(P.indentationDiff=ne-P.listStack[P.listStack.length-1])}var Oe=!J&&!he&&!P.prevLine.header&&(!we||!re)&&!P.prevLine.fencedCodeEnd,Ce=(P.list===!1||he||J)&&P.indentation<=ke&&F.match(d),fe=null;if(P.indentationDiff>=4&&(re||P.prevLine.fencedCodeEnd||P.prevLine.header||J))return F.skipToEnd(),P.indentedCode=!0,g.code;if(F.eatSpace())return null;if(B&&P.indentation<=ke&&(fe=F.match(s))&&fe[1].length<=6)return P.quote=0,P.header=fe[1].length,P.thisLine.header=!0,O.highlightFormatting&&(P.formatting="header"),P.f=P.inline,w(P);if(P.indentation<=ke&&F.eat(">"))return P.quote=B?1:P.quote+1,O.highlightFormatting&&(P.formatting="quote"),F.eatSpace(),w(P);if(!Ce&&!P.setext&&B&&P.indentation<=ke&&(fe=F.match(a))){var oe=fe[1]?"ol":"ul";return P.indentation=ne+F.current().length,P.list=!0,P.quote=0,P.listStack.push(P.indentation),P.em=!1,P.strong=!1,P.code=!1,P.strikethrough=!1,O.taskLists&&F.match(n,!1)&&(P.taskList=!0),P.f=P.inline,O.highlightFormatting&&(P.formatting=["list","list-"+oe]),w(P)}else{if(B&&P.indentation<=ke&&(fe=F.match(e,!0)))return P.quote=0,P.fencedEndRE=new RegExp(fe[1]+"+ *$"),P.localMode=O.fencedCodeBlockHighlighting&&o(fe[2]||O.fencedCodeBlockDefaultMode),P.localMode&&(P.localState=I.startState(P.localMode)),P.f=P.block=C,O.highlightFormatting&&(P.formatting="code-block"),P.code=-1,w(P);if(P.setext||(!Oe||!we)&&!P.quote&&P.list===!1&&!P.code&&!Ce&&!r.test(F.string)&&(fe=F.lookAhead(1))&&(fe=fe.match(t)))return P.setext?(P.header=P.setext,P.setext=0,F.skipToEnd(),O.highlightFormatting&&(P.formatting="header")):(P.header=fe[0].charAt(0)=="="?1:2,P.setext=P.header),P.thisLine.header=!0,P.f=P.inline,w(P);if(Ce)return F.skipToEnd(),P.hr=!0,P.thisLine.hr=!0,g.hr;if(F.peek()==="[")return f(F,P,G)}return f(F,P,P.inline)}function D(F,P){var B=y.token(F,P.htmlState);if(!v){var J=I.innerMode(y,P.htmlState);(J.mode.name=="xml"&&J.state.tagStart===null&&!J.state.context&&J.state.tokenize.isInText||P.md_inside&&F.current().indexOf(">")>-1)&&(P.f=A,P.block=b,P.htmlState=null)}return B}function C(F,P){var B=P.listStack[P.listStack.length-1]||0,J=P.indentation<B,re=B+3;if(P.fencedEndRE&&P.indentation<=re&&(J||F.match(P.fencedEndRE))){O.highlightFormatting&&(P.formatting="code-block");var he;return J||(he=w(P)),P.localMode=P.localState=null,P.block=b,P.f=A,P.fencedEndRE=null,P.code=0,P.thisLine.fencedCodeEnd=!0,J?m(F,P,P.block):he}else return P.localMode?P.localMode.token(F,P.localState):(F.skipToEnd(),g.code)}function w(F){var P=[];if(F.formatting){P.push(g.formatting),typeof F.formatting=="string"&&(F.formatting=[F.formatting]);for(var B=0;B<F.formatting.length;B++)P.push(g.formatting+"-"+F.formatting[B]),F.formatting[B]==="header"&&P.push(g.formatting+"-"+F.formatting[B]+"-"+F.header),F.formatting[B]==="quote"&&(!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=F.quote?P.push(g.formatting+"-"+F.formatting[B]+"-"+F.quote):P.push("error"))}if(F.taskOpen)return P.push("meta"),P.length?P.join(" "):null;if(F.taskClosed)return P.push("property"),P.length?P.join(" "):null;if(F.linkHref?P.push(g.linkHref,"url"):(F.strong&&P.push(g.strong),F.em&&P.push(g.em),F.strikethrough&&P.push(g.strikethrough),F.emoji&&P.push(g.emoji),F.linkText&&P.push(g.linkText),F.code&&P.push(g.code),F.image&&P.push(g.image),F.imageAltText&&P.push(g.imageAltText,"link"),F.imageMarker&&P.push(g.imageMarker)),F.header&&P.push(g.header,g.header+"-"+F.header),F.quote&&(P.push(g.quote),!O.maxBlockquoteDepth||O.maxBlockquoteDepth>=F.quote?P.push(g.quote+"-"+F.quote):P.push(g.quote+"-"+O.maxBlockquoteDepth)),F.list!==!1){var J=(F.listStack.length-1)%3;J?J===1?P.push(g.list2):P.push(g.list3):P.push(g.list1)}return F.trailingSpaceNewLine?P.push("trailing-space-new-line"):F.trailingSpace&&P.push("trailing-space-"+(F.trailingSpace%2?"a":"b")),P.length?P.join(" "):null}function S(F,P){return F.match(i,!0)?w(P):void 0}function A(F,P){var B=P.text(F,P);if(typeof B!="undefined")return B;if(P.list)return P.list=null,w(P);if(P.taskList){var J=F.match(n,!0)[1]===" ";return J?P.taskOpen=!0:P.taskClosed=!0,O.highlightFormatting&&(P.formatting="task"),P.taskList=!1,w(P)}if(P.taskOpen=!1,P.taskClosed=!1,P.header&&F.match(/^#+$/,!0))return O.highlightFormatting&&(P.formatting="header"),w(P);var re=F.next();if(P.linkTitle){P.linkTitle=!1;var he=re;re==="("&&(he=")"),he=(he+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var we="^\\s*(?:[^"+he+"\\\\]+|\\\\\\\\|\\\\.)"+he;if(F.match(new RegExp(we),!0))return g.linkHref}if(re==="`"){var ke=P.formatting;O.highlightFormatting&&(P.formatting="code"),F.eatWhile("`");var ne=F.current().length;if(P.code==0&&(!P.quote||ne==1))return P.code=ne,w(P);if(ne==P.code){var Oe=w(P);return P.code=0,Oe}else return P.formatting=ke,w(P)}else if(P.code)return w(P);if(re==="\\"&&(F.next(),O.highlightFormatting)){var Ce=w(P),fe=g.formatting+"-escape";return Ce?Ce+" "+fe:fe}if(re==="!"&&F.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return P.imageMarker=!0,P.image=!0,O.highlightFormatting&&(P.formatting="image"),w(P);if(re==="["&&P.imageMarker&&F.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return P.imageMarker=!1,P.imageAltText=!0,O.highlightFormatting&&(P.formatting="image"),w(P);if(re==="]"&&P.imageAltText){O.highlightFormatting&&(P.formatting="image");var Ce=w(P);return P.imageAltText=!1,P.image=!1,P.inline=P.f=k,Ce}if(re==="["&&!P.image)return P.linkText&&F.match(/^.*?\]/)||(P.linkText=!0,O.highlightFormatting&&(P.formatting="link")),w(P);if(re==="]"&&P.linkText){O.highlightFormatting&&(P.formatting="link");var Ce=w(P);return P.linkText=!1,P.inline=P.f=F.match(/\(.*?\)| ?\[.*?\]/,!1)?k:A,Ce}if(re==="<"&&F.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=R,O.highlightFormatting&&(P.formatting="link");var Ce=w(P);return Ce?Ce+=" ":Ce="",Ce+g.linkInline}if(re==="<"&&F.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){P.f=P.inline=R,O.highlightFormatting&&(P.formatting="link");var Ce=w(P);return Ce?Ce+=" ":Ce="",Ce+g.linkEmail}if(O.xml&&re==="<"&&F.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var oe=F.string.indexOf(">",F.pos);if(oe!=-1){var se=F.string.substring(F.start,oe);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(se)&&(P.md_inside=!0)}return F.backUp(1),P.htmlState=I.startState(y),m(F,P,D)}if(O.xml&&re==="<"&&F.match(/^\/\w*?>/))return P.md_inside=!1,"tag";if(re==="*"||re==="_"){for(var be=1,ie=F.pos==1?" ":F.string.charAt(F.pos-2);be<3&&F.eat(re);)be++;var de=F.peek()||" ",Fe=!/\s/.test(de)&&(!c.test(de)||/\s/.test(ie)||c.test(ie)),ae=!/\s/.test(ie)&&(!c.test(ie)||/\s/.test(de)||c.test(de)),Z=null,Y=null;if(be%2&&(!P.em&&Fe&&(re==="*"||!ae||c.test(ie))?Z=!0:P.em==re&&ae&&(re==="*"||!Fe||c.test(de))&&(Z=!1)),be>1&&(!P.strong&&Fe&&(re==="*"||!ae||c.test(ie))?Y=!0:P.strong==re&&ae&&(re==="*"||!Fe||c.test(de))&&(Y=!1)),Y!=null||Z!=null){O.highlightFormatting&&(P.formatting=Z==null?"strong":Y==null?"em":"strong em"),Z===!0&&(P.em=re),Y===!0&&(P.strong=re);var Oe=w(P);return Z===!1&&(P.em=!1),Y===!1&&(P.strong=!1),Oe}}else if(re===" "&&(F.eat("*")||F.eat("_"))){if(F.peek()===" ")return w(P);F.backUp(1)}if(O.strikethrough){if(re==="~"&&F.eatWhile(re)){if(P.strikethrough){O.highlightFormatting&&(P.formatting="strikethrough");var Oe=w(P);return P.strikethrough=!1,Oe}else if(F.match(/^[^\s]/,!1))return P.strikethrough=!0,O.highlightFormatting&&(P.formatting="strikethrough"),w(P)}else if(re===" "&&F.match(/^~~/,!0)){if(F.peek()===" ")return w(P);F.backUp(2)}}if(O.emoji&&re===":"&&F.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){P.emoji=!0,O.highlightFormatting&&(P.formatting="emoji");var q=w(P);return P.emoji=!1,q}return re===" "&&(F.match(/^ +$/,!1)?P.trailingSpace++:P.trailingSpace&&(P.trailingSpaceNewLine=!0)),w(P)}function R(F,P){var B=F.next();if(B===">"){P.f=P.inline=A,O.highlightFormatting&&(P.formatting="link");var J=w(P);return J?J+=" ":J="",J+g.linkInline}return F.match(/^[^>]+/,!0),g.linkInline}function k(F,P){if(F.eatSpace())return null;var B=F.next();return B==="("||B==="["?(P.f=P.inline=M(B==="("?")":"]"),O.highlightFormatting&&(P.formatting="link-string"),P.linkHref=!0,w(P)):"error"}var L={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function M(F){return function(P,B){var J=P.next();if(J===F){B.f=B.inline=A,O.highlightFormatting&&(B.formatting="link-string");var re=w(B);return B.linkHref=!1,re}return P.match(L[F]),B.linkHref=!0,w(B)}}function G(F,P){return F.match(/^([^\]\\]|\\.)*\]:/,!1)?(P.f=W,F.next(),O.highlightFormatting&&(P.formatting="link"),P.linkText=!0,w(P)):f(F,P,A)}function W(F,P){if(F.match(/^\]:/,!0)){P.f=P.inline=N,O.highlightFormatting&&(P.formatting="link");var B=w(P);return P.linkText=!1,B}return F.match(/^([^\]\\]|\\.)+/,!0),g.linkText}function N(F,P){return F.eatSpace()?null:(F.match(/^[^\s]+/,!0),F.peek()===void 0?P.linkTitle=!0:F.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),P.f=P.inline=A,g.linkHref+" url")}var K={startState:function(){return{f:b,prevLine:{stream:null},thisLine:{stream:null},block:b,htmlState:null,indentation:0,inline:A,text:S,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(F){return{f:F.f,prevLine:F.prevLine,thisLine:F.thisLine,block:F.block,htmlState:F.htmlState&&I.copyState(y,F.htmlState),indentation:F.indentation,localMode:F.localMode,localState:F.localMode?I.copyState(F.localMode,F.localState):null,inline:F.inline,text:F.text,formatting:!1,linkText:F.linkText,linkTitle:F.linkTitle,linkHref:F.linkHref,code:F.code,em:F.em,strong:F.strong,strikethrough:F.strikethrough,emoji:F.emoji,header:F.header,setext:F.setext,hr:F.hr,taskList:F.taskList,list:F.list,listStack:F.listStack.slice(0),quote:F.quote,indentedCode:F.indentedCode,trailingSpace:F.trailingSpace,trailingSpaceNewLine:F.trailingSpaceNewLine,md_inside:F.md_inside,fencedEndRE:F.fencedEndRE}},token:function(F,P){if(P.formatting=!1,F!=P.thisLine.stream){if(P.header=0,P.hr=!1,F.match(/^\s*$/,!0))return E(P),null;if(P.prevLine=P.thisLine,P.thisLine={stream:F},P.taskList=!1,P.trailingSpace=0,P.trailingSpaceNewLine=!1,!P.localState&&(P.f=P.block,P.f!=D)){var B=F.match(/^\s*/,!0)[0].replace(/\t/g,u).length;if(P.indentation=B,P.indentationDiff=null,B>0)return null}}return P.f(F,P)},innerMode:function(F){return F.block==D?{state:F.htmlState,mode:y}:F.localState?{state:F.localState,mode:F.localMode}:{state:F,mode:K}},indent:function(F,P,B){return F.block==D&&y.indent?y.indent(F.htmlState,P,B):F.localState&&F.localMode.indent?F.localMode.indent(F.localState,P,B):I.Pass},blankLine:E,getType:w,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return K},"xml"),I.defineMIME("text/markdown","markdown"),I.defineMIME("text/x-markdown","markdown")})},lzim:function(U,X,x){"use strict";var I=x("E7E6"),_=x.n(I);x.d(X,"x",function(){return _.a});var O=x("/GNS"),y=x.n(O);x.d(X,"w",function(){return y.a});var v=x("FOrL"),o=x.n(v);x.d(X,"q",function(){return o.a});var g=x("HpTS"),p=x.n(g);x.d(X,"y",function(){return p.a});var d=x("tWlo"),a=x.n(d);x.d(X,"a",function(){return a.a});var n=x("7ZXX"),s=x.n(n);x.d(X,"l",function(){return s.a});var t=x("GABl"),i=x.n(t);x.d(X,"e",function(){return i.a});var e=x("onxn"),r=x.n(e);x.d(X,"n",function(){return r.a});var c=x("nKGa"),u=x.n(c);x.d(X,"m",function(){return u.a});var f=x("4qgm"),m=x.n(f);x.d(X,"A",function(){return m.a});var l=x("JeFH"),E=x.n(l);x.d(X,"b",function(){return E.a});var b=x("ji0R"),D=x.n(b);x.d(X,"i",function(){return D.a});var C=x("W6BS"),w=x.n(C);x.d(X,"B",function(){return w.a});var S=x("kPYp"),A=x.n(S);x.d(X,"C",function(){return A.a});var R=x("nukY"),k=x.n(R),L=x("4u4S"),M=x.n(L),G=x("yslc"),W=x.n(G),N=x("l2Kq"),K=x.n(N),F=x("RMFE"),P=x.n(F);x.d(X,"o",function(){return P.a});var B=x("TGq3"),J=x.n(B),re=x("SMhR"),he=x.n(re);x.d(X,"z",function(){return he.a});var we=x("8/bI"),ke=x.n(we);x.d(X,"j",function(){return ke.a});var ne=x("JWDV"),Oe=x.n(ne),Ce=x("Xsq0"),fe=x.n(Ce);x.d(X,"p",function(){return fe.a});var oe=x("Ohmc"),se=x.n(oe);x.d(X,"c",function(){return se.a});var be=x("csWT"),ie=x.n(be);x.d(X,"d",function(){return ie.a});var de=x("7v3h"),Fe=x.n(de);x.d(X,"k",function(){return Fe.a});var ae=x("cRFk"),Z=x.n(ae);x.d(X,"v",function(){return Z.a});var Y=x("kPWJ"),q=x.n(Y);x.d(X,"u",function(){return q.a});var ve=x("qgvg"),pe=x.n(ve);x.d(X,"r",function(){return pe.a});var Te=x("FPkq"),Ne=x.n(Te);x.d(X,"t",function(){return Ne.a});var me=x("A/g1"),Ie=x.n(me);x.d(X,"f",function(){return Ie.a});var _e=x("Nmxd"),Ve=x.n(_e);x.d(X,"g",function(){return Ve.a});var tt=x("5D2P"),Ge=x.n(tt);x.d(X,"h",function(){return Ge.a});var Le=x("djh8"),bt=x.n(Le);x.d(X,"s",function(){return bt.a});var Re=x("Jq4h"),Xe=x.n(Re)},mCJh:function(U,X,x){"use strict";x.d(X,"e",function(){return _}),x.d(X,"k",function(){return O}),x.d(X,"d",function(){return y}),x.d(X,"g",function(){return v}),x.d(X,"f",function(){return o}),x.d(X,"i",function(){return g}),x.d(X,"c",function(){return p}),x.d(X,"h",function(){return d}),x.d(X,"b",function(){return a}),x.d(X,"a",function(){return n}),x.d(X,"j",function(){return s});var I=x("ErOA");function _(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Object(I.c)("/discusses.json?page=".concat(i-1,"&container_identifier=").concat(t,"&container_type=Shixun"))}function O(t,i){return Object(I.f)("/discusses/".concat(t,"/top_or_down_discuss.json"),{top:i})}function y(t,i){return Object(I.f)("/discusses/".concat(t,"/disable_or_open_discuss.json"),{is_disable:!!i})}function v(t,i){return Object(I.f)("/discusses/".concat(t,"/plus.json"),{container_type:"Discuss",type:i?1:0})}function o(t,i){return Object(I.f)("/discusses/".concat(t,"/hidden.json"),i)}function g(t,i){return Object(I.f)("/discusses/".concat(t,"/reward_code.json"),i)}function p(t){return Object(I.a)("/api/discusses/".concat(t,".json"),{method:"delete"})}function d(t,i){return Object(I.f)("/discusses/".concat(t,"/reply.json"),{container_type:"Shixun",content:i})}function a(t){return Object(I.f)("/discusses.json",t)}function n(t){return Object(I.f)("/discusses/ai_reply.json",t)}function s(t,i){return Object(I.f)("/discusses/".concat(t,"/turing.json"),i)}},mHUz:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={XK_VoidSymbol:16777215,XK_BackSpace:65288,XK_Tab:65289,XK_Linefeed:65290,XK_Clear:65291,XK_Return:65293,XK_Pause:65299,XK_Scroll_Lock:65300,XK_Sys_Req:65301,XK_Escape:65307,XK_Delete:65535,XK_Multi_key:65312,XK_Codeinput:65335,XK_SingleCandidate:65340,XK_MultipleCandidate:65341,XK_PreviousCandidate:65342,XK_Kanji:65313,XK_Muhenkan:65314,XK_Henkan_Mode:65315,XK_Henkan:65315,XK_Romaji:65316,XK_Hiragana:65317,XK_Katakana:65318,XK_Hiragana_Katakana:65319,XK_Zenkaku:65320,XK_Hankaku:65321,XK_Zenkaku_Hankaku:65322,XK_Touroku:65323,XK_Massyo:65324,XK_Kana_Lock:65325,XK_Kana_Shift:65326,XK_Eisu_Shift:65327,XK_Eisu_toggle:65328,XK_Kanji_Bangou:65335,XK_Zen_Koho:65341,XK_Mae_Koho:65342,XK_Home:65360,XK_Left:65361,XK_Up:65362,XK_Right:65363,XK_Down:65364,XK_Prior:65365,XK_Page_Up:65365,XK_Next:65366,XK_Page_Down:65366,XK_End:65367,XK_Begin:65368,XK_Select:65376,XK_Print:65377,XK_Execute:65378,XK_Insert:65379,XK_Undo:65381,XK_Redo:65382,XK_Menu:65383,XK_Find:65384,XK_Cancel:65385,XK_Help:65386,XK_Break:65387,XK_Mode_switch:65406,XK_script_switch:65406,XK_Num_Lock:65407,XK_KP_Space:65408,XK_KP_Tab:65417,XK_KP_Enter:65421,XK_KP_F1:65425,XK_KP_F2:65426,XK_KP_F3:65427,XK_KP_F4:65428,XK_KP_Home:65429,XK_KP_Left:65430,XK_KP_Up:65431,XK_KP_Right:65432,XK_KP_Down:65433,XK_KP_Prior:65434,XK_KP_Page_Up:65434,XK_KP_Next:65435,XK_KP_Page_Down:65435,XK_KP_End:65436,XK_KP_Begin:65437,XK_KP_Insert:65438,XK_KP_Delete:65439,XK_KP_Equal:65469,XK_KP_Multiply:65450,XK_KP_Add:65451,XK_KP_Separator:65452,XK_KP_Subtract:65453,XK_KP_Decimal:65454,XK_KP_Divide:65455,XK_KP_0:65456,XK_KP_1:65457,XK_KP_2:65458,XK_KP_3:65459,XK_KP_4:65460,XK_KP_5:65461,XK_KP_6:65462,XK_KP_7:65463,XK_KP_8:65464,XK_KP_9:65465,XK_F1:65470,XK_F2:65471,XK_F3:65472,XK_F4:65473,XK_F5:65474,XK_F6:65475,XK_F7:65476,XK_F8:65477,XK_F9:65478,XK_F10:65479,XK_F11:65480,XK_L1:65480,XK_F12:65481,XK_L2:65481,XK_F13:65482,XK_L3:65482,XK_F14:65483,XK_L4:65483,XK_F15:65484,XK_L5:65484,XK_F16:65485,XK_L6:65485,XK_F17:65486,XK_L7:65486,XK_F18:65487,XK_L8:65487,XK_F19:65488,XK_L9:65488,XK_F20:65489,XK_L10:65489,XK_F21:65490,XK_R1:65490,XK_F22:65491,XK_R2:65491,XK_F23:65492,XK_R3:65492,XK_F24:65493,XK_R4:65493,XK_F25:65494,XK_R5:65494,XK_F26:65495,XK_R6:65495,XK_F27:65496,XK_R7:65496,XK_F28:65497,XK_R8:65497,XK_F29:65498,XK_R9:65498,XK_F30:65499,XK_R10:65499,XK_F31:65500,XK_R11:65500,XK_F32:65501,XK_R12:65501,XK_F33:65502,XK_R13:65502,XK_F34:65503,XK_R14:65503,XK_F35:65504,XK_R15:65504,XK_Shift_L:65505,XK_Shift_R:65506,XK_Control_L:65507,XK_Control_R:65508,XK_Caps_Lock:65509,XK_Shift_Lock:65510,XK_Meta_L:65511,XK_Meta_R:65512,XK_Alt_L:65513,XK_Alt_R:65514,XK_Super_L:65515,XK_Super_R:65516,XK_Hyper_L:65517,XK_Hyper_R:65518,XK_ISO_Level3_Shift:65027,XK_ISO_Next_Group:65032,XK_ISO_Prev_Group:65034,XK_ISO_First_Group:65036,XK_ISO_Last_Group:65038,XK_space:32,XK_exclam:33,XK_quotedbl:34,XK_numbersign:35,XK_dollar:36,XK_percent:37,XK_ampersand:38,XK_apostrophe:39,XK_quoteright:39,XK_parenleft:40,XK_parenright:41,XK_asterisk:42,XK_plus:43,XK_comma:44,XK_minus:45,XK_period:46,XK_slash:47,XK_0:48,XK_1:49,XK_2:50,XK_3:51,XK_4:52,XK_5:53,XK_6:54,XK_7:55,XK_8:56,XK_9:57,XK_colon:58,XK_semicolon:59,XK_less:60,XK_equal:61,XK_greater:62,XK_question:63,XK_at:64,XK_A:65,XK_B:66,XK_C:67,XK_D:68,XK_E:69,XK_F:70,XK_G:71,XK_H:72,XK_I:73,XK_J:74,XK_K:75,XK_L:76,XK_M:77,XK_N:78,XK_O:79,XK_P:80,XK_Q:81,XK_R:82,XK_S:83,XK_T:84,XK_U:85,XK_V:86,XK_W:87,XK_X:88,XK_Y:89,XK_Z:90,XK_bracketleft:91,XK_backslash:92,XK_bracketright:93,XK_asciicircum:94,XK_underscore:95,XK_grave:96,XK_quoteleft:96,XK_a:97,XK_b:98,XK_c:99,XK_d:100,XK_e:101,XK_f:102,XK_g:103,XK_h:104,XK_i:105,XK_j:106,XK_k:107,XK_l:108,XK_m:109,XK_n:110,XK_o:111,XK_p:112,XK_q:113,XK_r:114,XK_s:115,XK_t:116,XK_u:117,XK_v:118,XK_w:119,XK_x:120,XK_y:121,XK_z:122,XK_braceleft:123,XK_bar:124,XK_braceright:125,XK_asciitilde:126,XK_nobreakspace:160,XK_exclamdown:161,XK_cent:162,XK_sterling:163,XK_currency:164,XK_yen:165,XK_brokenbar:166,XK_section:167,XK_diaeresis:168,XK_copyright:169,XK_ordfeminine:170,XK_guillemotleft:171,XK_notsign:172,XK_hyphen:173,XK_registered:174,XK_macron:175,XK_degree:176,XK_plusminus:177,XK_twosuperior:178,XK_threesuperior:179,XK_acute:180,XK_mu:181,XK_paragraph:182,XK_periodcentered:183,XK_cedilla:184,XK_onesuperior:185,XK_masculine:186,XK_guillemotright:187,XK_onequarter:188,XK_onehalf:189,XK_threequarters:190,XK_questiondown:191,XK_Agrave:192,XK_Aacute:193,XK_Acircumflex:194,XK_Atilde:195,XK_Adiaeresis:196,XK_Aring:197,XK_AE:198,XK_Ccedilla:199,XK_Egrave:200,XK_Eacute:201,XK_Ecircumflex:202,XK_Ediaeresis:203,XK_Igrave:204,XK_Iacute:205,XK_Icircumflex:206,XK_Idiaeresis:207,XK_ETH:208,XK_Eth:208,XK_Ntilde:209,XK_Ograve:210,XK_Oacute:211,XK_Ocircumflex:212,XK_Otilde:213,XK_Odiaeresis:214,XK_multiply:215,XK_Oslash:216,XK_Ooblique:216,XK_Ugrave:217,XK_Uacute:218,XK_Ucircumflex:219,XK_Udiaeresis:220,XK_Yacute:221,XK_THORN:222,XK_Thorn:222,XK_ssharp:223,XK_agrave:224,XK_aacute:225,XK_acircumflex:226,XK_atilde:227,XK_adiaeresis:228,XK_aring:229,XK_ae:230,XK_ccedilla:231,XK_egrave:232,XK_eacute:233,XK_ecircumflex:234,XK_ediaeresis:235,XK_igrave:236,XK_iacute:237,XK_icircumflex:238,XK_idiaeresis:239,XK_eth:240,XK_ntilde:241,XK_ograve:242,XK_oacute:243,XK_ocircumflex:244,XK_otilde:245,XK_odiaeresis:246,XK_division:247,XK_oslash:248,XK_ooblique:248,XK_ugrave:249,XK_uacute:250,XK_ucircumflex:251,XK_udiaeresis:252,XK_yacute:253,XK_thorn:254,XK_ydiaeresis:255,XK_Hangul:65329,XK_Hangul_Hanja:65332,XK_Hangul_Jeonja:65336,XF86XK_ModeLock:269025025,XF86XK_MonBrightnessUp:269025026,XF86XK_MonBrightnessDown:269025027,XF86XK_KbdLightOnOff:269025028,XF86XK_KbdBrightnessUp:269025029,XF86XK_KbdBrightnessDown:269025030,XF86XK_Standby:269025040,XF86XK_AudioLowerVolume:269025041,XF86XK_AudioMute:269025042,XF86XK_AudioRaiseVolume:269025043,XF86XK_AudioPlay:269025044,XF86XK_AudioStop:269025045,XF86XK_AudioPrev:269025046,XF86XK_AudioNext:269025047,XF86XK_HomePage:269025048,XF86XK_Mail:269025049,XF86XK_Start:269025050,XF86XK_Search:269025051,XF86XK_AudioRecord:269025052,XF86XK_Calculator:269025053,XF86XK_Memo:269025054,XF86XK_ToDoList:269025055,XF86XK_Calendar:269025056,XF86XK_PowerDown:269025057,XF86XK_ContrastAdjust:269025058,XF86XK_RockerUp:269025059,XF86XK_RockerDown:269025060,XF86XK_RockerEnter:269025061,XF86XK_Back:269025062,XF86XK_Forward:269025063,XF86XK_Stop:269025064,XF86XK_Refresh:269025065,XF86XK_PowerOff:269025066,XF86XK_WakeUp:269025067,XF86XK_Eject:269025068,XF86XK_ScreenSaver:269025069,XF86XK_WWW:269025070,XF86XK_Sleep:269025071,XF86XK_Favorites:269025072,XF86XK_AudioPause:269025073,XF86XK_AudioMedia:269025074,XF86XK_MyComputer:269025075,XF86XK_VendorHome:269025076,XF86XK_LightBulb:269025077,XF86XK_Shop:269025078,XF86XK_History:269025079,XF86XK_OpenURL:269025080,XF86XK_AddFavorite:269025081,XF86XK_HotLinks:269025082,XF86XK_BrightnessAdjust:269025083,XF86XK_Finance:269025084,XF86XK_Community:269025085,XF86XK_AudioRewind:269025086,XF86XK_BackForward:269025087,XF86XK_Launch0:269025088,XF86XK_Launch1:269025089,XF86XK_Launch2:269025090,XF86XK_Launch3:269025091,XF86XK_Launch4:269025092,XF86XK_Launch5:269025093,XF86XK_Launch6:269025094,XF86XK_Launch7:269025095,XF86XK_Launch8:269025096,XF86XK_Launch9:269025097,XF86XK_LaunchA:269025098,XF86XK_LaunchB:269025099,XF86XK_LaunchC:269025100,XF86XK_LaunchD:269025101,XF86XK_LaunchE:269025102,XF86XK_LaunchF:269025103,XF86XK_ApplicationLeft:269025104,XF86XK_ApplicationRight:269025105,XF86XK_Book:269025106,XF86XK_CD:269025107,XF86XK_Calculater:269025108,XF86XK_Clear:269025109,XF86XK_Close:269025110,XF86XK_Copy:269025111,XF86XK_Cut:269025112,XF86XK_Display:269025113,XF86XK_DOS:269025114,XF86XK_Documents:269025115,XF86XK_Excel:269025116,XF86XK_Explorer:269025117,XF86XK_Game:269025118,XF86XK_Go:269025119,XF86XK_iTouch:269025120,XF86XK_LogOff:269025121,XF86XK_Market:269025122,XF86XK_Meeting:269025123,XF86XK_MenuKB:269025125,XF86XK_MenuPB:269025126,XF86XK_MySites:269025127,XF86XK_New:269025128,XF86XK_News:269025129,XF86XK_OfficeHome:269025130,XF86XK_Open:269025131,XF86XK_Option:269025132,XF86XK_Paste:269025133,XF86XK_Phone:269025134,XF86XK_Q:269025136,XF86XK_Reply:269025138,XF86XK_Reload:269025139,XF86XK_RotateWindows:269025140,XF86XK_RotationPB:269025141,XF86XK_RotationKB:269025142,XF86XK_Save:269025143,XF86XK_ScrollUp:269025144,XF86XK_ScrollDown:269025145,XF86XK_ScrollClick:269025146,XF86XK_Send:269025147,XF86XK_Spell:269025148,XF86XK_SplitScreen:269025149,XF86XK_Support:269025150,XF86XK_TaskPane:269025151,XF86XK_Terminal:269025152,XF86XK_Tools:269025153,XF86XK_Travel:269025154,XF86XK_UserPB:269025156,XF86XK_User1KB:269025157,XF86XK_User2KB:269025158,XF86XK_Video:269025159,XF86XK_WheelButton:269025160,XF86XK_Word:269025161,XF86XK_Xfer:269025162,XF86XK_ZoomIn:269025163,XF86XK_ZoomOut:269025164,XF86XK_Away:269025165,XF86XK_Messenger:269025166,XF86XK_WebCam:269025167,XF86XK_MailForward:269025168,XF86XK_Pictures:269025169,XF86XK_Music:269025170,XF86XK_Battery:269025171,XF86XK_Bluetooth:269025172,XF86XK_WLAN:269025173,XF86XK_UWB:269025174,XF86XK_AudioForward:269025175,XF86XK_AudioRepeat:269025176,XF86XK_AudioRandomPlay:269025177,XF86XK_Subtitle:269025178,XF86XK_AudioCycleTrack:269025179,XF86XK_CycleAngle:269025180,XF86XK_FrameBack:269025181,XF86XK_FrameForward:269025182,XF86XK_Time:269025183,XF86XK_Select:269025184,XF86XK_View:269025185,XF86XK_TopMenu:269025186,XF86XK_Red:269025187,XF86XK_Green:269025188,XF86XK_Yellow:269025189,XF86XK_Blue:269025190,XF86XK_Suspend:269025191,XF86XK_Hibernate:269025192,XF86XK_TouchpadToggle:269025193,XF86XK_TouchpadOn:269025200,XF86XK_TouchpadOff:269025201,XF86XK_AudioMicMute:269025202,XF86XK_Switch_VT_1:269024769,XF86XK_Switch_VT_2:269024770,XF86XK_Switch_VT_3:269024771,XF86XK_Switch_VT_4:269024772,XF86XK_Switch_VT_5:269024773,XF86XK_Switch_VT_6:269024774,XF86XK_Switch_VT_7:269024775,XF86XK_Switch_VT_8:269024776,XF86XK_Switch_VT_9:269024777,XF86XK_Switch_VT_10:269024778,XF86XK_Switch_VT_11:269024779,XF86XK_Switch_VT_12:269024780,XF86XK_Ungrab:269024800,XF86XK_ClearGrab:269024801,XF86XK_Next_VMode:269024802,XF86XK_Prev_VMode:269024803,XF86XK_LogWindowTree:269024804,XF86XK_LogGrabInfo:269024805};X.default=I},mTgk:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=_(x("mHUz"));function _(p){return p&&p.__esModule?p:{default:p}}var O={};function y(p,d){if(d===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in O)throw new Error('Duplicate entry for key "'+p+'"');O[p]=[d,d,d,d]}function v(p,d,a){if(d===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in O)throw new Error('Duplicate entry for key "'+p+'"');O[p]=[d,d,a,d]}function o(p,d,a){if(d===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(a===void 0)throw new Error('Undefined keysym for key "'+p+'"');if(p in O)throw new Error('Duplicate entry for key "'+p+'"');O[p]=[d,d,d,a]}v("Alt",I.default.XK_Alt_L,I.default.XK_Alt_R),y("AltGraph",I.default.XK_ISO_Level3_Shift),y("CapsLock",I.default.XK_Caps_Lock),v("Control",I.default.XK_Control_L,I.default.XK_Control_R),v("Meta",I.default.XK_Super_L,I.default.XK_Super_R),y("NumLock",I.default.XK_Num_Lock),y("ScrollLock",I.default.XK_Scroll_Lock),v("Shift",I.default.XK_Shift_L,I.default.XK_Shift_R),o("Enter",I.default.XK_Return,I.default.XK_KP_Enter),y("Tab",I.default.XK_Tab),o(" ",I.default.XK_space,I.default.XK_KP_Space),o("ArrowDown",I.default.XK_Down,I.default.XK_KP_Down),o("ArrowUp",I.default.XK_Up,I.default.XK_KP_Up),o("ArrowLeft",I.default.XK_Left,I.default.XK_KP_Left),o("ArrowRight",I.default.XK_Right,I.default.XK_KP_Right),o("End",I.default.XK_End,I.default.XK_KP_End),o("Home",I.default.XK_Home,I.default.XK_KP_Home),o("PageDown",I.default.XK_Next,I.default.XK_KP_Next),o("PageUp",I.default.XK_Prior,I.default.XK_KP_Prior),y("Backspace",I.default.XK_BackSpace),o("Clear",I.default.XK_Clear,I.default.XK_KP_Begin),y("Copy",I.default.XF86XK_Copy),y("Cut",I.default.XF86XK_Cut),o("Delete",I.default.XK_Delete,I.default.XK_KP_Delete),o("Insert",I.default.XK_Insert,I.default.XK_KP_Insert),y("Paste",I.default.XF86XK_Paste),y("Redo",I.default.XK_Redo),y("Undo",I.default.XK_Undo),y("Cancel",I.default.XK_Cancel),y("ContextMenu",I.default.XK_Menu),y("Escape",I.default.XK_Escape),y("Execute",I.default.XK_Execute),y("Find",I.default.XK_Find),y("Help",I.default.XK_Help),y("Pause",I.default.XK_Pause),y("Select",I.default.XK_Select),y("ZoomIn",I.default.XF86XK_ZoomIn),y("ZoomOut",I.default.XF86XK_ZoomOut),y("BrightnessDown",I.default.XF86XK_MonBrightnessDown),y("BrightnessUp",I.default.XF86XK_MonBrightnessUp),y("Eject",I.default.XF86XK_Eject),y("LogOff",I.default.XF86XK_LogOff),y("Power",I.default.XF86XK_PowerOff),y("PowerOff",I.default.XF86XK_PowerDown),y("PrintScreen",I.default.XK_Print),y("Hibernate",I.default.XF86XK_Hibernate),y("Standby",I.default.XF86XK_Standby),y("WakeUp",I.default.XF86XK_WakeUp),y("AllCandidates",I.default.XK_MultipleCandidate),y("Alphanumeric",I.default.XK_Eisu_Shift),y("CodeInput",I.default.XK_Codeinput),y("Compose",I.default.XK_Multi_key),y("Convert",I.default.XK_Henkan),y("GroupFirst",I.default.XK_ISO_First_Group),y("GroupLast",I.default.XK_ISO_Last_Group),y("GroupNext",I.default.XK_ISO_Next_Group),y("GroupPrevious",I.default.XK_ISO_Prev_Group),y("NonConvert",I.default.XK_Muhenkan),y("PreviousCandidate",I.default.XK_PreviousCandidate),y("SingleCandidate",I.default.XK_SingleCandidate),y("HangulMode",I.default.XK_Hangul),y("HanjaMode",I.default.XK_Hangul_Hanja),y("JunjuaMode",I.default.XK_Hangul_Jeonja),y("Eisu",I.default.XK_Eisu_toggle),y("Hankaku",I.default.XK_Hankaku),y("Hiragana",I.default.XK_Hiragana),y("HiraganaKatakana",I.default.XK_Hiragana_Katakana),y("KanaMode",I.default.XK_Kana_Shift),y("KanjiMode",I.default.XK_Kanji),y("Katakana",I.default.XK_Katakana),y("Romaji",I.default.XK_Romaji),y("Zenkaku",I.default.XK_Zenkaku),y("ZenkakuHanaku",I.default.XK_Zenkaku_Hankaku),y("F1",I.default.XK_F1),y("F2",I.default.XK_F2),y("F3",I.default.XK_F3),y("F4",I.default.XK_F4),y("F5",I.default.XK_F5),y("F6",I.default.XK_F6),y("F7",I.default.XK_F7),y("F8",I.default.XK_F8),y("F9",I.default.XK_F9),y("F10",I.default.XK_F10),y("F11",I.default.XK_F11),y("F12",I.default.XK_F12),y("F13",I.default.XK_F13),y("F14",I.default.XK_F14),y("F15",I.default.XK_F15),y("F16",I.default.XK_F16),y("F17",I.default.XK_F17),y("F18",I.default.XK_F18),y("F19",I.default.XK_F19),y("F20",I.default.XK_F20),y("F21",I.default.XK_F21),y("F22",I.default.XK_F22),y("F23",I.default.XK_F23),y("F24",I.default.XK_F24),y("F25",I.default.XK_F25),y("F26",I.default.XK_F26),y("F27",I.default.XK_F27),y("F28",I.default.XK_F28),y("F29",I.default.XK_F29),y("F30",I.default.XK_F30),y("F31",I.default.XK_F31),y("F32",I.default.XK_F32),y("F33",I.default.XK_F33),y("F34",I.default.XK_F34),y("F35",I.default.XK_F35),y("Close",I.default.XF86XK_Close),y("MailForward",I.default.XF86XK_MailForward),y("MailReply",I.default.XF86XK_Reply),y("MailSend",I.default.XF86XK_Send),y("MediaFastForward",I.default.XF86XK_AudioForward),y("MediaPause",I.default.XF86XK_AudioPause),y("MediaPlay",I.default.XF86XK_AudioPlay),y("MediaRecord",I.default.XF86XK_AudioRecord),y("MediaRewind",I.default.XF86XK_AudioRewind),y("MediaStop",I.default.XF86XK_AudioStop),y("MediaTrackNext",I.default.XF86XK_AudioNext),y("MediaTrackPrevious",I.default.XF86XK_AudioPrev),y("New",I.default.XF86XK_New),y("Open",I.default.XF86XK_Open),y("Print",I.default.XK_Print),y("Save",I.default.XF86XK_Save),y("SpellCheck",I.default.XF86XK_Spell),y("AudioVolumeDown",I.default.XF86XK_AudioLowerVolume),y("AudioVolumeUp",I.default.XF86XK_AudioRaiseVolume),y("AudioVolumeMute",I.default.XF86XK_AudioMute),y("MicrophoneVolumeMute",I.default.XF86XK_AudioMicMute),y("LaunchApplication1",I.default.XF86XK_MyComputer),y("LaunchApplication2",I.default.XF86XK_Calculator),y("LaunchCalendar",I.default.XF86XK_Calendar),y("LaunchMail",I.default.XF86XK_Mail),y("LaunchMediaPlayer",I.default.XF86XK_AudioMedia),y("LaunchMusicPlayer",I.default.XF86XK_Music),y("LaunchPhone",I.default.XF86XK_Phone),y("LaunchScreenSaver",I.default.XF86XK_ScreenSaver),y("LaunchSpreadsheet",I.default.XF86XK_Excel),y("LaunchWebBrowser",I.default.XF86XK_WWW),y("LaunchWebCam",I.default.XF86XK_WebCam),y("LaunchWordProcessor",I.default.XF86XK_Word),y("BrowserBack",I.default.XF86XK_Back),y("BrowserFavorites",I.default.XF86XK_Favorites),y("BrowserForward",I.default.XF86XK_Forward),y("BrowserHome",I.default.XF86XK_HomePage),y("BrowserRefresh",I.default.XF86XK_Refresh),y("BrowserSearch",I.default.XF86XK_Search),y("BrowserStop",I.default.XF86XK_Stop),y("Dimmer",I.default.XF86XK_BrightnessAdjust),y("MediaAudioTrack",I.default.XF86XK_AudioCycleTrack),y("RandomToggle",I.default.XF86XK_AudioRandomPlay),y("SplitScreenToggle",I.default.XF86XK_SplitScreen),y("Subtitle",I.default.XF86XK_Subtitle),y("VideoModeNext",I.default.XF86XK_Next_VMode),o("=",I.default.XK_equal,I.default.XK_KP_Equal),o("+",I.default.XK_plus,I.default.XK_KP_Add),o("-",I.default.XK_minus,I.default.XK_KP_Subtract),o("*",I.default.XK_asterisk,I.default.XK_KP_Multiply),o("/",I.default.XK_slash,I.default.XK_KP_Divide),o(".",I.default.XK_period,I.default.XK_KP_Decimal),o(",",I.default.XK_comma,I.default.XK_KP_Separator),o("0",I.default.XK_0,I.default.XK_KP_0),o("1",I.default.XK_1,I.default.XK_KP_1),o("2",I.default.XK_2,I.default.XK_KP_2),o("3",I.default.XK_3,I.default.XK_KP_3),o("4",I.default.XK_4,I.default.XK_KP_4),o("5",I.default.XK_5,I.default.XK_KP_5),o("6",I.default.XK_6,I.default.XK_KP_6),o("7",I.default.XK_7,I.default.XK_KP_7),o("8",I.default.XK_8,I.default.XK_KP_8),o("9",I.default.XK_9,I.default.XK_KP_9);var g=O;X.default=g},mdZa:function(U,X,x){"use strict";typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:function(_,O){"use strict";if(_==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(_),v=1;v<arguments.length;v++){var o=arguments[v];if(o!=null)for(var g in o)Object.prototype.hasOwnProperty.call(o,g)&&(y[g]=o[g])}return y},writable:!0,configurable:!0}),function(){function I(_,O){O=O||{bubbles:!1,cancelable:!1,detail:void 0};var y=document.createEvent("CustomEvent");return y.initCustomEvent(_,O.bubbles,O.cancelable,O.detail),y}I.prototype=window.Event.prototype,typeof window.CustomEvent!="function"&&(window.CustomEvent=I)}(),Number.isInteger=Number.isInteger||function(_){return typeof _=="number"&&isFinite(_)&&Math.floor(_)===_}},mxV5:function(module,exports,__webpack_require__){(function(global){var require,require;(function(U){if(!0)module.exports=U();else var X})(function(){var define,module,exports;return function(){function U(X,x,I){function _(v,o){if(!x[v]){if(!X[v]){var g=typeof require=="function"&&require;if(!o&&g)return require(v,!0);if(O)return O(v,!0);var p=new Error("Cannot find module '"+v+"'");throw p.code="MODULE_NOT_FOUND",p}var d=x[v]={exports:{}};X[v][0].call(d.exports,function(a){var n=X[v][1][a];return _(n||a)},d,d.exports,U,X,x,I)}return x[v].exports}for(var O=typeof require=="function"&&require,y=0;y<I.length;y++)_(I[y]);return _}return U}()({1:[function(U,X,x){"use strict";var I=U("./browser/client");I.Buffer=U("buffer").Buffer,I.urllib=U("../shims/xhr"),I.version=U("./browser/version").version,X.exports=I},{"../shims/xhr":291,"./browser/client":2,"./browser/version":5,buffer:73}],2:[function(U,X,x){(function(I,_){"use strict";var O=U("babel-runtime/core-js/promise"),y=d(O),v=U("babel-runtime/regenerator"),o=d(v),g=U("babel-runtime/core-js/object/assign"),p=d(g);function d(G){return G&&G.__esModule?G:{default:G}}var a=U("debug")("ali-oss"),n=U("copy-to"),s=U("xml2js"),t=U("agentkeepalive"),i=U("merge-descriptors"),e=U("url"),r=U("is-type-of"),c=U("platform"),u=U("utility"),f=U("urllib"),m=U("./version"),l=U("bowser"),E=U("../common/signUtils"),b=U("../common/utils/isIP"),D=b.isIP,C=U("../common/client/initOptions"),w=U("../common/utils/createRequest"),S=w.createRequest,A=new t;function R(){var G=c.name,W=c.version;G&&G.toLowerCase&&G.toLowerCase()==="ie"&&W.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function k(){return location&&location.protocol==="https:"}function L(G,W){if(R(),!(this instanceof L))return new L(G,W);G&&G.inited?this.options=G:this.options=L.initOptions(G),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=f,this.agent=this.options.agent||A),this.ctx=W,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}X.exports=L,L.initOptions=function(W){W.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var N=(0,p.default)({secure:k(),useFetch:!1},W);return C(N)};var M=L.prototype;M.debug=a,i(M,U("./object")),i(M,U("../common/bucket/getBucketWebsite")),i(M,U("../common/bucket/putBucketWebsite")),i(M,U("../common/bucket/deleteBucketWebsite")),i(M,U("../common/bucket/getBucketLifecycle")),i(M,U("../common/bucket/putBucketLifecycle")),i(M,U("../common/bucket/deleteBucketLifecycle")),i(M,U("../common/bucket/putBucketVersioning")),i(M,U("../common/bucket/getBucketVersioning")),i(M,U("./managed-upload")),i(M,U("../common/multipart")),i(M,U("../common/parallel")),M.signature=function(W){return this.debug("authorization stringToSign: %s",W,"info"),E.computeSignature(this.options.accessKeySecret,W)},M.authorization=function(W,N,K,F){var P=E.buildCanonicalString(W.toUpperCase(),N,{headers:F,parameters:K});return E.authorization(this.options.accessKeyId,this.options.accessKeySecret,P)},M.request=function(W){var N,K,F,P,B,J;return o.default.async(function(he){for(;;)switch(he.prev=he.next){case 0:return N=S.call(this,W),this.options.useFetch||(N.params.mode="disable-fetch"),K=void 0,F=void 0,P=!!W.stream,he.prev=5,he.next=8,o.default.awrap(this.urllib.request(N.url,N.params));case 8:K=he.sent,this.debug("response %s %s, got %s, headers: %j",W.method,N.url,K.status,K.headers,"info"),he.next=15;break;case 12:he.prev=12,he.t0=he.catch(5),F=he.t0;case 15:if(B=void 0,!(K&&W.successStatuses&&W.successStatuses.indexOf(K.status)===-1)){he.next=28;break}return he.next=19,o.default.awrap(this.requestError(K));case 19:if(B=he.sent,!(B.code==="RequestTimeTooSkewed"&&!P)){he.next=25;break}return this.options.amendTimeSkewed=+new Date(B.serverTime)-new Date,he.next=24,o.default.awrap(this.request(W));case 24:return he.abrupt("return",he.sent);case 25:B.params=W,he.next=32;break;case 28:if(!F){he.next=32;break}return he.next=31,o.default.awrap(this.requestError(F));case 31:B=he.sent;case 32:if(!B){he.next=34;break}throw B;case 34:if(!W.xmlResponse){he.next=39;break}return he.next=37,o.default.awrap(this.parseXML(K.data));case 37:J=he.sent,K.data=J;case 39:return he.abrupt("return",K);case 40:case"end":return he.stop()}},null,this,[[5,12]])},M._getResource=function(W){var N="/";return W.bucket&&(N+=W.bucket+"/"),W.object&&(N+=W.object),N},M._isIP=D,M._escape=function(W){return u.encodeURIComponent(W).replace(/%2F/g,"/")},M._getReqUrl=function(W){var N={};n(this.options.endpoint).to(N);var K=this._isIP(N.hostname),F=this.options.cname;W.bucket&&!F&&!K&&(N.host=W.bucket+"."+N.host);var P="/";W.bucket&&K&&(P+=W.bucket+"/"),W.object&&(P+=this._escape(W.object).replace(/\+/g,"%2B")),N.pathname=P;var B={};if(W.query&&i(B,W.query),W.subres){var J={};r.string(W.subres)?J[W.subres]="":r.array(W.subres)?W.subres.forEach(function(re){J[re]=""}):J=W.subres,i(B,J)}return N.query=B,e.format(N)},M._getUserAgent=function(){var W=_&&_.browser?"js":"nodejs",N="aliyun-sdk-"+W+"/"+m.version,K=c.description;return!K&&_&&(K="Node.js "+_.version.slice(1)+" on "+_.platform+" "+_.arch),this._checkUserAgent(N+" "+K)},M._checkUserAgent=function(W){var N=W.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta");return N},M.checkBrowserAndVersion=function(W,N){return l.name===W&&l.version.split(".")[0]===N},M.parseXML=function(W){return new y.default(function(N,K){I.isBuffer(W)&&(W=W.toString()),s.parseString(W,{explicitRoot:!1,explicitArray:!1},function(F,P){F?K(F):N(P)})})},M.requestError=function(W){var N,K,F,P;return o.default.async(function(J){for(;;)switch(J.prev=J.next){case 0:if(N=null,!(!W.data||!W.data.length)){J.next=5;break}W.status===-1||W.status===-2?(N=new Error(W.message),N.name=W.name,N.status=W.status,N.code=W.name):(W.status===404?(N=new Error("Object not exists"),N.name="NoSuchKeyError",N.status=404,N.code="NoSuchKey"):W.status===412?(N=new Error("Pre condition failed"),N.name="PreconditionFailedError",N.status=412,N.code="PreconditionFailed"):(N=new Error("Unknow error, status: "+W.status),N.name="UnknowError",N.status=W.status),N.requestId=W.headers["x-oss-request-id"],N.host=""),J.next=33;break;case 5:return K=String(W.data),this.debug("request response error data: %s",K,"error"),F=void 0,J.prev=8,J.next=11,o.default.awrap(this.parseXML(K));case 11:if(J.t0=J.sent,J.t0){J.next=14;break}J.t0={};case 14:F=J.t0,J.next=24;break;case 17:return J.prev=17,J.t1=J.catch(8),this.debug(K,"error"),J.t1.message+=`
|
|
|
raw xml: `+K,J.t1.status=W.status,J.t1.requestId=W.headers["x-oss-request-id"],J.abrupt("return",J.t1);case 24:P=F.Message||"unknow request error, status: "+W.status,F.Condition&&(P+=" (condition: "+F.Condition+")"),N=new Error(P),N.name=F.Code?F.Code+"Error":"UnknowError",N.status=W.status,N.code=F.Code,N.requestId=F.RequestId,N.hostId=F.HostId,N.serverTime=F.ServerTime;case 33:return this.debug("generate error %j",N,"error"),J.abrupt("return",N);case 35:case"end":return J.stop()}},null,this,[[8,17]])}}).call(this,{isBuffer:U("../../node_modules/is-buffer/index.js")},U("_process"))},{"../../node_modules/is-buffer/index.js":197,"../common/bucket/deleteBucketLifecycle":6,"../common/bucket/deleteBucketWebsite":7,"../common/bucket/getBucketLifecycle":8,"../common/bucket/getBucketVersioning":9,"../common/bucket/getBucketWebsite":10,"../common/bucket/putBucketLifecycle":11,"../common/bucket/putBucketVersioning":12,"../common/bucket/putBucketWebsite":13,"../common/client/initOptions":15,"../common/multipart":18,"../common/parallel":33,"../common/signUtils":34,"../common/utils/createRequest":38,"../common/utils/isIP":45,"./managed-upload":3,"./object":4,"./version":5,_process:208,agentkeepalive:48,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,bowser:70,"copy-to":76,debug:288,"is-type-of":289,"merge-descriptors":200,platform:206,url:238,urllib:291,utility:290,xml2js:249}],3:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/core-js/array/from"),O=p(_),y=U("babel-runtime/core-js/promise"),v=p(y),o=U("babel-runtime/regenerator"),g=p(o);function p(E){return E&&E.__esModule?E:{default:E}}var d=U("is-type-of"),a=U("util"),n=U("path"),s=U("mime"),t=U("copy-to"),i=U("../common/utils/isBlob"),e=i.isBlob,r=U("../common/utils/isFile"),c=r.isFile,u=x;u.multipartUpload=function(b,D,C){var w,S,A,R,k,L,M,G,W;return g.default.async(function(K){for(;;)switch(K.prev=K.next){case 0:if(this.resetCancelFlag(),C=C||{},!(C.checkpoint&&C.checkpoint.uploadId)){K.next=6;break}return K.next=5,g.default.awrap(this._resumeMultipart(C.checkpoint,C));case 5:return K.abrupt("return",K.sent);case 6:return w=100*1024,C.mime||(c(D)?C.mime=s.getType(n.extname(D.name)):e(D)?C.mime=D.type:C.mime=s.getType(n.extname(D))),C.headers=C.headers||{},this._convertMetaToHeaders(C.meta,C.headers),K.next=12,g.default.awrap(this._getFileSize(D));case 12:if(S=K.sent,!(S<w)){K.next=25;break}return A=this._createStream(D,0,S),C.contentLength=S,K.next=18,g.default.awrap(this.putStream(b,A,C));case 18:if(R=K.sent,!(C&&C.progress)){K.next=22;break}return K.next=22,g.default.awrap(C.progress(1));case 22:return k={res:R.res,bucket:this.options.bucket,name:b,etag:R.res.headers.etag},(C.headers&&C.headers["x-oss-callback"]||C.callback)&&(k.data=R.data),K.abrupt("return",k);case 25:if(!(C.partSize&&!(parseInt(C.partSize,10)===C.partSize))){K.next=27;break}throw new Error("partSize must be int number");case 27:if(!(C.partSize&&C.partSize<w)){K.next=29;break}throw new Error("partSize must not be smaller than "+w);case 29:return K.next=31,g.default.awrap(this.initMultipartUpload(b,C));case 31:if(L=K.sent,M=L.uploadId,G=this._getPartSize(S,C.partSize),W={file:D,name:b,fileSize:S,partSize:G,uploadId:M,doneParts:[]},!(C&&C.progress)){K.next=38;break}return K.next=38,g.default.awrap(C.progress(0,W,L.res));case 38:return K.next=40,g.default.awrap(this._resumeMultipart(W,C));case 40:return K.abrupt("return",K.sent);case 41:case"end":return K.stop()}},null,this)},u._resumeMultipart=function(b,D){var C,w,S,A,R,k,L,M,G,W,N,K,F,P,B,J,re,he;return g.default.async(function(ke){for(;;)switch(ke.prev=ke.next){case 0:if(C=this,!this.isCancel()){ke.next=3;break}throw this._makeCancelEvent();case 3:return w=b.file,S=b.fileSize,A=b.partSize,R=b.uploadId,k=b.doneParts,L=b.name,M=[],k.length>0&&t(k).to(M),G=this._divideParts(S,A),W=G.length,N=!1,K=function(Oe,Ce){var fe=this;return new v.default(function(se,be){var ie,de,Fe,ae;return g.default.async(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(Y.prev=0,Oe.isCancel()){Y.next=18;break}return ie=G[Ce-1],de={stream:Oe._createStream(w,ie.start,ie.end),size:ie.end-ie.start},Y.next=6,g.default.awrap(Oe._uploadPart(L,R,Ce,de));case 6:if(Fe=Y.sent,!(!Oe.isCancel()&&!N)){Y.next=15;break}if(b.doneParts.push({number:Ce,etag:Fe.res.headers.etag}),!D.progress){Y.next=12;break}return Y.next=12,g.default.awrap(D.progress(k.length/W,b,Fe.res));case 12:se({number:Ce,etag:Fe.res.headers.etag}),Y.next=16;break;case 15:se();case 16:Y.next=19;break;case 18:se();case 19:Y.next=30;break;case 21:Y.prev=21,Y.t0=Y.catch(0),ae=new Error,ae.name=Y.t0.name,ae.message=Y.t0.message,ae.stack=Y.t0.stack,ae.partNum=Ce,t(Y.t0).to(ae),be(ae);case 30:case"end":return Y.stop()}},null,fe,[[0,21]])})},F=(0,O.default)(new Array(W),function(ne,Oe){return Oe+1}),P=M.map(function(ne){return ne.number}),B=F.filter(function(ne){return P.indexOf(ne)<0}),J=5,re=D.parallel||J,ke.next=17,g.default.awrap(this._parallel(B,re,function(ne){return new v.default(function(Oe,Ce){K(C,ne).then(function(fe){fe&&M.push(fe),Oe()}).catch(function(fe){Ce(fe)})})}));case 17:if(he=ke.sent,N=!0,!this.isCancel()){ke.next=22;break}throw K=null,this._makeCancelEvent();case 22:if(!(he&&he.length>0)){ke.next=25;break}throw he[0].message="Failed to upload some parts with error: "+he[0].toString()+" part_num: "+he[0].partNum,he[0];case 25:return ke.next=27,g.default.awrap(this.completeMultipartUpload(L,R,M,D));case 27:return ke.abrupt("return",ke.sent);case 28:case"end":return ke.stop()}},null,this)},u._getFileSize=function(b){return g.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!d.buffer(b)){C.next=4;break}return C.abrupt("return",b.length);case 4:if(!(e(b)||c(b))){C.next=6;break}return C.abrupt("return",b.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return C.stop()}},null,this)};var f=U("stream"),m=f.Readable;function l(E,b){if(!(this instanceof l))return new l(E,b);m.call(this,b),this.file=E,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}a.inherits(l,m),l.prototype.readFileAndPush=function(b){if(this.fileBuffer)for(var D=!0;D&&this.fileBuffer&&this.start<this.fileBuffer.length;){var C=this.start,w=C+b;w=w>this.fileBuffer.length?this.fileBuffer.length:w,this.start=w,D=this.push(this.fileBuffer.slice(C,w))}},l.prototype._read=function(b){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file){this.finish||(this.fileBuffer=null,this.finish=!0),this.push(null);return}var D=16*1024;b=b||D;var C=this;this.reader.onload=function(S){C.fileBuffer=I.from(new Uint8Array(S.target.result)),C.file=null,C.readFileAndPush(b)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(b)},u._createStream=function(b,D,C){if(e(b)||c(b))return new l(b.slice(D,C));throw new Error("_createStream requires File/Blob.")},u._getPartSize=function(b,D){var C=10*1e3,w=1024*1024;return D?Math.max(Math.ceil(b/C),D):w},u._divideParts=function(b,D){for(var C=Math.ceil(b/D),w=[],S=0;S<C;S++){var A=D*S,R=Math.min(A+D,b);w.push({start:A,end:R})}return w}}).call(this,U("buffer").Buffer)},{"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/array/from":52,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,buffer:73,"copy-to":76,"is-type-of":289,mime:202,path:205,stream:230,util:243}],4:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/promise"),_=d(I),O=U("babel-runtime/core-js/object/keys"),y=d(O),v=U("babel-runtime/core-js/object/assign"),o=d(v),g=U("babel-runtime/regenerator"),p=d(g);function d(C){return C&&C.__esModule?C:{default:C}}var a=U("utility"),n=U("fs"),s=U("is-type-of"),t=U("url"),i=U("copy-to"),e=U("path"),r=U("mime"),c=U("../common/callback"),u=U("../common/signUtils"),f=U("merge-descriptors"),m=U("../common/utils/isBlob"),l=m.isBlob,E=U("../common/utils/isFile"),b=E.isFile,D=x;D.append=function(w,S,A){var R;return p.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return A=A||{},A.position===void 0&&(A.position="0"),A.subres={append:"",position:A.position},A.method="POST",L.next=6,p.default.awrap(this.put(w,S,A));case 6:return R=L.sent,R.nextAppendPosition=R.res.headers["x-oss-next-append-position"],L.abrupt("return",R);case 9:case"end":return L.stop()}},null,this)},D.put=function(w,S,A){var R,k,L,M,G,W,N;return p.default.async(function(F){for(;;)switch(F.prev=F.next){case 0:if(R=void 0,A=A||{},w=this._objectName(w),!s.buffer(S)){F.next=7;break}R=S,F.next=33;break;case 7:if(!(l(S)||b(S))){F.next=32;break}return A.mime||(b(S)?A.mime=r.getType(e.extname(S.name)):A.mime=S.type),k=this._createStream(S,0,S.size),F.next=12,p.default.awrap(this._getFileSize(S));case 12:return A.contentLength=F.sent,F.prev=13,F.next=16,p.default.awrap(this.putStream(w,k,A));case 16:return L=F.sent,F.abrupt("return",L);case 20:if(F.prev=20,F.t0=F.catch(13),!(F.t0.code==="RequestTimeTooSkewed")){F.next=29;break}return this.options.amendTimeSkewed=+new Date(F.t0.serverTime)-new Date,F.next=26,p.default.awrap(this.put(w,S,A));case 26:return F.abrupt("return",F.sent);case 29:throw F.t0;case 30:F.next=33;break;case 32:throw new TypeError("Must provide Buffer/Blob/File for put.");case 33:return A.headers=A.headers||{},this._convertMetaToHeaders(A.meta,A.headers),M=A.method||"PUT",G=this._objectRequestParams(M,w,A),c.encodeCallback(G,A),G.mime=A.mime,G.content=R,G.successStatuses=[200],F.next=43,p.default.awrap(this.request(G));case 43:return W=F.sent,N={name:w,url:this._objectUrl(w),res:W.res},G.headers&&G.headers["x-oss-callback"]&&(N.data=JSON.parse(W.data.toString())),F.abrupt("return",N);case 47:case"end":return F.stop()}},null,this,[[13,20]])},D.putStream=function(w,S,A){var R,k,L,M;return p.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return A=A||{},A.headers=A.headers||{},w=this._objectName(w),A.contentLength?A.headers["Content-Length"]=A.contentLength:A.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(A.meta,A.headers),R=A.method||"PUT",k=this._objectRequestParams(R,w,A),c.encodeCallback(k,A),k.mime=A.mime,k.stream=S,k.successStatuses=[200],W.next=13,p.default.awrap(this.request(k));case 13:return L=W.sent,M={name:w,url:this._objectUrl(w),res:L.res},k.headers&&k.headers["x-oss-callback"]&&(M.data=JSON.parse(L.data.toString())),W.abrupt("return",M);case 17:case"end":return W.stop()}},null,this)},f(D,U("../common/object/copyObject")),f(D,U("../common/object/getObjectTagging")),f(D,U("../common/object/putObjectTagging")),f(D,U("../common/object/deleteObjectTagging")),f(D,U("../common/image")),f(D,U("../common/object/getBucketVersions")),f(D,U("../common/object/getACL")),f(D,U("../common/object/putACL")),f(D,U("../common/object/head")),f(D,U("../common/object/delete")),f(D,U("../common/object/get")),f(D,U("../common/object/putSymlink")),f(D,U("../common/object/getSymlink")),f(D,U("../common/object/deleteMulti")),f(D,U("../common/object/getObjectMeta")),D.putMeta=function(w,S,A){var R;return p.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return L.next=2,p.default.awrap(this.copy(w,w,{meta:S||{},timeout:A&&A.timeout,ctx:A&&A.ctx}));case 2:return R=L.sent,L.abrupt("return",R);case 4:case"end":return L.stop()}},null,this)},D.list=function(w,S){var A,R,k,L,M;return p.default.async(function(W){for(;;)switch(W.prev=W.next){case 0:return A=this._objectRequestParams("GET","",S),A.query=w,A.xmlResponse=!0,A.successStatuses=[200],W.next=6,p.default.awrap(this.request(A));case 6:return R=W.sent,k=R.data.Contents,L=this,k&&(Array.isArray(k)||(k=[k]),k=k.map(function(N){return{name:N.Key,url:L._objectUrl(N.Key),lastModified:N.LastModified,etag:N.ETag,type:N.Type,size:Number(N.Size),storageClass:N.StorageClass,owner:{id:N.Owner.ID,displayName:N.Owner.DisplayName}}})),M=R.data.CommonPrefixes||null,M&&(Array.isArray(M)||(M=[M]),M=M.map(function(N){return N.Prefix})),W.abrupt("return",{res:R.res,objects:k,prefixes:M,nextMarker:R.data.NextMarker||null,isTruncated:R.data.IsTruncated==="true"});case 13:case"end":return W.stop()}},null,this)},D.restore=function(w,S){var A,R;return p.default.async(function(L){for(;;)switch(L.prev=L.next){case 0:return S=S||{},S.subres=(0,o.default)({restore:""},S.subres),S.versionId&&(S.subres.versionId=S.versionId),A=this._objectRequestParams("POST",w,S),A.successStatuses=[202],L.next=7,p.default.awrap(this.request(A));case 7:return R=L.sent,L.abrupt("return",{res:R.res});case 9:case"end":return L.stop()}},null,this)},D.signatureUrl=function(w,S){S=S||{},w=this._objectName(w),S.method=S.method||"GET";var A=a.timestamp()+(S.expires||1800),R={bucket:this.options.bucket,object:w},k=this._getResource(R);this.options.stsToken&&(S["security-token"]=this.options.stsToken);var L=u._signatureForURL(this.options.accessKeySecret,S,k,A),M=t.parse(this._getReqUrl(R));return M.query={OSSAccessKeyId:this.options.accessKeyId,Expires:A,Signature:L.Signature},i(L.subResource).to(M.query),M.format()},D.getObjectUrl=function(w,S){return S?S[S.length-1]!=="/"&&(S+="/"):S=this.options.endpoint.format(),S+this._escape(this._objectName(w))},D._objectUrl=function(w){return this._getReqUrl({bucket:this.options.bucket,object:w})},D.generateObjectUrl=function(C,w){if(w)w[w.length-1]!=="/"&&(w+="/");else{w=this.options.endpoint.format();var S=t.parse(w),A=this.options.bucket;S.hostname=A+"."+S.hostname,S.host=A+"."+S.host,w=S.format()}return w+this._escape(this._objectName(C))},D._objectRequestParams=function(w,S,A){if(!this.options.bucket)throw new Error("Please create a bucket first");A=A||{},S=this._objectName(S);var R={object:S,bucket:this.options.bucket,method:w,subres:A&&A.subres,timeout:A&&A.timeout,ctx:A&&A.ctx};return A.headers&&(R.headers={},i(A.headers).to(R.headers)),R},D._objectName=function(w){return w.replace(/^\/+/,"")},D._convertMetaToHeaders=function(w,S){if(!w)return;(0,y.default)(w).forEach(function(A){S["x-oss-meta-"+A]=w[A]})},D._deleteFileSafe=function(w){var S=this;return new _.default(function(A){n.exists(w,function(R){R?n.unlink(w,function(k){k&&S.debug("unlink %j error: %s",w,k,"error"),A()}):A()})})}},{"../common/callback":14,"../common/image":16,"../common/object/copyObject":19,"../common/object/delete":20,"../common/object/deleteMulti":21,"../common/object/deleteObjectTagging":22,"../common/object/get":23,"../common/object/getACL":24,"../common/object/getBucketVersions":25,"../common/object/getObjectMeta":26,"../common/object/getObjectTagging":27,"../common/object/getSymlink":28,"../common/object/head":29,"../common/object/putACL":30,"../common/object/putObjectTagging":31,"../common/object/putSymlink":32,"../common/signUtils":34,"../common/utils/isBlob":43,"../common/utils/isFile":44,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68,"copy-to":76,fs:71,"is-type-of":289,"merge-descriptors":200,mime:202,path:205,url:238,utility:290}],5:[function(U,X,x){"use strict";x.version="6.10.0"},{}],6:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(g){return g&&g.__esModule?g:{default:g}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=x;o.deleteBucketLifecycle=function(p,d){var a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return v(p),a=this._bucketRequestParams("DELETE",p,"lifecycle",d),a.successStatuses=[204],t.next=5,_.default.awrap(this.request(a));case 5:return n=t.sent,t.abrupt("return",{res:n.res});case 7:case"end":return t.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],7:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(g){return g&&g.__esModule?g:{default:g}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=x;o.deleteBucketWebsite=function(p,d){var a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return v(p),a=this._bucketRequestParams("DELETE",p,"website",d),a.successStatuses=[204],t.next=5,_.default.awrap(this.request(a));case 5:return n=t.sent,t.abrupt("return",{res:n.res});case 7:case"end":return t.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],8:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(n){return n&&n.__esModule?n:{default:n}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("../utils/isArray"),g=o.isArray,p=U("../utils/formatObjKey"),d=p.formatObjKey,a=x;a.getBucketLifecycle=function(s,t){var i,e,r;return _.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return v(s),i=this._bucketRequestParams("GET",s,"lifecycle",t),i.successStatuses=[200],i.xmlResponse=!0,u.next=6,_.default.awrap(this.request(i));case 6:return e=u.sent,r=e.data.Rule||null,r&&(g(r)||(r=[r]),r=r.map(function(f){return f.ID&&(f.id=f.ID,delete f.ID),f.Tag&&!g(f.Tag)&&(f.Tag=[f.Tag]),d(f,"firstLowerCase")})),u.abrupt("return",{rules:r,res:e.res});case 10:case"end":return u.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/formatObjKey":40,"../utils/isArray":42,"babel-runtime/regenerator":68}],9:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(g){return g&&g.__esModule?g:{default:g}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=x;o.getBucketVersioning=function(p,d){var a,n,s;return _.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return v(p),a=this._bucketRequestParams("GET",p,"versioning",d),a.xmlResponse=!0,a.successStatuses=[200],i.next=6,_.default.awrap(this.request(a));case 6:return n=i.sent,s=n.data.Status,i.abrupt("return",{status:n.status,versionStatus:s,res:n.res});case 9:case"end":return i.stop()}},null,this)}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68}],10:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(d){return d&&d.__esModule?d:{default:d}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("../utils/isObject"),g=o.isObject,p=x;p.getBucketWebsite=function(a,n){var s,t,i;return _.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return v(a),s=this._bucketRequestParams("GET",a,"website",n),s.successStatuses=[200],s.xmlResponse=!0,r.next=6,_.default.awrap(this.request(s));case 6:return t=r.sent,i=[],t.data.RoutingRules&&t.data.RoutingRules.RoutingRule&&(g(t.data.RoutingRules.RoutingRule)?i=[t.data.RoutingRules.RoutingRule]:i=t.data.RoutingRules.RoutingRule),r.abrupt("return",{index:t.data.IndexDocument&&t.data.IndexDocument.Suffix||"",supportSubDir:t.data.IndexDocument&&t.data.IndexDocument.SupportSubDir||"false",type:t.data.IndexDocument&&t.data.IndexDocument.Type,routingRules:i,error:t.data.ErrorDocument&&t.data.ErrorDocument.Key||null,res:t.res});case 10:case"end":return r.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isObject":46,"babel-runtime/regenerator":68}],11:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(b){return b&&b.__esModule?b:{default:b}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("../utils/isArray"),g=o.isArray,p=U("../utils/deepCopy"),d=p.deepCopy,a=U("../utils/isObject"),n=a.isObject,s=U("../utils/obj2xml"),t=s.obj2xml,i=U("../utils/checkObjectTag"),e=i.checkObjectTag,r=U("../utils/getStrBytesCount"),c=r.getStrBytesCount,u=x;u.putBucketLifecycle=function(D,C,w){var S,A,R,k,L;return _.default.async(function(G){for(;;)switch(G.prev=G.next){case 0:if(v(D),g(C)){G.next=3;break}throw new Error("rules must be Array");case 3:return S=this._bucketRequestParams("PUT",D,"lifecycle",w),A=[],R={LifecycleConfiguration:{Rule:A}},C.forEach(function(W){f(W),E(W),W.id&&(W.ID=W.id,delete W.id),A.push(W)}),k=t(R,{headers:!0,firstUpperCase:!0}),S.content=k,S.mime="xml",S.successStatuses=[200],G.next=13,_.default.awrap(this.request(S));case 13:return L=G.sent,G.abrupt("return",{res:L.res});case 15:case"end":return G.stop()}},null,this)};function f(b){b.days&&(b.expiration={days:b.days}),b.date&&(b.expiration={createdBeforeDate:b.date})}function m(b,D){var C=b.days,w=b.createdBeforeDate;if(!C&&!w)throw new Error(D+" must includes days or createdBeforeDate");if(C&&!/^[1-9][0-9]*$/.test(C))throw new Error("days must be a positive integer");if(w&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(w))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function l(b){if(!g(b)&&!n(b))throw new Error("tag must be Object or Array");b=n(b)?[b]:b;var D={},C=d(b);C.forEach(function(w){D[w.key]=w.value}),e(D)}function E(b){if(b.id&&c(b.id)>255)throw new Error("ID is composed of 255 bytes at most");if(b.prefix===""||b.prefix===void 0)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(b.status))throw new Error("Status must be Enabled or Disabled");if(b.transition){if(!["IA","Archive"].includes(b.transition.storageClass))throw new Error("StorageClass must be IA or Archive");m(b.transition,"Transition")}if(b.expiration){if(!b.expiration.expiredObjectDeleteMarker)m(b.expiration,"Expiration");else if(b.expiration.days||b.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}if(b.abortMultipartUpload&&m(b.abortMultipartUpload,"AbortMultipartUpload"),!b.expiration&&!b.abortMultipartUpload&&!b.transition&&!b.noncurrentVersionTransition)throw new Error("Rule must includes expiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(b.tag){if(b.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");l(b.tag)}}},{"../utils/checkBucketName":35,"../utils/checkObjectTag":36,"../utils/deepCopy":39,"../utils/getStrBytesCount":41,"../utils/isArray":42,"../utils/isObject":46,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],12:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(d){return d&&d.__esModule?d:{default:d}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("../utils/obj2xml"),g=o.obj2xml,p=x;p.putBucketVersioning=function(a,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},t,i,e;return _.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(v(a),["Enabled","Suspended"].includes(n)){c.next=3;break}throw new Error("status must be Enabled or Suspended");case 3:return t=this._bucketRequestParams("PUT",a,"versioning",s),i={VersioningConfiguration:{Status:n}},t.mime="xml",t.content=g(i,{headers:!0}),c.next=9,_.default.awrap(this.request(t));case 9:return e=c.sent,c.abrupt("return",{res:e.res,status:e.status});case 11:case"end":return c.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],13:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(n){return n&&n.__esModule?n:{default:n}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("../utils/obj2xml"),g=o.obj2xml,p=U("../utils/isArray"),d=p.isArray,a=x;a.putBucketWebsite=function(s){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments[2],e,r,c,u,f;return _.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:if(v(s),e=this._bucketRequestParams("PUT",s,"website",i),r={Suffix:t.index||"index.html"},c={IndexDocument:r},u={WebsiteConfiguration:c},t.supportSubDir&&(r.SupportSubDir=t.supportSubDir),t.type&&(r.Type=t.type),t.error&&(c.ErrorDocument={Key:t.error}),!(t.routingRules!==void 0)){l.next=12;break}if(d(t.routingRules)){l.next=11;break}throw new Error("RoutingRules must be Array");case 11:c.RoutingRules={RoutingRule:t.routingRules};case 12:return u=g(u),e.content=u,e.mime="xml",e.successStatuses=[200],l.next=18,_.default.awrap(this.request(e));case 18:return f=l.sent,l.abrupt("return",{res:f.res});case 20:case"end":return l.stop()}},null,this)}},{"../utils/checkBucketName":35,"../utils/isArray":42,"../utils/obj2xml":47,"babel-runtime/regenerator":68}],14:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/core-js/object/keys"),O=o(_),y=U("babel-runtime/core-js/json/stringify"),v=o(y);function o(g){return g&&g.__esModule?g:{default:g}}x.encodeCallback=function(p,d){if(p.headers=p.headers||{},!Object.prototype.hasOwnProperty.call(p.headers,"x-oss-callback")&&d.callback){var a={callbackUrl:encodeURI(d.callback.url),callbackBody:d.callback.body};d.callback.host&&(a.callbackHost=d.callback.host),d.callback.contentType&&(a.callbackBodyType=d.callback.contentType);var n=I.from((0,v.default)(a)).toString("base64");if(p.headers["x-oss-callback"]=n,d.callback.customValue){var s={};(0,O.default)(d.callback.customValue).forEach(function(t){s["x:"+t]=d.callback.customValue[t]}),p.headers["x-oss-callback-var"]=I.from((0,v.default)(s)).toString("base64")}}}}).call(this,U("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73}],15:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/assign"),_=O(I);function O(a){return a&&a.__esModule?a:{default:a}}var y=U("humanize-ms"),v=U("url"),o=U("../utils/checkBucketName"),g=o.checkBucketName;function p(a,n){var s=v.parse(a);if(s.protocol||(s=v.parse("http"+(n?"s":"")+"://"+a)),s.protocol!=="http:"&&s.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return s}function d(a,n,s){var t=s?"https://":"http://",i=n?"-internal.aliyuncs.com":".aliyuncs.com",e="vpc100-oss-cn-";return a.substr(0,e.length)===e&&(i=".aliyuncs.com"),v.parse(t+a+i)}X.exports=function(a){if(!a||!a.accessKeyId||!a.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");a.bucket&&g(a.bucket);var n=(0,_.default)({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1},a);if(n.accessKeyId=n.accessKeyId.trim(),n.accessKeySecret=n.accessKeySecret.trim(),n.timeout&&(n.timeout=y(n.timeout)),n.endpoint)n.endpoint=p(n.endpoint,n.secure);else if(n.region)n.endpoint=d(n.region,n.internal,n.secure);else throw new Error("require options.endpoint or options.region");return n.inited=!0,n}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/assign":54,"humanize-ms":194,url:238}],16:[function(U,X,x){"use strict";var I=U("merge-descriptors"),_=x;I(_,U("./processObjectSave"))},{"./processObjectSave":17,"merge-descriptors":200}],17:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(n){return n&&n.__esModule?n:{default:n}}var y=U("../utils/checkBucketName"),v=y.checkBucketName,o=U("querystring"),g=U("js-base64"),p=g.Base64.encode,d=x;d.processObjectSave=function(s,t,i,e){var r,c,u,f;return _.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return a(s,"sourceObject"),a(t,"targetObject"),a(i,"process"),t=this._objectName(t),e&&v(e),r=this._objectRequestParams("POST",s,{subres:"x-oss-process"}),c=e?",b_"+p(e):"",t=p(t),u={"x-oss-process":i+"|sys/saveas,o_"+t+c},r.content=o.stringify(u),l.next=12,_.default.awrap(this.request(r));case 12:return f=l.sent,l.abrupt("return",{res:f.res,status:f.res.status});case 14:case"end":return l.stop()}},null,this)};function a(n,s){if(!n)throw new Error(s+" is required");if(typeof n!="string")throw new Error(s+" must be String")}},{"../utils/checkBucketName":35,"babel-runtime/regenerator":68,"js-base64":199,querystring:212}],18:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=O(I);function O(d){return d&&d.__esModule?d:{default:d}}var y=U("copy-to"),v=U("./callback"),o=U("./utils/deepCopy"),g=o.deepCopy,p=x;p.listUploads=function(a,n){var s,t,i,e;return _.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return n=n||{},s={},y(n).to(s),s.subres="uploads",t=this._objectRequestParams("GET","",s),t.query=a,t.xmlResponse=!0,t.successStatuses=[200],c.next=10,_.default.awrap(this.request(t));case 10:return i=c.sent,e=i.data.Upload||[],Array.isArray(e)||(e=[e]),e=e.map(function(u){return{name:u.Key,uploadId:u.UploadId,initiated:u.Initiated}}),c.abrupt("return",{res:i.res,uploads:e,bucket:i.data.Bucket,nextKeyMarker:i.data.NextKeyMarker,nextUploadIdMarker:i.data.NextUploadIdMarker,isTruncated:i.data.IsTruncated==="true"});case 15:case"end":return c.stop()}},null,this)},p.listParts=function(a,n,s,t){var i,e,r;return _.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return t=t||{},i={},y(t).to(i),i.subres={uploadId:n},e=this._objectRequestParams("GET",a,i),e.query=s,e.xmlResponse=!0,e.successStatuses=[200],u.next=10,_.default.awrap(this.request(e));case 10:return r=u.sent,u.abrupt("return",{res:r.res,uploadId:r.data.UploadId,bucket:r.data.Bucket,name:r.data.Key,partNumberMarker:r.data.PartNumberMarker,nextPartNumberMarker:r.data.NextPartNumberMarker,maxParts:r.data.MaxParts,isTruncated:r.data.IsTruncated,parts:r.data.Part||[]});case 12:case"end":return u.stop()}},null,this)},p.abortMultipartUpload=function(a,n,s){var t,i,e;return _.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return this._stop(),s=s||{},t={},y(s).to(t),t.subres={uploadId:n},i=this._objectRequestParams("DELETE",a,t),i.successStatuses=[204],c.next=9,_.default.awrap(this.request(i));case 9:return e=c.sent,c.abrupt("return",{res:e.res});case 11:case"end":return c.stop()}},null,this)},p.initMultipartUpload=function(a,n){var s,t,i;return _.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return n=n||{},s={},y(n).to(s),s.headers=s.headers||{},this._convertMetaToHeaders(n.meta,s.headers),s.subres="uploads",t=this._objectRequestParams("POST",a,s),t.mime=n.mime,t.xmlResponse=!0,t.successStatuses=[200],r.next=12,_.default.awrap(this.request(t));case 12:return i=r.sent,r.abrupt("return",{res:i.res,bucket:i.data.Bucket,name:i.data.Key,uploadId:i.data.UploadId});case 14:case"end":return r.stop()}},null,this)},p.uploadPart=function(a,n,s,t,i,e,r){var c;return _.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return c={stream:this._createStream(t,i,e),size:e-i},f.next=3,_.default.awrap(this._uploadPart(a,n,s,c,r));case 3:return f.abrupt("return",f.sent);case 4:case"end":return f.stop()}},null,this)},p.completeMultipartUpload=function(a,n,s,t){var i,e,r,c,u,f,m,l;return _.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:for(i=s.concat().sort(function(D,C){return D.number-C.number}).filter(function(D,C,w){return!C||D.number!==w[C-1].number}),e=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,r=0;r<i.length;r++)c=i[r],e+=`<Part>
|
|
|
`,e+="<PartNumber>"+c.number+`</PartNumber>
|
|
|
`,e+="<ETag>"+c.etag+`</ETag>
|
|
|
`,e+=`</Part>
|
|
|
`;return e+="</CompleteMultipartUpload>",t=t||{},u={},u=g(t),u.headers&&delete u.headers["x-oss-server-side-encryption"],u.subres={uploadId:n},f=this._objectRequestParams("POST",a,u),v.encodeCallback(f,u),f.mime="xml",f.content=e,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],b.next=17,_.default.awrap(this.request(f));case 17:return m=b.sent,l={res:m.res,bucket:f.bucket,name:a,etag:m.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(l.data=JSON.parse(m.data.toString())),b.abrupt("return",l);case 21:case"end":return b.stop()}},null,this)},p._uploadPart=function(a,n,s,t,i){var e,r,c;return _.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return i=i||{},e={},y(i).to(e),e.headers={"Content-Length":t.size},e.subres={partNumber:s,uploadId:n},r=this._objectRequestParams("PUT",a,e),r.mime=e.mime,r.stream=t.stream,r.successStatuses=[200],f.next=11,_.default.awrap(this.request(r));case 11:if(c=f.sent,c.res.headers.etag){f.next=14;break}throw new Error(`Please set the etag of expose-headers in OSS
|
|
|
https://help.aliyun.com/document_detail/32069.html`);case 14:return t.stream=null,r.stream=null,f.abrupt("return",{name:a,etag:c.res.headers.etag,res:c.res});case 17:case"end":return f.stop()}},null,this)}},{"./callback":14,"./utils/deepCopy":39,"babel-runtime/regenerator":68,"copy-to":76}],19:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=g(I),O=U("babel-runtime/core-js/object/keys"),y=g(O),v=U("babel-runtime/helpers/typeof"),o=g(v);function g(n){return n&&n.__esModule?n:{default:n}}var p=U("../utils/checkBucketName"),d=p.checkBucketName,a=x;a.copy=function(s,t,i,e){var r,c,u;return _.default.async(function(m){for(;;)switch(m.prev=m.next){case 0:return(typeof i=="undefined"?"undefined":(0,o.default)(i))==="object"&&(e=i),e=e||{},e.headers=e.headers||{},(0,y.default)(e.headers).forEach(function(l){e.headers["x-oss-copy-source-"+l.toLowerCase()]=e.headers[l]}),e.meta&&(e.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(e.meta,e.headers),t=this._getSourceName(t,i),e.versionId&&(t=t+"?versionId="+e.versionId),e.headers["x-oss-copy-source"]=t,r=this._objectRequestParams("PUT",s,e),r.xmlResponse=!0,r.successStatuses=[200,304],m.next=14,_.default.awrap(this.request(r));case 14:return c=m.sent,u=c.data,u&&(u={etag:u.ETag,lastModified:u.LastModified}),m.abrupt("return",{data:u,res:c.res});case 18:case"end":return m.stop()}},null,this)},a._getSourceName=function(s,t){return typeof t=="string"?s=this._objectName(s):s[0]!=="/"?t=this.options.bucket:(t=s.replace(/\/(.+?)(\/.*)/,"$1"),s=s.replace(/(\/.+?\/)(.*)/,"$2")),d(t),s=encodeURI(s),s="/"+t+"/"+s,s}},{"../utils/checkBucketName":35,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,"babel-runtime/regenerator":68}],20:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.delete=function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return d.subres=(0,y.default)({},d.subres),d.versionId&&(d.subres.versionId=d.versionId),a=this._objectRequestParams("DELETE",p,d),a.successStatuses=[204],t.next=6,_.default.awrap(this.request(a));case 6:return n=t.sent,t.abrupt("return",{res:n.res});case 8:case"end":return t.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],21:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(a){return a&&a.__esModule?a:{default:a}}var o=U("utility"),g=U("../utils/obj2xml"),p=g.obj2xml,d=x;d.deleteMulti=function(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t,i,e,r,c,u,f,m,l,E,b,D;return _.default.async(function(w){for(;;)switch(w.prev=w.next){case 0:if(t=[],!(!n||!n.length)){w.next=3;break}throw new Error("names is required");case 3:for(i=0;i<n.length;i++)e={},typeof n[i]=="string"?e.Key=o.escape(this._objectName(n[i])):(r=n[i],c=r.key,u=r.versionId,e.Key=o.escape(this._objectName(c)),e.VersionId=u),t.push(e);return f={Delete:{Quiet:!!s.quiet,Object:t}},m=p(f,{headers:!0}),s.subres=(0,y.default)({delete:""},s.subres),s.versionId&&(s.subres.versionId=s.versionId),l=this._objectRequestParams("POST","",s),l.mime="xml",l.content=m,l.xmlResponse=!0,l.successStatuses=[200],w.next=15,_.default.awrap(this.request(l));case 15:return E=w.sent,b=E.data,D=b&&b.Deleted||null,D&&(Array.isArray(D)||(D=[D])),w.abrupt("return",{res:E.res,deleted:D||[]});case 20:case"end":return w.stop()}},null,this)}},{"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,utility:290}],22:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.deleteObjectTagging=function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return d.subres=(0,y.default)({tagging:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),p=this._objectName(p),a=this._objectRequestParams("DELETE",p,d),a.successStatuses=[204],t.next=7,_.default.awrap(this.request(a));case 7:return n=t.sent,t.abrupt("return",{status:n.status,res:n.res});case 9:case"end":return t.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],23:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(d){return d&&d.__esModule?d:{default:d}}var o=U("fs"),g=U("is-type-of"),p=x;p.get=function(a,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},t,i,e,r;return _.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return t=null,i=!1,g.writableStream(n)?t=n:g.string(n)?(t=o.createWriteStream(n),i=!0):s=n,s=s||{},s.subres=(0,y.default)({},s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.process&&(s.subres["x-oss-process"]=s.process),e=void 0,u.prev=8,r=this._objectRequestParams("GET",a,s),r.writeStream=t,r.successStatuses=[200,206,304],u.next=14,_.default.awrap(this.request(r));case 14:e=u.sent,i&&t.destroy(),u.next=25;break;case 18:if(u.prev=18,u.t0=u.catch(8),!i){u.next=24;break}return t.destroy(),u.next=24,_.default.awrap(this._deleteFileSafe(n));case 24:throw u.t0;case 25:return u.abrupt("return",{res:e.res,content:e.data});case 26:case"end":return u.stop()}},null,this,[[8,18]])}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68,fs:71,"is-type-of":289}],24:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.getACL=function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return d.subres=(0,y.default)({acl:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),p=this._objectName(p),a=this._objectRequestParams("GET",p,d),a.successStatuses=[200],a.xmlResponse=!0,t.next=8,_.default.awrap(this.request(a));case 8:return n=t.sent,t.abrupt("return",{acl:n.data.AccessControlList.Grant,owner:{id:n.data.Owner.ID,displayName:n.data.Owner.DisplayName},res:n.res});case 10:case"end":return t.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],25:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=g(I),O=U("babel-runtime/regenerator"),y=g(O),v=U("babel-runtime/core-js/object/assign"),o=g(v);function g(r){return r&&r.__esModule?r:{default:r}}var p=x,d=U("../utils/isObject"),a=d.isObject,n=U("../utils/isArray"),s=n.isArray;p.getBucketVersions=t,p.listObjectVersions=t;function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u,f,m,l,E,b;return y.default.async(function(C){for(;;)switch(C.prev=C.next){case 0:if(!(r.versionIdMarker&&r.keyMarker===void 0)){C.next=2;break}throw new Error("A version-id marker cannot be specified without a key marker");case 2:return c.subres=(0,o.default)({versions:""},c.subres),c.versionId&&(c.subres.versionId=c.versionId),u=this._objectRequestParams("GET","",c),u.xmlResponse=!0,u.successStatuses=[200],u.query=e(r),C.next=10,y.default.awrap(this.request(u));case 10:return f=C.sent,m=f.data.Version||[],l=f.data.DeleteMarker||[],E=this,m&&(Array.isArray(m)||(m=[m]),m=m.map(function(w){return{name:w.Key,url:E._objectUrl(w.Key),lastModified:w.LastModified,isLatest:w.IsLatest==="true",versionId:w.VersionId,etag:w.ETag,type:w.Type,size:Number(w.Size),storageClass:w.StorageClass,owner:{id:w.Owner.ID,displayName:w.Owner.DisplayName}}})),l&&(s(l)||(l=[l]),l=l.map(function(w){return{name:w.Key,lastModified:w.LastModified,versionId:w.VersionId,owner:{id:w.Owner.ID,displayName:w.Owner.DisplayName}}})),b=f.data.CommonPrefixes||null,b&&(s(b)||(b=[b]),b=b.map(function(w){return w.Prefix})),C.abrupt("return",{res:f.res,objects:m,deleteMarker:l,prefixes:b,nextMarker:f.data.NextMarker||null,NextVersionIdMarker:f.data.NextVersionIdMarker||null,isTruncated:f.data.IsTruncated==="true"});case 19:case"end":return C.stop()}},null,this)}function i(r){return r.replace(/([A-Z])/g,"-$1").toLowerCase()}function e(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c={};return a(r)&&(0,_.default)(r).forEach(function(u){c[i(u)]=r[u]}),c}},{"../utils/isArray":42,"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],26:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.getObjectMeta=function(p,d){var a,n;return _.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:return d=d||{},p=this._objectName(p),d.subres=(0,y.default)({objectMeta:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),a=this._objectRequestParams("HEAD",p,d),a.successStatuses=[200],t.next=8,_.default.awrap(this.request(a));case 8:return n=t.sent,t.abrupt("return",{status:n.status,res:n.res});case 10:case"end":return t.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],27:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(d){return d&&d.__esModule?d:{default:d}}var o=x,g=U("../utils/isObject"),p=g.isObject;o.getObjectTagging=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,t,i,e,r;return _.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return n.subres=(0,y.default)({tagging:""},n.subres),n.versionId&&(n.subres.versionId=n.versionId),a=this._objectName(a),s=this._objectRequestParams("GET",a,n),s.successStatuses=[200],u.next=7,_.default.awrap(this.request(s));case 7:return t=u.sent,u.next=10,_.default.awrap(this.parseXML(t.data));case 10:return i=u.sent,e=i.TagSet.Tag,e=e&&p(e)?[e]:e||[],r={},e.forEach(function(f){r[f.Key]=f.Value}),u.abrupt("return",{status:t.status,res:t.res,tag:r});case 16:case"end":return u.stop()}},null,this)}},{"../utils/isObject":46,"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],28:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.getSymlink=function(p){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a,n,s;return _.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return d.subres=(0,y.default)({symlink:""},d.subres),d.versionId&&(d.subres.versionId=d.versionId),p=this._objectName(p),a=this._objectRequestParams("GET",p,d),a.successStatuses=[200],i.next=7,_.default.awrap(this.request(a));case 7:return n=i.sent,s=n.res.headers["x-oss-symlink-target"],i.abrupt("return",{targetName:decodeURIComponent(s),res:n.res});case 10:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],29:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=g(I),O=U("babel-runtime/core-js/object/keys"),y=g(O),v=U("babel-runtime/core-js/object/assign"),o=g(v);function g(d){return d&&d.__esModule?d:{default:d}}var p=x;p.head=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,t,i;return _.default.async(function(r){for(;;)switch(r.prev=r.next){case 0:return n.subres=(0,o.default)({},n.subres),n.versionId&&(n.subres.versionId=n.versionId),s=this._objectRequestParams("HEAD",a,n),s.successStatuses=[200,304],r.next=6,_.default.awrap(this.request(s));case 6:return t=r.sent,i={meta:null,res:t.res,status:t.status},t.status===200&&(0,y.default)(t.headers).forEach(function(c){c.indexOf("x-oss-meta-")===0&&(i.meta||(i.meta={}),i.meta[c.substring(11)]=t.headers[c])}),r.abrupt("return",i);case 10:case"end":return r.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],30:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.putACL=function(p,d,a){var n,s;return _.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return a=a||{},a.subres=(0,y.default)({acl:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.headers=a.headers||{},a.headers["x-oss-object-acl"]=d,p=this._objectName(p),n=this._objectRequestParams("PUT",p,a),n.successStatuses=[200],i.next=10,_.default.awrap(this.request(n));case 10:return s=i.sent,i.abrupt("return",{res:s.res});case 12:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],31:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=g(I),O=U("babel-runtime/core-js/object/keys"),y=g(O),v=U("babel-runtime/core-js/object/assign"),o=g(v);function g(t){return t&&t.__esModule?t:{default:t}}var p=U("../utils/obj2xml"),d=p.obj2xml,a=U("../utils/checkObjectTag"),n=a.checkObjectTag,s=x;s.putObjectTagging=function(i,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,u,f;return _.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:return n(e),r.subres=(0,o.default)({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),i=this._objectName(i),c=this._objectRequestParams("PUT",i,r),c.successStatuses=[200],e=(0,y.default)(e).map(function(E){return{Key:E,Value:e[E]}}),u={Tagging:{TagSet:{Tag:e}}},c.mime="xml",c.content=d(u),l.next=12,_.default.awrap(this.request(c));case 12:return f=l.sent,l.abrupt("return",{res:f.res,status:f.status});case 14:case"end":return l.stop()}},null,this)}},{"../utils/checkObjectTag":36,"../utils/obj2xml":47,"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/keys":60,"babel-runtime/regenerator":68}],32:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/object/assign"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o.putSymlink=function(p,d,a){var n,s;return _.default.async(function(i){for(;;)switch(i.prev=i.next){case 0:return a=a||{},a.headers=a.headers||{},d=this._escape(this._objectName(d)),this._convertMetaToHeaders(a.meta,a.headers),a.headers["x-oss-symlink-target"]=d,a.subres=(0,y.default)({symlink:""},a.subres),a.versionId&&(a.subres.versionId=a.versionId),a.storageClass&&(a.headers["x-oss-storage-class"]=a.storageClass),p=this._objectName(p),n=this._objectRequestParams("PUT",p,a),n.successStatuses=[200],i.next=13,_.default.awrap(this.request(n));case 13:return s=i.sent,i.abrupt("return",{res:s.res});case 15:case"end":return i.stop()}},null,this)}},{"babel-runtime/core-js/object/assign":54,"babel-runtime/regenerator":68}],33:[function(U,X,x){"use strict";var I=U("babel-runtime/regenerator"),_=v(I),O=U("babel-runtime/core-js/promise"),y=v(O);function v(g){return g&&g.__esModule?g:{default:g}}var o=x;o._parallelNode=function(p,d,a,n){var s,t,i,e,r,c,u,f;return _.default.async(function(l){for(;;)switch(l.prev=l.next){case 0:s=this,t=[],i=[],e=p.length/d,r=p.length%d,c=r===0?e:(p.length-r)/d+1,u=1,f=0;case 8:if(!(f<p.length)){l.next=26;break}if(!s.isCancel()){l.next=11;break}return l.abrupt("break",26);case 11:if(n?i.push(a(s,p[f],n)):i.push(a(s,p[f])),!(i.length===d||u===c&&f===p.length-1)){l.next=23;break}return l.prev=13,u+=1,l.next=17,_.default.awrap(y.default.all(i));case 17:l.next=22;break;case 19:l.prev=19,l.t0=l.catch(13),t.push(l.t0);case 22:i=[];case 23:f++,l.next=8;break;case 26:return l.abrupt("return",t);case 27:case"end":return l.stop()}},null,this,[[13,19]])},o._parallel=function(p,d,a){var n=this;return new y.default(function(s){var t=[];if(d<=0||!p){s(t);return}function i(b){return function(){if(b===null)throw new Error("Callback was already called.");var D=b;b=null;for(var C=arguments.length,w=Array(C),S=0;S<C;S++)w[S]=arguments[S];D.apply(this,w)}}function e(b){var D=-1,C=b.length;return function(){return++D<C&&!n.isCancel()?{value:b[D],key:D}:null}}var r=e(p),c=!1,u=0,f=!1;function m(b,D){u-=1,b?(c=!0,t.push(b),s(t)):D==={}||c&&u<=0?(c=!0,s(t)):f||(n.isCancel()?s(t):E())}function l(b,D){a(b).then(function(C){D(null,C)}).catch(function(C){D(C)})}function E(){for(f=!0;u<d&&!c&&!n.isCancel();){var b=r();if(b===null||t.length>0){c=!0,u<=0&&s(t);return}u+=1,l(b.value,i(m))}f=!1}E()})},o.cancel=function(p){this.options.cancelFlag=!0,p&&this.abortMultipartUpload(p.name,p.uploadId,p.options)},o.isCancel=function(){return this.options.cancelFlag},o.resetCancelFlag=function(){this.options.cancelFlag=!1},o._stop=function(){this.options.cancelFlag=!0},o._makeCancelEvent=function(){var p={status:0,name:"cancel"};return p}},{"babel-runtime/core-js/promise":61,"babel-runtime/regenerator":68}],34:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/core-js/json/stringify"),O=o(_),y=U("babel-runtime/core-js/object/keys"),v=o(y);function o(d){return d&&d.__esModule?d:{default:d}}var g=U("./../../shims/crypto/crypto.js"),p=U("is-type-of");x.buildCanonicalizedResource=function(a,n){var s=""+a,t="?";if(p.string(n)&&n.trim()!=="")s+=t+n;else if(p.array(n))n.sort(),s+=t+n.join("&");else if(n){var i=function(c,u){return c[0]>u[0]?1:c[0]<u[0]?-1:0},e=function(c){s+=t+c,n[c]&&(s+="="+n[c]),t="&"};(0,v.default)(n).sort(i).forEach(e)}return s},x.buildCanonicalString=function(a,n,s,t){s=s||{};var i=s.headers||{},e="x-oss-",r=[],c={},u=[a.toUpperCase(),i["Content-Md5"]||"",i["Content-Type"]||i["Content-Type".toLowerCase()],t||i["x-oss-date"]];return(0,v.default)(i).forEach(function(f){var m=f.toLowerCase();m.indexOf(e)===0&&(c[m]=String(i[f]).trim())}),(0,v.default)(c).sort().forEach(function(f){r.push(f+":"+c[f])}),u=u.concat(r),u.push(this.buildCanonicalizedResource(n,s.parameters)),u.join(`
|
|
|
`)},x.computeSignature=function(a,n){var s=g.createHmac("sha1",a);return s.update(I.from(n,"utf8")).digest("base64")},x.authorization=function(a,n,s){return"OSS "+a+":"+this.computeSignature(n,s)},x._signatureForURL=function(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments[2],t=arguments[3],i={},e=n.subResource,r=e===void 0?{}:e;if(n.process){var c="x-oss-process";r[c]=n.process}if(n.trafficLimit){var u="x-oss-traffic-limit";r[u]=n.trafficLimit}if(n.response&&(0,v.default)(n.response).forEach(function(E){var b="response-"+E.toLowerCase();r[b]=n.response[E]}),(0,v.default)(n).forEach(function(E){var b=E.toLowerCase(),D=n[E];b.indexOf("x-oss-")===0?i[b]=D:(b.indexOf("content-md5")===0||b.indexOf("content-type")===0)&&(i[E]=D)}),Object.prototype.hasOwnProperty.call(n,"security-token")&&(r["security-token"]=n["security-token"]),Object.prototype.hasOwnProperty.call(n,"callback")){var f={callbackUrl:encodeURI(n.callback.url),callbackBody:n.callback.body};if(n.callback.host&&(f.callbackHost=n.callback.host),n.callback.contentType&&(f.callbackBodyType=n.callback.contentType),r.callback=I.from((0,O.default)(f)).toString("base64"),n.callback.customValue){var m={};(0,v.default)(n.callback.customValue).forEach(function(E){m["x:"+E]=n.callback.customValue[E]}),r["callback-var"]=I.from((0,O.default)(m)).toString("base64")}}var l=this.buildCanonicalString(n.method,s,{headers:i,parameters:r},t.toString());return{Signature:this.computeSignature(a,l),subResource:r}}}).call(this,U("buffer").Buffer)},{"./../../shims/crypto/crypto.js":284,"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/keys":60,buffer:73,"is-type-of":289}],35:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.checkBucketName=void 0,x.checkBucketName=function(I,_){var O=_?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/;if(!O.test(I))throw new Error("The bucket must be conform to the specifications")}},{}],36:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/entries"),_=O(I);function O(n){return n&&n.__esModule?n:{default:n}}Object.defineProperty(x,"__esModule",{value:!0}),x.checkObjectTag=void 0;var y=U("./checkValid"),v=y.checkValid,o=U("./isObject"),g=o.isObject,p=[{validator:function(s){if(typeof s!="string")throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],d={key:[].concat(p,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(p,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(n){if(!g(n))throw new Error("tag must be Object");var s=(0,_.default)(n);if(s.length>10)throw new Error("maximum of 10 tags for a object");var t=["key","value"];s.forEach(function(i){i.forEach(function(e,r){v(e,d[t[r]])})})}x.checkObjectTag=a},{"./checkValid":37,"./isObject":46,"babel-runtime/core-js/object/entries":57}],37:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.checkValid=void 0;function I(_,O){O.forEach(function(y){if(y.validator)y.validator(_);else if(y.pattern&&!y.pattern.test(_))throw new Error(y.msg)})}x.checkValid=I},{}],38:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/core-js/object/assign"),O=y(_);function y(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(x,"__esModule",{value:!0}),x.createRequest=void 0;var v=U("./../../../shims/crypto/crypto.js"),o=U("debug")("ali-oss"),g=U("mime"),p=U("dateformat"),d=U("copy-to"),a=U("path");function n(i,e){return i[e]||i[e.toLowerCase()]}function s(i,e){delete i[e],delete i[e.toLowerCase()]}function t(i){var e=new Date;this.options.amendTimeSkewed&&(e=+new Date+this.options.amendTimeSkewed);var r={"x-oss-date":p(e,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.userAgent.includes("nodejs")&&(r["User-Agent"]=this.userAgent),this.options.isRequestPay&&(0,O.default)(r,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(r["x-oss-security-token"]=this.options.stsToken),d(i.headers).to(r),n(r,"Content-Type")||(i.mime&&i.mime.indexOf("/")>0?r["Content-Type"]=i.mime:r["Content-Type"]=g.getType(i.mime||a.extname(i.object||""))),n(r,"Content-Type")||s(r,"Content-Type"),i.content&&(r["Content-Md5"]=v.createHash("md5").update(I.from(i.content,"utf8")).digest("base64"),r["Content-Length"]||(r["Content-Length"]=i.content.length));var c=this._getResource(i);r.authorization=this.authorization(i.method,c,i.subres,r);var u=this._getReqUrl(i);o("request %s %s, with headers %j, !!stream: %s",i.method,u,r,!!i.stream);var f=i.timeout||this.options.timeout,m={method:i.method,content:i.content,stream:i.stream,headers:r,timeout:f,writeStream:i.writeStream,customResponse:i.customResponse,ctx:i.ctx||this.ctx};return this.agent&&(m.agent=this.agent),this.httpsAgent&&(m.httpsAgent=this.httpsAgent),{url:u,params:m}}x.createRequest=t}).call(this,U("buffer").Buffer)},{"./../../../shims/crypto/crypto.js":284,"babel-runtime/core-js/object/assign":54,buffer:73,"copy-to":76,dateformat:190,debug:288,mime:202,path:205}],39:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=v(I),O=U("babel-runtime/helpers/typeof"),y=v(O);function v(o){return o&&o.__esModule?o:{default:o}}Object.defineProperty(x,"__esModule",{value:!0}),x.deepCopy=void 0,x.deepCopy=function(o){if(o===null||(typeof o=="undefined"?"undefined":(0,y.default)(o))!=="object")return o;var g=Array.isArray(o)?[]:{};return(0,_.default)(o).forEach(function(p){g[p]=x.deepCopy(o[p])}),g}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],40:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=v(I),O=U("babel-runtime/helpers/typeof"),y=v(O);function v(p){return p&&p.__esModule?p:{default:p}}Object.defineProperty(x,"__esModule",{value:!0}),x.formatObjKey=void 0;function o(p,d){if(p===null||(typeof p=="undefined"?"undefined":(0,y.default)(p))!=="object")return p;var a=void 0;if(Array.isArray(p)){a=[];for(var n=0;n<p.length;n++)a.push(o(p[n],d))}else a={},(0,_.default)(p).forEach(function(s){a[g(s,d)]=o(p[s],d)});return a}x.formatObjKey=o;function g(p,d){return d==="firstUpperCase"?p=p.replace(/^./,function(a){return a.toUpperCase()}):d==="firstLowerCase"&&(p=p.replace(/^./,function(a){return a.toLowerCase()})),p}},{"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67}],41:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.getStrBytesCount=void 0;function I(_){for(var O=0,y=0;y<_.length;y++){var v=_.charAt(y);/^[\u00-\uff]$/.test(v)?O+=1:O+=2}return O}x.getStrBytesCount=I},{}],42:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.isArray=void 0,x.isArray=function(I){return Object.prototype.toString.call(I)==="[object Array]"}},{}],43:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.isBlob=void 0;function I(_){return typeof Blob!="undefined"&&_ instanceof Blob}x.isBlob=I},{}],44:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.isFile=void 0,x.isFile=function(I){return typeof File!="undefined"&&I instanceof File}},{}],45:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.isIP=void 0,x.isIP=function(I){var _=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,O=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return _.test(I)||O.test(I)}},{}],46:[function(U,X,x){"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.isObject=void 0,x.isObject=function(I){return Object.prototype.toString.call(I)==="[object Object]"}},{}],47:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=O(I);function O(g){return g&&g.__esModule?g:{default:g}}Object.defineProperty(x,"__esModule",{value:!0}),x.obj2xml=void 0;var y=U("./formatObjKey");function v(g){return Object.prototype.toString.call(g).replace(/(.*? |])/g,"").toLowerCase()}function o(g,p){var d="";return p&&p.headers&&(d=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
`),p&&p.firstUpperCase&&(g=y.formatObjKey(g,"firstUpperCase")),v(g)==="object"?(0,_.default)(g).forEach(function(a){v(g[a])==="string"||v(g[a])==="number"?d+="<"+a+">"+g[a]+"</"+a+">":v(g[a])==="object"?d+="<"+a+">"+o(g[a])+"</"+a+">":v(g[a])==="array"?d+=g[a].map(function(n){return"<"+a+">"+o(n)+"</"+a+">"}).join(""):d+="<"+a+">"+g[a].toString()+"</"+a+">"}):d+=g.toString(),d}x.obj2xml=o},{"./formatObjKey":40,"babel-runtime/core-js/object/keys":60}],48:[function(U,X,x){X.exports=I,X.exports.HttpsAgent=I;function I(){}},{}],49:[function(U,X,x){X.exports=U("./register")().Promise},{"./register":51}],50:[function(U,X,x){"use strict";var I="@@any-promise/REGISTRATION",_=null;X.exports=function(O,y){return function(o,g){o=o||null,g=g||{};var p=g.global!==!1;if(_===null&&p&&(_=O[I]||null),_!==null&&o!==null&&_.implementation!==o)throw new Error('any-promise already defined as "'+_.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return _===null&&(o!==null&&typeof g.Promise!="undefined"?_={Promise:g.Promise,implementation:o}:_=y(o),p&&(O[I]=_)),_}}},{}],51:[function(U,X,x){"use strict";X.exports=U("./loader")(window,I);function I(){if(typeof window.Promise=="undefined")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":50}],52:[function(U,X,x){X.exports={default:U("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":77}],53:[function(U,X,x){X.exports={default:U("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":78}],54:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":79}],55:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":80}],56:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":81}],57:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/entries"),__esModule:!0}},{"core-js/library/fn/object/entries":82}],58:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":83}],59:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":84}],60:[function(U,X,x){X.exports={default:U("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":85}],61:[function(U,X,x){X.exports={default:U("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":86}],62:[function(U,X,x){X.exports={default:U("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":87}],63:[function(U,X,x){X.exports={default:U("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":88}],64:[function(U,X,x){X.exports={default:U("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":90}],65:[function(U,X,x){X.exports={default:U("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":89}],66:[function(U,X,x){X.exports={default:U("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":91}],67:[function(U,X,x){"use strict";x.__esModule=!0;var I=U("../core-js/symbol/iterator"),_=o(I),O=U("../core-js/symbol"),y=o(O),v=typeof y.default=="function"&&typeof _.default=="symbol"?function(g){return typeof g}:function(g){return g&&typeof y.default=="function"&&g.constructor===y.default&&g!==y.default.prototype?"symbol":typeof g};function o(g){return g&&g.__esModule?g:{default:g}}x.default=typeof y.default=="function"&&v(_.default)==="symbol"?function(g){return typeof g=="undefined"?"undefined":v(g)}:function(g){return g&&typeof y.default=="function"&&g.constructor===y.default&&g!==y.default.prototype?"symbol":typeof g=="undefined"?"undefined":v(g)}},{"../core-js/symbol":64,"../core-js/symbol/iterator":66}],68:[function(U,X,x){X.exports=U("regenerator-runtime")},{"regenerator-runtime":226}],69:[function(U,X,x){"use strict";x.byteLength=p,x.toByteArray=a,x.fromByteArray=t;for(var I=[],_=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",v=0,o=y.length;v<o;++v)I[v]=y[v],_[y.charCodeAt(v)]=v;_["-".charCodeAt(0)]=62,_["_".charCodeAt(0)]=63;function g(i){var e=i.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=i.indexOf("=");r===-1&&(r=e);var c=r===e?0:4-r%4;return[r,c]}function p(i){var e=g(i),r=e[0],c=e[1];return(r+c)*3/4-c}function d(i,e,r){return(e+r)*3/4-r}function a(i){var e,r=g(i),c=r[0],u=r[1],f=new O(d(i,c,u)),m=0,l=u>0?c-4:c,E;for(E=0;E<l;E+=4)e=_[i.charCodeAt(E)]<<18|_[i.charCodeAt(E+1)]<<12|_[i.charCodeAt(E+2)]<<6|_[i.charCodeAt(E+3)],f[m++]=e>>16&255,f[m++]=e>>8&255,f[m++]=e&255;return u===2&&(e=_[i.charCodeAt(E)]<<2|_[i.charCodeAt(E+1)]>>4,f[m++]=e&255),u===1&&(e=_[i.charCodeAt(E)]<<10|_[i.charCodeAt(E+1)]<<4|_[i.charCodeAt(E+2)]>>2,f[m++]=e>>8&255,f[m++]=e&255),f}function n(i){return I[i>>18&63]+I[i>>12&63]+I[i>>6&63]+I[i&63]}function s(i,e,r){for(var c,u=[],f=e;f<r;f+=3)c=(i[f]<<16&16711680)+(i[f+1]<<8&65280)+(i[f+2]&255),u.push(n(c));return u.join("")}function t(i){for(var e,r=i.length,c=r%3,u=[],f=16383,m=0,l=r-c;m<l;m+=f)u.push(s(i,m,m+f>l?l:m+f));return c===1?(e=i[r-1],u.push(I[e>>2]+I[e<<4&63]+"==")):c===2&&(e=(i[r-2]<<8)+i[r-1],u.push(I[e>>10]+I[e>>4&63]+I[e<<2&63]+"=")),u.join("")}},{}],70:[function(U,X,x){/*!
|
|
|
* Bowser - a browser detector
|
|
|
* https://github.com/ded/bowser
|
|
|
* MIT License | (c) Dustin Diaz 2015
|
|
|
*/!function(I,_,O){typeof X!="undefined"&&X.exports?X.exports=O():typeof define=="function"&&define.amd?define(_,O):I[_]=O()}(this,"bowser",function(){var I=!0;function _(d){function a(K){var F=d.match(K);return F&&F.length>1&&F[1]||""}function n(K){var F=d.match(K);return F&&F.length>1&&F[2]||""}var s=a(/(ipod|iphone|ipad)/i).toLowerCase(),t=/like android/i.test(d),i=!t&&/android/i.test(d),e=/nexus\s*[0-6]\s*/i.test(d),r=!e&&/nexus\s*[0-9]+/i.test(d),c=/CrOS/.test(d),u=/silk/i.test(d),f=/sailfish/i.test(d),m=/tizen/i.test(d),l=/(web|hpw)(o|0)s/i.test(d),E=/windows phone/i.test(d),b=/SamsungBrowser/i.test(d),D=!E&&/windows/i.test(d),C=!s&&!u&&/macintosh/i.test(d),w=!i&&!f&&!m&&!l&&/linux/i.test(d),S=n(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),A=a(/version\/(\d+(\.\d+)?)/i),R=/tablet/i.test(d)&&!/tablet pc/i.test(d),k=!R&&/[^-]mobi/i.test(d),L=/xbox/i.test(d),M;/opera/i.test(d)?M={name:"Opera",opera:I,version:A||a(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(d)?M={name:"Opera",opera:I,version:a(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||A}:/SamsungBrowser/i.test(d)?M={name:"Samsung Internet for Android",samsungBrowser:I,version:A||a(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/Whale/i.test(d)?M={name:"NAVER Whale browser",whale:I,version:a(/(?:whale)[\s\/](\d+(?:\.\d+)+)/i)}:/MZBrowser/i.test(d)?M={name:"MZ Browser",mzbrowser:I,version:a(/(?:MZBrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/coast/i.test(d)?M={name:"Opera Coast",coast:I,version:A||a(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/focus/i.test(d)?M={name:"Focus",focus:I,version:a(/(?:focus)[\s\/](\d+(?:\.\d+)+)/i)}:/yabrowser/i.test(d)?M={name:"Yandex Browser",yandexbrowser:I,version:A||a(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(d)?M={name:"UC Browser",ucbrowser:I,version:a(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(d)?M={name:"Maxthon",maxthon:I,version:a(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(d)?M={name:"Epiphany",epiphany:I,version:a(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(d)?M={name:"Puffin",puffin:I,version:a(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(d)?M={name:"Sleipnir",sleipnir:I,version:a(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(d)?M={name:"K-Meleon",kMeleon:I,version:a(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:E?(M={name:"Windows Phone",osname:"Windows Phone",windowsphone:I},S?(M.msedge=I,M.version=S):(M.msie=I,M.version=a(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(d)?M={name:"Internet Explorer",msie:I,version:a(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:c?M={name:"Chrome",osname:"Chrome OS",chromeos:I,chromeBook:I,chrome:I,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(d)?M={name:"Microsoft Edge",msedge:I,version:S}:/vivaldi/i.test(d)?M={name:"Vivaldi",vivaldi:I,version:a(/vivaldi\/(\d+(\.\d+)?)/i)||A}:f?M={name:"Sailfish",osname:"Sailfish OS",sailfish:I,version:a(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(d)?M={name:"SeaMonkey",seamonkey:I,version:a(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(d)?(M={name:"Firefox",firefox:I,version:a(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(d)&&(M.firefoxos=I,M.osname="Firefox OS")):u?M={name:"Amazon Silk",silk:I,version:a(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(d)?M={name:"PhantomJS",phantom:I,version:a(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(d)?M={name:"SlimerJS",slimer:I,version:a(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(d)||/rim\stablet/i.test(d)?M={name:"BlackBerry",osname:"BlackBerry OS",blackberry:I,version:A||a(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:l?(M={name:"WebOS",osname:"WebOS",webos:I,version:A||a(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(d)&&(M.touchpad=I)):/bada/i.test(d)?M={name:"Bada",osname:"Bada",bada:I,version:a(/dolfin\/(\d+(\.\d+)?)/i)}:m?M={name:"Tizen",osname:"Tizen",tizen:I,version:a(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||A}:/qupzilla/i.test(d)?M={name:"QupZilla",qupzilla:I,version:a(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||A}:/chromium/i.test(d)?M={name:"Chromium",chromium:I,version:a(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||A}:/chrome|crios|crmo/i.test(d)?M={name:"Chrome",chrome:I,version:a(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:i?M={name:"Android",version:A}:/safari|applewebkit/i.test(d)?(M={name:"Safari",safari:I},A&&(M.version=A)):s?(M={name:s=="iphone"?"iPhone":s=="ipad"?"iPad":"iPod"},A&&(M.version=A)):/googlebot/i.test(d)?M={name:"Googlebot",googlebot:I,version:a(/googlebot\/(\d+(\.\d+))/i)||A}:M={name:a(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!M.msedge&&/(apple)?webkit/i.test(d)?(/(apple)?webkit\/537\.36/i.test(d)?(M.name=M.name||"Blink",M.blink=I):(M.name=M.name||"Webkit",M.webkit=I),!M.version&&A&&(M.version=A)):!M.opera&&/gecko\//i.test(d)&&(M.name=M.name||"Gecko",M.gecko=I,M.version=M.version||a(/gecko\/(\d+(\.\d+)?)/i)),!M.windowsphone&&(i||M.silk)?(M.android=I,M.osname="Android"):!M.windowsphone&&s?(M[s]=I,M.ios=I,M.osname="iOS"):C?(M.mac=I,M.osname="macOS"):L?(M.xbox=I,M.osname="Xbox"):D?(M.windows=I,M.osname="Windows"):w&&(M.linux=I,M.osname="Linux");function G(K){switch(K){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var W="";M.windows?W=G(a(/Windows ((NT|XP)( \d\d?.\d)?)/i)):M.windowsphone?W=a(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):M.mac?(W=a(/Mac OS X (\d+([_\.\s]\d+)*)/i),W=W.replace(/[_\s]/g,".")):s?(W=a(/os (\d+([_\s]\d+)*) like mac os x/i),W=W.replace(/[_\s]/g,".")):i?W=a(/android[ \/-](\d+(\.\d+)*)/i):M.webos?W=a(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):M.blackberry?W=a(/rim\stablet\sos\s(\d+(\.\d+)*)/i):M.bada?W=a(/bada\/(\d+(\.\d+)*)/i):M.tizen&&(W=a(/tizen[\/\s](\d+(\.\d+)*)/i)),W&&(M.osversion=W);var N=!M.windows&&W.split(".")[0];return R||r||s=="ipad"||i&&(N==3||N>=4&&!k)||M.silk?M.tablet=I:(k||s=="iphone"||s=="ipod"||i||e||M.blackberry||M.webos||M.bada)&&(M.mobile=I),M.msedge||M.msie&&M.version>=10||M.yandexbrowser&&M.version>=15||M.vivaldi&&M.version>=1||M.chrome&&M.version>=20||M.samsungBrowser&&M.version>=4||M.whale&&o([M.version,"1.0"])===1||M.mzbrowser&&o([M.version,"6.0"])===1||M.focus&&o([M.version,"1.0"])===1||M.firefox&&M.version>=20||M.safari&&M.version>=6||M.opera&&M.version>=10||M.ios&&M.osversion&&M.osversion.split(".")[0]>=6||M.blackberry&&M.version>=10.1||M.chromium&&M.version>=20?M.a=I:M.msie&&M.version<10||M.chrome&&M.version<20||M.firefox&&M.version<20||M.safari&&M.version<6||M.opera&&M.version<10||M.ios&&M.osversion&&M.osversion.split(".")[0]<6||M.chromium&&M.version<20?M.c=I:M.x=I,M}var O=_(typeof navigator!="undefined"&&navigator.userAgent||"");O.test=function(d){for(var a=0;a<d.length;++a){var n=d[a];if(typeof n=="string"&&n in O)return!0}return!1};function y(d){return d.split(".").length}function v(d,a){var n=[],s;if(Array.prototype.map)return Array.prototype.map.call(d,a);for(s=0;s<d.length;s++)n.push(a(d[s]));return n}function o(d){for(var a=Math.max(y(d[0]),y(d[1])),n=v(d,function(s){var t=a-y(s);return s=s+new Array(t+1).join(".0"),v(s.split("."),function(i){return new Array(20-i.length).join("0")+i}).reverse()});--a>=0;){if(n[0][a]>n[1][a])return 1;if(n[0][a]===n[1][a]){if(a===0)return 0}else return-1}}function g(d,a,n){var s=O;typeof a=="string"&&(n=a,a=void 0),a===void 0&&(a=!1),n&&(s=_(n));var t=""+s.version;for(var i in d)if(d.hasOwnProperty(i)&&s[i]){if(typeof d[i]!="string")throw new Error("Browser version in the minVersion map should be a string: "+i+": "+String(d));return o([t,d[i]])<0}return a}function p(d,a,n){return!g(d,a,n)}return O.isUnsupportedBrowser=g,O.compareVersions=o,O.check=p,O._detect=_,O.detect=_,O})},{}],71:[function(U,X,x){},{}],72:[function(U,X,x){var I=U("buffer").Buffer,_=I.isEncoding||function(p){switch(p&&p.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}};function O(p){if(p&&!_(p))throw new Error("Unknown encoding: "+p)}var y=x.StringDecoder=function(p){this.encoding=(p||"utf8").toLowerCase().replace(/[-_]/,""),O(p);switch(this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=g;break;default:this.write=v;return}this.charBuffer=new I(6),this.charReceived=0,this.charLength=0};y.prototype.write=function(p){for(var d="";this.charLength;){var a=p.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:p.length;if(p.copy(this.charBuffer,this.charReceived,0,a),this.charReceived+=a,this.charReceived<this.charLength)return"";p=p.slice(a,p.length),d=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var s=d.charCodeAt(d.length-1);if(s>=55296&&s<=56319){this.charLength+=this.surrogateSize,d="";continue}if(this.charReceived=this.charLength=0,p.length===0)return d;break}this.detectIncompleteChar(p);var n=p.length;this.charLength&&(p.copy(this.charBuffer,0,p.length-this.charReceived,n),n-=this.charReceived),d+=p.toString(this.encoding,0,n);var n=d.length-1,s=d.charCodeAt(n);if(s>=55296&&s<=56319){var t=this.surrogateSize;return this.charLength+=t,this.charReceived+=t,this.charBuffer.copy(this.charBuffer,t,0,t),p.copy(this.charBuffer,0,0,t),d.substring(0,n)}return d},y.prototype.detectIncompleteChar=function(p){for(var d=p.length>=3?3:p.length;d>0;d--){var a=p[p.length-d];if(d==1&&a>>5==6){this.charLength=2;break}if(d<=2&&a>>4==14){this.charLength=3;break}if(d<=3&&a>>3==30){this.charLength=4;break}}this.charReceived=d},y.prototype.end=function(p){var d="";if(p&&p.length&&(d=this.write(p)),this.charReceived){var a=this.charReceived,n=this.charBuffer,s=this.encoding;d+=n.slice(0,a).toString(s)}return d};function v(p){return p.toString(this.encoding)}function o(p){this.charReceived=p.length%2,this.charLength=this.charReceived?2:0}function g(p){this.charReceived=p.length%3,this.charLength=this.charReceived?3:0}},{buffer:73}],73:[function(U,X,x){(function(I,_){/*!
|
|
|
* The buffer module from node.js, for the browser.
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
|
* @license MIT
|
|
|
*/"use strict";var O=U("base64-js"),y=U("ieee754"),v=U("isarray");x.Buffer=_,x.SlowBuffer=u,x.INSPECT_MAX_BYTES=50,_.TYPED_ARRAY_SUPPORT=I.TYPED_ARRAY_SUPPORT!==void 0?I.TYPED_ARRAY_SUPPORT:o(),x.kMaxLength=g();function o(){try{var ae=new Uint8Array(1);return ae.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ae.foo()===42&&typeof ae.subarray=="function"&&ae.subarray(1,1).byteLength===0}catch(Z){return!1}}function g(){return _.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function p(ae,Z){if(g()<Z)throw new RangeError("Invalid typed array length");return _.TYPED_ARRAY_SUPPORT?(ae=new Uint8Array(Z),ae.__proto__=_.prototype):(ae===null&&(ae=new _(Z)),ae.length=Z),ae}function _(ae,Z,Y){if(!_.TYPED_ARRAY_SUPPORT&&!(this instanceof _))return new _(ae,Z,Y);if(typeof ae=="number"){if(typeof Z=="string")throw new Error("If encoding is specified then the first argument must be a string");return s(this,ae)}return d(this,ae,Z,Y)}_.poolSize=8192,_._augment=function(ae){return ae.__proto__=_.prototype,ae};function d(ae,Z,Y,q){if(typeof Z=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Z instanceof ArrayBuffer?e(ae,Z,Y,q):typeof Z=="string"?t(ae,Z,Y):r(ae,Z)}_.from=function(ae,Z,Y){return d(null,ae,Z,Y)},_.TYPED_ARRAY_SUPPORT&&(_.prototype.__proto__=Uint8Array.prototype,_.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&_[Symbol.species]===_&&Object.defineProperty(_,Symbol.species,{value:null,configurable:!0}));function a(ae){if(typeof ae!="number")throw new TypeError('"size" argument must be a number');if(ae<0)throw new RangeError('"size" argument must not be negative')}function n(ae,Z,Y,q){return a(Z),Z<=0?p(ae,Z):Y!==void 0?typeof q=="string"?p(ae,Z).fill(Y,q):p(ae,Z).fill(Y):p(ae,Z)}_.alloc=function(ae,Z,Y){return n(null,ae,Z,Y)};function s(ae,Z){if(a(Z),ae=p(ae,Z<0?0:c(Z)|0),!_.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<Z;++Y)ae[Y]=0;return ae}_.allocUnsafe=function(ae){return s(null,ae)},_.allocUnsafeSlow=function(ae){return s(null,ae)};function t(ae,Z,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!_.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var q=f(Z,Y)|0;ae=p(ae,q);var ve=ae.write(Z,Y);return ve!==q&&(ae=ae.slice(0,ve)),ae}function i(ae,Z){var Y=Z.length<0?0:c(Z.length)|0;ae=p(ae,Y);for(var q=0;q<Y;q+=1)ae[q]=Z[q]&255;return ae}function e(ae,Z,Y,q){if(Z.byteLength,Y<0||Z.byteLength<Y)throw new RangeError("'offset' is out of bounds");if(Z.byteLength<Y+(q||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&q===void 0?Z=new Uint8Array(Z):q===void 0?Z=new Uint8Array(Z,Y):Z=new Uint8Array(Z,Y,q),_.TYPED_ARRAY_SUPPORT?(ae=Z,ae.__proto__=_.prototype):ae=i(ae,Z),ae}function r(ae,Z){if(_.isBuffer(Z)){var Y=c(Z.length)|0;return ae=p(ae,Y),ae.length===0||Z.copy(ae,0,0,Y),ae}if(Z){if(typeof ArrayBuffer!="undefined"&&Z.buffer instanceof ArrayBuffer||"length"in Z)return typeof Z.length!="number"||Fe(Z.length)?p(ae,0):i(ae,Z);if(Z.type==="Buffer"&&v(Z.data))return i(ae,Z.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function c(ae){if(ae>=g())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g().toString(16)+" bytes");return ae|0}function u(ae){return+ae!=ae&&(ae=0),_.alloc(+ae)}_.isBuffer=function(Z){return!!(Z!=null&&Z._isBuffer)},_.compare=function(Z,Y){if(!_.isBuffer(Z)||!_.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(Z===Y)return 0;for(var q=Z.length,ve=Y.length,pe=0,Te=Math.min(q,ve);pe<Te;++pe)if(Z[pe]!==Y[pe]){q=Z[pe],ve=Y[pe];break}return q<ve?-1:ve<q?1:0},_.isEncoding=function(Z){switch(String(Z).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}},_.concat=function(Z,Y){if(!v(Z))throw new TypeError('"list" argument must be an Array of Buffers');if(Z.length===0)return _.alloc(0);var q;if(Y===void 0)for(Y=0,q=0;q<Z.length;++q)Y+=Z[q].length;var ve=_.allocUnsafe(Y),pe=0;for(q=0;q<Z.length;++q){var Te=Z[q];if(!_.isBuffer(Te))throw new TypeError('"list" argument must be an Array of Buffers');Te.copy(ve,pe),pe+=Te.length}return ve};function f(ae,Z){if(_.isBuffer(ae))return ae.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ae)||ae instanceof ArrayBuffer))return ae.byteLength;typeof ae!="string"&&(ae=""+ae);var Y=ae.length;if(Y===0)return 0;for(var q=!1;;)switch(Z){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return oe(ae).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return ie(ae).length;default:if(q)return oe(ae).length;Z=(""+Z).toLowerCase(),q=!0}}_.byteLength=f;function m(ae,Z,Y){var q=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,Z>>>=0,Y<=Z)return"";for(ae||(ae="utf8");;)switch(ae){case"hex":return K(this,Z,Y);case"utf8":case"utf-8":return L(this,Z,Y);case"ascii":return W(this,Z,Y);case"latin1":case"binary":return N(this,Z,Y);case"base64":return k(this,Z,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,Z,Y);default:if(q)throw new TypeError("Unknown encoding: "+ae);ae=(ae+"").toLowerCase(),q=!0}}_.prototype._isBuffer=!0;function l(ae,Z,Y){var q=ae[Z];ae[Z]=ae[Y],ae[Y]=q}_.prototype.swap16=function(){var Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y<Z;Y+=2)l(this,Y,Y+1);return this},_.prototype.swap32=function(){var Z=this.length;if(Z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Y=0;Y<Z;Y+=4)l(this,Y,Y+3),l(this,Y+1,Y+2);return this},_.prototype.swap64=function(){var Z=this.length;if(Z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Y=0;Y<Z;Y+=8)l(this,Y,Y+7),l(this,Y+1,Y+6),l(this,Y+2,Y+5),l(this,Y+3,Y+4);return this},_.prototype.toString=function(){var Z=this.length|0;return Z===0?"":arguments.length===0?L(this,0,Z):m.apply(this,arguments)},_.prototype.equals=function(Z){if(!_.isBuffer(Z))throw new TypeError("Argument must be a Buffer");return this===Z?!0:_.compare(this,Z)===0},_.prototype.inspect=function(){var Z="",Y=x.INSPECT_MAX_BYTES;return this.length>0&&(Z=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(Z+=" ... ")),"<Buffer "+Z+">"},_.prototype.compare=function(Z,Y,q,ve,pe){if(!_.isBuffer(Z))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),q===void 0&&(q=Z?Z.length:0),ve===void 0&&(ve=0),pe===void 0&&(pe=this.length),Y<0||q>Z.length||ve<0||pe>this.length)throw new RangeError("out of range index");if(ve>=pe&&Y>=q)return 0;if(ve>=pe)return-1;if(Y>=q)return 1;if(Y>>>=0,q>>>=0,ve>>>=0,pe>>>=0,this===Z)return 0;for(var Te=pe-ve,Ne=q-Y,me=Math.min(Te,Ne),Ie=this.slice(ve,pe),_e=Z.slice(Y,q),Ve=0;Ve<me;++Ve)if(Ie[Ve]!==_e[Ve]){Te=Ie[Ve],Ne=_e[Ve];break}return Te<Ne?-1:Ne<Te?1:0};function E(ae,Z,Y,q,ve){if(ae.length===0)return-1;if(typeof Y=="string"?(q=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=ve?0:ae.length-1),Y<0&&(Y=ae.length+Y),Y>=ae.length){if(ve)return-1;Y=ae.length-1}else if(Y<0)if(ve)Y=0;else return-1;if(typeof Z=="string"&&(Z=_.from(Z,q)),_.isBuffer(Z))return Z.length===0?-1:b(ae,Z,Y,q,ve);if(typeof Z=="number")return Z=Z&255,_.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ve?Uint8Array.prototype.indexOf.call(ae,Z,Y):Uint8Array.prototype.lastIndexOf.call(ae,Z,Y):b(ae,[Z],Y,q,ve);throw new TypeError("val must be string, number or Buffer")}function b(ae,Z,Y,q,ve){var pe=1,Te=ae.length,Ne=Z.length;if(q!==void 0&&(q=String(q).toLowerCase(),q==="ucs2"||q==="ucs-2"||q==="utf16le"||q==="utf-16le")){if(ae.length<2||Z.length<2)return-1;pe=2,Te/=2,Ne/=2,Y/=2}function me(Ge,Le){return pe===1?Ge[Le]:Ge.readUInt16BE(Le*pe)}var Ie;if(ve){var _e=-1;for(Ie=Y;Ie<Te;Ie++)if(me(ae,Ie)===me(Z,_e===-1?0:Ie-_e)){if(_e===-1&&(_e=Ie),Ie-_e+1===Ne)return _e*pe}else _e!==-1&&(Ie-=Ie-_e),_e=-1}else for(Y+Ne>Te&&(Y=Te-Ne),Ie=Y;Ie>=0;Ie--){for(var Ve=!0,tt=0;tt<Ne;tt++)if(me(ae,Ie+tt)!==me(Z,tt)){Ve=!1;break}if(Ve)return Ie}return-1}_.prototype.includes=function(Z,Y,q){return this.indexOf(Z,Y,q)!==-1},_.prototype.indexOf=function(Z,Y,q){return E(this,Z,Y,q,!0)},_.prototype.lastIndexOf=function(Z,Y,q){return E(this,Z,Y,q,!1)};function D(ae,Z,Y,q){Y=Number(Y)||0;var ve=ae.length-Y;q?(q=Number(q),q>ve&&(q=ve)):q=ve;var pe=Z.length;if(pe%2!==0)throw new TypeError("Invalid hex string");q>pe/2&&(q=pe/2);for(var Te=0;Te<q;++Te){var Ne=parseInt(Z.substr(Te*2,2),16);if(isNaN(Ne))return Te;ae[Y+Te]=Ne}return Te}function C(ae,Z,Y,q){return de(oe(Z,ae.length-Y),ae,Y,q)}function w(ae,Z,Y,q){return de(se(Z),ae,Y,q)}function S(ae,Z,Y,q){return w(ae,Z,Y,q)}function A(ae,Z,Y,q){return de(ie(Z),ae,Y,q)}function R(ae,Z,Y,q){return de(be(Z,ae.length-Y),ae,Y,q)}_.prototype.write=function(Z,Y,q,ve){if(Y===void 0)ve="utf8",q=this.length,Y=0;else if(q===void 0&&typeof Y=="string")ve=Y,q=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(q)?(q=q|0,ve===void 0&&(ve="utf8")):(ve=q,q=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var pe=this.length-Y;if((q===void 0||q>pe)&&(q=pe),Z.length>0&&(q<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");ve||(ve="utf8");for(var Te=!1;;)switch(ve){case"hex":return D(this,Z,Y,q);case"utf8":case"utf-8":return C(this,Z,Y,q);case"ascii":return w(this,Z,Y,q);case"latin1":case"binary":return S(this,Z,Y,q);case"base64":return A(this,Z,Y,q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,Z,Y,q);default:if(Te)throw new TypeError("Unknown encoding: "+ve);ve=(""+ve).toLowerCase(),Te=!0}},_.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(ae,Z,Y){return Z===0&&Y===ae.length?O.fromByteArray(ae):O.fromByteArray(ae.slice(Z,Y))}function L(ae,Z,Y){Y=Math.min(ae.length,Y);for(var q=[],ve=Z;ve<Y;){var pe=ae[ve],Te=null,Ne=pe>239?4:pe>223?3:pe>191?2:1;if(ve+Ne<=Y){var me,Ie,_e,Ve;switch(Ne){case 1:pe<128&&(Te=pe);break;case 2:me=ae[ve+1],(me&192)===128&&(Ve=(pe&31)<<6|me&63,Ve>127&&(Te=Ve));break;case 3:me=ae[ve+1],Ie=ae[ve+2],(me&192)===128&&(Ie&192)===128&&(Ve=(pe&15)<<12|(me&63)<<6|Ie&63,Ve>2047&&(Ve<55296||Ve>57343)&&(Te=Ve));break;case 4:me=ae[ve+1],Ie=ae[ve+2],_e=ae[ve+3],(me&192)===128&&(Ie&192)===128&&(_e&192)===128&&(Ve=(pe&15)<<18|(me&63)<<12|(Ie&63)<<6|_e&63,Ve>65535&&Ve<1114112&&(Te=Ve))}}Te===null?(Te=65533,Ne=1):Te>65535&&(Te-=65536,q.push(Te>>>10&1023|55296),Te=56320|Te&1023),q.push(Te),ve+=Ne}return G(q)}var M=4096;function G(ae){var Z=ae.length;if(Z<=M)return String.fromCharCode.apply(String,ae);for(var Y="",q=0;q<Z;)Y+=String.fromCharCode.apply(String,ae.slice(q,q+=M));return Y}function W(ae,Z,Y){var q="";Y=Math.min(ae.length,Y);for(var ve=Z;ve<Y;++ve)q+=String.fromCharCode(ae[ve]&127);return q}function N(ae,Z,Y){var q="";Y=Math.min(ae.length,Y);for(var ve=Z;ve<Y;++ve)q+=String.fromCharCode(ae[ve]);return q}function K(ae,Z,Y){var q=ae.length;(!Z||Z<0)&&(Z=0),(!Y||Y<0||Y>q)&&(Y=q);for(var ve="",pe=Z;pe<Y;++pe)ve+=fe(ae[pe]);return ve}function F(ae,Z,Y){for(var q=ae.slice(Z,Y),ve="",pe=0;pe<q.length;pe+=2)ve+=String.fromCharCode(q[pe]+q[pe+1]*256);return ve}_.prototype.slice=function(Z,Y){var q=this.length;Z=~~Z,Y=Y===void 0?q:~~Y,Z<0?(Z+=q,Z<0&&(Z=0)):Z>q&&(Z=q),Y<0?(Y+=q,Y<0&&(Y=0)):Y>q&&(Y=q),Y<Z&&(Y=Z);var ve;if(_.TYPED_ARRAY_SUPPORT)ve=this.subarray(Z,Y),ve.__proto__=_.prototype;else{var pe=Y-Z;ve=new _(pe,void 0);for(var Te=0;Te<pe;++Te)ve[Te]=this[Te+Z]}return ve};function P(ae,Z,Y){if(ae%1!==0||ae<0)throw new RangeError("offset is not uint");if(ae+Z>Y)throw new RangeError("Trying to access beyond buffer length")}_.prototype.readUIntLE=function(Z,Y,q){Z=Z|0,Y=Y|0,q||P(Z,Y,this.length);for(var ve=this[Z],pe=1,Te=0;++Te<Y&&(pe*=256);)ve+=this[Z+Te]*pe;return ve},_.prototype.readUIntBE=function(Z,Y,q){Z=Z|0,Y=Y|0,q||P(Z,Y,this.length);for(var ve=this[Z+--Y],pe=1;Y>0&&(pe*=256);)ve+=this[Z+--Y]*pe;return ve},_.prototype.readUInt8=function(Z,Y){return Y||P(Z,1,this.length),this[Z]},_.prototype.readUInt16LE=function(Z,Y){return Y||P(Z,2,this.length),this[Z]|this[Z+1]<<8},_.prototype.readUInt16BE=function(Z,Y){return Y||P(Z,2,this.length),this[Z]<<8|this[Z+1]},_.prototype.readUInt32LE=function(Z,Y){return Y||P(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},_.prototype.readUInt32BE=function(Z,Y){return Y||P(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},_.prototype.readIntLE=function(Z,Y,q){Z=Z|0,Y=Y|0,q||P(Z,Y,this.length);for(var ve=this[Z],pe=1,Te=0;++Te<Y&&(pe*=256);)ve+=this[Z+Te]*pe;return pe*=128,ve>=pe&&(ve-=Math.pow(2,8*Y)),ve},_.prototype.readIntBE=function(Z,Y,q){Z=Z|0,Y=Y|0,q||P(Z,Y,this.length);for(var ve=Y,pe=1,Te=this[Z+--ve];ve>0&&(pe*=256);)Te+=this[Z+--ve]*pe;return pe*=128,Te>=pe&&(Te-=Math.pow(2,8*Y)),Te},_.prototype.readInt8=function(Z,Y){return Y||P(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},_.prototype.readInt16LE=function(Z,Y){Y||P(Z,2,this.length);var q=this[Z]|this[Z+1]<<8;return q&32768?q|4294901760:q},_.prototype.readInt16BE=function(Z,Y){Y||P(Z,2,this.length);var q=this[Z+1]|this[Z]<<8;return q&32768?q|4294901760:q},_.prototype.readInt32LE=function(Z,Y){return Y||P(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},_.prototype.readInt32BE=function(Z,Y){return Y||P(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},_.prototype.readFloatLE=function(Z,Y){return Y||P(Z,4,this.length),y.read(this,Z,!0,23,4)},_.prototype.readFloatBE=function(Z,Y){return Y||P(Z,4,this.length),y.read(this,Z,!1,23,4)},_.prototype.readDoubleLE=function(Z,Y){return Y||P(Z,8,this.length),y.read(this,Z,!0,52,8)},_.prototype.readDoubleBE=function(Z,Y){return Y||P(Z,8,this.length),y.read(this,Z,!1,52,8)};function B(ae,Z,Y,q,ve,pe){if(!_.isBuffer(ae))throw new TypeError('"buffer" argument must be a Buffer instance');if(Z>ve||Z<pe)throw new RangeError('"value" argument is out of bounds');if(Y+q>ae.length)throw new RangeError("Index out of range")}_.prototype.writeUIntLE=function(Z,Y,q,ve){if(Z=+Z,Y=Y|0,q=q|0,!ve){var pe=Math.pow(2,8*q)-1;B(this,Z,Y,q,pe,0)}var Te=1,Ne=0;for(this[Y]=Z&255;++Ne<q&&(Te*=256);)this[Y+Ne]=Z/Te&255;return Y+q},_.prototype.writeUIntBE=function(Z,Y,q,ve){if(Z=+Z,Y=Y|0,q=q|0,!ve){var pe=Math.pow(2,8*q)-1;B(this,Z,Y,q,pe,0)}var Te=q-1,Ne=1;for(this[Y+Te]=Z&255;--Te>=0&&(Ne*=256);)this[Y+Te]=Z/Ne&255;return Y+q},_.prototype.writeUInt8=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,1,255,0),_.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),this[Y]=Z&255,Y+1};function J(ae,Z,Y,q){Z<0&&(Z=65535+Z+1);for(var ve=0,pe=Math.min(ae.length-Y,2);ve<pe;++ve)ae[Y+ve]=(Z&255<<8*(q?ve:1-ve))>>>(q?ve:1-ve)*8}_.prototype.writeUInt16LE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z&255,this[Y+1]=Z>>>8):J(this,Z,Y,!0),Y+2},_.prototype.writeUInt16BE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,2,65535,0),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z>>>8,this[Y+1]=Z&255):J(this,Z,Y,!1),Y+2};function re(ae,Z,Y,q){Z<0&&(Z=4294967295+Z+1);for(var ve=0,pe=Math.min(ae.length-Y,4);ve<pe;++ve)ae[Y+ve]=Z>>>(q?ve:3-ve)*8&255}_.prototype.writeUInt32LE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[Y+3]=Z>>>24,this[Y+2]=Z>>>16,this[Y+1]=Z>>>8,this[Y]=Z&255):re(this,Z,Y,!0),Y+4},_.prototype.writeUInt32BE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,4,4294967295,0),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z>>>24,this[Y+1]=Z>>>16,this[Y+2]=Z>>>8,this[Y+3]=Z&255):re(this,Z,Y,!1),Y+4},_.prototype.writeIntLE=function(Z,Y,q,ve){if(Z=+Z,Y=Y|0,!ve){var pe=Math.pow(2,8*q-1);B(this,Z,Y,q,pe-1,-pe)}var Te=0,Ne=1,me=0;for(this[Y]=Z&255;++Te<q&&(Ne*=256);)Z<0&&me===0&&this[Y+Te-1]!==0&&(me=1),this[Y+Te]=(Z/Ne>>0)-me&255;return Y+q},_.prototype.writeIntBE=function(Z,Y,q,ve){if(Z=+Z,Y=Y|0,!ve){var pe=Math.pow(2,8*q-1);B(this,Z,Y,q,pe-1,-pe)}var Te=q-1,Ne=1,me=0;for(this[Y+Te]=Z&255;--Te>=0&&(Ne*=256);)Z<0&&me===0&&this[Y+Te+1]!==0&&(me=1),this[Y+Te]=(Z/Ne>>0)-me&255;return Y+q},_.prototype.writeInt8=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,1,127,-128),_.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),Z<0&&(Z=255+Z+1),this[Y]=Z&255,Y+1},_.prototype.writeInt16LE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z&255,this[Y+1]=Z>>>8):J(this,Z,Y,!0),Y+2},_.prototype.writeInt16BE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,2,32767,-32768),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z>>>8,this[Y+1]=Z&255):J(this,Z,Y,!1),Y+2},_.prototype.writeInt32LE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,4,2147483647,-2147483648),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z&255,this[Y+1]=Z>>>8,this[Y+2]=Z>>>16,this[Y+3]=Z>>>24):re(this,Z,Y,!0),Y+4},_.prototype.writeInt32BE=function(Z,Y,q){return Z=+Z,Y=Y|0,q||B(this,Z,Y,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),_.TYPED_ARRAY_SUPPORT?(this[Y]=Z>>>24,this[Y+1]=Z>>>16,this[Y+2]=Z>>>8,this[Y+3]=Z&255):re(this,Z,Y,!1),Y+4};function he(ae,Z,Y,q,ve,pe){if(Y+q>ae.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function we(ae,Z,Y,q,ve){return ve||he(ae,Z,Y,4,34028234663852886e22,-34028234663852886e22),y.write(ae,Z,Y,q,23,4),Y+4}_.prototype.writeFloatLE=function(Z,Y,q){return we(this,Z,Y,!0,q)},_.prototype.writeFloatBE=function(Z,Y,q){return we(this,Z,Y,!1,q)};function ke(ae,Z,Y,q,ve){return ve||he(ae,Z,Y,8,17976931348623157e292,-17976931348623157e292),y.write(ae,Z,Y,q,52,8),Y+8}_.prototype.writeDoubleLE=function(Z,Y,q){return ke(this,Z,Y,!0,q)},_.prototype.writeDoubleBE=function(Z,Y,q){return ke(this,Z,Y,!1,q)},_.prototype.copy=function(Z,Y,q,ve){if(q||(q=0),!ve&&ve!==0&&(ve=this.length),Y>=Z.length&&(Y=Z.length),Y||(Y=0),ve>0&&ve<q&&(ve=q),ve===q)return 0;if(Z.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(q<0||q>=this.length)throw new RangeError("sourceStart out of bounds");if(ve<0)throw new RangeError("sourceEnd out of bounds");ve>this.length&&(ve=this.length),Z.length-Y<ve-q&&(ve=Z.length-Y+q);var pe=ve-q,Te;if(this===Z&&q<Y&&Y<ve)for(Te=pe-1;Te>=0;--Te)Z[Te+Y]=this[Te+q];else if(pe<1e3||!_.TYPED_ARRAY_SUPPORT)for(Te=0;Te<pe;++Te)Z[Te+Y]=this[Te+q];else Uint8Array.prototype.set.call(Z,this.subarray(q,q+pe),Y);return pe},_.prototype.fill=function(Z,Y,q,ve){if(typeof Z=="string"){if(typeof Y=="string"?(ve=Y,Y=0,q=this.length):typeof q=="string"&&(ve=q,q=this.length),Z.length===1){var pe=Z.charCodeAt(0);pe<256&&(Z=pe)}if(ve!==void 0&&typeof ve!="string")throw new TypeError("encoding must be a string");if(typeof ve=="string"&&!_.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve)}else typeof Z=="number"&&(Z=Z&255);if(Y<0||this.length<Y||this.length<q)throw new RangeError("Out of range index");if(q<=Y)return this;Y=Y>>>0,q=q===void 0?this.length:q>>>0,Z||(Z=0);var Te;if(typeof Z=="number")for(Te=Y;Te<q;++Te)this[Te]=Z;else{var Ne=_.isBuffer(Z)?Z:oe(new _(Z,ve).toString()),me=Ne.length;for(Te=0;Te<q-Y;++Te)this[Te+Y]=Ne[Te%me]}return this};var ne=/[^+\/0-9A-Za-z-_]/g;function Oe(ae){if(ae=Ce(ae).replace(ne,""),ae.length<2)return"";for(;ae.length%4!==0;)ae=ae+"=";return ae}function Ce(ae){return ae.trim?ae.trim():ae.replace(/^\s+|\s+$/g,"")}function fe(ae){return ae<16?"0"+ae.toString(16):ae.toString(16)}function oe(ae,Z){Z=Z||Infinity;for(var Y,q=ae.length,ve=null,pe=[],Te=0;Te<q;++Te){if(Y=ae.charCodeAt(Te),Y>55295&&Y<57344){if(!ve){if(Y>56319){(Z-=3)>-1&&pe.push(239,191,189);continue}else if(Te+1===q){(Z-=3)>-1&&pe.push(239,191,189);continue}ve=Y;continue}if(Y<56320){(Z-=3)>-1&&pe.push(239,191,189),ve=Y;continue}Y=(ve-55296<<10|Y-56320)+65536}else ve&&((Z-=3)>-1&&pe.push(239,191,189));if(ve=null,Y<128){if((Z-=1)<0)break;pe.push(Y)}else if(Y<2048){if((Z-=2)<0)break;pe.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((Z-=3)<0)break;pe.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((Z-=4)<0)break;pe.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return pe}function se(ae){for(var Z=[],Y=0;Y<ae.length;++Y)Z.push(ae.charCodeAt(Y)&255);return Z}function be(ae,Z){for(var Y,q,ve,pe=[],Te=0;Te<ae.length&&!((Z-=2)<0);++Te)Y=ae.charCodeAt(Te),q=Y>>8,ve=Y%256,pe.push(ve),pe.push(q);return pe}function ie(ae){return O.toByteArray(Oe(ae))}function de(ae,Z,Y,q){for(var ve=0;ve<q&&!(ve+Y>=Z.length||ve>=ae.length);++ve)Z[ve+Y]=ae[ve];return ve}function Fe(ae){return ae!==ae}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},U("buffer").Buffer)},{"base64-js":69,buffer:73,ieee754:195,isarray:198}],74:[function(U,X,x){X.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"}},{}],75:[function(U,X,x){X.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}},{}],76:[function(U,X,x){/*!
|
|
|
* copy-to - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var I=Array.prototype.slice;X.exports=_;function _(y,v){if(!(this instanceof _))return new _(y,v);this.src=y,this._withAccess=v}_.prototype.withAccess=function(y){return this._withAccess=y!==!1,this},_.prototype.pick=function(y){return Array.isArray(y)||(y=I.call(arguments)),y.length&&(this.keys=y),this},_.prototype.to=function(y){if(y=y||{},!this.src)return y;var v=this.keys||Object.keys(this.src);if(!this._withAccess){for(var o=0;o<v.length;o++){if(g=v[o],y[g]!==void 0)continue;y[g]=this.src[g]}return y}for(var o=0;o<v.length;o++){var g=v[o];if(!O(y,g))continue;var p=this.src.__lookupGetter__(g),d=this.src.__lookupSetter__(g);p&&y.__defineGetter__(g,p),d&&y.__defineSetter__(g,d),!p&&!d&&(y[g]=this.src[g])}return y},_.prototype.toCover=function(y){for(var v=this.keys||Object.keys(this.src),o=0;o<v.length;o++){var g=v[o];delete y[g];var p=this.src.__lookupGetter__(g),d=this.src.__lookupSetter__(g);p&&y.__defineGetter__(g,p),d&&y.__defineSetter__(g,d),!p&&!d&&(y[g]=this.src[g])}},_.prototype.override=_.prototype.toCover,_.prototype.and=function(y){var v={};return this.to(v),this.src=y,this.to(v),this.src=v,this};function O(y,v){return y[v]===void 0&&y.__lookupGetter__(v)===void 0&&y.__lookupSetter__(v)===void 0}},{}],77:[function(U,X,x){U("../../modules/es6.string.iterator"),U("../../modules/es6.array.from"),X.exports=U("../../modules/_core").Array.from},{"../../modules/_core":99,"../../modules/es6.array.from":168,"../../modules/es6.string.iterator":180}],78:[function(U,X,x){var I=U("../../modules/_core"),_=I.JSON||(I.JSON={stringify:JSON.stringify});X.exports=function(y){return _.stringify.apply(_,arguments)}},{"../../modules/_core":99}],79:[function(U,X,x){U("../../modules/es6.object.assign"),X.exports=U("../../modules/_core").Object.assign},{"../../modules/_core":99,"../../modules/es6.object.assign":171}],80:[function(U,X,x){U("../../modules/es6.object.create");var I=U("../../modules/_core").Object;X.exports=function(O,y){return I.create(O,y)}},{"../../modules/_core":99,"../../modules/es6.object.create":172}],81:[function(U,X,x){U("../../modules/es6.object.define-property");var I=U("../../modules/_core").Object;X.exports=function(O,y,v){return I.defineProperty(O,y,v)}},{"../../modules/_core":99,"../../modules/es6.object.define-property":173}],82:[function(U,X,x){U("../../modules/es7.object.entries"),X.exports=U("../../modules/_core").Object.entries},{"../../modules/_core":99,"../../modules/es7.object.entries":182}],83:[function(U,X,x){U("../../modules/es6.object.get-own-property-names");var I=U("../../modules/_core").Object;X.exports=function(O){return I.getOwnPropertyNames(O)}},{"../../modules/_core":99,"../../modules/es6.object.get-own-property-names":174}],84:[function(U,X,x){U("../../modules/es6.object.get-prototype-of"),X.exports=U("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":99,"../../modules/es6.object.get-prototype-of":175}],85:[function(U,X,x){U("../../modules/es6.object.keys"),X.exports=U("../../modules/_core").Object.keys},{"../../modules/_core":99,"../../modules/es6.object.keys":176}],86:[function(U,X,x){U("../modules/es6.object.to-string"),U("../modules/es6.string.iterator"),U("../modules/web.dom.iterable"),U("../modules/es6.promise"),U("../modules/es7.promise.finally"),U("../modules/es7.promise.try"),X.exports=U("../modules/_core").Promise},{"../modules/_core":99,"../modules/es6.object.to-string":177,"../modules/es6.promise":178,"../modules/es6.string.iterator":180,"../modules/es7.promise.finally":183,"../modules/es7.promise.try":184,"../modules/web.dom.iterable":187}],87:[function(U,X,x){U("../modules/web.immediate"),X.exports=U("../modules/_core").setImmediate},{"../modules/_core":99,"../modules/web.immediate":188}],88:[function(U,X,x){U("../../modules/es6.string.from-code-point"),X.exports=U("../../modules/_core").String.fromCodePoint},{"../../modules/_core":99,"../../modules/es6.string.from-code-point":179}],89:[function(U,X,x){U("../../modules/es6.function.has-instance"),X.exports=U("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":165,"../../modules/es6.function.has-instance":170}],90:[function(U,X,x){U("../../modules/es6.symbol"),U("../../modules/es6.object.to-string"),U("../../modules/es7.symbol.async-iterator"),U("../../modules/es7.symbol.observable"),X.exports=U("../../modules/_core").Symbol},{"../../modules/_core":99,"../../modules/es6.object.to-string":177,"../../modules/es6.symbol":181,"../../modules/es7.symbol.async-iterator":185,"../../modules/es7.symbol.observable":186}],91:[function(U,X,x){U("../../modules/es6.string.iterator"),U("../../modules/web.dom.iterable"),X.exports=U("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":165,"../../modules/es6.string.iterator":180,"../../modules/web.dom.iterable":187}],92:[function(U,X,x){X.exports=function(I){if(typeof I!="function")throw TypeError(I+" is not a function!");return I}},{}],93:[function(U,X,x){X.exports=function(){}},{}],94:[function(U,X,x){X.exports=function(I,_,O,y){if(!(I instanceof _)||y!==void 0&&y in I)throw TypeError(O+": incorrect invocation!");return I}},{}],95:[function(U,X,x){var I=U("./_is-object");X.exports=function(_){if(!I(_))throw TypeError(_+" is not an object!");return _}},{"./_is-object":119}],96:[function(U,X,x){var I=U("./_to-iobject"),_=U("./_to-length"),O=U("./_to-absolute-index");X.exports=function(y){return function(v,o,g){var p=I(v),d=_(p.length),a=O(g,d),n;if(y&&o!=o){for(;d>a;)if(n=p[a++],n!=n)return!0}else for(;d>a;a++)if((y||a in p)&&p[a]===o)return y||a||0;return!y&&-1}}},{"./_to-absolute-index":156,"./_to-iobject":158,"./_to-length":159}],97:[function(U,X,x){var I=U("./_cof"),_=U("./_wks")("toStringTag"),O=I(function(){return arguments}())=="Arguments",y=function(v,o){try{return v[o]}catch(g){}};X.exports=function(v){var o,g,p;return v===void 0?"Undefined":v===null?"Null":typeof(g=y(o=Object(v),_))=="string"?g:O?I(o):(p=I(o))=="Object"&&typeof o.callee=="function"?"Arguments":p}},{"./_cof":98,"./_wks":166}],98:[function(U,X,x){var I={}.toString;X.exports=function(_){return I.call(_).slice(8,-1)}},{}],99:[function(U,X,x){var I=X.exports={version:"2.6.11"};typeof __e=="number"&&(__e=I)},{}],100:[function(U,X,x){"use strict";var I=U("./_object-dp"),_=U("./_property-desc");X.exports=function(O,y,v){y in O?I.f(O,y,_(0,v)):O[y]=v}},{"./_object-dp":132,"./_property-desc":146}],101:[function(U,X,x){var I=U("./_a-function");X.exports=function(_,O,y){if(I(_),O===void 0)return _;switch(y){case 1:return function(v){return _.call(O,v)};case 2:return function(v,o){return _.call(O,v,o)};case 3:return function(v,o,g){return _.call(O,v,o,g)}}return function(){return _.apply(O,arguments)}}},{"./_a-function":92}],102:[function(U,X,x){X.exports=function(I){if(I==null)throw TypeError("Can't call method on "+I);return I}},{}],103:[function(U,X,x){X.exports=!U("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":108}],104:[function(U,X,x){var I=U("./_is-object"),_=U("./_global").document,O=I(_)&&I(_.createElement);X.exports=function(y){return O?_.createElement(y):{}}},{"./_global":110,"./_is-object":119}],105:[function(U,X,x){X.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],106:[function(U,X,x){var I=U("./_object-keys"),_=U("./_object-gops"),O=U("./_object-pie");X.exports=function(y){var v=I(y),o=_.f;if(o)for(var g=o(y),p=O.f,d=0,a;g.length>d;)p.call(y,a=g[d++])&&v.push(a);return v}},{"./_object-gops":137,"./_object-keys":140,"./_object-pie":141}],107:[function(U,X,x){var I=U("./_global"),_=U("./_core"),O=U("./_ctx"),y=U("./_hide"),v=U("./_has"),o="prototype",g=function(p,d,a){var n=p&g.F,s=p&g.G,t=p&g.S,i=p&g.P,e=p&g.B,r=p&g.W,c=s?_:_[d]||(_[d]={}),u=c[o],f=s?I:t?I[d]:(I[d]||{})[o],m,l,E;s&&(a=d);for(m in a){if(l=!n&&f&&f[m]!==void 0,l&&v(c,m))continue;E=l?f[m]:a[m],c[m]=s&&typeof f[m]!="function"?a[m]:e&&l?O(E,I):r&&f[m]==E?function(b){var D=function(C,w,S){if(this instanceof b){switch(arguments.length){case 0:return new b;case 1:return new b(C);case 2:return new b(C,w)}return new b(C,w,S)}return b.apply(this,arguments)};return D[o]=b[o],D}(E):i&&typeof E=="function"?O(Function.call,E):E,i&&((c.virtual||(c.virtual={}))[m]=E,p&g.R&&u&&!u[m]&&y(u,m,E))}};g.F=1,g.G=2,g.S=4,g.P=8,g.B=16,g.W=32,g.U=64,g.R=128,X.exports=g},{"./_core":99,"./_ctx":101,"./_global":110,"./_has":111,"./_hide":112}],108:[function(U,X,x){X.exports=function(I){try{return!!I()}catch(_){return!0}}},{}],109:[function(U,X,x){var I=U("./_ctx"),_=U("./_iter-call"),O=U("./_is-array-iter"),y=U("./_an-object"),v=U("./_to-length"),o=U("./core.get-iterator-method"),g={},p={},x=X.exports=function(d,a,n,s,t){var i=t?function(){return d}:o(d),e=I(n,s,a?2:1),r=0,c,u,f,m;if(typeof i!="function")throw TypeError(d+" is not iterable!");if(O(i)){for(c=v(d.length);c>r;r++)if(m=a?e(y(u=d[r])[0],u[1]):e(d[r]),m===g||m===p)return m}else for(f=i.call(d);!(u=f.next()).done;)if(m=_(f,e,u.value,a),m===g||m===p)return m};x.BREAK=g,x.RETURN=p},{"./_an-object":95,"./_ctx":101,"./_is-array-iter":117,"./_iter-call":120,"./_to-length":159,"./core.get-iterator-method":167}],110:[function(U,X,x){var I=X.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=I)},{}],111:[function(U,X,x){var I={}.hasOwnProperty;X.exports=function(_,O){return I.call(_,O)}},{}],112:[function(U,X,x){var I=U("./_object-dp"),_=U("./_property-desc");X.exports=U("./_descriptors")?function(O,y,v){return I.f(O,y,_(1,v))}:function(O,y,v){return O[y]=v,O}},{"./_descriptors":103,"./_object-dp":132,"./_property-desc":146}],113:[function(U,X,x){var I=U("./_global").document;X.exports=I&&I.documentElement},{"./_global":110}],114:[function(U,X,x){X.exports=!U("./_descriptors")&&!U("./_fails")(function(){return Object.defineProperty(U("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":103,"./_dom-create":104,"./_fails":108}],115:[function(U,X,x){X.exports=function(I,_,O){var y=O===void 0;switch(_.length){case 0:return y?I():I.call(O);case 1:return y?I(_[0]):I.call(O,_[0]);case 2:return y?I(_[0],_[1]):I.call(O,_[0],_[1]);case 3:return y?I(_[0],_[1],_[2]):I.call(O,_[0],_[1],_[2]);case 4:return y?I(_[0],_[1],_[2],_[3]):I.call(O,_[0],_[1],_[2],_[3])}return I.apply(O,_)}},{}],116:[function(U,X,x){var I=U("./_cof");X.exports=Object("z").propertyIsEnumerable(0)?Object:function(_){return I(_)=="String"?_.split(""):Object(_)}},{"./_cof":98}],117:[function(U,X,x){var I=U("./_iterators"),_=U("./_wks")("iterator"),O=Array.prototype;X.exports=function(y){return y!==void 0&&(I.Array===y||O[_]===y)}},{"./_iterators":125,"./_wks":166}],118:[function(U,X,x){var I=U("./_cof");X.exports=Array.isArray||function(O){return I(O)=="Array"}},{"./_cof":98}],119:[function(U,X,x){X.exports=function(I){return typeof I=="object"?I!==null:typeof I=="function"}},{}],120:[function(U,X,x){var I=U("./_an-object");X.exports=function(_,O,y,v){try{return v?O(I(y)[0],y[1]):O(y)}catch(g){var o=_.return;throw o!==void 0&&I(o.call(_)),g}}},{"./_an-object":95}],121:[function(U,X,x){"use strict";var I=U("./_object-create"),_=U("./_property-desc"),O=U("./_set-to-string-tag"),y={};U("./_hide")(y,U("./_wks")("iterator"),function(){return this}),X.exports=function(v,o,g){v.prototype=I(y,{next:_(1,g)}),O(v,o+" Iterator")}},{"./_hide":112,"./_object-create":131,"./_property-desc":146,"./_set-to-string-tag":150,"./_wks":166}],122:[function(U,X,x){"use strict";var I=U("./_library"),_=U("./_export"),O=U("./_redefine"),y=U("./_hide"),v=U("./_iterators"),o=U("./_iter-create"),g=U("./_set-to-string-tag"),p=U("./_object-gpo"),d=U("./_wks")("iterator"),a=!([].keys&&"next"in[].keys()),n="@@iterator",s="keys",t="values",i=function(){return this};X.exports=function(e,r,c,u,f,m,l){o(c,r,u);var E=function(W){if(!a&&W in w)return w[W];switch(W){case s:return function(){return new c(this,W)};case t:return function(){return new c(this,W)}}return function(){return new c(this,W)}},b=r+" Iterator",D=f==t,C=!1,w=e.prototype,S=w[d]||w[n]||f&&w[f],A=S||E(f),R=f?D?E("entries"):A:void 0,k=r=="Array"&&w.entries||S,L,M,G;if(k&&(G=p(k.call(new e)),G!==Object.prototype&&G.next&&(g(G,b,!0),!I&&typeof G[d]!="function"&&y(G,d,i))),D&&S&&S.name!==t&&(C=!0,A=function(){return S.call(this)}),(!I||l)&&(a||C||!w[d])&&y(w,d,A),v[r]=A,v[b]=i,f)if(L={values:D?A:E(t),keys:m?A:E(s),entries:R},l)for(M in L)M in w||O(w,M,L[M]);else _(_.P+_.F*(a||C),r,L);return L}},{"./_export":107,"./_hide":112,"./_iter-create":121,"./_iterators":125,"./_library":126,"./_object-gpo":138,"./_redefine":148,"./_set-to-string-tag":150,"./_wks":166}],123:[function(U,X,x){var I=U("./_wks")("iterator"),_=!1;try{var O=[7][I]();O.return=function(){_=!0},Array.from(O,function(){throw 2})}catch(y){}X.exports=function(y,v){if(!v&&!_)return!1;var o=!1;try{var g=[7],p=g[I]();p.next=function(){return{done:o=!0}},g[I]=function(){return p},y(g)}catch(d){}return o}},{"./_wks":166}],124:[function(U,X,x){X.exports=function(I,_){return{value:_,done:!!I}}},{}],125:[function(U,X,x){X.exports={}},{}],126:[function(U,X,x){X.exports=!0},{}],127:[function(U,X,x){var I=U("./_uid")("meta"),_=U("./_is-object"),O=U("./_has"),y=U("./_object-dp").f,v=0,o=Object.isExtensible||function(){return!0},g=!U("./_fails")(function(){return o(Object.preventExtensions({}))}),p=function(t){y(t,I,{value:{i:"O"+ ++v,w:{}}})},d=function(t,i){if(!_(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!O(t,I)){if(!o(t))return"F";if(!i)return"E";p(t)}return t[I].i},a=function(t,i){if(!O(t,I)){if(!o(t))return!0;if(!i)return!1;p(t)}return t[I].w},n=function(t){return g&&s.NEED&&o(t)&&!O(t,I)&&p(t),t},s=X.exports={KEY:I,NEED:!1,fastKey:d,getWeak:a,onFreeze:n}},{"./_fails":108,"./_has":111,"./_is-object":119,"./_object-dp":132,"./_uid":162}],128:[function(U,X,x){var I=U("./_global"),_=U("./_task").set,O=I.MutationObserver||I.WebKitMutationObserver,y=I.process,v=I.Promise,o=U("./_cof")(y)=="process";X.exports=function(){var g,p,d,a=function(){var i,e;for(o&&(i=y.domain)&&i.exit();g;){e=g.fn,g=g.next;try{e()}catch(r){throw g?d():p=void 0,r}}p=void 0,i&&i.enter()};if(o)d=function(){y.nextTick(a)};else if(O&&!(I.navigator&&I.navigator.standalone)){var n=!0,s=document.createTextNode("");new O(a).observe(s,{characterData:!0}),d=function(){s.data=n=!n}}else if(v&&v.resolve){var t=v.resolve(void 0);d=function(){t.then(a)}}else d=function(){_.call(I,a)};return function(i){var e={fn:i,next:void 0};p&&(p.next=e),g||(g=e,d()),p=e}}},{"./_cof":98,"./_global":110,"./_task":155}],129:[function(U,X,x){"use strict";var I=U("./_a-function");function _(O){var y,v;this.promise=new O(function(o,g){if(y!==void 0||v!==void 0)throw TypeError("Bad Promise constructor");y=o,v=g}),this.resolve=I(y),this.reject=I(v)}X.exports.f=function(O){return new _(O)}},{"./_a-function":92}],130:[function(U,X,x){"use strict";var I=U("./_descriptors"),_=U("./_object-keys"),O=U("./_object-gops"),y=U("./_object-pie"),v=U("./_to-object"),o=U("./_iobject"),g=Object.assign;X.exports=!g||U("./_fails")(function(){var p={},d={},a=Symbol(),n="abcdefghijklmnopqrst";return p[a]=7,n.split("").forEach(function(s){d[s]=s}),g({},p)[a]!=7||Object.keys(g({},d)).join("")!=n})?function(d,a){for(var n=v(d),s=arguments.length,t=1,i=O.f,e=y.f;s>t;)for(var r=o(arguments[t++]),c=i?_(r).concat(i(r)):_(r),u=c.length,f=0,m;u>f;)m=c[f++],(!I||e.call(r,m))&&(n[m]=r[m]);return n}:g},{"./_descriptors":103,"./_fails":108,"./_iobject":116,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_to-object":160}],131:[function(U,X,x){var I=U("./_an-object"),_=U("./_object-dps"),O=U("./_enum-bug-keys"),y=U("./_shared-key")("IE_PROTO"),v=function(){},o="prototype",g=function(){var p=U("./_dom-create")("iframe"),d=O.length,a="<",n=">",s;for(p.style.display="none",U("./_html").appendChild(p),p.src="javascript:",s=p.contentWindow.document,s.open(),s.write(a+"script"+n+"document.F=Object"+a+"/script"+n),s.close(),g=s.F;d--;)delete g[o][O[d]];return g()};X.exports=Object.create||function(d,a){var n;return d!==null?(v[o]=I(d),n=new v,v[o]=null,n[y]=d):n=g(),a===void 0?n:_(n,a)}},{"./_an-object":95,"./_dom-create":104,"./_enum-bug-keys":105,"./_html":113,"./_object-dps":133,"./_shared-key":151}],132:[function(U,X,x){var I=U("./_an-object"),_=U("./_ie8-dom-define"),O=U("./_to-primitive"),y=Object.defineProperty;x.f=U("./_descriptors")?Object.defineProperty:function(o,g,p){if(I(o),g=O(g,!0),I(p),_)try{return y(o,g,p)}catch(d){}if("get"in p||"set"in p)throw TypeError("Accessors not supported!");return"value"in p&&(o[g]=p.value),o}},{"./_an-object":95,"./_descriptors":103,"./_ie8-dom-define":114,"./_to-primitive":161}],133:[function(U,X,x){var I=U("./_object-dp"),_=U("./_an-object"),O=U("./_object-keys");X.exports=U("./_descriptors")?Object.defineProperties:function(v,o){_(v);for(var g=O(o),p=g.length,d=0,a;p>d;)I.f(v,a=g[d++],o[a]);return v}},{"./_an-object":95,"./_descriptors":103,"./_object-dp":132,"./_object-keys":140}],134:[function(U,X,x){var I=U("./_object-pie"),_=U("./_property-desc"),O=U("./_to-iobject"),y=U("./_to-primitive"),v=U("./_has"),o=U("./_ie8-dom-define"),g=Object.getOwnPropertyDescriptor;x.f=U("./_descriptors")?g:function(d,a){if(d=O(d),a=y(a,!0),o)try{return g(d,a)}catch(n){}if(v(d,a))return _(!I.f.call(d,a),d[a])}},{"./_descriptors":103,"./_has":111,"./_ie8-dom-define":114,"./_object-pie":141,"./_property-desc":146,"./_to-iobject":158,"./_to-primitive":161}],135:[function(U,X,x){var I=U("./_to-iobject"),_=U("./_object-gopn").f,O={}.toString,y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],v=function(o){try{return _(o)}catch(g){return y.slice()}};X.exports.f=function(g){return y&&O.call(g)=="[object Window]"?v(g):_(I(g))}},{"./_object-gopn":136,"./_to-iobject":158}],136:[function(U,X,x){var I=U("./_object-keys-internal"),_=U("./_enum-bug-keys").concat("length","prototype");x.f=Object.getOwnPropertyNames||function(y){return I(y,_)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],137:[function(U,X,x){x.f=Object.getOwnPropertySymbols},{}],138:[function(U,X,x){var I=U("./_has"),_=U("./_to-object"),O=U("./_shared-key")("IE_PROTO"),y=Object.prototype;X.exports=Object.getPrototypeOf||function(v){return v=_(v),I(v,O)?v[O]:typeof v.constructor=="function"&&v instanceof v.constructor?v.constructor.prototype:v instanceof Object?y:null}},{"./_has":111,"./_shared-key":151,"./_to-object":160}],139:[function(U,X,x){var I=U("./_has"),_=U("./_to-iobject"),O=U("./_array-includes")(!1),y=U("./_shared-key")("IE_PROTO");X.exports=function(v,o){var g=_(v),p=0,d=[],a;for(a in g)a!=y&&(I(g,a)&&d.push(a));for(;o.length>p;)I(g,a=o[p++])&&(~O(d,a)||d.push(a));return d}},{"./_array-includes":96,"./_has":111,"./_shared-key":151,"./_to-iobject":158}],140:[function(U,X,x){var I=U("./_object-keys-internal"),_=U("./_enum-bug-keys");X.exports=Object.keys||function(y){return I(y,_)}},{"./_enum-bug-keys":105,"./_object-keys-internal":139}],141:[function(U,X,x){x.f={}.propertyIsEnumerable},{}],142:[function(U,X,x){var I=U("./_export"),_=U("./_core"),O=U("./_fails");X.exports=function(y,v){var o=(_.Object||{})[y]||Object[y],g={};g[y]=v(o),I(I.S+I.F*O(function(){o(1)}),"Object",g)}},{"./_core":99,"./_export":107,"./_fails":108}],143:[function(U,X,x){var I=U("./_descriptors"),_=U("./_object-keys"),O=U("./_to-iobject"),y=U("./_object-pie").f;X.exports=function(v){return function(o){for(var g=O(o),p=_(g),d=p.length,a=0,n=[],s;d>a;)s=p[a++],(!I||y.call(g,s))&&n.push(v?[s,g[s]]:g[s]);return n}}},{"./_descriptors":103,"./_object-keys":140,"./_object-pie":141,"./_to-iobject":158}],144:[function(U,X,x){X.exports=function(I){try{return{e:!1,v:I()}}catch(_){return{e:!0,v:_}}}},{}],145:[function(U,X,x){var I=U("./_an-object"),_=U("./_is-object"),O=U("./_new-promise-capability");X.exports=function(y,v){if(I(y),_(v)&&v.constructor===y)return v;var o=O.f(y),g=o.resolve;return g(v),o.promise}},{"./_an-object":95,"./_is-object":119,"./_new-promise-capability":129}],146:[function(U,X,x){X.exports=function(I,_){return{enumerable:!(I&1),configurable:!(I&2),writable:!(I&4),value:_}}},{}],147:[function(U,X,x){var I=U("./_hide");X.exports=function(_,O,y){for(var v in O)y&&_[v]?_[v]=O[v]:I(_,v,O[v]);return _}},{"./_hide":112}],148:[function(U,X,x){X.exports=U("./_hide")},{"./_hide":112}],149:[function(U,X,x){"use strict";var I=U("./_global"),_=U("./_core"),O=U("./_object-dp"),y=U("./_descriptors"),v=U("./_wks")("species");X.exports=function(o){var g=typeof _[o]=="function"?_[o]:I[o];y&&g&&!g[v]&&O.f(g,v,{configurable:!0,get:function(){return this}})}},{"./_core":99,"./_descriptors":103,"./_global":110,"./_object-dp":132,"./_wks":166}],150:[function(U,X,x){var I=U("./_object-dp").f,_=U("./_has"),O=U("./_wks")("toStringTag");X.exports=function(y,v,o){y&&!_(y=o?y:y.prototype,O)&&I(y,O,{configurable:!0,value:v})}},{"./_has":111,"./_object-dp":132,"./_wks":166}],151:[function(U,X,x){var I=U("./_shared")("keys"),_=U("./_uid");X.exports=function(O){return I[O]||(I[O]=_(O))}},{"./_shared":152,"./_uid":162}],152:[function(U,X,x){var I=U("./_core"),_=U("./_global"),O="__core-js_shared__",y=_[O]||(_[O]={});(X.exports=function(v,o){return y[v]||(y[v]=o!==void 0?o:{})})("versions",[]).push({version:I.version,mode:U("./_library")?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},{"./_core":99,"./_global":110,"./_library":126}],153:[function(U,X,x){var I=U("./_an-object"),_=U("./_a-function"),O=U("./_wks")("species");X.exports=function(y,v){var o=I(y).constructor,g;return o===void 0||(g=I(o)[O])==null?v:_(g)}},{"./_a-function":92,"./_an-object":95,"./_wks":166}],154:[function(U,X,x){var I=U("./_to-integer"),_=U("./_defined");X.exports=function(O){return function(y,v){var o=String(_(y)),g=I(v),p=o.length,d,a;return g<0||g>=p?O?"":void 0:(d=o.charCodeAt(g),d<55296||d>56319||g+1===p||(a=o.charCodeAt(g+1))<56320||a>57343?O?o.charAt(g):d:O?o.slice(g,g+2):(d-55296<<10)+(a-56320)+65536)}}},{"./_defined":102,"./_to-integer":157}],155:[function(U,X,x){var I=U("./_ctx"),_=U("./_invoke"),O=U("./_html"),y=U("./_dom-create"),v=U("./_global"),o=v.process,g=v.setImmediate,p=v.clearImmediate,d=v.MessageChannel,a=v.Dispatch,n=0,s={},t="onreadystatechange",i,e,r,c=function(){var f=+this;if(s.hasOwnProperty(f)){var m=s[f];delete s[f],m()}},u=function(f){c.call(f.data)};(!g||!p)&&(g=function(m){for(var l=[],E=1;arguments.length>E;)l.push(arguments[E++]);return s[++n]=function(){_(typeof m=="function"?m:Function(m),l)},i(n),n},p=function(m){delete s[m]},U("./_cof")(o)=="process"?i=function(f){o.nextTick(I(c,f,1))}:a&&a.now?i=function(f){a.now(I(c,f,1))}:d?(e=new d,r=e.port2,e.port1.onmessage=u,i=I(r.postMessage,r,1)):v.addEventListener&&typeof postMessage=="function"&&!v.importScripts?(i=function(f){v.postMessage(f+"","*")},v.addEventListener("message",u,!1)):t in y("script")?i=function(f){O.appendChild(y("script"))[t]=function(){O.removeChild(this),c.call(f)}}:i=function(f){setTimeout(I(c,f,1),0)}),X.exports={set:g,clear:p}},{"./_cof":98,"./_ctx":101,"./_dom-create":104,"./_global":110,"./_html":113,"./_invoke":115}],156:[function(U,X,x){var I=U("./_to-integer"),_=Math.max,O=Math.min;X.exports=function(y,v){return y=I(y),y<0?_(y+v,0):O(y,v)}},{"./_to-integer":157}],157:[function(U,X,x){var I=Math.ceil,_=Math.floor;X.exports=function(O){return isNaN(O=+O)?0:(O>0?_:I)(O)}},{}],158:[function(U,X,x){var I=U("./_iobject"),_=U("./_defined");X.exports=function(O){return I(_(O))}},{"./_defined":102,"./_iobject":116}],159:[function(U,X,x){var I=U("./_to-integer"),_=Math.min;X.exports=function(O){return O>0?_(I(O),9007199254740991):0}},{"./_to-integer":157}],160:[function(U,X,x){var I=U("./_defined");X.exports=function(_){return Object(I(_))}},{"./_defined":102}],161:[function(U,X,x){var I=U("./_is-object");X.exports=function(_,O){if(!I(_))return _;var y,v;if(O&&typeof(y=_.toString)=="function"&&!I(v=y.call(_)))return v;if(typeof(y=_.valueOf)=="function"&&!I(v=y.call(_)))return v;if(!O&&typeof(y=_.toString)=="function"&&!I(v=y.call(_)))return v;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":119}],162:[function(U,X,x){var I=0,_=Math.random();X.exports=function(O){return"Symbol(".concat(O===void 0?"":O,")_",(++I+_).toString(36))}},{}],163:[function(U,X,x){var I=U("./_global"),_=I.navigator;X.exports=_&&_.userAgent||""},{"./_global":110}],164:[function(U,X,x){var I=U("./_global"),_=U("./_core"),O=U("./_library"),y=U("./_wks-ext"),v=U("./_object-dp").f;X.exports=function(o){var g=_.Symbol||(_.Symbol=O?{}:I.Symbol||{});o.charAt(0)!="_"&&!(o in g)&&v(g,o,{value:y.f(o)})}},{"./_core":99,"./_global":110,"./_library":126,"./_object-dp":132,"./_wks-ext":165}],165:[function(U,X,x){x.f=U("./_wks")},{"./_wks":166}],166:[function(U,X,x){var I=U("./_shared")("wks"),_=U("./_uid"),O=U("./_global").Symbol,y=typeof O=="function",v=X.exports=function(o){return I[o]||(I[o]=y&&O[o]||(y?O:_)("Symbol."+o))};v.store=I},{"./_global":110,"./_shared":152,"./_uid":162}],167:[function(U,X,x){var I=U("./_classof"),_=U("./_wks")("iterator"),O=U("./_iterators");X.exports=U("./_core").getIteratorMethod=function(y){if(y!=null)return y[_]||y["@@iterator"]||O[I(y)]}},{"./_classof":97,"./_core":99,"./_iterators":125,"./_wks":166}],168:[function(U,X,x){"use strict";var I=U("./_ctx"),_=U("./_export"),O=U("./_to-object"),y=U("./_iter-call"),v=U("./_is-array-iter"),o=U("./_to-length"),g=U("./_create-property"),p=U("./core.get-iterator-method");_(_.S+_.F*!U("./_iter-detect")(function(d){Array.from(d)}),"Array",{from:function(a){var n=O(a),s=typeof this=="function"?this:Array,t=arguments.length,i=t>1?arguments[1]:void 0,e=i!==void 0,r=0,c=p(n),u,f,m,l;if(e&&(i=I(i,t>2?arguments[2]:void 0,2)),c!=null&&!(s==Array&&v(c)))for(l=c.call(n),f=new s;!(m=l.next()).done;r++)g(f,r,e?y(l,i,[m.value,r],!0):m.value);else for(u=o(n.length),f=new s(u);u>r;r++)g(f,r,e?i(n[r],r):n[r]);return f.length=r,f}})},{"./_create-property":100,"./_ctx":101,"./_export":107,"./_is-array-iter":117,"./_iter-call":120,"./_iter-detect":123,"./_to-length":159,"./_to-object":160,"./core.get-iterator-method":167}],169:[function(U,X,x){"use strict";var I=U("./_add-to-unscopables"),_=U("./_iter-step"),O=U("./_iterators"),y=U("./_to-iobject");X.exports=U("./_iter-define")(Array,"Array",function(v,o){this._t=y(v),this._i=0,this._k=o},function(){var v=this._t,o=this._k,g=this._i++;return!v||g>=v.length?(this._t=void 0,_(1)):o=="keys"?_(0,g):o=="values"?_(0,v[g]):_(0,[g,v[g]])},"values"),O.Arguments=O.Array,I("keys"),I("values"),I("entries")},{"./_add-to-unscopables":93,"./_iter-define":122,"./_iter-step":124,"./_iterators":125,"./_to-iobject":158}],170:[function(U,X,x){"use strict";var I=U("./_is-object"),_=U("./_object-gpo"),O=U("./_wks")("hasInstance"),y=Function.prototype;O in y||U("./_object-dp").f(y,O,{value:function(v){if(typeof this!="function"||!I(v))return!1;if(!I(this.prototype))return v instanceof this;for(;v=_(v);)if(this.prototype===v)return!0;return!1}})},{"./_is-object":119,"./_object-dp":132,"./_object-gpo":138,"./_wks":166}],171:[function(U,X,x){var I=U("./_export");I(I.S+I.F,"Object",{assign:U("./_object-assign")})},{"./_export":107,"./_object-assign":130}],172:[function(U,X,x){var I=U("./_export");I(I.S,"Object",{create:U("./_object-create")})},{"./_export":107,"./_object-create":131}],173:[function(U,X,x){var I=U("./_export");I(I.S+I.F*!U("./_descriptors"),"Object",{defineProperty:U("./_object-dp").f})},{"./_descriptors":103,"./_export":107,"./_object-dp":132}],174:[function(U,X,x){U("./_object-sap")("getOwnPropertyNames",function(){return U("./_object-gopn-ext").f})},{"./_object-gopn-ext":135,"./_object-sap":142}],175:[function(U,X,x){var I=U("./_to-object"),_=U("./_object-gpo");U("./_object-sap")("getPrototypeOf",function(){return function(y){return _(I(y))}})},{"./_object-gpo":138,"./_object-sap":142,"./_to-object":160}],176:[function(U,X,x){var I=U("./_to-object"),_=U("./_object-keys");U("./_object-sap")("keys",function(){return function(y){return _(I(y))}})},{"./_object-keys":140,"./_object-sap":142,"./_to-object":160}],177:[function(U,X,x){arguments[4][71][0].apply(x,arguments)},{dup:71}],178:[function(U,X,x){"use strict";var I=U("./_library"),_=U("./_global"),O=U("./_ctx"),y=U("./_classof"),v=U("./_export"),o=U("./_is-object"),g=U("./_a-function"),p=U("./_an-instance"),d=U("./_for-of"),a=U("./_species-constructor"),n=U("./_task").set,s=U("./_microtask")(),t=U("./_new-promise-capability"),i=U("./_perform"),e=U("./_user-agent"),r=U("./_promise-resolve"),c="Promise",u=_.TypeError,f=_.process,m=f&&f.versions,l=m&&m.v8||"",E=_[c],b=y(f)=="process",D=function(){},C,w,S,A,R=w=t.f,k=!!function(){try{var P=E.resolve(1),B=(P.constructor={})[U("./_wks")("species")]=function(J){J(D,D)};return(b||typeof PromiseRejectionEvent=="function")&&P.then(D)instanceof B&&l.indexOf("6.6")!==0&&e.indexOf("Chrome/66")===-1}catch(J){}}(),L=function(P){var B;return o(P)&&typeof(B=P.then)=="function"?B:!1},M=function(P,B){if(P._n)return;P._n=!0;var J=P._c;s(function(){for(var re=P._v,he=P._s==1,we=0,ke=function(ne){var Oe=he?ne.ok:ne.fail,Ce=ne.resolve,fe=ne.reject,oe=ne.domain,se,be,ie;try{Oe?(he||(P._h==2&&N(P),P._h=1),Oe===!0?se=re:(oe&&oe.enter(),se=Oe(re),oe&&(oe.exit(),ie=!0)),se===ne.promise?fe(u("Promise-chain cycle")):(be=L(se))?be.call(se,Ce,fe):Ce(se)):fe(re)}catch(de){oe&&!ie&&oe.exit(),fe(de)}};J.length>we;)ke(J[we++]);P._c=[],P._n=!1,B&&!P._h&&G(P)})},G=function(P){n.call(_,function(){var B=P._v,J=W(P),re,he,we;if(J&&(re=i(function(){b?f.emit("unhandledRejection",B,P):(he=_.onunhandledrejection)?he({promise:P,reason:B}):(we=_.console)&&we.error&&we.error("Unhandled promise rejection",B)}),P._h=b||W(P)?2:1),P._a=void 0,J&&re.e)throw re.v})},W=function(P){return P._h!==1&&(P._a||P._c).length===0},N=function(P){n.call(_,function(){var B;b?f.emit("rejectionHandled",P):(B=_.onrejectionhandled)&&B({promise:P,reason:P._v})})},K=function(P){var B=this;if(B._d)return;B._d=!0,B=B._w||B,B._v=P,B._s=2,B._a||(B._a=B._c.slice()),M(B,!0)},F=function(P){var B=this,J;if(B._d)return;B._d=!0,B=B._w||B;try{if(B===P)throw u("Promise can't be resolved itself");(J=L(P))?s(function(){var re={_w:B,_d:!1};try{J.call(P,O(F,re,1),O(K,re,1))}catch(he){K.call(re,he)}}):(B._v=P,B._s=1,M(B,!1))}catch(re){K.call({_w:B,_d:!1},re)}};k||(E=function(B){p(this,E,c,"_h"),g(B),C.call(this);try{B(O(F,this,1),O(K,this,1))}catch(J){K.call(this,J)}},C=function(B){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},C.prototype=U("./_redefine-all")(E.prototype,{then:function(B,J){var re=R(a(this,E));return re.ok=typeof B=="function"?B:!0,re.fail=typeof J=="function"&&J,re.domain=b?f.domain:void 0,this._c.push(re),this._a&&this._a.push(re),this._s&&M(this,!1),re.promise},catch:function(P){return this.then(void 0,P)}}),S=function(){var P=new C;this.promise=P,this.resolve=O(F,P,1),this.reject=O(K,P,1)},t.f=R=function(P){return P===E||P===A?new S(P):w(P)}),v(v.G+v.W+v.F*!k,{Promise:E}),U("./_set-to-string-tag")(E,c),U("./_set-species")(c),A=U("./_core")[c],v(v.S+v.F*!k,c,{reject:function(B){var J=R(this),re=J.reject;return re(B),J.promise}}),v(v.S+v.F*(I||!k),c,{resolve:function(B){return r(I&&this===A?E:this,B)}}),v(v.S+v.F*!(k&&U("./_iter-detect")(function(P){E.all(P).catch(D)})),c,{all:function(B){var J=this,re=R(J),he=re.resolve,we=re.reject,ke=i(function(){var ne=[],Oe=0,Ce=1;d(B,!1,function(fe){var oe=Oe++,se=!1;ne.push(void 0),Ce++,J.resolve(fe).then(function(be){if(se)return;se=!0,ne[oe]=be,--Ce||he(ne)},we)}),--Ce||he(ne)});return ke.e&&we(ke.v),re.promise},race:function(B){var J=this,re=R(J),he=re.reject,we=i(function(){d(B,!1,function(ke){J.resolve(ke).then(re.resolve,he)})});return we.e&&he(we.v),re.promise}})},{"./_a-function":92,"./_an-instance":94,"./_classof":97,"./_core":99,"./_ctx":101,"./_export":107,"./_for-of":109,"./_global":110,"./_is-object":119,"./_iter-detect":123,"./_library":126,"./_microtask":128,"./_new-promise-capability":129,"./_perform":144,"./_promise-resolve":145,"./_redefine-all":147,"./_set-species":149,"./_set-to-string-tag":150,"./_species-constructor":153,"./_task":155,"./_user-agent":163,"./_wks":166}],179:[function(U,X,x){var I=U("./_export"),_=U("./_to-absolute-index"),O=String.fromCharCode,y=String.fromCodePoint;I(I.S+I.F*(!!y&&y.length!=1),"String",{fromCodePoint:function(o){for(var g=[],p=arguments.length,d=0,a;p>d;){if(a=+arguments[d++],_(a,1114111)!==a)throw RangeError(a+" is not a valid code point");g.push(a<65536?O(a):O(((a-=65536)>>10)+55296,a%1024+56320))}return g.join("")}})},{"./_export":107,"./_to-absolute-index":156}],180:[function(U,X,x){"use strict";var I=U("./_string-at")(!0);U("./_iter-define")(String,"String",function(_){this._t=String(_),this._i=0},function(){var _=this._t,O=this._i,y;return O>=_.length?{value:void 0,done:!0}:(y=I(_,O),this._i+=y.length,{value:y,done:!1})})},{"./_iter-define":122,"./_string-at":154}],181:[function(U,X,x){"use strict";var I=U("./_global"),_=U("./_has"),O=U("./_descriptors"),y=U("./_export"),v=U("./_redefine"),o=U("./_meta").KEY,g=U("./_fails"),p=U("./_shared"),d=U("./_set-to-string-tag"),a=U("./_uid"),n=U("./_wks"),s=U("./_wks-ext"),t=U("./_wks-define"),i=U("./_enum-keys"),e=U("./_is-array"),r=U("./_an-object"),c=U("./_is-object"),u=U("./_to-object"),f=U("./_to-iobject"),m=U("./_to-primitive"),l=U("./_property-desc"),E=U("./_object-create"),b=U("./_object-gopn-ext"),D=U("./_object-gopd"),C=U("./_object-gops"),w=U("./_object-dp"),S=U("./_object-keys"),A=D.f,R=w.f,k=b.f,L=I.Symbol,M=I.JSON,G=M&&M.stringify,W="prototype",N=n("_hidden"),K=n("toPrimitive"),F={}.propertyIsEnumerable,P=p("symbol-registry"),B=p("symbols"),J=p("op-symbols"),re=Object[W],he=typeof L=="function"&&!!C.f,we=I.QObject,ke=!we||!we[W]||!we[W].findChild,ne=O&&g(function(){return E(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a!=7})?function(pe,Te,Ne){var me=A(re,Te);me&&delete re[Te],R(pe,Te,Ne),me&&pe!==re&&R(re,Te,me)}:R,Oe=function(pe){var Te=B[pe]=E(L[W]);return Te._k=pe,Te},Ce=he&&typeof L.iterator=="symbol"?function(pe){return typeof pe=="symbol"}:function(pe){return pe instanceof L},fe=function(Te,Ne,me){return Te===re&&fe(J,Ne,me),r(Te),Ne=m(Ne,!0),r(me),_(B,Ne)?(me.enumerable?(_(Te,N)&&Te[N][Ne]&&(Te[N][Ne]=!1),me=E(me,{enumerable:l(0,!1)})):(_(Te,N)||R(Te,N,l(1,{})),Te[N][Ne]=!0),ne(Te,Ne,me)):R(Te,Ne,me)},oe=function(Te,Ne){r(Te);for(var me=i(Ne=f(Ne)),Ie=0,_e=me.length,Ve;_e>Ie;)fe(Te,Ve=me[Ie++],Ne[Ve]);return Te},se=function(Te,Ne){return Ne===void 0?E(Te):oe(E(Te),Ne)},be=function(Te){var Ne=F.call(this,Te=m(Te,!0));return this===re&&_(B,Te)&&!_(J,Te)?!1:Ne||!_(this,Te)||!_(B,Te)||_(this,N)&&this[N][Te]?Ne:!0},ie=function(Te,Ne){if(Te=f(Te),Ne=m(Ne,!0),Te===re&&_(B,Ne)&&!_(J,Ne))return;var me=A(Te,Ne);return me&&_(B,Ne)&&!(_(Te,N)&&Te[N][Ne])&&(me.enumerable=!0),me},de=function(Te){for(var Ne=k(f(Te)),me=[],Ie=0,_e;Ne.length>Ie;)!_(B,_e=Ne[Ie++])&&_e!=N&&_e!=o&&me.push(_e);return me},Fe=function(Te){for(var Ne=Te===re,me=k(Ne?J:f(Te)),Ie=[],_e=0,Ve;me.length>_e;)_(B,Ve=me[_e++])&&(Ne?_(re,Ve):!0)&&Ie.push(B[Ve]);return Ie};he||(L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var Te=a(arguments.length>0?arguments[0]:void 0),Ne=function(me){this===re&&Ne.call(J,me),_(this,N)&&_(this[N],Te)&&(this[N][Te]=!1),ne(this,Te,l(1,me))};return O&&ke&&ne(re,Te,{configurable:!0,set:Ne}),Oe(Te)},v(L[W],"toString",function(){return this._k}),D.f=ie,w.f=fe,U("./_object-gopn").f=b.f=de,U("./_object-pie").f=be,C.f=Fe,O&&!U("./_library")&&v(re,"propertyIsEnumerable",be,!0),s.f=function(pe){return Oe(n(pe))}),y(y.G+y.W+y.F*!he,{Symbol:L});for(var ae="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Z=0;ae.length>Z;)n(ae[Z++]);for(var Y=S(n.store),q=0;Y.length>q;)t(Y[q++]);y(y.S+y.F*!he,"Symbol",{for:function(pe){return _(P,pe+="")?P[pe]:P[pe]=L(pe)},keyFor:function(Te){if(!Ce(Te))throw TypeError(Te+" is not a symbol!");for(var Ne in P)if(P[Ne]===Te)return Ne},useSetter:function(){ke=!0},useSimple:function(){ke=!1}}),y(y.S+y.F*!he,"Object",{create:se,defineProperty:fe,defineProperties:oe,getOwnPropertyDescriptor:ie,getOwnPropertyNames:de,getOwnPropertySymbols:Fe});var ve=g(function(){C.f(1)});y(y.S+y.F*ve,"Object",{getOwnPropertySymbols:function(Te){return C.f(u(Te))}}),M&&y(y.S+y.F*(!he||g(function(){var pe=L();return G([pe])!="[null]"||G({a:pe})!="{}"||G(Object(pe))!="{}"})),"JSON",{stringify:function(Te){for(var Ne=[Te],me=1,Ie,_e;arguments.length>me;)Ne.push(arguments[me++]);return _e=Ie=Ne[1],!c(Ie)&&Te===void 0||Ce(Te)?void 0:(e(Ie)||(Ie=function(Ve,tt){if(typeof _e=="function"&&(tt=_e.call(this,Ve,tt)),!Ce(tt))return tt}),Ne[1]=Ie,G.apply(M,Ne))}}),L[W][K]||U("./_hide")(L[W],K,L[W].valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(I.JSON,"JSON",!0)},{"./_an-object":95,"./_descriptors":103,"./_enum-keys":106,"./_export":107,"./_fails":108,"./_global":110,"./_has":111,"./_hide":112,"./_is-array":118,"./_is-object":119,"./_library":126,"./_meta":127,"./_object-create":131,"./_object-dp":132,"./_object-gopd":134,"./_object-gopn":136,"./_object-gopn-ext":135,"./_object-gops":137,"./_object-keys":140,"./_object-pie":141,"./_property-desc":146,"./_redefine":148,"./_set-to-string-tag":150,"./_shared":152,"./_to-iobject":158,"./_to-object":160,"./_to-primitive":161,"./_uid":162,"./_wks":166,"./_wks-define":164,"./_wks-ext":165}],182:[function(U,X,x){var I=U("./_export"),_=U("./_object-to-array")(!0);I(I.S,"Object",{entries:function(y){return _(y)}})},{"./_export":107,"./_object-to-array":143}],183:[function(U,X,x){"use strict";var I=U("./_export"),_=U("./_core"),O=U("./_global"),y=U("./_species-constructor"),v=U("./_promise-resolve");I(I.P+I.R,"Promise",{finally:function(o){var g=y(this,_.Promise||O.Promise),p=typeof o=="function";return this.then(p?function(d){return v(g,o()).then(function(){return d})}:o,p?function(d){return v(g,o()).then(function(){throw d})}:o)}})},{"./_core":99,"./_export":107,"./_global":110,"./_promise-resolve":145,"./_species-constructor":153}],184:[function(U,X,x){"use strict";var I=U("./_export"),_=U("./_new-promise-capability"),O=U("./_perform");I(I.S,"Promise",{try:function(y){var v=_.f(this),o=O(y);return(o.e?v.reject:v.resolve)(o.v),v.promise}})},{"./_export":107,"./_new-promise-capability":129,"./_perform":144}],185:[function(U,X,x){U("./_wks-define")("asyncIterator")},{"./_wks-define":164}],186:[function(U,X,x){U("./_wks-define")("observable")},{"./_wks-define":164}],187:[function(U,X,x){U("./es6.array.iterator");for(var I=U("./_global"),_=U("./_hide"),O=U("./_iterators"),y=U("./_wks")("toStringTag"),v="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(","),o=0;o<v.length;o++){var g=v[o],p=I[g],d=p&&p.prototype;d&&!d[y]&&_(d,y,g),O[g]=O.Array}},{"./_global":110,"./_hide":112,"./_iterators":125,"./_wks":166,"./es6.array.iterator":169}],188:[function(U,X,x){var I=U("./_export"),_=U("./_task");I(I.G+I.B,{setImmediate:_.set,clearImmediate:_.clear})},{"./_export":107,"./_task":155}],189:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/helpers/typeof"),O=y(_);function y(m){return m&&m.__esModule?m:{default:m}}function v(m){return Array.isArray?Array.isArray(m):f(m)==="[object Array]"}x.isArray=v;function o(m){return typeof m=="boolean"}x.isBoolean=o;function g(m){return m===null}x.isNull=g;function p(m){return m==null}x.isNullOrUndefined=p;function d(m){return typeof m=="number"}x.isNumber=d;function a(m){return typeof m=="string"}x.isString=a;function n(m){return(typeof m=="undefined"?"undefined":(0,O.default)(m))==="symbol"}x.isSymbol=n;function s(m){return m===void 0}x.isUndefined=s;function t(m){return f(m)==="[object RegExp]"}x.isRegExp=t;function i(m){return(typeof m=="undefined"?"undefined":(0,O.default)(m))==="object"&&m!==null}x.isObject=i;function e(m){return f(m)==="[object Date]"}x.isDate=e;function r(m){return f(m)==="[object Error]"||m instanceof Error}x.isError=r;function c(m){return typeof m=="function"}x.isFunction=c;function u(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||(typeof m=="undefined"?"undefined":(0,O.default)(m))==="symbol"||typeof m=="undefined"}x.isPrimitive=u,x.isBuffer=I.isBuffer;function f(m){return Object.prototype.toString.call(m)}}).call(this,{isBuffer:U("../../is-buffer/index.js")})},{"../../is-buffer/index.js":197,"babel-runtime/helpers/typeof":67}],190:[function(U,X,x){"use strict";var I=U("babel-runtime/helpers/typeof"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(y){"use strict";var v=function(){var a=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,n=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,s=/[^-+\dA-Z]/g;return function(t,i,e,r){if(arguments.length===1&&d(t)==="string"&&!/\d/.test(t)&&(i=t,t=void 0),t=t||new Date,t instanceof Date||(t=new Date(t)),isNaN(t))throw TypeError("Invalid date");i=String(v.masks[i]||i||v.masks.default);var c=i.slice(0,4);(c==="UTC:"||c==="GMT:")&&(i=i.slice(4),e=!0,c==="GMT:"&&(r=!0));var u=e?"getUTC":"get",f=t[u+"Date"](),m=t[u+"Day"](),l=t[u+"Month"](),E=t[u+"FullYear"](),b=t[u+"Hours"](),D=t[u+"Minutes"](),C=t[u+"Seconds"](),w=t[u+"Milliseconds"](),S=e?0:t.getTimezoneOffset(),A=g(t),R=p(t),k={d:f,dd:o(f),ddd:v.i18n.dayNames[m],dddd:v.i18n.dayNames[m+7],m:l+1,mm:o(l+1),mmm:v.i18n.monthNames[l],mmmm:v.i18n.monthNames[l+12],yy:String(E).slice(2),yyyy:E,h:b%12||12,hh:o(b%12||12),H:b,HH:o(b),M:D,MM:o(D),s:C,ss:o(C),l:o(w,3),L:o(Math.round(w/10)),t:b<12?"a":"p",tt:b<12?"am":"pm",T:b<12?"A":"P",TT:b<12?"AM":"PM",Z:r?"GMT":e?"UTC":(String(t).match(n)||[""]).pop().replace(s,""),o:(S>0?"-":"+")+o(Math.floor(Math.abs(S)/60)*100+Math.abs(S)%60,4),S:["th","st","nd","rd"][f%10>3?0:(f%100-f%10!=10)*f%10],W:A,N:R};return i.replace(a,function(L){return L in k?k[L]:L.slice(1,L.length-1)})}}();v.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"},v.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"]};function o(a,n){for(a=String(a),n=n||2;a.length<n;)a="0"+a;return a}function g(a){var n=new Date(a.getFullYear(),a.getMonth(),a.getDate());n.setDate(n.getDate()-(n.getDay()+6)%7+3);var s=new Date(n.getFullYear(),0,4);s.setDate(s.getDate()-(s.getDay()+6)%7+3);var t=n.getTimezoneOffset()-s.getTimezoneOffset();n.setHours(n.getHours()-t);var i=(n-s)/(864e5*7);return 1+Math.floor(i)}function p(a){var n=a.getDay();return n===0&&(n=7),n}function d(a){return a===null?"null":a===void 0?"undefined":(typeof a=="undefined"?"undefined":(0,_.default)(a))!=="object"?typeof a=="undefined"?"undefined":(0,_.default)(a):Array.isArray(a)?"array":{}.toString.call(a).slice(8,-1).toLowerCase()}typeof define=="function"&&define.amd?define(function(){return v}):(typeof x=="undefined"?"undefined":(0,_.default)(x))==="object"?X.exports=v:y.dateFormat=v})(void 0)},{"babel-runtime/helpers/typeof":67}],191:[function(U,X,x){/*!
|
|
|
* escape-html
|
|
|
* Copyright(c) 2012-2013 TJ Holowaychuk
|
|
|
* Copyright(c) 2015 Andreas Lubbe
|
|
|
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var I=/["'&<>]/;X.exports=_;function _(O){var y=""+O,v=I.exec(y);if(!v)return y;var o,g="",p=0,d=0;for(p=v.index;p<y.length;p++){switch(y.charCodeAt(p)){case 34:o=""";break;case 38:o="&";break;case 39:o="'";break;case 60:o="<";break;case 62:o=">";break;default:continue}d!==p&&(g+=y.substring(d,p)),d=p+1,g+=o}return d!==p?g+y.substring(d,p):g}},{}],192:[function(U,X,x){function I(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}X.exports=I,I.EventEmitter=I,I.prototype._events=void 0,I.prototype._maxListeners=void 0,I.defaultMaxListeners=10,I.prototype.setMaxListeners=function(o){if(!O(o)||o<0||isNaN(o))throw TypeError("n must be a positive number");return this._maxListeners=o,this},I.prototype.emit=function(o){var g,p,d,a,n,s;if(this._events||(this._events={}),o==="error"&&(!this._events.error||y(this._events.error)&&!this._events.error.length)){if(g=arguments[1],g instanceof Error)throw g;var t=new Error('Uncaught, unspecified "error" event. ('+g+")");throw t.context=g,t}if(p=this._events[o],v(p))return!1;if(_(p))switch(arguments.length){case 1:p.call(this);break;case 2:p.call(this,arguments[1]);break;case 3:p.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),p.apply(this,a)}else if(y(p))for(a=Array.prototype.slice.call(arguments,1),s=p.slice(),d=s.length,n=0;n<d;n++)s[n].apply(this,a);return!0},I.prototype.addListener=function(o,g){var p;if(!_(g))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",o,_(g.listener)?g.listener:g),this._events[o]?y(this._events[o])?this._events[o].push(g):this._events[o]=[this._events[o],g]:this._events[o]=g,y(this._events[o])&&!this._events[o].warned&&(v(this._maxListeners)?p=I.defaultMaxListeners:p=this._maxListeners,p&&p>0&&this._events[o].length>p&&(this._events[o].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[o].length),typeof console.trace=="function"&&console.trace())),this},I.prototype.on=I.prototype.addListener,I.prototype.once=function(o,g){if(!_(g))throw TypeError("listener must be a function");var p=!1;function d(){this.removeListener(o,d),p||(p=!0,g.apply(this,arguments))}return d.listener=g,this.on(o,d),this},I.prototype.removeListener=function(o,g){var p,d,a,n;if(!_(g))throw TypeError("listener must be a function");if(!this._events||!this._events[o])return this;if(p=this._events[o],a=p.length,d=-1,p===g||_(p.listener)&&p.listener===g)delete this._events[o],this._events.removeListener&&this.emit("removeListener",o,g);else if(y(p)){for(n=a;n-- >0;)if(p[n]===g||p[n].listener&&p[n].listener===g){d=n;break}if(d<0)return this;p.length===1?(p.length=0,delete this._events[o]):p.splice(d,1),this._events.removeListener&&this.emit("removeListener",o,g)}return this},I.prototype.removeAllListeners=function(o){var g,p;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[o]&&delete this._events[o],this;if(arguments.length===0){for(g in this._events){if(g==="removeListener")continue;this.removeAllListeners(g)}return this.removeAllListeners("removeListener"),this._events={},this}if(p=this._events[o],_(p))this.removeListener(o,p);else if(p)for(;p.length;)this.removeListener(o,p[p.length-1]);return delete this._events[o],this},I.prototype.listeners=function(o){var g;return!this._events||!this._events[o]?g=[]:_(this._events[o])?g=[this._events[o]]:g=this._events[o].slice(),g},I.prototype.listenerCount=function(o){if(this._events){var g=this._events[o];if(_(g))return 1;if(g)return g.length}return 0},I.listenerCount=function(o,g){return o.listenerCount(g)};function _(o){return typeof o=="function"}function O(o){return typeof o=="number"}function y(o){return typeof o=="object"&&o!==null}function v(o){return o===void 0}},{}],193:[function(U,X,x){var I=U("http"),_=X.exports;for(var O in I)I.hasOwnProperty(O)&&(_[O]=I[O]);_.request=function(y,v){return y||(y={}),y.scheme="https",y.protocol="https:",I.request.call(this,y,v)}},{http:231}],194:[function(U,X,x){/*!
|
|
|
* humanize-ms - index.js
|
|
|
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
|
|
|
* MIT Licensed
|
|
|
*/"use strict";var I=U("util"),_=U("ms");X.exports=function(O){if(typeof O=="number")return O;var y=_(O);if(y===void 0){var v=new Error(I.format("humanize-ms(%j) result undefined",O));console.warn(v.stack)}return y}},{ms:204,util:243}],195:[function(U,X,x){x.read=function(I,_,O,y,v){var o,g,p=v*8-y-1,d=(1<<p)-1,a=d>>1,n=-7,s=O?v-1:0,t=O?-1:1,i=I[_+s];for(s+=t,o=i&(1<<-n)-1,i>>=-n,n+=p;n>0;o=o*256+I[_+s],s+=t,n-=8);for(g=o&(1<<-n)-1,o>>=-n,n+=y;n>0;g=g*256+I[_+s],s+=t,n-=8);if(o===0)o=1-a;else{if(o===d)return g?NaN:(i?-1:1)*Infinity;g=g+Math.pow(2,y),o=o-a}return(i?-1:1)*g*Math.pow(2,o-y)},x.write=function(I,_,O,y,v,o){var g,p,d,a=o*8-v-1,n=(1<<a)-1,s=n>>1,t=v===23?Math.pow(2,-24)-Math.pow(2,-77):0,i=y?0:o-1,e=y?1:-1,r=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===Infinity?(p=isNaN(_)?1:0,g=n):(g=Math.floor(Math.log(_)/Math.LN2),_*(d=Math.pow(2,-g))<1&&(g--,d*=2),g+s>=1?_+=t/d:_+=t*Math.pow(2,1-s),_*d>=2&&(g++,d/=2),g+s>=n?(p=0,g=n):g+s>=1?(p=(_*d-1)*Math.pow(2,v),g=g+s):(p=_*Math.pow(2,s-1)*Math.pow(2,v),g=0));v>=8;I[O+i]=p&255,i+=e,p/=256,v-=8);for(g=g<<v|p,a+=v;a>0;I[O+i]=g&255,i+=e,g/=256,a-=8);I[O+i-e]|=r*128}},{}],196:[function(U,X,x){typeof Object.create=="function"?X.exports=function(_,O){O&&(_.super_=O,_.prototype=Object.create(O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}))}:X.exports=function(_,O){if(O){_.super_=O;var y=function(){};y.prototype=O.prototype,_.prototype=new y,_.prototype.constructor=_}}},{}],197:[function(U,X,x){/*!
|
|
|
* Determine if an object is a Buffer
|
|
|
*
|
|
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
|
* @license MIT
|
|
|
*/X.exports=function(O){return O!=null&&(I(O)||_(O)||!!O._isBuffer)};function I(O){return!!O.constructor&&typeof O.constructor.isBuffer=="function"&&O.constructor.isBuffer(O)}function _(O){return typeof O.readFloatLE=="function"&&typeof O.slice=="function"&&I(O.slice(0,0))}},{}],198:[function(U,X,x){var I={}.toString;X.exports=Array.isArray||function(_){return I.call(_)=="[object Array]"}},{}],199:[function(require,module,exports){(function(global){(function(U,X){typeof exports=="object"&&typeof module!="undefined"?module.exports=X(U):typeof define=="function"&&define.amd?define(X):X(U)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:this,function(global){"use strict";global=global||{};var _Base64=global.Base64,version="2.5.2",buffer;if(typeof module!="undefined"&&module.exports)try{buffer=eval("require('buffer').Buffer")}catch(U){buffer=void 0}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(U){for(var X={},x=0,I=U.length;x<I;x++)X[U.charAt(x)]=x;return X}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(U){if(U.length<2){var X=U.charCodeAt(0);return X<128?U:X<2048?fromCharCode(192|X>>>6)+fromCharCode(128|X&63):fromCharCode(224|X>>>12&15)+fromCharCode(128|X>>>6&63)+fromCharCode(128|X&63)}else{var X=65536+(U.charCodeAt(0)-55296)*1024+(U.charCodeAt(1)-56320);return fromCharCode(240|X>>>18&7)+fromCharCode(128|X>>>12&63)+fromCharCode(128|X>>>6&63)+fromCharCode(128|X&63)}},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(U){return U.replace(re_utob,cb_utob)},cb_encode=function(U){var X=[0,2,1][U.length%3],x=U.charCodeAt(0)<<16|(U.length>1?U.charCodeAt(1):0)<<8|(U.length>2?U.charCodeAt(2):0),I=[b64chars.charAt(x>>>18),b64chars.charAt(x>>>12&63),X>=2?"=":b64chars.charAt(x>>>6&63),X>=1?"=":b64chars.charAt(x&63)];return I.join("")},btoa=global.btoa?function(U){return global.btoa(U)}:function(U){return U.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=function(U){var X=Object.prototype.toString.call(U)==="[object Uint8Array]";return X?U.toString("base64"):btoa(utob(String(U)))},encode=function(U,X){return X?_encode(String(U)).replace(/[+\/]/g,function(x){return x=="+"?"-":"_"}).replace(/=/g,""):_encode(U)},encodeURI=function(U){return encode(U,!0)},re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=function(U){switch(U.length){case 4:var X=(7&U.charCodeAt(0))<<18|(63&U.charCodeAt(1))<<12|(63&U.charCodeAt(2))<<6|63&U.charCodeAt(3),x=X-65536;return fromCharCode((x>>>10)+55296)+fromCharCode((x&1023)+56320);case 3:return fromCharCode((15&U.charCodeAt(0))<<12|(63&U.charCodeAt(1))<<6|63&U.charCodeAt(2));default:return fromCharCode((31&U.charCodeAt(0))<<6|63&U.charCodeAt(1))}},btou=function(U){return U.replace(re_btou,cb_btou)},cb_decode=function(U){var X=U.length,x=X%4,I=(X>0?b64tab[U.charAt(0)]<<18:0)|(X>1?b64tab[U.charAt(1)]<<12:0)|(X>2?b64tab[U.charAt(2)]<<6:0)|(X>3?b64tab[U.charAt(3)]:0),_=[fromCharCode(I>>>16),fromCharCode(I>>>8&255),fromCharCode(I&255)];return _.length-=[0,0,2,1][x],_.join("")},_atob=global.atob?function(U){return global.atob(U)}:function(U){return U.replace(/\S{1,4}/g,cb_decode)},atob=function(U){return _atob(String(U).replace(/[^A-Za-z0-9\+\/]/g,""))},_decode=buffer?buffer.from&&Uint8Array&&buffer.from!==Uint8Array.from?function(U){return(U.constructor===buffer.constructor?U:buffer.from(U,"base64")).toString()}:function(U){return(U.constructor===buffer.constructor?U:new buffer(U,"base64")).toString()}:function(U){return btou(_atob(U))},decode=function(U){return _decode(String(U).replace(/[-_]/g,function(X){return X=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var U=global.Base64;return global.Base64=_Base64,U};if(global.Base64={VERSION:version,atob,btoa,fromBase64:decode,toBase64:encode,utob,encode,encodeURI,btou,decode,noConflict,__buffer__:buffer},typeof Object.defineProperty=="function"){var noEnum=function(U){return{value:U,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(U){return encode(this,U)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}return global.Meteor&&(Base64=global.Base64),typeof module!="undefined"&&module.exports?module.exports.Base64=global.Base64:typeof define=="function"&&define.amd&&define([],function(){return global.Base64}),{Base64:global.Base64}})}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],200:[function(U,X,x){/*!
|
|
|
* merge-descriptors
|
|
|
* Copyright(c) 2014 Jonathan Ong
|
|
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
|
* MIT Licensed
|
|
|
*/"use strict";X.exports=_;var I=Object.prototype.hasOwnProperty;function _(O,y,v){if(!O)throw new TypeError("argument dest is required");if(!y)throw new TypeError("argument src is required");return v===void 0&&(v=!0),Object.getOwnPropertyNames(y).forEach(function(g){if(!v&&I.call(O,g))return;var p=Object.getOwnPropertyDescriptor(y,g);Object.defineProperty(O,g,p)}),O}},{}],201:[function(U,X,x){"use strict";function I(){this._types=Object.create(null),this._extensions=Object.create(null);for(var _=0;_<arguments.length;_++)this.define(arguments[_]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}I.prototype.define=function(_,O){for(var y in _){var v=_[y].map(function(p){return p.toLowerCase()});y=y.toLowerCase();for(var o=0;o<v.length;o++){var g=v[o];if(g[0]=="*")continue;if(!O&&g in this._types)throw new Error('Attempt to change mapping for "'+g+'" extension from "'+this._types[g]+'" to "'+y+'". Pass `force=true` to allow this, otherwise remove "'+g+'" from the list of extensions for "'+y+'".');this._types[g]=y}if(O||!this._extensions[y]){var g=v[0];this._extensions[y]=g[0]!="*"?g:g.substr(1)}}},I.prototype.getType=function(_){_=String(_);var O=_.replace(/^.*[/\\]/,"").toLowerCase(),y=O.replace(/^.*\./,"").toLowerCase(),v=O.length<_.length,o=y.length<O.length-1;return(o||!v)&&this._types[y]||null},I.prototype.getExtension=function(_){return _=/^\s*([^;\s]*)/.test(_)&&RegExp.$1,_&&this._extensions[_.toLowerCase()]||null},X.exports=I},{}],202:[function(U,X,x){"use strict";var I=U("./Mime");X.exports=new I(U("./types/standard"))},{"./Mime":201,"./types/standard":203}],203:[function(U,X,x){X.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"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","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"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/lgr+xml":["lgr"],"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/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"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/p2p-overlay+xml":["relo"],"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/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"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/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"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/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"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/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/urc-ressheet+xml":["rsheet"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"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":["*3gpp"],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*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":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"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":["*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"]}},{}],204:[function(U,X,x){var I=1e3,_=I*60,O=_*60,y=O*24,v=y*7,o=y*365.25;X.exports=function(n,s){s=s||{};var t=typeof n;if(t==="string"&&n.length>0)return g(n);if(t==="number"&&isFinite(n))return s.long?d(n):p(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function g(n){if(n=String(n),n.length>100)return;var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(!s)return;var t=parseFloat(s[1]),i=(s[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*o;case"weeks":case"week":case"w":return t*v;case"days":case"day":case"d":return t*y;case"hours":case"hour":case"hrs":case"hr":case"h":return t*O;case"minutes":case"minute":case"mins":case"min":case"m":return t*_;case"seconds":case"second":case"secs":case"sec":case"s":return t*I;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}function p(n){var s=Math.abs(n);return s>=y?Math.round(n/y)+"d":s>=O?Math.round(n/O)+"h":s>=_?Math.round(n/_)+"m":s>=I?Math.round(n/I)+"s":n+"ms"}function d(n){var s=Math.abs(n);return s>=y?a(n,s,y,"day"):s>=O?a(n,s,O,"hour"):s>=_?a(n,s,_,"minute"):s>=I?a(n,s,I,"second"):n+" ms"}function a(n,s,t,i){var e=s>=t*1.5;return Math.round(n/t)+" "+i+(e?"s":"")}},{}],205:[function(U,X,x){(function(I){function _(o,g){for(var p=0,d=o.length-1;d>=0;d--){var a=o[d];a==="."?o.splice(d,1):a===".."?(o.splice(d,1),p++):p&&(o.splice(d,1),p--)}if(g)for(;p--;p)o.unshift("..");return o}x.resolve=function(){for(var o="",g=!1,p=arguments.length-1;p>=-1&&!g;p--){var d=p>=0?arguments[p]:I.cwd();if(typeof d!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!d)continue;o=d+"/"+o,g=d.charAt(0)==="/"}return o=_(y(o.split("/"),function(a){return!!a}),!g).join("/"),(g?"/":"")+o||"."},x.normalize=function(o){var g=x.isAbsolute(o),p=v(o,-1)==="/";return o=_(y(o.split("/"),function(d){return!!d}),!g).join("/"),!o&&!g&&(o="."),o&&p&&(o+="/"),(g?"/":"")+o},x.isAbsolute=function(o){return o.charAt(0)==="/"},x.join=function(){var o=Array.prototype.slice.call(arguments,0);return x.normalize(y(o,function(g,p){if(typeof g!="string")throw new TypeError("Arguments to path.join must be strings");return g}).join("/"))},x.relative=function(o,g){o=x.resolve(o).substr(1),g=x.resolve(g).substr(1);function p(e){for(var r=0;r<e.length&&!(e[r]!=="");r++);for(var c=e.length-1;c>=0&&!(e[c]!=="");c--);return r>c?[]:e.slice(r,c-r+1)}for(var d=p(o.split("/")),a=p(g.split("/")),n=Math.min(d.length,a.length),s=n,t=0;t<n;t++)if(d[t]!==a[t]){s=t;break}for(var i=[],t=s;t<d.length;t++)i.push("..");return i=i.concat(a.slice(s)),i.join("/")},x.sep="/",x.delimiter=":",x.dirname=function(o){if(typeof o!="string"&&(o=o+""),o.length===0)return".";for(var g=o.charCodeAt(0),p=g===47,d=-1,a=!0,n=o.length-1;n>=1;--n)if(g=o.charCodeAt(n),g===47){if(!a){d=n;break}}else a=!1;return d===-1?p?"/":".":p&&d===1?"/":o.slice(0,d)};function O(o){typeof o!="string"&&(o=o+"");var g=0,p=-1,d=!0,a;for(a=o.length-1;a>=0;--a)if(o.charCodeAt(a)===47){if(!d){g=a+1;break}}else p===-1&&(d=!1,p=a+1);return p===-1?"":o.slice(g,p)}x.basename=function(o,g){var p=O(o);return g&&p.substr(-1*g.length)===g&&(p=p.substr(0,p.length-g.length)),p},x.extname=function(o){typeof o!="string"&&(o=o+"");for(var g=-1,p=0,d=-1,a=!0,n=0,s=o.length-1;s>=0;--s){var t=o.charCodeAt(s);if(t===47){if(!a){p=s+1;break}continue}d===-1&&(a=!1,d=s+1),t===46?g===-1?g=s:n!==1&&(n=1):g!==-1&&(n=-1)}return g===-1||d===-1||n===0||n===1&&g===d-1&&g===p+1?"":o.slice(g,d)};function y(o,g){if(o.filter)return o.filter(g);for(var p=[],d=0;d<o.length;d++)g(o[d],d,o)&&p.push(o[d]);return p}var v="ab".substr(-1)==="b"?function(o,g,p){return o.substr(g,p)}:function(o,g,p){return g<0&&(g=o.length+g),o.substr(g,p)}}).call(this,U("_process"))},{_process:208}],206:[function(U,X,x){(function(I){/*!
|
|
|
* Platform.js <https://mths.be/platform>
|
|
|
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
|
|
|
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
|
|
* Available under MIT license <https://mths.be/mit>
|
|
|
*/(function(){"use strict";var _={function:!0,object:!0},O=_[typeof window]&&window||this,y=O,v=_[typeof x]&&x,o=_[typeof X]&&X&&!X.nodeType&&X,g=v&&o&&typeof I=="object"&&I;g&&(g.global===g||g.window===g||g.self===g)&&(O=g);var p=Math.pow(2,53)-1,d=/\bOpera/,a=this,n=Object.prototype,s=n.hasOwnProperty,t=n.toString;function i(w){return w=String(w),w.charAt(0).toUpperCase()+w.slice(1)}function e(w,S,A){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 S&&A&&/^Win/i.test(w)&&!/^Windows Phone /i.test(w)&&(R=R[/[\d.]+$/.exec(w)])&&(w="Windows "+R),w=String(w),S&&A&&(w=w.replace(RegExp(S,"i"),A)),w=c(w.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]),w}function r(w,S){var A=-1,R=w?w.length:0;if(typeof R=="number"&&R>-1&&R<=p)for(;++A<R;)S(w[A],A,w);else u(w,S)}function c(w){return w=b(w),/^(?:webOS|i(?:OS|P))/.test(w)?w:i(w)}function u(w,S){for(var A in w)s.call(w,A)&&S(w[A],A,w)}function f(w){return w==null?i(w):t.call(w).slice(8,-1)}function m(w,S){var A=w!=null?typeof w[S]:"number";return!/^(?:boolean|number|string|undefined)$/.test(A)&&(A=="object"?!!w[S]:!0)}function l(w){return String(w).replace(/([ -])(?!$)/g,"$1?")}function E(w,S){var A=null;return r(w,function(R,k){A=S(A,R,k,w)}),A}function b(w){return String(w).replace(/^ +| +$/g,"")}function D(w){var S=O,A=w&&typeof w=="object"&&f(w)!="String";A&&(S=w,w=null);var R=S.navigator||{},k=R.userAgent||"";w||(w=k);var L=A||a==y,M=A?!!R.likeChrome:/\bChrome\b/.test(w)&&!/internal|\n/i.test(t.toString()),G="Object",W=A?G:"ScriptBridgingProxyObject",N=A?G:"Environment",K=A&&S.java?"JavaPackage":f(S.java),F=A?G:"RuntimeObject",P=/\bJava/.test(K)&&S.java,B=P&&f(S.environment)==N,J=P?"a":"\u03B1",re=P?"b":"\u03B2",he=S.document||{},we=S.operamini||S.opera,ke=d.test(ke=A&&we?we["[[Class]]"]:f(we))?ke:we=null,ne,Oe=w,Ce=[],fe=null,oe=w==k,se=oe&&we&&typeof we.version=="function"&&we.version(),be,ie=Y([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),de=ve(["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"]),Fe=Te([{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"]),ae=q({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}}),Z=pe(["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 Y(_e){return E(_e,function(Ve,tt){return Ve||RegExp("\\b"+(tt.pattern||l(tt))+"\\b","i").exec(w)&&(tt.label||tt)})}function q(_e){return E(_e,function(Ve,tt,Ge){return Ve||(tt[Fe]||tt[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Fe)]||RegExp("\\b"+l(Ge)+"(?:\\b|\\w*\\d)","i").exec(w))&&Ge})}function ve(_e){return E(_e,function(Ve,tt){return Ve||RegExp("\\b"+(tt.pattern||l(tt))+"\\b","i").exec(w)&&(tt.label||tt)})}function pe(_e){return E(_e,function(Ve,tt){var Ge=tt.pattern||l(tt);return!Ve&&(Ve=RegExp("\\b"+Ge+"(?:/[\\d.]+|[ \\w.]*)","i").exec(w))&&(Ve=e(Ve,Ge,tt.label||tt)),Ve})}function Te(_e){return E(_e,function(Ve,tt){var Ge=tt.pattern||l(tt);return!Ve&&(Ve=RegExp("\\b"+Ge+" *\\d+[.\\w_]*","i").exec(w)||RegExp("\\b"+Ge+" *\\w+-[\\w]*","i").exec(w)||RegExp("\\b"+Ge+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(w))&&((Ve=String(tt.label&&!RegExp(Ge,"i").test(tt.label)?tt.label:Ve).split("/"))[1]&&!/[\d.]+/.test(Ve[0])&&(Ve[0]+=" "+Ve[1]),tt=tt.label||tt,Ve=c(Ve[0].replace(RegExp(Ge,"i"),tt).replace(RegExp("; *(?:"+tt+"[_-])?","i")," ").replace(RegExp("("+tt+")[-_.]?(\\w)","i"),"$1 $2"))),Ve})}function Ne(_e){return E(_e,function(Ve,tt){return Ve||(RegExp(tt+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(w)||0)[1]||null})}function me(){return this.description||""}if(ie&&(ie=[ie]),ae&&!Fe&&(Fe=Te([ae])),(ne=/\bGoogle TV\b/.exec(Fe))&&(Fe=ne[0]),/\bSimulator\b/i.test(w)&&(Fe=(Fe?Fe+" ":"")+"Simulator"),de=="Opera Mini"&&/\bOPiOS\b/.test(w)&&Ce.push("running in Turbo/Uncompressed mode"),de=="IE"&&/\blike iPhone OS\b/.test(w)?(ne=D(w.replace(/like iPhone OS/,"")),ae=ne.manufacturer,Fe=ne.product):/^iP/.test(Fe)?(de||(de="Safari"),Z="iOS"+((ne=/ OS ([\d_]+)/i.exec(w))?" "+ne[1].replace(/_/g,"."):"")):de=="Konqueror"&&!/buntu/i.test(Z)?Z="Kubuntu":ae&&ae!="Google"&&(/Chrome/.test(de)&&!/\bMobile Safari\b/i.test(w)||/\bVita\b/.test(Fe))||/\bAndroid\b/.test(Z)&&/^Chrome/.test(de)&&/\bVersion\//i.test(w)?(de="Android Browser",Z=/\bAndroid\b/.test(Z)?Z:"Android"):de=="Silk"?(/\bMobi/i.test(w)||(Z="Android",Ce.unshift("desktop mode")),/Accelerated *= *true/i.test(w)&&Ce.unshift("accelerated")):de=="PaleMoon"&&(ne=/\bFirefox\/([\d.]+)\b/.exec(w))?Ce.push("identifying as Firefox "+ne[1]):de=="Firefox"&&(ne=/\b(Mobile|Tablet|TV)\b/i.exec(w))?(Z||(Z="Firefox OS"),Fe||(Fe=ne[1])):!de||(ne=!/\bMinefield\b/i.test(w)&&/\b(?:Firefox|Safari)\b/.exec(de))?(de&&!Fe&&/[\/,]|^[^(]+?\)/.test(w.slice(w.indexOf(ne+"/")+8))&&(de=null),(ne=Fe||ae||Z)&&(Fe||ae||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(Z))&&(de=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(Z)?Z:ne)+" Browser")):de=="Electron"&&(ne=(/\bChrome\/([\d.]+)\b/.exec(w)||0)[1])&&Ce.push("Chromium "+ne),se||(se=Ne(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",l(de),"(?:Firefox|Minefield|NetFront)"])),(ne=ie=="iCab"&&parseFloat(se)>3&&"WebKit"||/\bOpera\b/.test(de)&&(/\bOPR\b/.test(w)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(w)&&!/^(?:Trident|EdgeHTML)$/.test(ie)&&"WebKit"||!ie&&/\bMSIE\b/i.test(w)&&(Z=="Mac OS"?"Tasman":"Trident")||ie=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(de)&&"NetFront")&&(ie=[ne]),de=="IE"&&(ne=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(w)||0)[1])?(de+=" Mobile",Z="Windows Phone "+(/\+$/.test(ne)?ne:ne+".x"),Ce.unshift("desktop mode")):/\bWPDesktop\b/i.test(w)?(de="IE Mobile",Z="Windows Phone 8.x",Ce.unshift("desktop mode"),se||(se=(/\brv:([\d.]+)/.exec(w)||0)[1])):de!="IE"&&ie=="Trident"&&(ne=/\brv:([\d.]+)/.exec(w))&&(de&&Ce.push("identifying as "+de+(se?" "+se:"")),de="IE",se=ne[1]),oe){if(m(S,"global"))if(P&&(ne=P.lang.System,Oe=ne.getProperty("os.arch"),Z=Z||ne.getProperty("os.name")+" "+ne.getProperty("os.version")),B){try{se=S.require("ringo/engine").version.join("."),de="RingoJS"}catch(_e){(ne=S.system)&&ne.global.system==S.system&&(de="Narwhal",Z||(Z=ne[0].os||null))}de||(de="Rhino")}else typeof S.process=="object"&&!S.process.browser&&(ne=S.process)&&(typeof ne.versions=="object"&&(typeof ne.versions.electron=="string"?(Ce.push("Node "+ne.versions.node),de="Electron",se=ne.versions.electron):typeof ne.versions.nw=="string"&&(Ce.push("Chromium "+se,"Node "+ne.versions.node),de="NW.js",se=ne.versions.nw)),de||(de="Node.js",Oe=ne.arch,Z=ne.platform,se=/[\d.]+/.exec(ne.version),se=se?se[0]:null));else f(ne=S.runtime)==W?(de="Adobe AIR",Z=ne.flash.system.Capabilities.os):f(ne=S.phantom)==F?(de="PhantomJS",se=(ne=ne.version||null)&&ne.major+"."+ne.minor+"."+ne.patch):typeof he.documentMode=="number"&&(ne=/\bTrident\/(\d+)/i.exec(w))?(se=[se,he.documentMode],(ne=+ne[1]+4)!=se[1]&&(Ce.push("IE "+se[1]+" mode"),ie&&(ie[1]=""),se[1]=ne),se=de=="IE"?String(se[1].toFixed(1)):se[0]):typeof he.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(de)&&(Ce.push("masking as "+de+" "+se),de="IE",se="11.0",ie=["Trident"],Z="Windows");Z=Z&&c(Z)}if(se&&(ne=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(se)||/(?:alpha|beta)(?: ?\d)?/i.exec(w+";"+(oe&&R.appMinorVersion))||/\bMinefield\b/i.test(w)&&"a")&&(fe=/b/i.test(ne)?"beta":"alpha",se=se.replace(RegExp(ne+"\\+?$"),"")+(fe=="beta"?re:J)+(/\d+\+?/.exec(ne)||"")),de=="Fennec"||de=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(Z))de="Firefox Mobile";else if(de=="Maxthon"&&se)se=se.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Fe))Fe=="Xbox 360"&&(Z=null),Fe=="Xbox 360"&&/\bIEMobile\b/.test(w)&&Ce.unshift("mobile mode");else if((/^(?:Chrome|IE|Opera)$/.test(de)||de&&!Fe&&!/Browser|Mobi/.test(de))&&(Z=="Windows CE"||/Mobi/i.test(w)))de+=" Mobile";else if(de=="IE"&&oe)try{S.external===null&&Ce.unshift("platform preview")}catch(_e){Ce.unshift("embedded")}else(/\bBlackBerry\b/.test(Fe)||/\bBB10\b/.test(w))&&(ne=(RegExp(Fe.replace(/ +/g," *")+"/([.\\d]+)","i").exec(w)||0)[1]||se)?(ne=[ne,/BB10/.test(w)],Z=(ne[1]?(Fe=null,ae="BlackBerry"):"Device Software")+" "+ne[0],se=null):this!=u&&Fe!="Wii"&&(oe&&we||/Opera/.test(de)&&/\b(?:MSIE|Firefox)\b/i.test(w)||de=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(Z)||de=="IE"&&(Z&&!/^Win/.test(Z)&&se>5.5||/\bWindows XP\b/.test(Z)&&se>8||se==8&&!/\bTrident\b/.test(w)))&&!d.test(ne=D.call(u,w.replace(d,"")+";"))&&ne.name&&(ne="ing as "+ne.name+((ne=ne.version)?" "+ne:""),d.test(de)?(/\bIE\b/.test(ne)&&Z=="Mac OS"&&(Z=null),ne="identify"+ne):(ne="mask"+ne,ke?de=c(ke.replace(/([a-z])([A-Z])/g,"$1 $2")):de="Opera",/\bIE\b/.test(ne)&&(Z=null),oe||(se=null)),ie=["Presto"],Ce.push(ne));(ne=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(w)||0)[1])&&(ne=[parseFloat(ne.replace(/\.(\d)$/,".0$1")),ne],de=="Safari"&&ne[1].slice(-1)=="+"?(de="WebKit Nightly",fe="alpha",se=ne[1].slice(0,-1)):(se==ne[1]||se==(ne[2]=(/\bSafari\/([\d.]+\+?)/i.exec(w)||0)[1]))&&(se=null),ne[1]=(/\bChrome\/([\d.]+)/i.exec(w)||0)[1],ne[0]==537.36&&ne[2]==537.36&&parseFloat(ne[1])>=28&&ie=="WebKit"&&(ie=["Blink"]),!oe||!M&&!ne[1]?(ie&&(ie[1]="like Safari"),ne=(ne=ne[0],ne<400?1:ne<500?2:ne<526?3:ne<533?4:ne<534?"4+":ne<535?5:ne<537?6:ne<538?7:ne<601?8:"8")):(ie&&(ie[1]="like Chrome"),ne=ne[1]||(ne=ne[0],ne<530?1:ne<532?2:ne<532.05?3:ne<533?4:ne<534.03?5:ne<534.07?6:ne<534.1?7:ne<534.13?8:ne<534.16?9:ne<534.24?10:ne<534.3?11:ne<535.01?12:ne<535.02?"13+":ne<535.07?15:ne<535.11?16:ne<535.19?17:ne<536.05?18:ne<536.1?19:ne<537.01?20:ne<537.11?"21+":ne<537.13?23:ne<537.18?24:ne<537.24?25:ne<537.36?26:ie!="Blink"?"27":"28")),ie&&(ie[1]+=" "+(ne+=typeof ne=="number"?".x":/[.+]/.test(ne)?"":"+")),de=="Safari"&&(!se||parseInt(se)>45)&&(se=ne)),de=="Opera"&&(ne=/\bzbov|zvav$/.exec(Z))?(de+=" ",Ce.unshift("desktop mode"),ne=="zvav"?(de+="Mini",se=null):de+="Mobile",Z=Z.replace(RegExp(" *"+ne+"$"),"")):de=="Safari"&&/\bChrome\b/.exec(ie&&ie[1])&&(Ce.unshift("desktop mode"),de="Chrome Mobile",se=null,/\bOS X\b/.test(Z)?(ae="Apple",Z="iOS 4.3+"):Z=null),se&&se.indexOf(ne=/[\d.]+$/.exec(Z))==0&&w.indexOf("/"+ne+"-")>-1&&(Z=b(Z.replace(ne,""))),ie&&!/\b(?:Avant|Nook)\b/.test(de)&&(/Browser|Lunascape|Maxthon/.test(de)||de!="Safari"&&/^iOS/.test(Z)&&/\bSafari\b/.test(ie[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(de)&&ie[1])&&((ne=ie[ie.length-1])&&Ce.push(ne)),Ce.length&&(Ce=["("+Ce.join("; ")+")"]),ae&&Fe&&Fe.indexOf(ae)<0&&Ce.push("on "+ae),Fe&&Ce.push((/^on /.test(Ce[Ce.length-1])?"":"on ")+Fe),Z&&(ne=/ ([\d.+]+)$/.exec(Z),be=ne&&Z.charAt(Z.length-ne[0].length-1)=="/",Z={architecture:32,family:ne&&!be?Z.replace(ne[0],""):Z,version:ne?ne[1]:null,toString:function(){var _e=this.version;return this.family+(_e&&!be?" "+_e:"")+(this.architecture==64?" 64-bit":"")}}),(ne=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(Oe))&&!/\bi686\b/i.test(Oe)?(Z&&(Z.architecture=64,Z.family=Z.family.replace(RegExp(" *"+ne),"")),de&&(/\bWOW64\b/i.test(w)||oe&&/\w(?:86|32)$/.test(R.cpuClass||R.platform)&&!/\bWin64; x64\b/i.test(w))&&Ce.unshift("32-bit")):Z&&/^OS X/.test(Z.family)&&de=="Chrome"&&parseFloat(se)>=39&&(Z.architecture=64),w||(w=null);var Ie={};return Ie.description=w,Ie.layout=ie&&ie[0],Ie.manufacturer=ae,Ie.name=de,Ie.prerelease=fe,Ie.product=Fe,Ie.ua=w,Ie.version=de&&se,Ie.os=Z||{architecture:null,family:null,version:null,toString:function(){return"null"}},Ie.parse=D,Ie.toString=me,Ie.version&&Ce.unshift(se),Ie.name&&Ce.unshift(de),Z&&de&&!(Z==String(Z).split(" ")[0]&&(Z==de.split(" ")[0]||Fe))&&Ce.push(Fe?"("+Z+")":"on "+Z),Ce.length&&(Ie.description=Ce.join(" ")),Ie}var C=D();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(O.platform=C,define(function(){return C})):v&&o?u(C,function(w,S){v[S]=w}):O.platform=C}).call(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],207:[function(U,X,x){(function(I){"use strict";typeof I=="undefined"||!I.version||I.version.indexOf("v0.")===0||I.version.indexOf("v1.")===0&&I.version.indexOf("v1.8.")!==0?X.exports={nextTick:_}:X.exports=I;function _(O,y,v,o){if(typeof O!="function")throw new TypeError('"callback" argument must be a function');var g=arguments.length,p,d;switch(g){case 0:case 1:return I.nextTick(O);case 2:return I.nextTick(function(){O.call(null,y)});case 3:return I.nextTick(function(){O.call(null,y,v)});case 4:return I.nextTick(function(){O.call(null,y,v,o)});default:for(p=new Array(g-1),d=0;d<p.length;)p[d++]=arguments[d];return I.nextTick(function(){O.apply(null,p)})}}}).call(this,U("_process"))},{_process:208}],208:[function(U,X,x){var I=X.exports={},_,O;function y(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?_=setTimeout:_=y}catch(r){_=y}try{typeof clearTimeout=="function"?O=clearTimeout:O=v}catch(r){O=v}})();function o(r){if(_===setTimeout)return setTimeout(r,0);if((_===y||!_)&&setTimeout)return _=setTimeout,setTimeout(r,0);try{return _(r,0)}catch(c){try{return _.call(null,r,0)}catch(u){return _.call(this,r,0)}}}function g(r){if(O===clearTimeout)return clearTimeout(r);if((O===v||!O)&&clearTimeout)return O=clearTimeout,clearTimeout(r);try{return O(r)}catch(c){try{return O.call(null,r)}catch(u){return O.call(this,r)}}}var p=[],d=!1,a,n=-1;function s(){if(!d||!a)return;d=!1,a.length?p=a.concat(p):n=-1,p.length&&t()}function t(){if(d)return;var r=o(s);d=!0;for(var c=p.length;c;){for(a=p,p=[];++n<c;)a&&a[n].run();n=-1,c=p.length}a=null,d=!1,g(r)}I.nextTick=function(r){var c=new Array(arguments.length-1);if(arguments.length>1)for(var u=1;u<arguments.length;u++)c[u-1]=arguments[u];p.push(new i(r,c)),p.length===1&&!d&&o(t)};function i(r,c){this.fun=r,this.array=c}i.prototype.run=function(){this.fun.apply(null,this.array)},I.title="browser",I.browser=!0,I.env={},I.argv=[],I.version="",I.versions={};function e(){}I.on=e,I.addListener=e,I.once=e,I.off=e,I.removeListener=e,I.removeAllListeners=e,I.emit=e,I.prependListener=e,I.prependOnceListener=e,I.listeners=function(r){return[]},I.binding=function(r){throw new Error("process.binding is not supported")},I.cwd=function(){return"/"},I.chdir=function(r){throw new Error("process.chdir is not supported")},I.umask=function(){return 0}},{}],209:[function(U,X,x){(function(I){/*! https://mths.be/punycode v1.4.1 by @mathias */(function(_){var O=typeof x=="object"&&x&&!x.nodeType&&x,y=typeof X=="object"&&X&&!X.nodeType&&X,v=typeof I=="object"&&I;(v.global===v||v.window===v||v.self===v)&&(_=v);var o,g=2147483647,p=36,d=1,a=26,n=38,s=700,t=72,i=128,e="-",r=/^xn--/,c=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=p-d,l=Math.floor,E=String.fromCharCode,b;function D(K){throw new RangeError(f[K])}function C(K,F){for(var P=K.length,B=[];P--;)B[P]=F(K[P]);return B}function w(K,F){var P=K.split("@"),B="";P.length>1&&(B=P[0]+"@",K=P[1]),K=K.replace(u,".");var J=K.split("."),re=C(J,F).join(".");return B+re}function S(K){for(var F=[],P=0,B=K.length,J,re;P<B;)J=K.charCodeAt(P++),J>=55296&&J<=56319&&P<B?(re=K.charCodeAt(P++),(re&64512)==56320?F.push(((J&1023)<<10)+(re&1023)+65536):(F.push(J),P--)):F.push(J);return F}function A(K){return C(K,function(F){var P="";return F>65535&&(F-=65536,P+=E(F>>>10&1023|55296),F=56320|F&1023),P+=E(F),P}).join("")}function R(K){return K-48<10?K-22:K-65<26?K-65:K-97<26?K-97:p}function k(K,F){return K+22+75*(K<26)-((F!=0)<<5)}function L(K,F,P){var B=0;for(K=P?l(K/s):K>>1,K+=l(K/F);K>m*a>>1;B+=p)K=l(K/m);return l(B+(m+1)*K/(K+n))}function M(K){var F=[],P=K.length,B,J=0,re=i,he=t,we,ke,ne,Oe,Ce,fe,oe,se,be;for(we=K.lastIndexOf(e),we<0&&(we=0),ke=0;ke<we;++ke)K.charCodeAt(ke)>=128&&D("not-basic"),F.push(K.charCodeAt(ke));for(ne=we>0?we+1:0;ne<P;){for(Oe=J,Ce=1,fe=p;!(ne>=P&&D("invalid-input"),oe=R(K.charCodeAt(ne++)),(oe>=p||oe>l((g-J)/Ce))&&D("overflow"),J+=oe*Ce,se=fe<=he?d:fe>=he+a?a:fe-he,oe<se);fe+=p)be=p-se,Ce>l(g/be)&&D("overflow"),Ce*=be;B=F.length+1,he=L(J-Oe,B,Oe==0),l(J/B)>g-re&&D("overflow"),re+=l(J/B),J%=B,F.splice(J++,0,re)}return A(F)}function G(K){var F,P,B,J,re,he,we,ke,ne,Oe,Ce,fe=[],oe,se,be,ie;for(K=S(K),oe=K.length,F=i,P=0,re=t,he=0;he<oe;++he)Ce=K[he],Ce<128&&fe.push(E(Ce));for(B=J=fe.length,J&&fe.push(e);B<oe;){for(we=g,he=0;he<oe;++he)Ce=K[he],Ce>=F&&Ce<we&&(we=Ce);for(se=B+1,we-F>l((g-P)/se)&&D("overflow"),P+=(we-F)*se,F=we,he=0;he<oe;++he)if(Ce=K[he],Ce<F&&++P>g&&D("overflow"),Ce==F){for(ke=P,ne=p;!(Oe=ne<=re?d:ne>=re+a?a:ne-re,ke<Oe);ne+=p)ie=ke-Oe,be=p-Oe,fe.push(E(k(Oe+ie%be,0))),ke=l(ie/be);fe.push(E(k(ke,0))),re=L(P,se,B==J),P=0,++B}++P,++F}return fe.join("")}function W(K){return w(K,function(F){return r.test(F)?M(F.slice(4).toLowerCase()):F})}function N(K){return w(K,function(F){return c.test(F)?"xn--"+G(F):F})}if(o={version:"1.4.1",ucs2:{decode:S,encode:A},decode:M,encode:G,toASCII:N,toUnicode:W},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return o});else if(O&&y)if(X.exports==O)y.exports=o;else for(b in o)o.hasOwnProperty(b)&&(O[b]=o[b]);else _.punycode=o})(this)}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],210:[function(U,X,x){"use strict";function I(O,y){return Object.prototype.hasOwnProperty.call(O,y)}X.exports=function(O,y,v,o){y=y||"&",v=v||"=";var g={};if(typeof O!="string"||O.length===0)return g;var p=/\+/g;O=O.split(y);var d=1e3;o&&typeof o.maxKeys=="number"&&(d=o.maxKeys);var a=O.length;d>0&&a>d&&(a=d);for(var n=0;n<a;++n){var s=O[n].replace(p,"%20"),t=s.indexOf(v),i,e,r,c;t>=0?(i=s.substr(0,t),e=s.substr(t+1)):(i=s,e=""),r=decodeURIComponent(i),c=decodeURIComponent(e),I(g,r)?_(g[r])?g[r].push(c):g[r]=[g[r],c]:g[r]=c}return g};var _=Array.isArray||function(O){return Object.prototype.toString.call(O)==="[object Array]"}},{}],211:[function(U,X,x){"use strict";var I=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};X.exports=function(v,o,g,p){return o=o||"&",g=g||"=",v===null&&(v=void 0),typeof v=="object"?O(y(v),function(d){var a=encodeURIComponent(I(d))+g;return _(v[d])?O(v[d],function(n){return a+encodeURIComponent(I(n))}).join(o):a+encodeURIComponent(I(v[d]))}).join(o):p?encodeURIComponent(I(p))+g+encodeURIComponent(I(v)):""};var _=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};function O(v,o){if(v.map)return v.map(o);for(var g=[],p=0;p<v.length;p++)g.push(o(v[p],p));return g}var y=Object.keys||function(v){var o=[];for(var g in v)Object.prototype.hasOwnProperty.call(v,g)&&o.push(g);return o}},{}],212:[function(U,X,x){"use strict";x.decode=x.parse=U("./decode"),x.encode=x.stringify=U("./encode")},{"./decode":210,"./encode":211}],213:[function(U,X,x){X.exports=U("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":214}],214:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=v(I),O=U("babel-runtime/core-js/object/keys"),y=v(O);function v(c){return c&&c.__esModule?c:{default:c}}var o=U("process-nextick-args"),g=y.default||function(c){var u=[];for(var f in c)u.push(f);return u};X.exports=i;var p=(0,_.default)(U("core-util-is"));p.inherits=U("inherits");var d=U("./_stream_readable"),a=U("./_stream_writable");p.inherits(i,d);for(var n=g(a.prototype),s=0;s<n.length;s++){var t=n[s];i.prototype[t]||(i.prototype[t]=a.prototype[t])}function i(c){if(!(this instanceof i))return new i(c);d.call(this,c),a.call(this,c),c&&c.readable===!1&&(this.readable=!1),c&&c.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,c&&c.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",e)}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function e(){if(this.allowHalfOpen||this._writableState.ended)return;o.nextTick(r,this)}function r(c){c.end()}Object.defineProperty(i.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=u,this._writableState.destroyed=u}}),i.prototype._destroy=function(c,u){this.push(null),this.end(),o.nextTick(u,c)}},{"./_stream_readable":216,"./_stream_writable":218,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60,"core-util-is":189,inherits:196,"process-nextick-args":207}],215:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(g){return g&&g.__esModule?g:{default:g}}X.exports=o;var y=U("./_stream_transform"),v=(0,_.default)(U("core-util-is"));v.inherits=U("inherits"),v.inherits(o,y);function o(g){if(!(this instanceof o))return new o(g);y.call(this,g)}o.prototype._transform=function(g,p,d){d(null,g)}},{"./_stream_transform":217,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],216:[function(U,X,x){(function(I,_){"use strict";var O=U("babel-runtime/core-js/object/get-prototype-of"),y=g(O),v=U("babel-runtime/core-js/object/create"),o=g(v);function g(ie){return ie&&ie.__esModule?ie:{default:ie}}var p=U("process-nextick-args");X.exports=S;var d=U("isarray"),a;S.ReadableState=w;var n=U("events").EventEmitter,s=function(de,Fe){return de.listeners(Fe).length},t=U("./internal/streams/stream"),i=U("safe-buffer").Buffer,e=_.Uint8Array||function(){};function r(ie){return i.from(ie)}function c(ie){return i.isBuffer(ie)||ie instanceof e}var u=(0,o.default)(U("core-util-is"));u.inherits=U("inherits");var f=U("util"),m=void 0;f&&f.debuglog?m=f.debuglog("stream"):m=function(){};var l=U("./internal/streams/BufferList"),E=U("./internal/streams/destroy"),b;u.inherits(S,t);var D=["error","close","destroy","pause","resume"];function C(ie,de,Fe){if(typeof ie.prependListener=="function")return ie.prependListener(de,Fe);!ie._events||!ie._events[de]?ie.on(de,Fe):d(ie._events[de])?ie._events[de].unshift(Fe):ie._events[de]=[Fe,ie._events[de]]}function w(ie,de){a=a||U("./_stream_duplex"),ie=ie||{};var Fe=de instanceof a;this.objectMode=!!ie.objectMode,Fe&&(this.objectMode=this.objectMode||!!ie.readableObjectMode);var ae=ie.highWaterMark,Z=ie.readableHighWaterMark,Y=this.objectMode?16:16*1024;ae||ae===0?this.highWaterMark=ae:Fe&&(Z||Z===0)?this.highWaterMark=Z:this.highWaterMark=Y,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new l,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=ie.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,ie.encoding&&(b||(b=U("string_decoder/").StringDecoder),this.decoder=new b(ie.encoding),this.encoding=ie.encoding)}function S(ie){if(a=a||U("./_stream_duplex"),!(this instanceof S))return new S(ie);this._readableState=new w(ie,this),this.readable=!0,ie&&(typeof ie.read=="function"&&(this._read=ie.read),typeof ie.destroy=="function"&&(this._destroy=ie.destroy)),t.call(this)}Object.defineProperty(S.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(de){if(!this._readableState)return;this._readableState.destroyed=de}}),S.prototype.destroy=E.destroy,S.prototype._undestroy=E.undestroy,S.prototype._destroy=function(ie,de){this.push(null),de(ie)},S.prototype.push=function(ie,de){var Fe=this._readableState,ae;return Fe.objectMode?ae=!0:typeof ie=="string"&&(de=de||Fe.defaultEncoding,de!==Fe.encoding&&(ie=i.from(ie,de),de=""),ae=!0),A(this,ie,de,!1,ae)},S.prototype.unshift=function(ie){return A(this,ie,null,!0,!1)};function A(ie,de,Fe,ae,Z){var Y=ie._readableState;if(de===null)Y.reading=!1,N(ie,Y);else{var q;Z||(q=k(Y,de)),q?ie.emit("error",q):Y.objectMode||de&&de.length>0?(typeof de!="string"&&!Y.objectMode&&(0,y.default)(de)!==i.prototype&&(de=r(de)),ae?Y.endEmitted?ie.emit("error",new Error("stream.unshift() after end event")):R(ie,Y,de,!0):Y.ended?ie.emit("error",new Error("stream.push() after EOF")):(Y.reading=!1,Y.decoder&&!Fe?(de=Y.decoder.write(de),Y.objectMode||de.length!==0?R(ie,Y,de,!1):P(ie,Y)):R(ie,Y,de,!1))):ae||(Y.reading=!1)}return L(Y)}function R(ie,de,Fe,ae){de.flowing&&de.length===0&&!de.sync?(ie.emit("data",Fe),ie.read(0)):(de.length+=de.objectMode?1:Fe.length,ae?de.buffer.unshift(Fe):de.buffer.push(Fe),de.needReadable&&K(ie)),P(ie,de)}function k(ie,de){var Fe;return!c(de)&&typeof de!="string"&&de!==void 0&&!ie.objectMode&&(Fe=new TypeError("Invalid non-string/buffer chunk")),Fe}function L(ie){return!ie.ended&&(ie.needReadable||ie.length<ie.highWaterMark||ie.length===0)}S.prototype.isPaused=function(){return this._readableState.flowing===!1},S.prototype.setEncoding=function(ie){return b||(b=U("string_decoder/").StringDecoder),this._readableState.decoder=new b(ie),this._readableState.encoding=ie,this};var M=8388608;function G(ie){return ie>=M?ie=M:(ie--,ie|=ie>>>1,ie|=ie>>>2,ie|=ie>>>4,ie|=ie>>>8,ie|=ie>>>16,ie++),ie}function W(ie,de){return ie<=0||de.length===0&&de.ended?0:de.objectMode?1:ie!==ie?de.flowing&&de.length?de.buffer.head.data.length:de.length:(ie>de.highWaterMark&&(de.highWaterMark=G(ie)),ie<=de.length?ie:de.ended?de.length:(de.needReadable=!0,0))}S.prototype.read=function(ie){m("read",ie),ie=parseInt(ie,10);var de=this._readableState,Fe=ie;if(ie!==0&&(de.emittedReadable=!1),ie===0&&de.needReadable&&(de.length>=de.highWaterMark||de.ended))return m("read: emitReadable",de.length,de.ended),de.length===0&&de.ended?oe(this):K(this),null;if(ie=W(ie,de),ie===0&&de.ended)return de.length===0&&oe(this),null;var ae=de.needReadable;m("need readable",ae),(de.length===0||de.length-ie<de.highWaterMark)&&(ae=!0,m("length less than watermark",ae)),de.ended||de.reading?(ae=!1,m("reading or ended",ae)):ae&&(m("do read"),de.reading=!0,de.sync=!0,de.length===0&&(de.needReadable=!0),this._read(de.highWaterMark),de.sync=!1,de.reading||(ie=W(Fe,de)));var Z;return ie>0?Z=ne(ie,de):Z=null,Z===null?(de.needReadable=!0,ie=0):de.length-=ie,de.length===0&&(de.ended||(de.needReadable=!0),Fe!==ie&&de.ended&&oe(this)),Z!==null&&this.emit("data",Z),Z};function N(ie,de){if(de.ended)return;if(de.decoder){var Fe=de.decoder.end();Fe&&Fe.length&&(de.buffer.push(Fe),de.length+=de.objectMode?1:Fe.length)}de.ended=!0,K(ie)}function K(ie){var de=ie._readableState;de.needReadable=!1,de.emittedReadable||(m("emitReadable",de.flowing),de.emittedReadable=!0,de.sync?p.nextTick(F,ie):F(ie))}function F(ie){m("emit readable"),ie.emit("readable"),ke(ie)}function P(ie,de){de.readingMore||(de.readingMore=!0,p.nextTick(B,ie,de))}function B(ie,de){for(var Fe=de.length;!de.reading&&!de.flowing&&!de.ended&&de.length<de.highWaterMark&&!(m("maybeReadMore read 0"),ie.read(0),Fe===de.length);)Fe=de.length;de.readingMore=!1}S.prototype._read=function(ie){this.emit("error",new Error("_read() is not implemented"))},S.prototype.pipe=function(ie,de){var Fe=this,ae=this._readableState;switch(ae.pipesCount){case 0:ae.pipes=ie;break;case 1:ae.pipes=[ae.pipes,ie];break;default:ae.pipes.push(ie);break}ae.pipesCount+=1,m("pipe count=%d opts=%j",ae.pipesCount,de);var Z=(!de||de.end!==!1)&&ie!==I.stdout&&ie!==I.stderr,Y=Z?ve:Ge;ae.endEmitted?p.nextTick(Y):Fe.once("end",Y),ie.on("unpipe",q);function q(Le,bt){m("onunpipe"),Le===Fe&&(bt&&bt.hasUnpiped===!1&&(bt.hasUnpiped=!0,Ne()))}function ve(){m("onend"),ie.end()}var pe=J(Fe);ie.on("drain",pe);var Te=!1;function Ne(){m("cleanup"),ie.removeListener("close",Ve),ie.removeListener("finish",tt),ie.removeListener("drain",pe),ie.removeListener("error",_e),ie.removeListener("unpipe",q),Fe.removeListener("end",ve),Fe.removeListener("end",Ge),Fe.removeListener("data",Ie),Te=!0,ae.awaitDrain&&(!ie._writableState||ie._writableState.needDrain)&&pe()}var me=!1;Fe.on("data",Ie);function Ie(Le){m("ondata"),me=!1;var bt=ie.write(Le);bt===!1&&!me&&((ae.pipesCount===1&&ae.pipes===ie||ae.pipesCount>1&&be(ae.pipes,ie)!==-1)&&!Te&&(m("false write response, pause",Fe._readableState.awaitDrain),Fe._readableState.awaitDrain++,me=!0),Fe.pause())}function _e(Le){m("onerror",Le),Ge(),ie.removeListener("error",_e),s(ie,"error")===0&&ie.emit("error",Le)}C(ie,"error",_e);function Ve(){ie.removeListener("finish",tt),Ge()}ie.once("close",Ve);function tt(){m("onfinish"),ie.removeListener("close",Ve),Ge()}ie.once("finish",tt);function Ge(){m("unpipe"),Fe.unpipe(ie)}return ie.emit("pipe",Fe),ae.flowing||(m("pipe resume"),Fe.resume()),ie};function J(ie){return function(){var de=ie._readableState;m("pipeOnDrain",de.awaitDrain),de.awaitDrain&&de.awaitDrain--,de.awaitDrain===0&&s(ie,"data")&&(de.flowing=!0,ke(ie))}}S.prototype.unpipe=function(ie){var de=this._readableState,Fe={hasUnpiped:!1};if(de.pipesCount===0)return this;if(de.pipesCount===1)return ie&&ie!==de.pipes?this:(ie||(ie=de.pipes),de.pipes=null,de.pipesCount=0,de.flowing=!1,ie&&ie.emit("unpipe",this,Fe),this);if(!ie){var ae=de.pipes,Z=de.pipesCount;de.pipes=null,de.pipesCount=0,de.flowing=!1;for(var Y=0;Y<Z;Y++)ae[Y].emit("unpipe",this,Fe);return this}var q=be(de.pipes,ie);return q===-1?this:(de.pipes.splice(q,1),de.pipesCount-=1,de.pipesCount===1&&(de.pipes=de.pipes[0]),ie.emit("unpipe",this,Fe),this)},S.prototype.on=function(ie,de){var Fe=t.prototype.on.call(this,ie,de);if(ie==="data")this._readableState.flowing!==!1&&this.resume();else if(ie==="readable"){var ae=this._readableState;!ae.endEmitted&&!ae.readableListening&&(ae.readableListening=ae.needReadable=!0,ae.emittedReadable=!1,ae.reading?ae.length&&K(this):p.nextTick(re,this))}return Fe},S.prototype.addListener=S.prototype.on;function re(ie){m("readable nexttick read 0"),ie.read(0)}S.prototype.resume=function(){var ie=this._readableState;return ie.flowing||(m("resume"),ie.flowing=!0,he(this,ie)),this};function he(ie,de){de.resumeScheduled||(de.resumeScheduled=!0,p.nextTick(we,ie,de))}function we(ie,de){de.reading||(m("resume read 0"),ie.read(0)),de.resumeScheduled=!1,de.awaitDrain=0,ie.emit("resume"),ke(ie),de.flowing&&!de.reading&&ie.read(0)}S.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function ke(ie){var de=ie._readableState;for(m("flow",de.flowing);de.flowing&&ie.read()!==null;);}S.prototype.wrap=function(ie){var de=this,Fe=this._readableState,ae=!1;ie.on("end",function(){if(m("wrapped end"),Fe.decoder&&!Fe.ended){var q=Fe.decoder.end();q&&q.length&&de.push(q)}de.push(null)}),ie.on("data",function(q){if(m("wrapped data"),Fe.decoder&&(q=Fe.decoder.write(q)),Fe.objectMode&&q==null)return;if(!Fe.objectMode&&(!q||!q.length))return;var ve=de.push(q);ve||(ae=!0,ie.pause())});for(var Z in ie)this[Z]===void 0&&typeof ie[Z]=="function"&&(this[Z]=function(q){return function(){return ie[q].apply(ie,arguments)}}(Z));for(var Y=0;Y<D.length;Y++)ie.on(D[Y],this.emit.bind(this,D[Y]));return this._read=function(q){m("wrapped _read",q),ae&&(ae=!1,ie.resume())},this},Object.defineProperty(S.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),S._fromList=ne;function ne(ie,de){if(de.length===0)return null;var Fe;return de.objectMode?Fe=de.buffer.shift():!ie||ie>=de.length?(de.decoder?Fe=de.buffer.join(""):de.buffer.length===1?Fe=de.buffer.head.data:Fe=de.buffer.concat(de.length),de.buffer.clear()):Fe=Oe(ie,de.buffer,de.decoder),Fe}function Oe(ie,de,Fe){var ae;return ie<de.head.data.length?(ae=de.head.data.slice(0,ie),de.head.data=de.head.data.slice(ie)):ie===de.head.data.length?ae=de.shift():ae=Fe?Ce(ie,de):fe(ie,de),ae}function Ce(ie,de){var Fe=de.head,ae=1,Z=Fe.data;for(ie-=Z.length;Fe=Fe.next;){var Y=Fe.data,q=ie>Y.length?Y.length:ie;if(q===Y.length?Z+=Y:Z+=Y.slice(0,ie),ie-=q,ie===0){q===Y.length?(++ae,Fe.next?de.head=Fe.next:de.head=de.tail=null):(de.head=Fe,Fe.data=Y.slice(q));break}++ae}return de.length-=ae,Z}function fe(ie,de){var Fe=i.allocUnsafe(ie),ae=de.head,Z=1;for(ae.data.copy(Fe),ie-=ae.data.length;ae=ae.next;){var Y=ae.data,q=ie>Y.length?Y.length:ie;if(Y.copy(Fe,Fe.length-ie,0,q),ie-=q,ie===0){q===Y.length?(++Z,ae.next?de.head=ae.next:de.head=de.tail=null):(de.head=ae,ae.data=Y.slice(q));break}++Z}return de.length-=Z,Fe}function oe(ie){var de=ie._readableState;if(de.length>0)throw new Error('"endReadable()" called on non-empty stream');de.endEmitted||(de.ended=!0,p.nextTick(se,de,ie))}function se(ie,de){!ie.endEmitted&&ie.length===0&&(ie.endEmitted=!0,de.readable=!1,de.emit("end"))}function be(ie,de){for(var Fe=0,ae=ie.length;Fe<ae;Fe++)if(ie[Fe]===de)return Fe;return-1}}).call(this,U("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/BufferList":219,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/get-prototype-of":59,"core-util-is":189,events:192,inherits:196,isarray:198,"process-nextick-args":207,"safe-buffer":228,"string_decoder/":235,util:71}],217:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(a){return a&&a.__esModule?a:{default:a}}X.exports=g;var y=U("./_stream_duplex"),v=(0,_.default)(U("core-util-is"));v.inherits=U("inherits"),v.inherits(g,y);function o(a,n){var s=this._transformState;s.transforming=!1;var t=s.writecb;if(!t)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,n!=null&&this.push(n),t(a);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function g(a){if(!(this instanceof g))return new g(a);y.call(this,a),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,a&&(typeof a.transform=="function"&&(this._transform=a.transform),typeof a.flush=="function"&&(this._flush=a.flush)),this.on("prefinish",p)}function p(){var a=this;typeof this._flush=="function"?this._flush(function(n,s){d(a,n,s)}):d(this,null,null)}g.prototype.push=function(a,n){return this._transformState.needTransform=!1,y.prototype.push.call(this,a,n)},g.prototype._transform=function(a,n,s){throw new Error("_transform() is not implemented")},g.prototype._write=function(a,n,s){var t=this._transformState;if(t.writecb=s,t.writechunk=a,t.writeencoding=n,!t.transforming){var i=this._readableState;(t.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},g.prototype._read=function(a){var n=this._transformState;n.writechunk!==null&&n.writecb&&!n.transforming?(n.transforming=!0,this._transform(n.writechunk,n.writeencoding,n.afterTransform)):n.needTransform=!0},g.prototype._destroy=function(a,n){var s=this;y.prototype._destroy.call(this,a,function(t){n(t),s.emit("close")})};function d(a,n,s){if(n)return a.emit("error",n);if(s!=null&&a.push(s),a._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(a._transformState.transforming)throw new Error("Calling transform done when still transforming");return a.push(null)}},{"./_stream_duplex":214,"babel-runtime/core-js/object/create":55,"core-util-is":189,inherits:196}],218:[function(U,X,x){(function(I,_){"use strict";var O=U("babel-runtime/core-js/object/define-property"),y=t(O),v=U("babel-runtime/core-js/symbol/has-instance"),o=t(v),g=U("babel-runtime/core-js/symbol"),p=t(g),d=U("babel-runtime/core-js/object/create"),a=t(d),n=U("babel-runtime/core-js/set-immediate"),s=t(n);function t(fe){return fe&&fe.__esModule?fe:{default:fe}}var i=U("process-nextick-args");X.exports=k;function e(fe,oe,se){this.chunk=fe,this.encoding=oe,this.callback=se,this.next=null}function r(fe){var oe=this;this.next=null,this.entry=null,this.finish=function(){Ce(oe,fe)}}var c=!I.browser&&["v0.10","v0.9."].indexOf(I.version.slice(0,5))>-1?s.default:i.nextTick,u;k.WritableState=A;var f=(0,a.default)(U("core-util-is"));f.inherits=U("inherits");var m={deprecate:U("util-deprecate")},l=U("./internal/streams/stream"),E=U("safe-buffer").Buffer,b=_.Uint8Array||function(){};function D(fe){return E.from(fe)}function C(fe){return E.isBuffer(fe)||fe instanceof b}var w=U("./internal/streams/destroy");f.inherits(k,l);function S(){}function A(fe,oe){u=u||U("./_stream_duplex"),fe=fe||{};var se=oe instanceof u;this.objectMode=!!fe.objectMode,se&&(this.objectMode=this.objectMode||!!fe.writableObjectMode);var be=fe.highWaterMark,ie=fe.writableHighWaterMark,de=this.objectMode?16:16*1024;be||be===0?this.highWaterMark=be:se&&(ie||ie===0)?this.highWaterMark=ie:this.highWaterMark=de,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 Fe=fe.decodeStrings===!1;this.decodeStrings=!Fe,this.defaultEncoding=fe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ae){P(oe,ae)},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 r(this)}A.prototype.getBuffer=function(){for(var oe=this.bufferedRequest,se=[];oe;)se.push(oe),oe=oe.next;return se},function(){try{Object.defineProperty(A.prototype,"buffer",{get:m.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(fe){}}();var R;typeof p.default=="function"&&o.default&&typeof Function.prototype[o.default]=="function"?(R=Function.prototype[o.default],(0,y.default)(k,o.default,{value:function(oe){return R.call(this,oe)?!0:this!==k?!1:oe&&oe._writableState instanceof A}})):R=function(oe){return oe instanceof this};function k(fe){if(u=u||U("./_stream_duplex"),!R.call(k,this)&&!(this instanceof u))return new k(fe);this._writableState=new A(fe,this),this.writable=!0,fe&&(typeof fe.write=="function"&&(this._write=fe.write),typeof fe.writev=="function"&&(this._writev=fe.writev),typeof fe.destroy=="function"&&(this._destroy=fe.destroy),typeof fe.final=="function"&&(this._final=fe.final)),l.call(this)}k.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function L(fe,oe){var se=new Error("write after end");fe.emit("error",se),i.nextTick(oe,se)}function M(fe,oe,se,be){var ie=!0,de=!1;return se===null?de=new TypeError("May not write null values to stream"):typeof se!="string"&&se!==void 0&&!oe.objectMode&&(de=new TypeError("Invalid non-string/buffer chunk")),de&&(fe.emit("error",de),i.nextTick(be,de),ie=!1),ie}k.prototype.write=function(fe,oe,se){var be=this._writableState,ie=!1,de=!be.objectMode&&C(fe);return de&&!E.isBuffer(fe)&&(fe=D(fe)),typeof oe=="function"&&(se=oe,oe=null),de?oe="buffer":oe||(oe=be.defaultEncoding),typeof se!="function"&&(se=S),be.ended?L(this,se):(de||M(this,be,fe,se))&&(be.pendingcb++,ie=W(this,be,de,fe,oe,se)),ie},k.prototype.cork=function(){var fe=this._writableState;fe.corked++},k.prototype.uncork=function(){var fe=this._writableState;fe.corked&&(fe.corked--,!fe.writing&&!fe.corked&&!fe.finished&&!fe.bufferProcessing&&fe.bufferedRequest&&re(this,fe))},k.prototype.setDefaultEncoding=function(oe){if(typeof oe=="string"&&(oe=oe.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((oe+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+oe);return this._writableState.defaultEncoding=oe,this};function G(fe,oe,se){return!fe.objectMode&&fe.decodeStrings!==!1&&typeof oe=="string"&&(oe=E.from(oe,se)),oe}Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function W(fe,oe,se,be,ie,de){if(!se){var Fe=G(oe,be,ie);be!==Fe&&(se=!0,ie="buffer",be=Fe)}var ae=oe.objectMode?1:be.length;oe.length+=ae;var Z=oe.length<oe.highWaterMark;if(Z||(oe.needDrain=!0),oe.writing||oe.corked){var Y=oe.lastBufferedRequest;oe.lastBufferedRequest={chunk:be,encoding:ie,isBuf:se,callback:de,next:null},Y?Y.next=oe.lastBufferedRequest:oe.bufferedRequest=oe.lastBufferedRequest,oe.bufferedRequestCount+=1}else N(fe,oe,!1,ae,be,ie,de);return Z}function N(fe,oe,se,be,ie,de,Fe){oe.writelen=be,oe.writecb=Fe,oe.writing=!0,oe.sync=!0,se?fe._writev(ie,oe.onwrite):fe._write(ie,de,oe.onwrite),oe.sync=!1}function K(fe,oe,se,be,ie){--oe.pendingcb,se?(i.nextTick(ie,be),i.nextTick(ne,fe,oe),fe._writableState.errorEmitted=!0,fe.emit("error",be)):(ie(be),fe._writableState.errorEmitted=!0,fe.emit("error",be),ne(fe,oe))}function F(fe){fe.writing=!1,fe.writecb=null,fe.length-=fe.writelen,fe.writelen=0}function P(fe,oe){var se=fe._writableState,be=se.sync,ie=se.writecb;if(F(se),oe)K(fe,se,be,oe,ie);else{var de=he(se);!de&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&re(fe,se),be?c(B,fe,se,de,ie):B(fe,se,de,ie)}}function B(fe,oe,se,be){se||J(fe,oe),oe.pendingcb--,be(),ne(fe,oe)}function J(fe,oe){oe.length===0&&oe.needDrain&&(oe.needDrain=!1,fe.emit("drain"))}function re(fe,oe){oe.bufferProcessing=!0;var se=oe.bufferedRequest;if(fe._writev&&se&&se.next){var be=oe.bufferedRequestCount,ie=new Array(be),de=oe.corkedRequestsFree;de.entry=se;for(var Fe=0,ae=!0;se;)ie[Fe]=se,se.isBuf||(ae=!1),se=se.next,Fe+=1;ie.allBuffers=ae,N(fe,oe,!0,oe.length,ie,"",de.finish),oe.pendingcb++,oe.lastBufferedRequest=null,de.next?(oe.corkedRequestsFree=de.next,de.next=null):oe.corkedRequestsFree=new r(oe),oe.bufferedRequestCount=0}else{for(;se;){var Z=se.chunk,Y=se.encoding,q=se.callback,ve=oe.objectMode?1:Z.length;if(N(fe,oe,!1,ve,Z,Y,q),se=se.next,oe.bufferedRequestCount--,oe.writing)break}se===null&&(oe.lastBufferedRequest=null)}oe.bufferedRequest=se,oe.bufferProcessing=!1}k.prototype._write=function(fe,oe,se){se(new Error("_write() is not implemented"))},k.prototype._writev=null,k.prototype.end=function(fe,oe,se){var be=this._writableState;typeof fe=="function"?(se=fe,fe=null,oe=null):typeof oe=="function"&&(se=oe,oe=null),fe!=null&&this.write(fe,oe),be.corked&&(be.corked=1,this.uncork()),!be.ending&&!be.finished&&Oe(this,be,se)};function he(fe){return fe.ending&&fe.length===0&&fe.bufferedRequest===null&&!fe.finished&&!fe.writing}function we(fe,oe){fe._final(function(se){oe.pendingcb--,se&&fe.emit("error",se),oe.prefinished=!0,fe.emit("prefinish"),ne(fe,oe)})}function ke(fe,oe){!oe.prefinished&&!oe.finalCalled&&(typeof fe._final=="function"?(oe.pendingcb++,oe.finalCalled=!0,i.nextTick(we,fe,oe)):(oe.prefinished=!0,fe.emit("prefinish")))}function ne(fe,oe){var se=he(oe);return se&&(ke(fe,oe),oe.pendingcb===0&&(oe.finished=!0,fe.emit("finish"))),se}function Oe(fe,oe,se){oe.ending=!0,ne(fe,oe),se&&(oe.finished?i.nextTick(se):fe.once("finish",se)),oe.ended=!0,fe.writable=!1}function Ce(fe,oe,se){var be=fe.entry;for(fe.entry=null;be;){var ie=be.callback;oe.pendingcb--,ie(se),be=be.next}oe.corkedRequestsFree?oe.corkedRequestsFree.next=fe:oe.corkedRequestsFree=fe}Object.defineProperty(k.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(oe){if(!this._writableState)return;this._writableState.destroyed=oe}}),k.prototype.destroy=w.destroy,k.prototype._undestroy=w.undestroy,k.prototype._destroy=function(fe,oe){this.end(),oe(fe)}}).call(this,U("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":214,"./internal/streams/destroy":220,"./internal/streams/stream":221,_process:208,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/set-immediate":62,"babel-runtime/core-js/symbol":64,"babel-runtime/core-js/symbol/has-instance":65,"core-util-is":189,inherits:196,"process-nextick-args":207,"safe-buffer":228,"util-deprecate":240}],219:[function(U,X,x){"use strict";function I(v,o){if(!(v instanceof o))throw new TypeError("Cannot call a class as a function")}var _=U("safe-buffer").Buffer,O=U("util");function y(v,o,g){v.copy(o,g)}X.exports=function(){function v(){I(this,v),this.head=null,this.tail=null,this.length=0}return v.prototype.push=function(g){var p={data:g,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length},v.prototype.unshift=function(g){var p={data:g,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length},v.prototype.shift=function(){if(this.length===0)return;var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g},v.prototype.clear=function(){this.head=this.tail=null,this.length=0},v.prototype.join=function(g){if(this.length===0)return"";for(var p=this.head,d=""+p.data;p=p.next;)d+=g+p.data;return d},v.prototype.concat=function(g){if(this.length===0)return _.alloc(0);if(this.length===1)return this.head.data;for(var p=_.allocUnsafe(g>>>0),d=this.head,a=0;d;)y(d.data,p,a),a+=d.data.length,d=d.next;return p},v}(),O&&O.inspect&&O.inspect.custom&&(X.exports.prototype[O.inspect.custom]=function(){var v=O.inspect({length:this.length});return this.constructor.name+" "+v})},{"safe-buffer":228,util:71}],220:[function(U,X,x){"use strict";var I=U("process-nextick-args");function _(v,o){var g=this,p=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return p||d?(o?o(v):v&&(!this._writableState||!this._writableState.errorEmitted)&&I.nextTick(y,this,v),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(v||null,function(a){!o&&a?(I.nextTick(y,g,a),g._writableState&&(g._writableState.errorEmitted=!0)):o&&o(a)}),this)}function O(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function y(v,o){v.emit("error",o)}X.exports={destroy:_,undestroy:O}},{"process-nextick-args":207}],221:[function(U,X,x){"use strict";X.exports=U("events").EventEmitter},{events:192}],222:[function(U,X,x){X.exports=U("./readable").PassThrough},{"./readable":223}],223:[function(U,X,x){x=X.exports=U("./lib/_stream_readable.js"),x.Stream=x,x.Readable=x,x.Writable=U("./lib/_stream_writable.js"),x.Duplex=U("./lib/_stream_duplex.js"),x.Transform=U("./lib/_stream_transform.js"),x.PassThrough=U("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":214,"./lib/_stream_passthrough.js":215,"./lib/_stream_readable.js":216,"./lib/_stream_transform.js":217,"./lib/_stream_writable.js":218}],224:[function(U,X,x){X.exports=U("./readable").Transform},{"./readable":223}],225:[function(U,X,x){X.exports=U("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":218}],226:[function(U,X,x){var I=function(){return this}()||Function("return this")(),_=I.regeneratorRuntime&&Object.getOwnPropertyNames(I).indexOf("regeneratorRuntime")>=0,O=_&&I.regeneratorRuntime;if(I.regeneratorRuntime=void 0,X.exports=U("./runtime"),_)I.regeneratorRuntime=O;else try{delete I.regeneratorRuntime}catch(y){I.regeneratorRuntime=void 0}},{"./runtime":227}],227:[function(U,X,x){!function(I){"use strict";var _=Object.prototype,O=_.hasOwnProperty,y,v=typeof Symbol=="function"?Symbol:{},o=v.iterator||"@@iterator",g=v.asyncIterator||"@@asyncIterator",p=v.toStringTag||"@@toStringTag",d=typeof X=="object",a=I.regeneratorRuntime;if(a){d&&(X.exports=a);return}a=I.regeneratorRuntime=d?X.exports:{};function n(W,N,K,F){var P=N&&N.prototype instanceof u?N:u,B=Object.create(P.prototype),J=new L(F||[]);return B._invoke=S(W,K,J),B}a.wrap=n;function s(W,N,K){try{return{type:"normal",arg:W.call(N,K)}}catch(F){return{type:"throw",arg:F}}}var t="suspendedStart",i="suspendedYield",e="executing",r="completed",c={};function u(){}function f(){}function m(){}var l={};l[o]=function(){return this};var E=Object.getPrototypeOf,b=E&&E(E(M([])));b&&b!==_&&O.call(b,o)&&(l=b);var D=m.prototype=u.prototype=Object.create(l);f.prototype=D.constructor=m,m.constructor=f,m[p]=f.displayName="GeneratorFunction";function C(W){["next","throw","return"].forEach(function(N){W[N]=function(K){return this._invoke(N,K)}})}a.isGeneratorFunction=function(W){var N=typeof W=="function"&&W.constructor;return N?N===f||(N.displayName||N.name)==="GeneratorFunction":!1},a.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,m):(W.__proto__=m,p in W||(W[p]="GeneratorFunction")),W.prototype=Object.create(D),W},a.awrap=function(W){return{__await:W}};function w(W){function N(P,B,J,re){var he=s(W[P],W,B);if(he.type==="throw")re(he.arg);else{var we=he.arg,ke=we.value;return ke&&typeof ke=="object"&&O.call(ke,"__await")?Promise.resolve(ke.__await).then(function(ne){N("next",ne,J,re)},function(ne){N("throw",ne,J,re)}):Promise.resolve(ke).then(function(ne){we.value=ne,J(we)},re)}}var K;function F(P,B){function J(){return new Promise(function(re,he){N(P,B,re,he)})}return K=K?K.then(J,J):J()}this._invoke=F}C(w.prototype),w.prototype[g]=function(){return this},a.AsyncIterator=w,a.async=function(W,N,K,F){var P=new w(n(W,N,K,F));return a.isGeneratorFunction(N)?P:P.next().then(function(B){return B.done?B.value:P.next()})};function S(W,N,K){var F=t;return function(B,J){if(F===e)throw new Error("Generator is already running");if(F===r){if(B==="throw")throw J;return G()}for(K.method=B,K.arg=J;;){var re=K.delegate;if(re){var he=A(re,K);if(he){if(he===c)continue;return he}}if(K.method==="next")K.sent=K._sent=K.arg;else if(K.method==="throw"){if(F===t)throw F=r,K.arg;K.dispatchException(K.arg)}else K.method==="return"&&K.abrupt("return",K.arg);F=e;var we=s(W,N,K);if(we.type==="normal"){if(F=K.done?r:i,we.arg===c)continue;return{value:we.arg,done:K.done}}else we.type==="throw"&&(F=r,K.method="throw",K.arg=we.arg)}}}function A(W,N){var K=W.iterator[N.method];if(K===y){if(N.delegate=null,N.method==="throw"){if(W.iterator.return&&(N.method="return",N.arg=y,A(W,N),N.method==="throw"))return c;N.method="throw",N.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var F=s(K,W.iterator,N.arg);if(F.type==="throw")return N.method="throw",N.arg=F.arg,N.delegate=null,c;var P=F.arg;if(!P)return N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,c;if(P.done)N[W.resultName]=P.value,N.next=W.nextLoc,N.method!=="return"&&(N.method="next",N.arg=y);else return P;return N.delegate=null,c}C(D),D[p]="Generator",D[o]=function(){return this},D.toString=function(){return"[object Generator]"};function R(W){var N={tryLoc:W[0]};1 in W&&(N.catchLoc=W[1]),2 in W&&(N.finallyLoc=W[2],N.afterLoc=W[3]),this.tryEntries.push(N)}function k(W){var N=W.completion||{};N.type="normal",delete N.arg,W.completion=N}function L(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(R,this),this.reset(!0)}a.keys=function(W){var N=[];for(var K in W)N.push(K);return N.reverse(),function F(){for(;N.length;){var P=N.pop();if(P in W)return F.value=P,F.done=!1,F}return F.done=!0,F}};function M(W){if(W){var N=W[o];if(N)return N.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var K=-1,F=function P(){for(;++K<W.length;)if(O.call(W,K))return P.value=W[K],P.done=!1,P;return P.value=y,P.done=!0,P};return F.next=F}}return{next:G}}a.values=M;function G(){return{value:y,done:!0}}L.prototype={constructor:L,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(k),!W)for(var N in this)N.charAt(0)==="t"&&O.call(this,N)&&!isNaN(+N.slice(1))&&(this[N]=y)},stop:function(){this.done=!0;var W=this.tryEntries[0],N=W.completion;if(N.type==="throw")throw N.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var N=this;function K(he,we){return B.type="throw",B.arg=W,N.next=he,we&&(N.method="next",N.arg=y),!!we}for(var F=this.tryEntries.length-1;F>=0;--F){var P=this.tryEntries[F],B=P.completion;if(P.tryLoc==="root")return K("end");if(P.tryLoc<=this.prev){var J=O.call(P,"catchLoc"),re=O.call(P,"finallyLoc");if(J&&re){if(this.prev<P.catchLoc)return K(P.catchLoc,!0);if(this.prev<P.finallyLoc)return K(P.finallyLoc)}else if(J){if(this.prev<P.catchLoc)return K(P.catchLoc,!0)}else if(re){if(this.prev<P.finallyLoc)return K(P.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(W,N){for(var K=this.tryEntries.length-1;K>=0;--K){var F=this.tryEntries[K];if(F.tryLoc<=this.prev&&O.call(F,"finallyLoc")&&this.prev<F.finallyLoc){var P=F;break}}P&&(W==="break"||W==="continue")&&P.tryLoc<=N&&N<=P.finallyLoc&&(P=null);var B=P?P.completion:{};return B.type=W,B.arg=N,P?(this.method="next",this.next=P.finallyLoc,c):this.complete(B)},complete:function(W,N){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&N&&(this.next=N),c},finish:function(W){for(var N=this.tryEntries.length-1;N>=0;--N){var K=this.tryEntries[N];if(K.finallyLoc===W)return this.complete(K.completion,K.afterLoc),k(K),c}},catch:function(W){for(var N=this.tryEntries.length-1;N>=0;--N){var K=this.tryEntries[N];if(K.tryLoc===W){var F=K.completion;if(F.type==="throw"){var P=F.arg;k(K)}return P}}throw new Error("illegal catch attempt")},delegateYield:function(W,N,K){return this.delegate={iterator:M(W),resultName:N,nextLoc:K},this.method==="next"&&(this.arg=y),c}}}(function(){return this}()||Function("return this")())},{}],228:[function(U,X,x){var I=U("buffer"),_=I.Buffer;function O(v,o){for(var g in v)o[g]=v[g]}_.from&&_.alloc&&_.allocUnsafe&&_.allocUnsafeSlow?X.exports=I:(O(I,x),x.Buffer=y);function y(v,o,g){return _(v,o,g)}O(_,y),y.from=function(v,o,g){if(typeof v=="number")throw new TypeError("Argument must not be a number");return _(v,o,g)},y.alloc=function(v,o,g){if(typeof v!="number")throw new TypeError("Argument must be a number");var p=_(v);return o!==void 0?typeof g=="string"?p.fill(o,g):p.fill(o):p.fill(0),p},y.allocUnsafe=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return _(v)},y.allocUnsafeSlow=function(v){if(typeof v!="number")throw new TypeError("Argument must be a number");return I.SlowBuffer(v)}},{buffer:73}],229:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/core-js/string/from-code-point"),O=i(_),y=U("babel-runtime/core-js/json/stringify"),v=i(y),o=U("babel-runtime/helpers/typeof"),g=i(o),p=U("babel-runtime/core-js/object/define-property"),d=i(p),a=U("babel-runtime/core-js/object/keys"),n=i(a),s=U("babel-runtime/core-js/object/create"),t=i(s);function i(e){return e&&e.__esModule?e:{default:e}}(function(e){e.parser=function(Y,q){return new c(Y,q)},e.SAXParser=c,e.SAXStream=D,e.createStream=b,e.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];e.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function c(Y,q){if(!(this instanceof c))return new c(Y,q);var ve=this;f(ve),ve.q=ve.c="",ve.bufferCheckPosition=e.MAX_BUFFER_LENGTH,ve.opt=q||{},ve.opt.lowercase=ve.opt.lowercase||ve.opt.lowercasetags,ve.looseCase=ve.opt.lowercase?"toLowerCase":"toUpperCase",ve.tags=[],ve.closed=ve.closedRoot=ve.sawRoot=!1,ve.tag=ve.error=null,ve.strict=!!Y,ve.noscript=!!(Y||ve.opt.noscript),ve.state=B.BEGIN,ve.strictEntities=ve.opt.strictEntities,ve.ENTITIES=ve.strictEntities?(0,t.default)(e.XML_ENTITIES):(0,t.default)(e.ENTITIES),ve.attribList=[],ve.opt.xmlns&&(ve.ns=(0,t.default)(R)),ve.trackPosition=ve.opt.position!==!1,ve.trackPosition&&(ve.position=ve.line=ve.column=0),re(ve,"onready")}t.default||(Object.create=function(Y){function q(){}q.prototype=Y;var ve=new q;return ve}),n.default||(Object.keys=function(Y){var q=[];for(var ve in Y)Y.hasOwnProperty(ve)&&q.push(ve);return q});function u(Y){for(var q=Math.max(e.MAX_BUFFER_LENGTH,10),ve=0,pe=0,Te=r.length;pe<Te;pe++){var Ne=Y[r[pe]].length;if(Ne>q)switch(r[pe]){case"textNode":we(Y);break;case"cdata":he(Y,"oncdata",Y.cdata),Y.cdata="";break;case"script":he(Y,"onscript",Y.script),Y.script="";break;default:ne(Y,"Max buffer length exceeded: "+r[pe])}ve=Math.max(ve,Ne)}var me=e.MAX_BUFFER_LENGTH-ve;Y.bufferCheckPosition=me+Y.position}function f(Y){for(var q=0,ve=r.length;q<ve;q++)Y[r[q]]=""}function m(Y){we(Y),Y.cdata!==""&&(he(Y,"oncdata",Y.cdata),Y.cdata=""),Y.script!==""&&(he(Y,"onscript",Y.script),Y.script="")}c.prototype={end:function(){Oe(this)},write:Z,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){m(this)}};var l;try{l=U("stream").Stream}catch(Y){l=function(){}}var E=e.EVENTS.filter(function(Y){return Y!=="error"&&Y!=="end"});function b(Y,q){return new D(Y,q)}function D(Y,q){if(!(this instanceof D))return new D(Y,q);l.apply(this),this._parser=new c(Y,q),this.writable=!0,this.readable=!0;var ve=this;this._parser.onend=function(){ve.emit("end")},this._parser.onerror=function(pe){ve.emit("error",pe),ve._parser.error=null},this._decoder=null,E.forEach(function(pe){(0,d.default)(ve,"on"+pe,{get:function(){return ve._parser["on"+pe]},set:function(Ne){if(!Ne)return ve.removeAllListeners(pe),ve._parser["on"+pe]=Ne,Ne;ve.on(pe,Ne)},enumerable:!0,configurable:!1})})}D.prototype=(0,t.default)(l.prototype,{constructor:{value:D}}),D.prototype.write=function(Y){if(typeof I=="function"&&typeof I.isBuffer=="function"&&I.isBuffer(Y)){if(!this._decoder){var q=U("string_decoder").StringDecoder;this._decoder=new q("utf8")}Y=this._decoder.write(Y)}return this._parser.write(Y.toString()),this.emit("data",Y),!0},D.prototype.end=function(Y){return Y&&Y.length&&this.write(Y),this._parser.end(),!0},D.prototype.on=function(Y,q){var ve=this;return!ve._parser["on"+Y]&&E.indexOf(Y)!==-1&&(ve._parser["on"+Y]=function(){var pe=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);pe.splice(0,0,Y),ve.emit.apply(ve,pe)}),l.prototype.on.call(ve,Y,q)};var C="[CDATA[",w="DOCTYPE",S="http://www.w3.org/XML/1998/namespace",A="http://www.w3.org/2000/xmlns/",R={xml:S,xmlns:A},k=/[:_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]/,L=/[:_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-]/,M=/[#:_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]/,G=/[#:_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-]/;function W(Y){return Y===" "||Y===`
|
|
|
`||Y==="\r"||Y===" "}function N(Y){return Y==='"'||Y==="'"}function K(Y){return Y===">"||W(Y)}function F(Y,q){return Y.test(q)}function P(Y,q){return!F(Y,q)}var B=0;e.STATE={BEGIN:B++,BEGIN_WHITESPACE:B++,TEXT:B++,TEXT_ENTITY:B++,OPEN_WAKA:B++,SGML_DECL:B++,SGML_DECL_QUOTED:B++,DOCTYPE:B++,DOCTYPE_QUOTED:B++,DOCTYPE_DTD:B++,DOCTYPE_DTD_QUOTED:B++,COMMENT_STARTING:B++,COMMENT:B++,COMMENT_ENDING:B++,COMMENT_ENDED:B++,CDATA:B++,CDATA_ENDING:B++,CDATA_ENDING_2:B++,PROC_INST:B++,PROC_INST_BODY:B++,PROC_INST_ENDING:B++,OPEN_TAG:B++,OPEN_TAG_SLASH:B++,ATTRIB:B++,ATTRIB_NAME:B++,ATTRIB_NAME_SAW_WHITE:B++,ATTRIB_VALUE:B++,ATTRIB_VALUE_QUOTED:B++,ATTRIB_VALUE_CLOSED:B++,ATTRIB_VALUE_UNQUOTED:B++,ATTRIB_VALUE_ENTITY_Q:B++,ATTRIB_VALUE_ENTITY_U:B++,CLOSE_TAG:B++,CLOSE_TAG_SAW_WHITE:B++,SCRIPT:B++,SCRIPT_ENDING:B++},e.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},e.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,n.default)(e.ENTITIES).forEach(function(Y){var q=e.ENTITIES[Y],ve=typeof q=="number"?String.fromCharCode(q):q;e.ENTITIES[Y]=ve});for(var J in e.STATE)e.STATE[e.STATE[J]]=J;B=e.STATE;function re(Y,q,ve){Y[q]&&Y[q](ve)}function he(Y,q,ve){Y.textNode&&we(Y),re(Y,q,ve)}function we(Y){Y.textNode=ke(Y.opt,Y.textNode),Y.textNode&&re(Y,"ontext",Y.textNode),Y.textNode=""}function ke(Y,q){return Y.trim&&(q=q.trim()),Y.normalize&&(q=q.replace(/\s+/g," ")),q}function ne(Y,q){return we(Y),Y.trackPosition&&(q+=`
|
|
|
Line: `+Y.line+`
|
|
|
Column: `+Y.column+`
|
|
|
Char: `+Y.c),q=new Error(q),Y.error=q,re(Y,"onerror",q),Y}function Oe(Y){return Y.sawRoot&&!Y.closedRoot&&Ce(Y,"Unclosed root tag"),Y.state!==B.BEGIN&&Y.state!==B.BEGIN_WHITESPACE&&Y.state!==B.TEXT&&ne(Y,"Unexpected end"),we(Y),Y.c="",Y.closed=!0,re(Y,"onend"),c.call(Y,Y.strict,Y.opt),Y}function Ce(Y,q){if((typeof Y=="undefined"?"undefined":(0,g.default)(Y))!=="object"||!(Y instanceof c))throw new Error("bad call to strictFail");Y.strict&&ne(Y,q)}function fe(Y){Y.strict||(Y.tagName=Y.tagName[Y.looseCase]());var q=Y.tags[Y.tags.length-1]||Y,ve=Y.tag={name:Y.tagName,attributes:{}};Y.opt.xmlns&&(ve.ns=q.ns),Y.attribList.length=0,he(Y,"onopentagstart",ve)}function oe(Y,q){var ve=Y.indexOf(":"),pe=ve<0?["",Y]:Y.split(":"),Te=pe[0],Ne=pe[1];return q&&Y==="xmlns"&&(Te="xmlns",Ne=""),{prefix:Te,local:Ne}}function se(Y){if(Y.strict||(Y.attribName=Y.attribName[Y.looseCase]()),Y.attribList.indexOf(Y.attribName)!==-1||Y.tag.attributes.hasOwnProperty(Y.attribName)){Y.attribName=Y.attribValue="";return}if(Y.opt.xmlns){var q=oe(Y.attribName,!0),ve=q.prefix,pe=q.local;if(ve==="xmlns")if(pe==="xml"&&Y.attribValue!==S)Ce(Y,"xml: prefix must be bound to "+S+`
|
|
|
Actual: `+Y.attribValue);else if(pe==="xmlns"&&Y.attribValue!==A)Ce(Y,"xmlns: prefix must be bound to "+A+`
|
|
|
Actual: `+Y.attribValue);else{var Te=Y.tag,Ne=Y.tags[Y.tags.length-1]||Y;Te.ns===Ne.ns&&(Te.ns=(0,t.default)(Ne.ns)),Te.ns[pe]=Y.attribValue}Y.attribList.push([Y.attribName,Y.attribValue])}else Y.tag.attributes[Y.attribName]=Y.attribValue,he(Y,"onattribute",{name:Y.attribName,value:Y.attribValue});Y.attribName=Y.attribValue=""}function be(Y,q){if(Y.opt.xmlns){var ve=Y.tag,pe=oe(Y.tagName);ve.prefix=pe.prefix,ve.local=pe.local,ve.uri=ve.ns[pe.prefix]||"",ve.prefix&&!ve.uri&&(Ce(Y,"Unbound namespace prefix: "+(0,v.default)(Y.tagName)),ve.uri=pe.prefix);var Te=Y.tags[Y.tags.length-1]||Y;ve.ns&&Te.ns!==ve.ns&&(0,n.default)(ve.ns).forEach(function(Xe){he(Y,"onopennamespace",{prefix:Xe,uri:ve.ns[Xe]})});for(var Ne=0,me=Y.attribList.length;Ne<me;Ne++){var Ie=Y.attribList[Ne],_e=Ie[0],Ve=Ie[1],tt=oe(_e,!0),Ge=tt.prefix,Le=tt.local,bt=Ge===""?"":ve.ns[Ge]||"",Re={name:_e,value:Ve,prefix:Ge,local:Le,uri:bt};Ge&&Ge!=="xmlns"&&!bt&&(Ce(Y,"Unbound namespace prefix: "+(0,v.default)(Ge)),Re.uri=Ge),Y.tag.attributes[_e]=Re,he(Y,"onattribute",Re)}Y.attribList.length=0}Y.tag.isSelfClosing=!!q,Y.sawRoot=!0,Y.tags.push(Y.tag),he(Y,"onopentag",Y.tag),q||(!Y.noscript&&Y.tagName.toLowerCase()==="script"?Y.state=B.SCRIPT:Y.state=B.TEXT,Y.tag=null,Y.tagName=""),Y.attribName=Y.attribValue="",Y.attribList.length=0}function ie(Y){if(!Y.tagName){Ce(Y,"Weird empty close tag."),Y.textNode+="</>",Y.state=B.TEXT;return}if(Y.script){if(Y.tagName!=="script"){Y.script+="</"+Y.tagName+">",Y.tagName="",Y.state=B.SCRIPT;return}he(Y,"onscript",Y.script),Y.script=""}var q=Y.tags.length,ve=Y.tagName;Y.strict||(ve=ve[Y.looseCase]());for(var pe=ve;q--;){var Te=Y.tags[q];if(Te.name!==pe)Ce(Y,"Unexpected close tag");else break}if(q<0){Ce(Y,"Unmatched closing tag: "+Y.tagName),Y.textNode+="</"+Y.tagName+">",Y.state=B.TEXT;return}Y.tagName=ve;for(var Ne=Y.tags.length;Ne-- >q;){var me=Y.tag=Y.tags.pop();Y.tagName=Y.tag.name,he(Y,"onclosetag",Y.tagName);var Ie={};for(var _e in me.ns)Ie[_e]=me.ns[_e];var Ve=Y.tags[Y.tags.length-1]||Y;Y.opt.xmlns&&me.ns!==Ve.ns&&(0,n.default)(me.ns).forEach(function(tt){var Ge=me.ns[tt];he(Y,"onclosenamespace",{prefix:tt,uri:Ge})})}q===0&&(Y.closedRoot=!0),Y.tagName=Y.attribValue=Y.attribName="",Y.attribList.length=0,Y.state=B.TEXT}function de(Y){var q=Y.entity,ve=q.toLowerCase(),pe,Te="";return Y.ENTITIES[q]?Y.ENTITIES[q]:Y.ENTITIES[ve]?Y.ENTITIES[ve]:(q=ve,q.charAt(0)==="#"&&(q.charAt(1)==="x"?(q=q.slice(2),pe=parseInt(q,16),Te=pe.toString(16)):(q=q.slice(1),pe=parseInt(q,10),Te=pe.toString(10))),q=q.replace(/^0+/,""),isNaN(pe)||Te.toLowerCase()!==q?(Ce(Y,"Invalid character entity"),"&"+Y.entity+";"):(0,O.default)(pe))}function Fe(Y,q){q==="<"?(Y.state=B.OPEN_WAKA,Y.startTagPosition=Y.position):W(q)||(Ce(Y,"Non-whitespace before first tag."),Y.textNode=q,Y.state=B.TEXT)}function ae(Y,q){var ve="";return q<Y.length&&(ve=Y.charAt(q)),ve}function Z(Y){var q=this;if(this.error)throw this.error;if(q.closed)return ne(q,"Cannot write after close. Assign an onready handler.");if(Y===null)return Oe(q);(typeof Y=="undefined"?"undefined":(0,g.default)(Y))==="object"&&(Y=Y.toString());for(var ve=0,pe="";!(pe=ae(Y,ve++),q.c=pe,!pe);){q.trackPosition&&(q.position++,pe===`
|
|
|
`?(q.line++,q.column=0):q.column++);switch(q.state){case B.BEGIN:if(q.state=B.BEGIN_WHITESPACE,pe==="\uFEFF")continue;Fe(q,pe);continue;case B.BEGIN_WHITESPACE:Fe(q,pe);continue;case B.TEXT:if(q.sawRoot&&!q.closedRoot){for(var Te=ve-1;pe&&pe!=="<"&&pe!=="&";)pe=ae(Y,ve++),pe&&q.trackPosition&&(q.position++,pe===`
|
|
|
`?(q.line++,q.column=0):q.column++);q.textNode+=Y.substring(Te,ve-1)}pe==="<"&&!(q.sawRoot&&q.closedRoot&&!q.strict)?(q.state=B.OPEN_WAKA,q.startTagPosition=q.position):(!W(pe)&&(!q.sawRoot||q.closedRoot)&&Ce(q,"Text data outside of root node."),pe==="&"?q.state=B.TEXT_ENTITY:q.textNode+=pe);continue;case B.SCRIPT:pe==="<"?q.state=B.SCRIPT_ENDING:q.script+=pe;continue;case B.SCRIPT_ENDING:pe==="/"?q.state=B.CLOSE_TAG:(q.script+="<"+pe,q.state=B.SCRIPT);continue;case B.OPEN_WAKA:if(pe==="!")q.state=B.SGML_DECL,q.sgmlDecl="";else if(!W(pe))if(F(k,pe))q.state=B.OPEN_TAG,q.tagName=pe;else if(pe==="/")q.state=B.CLOSE_TAG,q.tagName="";else if(pe==="?")q.state=B.PROC_INST,q.procInstName=q.procInstBody="";else{if(Ce(q,"Unencoded <"),q.startTagPosition+1<q.position){var Ne=q.position-q.startTagPosition;pe=new Array(Ne).join(" ")+pe}q.textNode+="<"+pe,q.state=B.TEXT}continue;case B.SGML_DECL:(q.sgmlDecl+pe).toUpperCase()===C?(he(q,"onopencdata"),q.state=B.CDATA,q.sgmlDecl="",q.cdata=""):q.sgmlDecl+pe==="--"?(q.state=B.COMMENT,q.comment="",q.sgmlDecl=""):(q.sgmlDecl+pe).toUpperCase()===w?(q.state=B.DOCTYPE,(q.doctype||q.sawRoot)&&Ce(q,"Inappropriately located doctype declaration"),q.doctype="",q.sgmlDecl=""):pe===">"?(he(q,"onsgmldeclaration",q.sgmlDecl),q.sgmlDecl="",q.state=B.TEXT):(N(pe)&&(q.state=B.SGML_DECL_QUOTED),q.sgmlDecl+=pe);continue;case B.SGML_DECL_QUOTED:pe===q.q&&(q.state=B.SGML_DECL,q.q=""),q.sgmlDecl+=pe;continue;case B.DOCTYPE:pe===">"?(q.state=B.TEXT,he(q,"ondoctype",q.doctype),q.doctype=!0):(q.doctype+=pe,pe==="["?q.state=B.DOCTYPE_DTD:N(pe)&&(q.state=B.DOCTYPE_QUOTED,q.q=pe));continue;case B.DOCTYPE_QUOTED:q.doctype+=pe,pe===q.q&&(q.q="",q.state=B.DOCTYPE);continue;case B.DOCTYPE_DTD:q.doctype+=pe,pe==="]"?q.state=B.DOCTYPE:N(pe)&&(q.state=B.DOCTYPE_DTD_QUOTED,q.q=pe);continue;case B.DOCTYPE_DTD_QUOTED:q.doctype+=pe,pe===q.q&&(q.state=B.DOCTYPE_DTD,q.q="");continue;case B.COMMENT:pe==="-"?q.state=B.COMMENT_ENDING:q.comment+=pe;continue;case B.COMMENT_ENDING:pe==="-"?(q.state=B.COMMENT_ENDED,q.comment=ke(q.opt,q.comment),q.comment&&he(q,"oncomment",q.comment),q.comment=""):(q.comment+="-"+pe,q.state=B.COMMENT);continue;case B.COMMENT_ENDED:pe!==">"?(Ce(q,"Malformed comment"),q.comment+="--"+pe,q.state=B.COMMENT):q.state=B.TEXT;continue;case B.CDATA:pe==="]"?q.state=B.CDATA_ENDING:q.cdata+=pe;continue;case B.CDATA_ENDING:pe==="]"?q.state=B.CDATA_ENDING_2:(q.cdata+="]"+pe,q.state=B.CDATA);continue;case B.CDATA_ENDING_2:pe===">"?(q.cdata&&he(q,"oncdata",q.cdata),he(q,"onclosecdata"),q.cdata="",q.state=B.TEXT):pe==="]"?q.cdata+="]":(q.cdata+="]]"+pe,q.state=B.CDATA);continue;case B.PROC_INST:pe==="?"?q.state=B.PROC_INST_ENDING:W(pe)?q.state=B.PROC_INST_BODY:q.procInstName+=pe;continue;case B.PROC_INST_BODY:if(!q.procInstBody&&W(pe))continue;pe==="?"?q.state=B.PROC_INST_ENDING:q.procInstBody+=pe;continue;case B.PROC_INST_ENDING:pe===">"?(he(q,"onprocessinginstruction",{name:q.procInstName,body:q.procInstBody}),q.procInstName=q.procInstBody="",q.state=B.TEXT):(q.procInstBody+="?"+pe,q.state=B.PROC_INST_BODY);continue;case B.OPEN_TAG:F(L,pe)?q.tagName+=pe:(fe(q),pe===">"?be(q):pe==="/"?q.state=B.OPEN_TAG_SLASH:(W(pe)||Ce(q,"Invalid character in tag name"),q.state=B.ATTRIB));continue;case B.OPEN_TAG_SLASH:pe===">"?(be(q,!0),ie(q)):(Ce(q,"Forward-slash in opening tag not followed by >"),q.state=B.ATTRIB);continue;case B.ATTRIB:if(W(pe))continue;pe===">"?be(q):pe==="/"?q.state=B.OPEN_TAG_SLASH:F(k,pe)?(q.attribName=pe,q.attribValue="",q.state=B.ATTRIB_NAME):Ce(q,"Invalid attribute name");continue;case B.ATTRIB_NAME:pe==="="?q.state=B.ATTRIB_VALUE:pe===">"?(Ce(q,"Attribute without value"),q.attribValue=q.attribName,se(q),be(q)):W(pe)?q.state=B.ATTRIB_NAME_SAW_WHITE:F(L,pe)?q.attribName+=pe:Ce(q,"Invalid attribute name");continue;case B.ATTRIB_NAME_SAW_WHITE:if(pe==="=")q.state=B.ATTRIB_VALUE;else{if(W(pe))continue;Ce(q,"Attribute without value"),q.tag.attributes[q.attribName]="",q.attribValue="",he(q,"onattribute",{name:q.attribName,value:""}),q.attribName="",pe===">"?be(q):F(k,pe)?(q.attribName=pe,q.state=B.ATTRIB_NAME):(Ce(q,"Invalid attribute name"),q.state=B.ATTRIB)}continue;case B.ATTRIB_VALUE:if(W(pe))continue;N(pe)?(q.q=pe,q.state=B.ATTRIB_VALUE_QUOTED):(Ce(q,"Unquoted attribute value"),q.state=B.ATTRIB_VALUE_UNQUOTED,q.attribValue=pe);continue;case B.ATTRIB_VALUE_QUOTED:if(pe!==q.q){pe==="&"?q.state=B.ATTRIB_VALUE_ENTITY_Q:q.attribValue+=pe;continue}se(q),q.q="",q.state=B.ATTRIB_VALUE_CLOSED;continue;case B.ATTRIB_VALUE_CLOSED:W(pe)?q.state=B.ATTRIB:pe===">"?be(q):pe==="/"?q.state=B.OPEN_TAG_SLASH:F(k,pe)?(Ce(q,"No whitespace between attributes"),q.attribName=pe,q.attribValue="",q.state=B.ATTRIB_NAME):Ce(q,"Invalid attribute name");continue;case B.ATTRIB_VALUE_UNQUOTED:if(!K(pe)){pe==="&"?q.state=B.ATTRIB_VALUE_ENTITY_U:q.attribValue+=pe;continue}se(q),pe===">"?be(q):q.state=B.ATTRIB;continue;case B.CLOSE_TAG:if(q.tagName)pe===">"?ie(q):F(L,pe)?q.tagName+=pe:q.script?(q.script+="</"+q.tagName,q.tagName="",q.state=B.SCRIPT):(W(pe)||Ce(q,"Invalid tagname in closing tag"),q.state=B.CLOSE_TAG_SAW_WHITE);else{if(W(pe))continue;P(k,pe)?q.script?(q.script+="</"+pe,q.state=B.SCRIPT):Ce(q,"Invalid tagname in closing tag."):q.tagName=pe}continue;case B.CLOSE_TAG_SAW_WHITE:if(W(pe))continue;pe===">"?ie(q):Ce(q,"Invalid characters in closing tag");continue;case B.TEXT_ENTITY:case B.ATTRIB_VALUE_ENTITY_Q:case B.ATTRIB_VALUE_ENTITY_U:var me,Ie;switch(q.state){case B.TEXT_ENTITY:me=B.TEXT,Ie="textNode";break;case B.ATTRIB_VALUE_ENTITY_Q:me=B.ATTRIB_VALUE_QUOTED,Ie="attribValue";break;case B.ATTRIB_VALUE_ENTITY_U:me=B.ATTRIB_VALUE_UNQUOTED,Ie="attribValue";break}pe===";"?(q[Ie]+=de(q),q.entity="",q.state=me):F(q.entity.length?G:M,pe)?q.entity+=pe:(Ce(q,"Invalid character in entity name"),q[Ie]+="&"+q.entity+pe,q.entity="",q.state=me);continue;default:throw new Error(q,"Unknown state: "+q.state)}}return q.position>=q.bufferCheckPosition&&u(q),q}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */O.default||function(){var Y=String.fromCharCode,q=Math.floor,ve=function(){var Te=16384,Ne=[],me,Ie,_e=-1,Ve=arguments.length;if(!Ve)return"";for(var tt="";++_e<Ve;){var Ge=Number(arguments[_e]);if(!isFinite(Ge)||Ge<0||Ge>1114111||q(Ge)!==Ge)throw RangeError("Invalid code point: "+Ge);Ge<=65535?Ne.push(Ge):(Ge-=65536,me=(Ge>>10)+55296,Ie=Ge%1024+56320,Ne.push(me,Ie)),(_e+1===Ve||Ne.length>Te)&&(tt+=Y.apply(null,Ne),Ne.length=0)}return tt};d.default?Object.defineProperty(String,"fromCodePoint",{value:ve,configurable:!0,writable:!0}):String.fromCodePoint=ve}()})(typeof x=="undefined"?(void 0).sax={}:x)}).call(this,U("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":53,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/define-property":56,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/string/from-code-point":63,"babel-runtime/helpers/typeof":67,buffer:73,stream:230,string_decoder:72}],230:[function(U,X,x){X.exports=O;var I=U("events").EventEmitter,_=U("inherits");_(O,I),O.Readable=U("readable-stream/readable.js"),O.Writable=U("readable-stream/writable.js"),O.Duplex=U("readable-stream/duplex.js"),O.Transform=U("readable-stream/transform.js"),O.PassThrough=U("readable-stream/passthrough.js"),O.Stream=O;function O(){I.call(this)}O.prototype.pipe=function(y,v){var o=this;function g(i){y.writable&&(y.write(i)===!1&&o.pause&&o.pause())}o.on("data",g);function p(){o.readable&&o.resume&&o.resume()}y.on("drain",p),!y._isStdio&&(!v||v.end!==!1)&&(o.on("end",a),o.on("close",n));var d=!1;function a(){if(d)return;d=!0,y.end()}function n(){if(d)return;d=!0,typeof y.destroy=="function"&&y.destroy()}function s(i){if(t(),I.listenerCount(this,"error")===0)throw i}o.on("error",s),y.on("error",s);function t(){o.removeListener("data",g),y.removeListener("drain",p),o.removeListener("end",a),o.removeListener("close",n),o.removeListener("error",s),y.removeListener("error",s),o.removeListener("end",t),o.removeListener("close",t),y.removeListener("close",t)}return o.on("end",t),o.on("close",t),y.on("close",t),y.emit("pipe",o),y}},{events:192,inherits:196,"readable-stream/duplex.js":213,"readable-stream/passthrough.js":222,"readable-stream/readable.js":223,"readable-stream/transform.js":224,"readable-stream/writable.js":225}],231:[function(U,X,x){(function(I){var _=U("./lib/request"),O=U("./lib/response"),y=U("xtend"),v=U("builtin-status-codes"),o=U("url"),g=x;g.request=function(p,d){typeof p=="string"?p=o.parse(p):p=y(p);var a=I.location.protocol.search(/^https?:$/)===-1?"http:":"",n=p.protocol||a,s=p.hostname||p.host,t=p.port,i=p.path||"/";s&&s.indexOf(":")!==-1&&(s="["+s+"]"),p.url=(s?n+"//"+s:"")+(t?":"+t:"")+i,p.method=(p.method||"GET").toUpperCase(),p.headers=p.headers||{};var e=new _(p);return d&&e.on("response",d),e},g.get=function(d,a){var n=g.request(d,a);return n.end(),n},g.ClientRequest=_,g.IncomingMessage=O.IncomingMessage,g.Agent=function(){},g.Agent.defaultMaxSockets=4,g.globalAgent=new g.Agent,g.STATUS_CODES=v,g.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":233,"./lib/response":234,"builtin-status-codes":74,url:238,xtend:283}],232:[function(U,X,x){(function(I){"use strict";x.fetch=g(I.fetch)&&g(I.ReadableStream),x.writableStream=g(I.WritableStream),x.abortController=g(I.AbortController),x.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),x.blobConstructor=!0}catch(p){}var _;function O(){if(_!==void 0)return _;if(I.XMLHttpRequest){_=new I.XMLHttpRequest;try{_.open("GET",I.XDomainRequest?"/":"https://example.com")}catch(p){_=null}}else _=null;return _}function y(p){var d=O();if(!d)return!1;try{return d.responseType=p,d.responseType===p}catch(a){}return!1}var v=typeof I.ArrayBuffer!="undefined",o=v&&g(I.ArrayBuffer.prototype.slice);x.arraybuffer=x.fetch||v&&y("arraybuffer"),x.msstream=!x.fetch&&o&&y("ms-stream"),x.mozchunkedarraybuffer=!x.fetch&&v&&y("moz-chunked-arraybuffer"),x.overrideMimeType=x.fetch||(O()?g(O().overrideMimeType):!1),x.vbArray=g(I.VBArray);function g(p){return typeof p=="function"}_=null}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],233:[function(U,X,x){(function(I,_,O){"use strict";var y=U("babel-runtime/core-js/object/keys"),v=o(y);function o(u){return u&&u.__esModule?u:{default:u}}var g=U("./capability"),p=U("inherits"),d=U("./response"),a=U("readable-stream"),n=U("to-arraybuffer"),s=d.IncomingMessage,t=d.readyStates;function i(u,f){return g.fetch&&f?"fetch":g.mozchunkedarraybuffer?"moz-chunked-arraybuffer":g.msstream?"ms-stream":g.arraybuffer&&u?"arraybuffer":g.vbArray&&u?"text:vbarray":"text"}var e=X.exports=function(u){var f=this;a.Writable.call(f),f._opts=u,f._body=[],f._headers={},u.auth&&f.setHeader("Authorization","Basic "+new O(u.auth).toString("base64")),(0,v.default)(u.headers).forEach(function(E){f.setHeader(E,u.headers[E])});var m,l=!0;if(u.mode==="disable-fetch"||"requestTimeout"in u&&!g.abortController)l=!1,m=!0;else if(u.mode==="prefer-streaming")m=!1;else if(u.mode==="allow-wrong-content-type")m=!g.overrideMimeType;else if(!u.mode||u.mode==="default"||u.mode==="prefer-fast")m=!0;else throw new Error("Invalid value for opts.mode");f._mode=i(m,l),f._fetchTimer=null,f.on("finish",function(){f._onFinish()})};p(e,a.Writable),e.prototype.setHeader=function(u,f){var m=this,l=u.toLowerCase();if(c.indexOf(l)!==-1)return;m._headers[l]={name:u,value:f}},e.prototype.getHeader=function(u){var f=this._headers[u.toLowerCase()];return f?f.value:null},e.prototype.removeHeader=function(u){var f=this;delete f._headers[u.toLowerCase()]},e.prototype._onFinish=function(){var u=this;if(u._destroyed)return;var f=u._opts,m=u._headers,l=null;f.method!=="GET"&&f.method!=="HEAD"&&(g.arraybuffer?l=n(O.concat(u._body)):g.blobConstructor?l=new _.Blob(u._body.map(function(S){return n(S)}),{type:(m["content-type"]||{}).value||""}):l=O.concat(u._body).toString());var E=[];if((0,v.default)(m).forEach(function(S){var A=m[S].name,R=m[S].value;Array.isArray(R)?R.forEach(function(k){E.push([A,k])}):E.push([A,R])}),u._mode==="fetch"){var b=null,D=null;if(g.abortController){var C=new AbortController;b=C.signal,u._fetchAbortController=C,"requestTimeout"in f&&f.requestTimeout!==0&&(u._fetchTimer=_.setTimeout(function(){u.emit("requestTimeout"),u._fetchAbortController&&u._fetchAbortController.abort()},f.requestTimeout))}_.fetch(u._opts.url,{method:u._opts.method,headers:E,body:l||void 0,mode:"cors",credentials:f.withCredentials?"include":"same-origin",signal:b}).then(function(S){u._fetchResponse=S,u._connect()},function(S){_.clearTimeout(u._fetchTimer),u._destroyed||u.emit("error",S)})}else{var w=u._xhr=new _.XMLHttpRequest;try{w.open(u._opts.method,u._opts.url,!0)}catch(S){I.nextTick(function(){u.emit("error",S)});return}"responseType"in w&&(w.responseType=u._mode.split(":")[0]),"withCredentials"in w&&(w.withCredentials=!!f.withCredentials),u._mode==="text"&&"overrideMimeType"in w&&w.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in f&&(w.timeout=f.requestTimeout,w.ontimeout=function(){u.emit("requestTimeout")}),E.forEach(function(S){w.setRequestHeader(S[0],S[1])}),u._response=null,w.onreadystatechange=function(){switch(w.readyState){case t.LOADING:case t.DONE:u._onXHRProgress();break}},u._mode==="moz-chunked-arraybuffer"&&(w.onprogress=function(){u._onXHRProgress()}),w.onerror=function(){if(u._destroyed)return;u.emit("error",new Error("XHR error"))};try{w.send(l)}catch(S){I.nextTick(function(){u.emit("error",S)});return}}};function r(u){try{var f=u.status;return f!==null&&f!==0}catch(m){return!1}}e.prototype._onXHRProgress=function(){var u=this;if(!r(u._xhr)||u._destroyed)return;u._response||u._connect(),u._response._onXHRProgress()},e.prototype._connect=function(){var u=this;if(u._destroyed)return;u._response=new s(u._xhr,u._fetchResponse,u._mode,u._fetchTimer),u._response.on("error",function(f){u.emit("error",f)}),u.emit("response",u._response)},e.prototype._write=function(u,f,m){var l=this;l._body.push(u),m()},e.prototype.abort=e.prototype.destroy=function(){var u=this;u._destroyed=!0,_.clearTimeout(u._fetchTimer),u._response&&(u._response._destroyed=!0),u._xhr?u._xhr.abort():u._fetchAbortController&&u._fetchAbortController.abort()},e.prototype.end=function(u,f,m){var l=this;typeof u=="function"&&(m=u,u=void 0),a.Writable.prototype.end.call(l,u,f,m)},e.prototype.flushHeaders=function(){},e.prototype.setTimeout=function(){},e.prototype.setNoDelay=function(){},e.prototype.setSocketKeepAlive=function(){};var c=["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,U("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},U("buffer").Buffer)},{"./capability":232,"./response":234,_process:208,"babel-runtime/core-js/object/keys":60,buffer:73,inherits:196,"readable-stream":223,"to-arraybuffer":237}],234:[function(U,X,x){(function(I,_,O){"use strict";var y=U("babel-runtime/core-js/promise"),v=o(y);function o(s){return s&&s.__esModule?s:{default:s}}var g=U("./capability"),p=U("inherits"),d=U("readable-stream"),a=x.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},n=x.IncomingMessage=function(s,t,i,e){var r=this;if(d.Readable.call(r),r._mode=i,r.headers={},r.rawHeaders=[],r.trailers={},r.rawTrailers=[],r.on("end",function(){I.nextTick(function(){r.emit("close")})}),i==="fetch"){var c=function b(){f.read().then(function(D){if(r._destroyed)return;if(D.done){_.clearTimeout(e),r.push(null);return}r.push(new O(D.value)),b()}).catch(function(D){_.clearTimeout(e),r._destroyed||r.emit("error",D)})};if(r._fetchResponse=t,r.url=t.url,r.statusCode=t.status,r.statusMessage=t.statusText,t.headers.forEach(function(b,D){r.headers[D.toLowerCase()]=b,r.rawHeaders.push(D,b)}),g.writableStream){var u=new WritableStream({write:function(D){return new v.default(function(C,w){r._destroyed?w():r.push(new O(D))?C():r._resumeFetch=C})},close:function(){_.clearTimeout(e),r._destroyed||r.push(null)},abort:function(D){r._destroyed||r.emit("error",D)}});try{t.body.pipeTo(u).catch(function(b){_.clearTimeout(e),r._destroyed||r.emit("error",b)});return}catch(b){}}var f=t.body.getReader();c()}else{r._xhr=s,r._pos=0,r.url=s.responseURL,r.statusCode=s.status,r.statusMessage=s.statusText;var m=s.getAllResponseHeaders().split(/\r?\n/);if(m.forEach(function(b){var D=b.match(/^([^:]+):\s*(.*)/);if(D){var C=D[1].toLowerCase();C==="set-cookie"?(r.headers[C]===void 0&&(r.headers[C]=[]),r.headers[C].push(D[2])):r.headers[C]!==void 0?r.headers[C]+=", "+D[2]:r.headers[C]=D[2],r.rawHeaders.push(D[1],D[2])}}),r._charset="x-user-defined",!g.overrideMimeType){var l=r.rawHeaders["mime-type"];if(l){var E=l.match(/;\s*charset=([^;])(;|$)/);E&&(r._charset=E[1].toLowerCase())}r._charset||(r._charset="utf-8")}}};p(n,d.Readable),n.prototype._read=function(){var s=this,t=s._resumeFetch;t&&(s._resumeFetch=null,t())},n.prototype._onXHRProgress=function(){var s=this,t=s._xhr,i=null;switch(s._mode){case"text:vbarray":if(t.readyState!==a.DONE)break;try{i=new _.VBArray(t.responseBody).toArray()}catch(f){}if(i!==null){s.push(new O(i));break}case"text":try{i=t.responseText}catch(f){s._mode="text:vbarray";break}if(i.length>s._pos){var e=i.substr(s._pos);if(s._charset==="x-user-defined"){for(var r=new O(e.length),c=0;c<e.length;c++)r[c]=e.charCodeAt(c)&255;s.push(r)}else s.push(e,s._charset);s._pos=i.length}break;case"arraybuffer":if(t.readyState!==a.DONE||!t.response)break;i=t.response,s.push(new O(new Uint8Array(i)));break;case"moz-chunked-arraybuffer":if(i=t.response,t.readyState!==a.LOADING||!i)break;s.push(new O(new Uint8Array(i)));break;case"ms-stream":if(i=t.response,t.readyState!==a.LOADING)break;var u=new _.MSStreamReader;u.onprogress=function(){u.result.byteLength>s._pos&&(s.push(new O(new Uint8Array(u.result.slice(s._pos)))),s._pos=u.result.byteLength)},u.onload=function(){s.push(null)},u.readAsArrayBuffer(i);break}s._xhr.readyState===a.DONE&&s._mode!=="ms-stream"&&s.push(null)}}).call(this,U("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{},U("buffer").Buffer)},{"./capability":232,_process:208,"babel-runtime/core-js/promise":61,buffer:73,inherits:196,"readable-stream":223}],235:[function(U,X,x){"use strict";var I=U("safe-buffer").Buffer,_=I.isEncoding||function(u){u=""+u;switch(u&&u.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}};function O(u){if(!u)return"utf8";for(var f;;)switch(u){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 u;default:if(f)return;u=(""+u).toLowerCase(),f=!0}}function y(u){var f=O(u);if(typeof f!="string"&&(I.isEncoding===_||!_(u)))throw new Error("Unknown encoding: "+u);return f||u}x.StringDecoder=v;function v(u){this.encoding=y(u);var f;switch(this.encoding){case"utf16le":this.text=s,this.end=t,f=4;break;case"utf8":this.fillLast=d,f=4;break;case"base64":this.text=i,this.end=e,f=3;break;default:this.write=r,this.end=c;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=I.allocUnsafe(f)}v.prototype.write=function(u){if(u.length===0)return"";var f,m;if(this.lastNeed){if(f=this.fillLast(u),f===void 0)return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m<u.length?f?f+this.text(u,m):this.text(u,m):f||""},v.prototype.end=n,v.prototype.text=a,v.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length};function o(u){return u<=127?0:u>>5===6?2:u>>4===14?3:u>>3===30?4:u>>6===2?-1:-2}function g(u,f,m){var l=f.length-1;if(l<m)return 0;var E=o(f[l]);return E>=0?(E>0&&(u.lastNeed=E-1),E):--l<m||E===-2?0:(E=o(f[l]),E>=0?(E>0&&(u.lastNeed=E-2),E):--l<m||E===-2?0:(E=o(f[l]),E>=0?(E>0&&(E===2?E=0:u.lastNeed=E-3),E):0))}function p(u,f,m){if((f[0]&192)!==128)return u.lastNeed=0,"\uFFFD";if(u.lastNeed>1&&f.length>1){if((f[1]&192)!==128)return u.lastNeed=1,"\uFFFD";if(u.lastNeed>2&&f.length>2&&(f[2]&192)!==128)return u.lastNeed=2,"\uFFFD"}}function d(u){var f=this.lastTotal-this.lastNeed,m=p(this,u,f);if(m!==void 0)return m;if(this.lastNeed<=u.length)return u.copy(this.lastChar,f,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,f,0,u.length),this.lastNeed-=u.length}function a(u,f){var m=g(this,u,f);if(!this.lastNeed)return u.toString("utf8",f);this.lastTotal=m;var l=u.length-(m-this.lastNeed);return u.copy(this.lastChar,0,l),u.toString("utf8",f,l)}function n(u){var f=u&&u.length?this.write(u):"";return this.lastNeed?f+"\uFFFD":f}function s(u,f){if((u.length-f)%2===0){var m=u.toString("utf16le",f);if(m){var l=m.charCodeAt(m.length-1);if(l>=55296&&l<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",f,u.length-1)}function t(u){var f=u&&u.length?this.write(u):"";if(this.lastNeed){var m=this.lastTotal-this.lastNeed;return f+this.lastChar.toString("utf16le",0,m)}return f}function i(u,f){var m=(u.length-f)%3;return m===0?u.toString("base64",f):(this.lastNeed=3-m,this.lastTotal=3,m===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",f,u.length-m))}function e(u){var f=u&&u.length?this.write(u):"";return this.lastNeed?f+this.lastChar.toString("base64",0,3-this.lastNeed):f}function r(u){return u.toString(this.encoding)}function c(u){return u&&u.length?this.write(u):""}},{"safe-buffer":228}],236:[function(U,X,x){(function(I,_){var O=U("process/browser.js").nextTick,y=Function.prototype.apply,v=Array.prototype.slice,o={},g=0;x.setTimeout=function(){return new p(y.call(setTimeout,window,arguments),clearTimeout)},x.setInterval=function(){return new p(y.call(setInterval,window,arguments),clearInterval)},x.clearTimeout=x.clearInterval=function(d){d.close()};function p(d,a){this._id=d,this._clearFn=a}p.prototype.unref=p.prototype.ref=function(){},p.prototype.close=function(){this._clearFn.call(window,this._id)},x.enroll=function(d,a){clearTimeout(d._idleTimeoutId),d._idleTimeout=a},x.unenroll=function(d){clearTimeout(d._idleTimeoutId),d._idleTimeout=-1},x._unrefActive=x.active=function(d){clearTimeout(d._idleTimeoutId);var a=d._idleTimeout;a>=0&&(d._idleTimeoutId=setTimeout(function(){d._onTimeout&&d._onTimeout()},a))},x.setImmediate=typeof I=="function"?I:function(d){var a=g++,n=arguments.length<2?!1:v.call(arguments,1);return o[a]=!0,O(function(){o[a]&&(n?d.apply(null,n):d.call(null),x.clearImmediate(a))}),a},x.clearImmediate=typeof _=="function"?_:function(d){delete o[d]}}).call(this,U("timers").setImmediate,U("timers").clearImmediate)},{"process/browser.js":208,timers:236}],237:[function(U,X,x){var I=U("buffer").Buffer;X.exports=function(_){if(_ instanceof Uint8Array){if(_.byteOffset===0&&_.byteLength===_.buffer.byteLength)return _.buffer;if(typeof _.buffer.slice=="function")return _.buffer.slice(_.byteOffset,_.byteOffset+_.byteLength)}if(I.isBuffer(_)){for(var O=new Uint8Array(_.length),y=_.length,v=0;v<y;v++)O[v]=_[v];return O.buffer}else throw new Error("Argument must be a Buffer")}},{buffer:73}],238:[function(U,X,x){"use strict";var I=U("punycode"),_=U("./util");x.parse=f,x.resolve=l,x.resolveObject=E,x.format=m,x.Url=O;function O(){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}var y=/^([a-z0-9.+-]+:)/i,v=/:[0-9]*$/,o=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,g=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],p=["{","}","|","\\","^","`"].concat(g),d=["'"].concat(p),a=["%","/","?",";","#"].concat(d),n=["/","?","#"],s=255,t=/^[+a-z0-9A-Z_-]{0,63}$/,i=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,e={javascript:!0,"javascript:":!0},r={javascript:!0,"javascript:":!0},c={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},u=U("querystring");function f(b,D,C){if(b&&_.isObject(b)&&b instanceof O)return b;var w=new O;return w.parse(b,D,C),w}O.prototype.parse=function(b,D,C){if(!_.isString(b))throw new TypeError("Parameter 'url' must be a string, not "+typeof b);var w=b.indexOf("?"),S=w!==-1&&w<b.indexOf("#")?"?":"#",A=b.split(S),R=/\\/g;A[0]=A[0].replace(R,"/"),b=A.join(S);var k=b;if(k=k.trim(),!C&&b.split("#").length===1){var L=o.exec(k);if(L)return this.path=k,this.href=k,this.pathname=L[1],L[2]?(this.search=L[2],D?this.query=u.parse(this.search.substr(1)):this.query=this.search.substr(1)):D&&(this.search="",this.query={}),this}var M=y.exec(k);if(M){M=M[0];var G=M.toLowerCase();this.protocol=G,k=k.substr(M.length)}if(C||M||k.match(/^\/\/[^@\/]+@[^@\/]+/)){var W=k.substr(0,2)==="//";W&&!(M&&r[M])&&(k=k.substr(2),this.slashes=!0)}if(!r[M]&&(W||M&&!c[M])){for(var N=-1,K=0;K<n.length;K++){var F=k.indexOf(n[K]);F!==-1&&(N===-1||F<N)&&(N=F)}var P,B;N===-1?B=k.lastIndexOf("@"):B=k.lastIndexOf("@",N),B!==-1&&(P=k.slice(0,B),k=k.slice(B+1),this.auth=decodeURIComponent(P)),N=-1;for(var K=0;K<a.length;K++){var F=k.indexOf(a[K]);F!==-1&&(N===-1||F<N)&&(N=F)}N===-1&&(N=k.length),this.host=k.slice(0,N),k=k.slice(N),this.parseHost(),this.hostname=this.hostname||"";var J=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!J)for(var re=this.hostname.split(/\./),K=0,he=re.length;K<he;K++){var we=re[K];if(!we)continue;if(!we.match(t)){for(var ke="",ne=0,Oe=we.length;ne<Oe;ne++)we.charCodeAt(ne)>127?ke+="x":ke+=we[ne];if(!ke.match(t)){var Ce=re.slice(0,K),fe=re.slice(K+1),oe=we.match(i);oe&&(Ce.push(oe[1]),fe.unshift(oe[2])),fe.length&&(k="/"+fe.join(".")+k),this.hostname=Ce.join(".");break}}}this.hostname.length>s?this.hostname="":this.hostname=this.hostname.toLowerCase(),J||(this.hostname=I.toASCII(this.hostname));var se=this.port?":"+this.port:"",be=this.hostname||"";this.host=be+se,this.href+=this.host,J&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),k[0]!=="/"&&(k="/"+k))}if(!e[G])for(var K=0,he=d.length;K<he;K++){var ie=d[K];if(k.indexOf(ie)===-1)continue;var de=encodeURIComponent(ie);de===ie&&(de=escape(ie)),k=k.split(ie).join(de)}var Fe=k.indexOf("#");Fe!==-1&&(this.hash=k.substr(Fe),k=k.slice(0,Fe));var ae=k.indexOf("?");if(ae!==-1?(this.search=k.substr(ae),this.query=k.substr(ae+1),D&&(this.query=u.parse(this.query)),k=k.slice(0,ae)):D&&(this.search="",this.query={}),k&&(this.pathname=k),c[G]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var se=this.pathname||"",Z=this.search||"";this.path=se+Z}return this.href=this.format(),this};function m(b){return _.isString(b)&&(b=f(b)),b instanceof O?b.format():O.prototype.format.call(b)}O.prototype.format=function(){var b=this.auth||"";b&&(b=encodeURIComponent(b),b=b.replace(/%3A/i,":"),b+="@");var D=this.protocol||"",C=this.pathname||"",w=this.hash||"",S=!1,A="";this.host?S=b+this.host:this.hostname&&(S=b+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(S+=":"+this.port)),this.query&&_.isObject(this.query)&&Object.keys(this.query).length&&(A=u.stringify(this.query));var R=this.search||A&&"?"+A||"";return D&&D.substr(-1)!==":"&&(D+=":"),this.slashes||(!D||c[D])&&S!==!1?(S="//"+(S||""),C&&C.charAt(0)!=="/"&&(C="/"+C)):S||(S=""),w&&w.charAt(0)!=="#"&&(w="#"+w),R&&R.charAt(0)!=="?"&&(R="?"+R),C=C.replace(/[?#]/g,function(k){return encodeURIComponent(k)}),R=R.replace("#","%23"),D+S+C+R+w};function l(b,D){return f(b,!1,!0).resolve(D)}O.prototype.resolve=function(b){return this.resolveObject(f(b,!1,!0)).format()};function E(b,D){return b?f(b,!1,!0).resolveObject(D):D}O.prototype.resolveObject=function(b){if(_.isString(b)){var D=new O;D.parse(b,!1,!0),b=D}for(var C=new O,w=Object.keys(this),S=0;S<w.length;S++){var A=w[S];C[A]=this[A]}if(C.hash=b.hash,b.href==="")return C.href=C.format(),C;if(b.slashes&&!b.protocol){for(var R=Object.keys(b),k=0;k<R.length;k++){var L=R[k];L!=="protocol"&&(C[L]=b[L])}return c[C.protocol]&&C.hostname&&!C.pathname&&(C.path=C.pathname="/"),C.href=C.format(),C}if(b.protocol&&b.protocol!==C.protocol){if(!c[b.protocol]){for(var M=Object.keys(b),G=0;G<M.length;G++){var W=M[G];C[W]=b[W]}return C.href=C.format(),C}if(C.protocol=b.protocol,!b.host&&!r[b.protocol]){for(var he=(b.pathname||"").split("/");he.length&&!(b.host=he.shift()););b.host||(b.host=""),b.hostname||(b.hostname=""),he[0]!==""&&he.unshift(""),he.length<2&&he.unshift(""),C.pathname=he.join("/")}else C.pathname=b.pathname;if(C.search=b.search,C.query=b.query,C.host=b.host||"",C.auth=b.auth,C.hostname=b.hostname||b.host,C.port=b.port,C.pathname||C.search){var N=C.pathname||"",K=C.search||"";C.path=N+K}return C.slashes=C.slashes||b.slashes,C.href=C.format(),C}var F=C.pathname&&C.pathname.charAt(0)==="/",P=b.host||b.pathname&&b.pathname.charAt(0)==="/",B=P||F||C.host&&b.pathname,J=B,re=C.pathname&&C.pathname.split("/")||[],he=b.pathname&&b.pathname.split("/")||[],we=C.protocol&&!c[C.protocol];if(we&&(C.hostname="",C.port=null,C.host&&(re[0]===""?re[0]=C.host:re.unshift(C.host)),C.host="",b.protocol&&(b.hostname=null,b.port=null,b.host&&(he[0]===""?he[0]=b.host:he.unshift(b.host)),b.host=null),B=B&&(he[0]===""||re[0]==="")),P)C.host=b.host||b.host===""?b.host:C.host,C.hostname=b.hostname||b.hostname===""?b.hostname:C.hostname,C.search=b.search,C.query=b.query,re=he;else if(he.length)re||(re=[]),re.pop(),re=re.concat(he),C.search=b.search,C.query=b.query;else if(!_.isNullOrUndefined(b.search)){if(we){C.hostname=C.host=re.shift();var ke=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;ke&&(C.auth=ke.shift(),C.host=C.hostname=ke.shift())}return C.search=b.search,C.query=b.query,(!_.isNull(C.pathname)||!_.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.href=C.format(),C}if(!re.length)return C.pathname=null,C.search?C.path="/"+C.search:C.path=null,C.href=C.format(),C;for(var ne=re.slice(-1)[0],Oe=(C.host||b.host||re.length>1)&&(ne==="."||ne==="..")||ne==="",Ce=0,fe=re.length;fe>=0;fe--)ne=re[fe],ne==="."?re.splice(fe,1):ne===".."?(re.splice(fe,1),Ce++):Ce&&(re.splice(fe,1),Ce--);if(!B&&!J)for(;Ce--;Ce)re.unshift("..");B&&re[0]!==""&&(!re[0]||re[0].charAt(0)!=="/")&&re.unshift(""),Oe&&re.join("/").substr(-1)!=="/"&&re.push("");var oe=re[0]===""||re[0]&&re[0].charAt(0)==="/";if(we){C.hostname=C.host=oe?"":re.length?re.shift():"";var ke=C.host&&C.host.indexOf("@")>0?C.host.split("@"):!1;ke&&(C.auth=ke.shift(),C.host=C.hostname=ke.shift())}return B=B||C.host&&re.length,B&&!oe&&re.unshift(""),re.length?C.pathname=re.join("/"):(C.pathname=null,C.path=null),(!_.isNull(C.pathname)||!_.isNull(C.search))&&(C.path=(C.pathname?C.pathname:"")+(C.search?C.search:"")),C.auth=b.auth||C.auth,C.slashes=C.slashes||b.slashes,C.href=C.format(),C},O.prototype.parseHost=function(){var b=this.host,D=v.exec(b);D&&(D=D[0],D!==":"&&(this.port=D.substr(1)),b=b.substr(0,b.length-D.length)),b&&(this.hostname=b)}},{"./util":239,punycode:209,querystring:212}],239:[function(U,X,x){"use strict";X.exports={isString:function(I){return typeof I=="string"},isObject:function(I){return typeof I=="object"&&I!==null},isNull:function(I){return I===null},isNullOrUndefined:function(I){return I==null}}},{}],240:[function(U,X,x){(function(I){X.exports=_;function _(y,v){if(O("noDeprecation"))return y;var o=!1;function g(){if(!o){if(O("throwDeprecation"))throw new Error(v);O("traceDeprecation")?console.trace(v):console.warn(v),o=!0}return y.apply(this,arguments)}return g}function O(y){try{if(!I.localStorage)return!1}catch(o){return!1}var v=I.localStorage[y];return v==null?!1:String(v).toLowerCase()==="true"}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],241:[function(U,X,x){typeof Object.create=="function"?X.exports=function(_,O){_.super_=O,_.prototype=Object.create(O.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}})}:X.exports=function(_,O){_.super_=O;var y=function(){};y.prototype=O.prototype,_.prototype=new y,_.prototype.constructor=_}},{}],242:[function(U,X,x){X.exports=function(_){return _&&typeof _=="object"&&typeof _.copy=="function"&&typeof _.fill=="function"&&typeof _.readUInt8=="function"}},{}],243:[function(U,X,x){(function(I,_){var O=/%[sdj%]/g;x.format=function(N){if(!l(N)){for(var K=[],F=0;F<arguments.length;F++)K.push(o(arguments[F]));return K.join(" ")}for(var F=1,P=arguments,B=P.length,J=String(N).replace(O,function(he){if(he==="%%")return"%";if(F>=B)return he;switch(he){case"%s":return String(P[F++]);case"%d":return Number(P[F++]);case"%j":try{return JSON.stringify(P[F++])}catch(we){return"[Circular]"}default:return he}}),re=P[F];F<B;re=P[++F])u(re)||!C(re)?J+=" "+re:J+=" "+o(re);return J},x.deprecate=function(N,K){if(b(_.process))return function(){return x.deprecate(N,K).apply(this,arguments)};if(I.noDeprecation===!0)return N;var F=!1;function P(){if(!F){if(I.throwDeprecation)throw new Error(K);I.traceDeprecation?console.trace(K):console.error(K),F=!0}return N.apply(this,arguments)}return P};var y={},v;x.debuglog=function(N){if(b(v)&&(v=I.env.NODE_DEBUG||""),N=N.toUpperCase(),!y[N])if(new RegExp("\\b"+N+"\\b","i").test(v)){var K=I.pid;y[N]=function(){var F=x.format.apply(x,arguments);console.error("%s %d: %s",N,K,F)}}else y[N]=function(){};return y[N]};function o(N,K){var F={seen:[],stylize:p};return arguments.length>=3&&(F.depth=arguments[2]),arguments.length>=4&&(F.colors=arguments[3]),c(K)?F.showHidden=K:K&&x._extend(F,K),b(F.showHidden)&&(F.showHidden=!1),b(F.depth)&&(F.depth=2),b(F.colors)&&(F.colors=!1),b(F.customInspect)&&(F.customInspect=!0),F.colors&&(F.stylize=g),a(F,N,F.depth)}x.inspect=o,o.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]},o.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function g(N,K){var F=o.styles[K];return F?"["+o.colors[F][0]+"m"+N+"["+o.colors[F][1]+"m":N}function p(N,K){return N}function d(N){var K={};return N.forEach(function(F,P){K[F]=!0}),K}function a(N,K,F){if(N.customInspect&&K&&A(K.inspect)&&K.inspect!==x.inspect&&!(K.constructor&&K.constructor.prototype===K)){var P=K.inspect(F,N);return l(P)||(P=a(N,P,F)),P}var B=n(N,K);if(B)return B;var J=Object.keys(K),re=d(J);if(N.showHidden&&(J=Object.getOwnPropertyNames(K)),S(K)&&(J.indexOf("message")>=0||J.indexOf("description")>=0))return s(K);if(J.length===0){if(A(K)){var he=K.name?": "+K.name:"";return N.stylize("[Function"+he+"]","special")}if(D(K))return N.stylize(RegExp.prototype.toString.call(K),"regexp");if(w(K))return N.stylize(Date.prototype.toString.call(K),"date");if(S(K))return s(K)}var we="",ke=!1,ne=["{","}"];if(r(K)&&(ke=!0,ne=["[","]"]),A(K)){var Oe=K.name?": "+K.name:"";we=" [Function"+Oe+"]"}if(D(K)&&(we=" "+RegExp.prototype.toString.call(K)),w(K)&&(we=" "+Date.prototype.toUTCString.call(K)),S(K)&&(we=" "+s(K)),J.length===0&&(!ke||K.length==0))return ne[0]+we+ne[1];if(F<0)return D(K)?N.stylize(RegExp.prototype.toString.call(K),"regexp"):N.stylize("[Object]","special");N.seen.push(K);var Ce;return ke?Ce=t(N,K,F,re,J):Ce=J.map(function(fe){return i(N,K,F,re,fe,ke)}),N.seen.pop(),e(Ce,we,ne)}function n(N,K){if(b(K))return N.stylize("undefined","undefined");if(l(K)){var F="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(F,"string")}if(m(K))return N.stylize(""+K,"number");if(c(K))return N.stylize(""+K,"boolean");if(u(K))return N.stylize("null","null")}function s(N){return"["+Error.prototype.toString.call(N)+"]"}function t(N,K,F,P,B){for(var J=[],re=0,he=K.length;re<he;++re)W(K,String(re))?J.push(i(N,K,F,P,String(re),!0)):J.push("");return B.forEach(function(we){we.match(/^\d+$/)||J.push(i(N,K,F,P,we,!0))}),J}function i(N,K,F,P,B,J){var re,he,we;if(we=Object.getOwnPropertyDescriptor(K,B)||{value:K[B]},we.get?we.set?he=N.stylize("[Getter/Setter]","special"):he=N.stylize("[Getter]","special"):we.set&&(he=N.stylize("[Setter]","special")),W(P,B)||(re="["+B+"]"),he||(N.seen.indexOf(we.value)<0?(u(F)?he=a(N,we.value,null):he=a(N,we.value,F-1),he.indexOf(`
|
|
|
`)>-1&&(J?he=he.split(`
|
|
|
`).map(function(ke){return" "+ke}).join(`
|
|
|
`).substr(2):he=`
|
|
|
`+he.split(`
|
|
|
`).map(function(ke){return" "+ke}).join(`
|
|
|
`))):he=N.stylize("[Circular]","special")),b(re)){if(J&&B.match(/^\d+$/))return he;re=JSON.stringify(""+B),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.substr(1,re.length-2),re=N.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=N.stylize(re,"string"))}return re+": "+he}function e(N,K,F){var P=0,B=N.reduce(function(J,re){return P++,re.indexOf(`
|
|
|
`)>=0&&P++,J+re.replace(/\u001b\[\d\d?m/g,"").length+1},0);return B>60?F[0]+(K===""?"":K+`
|
|
|
`)+" "+N.join(`,
|
|
|
`)+" "+F[1]:F[0]+K+" "+N.join(", ")+" "+F[1]}function r(N){return Array.isArray(N)}x.isArray=r;function c(N){return typeof N=="boolean"}x.isBoolean=c;function u(N){return N===null}x.isNull=u;function f(N){return N==null}x.isNullOrUndefined=f;function m(N){return typeof N=="number"}x.isNumber=m;function l(N){return typeof N=="string"}x.isString=l;function E(N){return typeof N=="symbol"}x.isSymbol=E;function b(N){return N===void 0}x.isUndefined=b;function D(N){return C(N)&&k(N)==="[object RegExp]"}x.isRegExp=D;function C(N){return typeof N=="object"&&N!==null}x.isObject=C;function w(N){return C(N)&&k(N)==="[object Date]"}x.isDate=w;function S(N){return C(N)&&(k(N)==="[object Error]"||N instanceof Error)}x.isError=S;function A(N){return typeof N=="function"}x.isFunction=A;function R(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N=="undefined"}x.isPrimitive=R,x.isBuffer=U("./support/isBuffer");function k(N){return Object.prototype.toString.call(N)}function L(N){return N<10?"0"+N.toString(10):N.toString(10)}var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function G(){var N=new Date,K=[L(N.getHours()),L(N.getMinutes()),L(N.getSeconds())].join(":");return[N.getDate(),M[N.getMonth()],K].join(" ")}x.log=function(){console.log("%s - %s",G(),x.format.apply(x,arguments))},x.inherits=U("inherits"),x._extend=function(N,K){if(!K||!C(K))return N;for(var F=Object.keys(K),P=F.length;P--;)N[F[P]]=K[F[P]];return N};function W(N,K){return Object.prototype.hasOwnProperty.call(N,K)}}).call(this,U("_process"),typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":242,_process:208,inherits:241}],244:[function(U,X,x){"use strict";(function(){"use strict";x.stripBOM=function(I){return I[0]==="\uFEFF"?I.substring(1):I}}).call(void 0)},{}],245:[function(U,X,x){"use strict";var I=U("babel-runtime/helpers/typeof"),_=v(I),O=U("babel-runtime/core-js/object/keys"),y=v(O);function v(o){return o&&o.__esModule?o:{default:o}}(function(){"use strict";var o,g,p,d,a,n={}.hasOwnProperty;o=U("xmlbuilder"),g=U("./defaults").defaults,d=function(t){return typeof t=="string"&&(t.indexOf("&")>=0||t.indexOf(">")>=0||t.indexOf("<")>=0)},a=function(t){return"<![CDATA["+p(t)+"]]>"},p=function(t){return t.replace("]]>","]]]]><![CDATA[>")},x.Builder=function(){function s(t){var i,e,r;this.options={},e=g["0.2"];for(i in e){if(!n.call(e,i))continue;r=e[i],this.options[i]=r}for(i in t){if(!n.call(t,i))continue;r=t[i],this.options[i]=r}}return s.prototype.buildObject=function(t){var i,e,r,c,u;return i=this.options.attrkey,e=this.options.charkey,(0,y.default)(t).length===1&&this.options.rootName===g["0.2"].rootName?(u=(0,y.default)(t)[0],t=t[u]):u=this.options.rootName,r=function(f){return function(m,l){var E,b,D,C,w,S;if((typeof l=="undefined"?"undefined":(0,_.default)(l))!=="object")f.options.cdata&&d(l)?m.raw(a(l)):m.txt(l);else if(Array.isArray(l))for(C in l){if(!n.call(l,C))continue;b=l[C];for(w in b)D=b[w],m=r(m.ele(w),D).up()}else for(w in l){if(!n.call(l,w))continue;if(b=l[w],w===i){if((typeof b=="undefined"?"undefined":(0,_.default)(b))==="object")for(E in b)S=b[E],m=m.att(E,S)}else if(w===e)f.options.cdata&&d(b)?m=m.raw(a(b)):m=m.txt(b);else if(Array.isArray(b))for(C in b){if(!n.call(b,C))continue;D=b[C],typeof D=="string"?f.options.cdata&&d(D)?m=m.ele(w).raw(a(D)).up():m=m.ele(w,D).up():m=r(m.ele(w),D).up()}else(typeof b=="undefined"?"undefined":(0,_.default)(b))==="object"?m=r(m.ele(w),b).up():typeof b=="string"&&f.options.cdata&&d(b)?m=m.ele(w).raw(a(b)).up():(b==null&&(b=""),m=m.ele(w,b.toString()).up())}return m}}(this),c=o.create(u,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),r(c,t).end(this.options.renderOpts)},s}()}).call(void 0)},{"./defaults":246,"babel-runtime/core-js/object/keys":60,"babel-runtime/helpers/typeof":67,xmlbuilder:282}],246:[function(U,X,x){"use strict";(function(){x.defaults={"0.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:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],247:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/promise"),_=d(I),O=U("babel-runtime/core-js/object/get-own-property-names"),y=d(O),v=U("babel-runtime/core-js/object/keys"),o=d(v),g=U("babel-runtime/helpers/typeof"),p=d(g);function d(a){return a&&a.__esModule?a:{default:a}}(function(){"use strict";var a,n,s,t,i,e,r,c,u=function(E,b){return function(){return E.apply(b,arguments)}},f=function(E,b){for(var D in b)m.call(b,D)&&(E[D]=b[D]);function C(){this.constructor=E}return C.prototype=b.prototype,E.prototype=new C,E.__super__=b.prototype,E},m={}.hasOwnProperty;r=U("sax"),s=U("events"),a=U("./bom"),e=U("./processors"),c=U("timers").setImmediate,n=U("./defaults").defaults,t=function(E){return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&E!=null&&(0,o.default)(E).length===0},i=function(E,b,D){var C,w,S;for(C=0,w=E.length;C<w;C++)S=E[C],b=S(b,D);return b},x.Parser=function(l){f(E,l);function E(b){this.parseStringPromise=u(this.parseStringPromise,this),this.parseString=u(this.parseString,this),this.reset=u(this.reset,this),this.assignOrPush=u(this.assignOrPush,this),this.processAsync=u(this.processAsync,this);var D,C,w;if(!(this instanceof x.Parser))return new x.Parser(b);this.options={},C=n["0.2"];for(D in C){if(!m.call(C,D))continue;w=C[D],this.options[D]=w}for(D in b){if(!m.call(b,D))continue;w=b[D],this.options[D]=w}this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(e.normalize)),this.reset()}return E.prototype.processAsync=function(){var b,D;try{return this.remaining.length<=this.options.chunkSize?(b=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(b),this.saxParser.close()):(b=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(b),c(this.processAsync))}catch(C){if(D=C,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(D)}},E.prototype.assignOrPush=function(b,D,C){return D in b?(b[D]instanceof Array||(b[D]=[b[D]]),b[D].push(C)):this.options.explicitArray?b[D]=[C]:b[D]=C},E.prototype.reset=function(){var b,D,C,w;return this.removeAllListeners(),this.saxParser=r.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(S){return function(A){if(S.saxParser.resume(),!S.saxParser.errThrown)return S.saxParser.errThrown=!0,S.emit("error",A)}}(this),this.saxParser.onend=function(S){return function(){if(!S.saxParser.ended)return S.saxParser.ended=!0,S.emit("end",S.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,w=[],b=this.options.attrkey,D=this.options.charkey,this.saxParser.onopentag=function(S){return function(A){var R,k,L,M,G;if(L={},L[D]="",!S.options.ignoreAttrs){G=A.attributes;for(R in G){if(!m.call(G,R))continue;!(b in L)&&!S.options.mergeAttrs&&(L[b]={}),k=S.options.attrValueProcessors?i(S.options.attrValueProcessors,A.attributes[R],R):A.attributes[R],M=S.options.attrNameProcessors?i(S.options.attrNameProcessors,R):R,S.options.mergeAttrs?S.assignOrPush(L,M,k):L[b][M]=k}}return L["#name"]=S.options.tagNameProcessors?i(S.options.tagNameProcessors,A.name):A.name,S.options.xmlns&&(L[S.options.xmlnskey]={uri:A.uri,local:A.local}),w.push(L)}}(this),this.saxParser.onclosetag=function(S){return function(){var A,R,k,L,M,G,W,N,K,F;if(G=w.pop(),M=G["#name"],(!S.options.explicitChildren||!S.options.preserveChildrenOrder)&&delete G["#name"],G.cdata===!0&&(A=G.cdata,delete G.cdata),K=w[w.length-1],G[D].match(/^\s*$/)&&!A?(R=G[D],delete G[D]):(S.options.trim&&(G[D]=G[D].trim()),S.options.normalize&&(G[D]=G[D].replace(/\s{2,}/g," ").trim()),G[D]=S.options.valueProcessors?i(S.options.valueProcessors,G[D],M):G[D],(0,o.default)(G).length===1&&D in G&&!S.EXPLICIT_CHARKEY&&(G=G[D])),t(G)&&(G=S.options.emptyTag!==""?S.options.emptyTag:R),S.options.validator!=null&&(F="/"+function(){var P,B,J;for(J=[],P=0,B=w.length;P<B;P++)L=w[P],J.push(L["#name"]);return J}().concat(M).join("/"),function(){var P;try{return G=S.options.validator(F,K&&K[M],G)}catch(B){return P=B,S.emit("error",P)}}()),S.options.explicitChildren&&!S.options.mergeAttrs&&(typeof G=="undefined"?"undefined":(0,p.default)(G))==="object"){if(!S.options.preserveChildrenOrder)L={},S.options.attrkey in G&&(L[S.options.attrkey]=G[S.options.attrkey],delete G[S.options.attrkey]),!S.options.charsAsChildren&&S.options.charkey in G&&(L[S.options.charkey]=G[S.options.charkey],delete G[S.options.charkey]),(0,y.default)(G).length>0&&(L[S.options.childkey]=G),G=L;else if(K){K[S.options.childkey]=K[S.options.childkey]||[],W={};for(k in G){if(!m.call(G,k))continue;W[k]=G[k]}K[S.options.childkey].push(W),delete G["#name"],(0,o.default)(G).length===1&&D in G&&!S.EXPLICIT_CHARKEY&&(G=G[D])}}return w.length>0?S.assignOrPush(K,M,G):(S.options.explicitRoot&&(N=G,G={},G[M]=N),S.resultObject=G,S.saxParser.ended=!0,S.emit("end",S.resultObject))}}(this),C=function(S){return function(A){var R,k;if(k=w[w.length-1],k)return k[D]+=A,S.options.explicitChildren&&S.options.preserveChildrenOrder&&S.options.charsAsChildren&&(S.options.includeWhiteChars||A.replace(/\\n/g,"").trim()!=="")&&(k[S.options.childkey]=k[S.options.childkey]||[],R={"#name":"__text__"},R[D]=A,S.options.normalize&&(R[D]=R[D].replace(/\s{2,}/g," ").trim()),k[S.options.childkey].push(R)),k}}(this),this.saxParser.ontext=C,this.saxParser.oncdata=function(S){return function(A){var R;if(R=C(A),R)return R.cdata=!0}}(this)},E.prototype.parseString=function(b,D){var C;D!=null&&typeof D=="function"&&(this.on("end",function(w){return this.reset(),D(null,w)}),this.on("error",function(w){return this.reset(),D(w)}));try{return b=b.toString(),b.trim()===""?(this.emit("end",null),!0):(b=a.stripBOM(b),this.options.async?(this.remaining=b,c(this.processAsync),this.saxParser):this.saxParser.write(b).close())}catch(w){if(C=w,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw C}else return this.emit("error",C),this.saxParser.errThrown=!0}},E.prototype.parseStringPromise=function(b){return new _.default(function(D){return function(C,w){return D.parseString(b,function(S,A){return S?w(S):C(A)})}}(this))},E}(s),x.parseString=function(l,E,b){var D,C,w;return b!=null?(typeof b=="function"&&(D=b),(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(C=E)):(typeof E=="function"&&(D=E),C={}),w=new x.Parser(C),w.parseString(l,D)},x.parseStringPromise=function(l,E){var b,D;return(typeof E=="undefined"?"undefined":(0,p.default)(E))==="object"&&(b=E),D=new x.Parser(b),D.parseStringPromise(l)}}).call(void 0)},{"./bom":244,"./defaults":246,"./processors":248,"babel-runtime/core-js/object/get-own-property-names":58,"babel-runtime/core-js/object/keys":60,"babel-runtime/core-js/promise":61,"babel-runtime/helpers/typeof":67,events:192,sax:229,timers:236}],248:[function(U,X,x){"use strict";(function(){"use strict";var I;I=new RegExp(/(?!xmlns)^.*:/),x.normalize=function(_){return _.toLowerCase()},x.firstCharLowerCase=function(_){return _.charAt(0).toLowerCase()+_.slice(1)},x.stripPrefix=function(_){return _.replace(I,"")},x.parseNumbers=function(_){return isNaN(_)||(_=_%1===0?parseInt(_,10):parseFloat(_)),_},x.parseBooleans=function(_){return/^(?:true|false)$/i.test(_)&&(_=_.toLowerCase()==="true"),_}}).call(void 0)},{}],249:[function(U,X,x){"use strict";(function(){"use strict";var I,_,O,y,v=function(p,d){for(var a in d)o.call(d,a)&&(p[a]=d[a]);function n(){this.constructor=p}return n.prototype=d.prototype,p.prototype=new n,p.__super__=d.prototype,p},o={}.hasOwnProperty;_=U("./defaults"),I=U("./builder"),O=U("./parser"),y=U("./processors"),x.defaults=_.defaults,x.processors=y,x.ValidationError=function(g){v(p,g);function p(d){this.message=d}return p}(Error),x.Builder=I.Builder,x.Parser=O.Parser,x.parseString=O.parseString,x.parseStringPromise=O.parseStringPromise}).call(void 0)},{"./builder":245,"./defaults":246,"./parser":247,"./processors":248}],250:[function(U,X,x){"use strict";(function(){X.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}).call(void 0)},{}],251:[function(U,X,x){"use strict";(function(){X.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(void 0)},{}],252:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/get-prototype-of"),_=g(I),O=U("babel-runtime/helpers/typeof"),y=g(O),v=U("babel-runtime/core-js/object/assign"),o=g(v);function g(p){return p&&p.__esModule?p:{default:p}}(function(){var p,d,a,n,s,t,i,e=[].slice,r={}.hasOwnProperty;p=function(){var u,f,m,l,E,b;if(b=arguments[0],E=2<=arguments.length?e.call(arguments,1):[],s(o.default))o.default.apply(null,arguments);else for(u=0,m=E.length;u<m;u++)if(l=E[u],l!=null)for(f in l){if(!r.call(l,f))continue;b[f]=l[f]}return b},s=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},t=function(u){var f;return!!u&&((f=typeof u=="undefined"?"undefined":(0,y.default)(u))==="function"||f==="object")},a=function(u){return s(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},n=function(u){var f;if(a(u))return!u.length;for(f in u){if(!r.call(u,f))continue;return!1}return!0},i=function(u){var f,m;return t(u)&&(m=(0,_.default)(u))&&(f=m.constructor)&&typeof f=="function"&&f instanceof f&&Function.prototype.toString.call(f)===Function.prototype.toString.call(Object)},d=function(u){return s(u.valueOf)?u.valueOf():u},X.exports.assign=p,X.exports.isFunction=s,X.exports.isObject=t,X.exports.isArray=a,X.exports.isEmpty=n,X.exports.isPlainObject=i,X.exports.getValue=d}).call(void 0)},{"babel-runtime/core-js/object/assign":54,"babel-runtime/core-js/object/get-prototype-of":59,"babel-runtime/helpers/typeof":67}],253:[function(U,X,x){"use strict";(function(){X.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(void 0)},{}],254:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o;y=U("./NodeType"),o=U("./XMLNode"),X.exports=v=function(){function g(p,d,a){if(this.parent=p,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),d==null)throw new Error("Missing attribute name. "+this.debugInfo(d));this.name=this.stringify.name(d),this.value=this.stringify.attValue(a),this.type=y.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(g.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(g.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(g.prototype,"textContent",{get:function(){return this.value},set:function(d){return this.value=d||""}}),Object.defineProperty(g.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(g.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(g.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(g.prototype,"specified",{get:function(){return!0}}),g.prototype.clone=function(){return(0,_.default)(this)},g.prototype.toString=function(p){return this.options.writer.attribute(this,this.options.writer.filterOptions(p))},g.prototype.debugInfo=function(p){return p=p||this.name,p==null?"parent: <"+this.parent.name+">":"attribute: {"+p+"}, parent: <"+this.parent.name+">"},g.prototype.isEqualNode=function(p){return p.namespaceURI!==this.namespaceURI||(p.prefix!==this.prefix||p.localName!==this.localName)?!1:!(p.value!==this.value)},g}()}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],255:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;y=U("./NodeType"),o=U("./XMLCharacterData"),X.exports=v=function(d){g(a,d);function a(n,s){if(a.__super__.constructor.call(this,n),s==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=y.CData,this.value=this.stringify.cdata(s)}return a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))},a}(o)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],256:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o=function(d,a){for(var n in a)g.call(a,n)&&(d[n]=a[n]);function s(){this.constructor=d}return s.prototype=a.prototype,d.prototype=new s,d.__super__=a.prototype,d},g={}.hasOwnProperty;v=U("./XMLNode"),X.exports=y=function(p){o(d,p);function d(a){d.__super__.constructor.call(this,a),this.value=""}return Object.defineProperty(d.prototype,"data",{get:function(){return this.value},set:function(n){return this.value=n||""}}),Object.defineProperty(d.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return this.value},set:function(n){return this.value=n||""}}),d.prototype.clone=function(){return(0,_.default)(this)},d.prototype.substringData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.appendData=function(a){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.insertData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.deleteData=function(a,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.replaceData=function(a,n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())},d.prototype.isEqualNode=function(a){return d.__super__.isEqualNode.apply(this,arguments).isEqualNode(a)?!(a.data!==this.data):!1},d}(v)}).call(void 0)},{"./XMLNode":273,"babel-runtime/core-js/object/create":55}],257:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;y=U("./NodeType"),v=U("./XMLCharacterData"),X.exports=o=function(d){g(a,d);function a(n,s){if(a.__super__.constructor.call(this,n),s==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=y.Comment,this.value=this.stringify.comment(s)}return a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))},a}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],258:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=v(I),O=U("babel-runtime/core-js/object/create"),y=v(O);function v(o){return o&&o.__esModule?o:{default:o}}(function(){var o,g,p;g=U("./XMLDOMErrorHandler"),p=U("./XMLDOMStringList"),X.exports=o=function(){function d(){var a;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new g,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=a=(0,y.default)(this.defaultParams)}return Object.defineProperty(d.prototype,"parameterNames",{get:function(){return new p((0,_.default)(this.defaultParams))}}),d.prototype.getParameter=function(a){return this.params.hasOwnProperty(a)?this.params[a]:null},d.prototype.canSetParameter=function(a,n){return!0},d.prototype.setParameter=function(a,n){return n!=null?this.params[a]=n:delete this.params[a]},d}()}).call(void 0)},{"./XMLDOMErrorHandler":259,"./XMLDOMStringList":261,"babel-runtime/core-js/object/create":55,"babel-runtime/core-js/object/keys":60}],259:[function(U,X,x){"use strict";(function(){var I;X.exports=I=function(){function _(){}return _.prototype.handleError=function(O){throw new Error(O)},_}()}).call(void 0)},{}],260:[function(U,X,x){"use strict";(function(){var I;X.exports=I=function(){function _(){}return _.prototype.hasFeature=function(O,y){return!0},_.prototype.createDocumentType=function(O,y,v){throw new Error("This DOM method is not implemented.")},_.prototype.createDocument=function(O,y,v){throw new Error("This DOM method is not implemented.")},_.prototype.createHTMLDocument=function(O){throw new Error("This DOM method is not implemented.")},_.prototype.getFeature=function(O,y){throw new Error("This DOM method is not implemented.")},_}()}).call(void 0)},{}],261:[function(U,X,x){"use strict";(function(){var I;X.exports=I=function(){function _(O){this.arr=O||[]}return Object.defineProperty(_.prototype,"length",{get:function(){return this.arr.length}}),_.prototype.item=function(O){return this.arr[O]||null},_.prototype.contains=function(O){return this.arr.indexOf(O)!==-1},_}()}).call(void 0)},{}],262:[function(U,X,x){"use strict";(function(){var I,_,O,y=function(g,p){for(var d in p)v.call(p,d)&&(g[d]=p[d]);function a(){this.constructor=g}return a.prototype=p.prototype,g.prototype=new a,g.__super__=p.prototype,g},v={}.hasOwnProperty;O=U("./XMLNode"),I=U("./NodeType"),X.exports=_=function(o){y(g,o);function g(p,d,a,n,s,t){if(g.__super__.constructor.call(this,p),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(a==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(d));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(d));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(d));if(s.indexOf("#")!==0&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(d));if(t&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(d));this.elementName=this.stringify.name(d),this.type=I.AttributeDeclaration,this.attributeName=this.stringify.name(a),this.attributeType=this.stringify.dtdAttType(n),t&&(this.defaultValue=this.stringify.dtdAttDefault(t)),this.defaultValueType=s}return g.prototype.toString=function(p){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(p))},g}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],263:[function(U,X,x){"use strict";(function(){var I,_,O,y=function(g,p){for(var d in p)v.call(p,d)&&(g[d]=p[d]);function a(){this.constructor=g}return a.prototype=p.prototype,g.prototype=new a,g.__super__=p.prototype,g},v={}.hasOwnProperty;O=U("./XMLNode"),I=U("./NodeType"),X.exports=_=function(o){y(g,o);function g(p,d,a){if(g.__super__.constructor.call(this,p),d==null)throw new Error("Missing DTD element name. "+this.debugInfo());a||(a="(#PCDATA)"),Array.isArray(a)&&(a="("+a.join(",")+")"),this.name=this.stringify.name(d),this.type=I.ElementDeclaration,this.value=this.stringify.dtdElementValue(a)}return g.prototype.toString=function(p){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(p))},g}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],264:[function(U,X,x){"use strict";(function(){var I,_,O,y,v=function(p,d){for(var a in d)o.call(d,a)&&(p[a]=d[a]);function n(){this.constructor=p}return n.prototype=d.prototype,p.prototype=new n,p.__super__=d.prototype,p},o={}.hasOwnProperty;y=U("./Utility").isObject,O=U("./XMLNode"),I=U("./NodeType"),X.exports=_=function(g){v(p,g);function p(d,a,n,s){if(p.__super__.constructor.call(this,d),n==null)throw new Error("Missing DTD entity name. "+this.debugInfo(n));if(s==null)throw new Error("Missing DTD entity value. "+this.debugInfo(n));if(this.pe=!!a,this.name=this.stringify.name(n),this.type=I.EntityDeclaration,!y(s))this.value=this.stringify.dtdEntityValue(s),this.internal=!0;else{if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(n));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(n));if(this.internal=!1,s.pubID!=null&&(this.pubID=this.stringify.dtdPubID(s.pubID)),s.sysID!=null&&(this.sysID=this.stringify.dtdSysID(s.sysID)),s.nData!=null&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(n))}}return Object.defineProperty(p.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(p.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(p.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(p.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(p.prototype,"xmlVersion",{get:function(){return null}}),p.prototype.toString=function(d){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(d))},p}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],265:[function(U,X,x){"use strict";(function(){var I,_,O,y=function(g,p){for(var d in p)v.call(p,d)&&(g[d]=p[d]);function a(){this.constructor=g}return a.prototype=p.prototype,g.prototype=new a,g.__super__=p.prototype,g},v={}.hasOwnProperty;O=U("./XMLNode"),I=U("./NodeType"),X.exports=_=function(o){y(g,o);function g(p,d,a){if(g.__super__.constructor.call(this,p),d==null)throw new Error("Missing DTD notation name. "+this.debugInfo(d));if(!a.pubID&&!a.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(d));this.name=this.stringify.name(d),this.type=I.NotationDeclaration,a.pubID!=null&&(this.pubID=this.stringify.dtdPubID(a.pubID)),a.sysID!=null&&(this.sysID=this.stringify.dtdSysID(a.sysID))}return Object.defineProperty(g.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(g.prototype,"systemId",{get:function(){return this.sysID}}),g.prototype.toString=function(p){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(p))},g}(O)}).call(void 0)},{"./NodeType":251,"./XMLNode":273}],266:[function(U,X,x){"use strict";(function(){var I,_,O,y,v=function(p,d){for(var a in d)o.call(d,a)&&(p[a]=d[a]);function n(){this.constructor=p}return n.prototype=d.prototype,p.prototype=new n,p.__super__=d.prototype,p},o={}.hasOwnProperty;y=U("./Utility").isObject,O=U("./XMLNode"),I=U("./NodeType"),X.exports=_=function(g){v(p,g);function p(d,a,n,s){var t;p.__super__.constructor.call(this,d),y(a)&&(t=a,a=t.version,n=t.encoding,s=t.standalone),a||(a="1.0"),this.type=I.Declaration,this.version=this.stringify.xmlVersion(a),n!=null&&(this.encoding=this.stringify.xmlEncoding(n)),s!=null&&(this.standalone=this.stringify.xmlStandalone(s))}return p.prototype.toString=function(d){return this.options.writer.declaration(this,this.options.writer.filterOptions(d))},p}(O)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLNode":273}],267:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d,a=function(t,i){for(var e in i)n.call(i,e)&&(t[e]=i[e]);function r(){this.constructor=t}return r.prototype=i.prototype,t.prototype=new r,t.__super__=i.prototype,t},n={}.hasOwnProperty;d=U("./Utility").isObject,p=U("./XMLNode"),I=U("./NodeType"),_=U("./XMLDTDAttList"),y=U("./XMLDTDEntity"),O=U("./XMLDTDElement"),v=U("./XMLDTDNotation"),g=U("./XMLNamedNodeMap"),X.exports=o=function(s){a(t,s);function t(i,e,r){var c,u,f,m,l,E;if(t.__super__.constructor.call(this,i),this.type=I.DocType,i.children){for(m=i.children,u=0,f=m.length;u<f;u++)if(c=m[u],c.type===I.Element){this.name=c.name;break}}this.documentObject=i,d(e)&&(l=e,e=l.pubID,r=l.sysID),r==null&&(E=[e,r],r=E[0],e=E[1]),e!=null&&(this.pubID=this.stringify.dtdPubID(e)),r!=null&&(this.sysID=this.stringify.dtdSysID(r))}return Object.defineProperty(t.prototype,"entities",{get:function(){var e,r,c,u,f;for(u={},f=this.children,r=0,c=f.length;r<c;r++)e=f[r],e.type===I.EntityDeclaration&&!e.pe&&(u[e.name]=e);return new g(u)}}),Object.defineProperty(t.prototype,"notations",{get:function(){var e,r,c,u,f;for(u={},f=this.children,r=0,c=f.length;r<c;r++)e=f[r],e.type===I.NotationDeclaration&&(u[e.name]=e);return new g(u)}}),Object.defineProperty(t.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(t.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(t.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),t.prototype.element=function(i,e){var r;return r=new O(this,i,e),this.children.push(r),this},t.prototype.attList=function(i,e,r,c,u){var f;return f=new _(this,i,e,r,c,u),this.children.push(f),this},t.prototype.entity=function(i,e){var r;return r=new y(this,!1,i,e),this.children.push(r),this},t.prototype.pEntity=function(i,e){var r;return r=new y(this,!0,i,e),this.children.push(r),this},t.prototype.notation=function(i,e){var r;return r=new v(this,i,e),this.children.push(r),this},t.prototype.toString=function(i){return this.options.writer.docType(this,this.options.writer.filterOptions(i))},t.prototype.ele=function(i,e){return this.element(i,e)},t.prototype.att=function(i,e,r,c,u){return this.attList(i,e,r,c,u)},t.prototype.ent=function(i,e){return this.entity(i,e)},t.prototype.pent=function(i,e){return this.pEntity(i,e)},t.prototype.not=function(i,e){return this.notation(i,e)},t.prototype.up=function(){return this.root()||this.documentObject},t.prototype.isEqualNode=function(i){return t.__super__.isEqualNode.apply(this,arguments).isEqualNode(i)?i.name!==this.name||i.publicId!==this.publicId?!1:!(i.systemId!==this.systemId):!1},t}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLNamedNodeMap":272,"./XMLNode":273}],268:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d=function(s,t){for(var i in t)a.call(t,i)&&(s[i]=t[i]);function e(){this.constructor=s}return e.prototype=t.prototype,s.prototype=new e,s.__super__=t.prototype,s},a={}.hasOwnProperty;p=U("./Utility").isPlainObject,O=U("./XMLDOMImplementation"),_=U("./XMLDOMConfiguration"),v=U("./XMLNode"),I=U("./NodeType"),g=U("./XMLStringifier"),o=U("./XMLStringWriter"),X.exports=y=function(n){d(s,n);function s(t){s.__super__.constructor.call(this,null),this.name="#document",this.type=I.Document,this.documentURI=null,this.domConfig=new _,t||(t={}),t.writer||(t.writer=new o),this.options=t,this.stringify=new g(t)}return Object.defineProperty(s.prototype,"implementation",{value:new O}),Object.defineProperty(s.prototype,"doctype",{get:function(){var i,e,r,c;for(c=this.children,e=0,r=c.length;e<r;e++)if(i=c[e],i.type===I.DocType)return i;return null}}),Object.defineProperty(s.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(s.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(s.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(s.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].encoding:null}}),Object.defineProperty(s.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(s.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===I.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(s.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(s.prototype,"origin",{get:function(){return null}}),Object.defineProperty(s.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(s.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(s.prototype,"contentType",{get:function(){return null}}),s.prototype.end=function(t){var i;return i={},t?p(t)&&(i=t,t=this.options.writer):t=this.options.writer,t.document(this,t.filterOptions(i))},s.prototype.toString=function(t){return this.options.writer.document(this,this.options.writer.filterOptions(t))},s.prototype.createElement=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createDocumentFragment=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createTextNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createComment=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createCDATASection=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createProcessingInstruction=function(t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createAttribute=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createEntityReference=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.importNode=function(t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createElementNS=function(t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createAttributeNS=function(t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByTagNameNS=function(t,i){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementById=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.adoptNode=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.normalizeDocument=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.renameNode=function(t,i,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.getElementsByClassName=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createEvent=function(t){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createRange=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createNodeIterator=function(t,i,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},s.prototype.createTreeWalker=function(t,i,e){throw new Error("This DOM method is not implemented."+this.debugInfo())},s}(v)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLDOMConfiguration":258,"./XMLDOMImplementation":260,"./XMLNode":273,"./XMLStringWriter":278,"./XMLStringifier":279}],269:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d,a,n,s,t,i,e,r,c,u,f,m,l,E,b,D,C={}.hasOwnProperty;D=U("./Utility"),E=D.isObject,l=D.isFunction,b=D.isPlainObject,m=D.getValue,I=U("./NodeType"),s=U("./XMLDocument"),i=U("./XMLElement"),y=U("./XMLCData"),v=U("./XMLComment"),r=U("./XMLRaw"),f=U("./XMLText"),e=U("./XMLProcessingInstruction"),a=U("./XMLDeclaration"),n=U("./XMLDocType"),o=U("./XMLDTDAttList"),p=U("./XMLDTDEntity"),g=U("./XMLDTDElement"),d=U("./XMLDTDNotation"),O=U("./XMLAttribute"),u=U("./XMLStringifier"),c=U("./XMLStringWriter"),_=U("./WriterState"),X.exports=t=function(){function w(S,A,R){var k;this.name="?xml",this.type=I.Document,S||(S={}),k={},S.writer?b(S.writer)&&(k=S.writer,S.writer=new c):S.writer=new c,this.options=S,this.writer=S.writer,this.writerOptions=this.writer.filterOptions(k),this.stringify=new u(S),this.onDataCallback=A||function(){},this.onEndCallback=R||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return w.prototype.createChildNode=function(S){var A,R,k,L,M,G,W,N;switch(S.type){case I.CData:this.cdata(S.value);break;case I.Comment:this.comment(S.value);break;case I.Element:k={},W=S.attribs;for(R in W){if(!C.call(W,R))continue;A=W[R],k[R]=A.value}this.node(S.name,k);break;case I.Dummy:this.dummy();break;case I.Raw:this.raw(S.value);break;case I.Text:this.text(S.value);break;case I.ProcessingInstruction:this.instruction(S.target,S.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+S.constructor.name)}for(N=S.children,M=0,G=N.length;M<G;M++)L=N[M],this.createChildNode(L),L.type===I.Element&&this.up();return this},w.prototype.dummy=function(){return this},w.prototype.node=function(S,A,R){var k;if(S==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(S));return this.openCurrent(),S=m(S),A==null&&(A={}),A=m(A),E(A)||(k=[A,R],R=k[0],A=k[1]),this.currentNode=new i(this,S,A),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,R!=null&&this.text(R),this},w.prototype.element=function(S,A,R){var k,L,M,G,W,N;if(this.currentNode&&this.currentNode.type===I.DocType)this.dtdElement.apply(this,arguments);else if(Array.isArray(S)||E(S)||l(S))for(G=this.options.noValidation,this.options.noValidation=!0,N=new s(this.options).element("TEMP_ROOT"),N.element(S),this.options.noValidation=G,W=N.children,L=0,M=W.length;L<M;L++)k=W[L],this.createChildNode(k),k.type===I.Element&&this.up();else this.node(S,A,R);return this},w.prototype.attribute=function(S,A){var R,k;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(S));if(S!=null&&(S=m(S)),E(S))for(R in S){if(!C.call(S,R))continue;k=S[R],this.attribute(R,k)}else l(A)&&(A=A.apply()),this.options.keepNullAttributes&&A==null?this.currentNode.attribs[S]=new O(this,S,""):A!=null&&(this.currentNode.attribs[S]=new O(this,S,A));return this},w.prototype.text=function(S){var A;return this.openCurrent(),A=new f(this,S),this.onData(this.writer.text(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.cdata=function(S){var A;return this.openCurrent(),A=new y(this,S),this.onData(this.writer.cdata(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.comment=function(S){var A;return this.openCurrent(),A=new v(this,S),this.onData(this.writer.comment(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.raw=function(S){var A;return this.openCurrent(),A=new r(this,S),this.onData(this.writer.raw(A,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.instruction=function(S,A){var R,k,L,M,G;if(this.openCurrent(),S!=null&&(S=m(S)),A!=null&&(A=m(A)),Array.isArray(S))for(R=0,M=S.length;R<M;R++)k=S[R],this.instruction(k);else if(E(S))for(k in S){if(!C.call(S,k))continue;L=S[k],this.instruction(k,L)}else l(A)&&(A=A.apply()),G=new e(this,S,A),this.onData(this.writer.processingInstruction(G,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this},w.prototype.declaration=function(S,A,R){var k;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return k=new a(this,S,A,R),this.onData(this.writer.declaration(k,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.doctype=function(S,A,R){if(this.openCurrent(),S==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new n(this,A,R),this.currentNode.rootNodeName=S,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},w.prototype.dtdElement=function(S,A){var R;return this.openCurrent(),R=new g(this,S,A),this.onData(this.writer.dtdElement(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.attList=function(S,A,R,k,L){var M;return this.openCurrent(),M=new o(this,S,A,R,k,L),this.onData(this.writer.dtdAttList(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.entity=function(S,A){var R;return this.openCurrent(),R=new p(this,!1,S,A),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.pEntity=function(S,A){var R;return this.openCurrent(),R=new p(this,!0,S,A),this.onData(this.writer.dtdEntity(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.prototype.notation=function(S,A){var R;return this.openCurrent(),R=new d(this,S,A),this.onData(this.writer.dtdNotation(R,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this},w.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},w.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},w.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},w.prototype.openNode=function(S){var A,R,k,L;if(!S.isOpen){if(!this.root&&this.currentLevel===0&&S.type===I.Element&&(this.root=S),R="",S.type===I.Element){this.writerOptions.state=_.OpenTag,R=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<"+S.name,L=S.attribs;for(k in L){if(!C.call(L,k))continue;A=L[k],R+=this.writer.attribute(A,this.writerOptions,this.currentLevel)}R+=(S.children?">":"/>")+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=_.InsideTag}else this.writerOptions.state=_.OpenTag,R=this.writer.indent(S,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+S.rootNodeName,S.pubID&&S.sysID?R+=' PUBLIC "'+S.pubID+'" "'+S.sysID+'"':S.sysID&&(R+=' SYSTEM "'+S.sysID+'"'),S.children?(R+=" [",this.writerOptions.state=_.InsideTag):(this.writerOptions.state=_.CloseTag,R+=">"),R+=this.writer.endline(S,this.writerOptions,this.currentLevel);return this.onData(R,this.currentLevel),S.isOpen=!0}},w.prototype.closeNode=function(S){var A;if(!S.isClosed)return A="",this.writerOptions.state=_.CloseTag,S.type===I.Element?A=this.writer.indent(S,this.writerOptions,this.currentLevel)+"</"+S.name+">"+this.writer.endline(S,this.writerOptions,this.currentLevel):A=this.writer.indent(S,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(S,this.writerOptions,this.currentLevel),this.writerOptions.state=_.None,this.onData(A,this.currentLevel),S.isClosed=!0},w.prototype.onData=function(S,A){return this.documentStarted=!0,this.onDataCallback(S,A+1)},w.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},w.prototype.debugInfo=function(S){return S==null?"":"node: <"+S+">"},w.prototype.ele=function(){return this.element.apply(this,arguments)},w.prototype.nod=function(S,A,R){return this.node(S,A,R)},w.prototype.txt=function(S){return this.text(S)},w.prototype.dat=function(S){return this.cdata(S)},w.prototype.com=function(S){return this.comment(S)},w.prototype.ins=function(S,A){return this.instruction(S,A)},w.prototype.dec=function(S,A,R){return this.declaration(S,A,R)},w.prototype.dtd=function(S,A,R){return this.doctype(S,A,R)},w.prototype.e=function(S,A,R){return this.element(S,A,R)},w.prototype.n=function(S,A,R){return this.node(S,A,R)},w.prototype.t=function(S){return this.text(S)},w.prototype.d=function(S){return this.cdata(S)},w.prototype.c=function(S){return this.comment(S)},w.prototype.r=function(S){return this.raw(S)},w.prototype.i=function(S,A){return this.instruction(S,A)},w.prototype.att=function(){return this.currentNode&&this.currentNode.type===I.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},w.prototype.a=function(){return this.currentNode&&this.currentNode.type===I.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},w.prototype.ent=function(S,A){return this.entity(S,A)},w.prototype.pent=function(S,A){return this.pEntity(S,A)},w.prototype.not=function(S,A){return this.notation(S,A)},w}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLAttribute":254,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDocument":268,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLStringWriter":278,"./XMLStringifier":279,"./XMLText":280}],270:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;o=U("./XMLNode"),y=U("./NodeType"),X.exports=v=function(d){g(a,d);function a(n){a.__super__.constructor.call(this,n),this.type=y.Dummy}return a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return""},a}(o)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],271:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g,p,d,a,n,s,t=function(r,c){for(var u in c)i.call(c,u)&&(r[u]=c[u]);function f(){this.constructor=r}return f.prototype=c.prototype,r.prototype=new f,r.__super__=c.prototype,r},i={}.hasOwnProperty;s=U("./Utility"),n=s.isObject,a=s.isFunction,d=s.getValue,p=U("./XMLNode"),y=U("./NodeType"),v=U("./XMLAttribute"),g=U("./XMLNamedNodeMap"),X.exports=o=function(e){t(r,e);function r(c,u,f){var m,l,E,b;if(r.__super__.constructor.call(this,c),u==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(u),this.type=y.Element,this.attribs={},this.schemaTypeInfo=null,f!=null&&this.attribute(f),c.type===y.Document&&(this.isRoot=!0,this.documentObject=c,c.rootObject=this,c.children)){for(b=c.children,l=0,E=b.length;l<E;l++)if(m=b[l],m.type===y.DocType){m.name=this.name;break}}}return Object.defineProperty(r.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(r.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(r.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(r.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(r.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(r.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(r.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(r.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new g(this.attribs)),this.attributeMap}}),r.prototype.clone=function(){var c,u,f,m;f=(0,_.default)(this),f.isRoot&&(f.documentObject=null),f.attribs={},m=this.attribs;for(u in m){if(!i.call(m,u))continue;c=m[u],f.attribs[u]=c.clone()}return f.children=[],this.children.forEach(function(l){var E;return E=l.clone(),E.parent=f,f.children.push(E)}),f},r.prototype.attribute=function(c,u){var f,m;if(c!=null&&(c=d(c)),n(c))for(f in c){if(!i.call(c,f))continue;m=c[f],this.attribute(f,m)}else a(u)&&(u=u.apply()),this.options.keepNullAttributes&&u==null?this.attribs[c]=new v(this,c,""):u!=null&&(this.attribs[c]=new v(this,c,u));return this},r.prototype.removeAttribute=function(c){var u,f,m;if(c==null)throw new Error("Missing attribute name. "+this.debugInfo());if(c=d(c),Array.isArray(c))for(f=0,m=c.length;f<m;f++)u=c[f],delete this.attribs[u];else delete this.attribs[c];return this},r.prototype.toString=function(c){return this.options.writer.element(this,this.options.writer.filterOptions(c))},r.prototype.att=function(c,u){return this.attribute(c,u)},r.prototype.a=function(c,u){return this.attribute(c,u)},r.prototype.getAttribute=function(c){return this.attribs.hasOwnProperty(c)?this.attribs[c].value:null},r.prototype.setAttribute=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getAttributeNode=function(c){return this.attribs.hasOwnProperty(c)?this.attribs[c]:null},r.prototype.setAttributeNode=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.removeAttributeNode=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getElementsByTagName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getAttributeNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.setAttributeNS=function(c,u,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.removeAttributeNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getAttributeNodeNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.setAttributeNodeNS=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getElementsByTagNameNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.hasAttribute=function(c){return this.attribs.hasOwnProperty(c)},r.prototype.hasAttributeNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.setIdAttribute=function(c,u){return this.attribs.hasOwnProperty(c)?this.attribs[c].isId:u},r.prototype.setIdAttributeNS=function(c,u,f){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.setIdAttributeNode=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getElementsByTagName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getElementsByTagNameNS=function(c,u){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.getElementsByClassName=function(c){throw new Error("This DOM method is not implemented."+this.debugInfo())},r.prototype.isEqualNode=function(c){var u,f,m;if(!r.__super__.isEqualNode.apply(this,arguments).isEqualNode(c))return!1;if(c.namespaceURI!==this.namespaceURI)return!1;if(c.prefix!==this.prefix)return!1;if(c.localName!==this.localName)return!1;if(c.attribs.length!==this.attribs.length)return!1;for(u=f=0,m=this.attribs.length-1;0<=m?f<=m:f>=m;u=0<=m?++f:--f)if(!this.attribs[u].isEqualNode(c.attribs[u]))return!1;return!0},r}(p)}).call(void 0)},{"./NodeType":251,"./Utility":252,"./XMLAttribute":254,"./XMLNamedNodeMap":272,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],272:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/keys"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y;X.exports=y=function(){function v(o){this.nodes=o}return Object.defineProperty(v.prototype,"length",{get:function(){return(0,_.default)(this.nodes).length||0}}),v.prototype.clone=function(){return this.nodes=null},v.prototype.getNamedItem=function(o){return this.nodes[o]},v.prototype.setNamedItem=function(o){var g;return g=this.nodes[o.nodeName],this.nodes[o.nodeName]=o,g||null},v.prototype.removeNamedItem=function(o){var g;return g=this.nodes[o],delete this.nodes[o],g||null},v.prototype.item=function(o){return this.nodes[(0,_.default)(this.nodes)[o]]||null},v.prototype.getNamedItemNS=function(o,g){throw new Error("This DOM method is not implemented.")},v.prototype.setNamedItemNS=function(o){throw new Error("This DOM method is not implemented.")},v.prototype.removeNamedItemNS=function(o,g){throw new Error("This DOM method is not implemented.")},v}()}).call(void 0)},{"babel-runtime/core-js/object/keys":60}],273:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d,a,n,s,t,i,e,r,c,u,f,m={}.hasOwnProperty;f=U("./Utility"),u=f.isObject,c=f.isFunction,r=f.isEmpty,e=f.getValue,p=null,O=null,y=null,v=null,o=null,t=null,i=null,s=null,g=null,_=null,n=null,d=null,I=null,X.exports=a=function(){function l(E){this.parent=E,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,p||(p=U("./XMLElement"),O=U("./XMLCData"),y=U("./XMLComment"),v=U("./XMLDeclaration"),o=U("./XMLDocType"),t=U("./XMLRaw"),i=U("./XMLText"),s=U("./XMLProcessingInstruction"),g=U("./XMLDummy"),_=U("./NodeType"),n=U("./XMLNodeList"),d=U("./XMLNamedNodeMap"),I=U("./DocumentPosition"))}return Object.defineProperty(l.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(l.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(l.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(l.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(l.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new n(this.children)),this.childNodeList}}),Object.defineProperty(l.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(l.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(l.prototype,"previousSibling",{get:function(){var b;return b=this.parent.children.indexOf(this),this.parent.children[b-1]||null}}),Object.defineProperty(l.prototype,"nextSibling",{get:function(){var b;return b=this.parent.children.indexOf(this),this.parent.children[b+1]||null}}),Object.defineProperty(l.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(l.prototype,"textContent",{get:function(){var b,D,C,w,S;if(this.nodeType===_.Element||this.nodeType===_.DocumentFragment){for(S="",w=this.children,D=0,C=w.length;D<C;D++)b=w[D],b.textContent&&(S+=b.textContent);return S}else return null},set:function(b){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),l.prototype.setParent=function(E){var b,D,C,w,S;for(this.parent=E,E&&(this.options=E.options,this.stringify=E.stringify),w=this.children,S=[],D=0,C=w.length;D<C;D++)b=w[D],S.push(b.setParent(this));return S},l.prototype.element=function(E,b,D){var C,w,S,A,R,k,L,M,G,W,N;if(k=null,b===null&&D==null&&(G=[{},null],b=G[0],D=G[1]),b==null&&(b={}),b=e(b),u(b)||(W=[b,D],D=W[0],b=W[1]),E!=null&&(E=e(E)),Array.isArray(E))for(S=0,L=E.length;S<L;S++)w=E[S],k=this.element(w);else if(c(E))k=this.element(E.apply());else if(u(E))for(R in E){if(!m.call(E,R))continue;if(N=E[R],c(N)&&(N=N.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&R.indexOf(this.stringify.convertAttKey)===0)k=this.attribute(R.substr(this.stringify.convertAttKey.length),N);else if(!this.options.separateArrayItems&&Array.isArray(N)&&r(N))k=this.dummy();else if(u(N)&&r(N))k=this.element(R);else if(!this.options.keepNullNodes&&N==null)k=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(N))for(A=0,M=N.length;A<M;A++)w=N[A],C={},C[R]=w,k=this.element(C);else u(N)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&R.indexOf(this.stringify.convertTextKey)===0?k=this.element(N):(k=this.element(R),k.element(N)):k=this.element(R,N)}else!this.options.keepNullNodes&&D===null?k=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&E.indexOf(this.stringify.convertTextKey)===0?k=this.text(D):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&E.indexOf(this.stringify.convertCDataKey)===0?k=this.cdata(D):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&E.indexOf(this.stringify.convertCommentKey)===0?k=this.comment(D):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&E.indexOf(this.stringify.convertRawKey)===0?k=this.raw(D):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&E.indexOf(this.stringify.convertPIKey)===0?k=this.instruction(E.substr(this.stringify.convertPIKey.length),D):k=this.node(E,b,D);if(k==null)throw new Error("Could not create any elements with: "+E+". "+this.debugInfo());return k},l.prototype.insertBefore=function(E,b,D){var C,w,S,A,R;if(E!=null?E.type:void 0)return S=E,A=b,S.setParent(this),A?(w=children.indexOf(A),R=children.splice(w),children.push(S),Array.prototype.push.apply(children,R)):children.push(S),S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return w=this.parent.children.indexOf(this),R=this.parent.children.splice(w),C=this.parent.element(E,b,D),Array.prototype.push.apply(this.parent.children,R),C},l.prototype.insertAfter=function(E,b,D){var C,w,S;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(E));return w=this.parent.children.indexOf(this),S=this.parent.children.splice(w+1),C=this.parent.element(E,b,D),Array.prototype.push.apply(this.parent.children,S),C},l.prototype.remove=function(){var E,b;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return E=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[E,E-E+1].concat(b=[])),this.parent},l.prototype.node=function(E,b,D){var C,w;return E!=null&&(E=e(E)),b||(b={}),b=e(b),u(b)||(w=[b,D],D=w[0],b=w[1]),C=new p(this,E,b),D!=null&&C.text(D),this.children.push(C),C},l.prototype.text=function(E){var b;return u(E)&&this.element(E),b=new i(this,E),this.children.push(b),this},l.prototype.cdata=function(E){var b;return b=new O(this,E),this.children.push(b),this},l.prototype.comment=function(E){var b;return b=new y(this,E),this.children.push(b),this},l.prototype.commentBefore=function(E){var b,D,C;return D=this.parent.children.indexOf(this),C=this.parent.children.splice(D),b=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,C),this},l.prototype.commentAfter=function(E){var b,D,C;return D=this.parent.children.indexOf(this),C=this.parent.children.splice(D+1),b=this.parent.comment(E),Array.prototype.push.apply(this.parent.children,C),this},l.prototype.raw=function(E){var b;return b=new t(this,E),this.children.push(b),this},l.prototype.dummy=function(){var E;return E=new g(this),E},l.prototype.instruction=function(E,b){var D,C,w,S,A;if(E!=null&&(E=e(E)),b!=null&&(b=e(b)),Array.isArray(E))for(S=0,A=E.length;S<A;S++)D=E[S],this.instruction(D);else if(u(E))for(D in E){if(!m.call(E,D))continue;C=E[D],this.instruction(D,C)}else c(b)&&(b=b.apply()),w=new s(this,E,b),this.children.push(w);return this},l.prototype.instructionBefore=function(E,b){var D,C,w;return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C),D=this.parent.instruction(E,b),Array.prototype.push.apply(this.parent.children,w),this},l.prototype.instructionAfter=function(E,b){var D,C,w;return C=this.parent.children.indexOf(this),w=this.parent.children.splice(C+1),D=this.parent.instruction(E,b),Array.prototype.push.apply(this.parent.children,w),this},l.prototype.declaration=function(E,b,D){var C,w;return C=this.document(),w=new v(C,E,b,D),C.children.length===0?C.children.unshift(w):C.children[0].type===_.Declaration?C.children[0]=w:C.children.unshift(w),C.root()||C},l.prototype.dtd=function(E,b){var D,C,w,S,A,R,k,L,M,G;for(C=this.document(),w=new o(C,E,b),M=C.children,S=A=0,k=M.length;A<k;S=++A)if(D=M[S],D.type===_.DocType)return C.children[S]=w,w;for(G=C.children,S=R=0,L=G.length;R<L;S=++R)if(D=G[S],D.isRoot)return C.children.splice(S,0,w),w;return C.children.push(w),w},l.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},l.prototype.root=function(){var E;for(E=this;E;){if(E.type===_.Document)return E.rootObject;if(E.isRoot)return E;E=E.parent}},l.prototype.document=function(){var E;for(E=this;E;){if(E.type===_.Document)return E;E=E.parent}},l.prototype.end=function(E){return this.document().end(E)},l.prototype.prev=function(){var E;if(E=this.parent.children.indexOf(this),E<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[E-1]},l.prototype.next=function(){var E;if(E=this.parent.children.indexOf(this),E===-1||E===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[E+1]},l.prototype.importDocument=function(E){var b;return b=E.root().clone(),b.parent=this,b.isRoot=!1,this.children.push(b),this},l.prototype.debugInfo=function(E){var b,D;return E=E||this.name,E==null&&!((b=this.parent)!=null?b.name:void 0)?"":E==null?"parent: <"+this.parent.name+">":((D=this.parent)!=null?D.name:void 0)?"node: <"+E+">, parent: <"+this.parent.name+">":"node: <"+E+">"},l.prototype.ele=function(E,b,D){return this.element(E,b,D)},l.prototype.nod=function(E,b,D){return this.node(E,b,D)},l.prototype.txt=function(E){return this.text(E)},l.prototype.dat=function(E){return this.cdata(E)},l.prototype.com=function(E){return this.comment(E)},l.prototype.ins=function(E,b){return this.instruction(E,b)},l.prototype.doc=function(){return this.document()},l.prototype.dec=function(E,b,D){return this.declaration(E,b,D)},l.prototype.e=function(E,b,D){return this.element(E,b,D)},l.prototype.n=function(E,b,D){return this.node(E,b,D)},l.prototype.t=function(E){return this.text(E)},l.prototype.d=function(E){return this.cdata(E)},l.prototype.c=function(E){return this.comment(E)},l.prototype.r=function(E){return this.raw(E)},l.prototype.i=function(E,b){return this.instruction(E,b)},l.prototype.u=function(){return this.up()},l.prototype.importXMLBuilder=function(E){return this.importDocument(E)},l.prototype.replaceChild=function(E,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.removeChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.appendChild=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.hasChildNodes=function(){return this.children.length!==0},l.prototype.cloneNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isSupported=function(E,b){return!0},l.prototype.hasAttributes=function(){return this.attribs.length!==0},l.prototype.compareDocumentPosition=function(E){var b,D;return b=this,b===E?0:this.document()!==E.document()?(D=I.Disconnected|I.ImplementationSpecific,Math.random()<.5?D|=I.Preceding:D|=I.Following,D):b.isAncestor(E)?I.Contains|I.Preceding:b.isDescendant(E)?I.Contains|I.Following:b.isPreceding(E)?I.Preceding:I.Following},l.prototype.isSameNode=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.lookupPrefix=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isDefaultNamespace=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.lookupNamespaceURI=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.isEqualNode=function(E){var b,D,C;if(E.nodeType!==this.nodeType)return!1;if(E.children.length!==this.children.length)return!1;for(b=D=0,C=this.children.length-1;0<=C?D<=C:D>=C;b=0<=C?++D:--D)if(!this.children[b].isEqualNode(E.children[b]))return!1;return!0},l.prototype.getFeature=function(E,b){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.setUserData=function(E,b,D){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.getUserData=function(E){throw new Error("This DOM method is not implemented."+this.debugInfo())},l.prototype.contains=function(E){return E?E===this||this.isDescendant(E):!1},l.prototype.isDescendant=function(E){var b,D,C,w,S;for(S=this.children,C=0,w=S.length;C<w;C++){if(b=S[C],E===b)return!0;if(D=b.isDescendant(E),D)return!0}return!1},l.prototype.isAncestor=function(E){return E.isDescendant(this)},l.prototype.isPreceding=function(E){var b,D;return b=this.treePosition(E),D=this.treePosition(this),b===-1||D===-1?!1:b<D},l.prototype.isFollowing=function(E){var b,D;return b=this.treePosition(E),D=this.treePosition(this),b===-1||D===-1?!1:b>D},l.prototype.treePosition=function(E){var b,D;return D=0,b=!1,this.foreachTreeNode(this.document(),function(C){if(D++,!b&&C===E)return b=!0}),b?D:-1},l.prototype.foreachTreeNode=function(E,b){var D,C,w,S,A;for(E||(E=this.document()),S=E.children,C=0,w=S.length;C<w;C++){if(D=S[C],A=b(D))return A;if(A=this.foreachTreeNode(D,b),A)return A}},l}()}).call(void 0)},{"./DocumentPosition":250,"./NodeType":251,"./Utility":252,"./XMLCData":255,"./XMLComment":257,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLNamedNodeMap":272,"./XMLNodeList":274,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],274:[function(U,X,x){"use strict";(function(){var I;X.exports=I=function(){function _(O){this.nodes=O}return Object.defineProperty(_.prototype,"length",{get:function(){return this.nodes.length||0}}),_.prototype.clone=function(){return this.nodes=null},_.prototype.item=function(O){return this.nodes[O]||null},_}()}).call(void 0)},{}],275:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;y=U("./NodeType"),v=U("./XMLCharacterData"),X.exports=o=function(d){g(a,d);function a(n,s,t){if(a.__super__.constructor.call(this,n),s==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=y.ProcessingInstruction,this.target=this.stringify.insTarget(s),this.name=this.target,t&&(this.value=this.stringify.insValue(t))}return a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))},a.prototype.isEqualNode=function(n){return a.__super__.isEqualNode.apply(this,arguments).isEqualNode(n)?!(n.target!==this.target):!1},a}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],276:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;y=U("./NodeType"),v=U("./XMLNode"),X.exports=o=function(d){g(a,d);function a(n,s){if(a.__super__.constructor.call(this,n),s==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=y.Raw,this.value=this.stringify.raw(s)}return a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))},a}(v)}).call(void 0)},{"./NodeType":251,"./XMLNode":273,"babel-runtime/core-js/object/create":55}],277:[function(U,X,x){"use strict";(function(){var I,_,O,y,v=function(p,d){for(var a in d)o.call(d,a)&&(p[a]=d[a]);function n(){this.constructor=p}return n.prototype=d.prototype,p.prototype=new n,p.__super__=d.prototype,p},o={}.hasOwnProperty;I=U("./NodeType"),y=U("./XMLWriterBase"),_=U("./WriterState"),X.exports=O=function(g){v(p,g);function p(d,a){this.stream=d,p.__super__.constructor.call(this,a)}return p.prototype.endline=function(d,a,n){return d.isLastRootNode&&a.state===_.CloseTag?"":p.__super__.endline.call(this,d,a,n)},p.prototype.document=function(d,a){var n,s,t,i,e,r,c,u,f;for(c=d.children,s=t=0,e=c.length;t<e;s=++t)n=c[s],n.isLastRootNode=s===d.children.length-1;for(a=this.filterOptions(a),u=d.children,f=[],i=0,r=u.length;i<r;i++)n=u[i],f.push(this.writeChildNode(n,a,0));return f},p.prototype.attribute=function(d,a,n){return this.stream.write(p.__super__.attribute.call(this,d,a,n))},p.prototype.cdata=function(d,a,n){return this.stream.write(p.__super__.cdata.call(this,d,a,n))},p.prototype.comment=function(d,a,n){return this.stream.write(p.__super__.comment.call(this,d,a,n))},p.prototype.declaration=function(d,a,n){return this.stream.write(p.__super__.declaration.call(this,d,a,n))},p.prototype.docType=function(d,a,n){var s,t,i,e;if(n||(n=0),this.openNode(d,a,n),a.state=_.OpenTag,this.stream.write(this.indent(d,a,n)),this.stream.write("<!DOCTYPE "+d.root().name),d.pubID&&d.sysID?this.stream.write(' PUBLIC "'+d.pubID+'" "'+d.sysID+'"'):d.sysID&&this.stream.write(' SYSTEM "'+d.sysID+'"'),d.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(d,a,n)),a.state=_.InsideTag,e=d.children,t=0,i=e.length;t<i;t++)s=e[t],this.writeChildNode(s,a,n+1);a.state=_.CloseTag,this.stream.write("]")}return a.state=_.CloseTag,this.stream.write(a.spaceBeforeSlash+">"),this.stream.write(this.endline(d,a,n)),a.state=_.None,this.closeNode(d,a,n)},p.prototype.element=function(d,a,n){var s,t,i,e,r,c,u,f,m,l;n||(n=0),this.openNode(d,a,n),a.state=_.OpenTag,this.stream.write(this.indent(d,a,n)+"<"+d.name),m=d.attribs;for(u in m){if(!o.call(m,u))continue;s=m[u],this.attribute(s,a,n)}if(i=d.children.length,e=i===0?null:d.children[0],i===0||d.children.every(function(E){return(E.type===I.Text||E.type===I.Raw)&&E.value===""}))a.allowEmpty?(this.stream.write(">"),a.state=_.CloseTag,this.stream.write("</"+d.name+">")):(a.state=_.CloseTag,this.stream.write(a.spaceBeforeSlash+"/>"));else if(a.pretty&&i===1&&(e.type===I.Text||e.type===I.Raw)&&e.value!=null)this.stream.write(">"),a.state=_.InsideTag,a.suppressPrettyCount++,f=!0,this.writeChildNode(e,a,n+1),a.suppressPrettyCount--,f=!1,a.state=_.CloseTag,this.stream.write("</"+d.name+">");else{for(this.stream.write(">"+this.endline(d,a,n)),a.state=_.InsideTag,l=d.children,r=0,c=l.length;r<c;r++)t=l[r],this.writeChildNode(t,a,n+1);a.state=_.CloseTag,this.stream.write(this.indent(d,a,n)+"</"+d.name+">")}return this.stream.write(this.endline(d,a,n)),a.state=_.None,this.closeNode(d,a,n)},p.prototype.processingInstruction=function(d,a,n){return this.stream.write(p.__super__.processingInstruction.call(this,d,a,n))},p.prototype.raw=function(d,a,n){return this.stream.write(p.__super__.raw.call(this,d,a,n))},p.prototype.text=function(d,a,n){return this.stream.write(p.__super__.text.call(this,d,a,n))},p.prototype.dtdAttList=function(d,a,n){return this.stream.write(p.__super__.dtdAttList.call(this,d,a,n))},p.prototype.dtdElement=function(d,a,n){return this.stream.write(p.__super__.dtdElement.call(this,d,a,n))},p.prototype.dtdEntity=function(d,a,n){return this.stream.write(p.__super__.dtdEntity.call(this,d,a,n))},p.prototype.dtdNotation=function(d,a,n){return this.stream.write(p.__super__.dtdNotation.call(this,d,a,n))},p}(y)}).call(void 0)},{"./NodeType":251,"./WriterState":253,"./XMLWriterBase":281}],278:[function(U,X,x){"use strict";(function(){var I,_,O=function(o,g){for(var p in g)y.call(g,p)&&(o[p]=g[p]);function d(){this.constructor=o}return d.prototype=g.prototype,o.prototype=new d,o.__super__=g.prototype,o},y={}.hasOwnProperty;_=U("./XMLWriterBase"),X.exports=I=function(v){O(o,v);function o(g){o.__super__.constructor.call(this,g)}return o.prototype.document=function(g,p){var d,a,n,s,t;for(p=this.filterOptions(p),s="",t=g.children,a=0,n=t.length;a<n;a++)d=t[a],s+=this.writeChildNode(d,p,0);return p.pretty&&s.slice(-p.newline.length)===p.newline&&(s=s.slice(0,-p.newline.length)),s},o}(_)}).call(void 0)},{"./XMLWriterBase":281}],279:[function(U,X,x){"use strict";(function(){var I,_=function(v,o){return function(){return v.apply(o,arguments)}},O={}.hasOwnProperty;X.exports=I=function(){function y(v){this.assertLegalName=_(this.assertLegalName,this),this.assertLegalChar=_(this.assertLegalChar,this);var o,g,p;v||(v={}),this.options=v,this.options.version||(this.options.version="1.0"),g=v.stringify||{};for(o in g){if(!O.call(g,o))continue;p=g[o],this[o]=p}}return y.prototype.name=function(v){return this.options.noValidation?v:this.assertLegalName(""+v||"")},y.prototype.text=function(v){return this.options.noValidation?v:this.assertLegalChar(this.textEscape(""+v||""))},y.prototype.cdata=function(v){return this.options.noValidation?v:(v=""+v||"",v=v.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(v))},y.prototype.comment=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+v);return this.assertLegalChar(v)},y.prototype.raw=function(v){return this.options.noValidation?v:""+v||""},y.prototype.attValue=function(v){return this.options.noValidation?v:this.assertLegalChar(this.attEscape(v=""+v||""))},y.prototype.insTarget=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.insValue=function(v){if(this.options.noValidation)return v;if(v=""+v||"",v.match(/\?>/))throw new Error("Invalid processing instruction value: "+v);return this.assertLegalChar(v)},y.prototype.xmlVersion=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+v);return v},y.prototype.xmlEncoding=function(v){if(this.options.noValidation)return v;if(v=""+v||"",!v.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+v);return this.assertLegalChar(v)},y.prototype.xmlStandalone=function(v){return this.options.noValidation?v:v?"yes":"no"},y.prototype.dtdPubID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdSysID=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdElementValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdAttType=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdAttDefault=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdEntityValue=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.dtdNData=function(v){return this.options.noValidation?v:this.assertLegalChar(""+v||"")},y.prototype.convertAttKey="@",y.prototype.convertPIKey="?",y.prototype.convertTextKey="#text",y.prototype.convertCDataKey="#cdata",y.prototype.convertCommentKey="#comment",y.prototype.convertRawKey="#raw",y.prototype.assertLegalChar=function(v){var o,g;if(this.options.noValidation)return v;if(o="",this.options.version==="1.0"){if(o=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=v.match(o))throw new Error("Invalid character in string: "+v+" at index "+g.index)}else if(this.options.version==="1.1"&&(o=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=v.match(o)))throw new Error("Invalid character in string: "+v+" at index "+g.index);return v},y.prototype.assertLegalName=function(v){var o;if(this.options.noValidation)return v;if(this.assertLegalChar(v),o=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!v.match(o))throw new Error("Invalid character in name");return v},y.prototype.textEscape=function(v){var o;return this.options.noValidation?v:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(o,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))},y.prototype.attEscape=function(v){var o;return this.options.noValidation?v:(o=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,v.replace(o,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))},y}()}).call(void 0)},{}],280:[function(U,X,x){"use strict";var I=U("babel-runtime/core-js/object/create"),_=O(I);function O(y){return y&&y.__esModule?y:{default:y}}(function(){var y,v,o,g=function(a,n){for(var s in n)p.call(n,s)&&(a[s]=n[s]);function t(){this.constructor=a}return t.prototype=n.prototype,a.prototype=new t,a.__super__=n.prototype,a},p={}.hasOwnProperty;y=U("./NodeType"),v=U("./XMLCharacterData"),X.exports=o=function(d){g(a,d);function a(n,s){if(a.__super__.constructor.call(this,n),s==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=y.Text,this.value=this.stringify.text(s)}return Object.defineProperty(a.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(a.prototype,"wholeText",{get:function(){var s,t,i;for(i="",t=this.previousSibling;t;)i=t.data+i,t=t.previousSibling;for(i+=this.data,s=this.nextSibling;s;)i=i+s.data,s=s.nextSibling;return i}}),a.prototype.clone=function(){return(0,_.default)(this)},a.prototype.toString=function(n){return this.options.writer.text(this,this.options.writer.filterOptions(n))},a.prototype.splitText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},a.prototype.replaceWholeText=function(n){throw new Error("This DOM method is not implemented."+this.debugInfo())},a}(v)}).call(void 0)},{"./NodeType":251,"./XMLCharacterData":256,"babel-runtime/core-js/object/create":55}],281:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d,a,n,s,t,i,e,r,c,u={}.hasOwnProperty;c=U("./Utility").assign,I=U("./NodeType"),d=U("./XMLDeclaration"),a=U("./XMLDocType"),O=U("./XMLCData"),y=U("./XMLComment"),s=U("./XMLElement"),i=U("./XMLRaw"),e=U("./XMLText"),t=U("./XMLProcessingInstruction"),n=U("./XMLDummy"),v=U("./XMLDTDAttList"),o=U("./XMLDTDElement"),g=U("./XMLDTDEntity"),p=U("./XMLDTDNotation"),_=U("./WriterState"),X.exports=r=function(){function f(m){var l,E,b;m||(m={}),this.options=m,E=m.writer||{};for(l in E){if(!u.call(E,l))continue;b=E[l],this["_"+l]=this[l],this[l]=b}}return f.prototype.filterOptions=function(m){var l,E,b,D,C,w,S,A;return m||(m={}),m=c({},this.options,m),l={writer:this},l.pretty=m.pretty||!1,l.allowEmpty=m.allowEmpty||!1,l.indent=(E=m.indent)!=null?E:" ",l.newline=(b=m.newline)!=null?b:`
|
|
|
`,l.offset=(D=m.offset)!=null?D:0,l.dontPrettyTextNodes=(C=(w=m.dontPrettyTextNodes)!=null?w:m.dontprettytextnodes)!=null?C:0,l.spaceBeforeSlash=(S=(A=m.spaceBeforeSlash)!=null?A:m.spacebeforeslash)!=null?S:"",l.spaceBeforeSlash===!0&&(l.spaceBeforeSlash=" "),l.suppressPrettyCount=0,l.user={},l.state=_.None,l},f.prototype.indent=function(m,l,E){var b;return!l.pretty||l.suppressPrettyCount?"":l.pretty&&(b=(E||0)+l.offset+1,b>0)?new Array(b).join(l.indent):""},f.prototype.endline=function(m,l,E){return!l.pretty||l.suppressPrettyCount?"":l.newline},f.prototype.attribute=function(m,l,E){var b;return this.openAttribute(m,l,E),b=" "+m.name+'="'+m.value+'"',this.closeAttribute(m,l,E),b},f.prototype.cdata=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<![CDATA[",l.state=_.InsideTag,b+=m.value,l.state=_.CloseTag,b+="]]>"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.comment=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<!-- ",l.state=_.InsideTag,b+=m.value,l.state=_.CloseTag,b+=" -->"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.declaration=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<?xml",l.state=_.InsideTag,b+=' version="'+m.version+'"',m.encoding!=null&&(b+=' encoding="'+m.encoding+'"'),m.standalone!=null&&(b+=' standalone="'+m.standalone+'"'),l.state=_.CloseTag,b+=l.spaceBeforeSlash+"?>",b+=this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.docType=function(m,l,E){var b,D,C,w,S;if(E||(E=0),this.openNode(m,l,E),l.state=_.OpenTag,w=this.indent(m,l,E),w+="<!DOCTYPE "+m.root().name,m.pubID&&m.sysID?w+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(w+=' SYSTEM "'+m.sysID+'"'),m.children.length>0){for(w+=" [",w+=this.endline(m,l,E),l.state=_.InsideTag,S=m.children,D=0,C=S.length;D<C;D++)b=S[D],w+=this.writeChildNode(b,l,E+1);l.state=_.CloseTag,w+="]"}return l.state=_.CloseTag,w+=l.spaceBeforeSlash+">",w+=this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),w},f.prototype.element=function(m,l,E){var b,D,C,w,S,A,R,k,L,M,G,W,N,K;E||(E=0),M=!1,G="",this.openNode(m,l,E),l.state=_.OpenTag,G+=this.indent(m,l,E)+"<"+m.name,W=m.attribs;for(L in W){if(!u.call(W,L))continue;b=W[L],G+=this.attribute(b,l,E)}if(C=m.children.length,w=C===0?null:m.children[0],C===0||m.children.every(function(F){return(F.type===I.Text||F.type===I.Raw)&&F.value===""}))l.allowEmpty?(G+=">",l.state=_.CloseTag,G+="</"+m.name+">"+this.endline(m,l,E)):(l.state=_.CloseTag,G+=l.spaceBeforeSlash+"/>"+this.endline(m,l,E));else if(l.pretty&&C===1&&(w.type===I.Text||w.type===I.Raw)&&w.value!=null)G+=">",l.state=_.InsideTag,l.suppressPrettyCount++,M=!0,G+=this.writeChildNode(w,l,E+1),l.suppressPrettyCount--,M=!1,l.state=_.CloseTag,G+="</"+m.name+">"+this.endline(m,l,E);else{if(l.dontPrettyTextNodes){for(N=m.children,S=0,R=N.length;S<R;S++)if(D=N[S],(D.type===I.Text||D.type===I.Raw)&&D.value!=null){l.suppressPrettyCount++,M=!0;break}}for(G+=">"+this.endline(m,l,E),l.state=_.InsideTag,K=m.children,A=0,k=K.length;A<k;A++)D=K[A],G+=this.writeChildNode(D,l,E+1);l.state=_.CloseTag,G+=this.indent(m,l,E)+"</"+m.name+">",M&&l.suppressPrettyCount--,G+=this.endline(m,l,E),l.state=_.None}return this.closeNode(m,l,E),G},f.prototype.writeChildNode=function(m,l,E){switch(m.type){case I.CData:return this.cdata(m,l,E);case I.Comment:return this.comment(m,l,E);case I.Element:return this.element(m,l,E);case I.Raw:return this.raw(m,l,E);case I.Text:return this.text(m,l,E);case I.ProcessingInstruction:return this.processingInstruction(m,l,E);case I.Dummy:return"";case I.Declaration:return this.declaration(m,l,E);case I.DocType:return this.docType(m,l,E);case I.AttributeDeclaration:return this.dtdAttList(m,l,E);case I.ElementDeclaration:return this.dtdElement(m,l,E);case I.EntityDeclaration:return this.dtdEntity(m,l,E);case I.NotationDeclaration:return this.dtdNotation(m,l,E);default:throw new Error("Unknown XML node type: "+m.constructor.name)}},f.prototype.processingInstruction=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<?",l.state=_.InsideTag,b+=m.target,m.value&&(b+=" "+m.value),l.state=_.CloseTag,b+=l.spaceBeforeSlash+"?>",b+=this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.raw=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E),l.state=_.InsideTag,b+=m.value,l.state=_.CloseTag,b+=this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.text=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E),l.state=_.InsideTag,b+=m.value,l.state=_.CloseTag,b+=this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.dtdAttList=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<!ATTLIST",l.state=_.InsideTag,b+=" "+m.elementName+" "+m.attributeName+" "+m.attributeType,m.defaultValueType!=="#DEFAULT"&&(b+=" "+m.defaultValueType),m.defaultValue&&(b+=' "'+m.defaultValue+'"'),l.state=_.CloseTag,b+=l.spaceBeforeSlash+">"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.dtdElement=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<!ELEMENT",l.state=_.InsideTag,b+=" "+m.name+" "+m.value,l.state=_.CloseTag,b+=l.spaceBeforeSlash+">"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.dtdEntity=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<!ENTITY",l.state=_.InsideTag,m.pe&&(b+=" %"),b+=" "+m.name,m.value?b+=' "'+m.value+'"':(m.pubID&&m.sysID?b+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.sysID&&(b+=' SYSTEM "'+m.sysID+'"'),m.nData&&(b+=" NDATA "+m.nData)),l.state=_.CloseTag,b+=l.spaceBeforeSlash+">"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.dtdNotation=function(m,l,E){var b;return this.openNode(m,l,E),l.state=_.OpenTag,b=this.indent(m,l,E)+"<!NOTATION",l.state=_.InsideTag,b+=" "+m.name,m.pubID&&m.sysID?b+=' PUBLIC "'+m.pubID+'" "'+m.sysID+'"':m.pubID?b+=' PUBLIC "'+m.pubID+'"':m.sysID&&(b+=' SYSTEM "'+m.sysID+'"'),l.state=_.CloseTag,b+=l.spaceBeforeSlash+">"+this.endline(m,l,E),l.state=_.None,this.closeNode(m,l,E),b},f.prototype.openNode=function(m,l,E){},f.prototype.closeNode=function(m,l,E){},f.prototype.openAttribute=function(m,l,E){},f.prototype.closeAttribute=function(m,l,E){},f}()}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLCData":255,"./XMLComment":257,"./XMLDTDAttList":262,"./XMLDTDElement":263,"./XMLDTDEntity":264,"./XMLDTDNotation":265,"./XMLDeclaration":266,"./XMLDocType":267,"./XMLDummy":270,"./XMLElement":271,"./XMLProcessingInstruction":275,"./XMLRaw":276,"./XMLText":280}],282:[function(U,X,x){"use strict";(function(){var I,_,O,y,v,o,g,p,d,a;a=U("./Utility"),p=a.assign,d=a.isFunction,O=U("./XMLDOMImplementation"),y=U("./XMLDocument"),v=U("./XMLDocumentCB"),g=U("./XMLStringWriter"),o=U("./XMLStreamWriter"),I=U("./NodeType"),_=U("./WriterState"),X.exports.create=function(n,s,t,i){var e,r;if(n==null)throw new Error("Root element needs a name.");return i=p({},s,t,i),e=new y(i),r=e.element(n),i.headless||(e.declaration(i),(i.pubID!=null||i.sysID!=null)&&e.dtd(i)),r},X.exports.begin=function(n,s,t){var i;return d(n)&&(i=[n,s],s=i[0],t=i[1],n={}),s?new v(n,s,t):new y(n)},X.exports.stringWriter=function(n){return new g(n)},X.exports.streamWriter=function(n,s){return new o(n,s)},X.exports.implementation=new O,X.exports.nodeType=I,X.exports.writerState=_}).call(void 0)},{"./NodeType":251,"./Utility":252,"./WriterState":253,"./XMLDOMImplementation":260,"./XMLDocument":268,"./XMLDocumentCB":269,"./XMLStreamWriter":277,"./XMLStringWriter":278}],283:[function(U,X,x){X.exports=_;var I=Object.prototype.hasOwnProperty;function _(){for(var O={},y=0;y<arguments.length;y++){var v=arguments[y];for(var o in v)I.call(v,o)&&(O[o]=v[o])}return O}},{}],284:[function(U,X,x){"use strict";var I=U("buffer").Buffer,_=U("./sha"),O=U("./md5"),y={sha1:_,md5:O},v=64,o=I.alloc(v);o.fill(0);function g(a,n,s){I.isBuffer(n)||(n=I.from(n)),I.isBuffer(s)||(s=I.from(s)),n.length>v?n=a(n):n.length<v&&(n=I.concat([n,o],v));for(var t=I.alloc(v),i=I.alloc(v),e=0;e<v;e++)t[e]=n[e]^54,i[e]=n[e]^92;var r=a(I.concat([t,s]));return a(I.concat([i,r]))}function p(a,n){a=a||"sha1";var s=y[a],t=[],i=0;return s||d("algorithm:",a,"is not yet supported"),{update:function(r){return I.isBuffer(r)||(r=I.from(r)),t.push(r),i+=r.length,this},digest:function(r){var c=I.concat(t),u=n?g(s,n,c):s(c);return t=null,r?u.toString(r):u}}}function d(){var a=[].slice.call(arguments).join(" ");throw new Error([a,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}x.createHash=function(a){return p(a)},x.createHmac=function(a,n){return p(a,n)},x.createCredentials=function(){d("sorry,createCredentials is not implemented yet")},x.createCipher=function(){d("sorry,createCipher is not implemented yet")},x.createCipheriv=function(){d("sorry,createCipheriv is not implemented yet")},x.createDecipher=function(){d("sorry,createDecipher is not implemented yet")},x.createDecipheriv=function(){d("sorry,createDecipheriv is not implemented yet")},x.createSign=function(){d("sorry,createSign is not implemented yet")},x.createVerify=function(){d("sorry,createVerify is not implemented yet")},x.createDiffieHellman=function(){d("sorry,createDiffieHellman is not implemented yet")},x.pbkdf2=function(){d("sorry,pbkdf2 is not implemented yet")}},{"./md5":286,"./sha":287,buffer:73}],285:[function(U,X,x){"use strict";var I=U("buffer").Buffer,_=4,O=I.alloc(_);O.fill(0);var y=8;function v(p,d){if(p.length%_!==0){var a=p.length+(_-p.length%_);p=I.concat([p,O],a)}for(var n=[],s=d?p.readInt32BE:p.readInt32LE,t=0;t<p.length;t+=_)n.push(s.call(p,t));return n}function o(p,d,a){for(var n=I.alloc(d),s=a?n.writeInt32BE:n.writeInt32LE,t=0;t<p.length;t++)s.call(n,p[t],t*4,!0);return n}function g(p,d,a,n){I.isBuffer(p)||(p=I.from(p));var s=d(v(p,n),p.length*y);return o(s,a,n)}X.exports={hash:g}},{buffer:73}],286:[function(U,X,x){"use strict";var I=U("./helpers");function _(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function O(n,s){n[s>>5]|=128<<s%32,n[(s+64>>>9<<4)+14]=s;for(var t=1732584193,i=-271733879,e=-1732584194,r=271733878,c=0;c<n.length;c+=16){var u=t,f=i,m=e,l=r;t=v(t,i,e,r,n[c+0],7,-680876936),r=v(r,t,i,e,n[c+1],12,-389564586),e=v(e,r,t,i,n[c+2],17,606105819),i=v(i,e,r,t,n[c+3],22,-1044525330),t=v(t,i,e,r,n[c+4],7,-176418897),r=v(r,t,i,e,n[c+5],12,1200080426),e=v(e,r,t,i,n[c+6],17,-1473231341),i=v(i,e,r,t,n[c+7],22,-45705983),t=v(t,i,e,r,n[c+8],7,1770035416),r=v(r,t,i,e,n[c+9],12,-1958414417),e=v(e,r,t,i,n[c+10],17,-42063),i=v(i,e,r,t,n[c+11],22,-1990404162),t=v(t,i,e,r,n[c+12],7,1804603682),r=v(r,t,i,e,n[c+13],12,-40341101),e=v(e,r,t,i,n[c+14],17,-1502002290),i=v(i,e,r,t,n[c+15],22,1236535329),t=o(t,i,e,r,n[c+1],5,-165796510),r=o(r,t,i,e,n[c+6],9,-1069501632),e=o(e,r,t,i,n[c+11],14,643717713),i=o(i,e,r,t,n[c+0],20,-373897302),t=o(t,i,e,r,n[c+5],5,-701558691),r=o(r,t,i,e,n[c+10],9,38016083),e=o(e,r,t,i,n[c+15],14,-660478335),i=o(i,e,r,t,n[c+4],20,-405537848),t=o(t,i,e,r,n[c+9],5,568446438),r=o(r,t,i,e,n[c+14],9,-1019803690),e=o(e,r,t,i,n[c+3],14,-187363961),i=o(i,e,r,t,n[c+8],20,1163531501),t=o(t,i,e,r,n[c+13],5,-1444681467),r=o(r,t,i,e,n[c+2],9,-51403784),e=o(e,r,t,i,n[c+7],14,1735328473),i=o(i,e,r,t,n[c+12],20,-1926607734),t=g(t,i,e,r,n[c+5],4,-378558),r=g(r,t,i,e,n[c+8],11,-2022574463),e=g(e,r,t,i,n[c+11],16,1839030562),i=g(i,e,r,t,n[c+14],23,-35309556),t=g(t,i,e,r,n[c+1],4,-1530992060),r=g(r,t,i,e,n[c+4],11,1272893353),e=g(e,r,t,i,n[c+7],16,-155497632),i=g(i,e,r,t,n[c+10],23,-1094730640),t=g(t,i,e,r,n[c+13],4,681279174),r=g(r,t,i,e,n[c+0],11,-358537222),e=g(e,r,t,i,n[c+3],16,-722521979),i=g(i,e,r,t,n[c+6],23,76029189),t=g(t,i,e,r,n[c+9],4,-640364487),r=g(r,t,i,e,n[c+12],11,-421815835),e=g(e,r,t,i,n[c+15],16,530742520),i=g(i,e,r,t,n[c+2],23,-995338651),t=p(t,i,e,r,n[c+0],6,-198630844),r=p(r,t,i,e,n[c+7],10,1126891415),e=p(e,r,t,i,n[c+14],15,-1416354905),i=p(i,e,r,t,n[c+5],21,-57434055),t=p(t,i,e,r,n[c+12],6,1700485571),r=p(r,t,i,e,n[c+3],10,-1894986606),e=p(e,r,t,i,n[c+10],15,-1051523),i=p(i,e,r,t,n[c+1],21,-2054922799),t=p(t,i,e,r,n[c+8],6,1873313359),r=p(r,t,i,e,n[c+15],10,-30611744),e=p(e,r,t,i,n[c+6],15,-1560198380),i=p(i,e,r,t,n[c+13],21,1309151649),t=p(t,i,e,r,n[c+4],6,-145523070),r=p(r,t,i,e,n[c+11],10,-1120210379),e=p(e,r,t,i,n[c+2],15,718787259),i=p(i,e,r,t,n[c+9],21,-343485551),t=d(t,u),i=d(i,f),e=d(e,m),r=d(r,l)}return Array(t,i,e,r)}function y(n,s,t,i,e,r){return d(a(d(d(s,n),d(i,r)),e),t)}function v(n,s,t,i,e,r,c){return y(s&t|~s&i,n,s,e,r,c)}function o(n,s,t,i,e,r,c){return y(s&i|t&~i,n,s,e,r,c)}function g(n,s,t,i,e,r,c){return y(s^t^i,n,s,e,r,c)}function p(n,s,t,i,e,r,c){return y(t^(s|~i),n,s,e,r,c)}function d(n,s){var t=(n&65535)+(s&65535),i=(n>>16)+(s>>16)+(t>>16);return i<<16|t&65535}function a(n,s){return n<<s|n>>>32-s}X.exports=function(s){return I.hash(s,O,16)}},{"./helpers":285}],287:[function(U,X,x){"use strict";var I=U("./helpers");function _(g,p){g[p>>5]|=128<<24-p%32,g[(p+64>>9<<4)+15]=p;for(var d=Array(80),a=1732584193,n=-271733879,s=-1732584194,t=271733878,i=-1009589776,e=0;e<g.length;e+=16){for(var r=a,c=n,u=s,f=t,m=i,l=0;l<80;l++){l<16?d[l]=g[e+l]:d[l]=o(d[l-3]^d[l-8]^d[l-14]^d[l-16],1);var E=v(v(o(a,5),O(l,n,s,t)),v(v(i,d[l]),y(l)));i=t,t=s,s=o(n,30),n=a,a=E}a=v(a,r),n=v(n,c),s=v(s,u),t=v(t,f),i=v(i,m)}return Array(a,n,s,t,i)}function O(g,p,d,a){return g<20?p&d|~p&a:g<40?p^d^a:g<60?p&d|p&a|d&a:p^d^a}function y(g){return g<20?1518500249:g<40?1859775393:g<60?-1894007588:-899497514}function v(g,p){var d=(g&65535)+(p&65535),a=(g>>16)+(p>>16)+(d>>16);return a<<16|d&65535}function o(g,p){return g<<p|g>>>32-p}X.exports=function(p){return I.hash(p,_,20,!0)}},{"./helpers":285}],288:[function(U,X,x){"use strict";X.exports=function(){return function(){}}},{}],289:[function(U,X,x){(function(I){"use strict";var _=U("babel-runtime/helpers/typeof"),O=y(_);function y(a){return a&&a.__esModule?a:{default:a}}var v=U("stream"),o=v.Stream,g=U("../lib/common/utils/isArray"),p=g.isArray;X.exports.string=function(n){return typeof n=="string"},X.exports.array=p,X.exports.buffer=I.isBuffer;function d(a){return a instanceof o}X.exports.writableStream=function(n){return d(n)&&typeof n._write=="function"&&(0,O.default)(n._writableState)==="object"}}).call(this,{isBuffer:U("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":42,"../node_modules/is-buffer/index.js":197,"babel-runtime/helpers/typeof":67,stream:230}],290:[function(U,X,x){"use strict";x.encodeURIComponent=function(I){try{return encodeURIComponent(I)}catch(_){return I}},x.escape=U("escape-html"),x.timestamp=function(_){if(_){var O=_;return typeof O=="string"&&(O=Number(O)),String(_).length===10&&(O*=1e3),new Date(O)}return Math.round(Date.now()/1e3)}},{"escape-html":191}],291:[function(U,X,x){(function(I,_){"use strict";var O=U("babel-runtime/core-js/json/stringify"),y=g(O),v=U("babel-runtime/helpers/typeof"),o=g(v);function g(l){return l&&l.__esModule?l:{default:l}}var p=U("util"),d=U("url"),a=U("http"),n=U("https"),s=U("debug")("urllib"),t=U("humanize-ms"),i,e=0,r=Math.pow(2,31)-10,c=/^https?:\/\//i;function u(l,E){return l===void 0?E:l}function f(l,E){return function(b,D,C){if(b)return E(b);l({data:D,status:C.statusCode,headers:C.headers,res:C})}}x.TIMEOUTS=[t("300s"),t("300s")];var m=["json","text"];x.request=function(E,b,D){return arguments.length===2&&typeof b=="function"&&(D=b,b=null),typeof D=="function"?x.requestWithCallback(E,b,D):(i||(i=U("any-promise")),new i(function(C,w){x.requestWithCallback(E,b,f(C,w))}))},x.requestWithCallback=function(E,b,D){if(!E||typeof E!="string"&&(typeof E=="undefined"?"undefined":(0,o.default)(E))!=="object"){var C=p.format("expect request url to be a string or a http request options, but got %j",E);throw new Error(C)}arguments.length===2&&typeof b=="function"&&(D=b,b=null),b=b||{},e>=r&&(e=0);var w=++e;b.requestUrls=b.requestUrls||[];var S={requestId:w,url:E,args:b,ctx:b.ctx};b.emitter&&b.emitter.emit("request",S),b.timeout=b.timeout||x.TIMEOUTS,b.maxRedirects=b.maxRedirects||10,b.streaming=b.streaming||b.customResponse;var A=Date.now(),R;typeof E=="string"?(c.test(E)||(E="http://"+E),R=d.parse(E)):R=E;var k=(b.type||b.method||R.method||"GET").toUpperCase(),L=R.port||80,M=a,G=u(b.agent,x.agent),W=b.fixJSONCtlChars;R.protocol==="https:"&&(M=n,G=u(b.httpsAgent,x.httpsAgent),R.port||(L=443));var N={host:R.hostname||R.host||"localhost",path:R.path||"/",method:k,port:L,agent:G,headers:b.headers||{},lookup:b.lookup};Array.isArray(b.timeout)?N.requestTimeout=b.timeout[b.timeout.length-1]:typeof b.timeout!="undefined"&&(N.requestTimeout=b.timeout);for(var K=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],F=0;F<K.length;F++){var P=K[F];b.hasOwnProperty(P)&&(N[P]=b[P])}N.rejectUnauthorized===!1&&!N.hasOwnProperty("secureOptions")&&(N.secureOptions=U("constants").SSL_OP_NO_TLSv1_2);var B=b.auth||R.auth;B&&(N.auth=B);var J=b.content||b.data,re=k==="GET"||k==="HEAD"||b.dataAsQueryString;if(!b.content&&(J&&!(typeof J=="string"||_.isBuffer(J))))if(re)J=b.nestedQuerystring?qs.stringify(J):querystring.stringify(J);else{var he=N.headers["Content-Type"]||N.headers["content-type"];he||(b.contentType==="json"?he="application/json":he="application/x-www-form-urlencoded",N.headers["Content-Type"]=he),parseContentType(he).type==="application/json"?J=(0,y.default)(J):J=b.nestedQuerystring?qs.stringify(J):querystring.stringify(J)}re&&J&&(N.path+=(R.query?"&":"?")+J,J=null);var we=0;if(J){var ke=J.length;_.isBuffer(J)||(ke=_.byteLength(J)),we=N.headers["Content-Length"]=ke}b.dataType==="json"&&(N.headers.Accept="application/json"),typeof b.beforeRequest=="function"&&b.beforeRequest(N);var ne=null,Oe=null,Ce=null,fe=!1,oe=!1,se=0,be=-1,ie=!1,de="",Fe="",ae=null;b.timing&&(ae={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0});function Z(){ne&&(clearTimeout(ne),ne=null)}function Y(){Oe&&(clearTimeout(Oe),Oe=null)}function q(Le,bt,Re){if(Y(),!D){console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),w,I.pid,N.method,E),Le&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),w,I.pid,Le.name,Le.message,Le.stack);return}var Xe=D;D=null;var et={};if(Re&&(be=Re.statusCode,et=Re.headers),be===401&&et["www-authenticate"]&&(!b.headers||!b.headers.Authorization)&&b.digestAuth){var Ye=et["www-authenticate"];if(Ye.indexOf("Digest ")>=0)return s("Request#%d %s: got digest auth header WWW-Authenticate: %s",w,E,Ye),b.headers=b.headers||{},b.headers.Authorization=digestAuthHeader(N.method,N.path,Ye,b.digestAuth),s("Request#%d %s: auth with digest header: %s",w,E,b.headers.Authorization),Re.headers["set-cookie"]&&(b.headers.Cookie=Re.headers["set-cookie"].join(";")),x.requestWithCallback(E,b,Xe)}var Me=Date.now()-A;ae&&(ae.contentDownload=Me),s("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Me,se,be,N.method,N.host,N.path,oe,ae);var Ke={status:be,statusCode:be,headers:et,size:se,aborted:ie,rt:Me,keepAliveSocket:oe,data:bt,requestUrls:b.requestUrls,timing:ae,remoteAddress:de,remotePort:Fe};if(Le){var ge="";G&&typeof G.getCurrentStatus=="function"&&(ge=", agent status: "+(0,y.default)(G.getCurrentStatus())),Le.message+=", "+N.method+" "+E+" "+be+" (connected: "+fe+", keepalive socket: "+oe+ge+`)
|
|
|
headers: `+(0,y.default)(et),Le.data=bt,Le.path=N.path,Le.status=be,Le.headers=et,Le.res=Ke}Xe(Le,bt,b.streaming?Re:Ke),b.emitter&&(S.url=E,S.socket=tt&&tt.connection,S.options=N,S.size=we,b.emitter.emit("response",{requestId:w,error:Le,ctx:b.ctx,req:S,res:Ke}))}function ve(Le){var bt=null;if(b.followRedirect&&statuses.redirect[Le.statusCode]){b._followRedirectCount=(b._followRedirectCount||0)+1;var Re=Le.headers.location;if(!Re)bt=new Error("Got statusCode "+Le.statusCode+" but cannot resolve next location from headers"),bt.name="FollowRedirectError";else if(b._followRedirectCount>b.maxRedirects)bt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+E),bt.name="MaxRedirectError";else{var Xe=b.formatRedirectUrl?b.formatRedirectUrl(E,Re):d.resolve(E,Re);s("Request#%d %s: `redirected` from %s to %s",w,N.path,E,Xe),Y(),b.headers&&b.headers.Host&&c.test(Re)&&(b.headers.Host=null);var et=D;return D=null,x.requestWithCallback(Xe,b,et),{redirect:!0,error:null}}}return{redirect:!1,error:bt}}!N.headers["User-Agent"]&&!N.headers["user-agent"]&&(N.headers["User-Agent"]=navigator.userAgent),b.gzip&&(!N.headers["Accept-Encoding"]&&!N.headers["accept-encoding"]&&(N.headers["Accept-Encoding"]="gzip"));function pe(Le,bt,Re){var Xe=Le.headers["content-encoding"];return Re(null,bt,Xe)}var Te=b.writeStream;s("Request#%d %s %s with headers %j, options.path: %s",w,k,E,N.headers,N.path),b.requestUrls.push(E);function Ne(Le){if(ae&&(ae.waiting=Date.now()-A),s("Request#%d %s `req response` event emit: status %d, headers: %j",w,E,Le.statusCode,Le.headers),b.streaming){var bt=ve(Le);if(bt.redirect){Le.resume();return}return bt.error?(Le.resume(),q(bt.error,null,Le)):q(null,null,Le)}if(Le.on("close",function(){s("Request#%d %s: `res close` event emit, total size %d",w,E,se)}),Le.on("error",function(){s("Request#%d %s: `res error` event emit, total size %d",w,E,se)}),Le.on("aborted",function(){ie=!0,s("Request#%d %s: `res aborted` event emit, total size %d",w,E,se)}),Te){var bt=ve(Le);if(bt.redirect){Le.resume();return}return bt.error?(Le.resume(),Te.end(),q(bt.error,null,Le)):(b.consumeWriteStream===!1?Le.on("end",q.bind(null,null,null,Le)):isNode010||isNode012?first([[Te,"close"],[Le,"aborted"]],function(et,Ye,Me){s("Request#%d %s: writeStream or res %s event emitted",w,E,Me),q(Ce||null,null,Le)}):Te.on("close",function(){s("Request#%d %s: writeStream close event emitted",w,E),q(Ce||null,null,Le)}),Le.pipe(Te))}var Re=[];Le.on("data",function(Xe){s("Request#%d %s: `res data` event emit, size %d",w,E,Xe.length),se+=Xe.length,Re.push(Xe)}),Le.on("end",function(){var Xe=_.concat(Re,se);if(s("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",w,E,se,Le._dumped),Ce)return q(Ce,Xe,Le);var et=ve(Le);if(et.error)return q(et.error,Xe,Le);if(et.redirect)return;pe(Le,Xe,function(Ye,Me,Ke){if(Ye)return q(Ye,Xe,Le);if(!Ke&&m.indexOf(b.dataType)>=0){try{Me=decodeBodyByCharset(Me,Le)}catch(Ee){return s("decodeBodyByCharset error: %s",Ee),q(null,Me,Le)}if(b.dataType==="json")if(se===0)Me=null;else{var ge=parseJSON(Me,W);ge.error?Ye=ge.error:Me=ge.data}}ie&&s("Request#%d %s: Remote socket was terminated before `response.end()` was called",w,E),q(Ye,Me,Le)})})}var me,Ie;Array.isArray(b.timeout)?(me=t(b.timeout[0]),Ie=t(b.timeout[1])):me=Ie=t(b.timeout),s("ConnectTimeout: %d, ResponseTimeout: %d",me,Ie);function _e(){s("Connect timer ticking, timeout: %d",me),ne=setTimeout(function(){ne=null,be===-1&&(be=-2);var Le="Connect timeout for "+me+"ms",bt="ConnectionTimeoutError";tt.socket||(bt="SocketAssignTimeoutError",Le+=", working sockets is full"),Ce=new Error(Le),Ce.name=bt,Ce.requestId=w,s("ConnectTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Le,fe),Ge()},me)}function Ve(){s("Response timer ticking, timeout: %d",Ie),Oe=setTimeout(function(){Oe=null;var Le="Response timeout for "+Ie+"ms",bt="ResponseTimeoutError";Ce=new Error(Le),Ce.name=bt,Ce.requestId=w,s("ResponseTimeout: Request#%d %s %s: %s, connected: %s",w,E,Ce.name,Le,fe),Ge()},Ie)}var tt;N.mode=b.mode?b.mode:"";try{tt=M.request(N,Ne)}catch(Le){return q(Le)}typeof window=="undefined"?_e():tt.on("requestTimeout",function(){be===-1&&(be=-2);var Le="Connect timeout for "+me+"ms",bt="ConnectionTimeoutError";Ce=new Error(Le),Ce.name=bt,Ce.requestId=w,Ge()});function Ge(){s("Request#%d %s abort, connected: %s",w,E,fe),tt.socket||(Ce.noSocket=!0,q(Ce)),tt.abort()}return ae&&tt.on("finish",function(){ae.requestSent=Date.now()-A}),tt.once("socket",function(Le){ae&&(ae.queuing=Date.now()-A),isNode010&&Le.socket&&(Le=Le.socket);var bt=Le.readyState;if(bt==="opening"){Le.once("lookup",function(Re,Xe,et){s("Request#%d %s lookup: %s, %s, %s",w,E,Re,Xe,et),ae&&(ae.dnslookup=Date.now()-A),Xe&&(de=Xe)}),Le.once("connect",function(){ae&&(ae.connected=Date.now()-A),Z(),Ve(),s("Request#%d %s new socket connected",w,E),fe=!0,de||(de=Le.remoteAddress),Fe=Le.remotePort});return}s("Request#%d %s reuse socket connected, readyState: %s",w,E,bt),fe=!0,oe=!0,de||(de=Le.remoteAddress),Fe=Le.remotePort,Z(),Ve()}),tt.on("error",function(Le){(Le.name==="Error"||Le.name==="TypeError")&&(Le.name=fe?"ResponseError":"RequestError"),Le.message+=' (req "error")',s("Request#%d %s `req error` event emit, %s: %s",w,E,Le.name,Le.message),q(Ce||Le)}),Te&&Te.once("error",function(Le){Le.message+=' (writeStream "error")',Ce=Le,s("Request#%d %s `writeStream error` event emit, %s: %s",w,E,Le.name,Le.message),Ge()}),b.stream?(b.stream.pipe(tt),b.stream.once("error",function(Le){Le.message+=' (stream "error")',Ce=Le,s("Request#%d %s `readStream error` event emit, %s: %s",w,E,Le.name,Le.message),Ge()})):tt.end(J),tt.requestId=w,tt}}).call(this,U("_process"),U("buffer").Buffer)},{_process:208,"any-promise":49,"babel-runtime/core-js/json/stringify":53,"babel-runtime/helpers/typeof":67,buffer:73,constants:75,debug:288,http:231,https:193,"humanize-ms":194,url:238,util:243}]},{},[1])(1)})}).call(this,__webpack_require__("IyRk"))},n0Id:function(U,X,x){U.exports=x.p+"static/disappoint2.7a4bdf92.svg"},n6Qo:function(U,X,x){"use strict";x.d(X,"a",function(){return p});var I=x("q1tI"),_=x("biw7"),O=x("fyJ8");function y(d){var a=d.className,n=d.index,s=d.children,t=d.colSpan,i=d.rowSpan,e=I.useContext(_.a),r=e.prefixCls,c=e.fixedInfoList,u=c[n];return I.createElement(O.a,Object.assign({className:a,index:n,component:"td",prefixCls:r,record:null,dataIndex:null,render:function(){return{children:s,props:{colSpan:t,rowSpan:i}}}},u))}function v(d){return I.createElement("tr",Object.assign({},d))}function o(d){var a=d.children,n=I.useContext(_.a),s=n.prefixCls;return I.createElement("tfoot",{className:"".concat(s,"-summary")},a)}var g=X.b=o,p={Cell:y,Row:v}},nKGa:function(U,X,x){U.exports=x.p+"static/export_exercise-template.f7655c19.png"},nWbc:function(U,X,x){},nukY:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAMkklEQVR4Xu2dWWwcSRnHv7Yd577v+74vkgWEQCAEy6IVWuCB62GVICFIYkcsvMC+LW8LL7BIiTiEhCweInjgPrRCC2KBJTBVYzm24yRO4ty3kziJj9ie+tC/d9oaT2b67ume7irJsjdbVf19X/266quvjjaEEG8w8yukk7ZAii1gMHODEOK3RPRSivXUqmXcAgb07+jomDk2NvYPZn4u4/bQ6qfUAiboSEKI5cz8XyJanVJdtVoZtsAE6EXYdzPzv4hoToZtolVPoQUmgV6E/QVm/hMRNaVQX61SRi3wDOiwg5Tya0qpn2TUJlrtFFqgIujFnv27zPztFOqsVcqgBaqCzsyGlPJXzPy5DNpFq5wyC1QFHXr29fVN6+/v/zszfyBlemt1MmYBW9Bhi3w+v7hQKJwkog0Zs41WN0UWcAS96K9vI6J3mHl+inTXqmTIAq5Ahz1yudxHDcN4k5mbM2QfrWpKLOAa9CLsB4ioLSW6azUyZAFPoBdh/w4RvZYhG2lVU2ABz6AXYf8FEb2cAv21ChmxgC/Qu7q6moeHh/9KRB/JiJ20mnVuAV+gQ+fu7u4FQ0ND/yGiLXVuAy1+BizgG/Ri2HEjEZ1k5kUZsJVWsY4tEAh06N3e3v7B8fHxt4hoWh3bIRbRm5qaaHx83NOzDcMg/DCz+RNlamhoMKtXSkX5mJrUHRh0SCml/CIzn8D+mJpInYKHNDY20p49e2hoaIguX75MIyMjrrRatWoVLVu2jJ48eUJnzpxxVcZPpunTp9POnTvNot3d3TQ8POynmsSUCQ1MIcSrzPx6YjSrIMiSJUvM3jCK9PTpU3r48KHrqhcvXkxr166lQqFAp06dMn+7SRp0N1Z6Nk+orS6E+Bkzf8WfKNGX2rdvH6EnjSINDAxQb2+v66p37NhBM2bMoNu3b9PVq1ddl9OguzbVpIyhgs7MTUKIvxDR8/7EibbU1q1byfI7w3pSc3MzTZkyhbyADsABOnzsrq4uwmhgJYw406ZVn+4sXbqUFi1aZLo8fX19VdUYHR2dNEqsWbOG5sxxf0ISckydOtWsH/J5mQ88ePCArl+/HpaJQ6knVNAhkRBiLjP/m4jedfBSntatW2eC5wV0QAc3CkBcuHBhkoWslyCo2S5dukT37t2bqGbTpk00b968oNW6Ko/n4vlJSqGDDuXy+fza4tbeZUlSNgpZvIKOSMvu3btNF+rs2bP0+PHjmoA+e/Zsc+RxmzBSwU1CunbtGmGEcJswAgwODrrNXpN8kYBehP29SincFTOjJprE9BCvoK9evZrgfgBwgG4lRDkA4/37923dhJUrV5qjAUA6d+5cVa0REvTibpRXpKMuHoDK5XKfMQzj17gNzEOxSLMi2oFGBCj9/f2Bn+UFdPSSu3btMiM/PT09pp9tpS1btpg+NEC/ePFiVbn0ZNRfk0XWo1viSCm/oZT6gT/xwi+1ceNGmj9/vum/huFHegHdylv+bPTkmCijF8bk1M5NCAo63Be87E4JLhZGDqQ7d+64WtiCXl5cHCcZwvz/kYMOYXO53DEiag1TcL91xQU6IilYgLFgHhsbM1VA775t2zaaOXMm3bp1y/SH7VJQ0MOa7FaSsdKcw287hV2uJqAzc6OU8nfM/KmwFfBaXxygoxcFzAjXwWXCD/4G/HBnADu2AnR2dpohQfw33KtKCf79woULzZXKauFF9KrVthaUgo4Frmp+PCbLVjjy0aNHtgtaGCGRMg86jNDV1TVreHj4bSLa5xXOMPPHBfrevXtt1cA2gLt375p58BIgMuM3YVTA6FAplYLe0dFB1shSntftZBTrEvv379eglxown8+vKBQKuMj03bhVDMkCHT1ntUb2IhZ6a/R+TnF0PBe9J0Jv2NeC3wsWLJiIoGByaiUNupcWcJe3Jq5LGex7C4XCP4lotjsRw81lgR5ureQIeqUec/v27aabgs1Z5XHnICu4drsNdY8edsvb1CelfEkp9fsaPnLiURboiGNbrkIYcmB0KF/8sasXkGMC6nWvS1BZNehBLeihvJTy+0qpb3ooElrWsH10P4JhQomFI7gwp0+frul+71LQ8aJX6/0RXsSkFwnrDXb75qEPkp6MltAgpXxZKYXD1bGkuEFHL46YOVwWgIF95aUJ/jn8d4AGWb0mLDjZjVQ6vOjVoj7ySymfU0rhQwOxnUaKE3RMXOGyIKRoRUbwN8J41g8gx8QU/46DGV6TUyweMlg9cKW6EfLE5i+EKCEDkvU3wpF2B0TwgpXuxPQqe5T5azYZ7ejoWDI6Oiri/nRMXKADGjwbPTr8eUADuK2tsFYj49/Pnz8/CfQbN244Roiw2one2gl0O5gwiuBFxG/E6LHjEQn77NevX2/G0vESej3+FyXAbuuuCehCCGybe4uZP+xWsKjyRQ06lvkBK8KNpYsxGzZsMMOJ5Qk+MtwX5Ec5q0cs7dGxkOTUU1rbcP2CDlcK+22wHQFbIxAFKj1Kh7g6dMCEG5vJgmwYi6pt7eqtFeg/YubDcShY/swoQUc8HaeYkDDJLN20hYkdXgIAi3/HyiZ+A5xKE8Jago5QJiCGy2KNKJUWjHD0DyMHZMao4/b4XxLaPXLQpZRfVUr9NAnKQoYoQS9d6ClfdbRO77s9UV8r0OGmbN682XSpADDcFMhYbWUULgxeWvjqyOs00iSl3SMFHVdhFAoFfEggMTfwRgn63LlzTWgwrEspfbWxdXgbk0ZrMhqV6zJr1izT98YLCvcJLon1ItptAbBsCF/9ypUr5tbipKfIQC8u96O1E3XKKErQcQ0FdhfCLcEVEW4TelW8JHAdMEHFSincgqhAh4sFOXEEEC9WJVfEDnSUwXFAa7sv3B3s1QljS4Vbm3nNFwnovb29UwcGBt5m5vd7FSjq/NbQiyEXPWWYCfFxTOawwGJ3cBm9NVwFREkANv4uvYYDL0kUoOMZmBDjlJIVOqw2eXWzqQsvCoCHj4/e/ebNm+be9SROVCMBXQjxc2b+cpgQhVXX8uXLzYZGQiMDyqCHBQCFtUEL9QLy0tNL6EFxiAFA46fS2U1MTHFYGr0jRoRSHx2ugdPEzwpVVgIXgANKjDhWOBNgIrpS7S4aN6BDV7ysGCWtemFLAI9DGEkCPnTQhRBfZ+YfhgVm2PWgQRA2C7Jpyk4mDN84JVQKJsAu36aLfPCL4TYAtvKXLcwFoxUrVhB+kAAfXhwsWNm5Gm5BR52wJerHQpQ1MiH2j5+kpFBBx+dfiAjXSSf6q9PwhzHkli/WBGkUAARocRlRpevbcPDCOnQBwJ1GkVLQnfaaQG7499CnUo8OEPFyA2zI5+aEvhfQLbuhDEKQSNjekMoeHVdcKKVEPd2sC5cCvW3Qa+qsfeZhNmzY4UXo6WWy6Ad0C3jY1cnVCtKp+CkbSo8uhJhRvLToPX6E0GUqW8Dy5d0ACrjQcwMwt7F6O7sHuakrie0ZCui5XO4EEX0piQpqmbQFYIHAoOdyuW8R0fe0ObUFkmyBQKBLKT/JzH9O0gVFSTa2li0+C/gGXUq5iZn/p78mHV/j6Se7t4Av0ItXV5zMyo257s2pcybVAp5Bx+dbpJS4T/GzSVVKy6UtUG4Bz6BLKV9TSuHr0TppC9SNBTyBXrwd9zf6o1x1075a0KIFXIMupdyulMItW7FcPKRbTFsgiAVcgd7e3j6vUCggwrI5yMN0WW2BuCzgCDpi5EKIPxLRi3EJqZ+rLRDUAo6gCyFeZ+ZXgz5Il9cWiNMCtqBLKb+glPplnALqZ2sLhGGBqqDn8/m9Sql30v6xrTCMqOtIvgUqgt7T07NwcHAQe8vXJV8FLaG2gLMFngEdX3+WUr7JzB9zLq5zaAvUhwWeAV0I8QYzv1If4msptQXcWWAS6Llc7gARtbkrqnNpC9SPBSZAb29vf9/4+Dg+phXblc71YzYtab1ZwAS9s7Nz6cjICK50ju0jWvVmOC1vfVnAKF7pjPsRP1RfomtptQXcWwB7y3+slDrkvojOqS1QfxZw3AJQfyppibNkgWPHjrGDvsowjMMa9CxRkUJdHUAfNwzjQGtr6wkNegobP0sq2YD+1DCMz7e2tv4B9tCgZ4mKFOpaBfTBxsbGTx85cuRvlsoa9BQ2fpZUqgD6w4aGhhdbWlpwS8VE0qBniYoU6loKumEYdxobG184fPhwR7mqGvQUNn6WVCoB/VpDQ8PzLS0tZyvpr0HPEhUp1LUI+gUi+vjRo0cvV1NRg57Cxs+SSsePH+9qamr6xKFDh27a6a1BzxIVKdS1ra1t4cGDB/udVPs/YIoD4AHLutsAAAAASUVORK5CYII="},oRuE:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.pad.Iso10126={pad:function(_,O){var y=O*4,v=y-_.sigBytes%y;_.concat(I.lib.WordArray.random(v-1)).concat(I.lib.WordArray.create([v<<24],1))},unpad:function(_){var O=_.words[_.sigBytes-1>>>2]&255;_.sigBytes-=O}},I.pad.Iso10126})},onxn:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAYAAADFeBvrAAAQFElEQVRoQ71aCXRUVZr+7ttqr6yVPSRASCBIVFBUWgUURZFW7FYa9Xhc2lHWGdM9bYszaqa1tcUFV9RRu3V6etw4DQJqY4MDLUJQEQIYEsieqspW2Wp/9ZY7570ia1VIRXH+cyo59e6/3O/+//3vf/9XBGeR8sr/lipS6QpKyMUApoOiGISmgBIbJZSAwkdA+ihQB0JqCPAVy3K7Op5Z3Hm2pkF+qKKiik/sfV7lF5SSOwF6MSiYiekklBAcIqDvmAzkLy1/WNo7MfmR3N8bUF75fpOInnIK+iClsP2QSQzIEiAIBk8L9uwN7ooLgt9H54QBUUqJo3zHrZTgSVDkfx+jY8lcaqgDJ0awl5S6KGXWezYu+W9CCJ2IjQkByvzXnZNlRXoPlM4dywghBJRhwBACkNPRp1nRpqX/p6CqJq2Cqqr+XSdFgVGg2DRlG85FE7Y6i/Bs6NqvZdZwc9uz1zUnCiouIPrBzaxr9+Eb816v2zygKONXO+apKrZSUEeMcg0AwwAMB8JMaI2iABUFqihC7e0HMQr43YwDuGvqd/B2yni0bn7/X6W5i47J5aUC1K1pL9V5zwQurnXXqmnrKMX8vNdO3aQJp//641ug0D9RUMOgMs0BLBf9aN44C0RlGbKrHVSW8OCsY1hXVg0qq6issStfdOQ+ssrw+VKVKtfnPHvSM2aEjB6gFQuMzjaXi4AazclJOcWR391LqbphiI+AcGwMkDsNO7DCvBNFllYc8J6L273/8b0gamEot7WDhsJ4+JxDWHleva6ntQl0c2PRK/fYv1zESOwjjicPb463v2KW1rWyeIVK1Xc1JSeZ3E+XG35zDUB1PsKwYHgeGOaROVw13nI8jmxr9Chp6MvHPM9boDTB7K1SqH4/wLIgRgMIy4JTJZCudgR8Et77yW5cNrlb193WotLaOn7TvOn9a8KuwIbs3x/77ehViwHkXDntY0rpEo1RDPF0m3AB+b11OViOxSS2B4WcGy7GgXopH4u5SryVXwGek3W9vrAVs5zvIUSNCXtH6eiE4vNH+QkBa7fBEvRg2/kfoaOHxfrm+dh67R6k2RWdpaNeUpSWnu0ZZUk3BI93Xpy98eRXw43FAGpdWdQDihRR5CAGObCciu6kZGSrPeAhg+EU8FYRooVBRnonBENkUN8jrlV4PfjzhMFojHJ7Z9RDo6jQ7MOuqz8GI0r4pCEHN14Y9ZJGx48xvpIMP1V8kj91UuEksvzDKNrTiXSQsW3l9EKZyo2yxCDoF8ALCkxmKZpu4xBhVKQVt8FoD8EXtmCac0vioTagT8twEUlP21pSoOEwVH9AH51u7cFn132mlx5UoWCMrP5cSxQNDcQ9dQrNDhxsvzvj6eq34wNaVTRfVrEn4DOA52UIxkHgY656xsxWCBYR3zpn4drQxgl5ZyxmLQw1kMQg4IXCHfhZWUcMq9QnUc7MyqLb70m7/6ucuIDcq4uuFsPMTm2Q4/XT78zEqMid06DnCNfRPDyl3In3rQvGk5rQON/pxndXvQPeFCdMFJVSFaR/f9tVuRtP7IoJuTdWL69YLH/7aKLHCmeKIGtWiz7BhsqpCPeb4DVYEGSMCDEGeIkZzX6CPRkLcdhaOiEgA8xUkvGY5V3cPts1pnyoumdn+kPfXhMD6G+rrvDOVFsSLjQNSUE4Sty6obovihEJCjFGWwMEp4QcPFbym9gJaftGkvVUDZ4bO6z7G3Fw8fsjxhm5DyqXrD+TOoL9yfft178M+nHL6ut+eYFS++ZEltGYHEB6cZsu0vR1IYI91hhxr92B59hF2Jty0YgxqlJIzS16MtCJZSEUThpxxg0IqIEgjs99EbZhS82Fm6EIGaCMCUpARvCLnsys1452DgL6ZtUFTZlqX8FEAAmWMDJmOnWR9upcBKRS8JmZYA0GRDo7YJ5RisaICTc0XhajVnK69Yw2nBizGVx2ZiwoSvGu4xVcXDSU3tlIGxjZC8lcohe+3kr3kuynqj/VAblWlZSoqlIzETAaLyPIyDmvSRfz+yZDmXH/CBWHGv24o+VCRNSRVYMWZrp34hCbngY2OWlohFJI7jaszjqIh35SO/ickXog+I4jnKotFkH4uKc87d+PPK8DqrnvnA0WhOME+fgQM85pgWCOQFUIvBkPg5jSIPZ78W8n87HNnxdXgVavqZ5uqMEgqBx7NLBJdrCOdF02V2xFyN2LkqR+/M+SL4cB6oPR+w3CyXOhsnaEjvc+rnSJL+uAjq46vzZF9RWPP/1YDrPDi9TJ0TouJBbgSPhnuKlrCeRo+TcuKX1eKJ7Y4pmxmEFMZsy2tOH53C245dvFOHCTfqLoxEQ8MPqOIGKeAtk0Be3HfO8a3L07CS2/xNQa9PgIaPQYTpQIhS27V/8wbPSSpv3NOvX30QVIjEbZ5dYvd2xaKrR9IzW3gkpSDB9jEFCcKWP35e/huf8twK8WDt3zWLEdBv9xyIIDEdu5qK0UD2T2dewl7lXT57QR2xcZSq8pUSysICFtWrteIYym0rrN6KbRdBqPNCBSQ3TfaZlNSwKyM5r6RxPhOORmCTi44G30dipISWcx0IJhRRcM/hNQWTPCyfPwx12Oqhulb+qJc/W08/YyZQcul6oSKpEZXkZGqROsQUbEZ0QkJKCLSQHHS8g2dyGv6dMzrou2Z6SmxG7UhGFgNhOcXKbfZoau8QD4QA34sFO/2ASs83Hb3690bmL+XKUH+r7VlyoFSntCF5i0Ei1cAPexPB2MxHBYWvAHRAiHEtKMWnrmzK8VoFJT/AwXbyVYQtFy24cxQ8a+A2CUaBHbTS/BVftWeLcbX9pD+stnpvqCooeOWVMP6RKsISQVeNBwYCqoEsVfaSvFese9iUarvsqRxkZApYB2WYyzd4YrM3MyTq34a/SRKgKMAVAjMPf+Y5DtSM9CPHBsofQn05+3E+fKaUsppdsTmVFSvgc+jxV97uge0arxzcnzsdGstx4SJqXfCzAMWLMJES38ztCoKrL3Y+/1OwFVAhvphGLMBRd2QggMHZsvVK8A2yurNwpVbxDXyuInVao+mMhsUqe1oeXbfKgyp4MxmiRECI8Pci7BxuAt42a3eDbktg6ogWjoxKOrspx4e9F+ECUAPliPiPUcGPv2g1GjVYa2Fk/sW4E7hEOUIeSfNQ99Fqb8IgMi4x4cyYWdaDk8CRyvwGwdSrPZcxrwlW8WVnieQHhYY2hgggKVcD5biwuEE+hV7NitXIgONTUaRYEANFDxaEnqCUxNjuDBebVgpG4I/mrI5skQ/EPeURQWbYcmR8UJt5A4VxY9U8vm/0ux3Dp2uXvamjW7D+01mbDYIiDMUJzY87phz+lFQDThma478Mfg9RBIBD/lvsQ91q0oSWkAyw1VBIrCYFPHL/B44Jd6X05u17wUBGuzQfH5BrEdvHQjZJKEwgIruHArhEAtVNYIRhmqASNBAzqP50MFQ+0mcyrpXD2zaC+Zcvhi+URsqTxq2QzJAfg67BAMCiglGN6ltWT0w57bA5ZXoltCyzKnfa7IDJQID6oS/TkryPrnmuZXcEQqiXrqdJNRckWrd42ci9dDMJoh2UrAB2rBh1tjHBnw2NDbkIlDaqG47I1dRt3kf629uW6hdHjqePtIO4PkCA+GUIRD2gQBg0kGM8xbnEkEZ5T0LKh95AgHVeJ0MLLM6DIKyyJgMeAJ2y3Yq84eMkspIvWN+neWKOi6dh1UzgbRPgeC5yA4MuS9AaGexgwEu+x4UVlU8/Sbr83QAf1l3c+3XB6pWjYeoBHjFAj4DVBkogPSukMsR4e8RgFF1QAQKArRi1eNGq3ZeCr5VtQKsX1+rfzRyiCN1k/ZhQdKPoDC2NDdkA9HQfXwduDgVNqqChAOG7EC5U9/9Z8rH9CtfLL2p8tmSSe2TAiQ3ncnCAd5SJHxz2TKMnjVcQM+NM8f04zS3QOlt08fPzr/CeSbmxAJGOBzp+il1miSRQ7tVYXYJp5DH7Xeled5+Qa3Dkhrztd+XiNaaGhiBeppC5LEIBLmdW+NJonlsN86E8+lrICXGbtcVMPhwZou19iDo/PXQxF5hPvM0K762hVlNPW7UuF1pWFdeEXfR+88lqKND85g59orj5RKzedO1EvD+ZtIJt4WFiNV9qGdS8XXxhL0MPaEVMqdXVC90T2yvWwj5mXVwHMqG9aMfphTY88pLfG0VxVgu68MIc5Sef8b710yAtDna69cPU1qfiUh62dgOspNwUOWe9DGRM+ZRGmKtw62Xieuzq5Ceckn6D6ZCXNaAAZ7CLwp1jthrwnHvpuBfXIRvcZY+3Tpa1V6n3vQQ7RiAXe409/nUPosiU5iLL4QMaCeycFxbjK+4Gehkp8xpkoGKubKNdjgfwP9ioA8iweqyMKW1acDMaX64yaDzpocrHbdhg227YqBKMvyXju1YwQg7cvuNVfcXyy3nJ32J4AAMeFz4Tzs4mejgclBO5sCCoJ0tR9TVTeWipXIUz2YLrfoffMBsmb1InlSNwLdVljSYvveWqJ49OtbYGZlepehMpyXnZdKKvbop+2IXUwrKpjDHR93OdTeicVLgi6VwUJ7t89ijK4sQ2HP6dGrDm2PhLotetiNpgPVZXi741I8aN0t80R9Pv/VU4P9kJi0VLnm8iU5cvsOAu1Y//8jLZMlF3SBN0ZrRNFnBG8RRxza2utYf3syDjWVoIjV30Z8kzc7aR6579BgYRl30tvXLH7rPLn+7h8bjlZ5mFP9MDt8EMxD13lt4lpb2ZQc0qegnTeyyKOv2QE5FO3OSgzvFjjporyX6qKNwdMU/6UxpWTfmsuOFCrtZT8WKMKqyJkdbfSPpn5nql4XamMamN5GB0TvUK4KE6HbTqS5ma+eahgtO2ZY9fx2TlKtVziZp3Zl/FigUiZ3wOIYWZ/52pLR35oOU6oPtuw+dNdl6QfsAHmYlMZcEpiXsak6tnQY70bWubrUepjkNJTKTbGv8s8SSlOaD5Z0LwhL4XWmQvSa42rWrgf7+Fn7byVVV5KX6mLbTWcKueEa6etz+M+OphwqlZtmnSUME1bjJyb6vOmm8tc3PvrCeMIJZTLt5zBb1i59tUxuvDeRm+14RscbD1IB9Uo6ZnHRfp2XsX4489Ujy8eT08YTAjSg6Plf333p9HDLpzPlpnEvg4kYH83TrZrxcugy7IkU4SnrdszlW6AS5iOzndzu2FAbexmKY2RCgDR5zVsfrFm2YSrc92cqveNe2xMF9pk4HZvFMmQwflxrqMZFXKub49R1+ZtOne5hJaZpwoAG1GpXjhf/YXuxTK37pyLFPZSGErM7JleYCPVGRN7kreaXsp45OnY7aAwN3xvQcH1b1y65VabMwzMU5zQ79bMKmLHLm2GCEXC0jUkVRSLUF6hdW62c8n7WyzXHfsianBVAg16rqGCOerYt+E4tuOIbviR3suK+cBp1Zdpp0GRVRfZl4/XHD7AzTpnYSFWB0vHlzS2TDiz/cPn4vx2YAML/AxiD3K8wfl5pAAAAAElFTkSuQmCC"},osHv:function(U,X,x){(function(I){I(x("VrN/"))})(function(I){"use strict";var _=I.Pos;function O(c,u){return c.line-u.line||c.ch-u.ch}var y="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",v=y+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",o=new RegExp("<(/?)(["+y+"]["+v+"]*)","g");function g(c,u,f,m){this.line=u,this.ch=f,this.cm=c,this.text=c.getLine(u),this.min=m?Math.max(m.from,c.firstLine()):c.firstLine(),this.max=m?Math.min(m.to-1,c.lastLine()):c.lastLine()}function p(c,u){var f=c.cm.getTokenTypeAt(_(c.line,u));return f&&/\btag\b/.test(f)}function d(c){return c.line>=c.max?void 0:(c.ch=0,c.text=c.cm.getLine(++c.line),!0)}function a(c){return c.line<=c.min?void 0:(c.text=c.cm.getLine(--c.line),c.ch=c.text.length,!0)}function n(c){for(;;){var u=c.text.indexOf(">",c.ch);if(u==-1){if(d(c))continue;return}if(!p(c,u+1)){c.ch=u+1;continue}var f=c.text.lastIndexOf("/",u),m=f>-1&&!/\S/.test(c.text.slice(f+1,u));return c.ch=u+1,m?"selfClose":"regular"}}function s(c){for(;;){var u=c.ch?c.text.lastIndexOf("<",c.ch-1):-1;if(u==-1){if(a(c))continue;return}if(!p(c,u+1)){c.ch=u;continue}o.lastIndex=u,c.ch=u;var f=o.exec(c.text);if(f&&f.index==u)return f}}function t(c){for(;;){o.lastIndex=c.ch;var u=o.exec(c.text);if(!u){if(d(c))continue;return}if(!p(c,u.index+1)){c.ch=u.index+1;continue}return c.ch=u.index+u[0].length,u}}function i(c){for(;;){var u=c.ch?c.text.lastIndexOf(">",c.ch-1):-1;if(u==-1){if(a(c))continue;return}if(!p(c,u+1)){c.ch=u;continue}var f=c.text.lastIndexOf("/",u),m=f>-1&&!/\S/.test(c.text.slice(f+1,u));return c.ch=u+1,m?"selfClose":"regular"}}function e(c,u){for(var f=[];;){var m=t(c),l,E=c.line,b=c.ch-(m?m[0].length:0);if(!m||!(l=n(c)))return;if(l=="selfClose")continue;if(m[1]){for(var D=f.length-1;D>=0;--D)if(f[D]==m[2]){f.length=D;break}if(D<0&&(!u||u==m[2]))return{tag:m[2],from:_(E,b),to:_(c.line,c.ch)}}else f.push(m[2])}}function r(c,u){for(var f=[];;){var m=i(c);if(!m)return;if(m=="selfClose"){s(c);continue}var l=c.line,E=c.ch,b=s(c);if(!b)return;if(b[1])f.push(b[2]);else{for(var D=f.length-1;D>=0;--D)if(f[D]==b[2]){f.length=D;break}if(D<0&&(!u||u==b[2]))return{tag:b[2],from:_(c.line,c.ch),to:_(l,E)}}}}I.registerHelper("fold","xml",function(c,u){for(var f=new g(c,u.line,0);;){var m=t(f);if(!m||f.line!=u.line)return;var l=n(f);if(!l)return;if(!m[1]&&l!="selfClose"){var E=_(f.line,f.ch),b=e(f,m[2]);return b&&O(b.from,E)>0?{from:E,to:b.from}:null}}}),I.findMatchingTag=function(c,u,f){var m=new g(c,u.line,u.ch,f);if(m.text.indexOf(">")==-1&&m.text.indexOf("<")==-1)return;var l=n(m),E=l&&_(m.line,m.ch),b=l&&s(m);if(!l||!b||O(m,u)>0)return;var D={from:_(m.line,m.ch),to:E,tag:b[2]};return l=="selfClose"?{open:D,close:null,at:"open"}:b[1]?{open:r(m,b[2]),close:D,at:"close"}:(m=new g(c,E.line,E.ch,f),{open:D,close:e(m,b[2]),at:"open"})},I.findEnclosingTag=function(c,u,f,m){for(var l=new g(c,u.line,u.ch,f);;){var E=r(l,m);if(!E)break;var b=new g(c,u.line,u.ch,f),D=e(b,E.tag);if(D)return{open:E,close:D}}},I.scanForClosingTag=function(c,u,f,m){var l=new g(c,u.line,u.ch,m?{from:0,to:m}:null);return e(l,f)}})},p4vh:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAaVBMVEUAAAD/vwD/vwD/ugD/ugD/uwD/vAD8vAP8ugP9uwL9uwL9uwL9ugL9ugL9ugL8uwP8uwP8ugP9ugL9ugL9ugL9uwL9uwL9uwL9uwP9zkn+1WT+34r+45n/7bz/8s//9+D/+/D//fj///8yardZAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAABpUlEQVRYw+3XwXKDIBAG4AVKoiRBDSq0adrG93/ImphSWwV2jYce+t+SGb5RWBcAmEQeji6acicgHVE6RA4s5cjWoVInHkognV6KP1Pt0NExJ3OE8AhUUKB9BKI4rpoM3+7KWzaMBLWwGcbttsNC+QlWcn7Eqesz8z+ocTHw7wUPQKdLEnItB+3i0PO569JQXwxtFHo5f3QoqB4v1BR663wSkItD738O6vN6WQlyZyRk1oGq8Xf6CFSMO8cjUAbMrgHZvl+qNSDVf/3MT7cSSyFza+DcepYEGQ/Ze9cVzSKo+oIavzUxfYeaJZAeb0xC2ytUUKD9FbJ6slMKySGnQBK4DO23ggJFd1qLh4oopPBQFoU4GmoSxxqNhbIExJHbbJM8aSkcJNNnv+rRk4h/OZt2DAPMcdSu46Qli3RSkhGADovMuGZASagK7AaI4XqOUQzo4ftfDdPkS5jByr1lssXKzzpXAP/QpLyfrvGXycPtJyczMnDhOgri44RvILQqiNy3aJPVUm5XsOziRoOaMFSQIB2GchLEgj3SEOuI6dm3M8E1+wTzvvO4HPYw7wAAAABJRU5ErkJggg=="},p5ED:function(U,X,x){"use strict";var I=x("+L6B"),_=x("2/Rp"),O=x("5Dmo"),y=x("3S7+"),v=x("k1fw"),o=x("tJVT"),g=x("q1tI"),p=x.n(g),d=x("vHTk"),a=x.n(d),n=x("yEEn"),s=x("ZW9T"),t=x("1vsH");X.a=function(i){var e=i.name,r=i.data,c=i.theme,u=i.type,f=i.filename,m=i.monacoEditor,l=i.className,E=i.style,b=i.close,D=i.onClose,C=i.hasMask,w=Object(g.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),S=Object(o.a)(w,2),A=S[0],R=S[1],k=Object(g.useState)(""),L=Object(o.a)(k,2),M=L[0],G=L[1],W,N=1024*1024,K=10*N,F=Object(g.useRef)();u==="office"&&(W=Object(t.T)(r).filesize,W>K&&(u="other")),f&&(m.filename=f),Object(g.useEffect)(function(){var J,re,he=(J=document.cookie)===null||J===void 0||((re=J.replace(/\s/g,""))===null||re===void 0)?void 0:re.split(";");he==null||he.map(function(we){var ke=we.split("=");ke[0]==="_educoder_session"&&G(ke[1])})},[]);var P=function(){if(r.startsWith("http")||r.startsWith("/")){B();return}Object(t.z)(f||"educoder",r,f)},B=function(){Object(t.x)(f||e,r)};return console.log("data:",r,"fileanme:",f," name:",e),p.a.createElement("div",{style:Object(v.a)({},E||{}),className:"".concat(C&&a.a.bgBlack," ").concat(u?a.a.wrp:"hide")},b&&p.a.createElement("div",{className:a.a.close,ref:F},p.a.createElement(y.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return F.current}},p.a.createElement("span",{onClick:B},p.a.createElement("i",{className:"icon-quxiaozhiding"}))),p.a.createElement(y.a,{title:"\u5173\u95ED",getPopupContainer:function(){return F.current}},p.a.createElement("span",{className:"",onClick:D},p.a.createElement("i",{className:"icon-guanbi1"})))),p.a.createElement("div",{className:"".concat(a.a[l]," ").concat(l," ").concat(a.a.monaco," ").concat(u==="txt"?"show":"hide")},u==="txt"&&p.a.createElement(s.b,m)),u==="audio"&&p.a.createElement("audio",{src:"".concat(r!=null&&r.startsWith("/")||(r==null?void 0:r.indexOf("https://"))>-1?r:"data:audio/mp3;base64,").concat(r),autoPlay:!0}),u==="video"&&p.a.createElement(p.a.Fragment,null,r!=null&&r.startsWith("/")?p.a.createElement("video",{controls:!0,src:"".concat(r),autoPlay:!0}):p.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(r),autoPlay:!0})),u==="html"&&p.a.createElement("iframe",{src:r+"&disposition=inline"}),u==="pdf"&&p.a.createElement("embed",{className:a.a.embed,src:r}),u==="image"&&p.a.createElement(p.a.Fragment,null,p.a.createElement("img",{src:"".concat(r!=null&&r.startsWith("/")||(r==null?void 0:r.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(r)})),u==="other"&&p.a.createElement("div",null,p.a.createElement(_.a,{type:"primary",size:"large",onClick:P},p.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(u==="download"||u==="office")&&p.a.createElement(_.a,{type:"primary",size:"large",onClick:P},p.a.createElement(n.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},"p77/":function(U,X,x){},pA7S:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("ETIr"),x("cv67"),x("K3mO"),x("OLod"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=O.BlockCipher,o=_.algo,g=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],p=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],d=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],n=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],s=o.DES=v.extend({_doReset:function(){for(var r=this._key,c=r.words,u=[],f=0;f<56;f++){var m=g[f]-1;u[f]=c[m>>>5]>>>31-m%32&1}for(var l=this._subKeys=[],E=0;E<16;E++){for(var b=l[E]=[],D=d[E],f=0;f<24;f++)b[f/6|0]|=u[(p[f]-1+D)%28]<<31-f%6,b[4+(f/6|0)]|=u[28+(p[f+24]-1+D)%28]<<31-f%6;b[0]=b[0]<<1|b[0]>>>31;for(var f=1;f<7;f++)b[f]=b[f]>>>(f-1)*4+3;b[7]=b[7]<<5|b[7]>>>27}for(var C=this._invSubKeys=[],f=0;f<16;f++)C[f]=l[15-f]},encryptBlock:function(r,c){this._doCryptBlock(r,c,this._subKeys)},decryptBlock:function(r,c){this._doCryptBlock(r,c,this._invSubKeys)},_doCryptBlock:function(r,c,u){this._lBlock=r[c],this._rBlock=r[c+1],t.call(this,4,252645135),t.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),t.call(this,1,1431655765);for(var f=0;f<16;f++){for(var m=u[f],l=this._lBlock,E=this._rBlock,b=0,D=0;D<8;D++)b|=a[D][((E^m[D])&n[D])>>>0];this._lBlock=E,this._rBlock=l^b}var C=this._lBlock;this._lBlock=this._rBlock,this._rBlock=C,t.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),t.call(this,16,65535),t.call(this,4,252645135),r[c]=this._lBlock,r[c+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function t(r,c){var u=(this._lBlock>>>r^this._rBlock)&c;this._rBlock^=u,this._lBlock^=u<<r}function i(r,c){var u=(this._rBlock>>>r^this._lBlock)&c;this._lBlock^=u,this._rBlock^=u<<r}_.DES=v._createHelper(s);var e=o.TripleDES=v.extend({_doReset:function(){var r=this._key,c=r.words;if(c.length!==2&&c.length!==4&&c.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var u=c.slice(0,2),f=c.length<4?c.slice(0,2):c.slice(2,4),m=c.length<6?c.slice(0,2):c.slice(4,6);this._des1=s.createEncryptor(y.create(u)),this._des2=s.createEncryptor(y.create(f)),this._des3=s.createEncryptor(y.create(m))},encryptBlock:function(r,c){this._des1.encryptBlock(r,c),this._des2.decryptBlock(r,c),this._des3.encryptBlock(r,c)},decryptBlock:function(r,c){this._des3.decryptBlock(r,c),this._des2.encryptBlock(r,c),this._des1.decryptBlock(r,c)},keySize:192/32,ivSize:64/32,blockSize:64/32});_.TripleDES=v._createHelper(e)}(),I.TripleDES})},popq:function(U,X,x){},psGv:function(U,X,x){var I,_;(function(){var O;(function(){"use strict";var g=[,,function(n){function s(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}s.prototype.clone_empty=function(){var e=new s(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e},s.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]},s.prototype.has_match=function(e){for(var r=this.__items.length-1;r>=0;r--)if(this.__items[r].match(e))return!0;return!1},s.prototype.set_indent=function(e,r){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=r||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(e){this.__items.push(e);var r=e.lastIndexOf(`
|
|
|
`);r!==-1?this.__character_count=e.length-r:this.__character_count+=e.length},s.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e};function t(e,r){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),r=r||"",e.indent_level>0&&(r=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=r,this.__base_string_length=r.length}t.prototype.get_indent_size=function(e,r){var c=this.__base_string_length;return r=r||0,e<0&&(c=0),c+=e*this.__indent_size,c+=r,c},t.prototype.get_indent_string=function(e,r){var c=this.__base_string;return r=r||0,e<0&&(e=0,c=""),r+=e*this.__indent_size,this.__ensure_cache(r),c+=this.__cache[r],c},t.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()},t.prototype.__add_column=function(){var e=this.__cache.length,r=0,c="";this.__indent_size&&e>=this.__indent_size&&(r=Math.floor(e/this.__indent_size),e-=r*this.__indent_size,c=new Array(r+1).join(this.__indent_string)),e&&(c+=new Array(e+1).join(" ")),this.__cache.push(c)};function i(e,r){this.__indent_cache=new t(e,r),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}i.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},i.prototype.get_line_number=function(){return this.__lines.length},i.prototype.get_indent_string=function(e,r){return this.__indent_cache.get_indent_string(e,r)},i.prototype.get_indent_size=function(e,r){return this.__indent_cache.get_indent_size(e,r)},i.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},i.prototype.add_new_line=function(e){return this.is_empty()||!e&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},i.prototype.get_code=function(e){this.trim(!0);var r=this.current_line.pop();r&&(r[r.length-1]===`
|
|
|
`&&(r=r.replace(/\n+$/g,"")),this.current_line.push(r)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(`
|
|
|
`);return e!==`
|
|
|
`&&(c=c.replace(/[\n]/g,e)),c},i.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},i.prototype.set_indent=function(e,r){return e=e||0,r=r||0,this.next_line.set_indent(e,r),this.__lines.length>1?(this.current_line.set_indent(e,r),!0):(this.current_line.set_indent(),!1)},i.prototype.add_raw_token=function(e){for(var r=0;r<e.newlines;r++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},i.prototype.add_token=function(e){this.__add_space_before_token(),this.current_line.push(e),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},i.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},i.prototype.remove_indent=function(e){for(var r=this.__lines.length;e<r;)this.__lines[e]._remove_indent(),e++;this.current_line._remove_wrap_indent()},i.prototype.trim=function(e){for(e=e===void 0?!1:e,this.current_line.trim();e&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},i.prototype.just_added_newline=function(){return this.current_line.is_empty()},i.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},i.prototype.ensure_empty_line_above=function(e,r){for(var c=this.__lines.length-2;c>=0;){var u=this.__lines[c];if(u.is_empty())break;if(u.item(0).indexOf(e)!==0&&u.item(-1)!==r){this.__lines.splice(c+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},n.exports.Output=i},function(n){function s(t,i,e,r){this.type=t,this.text=i,this.comments_before=null,this.newlines=e||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}n.exports.Token=s},,,function(n){function s(e,r){this.raw_options=t(e,r),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(e,r){var c=this.raw_options[e],u=r||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(u=c.concat()):typeof c=="string"&&(u=c.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(e,r){var c=this.raw_options[e],u=c===void 0?!!r:!!c;return u},s.prototype._get_characters=function(e,r){var c=this.raw_options[e],u=r||"";return typeof c=="string"&&(u=c.replace(/\\r/,"\r").replace(/\\n/,`
|
|
|
`).replace(/\\t/," ")),u},s.prototype._get_number=function(e,r){var c=this.raw_options[e];r=parseInt(r,10),isNaN(r)&&(r=0);var u=parseInt(c,10);return isNaN(u)&&(u=r),u},s.prototype._get_selection=function(e,r,c){var u=this._get_selection_list(e,r,c);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+e+`' can only be one of the following values:
|
|
|
`+r+`
|
|
|
You passed in: '`+this.raw_options[e]+"'");return u[0]},s.prototype._get_selection_list=function(e,r,c){if(!r||r.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[r[0]],!this._is_valid_selection(c,r))throw new Error("Invalid Default Value!");var u=this._get_array(e,c);if(!this._is_valid_selection(u,r))throw new Error("Invalid Option Value: The option '"+e+`' can contain only the following values:
|
|
|
`+r+`
|
|
|
You passed in: '`+this.raw_options[e]+"'");return u},s.prototype._is_valid_selection=function(e,r){return e.length&&r.length&&!e.some(function(c){return r.indexOf(c)===-1})};function t(e,r){var c={};e=i(e);var u;for(u in e)u!==r&&(c[u]=e[u]);if(r&&e[r])for(u in e[r])c[u]=e[r][u];return c}function i(e){var r={},c;for(c in e){var u=c.replace(/-/g,"_");r[u]=e[c]}return r}n.exports.Options=s,n.exports.normalizeOpts=i,n.exports.mergeOpts=t},,function(n){var s=RegExp.prototype.hasOwnProperty("sticky");function t(i){this.__input=i||"",this.__input_length=this.__input.length,this.__position=0}t.prototype.restart=function(){this.__position=0},t.prototype.back=function(){this.__position>0&&(this.__position-=1)},t.prototype.hasNext=function(){return this.__position<this.__input_length},t.prototype.next=function(){var i=null;return this.hasNext()&&(i=this.__input.charAt(this.__position),this.__position+=1),i},t.prototype.peek=function(i){var e=null;return i=i||0,i+=this.__position,i>=0&&i<this.__input_length&&(e=this.__input.charAt(i)),e},t.prototype.__match=function(i,e){i.lastIndex=e;var r=i.exec(this.__input);return r&&!(s&&i.sticky)&&(r.index!==e&&(r=null)),r},t.prototype.test=function(i,e){return e=e||0,e+=this.__position,e>=0&&e<this.__input_length?!!this.__match(i,e):!1},t.prototype.testChar=function(i,e){var r=this.peek(e);return i.lastIndex=0,r!==null&&i.test(r)},t.prototype.match=function(i){var e=this.__match(i,this.__position);return e?this.__position+=e[0].length:e=null,e},t.prototype.read=function(i,e,r){var c="",u;return i&&(u=this.match(i),u&&(c+=u[0])),e&&(u||!i)&&(c+=this.readUntil(e,r)),c},t.prototype.readUntil=function(i,e){var r="",c=this.__position;i.lastIndex=this.__position;var u=i.exec(this.__input);return u?(c=u.index,e&&(c+=u[0].length)):c=this.__input_length,r=this.__input.substring(this.__position,c),this.__position=c,r},t.prototype.readUntilAfter=function(i){return this.readUntil(i,!0)},t.prototype.get_regexp=function(i,e){var r=null,c="g";return e&&s&&(c="y"),typeof i=="string"&&i!==""?r=new RegExp(i,c):i&&(r=new RegExp(i.source,c)),r},t.prototype.get_literal_regexp=function(i){return RegExp(i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},t.prototype.peekUntilAfter=function(i){var e=this.__position,r=this.readUntilAfter(i);return this.__position=e,r},t.prototype.lookBack=function(i){var e=this.__position-1;return e>=i.length&&this.__input.substring(e-i.length,e).toLowerCase()===i},n.exports.InputScanner=t},function(n,s,t){var i=t(8).InputScanner,e=t(3).Token,r=t(10).TokenStream,c=t(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},f=function(m,l){this._input=new i(m),this._options=l||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};f.prototype.tokenize=function(){this._input.restart(),this.__tokens=new r,this._reset();for(var m,l=new e(u.START,""),E=null,b=[],D=new r;l.type!==u.EOF;){for(m=this._get_next_token(l,E);this._is_comment(m);)D.add(m),m=this._get_next_token(l,E);D.isEmpty()||(m.comments_before=D,D=new r),m.parent=E,this._is_opening(m)?(b.push(E),E=m):E&&this._is_closing(m,E)&&(m.opened=E,E.closed=m,E=b.pop(),m.parent=E),m.previous=l,l.next=m,this.__tokens.add(m),l=m}return this.__tokens},f.prototype._is_first_token=function(){return this.__tokens.isEmpty()},f.prototype._reset=function(){},f.prototype._get_next_token=function(m,l){this._readWhitespace();var E=this._input.read(/.+/g);return E?this._create_token(u.RAW,E):this._create_token(u.EOF,"")},f.prototype._is_comment=function(m){return!1},f.prototype._is_opening=function(m){return!1},f.prototype._is_closing=function(m,l){return!1},f.prototype._create_token=function(m,l){var E=new e(m,l,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return E},f.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},n.exports.Tokenizer=f,n.exports.TOKEN=u},function(n){function s(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}s.prototype.restart=function(){this.__position=0},s.prototype.isEmpty=function(){return this.__tokens_length===0},s.prototype.hasNext=function(){return this.__position<this.__tokens_length},s.prototype.next=function(){var t=null;return this.hasNext()&&(t=this.__tokens[this.__position],this.__position+=1),t},s.prototype.peek=function(t){var i=null;return t=t||0,t+=this.__position,t>=0&&t<this.__tokens_length&&(i=this.__tokens[t]),i},s.prototype.add=function(t){this.__parent_token&&(t.parent=this.__parent_token),this.__tokens.push(t),this.__tokens_length+=1},n.exports.TokenStream=s},function(n,s,t){var i=t(12).Pattern;function e(r,c){i.call(this,r,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}e.prototype=new i,e.prototype.__set_whitespace_patterns=function(r,c){r+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+r+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},e.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var r=this._input.read(this._match_pattern);if(r===" ")this.whitespace_before_token=" ";else if(r){var c=this.__split(this._newline_regexp,r);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return r},e.prototype.matching=function(r,c){var u=this._create();return u.__set_whitespace_patterns(r,c),u._update(),u},e.prototype._create=function(){return new e(this._input,this)},e.prototype.__split=function(r,c){r.lastIndex=0;for(var u=0,f=[],m=r.exec(c);m;)f.push(c.substring(u,m.index)),u=m.index+m[0].length,m=r.exec(c);return u<c.length?f.push(c.substring(u,c.length)):f.push(""),f},n.exports.WhitespacePattern=e},function(n){function s(t,i){this._input=t,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,i&&(this._starting_pattern=this._input.get_regexp(i._starting_pattern,!0),this._match_pattern=this._input.get_regexp(i._match_pattern,!0),this._until_pattern=this._input.get_regexp(i._until_pattern),this._until_after=i._until_after)}s.prototype.read=function(){var t=this._input.read(this._starting_pattern);return(!this._starting_pattern||t)&&(t+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),t},s.prototype.read_match=function(){return this._input.match(this._match_pattern)},s.prototype.until_after=function(t){var i=this._create();return i._until_after=!0,i._until_pattern=this._input.get_regexp(t),i._update(),i},s.prototype.until=function(t){var i=this._create();return i._until_after=!1,i._until_pattern=this._input.get_regexp(t),i._update(),i},s.prototype.starting_with=function(t){var i=this._create();return i._starting_pattern=this._input.get_regexp(t,!0),i._update(),i},s.prototype.matching=function(t){var i=this._create();return i._match_pattern=this._input.get_regexp(t,!0),i._update(),i},s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){},n.exports.Pattern=s},function(n){function s(t,i){t=typeof t=="string"?t:t.source,i=typeof i=="string"?i:i.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+i,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+i,"g")}s.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var i={};this.__directive_pattern.lastIndex=0;for(var e=this.__directive_pattern.exec(t);e;)i[e[1]]=e[2],e=this.__directive_pattern.exec(t);return i},s.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},n.exports.Directives=s},function(n,s,t){var i=t(12).Pattern,e={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function r(c,u){i.call(this,c,u),this.__template_pattern=null,this._disabled=Object.assign({},e),this._excluded=Object.assign({},e),u&&(this.__template_pattern=this._input.get_regexp(u.__template_pattern),this._excluded=Object.assign(this._excluded,u._excluded),this._disabled=Object.assign(this._disabled,u._disabled));var f=new i(c);this.__patterns={handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:f.starting_with(/{{{/).until_after(/}}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),php:f.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:f.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:f.starting_with(/{%/).until_after(/%}/),django_value:f.starting_with(/{{/).until_after(/}}/),django_comment:f.starting_with(/{#/).until_after(/#}/),smarty:f.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:f.starting_with(/{\*/).until_after(/\*}/),smarty_literal:f.starting_with(/{literal}/).until_after(/{\/literal}/)}}r.prototype=new i,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(c){var u=this._create();return u._disabled[c]=!0,u._update(),u},r.prototype.read_options=function(c){var u=this._create();for(var f in e)u._disabled[f]=c.templating.indexOf(f)===-1;return u._update(),u},r.prototype.exclude=function(c){var u=this._create();return u._excluded[c]=!0,u._update(),u},r.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),c+=u,u=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},r.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},r.prototype._read_template=function(){var c="",u=this._input.peek();if(u==="<"){var f=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&f==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&f==="%"&&(c=c||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},n.exports.TemplatablePattern=r},,,,function(n,s,t){var i=t(19).Beautifier,e=t(20).Options;function r(c,u,f,m){var l=new i(c,u,f,m);return l.beautify()}n.exports=r,n.exports.defaultOptions=function(){return new e}},function(n,s,t){var i=t(20).Options,e=t(2).Output,r=t(21).Tokenizer,c=t(21).TOKEN,u=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,m=function(k,L){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=k.max_preserve_newlines,this.preserve_newlines=k.preserve_newlines,this._output=new e(k,L)};m.prototype.current_line_has_match=function(k){return this._output.current_line.has_match(k)},m.prototype.set_space_before_token=function(k,L){this._output.space_before_token=k,this._output.non_breaking_space=L},m.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},m.prototype.add_raw_token=function(k){this._output.add_raw_token(k)},m.prototype.print_preserved_newlines=function(k){var L=0;k.type!==c.TEXT&&k.previous.type!==c.TEXT&&(L=k.newlines?1:0),this.preserve_newlines&&(L=k.newlines<this.max_preserve_newlines+1?k.newlines:this.max_preserve_newlines+1);for(var M=0;M<L;M++)this.print_newline(M>0);return L!==0},m.prototype.traverse_whitespace=function(k){return k.whitespace_before||k.newlines?(this.print_preserved_newlines(k)||(this._output.space_before_token=!0),!0):!1},m.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},m.prototype.print_newline=function(k){this._output.add_new_line(k)},m.prototype.print_token=function(k){k.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(k.text))},m.prototype.indent=function(){this.indent_level++},m.prototype.get_full_indent=function(k){return k=this.indent_level+(k||0),k<1?"":this._output.get_indent_string(k)};var l=function(k){for(var L=null,M=k.next;M.type!==c.EOF&&k.closed!==M;){if(M.type===c.ATTRIBUTE&&M.text==="type"){M.next&&M.next.type===c.EQUALS&&M.next.next&&M.next.next.type===c.VALUE&&(L=M.next.next.text);break}M=M.next}return L},E=function(k,L){var M=null,G=null;return L.closed?(k==="script"?M="text/javascript":k==="style"&&(M="text/css"),M=l(L)||M,M.search("text/css")>-1?G="css":M.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?G="javascript":M.search(/(text|application|dojo)\/(x-)?(html)/)>-1?G="html":M.search(/test\/null/)>-1&&(G="null"),G):null};function b(k,L){return L.indexOf(k)!==-1}function D(k,L,M){this.parent=k||null,this.tag=L?L.tag_name:"",this.indent_level=M||0,this.parser_token=L||null}function C(k){this._printer=k,this._current_frame=null}C.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},C.prototype.record_tag=function(k){var L=new D(this._current_frame,k,this._printer.indent_level);this._current_frame=L},C.prototype._try_pop_frame=function(k){var L=null;return k&&(L=k.parser_token,this._printer.indent_level=k.indent_level,this._current_frame=k.parent),L},C.prototype._get_frame=function(k,L){for(var M=this._current_frame;M&&!(k.indexOf(M.tag)!==-1);){if(L&&L.indexOf(M.tag)!==-1){M=null;break}M=M.parent}return M},C.prototype.try_pop=function(k,L){var M=this._get_frame([k],L);return this._try_pop_frame(M)},C.prototype.indent_to_tag=function(k){var L=this._get_frame(k);L&&(this._printer.indent_level=L.indent_level)};function w(k,L,M,G){this._source_text=k||"",L=L||{},this._js_beautify=M,this._css_beautify=G,this._tag_stack=null;var W=new i(L,"html");this._options=W,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}w.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var k=this._source_text,L=this._options.eol;this._options.eol==="auto"&&(L=`
|
|
|
`,k&&u.test(k)&&(L=k.match(u)[0])),k=k.replace(f,`
|
|
|
`);var M=k.match(/^[\t ]*/)[0],G={text:"",type:""},W=new S,N=new m(this._options,M),K=new r(k,this._options).tokenize();this._tag_stack=new C(N);for(var F=null,P=K.next();P.type!==c.EOF;)P.type===c.TAG_OPEN||P.type===c.COMMENT?(F=this._handle_tag_open(N,P,W,G),W=F):P.type===c.ATTRIBUTE||P.type===c.EQUALS||P.type===c.VALUE||P.type===c.TEXT&&!W.tag_complete?F=this._handle_inside_tag(N,P,W,K):P.type===c.TAG_CLOSE?F=this._handle_tag_close(N,P,W):P.type===c.TEXT?F=this._handle_text(N,P,W):N.add_raw_token(P),G=F,P=K.next();var B=N._output.get_code(L);return B},w.prototype._handle_tag_close=function(k,L,M){var G={text:L.text,type:L.type};return k.alignment_size=0,M.tag_complete=!0,k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),M.is_unformatted?k.add_raw_token(L):(M.tag_start_char==="<"&&(k.set_space_before_token(L.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&M.has_wrapped_attrs&&k.print_newline(!1)),k.print_token(L)),M.indent_content&&!(M.is_unformatted||M.is_content_unformatted)&&(k.indent(),M.indent_content=!1),!M.is_inline_element&&!(M.is_unformatted||M.is_content_unformatted)&&k.set_wrap_point(),G},w.prototype._handle_inside_tag=function(k,L,M,G){var W=M.has_wrapped_attrs,N={text:L.text,type:L.type};if(k.set_space_before_token(L.newlines||L.whitespace_before!=="",!0),M.is_unformatted)k.add_raw_token(L);else if(M.tag_start_char==="{"&&L.type===c.TEXT)k.print_preserved_newlines(L)?(L.newlines=0,k.add_raw_token(L)):k.print_token(L);else{if(L.type===c.ATTRIBUTE?(k.set_space_before_token(!0),M.attr_count+=1):(L.type===c.EQUALS||L.type===c.VALUE&&L.previous.type===c.EQUALS)&&k.set_space_before_token(!1),L.type===c.ATTRIBUTE&&M.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(k.traverse_whitespace(L),W=W||L.newlines!==0),this._is_wrap_attributes_force)){var K=M.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&M.attr_count===1){var F=!0,P=0,B;do{if(B=G.peek(P),B.type===c.ATTRIBUTE){F=!1;break}P+=1}while(P<4&&B.type!==c.EOF&&B.type!==c.TAG_CLOSE);K=!F}K&&(k.print_newline(!1),W=!0)}k.print_token(L),W=W||k.previous_token_wrapped(),M.has_wrapped_attrs=W}return N},w.prototype._handle_text=function(k,L,M){var G={text:L.text,type:"TK_CONTENT"};return M.custom_beautifier_name?this._print_custom_beatifier_text(k,L,M):M.is_unformatted||M.is_content_unformatted?k.add_raw_token(L):(k.traverse_whitespace(L),k.print_token(L)),G},w.prototype._print_custom_beatifier_text=function(k,L,M){var G=this;if(L.text!==""){var W=L.text,N,K=1,F="",P="";M.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?N=this._js_beautify:M.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?N=this._css_beautify:M.custom_beautifier_name==="html"&&(N=function(ke,ne){var Oe=new w(ke,ne,G._js_beautify,G._css_beautify);return Oe.beautify()}),this._options.indent_scripts==="keep"?K=0:this._options.indent_scripts==="separate"&&(K=-k.indent_level);var B=k.get_full_indent(K);if(W=W.replace(/\n[ \t]*$/,""),M.custom_beautifier_name!=="html"&&W[0]==="<"&&W.match(/^(<!--|<!\[CDATA\[)/)){var J=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(W);if(!J){k.add_raw_token(L);return}F=B+J[1]+`
|
|
|
`,W=J[4],J[5]&&(P=B+J[5]),W=W.replace(/\n[ \t]*$/,""),(J[2]||J[3].indexOf(`
|
|
|
`)!==-1)&&(J=J[3].match(/[ \t]+$/),J&&(L.whitespace_before=J[0]))}if(W)if(N){var re=function(){this.eol=`
|
|
|
`};re.prototype=this._options.raw_options;var he=new re;W=N(B+W,he)}else{var we=L.whitespace_before;we&&(W=W.replace(new RegExp(`
|
|
|
(`+we+")?","g"),`
|
|
|
`)),W=B+W.replace(/\n/g,`
|
|
|
`+B)}F&&(W?W=F+W+`
|
|
|
`+P:W=F+P),k.print_newline(!1),W&&(L.text=W,L.whitespace_before="",L.newlines=0,k.add_raw_token(L),k.print_newline(!0))}},w.prototype._handle_tag_open=function(k,L,M,G){var W=this._get_tag_open_token(L);return(M.is_unformatted||M.is_content_unformatted)&&!M.is_empty_element&&L.type===c.TAG_OPEN&&L.text.indexOf("</")===0?(k.add_raw_token(L),W.start_tag_token=this._tag_stack.try_pop(W.tag_name)):(k.traverse_whitespace(L),this._set_tag_position(k,L,W,M,G),W.is_inline_element||k.set_wrap_point(),k.print_token(L)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(W.alignment_size=L.text.length+1),!W.tag_complete&&!W.is_unformatted&&(k.alignment_size=W.alignment_size),W};var S=function(k,L){if(this.parent=k||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!L)this.tag_complete=!0;else{var M;this.tag_start_char=L.text[0],this.text=L.text,this.tag_start_char==="<"?(M=L.text.match(/^<([^\s>]*)/),this.tag_check=M?M[1]:""):(M=L.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=M?M[1]:"",(L.text.startsWith("{{#>")||L.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&L.next!==null?this.tag_check=L.next.text.split(" ")[0]:this.tag_check=L.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),L.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||L.closed&&L.closed.text==="/>";var G=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(G=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(G)))}};w.prototype._get_tag_open_token=function(k){var L=new S(this._tag_stack.get_parser_token(),k);return L.alignment_size=this._options.wrap_attributes_indent_size,L.is_end_tag=L.is_end_tag||b(L.tag_check,this._options.void_elements),L.is_empty_element=L.tag_complete||L.is_start_tag&&L.is_end_tag,L.is_unformatted=!L.tag_complete&&b(L.tag_check,this._options.unformatted),L.is_content_unformatted=!L.is_empty_element&&b(L.tag_check,this._options.content_unformatted),L.is_inline_element=b(L.tag_name,this._options.inline)||L.tag_name.includes("-")||L.tag_start_char==="{",L},w.prototype._set_tag_position=function(k,L,M,G,W){if(M.is_empty_element||(M.is_end_tag?M.start_tag_token=this._tag_stack.try_pop(M.tag_name):(this._do_optional_end_element(M)&&(M.is_inline_element||k.print_newline(!1)),this._tag_stack.record_tag(M),(M.tag_name==="script"||M.tag_name==="style")&&!(M.is_unformatted||M.is_content_unformatted)&&(M.custom_beautifier_name=E(M.tag_check,L)))),b(M.tag_check,this._options.extra_liners)&&(k.print_newline(!1),k._output.just_added_blankline()||k.print_newline(!0)),M.is_empty_element){if(M.tag_start_char==="{"&&M.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),M.indent_content=!0;var N=k.current_line_has_match(/{{#if/);N||k.print_newline(!1)}M.tag_name==="!--"&&W.type===c.TAG_CLOSE&&G.is_end_tag&&M.text.indexOf(`
|
|
|
`)===-1||(M.is_inline_element||M.is_unformatted||k.print_newline(!1),this._calcluate_parent_multiline(k,M))}else if(M.is_end_tag){var K=!1;K=M.start_tag_token&&M.start_tag_token.multiline_content,K=K||!M.is_inline_element&&!(G.is_inline_element||G.is_unformatted)&&!(W.type===c.TAG_CLOSE&&M.start_tag_token===G)&&W.type!=="TK_CONTENT",(M.is_content_unformatted||M.is_unformatted)&&(K=!1),K&&k.print_newline(!1)}else M.indent_content=!M.custom_beautifier_name,M.tag_start_char==="<"&&(M.tag_name==="html"?M.indent_content=this._options.indent_inner_html:M.tag_name==="head"?M.indent_content=this._options.indent_head_inner_html:M.tag_name==="body"&&(M.indent_content=this._options.indent_body_inner_html)),!(M.is_inline_element||M.is_unformatted)&&(W.type!=="TK_CONTENT"||M.is_content_unformatted)&&k.print_newline(!1),this._calcluate_parent_multiline(k,M)},w.prototype._calcluate_parent_multiline=function(k,L){L.parent&&k._output.just_added_newline()&&!((L.is_inline_element||L.is_unformatted)&&L.parent.is_inline_element)&&(L.parent.multiline_content=!0)};var A=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],R=["a","audio","del","ins","map","noscript","video"];w.prototype._do_optional_end_element=function(k){var L=null;if(k.is_empty_element||!k.is_start_tag||!k.parent)return;if(k.tag_name==="body")L=L||this._tag_stack.try_pop("head");else if(k.tag_name==="li")L=L||this._tag_stack.try_pop("li",["ol","ul"]);else if(k.tag_name==="dd"||k.tag_name==="dt")L=L||this._tag_stack.try_pop("dt",["dl"]),L=L||this._tag_stack.try_pop("dd",["dl"]);else if(k.parent.tag_name==="p"&&A.indexOf(k.tag_name)!==-1){var M=k.parent.parent;(!M||R.indexOf(M.tag_name)===-1)&&(L=L||this._tag_stack.try_pop("p"))}else k.tag_name==="rp"||k.tag_name==="rt"?(L=L||this._tag_stack.try_pop("rt",["ruby","rtc"]),L=L||this._tag_stack.try_pop("rp",["ruby","rtc"])):k.tag_name==="optgroup"?L=L||this._tag_stack.try_pop("optgroup",["select"]):k.tag_name==="option"?L=L||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):k.tag_name==="colgroup"?L=L||this._tag_stack.try_pop("caption",["table"]):k.tag_name==="thead"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"])):k.tag_name==="tbody"||k.tag_name==="tfoot"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("thead",["table"]),L=L||this._tag_stack.try_pop("tbody",["table"])):k.tag_name==="tr"?(L=L||this._tag_stack.try_pop("caption",["table"]),L=L||this._tag_stack.try_pop("colgroup",["table"]),L=L||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(k.tag_name==="th"||k.tag_name==="td")&&(L=L||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),L=L||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return k.parent=this._tag_stack.get_parser_token(),L},n.exports.Beautifier=w},function(n,s,t){var i=t(6).Options;function e(r){i.call(this,r,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}e.prototype=new i,n.exports.Options=e},function(n,s,t){var i=t(9).Tokenizer,e=t(9).TOKEN,r=t(13).Directives,c=t(14).TemplatablePattern,u=t(12).Pattern,f={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:e.START,RAW:e.RAW,EOF:e.EOF},m=new r(/<\!--/,/-->/),l=function(E,b){i.call(this,E,b),this._current_tag_name="";var D=new c(this._input).read_options(this._options),C=new u(this._input);if(this.__patterns={word:D.until(/[\n\r\t <]/),single_quote:D.until_after(/'/),double_quote:D.until_after(/"/),attribute:D.until(/[\n\r\t =>]|\/>/),element_name:D.until(/[\n\r\t >\/]/),handlebars_comment:C.starting_with(/{{!--/).until_after(/--}}/),handlebars:C.starting_with(/{{/).until_after(/}}/),handlebars_open:C.until(/[\n\r\t }]/),handlebars_raw_close:C.until(/}}/),comment:C.starting_with(/<!--/).until_after(/-->/),cdata:C.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:C.starting_with(/<!\[/).until_after(/]>/),processing:C.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var w=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=C.matching(w).until_after(w)}};l.prototype=new i,l.prototype._is_comment=function(E){return!1},l.prototype._is_opening=function(E){return E.type===f.TAG_OPEN},l.prototype._is_closing=function(E,b){return E.type===f.TAG_CLOSE&&b&&((E.text===">"||E.text==="/>")&&b.text[0]==="<"||E.text==="}}"&&b.text[0]==="{"&&b.text[1]==="{")},l.prototype._reset=function(){this._current_tag_name=""},l.prototype._get_next_token=function(E,b){var D=null;this._readWhitespace();var C=this._input.peek();return C===null?this._create_token(f.EOF,""):(D=D||this._read_open_handlebars(C,b),D=D||this._read_attribute(C,E,b),D=D||this._read_close(C,b),D=D||this._read_raw_content(C,E,b),D=D||this._read_content_word(C),D=D||this._read_comment_or_cdata(C),D=D||this._read_processing(C),D=D||this._read_open(C,b),D=D||this._create_token(f.UNKNOWN,this._input.next()),D)},l.prototype._read_comment_or_cdata=function(E){var b=null,D=null,C=null;if(E==="<"){var w=this._input.peek(1);w==="!"&&(D=this.__patterns.comment.read(),D?(C=m.get_directives(D),C&&C.ignore==="start"&&(D+=m.readIgnored(this._input))):D=this.__patterns.cdata.read()),D&&(b=this._create_token(f.COMMENT,D),b.directives=C)}return b},l.prototype._read_processing=function(E){var b=null,D=null,C=null;if(E==="<"){var w=this._input.peek(1);(w==="!"||w==="?")&&(D=this.__patterns.conditional_comment.read(),D=D||this.__patterns.processing.read()),D&&(b=this._create_token(f.COMMENT,D),b.directives=C)}return b},l.prototype._read_open=function(E,b){var D=null,C=null;return b||E==="<"&&(D=this._input.next(),this._input.peek()==="/"&&(D+=this._input.next()),D+=this.__patterns.element_name.read(),C=this._create_token(f.TAG_OPEN,D)),C},l.prototype._read_open_handlebars=function(E,b){var D=null,C=null;return b||this._options.indent_handlebars&&E==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(D=this.__patterns.handlebars_comment.read(),D=D||this.__patterns.handlebars.read(),C=this._create_token(f.COMMENT,D)):(D=this.__patterns.handlebars_open.read(),C=this._create_token(f.TAG_OPEN,D))),C},l.prototype._read_close=function(E,b){var D=null,C=null;return b&&(b.text[0]==="<"&&(E===">"||E==="/"&&this._input.peek(1)===">")?(D=this._input.next(),E==="/"&&(D+=this._input.next()),C=this._create_token(f.TAG_CLOSE,D)):b.text[0]==="{"&&E==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),C=this._create_token(f.TAG_CLOSE,"}}"))),C},l.prototype._read_attribute=function(E,b,D){var C=null,w="";if(D&&D.text[0]==="<")if(E==="=")C=this._create_token(f.EQUALS,this._input.next());else if(E==='"'||E==="'"){var S=this._input.next();E==='"'?S+=this.__patterns.double_quote.read():S+=this.__patterns.single_quote.read(),C=this._create_token(f.VALUE,S)}else w=this.__patterns.attribute.read(),w&&(b.type===f.EQUALS?C=this._create_token(f.VALUE,w):C=this._create_token(f.ATTRIBUTE,w));return C},l.prototype._is_content_unformatted=function(E){return this._options.void_elements.indexOf(E)===-1&&(this._options.content_unformatted.indexOf(E)!==-1||this._options.unformatted.indexOf(E)!==-1)},l.prototype._read_raw_content=function(E,b,D){var C="";if(D&&D.text[0]==="{")C=this.__patterns.handlebars_raw_close.read();else if(b.type===f.TAG_CLOSE&&b.opened.text[0]==="<"&&b.text[0]!=="/"){var w=b.opened.text.substr(1).toLowerCase();if(w==="script"||w==="style"){var S=this._read_comment_or_cdata(E);if(S)return S.type=f.TEXT,S;C=this._input.readUntil(new RegExp("</"+w+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(w)&&(C=this._input.readUntil(new RegExp("</"+w+"[\\n\\r\\t ]*?>","ig")))}return C?this._create_token(f.TEXT,C):null},l.prototype._read_content_word=function(E){var b="";if(this._options.unformatted_content_delimiter&&(E===this._options.unformatted_content_delimiter[0]&&(b=this.__patterns.unformatted_content_delimiter.read())),b||(b=this.__patterns.word.read()),b)return this._create_token(f.TEXT,b)},n.exports.Tokenizer=l,n.exports.TOKEN=f}],p={};function d(n){var s=p[n];if(s!==void 0)return s.exports;var t=p[n]={exports:{}};return g[n](t,t.exports,d),t.exports}var a=d(18);O=a})();var y=O;if(!0)!(I=[x,x("6UM0"),x("TXwP")],_=function(g){var p=x("6UM0"),d=x("TXwP");return{html_beautify:function(a,n){return y(a,n,p.js_beautify,d.css_beautify)}}}.apply(X,I),_!==void 0&&(U.exports=_));else var v,o})()},q7KB:function(U,X,x){},qBft:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.pad.AnsiX923={pad:function(_,O){var y=_.sigBytes,v=O*4,o=v-y%v,g=y+o-1;_.clamp(),_.words[g>>>2]|=o<<24-g%4*8,_.sigBytes+=o},unpad:function(_){var O=_.words[_.sigBytes-1>>>2]&255;_.sigBytes-=O}},I.pad.Ansix923})},qM6L:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=_.enc,o=v.Utf16=v.Utf16BE={stringify:function(p){for(var d=p.words,a=p.sigBytes,n=[],s=0;s<a;s+=2){var t=d[s>>>2]>>>16-s%4*8&65535;n.push(String.fromCharCode(t))}return n.join("")},parse:function(p){for(var d=p.length,a=[],n=0;n<d;n++)a[n>>>1]|=p.charCodeAt(n)<<16-n%2*16;return y.create(a,d*2)}};v.Utf16LE={stringify:function(p){for(var d=p.words,a=p.sigBytes,n=[],s=0;s<a;s+=2){var t=g(d[s>>>2]>>>16-s%4*8&65535);n.push(String.fromCharCode(t))}return n.join("")},parse:function(p){for(var d=p.length,a=[],n=0;n<d;n++)a[n>>>1]|=g(p.charCodeAt(n)<<16-n%2*16);return y.create(a,d*2)}};function g(p){return p<<8&4278255360|p>>>8&16711935}}(),I.enc.Utf16})},qZJd:function(U,X,x){"use strict";var I=x("MXD1"),_=x("CFYs"),O=x("14J3"),y=x("BMrR"),v=x("+L6B"),o=x("2/Rp"),g=x("jCWc"),p=x("kPKH"),d=x("miYZ"),a=x("tsqr"),n=x("2qtc"),s=x("kLXV"),t=x("9og8"),i=x("rAM+"),e=x("tJVT"),r=x("k1fw"),c=x("WmNS"),u=x.n(c),f=x("q1tI"),m=x.n(f),l=x("IxHN"),E=x("bdgK"),b=x("M8RZ"),D=x("Ty5D"),C=x("1vsH"),w=x("1dTM"),S=x.n(w),A=x("dhSg"),R=x("5NDa"),k=x("5rEg"),L=x("AKST"),M=k.a.TextArea,G=function(oe){var se=oe.onCancel,be=oe.onSave,ie=oe.content,de=Object(f.useState)(ie),Fe=Object(e.a)(de,2),ae=Fe[0],Z=Fe[1];function Y(ve){Z(ve.target.value)}function q(){be(ae)}return Object(f.useEffect)(function(){Z(ie)},[ie]),m.a.createElement("div",{className:"clipboard-box"},m.a.createElement("h3",null,"\u5B9E\u9A8C\u73AF\u5883\u526A\u5207\u677F\uFF1A"),m.a.createElement(M,{value:ae,onChange:Y,className:"clipboard"}),m.a.createElement("p",null," ",m.a.createElement("b",null," 1.\u4ECE\u5916\u90E8\u590D\u5236\u5185\u5BB9\u5230\u5B9E\u9A8C\u73AF\u5883\u5185\uFF1A ")," \u7C98\u8D34\u5185\u5BB9\u5230\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u70B9\u51FB\u4FDD\u5B58\uFF0C\u7136\u540E\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u8FDB\u884C\u7C98\u8D34\u3002 "),m.a.createElement("p",null," ",m.a.createElement("b",null," 2.\u83B7\u53D6\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7684\u5185\u5BB9\uFF1A ")," \u8BF7\u5148\u5728\u73AF\u5883\u4E2D\u590D\u5236\u5185\u5BB9\uFF0C\u590D\u5236\u52A8\u4F5C\u5B8C\u6210\u540E\u5185\u5BB9\u4F1A\u663E\u793A\u5728\u4E0A\u9762\u6587\u672C\u6846\uFF0C\u7136\u540E\u5728\u4E0A\u9762\u6587\u672C\u6846\u4E2D\u518D\u6B21\u590D\u5236\u3002 "),m.a.createElement("div",{className:"btn-action-container"},m.a.createElement(o.a,{type:"ghost",onClick:se,style:{marginRight:10}},"\u53D6\u6D88"),m.a.createElement(o.a,{type:"primary",onClick:q},"\u4FDD\u5B58")))},W=x("ErOA"),N=x("IZBM"),K=x("ye1Q"),F=x("bntm"),P=x("i72Y"),B=x.n(P),J=x("wd/R"),re=x.n(J),he=m.a.createElement(K.a,{style:{fontSize:24},spin:!0});function we(oe){return oe.replace(/\\u([\dA-Za-z]{4})/g,function(se,be){return String.fromCharCode(parseInt("0x"+be))})}function ke(oe){oe||(oe=window.location.search);var se=oe.substr(1),be={};return se.split("&").forEach(function(ie){var de=ie.split("=");be[de[0]]=decodeURIComponent(de[1])}),be}var ne={loading:!0,isLarge:!1,showClipBoardBox:!1,transferContent:"",mes:"\u5B9E\u9A8C\u73AF\u5883\u51C6\u5907\u4E2D"},Oe;(function(oe){oe[oe.SET_LOADING=0]="SET_LOADING",oe[oe.SET_IS_LARGE=1]="SET_IS_LARGE",oe[oe.SET_MES=2]="SET_MES",oe[oe.SET_STATE=3]="SET_STATE",oe[oe.SHOW_CLIPBOARD_BOX=4]="SHOW_CLIPBOARD_BOX",oe[oe.SET_TRANSFER_CONTENT=5]="SET_TRANSFER_CONTENT",oe[oe.UPDATE_ALL=6]="UPDATE_ALL"})(Oe||(Oe={}));function Ce(oe,se){switch(se.type){case Oe.SET_LOADING:return Object(r.a)(Object(r.a)({},oe),{},{loading:se.payload});case Oe.SET_IS_LARGE:return Object(r.a)({},Object(r.a)(Object(r.a)({},oe),{},{isLarge:se.payload}));case Oe.SET_MES:return Object(r.a)(Object(r.a)({},oe),{},{mes:se.payload});case Oe.SET_STATE:return Object(r.a)(Object(r.a)({},oe),se.payload);case Oe.SET_TRANSFER_CONTENT:return Object(r.a)(Object(r.a)({},oe),{},{transferContent:se.payload});case Oe.SHOW_CLIPBOARD_BOX:return Object(r.a)(Object(r.a)({},oe),{},{showClipBoardBox:se.payload});case Oe.UPDATE_ALL:return Object(r.a)({loading:oe.loading},se.payload);default:throw new Error}}var fe=X.a=function(oe){var se,be=oe.vnc_url,ie=oe.window_vnc_url,de=oe.linux_vnc,Fe=oe.virtual_machine,ae=oe.taskId,Z=oe.taskData,Y=Object(f.useRef)(),q=Object(f.useRef)(),ve=Object(f.useRef)(),pe=Object(f.useRef)(),Te=Object(f.useState)(),Ne=Object(e.a)(Te,2),me=Ne[0],Ie=Ne[1],_e=Object(f.useState)(!1),Ve=Object(e.a)(_e,2),tt=Ve[0],Ge=Ve[1],Le=Object(f.useReducer)(Ce,ne),bt=Object(e.a)(Le,2),Re=bt[0],Xe=bt[1],et=Object(f.useState)(0),Ye=Object(e.a)(et,2),Me=Ye[0],Ke=Ye[1],ge=Re.mes,Ee=Re.loading,ce=Re.showClipBoardBox,je=Re.isLarge,Qe=Re.transferContent,te=Object(f.useState)(0),Je=Object(e.a)(te,2),ut=Je[0],Be=Je[1],qe=Object(f.useRef)(),at=Object(D.i)(),wt=at;Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",st),function(){var Dt,Mt;(Dt=q.current)===null||Dt===void 0||((Mt=Dt.disconnect)===null||Mt===void 0)||Mt.call(Dt),window.removeEventListener("visibilitychange",st)}},[]),Object(f.useEffect)(function(){return window.sessionStorage.imageId=me,function(){window.sessionStorage.removeItem("imageId")}},[me]);var ft=function(){var Mt,Wt;(Z==null||((Mt=Z.shixun)===null||Mt===void 0)?void 0:Mt.windows_connection_mode)==="rdp"?setTimeout(function(){Ht()},1500):(ve==null||((Wt=ve.current)===null||Wt===void 0)?void 0:Wt.resizeSession)!==void 0&&(Object(F.a)()?ve.current.resizeSession=!0:setTimeout(function(){ve.current.resizeSession=!1},900))};Object(f.useEffect)(function(){return window.addEventListener("visibilitychange",st),document.addEventListener(Object(F.c)(),ft),function(){document.removeEventListener(Object(F.c)(),ft),window.removeEventListener("visibilitychange",st)}},[]);var st=function(Mt){if(document.visibilityState==="visible"){var Wt=sessionStorage.vncPageLeaveTime;re()(new Date).diff(re()(Wt),"minutes")>2&&Ke(new Date().getTime()),sessionStorage.removeItem("vncPageLeaveTime")}else sessionStorage.vncPageLeaveTime=new Date};function Pe(){Xe({type:Oe.SHOW_CLIPBOARD_BOX,payload:!1})}function ze(){Xe({type:Oe.SET_IS_LARGE,payload:!je})}function yt(Dt){var Mt;return Y.current&&(Mt=new E.default(function(Wt){var Yt=Object(i.a)(Wt),mn;try{for(Yt.s();!(mn=Yt.n()).done;){var Qt,$t=mn.value;if((Z==null||((Qt=Z.shixun)===null||Qt===void 0)?void 0:Qt.windows_connection_mode)==="rdp"&&Ht(),$t.target.offsetHeight>0||$t.target.offsetWidth>0){var Kn;Dt==null||((Kn=Dt._eventHandlers)===null||Kn===void 0)||Kn.windowResize()}}}catch(hn){Yt.e(hn)}finally{Yt.f()}}),Mt.observe(Y.current)),Mt}var pt=function(){var Dt=Object(t.a)(u.a.mark(function Mt(){var Wt,Yt,mn,Qt,$t,Kn,hn,Rn,wn,Pn,Yn;return u.a.wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:return Kn=(Wt=ke())!==null&&Wt!==void 0&&Wt.homework_common_id?{homework_common_id:(Yt=ke())===null||Yt===void 0?void 0:Yt.homework_common_id}:{},Xt.next=3,Object(W.a)("/api/myshixuns/".concat((mn=Z.myshixun)===null||mn===void 0?void 0:mn.identifier,"/start.json"),{method:"get",params:Object(r.a)(Object(r.a)(Object(r.a)({},at),Kn),{},{template_id:me||""})});case 3:if(hn=Xt.sent,!(hn!=null&&(Qt=hn.data)!==null&&Qt!==void 0&&($t=Qt.data_list)!==null&&$t!==void 0&&$t.length)){Xt.next=7;break}return A.a.publish("pod-restrict-data",{identifier:hn==null||((Rn=hn.data)===null||Rn===void 0)?void 0:Rn.identifier,data_list:hn==null||((wn=hn.data)===null||wn===void 0)?void 0:wn.data_list}),Xt.abrupt("return");case 7:if(!((hn==null?void 0:hn.status)===-3)){Xt.next=9;break}return Xt.abrupt("return",new Promise(function(){var xn=Object(t.a)(u.a.mark(function Er(nr,Ir){return u.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:s.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var V=Object(t.a)(u.a.mark(function ee(){return u.a.wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return clearTimeout(qe.current),Be(0),le.next=4,Object(N.f)(at.taskId,hn==null?void 0:hn.message);case 4:return Ke(Me+1),le.abrupt("return");case 6:case"end":return le.stop()}},ee)}));function Q(){return V.apply(this,arguments)}return Q}()});case 1:case"end":return ue.stop()}},Er)}));return function(Er,nr){return xn.apply(this,arguments)}}()));case 9:if(!((hn==null?void 0:hn.status)===-1)){Xt.next=11;break}throw new String(hn==null?void 0:hn.message);case 11:return Fe&&(Object(C.W)("PVEAuthCookie",hn==null||((Pn=hn.data)===null||Pn===void 0||((Yn=Pn.cookie_options)===null||Yn===void 0))?void 0:Yn.cookies_value,1),Object(C.W)("PVELangCookie","zh_CN",1)),A.a.publish("update-windows-time",hn==null?void 0:hn.data),Xt.abrupt("return",hn);case 14:case"end":return Xt.stop()}},Mt)}));return function(){return Dt.apply(this,arguments)}}();Object(f.useEffect)(function(){var Dt,Mt;function Wt(Rn){ie&&(a.b.warn("\u7531\u4E8E\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8FDE\u63A5\u5931\u6548\uFF0C\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5Windows VNC\u670D\u52A1"),Xe({type:Oe.SET_LOADING,payload:!0}),Ke(Me+1))}A.a.subscribe("reset-linux-windows-loading",function(){Xe({type:Oe.SET_LOADING,payload:!0})}),A.a.subscribe("reset-linux-windos-vnc",function(){Ke(Me+1)});function Yt(){Be(100),clearTimeout(qe.current),setTimeout(function(){ve.current.resizeSession=!1,Xe({type:Oe.SET_LOADING,payload:!1})},1300),A.a.subscribe("send-ctrl-alt-delete",function(){var Rn;(Rn=Dt)===null||Rn===void 0||Rn.sendCtrlAltDel()})}function mn(Rn){var wn=we(Rn.detail.text);Xe({type:Oe.SET_TRANSFER_CONTENT,payload:wn})}if((ie||be||de||Fe&&me)&&Y.current){var Qt;clearTimeout(qe.current),(Z==null||((Qt=Z.shixun)===null||Qt===void 0)?void 0:Qt.windows_connection_mode)==="rdp"&&Ht(),new Promise(Object(t.a)(u.a.mark(function Rn(){var wn,Pn,Yn,or,Xt,xn,Er,nr,Ir,qn,ue,V,Q;return u.a.wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return Pn=ke(),Yn="",Se.next=4,pt();case 4:if(Xt=Se.sent,!(de||Fe)){Se.next=11;break}return pe.current.src=(Xt==null||((xn=Xt.data)===null||xn===void 0)?void 0:xn.link_url)+"&time="+Date.now(),Xe({type:Oe.SET_STATE,payload:{loading:!1,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}}),Se.abrupt("return");case 11:ie?(or="Edu123",Yn=decodeURIComponent(Xt==null||((Er=Xt.data)===null||Er===void 0)?void 0:Er.link_url)):(Ir=new URL(decodeURIComponent(Xt==null||((nr=Xt.data)===null||nr===void 0)?void 0:nr.link_url)),qn=Ir.protocol,ue=Ir.searchParams,V=Ir.host,or=ue.get("password"),Yn="".concat(qn==="https:"?"wss":"ws","://").concat(V,"/").concat(Pn.path||"websockify"));case 12:if(!((Z==null||((wn=Z.shixun)===null||wn===void 0)?void 0:wn.windows_connection_mode)==="rdp")){Se.next=18;break}return yt(),pe.current.style.cssText=pe.current.style.cssText+"width:1920px;height:1080px;position:initial",pe.current.src="/rdp.html?tpiId=".concat(Z==null||((Q=Z.myshixun)===null||Q===void 0)?void 0:Q.id),Xe({type:Oe.SET_LOADING,payload:!1}),Se.abrupt("return");case 18:Dt=new S.a(Y.current,Yn,{credentials:{password:or},wsProtocols:["binary"],resize:"scale",show_dot:!0}),Mt=yt(Dt),Dt.viewOnly=Pn.view_only||!1,ie?Dt.scaleViewport=!0:Dt.scaleViewport=Pn.scale||!1,Dt.scaleViewport=Pn.scale||!0,Dt.showDotCursor=!0,Dt.resizeSession=!0,ve.current=Dt,Dt.addEventListener("disconnect",Wt),Dt.addEventListener("connect",Yt),Dt.addEventListener("clipboard",mn);case 29:case"end":return Se.stop()}},Rn)})));var $t=A.a.subscribe("vnc-reseting",function(){Be(0),Xe({type:Oe.SET_STATE,payload:{loading:!0,mes:"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u4E2D"}})}),Kn=A.a.subscribe("vnc-enlarge",function(Rn){}),hn=A.a.subscribe("show-clipboard-box",function(){Xe({type:Oe.SHOW_CLIPBOARD_BOX,payload:!0})});return Be(0),function(){var Rn,wn,Pn,Yn;(Rn=Dt)===null||Rn===void 0||Rn.removeEventListener("disconnect",Wt),(wn=Dt)===null||wn===void 0||wn.removeEventListener("connect",Yt),(Pn=Dt)===null||Pn===void 0||Pn.removeEventListener("clipboard",mn),$t(),Kn(),hn(),(Yn=Mt)===null||Yn===void 0||Yn.unobserve(Y.current)}}},[be,ie,de,Me,me]),Object(f.useEffect)(function(){var Dt,Mt;if(Fe&&(Z==null||((Dt=Z.shixun_virtual_templates)===null||Dt===void 0)?void 0:Dt.length)===1){var Wt,Yt;Ie(Z==null||((Wt=Z.shixun_virtual_templates)===null||Wt===void 0||((Yt=Wt[0])===null||Yt===void 0))?void 0:Yt.template_id)}else Fe&&(Z==null||((Mt=Z.shixun_virtual_templates)===null||Mt===void 0)?void 0:Mt.length)>1&&Ge(!0)},[Fe]);function Bt(Dt){var Mt;(Mt=ve.current)===null||Mt===void 0||Mt.clipboardPasteFrom(Dt),Xe({type:Oe.SET_TRANSFER_CONTENT,payload:Dt}),a.b.success("\u4FDD\u5B58\u6210\u529F\uFF01\u4F60\u53EF\u4EE5\u5728\u5B9E\u9A8C\u73AF\u5883\u4E2D\u7C98\u8D34\u8BE5\u5185\u5BB9"),Pe()}function Ht(){var Dt,Mt;Dt=Math.min(document.getElementById("task-right-panel").clientWidth/1920,document.getElementById("task-right-panel").clientHeight/1260),pe.current.parentElement.className="wh1080p",pe.current.parentElement.style.cssText="transform:scale(".concat(Dt,");transform-origin:center center"),Y.current.style.cssText="translate(-50%, -50%) scale("+Dt+")"}Object(f.useEffect)(function(){ut==0&&(clearTimeout(qe.current),lt())},[ut]);var lt=function Dt(){ut>99?ut=99:(ut=ut+1,qe.current=setTimeout(function(){Dt()},1500)),ut<100&&Be(ut)},Lt=Object(f.useMemo)(function(){var Dt;return Ee?"none":de||Fe||ie&&(Z==null||((Dt=Z.shixun)===null||Dt===void 0)?void 0:Dt.windows_connection_mode)==="rdp"?"block":"none"},[de,Ee,Fe,ie]);return m.a.createElement(f.Fragment,null,tt&&m.a.createElement("div",{className:B.a.selectImage},m.a.createElement("section",{className:B.a.container},m.a.createElement("h1",null,"\u9009\u62E9\u89D2\u8272"),m.a.createElement("aside",null,Z==null||((se=Z.shixun_virtual_templates)===null||se===void 0)?void 0:se.map(function(Dt,Mt){return m.a.createElement(y.a,{align:"middle",key:Mt},m.a.createElement(p.a,{flex:"1"},Dt.template_name),m.a.createElement(p.a,null,m.a.createElement(o.a,{type:"primary",onClick:function(){Ie(Dt.template_id),Ge(!1)}},"\u5F00\u59CB\u5B9E\u9A8C")))})))),je&&m.a.createElement("a",{className:"btn-vnc-resize",onClick:ze},m.a.createElement("i",{className:"iconfont icon-tuichuquanping"})),m.a.createElement("div",{style:{width:"100%",height:"calc(100% - 50px)",overflow:"hidden",position:"absolute",display:Lt==="block"?"flex":"none",alignItems:"center",justifyContent:"center",zIndex:6}},m.a.createElement("div",null,m.a.createElement("iframe",{style:{position:je?"fixed":"absolute",left:0,top:je?54:40,width:"100%",height:"calc(100% - ".concat(je?"100px":"45px",")")},frameBorder:"0",ref:pe,allowFullScreen:!0}))),m.a.createElement("div",{style:{position:je?"fixed":"absolute",left:0,top:je?54:40,zIndex:5,width:"100%",height:"calc(100% - ".concat(je?"100px":"45px",")")},className:"".concat(ie?"vnc-panel-wrapper-windows":"vnc-panel-wrapper"," ").concat(je?"full-screen":"")},Ee?m.a.createElement(l.a,{message:ge,style:{color:"#0152d9"}},m.a.createElement("div",{className:"tc",style:{width:500,margin:"0 auto",color:"#FFF"}},m.a.createElement(_.a,{percent:ut,format:function(Mt){return m.a.createElement("span",{className:"c-white"},Mt,"%")}}))):null,m.a.createElement("div",{ref:Y,className:"vnc-panel ".concat(Ee?"hidden zIndexf1":"animated fadeIn")})),m.a.createElement(b.a,null,m.a.createElement(s.a,{title:"\u590D\u5236\u7C98\u8D34",centered:!0,maskClosable:!1,visible:ce,onCancel:Pe,footer:null},m.a.createElement(G,{onCancel:Pe,onSave:Bt,content:Qe}))))}},qgvg:function(U,X){U.exports="data:image/gif;base64,R0lGODlhFAAQAOZVAD6Q33p6ezZto2VnaW5vcDuCxiYvNysvM1tdXzNij5eXlyg0QTA0OExOUWZnaS8zN19hYzFYf0Oi/Sg1QoeHh2JjZWZoaTdzrTRmljl5tzFZgDBWez6P3Tl4tjl8uzdxqWBiYys/VCUqL39/gHV2dy4yNScyPDJeiEpNTzk8P0CX6jc7PiYuNWlqaywwNDZtojAzNytDWScrLitAVUGb8Xl6eoWFhTp+wDNgjWRmZ4+QkFdZWzo9QIODgyo/Uzh3syg0QCczPmprbTRllW9wcSotMVJUVjZupDuEylBSVUGb8kxPUZGRkTd0rUGc82JkZUKe9j2M1zg7P4iIiEOj/yUpLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/wtYTVAgRGF0YVhNUDw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0U3Nzk1NkY5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0U3Nzk1NzA5QkRGMTFFQUIzQzFDQjY5MEVFODZDMDciPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RTc3OTU2RDlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RTc3OTU2RTlCREYxMUVBQjNDMUNCNjkwRUU4NkMwNyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAUyAFUALAAAAAAUABAAAAd5gFWCg4RSLoSIiVUPFlNEhAwDCIoyST1TUwGCBwM6AweJPCSYmJpVCAMMgykgFRUtFKSlilVCsreZtAS4sqaJu7yzisDBvhAKyBDEvL6Iy7jNhA7BwoklKA0NRiO30bRFOzakpqiqtItPsTWbA0wWoOcrOUuEMA6TgQAh+QQFMgBVACwAAAAAFAAQAAAHeIBVgoOEISaEiIlVExlUSIQLAgmKIidOVFQAggYCNAIGiTFRmJiaVQkCC4MzHxcXHhKkpYpVN7K3mbQFuLKmibu8s4rAwb4YpBjEvL6IyrjMhB3BwolBGxEROCq30LQsQ1CkpqiqtItNsRybAkpHoOY+PxqEQC+TgQA7"},qu8F:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){/** @preserve
|
|
|
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
|
* derived from CryptoJS.mode.CTR
|
|
|
* Jan Hruby jhruby.web@gmail.com
|
|
|
*/return I.mode.CTRGladman=function(){var _=I.lib.BlockCipherMode.extend();function O(o){if((o>>24&255)===255){var g=o>>16&255,p=o>>8&255,d=o&255;g===255?(g=0,p===255?(p=0,d===255?d=0:++d):++p):++g,o=0,o+=g<<16,o+=p<<8,o+=d}else o+=1<<24;return o}function y(o){return(o[0]=O(o[0]))===0&&(o[1]=O(o[1])),o}var v=_.Encryptor=_.extend({processBlock:function(o,g){var p=this._cipher,d=p.blockSize,a=this._iv,n=this._counter;a&&(n=this._counter=a.slice(0),this._iv=void 0),y(n);var s=n.slice(0);p.encryptBlock(s,0);for(var t=0;t<d;t++)o[g+t]^=s[t]}});return _.Decryptor=v,_}(),I.mode.CTRGladman})},"rAM+":function(U,X,x){"use strict";x.d(X,"a",function(){return _});var I=x("Qw5x");function _(O,y){var v;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(v=Object(I.a)(O))||y&&O&&typeof O.length=="number"){v&&(O=v);var o=0,g=function(){};return{s:g,n:function(){return o>=O.length?{done:!0}:{done:!1,value:O[o++]}},e:function(s){throw s},f:g}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,d=!1,a;return{s:function(){v=O[Symbol.iterator]()},n:function(){var s=v.next();return p=s.done,s},e:function(s){d=!0,a=s},f:function(){try{!p&&v.return!=null&&v.return()}finally{if(d)throw a}}}}},rHrb:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.CopyToClipboard=void 0;var I=O(x("q1tI")),_=O(x("+QRC"));function O(f){return f&&f.__esModule?f:{default:f}}function y(f){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(l){return typeof l}:y=function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},y(f)}function v(f,m){var l=Object.keys(f);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(f);m&&(E=E.filter(function(b){return Object.getOwnPropertyDescriptor(f,b).enumerable})),l.push.apply(l,E)}return l}function o(f){for(var m=1;m<arguments.length;m++){var l=arguments[m]!=null?arguments[m]:{};m%2?v(l,!0).forEach(function(E){c(f,E,l[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(l)):v(l).forEach(function(E){Object.defineProperty(f,E,Object.getOwnPropertyDescriptor(l,E))})}return f}function g(f,m){if(f==null)return{};var l=p(f,m),E,b;if(Object.getOwnPropertySymbols){var D=Object.getOwnPropertySymbols(f);for(b=0;b<D.length;b++){if(E=D[b],m.indexOf(E)>=0)continue;if(!Object.prototype.propertyIsEnumerable.call(f,E))continue;l[E]=f[E]}}return l}function p(f,m){if(f==null)return{};var l={},E=Object.keys(f),b,D;for(D=0;D<E.length;D++){if(b=E[D],m.indexOf(b)>=0)continue;l[b]=f[b]}return l}function d(f,m){if(!(f instanceof m))throw new TypeError("Cannot call a class as a function")}function a(f,m){for(var l=0;l<m.length;l++){var E=m[l];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(f,E.key,E)}}function n(f,m,l){return m&&a(f.prototype,m),l&&a(f,l),f}function s(f,m){return m&&(y(m)==="object"||typeof m=="function")?m:i(f)}function t(f){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(l){return l.__proto__||Object.getPrototypeOf(l)},t(f)}function i(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function e(f,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(m&&m.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),m&&r(f,m)}function r(f,m){return r=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},r(f,m)}function c(f,m,l){return m in f?Object.defineProperty(f,m,{value:l,enumerable:!0,configurable:!0,writable:!0}):f[m]=l,f}var u=function(f){e(m,f);function m(){var l,E;d(this,m);for(var b=arguments.length,D=new Array(b),C=0;C<b;C++)D[C]=arguments[C];return E=s(this,(l=t(m)).call.apply(l,[this].concat(D))),c(i(E),"onClick",function(w){var S=E.props,A=S.text,R=S.onCopy,k=S.children,L=S.options,M=I.default.Children.only(k),G=(0,_.default)(A,L);R&&R(A,G),M&&M.props&&typeof M.props.onClick=="function"&&M.props.onClick(w)}),E}return n(m,[{key:"render",value:function(){var E=this.props,b=E.text,D=E.onCopy,C=E.options,w=E.children,S=g(E,["text","onCopy","options","children"]),A=I.default.Children.only(w);return I.default.cloneElement(A,o({},S,{onClick:this.onClick}))}}]),m}(I.default.PureComponent);X.CopyToClipboard=u,c(u,"defaultProps",{onCopy:void 0,options:void 0})},rUJ1:function(U,X){const x=/[&<>"']/,I=/[&<>"']/g,_=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,y={"&":"&","<":"<",">":">",'"':""","'":"'"},v=C=>y[C];function o(C,w){if(w){if(x.test(C))return C.replace(I,v)}else if(_.test(C))return C.replace(O,v);return C}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function p(C){return C.replace(g,(w,S)=>(S=S.toLowerCase(),S==="colon"?":":S.charAt(0)==="#"?S.charAt(1)==="x"?String.fromCharCode(parseInt(S.substring(2),16)):String.fromCharCode(+S.substring(1)):""))}const d=/(^|[^\[])\^/g;function a(C,w){C=C.source||C,w=w||"";const S={replace:(A,R)=>(R=R.source||R,R=R.replace(d,"$1"),C=C.replace(A,R),S),getRegex:()=>new RegExp(C,w)};return S}const n=/[^\w:]/g,s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function t(C,w,S){if(C){let A;try{A=decodeURIComponent(p(S)).replace(n,"").toLowerCase()}catch(R){return null}if(A.indexOf("javascript:")===0||A.indexOf("vbscript:")===0||A.indexOf("data:")===0)return null}w&&!s.test(S)&&(S=u(w,S));try{S=encodeURI(S).replace(/%25/g,"%")}catch(A){return null}return S}const i={},e=/^[^:]+:\/*[^/]*$/,r=/^([^:]+:)[\s\S]*$/,c=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(C,w){i[" "+C]||(e.test(C)?i[" "+C]=C+"/":i[" "+C]=E(C,"/",!0)),C=i[" "+C];const S=C.indexOf(":")===-1;return w.substring(0,2)==="//"?S?w:C.replace(r,"$1")+w:w.charAt(0)==="/"?S?w:C.replace(c,"$1")+w:C+w}const f={exec:function(){}};function m(C){let w=1,S,A;for(;w<arguments.length;w++){S=arguments[w];for(A in S)Object.prototype.hasOwnProperty.call(S,A)&&(C[A]=S[A])}return C}function l(C,w){const S=C.replace(/\|/g,(k,L,M)=>{let G=!1,W=L;for(;--W>=0&&M[W]==="\\";)G=!G;return G?"|":" |"}),A=S.split(/ \|/);let R=0;if(A.length>w)A.splice(w);else for(;A.length<w;)A.push("");for(;R<A.length;R++)A[R]=A[R].trim().replace(/\\\|/g,"|");return A}function E(C,w,S){const A=C.length;if(A===0)return"";let R=0;for(;R<A;){const k=C.charAt(A-R-1);if(k===w&&!S)R++;else if(k!==w&&S)R++;else break}return C.substr(0,A-R)}function b(C,w){if(C.indexOf(w[1])===-1)return-1;const S=C.length;let A=0,R=0;for(;R<S;R++)if(C[R]==="\\")R++;else if(C[R]===w[0])A++;else if(C[R]===w[1]&&(A--,A<0))return R;return-1}function D(C){C&&C.sanitize&&!C.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}U.exports={escape:o,unescape:p,edit:a,cleanUrl:t,resolveUrl:u,noopTest:f,merge:m,splitCells:l,rtrim:E,findClosingBracket:b,checkSanitizeDeprecation:D}},rdUC:function(U,X,x){var I=x("MFOe"),_=I.Global;U.exports={name:"localStorage",read:y,write:v,each:o,remove:g,clearAll:p};function O(){return _.localStorage}function y(d){return O().getItem(d)}function v(d,a){return O().setItem(d,a)}function o(d){for(var a=O().length-1;a>=0;a--){var n=O().key(a);d(y(n),n)}}function g(d){return O().removeItem(d)}function p(){return O().clear()}},rwxt:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=x("GdRQ");function _(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function O(g,p){for(var d=0;d<p.length;d++){var a=p[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(g,a.key,a)}}function y(g,p,d){return p&&O(g.prototype,p),d&&O(g,d),g}var v=!I.supportsCursorURIs||I.isTouchDevice,o=function(){function g(){_(this,g),this._target=null,this._canvas=document.createElement("canvas"),v&&(this._canvas.style.position="fixed",this._canvas.style.zIndex="65535",this._canvas.style.pointerEvents="none",this._canvas.style.visibility="hidden"),this._position={x:0,y:0},this._hotSpot={x:0,y:0},this._eventHandlers={mouseover:this._handleMouseOver.bind(this),mouseleave:this._handleMouseLeave.bind(this),mousemove:this._handleMouseMove.bind(this),mouseup:this._handleMouseUp.bind(this)}}return y(g,[{key:"attach",value:function(d){if(this._target&&this.detach(),this._target=d,v){document.body.appendChild(this._canvas);var a={capture:!0,passive:!0};this._target.addEventListener("mouseover",this._eventHandlers.mouseover,a),this._target.addEventListener("mouseleave",this._eventHandlers.mouseleave,a),this._target.addEventListener("mousemove",this._eventHandlers.mousemove,a),this._target.addEventListener("mouseup",this._eventHandlers.mouseup,a)}this.clear()}},{key:"detach",value:function(){if(!this._target)return;if(v){var d={capture:!0,passive:!0};this._target.removeEventListener("mouseover",this._eventHandlers.mouseover,d),this._target.removeEventListener("mouseleave",this._eventHandlers.mouseleave,d),this._target.removeEventListener("mousemove",this._eventHandlers.mousemove,d),this._target.removeEventListener("mouseup",this._eventHandlers.mouseup,d),document.body.removeChild(this._canvas)}this._target=null}},{key:"change",value:function(d,a,n,s,t){if(s===0||t===0){this.clear();return}this._position.x=this._position.x+this._hotSpot.x-a,this._position.y=this._position.y+this._hotSpot.y-n,this._hotSpot.x=a,this._hotSpot.y=n;var i=this._canvas.getContext("2d");this._canvas.width=s,this._canvas.height=t;var e;try{e=new ImageData(new Uint8ClampedArray(d),s,t)}catch(c){e=i.createImageData(s,t),e.data.set(new Uint8ClampedArray(d))}if(i.clearRect(0,0,s,t),i.putImageData(e,0,0),v)this._updatePosition();else{var r=this._canvas.toDataURL();this._target.style.cursor="url("+r+")"+a+" "+n+", default"}}},{key:"clear",value:function(){this._target.style.cursor="none",this._canvas.width=0,this._canvas.height=0,this._position.x=this._position.x+this._hotSpot.x,this._position.y=this._position.y+this._hotSpot.y,this._hotSpot.x=0,this._hotSpot.y=0}},{key:"move",value:function(d,a){if(!v)return;window.visualViewport?(this._position.x=d+window.visualViewport.offsetLeft,this._position.y=a+window.visualViewport.offsetTop):(this._position.x=d,this._position.y=a),this._updatePosition();var n=document.elementFromPoint(d,a);this._updateVisibility(n)}},{key:"_handleMouseOver",value:function(d){this._handleMouseMove(d)}},{key:"_handleMouseLeave",value:function(d){this._updateVisibility(d.relatedTarget)}},{key:"_handleMouseMove",value:function(d){this._updateVisibility(d.target),this._position.x=d.clientX-this._hotSpot.x,this._position.y=d.clientY-this._hotSpot.y,this._updatePosition()}},{key:"_handleMouseUp",value:function(d){var a=this,n=document.elementFromPoint(d.clientX,d.clientY);this._updateVisibility(n),this._captureIsActive()&&window.setTimeout(function(){if(!a._target)return;n=document.elementFromPoint(d.clientX,d.clientY),a._updateVisibility(n)},0)}},{key:"_showCursor",value:function(){this._canvas.style.visibility==="hidden"&&(this._canvas.style.visibility="")}},{key:"_hideCursor",value:function(){this._canvas.style.visibility!=="hidden"&&(this._canvas.style.visibility="hidden")}},{key:"_shouldShowCursor",value:function(d){return d?d===this._target?!0:this._target.contains(d)?!(window.getComputedStyle(d).cursor!=="none"):!1:!1}},{key:"_updateVisibility",value:function(d){this._captureIsActive()&&(d=document.captureElement),this._shouldShowCursor(d)?this._showCursor():this._hideCursor()}},{key:"_updatePosition",value:function(){this._canvas.style.left=this._position.x+"px",this._canvas.style.top=this._position.y+"px"}},{key:"_captureIsActive",value:function(){return document.captureElement&&document.documentElement.contains(document.captureElement)}}]),g}();X.default=o},sR1s:function(U,X,x){"use strict";x.d(X,"b",function(){return y}),x.d(X,"a",function(){return v}),x.d(X,"c",function(){return o}),x.d(X,"d",function(){return g});var I=x("U8pU"),_="RC_TABLE_KEY";function O(p){return p==null?[]:Array.isArray(p)?p:[p]}function y(p,d){if(!d&&typeof d!="number")return p;for(var a=O(d),n=p,s=0;s<a.length;s+=1){if(!n)return null;var t=a[s];n=n[t]}return n}function v(p){var d=[],a={};return p.forEach(function(n){for(var s=n||{},t=s.key,i=s.dataIndex,e=t||O(i).join("-")||_;a[e];)e="".concat(e,"_next");a[e]=!0,d.push(e)}),d}function o(){var p={};function d(t,i){i&&Object.keys(i).forEach(function(e){var r=i[e];r&&Object(I.a)(r)==="object"?(t[e]=t[e]||{},d(t[e],r)):t[e]=r})}for(var a=arguments.length,n=new Array(a),s=0;s<a;s++)n[s]=arguments[s];return n.forEach(function(t){d(p,t)}),p}function g(p){return p!=null}},sboe:function(U,X,x){"use strict";x.d(X,"a",function(){return O});var I=x("q1tI"),_=x.n(I),O=I.createContext(null)},sjKO:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=O;var I=30,_=12;function O(y,v){var o,g,p,d,a,n,s,t,i,e,r,c,u,f,m,l,E,b,D,C,w,S,A,R,k;o=y.state,g=y.next_in,R=y.input,p=g+(y.avail_in-5),d=y.next_out,k=y.output,a=d-(v-y.avail_out),n=d+(y.avail_out-257),s=o.dmax,t=o.wsize,i=o.whave,e=o.wnext,r=o.window,c=o.hold,u=o.bits,f=o.lencode,m=o.distcode,l=(1<<o.lenbits)-1,E=(1<<o.distbits)-1;e:do{u<15&&(c+=R[g++]<<u,u+=8,c+=R[g++]<<u,u+=8),b=f[c&l];t:for(;;){if(D=b>>>24,c>>>=D,u-=D,D=b>>>16&255,D===0)k[d++]=b&65535;else if(D&16){C=b&65535,D&=15,D&&(u<D&&(c+=R[g++]<<u,u+=8),C+=c&(1<<D)-1,c>>>=D,u-=D),u<15&&(c+=R[g++]<<u,u+=8,c+=R[g++]<<u,u+=8),b=m[c&E];n:for(;;){if(D=b>>>24,c>>>=D,u-=D,D=b>>>16&255,D&16){if(w=b&65535,D&=15,u<D&&(c+=R[g++]<<u,u+=8,u<D&&(c+=R[g++]<<u,u+=8)),w+=c&(1<<D)-1,w>s){y.msg="invalid distance too far back",o.mode=I;break e}if(c>>>=D,u-=D,D=d-a,w>D){if(D=w-D,D>i&&o.sane){y.msg="invalid distance too far back",o.mode=I;break e}if(S=0,A=r,e===0){if(S+=t-D,D<C){C-=D;do k[d++]=r[S++];while(--D);S=d-w,A=k}}else if(e<D){if(S+=t+e-D,D-=e,D<C){C-=D;do k[d++]=r[S++];while(--D);if(S=0,e<C){D=e,C-=D;do k[d++]=r[S++];while(--D);S=d-w,A=k}}}else if(S+=e-D,D<C){C-=D;do k[d++]=r[S++];while(--D);S=d-w,A=k}for(;C>2;)k[d++]=A[S++],k[d++]=A[S++],k[d++]=A[S++],C-=3;C&&(k[d++]=A[S++],C>1&&(k[d++]=A[S++]))}else{S=d-w;do k[d++]=k[S++],k[d++]=k[S++],k[d++]=k[S++],C-=3;while(C>2);C&&(k[d++]=k[S++],C>1&&(k[d++]=k[S++]))}}else if((D&64)===0){b=m[(b&65535)+(c&(1<<D)-1)];continue n}else{y.msg="invalid distance code",o.mode=I;break e}break}}else if((D&64)===0){b=f[(b&65535)+(c&(1<<D)-1)];continue t}else if(D&32){o.mode=_;break e}else{y.msg="invalid literal/length code",o.mode=I;break e}break}}while(g<p&&d<n);C=u>>3,g-=C,u-=C<<3,c&=(1<<u)-1,y.next_in=g,y.next_out=d,y.avail_in=g<p?5+(p-g):5-(g-p),y.avail_out=d<n?257+(n-d):257-(d-n),o.hold=c,o.bits=u;return}},t23M:function(U,X,x){"use strict";var I=x("VTBJ"),_=x("1OyB"),O=x("vuIU"),y=x("Ji7U"),v=x("LK+K"),o=x("q1tI"),g=x.n(o),p=x("m+aA"),d=x("Zm9Q"),a=x("Kwbf"),n=x("c+Xe"),s=x("bdgK"),t="rc-observer-key",i=function(e){Object(y.a)(c,e);var r=Object(v.a)(c);function c(){var u;return Object(_.a)(this,c),u=r.apply(this,arguments),u.resizeObserver=null,u.childNode=null,u.currentElement=null,u.state={width:0,height:0,offsetHeight:0,offsetWidth:0},u.onResize=function(f){var m=u.props.onResize,l=f[0].target,E=l.getBoundingClientRect(),b=E.width,D=E.height,C=l.offsetWidth,w=l.offsetHeight,S=Math.floor(b),A=Math.floor(D);if(u.state.width!==S||u.state.height!==A||u.state.offsetWidth!==C||u.state.offsetHeight!==w){var R={width:S,height:A,offsetWidth:C,offsetHeight:w};u.setState(R),m&&Promise.resolve().then(function(){m(Object(I.a)(Object(I.a)({},R),{},{offsetWidth:C,offsetHeight:w}))})}},u.setChildNode=function(f){u.childNode=f},u}return Object(O.a)(c,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var f=this.props.disabled;if(f){this.destroyObserver();return}var m=Object(p.a)(this.childNode||this),l=m!==this.currentElement;l&&(this.destroyObserver(),this.currentElement=m),!this.resizeObserver&&m&&(this.resizeObserver=new s.default(this.onResize),this.resizeObserver.observe(m))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var f=this.props.children,m=Object(d.a)(f);if(m.length>1)Object(a.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(m.length===0)return Object(a.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var l=m[0];if(o.isValidElement(l)&&Object(n.c)(l)){var E=l.ref;m[0]=o.cloneElement(l,{ref:Object(n.a)(E,this.setChildNode)})}return m.length===1?m[0]:m.map(function(b,D){return!o.isValidElement(b)||"key"in b&&b.key!==null?b:o.cloneElement(b,{key:"".concat(t,"-").concat(D)})})}}]),c}(o.Component);i.displayName="ResizeObserver",X.a=i},tUsH:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAHGUlEQVRYR7WZW2xcVxWGv3XOjMfj8f2a2ImTNklpCoKASB9aQELNDCBuohJQKA+IkgohUYGEuLy0RUJQUUERSCAaXngAoT5QtaUqiluJB5KWFmgatcq1Nk0c2zO5NLFrezxzZi+0z4xn5sw54xlHYUkjWXuvvdd/1n1tC9dJxWzmDox+WFx5v1F9l8AEMAi4giyBZlXkLHBMSuYf7pY7nxP5kdmsONnMgbW5zK2Oy30ieo8q2zZzFlgW5E/GlA51bH3hlXbPtgVQL2S2l+L6oCpfb/fijfgsUE/04c7RqTOt7msJsJBNf0PgF0Cy1WWb2hdKavQ7HVue//XGH7PBbmEh87iIHmwpuFSCov154DgQdyHmlv9uQSL8PjY61VRGpAZVEe9i+imUTze9/51VuPoO5N6GghfNluqEkX7o74bOjuZQhWdiI1OfFUEbmSIBFnPpp5uCu3QN7M+C2wxZoMN90JeKPiU8Ex+d+kxLgE3NurgMb+VgeXUzsMK8gz1wy/bIO6LMHdBgJSB+GzptwZ04BxqyQI3VdZFEh//zfW/d/4wBY1Drn56HFoqQiMP7dkWCVNUH6gOnCtCmEi9mToEEozVfgGM23zaxTCIBnYkyMLFBIaCl5lo2iubzaH4NPnhLmE+wIbd3PQVVAXq59KFQnisZeO1sZBCIBZVMQjxWFSJbbUwJOvskuG5LV1AUvXksxGfzZGzs8L12wwdYrhB6IsR5ehauLIYvSHUhqa7gupPAee9j/lrpyEEkFW8J0DKoK+iOkRCvGnO7rTg+wGI28yjodwNcuaswPdceOPul43cjowd8fvPWs3DxKYjVtLsRWjOYgv5gdAtyKDZ2+H4foJdLnw/UVq8Eb8zAaiFwryQSSF9PWFasG+c9Pwusl45+E2lQcjOQqgbdtaVxezk2ekev+F0JeiSovbdher49cFZ72+5Bhj8S4DezU+jcE0hHe6Y2/UmwKaiOxOinpDif/j4OjwR2zl4oJ+M6cgb6AwFR3eoYxLntx5HK8V58ACfZpMo0nFAHdOdocFXkEfFymT+r6hcDO6+egbVidSlgWnEhOYF0jkPnBCTHkZ69kQD18nHwLoN3CV2dheUZ0CaAVTG7GiJa5G9SyKZfFdhXlWAT68snAwLd274CPTuRrkmI92/k7633vCV05TyszKALzwbdYksfdCVqioGzUsymc0Atzq3mrAbXKebiDA4gE59HRj7aGkAbHDp/GF14EiTYCpjhHuit1QnbmVuAVue1rGq7lNdnal9Rl/Nk/F5k9M42IDRnMRdewLzxO5/BL429PVWgZqALBrqDgVLMpoMFdiUPx6erTM5AH8QrkSgOsu1ryNAHrgukZl+idPyXoMaPbh9cXc9ohlKhbke8bGZR0Vp82xz4r1M1gEMDwbLlppDJ+5C+WzcFUq+8Tum1n0Nx2c8GjgXXUA7N+AB01tKSb2Ivmz6jsDsg7d+ny90x4IwMhXyF+CCy436ke7ItkLr0X0rHHoXViz4oxyb7iCpjbhoJyBI/SHKZ51D9eECS9UHri80AWv/Z+jlkLN0WQFv6zKk/gCM4fb01l6k/rQbTWE1sminmMj9F9QcBSeeyMHe5DLDRxBVG2fFVZOD2tgBq9p++eaWvt9yWRVDzRD1/4JPqyF8DZ+oiORAkdUzO7m9Dd0Q/FyV88U1KL/0w2l0q/NrfhQ42RLAtdaoPOV7uqO2pgu3EyXP+3CE93UiyMyTWefdP2k/ahWt4fz/o51N/2guRYsJ9YblZsLxeNvO40jBeXrwKb8754CzIRnL2/SawpCvzZT8rFXD2fAnp2xPY9w5/AenvRTrCJtbuBDraF+APtFuF+bv2i+O8HEJx+jwsruIMhstbFWD+Emb2ecz0X2rH43FkaD/OzXdXI90HGGENtRPCTQ1Ngm1k6xvWihb/qOiXQyBfOeV3z7bFr5Kbwtn7IJo9Sun0E1BcKm9ZYJa3I+4PR5o3OFsP4Ex+DO/F7yFxL9iJ2wZh5wi4wQE/1PLbu/O59B4XTqB1Zc9urOSRk7O+eaqUnACnE73wHx+I3/Mlk5ERqmsFkGEwCoV5pLfmLmZioDzh1VOzocnyFBYOfEtEfhXSYtFDZnJIQ3LVa4uVia5OuxEhYJf8KS6fR/qtrylmcjgyYJqOnev3Rk53lU1n2jY+FbLDYRuTWyNef0jaPuwn7UZqObivH9jo6UPmriCrxXD5a6K52rKiqQQ61qSfbPfpwzdHq8cjY5BLS8jymrXWhqRWUz2dqJ3aGoKhenCzj0ftmLt6uX0OKXjImlcZExRs0MRd1AZAM1CVC67r+a1eJX7gOPJYKLpbmrQFw414wFwXYVNQTOXhyDx5HUBv6BNwQJvzd+13HPdgBWiTh76miP9/j+ihVKEPOaWFI59Q1/kQsE9Ud4OMrXfmN/LfEP8D/KDA5doYpwkAAAAASUVORK5CYII="},tWlo:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkVCNENBMTM0OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkVCNENBMTM1OENGMTExRTk4NzNCRkMxMzdBMjc5MEY5Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6RUI0Q0ExMzI4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6RUI0Q0ExMzM4Q0YxMTFFOTg3M0JGQzEzN0EyNzkwRjkiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7p3KzkAAAFvElEQVR42sRae0ybVRQ/peVRaFce8pwgj1Je5TFsEHGbMAkzmqiJyba4hYh/LJlxiRr9Z0aNGv8xvhKTGckM2zKWmGEgU7MsPnCZIrKBjMcKY9BCBMqjjEcLtFDwHPZVC12h934f8yS/P6Dfud/5nXvvueec+8neOPEuSCAxiDJEMSITkYKIRoQJv9sREwgTogfRjGhEjIt9sUKEbhSiEvEC4mGEbJNngxGRiAzEk8L/VhGtiPOIswgrjxEBHDrxiE8Qg4hPEYYtjPclMkGXxhhCfIFI2E4CNFtvIm4hXvdYHlJIKOIVRK/wjkCpCaQjWhAfIVSwfaIS3kHvypaKwLOI64hdcP+kAPEn4jmxBI4ivkXsgPsvNBt1gg1cBI4hvkLI4f8TuWDDMdYw+owQFdh3Y6gSCnL1oNOmQnxcHAQHB8HCwiLMzM7C8KgFjD23oN9khtXVVZZhyZZhxEV/CGQhalk9r1AoYO9jxfBokQGCgoK8SBHi42LBsCsfJq1TcOnHn+F2v4llJsimIoRx3Q8le0o9/6bwdRmRxGJ8ZEQ4vHjkEORkZYBcLvdrlvL0OeBwOuDv4RF/X0Ne2Y34GrHiaw+8ishnMT4tNRmOVlVCTPQDzKfY/vJ9kJWpY1Ej217ztYnpFHyH6UjGJXH4wPOgVIZw7VAi8XRFOSjkTKv1bc8T25PACdZDan95mV9LZjNRq1Wg02lZw+tbGwnQ/L/EMooyJASSkxIliZUp7ONUCTb/S+AI2cTqOZlMJgmBcI2GVUUp2LyOAJMwxvHN04EAnqQYDrsJUDFSyKrtdC5JRmDR4eBRoxokgQjs48nn5+fnJSNgt3ONRTaXEYFHeLSXlpd5Peclk1Yrr6ohQKhhuWR6ekYSAiOWMV7VDCKg5Z0/uwTLaNnlAssYd22fTgRieTRz9dmQlpIsmgCdwuWle3nVY4mAmkczLCxUsk0cEaHhVVUH8GqOT0xKRmB6ZpZX1UkE5ng0zeYhsNntkhBgqAs2yhwR4AoBrpUVaO/oEm38nelp6B/gJnCHCNzm1f79jxaWgsRLbDY7XKj/Dlb405I+ItDDqz2/sACnTp9DEqNc+qfO1MLwyKiYCewNEPov3EK+G59k39BOp3Nt+YiUViLQKNjBH8sV7EXNivhslgb4xb2J28SMtMSRmbrwBBYpZPOI+xw4J2aka23tzB4VETrdct6zoCECC7wjjWIy1tbewZT//9R4RYzxZOtZTwK0C2vEjHjT2Ov3sx2d3TA7ZxPzuhrB5nVdiQ8pNPPvKP+XkEjjbYKtXm0VOpHe5x01KDDI72dFtmI+EGz1IkDyOeIvnlETH/T/digqKoLXeLLts3UNgY0REXGQZpmpqtCmrjV1/ZWcrEzIzEhnTtwQhwQb/5vNDc1dkinak4gDsMUFSEhwMJQ9vhueqihnWhYBMhnokYRGowGLZRwcW9fWLsGxTV6HqA8F6sMfR5z0qiDUKsjQpoEuPQ1SsSILVPDd1FJTrDA/Fwry9NDX1w9dxh7MSs2+ytTjcI+7gc0IkHwpMD+JnpbnZGdCXk4WPJSUKFlHzj0bGTrtGqhZNjJqgQHzIHRjWMbzhd7/MqLaZxqzxfjVFU+UjhcZCs+gp7f9nowcszMhfg17SoptSKDyym9N9cbePt8O2GrQ5pbrDRMTkwbe6MQpN6hfFRUVWa+Qb+7je23ideLAtPdGZ/cUZpw1iTsTFtFLJcBwEc2RIryHqELvW2q/qQPT4JA4AmupL5aP/Saza8A0eDU2Jvr0DrWaNkEe3L32kULmhXV+cHHR8cOvV5tcDd9f8qvm9ouAW2Zm5yhpm5uwWi9HRoRXq1UqC9zt08cDe391VUiJPyaPo+F1zddaZy80XFyLRv52v2ViPrehiJSvz6Z7rthQpZI+t6E+K91yuj+3UXnkL+7PbYxCFdiIKfgYdTcohHZ23QTnEntd8Y8AAwCTubpzlq2wWAAAAABJRU5ErkJggg=="},taB1:function(U,X,x){U.exports={flex_box_center:"flex_box_center___ERnuX",flex_space_between:"flex_space_between___1CjDP",flex_box_vertical_center:"flex_box_vertical_center___71N1n",flex_box_center_end:"flex_box_center_end___3etWq",flex_box_column:"flex_box_column___26rae",files:"files___2Jd2C"}},uGsb:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("MlIO"),x("1uat"))})(this,function(I){return function(){var _=I,O=_.x64,y=O.Word,v=O.WordArray,o=_.algo,g=o.SHA512,p=o.SHA384=g.extend({_doReset:function(){this._hash=new v.init([new y.init(3418070365,3238371032),new y.init(1654270250,914150663),new y.init(2438529370,812702999),new y.init(355462360,4144912697),new y.init(1731405415,4290775857),new y.init(2394180231,1750603025),new y.init(3675008525,1694076839),new y.init(1203062813,3204075428)])},_doFinalize:function(){var d=g._doFinalize.call(this);return d.sigBytes-=16,d}});_.SHA384=g._createHelper(p),_.HmacSHA384=g._createHmacHelper(p)}(),I.SHA384})},uGxW:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("OLod"))})(this,function(I){return I.pad.NoPadding={pad:function(){},unpad:function(){}},I.pad.NoPadding})},uQRt:function(U,X,x){U.exports=I;function I(){return x("gaXo"),{}}},ulZh:function(U,X,x){typeof window!="undefined"&&function(_,O){U.exports=O()}(this,function(){return function(I){var _={};function O(y){if(_[y])return _[y].exports;var v=_[y]={i:y,l:!1,exports:{}};return I[y].call(v.exports,v,v.exports,O),v.l=!0,v.exports}return O.m=I,O.c=_,O.d=function(y,v,o){O.o(y,v)||Object.defineProperty(y,v,{enumerable:!0,get:o})},O.r=function(y){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(y,"__esModule",{value:!0})},O.t=function(y,v){if(v&1&&(y=O(y)),v&8)return y;if(v&4&&typeof y=="object"&&y&&y.__esModule)return y;var o=Object.create(null);if(O.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:y}),v&2&&typeof y!="string")for(var g in y)O.d(o,g,function(p){return y[p]}.bind(null,g));return o},O.n=function(y){var v=y&&y.__esModule?function(){return y.default}:function(){return y};return O.d(v,"a",v),v},O.o=function(y,v){return Object.prototype.hasOwnProperty.call(y,v)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(I,_,O){"use strict";var y=Object.prototype.hasOwnProperty,v="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(v=!1));function g(n,s,t){this.fn=n,this.context=s,this.once=t||!1}function p(n,s,t,i,e){if(typeof t!="function")throw new TypeError("The listener must be a function");var r=new g(t,i||n,e),c=v?v+s:s;return n._events[c]?n._events[c].fn?n._events[c]=[n._events[c],r]:n._events[c].push(r):(n._events[c]=r,n._eventsCount++),n}function d(n,s){--n._eventsCount===0?n._events=new o:delete n._events[s]}function a(){this._events=new o,this._eventsCount=0}a.prototype.eventNames=function(){var s=[],t,i;if(this._eventsCount===0)return s;for(i in t=this._events)y.call(t,i)&&s.push(v?i.slice(1):i);return Object.getOwnPropertySymbols?s.concat(Object.getOwnPropertySymbols(t)):s},a.prototype.listeners=function(s){var t=v?v+s:s,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var e=0,r=i.length,c=new Array(r);e<r;e++)c[e]=i[e].fn;return c},a.prototype.listenerCount=function(s){var t=v?v+s:s,i=this._events[t];return i?i.fn?1:i.length:0},a.prototype.emit=function(s,t,i,e,r,c){var u=v?v+s:s;if(!this._events[u])return!1;var f=this._events[u],m=arguments.length,l,E;if(f.fn){f.once&&this.removeListener(s,f.fn,void 0,!0);switch(m){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,i),!0;case 4:return f.fn.call(f.context,t,i,e),!0;case 5:return f.fn.call(f.context,t,i,e,r),!0;case 6:return f.fn.call(f.context,t,i,e,r,c),!0}for(E=1,l=new Array(m-1);E<m;E++)l[E-1]=arguments[E];f.fn.apply(f.context,l)}else{var b=f.length,D;for(E=0;E<b;E++){f[E].once&&this.removeListener(s,f[E].fn,void 0,!0);switch(m){case 1:f[E].fn.call(f[E].context);break;case 2:f[E].fn.call(f[E].context,t);break;case 3:f[E].fn.call(f[E].context,t,i);break;case 4:f[E].fn.call(f[E].context,t,i,e);break;default:if(!l)for(D=1,l=new Array(m-1);D<m;D++)l[D-1]=arguments[D];f[E].fn.apply(f[E].context,l)}}}return!0},a.prototype.on=function(s,t,i){return p(this,s,t,i,!1)},a.prototype.once=function(s,t,i){return p(this,s,t,i,!0)},a.prototype.removeListener=function(s,t,i,e){var r=v?v+s:s;if(!this._events[r])return this;if(!t)return d(this,r),this;var c=this._events[r];if(c.fn)c.fn===t&&(!e||c.once)&&(!i||c.context===i)&&d(this,r);else{for(var u=0,f=[],m=c.length;u<m;u++)(c[u].fn!==t||e&&!c[u].once||i&&c[u].context!==i)&&f.push(c[u]);f.length?this._events[r]=f.length===1?f[0]:f:d(this,r)}return this},a.prototype.removeAllListeners=function(s){var t;return s?(t=v?v+s:s,this._events[t]&&d(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=v,a.EventEmitter=a,I.exports=a},"./node_modules/url-toolkit/src/url-toolkit.js":function(I,_,O){(function(y){var v=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,o=/^([^\/?#]*)([^]*)$/,g=/(?:\/|^)\.(?=\/)/g,p=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,d={buildAbsoluteURL:function(a,n,s){if(s=s||{},a=a.trim(),n=n.trim(),!n){if(!s.alwaysNormalize)return a;var t=d.parseURL(a);if(!t)throw new Error("Error trying to parse base URL.");return t.path=d.normalizePath(t.path),d.buildURLFromParts(t)}var i=d.parseURL(n);if(!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return s.alwaysNormalize?(i.path=d.normalizePath(i.path),d.buildURLFromParts(i)):n;var e=d.parseURL(a);if(!e)throw new Error("Error trying to parse base URL.");if(!e.netLoc&&e.path&&e.path[0]!=="/"){var r=o.exec(e.path);e.netLoc=r[1],e.path=r[2]}e.netLoc&&!e.path&&(e.path="/");var c={scheme:e.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment};if(!i.netLoc&&(c.netLoc=e.netLoc,i.path[0]!=="/"))if(!i.path)c.path=e.path,i.params||(c.params=e.params,i.query||(c.query=e.query));else{var u=e.path,f=u.substring(0,u.lastIndexOf("/")+1)+i.path;c.path=d.normalizePath(f)}return c.path===null&&(c.path=s.alwaysNormalize?d.normalizePath(i.path):i.path),d.buildURLFromParts(c)},parseURL:function(a){var n=v.exec(a);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(a){for(a=a.split("").reverse().join("").replace(g,"");a.length!==(a=a.replace(p,"")).length;);return a.split("").reverse().join("")},buildURLFromParts:function(a){return a.scheme+a.netLoc+a.path+a.params+a.query+a.fragment}};I.exports=d})(this)},"./node_modules/webworkify-webpack/index.js":function(I,_,O){function y(s){var t={};function i(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return s[r].call(c.exports,c,c.exports,i),c.l=!0,c.exports}i.m=s,i.c=t,i.i=function(r){return r},i.d=function(r,c,u){i.o(r,c)||Object.defineProperty(r,c,{configurable:!1,enumerable:!0,get:u})},i.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},i.n=function(r){var c=r&&r.__esModule?function(){return r.default}:function(){return r};return i.d(c,"a",c),c},i.o=function(r,c){return Object.prototype.hasOwnProperty.call(r,c)},i.p="/",i.oe=function(r){throw console.error(r),r};var e=i(i.s=ENTRY_MODULE);return e.default||e}var v="[\\.|\\-|\\+|\\w|/|@]+",o="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+v+").*?\\)";function g(s){return(s+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function p(s){return!isNaN(1*s)}function d(s,t,i){var e={};e[i]=[];var r=t.toString(),c=r.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return e;for(var u=c[1],f=new RegExp("(\\\\n|\\W)"+g(u)+o,"g"),m;m=f.exec(r);){if(m[3]==="dll-reference")continue;e[i].push(m[3])}for(f=new RegExp("\\("+g(u)+'\\("(dll-reference\\s('+v+'))"\\)\\)'+o,"g");m=f.exec(r);)s[m[2]]||(e[i].push(m[1]),s[m[2]]=O(m[1]).m),e[m[2]]=e[m[2]]||[],e[m[2]].push(m[4]);for(var l=Object.keys(e),E=0;E<l.length;E++)for(var b=0;b<e[l[E]].length;b++)p(e[l[E]][b])&&(e[l[E]][b]=1*e[l[E]][b]);return e}function a(s){var t=Object.keys(s);return t.reduce(function(i,e){return i||s[e].length>0},!1)}function n(s,t){for(var i={main:[t]},e={main:[]},r={main:{}};a(i);)for(var c=Object.keys(i),u=0;u<c.length;u++){var f=c[u],m=i[f],l=m.pop();if(r[f]=r[f]||{},r[f][l]||!s[f][l])continue;r[f][l]=!0,e[f]=e[f]||[],e[f].push(l);for(var E=d(s,s[f][l],f),b=Object.keys(E),D=0;D<b.length;D++)i[b[D]]=i[b[D]]||[],i[b[D]]=i[b[D]].concat(E[b[D]])}return e}I.exports=function(s,t){t=t||{};var i={main:O.m},e=t.all?{main:Object.keys(i.main)}:n(i,s),r="";Object.keys(e).filter(function(l){return l!=="main"}).forEach(function(l){for(var E=0;e[l][E];)E++;e[l].push(E),i[l][E]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",r=r+"var "+l+" = ("+y.toString().replace("ENTRY_MODULE",JSON.stringify(E))+")({"+e[l].map(function(b){return""+JSON.stringify(b)+": "+i[l][b].toString()}).join(",")+`});
|
|
|
`}),r=r+"new (("+y.toString().replace("ENTRY_MODULE",JSON.stringify(s))+")({"+e.main.map(function(l){return""+JSON.stringify(l)+": "+i.main[l].toString()}).join(",")+"}))(self);";var c=new window.Blob([r],{type:"text/javascript"});if(t.bare)return c;var u=window.URL||window.webkitURL||window.mozURL||window.msURL,f=u.createObjectURL(c),m=new window.Worker(f);return m.objectURL=f,m}},"./src/config.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"hlsDefaultConfig",function(){return D}),O.d(_,"mergeConfig",function(){return w}),O.d(_,"enableStreamingMode",function(){return S});var y=O("./src/controller/abr-controller.ts"),v=O("./src/controller/audio-stream-controller.ts"),o=O("./src/controller/audio-track-controller.ts"),g=O("./src/controller/subtitle-stream-controller.ts"),p=O("./src/controller/subtitle-track-controller.ts"),d=O("./src/controller/buffer-controller.ts"),a=O("./src/controller/timeline-controller.ts"),n=O("./src/controller/cap-level-controller.ts"),s=O("./src/controller/fps-controller.ts"),t=O("./src/controller/eme-controller.ts"),i=O("./src/controller/cmcd-controller.ts"),e=O("./src/utils/xhr-loader.ts"),r=O("./src/utils/fetch-loader.ts"),c=O("./src/utils/cues.ts"),u=O("./src/utils/mediakeys-helper.ts"),f=O("./src/utils/logger.ts");function m(){return m=Object.assign||function(A){for(var R=1;R<arguments.length;R++){var k=arguments[R];for(var L in k)Object.prototype.hasOwnProperty.call(k,L)&&(A[L]=k[L])}return A},m.apply(this,arguments)}function l(A,R){var k=Object.keys(A);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(A);R&&(L=L.filter(function(M){return Object.getOwnPropertyDescriptor(A,M).enumerable})),k.push.apply(k,L)}return k}function E(A){for(var R=1;R<arguments.length;R++){var k=arguments[R]!=null?arguments[R]:{};R%2?l(Object(k),!0).forEach(function(L){b(A,L,k[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(k)):l(Object(k)).forEach(function(L){Object.defineProperty(A,L,Object.getOwnPropertyDescriptor(k,L))})}return A}function b(A,R,k){return R in A?Object.defineProperty(A,R,{value:k,enumerable:!0,configurable:!0,writable:!0}):A[R]=k,A}var D=E(E({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:e.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:y.default,bufferController:d.default,capLevelController:n.default,fpsController:s.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:u.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},C()),{},{subtitleStreamController:g.SubtitleStreamController,subtitleTrackController:p.default,timelineController:a.TimelineController,audioStreamController:v.default,audioTrackController:o.default,emeController:t.default,cmcdController:i.default});function C(){return{cueHandler:c.default,enableCEA708Captions:!0,enableWebVTT:!0,enableIMSC1:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function w(A,R){if((R.liveSyncDurationCount||R.liveMaxLatencyDurationCount)&&(R.liveSyncDuration||R.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(R.liveMaxLatencyDurationCount!==void 0&&(R.liveSyncDurationCount===void 0||R.liveMaxLatencyDurationCount<=R.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(R.liveMaxLatencyDuration!==void 0&&(R.liveSyncDuration===void 0||R.liveMaxLatencyDuration<=R.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return m({},A,R)}function S(A){var R=A.loader;if(R!==r.default&&R!==e.default)f.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),A.progressive=!1;else{var k=Object(r.fetchSupported)();k&&(A.loader=r.default,A.progressive=!0,A.enableSoftwareAES=!0,f.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/polyfills/number.ts"),v=O("./src/utils/ewma-bandwidth-estimator.ts"),o=O("./src/events.ts"),g=O("./src/utils/buffer-helper.ts"),p=O("./src/errors.ts"),d=O("./src/types/loader.ts"),a=O("./src/utils/logger.ts");function n(i,e){for(var r=0;r<e.length;r++){var c=e[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function s(i,e,r){return e&&n(i.prototype,e),r&&n(i,r),i}var t=function(){function i(r){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=r;var c=r.config;this.bwEstimator=new v.default(c.abrEwmaSlowVoD,c.abrEwmaFastVoD,c.abrEwmaDefaultEstimate),this.registerListeners()}var e=i.prototype;return e.registerListeners=function(){var c=this.hls;c.on(o.Events.FRAG_LOADING,this.onFragLoading,this),c.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),c.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.on(o.Events.ERROR,this.onError,this)},e.unregisterListeners=function(){var c=this.hls;c.off(o.Events.FRAG_LOADING,this.onFragLoading,this),c.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),c.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),c.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),c.off(o.Events.ERROR,this.onError,this)},e.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},e.onFragLoading=function(c,u){var f=u.frag;if(f.type===d.PlaylistLevelType.MAIN&&!this.timer){var m;this.fragCurrent=f,this.partCurrent=(m=u.part)!=null?m:null,this.timer=self.setInterval(this.onCheck,100)}},e.onLevelLoaded=function(c,u){var f=this.hls.config;u.details.live?this.bwEstimator.update(f.abrEwmaSlowLive,f.abrEwmaFastLive):this.bwEstimator.update(f.abrEwmaSlowVoD,f.abrEwmaFastVoD)},e._abandonRulesCheck=function(){var c=this.fragCurrent,u=this.partCurrent,f=this.hls,m=f.autoLevelEnabled,l=f.config,E=f.media;if(!c||!E)return;var b=u?u.stats:c.stats,D=u?u.duration:c.duration;if(b.aborted){a.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!m||E.paused||!E.playbackRate||!E.readyState)return;var C=performance.now()-b.loading.start,w=Math.abs(E.playbackRate);if(C<=500*D/w)return;var S=f.levels,A=f.minAutoLevel,R=S[c.level],k=b.total||Math.max(b.loaded,Math.round(D*R.maxBitrate/8)),L=Math.max(1,b.bwEstimate?b.bwEstimate/8:b.loaded*1e3/C),M=(k-b.loaded)/L,G=E.currentTime,W=(g.BufferHelper.bufferInfo(E,G,l.maxBufferHole).end-G)/w;if(W>=2*D/w||M<=W)return;var N=Number.POSITIVE_INFINITY,K;for(K=c.level-1;K>A;K--){var F=S[K].maxBitrate;if(N=D*F/(8*.8*L),N<W)break}if(N>=M)return;var P=this.bwEstimator.getEstimate();a.logger.warn("Fragment "+c.sn+(u?" part "+u.index:"")+" of level "+c.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+K+`
|
|
|
Current BW estimate: `+(Object(y.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s
|
|
|
Estimated load time for current fragment: `+M.toFixed(3)+` s
|
|
|
Estimated load time for the next fragment: `+N.toFixed(3)+` s
|
|
|
Time to underbuffer: `+W.toFixed(3)+" s"),f.nextLoadLevel=K,this.bwEstimator.sample(C,b.loaded),this.clearTimer(),c.loader&&(this.fragCurrent=this.partCurrent=null,c.loader.abort()),f.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:c,part:u,stats:b})},e.onFragLoaded=function(c,u){var f=u.frag,m=u.part;if(f.type===d.PlaylistLevelType.MAIN&&Object(y.isFiniteNumber)(f.sn)){var l=m?m.stats:f.stats,E=m?m.duration:f.duration;if(this.clearTimer(),this.lastLoadedFragLevel=f.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var b=this.hls.levels[f.level],D=(b.loaded?b.loaded.bytes:0)+l.loaded,C=(b.loaded?b.loaded.duration:0)+E;b.loaded={bytes:D,duration:C},b.realBitrate=Math.round(8*D/C)}if(f.bitrateTest){var w={stats:l,frag:f,part:m,id:f.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,w),f.bitrateTest=!1}}},e.onFragBuffered=function(c,u){var f=u.frag,m=u.part,l=m?m.stats:f.stats;if(l.aborted)return;if(f.type!==d.PlaylistLevelType.MAIN||f.sn==="initSegment")return;var E=l.parsing.end-l.loading.start;this.bwEstimator.sample(E,l.loaded),l.bwEstimate=this.bwEstimator.getEstimate(),f.bitrateTest?this.bitrateTestDelay=E/1e3:this.bitrateTestDelay=0},e.onError=function(c,u){switch(u.details){case p.ErrorDetails.FRAG_LOAD_ERROR:case p.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},e.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},e.getNextABRAutoLevel=function(){var c=this.fragCurrent,u=this.partCurrent,f=this.hls,m=f.maxAutoLevel,l=f.config,E=f.minAutoLevel,b=f.media,D=u?u.duration:c?c.duration:0,C=b?b.currentTime:0,w=b&&b.playbackRate!==0?Math.abs(b.playbackRate):1,S=this.bwEstimator?this.bwEstimator.getEstimate():l.abrEwmaDefaultEstimate,A=(g.BufferHelper.bufferInfo(b,C,l.maxBufferHole).end-C)/w,R=this.findBestLevel(S,E,m,A,l.abrBandWidthFactor,l.abrBandWidthUpFactor);if(R>=0)return R;a.logger.trace((A?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var k=D?Math.min(D,l.maxStarvationDelay):l.maxStarvationDelay,L=l.abrBandWidthFactor,M=l.abrBandWidthUpFactor;if(!A){var G=this.bitrateTestDelay;if(G){var W=D?Math.min(D,l.maxLoadingDelay):l.maxLoadingDelay;k=W-G,a.logger.trace("bitrate test took "+Math.round(1e3*G)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*k)+" ms"),L=M=1}}return R=this.findBestLevel(S,E,m,A+k,L,M),Math.max(R,0)},e.findBestLevel=function(c,u,f,m,l,E){for(var b,D=this.fragCurrent,C=this.partCurrent,w=this.lastLoadedFragLevel,S=this.hls.levels,A=S[w],R=!!(A!=null&&(b=A.details)!==null&&b!==void 0&&b.live),k=A==null?void 0:A.codecSet,L=C?C.duration:D?D.duration:0,M=f;M>=u;M--){var G=S[M];if(!G||k&&G.codecSet!==k)continue;var W=G.details,N=(C?W==null?void 0:W.partTarget:W==null?void 0:W.averagetargetduration)||L,K=void 0;M<=w?K=l*c:K=E*c;var F=S[M].maxBitrate,P=F*N/K;if(a.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+M+"/"+Math.round(K)+"/"+F+"/"+N+"/"+m+"/"+P),K>F&&(!P||R&&!this.bitrateTestDelay||P<m))return M}return-1},s(i,[{key:"nextAutoLevel",get:function(){var c=this._nextAutoLevel,u=this.bwEstimator;if(c!==-1&&(!u||!u.canEstimate()))return c;var f=this.getNextABRAutoLevel();return c!==-1&&(f=Math.min(c,f)),f},set:function(c){this._nextAutoLevel=c}}]),i}();_.default=t},"./src/controller/audio-stream-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/polyfills/number.ts"),v=O("./src/controller/base-stream-controller.ts"),o=O("./src/events.ts"),g=O("./src/utils/buffer-helper.ts"),p=O("./src/controller/fragment-tracker.ts"),d=O("./src/types/level.ts"),a=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),s=O("./src/demux/chunk-cache.ts"),t=O("./src/demux/transmuxer-interface.ts"),i=O("./src/types/transmuxer.ts"),e=O("./src/controller/fragment-finders.ts"),r=O("./src/utils/discontinuities.ts"),c=O("./src/errors.ts"),u=O("./src/utils/logger.ts");function f(){return f=Object.assign||function(D){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(D[S]=w[S])}return D},f.apply(this,arguments)}function m(D,C){D.prototype=Object.create(C.prototype),D.prototype.constructor=D,l(D,C)}function l(D,C){return l=Object.setPrototypeOf||function(S,A){return S.__proto__=A,S},l(D,C)}var E=100,b=function(D){m(C,D);function C(S,A){var R;return R=D.call(this,S,A,"[audio-stream-controller]")||this,R.videoBuffer=null,R.videoTrackCC=-1,R.waitingVideoCC=-1,R.audioSwitch=!1,R.trackId=-1,R.waitingData=null,R.mainDetails=null,R.bufferFlushed=!1,R._registerListeners(),R}var w=C.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var A=this.hls;A.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.on(o.Events.ERROR,this.onError,this),A.on(o.Events.BUFFER_RESET,this.onBufferReset,this),A.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),A.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w._unregisterListeners=function(){var A=this.hls;A.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.off(o.Events.ERROR,this.onError,this),A.off(o.Events.BUFFER_RESET,this.onBufferReset,this),A.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),A.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},w.onInitPtsFound=function(A,R){var k=R.frag,L=R.id,M=R.initPTS;if(L==="main"){var G=k.cc;this.initPTS[k.cc]=M,this.log("InitPTS for cc: "+G+" found from main: "+M),this.videoTrackCC=G,this.state===v.State.WAITING_INIT_PTS&&this.tick()}},w.startLoad=function(A){if(!this.levels){this.startPosition=A,this.state=v.State.STOPPED;return}var R=this.lastCurrentTime;this.stopLoad(),this.setInterval(E),this.fragLoadError=0,R>0&&A===-1?(this.log("Override startPosition with lastCurrentTime @"+R.toFixed(3)),this.state=v.State.IDLE):(this.loadedmetadata=!1,this.state=v.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=A,this.tick()},w.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_TRACK:{var A,R=this.levels,k=this.trackId,L=R==null||((A=R[k])===null||A===void 0)?void 0:A.details;if(L){if(this.waitForCdnTuneIn(L))break;this.state=v.State.WAITING_INIT_PTS}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var M,G=performance.now(),W=this.retryDate;(!W||G>=W||(M=this.media)!==null&&M!==void 0&&M.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=v.State.IDLE);break}case v.State.WAITING_INIT_PTS:{var N=this.waitingData;if(N){var K=N.frag,F=N.part,P=N.cache,B=N.complete;if(this.initPTS[K.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.FRAG_LOADING;var J=P.flush(),re={frag:K,part:F,payload:J,networkDetails:null};this._handleFragmentLoadProgress(re),B&&D.prototype._handleFragmentLoadComplete.call(this,re)}else if(this.videoTrackCC!==this.waitingVideoCC)u.logger.log("Waiting fragment cc ("+K.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var he=this.getLoadPosition(),we=g.BufferHelper.bufferInfo(this.mediaBuffer,he,this.config.maxBufferHole),ke=Object(e.fragmentWithinToleranceTest)(we.end,this.config.maxFragLookUpTolerance,K);ke<0&&(u.logger.log("Waiting fragment cc ("+K.cc+") @ "+K.start+" cancelled because another fragment at "+we.end+" is needed"),this.clearWaitingFragment())}}else this.state=v.State.IDLE}}this.onTickEnd()},w.clearWaitingFragment=function(){var A=this.waitingData;A&&(this.fragmentTracker.removeFragment(A.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=v.State.IDLE)},w.onTickEnd=function(){var A=this.media;if(!A||!A.readyState)return;var R=this.mediaBuffer?this.mediaBuffer:A,k=R.buffered;!this.loadedmetadata&&k.length&&(this.loadedmetadata=!0),this.lastCurrentTime=A.currentTime},w.doTickIdle=function(){var A,R,k=this.hls,L=this.levels,M=this.media,G=this.trackId,W=k.config;if(!L||!L[G])return;if(!M&&(this.startFragRequested||!W.startFragPrefetch))return;var N=L[G],K=N.details;if(!K||K.live&&this.levelLastLoaded!==G||this.waitForCdnTuneIn(K)){this.state=v.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,n.ElementaryStreamTypes.AUDIO,a.PlaylistLevelType.AUDIO));var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,a.PlaylistLevelType.AUDIO);if(F===null)return;var P=F.len,B=this.getMaxBufferLength(),J=this.audioSwitch;if(P>=B&&!J)return;if(!J&&this._streamEnded(F,K)){k.trigger(o.Events.BUFFER_EOS,{type:"audio"}),this.state=v.State.ENDED;return}var re=K.fragments,he=re[0].start,we=F.end;if(J){var ke=this.getLoadPosition();we=ke,K.PTSKnown&&ke<he&&((F.end>he||F.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),M.currentTime=he+.05))}var ne=this.getNextFragment(we,K);if(!ne){this.bufferFlushed=!0;return}((A=ne.decryptdata)===null||A===void 0?void 0:A.keyFormat)==="identity"&&!((R=ne.decryptdata)!==null&&R!==void 0&&R.key)?this.loadKey(ne,K):this.loadFragment(ne,K,we)},w.getMaxBufferLength=function(){var A=D.prototype.getMaxBufferLength.call(this),R=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,a.PlaylistLevelType.MAIN);return R===null?A:Math.max(A,R.len)},w.onMediaDetaching=function(){this.videoBuffer=null,D.prototype.onMediaDetaching.call(this)},w.onAudioTracksUpdated=function(A,R){var k=R.audioTracks;this.resetTransmuxer(),this.levels=k.map(function(L){return new d.Level(L)})},w.onAudioTrackSwitching=function(A,R){var k=!!R.url;this.trackId=R.id;var L=this.fragCurrent;L!=null&&L.loader&&L.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),k?this.setInterval(E):this.resetTransmuxer(),k?(this.audioSwitch=!0,this.state=v.State.IDLE):this.state=v.State.STOPPED,this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},w.onLevelLoaded=function(A,R){this.mainDetails=R.details},w.onAudioTrackLoaded=function(A,R){var k,L=this.levels,M=R.details,G=R.id;if(!L){this.warn("Audio tracks were reset while loading level "+G);return}this.log("Track "+G+" loaded ["+M.startSN+","+M.endSN+"],duration:"+M.totalduration);var W=L[G],N=0;if(M.live||(k=W.details)!==null&&k!==void 0&&k.live){var K=this.mainDetails;if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed||!K)return;!W.details&&M.hasProgramDateTime&&K.hasProgramDateTime?(Object(r.alignMediaPlaylistByPDT)(M,K),N=M.fragments[0].start):N=this.alignPlaylists(M,W.details)}W.details=M,this.levelLastLoaded=G,!this.startFragRequested&&(this.mainDetails||!M.live)&&this.setStartPosition(W.details,N),this.state===v.State.WAITING_TRACK&&!this.waitForCdnTuneIn(M)&&(this.state=v.State.IDLE),this.tick()},w._handleFragmentLoadProgress=function(A){var R,k=A.frag,L=A.part,M=A.payload,G=this.config,W=this.trackId,N=this.levels;if(!N){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+k.sn+" of level "+k.level+" will not be buffered");return}var K=N[W];console.assert(K,"Audio track is defined on fragment load progress");var F=K.details;console.assert(F,"Audio track details are defined on fragment load progress");var P=G.defaultAudioCodec||K.audioCodec||"mp4a.40.2",B=this.transmuxer;B||(B=this.transmuxer=new t.default(this.hls,a.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var J=this.initPTS[k.cc],re=(R=k.initSegment)===null||R===void 0?void 0:R.data;if(J!==void 0){var he=!1,we=L?L.index:-1,ke=we!==-1,ne=new i.ChunkMetadata(k.level,k.sn,k.stats.chunkCount,M.byteLength,we,ke);B.push(M,re,P,"",k,L,F.totalduration,he,ne,J)}else{u.logger.log("Unknown video PTS for cc "+k.cc+", waiting for video PTS before demuxing audio frag "+k.sn+" of ["+F.startSN+" ,"+F.endSN+"],track "+W);var Oe=this.waitingData=this.waitingData||{frag:k,part:L,cache:new s.default,complete:!1},Ce=Oe.cache;Ce.push(new Uint8Array(M)),this.waitingVideoCC=this.videoTrackCC,this.state=v.State.WAITING_INIT_PTS}},w._handleFragmentLoadComplete=function(A){if(this.waitingData){this.waitingData.complete=!0;return}D.prototype._handleFragmentLoadComplete.call(this,A)},w.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},w.onBufferCreated=function(A,R){var k=R.tracks.audio;k&&(this.mediaBuffer=k.buffer),R.tracks.video&&(this.videoBuffer=R.tracks.video.buffer)},w.onFragBuffered=function(A,R){var k=R.frag,L=R.part;if(k.type!==a.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(k)){this.warn("Fragment "+k.sn+(L?" p: "+L.index:"")+" of level "+k.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}k.sn!=="initSegment"&&(this.fragPrevious=k,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(k,L)},w.onError=function(A,R){switch(R.details){case c.ErrorDetails.FRAG_LOAD_ERROR:case c.ErrorDetails.FRAG_LOAD_TIMEOUT:case c.ErrorDetails.KEY_LOAD_ERROR:case c.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.AUDIO,R);break;case c.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case c.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==v.State.ERROR&&this.state!==v.State.STOPPED&&(this.state=R.fatal?v.State.ERROR:v.State.IDLE,this.warn(R.details+" while loading frag, switching to "+this.state+" state"));break;case c.ErrorDetails.BUFFER_FULL_ERROR:if(R.parent==="audio"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var k=!0,L=this.getFwdBufferInfo(this.mediaBuffer,a.PlaylistLevelType.AUDIO);L&&L.len>.5&&(k=!this.reduceMaxBufferLength(L.len)),k&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},w.onBufferFlushed=function(A,R){var k=R.type;k===n.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},w._handleTransmuxComplete=function(A){var R,k="audio",L=this.hls,M=A.remuxResult,G=A.chunkMeta,W=this.getCurrentContext(G);if(!W){this.warn("The loading context changed while buffering fragment "+G.sn+" of level "+G.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(G.level);return}var N=W.frag,K=W.part,F=M.audio,P=M.text,B=M.id3,J=M.initSegment;if(this.fragContextChanged(N))return;if(this.state=v.State.PARSING,this.audioSwitch&&F&&this.completeAudioSwitch(),J!=null&&J.tracks&&(this._bufferInitSegment(J.tracks,N,G),L.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:N,id:k,tracks:J.tracks})),F){var re=F.startPTS,he=F.endPTS,we=F.startDTS,ke=F.endDTS;K&&(K.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:re,endPTS:he,startDTS:we,endDTS:ke}),N.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,re,he,we,ke),this.bufferFragmentData(F,N,K,G)}if(B!=null&&(R=B.samples)!==null&&R!==void 0&&R.length){var ne=f({frag:N,id:k},B);L.trigger(o.Events.FRAG_PARSING_METADATA,ne)}if(P){var Oe=f({frag:N,id:k},P);L.trigger(o.Events.FRAG_PARSING_USERDATA,Oe)}},w._bufferInitSegment=function(A,R,k){if(this.state!==v.State.PARSING)return;A.video&&delete A.video;var L=A.audio;if(!L)return;L.levelCodec=L.codec,L.id="audio",this.log("Init audio buffer, container:"+L.container+", codecs[parsed]=["+L.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,A);var M=L.initSegment;if(M!=null&&M.byteLength){var G={type:"audio",frag:R,part:null,chunkMeta:k,parent:R.type,data:M};this.hls.trigger(o.Events.BUFFER_APPENDING,G)}this.tick()},w.loadFragment=function(A,R,k){var L=this.fragmentTracker.getState(A);this.fragCurrent=A,(this.audioSwitch||L===p.FragmentState.NOT_LOADED||L===p.FragmentState.PARTIAL)&&(A.sn==="initSegment"?this._loadInitSegment(A):R.live&&!Object(y.isFiniteNumber)(this.initPTS[A.cc])?(this.log("Waiting for video PTS in continuity counter "+A.cc+" of live stream before loading audio fragment "+A.sn+" of level "+this.trackId),this.state=v.State.WAITING_INIT_PTS):(this.startFragRequested=!0,D.prototype.loadFragment.call(this,A,R,k)))},w.completeAudioSwitch=function(){var A=this.hls,R=this.media,k=this.trackId;R&&(this.log("Switching audio track : flushing all audio"),D.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,A.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:k})},C}(v.default);_.default=b},"./src/controller/audio-track-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts"),v=O("./src/errors.ts"),o=O("./src/controller/base-playlist-controller.ts"),g=O("./src/types/loader.ts");function p(t,i){for(var e=0;e<i.length;e++){var r=i[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function d(t,i,e){return i&&p(t.prototype,i),e&&p(t,e),t}function a(t,i){t.prototype=Object.create(i.prototype),t.prototype.constructor=t,n(t,i)}function n(t,i){return n=Object.setPrototypeOf||function(r,c){return r.__proto__=c,r},n(t,i)}var s=function(t){a(i,t);function i(r){var c;return c=t.call(this,r,"[audio-track-controller]")||this,c.tracks=[],c.groupId=null,c.tracksInGroup=[],c.trackId=-1,c.trackName="",c.selectDefaultTrack=!0,c.registerListeners(),c}var e=i.prototype;return e.registerListeners=function(){var c=this.hls;c.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),c.on(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.on(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.on(y.Events.ERROR,this.onError,this)},e.unregisterListeners=function(){var c=this.hls;c.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),c.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),c.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),c.off(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),c.off(y.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),c.off(y.Events.ERROR,this.onError,this)},e.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,t.prototype.destroy.call(this)},e.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},e.onManifestParsed=function(c,u){this.tracks=u.audioTracks||[]},e.onAudioTrackLoaded=function(c,u){var f=u.id,m=u.details,l=this.tracksInGroup[f];if(!l){this.warn("Invalid audio track id "+f);return}var E=l.details;l.details=u.details,this.log("audioTrack "+f+" loaded ["+m.startSN+"-"+m.endSN+"]"),f===this.trackId&&(this.retryCount=0,this.playlistLoaded(f,u,E))},e.onLevelLoading=function(c,u){this.switchLevel(u.level)},e.onLevelSwitching=function(c,u){this.switchLevel(u.level)},e.switchLevel=function(c){var u=this.hls.levels[c];if(!(u!=null&&u.audioGroupIds))return;var f=u.audioGroupIds[u.urlId];if(this.groupId!==f){this.groupId=f;var m=this.tracks.filter(function(E){return!f||E.groupId===f});this.selectDefaultTrack&&!m.some(function(E){return E.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=m;var l={audioTracks:m};this.log("Updating audio tracks, "+m.length+' track(s) found in "'+f+'" group-id'),this.hls.trigger(y.Events.AUDIO_TRACKS_UPDATED,l),this.selectInitialTrack()}},e.onError=function(c,u){if(t.prototype.onError.call(this,c,u),u.fatal||!u.context)return;u.context.type===g.PlaylistContextType.AUDIO_TRACK&&u.context.id===this.trackId&&u.context.groupId===this.groupId&&this.retryLoadingOrFail(u)},e.setAudioTrack=function(c){var u=this.tracksInGroup;if(c<0||c>=u.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var f=u[this.trackId];this.log("Now switching to audio-track index "+c);var m=u[c],l=m.id,E=m.groupId,b=E===void 0?"":E,D=m.name,C=m.type,w=m.url;if(this.trackId=c,this.trackName=D,this.selectDefaultTrack=!1,this.hls.trigger(y.Events.AUDIO_TRACK_SWITCHING,{id:l,groupId:b,name:D,type:C,url:w}),m.details&&!m.details.live)return;var S=this.switchParams(m.url,f==null?void 0:f.details);this.loadPlaylist(S)},e.selectInitialTrack=function(){var c=this.tracksInGroup;console.assert(c.length,"Initial audio track should be selected when tracks are known");var u=this.trackName,f=this.findTrackId(u)||this.findTrackId();f!==-1?this.setAudioTrack(f):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},e.findTrackId=function(c){for(var u=this.tracksInGroup,f=0;f<u.length;f++){var m=u[f];if((!this.selectDefaultTrack||m.default)&&(!c||c===m.name))return m.id}return-1},e.loadPlaylist=function(c){var u=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(u)){var f=u.id,m=u.groupId,l=u.url;if(c)try{l=c.addDirectives(l)}catch(E){this.warn("Could not construct new URL with HLS Delivery Directives: "+E)}this.log("loading audio-track playlist for id: "+f),this.clearTimer(),this.hls.trigger(y.Events.AUDIO_TRACK_LOADING,{url:l,id:f,groupId:m,deliveryDirectives:c||null})}},d(i,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(c){this.selectDefaultTrack=!1,this.setAudioTrack(c)}}]),i}(o.default);_.default=s},"./src/controller/base-playlist-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return d});var y=O("./src/polyfills/number.ts"),v=O("./src/types/level.ts"),o=O("./src/controller/level-helper.ts"),g=O("./src/utils/logger.ts"),p=O("./src/errors.ts"),d=function(){function a(s,t){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=g.logger.log.bind(g.logger,t+":"),this.warn=g.logger.warn.bind(g.logger,t+":"),this.hls=s}var n=a.prototype;return n.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},n.onError=function(t,i){i.fatal&&i.type===p.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},n.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},n.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},n.stopLoad=function(){this.canLoad=!1,this.clearTimer()},n.switchParams=function(t,i){var e=i==null?void 0:i.renditionReports;if(e)for(var r=0;r<e.length;r++){var c=e[r],u=""+c.URI;if(u===t.substr(-u.length)){var f=parseInt(c["LAST-MSN"]),m=parseInt(c["LAST-PART"]);if(i&&this.hls.config.lowLatencyMode){var l=Math.min(i.age-i.partTarget,i.targetduration);m!==void 0&&l>i.partTarget&&(m+=1)}if(Object(y.isFiniteNumber)(f))return new v.HlsUrlParameters(f,Object(y.isFiniteNumber)(m)?m:void 0,v.HlsSkip.No)}}},n.loadPlaylist=function(t){},n.shouldLoadTrack=function(t){return this.canLoad&&t&&!!t.url&&(!t.details||t.details.live)},n.playlistLoaded=function(t,i,e){var r=this,c=i.details,u=i.stats,f=u.loading.end?Math.max(0,self.performance.now()-u.loading.end):0;if(c.advancedDateTime=Date.now()-f,c.live||e!=null&&e.live){if(c.reloaded(e),e&&this.log("live playlist "+t+" "+(c.advanced?"REFRESHED "+c.lastPartSn+"-"+c.lastPartIndex:"MISSED")),e&&c.fragments.length>0&&Object(o.mergeDetails)(e,c),!this.canLoad||!c.live)return;var m,l=void 0,E=void 0;if(c.canBlockReload&&c.endSN&&c.advanced){var b=this.hls.config.lowLatencyMode,D=c.lastPartSn,C=c.endSN,w=c.lastPartIndex,S=w!==-1,A=D===C,R=b?0:w;S?(l=A?C+1:D,E=A?R:w+1):l=C+1;var k=c.age,L=k+c.ageHeader,M=Math.min(L-c.partTarget,c.targetduration*1.5);if(M>0){if(e&&M>e.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+e.tuneInGoal+" to: "+M+" with playlist age: "+c.age),M=0;else{var G=Math.floor(M/c.targetduration);if(l+=G,E!==void 0){var W=Math.round(M%c.targetduration/c.partTarget);E+=W}this.log("CDN Tune-in age: "+c.ageHeader+"s last advanced "+k.toFixed(2)+"s goal: "+M+" skip sn "+G+" to part "+E)}c.tuneInGoal=M}if(m=this.getDeliveryDirectives(c,i.deliveryDirectives,l,E),b||!A){this.loadPlaylist(m);return}}else m=this.getDeliveryDirectives(c,i.deliveryDirectives,l,E);var N=Object(o.computeReloadInterval)(c,u);l!==void 0&&c.canBlockReload&&(N-=c.partTarget||1),this.log("reload live playlist "+t+" in "+Math.round(N)+" ms"),this.timer=self.setTimeout(function(){return r.loadPlaylist(m)},N)}else this.clearTimer()},n.getDeliveryDirectives=function(t,i,e,r){var c=Object(v.getSkipValue)(t,e);return i!=null&&i.skip&&t.deltaUpdateFailed&&(e=i.msn,r=i.part,c=v.HlsSkip.No),new v.HlsUrlParameters(e,r,c)},n.retryLoadingOrFail=function(t){var i=this,e=this.hls.config,r=this.retryCount<e.levelLoadingMaxRetry;if(r){var c;if(this.retryCount++,t.details.indexOf("LoadTimeOut")>-1&&(c=t.context)!==null&&c!==void 0&&c.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+t.details+'"'),this.loadPlaylist();else{var u=Math.min(Math.pow(2,this.retryCount)*e.levelLoadingRetryDelay,e.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return i.loadPlaylist()},u),this.warn("retry playlist loading #"+this.retryCount+" in "+u+' ms after "'+t.details+'"')}}else this.warn('cannot recover from error "'+t.details+'"'),this.clearTimer(),t.fatal=!0;return r},a}()},"./src/controller/base-stream-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"State",function(){return C}),O.d(_,"default",function(){return w});var y=O("./src/polyfills/number.ts"),v=O("./src/task-loop.ts"),o=O("./src/controller/fragment-tracker.ts"),g=O("./src/utils/buffer-helper.ts"),p=O("./src/utils/logger.ts"),d=O("./src/events.ts"),a=O("./src/errors.ts"),n=O("./src/types/transmuxer.ts"),s=O("./src/utils/mp4-tools.ts"),t=O("./src/utils/discontinuities.ts"),i=O("./src/controller/fragment-finders.ts"),e=O("./src/controller/level-helper.ts"),r=O("./src/loader/fragment-loader.ts"),c=O("./src/crypt/decrypter.ts"),u=O("./src/utils/time-ranges.ts"),f=O("./src/types/loader.ts");function m(S,A){for(var R=0;R<A.length;R++){var k=A[R];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}function l(S,A,R){return A&&m(S.prototype,A),R&&m(S,R),S}function E(S){if(S===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S}function b(S,A){S.prototype=Object.create(A.prototype),S.prototype.constructor=S,D(S,A)}function D(S,A){return D=Object.setPrototypeOf||function(k,L){return k.__proto__=L,k},D(S,A)}var C={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",BACKTRACKING:"BACKTRACKING",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"},w=function(S){b(A,S);function A(k,L,M){var G;return G=S.call(this)||this,G.hls=void 0,G.fragPrevious=null,G.fragCurrent=null,G.fragmentTracker=void 0,G.transmuxer=null,G._state=C.STOPPED,G.media=void 0,G.mediaBuffer=void 0,G.config=void 0,G.bitrateTest=!1,G.lastCurrentTime=0,G.nextLoadPosition=0,G.startPosition=0,G.loadedmetadata=!1,G.fragLoadError=0,G.retryDate=0,G.levels=null,G.fragmentLoader=void 0,G.levelLastLoaded=null,G.startFragRequested=!1,G.decrypter=void 0,G.initPTS=[],G.onvseeking=null,G.onvended=null,G.logPrefix="",G.log=void 0,G.warn=void 0,G.logPrefix=M,G.log=p.logger.log.bind(p.logger,M+":"),G.warn=p.logger.warn.bind(p.logger,M+":"),G.hls=k,G.fragmentLoader=new r.default(k.config),G.fragmentTracker=L,G.config=k.config,G.decrypter=new c.default(k,k.config),k.on(d.Events.KEY_LOADED,G.onKeyLoaded,E(G)),G}var R=A.prototype;return R.doTick=function(){this.onTickEnd()},R.onTickEnd=function(){},R.startLoad=function(L){},R.stopLoad=function(){this.fragmentLoader.abort();var L=this.fragCurrent;L&&this.fragmentTracker.removeFragment(L),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=C.STOPPED},R._streamEnded=function(L,M){var G=this.fragCurrent,W=this.fragmentTracker;if(!M.live&&G&&G.sn===M.endSN&&!L.nextStart){var N=W.getState(G);return N===o.FragmentState.PARTIAL||N===o.FragmentState.OK}return!1},R.onMediaAttached=function(L,M){var G=this.media=this.mediaBuffer=M.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),G.addEventListener("seeking",this.onvseeking),G.addEventListener("ended",this.onvended);var W=this.config;this.levels&&W.autoStartLoad&&this.state===C.STOPPED&&this.startLoad(W.startPosition)},R.onMediaDetaching=function(){var L=this.media;L!=null&&L.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),L&&(L.removeEventListener("seeking",this.onvseeking),L.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},R.onMediaSeeking=function(){var L=this.config,M=this.fragCurrent,G=this.media,W=this.mediaBuffer,N=this.state,K=G?G.currentTime:0,F=g.BufferHelper.bufferInfo(W||G,K,L.maxBufferHole);if(this.log("media seeking to "+(Object(y.isFiniteNumber)(K)?K.toFixed(3):K)+", state: "+N),N===C.ENDED)this.resetLoadingState();else if(M&&!F.len){var P=L.maxFragLookUpTolerance,B=M.start-P,J=M.start+M.duration+P,re=K>J;(K<B||re)&&(re&&M.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),M.loader.abort()),this.resetLoadingState())}G&&(this.lastCurrentTime=K),!this.loadedmetadata&&!F.len&&(this.nextLoadPosition=this.startPosition=K),this.tickImmediate()},R.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},R.onKeyLoaded=function(L,M){if(this.state!==C.KEY_LOADING||M.frag!==this.fragCurrent||!this.levels)return;this.state=C.IDLE;var G=this.levels[M.frag.level].details;G&&this.loadFragment(M.frag,G,M.frag.start)},R.onHandlerDestroying=function(){this.stopLoad(),S.prototype.onHandlerDestroying.call(this)},R.onHandlerDestroyed=function(){this.state=C.STOPPED,this.hls.off(d.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,S.prototype.onHandlerDestroyed.call(this)},R.loadKey=function(L,M){this.log("Loading key for "+L.sn+" of ["+M.startSN+"-"+M.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level),this.state=C.KEY_LOADING,this.fragCurrent=L,this.hls.trigger(d.Events.KEY_LOADING,{frag:L})},R.loadFragment=function(L,M,G){this._loadFragForPlayback(L,M,G)},R._loadFragForPlayback=function(L,M,G){var W=this,N=function(F){if(W.fragContextChanged(L)){W.warn("Fragment "+L.sn+(F.part?" p: "+F.part.index:"")+" of level "+L.level+" was dropped during download."),W.fragmentTracker.removeFragment(L);return}L.stats.chunkCount++,W._handleFragmentLoadProgress(F)};this._doFragLoad(L,M,G,N).then(function(K){if(!K)return;W.fragLoadError=0;var F=W.state;if(W.fragContextChanged(L)){(F===C.FRAG_LOADING||F===C.BACKTRACKING||!W.fragCurrent&&F===C.PARSING)&&(W.fragmentTracker.removeFragment(L),W.state=C.IDLE);return}if("payload"in K&&(W.log("Loaded fragment "+L.sn+" of level "+L.level),W.hls.trigger(d.Events.FRAG_LOADED,K),W.state===C.BACKTRACKING)){W.fragmentTracker.backtrack(L,K),W.resetFragmentLoading(L);return}W._handleFragmentLoadComplete(K)}).catch(function(K){W.warn(K),W.resetFragmentLoading(L)})},R.flushMainBuffer=function(L,M,G){if(G===void 0&&(G=null),!(L-M))return;var W={startOffset:L,endOffset:M,type:G};this.fragLoadError=0,this.hls.trigger(d.Events.BUFFER_FLUSHING,W)},R._loadInitSegment=function(L){var M=this;this._doFragLoad(L).then(function(G){if(!G||M.fragContextChanged(L)||!M.levels)throw new Error("init load aborted");return G}).then(function(G){var W=M.hls,N=G.payload,K=L.decryptdata;if(N&&N.byteLength>0&&K&&K.key&&K.iv&&K.method==="AES-128"){var F=self.performance.now();return M.decrypter.webCryptoDecrypt(new Uint8Array(N),K.key.buffer,K.iv.buffer).then(function(P){var B=self.performance.now();return W.trigger(d.Events.FRAG_DECRYPTED,{frag:L,payload:P,stats:{tstart:F,tdecrypt:B}}),G.payload=P,G})}return G}).then(function(G){var W=M.fragCurrent,N=M.hls,K=M.levels;if(!K)throw new Error("init load aborted, missing levels");var F=K[L.level].details;console.assert(F,"Level details are defined when init segment is loaded");var P=L.stats;M.state=C.IDLE,M.fragLoadError=0,L.data=new Uint8Array(G.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),G.frag===W&&N.trigger(d.Events.FRAG_BUFFERED,{stats:P,frag:W,part:null,id:L.type}),M.tick()}).catch(function(G){M.warn(G),M.resetFragmentLoading(L)})},R.fragContextChanged=function(L){var M=this.fragCurrent;return!L||!M||L.level!==M.level||L.sn!==M.sn||L.urlId!==M.urlId},R.fragBufferedComplete=function(L,M){var G=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+L.type+" sn: "+L.sn+(M?" part: "+M.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+L.level+" "+u.default.toString(g.BufferHelper.getBuffered(G))),this.state=C.IDLE,this.tick()},R._handleFragmentLoadComplete=function(L){var M=this.transmuxer;if(!M)return;var G=L.frag,W=L.part,N=L.partsLoaded,K=!N||N.length===0||N.some(function(P){return!P}),F=new n.ChunkMetadata(G.level,G.sn,G.stats.chunkCount+1,0,W?W.index:-1,!K);M.flush(F)},R._handleFragmentLoadProgress=function(L){},R._doFragLoad=function(L,M,G,W){var N=this;if(G===void 0&&(G=null),!this.levels)throw new Error("frag load aborted, missing levels");if(G=Math.max(L.start,G||0),this.config.lowLatencyMode&&M){var K=M.partList;if(K&&W){G>L.end&&M.fragmentHint&&(L=M.fragmentHint);var F=this.getNextPart(K,L,G);if(F>-1){var P=K[F];return this.log("Loading part sn: "+L.sn+" p: "+P.index+" cc: "+L.cc+" of playlist ["+M.startSN+"-"+M.endSN+"] parts [0-"+F+"-"+(K.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=C.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:L,part:K[F],targetBufferTime:G}),this.doFragPartsLoad(L,K,F,W).catch(function(B){return N.handleFragLoadError(B)})}else if(!L.url||this.loadedEndOfParts(K,G))return Promise.resolve(null)}}return this.log("Loading fragment "+L.sn+" cc: "+L.cc+" "+(M?"of ["+M.startSN+"-"+M.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+L.level+", target: "+parseFloat(G.toFixed(3))),Object(y.isFiniteNumber)(L.sn)&&!this.bitrateTest&&(this.nextLoadPosition=L.start+L.duration),this.state=C.FRAG_LOADING,this.hls.trigger(d.Events.FRAG_LOADING,{frag:L,targetBufferTime:G}),this.fragmentLoader.load(L,W).catch(function(B){return N.handleFragLoadError(B)})},R.doFragPartsLoad=function(L,M,G,W){var N=this;return new Promise(function(K,F){var P=[],B=function J(re){var he=M[re];N.fragmentLoader.loadPart(L,he,W).then(function(we){P[he.index]=we;var ke=we.part;N.hls.trigger(d.Events.FRAG_LOADED,we);var ne=M[re+1];if(ne&&ne.fragment===L)J(re+1);else return K({frag:L,part:ke,partsLoaded:P})}).catch(F)};B(G)})},R.handleFragLoadError=function(L){var M=L.data;return M&&M.details===a.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(M.frag,M.part):this.hls.trigger(d.Events.ERROR,M),null},R._handleTransmuxerFlush=function(L){var M=this.getCurrentContext(L);if(!M||this.state!==C.PARSING){this.fragCurrent||(this.state=C.IDLE);return}var G=M.frag,W=M.part,N=M.level,K=self.performance.now();G.stats.parsing.end=K,W&&(W.stats.parsing.end=K),this.updateLevelTiming(G,W,N,L.partial)},R.getCurrentContext=function(L){var M=this.levels,G=L.level,W=L.sn,N=L.part;if(!M||!M[G])return this.warn("Levels object was unset while buffering fragment "+W+" of level "+G+". The current chunk will not be buffered."),null;var K=M[G],F=N>-1?Object(e.getPartWith)(K,W,N):null,P=F?F.fragment:Object(e.getFragmentWithSN)(K,W,this.fragCurrent);return P?{frag:P,part:F,level:K}:null},R.bufferFragmentData=function(L,M,G,W){if(!L||this.state!==C.PARSING)return;var N=L.data1,K=L.data2,F=N;if(N&&K&&(F=Object(s.appendUint8Array)(N,K)),!F||!F.length)return;var P={type:L.type,frag:M,part:G,chunkMeta:W,parent:M.type,data:F};this.hls.trigger(d.Events.BUFFER_APPENDING,P),L.dropped&&L.independent&&!G&&this.flushBufferGap(M)},R.flushBufferGap=function(L){var M=this.media;if(!M)return;if(!g.BufferHelper.isBuffered(M,M.currentTime)){this.flushMainBuffer(0,L.start);return}var G=M.currentTime,W=g.BufferHelper.bufferInfo(M,G,0),N=L.duration,K=Math.min(this.config.maxFragLookUpTolerance*2,N*.25),F=Math.max(Math.min(L.start-K,W.end-K),G+K);L.start-F>K&&this.flushMainBuffer(F,L.start)},R.getFwdBufferInfo=function(L,M){var G=this.config,W=this.getLoadPosition();if(!Object(y.isFiniteNumber)(W))return null;var N=g.BufferHelper.bufferInfo(L,W,G.maxBufferHole);if(N.len===0&&N.nextStart!==void 0){var K=this.fragmentTracker.getBufferedFrag(W,M);if(K&&N.nextStart<K.end)return g.BufferHelper.bufferInfo(L,W,Math.max(N.nextStart,G.maxBufferHole))}return N},R.getMaxBufferLength=function(L){var M=this.config,G;return L?G=Math.max(8*M.maxBufferSize/L,M.maxBufferLength):G=M.maxBufferLength,Math.min(G,M.maxMaxBufferLength)},R.reduceMaxBufferLength=function(L){var M=this.config,G=L||M.maxBufferLength;return M.maxMaxBufferLength>=G?(M.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+M.maxMaxBufferLength+"s"),!0):!1},R.getNextFragment=function(L,M){var G,W,N=M.fragments,K=N.length;if(!K)return null;var F=this.config,P=N[0].start,B;if(M.live){var J=F.initialLiveManifestSize;if(K<J)return this.warn("Not enough fragments to start playback (have: "+K+", need: "+J+")"),null;!M.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(B=this.getInitialLiveFragment(M,N),this.startPosition=B?this.hls.liveSyncPosition||B.start:L)}else L<=P&&(B=N[0]);if(!B){var re=F.lowLatencyMode?M.partEnd:M.fragmentEnd;B=this.getFragmentAtPosition(L,re,M)}return(G=B)!==null&&G!==void 0&&G.initSegment&&!((W=B)!==null&&W!==void 0&&W.initSegment.data)&&!this.bitrateTest&&(B=B.initSegment),B},R.getNextPart=function(L,M,G){for(var W=-1,N=!1,K=!0,F=0,P=L.length;F<P;F++){var B=L[F];if(K=K&&!B.independent,W>-1&&G<B.start)break;var J=B.loaded;!J&&(N||B.independent||K)&&B.fragment===M&&(W=F),N=J}return W},R.loadedEndOfParts=function(L,M){var G=L[L.length-1];return G&&M>G.start&&G.loaded},R.getInitialLiveFragment=function(L,M){var G=this.fragPrevious,W=null;if(G){if(L.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+G.programDateTime),W=Object(i.findFragmentByPDT)(M,G.endProgramDateTime,this.config.maxFragLookUpTolerance)),!W){var N=G.sn+1;if(N>=L.startSN&&N<=L.endSN){var K=M[N-L.startSN];G.cc===K.cc&&(W=K,this.log("Live playlist, switching playlist, load frag with next SN: "+W.sn))}W||(W=Object(i.findFragWithCC)(M,G.cc),W&&this.log("Live playlist, switching playlist, load frag with same CC: "+W.sn))}}else{var F=this.hls.liveSyncPosition;F!==null&&(W=this.getFragmentAtPosition(F,this.bitrateTest?L.fragmentEnd:L.edge,L))}return W},R.getFragmentAtPosition=function(L,M,G){var W=this.config,N=this.fragPrevious,K=G.fragments,F=G.endSN,P=G.fragmentHint,B=W.maxFragLookUpTolerance,J=!!(W.lowLatencyMode&&G.partList&&P);J&&P&&!this.bitrateTest&&(K=K.concat(P),F=P.sn);var re;if(L<M){var he=L>M-B?0:B;re=Object(i.findFragmentByPTS)(N,K,L,he)}else re=K[K.length-1];if(re){var we=re.sn-G.startSN,ke=N&&re.level===N.level,ne=K[we+1],Oe=this.fragmentTracker.getState(re);if(Oe===o.FragmentState.BACKTRACKED){re=null;for(var Ce=we;K[Ce]&&this.fragmentTracker.getState(K[Ce])===o.FragmentState.BACKTRACKED;)N?re=K[Ce--]:re=K[--Ce];re||(re=ne)}else N&&re.sn===N.sn&&!J&&(ke&&(re.sn<F&&this.fragmentTracker.getState(ne)!==o.FragmentState.OK?(this.log("SN "+re.sn+" just loaded, load next one: "+ne.sn),re=ne):re=null))}return re},R.synchronizeToLiveEdge=function(L){var M=this.config,G=this.media;if(!G)return;var W=this.hls.liveSyncPosition,N=G.currentTime,K=L.fragments[0].start,F=L.edge,P=N>=K-M.maxFragLookUpTolerance&&N<=F;if(W!==null&&G.duration>W&&(N<W||!P)){var B=M.liveMaxLatencyDuration!==void 0?M.liveMaxLatencyDuration:M.liveMaxLatencyDurationCount*L.targetduration;(!P&&G.readyState<4||N<F-B)&&(this.loadedmetadata||(this.nextLoadPosition=W),G.readyState&&(this.warn("Playback: "+N.toFixed(3)+" is located too far from the end of live sliding playlist: "+F+", reset currentTime to : "+W.toFixed(3)),G.currentTime=W))}},R.alignPlaylists=function(L,M){var G=this.levels,W=this.levelLastLoaded,N=this.fragPrevious,K=W!==null?G[W]:null,F=L.fragments.length;if(!F)return this.warn("No fragments in live playlist"),0;var P=L.fragments[0].start,B=!M,J=L.alignedSliding&&Object(y.isFiniteNumber)(P);if(B||!J&&!P){Object(t.alignStream)(N,K,L);var re=L.fragments[0].start;return this.log("Live playlist sliding: "+re.toFixed(2)+" start-sn: "+(M?M.startSN:"na")+"->"+L.startSN+" prev-sn: "+(N?N.sn:"na")+" fragments: "+F),re}return P},R.waitForCdnTuneIn=function(L){var M=3;return L.live&&L.canBlockReload&&L.tuneInGoal>Math.max(L.partHoldBack,L.partTarget*M)},R.setStartPosition=function(L,M){var G=this.startPosition;if(G<M&&(G=-1),G===-1||this.lastCurrentTime===-1){var W=L.startTimeOffset;Object(y.isFiniteNumber)(W)?(G=M+W,W<0&&(G+=L.totalduration),G=Math.min(Math.max(M,G),M+L.totalduration),this.log("Start time offset "+W+" found in playlist, adjust startPosition to "+G),this.startPosition=G):L.live?G=this.hls.liveSyncPosition||M:this.startPosition=G=0,this.lastCurrentTime=G}this.nextLoadPosition=G},R.getLoadPosition=function(){var L=this.media,M=0;return this.loadedmetadata&&L?M=L.currentTime:this.nextLoadPosition&&(M=this.nextLoadPosition),M},R.handleFragLoadAborted=function(L,M){this.transmuxer&&L.sn!=="initSegment"&&L.stats.aborted&&(this.warn("Fragment "+L.sn+(M?" part"+M.index:"")+" of level "+L.level+" was aborted"),this.resetFragmentLoading(L))},R.resetFragmentLoading=function(L){(!this.fragCurrent||!this.fragContextChanged(L))&&(this.state=C.IDLE)},R.onFragmentOrKeyLoadError=function(L,M){if(M.fatal)return;var G=M.frag;if(!G||G.type!==L)return;var W=this.fragCurrent;console.assert(W&&G.sn===W.sn&&G.level===W.level&&G.urlId===W.urlId,"Frag load error must match current frag to retry");var N=this.config;if(this.fragLoadError+1<=N.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(G.level))return;var K=Math.min(Math.pow(2,this.fragLoadError)*N.fragLoadingRetryDelay,N.fragLoadingMaxRetryTimeout);this.warn("Fragment "+G.sn+" of "+L+" "+G.level+" failed to load, retrying in "+K+"ms"),this.retryDate=self.performance.now()+K,this.fragLoadError++,this.state=C.FRAG_LOADING_WAITING_RETRY}else M.levelRetry?(L===f.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=C.IDLE):(p.logger.error(M.details+" reaches max retry, redispatch as fatal ..."),M.fatal=!0,this.hls.stopLoad(),this.state=C.ERROR)},R.afterBufferFlushed=function(L,M,G){if(!L)return;var W=g.BufferHelper.getBuffered(L);this.fragmentTracker.detectEvictedFragments(M,W,G),this.state===C.ENDED&&this.resetLoadingState()},R.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=C.IDLE},R.resetLiveStartWhenNotLoaded=function(L){if(!this.loadedmetadata){this.startFragRequested=!1;var M=this.levels?this.levels[L].details:null;if(M!=null&&M.live)return this.startPosition=-1,this.setStartPosition(M,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},R.updateLevelTiming=function(L,M,G,W){var N=this,K=G.details;console.assert(!!K,"level.details must be defined");var F=Object.keys(L.elementaryStreams).reduce(function(P,B){var J=L.elementaryStreams[B];if(J){var re=J.endPTS-J.startPTS;if(re<=0)return N.warn("Could not parse fragment "+L.sn+" "+B+" duration reliably ("+re+") resetting transmuxer to fallback to playlist timing"),N.resetTransmuxer(),P||!1;var he=W?0:Object(e.updateFragPTSDTS)(K,L,J.startPTS,J.endPTS,J.startDTS,J.endDTS);return N.hls.trigger(d.Events.LEVEL_PTS_UPDATED,{details:K,level:G,drift:he,type:B,frag:L,start:J.startPTS,end:J.endPTS}),!0}return P},!1);F?(this.state=C.PARSED,this.hls.trigger(d.Events.FRAG_PARSED,{frag:L,part:M})):this.resetLoadingState()},R.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},l(A,[{key:"state",get:function(){return this._state},set:function(L){var M=this._state;M!==L&&(this._state=L,this.log(M+"->"+L))}}]),A}(v.default)},"./src/controller/buffer-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return i});var y=O("./src/polyfills/number.ts"),v=O("./src/events.ts"),o=O("./src/utils/logger.ts"),g=O("./src/errors.ts"),p=O("./src/utils/buffer-helper.ts"),d=O("./src/utils/mediasource-helper.ts"),a=O("./src/loader/fragment.ts"),n=O("./src/controller/buffer-operation-queue.ts"),s=Object(d.getMediaSource)(),t=/([ha]vc.)(?:\.[^.,]+)+/,i=function(){function e(c){var u=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var f=u.hls,m=u.media,l=u.mediaSource;o.logger.log("[buffer-controller]: Media source opened"),m&&(u.updateMediaElementDuration(),f.trigger(v.Events.MEDIA_ATTACHED,{media:m})),l&&l.removeEventListener("sourceopen",u._onMediaSourceOpen),u.checkPendingTracks()},this._onMediaSourceClose=function(){o.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){o.logger.log("[buffer-controller]: Media source ended")},this.hls=c,this._initSourceBuffer(),this.registerListeners()}var r=e.prototype;return r.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},r.destroy=function(){this.unregisterListeners(),this.details=null},r.registerListeners=function(){var u=this.hls;u.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(v.Events.BUFFER_RESET,this.onBufferReset,this),u.on(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.on(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(v.Events.BUFFER_EOS,this.onBufferEos,this),u.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.on(v.Events.FRAG_PARSED,this.onFragParsed,this),u.on(v.Events.FRAG_CHANGED,this.onFragChanged,this)},r.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(v.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(v.Events.BUFFER_RESET,this.onBufferReset,this),u.off(v.Events.BUFFER_APPENDING,this.onBufferAppending,this),u.off(v.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(v.Events.BUFFER_EOS,this.onBufferEos,this),u.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),u.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),u.off(v.Events.FRAG_PARSED,this.onFragParsed,this),u.off(v.Events.FRAG_CHANGED,this.onFragChanged,this)},r._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new n.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},r.onManifestParsed=function(u,f){var m=2;(f.audio&&!f.video||!f.altAudio)&&(m=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=m,this.details=null,o.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.onMediaAttaching=function(u,f){var m=this.media=f.media;if(m&&s){var l=this.mediaSource=new s;l.addEventListener("sourceopen",this._onMediaSourceOpen),l.addEventListener("sourceended",this._onMediaSourceEnded),l.addEventListener("sourceclose",this._onMediaSourceClose),m.src=self.URL.createObjectURL(l),this._objectUrl=m.src}},r.onMediaDetaching=function(){var u=this.media,f=this.mediaSource,m=this._objectUrl;if(f){if(o.logger.log("[buffer-controller]: media source detaching"),f.readyState==="open")try{f.endOfStream()}catch(l){o.logger.warn("[buffer-controller]: onMediaDetaching: "+l.message+" while calling endOfStream")}this.onBufferReset(),f.removeEventListener("sourceopen",this._onMediaSourceOpen),f.removeEventListener("sourceended",this._onMediaSourceEnded),f.removeEventListener("sourceclose",this._onMediaSourceClose),u&&(m&&self.URL.revokeObjectURL(m),u.src===m?(u.removeAttribute("src"),u.load()):o.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(v.Events.MEDIA_DETACHED,void 0)},r.onBufferReset=function(){var u=this;this.getSourceBufferTypes().forEach(function(f){var m=u.sourceBuffer[f];try{m&&(u.removeBufferListeners(f),u.mediaSource&&u.mediaSource.removeSourceBuffer(m),u.sourceBuffer[f]=void 0)}catch(l){o.logger.warn("[buffer-controller]: Failed to reset the "+f+" buffer",l)}}),this._initSourceBuffer()},r.onBufferCodecs=function(u,f){var m=this,l=this.getSourceBufferTypes().length;if(Object.keys(f).forEach(function(E){if(l){var b=m.tracks[E];if(b&&typeof b.buffer.changeType=="function"){var D=f[E],C=D.codec,w=D.levelCodec,S=D.container,A=(b.levelCodec||b.codec).replace(t,"$1"),R=(w||C).replace(t,"$1");if(A!==R){var k=S+";codecs="+(w||C);m.appendChangeType(E,k)}}}else m.pendingTracks[E]=f[E]}),l)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},r.appendChangeType=function(u,f){var m=this,l=this.operationQueue,E={execute:function(){var D=m.sourceBuffer[u];D&&(o.logger.log("[buffer-controller]: changing "+u+" sourceBuffer type to "+f),D.changeType(f)),l.shiftAndExecuteNext(u)},onStart:function(){},onComplete:function(){},onError:function(D){o.logger.warn("[buffer-controller]: Failed to change "+u+" SourceBuffer type",D)}};l.append(E,u)},r.onBufferAppending=function(u,f){var m=this,l=this.hls,E=this.operationQueue,b=this.tracks,D=f.data,C=f.type,w=f.frag,S=f.part,A=f.chunkMeta,R=A.buffering[C],k=self.performance.now();R.start=k;var L=w.stats.buffering,M=S?S.stats.buffering:null;L.start===0&&(L.start=k),M&&M.start===0&&(M.start=k);var G=b.audio,W=C==="audio"&&A.id===1&&(G==null?void 0:G.container)==="audio/mpeg",N={execute:function(){if(R.executeStart=self.performance.now(),W){var F=m.sourceBuffer[C];if(F){var P=w.start-F.timestampOffset;Math.abs(P)>=.1&&(o.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+w.start+" (delta: "+P+") sn: "+w.sn+")"),F.timestampOffset=w.start)}}m.appendExecutor(D,C)},onStart:function(){},onComplete:function(){var F=self.performance.now();R.executeEnd=R.end=F,L.first===0&&(L.first=F),M&&M.first===0&&(M.first=F);var P=m.sourceBuffer,B={};for(var J in P)B[J]=p.BufferHelper.getBuffered(P[J]);m.appendError=0,m.hls.trigger(v.Events.BUFFER_APPENDED,{type:C,frag:w,part:S,chunkMeta:A,parent:w.type,timeRanges:B})},onError:function(F){o.logger.error("[buffer-controller]: Error encountered while trying to append to the "+C+" SourceBuffer",F);var P={type:g.ErrorTypes.MEDIA_ERROR,parent:w.type,details:g.ErrorDetails.BUFFER_APPEND_ERROR,err:F,fatal:!1};F.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=g.ErrorDetails.BUFFER_FULL_ERROR:(m.appendError++,P.details=g.ErrorDetails.BUFFER_APPEND_ERROR,m.appendError>l.config.appendErrorMaxRetry&&(o.logger.error("[buffer-controller]: Failed "+l.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),l.trigger(v.Events.ERROR,P)}};E.append(N,C)},r.onBufferFlushing=function(u,f){var m=this,l=this.operationQueue,E=function(D){return{execute:m.removeExecutor.bind(m,D,f.startOffset,f.endOffset),onStart:function(){},onComplete:function(){m.hls.trigger(v.Events.BUFFER_FLUSHED,{type:D})},onError:function(w){o.logger.warn("[buffer-controller]: Failed to remove from "+D+" SourceBuffer",w)}}};f.type?l.append(E(f.type),f.type):this.getSourceBufferTypes().forEach(function(b){l.append(E(b),b)})},r.onFragParsed=function(u,f){var m=this,l=f.frag,E=f.part,b=[],D=E?E.elementaryStreams:l.elementaryStreams;D[a.ElementaryStreamTypes.AUDIOVIDEO]?b.push("audiovideo"):(D[a.ElementaryStreamTypes.AUDIO]&&b.push("audio"),D[a.ElementaryStreamTypes.VIDEO]&&b.push("video"));var C=function(){var S=self.performance.now();l.stats.buffering.end=S,E&&(E.stats.buffering.end=S);var A=E?E.stats:l.stats;m.hls.trigger(v.Events.FRAG_BUFFERED,{frag:l,part:E,stats:A,id:l.type})};b.length===0&&o.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+l.type+" level: "+l.level+" sn: "+l.sn),this.blockBuffers(C,b)},r.onFragChanged=function(u,f){this.flushBackBuffer()},r.onBufferEos=function(u,f){var m=this,l=this.getSourceBufferTypes().reduce(function(E,b){var D=m.sourceBuffer[b];return(!f.type||f.type===b)&&(D&&!D.ended&&(D.ended=!0,o.logger.log("[buffer-controller]: "+b+" sourceBuffer now EOS"))),E&&!!(!D||D.ended)},!0);l&&this.blockBuffers(function(){var E=m.mediaSource;if(!E||E.readyState!=="open")return;E.endOfStream()})},r.onLevelUpdated=function(u,f){var m=f.details;if(!m.fragments.length)return;this.details=m,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},r.flushBackBuffer=function(){var u=this.hls,f=this.details,m=this.media,l=this.sourceBuffer;if(!m||f===null)return;var E=this.getSourceBufferTypes();if(!E.length)return;var b=f.live&&u.config.liveBackBufferLength!==null?u.config.liveBackBufferLength:u.config.backBufferLength;if(!Object(y.isFiniteNumber)(b)||b<0)return;var D=m.currentTime,C=f.levelTargetDuration,w=Math.max(b,C),S=Math.floor(D/C)*C-w;E.forEach(function(A){var R=l[A];if(R){var k=p.BufferHelper.getBuffered(R);k.length>0&&S>k.start(0)&&(u.trigger(v.Events.BACK_BUFFER_REACHED,{bufferEnd:S}),f.live&&u.trigger(v.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:S}),u.trigger(v.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:S,type:A}))}})},r.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var u=this.details,f=this.hls,m=this.media,l=this.mediaSource,E=u.fragments[0].start+u.totalduration,b=m.duration,D=Object(y.isFiniteNumber)(l.duration)?l.duration:0;u.live&&f.config.liveDurationInfinity?(o.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),l.duration=Infinity,this.updateSeekableRange(u)):(E>D&&E>b||!Object(y.isFiniteNumber)(b))&&(o.logger.log("[buffer-controller]: Updating Media Source duration to "+E.toFixed(3)),l.duration=E)},r.updateSeekableRange=function(u){var f=this.mediaSource,m=u.fragments,l=m.length;if(l&&u.live&&f!==null&&f!==void 0&&f.setLiveSeekableRange){var E=Math.max(0,m[0].start),b=Math.max(E,E+u.totalduration);f.setLiveSeekableRange(E,b)}},r.checkPendingTracks=function(){var u=this.bufferCodecEventsExpected,f=this.operationQueue,m=this.pendingTracks,l=Object.keys(m).length;if(l&&!u||l===2){this.createSourceBuffers(m),this.pendingTracks={};var E=this.getSourceBufferTypes();if(E.length===0){this.hls.trigger(v.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}E.forEach(function(b){f.executeNext(b)})}},r.createSourceBuffers=function(u){var f=this.sourceBuffer,m=this.mediaSource;if(!m)throw Error("createSourceBuffers called when mediaSource was null");var l=0;for(var E in u)if(!f[E]){var b=u[E];if(!b)throw Error("source buffer exists for track "+E+", however track does not");var D=b.levelCodec||b.codec,C=b.container+";codecs="+D;o.logger.log("[buffer-controller]: creating sourceBuffer("+C+")");try{var w=f[E]=m.addSourceBuffer(C),S=E;this.addBufferListener(S,"updatestart",this._onSBUpdateStart),this.addBufferListener(S,"updateend",this._onSBUpdateEnd),this.addBufferListener(S,"error",this._onSBUpdateError),this.tracks[E]={buffer:w,codec:D,container:b.container,levelCodec:b.levelCodec,id:b.id},l++}catch(A){o.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+A.message),this.hls.trigger(v.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:A,mimeType:C})}}l&&this.hls.trigger(v.Events.BUFFER_CREATED,{tracks:this.tracks})},r._onSBUpdateStart=function(u){var f=this.operationQueue,m=f.current(u);m.onStart()},r._onSBUpdateEnd=function(u){var f=this.operationQueue,m=f.current(u);m.onComplete(),f.shiftAndExecuteNext(u)},r._onSBUpdateError=function(u,f){o.logger.error("[buffer-controller]: "+u+" SourceBuffer error",f),this.hls.trigger(v.Events.ERROR,{type:g.ErrorTypes.MEDIA_ERROR,details:g.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var m=this.operationQueue.current(u);m&&m.onError(f)},r.removeExecutor=function(u,f,m){var l=this.media,E=this.mediaSource,b=this.operationQueue,D=this.sourceBuffer,C=D[u];if(!l||!E||!C){o.logger.warn("[buffer-controller]: Attempting to remove from the "+u+" SourceBuffer, but it does not exist"),b.shiftAndExecuteNext(u);return}var w=Object(y.isFiniteNumber)(l.duration)?l.duration:Infinity,S=Object(y.isFiniteNumber)(E.duration)?E.duration:Infinity,A=Math.max(0,f),R=Math.min(m,w,S);R>A?(o.logger.log("[buffer-controller]: Removing ["+A+","+R+"] from the "+u+" SourceBuffer"),console.assert(!C.updating,u+" sourceBuffer must not be updating"),C.remove(A,R)):b.shiftAndExecuteNext(u)},r.appendExecutor=function(u,f){var m=this.operationQueue,l=this.sourceBuffer,E=l[f];if(!E){o.logger.warn("[buffer-controller]: Attempting to append to the "+f+" SourceBuffer, but it does not exist"),m.shiftAndExecuteNext(f);return}E.ended=!1,console.assert(!E.updating,f+" sourceBuffer must not be updating"),E.appendBuffer(u)},r.blockBuffers=function(u,f){var m=this;if(f===void 0&&(f=this.getSourceBufferTypes()),!f.length){o.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(u);return}var l=this.operationQueue,E=f.map(function(b){return l.appendBlocker(b)});Promise.all(E).then(function(){u(),f.forEach(function(b){var D=m.sourceBuffer[b];(!D||!D.updating)&&l.shiftAndExecuteNext(b)})})},r.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},r.addBufferListener=function(u,f,m){var l=this.sourceBuffer[u];if(!l)return;var E=m.bind(this,u);this.listeners[u].push({event:f,listener:E}),l.addEventListener(f,E)},r.removeBufferListeners=function(u){var f=this.sourceBuffer[u];if(!f)return;this.listeners[u].forEach(function(m){f.removeEventListener(m.event,m.listener)})},e}()},"./src/controller/buffer-operation-queue.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return v});var y=O("./src/utils/logger.ts"),v=function(){function o(p){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=p}var g=o.prototype;return g.append=function(d,a){var n=this.queues[a];n.push(d),n.length===1&&this.buffers[a]&&this.executeNext(a)},g.insertAbort=function(d,a){var n=this.queues[a];n.unshift(d),this.executeNext(a)},g.appendBlocker=function(d){var a,n=new Promise(function(t){a=t}),s={execute:a,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(s,d),n},g.executeNext=function(d){var a=this.buffers,n=this.queues,s=a[d],t=n[d];if(t.length){var i=t[0];try{i.execute()}catch(e){y.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),i.onError(e),(!s||!s.updating)&&(t.shift(),this.executeNext(d))}}},g.shiftAndExecuteNext=function(d){this.queues[d].shift(),this.executeNext(d)},g.current=function(d){return this.queues[d][0]},o}()},"./src/controller/cap-level-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts");function v(p,d){for(var a=0;a<d.length;a++){var n=d[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function o(p,d,a){return d&&v(p.prototype,d),a&&v(p,a),p}var g=function(){function p(a){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=a,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var d=p.prototype;return d.setStreamController=function(n){this.streamController=n},d.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},d.registerListeners=function(){var n=this.hls;n.on(y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.on(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},d.unregisterListener=function(){var n=this.hls;n.off(y.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),n.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),n.off(y.Events.BUFFER_CODECS,this.onBufferCodecs,this),n.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},d.onFpsDropLevelCapping=function(n,s){p.isLevelAllowed(s.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(s.droppedLevel)},d.onMediaAttaching=function(n,s){this.media=s.media instanceof HTMLVideoElement?s.media:null},d.onManifestParsed=function(n,s){var t=this.hls;this.restrictedLevels=[],this.firstLevel=s.firstLevel,t.config.capLevelToPlayerSize&&s.video&&this.startCapping()},d.onBufferCodecs=function(n,s){var t=this.hls;t.config.capLevelToPlayerSize&&s.video&&this.startCapping()},d.onMediaDetaching=function(){this.stopCapping()},d.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var n=this.hls.levels;if(n.length){var s=this.hls;s.autoLevelCapping=this.getMaxLevel(n.length-1),s.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=s.autoLevelCapping}}},d.getMaxLevel=function(n){var s=this,t=this.hls.levels;if(!t.length)return-1;var i=t.filter(function(e,r){return p.isLevelAllowed(r,s.restrictedLevels)&&r<=n});return this.clientRect=null,p.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},d.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},d.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},d.getDimensions=function(){if(this.clientRect)return this.clientRect;var n=this.media,s={width:0,height:0};if(n){var t=n.getBoundingClientRect();s.width=t.width,s.height=t.height,!s.width&&!s.height&&(s.width=t.right-t.left||n.width||0,s.height=t.bottom-t.top||n.height||0)}return this.clientRect=s,s},p.isLevelAllowed=function(n,s){return s===void 0&&(s=[]),s.indexOf(n)===-1},p.getMaxLevelByMediaSize=function(n,s,t){if(!n||!n.length)return-1;for(var i=function(f,m){return m?f.width!==m.width||f.height!==m.height:!0},e=n.length-1,r=0;r<n.length;r+=1){var c=n[r];if((c.width>=s||c.height>=t)&&i(c,n[r+1])){e=r;break}}return e},o(p,[{key:"mediaWidth",get:function(){return this.getDimensions().width*p.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*p.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var n=1;try{n=self.devicePixelRatio}catch(s){}return n}}]),p}();_.default=g},"./src/controller/cmcd-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return i});var y=O("./src/events.ts"),v=O("./src/types/cmcd.ts"),o=O("./src/utils/buffer-helper.ts"),g=O("./src/utils/logger.ts");function p(e,r){for(var c=0;c<r.length;c++){var u=r[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(e,u.key,u)}}function d(e,r,c){return r&&p(e.prototype,r),c&&p(e,c),e}function a(e,r){var c=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(c)return(c=c.call(e)).next.bind(c);if(Array.isArray(e)||(c=n(e))||r&&e&&typeof e.length=="number"){c&&(e=c);var u=0;return function(){return u>=e.length?{done:!0}:{done:!1,value:e[u++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(e,r){if(!e)return;if(typeof e=="string")return s(e,r);var c=Object.prototype.toString.call(e).slice(8,-1);if(c==="Object"&&e.constructor&&(c=e.constructor.name),c==="Map"||c==="Set")return Array.from(e);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return s(e,r)}function s(e,r){(r==null||r>e.length)&&(r=e.length);for(var c=0,u=new Array(r);c<r;c++)u[c]=e[c];return u}function t(){return t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var c=arguments[r];for(var u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u])}return e},t.apply(this,arguments)}var i=function(){function e(c){var u=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){u.initialized&&(u.starved=!0),u.buffering=!0},this.onPlaying=function(){u.initialized||(u.initialized=!0),u.buffering=!1},this.applyPlaylistData=function(l){try{u.apply(l,{ot:v.CMCDObjectType.MANIFEST,su:!u.initialized})}catch(E){g.logger.warn("Could not generate manifest CMCD data.",E)}},this.applyFragmentData=function(l){try{var E=l.frag,b=u.hls.levels[E.level],D=u.getObjectType(E),C={d:E.duration*1e3,ot:D};(D===v.CMCDObjectType.VIDEO||D===v.CMCDObjectType.AUDIO||D==v.CMCDObjectType.MUXED)&&(C.br=b.bitrate/1e3,C.tb=u.getTopBandwidth(D),C.bl=u.getBufferLength(D)),u.apply(l,C)}catch(w){g.logger.warn("Could not generate segment CMCD data.",w)}},this.hls=c;var f=this.config=c.config,m=f.cmcd;m!=null&&(f.pLoader=this.createPlaylistLoader(),f.fLoader=this.createFragmentLoader(),this.sid=m.sessionId||e.uuid(),this.cid=m.contentId,this.useHeaders=m.useHeaders===!0,this.registerListeners())}var r=e.prototype;return r.registerListeners=function(){var u=this.hls;u.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.on(y.Events.BUFFER_CREATED,this.onBufferCreated,this)},r.unregisterListeners=function(){var u=this.hls;u.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),u.off(y.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},r.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},r.onMediaAttached=function(u,f){this.media=f.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},r.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},r.onBufferCreated=function(u,f){var m,l;this.audioBuffer=(m=f.tracks.audio)===null||m===void 0?void 0:m.buffer,this.videoBuffer=(l=f.tracks.video)===null||l===void 0?void 0:l.buffer},r.createData=function(){var u;return{v:v.CMCDVersion,sf:v.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(u=this.media)===null||u===void 0?void 0:u.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},r.apply=function(u,f){f===void 0&&(f={}),t(f,this.createData());var m=f.ot===v.CMCDObjectType.INIT||f.ot===v.CMCDObjectType.VIDEO||f.ot===v.CMCDObjectType.MUXED;if(this.starved&&m&&(f.bs=!0,f.su=!0,this.starved=!1),f.su==null&&(f.su=this.buffering),this.useHeaders){var l=e.toHeaders(f);if(!Object.keys(l).length)return;u.headers||(u.headers={}),t(u.headers,l)}else{var E=e.toQuery(f);if(!E)return;u.url=e.appendQueryToUri(u.url,E)}},r.getObjectType=function(u){var f=u.type;return f==="subtitle"?v.CMCDObjectType.TIMED_TEXT:u.sn==="initSegment"?v.CMCDObjectType.INIT:f==="audio"?v.CMCDObjectType.AUDIO:f==="main"?this.hls.audioTracks.length?v.CMCDObjectType.VIDEO:v.CMCDObjectType.MUXED:void 0},r.getTopBandwidth=function(u){for(var f=0,m=u===v.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,l=a(m),E;!(E=l()).done;){var b=E.value;b.bitrate>f&&(f=b.bitrate)}return f>0?f:NaN},r.getBufferLength=function(u){var f=this.hls.media,m=u===v.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!m||!f)return NaN;var l=o.BufferHelper.bufferInfo(m,f.currentTime,this.config.maxBufferHole);return l.len*1e3},r.createPlaylistLoader=function(){var u=this.config.pLoader,f=this.applyPlaylistData,m=u||this.config.loader;return function(){function l(b){this.loader=void 0,this.loader=new m(b)}var E=l.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,C,w){f(D),this.loader.load(D,C,w)},d(l,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),l}()},r.createFragmentLoader=function(){var u=this.config.fLoader,f=this.applyFragmentData,m=u||this.config.loader;return function(){function l(b){this.loader=void 0,this.loader=new m(b)}var E=l.prototype;return E.destroy=function(){this.loader.destroy()},E.abort=function(){this.loader.abort()},E.load=function(D,C,w){f(D),this.loader.load(D,C,w)},d(l,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),l}()},e.uuid=function(){var u=URL.createObjectURL(new Blob),f=u.toString();return URL.revokeObjectURL(u),f.substr(f.lastIndexOf("/")+1)},e.serialize=function(u){for(var f=[],m=function(W){return!Number.isNaN(W)&&W!=null&&W!==""&&W!==!1},l=function(W){return Math.round(W)},E=function(W){return l(W/100)*100},b=function(W){return encodeURIComponent(W)},D={br:l,d:l,bl:E,dl:E,mtp:E,nor:b,rtp:E,tb:l},C=Object.keys(u||{}).sort(),w=a(C),S;!(S=w()).done;){var A=S.value,R=u[A];if(!m(R))continue;if(A==="v"&&R===1)continue;if(A=="pr"&&R===1)continue;var k=D[A];k&&(R=k(R));var L=typeof R,M=void 0;A==="ot"||A==="sf"||A==="st"?M=A+"="+R:L==="boolean"?M=A:L==="number"?M=A+"="+R:M=A+"="+JSON.stringify(R),f.push(M)}return f.join(",")},e.toHeaders=function(u){for(var f=Object.keys(u),m={},l=["Object","Request","Session","Status"],E=[{},{},{},{}],b={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},D=0,C=f;D<C.length;D++){var w=C[D],S=b[w]!=null?b[w]:1;E[S][w]=u[w]}for(var A=0;A<E.length;A++){var R=e.serialize(E[A]);R&&(m["CMCD-"+l[A]]=R)}return m},e.toQuery=function(u){return"CMCD="+encodeURIComponent(e.serialize(u))},e.appendQueryToUri=function(u,f){if(!f)return u;var m=u.includes("?")?"&":"?";return""+u+m+f},e}()},"./src/controller/eme-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts"),v=O("./src/errors.ts"),o=O("./src/utils/logger.ts"),g=O("./src/utils/mediakeys-helper.ts");function p(i,e){for(var r=0;r<e.length;r++){var c=e[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function d(i,e,r){return e&&p(i.prototype,e),r&&p(i,r),i}var a=3,n=function(e,r,c){var u={audioCapabilities:[],videoCapabilities:[]};return e.forEach(function(f){u.audioCapabilities.push({contentType:'audio/mp4; codecs="'+f+'"',robustness:c.audioRobustness||""})}),r.forEach(function(f){u.videoCapabilities.push({contentType:'video/mp4; codecs="'+f+'"',robustness:c.videoRobustness||""})}),[u]},s=function(e,r,c,u){switch(e){case g.KeySystems.WIDEVINE:return n(r,c,u);default:throw new Error("Unknown key-system: "+e)}},t=function(){function i(r){this.hls=void 0,this._widevineLicenseUrl=void 0,this._licenseXhrSetup=void 0,this._licenseResponseCallback=void 0,this._emeEnabled=void 0,this._requestMediaKeySystemAccess=void 0,this._drmSystemOptions=void 0,this._config=void 0,this._mediaKeysList=[],this._media=null,this._hasSetMediaKeys=!1,this._requestLicenseFailureCount=0,this.mediaKeysPromise=null,this._onMediaEncrypted=this.onMediaEncrypted.bind(this),this.hls=r,this._config=r.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var e=i.prototype;return e.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},e._registerListeners=function(){this.hls.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},e._unregisterListeners=function(){this.hls.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(y.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this)},e.getLicenseServerUrl=function(c){switch(c){case g.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+c+'"')},e._attemptKeySystemAccess=function(c,u,f){var m=this,l=s(c,u,f,this._drmSystemOptions);o.logger.log("Requesting encrypted media key-system access");var E=this.requestMediaKeySystemAccess(c,l);this.mediaKeysPromise=E.then(function(b){return m._onMediaKeySystemAccessObtained(c,b)}),E.catch(function(b){o.logger.error('Failed to obtain key-system "'+c+'" access:',b)})},e._onMediaKeySystemAccessObtained=function(c,u){var f=this;o.logger.log('Access for key-system "'+c+'" obtained');var m={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:u,mediaKeySystemDomain:c};this._mediaKeysList.push(m);var l=Promise.resolve().then(function(){return u.createMediaKeys()}).then(function(E){return m.mediaKeys=E,o.logger.log('Media-keys created for key-system "'+c+'"'),f._onMediaKeysCreated(),E});return l.catch(function(E){o.logger.error("Failed to create media-keys:",E)}),l},e._onMediaKeysCreated=function(){var c=this;this._mediaKeysList.forEach(function(u){u.mediaKeysSession||(u.mediaKeysSession=u.mediaKeys.createSession(),c._onNewMediaKeySession(u.mediaKeysSession))})},e._onNewMediaKeySession=function(c){var u=this;o.logger.log("New key-system session "+c.sessionId),c.addEventListener("message",function(f){u._onKeySessionMessage(c,f.message)},!1)},e._onKeySessionMessage=function(c,u){o.logger.log("Got EME message event, creating license request"),this._requestLicense(u,function(f){o.logger.log("Received license data (length: "+(f&&f.byteLength)+"), updating key-session"),c.update(f)})},e.onMediaEncrypted=function(c){var u=this;if(o.logger.log('Media is encrypted using "'+c.initDataType+'" init data type'),!this.mediaKeysPromise){o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var f=function(l){if(!u._media)return;u._attemptSetMediaKeys(l),u._generateRequestWithPreferredKeySession(c.initDataType,c.initData)};this.mediaKeysPromise.then(f).catch(f)},e._attemptSetMediaKeys=function(c){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var u=this._mediaKeysList[0];if(!u||!u.mediaKeys){o.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}o.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(u.mediaKeys),this._hasSetMediaKeys=!0}},e._generateRequestWithPreferredKeySession=function(c,u){var f=this,m=this._mediaKeysList[0];if(!m){o.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(m.mediaKeysSessionInitialized){o.logger.warn("Key-Session already initialized but requested again");return}var l=m.mediaKeysSession;if(!l){o.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!u){o.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}o.logger.log('Generating key-session request for "'+c+'" init data type'),m.mediaKeysSessionInitialized=!0,l.generateRequest(c,u).then(function(){o.logger.debug("Key-session generation succeeded")}).catch(function(E){o.logger.error("Error generating key-session request:",E),f.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},e._createLicenseXhr=function(c,u,f){var m=new XMLHttpRequest;m.responseType="arraybuffer",m.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,m,c,u,f);var l=this._licenseXhrSetup;if(l)try{l.call(this.hls,m,c),l=void 0}catch(E){o.logger.error(E)}try{m.readyState||m.open("POST",c,!0),l&&l.call(this.hls,m,c)}catch(E){throw new Error("issue setting up KeySystem license XHR "+E)}return m},e._onLicenseRequestReadyStageChange=function(c,u,f,m){switch(c.readyState){case 4:if(c.status===200){this._requestLicenseFailureCount=0,o.logger.log("License request succeeded");var l=c.response,E=this._licenseResponseCallback;if(E)try{l=E.call(this.hls,c,u)}catch(D){o.logger.error(D)}m(l)}else{if(o.logger.error("License Request XHR failed ("+u+"). Status: "+c.status+" ("+c.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>a){this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var b=a-this._requestLicenseFailureCount+1;o.logger.warn("Retrying license request, "+b+" attempts left"),this._requestLicense(f,m)}break}},e._generateLicenseRequestChallenge=function(c,u){switch(c.mediaKeySystemDomain){case g.KeySystems.WIDEVINE:return u}throw new Error("unsupported key-system: "+c.mediaKeySystemDomain)},e._requestLicense=function(c,u){o.logger.log("Requesting content license for key-system");var f=this._mediaKeysList[0];if(!f){o.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var m=this.getLicenseServerUrl(f.mediaKeySystemDomain),l=this._createLicenseXhr(m,c,u);o.logger.log("Sending license request to URL: "+m);var E=this._generateLicenseRequestChallenge(f,c);l.send(E)}catch(b){o.logger.error("Failure requesting DRM license: "+b),this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.KEY_SYSTEM_ERROR,details:v.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},e.onMediaAttached=function(c,u){if(!this._emeEnabled)return;var f=u.media;this._media=f,f.addEventListener("encrypted",this._onMediaEncrypted)},e.onMediaDetached=function(){var c=this._media,u=this._mediaKeysList;if(!c)return;c.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(u.map(function(f){if(f.mediaKeysSession)return f.mediaKeysSession.close().catch(function(){})})).then(function(){return c.setMediaKeys(null)}).catch(function(){})},e.onManifestParsed=function(c,u){if(!this._emeEnabled)return;var f=u.levels.map(function(l){return l.audioCodec}).filter(function(l){return!!l}),m=u.levels.map(function(l){return l.videoCodec}).filter(function(l){return!!l});this._attemptKeySystemAccess(g.KeySystems.WIDEVINE,f,m)},d(i,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),i}();_.default=t},"./src/controller/fps-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts"),v=O("./src/utils/logger.ts"),o=function(){function g(d){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=d,this.registerListeners()}var p=g.prototype;return p.setStreamController=function(a){this.streamController=a},p.registerListeners=function(){this.hls.on(y.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},p.unregisterListeners=function(){this.hls.off(y.Events.MEDIA_ATTACHING,this.onMediaAttaching)},p.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},p.onMediaAttaching=function(a,n){var s=this.hls.config;if(s.capLevelOnFPSDrop){var t=n.media instanceof self.HTMLVideoElement?n.media:null;this.media=t,t&&typeof t.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}},p.checkFPS=function(a,n,s){var t=performance.now();if(n){if(this.lastTime){var i=t-this.lastTime,e=s-this.lastDroppedFrames,r=n-this.lastDecodedFrames,c=1e3*e/i,u=this.hls;if(u.trigger(y.Events.FPS_DROP,{currentDropped:e,currentDecoded:r,totalDroppedFrames:s}),c>0&&e>u.config.fpsDroppedMonitoringThreshold*r){var f=u.currentLevel;v.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+f),f>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=f)&&(f=f-1,u.trigger(y.Events.FPS_DROP_LEVEL_CAPPING,{level:f,droppedLevel:u.currentLevel}),u.autoLevelCapping=f,this.streamController.nextLevelSwitch())}}this.lastTime=t,this.lastDroppedFrames=s,this.lastDecodedFrames=n}},p.checkFPSInterval=function(){var a=this.media;if(a)if(this.isVideoPlaybackQualityAvailable){var n=a.getVideoPlaybackQuality();this.checkFPS(a,n.totalVideoFrames,n.droppedVideoFrames)}else this.checkFPS(a,a.webkitDecodedFrameCount,a.webkitDroppedFrameCount)},g}();_.default=o},"./src/controller/fragment-finders.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"findFragmentByPDT",function(){return o}),O.d(_,"findFragmentByPTS",function(){return g}),O.d(_,"fragmentWithinToleranceTest",function(){return p}),O.d(_,"pdtWithinToleranceTest",function(){return d}),O.d(_,"findFragWithCC",function(){return a});var y=O("./src/polyfills/number.ts"),v=O("./src/utils/binary-search.ts");function o(n,s,t){if(s===null||!Array.isArray(n)||!n.length||!Object(y.isFiniteNumber)(s))return null;var i=n[0].programDateTime;if(s<(i||0))return null;var e=n[n.length-1].endProgramDateTime;if(s>=(e||0))return null;t=t||0;for(var r=0;r<n.length;++r){var c=n[r];if(d(s,t,c))return c}return null}function g(n,s,t,i){t===void 0&&(t=0),i===void 0&&(i=0);var e=null;if(n?e=s[n.sn-s[0].sn+1]||null:t===0&&s[0].start===0&&(e=s[0]),e&&p(t,i,e)===0)return e;var r=v.default.search(s,p.bind(null,t,i));return r||e}function p(n,s,t){n===void 0&&(n=0),s===void 0&&(s=0);var i=Math.min(s,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-i<=n?1:t.start-i>n&&t.start?-1:0}function d(n,s,t){var i=Math.min(s,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3,e=t.endProgramDateTime||0;return e-i>n}function a(n,s){return v.default.search(n,function(t){return t.cc<s?1:t.cc>s?-1:0})}},"./src/controller/fragment-tracker.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"FragmentState",function(){return o}),O.d(_,"FragmentTracker",function(){return g});var y=O("./src/events.ts"),v=O("./src/types/loader.ts"),o;(function(a){a.NOT_LOADED="NOT_LOADED",a.BACKTRACKED="BACKTRACKED",a.APPENDING="APPENDING",a.PARTIAL="PARTIAL",a.OK="OK"})(o||(o={}));var g=function(){function a(s){this.activeFragment=null,this.activeParts=null,this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=s,this._registerListeners()}var n=a.prototype;return n._registerListeners=function(){var t=this.hls;t.on(y.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.on(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.on(y.Events.FRAG_LOADED,this.onFragLoaded,this)},n._unregisterListeners=function(){var t=this.hls;t.off(y.Events.BUFFER_APPENDED,this.onBufferAppended,this),t.off(y.Events.FRAG_BUFFERED,this.onFragBuffered,this),t.off(y.Events.FRAG_LOADED,this.onFragLoaded,this)},n.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},n.getAppendedFrag=function(t,i){if(i===v.PlaylistLevelType.MAIN){var e=this.activeFragment,r=this.activeParts;if(!e)return null;if(r)for(var c=r.length;c--;){var u=r[c],f=u?u.end:e.appendedPTS;if(u.start<=t&&f!==void 0&&t<=f)return c>9&&(this.activeParts=r.slice(c-9)),u}else if(e.start<=t&&e.appendedPTS!==void 0&&t<=e.appendedPTS)return e}return this.getBufferedFrag(t,i)},n.getBufferedFrag=function(t,i){for(var e=this.fragments,r=Object.keys(e),c=r.length;c--;){var u=e[r[c]];if((u==null?void 0:u.body.type)===i&&u.buffered){var f=u.body;if(f.start<=t&&t<=f.end)return f}}return null},n.detectEvictedFragments=function(t,i,e){var r=this;Object.keys(this.fragments).forEach(function(c){var u=r.fragments[c];if(!u)return;if(!u.buffered){u.body.type===e&&r.removeFragment(u.body);return}var f=u.range[t];if(!f)return;f.time.some(function(m){var l=!r.isTimeBuffered(m.startPTS,m.endPTS,i);return l&&r.removeFragment(u.body),l})})},n.detectPartialFragments=function(t){var i=this,e=this.timeRanges,r=t.frag,c=t.part;if(!e||r.sn==="initSegment")return;var u=d(r),f=this.fragments[u];if(!f)return;Object.keys(e).forEach(function(m){var l=r.elementaryStreams[m];if(!l)return;var E=e[m],b=c!==null||l.partial===!0;f.range[m]=i.getBufferedTimes(r,c,b,E)}),f.backtrack=f.loaded=null,Object.keys(f.range).length?f.buffered=!0:this.removeFragment(f.body)},n.fragBuffered=function(t){var i=d(t),e=this.fragments[i];e&&(e.backtrack=e.loaded=null,e.buffered=!0)},n.getBufferedTimes=function(t,i,e,r){for(var c={time:[],partial:e},u=i?i.start:t.start,f=i?i.end:t.end,m=t.minEndPTS||f,l=t.maxStartPTS||u,E=0;E<r.length;E++){var b=r.start(E)-this.bufferPadding,D=r.end(E)+this.bufferPadding;if(l>=b&&m<=D){c.time.push({startPTS:Math.max(u,r.start(E)),endPTS:Math.min(f,r.end(E))});break}else if(u<D&&f>b)c.partial=!0,c.time.push({startPTS:Math.max(u,r.start(E)),endPTS:Math.min(f,r.end(E))});else if(f<=b)break}return c},n.getPartialFragment=function(t){var i=null,e,r,c,u=0,f=this.bufferPadding,m=this.fragments;return Object.keys(m).forEach(function(l){var E=m[l];if(!E)return;p(E)&&(r=E.body.start-f,c=E.body.end+f,t>=r&&t<=c&&(e=Math.min(t-r,c-t),u<=e&&(i=E.body,u=e)))}),i},n.getState=function(t){var i=d(t),e=this.fragments[i];return e?e.buffered?p(e)?o.PARTIAL:o.OK:e.backtrack?o.BACKTRACKED:o.APPENDING:o.NOT_LOADED},n.backtrack=function(t,i){var e=d(t),r=this.fragments[e];if(!r||r.backtrack)return null;var c=r.backtrack=i||r.loaded;return r.loaded=null,c},n.getBacktrackData=function(t){var i=d(t),e=this.fragments[i];if(e){var r,c=e.backtrack;if(c!=null&&(r=c.payload)!==null&&r!==void 0&&r.byteLength)return c;this.removeFragment(t)}return null},n.isTimeBuffered=function(t,i,e){for(var r,c,u=0;u<e.length;u++){if(r=e.start(u)-this.bufferPadding,c=e.end(u)+this.bufferPadding,t>=r&&i<=c)return!0;if(i<=r)return!1}return!1},n.onFragLoaded=function(t,i){var e=i.frag,r=i.part;if(e.sn==="initSegment"||e.bitrateTest||r)return;var c=d(e);this.fragments[c]={body:e,loaded:i,backtrack:null,buffered:!1,range:Object.create(null)}},n.onBufferAppended=function(t,i){var e=this,r=i.frag,c=i.part,u=i.timeRanges;if(r.type===v.PlaylistLevelType.MAIN)if(this.activeFragment=r,c){var f=this.activeParts;f||(this.activeParts=f=[]),f.push(c)}else this.activeParts=null;this.timeRanges=u,Object.keys(u).forEach(function(m){var l=u[m];if(e.detectEvictedFragments(m,l),!c)for(var E=0;E<l.length;E++)r.appendedPTS=Math.max(l.end(E),r.appendedPTS||0)})},n.onFragBuffered=function(t,i){this.detectPartialFragments(i)},n.hasFragment=function(t){var i=d(t);return!!this.fragments[i]},n.removeFragmentsInRange=function(t,i,e){var r=this;Object.keys(this.fragments).forEach(function(c){var u=r.fragments[c];if(!u)return;if(u.buffered){var f=u.body;f.type===e&&f.start<i&&f.end>t&&r.removeFragment(f)}})},n.removeFragment=function(t){var i=d(t);t.stats.loaded=0,t.clearElementaryStreamInfo(),delete this.fragments[i]},n.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},a}();function p(a){var n,s;return a.buffered&&(((n=a.range.video)===null||n===void 0?void 0:n.partial)||((s=a.range.audio)===null||s===void 0?void 0:s.partial))}function d(a){return a.type+"_"+a.level+"_"+a.urlId+"_"+a.sn}},"./src/controller/gap-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"STALL_MINIMUM_DURATION_MS",function(){return p}),O.d(_,"MAX_START_GAP_JUMP",function(){return d}),O.d(_,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return a}),O.d(_,"SKIP_BUFFER_RANGE_START",function(){return n}),O.d(_,"default",function(){return s});var y=O("./src/utils/buffer-helper.ts"),v=O("./src/errors.ts"),o=O("./src/events.ts"),g=O("./src/utils/logger.ts"),p=250,d=2,a=.1,n=.05,s=function(){function t(e,r,c,u){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=r,this.fragmentTracker=c,this.hls=u}var i=t.prototype;return i.destroy=function(){this.hls=this.fragmentTracker=this.media=null},i.poll=function(r){var c=this.config,u=this.media,f=this.stalled,m=u.currentTime,l=u.seeking,E=this.seeking&&!l,b=!this.seeking&&l;if(this.seeking=l,m!==r){if(this.moved=!0,f!==null){if(this.stallReported){var D=self.performance.now()-f;g.logger.warn("playback not stuck anymore @"+m+", after "+Math.round(D)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((b||E)&&(this.stalled=null),u.paused||u.ended||u.playbackRate===0||!y.BufferHelper.getBuffered(u).length)return;var C=y.BufferHelper.bufferInfo(u,m,0),w=C.len>0,S=C.nextStart||0;if(!w&&!S)return;if(l){var A=C.len>d,R=!S||S-m>d&&!this.fragmentTracker.getPartialFragment(m);if(A||R)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k,L=Math.max(S,C.start||0)-m,M=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,G=M==null||((k=M.details)===null||k===void 0)?void 0:k.live,W=G?M.details.targetduration*2:d;if(L>0&&L<=W){this._trySkipBufferHole(null);return}}var N=self.performance.now();if(f===null){this.stalled=N;return}var K=N-f;!l&&K>=p&&this._reportStall(C.len);var F=y.BufferHelper.bufferInfo(u,m,c.maxBufferHole);this._tryFixBufferStall(F,K)},i._tryFixBufferStall=function(r,c){var u=this.config,f=this.fragmentTracker,m=this.media,l=m.currentTime,E=f.getPartialFragment(l);if(E){var b=this._trySkipBufferHole(E);if(b)return}r.len>u.maxBufferHole&&c>u.highBufferWatchdogPeriod*1e3&&(g.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},i._reportStall=function(r){var c=this.hls,u=this.media,f=this.stallReported;f||(this.stallReported=!0,g.logger.warn("Playback stalling at @"+u.currentTime+" due to low buffer (buffer="+r+")"),c.trigger(o.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:r}))},i._trySkipBufferHole=function(r){for(var c=this.config,u=this.hls,f=this.media,m=f.currentTime,l=0,E=y.BufferHelper.getBuffered(f),b=0;b<E.length;b++){var D=E.start(b);if(m+c.maxBufferHole>=l&&m<D){var C=Math.max(D+n,f.currentTime+a);return g.logger.warn("skipping hole, adjusting currentTime from "+m+" to "+C),this.moved=!0,this.stalled=null,f.currentTime=C,r&&u.trigger(o.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+m+" to "+C,frag:r}),C}l=E.end(b)}return 0},i._tryNudgeBuffer=function(){var r=this.config,c=this.hls,u=this.media,f=u.currentTime,m=(this.nudgeRetry||0)+1;if(this.nudgeRetry=m,m<r.nudgeMaxRetry){var l=f+m*r.nudgeOffset;g.logger.warn("Nudging 'currentTime' from "+f+" to "+l),u.currentTime=l,c.trigger(o.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else g.logger.error("Playhead still not moving while enough data buffered @"+f+" after "+r.nudgeMaxRetry+" nudges"),c.trigger(o.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},t}()},"./src/controller/id3-track-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts"),v=O("./src/utils/texttrack-utils.ts"),o=O("./src/demux/id3.ts"),g=.25,p=function(){function d(n){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=n,this._registerListeners()}var a=d.prototype;return a.destroy=function(){this._unregisterListeners()},a._registerListeners=function(){var s=this.hls;s.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.on(y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a._unregisterListeners=function(){var s=this.hls;s.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),s.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),s.off(y.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),s.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},a.onMediaAttached=function(s,t){this.media=t.media},a.onMediaDetaching=function(){if(!this.id3Track)return;Object(v.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},a.getID3Track=function(s){if(!this.media)return;for(var t=0;t<s.length;t++){var i=s[t];if(i.kind==="metadata"&&i.label==="id3")return Object(v.sendAddTrackEvent)(i,this.media),i}return this.media.addTextTrack("metadata","id3")},a.onFragParsingMetadata=function(s,t){if(!this.media)return;var i=t.frag,e=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var r=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,c=0;c<e.length;c++){var u=o.getID3Frames(e[c].data);if(u){var f=e[c].pts,m=c<e.length-1?e[c+1].pts:i.end,l=m-f;l<=0&&(m=f+g);for(var E=0;E<u.length;E++){var b=u[E];if(!o.isTimeStampFrame(b)){var D=new r(f,m,"");D.value=b,this.id3Track.addCue(D)}}}}},a.onBufferFlushing=function(s,t){var i=t.startOffset,e=t.endOffset,r=t.type;if(!r||r==="audio"){var c=this.id3Track;c&&Object(v.removeCuesInRange)(c,i,e)}},d}();_.default=p},"./src/controller/latency-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return d});var y=O("./src/errors.ts"),v=O("./src/events.ts"),o=O("./src/utils/logger.ts");function g(a,n){for(var s=0;s<n.length;s++){var t=n[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}function p(a,n,s){return n&&g(a.prototype,n),s&&g(a,s),a}var d=function(){function a(s){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=s,this.config=s.config,this.registerListeners()}var n=a.prototype;return n.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},n.registerListeners=function(){this.hls.on(v.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(v.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(v.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){this.hls.off(v.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(v.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(v.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(v.Events.ERROR,this.onError)},n.onMediaAttached=function(t,i){this.media=i.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},n.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},n.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},n.onLevelUpdated=function(t,i){var e=i.details;this.levelDetails=e,e.advanced&&this.timeupdate(),!e.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},n.onError=function(t,i){if(i.details!==y.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,o.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},n.timeupdate=function(){var t=this.media,i=this.levelDetails;if(!t||!i)return;this.currentTime=t.currentTime;var e=this.computeLatency();if(e===null)return;this._latency=e;var r=this.config,c=r.lowLatencyMode,u=r.maxLiveSyncPlaybackRate;if(!c||u===1)return;var f=this.targetLatency;if(f===null)return;var m=e-f,l=Math.min(this.maxLatency,f+i.targetduration),E=m<l;if(i.live&&E&&m>.05&&this.forwardBufferLength>1){var b=Math.min(2,Math.max(1,u)),D=Math.round(2/(1+Math.exp(-.75*m-this.edgeStalled))*20)/20;t.playbackRate=Math.min(b,Math.max(1,D))}else t.playbackRate!==1&&t.playbackRate!==0&&(t.playbackRate=1)},n.estimateLiveEdge=function(){var t=this.levelDetails;return t===null?null:t.edge+t.age},n.computeLatency=function(){var t=this.estimateLiveEdge();return t===null?null:t-this.currentTime},p(a,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var t=this.config,i=this.levelDetails;return t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:i?t.liveMaxLatencyDurationCount*i.targetduration:0}},{key:"targetLatency",get:function(){var t=this.levelDetails;if(t===null)return null;var i=t.holdBack,e=t.partHoldBack,r=t.targetduration,c=this.config,u=c.liveSyncDuration,f=c.liveSyncDurationCount,m=c.lowLatencyMode,l=this.hls.userConfig,E=m&&e||i;(l.liveSyncDuration||l.liveSyncDurationCount||E===0)&&(E=u!==void 0?u:f*r);var b=r,D=1;return E+Math.min(this.stallCount*D,b)}},{key:"liveSyncPosition",get:function(){var t=this.estimateLiveEdge(),i=this.targetLatency,e=this.levelDetails;if(t===null||i===null||e===null)return null;var r=e.edge,c=t-i-this.edgeStalled,u=r-e.totalduration,f=r-(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.min(Math.max(u,c),f)}},{key:"drift",get:function(){var t=this.levelDetails;return t===null?1:t.drift}},{key:"edgeStalled",get:function(){var t=this.levelDetails;if(t===null)return 0;var i=(this.config.lowLatencyMode&&t.partTarget||t.targetduration)*3;return Math.max(t.age-i,0)}},{key:"forwardBufferLength",get:function(){var t=this.media,i=this.levelDetails;if(!t||!i)return 0;var e=t.buffered.length;return e?t.buffered.end(e-1):i.edge-this.currentTime}}]),a}()},"./src/controller/level-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return c});var y=O("./src/types/level.ts"),v=O("./src/events.ts"),o=O("./src/errors.ts"),g=O("./src/utils/codecs.ts"),p=O("./src/controller/level-helper.ts"),d=O("./src/controller/base-playlist-controller.ts"),a=O("./src/types/loader.ts");function n(){return n=Object.assign||function(u){for(var f=1;f<arguments.length;f++){var m=arguments[f];for(var l in m)Object.prototype.hasOwnProperty.call(m,l)&&(u[l]=m[l])}return u},n.apply(this,arguments)}function s(u,f){for(var m=0;m<f.length;m++){var l=f[m];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function t(u,f,m){return f&&s(u.prototype,f),m&&s(u,m),u}function i(u,f){u.prototype=Object.create(f.prototype),u.prototype.constructor=u,e(u,f)}function e(u,f){return e=Object.setPrototypeOf||function(l,E){return l.__proto__=E,l},e(u,f)}var r=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),c=function(u){i(f,u);function f(l){var E;return E=u.call(this,l,"[level-controller]")||this,E._levels=[],E._firstLevel=-1,E._startLevel=void 0,E.currentLevelIndex=-1,E.manualLevelIndex=-1,E.onParsedComplete=void 0,E._registerListeners(),E}var m=f.prototype;return m._registerListeners=function(){var E=this.hls;E.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.on(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.on(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),E.on(v.Events.ERROR,this.onError,this)},m._unregisterListeners=function(){var E=this.hls;E.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),E.off(v.Events.LEVEL_LOADED,this.onLevelLoaded,this),E.off(v.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),E.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),E.off(v.Events.ERROR,this.onError,this)},m.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,u.prototype.destroy.call(this)},m.startLoad=function(){var E=this._levels;E.forEach(function(b){b.loadError=0}),u.prototype.startLoad.call(this)},m.onManifestLoaded=function(E,b){var D=[],C=[],w=[],S,A={},R,k=!1,L=!1,M=!1;if(b.levels.forEach(function(K){var F=K.attrs;k=k||!!(K.width&&K.height),L=L||!!K.videoCodec,M=M||!!K.audioCodec,r&&K.audioCodec&&K.audioCodec.indexOf("mp4a.40.34")!==-1&&(K.audioCodec=void 0);var P=K.bitrate+"-"+K.attrs.RESOLUTION+"-"+K.attrs.CODECS;R=A[P],R?R.url.push(K.url):(R=new y.Level(K),A[P]=R,D.push(R)),F&&(F.AUDIO&&Object(p.addGroupId)(R,"audio",F.AUDIO),F.SUBTITLES&&Object(p.addGroupId)(R,"text",F.SUBTITLES))}),(k||L)&&M&&(D=D.filter(function(K){var F=K.videoCodec,P=K.width,B=K.height;return!!F||!!(P&&B)})),D=D.filter(function(K){var F=K.audioCodec,P=K.videoCodec;return(!F||Object(g.isCodecSupportedInMp4)(F,"audio"))&&(!P||Object(g.isCodecSupportedInMp4)(P,"video"))}),b.audioTracks&&(C=b.audioTracks.filter(function(K){return!K.audioCodec||Object(g.isCodecSupportedInMp4)(K.audioCodec,"audio")}),Object(p.assignTrackIdsByGroup)(C)),b.subtitles&&(w=b.subtitles,Object(p.assignTrackIdsByGroup)(w)),D.length>0){S=D[0].bitrate,D.sort(function(K,F){return K.bitrate-F.bitrate}),this._levels=D;for(var G=0;G<D.length;G++)if(D[G].bitrate===S){this._firstLevel=G,this.log("manifest loaded, "+D.length+" level(s) found, first bitrate: "+S);break}var W=M&&!L,N={levels:D,audioTracks:C,subtitleTracks:w,firstLevel:this._firstLevel,stats:b.stats,audio:M,video:L,altAudio:!W&&C.some(function(K){return!!K.url})};this.hls.trigger(v.Events.MANIFEST_PARSED,N),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(v.Events.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:b.url,reason:"no level with compatible codecs found in manifest"})},m.onError=function(E,b){if(u.prototype.onError.call(this,E,b),b.fatal)return;var D=b.context,C=this._levels[this.currentLevelIndex];if(D&&(D.type===a.PlaylistContextType.AUDIO_TRACK&&C.audioGroupIds&&D.groupId===C.audioGroupIds[C.urlId]||D.type===a.PlaylistContextType.SUBTITLE_TRACK&&C.textGroupIds&&D.groupId===C.textGroupIds[C.urlId])){this.redundantFailover(this.currentLevelIndex);return}var w=!1,S=!0,A;switch(b.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:if(b.frag){var R=this._levels[b.frag.level];R?(R.fragmentError++,R.fragmentError>this.hls.config.fragLoadingMaxRetry&&(A=b.frag.level)):A=b.frag.level}break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:D&&(D.deliveryDirectives&&(S=!1),A=D.level),w=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:A=b.level,w=!0;break}A!==void 0&&this.recoverLevel(b,A,w,S)},m.recoverLevel=function(E,b,D,C){var w=E.details,S=this._levels[b];if(S.loadError++,D){var A=this.retryLoadingOrFail(E);if(A)E.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(C){var R=S.url.length;if(R>1&&S.loadError<R)E.levelRetry=!0,this.redundantFailover(b);else if(this.manualLevelIndex===-1){var k=b===0?this._levels.length-1:b-1;this.currentLevelIndex!==k&&this._levels[k].loadError===0&&(this.warn(w+": switch to "+k),E.levelRetry=!0,this.hls.nextAutoLevel=k)}}},m.redundantFailover=function(E){var b=this._levels[E],D=b.url.length;if(D>1){var C=(b.urlId+1)%D;this.warn("Switching to redundant URL-id "+C),this._levels.forEach(function(w){w.urlId=C}),this.level=E}},m.onFragLoaded=function(E,b){var D=b.frag;if(D!==void 0&&D.type===a.PlaylistLevelType.MAIN){var C=this._levels[D.level];C!==void 0&&(C.fragmentError=0,C.loadError=0)}},m.onLevelLoaded=function(E,b){var D,C=b.level,w=b.details,S=this._levels[C];if(!S){var A;this.warn("Invalid level index "+C),(A=b.deliveryDirectives)!==null&&A!==void 0&&A.skip&&(w.deltaUpdateFailed=!0);return}C===this.currentLevelIndex?(S.fragmentError===0&&(S.loadError=0,this.retryCount=0),this.playlistLoaded(C,b,S.details)):(D=b.deliveryDirectives)!==null&&D!==void 0&&D.skip&&(w.deltaUpdateFailed=!0)},m.onAudioTrackSwitched=function(E,b){var D=this.hls.levels[this.currentLevelIndex];if(!D)return;if(D.audioGroupIds){for(var C=-1,w=this.hls.audioTracks[b.id].groupId,S=0;S<D.audioGroupIds.length;S++)if(D.audioGroupIds[S]===w){C=S;break}C!==D.urlId&&(D.urlId=C,this.startLoad())}},m.loadPlaylist=function(E){var b=this.currentLevelIndex,D=this._levels[b];if(this.canLoad&&D&&D.url.length>0){var C=D.urlId,w=D.url[C];if(E)try{w=E.addDirectives(w)}catch(S){this.warn("Could not construct new URL with HLS Delivery Directives: "+S)}this.log("Attempt loading level index "+b+(E?" at sn "+E.msn+" part "+E.part:"")+" with URL-id "+C+" "+w),this.clearTimer(),this.hls.trigger(v.Events.LEVEL_LOADING,{url:w,level:b,id:C,deliveryDirectives:E||null})}},m.removeLevel=function(E,b){var D=function(S,A){return A!==b},C=this._levels.filter(function(w,S){return S!==E?!0:w.url.length>1&&b!==void 0?(w.url=w.url.filter(D),w.audioGroupIds&&(w.audioGroupIds=w.audioGroupIds.filter(D)),w.textGroupIds&&(w.textGroupIds=w.textGroupIds.filter(D)),w.urlId=0,!0):!1}).map(function(w,S){var A=w.details;return A!=null&&A.fragments&&A.fragments.forEach(function(R){R.level=S}),w});this._levels=C,this.hls.trigger(v.Events.LEVELS_UPDATED,{levels:C})},t(f,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(E){var b,D=this._levels;if(D.length===0)return;if(this.currentLevelIndex===E&&(b=D[E])!==null&&b!==void 0&&b.details)return;if(E<0||E>=D.length){var C=E<0;if(this.hls.trigger(v.Events.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:E,fatal:C,reason:"invalid level idx"}),C)return;E=Math.min(E,D.length-1)}this.clearTimer();var w=this.currentLevelIndex,S=D[w],A=D[E];this.log("switching to level "+E+" from "+w),this.currentLevelIndex=E;var R=n({},A,{level:E,maxBitrate:A.maxBitrate,uri:A.uri,urlId:A.urlId});delete R._urlId,this.hls.trigger(v.Events.LEVEL_SWITCHING,R);var k=A.details;if(!k||k.live){var L=this.switchParams(A.uri,S==null?void 0:S.details);this.loadPlaylist(L)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(E){this.manualLevelIndex=E,this._startLevel===void 0&&(this._startLevel=E),E!==-1&&(this.level=E)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(E){this._firstLevel=E}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var E=this.hls.config.startLevel;return E!==void 0?E:this._firstLevel}else return this._startLevel},set:function(E){this._startLevel=E}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(E){this.level=E,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=E)}}]),f}(d.default)},"./src/controller/level-helper.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"addGroupId",function(){return o}),O.d(_,"assignTrackIdsByGroup",function(){return g}),O.d(_,"updatePTS",function(){return p}),O.d(_,"updateFragPTSDTS",function(){return a}),O.d(_,"mergeDetails",function(){return n}),O.d(_,"mapPartIntersection",function(){return s}),O.d(_,"mapFragmentIntersection",function(){return t}),O.d(_,"adjustSliding",function(){return i}),O.d(_,"addSliding",function(){return e}),O.d(_,"computeReloadInterval",function(){return r}),O.d(_,"getFragmentWithSN",function(){return c}),O.d(_,"getPartWith",function(){return u});var y=O("./src/polyfills/number.ts"),v=O("./src/utils/logger.ts");function o(f,m,l){switch(m){case"audio":f.audioGroupIds||(f.audioGroupIds=[]),f.audioGroupIds.push(l);break;case"text":f.textGroupIds||(f.textGroupIds=[]),f.textGroupIds.push(l);break}}function g(f){var m={};f.forEach(function(l){var E=l.groupId||"";l.id=m[E]=m[E]||0,m[E]++})}function p(f,m,l){var E=f[m],b=f[l];d(E,b)}function d(f,m){var l=m.startPTS;if(Object(y.isFiniteNumber)(l)){var E=0,b;m.sn>f.sn?(E=l-f.start,b=f):(E=f.start-l,b=m),b.duration!==E&&(b.duration=E)}else if(m.sn>f.sn){var D=f.cc===m.cc;D&&f.minEndPTS?m.start=f.start+(f.minEndPTS-f.start):m.start=f.start+f.duration}else m.start=Math.max(f.start-m.duration,0)}function a(f,m,l,E,b,D){var C=E-l;C<=0&&(v.logger.warn("Fragment should have a positive duration",m),E=l+m.duration,D=b+m.duration);var w=l,S=E,A=m.startPTS,R=m.endPTS;if(Object(y.isFiniteNumber)(A)){var k=Math.abs(A-l);Object(y.isFiniteNumber)(m.deltaPTS)?m.deltaPTS=Math.max(k,m.deltaPTS):m.deltaPTS=k,w=Math.max(l,A),l=Math.min(l,A),b=Math.min(b,m.startDTS),S=Math.min(E,R),E=Math.max(E,R),D=Math.max(D,m.endDTS)}m.duration=E-l;var L=l-m.start;m.appendedPTS=E,m.start=m.startPTS=l,m.maxStartPTS=w,m.startDTS=b,m.endPTS=E,m.minEndPTS=S,m.endDTS=D;var M=m.sn;if(!f||M<f.startSN||M>f.endSN)return 0;var G,W=M-f.startSN,N=f.fragments;for(N[W]=m,G=W;G>0;G--)d(N[G],N[G-1]);for(G=W;G<N.length-1;G++)d(N[G],N[G+1]);return f.fragmentHint&&d(N[N.length-1],f.fragmentHint),f.PTSKnown=f.alignedSliding=!0,L}function n(f,m){for(var l=null,E=f.fragments,b=E.length-1;b>=0;b--){var D=E[b].initSegment;if(D){l=D;break}}f.fragmentHint&&delete f.fragmentHint.endPTS;var C=0,w;if(t(f,m,function(G,W){G.relurl&&(C=G.cc-W.cc),Object(y.isFiniteNumber)(G.startPTS)&&Object(y.isFiniteNumber)(G.endPTS)&&(W.start=W.startPTS=G.startPTS,W.startDTS=G.startDTS,W.appendedPTS=G.appendedPTS,W.maxStartPTS=G.maxStartPTS,W.endPTS=G.endPTS,W.endDTS=G.endDTS,W.minEndPTS=G.minEndPTS,W.duration=G.endPTS-G.startPTS,W.duration&&(w=W),m.PTSKnown=m.alignedSliding=!0),W.elementaryStreams=G.elementaryStreams,W.loader=G.loader,W.stats=G.stats,W.urlId=G.urlId,G.initSegment&&(W.initSegment=G.initSegment,l=G.initSegment)}),l){var S=m.fragmentHint?m.fragments.concat(m.fragmentHint):m.fragments;S.forEach(function(G){var W;(!G.initSegment||G.initSegment.relurl===((W=l)===null||W===void 0?void 0:W.relurl))&&(G.initSegment=l)})}if(m.skippedSegments&&(m.deltaUpdateFailed=m.fragments.some(function(G){return!G}),m.deltaUpdateFailed)){v.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var A=m.skippedSegments;A--;)m.fragments.shift();m.startSN=m.fragments[0].sn,m.startCC=m.fragments[0].cc}var R=m.fragments;if(C){v.logger.warn("discontinuity sliding from playlist, take drift into account");for(var k=0;k<R.length;k++)R[k].cc+=C}m.skippedSegments&&(m.startCC=m.fragments[0].cc),s(f.partList,m.partList,function(G,W){W.elementaryStreams=G.elementaryStreams,W.stats=G.stats}),w?a(m,w,w.startPTS,w.endPTS,w.startDTS,w.endDTS):i(f,m),R.length&&(m.totalduration=m.edge-R[0].start),m.driftStartTime=f.driftStartTime,m.driftStart=f.driftStart;var L=m.advancedDateTime;if(m.advanced&&L){var M=m.edge;m.driftStart||(m.driftStartTime=L,m.driftStart=M),m.driftEndTime=L,m.driftEnd=M}else m.driftEndTime=f.driftEndTime,m.driftEnd=f.driftEnd,m.advancedDateTime=f.advancedDateTime}function s(f,m,l){if(f&&m)for(var E=0,b=0,D=f.length;b<=D;b++){var C=f[b],w=m[b+E];C&&w&&C.index===w.index&&C.fragment.sn===w.fragment.sn?l(C,w):E--}}function t(f,m,l){for(var E=m.skippedSegments,b=Math.max(f.startSN,m.startSN)-m.startSN,D=(f.fragmentHint?1:0)+(E?m.endSN:Math.min(f.endSN,m.endSN))-m.startSN,C=m.startSN-f.startSN,w=m.fragmentHint?m.fragments.concat(m.fragmentHint):m.fragments,S=f.fragmentHint?f.fragments.concat(f.fragmentHint):f.fragments,A=b;A<=D;A++){var R=S[C+A],k=w[A];E&&!k&&A<E&&(k=m.fragments[A]=R),R&&k&&l(R,k)}}function i(f,m){var l=m.startSN+m.skippedSegments-f.startSN,E=f.fragments;if(l<0||l>=E.length)return;e(m,E[l].start)}function e(f,m){if(m){for(var l=f.fragments,E=f.skippedSegments;E<l.length;E++)l[E].start+=m;f.fragmentHint&&(f.fragmentHint.start+=m)}}function r(f,m){var l=1e3*f.levelTargetDuration,E=l/2,b=f.age,D=b>0&&b<l*3,C=m.loading.end-m.loading.start,w,S=f.availabilityDelay;if(f.updated===!1)if(D){var A=333*f.misses;w=Math.max(Math.min(E,C*2),A),f.availabilityDelay=(f.availabilityDelay||0)+w}else w=E;else D?(S=Math.min(S||l/2,b),f.availabilityDelay=S,w=S+l-b):w=l-C;return Math.round(w)}function c(f,m,l){if(!f||!f.details)return null;var E=f.details,b=E.fragments[m-E.startSN];return b||(b=E.fragmentHint,b&&b.sn===m?b:m<E.startSN&&l&&l.sn===m?l:null)}function u(f,m,l){if(!f||!f.details)return null;var E=f.details.partList;if(E)for(var b=E.length;b--;){var D=E[b];if(D.index===l&&D.fragment.sn===m)return D}return null}},"./src/controller/stream-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return E});var y=O("./src/polyfills/number.ts"),v=O("./src/controller/base-stream-controller.ts"),o=O("./src/is-supported.ts"),g=O("./src/events.ts"),p=O("./src/utils/buffer-helper.ts"),d=O("./src/controller/fragment-tracker.ts"),a=O("./src/types/loader.ts"),n=O("./src/loader/fragment.ts"),s=O("./src/demux/transmuxer-interface.ts"),t=O("./src/types/transmuxer.ts"),i=O("./src/controller/gap-controller.ts"),e=O("./src/errors.ts"),r=O("./src/utils/logger.ts");function c(b,D){for(var C=0;C<D.length;C++){var w=D[C];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}function u(b,D,C){return D&&c(b.prototype,D),C&&c(b,C),b}function f(b,D){b.prototype=Object.create(D.prototype),b.prototype.constructor=b,m(b,D)}function m(b,D){return m=Object.setPrototypeOf||function(w,S){return w.__proto__=S,w},m(b,D)}var l=100,E=function(b){f(D,b);function D(w,S){var A;return A=b.call(this,w,S,"[stream-controller]")||this,A.audioCodecSwap=!1,A.gapController=null,A.level=-1,A._forceStartLoad=!1,A.altAudio=!1,A.audioOnly=!1,A.fragPlaying=null,A.onvplaying=null,A.onvseeked=null,A.fragLastKbps=0,A.stalled=!1,A.couldBacktrack=!1,A.audioCodecSwitch=!1,A.videoBuffer=null,A._registerListeners(),A}var C=D.prototype;return C._registerListeners=function(){var S=this.hls;S.on(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.on(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.on(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.on(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),S.on(g.Events.LEVEL_LOADING,this.onLevelLoading,this),S.on(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.on(g.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),S.on(g.Events.ERROR,this.onError,this),S.on(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.on(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.on(g.Events.BUFFER_CREATED,this.onBufferCreated,this),S.on(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.on(g.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),S.on(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C._unregisterListeners=function(){var S=this.hls;S.off(g.Events.MEDIA_ATTACHED,this.onMediaAttached,this),S.off(g.Events.MEDIA_DETACHING,this.onMediaDetaching,this),S.off(g.Events.MANIFEST_LOADING,this.onManifestLoading,this),S.off(g.Events.MANIFEST_PARSED,this.onManifestParsed,this),S.off(g.Events.LEVEL_LOADED,this.onLevelLoaded,this),S.off(g.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),S.off(g.Events.ERROR,this.onError,this),S.off(g.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),S.off(g.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),S.off(g.Events.BUFFER_CREATED,this.onBufferCreated,this),S.off(g.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),S.off(g.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),S.off(g.Events.FRAG_BUFFERED,this.onFragBuffered,this)},C.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},C.startLoad=function(S){if(this.levels){var A=this.lastCurrentTime,R=this.hls;if(this.stopLoad(),this.setInterval(l),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var k=R.startLevel;k===-1&&(R.config.testBandwidth?(k=0,this.bitrateTest=!0):k=R.nextAutoLevel),this.level=R.nextLoadLevel=k,this.loadedmetadata=!1}A>0&&S===-1&&(this.log("Override startPosition with lastCurrentTime @"+A.toFixed(3)),S=A),this.state=v.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=S,this.tick()}else this._forceStartLoad=!0,this.state=v.State.STOPPED},C.stopLoad=function(){this._forceStartLoad=!1,b.prototype.stopLoad.call(this)},C.doTick=function(){switch(this.state){case v.State.IDLE:this.doTickIdle();break;case v.State.WAITING_LEVEL:{var S,A=this.levels,R=this.level,k=A==null||((S=A[R])===null||S===void 0)?void 0:S.details;if(k&&(!k.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(k))break;this.state=v.State.IDLE;break}break}case v.State.FRAG_LOADING_WAITING_RETRY:{var L,M=self.performance.now(),G=this.retryDate;(!G||M>=G||(L=this.media)!==null&&L!==void 0&&L.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=v.State.IDLE)}break;default:break}this.onTickEnd()},C.onTickEnd=function(){b.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},C.doTickIdle=function(){var S,A,R=this.hls,k=this.levelLastLoaded,L=this.levels,M=this.media,G=R.config,W=R.nextLoadLevel;if(k===null||!M&&(this.startFragRequested||!G.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!L||!L[W])return;var N=L[W];this.level=R.nextLoadLevel=W;var K=N.details;if(!K||this.state===v.State.WAITING_LEVEL||K.live&&this.levelLastLoaded!==W){this.state=v.State.WAITING_LEVEL;return}var F=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:M,a.PlaylistLevelType.MAIN);if(F===null)return;var P=F.len,B=this.getMaxBufferLength(N.maxBitrate);if(P>=B)return;if(this._streamEnded(F,K)){var J={};this.altAudio&&(J.type="video"),this.hls.trigger(g.Events.BUFFER_EOS,J),this.state=v.State.ENDED;return}var re=F.end,he=this.getNextFragment(re,K);if(this.couldBacktrack&&!this.fragPrevious&&he&&he.sn!=="initSegment"){var we=he.sn-K.startSN;we>1&&(he=K.fragments[we-1],this.fragmentTracker.removeFragment(he))}if(he&&this.fragmentTracker.getState(he)===d.FragmentState.OK&&this.nextLoadPosition>re){var ke=this.audioOnly&&!this.altAudio?n.ElementaryStreamTypes.AUDIO:n.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(M,ke,a.PlaylistLevelType.MAIN),he=this.getNextFragment(this.nextLoadPosition,K)}if(!he)return;he.initSegment&&!he.initSegment.data&&!this.bitrateTest&&(he=he.initSegment),((S=he.decryptdata)===null||S===void 0?void 0:S.keyFormat)==="identity"&&!((A=he.decryptdata)!==null&&A!==void 0&&A.key)?this.loadKey(he,K):this.loadFragment(he,K,re)},C.loadFragment=function(S,A,R){var k,L=this.fragmentTracker.getState(S);if(this.fragCurrent=S,L===d.FragmentState.BACKTRACKED){var M=this.fragmentTracker.getBacktrackData(S);if(M){this._handleFragmentLoadProgress(M),this._handleFragmentLoadComplete(M);return}else L=d.FragmentState.NOT_LOADED}L===d.FragmentState.NOT_LOADED||L===d.FragmentState.PARTIAL?S.sn==="initSegment"?this._loadInitSegment(S):this.bitrateTest?(S.bitrateTest=!0,this.log("Fragment "+S.sn+" of level "+S.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(S)):(this.startFragRequested=!0,b.prototype.loadFragment.call(this,S,A,R)):L===d.FragmentState.APPENDING?this.reduceMaxBufferLength(S.duration)&&this.fragmentTracker.removeFragment(S):((k=this.media)===null||k===void 0?void 0:k.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},C.getAppendedFrag=function(S){var A=this.fragmentTracker.getAppendedFrag(S,a.PlaylistLevelType.MAIN);return A&&"fragment"in A?A.fragment:A},C.getBufferedFrag=function(S){return this.fragmentTracker.getBufferedFrag(S,a.PlaylistLevelType.MAIN)},C.followingBufferedFrag=function(S){return S?this.getBufferedFrag(S.end+.5):null},C.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},C.nextLevelSwitch=function(){var S=this.levels,A=this.media;if(A!=null&&A.readyState){var R,k=this.getAppendedFrag(A.currentTime);if(k&&k.start>1&&this.flushMainBuffer(0,k.start-1),!A.paused&&S){var L=this.hls.nextLoadLevel,M=S[L],G=this.fragLastKbps;G&&this.fragCurrent?R=this.fragCurrent.duration*M.maxBitrate/(1e3*G)+1:R=0}else R=0;var W=this.getBufferedFrag(A.currentTime+R);if(W){var N=this.followingBufferedFrag(W);if(N){this.abortCurrentFrag();var K=N.maxStartPTS?N.maxStartPTS:N.start,F=N.duration,P=Math.max(W.end,K+Math.min(Math.max(F-this.config.maxFragLookUpTolerance,F*.5),F*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},C.abortCurrentFrag=function(){var S=this.fragCurrent;this.fragCurrent=null,S!=null&&S.loader&&S.loader.abort(),this.state===v.State.KEY_LOADING&&(this.state=v.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},C.flushMainBuffer=function(S,A){b.prototype.flushMainBuffer.call(this,S,A,this.altAudio?"video":null)},C.onMediaAttached=function(S,A){b.prototype.onMediaAttached.call(this,S,A);var R=A.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),R.addEventListener("playing",this.onvplaying),R.addEventListener("seeked",this.onvseeked),this.gapController=new i.default(this.config,R,this.fragmentTracker,this.hls)},C.onMediaDetaching=function(){var S=this.media;S&&(S.removeEventListener("playing",this.onvplaying),S.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),b.prototype.onMediaDetaching.call(this)},C.onMediaPlaying=function(){this.tick()},C.onMediaSeeked=function(){var S=this.media,A=S?S.currentTime:null;Object(y.isFiniteNumber)(A)&&this.log("Media seeked to "+A.toFixed(3)),this.tick()},C.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(g.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},C.onManifestParsed=function(S,A){var R=!1,k=!1,L;A.levels.forEach(function(M){L=M.audioCodec,L&&(L.indexOf("mp4a.40.2")!==-1&&(R=!0),L.indexOf("mp4a.40.5")!==-1&&(k=!0))}),this.audioCodecSwitch=R&&k&&!Object(o.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=A.levels,this.startFragRequested=!1},C.onLevelLoading=function(S,A){var R=this.levels;if(!R||this.state!==v.State.IDLE)return;var k=R[A.level];(!k.details||k.details.live&&this.levelLastLoaded!==A.level||this.waitForCdnTuneIn(k.details))&&(this.state=v.State.WAITING_LEVEL)},C.onLevelLoaded=function(S,A){var R,k=this.levels,L=A.level,M=A.details,G=M.totalduration;if(!k){this.warn("Levels were reset while loading level "+L);return}this.log("Level "+L+" loaded ["+M.startSN+","+M.endSN+"], cc ["+M.startCC+", "+M.endCC+"] duration:"+G);var W=this.fragCurrent;W&&(this.state===v.State.FRAG_LOADING||this.state===v.State.FRAG_LOADING_WAITING_RETRY)&&(W.level!==A.level&&W.loader&&(this.state=v.State.IDLE,W.loader.abort()));var N=k[L],K=0;if(M.live||(R=N.details)!==null&&R!==void 0&&R.live){if(M.fragments[0]||(M.deltaUpdateFailed=!0),M.deltaUpdateFailed)return;K=this.alignPlaylists(M,N.details)}if(N.details=M,this.levelLastLoaded=L,this.hls.trigger(g.Events.LEVEL_UPDATED,{details:M,level:L}),this.state===v.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(M))return;this.state=v.State.IDLE}this.startFragRequested?M.live&&this.synchronizeToLiveEdge(M):this.setStartPosition(M,K),this.tick()},C._handleFragmentLoadProgress=function(S){var A,R=S.frag,k=S.part,L=S.payload,M=this.levels;if(!M){this.warn("Levels were reset while fragment load was in progress. Fragment "+R.sn+" of level "+R.level+" will not be buffered");return}var G=M[R.level],W=G.details;if(!W){this.warn("Dropping fragment "+R.sn+" of level "+R.level+" after level details were reset");return}var N=G.videoCodec,K=W.PTSKnown||!W.live,F=(A=R.initSegment)===null||A===void 0?void 0:A.data,P=this._getAudioCodec(G),B=this.transmuxer=this.transmuxer||new s.default(this.hls,a.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),J=k?k.index:-1,re=J!==-1,he=new t.ChunkMetadata(R.level,R.sn,R.stats.chunkCount,L.byteLength,J,re),we=this.initPTS[R.cc];B.push(L,F,P,N,R,k,W.totalduration,K,he,we)},C.onAudioTrackSwitching=function(S,A){var R=this.altAudio,k=!!A.url,L=A.id;if(!k){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var M=this.fragCurrent;M!=null&&M.loader&&(this.log("Switching to main audio track, cancel main fragment load"),M.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var G=this.hls;R&&G.trigger(g.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),G.trigger(g.Events.AUDIO_TRACK_SWITCHED,{id:L})}},C.onAudioTrackSwitched=function(S,A){var R=A.id,k=!!this.hls.audioTracks[R].url;if(k){var L=this.videoBuffer;L&&this.mediaBuffer!==L&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=L)}this.altAudio=k,this.tick()},C.onBufferCreated=function(S,A){var R=A.tracks,k,L,M=!1;for(var G in R){var W=R[G];if(W.id==="main"){if(L=G,k=W,G==="video"){var N=R[G];N&&(this.videoBuffer=N.buffer)}}else M=!0}M&&k?(this.log("Alternate track found, use "+L+".buffered to schedule main fragment loading"),this.mediaBuffer=k.buffer):this.mediaBuffer=this.media},C.onFragBuffered=function(S,A){var R=A.frag,k=A.part;if(R&&R.type!==a.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(R)){this.warn("Fragment "+R.sn+(k?" p: "+k.index:"")+" of level "+R.level+" finished buffering, but was aborted. state: "+this.state),this.state===v.State.PARSED&&(this.state=v.State.IDLE);return}var L=k?k.stats:R.stats;this.fragLastKbps=Math.round(8*L.total/(L.buffering.end-L.loading.first)),R.sn!=="initSegment"&&(this.fragPrevious=R),this.fragBufferedComplete(R,k)},C.onError=function(S,A){switch(A.details){case e.ErrorDetails.FRAG_LOAD_ERROR:case e.ErrorDetails.FRAG_LOAD_TIMEOUT:case e.ErrorDetails.KEY_LOAD_ERROR:case e.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(a.PlaylistLevelType.MAIN,A);break;case e.ErrorDetails.LEVEL_LOAD_ERROR:case e.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==v.State.ERROR&&(A.fatal?(this.warn(""+A.details),this.state=v.State.ERROR):!A.levelRetry&&this.state===v.State.WAITING_LEVEL&&(this.state=v.State.IDLE));break;case e.ErrorDetails.BUFFER_FULL_ERROR:if(A.parent==="main"&&(this.state===v.State.PARSING||this.state===v.State.PARSED)){var R=!0,k=this.getFwdBufferInfo(this.media,a.PlaylistLevelType.MAIN);k&&k.len>.5&&(R=!this.reduceMaxBufferLength(k.len)),R&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},C.checkBuffer=function(){var S=this.media,A=this.gapController;if(!S||!A||!S.readyState)return;var R=p.BufferHelper.getBuffered(S);!this.loadedmetadata&&R.length?(this.loadedmetadata=!0,this.seekToStartPos()):A.poll(this.lastCurrentTime),this.lastCurrentTime=S.currentTime},C.onFragLoadEmergencyAborted=function(){this.state=v.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},C.onBufferFlushed=function(S,A){var R=A.type;if(R!==n.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var k=(R===n.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(k,R,a.PlaylistLevelType.MAIN)}},C.onLevelsUpdated=function(S,A){this.levels=A.levels},C.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},C.seekToStartPos=function(){var S=this.media,A=S.currentTime,R=this.startPosition;if(R>=0&&A<R){if(S.seeking){r.logger.log("could not seek to "+R+", already seeking at "+A);return}var k=p.BufferHelper.getBuffered(S),L=k.length?k.start(0):0,M=L-R;M>0&&(M<this.config.maxBufferHole||M<this.config.maxFragLookUpTolerance)&&(r.logger.log("adjusting start position by "+M+" to match buffer start"),R+=M,this.startPosition=R),this.log("seek to target start position "+R+" from current time "+A),S.currentTime=R}},C._getAudioCodec=function(S){var A=this.config.defaultAudioCodec||S.audioCodec;return this.audioCodecSwap&&A&&(this.log("Swapping audio codec"),A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),A},C._loadBitrateTestFrag=function(S){var A=this;this._doFragLoad(S).then(function(R){var k=A.hls;if(!R||k.nextLoadLevel||A.fragContextChanged(S))return;A.fragLoadError=0,A.state=v.State.IDLE,A.startFragRequested=!1,A.bitrateTest=!1;var L=S.stats;L.parsing.start=L.parsing.end=L.buffering.start=L.buffering.end=self.performance.now(),k.trigger(g.Events.FRAG_LOADED,R)})},C._handleTransmuxComplete=function(S){var A,R="main",k=this.hls,L=S.remuxResult,M=S.chunkMeta,G=this.getCurrentContext(M);if(!G){this.warn("The loading context changed while buffering fragment "+M.sn+" of level "+M.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(M.level);return}var W=G.frag,N=G.part,K=G.level,F=L.video,P=L.text,B=L.id3,J=L.initSegment,re=this.altAudio?void 0:L.audio;if(this.fragContextChanged(W))return;if(this.state=v.State.PARSING,J){J.tracks&&(this._bufferInitSegment(K,J.tracks,W,M),k.trigger(g.Events.FRAG_PARSING_INIT_SEGMENT,{frag:W,id:R,tracks:J.tracks}));var he=J.initPTS,we=J.timescale;Object(y.isFiniteNumber)(he)&&(this.initPTS[W.cc]=he,k.trigger(g.Events.INIT_PTS_FOUND,{frag:W,id:R,initPTS:he,timescale:we}))}if(F&&L.independent!==!1){if(K.details){var ke=F.startPTS,ne=F.endPTS,Oe=F.startDTS,Ce=F.endDTS;if(N)N.elementaryStreams[F.type]={startPTS:ke,endPTS:ne,startDTS:Oe,endDTS:Ce};else if(F.firstKeyFrame&&F.independent&&(this.couldBacktrack=!0),F.dropped&&F.independent){var fe=this.getLoadPosition()+this.config.maxBufferHole;if(fe<ke){this.backtrack(W);return}W.setElementaryStreamInfo(F.type,W.start,ne,W.start,Ce,!0)}W.setElementaryStreamInfo(F.type,ke,ne,Oe,Ce),this.bufferFragmentData(F,W,N,M)}}else if(L.independent===!1){this.backtrack(W);return}if(re){var oe=re.startPTS,se=re.endPTS,be=re.startDTS,ie=re.endDTS;N&&(N.elementaryStreams[n.ElementaryStreamTypes.AUDIO]={startPTS:oe,endPTS:se,startDTS:be,endDTS:ie}),W.setElementaryStreamInfo(n.ElementaryStreamTypes.AUDIO,oe,se,be,ie),this.bufferFragmentData(re,W,N,M)}if(B!=null&&(A=B.samples)!==null&&A!==void 0&&A.length){var de={frag:W,id:R,samples:B.samples};k.trigger(g.Events.FRAG_PARSING_METADATA,de)}if(P){var Fe={frag:W,id:R,samples:P.samples};k.trigger(g.Events.FRAG_PARSING_USERDATA,Fe)}},C._bufferInitSegment=function(S,A,R,k){var L=this;if(this.state!==v.State.PARSING)return;this.audioOnly=!!A.audio&&!A.video,this.altAudio&&!this.audioOnly&&delete A.audio;var M=A.audio,G=A.video,W=A.audiovideo;if(M){var N=S.audioCodec,K=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(N&&(N.indexOf("mp4a.40.5")!==-1?N="mp4a.40.2":N="mp4a.40.5"),M.metadata.channelCount!==1&&K.indexOf("firefox")===-1&&(N="mp4a.40.5")),K.indexOf("android")!==-1&&M.container!=="audio/mpeg"&&(N="mp4a.40.2",this.log("Android: force audio codec to "+N)),S.audioCodec&&S.audioCodec!==N&&this.log('Swapping manifest audio codec "'+S.audioCodec+'" for "'+N+'"'),M.levelCodec=N,M.id="main",this.log("Init audio buffer, container:"+M.container+", codecs[selected/level/parsed]=["+(N||"")+"/"+(S.audioCodec||"")+"/"+M.codec+"]")}G&&(G.levelCodec=S.videoCodec,G.id="main",this.log("Init video buffer, container:"+G.container+", codecs[level/parsed]=["+(S.videoCodec||"")+"/"+G.codec+"]")),W&&this.log("Init audiovideo buffer, container:"+W.container+", codecs[level/parsed]=["+(S.attrs.CODECS||"")+"/"+W.codec+"]"),this.hls.trigger(g.Events.BUFFER_CODECS,A),Object.keys(A).forEach(function(F){var P=A[F],B=P.initSegment;B!=null&&B.byteLength&&L.hls.trigger(g.Events.BUFFER_APPENDING,{type:F,data:B,frag:R,part:null,chunkMeta:k,parent:R.type})}),this.tick()},C.backtrack=function(S){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(S);var A=this.fragmentTracker.backtrack(S);this.fragPrevious=null,this.nextLoadPosition=S.start,A?this.resetFragmentLoading(S):this.state=v.State.BACKTRACKING},C.checkFragmentChanged=function(){var S=this.media,A=null;if(S&&S.readyState>1&&S.seeking===!1){var R=S.currentTime;if(p.BufferHelper.isBuffered(S,R)?A=this.getAppendedFrag(R):p.BufferHelper.isBuffered(S,R+.1)&&(A=this.getAppendedFrag(R+.1)),A){var k=this.fragPlaying,L=A.level;(!k||A.sn!==k.sn||k.level!==L||A.urlId!==k.urlId)&&(this.hls.trigger(g.Events.FRAG_CHANGED,{frag:A}),(!k||k.level!==L)&&this.hls.trigger(g.Events.LEVEL_SWITCHED,{level:L}),this.fragPlaying=A)}}},u(D,[{key:"nextLevel",get:function(){var S=this.nextBufferedFrag;return S?S.level:-1}},{key:"currentLevel",get:function(){var S=this.media;if(S){var A=this.getAppendedFrag(S.currentTime);if(A)return A.level}return-1}},{key:"nextBufferedFrag",get:function(){var S=this.media;if(S){var A=this.getAppendedFrag(S.currentTime);return this.followingBufferedFrag(A)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),D}(v.default)},"./src/controller/subtitle-stream-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"SubtitleStreamController",function(){return f});var y=O("./src/events.ts"),v=O("./src/utils/logger.ts"),o=O("./src/utils/buffer-helper.ts"),g=O("./src/controller/fragment-finders.ts"),p=O("./src/utils/discontinuities.ts"),d=O("./src/controller/level-helper.ts"),a=O("./src/controller/fragment-tracker.ts"),n=O("./src/controller/base-stream-controller.ts"),s=O("./src/types/loader.ts"),t=O("./src/types/level.ts");function i(m,l){for(var E=0;E<l.length;E++){var b=l[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}function e(m,l,E){return l&&i(m.prototype,l),E&&i(m,E),m}function r(m,l){m.prototype=Object.create(l.prototype),m.prototype.constructor=m,c(m,l)}function c(m,l){return c=Object.setPrototypeOf||function(b,D){return b.__proto__=D,b},c(m,l)}var u=500,f=function(m){r(l,m);function l(b,D){var C;return C=m.call(this,b,D,"[subtitle-stream-controller]")||this,C.levels=[],C.currentTrackId=-1,C.tracksBuffered=[],C.mainDetails=null,C._registerListeners(),C}var E=l.prototype;return E.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},E._registerListeners=function(){var D=this.hls;D.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.on(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.on(y.Events.ERROR,this.onError,this),D.on(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.on(y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.on(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.on(y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.on(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E._unregisterListeners=function(){var D=this.hls;D.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),D.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),D.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),D.off(y.Events.LEVEL_LOADED,this.onLevelLoaded,this),D.off(y.Events.ERROR,this.onError,this),D.off(y.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),D.off(y.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),D.off(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),D.off(y.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),D.off(y.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},E.startLoad=function(){this.stopLoad(),this.state=n.State.IDLE,this.setInterval(u),this.tick()},E.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},E.onLevelLoaded=function(D,C){this.mainDetails=C.details},E.onSubtitleFragProcessed=function(D,C){var w=C.frag,S=C.success;if(this.fragPrevious=w,this.state=n.State.IDLE,!S)return;var A=this.tracksBuffered[this.currentTrackId];if(!A)return;for(var R,k=w.start,L=0;L<A.length;L++)if(k>=A[L].start&&k<=A[L].end){R=A[L];break}var M=w.start+w.duration;R?R.end=M:(R={start:k,end:M},A.push(R)),this.fragmentTracker.fragBuffered(w)},E.onBufferFlushing=function(D,C){var w=C.startOffset,S=C.endOffset;if(w===0&&S!==Number.POSITIVE_INFINITY){var A=this.currentTrackId,R=this.levels;if(!R.length||!R[A]||!R[A].details)return;var k=R[A].details,L=k.targetduration,M=S-L;if(M<=0)return;C.endOffsetSubtitles=Math.max(0,M),this.tracksBuffered.forEach(function(G){for(var W=0;W<G.length;){if(G[W].end<=M){G.shift();continue}else if(G[W].start<M)G[W].start=M;else break;W++}}),this.fragmentTracker.removeFragmentsInRange(w,M,s.PlaylistLevelType.SUBTITLE)}},E.onError=function(D,C){var w,S=C.frag;if(!S||S.type!==s.PlaylistLevelType.SUBTITLE)return;(w=this.fragCurrent)!==null&&w!==void 0&&w.loader&&this.fragCurrent.loader.abort(),this.state=n.State.IDLE},E.onSubtitleTracksUpdated=function(D,C){var w=this,S=C.subtitleTracks;this.tracksBuffered=[],this.levels=S.map(function(A){return new t.Level(A)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(A){w.tracksBuffered[A.id]=[]}),this.mediaBuffer=null},E.onSubtitleTrackSwitch=function(D,C){if(this.currentTrackId=C.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var w=this.levels[this.currentTrackId];w!=null&&w.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,w&&this.setInterval(u)},E.onSubtitleTrackLoaded=function(D,C){var w,S=C.details,A=C.id,R=this.currentTrackId,k=this.levels;if(!k.length)return;var L=k[R];if(A>=k.length||A!==R||!L)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,S.live||(w=L.details)!==null&&w!==void 0&&w.live){var M=this.mainDetails;if(S.deltaUpdateFailed||!M)return;var G=M.fragments[0];if(!L.details)S.hasProgramDateTime&&M.hasProgramDateTime?Object(p.alignMediaPlaylistByPDT)(S,M):G&&Object(d.addSliding)(S,G.start);else{var W=this.alignPlaylists(S,L.details);W===0&&G&&Object(d.addSliding)(S,G.start)}}if(L.details=S,this.levelLastLoaded=A,this.tick(),S.live&&!this.fragCurrent&&this.media&&this.state===n.State.IDLE){var N=Object(g.findFragmentByPTS)(null,S.fragments,this.media.currentTime,0);N||(this.warn("Subtitle playlist not aligned with playback"),L.details=void 0)}},E._handleFragmentLoadComplete=function(D){var C=D.frag,w=D.payload,S=C.decryptdata,A=this.hls;if(this.fragContextChanged(C))return;if(w&&w.byteLength>0&&S&&S.key&&S.iv&&S.method==="AES-128"){var R=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(w),S.key.buffer,S.iv.buffer).then(function(k){var L=performance.now();A.trigger(y.Events.FRAG_DECRYPTED,{frag:C,payload:k,stats:{tstart:R,tdecrypt:L}})})}},E.doTick=function(){if(!this.media){this.state=n.State.IDLE;return}if(this.state===n.State.IDLE){var D,C=this.currentTrackId,w=this.levels;if(!w.length||!w[C]||!w[C].details)return;var S=w[C].details,A=S.targetduration,R=this.config,k=this.media,L=o.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,k.currentTime-A,R.maxBufferHole),M=L.end,G=L.len,W=this.getMaxBufferLength()+A;if(G>W)return;console.assert(S,"Subtitle track details are defined on idle subtitle stream controller tick");var N=S.fragments,K=N.length,F=S.edge,P,B=this.fragPrevious;if(M<F){var J=R.maxFragLookUpTolerance;B&&S.hasProgramDateTime&&(P=Object(g.findFragmentByPDT)(N,B.endProgramDateTime,J)),P||(P=Object(g.findFragmentByPTS)(B,N,M,J),!P&&B&&B.start<N[0].start&&(P=N[0]))}else P=N[K-1];(D=P)!==null&&D!==void 0&&D.encrypted?(v.logger.log("Loading key for "+P.sn),this.state=n.State.KEY_LOADING,this.hls.trigger(y.Events.KEY_LOADING,{frag:P})):P&&this.fragmentTracker.getState(P)===a.FragmentState.NOT_LOADED&&this.loadFragment(P,S,M)}},E.loadFragment=function(D,C,w){this.fragCurrent=D,m.prototype.loadFragment.call(this,D,C,w)},e(l,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),l}(n.default)},"./src/controller/subtitle-track-controller.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/events.ts"),v=O("./src/utils/texttrack-utils.ts"),o=O("./src/controller/base-playlist-controller.ts"),g=O("./src/types/loader.ts");function p(i,e){for(var r=0;r<e.length;r++){var c=e[r];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(i,c.key,c)}}function d(i,e,r){return e&&p(i.prototype,e),r&&p(i,r),i}function a(i,e){i.prototype=Object.create(e.prototype),i.prototype.constructor=i,n(i,e)}function n(i,e){return n=Object.setPrototypeOf||function(c,u){return c.__proto__=u,c},n(i,e)}var s=function(i){a(e,i);function e(c){var u;return u=i.call(this,c,"[subtitle-track-controller]")||this,u.media=null,u.tracks=[],u.groupId=null,u.tracksInGroup=[],u.trackId=-1,u.selectDefaultTrack=!0,u.queuedDefaultTrack=-1,u.trackChangeListener=function(){return u.onTextTracksChanged()},u.asyncPollTrackChange=function(){return u.pollTrackChange(0)},u.useTextTrackPolling=!1,u.subtitlePollingInterval=-1,u.subtitleDisplay=!0,u.registerListeners(),u}var r=e.prototype;return r.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,i.prototype.destroy.call(this)},r.registerListeners=function(){var u=this.hls;u.on(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.on(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.on(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.on(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.on(y.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var u=this.hls;u.off(y.Events.MEDIA_ATTACHED,this.onMediaAttached,this),u.off(y.Events.MEDIA_DETACHING,this.onMediaDetaching,this),u.off(y.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(y.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(y.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(y.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),u.off(y.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),u.off(y.Events.ERROR,this.onError,this)},r.onMediaAttached=function(u,f){if(this.media=f.media,!this.media)return;this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange)},r.pollTrackChange=function(u){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,u)},r.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var u=t(this.media.textTracks);u.forEach(function(f){Object(v.clearCurrentCues)(f)}),this.subtitleTrack=-1,this.media=null},r.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},r.onManifestParsed=function(u,f){this.tracks=f.subtitleTracks},r.onSubtitleTrackLoaded=function(u,f){var m=f.id,l=f.details,E=this.trackId,b=this.tracksInGroup[E];if(!b){this.warn("Invalid subtitle track id "+m);return}var D=b.details;b.details=f.details,this.log("subtitle track "+m+" loaded ["+l.startSN+"-"+l.endSN+"]"),m===this.trackId&&(this.retryCount=0,this.playlistLoaded(m,f,D))},r.onLevelLoading=function(u,f){this.switchLevel(f.level)},r.onLevelSwitching=function(u,f){this.switchLevel(f.level)},r.switchLevel=function(u){var f=this.hls.levels[u];if(!(f!=null&&f.textGroupIds))return;var m=f.textGroupIds[f.urlId];if(this.groupId!==m){var l=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,E=this.tracks.filter(function(C){return!m||C.groupId===m});this.tracksInGroup=E;var b=this.findTrackId(l==null?void 0:l.name)||this.findTrackId();this.groupId=m;var D={subtitleTracks:E};this.log("Updating subtitle tracks, "+E.length+' track(s) found in "'+m+'" group-id'),this.hls.trigger(y.Events.SUBTITLE_TRACKS_UPDATED,D),b!==-1&&this.setSubtitleTrack(b,l)}},r.findTrackId=function(u){for(var f=this.tracksInGroup,m=0;m<f.length;m++){var l=f[m];if((!this.selectDefaultTrack||l.default)&&(!u||u===l.name))return l.id}return-1},r.onError=function(u,f){if(i.prototype.onError.call(this,u,f),f.fatal||!f.context)return;f.context.type===g.PlaylistContextType.SUBTITLE_TRACK&&f.context.id===this.trackId&&f.context.groupId===this.groupId&&this.retryLoadingOrFail(f)},r.loadPlaylist=function(u){var f=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(f)){var m=f.id,l=f.groupId,E=f.url;if(u)try{E=u.addDirectives(E)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Loading subtitle playlist for id "+m),this.hls.trigger(y.Events.SUBTITLE_TRACK_LOADING,{url:E,id:m,groupId:l,deliveryDirectives:u||null})}},r.toggleTrackModes=function(u){var f=this,m=this.media,l=this.subtitleDisplay,E=this.trackId;if(!m)return;var b=t(m.textTracks),D=b.filter(function(S){return S.groupId===f.groupId});if(u===-1)[].slice.call(b).forEach(function(S){S.mode="disabled"});else{var C=D[E];C&&(C.mode="disabled")}var w=D[u];w&&(w.mode=l?"showing":"hidden")},r.setSubtitleTrack=function(u,f){var m,l=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=u;return}if(this.trackId!==u&&this.toggleTrackModes(u),this.trackId===u&&(u===-1||(m=l[u])!==null&&m!==void 0&&m.details)||u<-1||u>=l.length)return;this.clearTimer();var E=l[u];if(this.log("Switching to subtitle track "+u),this.trackId=u,E){var b=E.id,D=E.groupId,C=D===void 0?"":D,w=E.name,S=E.type,A=E.url;this.hls.trigger(y.Events.SUBTITLE_TRACK_SWITCH,{id:b,groupId:C,name:w,type:S,url:A});var R=this.switchParams(E.url,f==null?void 0:f.details);this.loadPlaylist(R)}else this.hls.trigger(y.Events.SUBTITLE_TRACK_SWITCH,{id:u})},r.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var u=-1,f=t(this.media.textTracks),m=0;m<f.length;m++)if(f[m].mode==="hidden")u=m;else if(f[m].mode==="showing"){u=m;break}this.subtitleTrack!==u&&(this.subtitleTrack=u)},d(e,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(u){this.selectDefaultTrack=!1;var f=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(u,f)}}]),e}(o.default);function t(i){for(var e=[],r=0;r<i.length;r++){var c=i[r];c.kind==="subtitles"&&c.label&&e.push(i[r])}return e}_.default=s},"./src/controller/timeline-controller.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"TimelineController",function(){return t});var y=O("./src/polyfills/number.ts"),v=O("./src/events.ts"),o=O("./src/utils/cea-608-parser.ts"),g=O("./src/utils/output-filter.ts"),p=O("./src/utils/webvtt-parser.ts"),d=O("./src/utils/texttrack-utils.ts"),a=O("./src/utils/imsc1-ttml-parser.ts"),n=O("./src/types/loader.ts"),s=O("./src/utils/logger.ts"),t=function(){function c(f){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=r(),this.captionsProperties=void 0,this.hls=f,this.config=f.config,this.Cues=f.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var m=new g.default(this,"textTrack1"),l=new g.default(this,"textTrack2"),E=new g.default(this,"textTrack3"),b=new g.default(this,"textTrack4");this.cea608Parser1=new o.default(1,m,l),this.cea608Parser2=new o.default(3,E,b)}f.on(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),f.on(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),f.on(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),f.on(v.Events.FRAG_LOADING,this.onFragLoading,this),f.on(v.Events.FRAG_LOADED,this.onFragLoaded,this),f.on(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),f.on(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),f.on(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),f.on(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),f.on(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var u=c.prototype;return u.destroy=function(){var m=this.hls;m.off(v.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),m.off(v.Events.MEDIA_DETACHING,this.onMediaDetaching,this),m.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),m.off(v.Events.MANIFEST_LOADED,this.onManifestLoaded,this),m.off(v.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),m.off(v.Events.FRAG_LOADING,this.onFragLoading,this),m.off(v.Events.FRAG_LOADED,this.onFragLoaded,this),m.off(v.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),m.off(v.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),m.off(v.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),m.off(v.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),m.off(v.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},u.addCues=function(m,l,E,b,D){for(var C=!1,w=D.length;w--;){var S=D[w],A=e(S[0],S[1],l,E);if(A>=0&&(S[0]=Math.min(S[0],l),S[1]=Math.max(S[1],E),C=!0,A/(E-l)>.5))return}if(C||D.push([l,E]),this.config.renderTextTracksNatively){var R=this.captionsTracks[m];this.Cues.newCue(R,l,E,b)}else{var k=this.Cues.newCue(null,l,E,b);this.hls.trigger(v.Events.CUES_PARSED,{type:"captions",cues:k,track:m})}},u.onInitPtsFound=function(m,l){var E=this,b=l.frag,D=l.id,C=l.initPTS,w=l.timescale,S=this.unparsedVttFrags;D==="main"&&(this.initPTS[b.cc]=C,this.timescale[b.cc]=w),S.length&&(this.unparsedVttFrags=[],S.forEach(function(A){E.onFragLoaded(v.Events.FRAG_LOADED,A)}))},u.getExistingTrack=function(m){var l=this.media;if(l)for(var E=0;E<l.textTracks.length;E++){var b=l.textTracks[E];if(b[m])return b}return null},u.createCaptionsTrack=function(m){this.config.renderTextTracksNatively?this.createNativeTrack(m):this.createNonNativeTrack(m)},u.createNativeTrack=function(m){if(this.captionsTracks[m])return;var l=this.captionsProperties,E=this.captionsTracks,b=this.media,D=l[m],C=D.label,w=D.languageCode,S=this.getExistingTrack(m);if(S)E[m]=S,Object(d.clearCurrentCues)(E[m]),Object(d.sendAddTrackEvent)(E[m],b);else{var A=this.createTextTrack("captions",C,w);A&&(A[m]=!0,E[m]=A)}},u.createNonNativeTrack=function(m){if(this.nonNativeCaptionsTracks[m])return;var l=this.captionsProperties[m];if(!l)return;var E=l.label,b={_id:m,label:E,kind:"captions",default:l.media?!!l.media.default:!1,closedCaptions:l.media};this.nonNativeCaptionsTracks[m]=b,this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[b]})},u.createTextTrack=function(m,l,E){var b=this.media;return b?b.addTextTrack(m,l,E):void 0},u.onMediaAttaching=function(m,l){this.media=l.media,this._cleanTracks()},u.onMediaDetaching=function(){var m=this.captionsTracks;Object.keys(m).forEach(function(l){Object(d.clearCurrentCues)(m[l]),delete m[l]}),this.nonNativeCaptionsTracks={}},u.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=r(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},u._cleanTracks=function(){var m=this.media;if(!m)return;var l=m.textTracks;if(l)for(var E=0;E<l.length;E++)Object(d.clearCurrentCues)(l[E])},u.onSubtitleTracksUpdated=function(m,l){var E=this;this.textTracks=[];var b=l.subtitleTracks||[],D=b.some(function(A){return A.textCodec===a.IMSC1_CODEC});if(this.config.enableWebVTT||D&&this.config.enableIMSC1){var C=this.tracks&&b&&this.tracks.length===b.length;if(this.tracks=b||[],this.config.renderTextTracksNatively){var w=this.media?this.media.textTracks:[];this.tracks.forEach(function(A,R){var k;if(R<w.length){for(var L=null,M=0;M<w.length;M++)if(i(w[M],A)){L=w[M];break}L&&(k=L)}k?Object(d.clearCurrentCues)(k):(k=E.createTextTrack("subtitles",A.name,A.lang),k&&(k.mode="disabled")),k&&(k.groupId=A.groupId,E.textTracks.push(k))})}else if(!C&&this.tracks&&this.tracks.length){var S=this.tracks.map(function(A){return{label:A.name,kind:A.type.toLowerCase(),default:A.default,subtitleTrack:A}});this.hls.trigger(v.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:S})}}},u.onManifestLoaded=function(m,l){var E=this;this.config.enableCEA708Captions&&l.captions&&l.captions.forEach(function(b){var D=/(?:CC|SERVICE)([1-4])/.exec(b.instreamId);if(!D)return;var C="textTrack"+D[1],w=E.captionsProperties[C];if(!w)return;w.label=b.name,b.lang&&(w.languageCode=b.lang),w.media=b})},u.onFragLoading=function(m,l){var E=this.cea608Parser1,b=this.cea608Parser2,D=this.lastSn,C=this.lastPartIndex;if(!this.enabled||!(E&&b))return;if(l.frag.type===n.PlaylistLevelType.MAIN){var w,S,A=l.frag.sn,R=(w=l==null||((S=l.part)===null||S===void 0)?void 0:S.index)!=null?w:-1;A===D+1||A===D&&R===C+1||(E.reset(),b.reset()),this.lastSn=A,this.lastPartIndex=R}},u.onFragLoaded=function(m,l){var E=l.frag,b=l.payload,D=this.initPTS,C=this.unparsedVttFrags;if(E.type===n.PlaylistLevelType.SUBTITLE)if(b.byteLength){if(!Object(y.isFiniteNumber)(D[E.cc])){C.push(l),D.length&&this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Missing initial subtitle PTS")});return}var w=E.decryptdata;if(w==null||w.key==null||w.method!=="AES-128"){var S=this.tracks[E.level],A=this.vttCCs;A[E.cc]||(A[E.cc]={start:E.start,prevCC:this.prevCC,new:!0},this.prevCC=E.cc),S&&S.textCodec===a.IMSC1_CODEC?this._parseIMSC1(E,b):this._parseVTTs(E,b,A)}}else this.hls.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:E,error:new Error("Empty subtitle payload")})},u._parseIMSC1=function(m,l){var E=this,b=this.hls;Object(a.parseIMSC1)(l,this.initPTS[m.cc],this.timescale[m.cc],function(D){E._appendCues(D,m.level),b.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(D){s.logger.log("Failed to parse IMSC1: "+D),b.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:D})})},u._parseVTTs=function(m,l,E){var b=this,D=this.hls;Object(p.parseWebVTT)(l,this.initPTS[m.cc],this.timescale[m.cc],E,m.cc,m.start,function(C){b._appendCues(C,m.level),D.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:m})},function(C){b._fallbackToIMSC1(m,l),s.logger.log("Failed to parse VTT cue: "+C),D.trigger(v.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:m,error:C})})},u._fallbackToIMSC1=function(m,l){var E=this,b=this.tracks[m.level];b.textCodec||Object(a.parseIMSC1)(l,this.initPTS[m.cc],this.timescale[m.cc],function(){b.textCodec=a.IMSC1_CODEC,E._parseIMSC1(m,l)},function(){b.textCodec="wvtt"})},u._appendCues=function(m,l){var E=this.hls;if(this.config.renderTextTracksNatively){var b=this.textTracks[l];if(b.mode==="disabled")return;m.forEach(function(w){return Object(d.addCueToTrack)(b,w)})}else{var D=this.tracks[l],C=D.default?"default":"subtitles"+l;E.trigger(v.Events.CUES_PARSED,{type:"subtitles",cues:m,track:C})}},u.onFragDecrypted=function(m,l){var E=l.frag;if(E.type===n.PlaylistLevelType.SUBTITLE){if(!Object(y.isFiniteNumber)(this.initPTS[E.cc])){this.unparsedVttFrags.push(l);return}this.onFragLoaded(v.Events.FRAG_LOADED,l)}},u.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},u.onFragParsingUserdata=function(m,l){var E=this.cea608Parser1,b=this.cea608Parser2;if(!this.enabled||!(E&&b))return;for(var D=0;D<l.samples.length;D++){var C=l.samples[D].bytes;if(C){var w=this.extractCea608Data(C);E.addData(l.samples[D].pts,w[0]),b.addData(l.samples[D].pts,w[1])}}},u.onBufferFlushing=function(m,l){var E=l.startOffset,b=l.endOffset,D=l.endOffsetSubtitles,C=l.type,w=this.media;if(!w||w.currentTime<b)return;if(!C||C==="video"){var S=this.captionsTracks;Object.keys(S).forEach(function(R){return Object(d.removeCuesInRange)(S[R],E,b)})}if(this.config.renderTextTracksNatively&&(E===0&&D!==void 0)){var A=this.textTracks;Object.keys(A).forEach(function(R){return Object(d.removeCuesInRange)(A[R],E,D)})}},u.extractCea608Data=function(m){for(var l=m[0]&31,E=2,b=[[],[]],D=0;D<l;D++){var C=m[E++],w=127&m[E++],S=127&m[E++],A=(4&C)!==0,R=3&C;if(w===0&&S===0)continue;A&&((R===0||R===1)&&(b[R].push(w),b[R].push(S)))}return b},c}();function i(c,u){return c&&c.label===u.name&&!(c.textTrack1||c.textTrack2)}function e(c,u,f,m){return Math.min(u,m)-Math.max(c,f)}function r(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return y});var y=function(){function v(g,p){this.subtle=void 0,this.aesIV=void 0,this.subtle=g,this.aesIV=p}var o=v.prototype;return o.decrypt=function(p,d){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},d,p)},v}()},"./src/crypt/aes-decryptor.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"removePadding",function(){return v}),O.d(_,"default",function(){return o});var y=O("./src/utils/typed-array.ts");function v(g){var p=g.byteLength,d=p&&new DataView(g.buffer).getUint8(p-1);return d?Object(y.sliceUint8)(g,0,p-d):g}var o=function(){function g(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var p=g.prototype;return p.uint8ArrayToUint32Array_=function(a){for(var n=new DataView(a),s=new Uint32Array(4),t=0;t<4;t++)s[t]=n.getUint32(t*4);return s},p.initTable=function(){var a=this.sBox,n=this.invSBox,s=this.subMix,t=s[0],i=s[1],e=s[2],r=s[3],c=this.invSubMix,u=c[0],f=c[1],m=c[2],l=c[3],E=new Uint32Array(256),b=0,D=0,C=0;for(C=0;C<256;C++)C<128?E[C]=C<<1:E[C]=C<<1^283;for(C=0;C<256;C++){var w=D^D<<1^D<<2^D<<3^D<<4;w=w>>>8^w&255^99,a[b]=w,n[w]=b;var S=E[b],A=E[S],R=E[A],k=E[w]*257^w*16843008;t[b]=k<<24|k>>>8,i[b]=k<<16|k>>>16,e[b]=k<<8|k>>>24,r[b]=k,k=R*16843009^A*65537^S*257^b*16843008,u[w]=k<<24|k>>>8,f[w]=k<<16|k>>>16,m[w]=k<<8|k>>>24,l[w]=k,b?(b=S^E[E[E[R^S]]],D^=E[E[D]]):b=D=1}},p.expandKey=function(a){for(var n=this.uint8ArrayToUint32Array_(a),s=!0,t=0;t<n.length&&s;)s=n[t]===this.key[t],t++;if(s)return;this.key=n;var i=this.keySize=n.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);var e=this.ksRows=(i+6+1)*4,r,c,u=this.keySchedule=new Uint32Array(e),f=this.invKeySchedule=new Uint32Array(e),m=this.sBox,l=this.rcon,E=this.invSubMix,b=E[0],D=E[1],C=E[2],w=E[3],S,A;for(r=0;r<e;r++){if(r<i){S=u[r]=n[r];continue}A=S,r%i===0?(A=A<<8|A>>>24,A=m[A>>>24]<<24|m[A>>>16&255]<<16|m[A>>>8&255]<<8|m[A&255],A^=l[r/i|0]<<24):i>6&&r%i===4&&(A=m[A>>>24]<<24|m[A>>>16&255]<<16|m[A>>>8&255]<<8|m[A&255]),u[r]=S=(u[r-i]^A)>>>0}for(c=0;c<e;c++)r=e-c,c&3?A=u[r]:A=u[r-4],c<4||r<=4?f[c]=A:f[c]=b[m[A>>>24]]^D[m[A>>>16&255]]^C[m[A>>>8&255]]^w[m[A&255]],f[c]=f[c]>>>0},p.networkToHostOrderSwap=function(a){return a<<24|(a&65280)<<8|(a&16711680)>>8|a>>>24},p.decrypt=function(a,n,s){for(var t=this.keySize+6,i=this.invKeySchedule,e=this.invSBox,r=this.invSubMix,c=r[0],u=r[1],f=r[2],m=r[3],l=this.uint8ArrayToUint32Array_(s),E=l[0],b=l[1],D=l[2],C=l[3],w=new Int32Array(a),S=new Int32Array(w.length),A,R,k,L,M,G,W,N,K,F,P,B,J,re,he=this.networkToHostOrderSwap;n<w.length;){for(K=he(w[n]),F=he(w[n+1]),P=he(w[n+2]),B=he(w[n+3]),M=K^i[0],G=B^i[1],W=P^i[2],N=F^i[3],J=4,re=1;re<t;re++)A=c[M>>>24]^u[G>>16&255]^f[W>>8&255]^m[N&255]^i[J],R=c[G>>>24]^u[W>>16&255]^f[N>>8&255]^m[M&255]^i[J+1],k=c[W>>>24]^u[N>>16&255]^f[M>>8&255]^m[G&255]^i[J+2],L=c[N>>>24]^u[M>>16&255]^f[G>>8&255]^m[W&255]^i[J+3],M=A,G=R,W=k,N=L,J=J+4;A=e[M>>>24]<<24^e[G>>16&255]<<16^e[W>>8&255]<<8^e[N&255]^i[J],R=e[G>>>24]<<24^e[W>>16&255]<<16^e[N>>8&255]<<8^e[M&255]^i[J+1],k=e[W>>>24]<<24^e[N>>16&255]<<16^e[M>>8&255]<<8^e[G&255]^i[J+2],L=e[N>>>24]<<24^e[M>>16&255]<<16^e[G>>8&255]<<8^e[W&255]^i[J+3],S[n]=he(A^E),S[n+1]=he(L^b),S[n+2]=he(k^D),S[n+3]=he(R^C),E=K,b=F,D=P,C=B,n=n+4}return S.buffer},g}()},"./src/crypt/decrypter.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return n});var y=O("./src/crypt/aes-crypto.ts"),v=O("./src/crypt/fast-aes-key.ts"),o=O("./src/crypt/aes-decryptor.ts"),g=O("./src/utils/logger.ts"),p=O("./src/utils/mp4-tools.ts"),d=O("./src/utils/typed-array.ts"),a=16,n=function(){function s(i,e,r){var c=r===void 0?{}:r,u=c.removePKCS7Padding,f=u===void 0?!0:u;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=i,this.config=e,this.removePKCS7Padding=f,f)try{var m=self.crypto;m&&(this.subtle=m.subtle||m.webkitSubtle)}catch(l){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var t=s.prototype;return t.destroy=function(){this.observer=null},t.isSync=function(){return this.config.enableSoftwareAES},t.flush=function(){var e=this.currentResult;if(!e){this.reset();return}var r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Object(o.removePadding)(r):r},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,r,c,u){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(e),r,c);var f=this.flush();f&&u(f.buffer)}else this.webCryptoDecrypt(new Uint8Array(e),r,c).then(u)},t.softwareDecrypt=function(e,r,c){var u=this.currentIV,f=this.currentResult,m=this.remainderData;this.logOnce("JS AES decrypt"),m&&(e=Object(p.appendUint8Array)(m,e),this.remainderData=null);var l=this.getValidChunk(e);if(!l.length)return null;u&&(c=u);var E=this.softwareDecrypter;E||(E=this.softwareDecrypter=new o.default),E.expandKey(r);var b=f;return this.currentResult=E.decrypt(l.buffer,0,c),this.currentIV=Object(d.sliceUint8)(l,-16).buffer,b||null},t.webCryptoDecrypt=function(e,r,c){var u=this,f=this.subtle;return(this.key!==r||!this.fastAesKey)&&(this.key=r,this.fastAesKey=new v.default(f,r)),this.fastAesKey.expandKey().then(function(m){if(!f)return Promise.reject(new Error("web crypto not initialized"));var l=new y.default(f,c);return l.decrypt(e.buffer,m)}).catch(function(m){return u.onWebCryptoError(m,e,r,c)})},t.onWebCryptoError=function(e,r,c,u){return g.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",e),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(r,c,u)},t.getValidChunk=function(e){var r=e,c=e.length-e.length%a;return c!==e.length&&(r=Object(d.sliceUint8)(e,0,c),this.remainderData=Object(d.sliceUint8)(e,c)),r},t.logOnce=function(e){if(!this.logEnabled)return;g.logger.log("[decrypter.ts]: "+e),this.logEnabled=!1},s}()},"./src/crypt/fast-aes-key.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return y});var y=function(){function v(g,p){this.subtle=void 0,this.key=void 0,this.subtle=g,this.key=p}var o=v.prototype;return o.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},v}()},"./src/demux/aacdemuxer.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/demux/base-audio-demuxer.ts"),v=O("./src/demux/adts.ts"),o=O("./src/utils/logger.ts"),g=O("./src/demux/id3.ts");function p(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,d(n,s)}function d(n,s){return d=Object.setPrototypeOf||function(i,e){return i.__proto__=e,i},d(n,s)}var a=function(n){p(s,n);function s(i,e){var r;return r=n.call(this)||this,r.observer=void 0,r.config=void 0,r.observer=i,r.config=e,r}var t=s.prototype;return t.resetInitSegment=function(e,r,c){n.prototype.resetInitSegment.call(this,e,r,c),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:e,duration:c,inputTimeScale:9e4,dropped:0}},s.probe=function(e){if(!e)return!1;for(var r=g.getID3Data(e,0)||[],c=r.length,u=e.length;c<u;c++)if(v.probe(e,c))return o.logger.log("ADTS sync word found !"),!0;return!1},t.canParse=function(e,r){return v.canParse(e,r)},t.appendFrame=function(e,r,c){v.initTrackConfig(e,this.observer,r,c,e.manifestCodec);var u=v.appendFrame(e,r,c,this.initPTS,this.frameIndex);if(u&&u.missing===0)return u},s}(y.default);a.minProbeByteLength=9,_.default=a},"./src/demux/adts.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"getAudioConfig",function(){return g}),O.d(_,"isHeaderPattern",function(){return p}),O.d(_,"getHeaderLength",function(){return d}),O.d(_,"getFullFrameLength",function(){return a}),O.d(_,"canGetFrameLength",function(){return n}),O.d(_,"isHeader",function(){return s}),O.d(_,"canParse",function(){return t}),O.d(_,"probe",function(){return i}),O.d(_,"initTrackConfig",function(){return e}),O.d(_,"getFrameDuration",function(){return r}),O.d(_,"parseFrameHeader",function(){return c}),O.d(_,"appendFrame",function(){return u});var y=O("./src/utils/logger.ts"),v=O("./src/errors.ts"),o=O("./src/events.ts");function g(f,m,l,E){var b,D,C,w,S=navigator.userAgent.toLowerCase(),A=E,R=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];b=((m[l+2]&192)>>>6)+1;var k=(m[l+2]&60)>>>2;if(k>R.length-1){f.trigger(o.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+k});return}return C=(m[l+2]&1)<<2,C|=(m[l+3]&192)>>>6,y.logger.log("manifest codec:"+E+", ADTS type:"+b+", samplingIndex:"+k),/firefox/i.test(S)?k>=6?(b=5,w=new Array(4),D=k-3):(b=2,w=new Array(2),D=k):S.indexOf("android")!==-1?(b=2,w=new Array(2),D=k):(b=5,w=new Array(4),E&&(E.indexOf("mp4a.40.29")!==-1||E.indexOf("mp4a.40.5")!==-1)||!E&&k>=6?D=k-3:((E&&E.indexOf("mp4a.40.2")!==-1&&(k>=6&&C===1||/vivaldi/i.test(S))||!E&&C===1)&&(b=2,w=new Array(2)),D=k)),w[0]=b<<3,w[0]|=(k&14)>>1,w[1]|=(k&1)<<7,w[1]|=C<<3,b===5&&(w[1]|=(D&14)>>1,w[2]=(D&1)<<7,w[2]|=2<<2,w[3]=0),{config:w,samplerate:R[k],channelCount:C,codec:"mp4a.40."+b,manifestCodec:A}}function p(f,m){return f[m]===255&&(f[m+1]&246)===240}function d(f,m){return f[m+1]&1?7:9}function a(f,m){return(f[m+3]&3)<<11|f[m+4]<<3|(f[m+5]&224)>>>5}function n(f,m){return m+5<f.length}function s(f,m){return m+1<f.length&&p(f,m)}function t(f,m){return n(f,m)&&p(f,m)&&a(f,m)<=f.length-m}function i(f,m){if(s(f,m)){var l=d(f,m);if(m+l>=f.length)return!1;var E=a(f,m);if(E<=l)return!1;var b=m+E;return b===f.length||s(f,b)}return!1}function e(f,m,l,E,b){if(!f.samplerate){var D=g(m,l,E,b);if(!D)return;f.config=D.config,f.samplerate=D.samplerate,f.channelCount=D.channelCount,f.codec=D.codec,f.manifestCodec=D.manifestCodec,y.logger.log("parsed codec:"+f.codec+", rate:"+D.samplerate+", channels:"+D.channelCount)}}function r(f){return 1024*9e4/f}function c(f,m,l,E,b){var D=d(f,m),C=a(f,m);if(C-=D,C>0){var w=l+E*b;return{headerLength:D,frameLength:C,stamp:w}}}function u(f,m,l,E,b){var D=r(f.samplerate),C=c(m,l,E,b,D);if(C){var w=C.frameLength,S=C.headerLength,A=C.stamp,R=S+w,k=Math.max(0,l+R-m.length),L;k?(L=new Uint8Array(R-S),L.set(m.subarray(l+S,m.length),0)):L=m.subarray(l+S,l+R);var M={unit:L,pts:A};return k||f.samples.push(M),{sample:M,length:R,missing:k}}}},"./src/demux/base-audio-demuxer.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"initPTSFn",function(){return a});var y=O("./src/polyfills/number.ts"),v=O("./src/demux/id3.ts"),o=O("./src/demux/dummy-demuxed-track.ts"),g=O("./src/utils/mp4-tools.ts"),p=O("./src/utils/typed-array.ts"),d=function(){function n(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var s=n.prototype;return s.resetInitSegment=function(i,e,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},s.resetTimeStamp=function(){},s.resetContiguity=function(){},s.canParse=function(i,e){return!1},s.appendFrame=function(i,e,r){},s.demux=function(i,e){this.cachedData&&(i=Object(g.appendUint8Array)(this.cachedData,i),this.cachedData=null);var r=v.getID3Data(i,0),c=r?r.length:0,u,f,m=this._audioTrack,l=this._id3Track,E=r?v.getTimeStamp(r):void 0,b=i.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=a(E,e)),r&&r.length>0&&l.samples.push({pts:this.initPTS,dts:this.initPTS,data:r}),f=this.initPTS;c<b;){if(this.canParse(i,c)){var D=this.appendFrame(m,i,c);D?(this.frameIndex++,f=D.sample.pts,c+=D.length,u=c):c=b}else v.canParse(i,c)?(r=v.getID3Data(i,c),l.samples.push({pts:f,dts:f,data:r}),c+=r.length,u=c):c++;if(c===b&&u!==b){var C=Object(p.sliceUint8)(i,u);this.cachedData?this.cachedData=Object(g.appendUint8Array)(this.cachedData,C):this.cachedData=C}}return{audioTrack:m,avcTrack:Object(o.dummyTrack)(),id3Track:l,textTrack:Object(o.dummyTrack)()}},s.demuxSampleAes=function(i,e,r){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},s.flush=function(i){var e=this.cachedData;return e&&(this.cachedData=null,this.demux(e,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(o.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(o.dummyTrack)()}},s.destroy=function(){},n}(),a=function(s,t){return Object(y.isFiniteNumber)(s)?s*90:t*9e4};_.default=d},"./src/demux/chunk-cache.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return y});var y=function(){function o(){this.chunks=[],this.dataLength=0}var g=o.prototype;return g.push=function(d){this.chunks.push(d),this.dataLength+=d.length},g.flush=function(){var d=this.chunks,a=this.dataLength,n;if(d.length)d.length===1?n=d[0]:n=v(d,a);else return new Uint8Array(0);return this.reset(),n},g.reset=function(){this.chunks.length=0,this.dataLength=0},o}();function v(o,g){for(var p=new Uint8Array(g),d=0,a=0;a<o.length;a++){var n=o[a];p.set(n,d),d+=n.length}return p}},"./src/demux/dummy-demuxed-track.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"dummyTrack",function(){return y});function y(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/utils/logger.ts"),v=function(){function o(p){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=p,this.bytesAvailable=p.byteLength,this.word=0,this.bitsAvailable=0}var g=o.prototype;return g.loadWord=function(){var d=this.data,a=this.bytesAvailable,n=d.byteLength-a,s=new Uint8Array(4),t=Math.min(4,a);if(t===0)throw new Error("no bytes available");s.set(d.subarray(n,n+t)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=t*8,this.bytesAvailable-=t},g.skipBits=function(d){var a;this.bitsAvailable>d?(this.word<<=d,this.bitsAvailable-=d):(d-=this.bitsAvailable,a=d>>3,d-=a>>3,this.bytesAvailable-=a,this.loadWord(),this.word<<=d,this.bitsAvailable-=d)},g.readBits=function(d){var a=Math.min(this.bitsAvailable,d),n=this.word>>>32-a;return d>32&&y.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=a,this.bitsAvailable>0?this.word<<=a:this.bytesAvailable>0&&this.loadWord(),a=d-a,a>0&&this.bitsAvailable?n<<a|this.readBits(a):n},g.skipLZ=function(){var d;for(d=0;d<this.bitsAvailable;++d)if((this.word&2147483648>>>d)!==0)return this.word<<=d,this.bitsAvailable-=d,d;return this.loadWord(),d+this.skipLZ()},g.skipUEG=function(){this.skipBits(1+this.skipLZ())},g.skipEG=function(){this.skipBits(1+this.skipLZ())},g.readUEG=function(){var d=this.skipLZ();return this.readBits(d+1)-1},g.readEG=function(){var d=this.readUEG();return 1&d?1+d>>>1:-1*(d>>>1)},g.readBoolean=function(){return this.readBits(1)===1},g.readUByte=function(){return this.readBits(8)},g.readUShort=function(){return this.readBits(16)},g.readUInt=function(){return this.readBits(32)},g.skipScalingList=function(d){for(var a=8,n=8,s,t=0;t<d;t++)n!==0&&(s=this.readEG(),n=(a+s+256)%256),a=n===0?a:n},g.readSPS=function(){var d=0,a=0,n=0,s=0,t,i,e,r=this.readUByte.bind(this),c=this.readBits.bind(this),u=this.readUEG.bind(this),f=this.readBoolean.bind(this),m=this.skipBits.bind(this),l=this.skipEG.bind(this),E=this.skipUEG.bind(this),b=this.skipScalingList.bind(this);r();var D=r();if(c(5),m(3),r(),E(),D===100||D===110||D===122||D===244||D===44||D===83||D===86||D===118||D===128){var C=u();if(C===3&&m(1),E(),E(),m(1),f())for(i=C!==3?8:12,e=0;e<i;e++)f()&&(e<6?b(16):b(64))}E();var w=u();if(w===0)u();else if(w===1)for(m(1),l(),l(),t=u(),e=0;e<t;e++)l();E(),m(1);var S=u(),A=u(),R=c(1);R===0&&m(1),m(1),f()&&(d=u(),a=u(),n=u(),s=u());var k=[1,1];if(f()&&f()){var L=r();switch(L){case 1:k=[1,1];break;case 2:k=[12,11];break;case 3:k=[10,11];break;case 4:k=[16,11];break;case 5:k=[40,33];break;case 6:k=[24,11];break;case 7:k=[20,11];break;case 8:k=[32,11];break;case 9:k=[80,33];break;case 10:k=[18,11];break;case 11:k=[15,11];break;case 12:k=[64,33];break;case 13:k=[160,99];break;case 14:k=[4,3];break;case 15:k=[3,2];break;case 16:k=[2,1];break;case 255:{k=[r()<<8|r(),r()<<8|r()];break}}}return{width:Math.ceil((S+1)*16-d*2-a*2),height:(2-R)*(A+1)*16-(R?2:4)*(n+s),pixelRatio:k}},g.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},o}();_.default=v},"./src/demux/id3.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"isHeader",function(){return y}),O.d(_,"isFooter",function(){return v}),O.d(_,"getID3Data",function(){return o}),O.d(_,"canParse",function(){return p}),O.d(_,"getTimeStamp",function(){return d}),O.d(_,"isTimeStampFrame",function(){return a}),O.d(_,"getID3Frames",function(){return s}),O.d(_,"decodeFrame",function(){return t}),O.d(_,"utf8ArrayToStr",function(){return u}),O.d(_,"testables",function(){return f});var y=function(b,D){return D+10<=b.length&&(b[D]===73&&b[D+1]===68&&b[D+2]===51&&(b[D+3]<255&&b[D+4]<255&&(b[D+6]<128&&b[D+7]<128&&b[D+8]<128&&b[D+9]<128)))},v=function(b,D){return D+10<=b.length&&(b[D]===51&&b[D+1]===68&&b[D+2]===73&&(b[D+3]<255&&b[D+4]<255&&(b[D+6]<128&&b[D+7]<128&&b[D+8]<128&&b[D+9]<128)))},o=function(b,D){for(var C=D,w=0;y(b,D);){w+=10;var S=g(b,D+6);w+=S,v(b,D+10)&&(w+=10),D+=w}return w>0?b.subarray(C,C+w):void 0},g=function(b,D){var C=0;return C=(b[D]&127)<<21,C|=(b[D+1]&127)<<14,C|=(b[D+2]&127)<<7,C|=b[D+3]&127,C},p=function(b,D){return y(b,D)&&g(b,D+6)+10<=b.length-D},d=function(b){for(var D=s(b),C=0;C<D.length;C++){var w=D[C];if(a(w))return c(w)}return},a=function(b){return b&&b.key==="PRIV"&&b.info==="com.apple.streaming.transportStreamTimestamp"},n=function(b){var D=String.fromCharCode(b[0],b[1],b[2],b[3]),C=g(b,4),w=10;return{type:D,size:C,data:b.subarray(w,w+C)}},s=function(b){for(var D=0,C=[];y(b,D);){var w=g(b,D+6);D+=10;for(var S=D+w;D+8<S;){var A=n(b.subarray(D)),R=t(A);R&&C.push(R),D+=A.size+10}v(b,D)&&(D+=10)}return C},t=function(b){return b.type==="PRIV"?i(b):b.type[0]==="W"?r(b):e(b)},i=function(b){if(b.size<2)return;var D=u(b.data,!0),C=new Uint8Array(b.data.subarray(D.length+1));return{key:b.type,info:D,data:C.buffer}},e=function(b){if(b.size<2)return;if(b.type==="TXXX"){var D=1,C=u(b.data.subarray(D),!0);D+=C.length+1;var w=u(b.data.subarray(D));return{key:b.type,info:C,data:w}}var S=u(b.data.subarray(1));return{key:b.type,data:S}},r=function(b){if(b.type==="WXXX"){if(b.size<2)return;var D=1,C=u(b.data.subarray(D),!0);D+=C.length+1;var w=u(b.data.subarray(D));return{key:b.type,info:C,data:w}}var S=u(b.data);return{key:b.type,data:S}},c=function(b){if(b.data.byteLength===8){var D=new Uint8Array(b.data),C=D[3]&1,w=(D[4]<<23)+(D[5]<<15)+(D[6]<<7)+D[7];return w/=45,C&&(w+=4772185884e-2),Math.round(w)}return},u=function(b,D){D===void 0&&(D=!1);var C=l();if(C){var w=C.decode(b);if(D){var S=w.indexOf("\0");return S!==-1?w.substring(0,S):w}return w.replace(/\0/g,"")}for(var A=b.length,R,k,L,M="",G=0;G<A;){if(R=b[G++],R===0&&D)return M;if(R===0||R===3)continue;switch(R>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:M+=String.fromCharCode(R);break;case 12:case 13:k=b[G++],M+=String.fromCharCode((R&31)<<6|k&63);break;case 14:k=b[G++],L=b[G++],M+=String.fromCharCode((R&15)<<12|(k&63)<<6|(L&63)<<0);break;default:}}return M},f={decodeTextFrame:e},m;function l(){return!m&&typeof self.TextDecoder!="undefined"&&(m=new self.TextDecoder("utf-8")),m}},"./src/demux/mp3demuxer.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/demux/base-audio-demuxer.ts"),v=O("./src/demux/id3.ts"),o=O("./src/utils/logger.ts"),g=O("./src/demux/mpegaudio.ts");function p(n,s){n.prototype=Object.create(s.prototype),n.prototype.constructor=n,d(n,s)}function d(n,s){return d=Object.setPrototypeOf||function(i,e){return i.__proto__=e,i},d(n,s)}var a=function(n){p(s,n);function s(){return n.apply(this,arguments)||this}var t=s.prototype;return t.resetInitSegment=function(e,r,c){n.prototype.resetInitSegment.call(this,e,r,c),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:e,duration:c,inputTimeScale:9e4,dropped:0}},s.probe=function(e){if(!e)return!1;for(var r=v.getID3Data(e,0)||[],c=r.length,u=e.length;c<u;c++)if(g.probe(e,c))return o.logger.log("MPEG Audio sync word found !"),!0;return!1},t.canParse=function(e,r){return g.canParse(e,r)},t.appendFrame=function(e,r,c){return this.initPTS===null?void 0:g.appendFrame(e,r,c,this.initPTS,this.frameIndex)},s}(y.default);a.minProbeByteLength=4,_.default=a},"./src/demux/mp4demuxer.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/utils/mp4-tools.ts"),v=O("./src/demux/dummy-demuxed-track.ts"),o=function(){function g(d,a){this.remainderData=null,this.config=void 0,this.config=a}var p=g.prototype;return p.resetTimeStamp=function(){},p.resetInitSegment=function(){},p.resetContiguity=function(){},g.probe=function(a){return Object(y.findBox)({data:a,start:0,end:Math.min(a.length,16384)},["moof"]).length>0},p.demux=function(a){var n=a,s=Object(v.dummyTrack)();if(this.config.progressive){this.remainderData&&(n=Object(y.appendUint8Array)(this.remainderData,a));var t=Object(y.segmentValidRange)(n);this.remainderData=t.remainder,s.samples=t.valid||new Uint8Array}else s.samples=n;return{audioTrack:Object(v.dummyTrack)(),avcTrack:s,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},p.flush=function(){var a=Object(v.dummyTrack)();return a.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(v.dummyTrack)(),avcTrack:a,id3Track:Object(v.dummyTrack)(),textTrack:Object(v.dummyTrack)()}},p.demuxSampleAes=function(a,n,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},p.destroy=function(){},g}();o.minProbeByteLength=1024,_.default=o},"./src/demux/mpegaudio.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"appendFrame",function(){return d}),O.d(_,"parseHeader",function(){return a}),O.d(_,"isHeaderPattern",function(){return n}),O.d(_,"isHeader",function(){return s}),O.d(_,"canParse",function(){return t}),O.d(_,"probe",function(){return i});var y=null,v=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],o=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],g=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],p=[0,1,1,4];function d(e,r,c,u,f){if(c+24>r.length)return;var m=a(r,c);if(m&&c+m.frameLength<=r.length){var l=m.samplesPerFrame*9e4/m.sampleRate,E=u+f*l,b={unit:r.subarray(c,c+m.frameLength),pts:E,dts:E};return e.config=[],e.channelCount=m.channelCount,e.samplerate=m.sampleRate,e.samples.push(b),{sample:b,length:m.frameLength,missing:0}}}function a(e,r){var c=e[r+1]>>3&3,u=e[r+1]>>1&3,f=e[r+2]>>4&15,m=e[r+2]>>2&3;if(c!==1&&f!==0&&f!==15&&m!==3){var l=e[r+2]>>1&1,E=e[r+3]>>6,b=c===3?3-u:u===3?3:4,D=v[b*14+f-1]*1e3,C=c===3?0:c===2?1:2,w=o[C*3+m],S=E===3?1:2,A=g[c][u],R=p[u],k=A*8*R,L=Math.floor(A*D/w+l)*R;if(y===null){var M=navigator.userAgent||"",G=M.match(/Chrome\/(\d+)/i);y=G?parseInt(G[1]):0}var W=!!y&&y<=87;return W&&u===2&&D>=224e3&&E===0&&(e[r+3]=e[r+3]|128),{sampleRate:w,channelCount:S,frameLength:L,samplesPerFrame:k}}}function n(e,r){return e[r]===255&&(e[r+1]&224)===224&&(e[r+1]&6)!==0}function s(e,r){return r+1<e.length&&n(e,r)}function t(e,r){var c=4;return n(e,r)&&c<=e.length-r}function i(e,r){if(r+1<e.length&&n(e,r)){var c=4,u=a(e,r),f=c;u!=null&&u.frameLength&&(f=u.frameLength);var m=r+f;return m===e.length||s(e,m)}return!1}},"./src/demux/sample-aes.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/crypt/decrypter.ts"),v=O("./src/demux/tsdemuxer.ts"),o=function(){function g(d,a,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new y.default(d,a,{removePKCS7Padding:!1})}var p=g.prototype;return p.decryptBuffer=function(a,n){this.decrypter.decrypt(a,this.keyData.key.buffer,this.keyData.iv.buffer,n)},p.decryptAacSample=function(a,n,s,t){var i=a[n].unit,e=i.subarray(16,i.length-i.length%16),r=e.buffer.slice(e.byteOffset,e.byteOffset+e.length),c=this;this.decryptBuffer(r,function(u){var f=new Uint8Array(u);i.set(f,16),t||c.decryptAacSamples(a,n+1,s)})},p.decryptAacSamples=function(a,n,s){for(;;n++){if(n>=a.length){s();return}if(a[n].unit.length<32)continue;var t=this.decrypter.isSync();if(this.decryptAacSample(a,n,s,t),!t)return}},p.getAvcEncryptedData=function(a){for(var n=Math.floor((a.length-48)/160)*16+16,s=new Int8Array(n),t=0,i=32;i<=a.length-16;i+=160,t+=16)s.set(a.subarray(i,i+16),t);return s},p.getAvcDecryptedUnit=function(a,n){for(var s=new Uint8Array(n),t=0,i=32;i<=a.length-16;i+=160,t+=16)a.set(s.subarray(t,t+16),i);return a},p.decryptAvcSample=function(a,n,s,t,i,e){var r=Object(v.discardEPB)(i.data),c=this.getAvcEncryptedData(r),u=this;this.decryptBuffer(c.buffer,function(f){i.data=u.getAvcDecryptedUnit(r,f),e||u.decryptAvcSamples(a,n,s+1,t)})},p.decryptAvcSamples=function(a,n,s,t){if(a instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;n++,s=0){if(n>=a.length){t();return}for(var i=a[n].units;!(s>=i.length);s++){var e=i[s];if(e.data.length<=48||e.type!==1&&e.type!==5)continue;var r=this.decrypter.isSync();if(this.decryptAvcSample(a,n,s,t,e,r),!r)return}}},g}();_.default=o},"./src/demux/transmuxer-interface.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return i});var y=O("./node_modules/webworkify-webpack/index.js"),v=O.n(y),o=O("./src/events.ts"),g=O("./src/demux/transmuxer.ts"),p=O("./src/utils/logger.ts"),d=O("./src/errors.ts"),a=O("./src/utils/mediasource-helper.ts"),n=O("./node_modules/eventemitter3/index.js"),s=O.n(n),t=Object(a.getMediaSource)()||{isTypeSupported:function(){return!1}},i=function(){function e(c,u,f,m){var l=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=c,this.id=u,this.onTransmuxComplete=f,this.onFlush=m;var E=c.config,b=function(A,R){R=R||{},R.frag=l.frag,R.id=l.id,c.trigger(A,R)};this.observer=new n.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,b),this.observer.on(o.Events.ERROR,b);var D={mp4:t.isTypeSupported("video/mp4"),mpeg:t.isTypeSupported("audio/mpeg"),mp3:t.isTypeSupported('audio/mp4; codecs="mp3"')},C=navigator.vendor;if(E.enableWorker&&typeof Worker!="undefined"){p.logger.log("demuxing in webworker");var w;try{w=this.worker=y("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),w.addEventListener("message",this.onwmsg),w.onerror=function(S){c.trigger(o.Events.ERROR,{type:d.ErrorTypes.OTHER_ERROR,details:d.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(S.message+" ("+S.filename+":"+S.lineno+")")})},w.postMessage({cmd:"init",typeSupported:D,vendor:C,id:u,config:JSON.stringify(E)})}catch(S){p.logger.warn("Error in worker:",S),p.logger.error("Error while initializing DemuxerWorker, fallback to inline"),w&&self.URL.revokeObjectURL(w.objectURL),this.transmuxer=new g.default(this.observer,D,E,C,u),this.worker=null}}else this.transmuxer=new g.default(this.observer,D,E,C,u)}var r=e.prototype;return r.destroy=function(){var u=this.worker;if(u)u.removeEventListener("message",this.onwmsg),u.terminate(),this.worker=null;else{var f=this.transmuxer;f&&(f.destroy(),this.transmuxer=null)}var m=this.observer;m&&m.removeAllListeners(),this.observer=null},r.push=function(u,f,m,l,E,b,D,C,w,S){var A=this;w.transmuxing.start=self.performance.now();var R=this.transmuxer,k=this.worker,L=b?b.start:E.start,M=E.decryptdata,G=this.frag,W=!(G&&E.cc===G.cc),N=!(G&&w.level===G.level),K=G?w.sn-G.sn:-1,F=this.part?w.part-this.part.index:1,P=!N&&(K===1||K===0&&F===1),B=self.performance.now();(N||K||E.stats.parsing.start===0)&&(E.stats.parsing.start=B),b&&(F||!P)&&(b.stats.parsing.start=B);var J=new g.TransmuxState(W,P,C,N,L);if(!P||W){p.logger.log("[transmuxer-interface, "+E.type+"]: Starting new transmux session for sn: "+w.sn+" p: "+w.part+" level: "+w.level+" id: "+w.id+`
|
|
|
discontinuity: `+W+`
|
|
|
trackSwitch: `+N+`
|
|
|
contiguous: `+P+`
|
|
|
accurateTimeOffset: `+C+`
|
|
|
timeOffset: `+L);var re=new g.TransmuxConfig(m,l,f,D,S);this.configureTransmuxer(re)}if(this.frag=E,this.part=b,k)k.postMessage({cmd:"demux",data:u,decryptdata:M,chunkMeta:w,state:J},u instanceof ArrayBuffer?[u]:[]);else if(R){var he=R.push(u,M,w,J);Object(g.isPromise)(he)?he.then(function(we){A.handleTransmuxComplete(we)}):this.handleTransmuxComplete(he)}},r.flush=function(u){var f=this;u.transmuxing.start=self.performance.now();var m=this.transmuxer,l=this.worker;if(l)l.postMessage({cmd:"flush",chunkMeta:u});else if(m){var E=m.flush(u);Object(g.isPromise)(E)?E.then(function(b){f.handleFlushResult(b,u)}):this.handleFlushResult(E,u)}},r.handleFlushResult=function(u,f){var m=this;u.forEach(function(l){m.handleTransmuxComplete(l)}),this.onFlush(f)},r.onWorkerMessage=function(u){var f=u.data,m=this.hls;switch(f.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(f.data);break}case"flush":{this.onFlush(f.data);break}default:{f.data=f.data||{},f.data.frag=this.frag,f.data.id=this.id,m.trigger(f.event,f.data);break}}},r.configureTransmuxer=function(u){var f=this.worker,m=this.transmuxer;f?f.postMessage({cmd:"configure",config:u}):m&&m.configure(u)},r.handleTransmuxComplete=function(u){u.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(u)},e}()},"./src/demux/transmuxer-worker.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return d});var y=O("./src/demux/transmuxer.ts"),v=O("./src/events.ts"),o=O("./src/utils/logger.ts"),g=O("./node_modules/eventemitter3/index.js"),p=O.n(g);function d(i){var e=new g.EventEmitter,r=function(u,f){i.postMessage({event:u,data:f})};e.on(v.Events.FRAG_DECRYPTED,r),e.on(v.Events.ERROR,r),i.addEventListener("message",function(c){var u=c.data;switch(u.cmd){case"init":{var f=JSON.parse(u.config);i.transmuxer=new y.default(e,u.typeSupported,f,u.vendor,u.id),Object(o.enableLogs)(f.debug),r("init",null);break}case"configure":{i.transmuxer.configure(u.config);break}case"demux":{var m=i.transmuxer.push(u.data,u.decryptdata,u.chunkMeta,u.state);Object(y.isPromise)(m)?m.then(function(b){a(i,b)}):a(i,m);break}case"flush":{var l=u.chunkMeta,E=i.transmuxer.flush(l);Object(y.isPromise)(E)?E.then(function(b){s(i,b,l)}):s(i,E,l);break}default:break}})}function a(i,e){if(t(e.remuxResult))return;var r=[],c=e.remuxResult,u=c.audio,f=c.video;u&&n(r,u),f&&n(r,f),i.postMessage({event:"transmuxComplete",data:e},r)}function n(i,e){e.data1&&i.push(e.data1.buffer),e.data2&&i.push(e.data2.buffer)}function s(i,e,r){e.forEach(function(c){a(i,c)}),i.postMessage({event:"flush",data:r})}function t(i){return!i.audio&&!i.video&&!i.text&&!i.id3&&!i.initSegment}},"./src/demux/transmuxer.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return f}),O.d(_,"isPromise",function(){return E}),O.d(_,"TransmuxConfig",function(){return b}),O.d(_,"TransmuxState",function(){return D});var y=O("./src/events.ts"),v=O("./src/errors.ts"),o=O("./src/crypt/decrypter.ts"),g=O("./src/demux/aacdemuxer.ts"),p=O("./src/demux/mp4demuxer.ts"),d=O("./src/demux/tsdemuxer.ts"),a=O("./src/demux/mp3demuxer.ts"),n=O("./src/remux/mp4-remuxer.ts"),s=O("./src/remux/passthrough-remuxer.ts"),t=O("./src/demux/chunk-cache.ts"),i=O("./src/utils/mp4-tools.ts"),e=O("./src/utils/logger.ts"),r;try{r=self.performance.now.bind(self.performance)}catch(C){e.logger.debug("Unable to use Performance API on this environment"),r=self.Date.now}var c=[{demux:d.default,remux:n.default},{demux:p.default,remux:s.default},{demux:g.default,remux:n.default},{demux:a.default,remux:n.default}],u=1024;c.forEach(function(C){var w=C.demux;u=Math.max(u,w.minProbeByteLength)});var f=function(){function C(S,A,R,k,L){this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.cache=new t.default,this.observer=S,this.typeSupported=A,this.config=R,this.vendor=k,this.id=L}var w=C.prototype;return w.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},w.push=function(A,R,k,L){var M=this,G=k.transmuxing;G.executeStart=r();var W=new Uint8Array(A),N=this.cache,K=this.config,F=this.currentTransmuxState,P=this.transmuxConfig;L&&(this.currentTransmuxState=L);var B=m(W,R);if(B&&B.method==="AES-128"){var J=this.getDecrypter();if(K.enableSoftwareAES){var re=J.softwareDecrypt(W,B.key.buffer,B.iv.buffer);if(!re)return G.executeEnd=r(),l(k);W=new Uint8Array(re)}else return this.decryptionPromise=J.webCryptoDecrypt(W,B.key.buffer,B.iv.buffer).then(function(Z){var Y=M.push(Z,null,k);return M.decryptionPromise=null,Y}),this.decryptionPromise}var he=L||F,we=he.contiguous,ke=he.discontinuity,ne=he.trackSwitch,Oe=he.accurateTimeOffset,Ce=he.timeOffset,fe=P.audioCodec,oe=P.videoCodec,se=P.defaultInitPts,be=P.duration,ie=P.initSegmentData;if((ke||ne)&&this.resetInitSegment(ie,fe,oe,be),ke&&this.resetInitialTimestamp(se),we||this.resetContiguity(),this.needsProbing(W,ke,ne)){if(N.dataLength){var de=N.flush();W=Object(i.appendUint8Array)(de,W)}this.configureTransmuxer(W,P)}var Fe=this.transmux(W,B,Ce,Oe,k),ae=this.currentTransmuxState;return ae.contiguous=!0,ae.discontinuity=!1,ae.trackSwitch=!1,G.executeEnd=r(),Fe},w.flush=function(A){var R=this,k=A.transmuxing;k.executeStart=r();var L=this.decrypter,M=this.cache,G=this.currentTransmuxState,W=this.decryptionPromise;if(W)return W.then(function(){return R.flush(A)});var N=[],K=G.timeOffset;if(L){var F=L.flush();F&&N.push(this.push(F,null,A))}var P=M.dataLength;M.reset();var B=this.demuxer,J=this.remuxer;if(!B||!J)return P>=u&&this.observer.emit(y.Events.ERROR,y.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),k.executeEnd=r(),[l(A)];var re=B.flush(K);return E(re)?re.then(function(he){return R.flushRemux(N,he,A),N}):(this.flushRemux(N,re,A),N)},w.flushRemux=function(A,R,k){var L=R.audioTrack,M=R.avcTrack,G=R.id3Track,W=R.textTrack,N=this.currentTransmuxState,K=N.accurateTimeOffset,F=N.timeOffset;e.logger.log("[transmuxer.ts]: Flushed fragment "+k.sn+(k.part>-1?" p: "+k.part:"")+" of level "+k.level);var P=this.remuxer.remux(L,M,G,W,F,K,!0,this.id);A.push({remuxResult:P,chunkMeta:k}),k.transmuxing.executeEnd=r()},w.resetInitialTimestamp=function(A){var R=this.demuxer,k=this.remuxer;if(!R||!k)return;R.resetTimeStamp(A),k.resetTimeStamp(A)},w.resetContiguity=function(){var A=this.demuxer,R=this.remuxer;if(!A||!R)return;A.resetContiguity(),R.resetNextTimestamp()},w.resetInitSegment=function(A,R,k,L){var M=this.demuxer,G=this.remuxer;if(!M||!G)return;M.resetInitSegment(R,k,L),G.resetInitSegment(A,R,k)},w.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},w.transmux=function(A,R,k,L,M){var G;return R&&R.method==="SAMPLE-AES"?G=this.transmuxSampleAes(A,R,k,L,M):G=this.transmuxUnencrypted(A,k,L,M),G},w.transmuxUnencrypted=function(A,R,k,L){var M=this.demuxer.demux(A,R,!1,!this.config.progressive),G=M.audioTrack,W=M.avcTrack,N=M.id3Track,K=M.textTrack,F=this.remuxer.remux(G,W,N,K,R,k,!1,this.id);return{remuxResult:F,chunkMeta:L}},w.transmuxSampleAes=function(A,R,k,L,M){var G=this;return this.demuxer.demuxSampleAes(A,R,k).then(function(W){var N=G.remuxer.remux(W.audioTrack,W.avcTrack,W.id3Track,W.textTrack,k,L,!1,G.id);return{remuxResult:N,chunkMeta:M}})},w.configureTransmuxer=function(A,R){for(var k=this.config,L=this.observer,M=this.typeSupported,G=this.vendor,W=R.audioCodec,N=R.defaultInitPts,K=R.duration,F=R.initSegmentData,P=R.videoCodec,B,J=0,re=c.length;J<re;J++)if(c[J].demux.probe(A)){B=c[J];break}B||(e.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),B={demux:p.default,remux:s.default});var he=this.demuxer,we=this.remuxer,ke=B.remux,ne=B.demux;(!we||!(we instanceof ke))&&(this.remuxer=new ke(L,k,M,G)),(!he||!(he instanceof ne))&&(this.demuxer=new ne(L,k,M),this.probe=ne.probe),this.resetInitSegment(F,W,P,K),this.resetInitialTimestamp(N)},w.needsProbing=function(A,R,k){return!this.demuxer||!this.remuxer||R||k},w.getDecrypter=function(){var A=this.decrypter;return A||(A=this.decrypter=new o.default(this.observer,this.config)),A},C}();function m(C,w){var S=null;return C.byteLength>0&&w!=null&&w.key!=null&&w.iv!==null&&w.method!=null&&(S=w),S}var l=function(w){return{remuxResult:{},chunkMeta:w}};function E(C){return"then"in C&&C.then instanceof Function}var b=function(w,S,A,R,k){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=w,this.videoCodec=S,this.initSegmentData=A,this.duration=R,this.defaultInitPts=k},D=function(w,S,A,R,k){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=w,this.contiguous=S,this.accurateTimeOffset=A,this.trackSwitch=R,this.timeOffset=k}},"./src/demux/tsdemuxer.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"discardEPB",function(){return l});var y=O("./src/demux/adts.ts"),v=O("./src/demux/mpegaudio.ts"),o=O("./src/demux/exp-golomb.ts"),g=O("./src/demux/id3.ts"),p=O("./src/demux/sample-aes.ts"),d=O("./src/events.ts"),a=O("./src/utils/mp4-tools.ts"),n=O("./src/utils/logger.ts"),s=O("./src/errors.ts"),t={video:1,audio:2,id3:3,text:4},i=function(){function E(D,C,w){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=D,this.config=C,this.typeSupported=w}E.probe=function(C){var w=E.syncOffset(C);return w<0?!1:(w&&n.logger.warn("MPEG2-TS detected but first sync word found @ offset "+w+", junk ahead ?"),!0)},E.syncOffset=function(C){for(var w=Math.min(1e3,C.length-3*188),S=0;S<w;){if(C[S]===71&&C[S+188]===71&&C[S+2*188]===71)return S;S++}return-1},E.createTrack=function(C,w){return{container:C==="video"||C==="audio"?"video/mp2t":void 0,type:C,id:t[C],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:C==="audio"?w:void 0}};var b=E.prototype;return b.resetInitSegment=function(C,w,S){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=E.createTrack("video",S),this._audioTrack=E.createTrack("audio",S),this._id3Track=E.createTrack("id3",S),this._txtTrack=E.createTrack("text",S),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=C,this.videoCodec=w,this._duration=S},b.resetTimeStamp=function(){},b.resetContiguity=function(){var C=this._audioTrack,w=this._avcTrack,S=this._id3Track;C&&(C.pesData=null),w&&(w.pesData=null),S&&(S.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},b.demux=function(C,w,S,A){S===void 0&&(S=!1),A===void 0&&(A=!1),S||(this.sampleAes=null);var R,k=this._avcTrack,L=this._audioTrack,M=this._id3Track,G=k.pid,W=k.pesData,N=L.pid,K=M.pid,F=L.pesData,P=M.pesData,B=!1,J=this.pmtParsed,re=this._pmtId,he=C.length;if(this.remainderData&&(C=Object(a.appendUint8Array)(this.remainderData,C),he=C.length,this.remainderData=null),he<188&&!A)return this.remainderData=C,{audioTrack:L,avcTrack:k,id3Track:M,textTrack:this._txtTrack};var we=Math.max(0,E.syncOffset(C));he-=(he+we)%188,he<C.byteLength&&!A&&(this.remainderData=new Uint8Array(C.buffer,he,C.buffer.byteLength-he));for(var ke=we;ke<he;ke+=188)if(C[ke]===71){var ne=!!(C[ke+1]&64),Oe=((C[ke+1]&31)<<8)+C[ke+2],Ce=(C[ke+3]&48)>>4,fe=void 0;if(Ce>1){if(fe=ke+5+C[ke+4],fe===ke+188)continue}else fe=ke+4;switch(Oe){case G:ne&&(W&&(R=u(W))&&this.parseAVCPES(R,!1),W={data:[],size:0}),W&&(W.data.push(C.subarray(fe,ke+188)),W.size+=ke+188-fe);break;case N:ne&&(F&&(R=u(F))&&(L.isAAC?this.parseAACPES(R):this.parseMPEGPES(R)),F={data:[],size:0}),F&&(F.data.push(C.subarray(fe,ke+188)),F.size+=ke+188-fe);break;case K:ne&&(P&&(R=u(P))&&this.parseID3PES(R),P={data:[],size:0}),P&&(P.data.push(C.subarray(fe,ke+188)),P.size+=ke+188-fe);break;case 0:ne&&(fe+=C[fe]+1),re=this._pmtId=r(C,fe);break;case re:{ne&&(fe+=C[fe]+1);var oe=c(C,fe,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,S);G=oe.avc,G>0&&(k.pid=G),N=oe.audio,N>0&&(L.pid=N,L.isAAC=oe.isAAC),K=oe.id3,K>0&&(M.pid=K),B&&!J&&(n.logger.log("reparse from beginning"),B=!1,ke=we-188),J=this.pmtParsed=!0;break}case 17:case 8191:break;default:B=!0;break}}else this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});k.pesData=W,L.pesData=F,M.pesData=P;var se={audioTrack:L,avcTrack:k,id3Track:M,textTrack:this._txtTrack};return A&&this.extractRemainingSamples(se),se},b.flush=function(){var C=this.remainderData;this.remainderData=null;var w;return C?w=this.demux(C,-1,!1,!0):w={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(w),this.sampleAes?this.decrypt(w,this.sampleAes):w},b.extractRemainingSamples=function(C){var w=C.audioTrack,S=C.avcTrack,A=C.id3Track,R=S.pesData,k=w.pesData,L=A.pesData,M;R&&(M=u(R))?(this.parseAVCPES(M,!0),S.pesData=null):S.pesData=R,k&&(M=u(k))?(w.isAAC?this.parseAACPES(M):this.parseMPEGPES(M),w.pesData=null):(k!=null&&k.size&&n.logger.log("last AAC PES packet truncated,might overlap between fragments"),w.pesData=k),L&&(M=u(L))?(this.parseID3PES(M),A.pesData=null):A.pesData=L},b.demuxSampleAes=function(C,w,S){var A=this.demux(C,S,!0,!this.config.progressive),R=this.sampleAes=new p.default(this.observer,this.config,w);return this.decrypt(A,R)},b.decrypt=function(C,w){return new Promise(function(S){var A=C.audioTrack,R=C.avcTrack;A.samples&&A.isAAC?w.decryptAacSamples(A.samples,0,function(){R.samples?w.decryptAvcSamples(R.samples,0,0,function(){S(C)}):S(C)}):R.samples&&w.decryptAvcSamples(R.samples,0,0,function(){S(C)})})},b.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},b.parseAVCPES=function(C,w){var S=this,A=this._avcTrack,R=this.parseAVCNALu(C.data),k=!1,L=this.avcSample,M,G=!1;C.data=null,L&&R.length&&!A.audFound&&(f(L,A),L=this.avcSample=e(!1,C.pts,C.dts,"")),R.forEach(function(W){switch(W.type){case 1:{M=!0,L||(L=S.avcSample=e(!0,C.pts,C.dts,"")),k&&(L.debug+="NDR "),L.frame=!0;var N=W.data;if(G&&N.length>4){var K=new o.default(N).readSliceType();(K===2||K===4||K===7||K===9)&&(L.key=!0)}break}case 5:M=!0,L||(L=S.avcSample=e(!0,C.pts,C.dts,"")),k&&(L.debug+="IDR "),L.key=!0,L.frame=!0;break;case 6:{M=!0,k&&L&&(L.debug+="SEI ");var F=new o.default(l(W.data));F.readUByte();for(var P=0,B=0,J=!1,re=0;!J&&F.bytesAvailable>1;){P=0;do re=F.readUByte(),P+=re;while(re===255);B=0;do re=F.readUByte(),B+=re;while(re===255);if(P===4&&F.bytesAvailable!==0){J=!0;var he=F.readUByte();if(he===181){var we=F.readUShort();if(we===49){var ke=F.readUInt();if(ke===1195456820){var ne=F.readUByte();if(ne===3){for(var Oe=F.readUByte(),Ce=F.readUByte(),fe=31&Oe,oe=[Oe,Ce],se=0;se<fe;se++)oe.push(F.readUByte()),oe.push(F.readUByte()),oe.push(F.readUByte());m(S._txtTrack.samples,{type:3,pts:C.pts,bytes:oe})}}}}}else if(P===5&&F.bytesAvailable!==0){if(J=!0,B>16){for(var be=[],ie=0;ie<16;ie++)be.push(F.readUByte().toString(16)),(ie===3||ie===5||ie===7||ie===9)&&be.push("-");for(var de=B-16,Fe=new Uint8Array(de),ae=0;ae<de;ae++)Fe[ae]=F.readUByte();m(S._txtTrack.samples,{pts:C.pts,payloadType:P,uuid:be.join(""),userData:Object(g.utf8ArrayToStr)(Fe),userDataBytes:Fe})}}else if(B<F.bytesAvailable)for(var Z=0;Z<B;Z++)F.readUByte()}break}case 7:if(M=!0,G=!0,k&&L&&(L.debug+="SPS "),!A.sps){var Y=new o.default(W.data),q=Y.readSPS();A.width=q.width,A.height=q.height,A.pixelRatio=q.pixelRatio,A.sps=[W.data],A.duration=S._duration;for(var ve=W.data.subarray(1,4),pe="avc1.",Te=0;Te<3;Te++){var Ne=ve[Te].toString(16);Ne.length<2&&(Ne="0"+Ne),pe+=Ne}A.codec=pe}break;case 8:M=!0,k&&L&&(L.debug+="PPS "),A.pps||(A.pps=[W.data]);break;case 9:M=!1,A.audFound=!0,L&&f(L,A),L=S.avcSample=e(!1,C.pts,C.dts,k?"AUD ":"");break;case 12:M=!1;break;default:M=!1,L&&(L.debug+="unknown NAL "+W.type+" ");break}if(L&&M){var me=L.units;me.push(W)}}),w&&L&&(f(L,A),this.avcSample=null)},b.getLastNalUnit=function(){var C,w=this.avcSample,S;if(!w||w.units.length===0){var A=this._avcTrack.samples;w=A[A.length-1]}if((C=w)!==null&&C!==void 0&&C.units){var R=w.units;S=R[R.length-1]}return S},b.parseAVCNALu=function(C){var w=C.byteLength,S=this._avcTrack,A=S.naluState||0,R=A,k=[],L=0,M,G,W,N=-1,K=0;for(A===-1&&(N=0,K=C[0]&31,A=0,L=1);L<w;){if(M=C[L++],!A){A=M?0:1;continue}if(A===1){A=M?0:2;continue}if(!M)A=3;else if(M===1){if(N>=0){var F={data:C.subarray(N,L-A-1),type:K};k.push(F)}else{var P=this.getLastNalUnit();if(P&&(R&&L<=4-R&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-R))),G=L-A-1,G>0)){var B=new Uint8Array(P.data.byteLength+G);B.set(P.data,0),B.set(C.subarray(0,G),P.data.byteLength),P.data=B,P.state=0}}L<w?(W=C[L]&31,N=L,K=W,A=0):A=-1}else A=0}if(N>=0&&A>=0){var J={data:C.subarray(N,w),type:K,state:A};k.push(J)}if(k.length===0){var re=this.getLastNalUnit();if(re){var he=new Uint8Array(re.data.byteLength+C.byteLength);he.set(re.data,0),he.set(C,re.data.byteLength),re.data=he}}return S.naluState=A,k},b.parseAACPES=function(C){var w=0,S=this._audioTrack,A=this.aacOverFlow,R=C.data;if(A){this.aacOverFlow=null;var k=A.sample.unit.byteLength,L=Math.min(A.missing,k),M=k-L;A.sample.unit.set(R.subarray(0,L),M),S.samples.push(A.sample),w=A.missing}var G,W;for(G=w,W=R.length;G<W-1&&!y.isHeader(R,G);G++);if(G!==w){var N,K;if(G<W-1?(N="AAC PES did not start with ADTS header,offset:"+G,K=!1):(N="no ADTS header found in AAC PES",K=!0),n.logger.warn("parsing error:"+N),this.observer.emit(d.Events.ERROR,d.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,fatal:K,reason:N}),K)return}y.initTrackConfig(S,this.observer,R,G,this.audioCodec);var F;if(C.pts!==void 0)F=C.pts;else if(A){var P=y.getFrameDuration(S.samplerate);F=A.sample.pts+P}else{n.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var B=0;G<W;)if(y.isHeader(R,G)){if(G+5<W){var J=y.appendFrame(S,R,G,F,B);if(J)if(J.missing)this.aacOverFlow=J;else{G+=J.length,B++;continue}}break}else G++},b.parseMPEGPES=function(C){var w=C.data,S=w.length,A=0,R=0,k=C.pts;if(k===void 0){n.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;R<S;)if(v.isHeader(w,R)){var L=v.appendFrame(this._audioTrack,w,R,k,A);if(L)R+=L.length,A++;else break}else R++},b.parseID3PES=function(C){if(C.pts===void 0){n.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(C)},E}();i.minProbeByteLength=188;function e(E,b,D,C){return{key:E,frame:!1,pts:b,dts:D,units:[],debug:C,length:0}}function r(E,b){return(E[b+10]&31)<<8|E[b+11]}function c(E,b,D,C){var w={audio:-1,avc:-1,id3:-1,isAAC:!0},S=(E[b+1]&15)<<8|E[b+2],A=b+3+S-4,R=(E[b+10]&15)<<8|E[b+11];for(b+=12+R;b<A;){var k=(E[b+1]&31)<<8|E[b+2];switch(E[b]){case 207:if(!C){n.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:w.audio===-1&&(w.audio=k);break;case 21:w.id3===-1&&(w.id3=k);break;case 219:if(!C){n.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:w.avc===-1&&(w.avc=k);break;case 3:case 4:D?w.audio===-1&&(w.audio=k,w.isAAC=!1):n.logger.log("MPEG audio found, not supported in this browser");break;case 36:n.logger.warn("Unsupported HEVC stream type found");break;default:break}b+=((E[b+3]&15)<<8|E[b+4])+5}return w}function u(E){var b=0,D,C,w,S,A,R=E.data;if(!E||E.size===0)return null;for(;R[0].length<19&&R.length>1;){var k=new Uint8Array(R[0].length+R[1].length);k.set(R[0]),k.set(R[1],R[0].length),R[0]=k,R.splice(1,1)}D=R[0];var L=(D[0]<<16)+(D[1]<<8)+D[2];if(L===1){if(C=(D[4]<<8)+D[5],C&&C>E.size-6)return null;var M=D[7];M&192&&(S=(D[9]&14)*536870912+(D[10]&255)*4194304+(D[11]&254)*16384+(D[12]&255)*128+(D[13]&254)/2,M&64?(A=(D[14]&14)*536870912+(D[15]&255)*4194304+(D[16]&254)*16384+(D[17]&255)*128+(D[18]&254)/2,S-A>60*9e4&&(n.logger.warn(Math.round((S-A)/9e4)+"s delta between PTS and DTS, align them"),S=A)):A=S),w=D[8];var G=w+9;if(E.size<=G)return null;E.size-=G;for(var W=new Uint8Array(E.size),N=0,K=R.length;N<K;N++){D=R[N];var F=D.byteLength;if(G)if(G>F){G-=F;continue}else D=D.subarray(G),F-=G,G=0;W.set(D,b),b+=F}return C&&(C-=w+3),{data:W,pts:S,dts:A,len:C}}return null}function f(E,b){if(E.units.length&&E.frame){if(E.pts===void 0){var D=b.samples,C=D.length;if(C){var w=D[C-1];E.pts=w.pts,E.dts=w.dts}else{b.dropped++;return}}b.samples.push(E)}E.debug.length&&n.logger.log(E.pts+"/"+E.dts+":"+E.debug)}function m(E,b){var D=E.length;if(D>0){if(b.pts>=E[D-1].pts)E.push(b);else for(var C=D-1;C>=0;C--)if(b.pts<E[C].pts){E.splice(C,0,b);break}}else E.push(b)}function l(E){for(var b=E.byteLength,D=[],C=1;C<b-2;)E[C]===0&&E[C+1]===0&&E[C+2]===3?(D.push(C+2),C+=2):C++;if(D.length===0)return E;var w=b-D.length,S=new Uint8Array(w),A=0;for(C=0;C<w;A++,C++)A===D[0]&&(A++,D.shift()),S[C]=E[A];return S}_.default=i},"./src/errors.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"ErrorTypes",function(){return y}),O.d(_,"ErrorDetails",function(){return v});var y;(function(o){o.NETWORK_ERROR="networkError",o.MEDIA_ERROR="mediaError",o.KEY_SYSTEM_ERROR="keySystemError",o.MUX_ERROR="muxError",o.OTHER_ERROR="otherError"})(y||(y={}));var v;(function(o){o.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",o.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",o.KEY_SYSTEM_NO_SESSION="keySystemNoSession",o.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",o.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",o.MANIFEST_LOAD_ERROR="manifestLoadError",o.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",o.MANIFEST_PARSING_ERROR="manifestParsingError",o.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",o.LEVEL_EMPTY_ERROR="levelEmptyError",o.LEVEL_LOAD_ERROR="levelLoadError",o.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",o.LEVEL_SWITCH_ERROR="levelSwitchError",o.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",o.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",o.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",o.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",o.FRAG_LOAD_ERROR="fragLoadError",o.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",o.FRAG_DECRYPT_ERROR="fragDecryptError",o.FRAG_PARSING_ERROR="fragParsingError",o.REMUX_ALLOC_ERROR="remuxAllocError",o.KEY_LOAD_ERROR="keyLoadError",o.KEY_LOAD_TIMEOUT="keyLoadTimeOut",o.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",o.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",o.BUFFER_APPEND_ERROR="bufferAppendError",o.BUFFER_APPENDING_ERROR="bufferAppendingError",o.BUFFER_STALLED_ERROR="bufferStalledError",o.BUFFER_FULL_ERROR="bufferFullError",o.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",o.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",o.INTERNAL_EXCEPTION="internalException",o.INTERNAL_ABORTED="aborted",o.UNKNOWN="unknown"})(v||(v={}))},"./src/events.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"Events",function(){return y});var y;(function(v){v.MEDIA_ATTACHING="hlsMediaAttaching",v.MEDIA_ATTACHED="hlsMediaAttached",v.MEDIA_DETACHING="hlsMediaDetaching",v.MEDIA_DETACHED="hlsMediaDetached",v.BUFFER_RESET="hlsBufferReset",v.BUFFER_CODECS="hlsBufferCodecs",v.BUFFER_CREATED="hlsBufferCreated",v.BUFFER_APPENDING="hlsBufferAppending",v.BUFFER_APPENDED="hlsBufferAppended",v.BUFFER_EOS="hlsBufferEos",v.BUFFER_FLUSHING="hlsBufferFlushing",v.BUFFER_FLUSHED="hlsBufferFlushed",v.MANIFEST_LOADING="hlsManifestLoading",v.MANIFEST_LOADED="hlsManifestLoaded",v.MANIFEST_PARSED="hlsManifestParsed",v.LEVEL_SWITCHING="hlsLevelSwitching",v.LEVEL_SWITCHED="hlsLevelSwitched",v.LEVEL_LOADING="hlsLevelLoading",v.LEVEL_LOADED="hlsLevelLoaded",v.LEVEL_UPDATED="hlsLevelUpdated",v.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",v.LEVELS_UPDATED="hlsLevelsUpdated",v.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",v.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",v.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",v.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",v.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",v.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",v.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",v.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",v.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",v.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",v.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",v.CUES_PARSED="hlsCuesParsed",v.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",v.INIT_PTS_FOUND="hlsInitPtsFound",v.FRAG_LOADING="hlsFragLoading",v.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",v.FRAG_LOADED="hlsFragLoaded",v.FRAG_DECRYPTED="hlsFragDecrypted",v.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",v.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",v.FRAG_PARSING_METADATA="hlsFragParsingMetadata",v.FRAG_PARSED="hlsFragParsed",v.FRAG_BUFFERED="hlsFragBuffered",v.FRAG_CHANGED="hlsFragChanged",v.FPS_DROP="hlsFpsDrop",v.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",v.ERROR="hlsError",v.DESTROYING="hlsDestroying",v.KEY_LOADING="hlsKeyLoading",v.KEY_LOADED="hlsKeyLoaded",v.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",v.BACK_BUFFER_REACHED="hlsBackBufferReached"})(y||(y={}))},"./src/hls.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return E});var y=O("./node_modules/url-toolkit/src/url-toolkit.js"),v=O.n(y),o=O("./src/loader/playlist-loader.ts"),g=O("./src/loader/key-loader.ts"),p=O("./src/controller/id3-track-controller.ts"),d=O("./src/controller/latency-controller.ts"),a=O("./src/controller/level-controller.ts"),n=O("./src/controller/fragment-tracker.ts"),s=O("./src/controller/stream-controller.ts"),t=O("./src/is-supported.ts"),i=O("./src/utils/logger.ts"),e=O("./src/config.ts"),r=O("./node_modules/eventemitter3/index.js"),c=O.n(r),u=O("./src/events.ts"),f=O("./src/errors.ts");function m(b,D){for(var C=0;C<D.length;C++){var w=D[C];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(b,w.key,w)}}function l(b,D,C){return D&&m(b.prototype,D),C&&m(b,C),b}var E=function(){b.isSupported=function(){return Object(t.isSupported)()};function b(C){C===void 0&&(C={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new r.EventEmitter,this._autoLevelCapping=void 0,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var w=this.config=Object(e.mergeConfig)(b.DefaultConfig,C);this.userConfig=C,Object(i.enableLogs)(w.debug),this._autoLevelCapping=-1,w.progressive&&Object(e.enableStreamingMode)(w);var S=w.abrController,A=w.bufferController,R=w.capLevelController,k=w.fpsController,L=this.abrController=new S(this),M=this.bufferController=new A(this),G=this.capLevelController=new R(this),W=new k(this),N=new o.default(this),K=new g.default(this),F=new p.default(this),P=this.levelController=new a.default(this),B=new n.FragmentTracker(this),J=this.streamController=new s.default(this,B);G.setStreamController(J),W.setStreamController(J);var re=[P,J];this.networkControllers=re;var he=[N,K,L,M,G,W,F,B];this.audioTrackController=this.createController(w.audioTrackController,null,re),this.createController(w.audioStreamController,B,re),this.subtitleTrackController=this.createController(w.subtitleTrackController,null,re),this.createController(w.subtitleStreamController,B,re),this.createController(w.timelineController,null,he),this.emeController=this.createController(w.emeController,null,he),this.cmcdController=this.createController(w.cmcdController,null,he),this.latencyController=this.createController(d.default,null,he),this.coreComponents=he}var D=b.prototype;return D.createController=function(w,S,A){if(w){var R=S?new w(this,S):new w(this);return A&&A.push(R),R}return null},D.on=function(w,S,A){A===void 0&&(A=this),this._emitter.on(w,S,A)},D.once=function(w,S,A){A===void 0&&(A=this),this._emitter.once(w,S,A)},D.removeAllListeners=function(w){this._emitter.removeAllListeners(w)},D.off=function(w,S,A,R){A===void 0&&(A=this),this._emitter.off(w,S,A,R)},D.listeners=function(w){return this._emitter.listeners(w)},D.emit=function(w,S,A){return this._emitter.emit(w,S,A)},D.trigger=function(w,S){if(this.config.debug)return this.emit(w,w,S);try{return this.emit(w,w,S)}catch(A){i.logger.error("An internal error happened while handling event "+w+'. Error message: "'+A.message+'". Here is a stacktrace:',A),this.trigger(u.Events.ERROR,{type:f.ErrorTypes.OTHER_ERROR,details:f.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:w,error:A})}return!1},D.listenerCount=function(w){return this._emitter.listenerCount(w)},D.destroy=function(){i.logger.log("destroy"),this.trigger(u.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(w){return w.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(w){return w.destroy()}),this.coreComponents.length=0},D.attachMedia=function(w){i.logger.log("attachMedia"),this._media=w,this.trigger(u.Events.MEDIA_ATTACHING,{media:w})},D.detachMedia=function(){i.logger.log("detachMedia"),this.trigger(u.Events.MEDIA_DETACHING,void 0),this._media=null},D.loadSource=function(w){this.stopLoad();var S=this.media,A=this.url,R=this.url=y.buildAbsoluteURL(self.location.href,w,{alwaysNormalize:!0});i.logger.log("loadSource:"+R),S&&A&&A!==R&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(S)),this.trigger(u.Events.MANIFEST_LOADING,{url:w})},D.startLoad=function(w){w===void 0&&(w=-1),i.logger.log("startLoad("+w+")"),this.networkControllers.forEach(function(S){S.startLoad(w)})},D.stopLoad=function(){i.logger.log("stopLoad"),this.networkControllers.forEach(function(w){w.stopLoad()})},D.swapAudioCodec=function(){i.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},D.recoverMediaError=function(){i.logger.log("recoverMediaError");var w=this._media;this.detachMedia(),w&&this.attachMedia(w)},D.removeLevel=function(w,S){S===void 0&&(S=0),this.levelController.removeLevel(w,S)},l(b,[{key:"levels",get:function(){var w=this.levelController.levels;return w||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(w){i.logger.log("set currentLevel:"+w),this.loadLevel=w,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(w){i.logger.log("set nextLevel:"+w),this.levelController.manualLevel=w,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(w){i.logger.log("set loadLevel:"+w),this.levelController.manualLevel=w}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(w){this.levelController.nextLoadLevel=w}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(w){i.logger.log("set firstLevel:"+w),this.levelController.firstLevel=w}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(w){i.logger.log("set startLevel:"+w),w!==-1&&(w=Math.max(w,this.minAutoLevel)),this.levelController.startLevel=w}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(w){var S=!!w;S!==this.config.capLevelToPlayerSize&&(S?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=S)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(w){this._autoLevelCapping!==w&&(i.logger.log("set autoLevelCapping:"+w),this._autoLevelCapping=w)}},{key:"bandwidthEstimate",get:function(){var w=this.abrController.bwEstimator;return w?w.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var w=this.levels,S=this.config.minAutoBitrate;if(!w)return 0;for(var A=w.length,R=0;R<A;R++)if(w[R].maxBitrate>S)return R;return 0}},{key:"maxAutoLevel",get:function(){var w=this.levels,S=this.autoLevelCapping,A;return S===-1&&w&&w.length?A=w.length-1:A=S,A}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(w){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,w)}},{key:"audioTracks",get:function(){var w=this.audioTrackController;return w?w.audioTracks:[]}},{key:"audioTrack",get:function(){var w=this.audioTrackController;return w?w.audioTrack:-1},set:function(w){var S=this.audioTrackController;S&&(S.audioTrack=w)}},{key:"subtitleTracks",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var w=this.subtitleTrackController;return w?w.subtitleTrack:-1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleTrack=w)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var w=this.subtitleTrackController;return w?w.subtitleDisplay:!1},set:function(w){var S=this.subtitleTrackController;S&&(S.subtitleDisplay=w)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(w){this.config.lowLatencyMode=w}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return u.Events}},{key:"ErrorTypes",get:function(){return f.ErrorTypes}},{key:"ErrorDetails",get:function(){return f.ErrorDetails}},{key:"DefaultConfig",get:function(){return b.defaultConfig?b.defaultConfig:e.hlsDefaultConfig},set:function(w){b.defaultConfig=w}}]),b}();E.defaultConfig=void 0},"./src/is-supported.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"isSupported",function(){return o}),O.d(_,"changeTypeSupported",function(){return g});var y=O("./src/utils/mediasource-helper.ts");function v(){return self.SourceBuffer||self.WebKitSourceBuffer}function o(){var p=Object(y.getMediaSource)();if(!p)return!1;var d=v(),a=p&&typeof p.isTypeSupported=="function"&&p.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!d||d.prototype&&typeof d.prototype.appendBuffer=="function"&&typeof d.prototype.remove=="function";return!!a&&!!n}function g(){var p,d=v();return typeof(d==null||((p=d.prototype)===null||p===void 0)?void 0:p.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return i}),O.d(_,"LoadError",function(){return r});var y=O("./src/polyfills/number.ts"),v=O("./src/errors.ts");function o(c,u){c.prototype=Object.create(u.prototype),c.prototype.constructor=c,n(c,u)}function g(c){var u=typeof Map=="function"?new Map:void 0;return g=function(m){if(m===null||!a(m))return m;if(typeof m!="function")throw new TypeError("Super expression must either be null or a function");if(typeof u!="undefined"){if(u.has(m))return u.get(m);u.set(m,l)}function l(){return p(m,arguments,s(this).constructor)}return l.prototype=Object.create(m.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),n(l,m)},g(c)}function p(c,u,f){return d()?p=Reflect.construct:p=function(l,E,b){var D=[null];D.push.apply(D,E);var C=Function.bind.apply(l,D),w=new C;return b&&n(w,b.prototype),w},p.apply(null,arguments)}function d(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(c){return!1}}function a(c){return Function.toString.call(c).indexOf("[native code]")!==-1}function n(c,u){return n=Object.setPrototypeOf||function(m,l){return m.__proto__=l,m},n(c,u)}function s(c){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},s(c)}var t=Math.pow(2,17),i=function(){function c(f){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=f}var u=c.prototype;return u.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},u.abort=function(){this.loader&&this.loader.abort()},u.load=function(m,l){var E=this,b=m.url;if(!b)return Promise.reject(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,networkDetails:null},"Fragment does not have a "+(b?"part list":"url")));this.abort();var D=this.config,C=D.fLoader,w=D.loader;return new Promise(function(S,A){E.loader&&E.loader.destroy();var R=E.loader=m.loader=C?new C(D):new w(D),k=e(m),L={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:t};m.stats=R.stats,R.load(k,L,{onSuccess:function(G,W,N,K){E.resetLoader(m,R),S({frag:m,part:null,payload:G.data,networkDetails:K})},onError:function(G,W,N){E.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,response:G,networkDetails:N}))},onAbort:function(G,W,N){E.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,networkDetails:N}))},onTimeout:function(G,W,N){E.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,networkDetails:N}))},onProgress:function(G,W,N,K){l&&l({frag:m,part:null,payload:N,networkDetails:K})}})})},u.loadPart=function(m,l,E){var b=this;this.abort();var D=this.config,C=D.fLoader,w=D.loader;return new Promise(function(S,A){b.loader&&b.loader.destroy();var R=b.loader=m.loader=C?new C(D):new w(D),k=e(m,l),L={timeout:D.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:D.fragLoadingMaxRetryTimeout,highWaterMark:t};l.stats=R.stats,R.load(k,L,{onSuccess:function(G,W,N,K){b.resetLoader(m,R),b.updateStatsFromPart(m,l);var F={frag:m,part:l,payload:G.data,networkDetails:K};E(F),S(F)},onError:function(G,W,N){b.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:m,part:l,response:G,networkDetails:N}))},onAbort:function(G,W,N){m.stats.aborted=l.stats.aborted,b.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:m,part:l,networkDetails:N}))},onTimeout:function(G,W,N){b.resetLoader(m,R),A(new r({type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:m,part:l,networkDetails:N}))}})})},u.updateStatsFromPart=function(m,l){var E=m.stats,b=l.stats,D=b.total;if(E.loaded+=b.loaded,D){var C=Math.round(m.duration/l.duration),w=Math.min(Math.round(E.loaded/D),C),S=C-w,A=S*Math.round(E.loaded/w);E.total=E.loaded+A}else E.total=Math.max(E.loaded,E.total);var R=E.loading,k=b.loading;R.start?R.first+=k.first-k.start:(R.start=k.start,R.first=k.first),R.end=k.end},u.resetLoader=function(m,l){m.loader=null,this.loader===l&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),l.destroy()},c}();function e(c,u){u===void 0&&(u=null);var f=u||c,m={frag:c,part:u,responseType:"arraybuffer",url:f.url,headers:{},rangeStart:0,rangeEnd:0},l=f.byteRangeStartOffset,E=f.byteRangeEndOffset;return Object(y.isFiniteNumber)(l)&&Object(y.isFiniteNumber)(E)&&(m.rangeStart=l,m.rangeEnd=E),m}var r=function(c){o(u,c);function u(f){for(var m,l=arguments.length,E=new Array(l>1?l-1:0),b=1;b<l;b++)E[b-1]=arguments[b];return m=c.call.apply(c,[this].concat(E))||this,m.data=void 0,m.data=f,m}return u}(g(Error))},"./src/loader/fragment.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"ElementaryStreamTypes",function(){return i}),O.d(_,"BaseSegment",function(){return e}),O.d(_,"Fragment",function(){return r}),O.d(_,"Part",function(){return c});var y=O("./src/polyfills/number.ts"),v=O("./node_modules/url-toolkit/src/url-toolkit.js"),o=O.n(v),g=O("./src/utils/logger.ts"),p=O("./src/loader/level-key.ts"),d=O("./src/loader/load-stats.ts");function a(u,f){u.prototype=Object.create(f.prototype),u.prototype.constructor=u,n(u,f)}function n(u,f){return n=Object.setPrototypeOf||function(l,E){return l.__proto__=E,l},n(u,f)}function s(u,f){for(var m=0;m<f.length;m++){var l=f[m];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(u,l.key,l)}}function t(u,f,m){return f&&s(u.prototype,f),m&&s(u,m),u}var i;(function(u){u.AUDIO="audio",u.VIDEO="video",u.AUDIOVIDEO="audiovideo"})(i||(i={}));var e=function(){function u(m){var l;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(l={},l[i.AUDIO]=null,l[i.VIDEO]=null,l[i.AUDIOVIDEO]=null,l),this.baseurl=m}var f=u.prototype;return f.setByteRange=function(l,E){var b=l.split("@",2),D=[];b.length===1?D[0]=E?E.byteRangeEndOffset:0:D[0]=parseInt(b[1]),D[1]=parseInt(b[0])+D[0],this._byteRange=D},t(u,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(v.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(l){this._url=l}}]),u}(),r=function(u){a(f,u);function f(l,E){var b;return b=u.call(this,E)||this,b._decryptdata=null,b.rawProgramDateTime=null,b.programDateTime=null,b.tagList=[],b.duration=0,b.sn=0,b.levelkey=void 0,b.type=void 0,b.loader=null,b.level=-1,b.cc=0,b.startPTS=void 0,b.endPTS=void 0,b.appendedPTS=void 0,b.startDTS=void 0,b.endDTS=void 0,b.start=0,b.deltaPTS=void 0,b.maxStartPTS=void 0,b.minEndPTS=void 0,b.stats=new d.LoadStats,b.urlId=0,b.data=void 0,b.bitrateTest=!1,b.title=null,b.initSegment=null,b.type=l,b}var m=f.prototype;return m.createInitializationVector=function(E){for(var b=new Uint8Array(16),D=12;D<16;D++)b[D]=E>>8*(15-D)&255;return b},m.setDecryptDataFromLevelKey=function(E,b){var D=E;return(E==null?void 0:E.method)==="AES-128"&&E.uri&&!E.iv&&(D=p.LevelKey.fromURI(E.uri),D.method=E.method,D.iv=this.createInitializationVector(b),D.keyFormat="identity"),D},m.setElementaryStreamInfo=function(E,b,D,C,w,S){S===void 0&&(S=!1);var A=this.elementaryStreams,R=A[E];if(!R){A[E]={startPTS:b,endPTS:D,startDTS:C,endDTS:w,partial:S};return}R.startPTS=Math.min(R.startPTS,b),R.endPTS=Math.max(R.endPTS,D),R.startDTS=Math.min(R.startDTS,C),R.endDTS=Math.max(R.endDTS,w)},m.clearElementaryStreamInfo=function(){var E=this.elementaryStreams;E[i.AUDIO]=null,E[i.VIDEO]=null,E[i.AUDIOVIDEO]=null},t(f,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var E=this.sn;typeof E!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&g.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),E=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,E)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(y.isFiniteNumber)(this.programDateTime))return null;var E=Object(y.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+E*1e3}},{key:"encrypted",get:function(){var E;return!!((E=this.decryptdata)!==null&&E!==void 0&&E.keyFormat&&this.decryptdata.uri)}}]),f}(e),c=function(u){a(f,u);function f(m,l,E,b,D){var C;C=u.call(this,E)||this,C.fragOffset=0,C.duration=0,C.gap=!1,C.independent=!1,C.relurl=void 0,C.fragment=void 0,C.index=void 0,C.stats=new d.LoadStats,C.duration=m.decimalFloatingPoint("DURATION"),C.gap=m.bool("GAP"),C.independent=m.bool("INDEPENDENT"),C.relurl=m.enumeratedString("URI"),C.fragment=l,C.index=b;var w=m.enumeratedString("BYTERANGE");return w&&C.setByteRange(w,D),D&&(C.fragOffset=D.fragOffset+D.duration),C}return t(f,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var l=this.elementaryStreams;return!!(l.audio||l.video||l.audiovideo)}}]),f}(e)},"./src/loader/key-loader.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return g});var y=O("./src/events.ts"),v=O("./src/errors.ts"),o=O("./src/utils/logger.ts"),g=function(){function p(a){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=a,this._registerListeners()}var d=p.prototype;return d._registerListeners=function(){this.hls.on(y.Events.KEY_LOADING,this.onKeyLoading,this)},d._unregisterListeners=function(){this.hls.off(y.Events.KEY_LOADING,this.onKeyLoading)},d.destroy=function(){this._unregisterListeners();for(var n in this.loaders){var s=this.loaders[n];s&&s.destroy()}this.loaders={}},d.onKeyLoading=function(n,s){var t=s.frag,i=t.type,e=this.loaders[i];if(!t.decryptdata){o.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var r=t.decryptdata.uri;if(r!==this.decrypturl||this.decryptkey===null){var c=this.hls.config;if(e&&(o.logger.warn("abort previous key loader for type:"+i),e.abort()),!r){o.logger.warn("key uri is falsy");return}var u=c.loader,f=t.loader=this.loaders[i]=new u(c);this.decrypturl=r,this.decryptkey=null;var m={url:r,frag:t,responseType:"arraybuffer"},l={timeout:c.fragLoadingTimeOut,maxRetry:0,retryDelay:c.fragLoadingRetryDelay,maxRetryDelay:c.fragLoadingMaxRetryTimeout,highWaterMark:0},E={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};f.load(m,l,E)}else this.decryptkey&&(t.decryptdata.key=this.decryptkey,this.hls.trigger(y.Events.KEY_LOADED,{frag:t}))},d.loadsuccess=function(n,s,t){var i=t.frag;if(!i.decryptdata){o.logger.error("after key load, decryptdata unset");return}this.decryptkey=i.decryptdata.key=new Uint8Array(n.data),i.loader=null,delete this.loaders[i.type],this.hls.trigger(y.Events.KEY_LOADED,{frag:i})},d.loaderror=function(n,s){var t=s.frag,i=t.loader;i&&i.abort(),delete this.loaders[t.type],this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:t,response:n})},d.loadtimeout=function(n,s){var t=s.frag,i=t.loader;i&&i.abort(),delete this.loaders[t.type],this.hls.trigger(y.Events.ERROR,{type:v.ErrorTypes.NETWORK_ERROR,details:v.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:t})},p}()},"./src/loader/level-details.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"LevelDetails",function(){return p});var y=O("./src/polyfills/number.ts");function v(d,a){for(var n=0;n<a.length;n++){var s=a[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}function o(d,a,n){return a&&v(d.prototype,a),n&&v(d,n),d}var g=10,p=function(){function d(n){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.fragments=[],this.url=n}var a=d.prototype;return a.reloaded=function(s){if(!s){this.advanced=!0,this.updated=!0;return}var t=this.lastPartSn-s.lastPartSn,i=this.lastPartIndex-s.lastPartIndex;this.updated=this.endSN!==s.endSN||!!i||!!t,this.advanced=this.endSN>s.endSN||t>0||t===0&&i>0,this.updated||this.advanced?this.misses=Math.floor(s.misses*.6):this.misses=s.misses+1,this.availabilityDelay=s.availabilityDelay},o(d,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(y.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||g}},{key:"drift",get:function(){var s=this.driftEndTime-this.driftStartTime;if(s>0){var t=this.driftEnd-this.driftStart;return t*1e3/s}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var s;return(s=this.fragments)!==null&&s!==void 0&&s.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var s;return(s=this.partList)!==null&&s!==void 0&&s.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),d}()},"./src/loader/level-key.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"LevelKey",function(){return p});var y=O("./node_modules/url-toolkit/src/url-toolkit.js"),v=O.n(y);function o(d,a){for(var n=0;n<a.length;n++){var s=a[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(d,s.key,s)}}function g(d,a,n){return a&&o(d.prototype,a),n&&o(d,n),d}var p=function(){d.fromURL=function(n,s){return new d(n,s)},d.fromURI=function(n){return new d(n)};function d(a,n){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,n?this._uri=Object(y.buildAbsoluteURL)(a,n,{alwaysNormalize:!0}):this._uri=a}return g(d,[{key:"uri",get:function(){return this._uri}}]),d}()},"./src/loader/load-stats.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"LoadStats",function(){return y});var y=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return f});var y=O("./src/polyfills/number.ts"),v=O("./node_modules/url-toolkit/src/url-toolkit.js"),o=O.n(v),g=O("./src/loader/fragment.ts"),p=O("./src/loader/level-details.ts"),d=O("./src/loader/level-key.ts"),a=O("./src/utils/attr-list.ts"),n=O("./src/utils/logger.ts"),s=O("./src/utils/codecs.ts"),t=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,i=/#EXT-X-MEDIA:(.*)/g,e=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),r=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(PLAYLIST-TYPE):(.+)/.source,/#EXT-X-(MEDIA-SEQUENCE): *(\d+)/.source,/#EXT-X-(SKIP):(.+)/.source,/#EXT-X-(TARGETDURATION): *(\d+)/.source,/#EXT-X-(KEY):(.+)/.source,/#EXT-X-(START):(.+)/.source,/#EXT-X-(ENDLIST)/.source,/#EXT-X-(DISCONTINUITY-SEQ)UENCE: *(\d+)/.source,/#EXT-X-(DIS)CONTINUITY/.source,/#EXT-X-(VERSION):(\d+)/.source,/#EXT-X-(MAP):(.+)/.source,/#EXT-X-(SERVER-CONTROL):(.+)/.source,/#EXT-X-(PART-INF):(.+)/.source,/#EXT-X-(GAP)/.source,/#EXT-X-(BITRATE):\s*(\d+)/.source,/#EXT-X-(PART):(.+)/.source,/#EXT-X-(PRELOAD-HINT):(.+)/.source,/#EXT-X-(RENDITION-REPORT):(.+)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),c=/\.(mp4|m4s|m4v|m4a)$/i;function u(D){var C,w;return c.test((C=(w=v.parseURL(D))===null||w===void 0?void 0:w.path)!=null?C:"")}var f=function(){function D(){}return D.findGroup=function(w,S){for(var A=0;A<w.length;A++){var R=w[A];if(R.id===S)return R}},D.convertAVC1ToAVCOTI=function(w){var S=w.split(".");if(S.length>2){var A=S.shift()+".";return A+=parseInt(S.shift()).toString(16),A+=("000"+parseInt(S.shift()).toString(16)).substr(-4),A}return w},D.resolve=function(w,S){return v.buildAbsoluteURL(S,w,{alwaysNormalize:!0})},D.parseMasterPlaylist=function(w,S){var A=[],R={},k=!1;t.lastIndex=0;for(var L;(L=t.exec(w))!=null;)if(L[1]){var M=new a.AttrList(L[1]),G={attrs:M,bitrate:M.decimalInteger("AVERAGE-BANDWIDTH")||M.decimalInteger("BANDWIDTH"),name:M.NAME,url:D.resolve(L[2],S)},W=M.decimalResolution("RESOLUTION");W&&(G.width=W.width,G.height=W.height),m((M.CODECS||"").split(/[ ,]+/).filter(function(K){return K}),G),G.videoCodec&&G.videoCodec.indexOf("avc1")!==-1&&(G.videoCodec=D.convertAVC1ToAVCOTI(G.videoCodec)),A.push(G)}else if(L[3]){var N=new a.AttrList(L[3]);N["DATA-ID"]&&(k=!0,R[N["DATA-ID"]]=N)}return{levels:A,sessionData:k?R:null}},D.parseMasterPlaylistMedia=function(w,S,A,R){R===void 0&&(R=[]);var k,L=[],M=0;for(i.lastIndex=0;(k=i.exec(w))!==null;){var G=new a.AttrList(k[1]);if(G.TYPE===A){var W={attrs:G,bitrate:0,id:M++,groupId:G["GROUP-ID"],instreamId:G["INSTREAM-ID"],name:G.NAME||G.LANGUAGE||"",type:A,default:G.bool("DEFAULT"),autoselect:G.bool("AUTOSELECT"),forced:G.bool("FORCED"),lang:G.LANGUAGE,url:G.URI?D.resolve(G.URI,S):""};if(R.length){var N=D.findGroup(R,W.groupId)||R[0];l(W,N,"audioCodec"),l(W,N,"textCodec")}L.push(W)}}return L},D.parseLevelPlaylist=function(w,S,A,R,k){var L=new p.LevelDetails(S),M=L.fragments,G=null,W=0,N=0,K=0,F=0,P=null,B=new g.Fragment(R,S),J,re,he,we=-1,ke=!1;for(e.lastIndex=0,L.m3u8=w;(J=e.exec(w))!==null;){ke&&(ke=!1,B=new g.Fragment(R,S),B.start=K,B.sn=W,B.cc=F,B.level=A,G&&(B.initSegment=G,B.rawProgramDateTime=G.rawProgramDateTime));var ne=J[1];if(ne){B.duration=parseFloat(ne);var Oe=(" "+J[2]).slice(1);B.title=Oe||null,B.tagList.push(Oe?["INF",ne,Oe]:["INF",ne])}else if(J[3])Object(y.isFiniteNumber)(B.duration)&&(B.start=K,he&&(B.levelkey=he),B.sn=W,B.level=A,B.cc=F,B.urlId=k,M.push(B),B.relurl=(" "+J[3]).slice(1),b(B,P),P=B,K+=B.duration,W++,N=0,ke=!0);else if(J[4]){var Ce=(" "+J[4]).slice(1);P?B.setByteRange(Ce,P):B.setByteRange(Ce)}else if(J[5])B.rawProgramDateTime=(" "+J[5]).slice(1),B.tagList.push(["PROGRAM-DATE-TIME",B.rawProgramDateTime]),we===-1&&(we=M.length);else{if(J=J[0].match(r),!J){n.logger.warn("No matches on slow regex match for level playlist!");continue}for(re=1;re<J.length&&!(typeof J[re]!="undefined");re++);var fe=(" "+J[re]).slice(1),oe=(" "+J[re+1]).slice(1),se=J[re+2]?(" "+J[re+2]).slice(1):"";switch(fe){case"PLAYLIST-TYPE":L.type=oe.toUpperCase();break;case"MEDIA-SEQUENCE":W=L.startSN=parseInt(oe);break;case"SKIP":{var be=new a.AttrList(oe),ie=be.decimalInteger("SKIPPED-SEGMENTS");if(Object(y.isFiniteNumber)(ie)){L.skippedSegments=ie;for(var de=ie;de--;)M.unshift(null);W+=ie}var Fe=be.enumeratedString("RECENTLY-REMOVED-DATERANGES");Fe&&(L.recentlyRemovedDateranges=Fe.split(" "));break}case"TARGETDURATION":L.targetduration=parseFloat(oe);break;case"VERSION":L.version=parseInt(oe);break;case"EXTM3U":break;case"ENDLIST":L.live=!1;break;case"#":(oe||se)&&B.tagList.push(se?[oe,se]:[oe]);break;case"DIS":F++;case"GAP":B.tagList.push([fe]);break;case"BITRATE":B.tagList.push([fe,oe]);break;case"DISCONTINUITY-SEQ":F=parseInt(oe);break;case"KEY":{var ae,Z=new a.AttrList(oe),Y=Z.enumeratedString("METHOD"),q=Z.URI,ve=Z.hexadecimalInteger("IV"),pe=Z.enumeratedString("KEYFORMATVERSIONS"),Te=Z.enumeratedString("KEYID"),Ne=(ae=Z.enumeratedString("KEYFORMAT"))!=null?ae:"identity",me=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(me.indexOf(Ne)>-1){n.logger.warn("Keyformat "+Ne+" is not supported from the manifest");continue}else if(Ne!=="identity")continue;Y&&(he=d.LevelKey.fromURL(S,q),q&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(he.method=Y,he.keyFormat=Ne,Te&&(he.keyID=Te),pe&&(he.keyFormatVersions=pe),he.iv=ve));break}case"START":{var Ie=new a.AttrList(oe),_e=Ie.decimalFloatingPoint("TIME-OFFSET");Object(y.isFiniteNumber)(_e)&&(L.startTimeOffset=_e);break}case"MAP":{var Ve=new a.AttrList(oe);B.relurl=Ve.URI,Ve.BYTERANGE&&B.setByteRange(Ve.BYTERANGE),B.level=A,B.sn="initSegment",he&&(B.levelkey=he),B.initSegment=null,G=B,ke=!0;break}case"SERVER-CONTROL":{var tt=new a.AttrList(oe);L.canBlockReload=tt.bool("CAN-BLOCK-RELOAD"),L.canSkipUntil=tt.optionalFloat("CAN-SKIP-UNTIL",0),L.canSkipDateRanges=L.canSkipUntil>0&&tt.bool("CAN-SKIP-DATERANGES"),L.partHoldBack=tt.optionalFloat("PART-HOLD-BACK",0),L.holdBack=tt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ge=new a.AttrList(oe);L.partTarget=Ge.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Le=L.partList;Le||(Le=L.partList=[]);var bt=N>0?Le[Le.length-1]:void 0,Re=N++,Xe=new g.Part(new a.AttrList(oe),B,S,Re,bt);Le.push(Xe),B.duration+=Xe.duration;break}case"PRELOAD-HINT":{var et=new a.AttrList(oe);L.preloadHint=et;break}case"RENDITION-REPORT":{var Ye=new a.AttrList(oe);L.renditionReports=L.renditionReports||[],L.renditionReports.push(Ye);break}default:n.logger.warn("line parsed but not handled: "+J);break}}}P&&!P.relurl?(M.pop(),K-=P.duration,L.partList&&(L.fragmentHint=P)):L.partList&&(b(B,P),B.cc=F,L.fragmentHint=B);var Me=M.length,Ke=M[0],ge=M[Me-1];if(K+=L.skippedSegments*L.targetduration,K>0&&Me&&ge){L.averagetargetduration=K/Me;var Ee=ge.sn;L.endSN=Ee!=="initSegment"?Ee:0,Ke&&(L.startCC=Ke.cc,Ke.initSegment||L.fragments.every(function(ce){return ce.relurl&&u(ce.relurl)})&&(n.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),B=new g.Fragment(R,S),B.relurl=ge.relurl,B.level=A,B.sn="initSegment",Ke.initSegment=B,L.needSidxRanges=!0))}else L.endSN=0,L.startCC=0;return L.fragmentHint&&(K+=L.fragmentHint.duration),L.totalduration=K,L.endCC=F,we>0&&E(M,we),L},D}();function m(D,C){["video","audio","text"].forEach(function(w){var S=D.filter(function(R){return Object(s.isCodecType)(R,w)});if(S.length){var A=S.filter(function(R){return R.lastIndexOf("avc1",0)===0||R.lastIndexOf("mp4a",0)===0});C[w+"Codec"]=A.length>0?A[0]:S[0],D=D.filter(function(R){return S.indexOf(R)===-1})}}),C.unknownCodecs=D}function l(D,C,w){var S=C[w];S&&(D[w]=S)}function E(D,C){for(var w=D[C],S=C;S--;){var A=D[S];if(!A)return;A.programDateTime=w.programDateTime-A.duration*1e3,w=A}}function b(D,C){D.rawProgramDateTime?D.programDateTime=Date.parse(D.rawProgramDateTime):C!=null&&C.programDateTime&&(D.programDateTime=C.endProgramDateTime),Object(y.isFiniteNumber)(D.programDateTime)||(D.programDateTime=null,D.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/polyfills/number.ts"),v=O("./src/events.ts"),o=O("./src/errors.ts"),g=O("./src/utils/logger.ts"),p=O("./src/utils/mp4-tools.ts"),d=O("./src/loader/m3u8-parser.ts"),a=O("./src/types/loader.ts"),n=O("./src/utils/attr-list.ts");function s(e){var r=e.type;switch(r){case a.PlaylistContextType.AUDIO_TRACK:return a.PlaylistLevelType.AUDIO;case a.PlaylistContextType.SUBTITLE_TRACK:return a.PlaylistLevelType.SUBTITLE;default:return a.PlaylistLevelType.MAIN}}function t(e,r){var c=e.url;return(c===void 0||c.indexOf("data:")===0)&&(c=r.url),c}var i=function(){function e(c){this.hls=void 0,this.loaders=Object.create(null),this.hls=c,this.registerListeners()}var r=e.prototype;return r.registerListeners=function(){var u=this.hls;u.on(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.on(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.on(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.on(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},r.unregisterListeners=function(){var u=this.hls;u.off(v.Events.MANIFEST_LOADING,this.onManifestLoading,this),u.off(v.Events.LEVEL_LOADING,this.onLevelLoading,this),u.off(v.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),u.off(v.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},r.createInternalLoader=function(u){var f=this.hls.config,m=f.pLoader,l=f.loader,E=m||l,b=new E(f);return u.loader=b,this.loaders[u.type]=b,b},r.getInternalLoader=function(u){return this.loaders[u.type]},r.resetInternalLoader=function(u){this.loaders[u]&&delete this.loaders[u]},r.destroyInternalLoaders=function(){for(var u in this.loaders){var f=this.loaders[u];f&&f.destroy(),this.resetInternalLoader(u)}},r.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},r.onManifestLoading=function(u,f){var m=f.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:a.PlaylistContextType.MANIFEST,url:m,deliveryDirectives:null})},r.onLevelLoading=function(u,f){var m=f.id,l=f.level,E=f.url,b=f.deliveryDirectives;this.load({id:m,groupId:null,level:l,responseType:"text",type:a.PlaylistContextType.LEVEL,url:E,deliveryDirectives:b})},r.onAudioTrackLoading=function(u,f){var m=f.id,l=f.groupId,E=f.url,b=f.deliveryDirectives;this.load({id:m,groupId:l,level:null,responseType:"text",type:a.PlaylistContextType.AUDIO_TRACK,url:E,deliveryDirectives:b})},r.onSubtitleTrackLoading=function(u,f){var m=f.id,l=f.groupId,E=f.url,b=f.deliveryDirectives;this.load({id:m,groupId:l,level:null,responseType:"text",type:a.PlaylistContextType.SUBTITLE_TRACK,url:E,deliveryDirectives:b})},r.load=function(u){var f,m=this.hls.config,l=this.getInternalLoader(u);if(l){var E=l.context;if(E&&E.url===u.url){g.logger.trace("[playlist-loader]: playlist request ongoing");return}g.logger.log("[playlist-loader]: aborting previous loader for type: "+u.type),l.abort()}var b,D,C,w;switch(u.type){case a.PlaylistContextType.MANIFEST:b=m.manifestLoadingMaxRetry,D=m.manifestLoadingTimeOut,C=m.manifestLoadingRetryDelay,w=m.manifestLoadingMaxRetryTimeout;break;case a.PlaylistContextType.LEVEL:case a.PlaylistContextType.AUDIO_TRACK:case a.PlaylistContextType.SUBTITLE_TRACK:b=0,D=m.levelLoadingTimeOut;break;default:b=m.levelLoadingMaxRetry,D=m.levelLoadingTimeOut,C=m.levelLoadingRetryDelay,w=m.levelLoadingMaxRetryTimeout;break}if(l=this.createInternalLoader(u),(f=u.deliveryDirectives)!==null&&f!==void 0&&f.part){var S;if(u.type===a.PlaylistContextType.LEVEL&&u.level!==null?S=this.hls.levels[u.level].details:u.type===a.PlaylistContextType.AUDIO_TRACK&&u.id!==null?S=this.hls.audioTracks[u.id].details:u.type===a.PlaylistContextType.SUBTITLE_TRACK&&u.id!==null&&(S=this.hls.subtitleTracks[u.id].details),S){var A=S.partTarget,R=S.targetduration;A&&R&&(D=Math.min(Math.max(A*3,R*.8)*1e3,D))}}var k={timeout:D,maxRetry:b,retryDelay:C,maxRetryDelay:w,highWaterMark:0},L={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};l.load(u,k,L)},r.loadsuccess=function(u,f,m,l){if(l===void 0&&(l=null),m.isSidxRequest){this.handleSidxRequest(u,m),this.handlePlaylistLoaded(u,f,m,l);return}this.resetInternalLoader(m.type);var E=u.data;if(E.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,m,"no EXTM3U delimiter",l);return}f.parsing.start=performance.now(),E.indexOf("#EXTINF:")>0||E.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(u,f,m,l):this.handleMasterPlaylist(u,f,m,l)},r.loaderror=function(u,f,m){m===void 0&&(m=null),this.handleNetworkError(f,m,!1,u)},r.loadtimeout=function(u,f,m){m===void 0&&(m=null),this.handleNetworkError(f,m,!0)},r.handleMasterPlaylist=function(u,f,m,l){var E=this.hls,b=u.data,D=t(u,m),C=d.default.parseMasterPlaylist(b,D),w=C.levels,S=C.sessionData;if(!w.length){this.handleManifestParsingError(u,m,"no level found in manifest",l);return}var A=w.map(function(W){return{id:W.attrs.AUDIO,audioCodec:W.audioCodec}}),R=w.map(function(W){return{id:W.attrs.SUBTITLES,textCodec:W.textCodec}}),k=d.default.parseMasterPlaylistMedia(b,D,"AUDIO",A),L=d.default.parseMasterPlaylistMedia(b,D,"SUBTITLES",R),M=d.default.parseMasterPlaylistMedia(b,D,"CLOSED-CAPTIONS");if(k.length){var G=k.some(function(W){return!W.url});!G&&w[0].audioCodec&&!w[0].attrs.AUDIO&&(g.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),k.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new n.AttrList({}),bitrate:0,url:""}))}E.trigger(v.Events.MANIFEST_LOADED,{levels:w,audioTracks:k,subtitles:L,captions:M,url:D,stats:f,networkDetails:l,sessionData:S})},r.handleTrackOrLevelPlaylist=function(u,f,m,l){var E=this.hls,b=m.id,D=m.level,C=m.type,w=t(u,m),S=Object(y.isFiniteNumber)(b)?b:0,A=Object(y.isFiniteNumber)(D)?D:S,R=s(m),k=d.default.parseLevelPlaylist(u.data,w,A,R,S);if(!k.fragments.length){E.trigger(v.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:w,reason:"no fragments found in level",level:typeof m.level=="number"?m.level:void 0});return}if(C===a.PlaylistContextType.MANIFEST){var L={attrs:new n.AttrList({}),bitrate:0,details:k,name:"",url:w};E.trigger(v.Events.MANIFEST_LOADED,{levels:[L],audioTracks:[],url:w,stats:f,networkDetails:l,sessionData:null})}if(f.parsing.end=performance.now(),k.needSidxRanges){var M,G=(M=k.fragments[0].initSegment)===null||M===void 0?void 0:M.url;this.load({url:G,isSidxRequest:!0,type:C,level:D,levelDetails:k,id:b,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}m.levelDetails=k,this.handlePlaylistLoaded(u,f,m,l)},r.handleSidxRequest=function(u,f){var m=Object(p.parseSegmentIndex)(new Uint8Array(u.data));if(!m)return;var l=m.references,E=f.levelDetails;l.forEach(function(b,D){var C=b.info,w=E.fragments[D];w.byteRange.length===0&&w.setByteRange(String(1+C.end-C.start)+"@"+String(C.start)),w.initSegment&&w.initSegment.setByteRange(String(m.moovEndOffset)+"@0")})},r.handleManifestParsingError=function(u,f,m,l){this.hls.trigger(v.Events.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:f.type===a.PlaylistContextType.MANIFEST,url:u.url,reason:m,response:u,context:f,networkDetails:l})},r.handleNetworkError=function(u,f,m,l){m===void 0&&(m=!1),g.logger.warn("[playlist-loader]: A network "+(m?"timeout":"error")+" occurred while loading "+u.type+" level: "+u.level+" id: "+u.id+' group-id: "'+u.groupId+'"');var E=o.ErrorDetails.UNKNOWN,b=!1,D=this.getInternalLoader(u);switch(u.type){case a.PlaylistContextType.MANIFEST:E=m?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,b=!0;break;case a.PlaylistContextType.LEVEL:E=m?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,b=!1;break;case a.PlaylistContextType.AUDIO_TRACK:E=m?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,b=!1;break;case a.PlaylistContextType.SUBTITLE_TRACK:E=m?o.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:o.ErrorDetails.SUBTITLE_LOAD_ERROR,b=!1;break}D&&this.resetInternalLoader(u.type);var C={type:o.ErrorTypes.NETWORK_ERROR,details:E,fatal:b,url:u.url,loader:D,context:u,networkDetails:f};l&&(C.response=l),this.hls.trigger(v.Events.ERROR,C)},r.handlePlaylistLoaded=function(u,f,m,l){var E=m.type,b=m.level,D=m.id,C=m.groupId,w=m.loader,S=m.levelDetails,A=m.deliveryDirectives;if(!(S!=null&&S.targetduration)){this.handleManifestParsingError(u,m,"invalid target duration",l);return}if(!w)return;S.live&&(w.getCacheAge&&(S.ageHeader=w.getCacheAge()||0),(!w.getCacheAge||isNaN(S.ageHeader))&&(S.ageHeader=0));switch(E){case a.PlaylistContextType.MANIFEST:case a.PlaylistContextType.LEVEL:this.hls.trigger(v.Events.LEVEL_LOADED,{details:S,level:b||0,id:D||0,stats:f,networkDetails:l,deliveryDirectives:A});break;case a.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(v.Events.AUDIO_TRACK_LOADED,{details:S,id:D||0,groupId:C||"",stats:f,networkDetails:l,deliveryDirectives:A});break;case a.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(v.Events.SUBTITLE_TRACK_LOADED,{details:S,id:D||0,groupId:C||"",stats:f,networkDetails:l,deliveryDirectives:A});break}},e}();_.default=i},"./src/polyfills/number.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"isFiniteNumber",function(){return y}),O.d(_,"MAX_SAFE_INTEGER",function(){return v});var y=Number.isFinite||function(o){return typeof o=="number"&&isFinite(o)},v=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(I,_,O){"use strict";O.r(_);var y=function(){function v(){}return v.getSilentFrame=function(g,p){switch(g){case"mp4a.40.2":if(p===1)return new Uint8Array([0,200,0,128,35,128]);if(p===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(p===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(p===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(p===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(p===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(p===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(p===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},v}();_.default=y},"./src/remux/mp4-generator.ts":function(I,_,O){"use strict";O.r(_);var y=Math.pow(2,32)-1,v=function(){function o(){}return o.init=function(){o.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};var p;for(p in o.types)o.types.hasOwnProperty(p)&&(o.types[p]=[p.charCodeAt(0),p.charCodeAt(1),p.charCodeAt(2),p.charCodeAt(3)]);var d=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]),a=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]);o.HDLR_TYPES={video:d,audio:a};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);o.STTS=o.STSC=o.STCO=s,o.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),o.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),o.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),o.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var t=new Uint8Array([105,115,111,109]),i=new Uint8Array([97,118,99,49]),e=new Uint8Array([0,0,0,1]);o.FTYP=o.box(o.types.ftyp,t,e,t,i),o.DINF=o.box(o.types.dinf,o.box(o.types.dref,n))},o.box=function(p){for(var d=8,a=arguments.length,n=new Array(a>1?a-1:0),s=1;s<a;s++)n[s-1]=arguments[s];for(var t=n.length,i=t;t--;)d+=n[t].byteLength;var e=new Uint8Array(d);for(e[0]=d>>24&255,e[1]=d>>16&255,e[2]=d>>8&255,e[3]=d&255,e.set(p,4),t=0,d=8;t<i;t++)e.set(n[t],d),d+=n[t].byteLength;return e},o.hdlr=function(p){return o.box(o.types.hdlr,o.HDLR_TYPES[p])},o.mdat=function(p){return o.box(o.types.mdat,p)},o.mdhd=function(p,d){d*=p;var a=Math.floor(d/(y+1)),n=Math.floor(d%(y+1));return o.box(o.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,a>>24,a>>16&255,a>>8&255,a&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))},o.mdia=function(p){return o.box(o.types.mdia,o.mdhd(p.timescale,p.duration),o.hdlr(p.type),o.minf(p))},o.mfhd=function(p){return o.box(o.types.mfhd,new Uint8Array([0,0,0,0,p>>24,p>>16&255,p>>8&255,p&255]))},o.minf=function(p){return p.type==="audio"?o.box(o.types.minf,o.box(o.types.smhd,o.SMHD),o.DINF,o.stbl(p)):o.box(o.types.minf,o.box(o.types.vmhd,o.VMHD),o.DINF,o.stbl(p))},o.moof=function(p,d,a){return o.box(o.types.moof,o.mfhd(p),o.traf(a,d))},o.moov=function(p){for(var d=p.length,a=[];d--;)a[d]=o.trak(p[d]);return o.box.apply(null,[o.types.moov,o.mvhd(p[0].timescale,p[0].duration)].concat(a).concat(o.mvex(p)))},o.mvex=function(p){for(var d=p.length,a=[];d--;)a[d]=o.trex(p[d]);return o.box.apply(null,[o.types.mvex].concat(a))},o.mvhd=function(p,d){d*=p;var a=Math.floor(d/(y+1)),n=Math.floor(d%(y+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,p>>24&255,p>>16&255,p>>8&255,p&255,a>>24,a>>16&255,a>>8&255,a&255,n>>24,n>>16&255,n>>8&255,n&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return o.box(o.types.mvhd,s)},o.sdtp=function(p){var d=p.samples||[],a=new Uint8Array(4+d.length),n,s;for(n=0;n<d.length;n++)s=d[n].flags,a[n+4]=s.dependsOn<<4|s.isDependedOn<<2|s.hasRedundancy;return o.box(o.types.sdtp,a)},o.stbl=function(p){return o.box(o.types.stbl,o.stsd(p),o.box(o.types.stts,o.STTS),o.box(o.types.stsc,o.STSC),o.box(o.types.stsz,o.STSZ),o.box(o.types.stco,o.STCO))},o.avc1=function(p){var d=[],a=[],n,s,t;for(n=0;n<p.sps.length;n++)s=p.sps[n],t=s.byteLength,d.push(t>>>8&255),d.push(t&255),d=d.concat(Array.prototype.slice.call(s));for(n=0;n<p.pps.length;n++)s=p.pps[n],t=s.byteLength,a.push(t>>>8&255),a.push(t&255),a=a.concat(Array.prototype.slice.call(s));var i=o.box(o.types.avcC,new Uint8Array([1,d[3],d[4],d[5],252|3,224|p.sps.length].concat(d).concat([p.pps.length]).concat(a))),e=p.width,r=p.height,c=p.pixelRatio[0],u=p.pixelRatio[1];return o.box(o.types.avc1,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,e>>8&255,e&255,r>>8&255,r&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),i,o.box(o.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),o.box(o.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,c&255,u>>24,u>>16&255,u>>8&255,u&255])))},o.esds=function(p){var d=p.config.length;return new Uint8Array([0,0,0,0,3,23+d,0,1,0,4,15+d,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([d]).concat(p.config).concat([6,1,2]))},o.mp4a=function(p){var d=p.samplerate;return o.box(o.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,d>>8&255,d&255,0,0]),o.box(o.types.esds,o.esds(p)))},o.mp3=function(p){var d=p.samplerate;return o.box(o.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,p.channelCount,0,16,0,0,0,0,d>>8&255,d&255,0,0]))},o.stsd=function(p){return p.type==="audio"?!p.isAAC&&p.codec==="mp3"?o.box(o.types.stsd,o.STSD,o.mp3(p)):o.box(o.types.stsd,o.STSD,o.mp4a(p)):o.box(o.types.stsd,o.STSD,o.avc1(p))},o.tkhd=function(p){var d=p.id,a=p.duration*p.timescale,n=p.width,s=p.height,t=Math.floor(a/(y+1)),i=Math.floor(a%(y+1));return o.box(o.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,d>>24&255,d>>16&255,d>>8&255,d&255,0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,i>>24,i>>16&255,i>>8&255,i&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,s>>8&255,s&255,0,0]))},o.traf=function(p,d){var a=o.sdtp(p),n=p.id,s=Math.floor(d/(y+1)),t=Math.floor(d%(y+1));return o.box(o.types.traf,o.box(o.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),o.box(o.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,t>>24,t>>16&255,t>>8&255,t&255])),o.trun(p,a.length+16+20+8+16+8+8),a)},o.trak=function(p){return p.duration=p.duration||4294967295,o.box(o.types.trak,o.tkhd(p),o.mdia(p))},o.trex=function(p){var d=p.id;return o.box(o.types.trex,new Uint8Array([0,0,0,0,d>>24,d>>16&255,d>>8&255,d&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},o.trun=function(p,d){var a=p.samples||[],n=a.length,s=12+16*n,t=new Uint8Array(s),i,e,r,c,u,f;for(d+=8+s,t.set([0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255],0),i=0;i<n;i++)e=a[i],r=e.duration,c=e.size,u=e.flags,f=e.cts,t.set([r>>>24&255,r>>>16&255,r>>>8&255,r&255,c>>>24&255,c>>>16&255,c>>>8&255,c&255,u.isLeading<<2|u.dependsOn,u.isDependedOn<<6|u.hasRedundancy<<4|u.paddingValue<<1|u.isNonSync,u.degradPrio&240<<8,u.degradPrio&15,f>>>24&255,f>>>16&255,f>>>8&255,f&255],12+16*i);return o.box(o.types.trun,t)},o.initSegment=function(p){o.types||o.init();var d=o.moov(p),a=new Uint8Array(o.FTYP.byteLength+d.byteLength);return a.set(o.FTYP),a.set(d,o.FTYP.byteLength),a},o}();v.types=void 0,v.HDLR_TYPES=void 0,v.STTS=void 0,v.STSC=void 0,v.STCO=void 0,v.STSZ=void 0,v.VMHD=void 0,v.SMHD=void 0,v.STSD=void 0,v.FTYP=void 0,v.DINF=void 0,_.default=v},"./src/remux/mp4-remuxer.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return f}),O.d(_,"normalizePts",function(){return m});var y=O("./src/polyfills/number.ts"),v=O("./src/remux/aac-helper.ts"),o=O("./src/remux/mp4-generator.ts"),g=O("./src/events.ts"),p=O("./src/errors.ts"),d=O("./src/utils/logger.ts"),a=O("./src/types/loader.ts"),n=O("./src/utils/timescale-conversion.ts");function s(){return s=Object.assign||function(D){for(var C=1;C<arguments.length;C++){var w=arguments[C];for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&(D[S]=w[S])}return D},s.apply(this,arguments)}var t=10*1e3,i=1024,e=1152,r=null,c=null,u=!1,f=function(){function D(w,S,A,R){if(R===void 0&&(R=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=w,this.config=S,this.typeSupported=A,this.ISGenerated=!1,r===null){var k=navigator.userAgent||"",L=k.match(/Chrome\/(\d+)/i);r=L?parseInt(L[1]):0}if(c===null){var M=navigator.userAgent.match(/Safari\/(\d+)/i);c=M?parseInt(M[1]):0}u=!!r&&r<75||!!c&&c<600}var C=D.prototype;return C.destroy=function(){},C.resetTimeStamp=function(S){d.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=S},C.resetNextTimestamp=function(){d.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},C.resetInitSegment=function(){d.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},C.getVideoStartPts=function(S){var A=!1,R=S.reduce(function(k,L){var M=L.pts-k;return M<-4294967296?(A=!0,m(k,L.pts)):M>0?k:L.pts},S[0].pts);return A&&d.logger.debug("PTS rollover detected"),R},C.remux=function(S,A,R,k,L,M,G,W){var N,K,F,P,B,J,re=L,he=L,we=S.pid>-1,ke=A.pid>-1,ne=A.samples.length,Oe=S.samples.length>0,Ce=ne>1,fe=(!we||Oe)&&(!ke||Ce)||this.ISGenerated||G;if(fe){this.ISGenerated||(F=this.generateIS(S,A,L));var oe=this.isVideoContiguous,se=-1;if(Ce&&(se=l(A.samples),!oe&&this.config.forceKeyFrameOnDiscontinuity))if(J=!0,se>0){d.logger.warn("[mp4-remuxer]: Dropped "+se+" out of "+ne+" video samples due to a missing keyframe");var be=this.getVideoStartPts(A.samples);A.samples=A.samples.slice(se),A.dropped+=se,he+=(A.samples[0].pts-be)/(A.timescale||9e4)}else se===-1&&(d.logger.warn("[mp4-remuxer]: No keyframe found out of "+ne+" video samples"),J=!1);if(this.ISGenerated){if(Oe&&Ce){var ie=this.getVideoStartPts(A.samples),de=m(S.samples[0].pts,ie)-ie,Fe=de/A.inputTimeScale;re+=Math.max(0,Fe),he+=Math.max(0,-Fe)}if(Oe){if(S.samplerate||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),F=this.generateIS(S,A,L)),K=this.remuxAudio(S,re,this.isAudioContiguous,M,ke||Ce||W===a.PlaylistLevelType.AUDIO?he:void 0),Ce){var ae=K?K.endPTS-K.startPTS:0;A.inputTimeScale||(d.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),F=this.generateIS(S,A,L)),N=this.remuxVideo(A,he,oe,ae)}}else Ce&&(N=this.remuxVideo(A,he,oe,0));N&&(N.firstKeyFrame=se,N.independent=se!==-1)}}return this.ISGenerated&&(R.samples.length&&(B=this.remuxID3(R,L)),k.samples.length&&(P=this.remuxText(k,L))),{audio:K,video:N,initSegment:F,independent:J,text:P,id3:B}},C.generateIS=function(S,A,R){var k=S.samples,L=A.samples,M=this.typeSupported,G={},W=!Object(y.isFiniteNumber)(this._initPTS),N="audio/mp4",K,F,P;if(W&&(K=F=Infinity),S.config&&k.length&&(S.timescale=S.samplerate,S.isAAC||(M.mpeg?(N="audio/mpeg",S.codec=""):M.mp3&&(S.codec="mp3")),G.audio={id:"audio",container:N,codec:S.codec,initSegment:!S.isAAC&&M.mpeg?new Uint8Array(0):o.default.initSegment([S]),metadata:{channelCount:S.channelCount}},W&&(P=S.inputTimeScale,K=F=k[0].pts-Math.round(P*R))),A.sps&&A.pps&&L.length&&(A.timescale=A.inputTimeScale,G.video={id:"main",container:"video/mp4",codec:A.codec,initSegment:o.default.initSegment([A]),metadata:{width:A.width,height:A.height}},W)){P=A.inputTimeScale;var B=this.getVideoStartPts(L),J=Math.round(P*R);F=Math.min(F,m(L[0].dts,B)-J),K=Math.min(K,B-J)}if(Object.keys(G).length)return this.ISGenerated=!0,W&&(this._initPTS=K,this._initDTS=F),{tracks:G,initPTS:K,timescale:P}},C.remuxVideo=function(S,A,R,k){var L=S.inputTimeScale,M=S.samples,G=[],W=M.length,N=this._initPTS,K=this.nextAvcDts,F=8,P,B,J,re=Number.POSITIVE_INFINITY,he=Number.NEGATIVE_INFINITY,we=0,ke=!1;if(!R||K===null){var ne=A*L,Oe=M[0].pts-m(M[0].dts,M[0].pts);K=ne-Oe}for(var Ce=0;Ce<W;Ce++){var fe=M[Ce];if(fe.pts=m(fe.pts-N,K),fe.dts=m(fe.dts-N,K),fe.dts>fe.pts){var oe=9e4*.2;we=Math.max(Math.min(we,fe.pts-fe.dts),-1*oe)}fe.dts<M[Ce>0?Ce-1:Ce].dts&&(ke=!0)}ke&&M.sort(function(at,wt){var ft=at.dts-wt.dts,st=at.pts-wt.pts;return ft||st}),B=M[0].dts,J=M[M.length-1].dts;var se=Math.round((J-B)/(W-1));if(we<0){if(we<se*-2){d.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(n.toMsFromMpegTsClock)(-se,!0)+" ms");for(var be=we,ie=0;ie<W;ie++)M[ie].dts=be=Math.max(be,M[ie].pts-se),M[ie].pts=Math.max(be,M[ie].pts)}else{d.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(n.toMsFromMpegTsClock)(we,!0)+" ms to overcome this issue");for(var de=0;de<W;de++)M[de].dts=M[de].dts+we}B=M[0].dts}if(R){var Fe=B-K,ae=Fe>se,Z=Fe<-1;if(ae||Z){ae?d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms ("+Fe+"dts) hole between fragments detected, filling it"):d.logger.warn("AVC: "+Object(n.toMsFromMpegTsClock)(-Fe,!0)+" ms ("+Fe+"dts) overlapping between fragments detected"),B=K;var Y=M[0].pts-Fe;M[0].dts=B,M[0].pts=Y,d.logger.log("Video: First PTS/DTS adjusted: "+Object(n.toMsFromMpegTsClock)(Y,!0)+"/"+Object(n.toMsFromMpegTsClock)(B,!0)+", delta: "+Object(n.toMsFromMpegTsClock)(Fe,!0)+" ms")}}u&&(B=Math.max(0,B));for(var q=0,ve=0,pe=0;pe<W;pe++){for(var Te=M[pe],Ne=Te.units,me=Ne.length,Ie=0,_e=0;_e<me;_e++)Ie+=Ne[_e].data.length;ve+=Ie,q+=me,Te.length=Ie,Te.dts=Math.max(Te.dts,B),Te.pts=Math.max(Te.pts,Te.dts,0),re=Math.min(Te.pts,re),he=Math.max(Te.pts,he)}J=M[W-1].dts;var Ve=ve+4*q+8,tt;try{tt=new Uint8Array(Ve)}catch(at){this.observer.emit(g.Events.ERROR,g.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:Ve,reason:"fail allocating video mdat "+Ve});return}var Ge=new DataView(tt.buffer);Ge.setUint32(0,Ve),tt.set(o.default.types.mdat,4);for(var Le=0;Le<W;Le++){for(var bt=M[Le],Re=bt.units,Xe=0,et=0,Ye=Re.length;et<Ye;et++){var Me=Re[et],Ke=Me.data,ge=Me.data.byteLength;Ge.setUint32(F,ge),F+=4,tt.set(Ke,F),F+=ge,Xe+=4+ge}if(Le<W-1)P=M[Le+1].dts-bt.dts;else{var Ee=this.config,ce=bt.dts-M[Le>0?Le-1:Le].dts;if(Ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var je=Math.floor(Ee.maxBufferHole*L),Qe=(k?re+k*L:this.nextAudioPts)-bt.pts;Qe>je?(P=Qe-ce,P<0&&(P=ce),d.logger.log("[mp4-remuxer]: It is approximately "+Qe/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=ce}else P=ce}var te=Math.round(bt.pts-bt.dts);G.push(new E(bt.key,P,Xe,te))}if(G.length&&r&&r<70){var Je=G[0].flags;Je.dependsOn=2,Je.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=K=J+P,this.isVideoContiguous=!0;var ut=o.default.moof(S.sequenceNumber++,B,s({},S,{samples:G})),Be="video",qe={data1:ut,data2:tt,startPTS:re/L,endPTS:(he+P)/L,startDTS:B/L,endDTS:K/L,type:Be,hasAudio:!1,hasVideo:!0,nb:G.length,dropped:S.dropped};return S.samples=[],S.dropped=0,console.assert(tt.length,"MDAT length must not be zero"),qe},C.remuxAudio=function(S,A,R,k,L){var M=S.inputTimeScale,G=S.samplerate?S.samplerate:M,W=M/G,N=S.isAAC?i:e,K=N*W,F=this._initPTS,P=!S.isAAC&&this.typeSupported.mpeg,B=[],J=S.samples,re=P?0:8,he=this.nextAudioPts||-1,we=A*M;if(this.isAudioContiguous=R=R||J.length&&he>0&&(k&&Math.abs(we-he)<9e3||Math.abs(m(J[0].pts-F,we)-he)<20*K),J.forEach(function(Ke){Ke.pts=m(Ke.pts-F,we)}),!R||he<0){if(J=J.filter(function(Ke){return Ke.pts>=0}),!J.length)return;L===0?he=0:k?he=Math.max(0,we):he=J[0].pts}if(S.isAAC)for(var ke=L!==void 0,ne=this.config.maxAudioFramesDrift,Oe=0,Ce=he;Oe<J.length;Oe++){var fe=J[Oe],oe=fe.pts,se=oe-Ce,be=Math.abs(1e3*se/M);if(se<=-ne*K&&ke)Oe===0&&(d.logger.warn("Audio frame @ "+(oe/M).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*se/M)+" ms."),this.nextAudioPts=he=Ce=oe);else if(se>=ne*K&&be<t&&ke){var ie=Math.round(se/K);Ce=oe-ie*K,Ce<0&&(ie--,Ce+=K),Oe===0&&(this.nextAudioPts=he=Ce),d.logger.warn("[mp4-remuxer]: Injecting "+ie+" audio frame @ "+(Ce/M).toFixed(3)+"s due to "+Math.round(1e3*se/M)+" ms gap.");for(var de=0;de<ie;de++){var Fe=Math.max(Ce,0),ae=v.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);ae||(d.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),ae=fe.unit.subarray()),J.splice(Oe,0,{unit:ae,pts:Fe}),Ce+=K,Oe++}}fe.pts=Ce,Ce+=K}for(var Z=null,Y=null,q,ve=0,pe=J.length;pe--;)ve+=J[pe].unit.byteLength;for(var Te=0,Ne=J.length;Te<Ne;Te++){var me=J[Te],Ie=me.unit,_e=me.pts;if(Y!==null){var Ve=B[Te-1];Ve.duration=Math.round((_e-Y)/W)}else if(R&&S.isAAC&&(_e=he),Z=_e,ve>0){ve+=re;try{q=new Uint8Array(ve)}catch(Ke){this.observer.emit(g.Events.ERROR,g.Events.ERROR,{type:p.ErrorTypes.MUX_ERROR,details:p.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ve,reason:"fail allocating audio mdat "+ve});return}if(!P){var tt=new DataView(q.buffer);tt.setUint32(0,ve),q.set(o.default.types.mdat,4)}}else return;q.set(Ie,re);var Ge=Ie.byteLength;re+=Ge,B.push(new E(!0,N,Ge,0)),Y=_e}var Le=B.length;if(!Le)return;var bt=B[B.length-1];this.nextAudioPts=he=Y+W*bt.duration;var Re=P?new Uint8Array(0):o.default.moof(S.sequenceNumber++,Z/W,s({},S,{samples:B}));S.samples=[];var Xe=Z/M,et=he/M,Ye="audio",Me={data1:Re,data2:q,startPTS:Xe,endPTS:et,startDTS:Xe,endDTS:et,type:Ye,hasAudio:!0,hasVideo:!1,nb:Le};return this.isAudioContiguous=!0,console.assert(q.length,"MDAT length must not be zero"),Me},C.remuxEmptyAudio=function(S,A,R,k){var L=S.inputTimeScale,M=S.samplerate?S.samplerate:L,G=L/M,W=this.nextAudioPts,N=(W!==null?W:k.startDTS*L)+this._initDTS,K=k.endDTS*L+this._initDTS,F=G*i,P=Math.ceil((K-N)/F),B=v.default.getSilentFrame(S.manifestCodec||S.codec,S.channelCount);if(d.logger.warn("[mp4-remuxer]: remux empty Audio"),!B){d.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var J=[],re=0;re<P;re++){var he=N+re*F;J.push({unit:B,pts:he,dts:he})}return S.samples=J,this.remuxAudio(S,A,R,!1)},C.remuxID3=function(S,A){var R=S.samples.length;if(!R)return;for(var k=S.inputTimeScale,L=this._initPTS,M=this._initDTS,G=0;G<R;G++){var W=S.samples[G];W.pts=m(W.pts-L,A*k)/k,W.dts=m(W.dts-M,A*k)/k}var N=S.samples;return S.samples=[],{samples:N}},C.remuxText=function(S,A){var R=S.samples.length;if(!R)return;for(var k=S.inputTimeScale,L=this._initPTS,M=0;M<R;M++){var G=S.samples[M];G.pts=m(G.pts-L,A*k)/k}S.samples.sort(function(N,K){return N.pts-K.pts});var W=S.samples;return S.samples=[],{samples:W}},D}();function m(D,C){var w;if(C===null)return D;for(C<D?w=-8589934592:w=8589934592;Math.abs(D-C)>4294967296;)D+=w;return D}function l(D){for(var C=0;C<D.length;C++)if(D[C].key)return C;return-1}var E=function(C,w,S,A){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=w,this.size=S,this.cts=A,this.flags=new b(C)},b=function(C){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=C?2:1,this.isNonSync=C?0:1}},"./src/remux/passthrough-remuxer.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/polyfills/number.ts"),v=O("./src/utils/mp4-tools.ts"),o=O("./src/loader/fragment.ts"),g=O("./src/utils/logger.ts"),p=function(){function n(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndDTS=null}var s=n.prototype;return s.destroy=function(){},s.resetTimeStamp=function(i){this.initPTS=i,this.lastEndDTS=null},s.resetNextTimestamp=function(){this.lastEndDTS=null},s.resetInitSegment=function(i,e,r){this.audioCodec=e,this.videoCodec=r,this.generateInitSegment(i),this.emitInitSegment=!0},s.generateInitSegment=function(i){var e=this.audioCodec,r=this.videoCodec;if(!i||!i.byteLength){this.initTracks=void 0,this.initData=void 0;return}var c=this.initData=Object(v.parseInitSegment)(i);e||(e=a(c.audio,o.ElementaryStreamTypes.AUDIO)),r||(r=a(c.video,o.ElementaryStreamTypes.VIDEO));var u={};c.audio&&c.video?u.audiovideo={container:"video/mp4",codec:e+","+r,initSegment:i,id:"main"}:c.audio?u.audio={container:"audio/mp4",codec:e,initSegment:i,id:"audio"}:c.video?u.video={container:"video/mp4",codec:r,initSegment:i,id:"main"}:g.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=u},s.remux=function(i,e,r,c,u){var f=this.initPTS,m=this.lastEndDTS,l={audio:void 0,video:void 0,text:c,id3:r,initSegment:void 0};Object(y.isFiniteNumber)(m)||(m=this.lastEndDTS=u||0);var E=e.samples;if(!E||!E.length)return l;var b={initPTS:void 0,timescale:1},D=this.initData;if((!D||!D.length)&&(this.generateInitSegment(E),D=this.initData),!D||!D.length)return g.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),l;this.emitInitSegment&&(b.tracks=this.initTracks,this.emitInitSegment=!1),Object(y.isFiniteNumber)(f)||(this.initPTS=b.initPTS=f=d(D,E,m));var C=Object(v.getDuration)(E,D),w=m,S=C+w;Object(v.offsetStartDTS)(D,E,f),C>0?this.lastEndDTS=S:(g.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var A=!!D.audio,R=!!D.video,k="";A&&(k+="audio"),R&&(k+="video");var L={data1:E,startPTS:w,startDTS:w,endPTS:S,endDTS:S,type:k,hasAudio:A,hasVideo:R,nb:1,dropped:0};return l.audio=L.type==="audio"?L:void 0,l.video=L.type!=="audio"?L:void 0,l.text=c,l.id3=r,l.initSegment=b,l},n}(),d=function(s,t,i){return Object(v.getStartDTS)(s,t)-i};function a(n,s){var t=n==null?void 0:n.codec;return t&&t.length>4?t:t==="hvc1"?"hvc1.1.c.L120.90":t==="av01"?"av01.0.04M.08":t==="avc1"||s===o.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}_.default=p},"./src/task-loop.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return y});var y=function(){function v(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var o=v.prototype;return o.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},o.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},o.onHandlerDestroyed=function(){},o.hasInterval=function(){return!!this._tickInterval},o.hasNextTick=function(){return!!this._tickTimer},o.setInterval=function(p){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,p),!0)},o.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},o.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},o.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},o.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},o.doTick=function(){},v}()},"./src/types/cmcd.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"CMCDVersion",function(){return y}),O.d(_,"CMCDObjectType",function(){return v}),O.d(_,"CMCDStreamingFormat",function(){return o}),O.d(_,"CMCDStreamType",function(){return g});var y=1,v;(function(p){p.MANIFEST="m",p.AUDIO="a",p.VIDEO="v",p.MUXED="av",p.INIT="i",p.CAPTION="c",p.TIMED_TEXT="tt",p.KEY="k",p.OTHER="o"})(v||(v={}));var o;(function(p){p.DASH="d",p.HLS="h",p.SMOOTH="s",p.OTHER="o"})(o||(o={}));var g;(function(p){p.VOD="v",p.LIVE="l"})(g||(g={}))},"./src/types/level.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"HlsSkip",function(){return o}),O.d(_,"getSkipValue",function(){return g}),O.d(_,"HlsUrlParameters",function(){return p}),O.d(_,"Level",function(){return d});function y(a,n){for(var s=0;s<n.length;s++){var t=n[s];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(a,t.key,t)}}function v(a,n,s){return n&&y(a.prototype,n),s&&y(a,s),a}var o;(function(a){a.No="",a.Yes="YES",a.v2="v2"})(o||(o={}));function g(a,n){var s=a.canSkipUntil,t=a.canSkipDateRanges,i=a.endSN,e=n!==void 0?n-i:0;return s&&e<s?t?o.v2:o.Yes:o.No}var p=function(){function a(s,t,i){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=s,this.part=t,this.skip=i}var n=a.prototype;return n.addDirectives=function(t){var i=new self.URL(t);return this.msn!==void 0&&i.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&i.searchParams.set("_HLS_part",this.part.toString()),this.skip&&i.searchParams.set("_HLS_skip",this.skip),i.toString()},a}(),d=function(){function a(n){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[n.url],this.attrs=n.attrs,this.bitrate=n.bitrate,n.details&&(this.details=n.details),this.id=n.id||0,this.name=n.name,this.width=n.width||0,this.height=n.height||0,this.audioCodec=n.audioCodec,this.videoCodec=n.videoCodec,this.unknownCodecs=n.unknownCodecs,this.codecSet=[n.videoCodec,n.audioCodec].filter(function(s){return s}).join(",").replace(/\.[^.,]+/g,"")}return v(a,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(s){var t=s%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}]),a}()},"./src/types/loader.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"PlaylistContextType",function(){return y}),O.d(_,"PlaylistLevelType",function(){return v});var y;(function(o){o.MANIFEST="manifest",o.LEVEL="level",o.AUDIO_TRACK="audioTrack",o.SUBTITLE_TRACK="subtitleTrack"})(y||(y={}));var v;(function(o){o.MAIN="main",o.AUDIO="audio",o.SUBTITLE="subtitle"})(v||(v={}))},"./src/types/transmuxer.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"ChunkMetadata",function(){return y});var y=function(g,p,d,a,n,s){a===void 0&&(a=0),n===void 0&&(n=-1),s===void 0&&(s=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=v(),this.buffering={audio:v(),video:v(),audiovideo:v()},this.level=g,this.sn=p,this.id=d,this.size=a,this.part=n,this.partial=s};function v(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"AttrList",function(){return o});var y=/^(\d+)x(\d+)$/,v=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,o=function(){function g(d){typeof d=="string"&&(d=g.parseAttrList(d));for(var a in d)d.hasOwnProperty(a)&&(this[a]=d[a])}var p=g.prototype;return p.decimalInteger=function(a){var n=parseInt(this[a],10);return n>Number.MAX_SAFE_INTEGER?Infinity:n},p.hexadecimalInteger=function(a){if(this[a]){var n=(this[a]||"0x").slice(2);n=(n.length&1?"0":"")+n;for(var s=new Uint8Array(n.length/2),t=0;t<n.length/2;t++)s[t]=parseInt(n.slice(t*2,t*2+2),16);return s}else return null},p.hexadecimalIntegerAsNumber=function(a){var n=parseInt(this[a],16);return n>Number.MAX_SAFE_INTEGER?Infinity:n},p.decimalFloatingPoint=function(a){return parseFloat(this[a])},p.optionalFloat=function(a,n){var s=this[a];return s?parseFloat(s):n},p.enumeratedString=function(a){return this[a]},p.bool=function(a){return this[a]==="YES"},p.decimalResolution=function(a){var n=y.exec(this[a]);return n===null?void 0:{width:parseInt(n[1],10),height:parseInt(n[2],10)}},g.parseAttrList=function(a){var n,s={},t='"';for(v.lastIndex=0;(n=v.exec(a))!==null;){var i=n[2];i.indexOf(t)===0&&i.lastIndexOf(t)===i.length-1&&(i=i.slice(1,-1)),s[n[1]]=i}return s},g}()},"./src/utils/binary-search.ts":function(I,_,O){"use strict";O.r(_);var y={search:function(o,g){for(var p=0,d=o.length-1,a=null,n=null;p<=d;){a=(p+d)/2|0,n=o[a];var s=g(n);if(s>0)p=a+1;else if(s<0)d=a-1;else return n}return null}};_.default=y},"./src/utils/buffer-helper.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"BufferHelper",function(){return o});var y=O("./src/utils/logger.ts"),v={length:0,start:function(){return 0},end:function(){return 0}},o=function(){function g(){}return g.isBuffered=function(d,a){try{if(d){for(var n=g.getBuffered(d),s=0;s<n.length;s++)if(a>=n.start(s)&&a<=n.end(s))return!0}}catch(t){}return!1},g.bufferInfo=function(d,a,n){try{if(d){var s=g.getBuffered(d),t=[],i;for(i=0;i<s.length;i++)t.push({start:s.start(i),end:s.end(i)});return this.bufferedInfo(t,a,n)}}catch(e){}return{len:0,start:a,end:a,nextStart:void 0}},g.bufferedInfo=function(d,a,n){a=Math.max(0,a),d.sort(function(b,D){var C=b.start-D.start;return C||D.end-b.end});var s=[];if(n)for(var t=0;t<d.length;t++){var i=s.length;if(i){var e=s[i-1].end;d[t].start-e<n?d[t].end>e&&(s[i-1].end=d[t].end):s.push(d[t])}else s.push(d[t])}else s=d;for(var r=0,c,u=a,f=a,m=0;m<s.length;m++){var l=s[m].start,E=s[m].end;if(a+n>=l&&a<E)u=l,f=E,r=f-a;else if(a+n<l){c=l;break}}return{len:r,start:u||0,end:f||0,nextStart:c}},g.getBuffered=function(d){try{return d.buffered}catch(a){return y.logger.log("failed to get media.buffered",a),v}},g}()},"./src/utils/cea-608-parser.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"Row",function(){return f}),O.d(_,"CaptionScreen",function(){return m});var y=O("./src/utils/logger.ts"),v={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},o=function(S){var A=S;return v.hasOwnProperty(S)&&(A=v[S]),String.fromCharCode(A)},g=15,p=100,d={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},a={17:2,18:4,21:6,22:8,23:10,19:13,20:15},n={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},s={25:2,26:4,29:6,30:8,31:10,27:13,28:15},t=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],i;(function(w){w[w.ERROR=0]="ERROR",w[w.TEXT=1]="TEXT",w[w.WARNING=2]="WARNING",w[w.INFO=2]="INFO",w[w.DEBUG=3]="DEBUG",w[w.DATA=3]="DATA"})(i||(i={}));var e=function(){function w(){this.time=null,this.verboseLevel=i.ERROR}var S=w.prototype;return S.log=function(R,k){this.verboseLevel>=R&&y.logger.log(this.time+" ["+R+"] "+k)},w}(),r=function(S){for(var A=[],R=0;R<S.length;R++)A.push(S[R].toString(16));return A},c=function(){function w(A,R,k,L,M){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=A||"white",this.underline=R||!1,this.italics=k||!1,this.background=L||"black",this.flash=M||!1}var S=w.prototype;return S.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},S.setStyles=function(R){for(var k=["foreground","underline","italics","background","flash"],L=0;L<k.length;L++){var M=k[L];R.hasOwnProperty(M)&&(this[M]=R[M])}},S.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},S.equals=function(R){return this.foreground===R.foreground&&this.underline===R.underline&&this.italics===R.italics&&this.background===R.background&&this.flash===R.flash},S.copy=function(R){this.foreground=R.foreground,this.underline=R.underline,this.italics=R.italics,this.background=R.background,this.flash=R.flash},S.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},w}(),u=function(){function w(A,R,k,L,M,G){this.uchar=void 0,this.penState=void 0,this.uchar=A||" ",this.penState=new c(R,k,L,M,G)}var S=w.prototype;return S.reset=function(){this.uchar=" ",this.penState.reset()},S.setChar=function(R,k){this.uchar=R,this.penState.copy(k)},S.setPenState=function(R){this.penState.copy(R)},S.equals=function(R){return this.uchar===R.uchar&&this.penState.equals(R.penState)},S.copy=function(R){this.uchar=R.uchar,this.penState.copy(R.penState)},S.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},w}(),f=function(){function w(A){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var R=0;R<p;R++)this.chars.push(new u);this.logger=A,this.pos=0,this.currPenState=new c}var S=w.prototype;return S.equals=function(R){for(var k=!0,L=0;L<p;L++)if(!this.chars[L].equals(R.chars[L])){k=!1;break}return k},S.copy=function(R){for(var k=0;k<p;k++)this.chars[k].copy(R.chars[k])},S.isEmpty=function(){for(var R=!0,k=0;k<p;k++)if(!this.chars[k].isEmpty()){R=!1;break}return R},S.setCursor=function(R){this.pos!==R&&(this.pos=R),this.pos<0?(this.logger.log(i.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>p&&(this.logger.log(i.DEBUG,"Too large cursor position "+this.pos),this.pos=p)},S.moveCursor=function(R){var k=this.pos+R;if(R>1)for(var L=this.pos+1;L<k+1;L++)this.chars[L].setPenState(this.currPenState);this.setCursor(k)},S.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},S.insertChar=function(R){R>=144&&this.backSpace();var k=o(R);if(this.pos>=p){this.logger.log(i.ERROR,"Cannot insert "+R.toString(16)+" ("+k+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(k,this.currPenState),this.moveCursor(1)},S.clearFromPos=function(R){var k;for(k=R;k<p;k++)this.chars[k].reset()},S.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},S.clearToEndOfRow=function(){this.clearFromPos(this.pos)},S.getTextString=function(){for(var R=[],k=!0,L=0;L<p;L++){var M=this.chars[L].uchar;M!==" "&&(k=!1),R.push(M)}return k?"":R.join("")},S.setPenStyles=function(R){this.currPenState.setStyles(R);var k=this.chars[this.pos];k.setPenState(this.currPenState)},w}(),m=function(){function w(A){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var R=0;R<g;R++)this.rows.push(new f(A));this.logger=A,this.currRow=g-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var S=w.prototype;return S.reset=function(){for(var R=0;R<g;R++)this.rows[R].clear();this.currRow=g-1},S.equals=function(R){for(var k=!0,L=0;L<g;L++)if(!this.rows[L].equals(R.rows[L])){k=!1;break}return k},S.copy=function(R){for(var k=0;k<g;k++)this.rows[k].copy(R.rows[k])},S.isEmpty=function(){for(var R=!0,k=0;k<g;k++)if(!this.rows[k].isEmpty()){R=!1;break}return R},S.backSpace=function(){var R=this.rows[this.currRow];R.backSpace()},S.clearToEndOfRow=function(){var R=this.rows[this.currRow];R.clearToEndOfRow()},S.insertChar=function(R){var k=this.rows[this.currRow];k.insertChar(R)},S.setPen=function(R){var k=this.rows[this.currRow];k.setPenStyles(R)},S.moveCursor=function(R){var k=this.rows[this.currRow];k.moveCursor(R)},S.setCursor=function(R){this.logger.log(i.INFO,"setCursor: "+R);var k=this.rows[this.currRow];k.setCursor(R)},S.setPAC=function(R){this.logger.log(i.INFO,"pacData = "+JSON.stringify(R));var k=R.row-1;if(this.nrRollUpRows&&k<this.nrRollUpRows-1&&(k=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==k){for(var L=0;L<g;L++)this.rows[L].clear();var M=this.currRow+1-this.nrRollUpRows,G=this.lastOutputScreen;if(G){var W=G.rows[M].cueStartTime,N=this.logger.time;if(W&&N!==null&&W<N)for(var K=0;K<this.nrRollUpRows;K++)this.rows[k-this.nrRollUpRows+K+1].copy(G.rows[M+K])}}this.currRow=k;var F=this.rows[this.currRow];if(R.indent!==null){var P=R.indent,B=Math.max(P-1,0);F.setCursor(R.indent),R.color=F.chars[B].penState.foreground}var J={foreground:R.color,underline:R.underline,italics:R.italics,background:"black",flash:!1};this.setPen(J)},S.setBkgData=function(R){this.logger.log(i.INFO,"bkgData = "+JSON.stringify(R)),this.backSpace(),this.setPen(R),this.insertChar(32)},S.setRollUpRows=function(R){this.nrRollUpRows=R},S.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(i.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(i.TEXT,this.getDisplayText());var R=this.currRow+1-this.nrRollUpRows,k=this.rows.splice(R,1)[0];k.clear(),this.rows.splice(this.currRow,0,k),this.logger.log(i.INFO,"Rolling up")},S.getDisplayText=function(R){R=R||!1;for(var k=[],L="",M=-1,G=0;G<g;G++){var W=this.rows[G].getTextString();W&&(M=G+1,R?k.push("Row "+M+": '"+W+"'"):k.push(W.trim()))}return k.length>0&&(R?L="["+k.join(" | ")+"]":L=k.join(`
|
|
|
`)),L},S.getTextAndFormat=function(){return this.rows},w}(),l=function(){function w(A,R,k){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=A,this.outputFilter=R,this.mode=null,this.verbose=0,this.displayedMemory=new m(k),this.nonDisplayedMemory=new m(k),this.lastOutputScreen=new m(k),this.currRollUpRow=this.displayedMemory.rows[g-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=k}var S=w.prototype;return S.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[g-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},S.getHandler=function(){return this.outputFilter},S.setHandler=function(R){this.outputFilter=R},S.setPAC=function(R){this.writeScreen.setPAC(R)},S.setBkgData=function(R){this.writeScreen.setBkgData(R)},S.setMode=function(R){if(R===this.mode)return;this.mode=R,this.logger.log(i.INFO,"MODE="+R),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=R},S.insertChars=function(R){for(var k=0;k<R.length;k++)this.writeScreen.insertChar(R[k]);var L=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(i.INFO,L+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(i.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},S.ccRCL=function(){this.logger.log(i.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},S.ccBS=function(){if(this.logger.log(i.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},S.ccAOF=function(){},S.ccAON=function(){},S.ccDER=function(){this.logger.log(i.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},S.ccRU=function(R){this.logger.log(i.INFO,"RU("+R+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(R)},S.ccFON=function(){this.logger.log(i.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},S.ccRDC=function(){this.logger.log(i.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},S.ccTR=function(){this.logger.log(i.INFO,"TR"),this.setMode("MODE_TEXT")},S.ccRTD=function(){this.logger.log(i.INFO,"RTD"),this.setMode("MODE_TEXT")},S.ccEDM=function(){this.logger.log(i.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},S.ccCR=function(){this.logger.log(i.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},S.ccENM=function(){this.logger.log(i.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},S.ccEOC=function(){if(this.logger.log(i.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var R=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=R,this.writeScreen=this.nonDisplayedMemory,this.logger.log(i.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},S.ccTO=function(R){this.logger.log(i.INFO,"TO("+R+") - Tab Offset"),this.writeScreen.moveCursor(R)},S.ccMIDROW=function(R){var k={flash:!1};if(k.underline=R%2===1,k.italics=R>=46,k.italics)k.foreground="white";else{var L=Math.floor(R/2)-16,M=["white","green","blue","cyan","red","yellow","magenta"];k.foreground=M[L]}this.logger.log(i.INFO,"MIDROW: "+JSON.stringify(k)),this.writeScreen.setPen(k)},S.outputDataUpdate=function(R){R===void 0&&(R=!1);var k=this.logger.time;if(k===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=k:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,k,this.lastOutputScreen),R&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:k),this.lastOutputScreen.copy(this.displayedMemory))},S.cueSplitAtTime=function(R){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,R,this.displayedMemory),this.cueStartTime=R))},w}(),E=function(){function w(A,R,k){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var L=new e;this.channels=[null,new l(A,R,L),new l(A+1,k,L)],this.cmdHistory=C(),this.logger=L}var S=w.prototype;return S.getHandler=function(R){return this.channels[R].getHandler()},S.setHandler=function(R,k){this.channels[R].setHandler(k)},S.addData=function(R,k){var L,M,G,W=!1;this.logger.time=R;for(var N=0;N<k.length;N+=2){if(M=k[N]&127,G=k[N+1]&127,M===0&&G===0)continue;if(this.logger.log(i.DATA,"["+r([k[N],k[N+1]])+"] -> ("+r([M,G])+")"),L=this.parseCmd(M,G),L||(L=this.parseMidrow(M,G)),L||(L=this.parsePAC(M,G)),L||(L=this.parseBackgroundAttributes(M,G)),!L&&(W=this.parseChars(M,G),W)){var K=this.currentChannel;if(K&&K>0){var F=this.channels[K];F.insertChars(W)}else this.logger.log(i.WARNING,"No channel found yet. TEXT-MODE?")}!L&&!W&&this.logger.log(i.WARNING,"Couldn't parse cleaned data "+r([M,G])+" orig: "+r([k[N],k[N+1]]))}},S.parseCmd=function(R,k){var L=this.cmdHistory,M=(R===20||R===28||R===21||R===29)&&k>=32&&k<=47,G=(R===23||R===31)&&k>=33&&k<=35;if(!(M||G))return!1;if(D(R,k,L))return b(null,null,L),this.logger.log(i.DEBUG,"Repeated command ("+r([R,k])+") is dropped"),!0;var W=R===20||R===21||R===23?1:2,N=this.channels[W];return R===20||R===21||R===28||R===29?k===32?N.ccRCL():k===33?N.ccBS():k===34?N.ccAOF():k===35?N.ccAON():k===36?N.ccDER():k===37?N.ccRU(2):k===38?N.ccRU(3):k===39?N.ccRU(4):k===40?N.ccFON():k===41?N.ccRDC():k===42?N.ccTR():k===43?N.ccRTD():k===44?N.ccEDM():k===45?N.ccCR():k===46?N.ccENM():k===47&&N.ccEOC():N.ccTO(k-32),b(R,k,L),this.currentChannel=W,!0},S.parseMidrow=function(R,k){var L=0;if((R===17||R===25)&&k>=32&&k<=47){if(R===17?L=1:L=2,L!==this.currentChannel)return this.logger.log(i.ERROR,"Mismatch channel in midrow parsing"),!1;var M=this.channels[L];return M?(M.ccMIDROW(k),this.logger.log(i.DEBUG,"MIDROW ("+r([R,k])+")"),!0):!1}return!1},S.parsePAC=function(R,k){var L,M=this.cmdHistory,G=(R>=17&&R<=23||R>=25&&R<=31)&&k>=64&&k<=127,W=(R===16||R===24)&&k>=64&&k<=95;if(!(G||W))return!1;if(D(R,k,M))return b(null,null,M),!0;var N=R<=23?1:2;k>=64&&k<=95?L=N===1?d[R]:n[R]:L=N===1?a[R]:s[R];var K=this.channels[N];return K?(K.setPAC(this.interpretPAC(L,k)),b(R,k,M),this.currentChannel=N,!0):!1},S.interpretPAC=function(R,k){var L,M={color:null,italics:!1,indent:null,underline:!1,row:R};return k>95?L=k-96:L=k-64,M.underline=(L&1)===1,L<=13?M.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(L/2)]:L<=15?(M.italics=!0,M.color="white"):M.indent=Math.floor((L-16)/2)*4,M},S.parseChars=function(R,k){var L,M=null,G=null;if(R>=25?(L=2,G=R-8):(L=1,G=R),G>=17&&G<=19){var W;G===17?W=k+80:G===18?W=k+112:W=k+144,this.logger.log(i.INFO,"Special char '"+o(W)+"' in channel "+L),M=[W]}else R>=32&&R<=127&&(M=k===0?[R]:[R,k]);if(M){var N=r(M);this.logger.log(i.DEBUG,"Char codes = "+N.join(",")),b(R,k,this.cmdHistory)}return M},S.parseBackgroundAttributes=function(R,k){var L=(R===16||R===24)&&k>=32&&k<=47,M=(R===23||R===31)&&k>=45&&k<=47;if(!(L||M))return!1;var G,W={};R===16||R===24?(G=Math.floor((k-32)/2),W.background=t[G],k%2===1&&(W.background=W.background+"_semi")):k===45?W.background="transparent":(W.foreground="black",k===47&&(W.underline=!0));var N=R<=23?1:2,K=this.channels[N];return K.setBkgData(W),b(R,k,this.cmdHistory),!0},S.reset=function(){for(var R=0;R<Object.keys(this.channels).length;R++){var k=this.channels[R];k&&k.reset()}this.cmdHistory=C()},S.cueSplitAtTime=function(R){for(var k=0;k<this.channels.length;k++){var L=this.channels[k];L&&L.cueSplitAtTime(R)}},w}();function b(w,S,A){A.a=w,A.b=S}function D(w,S,A){return A.a===w&&A.b===S}function C(){return{a:null,b:null}}_.default=E},"./src/utils/codecs.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"isCodecType",function(){return v}),O.d(_,"isCodecSupportedInMp4",function(){return o});var y={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function v(g,p){var d=y[p];return!!d&&d[g.slice(0,4)]===!0}function o(g,p){return MediaSource.isTypeSupported((p||"video")+'/mp4;codecs="'+g+'"')}},"./src/utils/cues.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/utils/vttparser.ts"),v=O("./src/utils/webvtt-parser.ts"),o=O("./src/utils/texttrack-utils.ts"),g=/\s/,p={newCue:function(a,n,s,t){for(var i=[],e,r,c,u,f,m=self.VTTCue||self.TextTrackCue,l=0;l<t.rows.length;l++)if(e=t.rows[l],c=!0,u=0,f="",!e.isEmpty()){for(var E=0;E<e.chars.length;E++)g.test(e.chars[E].uchar)&&c?u++:(f+=e.chars[E].uchar,c=!1);e.cueStartTime=n,n===s&&(s+=1e-4),u>=16?u--:u++;var b=Object(y.fixLineBreaks)(f.trim()),D=Object(v.generateCueId)(n,s,b);(!a||!a.cues||!a.cues.getCueById(D))&&(r=new m(n,s,b),r.id=D,r.line=l+1,r.align="left",r.position=10+Math.min(80,Math.floor(u*8/32)*10),i.push(r))}return a&&i.length&&(i.sort(function(C,w){return C.line==="auto"||w.line==="auto"?0:C.line>8&&w.line>8?w.line-C.line:C.line-w.line}),i.forEach(function(C){return Object(o.addCueToTrack)(a,C)})),i}};_.default=p},"./src/utils/discontinuities.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"findFirstFragWithCC",function(){return g}),O.d(_,"shouldAlignOnDiscontinuities",function(){return p}),O.d(_,"findDiscontinuousReferenceFrag",function(){return d}),O.d(_,"adjustSlidingStart",function(){return n}),O.d(_,"alignStream",function(){return s}),O.d(_,"alignPDT",function(){return i}),O.d(_,"alignFragmentByPDTDelta",function(){return e}),O.d(_,"alignMediaPlaylistByPDT",function(){return r});var y=O("./src/polyfills/number.ts"),v=O("./src/utils/logger.ts"),o=O("./src/controller/level-helper.ts");function g(c,u){for(var f=null,m=0,l=c.length;m<l;m++){var E=c[m];if(E&&E.cc===u){f=E;break}}return f}function p(c,u,f){return!!(u.details&&(f.endCC>f.startCC||c&&c.cc<f.startCC))}function d(c,u){var f=c.fragments,m=u.fragments;if(!m.length||!f.length){v.logger.log("No fragments to align");return}var l=g(f,m[0].cc);if(!l||l&&!l.startPTS){v.logger.log("No frag in previous level to align on");return}return l}function a(c,u){if(c){var f=c.start+u;c.start=c.startPTS=f,c.endPTS=f+c.duration}}function n(c,u){for(var f=u.fragments,m=0,l=f.length;m<l;m++)a(f[m],c);u.fragmentHint&&a(u.fragmentHint,c),u.alignedSliding=!0}function s(c,u,f){if(!u)return;t(c,f,u),!f.alignedSliding&&u.details&&i(f,u.details),!f.alignedSliding&&u.details&&!f.skippedSegments&&Object(o.adjustSliding)(u.details,f)}function t(c,u,f){if(p(c,f,u)){var m=d(f.details,u);m&&Object(y.isFiniteNumber)(m.start)&&(v.logger.log("Adjusting PTS using last level due to CC increase within current level "+u.url),n(m.start,u))}}function i(c,u){if(!u.fragments.length||!c.hasProgramDateTime||!u.hasProgramDateTime)return;var f=u.fragments[0].programDateTime,m=c.fragments[0].programDateTime,l=(m-f)/1e3+u.fragments[0].start;l&&Object(y.isFiniteNumber)(l)&&(v.logger.log("Adjusting PTS using programDateTime delta "+(m-f)+"ms, sliding:"+l.toFixed(3)+" "+c.url+" "),n(l,c))}function e(c,u){var f=c.programDateTime;if(!f)return;var m=(f-u)/1e3;c.start=c.startPTS=m,c.endPTS=m+c.duration}function r(c,u){if(!u.fragments.length||!c.hasProgramDateTime||!u.hasProgramDateTime)return;var f=u.fragments[0].programDateTime,m=u.fragments[0].start,l=f-m*1e3;c.fragments.forEach(function(E){e(E,l)}),c.fragmentHint&&e(c.fragmentHint,l),c.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/utils/ewma.ts"),v=function(){function o(p,d,a){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=a,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new y.default(p),this.fast_=new y.default(d)}var g=o.prototype;return g.update=function(d,a){var n=this.slow_,s=this.fast_;this.slow_.halfLife!==d&&(this.slow_=new y.default(d,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==a&&(this.fast_=new y.default(a,s.getEstimate(),s.getTotalWeight()))},g.sample=function(d,a){d=Math.max(d,this.minDelayMs_);var n=8*a,s=d/1e3,t=n/s;this.fast_.sample(s,t),this.slow_.sample(s,t)},g.canEstimate=function(){var d=this.fast_;return d&&d.getTotalWeight()>=this.minWeight_},g.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},g.destroy=function(){},o}();_.default=v},"./src/utils/ewma.ts":function(I,_,O){"use strict";O.r(_);var y=function(){function v(g,p,d){p===void 0&&(p=0),d===void 0&&(d=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=g,this.alpha_=g?Math.exp(Math.log(.5)/g):0,this.estimate_=p,this.totalWeight_=d}var o=v.prototype;return o.sample=function(p,d){var a=Math.pow(this.alpha_,p);this.estimate_=d*(1-a)+a*this.estimate_,this.totalWeight_+=p},o.getTotalWeight=function(){return this.totalWeight_},o.getEstimate=function(){if(this.alpha_){var p=1-Math.pow(this.alpha_,this.totalWeight_);if(p)return this.estimate_/p}return this.estimate_},v}();_.default=y},"./src/utils/fetch-loader.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"fetchSupported",function(){return e});var y=O("./src/polyfills/number.ts"),v=O("./src/loader/load-stats.ts"),o=O("./src/demux/chunk-cache.ts");function g(m,l){m.prototype=Object.create(l.prototype),m.prototype.constructor=m,s(m,l)}function p(m){var l=typeof Map=="function"?new Map:void 0;return p=function(b){if(b===null||!n(b))return b;if(typeof b!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l!="undefined"){if(l.has(b))return l.get(b);l.set(b,D)}function D(){return d(b,arguments,t(this).constructor)}return D.prototype=Object.create(b.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),s(D,b)},p(m)}function d(m,l,E){return a()?d=Reflect.construct:d=function(D,C,w){var S=[null];S.push.apply(S,C);var A=Function.bind.apply(D,S),R=new A;return w&&s(R,w.prototype),R},d.apply(null,arguments)}function a(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(m){return!1}}function n(m){return Function.toString.call(m).indexOf("[native code]")!==-1}function s(m,l){return s=Object.setPrototypeOf||function(b,D){return b.__proto__=D,b},s(m,l)}function t(m){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(E){return E.__proto__||Object.getPrototypeOf(E)},t(m)}function i(){return i=Object.assign||function(m){for(var l=1;l<arguments.length;l++){var E=arguments[l];for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(m[b]=E[b])}return m},i.apply(this,arguments)}function e(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(m){}return!1}var r=function(){function m(E){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=E.fetchSetup||u,this.controller=new self.AbortController,this.stats=new v.LoadStats}var l=m.prototype;return l.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},l.abortInternal=function(){var b=this.response;(!b||!b.ok)&&(this.stats.aborted=!0,this.controller.abort())},l.abort=function(){var b;this.abortInternal(),(b=this.callbacks)!==null&&b!==void 0&&b.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},l.load=function(b,D,C){var w=this,S=this.stats;if(S.loading.start)throw new Error("Loader can only be used once.");S.loading.start=self.performance.now();var A=c(b,this.controller.signal),R=C.onProgress,k=b.responseType==="arraybuffer",L=k?"byteLength":"length";this.context=b,this.config=D,this.callbacks=C,this.request=this.fetchSetup(b,A),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){w.abortInternal(),C.onTimeout(S,b,w.response)},D.timeout),self.fetch(this.request).then(function(M){if(w.response=w.loader=M,!M.ok){var G=M.status,W=M.statusText;throw new f(W||"fetch, bad network response",G,M)}return S.loading.first=Math.max(self.performance.now(),S.loading.start),S.total=parseInt(M.headers.get("Content-Length")||"0"),R&&Object(y.isFiniteNumber)(D.highWaterMark)?w.loadProgressively(M,S,b,D.highWaterMark,R):k?M.arrayBuffer():M.text()}).then(function(M){var G=w.response;self.clearTimeout(w.requestTimeout),S.loading.end=Math.max(self.performance.now(),S.loading.first),S.loaded=S.total=M[L];var W={url:G.url,data:M};R&&!Object(y.isFiniteNumber)(D.highWaterMark)&&R(S,b,M,G),C.onSuccess(W,S,b,G)}).catch(function(M){if(self.clearTimeout(w.requestTimeout),S.aborted)return;var G=M.code||0;C.onError({code:G,text:M.message},b,M.details)})},l.getCacheAge=function(){var b=null;if(this.response){var D=this.response.headers.get("age");b=D?parseFloat(D):null}return b},l.loadProgressively=function(b,D,C,w,S){w===void 0&&(w=0);var A=new o.default,R=b.body.getReader(),k=function L(){return R.read().then(function(M){if(M.done)return A.dataLength&&S(D,C,A.flush(),b),Promise.resolve(new ArrayBuffer(0));var G=M.value,W=G.length;return D.loaded+=W,W<w||A.dataLength?(A.push(G),A.dataLength>=w&&S(D,C,A.flush(),b)):S(D,C,G,b),L()}).catch(function(){return Promise.reject()})};return k()},m}();function c(m,l){var E={method:"GET",mode:"cors",credentials:"same-origin",signal:l,headers:new self.Headers(i({},m.headers))};return m.rangeEnd&&E.headers.set("Range","bytes="+m.rangeStart+"-"+String(m.rangeEnd-1)),E}function u(m,l){return new self.Request(m.url,l)}var f=function(m){g(l,m);function l(E,b,D){var C;return C=m.call(this,E)||this,C.code=void 0,C.details=void 0,C.code=b,C.details=D,C}return l}(p(Error));_.default=r},"./src/utils/imsc1-ttml-parser.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"IMSC1_CODEC",function(){return n}),O.d(_,"parseIMSC1",function(){return e});var y=O("./src/utils/mp4-tools.ts"),v=O("./src/utils/vttparser.ts"),o=O("./src/utils/vttcue.ts"),g=O("./src/demux/id3.ts"),p=O("./src/utils/timescale-conversion.ts"),d=O("./src/utils/webvtt-parser.ts");function a(){return a=Object.assign||function(w){for(var S=1;S<arguments.length;S++){var A=arguments[S];for(var R in A)Object.prototype.hasOwnProperty.call(A,R)&&(w[R]=A[R])}return w},a.apply(this,arguments)}var n="stpp.ttml.im1t",s=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,t=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,i={left:"start",center:"center",right:"end",start:"start",end:"end"};function e(w,S,A,R,k){var L=Object(y.findBox)(new Uint8Array(w),["mdat"]);if(L.length===0){k(new Error("Could not parse IMSC1 mdat"));return}var M=L[0],G=Object(g.utf8ArrayToStr)(new Uint8Array(w,M.start,M.end-M.start)),W=Object(p.toTimescaleFromScale)(S,1,A);try{R(r(G,W))}catch(N){k(N)}}function r(w,S){var A=new DOMParser,R=A.parseFromString(w,"text/xml"),k=R.getElementsByTagName("tt")[0];if(!k)throw new Error("Invalid ttml");var L={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},M=Object.keys(L).reduce(function(F,P){return F[P]=k.getAttribute("ttp:"+P)||L[P],F},{}),G=k.getAttribute("xml:space")!=="preserve",W=u(c(k,"styling","style")),N=u(c(k,"layout","region")),K=c(k,"body","[begin]");return[].map.call(K,function(F){var P=f(F,G);if(!P||!F.hasAttribute("begin"))return null;var B=b(F.getAttribute("begin"),M),J=b(F.getAttribute("dur"),M),re=b(F.getAttribute("end"),M);if(B===null)throw E(F);if(re===null){if(J===null)throw E(F);re=B+J}var he=new o.default(B-S,re-S,P);he.id=Object(d.generateCueId)(he.startTime,he.endTime,he.text);var we=N[F.getAttribute("region")],ke=W[F.getAttribute("style")];he.position=10,he.size=80;var ne=m(we,ke),Oe=ne.textAlign;if(Oe){var Ce=i[Oe];Ce&&(he.lineAlign=Ce),he.align=Oe}return a(he,ne),he}).filter(function(F){return F!==null})}function c(w,S,A){var R=w.getElementsByTagName(S)[0];return R?[].slice.call(R.querySelectorAll(A)):[]}function u(w){return w.reduce(function(S,A){var R=A.getAttribute("xml:id");return R&&(S[R]=A),S},{})}function f(w,S){return[].slice.call(w.childNodes).reduce(function(A,R,k){var L;return R.nodeName==="br"&&k?A+`
|
|
|
`:(L=R.childNodes)!==null&&L!==void 0&&L.length?f(R,S):S?A+R.textContent.trim().replace(/\s+/g," "):A+R.textContent},"")}function m(w,S){var A="http://www.w3.org/ns/ttml#styling",R=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return R.reduce(function(k,L){var M=l(S,A,L)||l(w,A,L);return M&&(k[L]=M),k},{})}function l(w,S,A){return w.hasAttributeNS(S,A)?w.getAttributeNS(S,A):null}function E(w){return new Error("Could not parse ttml timestamp "+w)}function b(w,S){if(!w)return null;var A=Object(v.parseTimeStamp)(w);return A===null&&(s.test(w)?A=D(w,S):t.test(w)&&(A=C(w,S))),A}function D(w,S){var A=s.exec(w),R=(A[4]|0)+(A[5]|0)/S.subFrameRate;return(A[1]|0)*3600+(A[2]|0)*60+(A[3]|0)+R/S.frameRate}function C(w,S){var A=t.exec(w),R=Number(A[1]),k=A[2];switch(k){case"h":return R*3600;case"m":return R*60;case"ms":return R*1e3;case"f":return R/S.frameRate;case"t":return R/S.tickRate}return R}},"./src/utils/logger.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"enableLogs",function(){return d}),O.d(_,"logger",function(){return a});var y=function(){},v={trace:y,debug:y,log:y,warn:y,info:y,error:y},o=v;function g(n){var s=self.console[n];return s?s.bind(self.console,"["+n+"] >"):y}function p(n){for(var s=arguments.length,t=new Array(s>1?s-1:0),i=1;i<s;i++)t[i-1]=arguments[i];t.forEach(function(e){o[e]=n[e]?n[e].bind(n):g(e)})}function d(n){if(self.console&&n===!0||typeof n=="object"){p(n,"debug","log","info","warn","error");try{o.log()}catch(s){o=v}}else o=v}var a=o},"./src/utils/mediakeys-helper.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"KeySystems",function(){return y}),O.d(_,"requestMediaKeySystemAccess",function(){return v});var y;(function(o){o.WIDEVINE="com.widevine.alpha",o.PLAYREADY="com.microsoft.playready"})(y||(y={}));var v=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"getMediaSource",function(){return y});function y(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"bin2str",function(){return p}),O.d(_,"readUint16",function(){return d}),O.d(_,"readUint32",function(){return a}),O.d(_,"writeUint32",function(){return n}),O.d(_,"findBox",function(){return s}),O.d(_,"parseSegmentIndex",function(){return t}),O.d(_,"parseInitSegment",function(){return i}),O.d(_,"getStartDTS",function(){return e}),O.d(_,"getDuration",function(){return r}),O.d(_,"computeRawDurationFromSamples",function(){return c}),O.d(_,"offsetStartDTS",function(){return u}),O.d(_,"segmentValidRange",function(){return f}),O.d(_,"appendUint8Array",function(){return m});var y=O("./src/utils/typed-array.ts"),v=O("./src/loader/fragment.ts"),o=Math.pow(2,32)-1,g=[].push;function p(l){return String.fromCharCode.apply(null,l)}function d(l,E){"data"in l&&(E+=l.start,l=l.data);var b=l[E]<<8|l[E+1];return b<0?65536+b:b}function a(l,E){"data"in l&&(E+=l.start,l=l.data);var b=l[E]<<24|l[E+1]<<16|l[E+2]<<8|l[E+3];return b<0?4294967296+b:b}function n(l,E,b){"data"in l&&(E+=l.start,l=l.data),l[E]=b>>24,l[E+1]=b>>16&255,l[E+2]=b>>8&255,l[E+3]=b&255}function s(l,E){var b=[];if(!E.length)return b;var D,C,w;"data"in l?(D=l.data,C=l.start,w=l.end):(D=l,C=0,w=D.byteLength);for(var S=C;S<w;){var A=a(D,S),R=p(D.subarray(S+4,S+8)),k=A>1?S+A:w;if(R===E[0])if(E.length===1)b.push({data:D,start:S+8,end:k});else{var L=s({data:D,start:S+8,end:k},E.slice(1));L.length&&g.apply(b,L)}S=k}return b}function t(l){var E=s(l,["moov"]),b=E[0],D=b?b.end:null,C=s(l,["sidx"]);if(!C||!C[0])return null;var w=[],S=C[0],A=S.data[0],R=A===0?8:16,k=a(S,R);R+=4;var L=0,M=0;A===0?R+=8:R+=16,R+=2;var G=S.end+M,W=d(S,R);R+=2;for(var N=0;N<W;N++){var K=R,F=a(S,K);K+=4;var P=F&2147483647,B=(F&2147483648)>>>31;if(B===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var J=a(S,K);K+=4,w.push({referenceSize:P,subsegmentDuration:J,info:{duration:J/k,start:G,end:G+P-1}}),G+=P,K+=4,R=K}return{earliestPresentationTime:L,timescale:k,version:A,referencesCount:W,references:w,moovEndOffset:D}}function i(l){for(var E=[],b=s(l,["moov","trak"]),D=0;D<b.length;D++){var C=b[D],w=s(C,["tkhd"])[0];if(w){var S=w.data[w.start],A=S===0?12:20,R=a(w,A),k=s(C,["mdia","mdhd"])[0];if(k){S=k.data[k.start],A=S===0?12:20;var L=a(k,A),M=s(C,["mdia","hdlr"])[0];if(M){var G=p(M.data.subarray(M.start+8,M.start+12)),W={soun:v.ElementaryStreamTypes.AUDIO,vide:v.ElementaryStreamTypes.VIDEO}[G];if(W){var N=s(C,["mdia","minf","stbl","stsd"])[0],K=void 0;N&&(K=p(N.data.subarray(N.start+12,N.start+16))),E[R]={timescale:L,type:W},E[W]={timescale:L,id:R,codec:K}}}}}}var F=s(l,["moov","mvex","trex"]);return F.forEach(function(P){var B=a(P,4),J=E[B];J&&(J.default={duration:a(P,12),flags:a(P,20)})}),E}function e(l,E){return s(E,["moof","traf"]).reduce(function(b,D){var C=s(D,["tfdt"])[0],w=C.data[C.start],S=s(D,["tfhd"]).reduce(function(A,R){var k=a(R,4),L=l[k];if(L){var M=a(C,4);w===1&&(M*=Math.pow(2,32),M+=a(C,8));var G=L.timescale||9e4,W=M/G;if(isFinite(W)&&(A===null||W<A))return W}return A},null);return S!==null&&isFinite(S)&&(b===null||S<b)?S:b},null)||0}function r(l,E){for(var b=0,D=0,C=0,w=s(l,["moof","traf"]),S=0;S<w.length;S++){var A=w[S],R=s(A,["tfhd"])[0],k=a(R,4),L=E[k];if(!L)continue;var M=L.default,G=a(R,0)|(M==null?void 0:M.flags),W=M==null?void 0:M.duration;G&8&&(G&2?W=a(R,12):W=a(R,8));for(var N=L.timescale||9e4,K=s(A,["trun"]),F=0;F<K.length;F++){if(W){var P=a(K[F],4);b=W*P}else b=c(K[F]);L.type===v.ElementaryStreamTypes.VIDEO?D+=b/N:L.type===v.ElementaryStreamTypes.AUDIO&&(C+=b/N)}}if(D===0&&C===0){var B=t(l);if(B!=null&&B.references)return B.references.reduce(function(J,re){return J+re.info.duration||0},0)}return D||C}function c(l){var E=a(l,0),b=8;E&1&&(b+=4),E&4&&(b+=4);for(var D=0,C=a(l,4),w=0;w<C;w++){if(E&256){var S=a(l,b);D+=S,b+=4}E&512&&(b+=4),E&1024&&(b+=4),E&2048&&(b+=4)}return D}function u(l,E,b){s(E,["moof","traf"]).forEach(function(D){s(D,["tfhd"]).forEach(function(C){var w=a(C,4),S=l[w];if(!S)return;var A=S.timescale||9e4;s(D,["tfdt"]).forEach(function(R){var k=R.data[R.start],L=a(R,4);if(k===0)n(R,4,L-b*A);else{L*=Math.pow(2,32),L+=a(R,8),L-=b*A,L=Math.max(L,0);var M=Math.floor(L/(o+1)),G=Math.floor(L%(o+1));n(R,4,M),n(R,8,G)}})})})}function f(l){var E={valid:null,remainder:null},b=s(l,["moof"]);if(b){if(b.length<2)return E.remainder=l,E}else return E;var D=b[b.length-1];return E.valid=Object(y.sliceUint8)(l,0,D.start-8),E.remainder=Object(y.sliceUint8)(l,D.start-8),E}function m(l,E){var b=new Uint8Array(l.length+E.length);return b.set(l),b.set(E,l.length),b}},"./src/utils/output-filter.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"default",function(){return y});var y=function(){function v(g,p){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=g,this.trackName=p}var o=v.prototype;return o.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},o.newCue=function(p,d,a){(this.startTime===null||this.startTime>p)&&(this.startTime=p),this.endTime=d,this.screen=a,this.timelineController.createCaptionsTrack(this.trackName)},o.reset=function(){this.cueRanges=[]},v}()},"./src/utils/texttrack-utils.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"sendAddTrackEvent",function(){return v}),O.d(_,"addCueToTrack",function(){return o}),O.d(_,"clearCurrentCues",function(){return g}),O.d(_,"removeCuesInRange",function(){return p}),O.d(_,"getCuesInRange",function(){return a});var y=O("./src/utils/logger.ts");function v(n,s){var t;try{t=new Event("addtrack")}catch(i){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=n,s.dispatchEvent(t)}function o(n,s){var t=n.mode;if(t==="disabled"&&(n.mode="hidden"),n.cues&&!n.cues.getCueById(s.id))try{if(n.addCue(s),!n.cues.getCueById(s.id))throw new Error("addCue is failed for: "+s)}catch(e){y.logger.debug("[texttrack-utils]: "+e);var i=new self.TextTrackCue(s.startTime,s.endTime,s.text);i.id=s.id,n.addCue(i)}t==="disabled"&&(n.mode=t)}function g(n){var s=n.mode;if(s==="disabled"&&(n.mode="hidden"),n.cues)for(var t=n.cues.length;t--;)n.removeCue(n.cues[t]);s==="disabled"&&(n.mode=s)}function p(n,s,t){var i=n.mode;if(i==="disabled"&&(n.mode="hidden"),n.cues&&n.cues.length>0)for(var e=a(n.cues,s,t),r=0;r<e.length;r++)n.removeCue(e[r]);i==="disabled"&&(n.mode=i)}function d(n,s){if(s<n[0].startTime)return 0;var t=n.length-1;if(s>n[t].endTime)return-1;for(var i=0,e=t;i<=e;){var r=Math.floor((e+i)/2);if(s<n[r].startTime)e=r-1;else if(s>n[r].startTime&&i<t)i=r+1;else return r}return n[i].startTime-s<s-n[e].startTime?i:e}function a(n,s,t){var i=[],e=d(n,s);if(e>-1)for(var r=e,c=n.length;r<c;r++){var u=n[r];if(u.startTime>=s&&u.endTime<=t)i.push(u);else if(u.startTime>t)return i}return i}},"./src/utils/time-ranges.ts":function(I,_,O){"use strict";O.r(_);var y={toString:function(o){for(var g="",p=o.length,d=0;d<p;d++)g+="["+o.start(d).toFixed(3)+","+o.end(d).toFixed(3)+"]";return g}};_.default=y},"./src/utils/timescale-conversion.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"toTimescaleFromBase",function(){return v}),O.d(_,"toTimescaleFromScale",function(){return o}),O.d(_,"toMsFromMpegTsClock",function(){return g}),O.d(_,"toMpegTsClockFromTimescale",function(){return p});var y=9e4;function v(d,a,n,s){n===void 0&&(n=1),s===void 0&&(s=!1);var t=d*a*n;return s?Math.round(t):t}function o(d,a,n,s){return n===void 0&&(n=1),s===void 0&&(s=!1),v(d,a,1/n,s)}function g(d,a){return a===void 0&&(a=!1),v(d,1e3,1/y,a)}function p(d,a){return a===void 0&&(a=1),v(d,y,1/a)}},"./src/utils/typed-array.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"sliceUint8",function(){return y});function y(v,o,g){return Uint8Array.prototype.slice?v.slice(o,g):new Uint8Array(Array.prototype.slice.call(v,o,g))}},"./src/utils/vttcue.ts":function(I,_,O){"use strict";O.r(_),_.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var y=["","lr","rl"],v=["start","middle","end","left","right"];function o(n,s){if(typeof s!="string")return!1;if(!Array.isArray(n))return!1;var t=s.toLowerCase();return~n.indexOf(t)?t:!1}function g(n){return o(y,n)}function p(n){return o(v,n)}function d(n){for(var s=arguments.length,t=new Array(s>1?s-1:0),i=1;i<s;i++)t[i-1]=arguments[i];for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var c in r)n[c]=r[c]}return n}function a(n,s,t){var i=this,e={enumerable:!0};i.hasBeenReset=!1;var r="",c=!1,u=n,f=s,m=t,l=null,E="",b=!0,D="auto",C="start",w=50,S="middle",A=50,R="middle";Object.defineProperty(i,"id",d({},e,{get:function(){return r},set:function(L){r=""+L}})),Object.defineProperty(i,"pauseOnExit",d({},e,{get:function(){return c},set:function(L){c=!!L}})),Object.defineProperty(i,"startTime",d({},e,{get:function(){return u},set:function(L){if(typeof L!="number")throw new TypeError("Start time must be set to a number.");u=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"endTime",d({},e,{get:function(){return f},set:function(L){if(typeof L!="number")throw new TypeError("End time must be set to a number.");f=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"text",d({},e,{get:function(){return m},set:function(L){m=""+L,this.hasBeenReset=!0}})),Object.defineProperty(i,"region",d({},e,{get:function(){return l},set:function(L){l=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"vertical",d({},e,{get:function(){return E},set:function(L){var M=g(L);if(M===!1)throw new SyntaxError("An invalid or illegal string was specified.");E=M,this.hasBeenReset=!0}})),Object.defineProperty(i,"snapToLines",d({},e,{get:function(){return b},set:function(L){b=!!L,this.hasBeenReset=!0}})),Object.defineProperty(i,"line",d({},e,{get:function(){return D},set:function(L){if(typeof L!="number"&&L!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");D=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"lineAlign",d({},e,{get:function(){return C},set:function(L){var M=p(L);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");C=M,this.hasBeenReset=!0}})),Object.defineProperty(i,"position",d({},e,{get:function(){return w},set:function(L){if(L<0||L>100)throw new Error("Position must be between 0 and 100.");w=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"positionAlign",d({},e,{get:function(){return S},set:function(L){var M=p(L);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");S=M,this.hasBeenReset=!0}})),Object.defineProperty(i,"size",d({},e,{get:function(){return A},set:function(L){if(L<0||L>100)throw new Error("Size must be between 0 and 100.");A=L,this.hasBeenReset=!0}})),Object.defineProperty(i,"align",d({},e,{get:function(){return R},set:function(L){var M=p(L);if(!M)throw new SyntaxError("An invalid or illegal string was specified.");R=M,this.hasBeenReset=!0}})),i.displayState=void 0}return a.prototype.getCueAsHTML=function(){var n=self.WebVTT;return n.convertCueToDOMTree(self,this.text)},a}()},"./src/utils/vttparser.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"parseTimeStamp",function(){return o}),O.d(_,"fixLineBreaks",function(){return s}),O.d(_,"VTTParser",function(){return t});var y=O("./src/utils/vttcue.ts"),v=function(){function i(){}var e=i.prototype;return e.decode=function(c,u){if(!c)return"";if(typeof c!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(c))},i}();function o(i){function e(c,u,f,m){return(c|0)*3600+(u|0)*60+(f|0)+parseFloat(m||0)}var r=i.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return r?parseFloat(r[2])>59?e(r[2],r[3],0,r[4]):e(r[1],r[2],r[3],r[4]):null}var g=function(){function i(){this.values=Object.create(null)}var e=i.prototype;return e.set=function(c,u){!this.get(c)&&u!==""&&(this.values[c]=u)},e.get=function(c,u,f){return f?this.has(c)?this.values[c]:u[f]:this.has(c)?this.values[c]:u},e.has=function(c){return c in this.values},e.alt=function(c,u,f){for(var m=0;m<f.length;++m)if(u===f[m]){this.set(c,u);break}},e.integer=function(c,u){/^-?\d+$/.test(u)&&this.set(c,parseInt(u,10))},e.percent=function(c,u){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(u)){var f=parseFloat(u);if(f>=0&&f<=100)return this.set(c,f),!0}return!1},i}();function p(i,e,r,c){var u=c?i.split(c):[i];for(var f in u){if(typeof u[f]!="string")continue;var m=u[f].split(r);if(m.length!==2)continue;var l=m[0],E=m[1];e(l,E)}}var d=new y.default(0,0,""),a=d.align==="middle"?"middle":"center";function n(i,e,r){var c=i;function u(){var l=o(i);if(l===null)throw new Error("Malformed timestamp: "+c);return i=i.replace(/^[^\sa-zA-Z-]+/,""),l}function f(l,E){var b=new g;p(l,function(w,S){var A;switch(w){case"region":for(var R=r.length-1;R>=0;R--)if(r[R].id===S){b.set(w,r[R].region);break}break;case"vertical":b.alt(w,S,["rl","lr"]);break;case"line":A=S.split(","),b.integer(w,A[0]),b.percent(w,A[0])&&b.set("snapToLines",!1),b.alt(w,A[0],["auto"]),A.length===2&&b.alt("lineAlign",A[1],["start",a,"end"]);break;case"position":A=S.split(","),b.percent(w,A[0]),A.length===2&&b.alt("positionAlign",A[1],["start",a,"end","line-left","line-right","auto"]);break;case"size":b.percent(w,S);break;case"align":b.alt(w,S,["start",a,"end","left","right"]);break}},/:/,/\s/),E.region=b.get("region",null),E.vertical=b.get("vertical","");var D=b.get("line","auto");D==="auto"&&d.line===-1&&(D=-1),E.line=D,E.lineAlign=b.get("lineAlign","start"),E.snapToLines=b.get("snapToLines",!0),E.size=b.get("size",100),E.align=b.get("align",a);var C=b.get("position","auto");C==="auto"&&d.position===50&&(C=E.align==="start"||E.align==="left"?0:E.align==="end"||E.align==="right"?100:50),E.position=C}function m(){i=i.replace(/^\s+/,"")}if(m(),e.startTime=u(),m(),i.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+c);i=i.substr(3),m(),e.endTime=u(),m(),f(i,e)}function s(i){return i.replace(/<br(?: \/)?>/gi,`
|
|
|
`)}var t=function(){function i(){this.state="INITIAL",this.buffer="",this.decoder=new v,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var e=i.prototype;return e.parse=function(c){var u=this;c&&(u.buffer+=u.decoder.decode(c,{stream:!0}));function f(){var C=u.buffer,w=0;for(C=s(C);w<C.length&&C[w]!=="\r"&&C[w]!==`
|
|
|
`;)++w;var S=C.substr(0,w);return C[w]==="\r"&&++w,C[w]===`
|
|
|
`&&++w,u.buffer=C.substr(w),S}function m(C){p(C,function(w,S){},/:/)}try{var l="";if(u.state==="INITIAL"){if(!/\r\n|\n/.test(u.buffer))return this;l=f();var E=l.match(/^()?WEBVTT([ \t].*)?$/);if(!E||!E[0])throw new Error("Malformed WebVTT signature.");u.state="HEADER"}for(var b=!1;u.buffer;){if(!/\r\n|\n/.test(u.buffer))return this;b?b=!1:l=f();switch(u.state){case"HEADER":/:/.test(l)?m(l):l||(u.state="ID");continue;case"NOTE":l||(u.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(l)){u.state="NOTE";break}if(!l)continue;if(u.cue=new y.default(0,0,""),u.state="CUE",l.indexOf("-->")===-1){u.cue.id=l;continue}case"CUE":if(!u.cue){u.state="BADCUE";continue}try{n(l,u.cue,u.regionList)}catch(C){u.cue=null,u.state="BADCUE";continue}u.state="CUETEXT";continue;case"CUETEXT":{var D=l.indexOf("-->")!==-1;if(!l||D&&(b=!0)){u.oncue&&u.cue&&u.oncue(u.cue),u.cue=null,u.state="ID";continue}if(u.cue===null)continue;u.cue.text&&(u.cue.text+=`
|
|
|
`),u.cue.text+=l}continue;case"BADCUE":l||(u.state="ID")}}}catch(C){u.state==="CUETEXT"&&u.cue&&u.oncue&&u.oncue(u.cue),u.cue=null,u.state=u.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},e.flush=function(){var c=this;try{if((c.cue||c.state==="HEADER")&&(c.buffer+=`
|
|
|
|
|
|
`,c.parse()),c.state==="INITIAL"||c.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(u){c.onparsingerror&&c.onparsingerror(u)}return c.onflush&&c.onflush(),this},i}()},"./src/utils/webvtt-parser.ts":function(I,_,O){"use strict";O.r(_),O.d(_,"generateCueId",function(){return t}),O.d(_,"parseWebVTT",function(){return e});var y=O("./src/polyfills/number.ts"),v=O("./src/utils/vttparser.ts"),o=O("./src/demux/id3.ts"),g=O("./src/utils/timescale-conversion.ts"),p=O("./src/remux/mp4-remuxer.ts"),d=/\r\n|\n\r|\n|\r/g,a=function(c,u,f){return f===void 0&&(f=0),c.substr(f,u.length)===u},n=function(c){var u=parseInt(c.substr(-3)),f=parseInt(c.substr(-6,2)),m=parseInt(c.substr(-9,2)),l=c.length>9?parseInt(c.substr(0,c.indexOf(":"))):0;if(!Object(y.isFiniteNumber)(u)||!Object(y.isFiniteNumber)(f)||!Object(y.isFiniteNumber)(m)||!Object(y.isFiniteNumber)(l))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+c);return u+=1e3*f,u+=60*1e3*m,u+=60*60*1e3*l,u},s=function(c){for(var u=5381,f=c.length;f;)u=u*33^c.charCodeAt(--f);return(u>>>0).toString()};function t(r,c,u){return s(r.toString())+s(c.toString())+s(u)}var i=function(c,u,f){var m=c[u],l=c[m.prevCC];if(!l||!l.new&&m.new){c.ccOffset=c.presentationOffset=m.start,m.new=!1;return}for(;(E=l)!==null&&E!==void 0&&E.new;){var E;c.ccOffset+=m.start-l.start,m.new=!1,m=l,l=c[m.prevCC]}c.presentationOffset=f};function e(r,c,u,f,m,l,E,b){var D=new v.VTTParser,C=Object(o.utf8ArrayToStr)(new Uint8Array(r)).trim().replace(d,`
|
|
|
`).split(`
|
|
|
`),w=[],S=Object(g.toMpegTsClockFromTimescale)(c,u),A="00:00.000",R=0,k=0,L,M=!0,G=!1;D.oncue=function(W){var N=f[m],K=f.ccOffset,F=(R-S)/9e4;if(N!=null&&N.new&&(k!==void 0?K=f.ccOffset=N.start:i(f,m,F)),F&&(K=F-f.presentationOffset),G){var P=W.endTime-W.startTime,B=Object(p.normalizePts)((W.startTime+K-k)*9e4,l*9e4)/9e4;W.startTime=B,W.endTime=B+P}var J=W.text.trim();W.text=decodeURIComponent(encodeURIComponent(J)),W.id||(W.id=t(W.startTime,W.endTime,J)),W.endTime>0&&w.push(W)},D.onparsingerror=function(W){L=W},D.onflush=function(){if(L){b(L);return}E(w)},C.forEach(function(W){if(M)if(a(W,"X-TIMESTAMP-MAP=")){M=!1,G=!0,W.substr(16).split(",").forEach(function(N){a(N,"LOCAL:")?A=N.substr(6):a(N,"MPEGTS:")&&(R=parseInt(N.substr(7)))});try{k=n(A)/1e3}catch(N){G=!1,L=N}return}else W===""&&(M=!1);D.parse(W+`
|
|
|
`)}),D.flush()}},"./src/utils/xhr-loader.ts":function(I,_,O){"use strict";O.r(_);var y=O("./src/utils/logger.ts"),v=O("./src/loader/load-stats.ts"),o=/^age:\s*[\d.]+\s*$/m,g=function(){function p(a){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=a?a.xhrSetup:null,this.stats=new v.LoadStats,this.retryDelay=0}var d=p.prototype;return d.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},d.abortInternal=function(){var n=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),n&&(n.onreadystatechange=null,n.onprogress=null,n.readyState!==4&&(this.stats.aborted=!0,n.abort()))},d.abort=function(){var n;this.abortInternal(),(n=this.callbacks)!==null&&n!==void 0&&n.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},d.load=function(n,s,t){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=n,this.config=s,this.callbacks=t,this.retryDelay=s.retryDelay,this.loadInternal()},d.loadInternal=function(){var n=this.config,s=this.context;if(!n)return;var t=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0;var e=this.xhrSetup;try{if(e)try{e(t,s.url)}catch(u){t.open("GET",s.url,!0),e(t,s.url)}t.readyState||t.open("GET",s.url,!0);var r=this.context.headers;if(r)for(var c in r)t.setRequestHeader(c,r[c])}catch(u){this.callbacks.onError({code:t.status,text:u.message},s,t);return}s.rangeEnd&&t.setRequestHeader("Range","bytes="+s.rangeStart+"-"+(s.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=s.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),t.send()},d.readystatechange=function(){var n=this.context,s=this.loader,t=this.stats;if(!n||!s)return;var i=s.readyState,e=this.config;if(t.aborted)return;if(i>=2)if(self.clearTimeout(this.requestTimeout),t.loading.first===0&&(t.loading.first=Math.max(self.performance.now(),t.loading.start)),i===4){s.onreadystatechange=null,s.onprogress=null;var r=s.status;if(r>=200&&r<300){t.loading.end=Math.max(self.performance.now(),t.loading.first);var c,u;if(n.responseType==="arraybuffer"?(c=s.response,u=c.byteLength):(c=s.responseText,u=c.length),t.loaded=t.total=u,!this.callbacks)return;var f=this.callbacks.onProgress;if(f&&f(t,n,c,s),!this.callbacks)return;var m={url:s.responseURL,data:c};this.callbacks.onSuccess(m,t,n,s)}else t.retry>=e.maxRetry||r>=400&&r<499?(y.logger.error(r+" while loading "+n.url),this.callbacks.onError({code:r,text:s.statusText},n,s)):(y.logger.warn(r+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,e.maxRetryDelay),t.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout)},d.loadtimeout=function(){y.logger.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))},d.loadprogress=function(n){var s=this.stats;s.loaded=n.loaded,n.lengthComputable&&(s.total=n.total)},d.getCacheAge=function(){var n=null;if(this.loader&&o.test(this.loader.getAllResponseHeaders())){var s=this.loader.getResponseHeader("age");n=s?parseFloat(s):null}return n},p}();_.default=g}}).default})},vHTk:function(U,X,x){U.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},vS10:function(U,X,x){"use strict";x.d(X,"h",function(){return v}),x.d(X,"d",function(){return g}),x.d(X,"c",function(){return d}),x.d(X,"e",function(){return n}),x.d(X,"g",function(){return t}),x.d(X,"a",function(){return e}),x.d(X,"i",function(){return c}),x.d(X,"b",function(){return f}),x.d(X,"f",function(){return l});var I=x("9og8"),_=x("WmNS"),O=x.n(_),y=x("ErOA");function v(C){return o.apply(this,arguments)}function o(){return o=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/save_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),o.apply(this,arguments)}function g(C){return p.apply(this,arguments)}function p(){return p=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.identifier,"/jupyter.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),p.apply(this,arguments)}function d(C){return a.apply(this,arguments)}function a(){return a=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/start.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),a.apply(this,arguments)}function n(C){return s.apply(this,arguments)}function s(){return s=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/timeinfo_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),s.apply(this,arguments)}function t(C){return i.apply(this,arguments)}function i(){return i=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/reset_pod.json"),{method:"Get"}));case 1:case"end":return A.stop()}},C)})),i.apply(this,arguments)}function e(C){return r.apply(this,arguments)}function r(){return r=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/jupyters/active_with_tpi.json",{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),r.apply(this,arguments)}function c(C){return u.apply(this,arguments)}function u(){return u=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/myshixuns/".concat(w.identifier,"/sync_code.json"),{method:"Post",params:w}));case 1:case"end":return A.stop()}},C)})),u.apply(this,arguments)}function f(C){return m.apply(this,arguments)}function m(){return m=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/shixuns/".concat(w.identifier,"/get_data_sets.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),m.apply(this,arguments)}function l(C){return E.apply(this,arguments)}function E(){return E=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.identifier,"/reboot_esc.json"),{method:"post"}));case 1:case"end":return A.stop()}},C)})),E.apply(this,arguments)}function b(C){return D.apply(this,arguments)}function D(){return D=Object(I.a)(O.a.mark(function C(w){return O.a.wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return A.abrupt("return",Object(y.a)("/api/tasks/".concat(w.taskId,"/get_latex_file_tree.json"),{method:"Get",params:w}));case 1:case"end":return A.stop()}},C)})),D.apply(this,arguments)}},vewr:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.getPointerEvent=I,X.stopEvent=_,X.setCapture=p,X.releaseCapture=d;function I(a){return a.changedTouches?a.changedTouches[0]:a.touches?a.touches[0]:a}function _(a){a.stopPropagation(),a.preventDefault()}var O=!1,y=null;document.captureElement=null;function v(a){if(O)return;var n=new a.constructor(a.type,a);O=!0,document.captureElement?document.captureElement.dispatchEvent(n):y.dispatchEvent(n),O=!1,a.stopPropagation(),n.defaultPrevented&&a.preventDefault(),a.type==="mouseup"&&d()}function o(){var a=document.getElementById("noVNC_mouse_capture_elem");a.style.cursor=window.getComputedStyle(document.captureElement).cursor}var g=new MutationObserver(o);function p(a){if(a.setCapture)a.setCapture(),document.captureElement=a,a.addEventListener("mouseup",d);else{d();var n=document.getElementById("noVNC_mouse_capture_elem");n===null&&(n=document.createElement("div"),n.id="noVNC_mouse_capture_elem",n.style.position="fixed",n.style.top="0px",n.style.left="0px",n.style.width="100%",n.style.height="100%",n.style.zIndex=1e4,n.style.display="none",document.body.appendChild(n),n.addEventListener("contextmenu",v),n.addEventListener("mousemove",v),n.addEventListener("mouseup",v)),document.captureElement=a,g.observe(a,{attributes:!0}),o(),n.style.display="",window.addEventListener("mousemove",v),window.addEventListener("mouseup",v)}}function d(){if(document.releaseCapture)document.releaseCapture(),document.captureElement=null;else{if(!document.captureElement)return;y=document.captureElement,document.captureElement=null,g.disconnect();var a=document.getElementById("noVNC_mouse_capture_elem");a.style.display="none",window.removeEventListener("mousemove",v),window.removeEventListener("mouseup",v)}}},w7YG:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("ETIr"),x("cv67"),x("K3mO"),x("OLod"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.StreamCipher,v=_.algo,o=v.RC4=y.extend({_doReset:function(){for(var d=this._key,a=d.words,n=d.sigBytes,s=this._S=[],t=0;t<256;t++)s[t]=t;for(var t=0,i=0;t<256;t++){var e=t%n,r=a[e>>>2]>>>24-e%4*8&255;i=(i+s[t]+r)%256;var c=s[t];s[t]=s[i],s[i]=c}this._i=this._j=0},_doProcessBlock:function(d,a){d[a]^=g.call(this)},keySize:256/32,ivSize:0});function g(){for(var d=this._S,a=this._i,n=this._j,s=0,t=0;t<4;t++){a=(a+1)%256,n=(n+d[a])%256;var i=d[a];d[a]=d[n],d[n]=i,s|=d[(d[a]+d[n])%256]<<24-t*8}return this._i=a,this._j=n,s}_.RC4=y._createHelper(o);var p=v.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var d=this.cfg.drop;d>0;d--)g.call(this)}});_.RC4Drop=y._createHelper(p)}(),I.RC4})},wCXF:function(U,X,x){"use strict";x.d(X,"a",function(){return Ie});var I=x("rePB"),_=x("VTBJ"),O=x("KQm4"),y=x("U8pU"),v=x("ODXe"),o=x("q1tI"),g=x("TSYQ"),p=x.n(g),d=x("Gytx"),a=x.n(d),n=x("Kwbf"),s=x("t23M"),t=x("qx4F"),i=x("6eGT"),e=x("IBYe"),r=x("Ff2n"),c=x("c+Xe"),u=x("fyJ8"),f=x("biw7");function m(Ge,Le,bt,Re,Xe){var et=bt[Ge]||{},Ye=bt[Le]||{},Me,Ke;et.fixed==="left"?Me=Re.left[Ge]:Ye.fixed==="right"&&(Ke=Re.right[Le]);var ge=!1,Ee=!1,ce=!1,je=!1,Qe=bt[Le+1],te=bt[Ge-1];if(Xe==="rtl"){if(Me!==void 0){var Je=te&&te.fixed==="left";je=!Je}else if(Ke!==void 0){var ut=Qe&&Qe.fixed==="right";ce=!ut}}else if(Me!==void 0){var Be=Qe&&Qe.fixed==="left";ge=!Be}else if(Ke!==void 0){var qe=te&&te.fixed==="right";Ee=!qe}return{fixLeft:Me,fixRight:Ke,lastFixLeft:ge,firstFixRight:Ee,lastFixRight:ce,firstFixLeft:je,isSticky:Re.isSticky}}var l=x("sR1s");function E(Ge){var Le=Ge.cells,bt=Ge.stickyOffsets,Re=Ge.flattenColumns,Xe=Ge.rowComponent,et=Ge.cellComponent,Ye=Ge.onHeaderRow,Me=Ge.index,Ke=o.useContext(f.a),ge=Ke.prefixCls,Ee=Ke.direction,ce;Ye&&(ce=Ye(Le.map(function(Qe){return Qe.column}),Me));var je=Object(l.a)(Le.map(function(Qe){return Qe.column}));return o.createElement(Xe,Object.assign({},ce),Le.map(function(Qe,te){var Je=Qe.column,ut=m(Qe.colStart,Qe.colEnd,Re,bt,Ee),Be;return Je&&Je.onHeaderCell&&(Be=Qe.column.onHeaderCell(Je)),o.createElement(u.a,Object.assign({},Qe,{ellipsis:Je.ellipsis,align:Je.align,component:et,prefixCls:ge,key:je[te]},ut,{additionalProps:Be,rowType:"header"}))}))}E.displayName="HeaderRow";var b=E;function D(Ge){var Le=[];function bt(Ye,Me){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Le[Ke]=Le[Ke]||[];var ge=Me,Ee=Ye.filter(Boolean).map(function(ce){var je={key:ce.key,className:ce.className||"",children:ce.title,column:ce,colStart:ge},Qe=1,te=ce.children;return te&&te.length>0&&(Qe=bt(te,ge,Ke+1).reduce(function(Je,ut){return Je+ut},0),je.hasSubColumns=!0),"colSpan"in ce&&(Qe=ce.colSpan),"rowSpan"in ce&&(je.rowSpan=ce.rowSpan),je.colSpan=Qe,je.colEnd=je.colStart+Qe-1,Le[Ke].push(je),ge+=Qe,Qe});return Ee}bt(Ge,0);for(var Re=Le.length,Xe=function(Me){Le[Me].forEach(function(Ke){!("rowSpan"in Ke)&&!Ke.hasSubColumns&&(Ke.rowSpan=Re-Me)})},et=0;et<Re;et+=1)Xe(et);return Le}function C(Ge){var Le=Ge.stickyOffsets,bt=Ge.columns,Re=Ge.flattenColumns,Xe=Ge.onHeaderRow,et=o.useContext(f.a),Ye=et.prefixCls,Me=et.getComponent,Ke=o.useMemo(function(){return D(bt)},[bt]),ge=Me(["header","wrapper"],"thead"),Ee=Me(["header","row"],"tr"),ce=Me(["header","cell"],"th");return o.createElement(ge,{className:"".concat(Ye,"-thead")},Ke.map(function(je,Qe){var te=o.createElement(b,{key:Qe,flattenColumns:Re,cells:je,stickyOffsets:Le,rowComponent:Ee,cellComponent:ce,onHeaderRow:Xe,index:Qe});return te}))}var w=C,S=x("hW8S");function A(Ge){for(var Le=Ge.colWidths,bt=Ge.columns,Re=Ge.columCount,Xe=[],et=Re||bt.length,Ye=!1,Me=et-1;Me>=0;Me-=1){var Ke=Le[Me],ge=bt&&bt[Me],Ee=ge&&ge[S.a];(Ke||Ee||Ye)&&(Xe.unshift(o.createElement("col",Object.assign({key:Me,style:{width:Ke,minWidth:Ke}},Ee))),Ye=!0)}return o.createElement("colgroup",null,Xe)}var R=A;function k(Ge,Le){return Object(o.useMemo)(function(){for(var bt=[],Re=0;Re<Le;Re+=1){var Xe=Ge[Re];if(Xe!==void 0)bt[Re]=Xe;else return null}return bt},[Ge.join("_"),Le])}var L=o.forwardRef(function(Ge,Le){var bt=Ge.noData,Re=Ge.columns,Xe=Ge.flattenColumns,et=Ge.colWidths,Ye=Ge.columCount,Me=Ge.stickyOffsets,Ke=Ge.direction,ge=Ge.fixHeader,Ee=Ge.offsetHeader,ce=Ge.stickyClassName,je=Ge.onScroll,Qe=Object(r.a)(Ge,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),te=o.useContext(f.a),Je=te.prefixCls,ut=te.scrollbarSize,Be=te.isSticky,qe=Be&&!ge?0:ut,at=o.useRef(null),wt=o.useCallback(function(Bt){Object(c.b)(Le,Bt),Object(c.b)(at,Bt)},[]);o.useEffect(function(){var Bt;function Ht(lt){var Lt=lt.currentTarget,Dt=lt.deltaX;Dt&&(je({currentTarget:Lt,scrollLeft:Lt.scrollLeft+Dt}),lt.preventDefault())}return(Bt=at.current)===null||Bt===void 0||Bt.addEventListener("wheel",Ht),function(){var lt;(lt=at.current)===null||lt===void 0||lt.removeEventListener("wheel",Ht)}},[]);var ft=Xe[Xe.length-1],st={fixed:ft?ft.fixed:null,onHeaderCell:function(){return{className:"".concat(Je,"-cell-scrollbar")}}},Pe=Object(o.useMemo)(function(){return qe?[].concat(Object(O.a)(Re),[st]):Re},[qe,Re]),ze=Object(o.useMemo)(function(){return qe?[].concat(Object(O.a)(Xe),[st]):Xe},[qe,Xe]),yt=Object(o.useMemo)(function(){var Bt=Me.right,Ht=Me.left;return Object(_.a)(Object(_.a)({},Me),{},{left:Ke==="rtl"?[].concat(Object(O.a)(Ht.map(function(lt){return lt+qe})),[0]):Ht,right:Ke==="rtl"?Bt:[].concat(Object(O.a)(Bt.map(function(lt){return lt+qe})),[0]),isSticky:Be})},[qe,Me,Be]),pt=k(et,Ye);return o.createElement("div",{style:Object(_.a)({overflow:"hidden"},Be?{top:Ee}:{}),ref:wt,className:p()("".concat(Je,"-header"),Object(I.a)({},ce,!!ce))},o.createElement("table",{style:{tableLayout:"fixed",visibility:bt||pt?null:"hidden"}},o.createElement(R,{colWidths:pt?[].concat(Object(O.a)(pt),[qe]):[],columCount:Ye+1,columns:ze}),o.createElement(w,Object.assign({},Qe,{stickyOffsets:yt,columns:Pe,flattenColumns:ze}))))});L.displayName="FixedHeader";var M=L,G=o.createContext(null),W=G;function N(Ge){var Le=Ge.prefixCls,bt=Ge.children,Re=Ge.component,Xe=Ge.cellComponent,et=Ge.fixHeader,Ye=Ge.fixColumn,Me=Ge.horizonScroll,Ke=Ge.className,ge=Ge.expanded,Ee=Ge.componentWidth,ce=Ge.colSpan,je=o.useContext(f.a),Qe=je.scrollbarSize;return o.useMemo(function(){var te=bt;return Ye&&(te=o.createElement("div",{style:{width:Ee-(et?Qe:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Le,"-expanded-row-fixed")},te)),o.createElement(Re,{className:Ke,style:{display:ge?null:"none"}},o.createElement(u.a,{component:Xe,prefixCls:Le,colSpan:ce},te))},[bt,Re,et,Me,Ke,ge,Ee,ce,Qe])}var K=N;function F(Ge){var Le=Ge.className,bt=Ge.style,Re=Ge.record,Xe=Ge.index,et=Ge.rowKey,Ye=Ge.getRowKey,Me=Ge.rowExpandable,Ke=Ge.expandedKeys,ge=Ge.onRow,Ee=Ge.indent,ce=Ee===void 0?0:Ee,je=Ge.rowComponent,Qe=Ge.cellComponent,te=Ge.childrenColumnName,Je=o.useContext(f.a),ut=Je.prefixCls,Be=Je.fixedInfoList,qe=o.useContext(W),at=qe.fixHeader,wt=qe.fixColumn,ft=qe.horizonScroll,st=qe.componentWidth,Pe=qe.flattenColumns,ze=qe.expandableType,yt=qe.expandRowByClick,pt=qe.onTriggerExpand,Bt=qe.rowClassName,Ht=qe.expandedRowClassName,lt=qe.indentSize,Lt=qe.expandIcon,Dt=qe.expandedRowRender,Mt=qe.expandIconColumnIndex,Wt=o.useState(!1),Yt=Object(v.a)(Wt,2),mn=Yt[0],Qt=Yt[1],$t=Ke&&Ke.has(Ge.recordKey);o.useEffect(function(){$t&&Qt(!0)},[$t]);var Kn=ze==="row"&&(!Me||Me(Re)),hn=ze==="nest",Rn=te&&Re&&Re[te],wn=Kn||hn,Pn;ge&&(Pn=ge(Re,Xe));var Yn=function(V){if(yt&&wn&&pt(Re,V),Pn&&Pn.onClick){for(var Q,ee=arguments.length,Se=new Array(ee>1?ee-1:0),le=1;le<ee;le++)Se[le-1]=arguments[le];(Q=Pn).onClick.apply(Q,[V].concat(Se))}},or;typeof Bt=="string"?or=Bt:typeof Bt=="function"&&(or=Bt(Re,Xe,ce));var Xt=Object(l.a)(Pe),xn=o.createElement(je,Object.assign({},Pn,{"data-row-key":et,className:p()(Le,"".concat(ut,"-row"),"".concat(ut,"-row-level-").concat(ce),or,Pn&&Pn.className),style:Object(_.a)(Object(_.a)({},bt),Pn?Pn.style:null),onClick:Yn}),Pe.map(function(ue,V){var Q=ue.render,ee=ue.dataIndex,Se=ue.className,le=Xt[V],nt=Be[V],Nt;V===(Mt||0)&&hn&&(Nt=o.createElement(o.Fragment,null,o.createElement("span",{style:{paddingLeft:"".concat(lt*ce,"px")},className:"".concat(ut,"-row-indent indent-level-").concat(ce)}),Lt({prefixCls:ut,expanded:$t,expandable:Rn,record:Re,onExpand:pt})));var Jt;return ue.onCell&&(Jt=ue.onCell(Re,Xe)),o.createElement(u.a,Object.assign({className:Se,ellipsis:ue.ellipsis,align:ue.align,component:Qe,prefixCls:ut,key:le,record:Re,index:Xe,dataIndex:ee,render:Q,shouldCellUpdate:ue.shouldCellUpdate},nt,{appendNode:Nt,additionalProps:Jt}))})),Er;if(Kn&&(mn||$t)){var nr=Dt(Re,Xe,ce+1,$t),Ir=Ht&&Ht(Re,Xe,ce);Er=o.createElement(K,{expanded:$t,className:p()("".concat(ut,"-expanded-row"),"".concat(ut,"-expanded-row-level-").concat(ce+1),Ir),prefixCls:ut,fixHeader:at,fixColumn:wt,horizonScroll:ft,component:je,componentWidth:st,cellComponent:Qe,colSpan:Pe.length},nr)}var qn;return Rn&&$t&&(qn=(Re[te]||[]).map(function(ue,V){var Q=Ye(ue,V);return o.createElement(F,Object.assign({},Ge,{key:Q,rowKey:Q,record:ue,recordKey:Q,index:V,indent:ce+1}))})),o.createElement(o.Fragment,null,xn,Er,qn)}F.displayName="BodyRow";var P=F,B=o.createContext(null),J=B;function re(Ge){var Le=Ge.columnKey,bt=Ge.onColumnResize,Re=o.useRef();return o.useEffect(function(){Re.current&&bt(Le,Re.current.offsetWidth)},[]),o.createElement(s.a,{onResize:function(et){var Ye=et.offsetWidth;bt(Le,Ye)}},o.createElement("td",{ref:Re,style:{padding:0,border:0,height:0}},o.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function he(Ge){var Le=Ge.data,bt=Ge.getRowKey,Re=Ge.measureColumnWidth,Xe=Ge.expandedKeys,et=Ge.onRow,Ye=Ge.rowExpandable,Me=Ge.emptyNode,Ke=Ge.childrenColumnName,ge=o.useContext(J),Ee=ge.onColumnResize,ce=o.useContext(f.a),je=ce.prefixCls,Qe=ce.getComponent,te=o.useContext(W),Je=te.fixHeader,ut=te.horizonScroll,Be=te.flattenColumns,qe=te.componentWidth;return o.useMemo(function(){var at=Qe(["body","wrapper"],"tbody"),wt=Qe(["body","row"],"tr"),ft=Qe(["body","cell"],"td"),st;Le.length?st=Le.map(function(ze,yt){var pt=bt(ze,yt);return o.createElement(P,{key:pt,rowKey:pt,record:ze,recordKey:pt,index:yt,rowComponent:wt,cellComponent:ft,expandedKeys:Xe,onRow:et,getRowKey:bt,rowExpandable:Ye,childrenColumnName:Ke})}):st=o.createElement(K,{expanded:!0,className:"".concat(je,"-placeholder"),prefixCls:je,fixHeader:Je,fixColumn:ut,horizonScroll:ut,component:wt,componentWidth:qe,cellComponent:ft,colSpan:Be.length},Me);var Pe=Object(l.a)(Be);return o.createElement(at,{className:"".concat(je,"-tbody")},Re&&o.createElement("tr",{"aria-hidden":"true",className:"".concat(je,"-measure-row"),style:{height:0}},Pe.map(function(ze){return o.createElement(re,{key:ze,columnKey:ze,onColumnResize:Ee})})),st)},[Le,je,et,Re,Xe,bt,Qe,qe,Me,Be])}var we=o.memo(he);we.displayName="Body";var ke=we,ne=x("wRmb"),Oe=x("xEkU"),Ce=x.n(Oe);function fe(Ge){var Le=Object(o.useRef)(Ge),bt=Object(o.useState)({}),Re=Object(v.a)(bt,2),Xe=Re[1],et=Object(o.useRef)(null),Ye=Object(o.useRef)([]);function Me(Ke){et.current===null&&(Ye.current=[],et.current=Ce()(function(){Ye.current.forEach(function(ge){Le.current=ge(Le.current)}),et.current=null,Xe({})})),Ye.current.push(Ke)}return Object(o.useEffect)(function(){return function(){Ce.a.cancel(et.current)}},[]),[Le.current,Me]}function oe(Ge){var Le=Object(o.useRef)(Ge),bt=Object(o.useRef)(null);function Re(){window.clearTimeout(bt.current)}function Xe(Ye){Le.current=Ye,Re(),bt.current=window.setTimeout(function(){Le.current=null,bt.current=null},100)}function et(){return Le.current}return Object(o.useEffect)(function(){return Re},[]),[Xe,et]}function se(Ge,Le,bt){var Re=Object(o.useMemo)(function(){for(var Xe=[],et=[],Ye=0,Me=0,Ke=0;Ke<Le;Ke+=1)if(bt==="rtl"){et[Ke]=Me,Me+=Ge[Ke]||0;var ge=Le-Ke-1;Xe[ge]=Ye,Ye+=Ge[ge]||0}else{Xe[Ke]=Ye,Ye+=Ge[Ke]||0;var Ee=Le-Ke-1;et[Ee]=Me,Me+=Ge[Ee]||0}return{left:Xe,right:et}},[Ge,Le,bt]);return Re}var be=se;function ie(Ge){var Le=Ge.className,bt=Ge.children;return o.createElement("div",{className:Le},bt)}var de=ie,Fe=x("n6Qo");function ae(Ge){var Le,bt=Ge.prefixCls,Re=Ge.record,Xe=Ge.onExpand,et=Ge.expanded,Ye=Ge.expandable,Me="".concat(bt,"-row-expand-icon");if(!Ye)return o.createElement("span",{className:p()(Me,"".concat(bt,"-row-spaced"))});var Ke=function(Ee){Xe(Re,Ee),Ee.stopPropagation()};return o.createElement("span",{className:p()(Me,(Le={},Object(I.a)(Le,"".concat(bt,"-row-expanded"),et),Object(I.a)(Le,"".concat(bt,"-row-collapsed"),!et),Le)),onClick:Ke})}function Z(Ge,Le,bt){var Re=[];function Xe(et){(et||[]).forEach(function(Ye,Me){Re.push(Le(Ye,Me)),Xe(Ye[bt])})}return Xe(Ge),Re}var Y=x("zT1h"),q=x("y0+3"),ve=function(Le,bt){var Re,Xe,et=Le.scrollBodyRef,Ye=Le.onScroll,Me=Le.offsetScroll,Ke=o.useContext(f.a),ge=Ke.prefixCls,Ee=((Re=et.current)===null||Re===void 0?void 0:Re.scrollWidth)||0,ce=((Xe=et.current)===null||Xe===void 0?void 0:Xe.clientWidth)||0,je=Ee&&ce*(ce/Ee),Qe=o.useRef(),te=fe({scrollLeft:0,isHiddenScrollBar:!1}),Je=Object(v.a)(te,2),ut=Je[0],Be=Je[1],qe=o.useRef({delta:0,x:0}),at=o.useState(!1),wt=Object(v.a)(at,2),ft=wt[0],st=wt[1],Pe=function(){st(!1)},ze=function(lt){lt.persist(),qe.current.delta=lt.pageX-ut.scrollLeft,qe.current.x=0,st(!0),lt.preventDefault()},yt=function(lt){var Lt,Dt=lt||((Lt=window)===null||Lt===void 0?void 0:Lt.event),Mt=Dt.buttons;if(!ft||Mt===0){ft&&st(!1);return}var Wt=qe.current.x+lt.pageX-qe.current.x-qe.current.delta;Wt<=0&&(Wt=0),Wt+je>=ce&&(Wt=ce-je),Ye({scrollLeft:Wt/ce*(Ee+2)}),qe.current.x=lt.pageX},pt=function(){var lt=Object(q.b)(et.current).top,Lt=lt+et.current.offsetHeight,Dt=document.documentElement.scrollTop+window.innerHeight;Lt-Object(t.a)()<=Dt||lt>=Dt-Me?Be(function(Mt){return Object(_.a)(Object(_.a)({},Mt),{},{isHiddenScrollBar:!0})}):Be(function(Mt){return Object(_.a)(Object(_.a)({},Mt),{},{isHiddenScrollBar:!1})})},Bt=function(lt){Be(function(Lt){return Object(_.a)(Object(_.a)({},Lt),{},{scrollLeft:lt/Ee*ce||0})})};return o.useImperativeHandle(bt,function(){return{setScrollLeft:Bt}}),o.useEffect(function(){var Ht=Object(Y.a)(document.body,"mouseup",Pe,!1),lt=Object(Y.a)(document.body,"mousemove",yt,!1);return pt(),function(){Ht.remove(),lt.remove()}},[je,ft]),o.useEffect(function(){var Ht=Object(Y.a)(window,"scroll",pt,!1),lt=Object(Y.a)(window,"resize",pt,!1);return function(){Ht.remove(),lt.remove()}},[]),o.useEffect(function(){ut.isHiddenScrollBar||Be(function(Ht){var lt,Lt;return Object(_.a)(Object(_.a)({},Ht),{},{scrollLeft:et.current.scrollLeft/((lt=et.current)===null||lt===void 0?void 0:lt.scrollWidth)*((Lt=et.current)===null||Lt===void 0?void 0:Lt.clientWidth)})})},[ut.isHiddenScrollBar]),Ee<=ce||!je||ut.isHiddenScrollBar?null:o.createElement("div",{style:{height:Object(t.a)(),width:ce,bottom:Me},className:"".concat(ge,"-sticky-scroll")},o.createElement("div",{onMouseDown:ze,ref:Qe,className:p()("".concat(ge,"-sticky-scroll-bar"),Object(I.a)({},"".concat(ge,"-sticky-scroll-bar-active"),ft)),style:{width:"".concat(je,"px"),transform:"translate3d(".concat(ut.scrollLeft,"px, 0, 0)")}}))},pe=o.forwardRef(ve);function Te(Ge,Le){return o.useMemo(function(){var bt=!!Ge;return{isSticky:bt,stickyClassName:bt?"".concat(Le,"-sticky-header"):"",offsetHeader:Object(y.a)(Ge)==="object"&&Ge.offsetHeader||0,offsetScroll:Object(y.a)(Ge)==="object"&&Ge.offsetScroll||0}},[Ge,Le])}var Ne=[],me={},Ie="rc-table-internal-hook",_e=o.memo(function(Ge){var Le=Ge.children;return Le},function(Ge,Le){return a()(Ge.props,Le.props)?Ge.pingLeft!==Le.pingLeft||Ge.pingRight!==Le.pingRight:!1});function Ve(Ge){var Le,bt=Ge.prefixCls,Re=Ge.className,Xe=Ge.rowClassName,et=Ge.style,Ye=Ge.data,Me=Ge.rowKey,Ke=Ge.scroll,ge=Ge.tableLayout,Ee=Ge.direction,ce=Ge.title,je=Ge.footer,Qe=Ge.summary,te=Ge.id,Je=Ge.showHeader,ut=Ge.components,Be=Ge.emptyText,qe=Ge.onRow,at=Ge.onHeaderRow,wt=Ge.internalHooks,ft=Ge.transformColumns,st=Ge.internalRefs,Pe=Ge.sticky,ze=Ye||Ne,yt=!!ze.length,pt=o.useState(0),Bt=Object(v.a)(pt,2),Ht=Bt[0],lt=Bt[1];o.useEffect(function(){lt(Object(t.a)())});var Lt=o.useMemo(function(){return Object(l.c)(ut,{})},[ut]),Dt=o.useCallback(function(hi,Tn){return Object(l.b)(Lt,hi)||Tn},[Lt]),Mt=o.useMemo(function(){return typeof Me=="function"?Me:function(hi){var Tn=hi&&hi[Me];return Tn}},[Me]),Wt=Object(S.c)(Ge),Yt=Wt.expandIcon,mn=Wt.expandedRowKeys,Qt=Wt.defaultExpandedRowKeys,$t=Wt.defaultExpandAllRows,Kn=Wt.expandedRowRender,hn=Wt.onExpand,Rn=Wt.onExpandedRowsChange,wn=Wt.expandRowByClick,Pn=Wt.rowExpandable,Yn=Wt.expandIconColumnIndex,or=Wt.expandedRowClassName,Xt=Wt.childrenColumnName,xn=Wt.indentSize,Er=Yt||ae,nr=Xt||"children",Ir=o.useMemo(function(){return Kn?"row":Ge.expandable&&wt===Ie&&Ge.expandable.__PARENT_RENDER_ICON__||ze.some(function(hi){return hi&&Object(y.a)(hi)==="object"&&hi[nr]})?"nest":!1},[!!Kn,ze]),qn=o.useState(function(){return Qt||($t?Z(ze,Mt,nr):[])}),ue=Object(v.a)(qn,2),V=ue[0],Q=ue[1],ee=o.useMemo(function(){return new Set(mn||V||[])},[mn,V]),Se=o.useCallback(function(hi){var Tn=Mt(hi,ze.indexOf(hi)),tn,In=ee.has(Tn);In?(ee.delete(Tn),tn=Object(O.a)(ee)):tn=[].concat(Object(O.a)(ee),[Tn]),Q(tn),hn&&hn(!In,hi),Rn&&Rn(tn)},[Mt,ee,ze,hn,Rn]),le=o.useState(0),nt=Object(v.a)(le,2),Nt=nt[0],Jt=nt[1],an=Object(ne.b)(Object(_.a)(Object(_.a)(Object(_.a)({},Ge),Wt),{},{expandable:!!Kn,expandedKeys:ee,getRowKey:Mt,onTriggerExpand:Se,expandIcon:Er,expandIconColumnIndex:Yn,direction:Ee}),wt===Ie?ft:null),Gt=Object(v.a)(an,2),Dn=Gt[0],Xn=Gt[1],sr=o.useMemo(function(){return{columns:Dn,flattenColumns:Xn}},[Dn,Xn]),Tr=o.useRef(),gr=o.useRef(),rr=o.useRef(),xr=o.useState(!1),qi=Object(v.a)(xr,2),Gr=qi[0],ai=qi[1],da=o.useState(!1),Fi=Object(v.a)(da,2),ia=Fi[0],Ca=Fi[1],po=fe(new Map),so=Object(v.a)(po,2),xo=so[0],ka=so[1],Yi=Object(l.a)(Xn),Nr=Yi.map(function(hi){return xo.get(hi)}),Qr=o.useMemo(function(){return Nr},[Nr.join("_")]),yi=be(Qr,Xn.length,Ee),Fr=Ke&&Object(l.d)(Ke.y),wr=Ke&&Object(l.d)(Ke.x),ei=wr&&Xn.some(function(hi){var Tn=hi.fixed;return Tn}),vr=o.useRef(),oi=Te(Pe,bt),ir=oi.isSticky,Wi=oi.offsetHeader,Mi=oi.offsetScroll,$i=oi.stickyClassName,mo,Qi,Ha;Fr&&(Qi={overflowY:"scroll",maxHeight:Ke.y}),wr&&(mo={overflowX:"auto"},Fr||(Qi={overflowY:"hidden"}),Ha={width:Ke.x===!0?"auto":Ke.x,minWidth:"100%"});var La=o.useCallback(function(hi,Tn){ka(function(tn){var In=new Map(tn);return In.set(hi,Tn),In})},[]),ti=oe(null),Bo=Object(v.a)(ti,2),Ka=Bo[0],go=Bo[1];function So(hi,Tn){if(!Tn)return;typeof Tn=="function"?Tn(hi):Tn.scrollLeft!==hi&&(Tn.scrollLeft=hi)}var Wa=function(Tn){var tn=Tn.currentTarget,In=Tn.scrollLeft,vn=typeof In=="number"?In:tn.scrollLeft,er=tn||me;if(!go()||go()===er){var Ar;Ka(er),So(vn,gr.current),So(vn,rr.current),So(vn,(Ar=vr.current)===null||Ar===void 0?void 0:Ar.setScrollLeft)}if(tn){var fi=tn.scrollWidth,bi=tn.clientWidth;ai(vn>0),Ca(vn<fi-bi)}},Ho=function(){rr.current&&Wa({currentTarget:rr.current})},Qn=function(Tn){var tn=Tn.width;Ho(),Jt(Tr.current?Tr.current.offsetWidth:tn)};o.useEffect(function(){return Ho},[]),o.useEffect(function(){wr&&Ho()},[wr]),o.useEffect(function(){wt===Ie&&st&&(st.body.current=rr.current)});var mr=Dt(["table"],"table"),Jn=o.useMemo(function(){return ge||(ei?Ke.x==="max-content"?"auto":"fixed":Fr||Xn.some(function(hi){var Tn=hi.ellipsis;return Tn})?"fixed":"auto")},[Fr,ei,Xn,ge]),Lr,Kr={colWidths:Qr,columCount:Xn.length,stickyOffsets:yi,onHeaderRow:at,fixHeader:Fr},gi=o.useMemo(function(){return yt?null:typeof Be=="function"?Be():Be},[yt,Be]),cr=o.createElement(ke,{data:ze,measureColumnWidth:Fr||wr||ir,expandedKeys:ee,rowExpandable:Pn,getRowKey:Mt,onRow:qe,emptyNode:gi,childrenColumnName:nr}),Xi=o.createElement(R,{colWidths:Xn.map(function(hi){var Tn=hi.width;return Tn}),columns:Xn}),ga=Qe&&o.createElement(Fe.b,null,Qe(ze)),jr=Dt(["body"]);if(Fr||ir){var qa;typeof jr=="function"?(qa=jr(ze,{scrollbarSize:Ht,ref:rr,onScroll:Wa}),Kr.colWidths=Xn.map(function(hi,Tn){var tn=hi.width,In=Tn===Dn.length-1?tn-Ht:tn;return typeof In=="number"&&!Number.isNaN(In)?In:(Object(n.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):qa=o.createElement("div",{style:Object(_.a)(Object(_.a)({},mo),Qi),onScroll:Wa,ref:rr,className:p()("".concat(bt,"-body"))},o.createElement(mr,{style:Object(_.a)(Object(_.a)({},Ha),{},{tableLayout:Jn})},Xi,cr,ga),ir&&o.createElement(pe,{ref:vr,offsetScroll:Mi,scrollBodyRef:rr,onScroll:Wa})),Lr=o.createElement(o.Fragment,null,Je!==!1&&o.createElement(M,Object.assign({noData:!ze.length},Kr,sr,{direction:Ee,offsetHeader:Wi,stickyClassName:$i,ref:gr,onScroll:Wa})),qa)}else Lr=o.createElement("div",{style:Object(_.a)(Object(_.a)({},mo),Qi),className:p()("".concat(bt,"-content")),onScroll:Wa,ref:rr},o.createElement(mr,{style:Object(_.a)(Object(_.a)({},Ha),{},{tableLayout:Jn})},Xi,Je!==!1&&o.createElement(w,Object.assign({},Kr,sr)),cr,ga));var di=Object(S.b)(Ge),Ai=o.createElement("div",Object.assign({className:p()(bt,Re,(Le={},Object(I.a)(Le,"".concat(bt,"-rtl"),Ee==="rtl"),Object(I.a)(Le,"".concat(bt,"-ping-left"),Gr),Object(I.a)(Le,"".concat(bt,"-ping-right"),ia),Object(I.a)(Le,"".concat(bt,"-layout-fixed"),ge==="fixed"),Object(I.a)(Le,"".concat(bt,"-fixed-header"),Fr),Object(I.a)(Le,"".concat(bt,"-fixed-column"),ei),Object(I.a)(Le,"".concat(bt,"-scroll-horizontal"),wr),Object(I.a)(Le,"".concat(bt,"-has-fix-left"),Xn[0]&&Xn[0].fixed),Object(I.a)(Le,"".concat(bt,"-has-fix-right"),Xn[Xn.length-1]&&Xn[Xn.length-1].fixed==="right"),Le)),style:et,id:te,ref:Tr},di),o.createElement(_e,{pingLeft:Gr,pingRight:ia,props:Object(_.a)(Object(_.a)({},Ge),{},{stickyOffsets:yi,mergedExpandedKeys:ee})},ce&&o.createElement(de,{className:"".concat(bt,"-title")},ce(ze)),o.createElement("div",{className:"".concat(bt,"-container")},Lr),je&&o.createElement(de,{className:"".concat(bt,"-footer")},je(ze))));wr&&(Ai=o.createElement(s.a,{onResize:Qn},Ai));var va=o.useMemo(function(){return{prefixCls:bt,getComponent:Dt,scrollbarSize:Ht,direction:Ee,fixedInfoList:Xn.map(function(hi,Tn){return m(Tn,Tn,Xn,yi,Ee)}),isSticky:ir}},[bt,Dt,Ht,Ee,Xn,yi,Ee,ir]),Ma=o.useMemo(function(){return Object(_.a)(Object(_.a)({},sr),{},{tableLayout:Jn,rowClassName:Xe,expandedRowClassName:or,componentWidth:Nt,fixHeader:Fr,fixColumn:ei,horizonScroll:wr,expandIcon:Er,expandableType:Ir,expandRowByClick:wn,expandedRowRender:Kn,onTriggerExpand:Se,expandIconColumnIndex:Yn,indentSize:xn})},[sr,Jn,Xe,or,Nt,Fr,ei,wr,Er,Ir,wn,Kn,Se,Yn,xn]),Ko=o.useMemo(function(){return{onColumnResize:La}},[La]);return o.createElement(f.a.Provider,{value:va},o.createElement(W.Provider,{value:Ma},o.createElement(J.Provider,{value:Ko},Ai)))}Ve.Column=e.a,Ve.ColumnGroup=i.a,Ve.Summary=Fe.a,Ve.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var tt=X.b=Ve},wRmb:function(U,X,x){"use strict";x.d(X,"a",function(){return a});var I=x("rePB"),_=x("KQm4"),O=x("VTBJ"),y=x("Ff2n"),v=x("q1tI"),o=x.n(v),g=x("Kwbf"),p=x("Zm9Q"),d=x("hW8S");function a(e){return Object(p.a)(e).filter(function(r){return v.isValidElement(r)}).map(function(r){var c=r.key,u=r.props,f=u.children,m=Object(y.a)(u,["children"]),l=Object(O.a)({key:c},m);return f&&(l.children=a(f)),l})}function n(e){return e.reduce(function(r,c){var u=c.fixed,f=u===!0?"left":u,m=c.children;return m&&m.length>0?[].concat(Object(_.a)(r),Object(_.a)(n(m).map(function(l){return Object(O.a)({fixed:f},l)}))):[].concat(Object(_.a)(r),[Object(O.a)(Object(O.a)({},c),{},{fixed:f})])},[])}function s(e){for(var r=!0,c=0;c<e.length;c+=1){var u=e[c];if(r&&u.fixed!=="left")r=!1;else if(!r&&u.fixed==="left"){Object(g.a)(!1,"Index ".concat(c-1," of `columns` missing `fixed='left'` prop."));break}}for(var f=!0,m=e.length-1;m>=0;m-=1){var l=e[m];if(f&&l.fixed!=="right")f=!1;else if(!f&&l.fixed==="right"){Object(g.a)(!1,"Index ".concat(m+1," of `columns` missing `fixed='right'` prop."));break}}}function t(e){return e.map(function(r){var c=r.fixed,u=Object(y.a)(r,["fixed"]),f=c;return c==="left"?f="right":c==="right"&&(f="left"),Object(O.a)({fixed:f},u)})}function i(e,r){var c=e.prefixCls,u=e.columns,f=e.children,m=e.expandable,l=e.expandedKeys,E=e.getRowKey,b=e.onTriggerExpand,D=e.expandIcon,C=e.rowExpandable,w=e.expandIconColumnIndex,S=e.direction,A=e.expandRowByClick,R=v.useMemo(function(){return u||a(f)},[u,f]),k=v.useMemo(function(){if(m){var G,W=w||0,N=R[W],K=(G={},Object(I.a)(G,d.a,{className:"".concat(c,"-expand-icon-col")}),Object(I.a)(G,"title",""),Object(I.a)(G,"fixed",N?N.fixed:null),Object(I.a)(G,"className","".concat(c,"-row-expand-icon-cell")),Object(I.a)(G,"render",function(B,J,re){var he=E(J,re),we=l.has(he),ke=C?C(J):!0,ne=D({prefixCls:c,expanded:we,expandable:ke,record:J,onExpand:b});return A?v.createElement("span",{onClick:function(Ce){return Ce.stopPropagation()}},ne):ne}),G),F=R.slice();return W>=0&&F.splice(W,0,K),F}return R},[m,R,E,l,D,S]),L=v.useMemo(function(){var G=k;return r&&(G=r(G)),G.length||(G=[{render:function(){return null}}]),G},[r,k,S]),M=v.useMemo(function(){return S==="rtl"?t(n(L)):n(L)},[L,S]);return[L,M]}X.b=i},wZgz:function(U,X,x){(function(I,_,O){U.exports=X=_(x("Ib8C"),x("ETIr"),x("cv67"),x("K3mO"),x("OLod"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.BlockCipher,v=_.algo,o=[],g=[],p=[],d=[],a=[],n=[],s=[],t=[],i=[],e=[];(function(){for(var u=[],f=0;f<256;f++)f<128?u[f]=f<<1:u[f]=f<<1^283;for(var m=0,l=0,f=0;f<256;f++){var E=l^l<<1^l<<2^l<<3^l<<4;E=E>>>8^E&255^99,o[m]=E,g[E]=m;var b=u[m],D=u[b],C=u[D],w=u[E]*257^E*16843008;p[m]=w<<24|w>>>8,d[m]=w<<16|w>>>16,a[m]=w<<8|w>>>24,n[m]=w;var w=C*16843009^D*65537^b*257^m*16843008;s[E]=w<<24|w>>>8,t[E]=w<<16|w>>>16,i[E]=w<<8|w>>>24,e[E]=w,m?(m=b^u[u[u[C^b]]],l^=u[u[l]]):m=l=1}})();var r=[0,1,2,4,8,16,32,64,128,27,54],c=v.AES=y.extend({_doReset:function(){var u;if(this._nRounds&&this._keyPriorReset===this._key)return;for(var f=this._keyPriorReset=this._key,m=f.words,l=f.sigBytes/4,E=this._nRounds=l+6,b=(E+1)*4,D=this._keySchedule=[],C=0;C<b;C++)C<l?D[C]=m[C]:(u=D[C-1],C%l?l>6&&C%l==4&&(u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[u&255]):(u=u<<8|u>>>24,u=o[u>>>24]<<24|o[u>>>16&255]<<16|o[u>>>8&255]<<8|o[u&255],u^=r[C/l|0]<<24),D[C]=D[C-l]^u);for(var w=this._invKeySchedule=[],S=0;S<b;S++){var C=b-S;if(S%4)var u=D[C];else var u=D[C-4];S<4||C<=4?w[S]=u:w[S]=s[o[u>>>24]]^t[o[u>>>16&255]]^i[o[u>>>8&255]]^e[o[u&255]]}},encryptBlock:function(u,f){this._doCryptBlock(u,f,this._keySchedule,p,d,a,n,o)},decryptBlock:function(u,f){var m=u[f+1];u[f+1]=u[f+3],u[f+3]=m,this._doCryptBlock(u,f,this._invKeySchedule,s,t,i,e,g);var m=u[f+1];u[f+1]=u[f+3],u[f+3]=m},_doCryptBlock:function(u,f,m,l,E,b,D,C){for(var w=this._nRounds,S=u[f]^m[0],A=u[f+1]^m[1],R=u[f+2]^m[2],k=u[f+3]^m[3],L=4,M=1;M<w;M++){var G=l[S>>>24]^E[A>>>16&255]^b[R>>>8&255]^D[k&255]^m[L++],W=l[A>>>24]^E[R>>>16&255]^b[k>>>8&255]^D[S&255]^m[L++],N=l[R>>>24]^E[k>>>16&255]^b[S>>>8&255]^D[A&255]^m[L++],K=l[k>>>24]^E[S>>>16&255]^b[A>>>8&255]^D[R&255]^m[L++];S=G,A=W,R=N,k=K}var G=(C[S>>>24]<<24|C[A>>>16&255]<<16|C[R>>>8&255]<<8|C[k&255])^m[L++],W=(C[A>>>24]<<24|C[R>>>16&255]<<16|C[k>>>8&255]<<8|C[S&255])^m[L++],N=(C[R>>>24]<<24|C[k>>>16&255]<<16|C[S>>>8&255]<<8|C[A&255])^m[L++],K=(C[k>>>24]<<24|C[S>>>16&255]<<16|C[A>>>8&255]<<8|C[R&255])^m[L++];u[f]=G,u[f+1]=W,u[f+2]=N,u[f+3]=K},keySize:256/32});_.AES=y._createHelper(c)}(),I.AES})},wbyO:function(U,X,x){(function(I,_){U.exports=X=_(x("Ib8C"))})(this,function(I){return function(){var _=I,O=_.lib,y=O.WordArray,v=_.enc,o=v.Base64url={stringify:function(p,d=!0){var a=p.words,n=p.sigBytes,s=d?this._safe_map:this._map;p.clamp();for(var t=[],i=0;i<n;i+=3)for(var e=a[i>>>2]>>>24-i%4*8&255,r=a[i+1>>>2]>>>24-(i+1)%4*8&255,c=a[i+2>>>2]>>>24-(i+2)%4*8&255,u=e<<16|r<<8|c,f=0;f<4&&i+f*.75<n;f++)t.push(s.charAt(u>>>6*(3-f)&63));var m=s.charAt(64);if(m)for(;t.length%4;)t.push(m);return t.join("")},parse:function(p,d=!0){var a=p.length,n=d?this._safe_map:this._map,s=this._reverseMap;if(!s){s=this._reverseMap=[];for(var t=0;t<n.length;t++)s[n.charCodeAt(t)]=t}var i=n.charAt(64);if(i){var e=p.indexOf(i);e!==-1&&(a=e)}return g(p,a,s)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function g(p,d,a){for(var n=[],s=0,t=0;t<d;t++)if(t%4){var i=a[p.charCodeAt(t-1)]<<t%4*2,e=a[p.charCodeAt(t)]>>>6-t%4*2,r=i|e;n[s>>>2]|=r<<24-s%4*8,s++}return y.create(n,s)}}(),I.enc.Base64url})},whVF:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=x("lNSK"),_=O(x("1q3G"));function O(p){return p&&p.__esModule?p:{default:p}}function y(p,d){if(!(p instanceof d))throw new TypeError("Cannot call a class as a function")}function v(p,d){for(var a=0;a<d.length;a++){var n=d[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(p,n.key,n)}}function o(p,d,a){return d&&v(p.prototype,d),a&&v(p,a),p}var g=function(){function p(){y(this,p),this.strm=new _.default,this.chunkSize=1024*10*10,this.outputBuffer=new Uint8Array(this.chunkSize),this.windowBits=5,(0,I.deflateInit)(this.strm,this.windowBits)}return o(p,[{key:"deflate",value:function(a){this.strm.input=a,this.strm.avail_in=this.strm.input.length,this.strm.next_in=0,this.strm.output=this.outputBuffer,this.strm.avail_out=this.chunkSize,this.strm.next_out=0;var n=(0,I.deflate)(this.strm,I.Z_FULL_FLUSH),s=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);if(n<0)throw new Error("zlib deflate failed");if(this.strm.avail_in>0){var t=[s],i=s.length;do{if(this.strm.output=new Uint8Array(this.chunkSize),this.strm.next_out=0,this.strm.avail_out=this.chunkSize,n=(0,I.deflate)(this.strm,I.Z_FULL_FLUSH),n<0)throw new Error("zlib deflate failed");var e=new Uint8Array(this.strm.output.buffer,0,this.strm.next_out);i+=e.length,t.push(e)}while(this.strm.avail_in>0);for(var r=new Uint8Array(i),c=0,u=0;u<t.length;u++)r.set(t[u],c),c+=t[u].length;s=r}return this.strm.input=null,this.strm.avail_in=0,this.strm.next_in=0,s}}]),p}();X.default=g},wzkS:function(U,X,x){"use strict";x.d(X,"c",function(){return v}),x.d(X,"b",function(){return o}),x.d(X,"d",function(){return g}),x.d(X,"a",function(){return d}),x.d(X,"e",function(){return a});var I=x("9og8"),_=x("WmNS"),O=x.n(_),y=x("ErOA");function v(n){return Object(y.c)("libraries/".concat(n,".json"))}function o(){return Object(y.c)("library_tags.json")}function g(n){return p.apply(this,arguments)}function p(){return p=Object(I.a)(O.a.mark(function n(s){var t;return O.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.b)("attachments/".concat(s,".json"));case 2:return t=e.sent,e.abrupt("return",t.status===0);case 4:case"end":return e.stop()}},n)})),p.apply(this,arguments)}function d(n){return Object(y.f)("libraries.json",n)}function a(n,s){return Object(y.g)("libraries/".concat(n,".json"),s)}},xO64:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I=_(x("8K/p"));function _(e){return e&&e.__esModule?e:{default:e}}function O(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(c){return typeof c}:O=function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},O(e)}function y(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function v(e,r){for(var c=0;c<r.length;c++){var u=r[c];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(e,u.key,u)}}function o(e,r,c){return r&&v(e.prototype,r),c&&v(e,c),e}function g(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),r&&p(e,r)}function p(e,r){return p=Object.setPrototypeOf||function(u,f){return u.__proto__=f,u},p(e,r)}function d(e){var r=s();return function(){var u=t(e),f;if(r){var m=t(this).constructor;f=Reflect.construct(u,arguments,m)}else f=u.apply(this,arguments);return a(this,f)}}function a(e,r){return r&&(O(r)==="object"||typeof r=="function")?r:n(e)}function n(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(c){return c.__proto__||Object.getPrototypeOf(c)},t(e)}var i=function(e){g(c,e);var r=d(c);function c(){return y(this,c),r.apply(this,arguments)}return o(c,[{key:"_pngRect",value:function(f,m,l,E,b,D,C){var w=this._readData(b);return w===null?!1:(D.imageRect(f,m,l,E,"image/png",w),!0)}},{key:"_basicRect",value:function(f,m,l,E,b,D,C,w){throw new Error("BasicCompression received in TightPNG rect")}}]),c}(I.default);X.default=i},xSIq:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=void 0;var I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};X.default=I},xlC8:function(U,X,x){"use strict";Object.defineProperty(X,"__esModule",{value:!0}),X.default=I;function I(_,O,y,v){for(var o=_&65535|0,g=_>>>16&65535|0,p=0;y!==0;){p=y>2e3?2e3:y,y-=p;do o=o+O[v++]|0,g=g+o|0;while(--p);o%=65521,g%=65521}return o|g<<16|0}},"y0+3":function(U,X,x){"use strict";x.d(X,"a",function(){return n}),x.d(X,"b",function(){return t});var I=/margin|padding|width|height|max|min|offset/,_={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function y(i){return i.nodeType===1?i.ownerDocument.defaultView.getComputedStyle(i,null):{}}function v(i,e,r){if(e=e.toLowerCase(),r==="auto"){if(e==="height")return i.offsetHeight;if(e==="width")return i.offsetWidth}return e in _||(_[e]=I.test(e)),_[e]?parseFloat(r)||0:r}function o(i,e){var r=arguments.length,c=y(i);return e=O[e]?"cssFloat"in i.style?"cssFloat":"styleFloat":e,r===1?c:v(i,e,c[e]||i.style[e])}function g(i,e,r){var c=arguments.length;if(e=O[e]?"cssFloat"in i.style?"cssFloat":"styleFloat":e,c===3)return typeof r=="number"&&I.test(e)&&(r="".concat(r,"px")),i.style[e]=r,r;for(var u in e)e.hasOwnProperty(u)&&g(i,u,e[u]);return y(i)}function p(i){return i===document.body?document.documentElement.clientWidth:i.offsetWidth}function d(i){return i===document.body?window.innerHeight||document.documentElement.clientHeight:i.offsetHeight}function a(){var i=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:i,height:e}}function n(){var i=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:i,height:e}}function s(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function t(i){var e=i.getBoundingClientRect(),r=document.documentElement;return{left:e.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:e.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}},y5JW:function(U,X,x){"use strict";x.d(X,"c",function(){return r}),x.d(X,"a",function(){return c});var I=x("DZo9"),_=x("8z0m"),O=x("+L6B"),y=x("2/Rp"),v=x("9og8"),o=x("miYZ"),g=x("tsqr"),p=x("k1fw"),d=x("oBTY"),a=x("WmNS"),n=x.n(a),s=x("q1tI"),t=x.n(s),i=x("m3rI"),e=x("wzkS"),r="\u3000\u3000";function c(u){var f=["Bytes","KB","MB","GB","TB"];if(u==0)return"0 Byte";var m=parseInt(""+Math.floor(Math.log(u)/Math.log(1024)),10);return(u/Math.pow(1024,m)).toFixed(1)+" "+f[m]}X.b=function(u){var f=u.value,m=f===void 0?[]:f,l=u.action,E=u.onChange,b=u.className,D=u.maxSize,C=D===void 0?150:D,w=u.title,S=w===void 0?"\u6587\u4EF6\u4E0A\u4F20":w,A=u.accept,R=A===void 0?null:A,k={multiple:!1,fileList:m,accept:R,withCredentials:!0,beforeUpload:function(G){var W=G.size/1024/1024;return!0},action:"".concat(i.a.API_SERVER,"/api/attachments.json"),onChange:function(G){var W,N,K=Object(d.a)(G.fileList);if(K=K.map(function(B){return B.name.indexOf(r)===-1&&(B.name="".concat(B.name).concat(r).concat(c(B.size))),Object(p.a)({},B)}),G.file.status==="done"&&((W=G.file)===null||W===void 0||((N=W.response)===null||N===void 0)?void 0:N.status)===-1){var F,P;g.b.error((F=G.file)===null||F===void 0||((P=F.response)===null||P===void 0)?void 0:P.message),E([]);return}E(K)},onRemove:function(){var M=Object(v.a)(n.a.mark(function W(N){var K,F,P;return n.a.wrap(function(J){for(;;)switch(J.prev=J.next){case 0:if(K=N.size/1024/1024,!(N.status==="uploading")){J.next=3;break}return J.abrupt("return",!0);case 3:if(K<C){J.next=7;break}return J.abrupt("return",!0);case 7:if(F=N.response?N.response.id:N.uid,!F){J.next=15;break}return J.next=11,Object(e.d)(N.response?N.response.id:N.id);case 11:return P=J.sent,J.abrupt("return",P);case 15:return J.abrupt("return",!0);case 16:case"end":return J.stop()}},W)}));function G(W){return M.apply(this,arguments)}return G}()};function L(M){M.preventDefault(),M.stopPropagation()}return t.a.createElement("div",{className:"single-upload ".concat(b||"")},t.a.createElement(_.a,k,t.a.createElement(y.a,{type:"primary",title:m.length>0?"\u6BCF\u6B21\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u8D44\u6E90\uFF0C \u5220\u9664\u4E0B\u9762\u8D44\u6E90\u53EF\u91CD\u65B0\u4E0A\u4F20 ":"",disabled:m.length>0,ghost:!0},S),t.a.createElement("span",{onClick:L,style:{marginLeft:10}},"(\u5355\u4E2A\u6587\u4EF6\u6700\u5927",C,"M)"," ")))}},"yTi+":function(U,X,x){U.exports=x.p+"static/AssistantCode3.fdd8db3c.jpeg"},"yi/R":function(U,X,x){"use strict";x.r(X);var I=x("oBTY"),_=x("bbsP"),O=x("/wGt"),y=x("T2oS"),v=x("W9HT"),o=x("0Owb"),g=x("jrin"),p=x("2qtc"),d=x("kLXV"),a=x("miYZ"),n=x("tsqr"),s=x("9og8"),t=x("tJVT"),i=x("PpiC"),e=x("k1fw"),r=x("ozfa"),c=x("MJZm"),u=x("WmNS"),f=x.n(u),m=x("q1tI"),l=x.n(m),E=x("Ty5D"),b=x("H65k"),D=x("+Axu"),C=x("f+oW"),w=x.n(C),S=x("bntm"),A=function(xe){var Ze,rt=xe.position,At=xe.subject,Pt=xe.score,vt=xe.onViewAllTask,it=Object(m.useState)(!1),It=Object(t.a)(it,2),Ct=It[0],_t=It[1],St=Object(E.h)();function Vt(){_t(!Ct),Object(S.a)()?Object(S.b)():Object(S.d)(document.getElementById("task-left-panel"))}var jt=function(){Object(S.a)()?_t(!0):_t(!1)};return Object(m.useEffect)(function(){return document.addEventListener(Object(S.c)(),jt),function(){document.removeEventListener(Object(S.c)(),jt)}},[]),l.a.createElement("div",{className:"task-header"},l.a.createElement("a",{title:"\u67E5\u770B\u5168\u90E8\u4EFB\u52A1",onClick:vt},l.a.createElement("img",{src:w.a,alt:"nav",width:45})),l.a.createElement("h3",{title:At},"\u7B2C",rt,"\u5173\uFF1A",At),l.a.createElement("span",null,Pt),!((St==null||((Ze=St.query)===null||Ze===void 0)?void 0:Ze.isFullScreen)==="true")&&l.a.createElement("a",{onClick:Vt,title:Ct?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},l.a.createElement("i",{className:Ct?"iconfont icon-shousuo c-grey-333 font16 ml10 current":"iconfont icon-zhankai c-grey-333 font16 ml10 current"})))},R=x("DjyN"),k=x("NUBc"),L=x("g9YV"),M=x("wCAj"),G=x("cWXX"),W=x("/ezw"),N=x("BdwD"),K=x("p4vh"),F=x.n(K),P=x("Q+I+"),B=x.n(P),J=x("Yr8L"),re=x.n(J),he=x("IZBM"),we=x("1vsH"),ke=x("wd/R"),ne=x.n(ke),Oe={0:F.a,1:B.a,2:re.a},Ce={loading:!0,page:1,data:null},fe;(function(xe){xe[xe.SET_LOADING=0]="SET_LOADING",xe[xe.SET_STATE=1]="SET_STATE",xe[xe.SET_PAGE=2]="SET_PAGE"})(fe||(fe={}));function oe(xe,Ze){switch(Ze.type){case fe.SET_LOADING:return Object(e.a)(Object(e.a)({},xe),{},{loading:Ze.payload});case fe.SET_STATE:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case fe.SET_PAGE:return Object(e.a)(Object(e.a)({},xe),{},{page:Ze.payload});default:throw new Error}}var se=function(xe){var Ze=xe.activeIndex,rt=xe.taskId,At=Object(m.useReducer)(oe,Ce),Pt=Object(t.a)(At,2),vt=Pt[0],it=Pt[1],It=vt.loading,Ct=vt.page,_t=vt.data,St=Object(m.useMemo)(function(){var jt=[{title:"\u6392\u540D",dataIndex:"user_name",align:"center",render:function(zt,qt,sn){var pn=(Ct-1)*10+sn+1;return pn<=3?l.a.createElement("img",{src:Oe[pn-1],alt:"rank",width:36}):pn}},{title:"\u59D3\u540D",dataIndex:"user_name"},{title:_t==null?void 0:_t.rank_data_name,dataIndex:"score",render:function(zt){return(_t==null?void 0:_t.open_rank)==="DEFAULT"?Object(we.bb)(zt):zt}},{title:"\u901A\u5173\u65F6\u95F4",dataIndex:"end_time",render:function(zt){return ne()(zt).format("YYYY-MM-DD HH:mm:ss")}}];return jt},[_t==null?void 0:_t.rank_data_name,_t==null?void 0:_t.open_rank,Ct]);Object(m.useEffect)(function(){function jt(){return kt.apply(this,arguments)}function kt(){return kt=Object(s.a)(f.a.mark(function zt(){var qt;return f.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:return pn.next=2,Object(he.t)(rt,{page:Ct,limit:10});case 2:qt=pn.sent,it({type:fe.SET_STATE,payload:{loading:!1,data:qt.data}});case 4:case"end":return pn.stop()}},zt)})),kt.apply(this,arguments)}Ze===4&&jt()},[Ct,Ze,rt]);function Vt(jt){it({type:fe.SET_PAGE,payload:jt})}return l.a.createElement("div",{className:"ranking-container"},It?l.a.createElement(W.a,{avatar:!0,paragraph:{rows:4}}):!_t||(_t==null?void 0:_t.rank_list_count)===0?l.a.createElement(N.a,null):l.a.createElement(l.a.Fragment,null,l.a.createElement(M.a,{pagination:!1,size:"middle",dataSource:_t.rank_list,columns:St}),_t.rank_list_count>10?l.a.createElement(k.a,{style:{marginTop:20},showQuickJumper:!0,showSizeChanger:!1,onChange:Vt,current:Ct,total:_t.rank_list_count}):null))},be=x("fXAG"),ie=x("9Bee"),de=x("M8RZ"),Fe=x("6lC8"),ae=x("mCJh"),Z=x("jb+D"),Y=x("dTJi"),q=x("pC0b"),ve=x("GzdX"),pe=x("OoWo"),Te="YYYY-MM-DD HH:mm",Ne=function(xe){var Ze=xe.challenge,rt=xe.position,At=xe.status,Pt=xe.get_gold,vt=xe.get_experience,it=xe.star,It=xe.tag_count,Ct=xe.finished_time,_t=xe.index,St=xe.view_answer_time,Vt=xe.name,jt=xe.identifier,kt=xe.identity,zt=xe.shixun,qt=xe.taskList,sn=xe.onSaveTaskStar,pn=Object(E.h)();function Sn(_n){sn(jt,_n,_t)}var Wn=At===2||zt.status<2||qt[_t-1]&&qt[_t-1].status===2||zt.task_pass||kt<=5;return l.a.createElement("div",{className:"task-item-container ".concat(Ze.position===rt?"active":""," ").concat(At===2?"finish":"")},l.a.createElement("div",{className:"flex-container challenge-title space-between"},Wn?l.a.createElement("a",{href:"/tasks/".concat(jt).concat(pn.search),onClick:function(gn){gn.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(jt).concat(pn.search)},300)}},"".concat(rt,". ").concat(Vt)," "):l.a.createElement("span",null,"".concat(rt,". ").concat(Vt)),l.a.createElement("i",{className:"iconfont icon-wancheng1 ".concat(At===2?"green":"")})),l.a.createElement("div",{className:"flex-container"},l.a.createElement("p",{className:At===2?"green":""},l.a.createElement("span",null,"\u7ECF\u9A8C\u503C")," ",At===2&&vt>0?"+":"",vt),l.a.createElement("p",{className:At===2?"green":""},l.a.createElement("span",null,"\u91D1\u5E01")," ",At===2&&Pt>0?"+":""," ",Pt),l.a.createElement("p",null,l.a.createElement("span",null,"\u6280\u80FD\u6807\u7B7E")," ",It||"\u65E0")),l.a.createElement("div",{className:"flex-container"},l.a.createElement("p",null,l.a.createElement("span",null,"\u5B8C\u6210\u65F6\u95F4"),Ct?ne()(Ct).format(Te):"--"),l.a.createElement("p",null,l.a.createElement("span",null,"\u67E5\u770B\u7B54\u6848\u65F6\u95F4"),St?ne()(St).format(Te):"--")),zt.status>=2?l.a.createElement("div",{className:"rate-container"},At===2&&it===0?l.a.createElement(m.Fragment,null,l.a.createElement("span",null,"\u7ED9\u4E2A\u8BC4\u5206\u5427\uFF1A"),l.a.createElement(ve.a,{defaultValue:0,onChange:Sn})):null,At===2&&it>0?l.a.createElement(m.Fragment,null,l.a.createElement("span",null,"\u5DF2\u8BC4\u5206\uFF1A"),l.a.createElement(ve.a,{value:it,disabled:!0}),l.a.createElement("span",{className:"highlight"},it,"\u5206")):null):null)},me=function(xe){var Ze=xe.taskList,rt=xe.challenge,At=xe.shixun,Pt=xe.identity,vt=xe.onSaveTaskStar,it=Object(E.h)().query;return l.a.createElement("div",{className:"task-nav-container"},!!it.coursesId&&l.a.createElement("p",{className:"task-tip"},l.a.createElement("div",null,l.a.createElement("span",null,"\u6E29\u99A8\u63D0\u793A: "),"\u82E5\u67E5\u770B\u7B54\u6848\u65F6\u95F4\u65E9\u4E8E\u5173\u5361\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4\uFF0C\u5C06\u5F71\u54CD\u8BFE\u5802\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u6210\u7EE9\u3002")),Ze.map(function(It,Ct){var _t=Object(e.a)(Object(e.a)({},It),{},{identity:Pt,index:Ct,challenge:rt,taskList:Ze,shixun:At,onSaveTaskStar:vt});return l.a.createElement(Ne,Object(o.a)({key:Ct},_t))}))},Ie=x("88g3"),_e=x.n(Ie),Ve=x("V0Rq"),tt=x("lzim"),Ge=x("HBuW"),Le=function(){var xe=Object(s.a)(f.a.mark(function Ze(rt,At,Pt,vt,it){var It,Ct;return f.a.wrap(function(St){for(;;)switch(St.prev=St.next){case 0:if(It=function(){it?Object(we.S)(Pt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)):window.location.href=Pt?"/tasks/".concat(Ct==null?void 0:Ct.identifier,"/jupyter"):"/tasks/".concat(Ct.game_identifier,"?subject_id=").concat(vt)},!Pt){St.next=7;break}return St.next=4,Object(Ge.D)({id:rt,challenge_id:At,subject_id:vt});case 4:St.t0=St.sent,St.next=10;break;case 7:return St.next=9,Object(Ge.E)({id:rt,challenge_id:At,subject_id:vt});case 9:St.t0=St.sent;case 10:if(Ct=St.t0,!(Ct!=null&&Ct.game_identifier||Ct!=null&&Ct.identifier)){St.next=22;break}if(!(Ct!=null&&Ct.access)){St.next=16;break}It(),St.next=21;break;case 16:if(!((Ct==null?void 0:Ct.access)==!1)){St.next=20;break}return n.b.warn("\u5F53\u524D\u5B9E\u8BAD\u4E0D\u652F\u6301\u8DF3\u5173\uFF0C\u5DF2\u4E3A\u60A8\u8DF3\u8F6C\u5230\u8BE5\u5B9E\u8BAD\u672A\u901A\u8FC7\u7684\u7B2C\u4E00\u4E2A\u5173\u5361"),setTimeout(function(){Le(rt,"",Pt,vt,it)},1e3),St.abrupt("return");case 20:It();case 21:return St.abrupt("return");case 22:(Ct==null?void 0:Ct.status)===-3?Object(we.q)():(Ct==null?void 0:Ct.status)===2?bt(Ct==null?void 0:Ct.message):(Ct==null?void 0:Ct.status)===3&&Re(Ct==null?void 0:Ct.message);case 23:case"end":return St.stop()}},Ze)}));return function(rt,At,Pt,vt,it){return xe.apply(this,arguments)}}(),bt=function xe(Ze){var rt;Ze=(rt=Ze)!==null&&rt!==void 0&&rt.includes(".json")?Ze:"".concat(Ze,".json"),d.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:l.a.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:function(){var At=Object(s.a)(f.a.mark(function vt(){var it,It;return f.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return _t.next=2,Object(Ve.T)({url:Ze});case 2:if(it=_t.sent,it){_t.next=5;break}return _t.abrupt("return");case 5:return n.b.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8BAD\uFF01"),_t.next=8,Object(Ge.E)({id:it.shixun_identifier});case 8:if(It=_t.sent,!(It!=null&&It.game_identifier)){_t.next=12;break}return Object(we.S)("/tasks/".concat(It.game_identifier)),_t.abrupt("return");case 12:(It==null?void 0:It.status)===2?xe(It==null?void 0:It.message):(It==null?void 0:It.status)===3&&Re(It==null?void 0:It.message);case 13:case"end":return _t.stop()}},vt)}));function Pt(){return At.apply(this,arguments)}return Pt}()})},Re=function(Ze){d.a.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:l.a.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",Ze,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Xe=c.a.DirectoryTree,et=function(xe){var Ze=xe.taskList,rt=xe.challenge,At=xe.shixun,Pt=xe.identity,vt=xe.onSaveTaskStar,it=xe.subject_id,It=Object(E.i)(),Ct=Object(E.h)().query,_t=Object(m.useState)([]),St=Object(t.a)(_t,2),Vt=St[0],jt=St[1],kt=Object(m.useState)([]),zt=Object(t.a)(kt,2),qt=zt[0],sn=zt[1],pn=Object(m.useState)(),Sn=Object(t.a)(pn,2),Wn=Sn[0],_n=Sn[1];Object(m.useEffect)(function(){gn(Ze),sn(gt({children:Ze},rt.id)),jt(Object(I.a)(Ze)),console.log("taskList:",Ze)},[Ze]);var gn=function rn(fn){fn.map(function(bn,Un){var zn;bn.index=Un,bn.title=bn.name,bn.id==rt.id&&_n(bn.key),(zn=bn.children)!==null&&zn!==void 0&&zn.length&&rn(bn.children)})},nn=function(fn,bn){console.log("Trigger Select",fn,bn),bn.node.shixun_identifier&&Le(bn.node.shixun_identifier,bn.node.key,!1,it)},Nn=function(){console.log("Trigger Expand")};function gt(rn,fn){var bn;return!rn||typeof rn!="object"?void 0:rn.id==fn?[]:rn.children.some(function(Un){return bn=gt(Un,fn)})?[].concat(Object(I.a)(bn),[rn.key]):void 0}return l.a.createElement("div",{className:"task-nav-container"},!!Ct.coursesId&&l.a.createElement("p",{className:"task-tip"},l.a.createElement("div",null,l.a.createElement("span",null,"\u6E29\u99A8\u63D0\u793A: "),"\u82E5\u67E5\u770B\u7B54\u6848\u65F6\u95F4\u65E9\u4E8E\u5173\u5361\u4EFB\u52A1\u5B8C\u6210\u65F6\u95F4\uFF0C\u5C06\u5F71\u54CD\u8BFE\u5802\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u6210\u7EE9\u3002")),!!(Vt!=null&&Vt.length)&&l.a.createElement("div",{style:{padding:10}},l.a.createElement(Xe,{className:_e.a.tree,icon:l.a.createElement("i",{className:"iconfont icon-wancheng1 "}),switcherIcon:l.a.createElement("i",{className:"iconfont icon-you1 ",style:{position:"relative",top:-2}}),onSelect:nn,onExpand:Nn,selectedKeys:[Wn],defaultExpandedKeys:Object(I.a)(qt),treeData:Vt,titleRender:function(fn,bn,Un){return l.a.createElement("span",{className:"".concat(rt.id==fn.id?_e.a.active:""," multi_ellipsis1"),style:{paddingRight:34}},fn.item_type==="Shixun"&&l.a.createElement("i",{class:"iconfont icon-shixunti2 c-light-primary font20"}),fn.item_type==="Challenge"&&l.a.createElement("i",{style:{fontFamily:"monospace",position:"relative",top:fn.item_type==="Shixun"?-2:0}},"\uFF08",we.l[fn.index],"\uFF09"),l.a.createElement("span",{style:{position:"relative",top:fn.item_type==="Shixun"||fn.item_type==="Stage"?-2:0}},fn==null?void 0:fn.name),fn.item_type!=="Stage"&&l.a.createElement("i",{className:"iconfont icon-tasks-img c-grey-999 ".concat((fn==null?void 0:fn.status)==1&&"c-green-29b")},((fn==null?void 0:fn.status)==1||(fn==null?void 0:fn.status)==0)&&l.a.createElement("img",{src:tt.f,width:"16"}),(fn==null?void 0:fn.status)==2&&l.a.createElement("img",{src:tt.g,width:"16"}),(fn==null?void 0:fn.status)==3&&l.a.createElement("img",{src:tt.h,width:"16"})))}})))},Ye=x("Plam"),Me=x("gp9y"),Ke=x("Ot1p"),ge=function(xe){var Ze=xe.user_praise,rt=xe.praise_count,At=xe.praisePlus,Pt=xe.onCreateDiscuss,vt=xe.user,it=xe.userInfo,It=Object(m.useState)(!1),Ct=Object(t.a)(It,2),_t=Ct[0],St=Ct[1],Vt=Object(m.useState)(""),jt=Object(t.a)(Vt,2),kt=jt[0],zt=jt[1];function qt(_n){zt(_n)}function sn(){St(!0)}function pn(){St(!1)}function Sn(){return Wn.apply(this,arguments)}function Wn(){return Wn=Object(s.a)(f.a.mark(function _n(){return f.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(it!=null&&it.authentication){nn.next=3;break}return d.a.confirm({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u9700\u8981\u901A\u8FC7\u5B9E\u540D\u9A8C\u8BC1\u540E\uFF0C\u624D\u80FD\u8FDB\u884C\u8BC4\u8BBA\u64CD\u4F5C",okText:"\u524D\u5F80\u5B9E\u540D\u9A8C\u8BC1",cancelText:"\u53D6\u6D88",onOk:function(){window.open("/account/certification")}}),nn.abrupt("return");case 3:if(!(kt.trim()=="")){nn.next=6;break}return n.b.warn("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A"),nn.abrupt("return");case 6:Pt(kt),zt(""),St(!1);case 9:case"end":return nn.stop()}},_n)})),Wn.apply(this,arguments)}return l.a.createElement("div",{className:"comment-input-editor-container ".concat(_t?"active":""," ")},l.a.createElement("div",{className:_t?"text-area hide":"text-area"},l.a.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:sn}),l.a.createElement("a",{className:"c-light-black",onClick:At,title:Ze?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},l.a.createElement("i",{className:"mr3 ".concat(Ze?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," "),alt:"\u8D5E"}),rt?l.a.createElement("span",null,rt):"")),_t?l.a.createElement("div",{className:"input-mask",onClick:pn}):null,l.a.createElement("div",{className:_t?"md-container":"md-container hide"},l.a.createElement(Ke.a,{id:"discuss-input-editor",startInit:_t,miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:kt,height:240,onChange:qt}),l.a.createElement("div",{className:"tip-container",onClick:pn},l.a.createElement("p",null,"\u8BF7\u52FF\u7C98\u8D34\u7B54\u6848\uFF0C\u5426\u5219\u5C06\u9020\u6210\u8D26\u53F7\u7981\u7528\u540E\u679C\uFF01"),l.a.createElement("a",{className:"btn-send",style:{color:"#fff"},onClick:Sn},"\u53D1\u9001"))))},Ee=x("dhSg"),ce=x("/omn"),je=x("IxHN"),Qe=x("ARon"),te=function(xe){var Ze=xe.data;return l.a.createElement(m.Fragment,null,Ze&&Ze.map(function(rt){return l.a.createElement("div",{className:"choose-answer-item",key:rt.position},l.a.createElement("p",null,"\u7B2C",rt.position,"\u9898"),l.a.createElement(ie.a,{value:rt.answer}))}))},Je=x("DVFL"),ut=function(xe){var Ze=xe.data,rt=xe.onShowUnlockAnswerModal,At=xe.challenge,Pt=At!=null&&At.disable_copy?{pointerEvents:"none",userSelect:"none"}:{};return l.a.createElement(m.Fragment,null,Ze&&Ze.map(function(vt,it){var It=vt.answer_id,Ct=vt.answer_name,_t=vt.answer_contents,St=vt.view_time;return l.a.createElement("div",{className:"answer-item-container",style:Pt,key:It},l.a.createElement("div",{className:"flex-container"},l.a.createElement("span",{className:"level"}," \u7EA7\u522B",it+1,"\uFF1A "),l.a.createElement("span",{className:"name"},Ct),_t?l.a.createElement(m.Fragment,null,l.a.createElement("span",{className:"view-time"},St?ne()(St).format("YYYY-MM-DD HH:mm"):""),l.a.createElement("span",null,"\u5DF2\u89E3\u9501")):l.a.createElement("a",{onClick:rt},"\u89E3\u9501")),_t?l.a.createElement(ie.a,{value:_t}):null)}))},Be=function(xe){var Ze=xe.loading,rt=xe.data,At=xe.onShowTip,Pt=xe.st,vt=xe.challenge,it=Object(m.useRef)(null),It=Object(m.useRef)(null),Ct=Object(m.useRef)(null),_t=Object(m.useRef)(null),St=Object(m.useRef)({x:0,y:0});return Object(m.useEffect)(function(){if(it.current&&vt!==null&&vt!==void 0&&vt.disable_copy){function Vt(zt){St.current={x:zt.clientX,y:zt.clientY},clearTimeout(Ct.current),clearTimeout(_t.current),Ct.current=setTimeout(function(){It.current.style.left="".concat(St.current.x,"px"),It.current.style.top="".concat(St.current.y,"px"),It.current.style.display="block"},1e3),_t.current=setTimeout(function(){It.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)},3e3)}function jt(){It.current.style.display="none",clearTimeout(Ct.current),clearTimeout(_t.current)}function kt(zt){St.current={x:zt.clientX,y:zt.clientY}}return it.current.addEventListener("mouseenter",Vt),window.addEventListener("mousemove",kt),it.current.addEventListener("mouseleave",jt),function(){it.current.removeEventListener("mouseenter",Vt),window.removeEventListener("mousemove",kt),it.current.removeEventListener("mouseleave",jt)}}},[it==null?void 0:it.current,vt==null?void 0:vt.disable_copy]),l.a.createElement("div",{ref:it,className:"answer-container"},l.a.createElement("div",{ref:It,className:"answer-tips-css"},"\u7981\u6B62\u590D\u5236\u53C2\u8003\u7B54\u6848"),Ze?l.a.createElement(je.a,null):null,Pt===1?l.a.createElement(te,{data:rt}):l.a.createElement(ut,{data:rt,challenge:vt,onShowUnlockAnswerModal:At}))},qe=x("sRBo"),at=x("kaz8"),wt=x("gflZ"),ft=function(xe){var Ze=xe.data,rt=xe.selected_unlocked_answer_id,At=xe.selected_index,Pt=xe.onSelect;if(!Ze)return null;var vt=Ze.filter(function(It,Ct){return It.answer_contents?!1:(It.index=Ct,!0)});function it(It){var Ct=It.target,_t=Ct.value,St=Ct.checked;Pt(St?_t:null)}return l.a.createElement("table",{className:"unlock-answer-list"},l.a.createElement("thead",null,l.a.createElement("tr",null,l.a.createElement("th",null),l.a.createElement("th",null,"\u7EA7\u522B"),l.a.createElement("th",null,"\u540D\u79F0"),l.a.createElement("th",null,"\u6263\u5206\u5360\u6BD4"),l.a.createElement("th",null,"\u6263\u51CF\u91D1\u5E01"))),l.a.createElement("tbody",null,vt.map(function(It,Ct){return l.a.createElement("tr",{key:It.answer_id},l.a.createElement("td",null,l.a.createElement(at.a,{value:It.answer_id,onChange:it,checked:It.answer_id===rt||rt&&At>=Ct})),l.a.createElement("td",null,It.index+1),l.a.createElement("td",null,It.answer_name),l.a.createElement("td",null,It.answer_ratio,"%"),l.a.createElement("td",{className:"gold-color"},It.answer_score))})))},st=x("ErOA"),Pe=x("Q7Vx"),ze=function(xe){var Ze=xe.unity_3d_routes,rt=xe.onGetUnity3dMessage,At=xe.onEvaluateCallback,Pt=xe.taskData,vt=xe.userInfo,it=Object(m.useRef)(),It=Object(E.i)(),Ct=Object(m.useRef)(),_t=Object(m.useState)(!0),St=Object(t.a)(_t,2),Vt=St[0],jt=St[1],kt=Object(m.useState)({}),zt=Object(t.a)(kt,2),qt=zt[0],sn=zt[1];Object(m.useEffect)(function(){function gn(Nn){try{var gt=JSON.parse(Nn.data);rt(gt),gt.type==="getTaskData"&&Wn({taskData:Pt,userInfo:vt})}catch(rn){console.log("error:",rn,Nn)}}window.addEventListener("message",gn);var nn=Ee.a.subscribe("evaluate-unity3d-result",function(Nn){Wn(Nn),At&&At()});return function(){clearTimeout(it.current),window.removeEventListener("message",gn),nn()}},[]),Object(m.useEffect)(function(){Pt.challenge.thiry_party&&pn();var gn=Ee.a.subscribe("reset-linux-windos-vnc",function(){pn()}),nn=Ee.a.subscribe("vnc-reseting",function(){sn({}),jt(!0)});return function(){nn(),gn()}},[Pt]);var pn=function(){var gn=Object(s.a)(f.a.mark(function nn(){var Nn,gt,rn,fn,bn,Un,zn,Bn;return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.next=2,Object(st.a)("/api/myshixuns/".concat(Pt==null||((Nn=Pt.myshixun)===null||Nn===void 0)?void 0:Nn.identifier,"/start.json"),{method:"get",params:{game_id:Pt==null||((gt=Pt.game)===null||gt===void 0)?void 0:gt.id}});case 2:if(bn=ln.sent,jt(!1),!(bn!=null&&(rn=bn.data)!==null&&rn!==void 0&&(fn=rn.data_list)!==null&&fn!==void 0&&fn.length)){ln.next=7;break}return Ee.a.publish("pod-restrict-data",{identifier:bn==null||((Un=bn.data)===null||Un===void 0)?void 0:Un.identifier,data_list:bn==null||((zn=bn.data)===null||zn===void 0)?void 0:zn.data_list}),ln.abrupt("return");case 7:bn!=null&&bn.data&&(bn.data.thiry_party_time=bn.data.remaining_time,bn.data.thiry_party_url=(bn==null||((Bn=bn.data)===null||Bn===void 0)?void 0:Bn.link_url)+"?t="+new Date().getTime(),sn(Object(e.a)({},bn.data||{}))),clearTimeout(it.current),it.current=setTimeout(function(){Sn()},bn.data.thiry_party_time-30*1e3);case 10:case"end":return ln.stop()}},nn)}));return function(){return gn.apply(this,arguments)}}(),Sn=function(){var gn=Object(s.a)(f.a.mark(function nn(){var Nn;return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.next=2,Object(st.a)("/api/tasks/".concat(It.taskId||taskId,"/extend_linux_vnc.json"),{method:"post",body:Object(e.a)({},It)});case 2:Nn=rn.sent,clearTimeout(it.current),it.current=setTimeout(function(){Sn()},Nn.data.remaining_time-30*1e3);case 5:case"end":return rn.stop()}},nn)}));return function(){return gn.apply(this,arguments)}}();function Wn(gn){Ct.current&&Ct.current.contentWindow.postMessage(JSON.stringify(gn),"*")}function _n(){jt(!1),Ee.a.publish("unity3d-load-end")}return l.a.createElement(m.Fragment,null,Vt?l.a.createElement(je.a,{className:"c-white",message:"\u6B63\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D..."}):null,(Ze||qt.thiry_party_url)&&l.a.createElement("iframe",{onLoad:_n,className:"unity3d-panel",ref:Ct,allow:"geolocation document-domain",sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation",src:Ze||qt.thiry_party_url}))},yt=x("BjJ7"),pt=x("kaH+");function Bt(xe){var Ze=xe.target;if(Ze.tagName.toUpperCase()==="IMG"){var rt=Ze.src||Ze.getAttribute("src");rt&&rt.indexOf("/images/avatars/User")===-1&&(xe.stopPropagation(),xe.preventDefault(),Ee.a.publish("preview-image",rt))}}var Ht={showTaskList:!1,activeIndex:0,taskList:[],enlarge_unity3D:!1,tab_fixed:!1,selected_unlocked_answer_id:null,isMultiLevel:!1,showTip:!1,answerScore:0,data:null,loading:!1};function lt(xe,Ze){switch(Ze.type){case be.A:return Object(e.a)(Object(e.a)({},xe),{},{activeIndex:Ze.payload});case be.bb:return Object(e.a)(Object(e.a)({},xe),{},{enlarge_unity3D:Ze.payload});case be.db:return Object(e.a)(Object(e.a)({},xe),{},{tab_fixed:Ze.payload});case be.Y:return Object(e.a)(Object(e.a)({},xe),{},{showTaskList:!0});case be.s:return Object(e.a)(Object(e.a)({},xe),{},{showTaskList:!1});case be.m:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case be.N:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case be.P:return Object(e.a)(Object(e.a)({},xe),{},{loading:!0});case be.Z:return Object(e.a)(Object(e.a)({},xe),{},{showTip:!0});case be.t:return Object(e.a)(Object(e.a)({},xe),{},{showTip:!1});case be.y:return Object(e.a)(Object(e.a)({},xe),{},{selected_unlocked_answer_id:Ze.payload});case be.g:return Object(e.a)(Object(e.a)({},xe),Ze.payload);default:throw new Error}}var Lt=function(xe){var Ze=xe.taskId,rt=xe.minuxUserGrade,At=xe.discusses_count,Pt=xe.is_teacher,vt=xe.has_answer,it=xe.user,It=xe.st,Ct=xe.game,_t=xe.rank_name,St=xe.challenge,Vt=xe.myshixun,jt=xe.user_praise,kt=xe.praise_count,zt=xe.unity_3d_routes,qt=xe.thiry_party_url,sn=xe.with_code_file,pn=xe.onPlusOrCancelPraise,Sn=xe.onEvaluateCallback,Wn=xe.onGetUnity3dMessage,_n=xe.shixun,gn=xe.taskData,nn=Object(m.useReducer)(lt,Ht),Nn=Object(t.a)(nn,2),gt=Nn[0],rn=Nn[1],fn=Object(m.useState)(!1),bn=Object(t.a)(fn,2),Un=bn[0],zn=bn[1],Bn=Object(m.useState)(!1),un=Object(t.a)(Bn,2),ln=un[0],yn=un[1],kn=Object(m.useState)({}),ar=Object(t.a)(kn,2),Br=ar[0],Cn=ar[1],ri=Object(E.h)().query,Ra=gt.taskList,Vi=gt.showTaskList,qr=gt.activeIndex,li=gt.enlarge_unity3D,Gn=gt.tab_fixed,kr=gt.data,Li=gt.answerScore,Ri=gt.loading,uo=gt.showTip,Da=gt.isMultiLevel,mi=gt.selected_unlocked_answer_id,za=Object(m.useMemo)(function(){var ur=0;if(kr&&mi){for(var Or=kr.filter(function(Ei){return!Ei.answer_contents}),Rr=0;Rr<Or.length;Rr++)if(Or[Rr].answer_id===mi){ur=Rr;break}}return ur},[kr,mi]),na=_n?_n.propaedeutics:null,la=Object(m.useRef)(),zo=St.open_rank;console.log(St,"challenge");var co=Object(m.useMemo)(function(){var ur=[{index:0,title:"\u4EFB\u52A1\u8981\u6C42"}];return na&&ur.push({index:1,title:"\u80CC\u666F\u77E5\u8BC6"}),vt&&ri.type!=="exercises"&&!(St!=null&&St.hide_answer)&&ur.push({index:2,title:"\u53C2\u8003\u7B54\u6848"}),ri.type!=="exercises"&&!(_n!=null&&_n.is_disable_discuss)&&ur.push({index:3,title:"\u8BC4\u8BBA"}),zo!=="CLOSE"&&ur.push({index:4,title:_t}),ur},[vt,na,zo,_t]);function ya(ur){var Or=parseInt(ur.currentTarget.id);Or===2?Ct.homework_common_answer_open?n.b.info("\u7981\u6B62\u67E5\u770B\u7B54\u6848"):eo():Or===3&&Ct.homework_common_comment_open?n.b.info("\u7981\u6B62\u67E5\u770B\u8BC4\u8BBA"):rn({type:be.A,payload:Or})}function eo(){return ho.apply(this,arguments)}function ho(){return ho=Object(s.a)(f.a.mark(function ur(){var Or;return f.a.wrap(function(Ei){for(;;)switch(Ei.prev=Ei.next){case 0:if(!(It===0)){Ei.next=5;break}return Ei.next=3,_o();case 3:Ei.next=9;break;case 5:return Ei.next=7,Object(he.q)(Ct.identifier);case 7:Or=Ei.sent,Ga(Or);case 9:case"end":return Ei.stop()}},ur)})),ho.apply(this,arguments)}function _o(){return Pa.apply(this,arguments)}function Pa(){return Pa=Object(s.a)(f.a.mark(function ur(){var Or,Rr,Ei;return f.a.wrap(function(Ti){for(;;)switch(Ti.prev=Ti.next){case 0:return Ti.next=2,Object(he.p)(Ct.identifier);case 2:if(Or=Ti.sent,Rr=Or.message,!(Rr.length===0)){Ti.next=7;break}return n.b.info("\u672C\u5173\u5361\u672A\u8BBE\u7F6E\u7B54\u6848"),Ti.abrupt("return");case 7:if(Rr.length){Ti.next=10;break}return rn({type:be.g,payload:{showTip:!0,isMultiLevel:!1,answerScore:Rr.answer_score,selected_unlocked_answer_id:Rr.answer_id}}),Ti.abrupt("return");case 10:Ei=Rr.filter(function($o){return $o.answer_contents}).length===0,rn({type:be.g,payload:{showTip:Ei,data:Rr,isMultiLevel:Rr.length>1,activeIndex:Ei?qr:2}});case 12:case"end":return Ti.stop()}},ur)})),Pa.apply(this,arguments)}function Ga(ur){var Or=ur.choose_answers,Rr=ur.message,Ei=ur.status;if(Ei===0){n.b.info(Rr);return}rn({type:be.g,payload:{showTip:Ei===1,data:Or,answerScore:Rr,loading:!1,activeIndex:Ei===1?qr:2}})}function Hr(){rn({type:be.t})}function yr(){rn({type:be.Z})}function Ui(){return Po.apply(this,arguments)}function Po(){return Po=Object(s.a)(f.a.mark(function ur(){var Or,Rr,Ei,br,Ti;return f.a.wrap(function(Qa){for(;;)switch(Qa.prev=Qa.next){case 0:if(zn(!0),!(It===1)){Qa.next=8;break}return Qa.next=4,Object(he.r)(Ct.identifier);case 4:Or=Qa.sent,(Or==null?void 0:Or.status)!==-1&&(rt(Li),Ga(Or)),Qa.next=14;break;case 8:if(!mi){Qa.next=14;break}return Qa.next=11,Object(he.u)(Ct.identifier,mi);case 11:Rr=Qa.sent,Ei=Rr.status,br=Rr.message,Ei===-1||(Da?(Ti=0,kr.filter(function(ds){return!ds.answer_contents}).forEach(function(ds,ro){ro<=za&&ds&&(Ti+=ds.answer_score)}),rt(Ti)):rt(Li),_o(),Va(null),rn({type:be.t}));case 14:zn(!1);case 15:case"end":return Qa.stop()}},ur)})),Po.apply(this,arguments)}function Va(ur){rn({type:be.y,payload:ur})}function ui(){return Ci.apply(this,arguments)}function Ci(){return Ci=Object(s.a)(f.a.mark(function ur(){var Or,Rr;return f.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:if(br.prev=0,!ri.subject_id){br.next=7;break}return br.next=4,Object(he.k)(Vt.identifier,Object(e.a)({},ri));case 4:Rr=br.sent,br.next=10;break;case 7:return br.next=9,Object(he.o)(Vt.identifier);case 9:Rr=br.sent;case 10:rn({type:be.m,payload:{taskList:((Or=Rr)===null||Or===void 0?void 0:Or.stages)||Rr,showTaskList:!0}}),br.next=16;break;case 13:br.prev=13,br.t0=br.catch(0),console.log(br.t0);case 16:case"end":return br.stop()}},ur,null,[[0,13]])})),Ci.apply(this,arguments)}function fa(ur,Or,Rr){return ua.apply(this,arguments)}function ua(){return ua=Object(s.a)(f.a.mark(function ur(Or,Rr,Ei){return f.a.wrap(function(Ti){for(;;)switch(Ti.prev=Ti.next){case 0:return Ti.prev=0,Ti.next=3,Object(he.H)(Or,_n.id,Rr);case 3:Ra[Ei].star=Rr,rn({type:be.N,payload:{taskList:Object(I.a)(Ra)}}),Ti.next=10;break;case 7:Ti.prev=7,Ti.t0=Ti.catch(0),console.log(Ti.t0);case 10:case"end":return Ti.stop()}},ur,null,[[0,7]])})),ua.apply(this,arguments)}function Ya(){ui()}function to(){rn({type:be.s})}Object(m.useEffect)(function(){if(!(_n!=null&&_n.identifier))return;var ur=Object(Z.t)({objective_type:"shixun",objective_id:_n==null?void 0:_n.identifier,school:1});ur.then(function(Or){var Rr;Cn(Object(e.a)({},Or)),yn(Or==null||((Rr=Or.shixun)===null||Rr===void 0)?void 0:Rr.own)})},[_n==null?void 0:_n.identifier]),Object(m.useEffect)(function(){return function(){rn({type:be.s}),rn({type:be.A,payload:0})}},[Ze]),Object(m.useEffect)(function(){rn({type:be.A,payload:ri.extra?3:0})},[ri.extra]),Object(m.useEffect)(function(){if(la.current)return la.current.addEventListener("mousedown",Bt),function(){la.current.removeEventListener("mousedown",Bt)}},[la.current]),Object(m.useEffect)(function(){if((sn&&zt||qt)&&la.current){var ur=Object(yt.b)(function(Rr){var Ei=Rr.target.scrollTop;Ei>=354?rn({type:be.db,payload:!0}):rn({type:be.db,payload:!1})},10);la.current.addEventListener("scroll",ur);var Or=Ee.a.subscribe("evaluate-unity3d-finish",function(){la.current.scrollTop=0});return function(){la.current.removeEventListener("scroll",ur),Or()}}},[sn,zt,qt,la.current]);var wa=St.position,Na=St.score,no=St.subject,ci={onViewAllTask:Ya,position:wa,score:Na,subject:no};function Pr(ur){return Sr.apply(this,arguments)}function Sr(){return Sr=Object(s.a)(f.a.mark(function ur(Or){var Rr;return f.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:return br.next=2,Object(ae.b)({content:Or,container_type:"Shixun",container_id:_n.id,challenge_id:St.id,position:wa});case 2:if(Rr=br.sent,!(Rr.status===-3)){br.next=6;break}return d.a.info({title:"\u63D0\u793A",className:"custom-modal-divider ",icon:null,content:"\u4F60\u7684\u8D26\u53F7\u56E0\u4E3A\u53D1\u5E03\u4E86\u4E0D\u5F53\u5185\u5BB9\uFF0C\u73B0\u5DF2\u5C06\u8BC4\u8BBA\u529F\u80FD\u5C4F\u853D\u3002",okText:"\u786E\u5B9A"}),br.abrupt("return");case 6:console.log(Rr),rn({type:be.A,payload:3}),Ee.a.publish("create-discuss");case 9:case"end":return br.stop()}},ur)})),Sr.apply(this,arguments)}function Bi(){rn({type:be.bb,payload:!li})}var Hi={loading:Ri,data:kr,onShowTip:yr,st:It,challenge:St};return l.a.createElement(m.Fragment,null,l.a.createElement(A,ci),l.a.createElement("div",{className:"content-wrapper",ref:la},zt&&sn?l.a.createElement("div",{className:"unity-3d-container ".concat(li?"enlarge":"")},l.a.createElement("a",{onClick:Bi,className:"btn-enlarge ".concat(li?"enlarge":"")},l.a.createElement("i",{className:"iconfont ".concat(li?"icon-suoxiao1":"icon-kuoda"," ")})),(Br==null?void 0:Br.user_id)&&l.a.createElement(ze,{userInfo:Br,taskData:gn,unity_3d_routes:zt,onGetUnity3dMessage:Wn,onEvaluateCallback:Sn})):null,l.a.createElement("ul",{className:"tab-nav ".concat(Gn?"tab-fixed":"")},co.map(function(ur){return l.a.createElement("li",{onClick:ya,id:ur.index,key:ur.title,className:qr===ur.index?"active":""},l.a.createElement("a",null,ur.title,ur.index===3&&At?l.a.createElement("span",null,At):null))})),l.a.createElement("div",{className:qr===0?"tab-panel-body ".concat(zt&&sn?"scroll-margin-top":""):"hide"},l.a.createElement(ie.a,{value:St.task_pass})),l.a.createElement("div",{className:qr===1?"tab-panel-body":"hide"},na?l.a.createElement(ie.a,{value:na}):null),l.a.createElement("div",{className:qr===2?"tab-panel-body":"hide",style:{padding:"0 0 20px 0"}},l.a.createElement(Be,Hi)),l.a.createElement("div",{className:qr===3?"tab-panel-body":"hide"},l.a.createElement(Ye.a,{activeIndex:qr,userInfo:Br,shixunIdentifier:_n.identifier,identity:it.identity,user:it,allowDisableDiscuss:ln,taskData:gn})),l.a.createElement("div",{className:qr===4?"tab-panel-body":"hide"},l.a.createElement(se,{activeIndex:qr,taskId:Ze})),ri.type!=="exercises"&&!(_n!=null&&_n.is_disable_discuss)&&!Ct.homework_common_comment_open&&l.a.createElement(ge,{user:it,userInfo:Br,user_praise:jt,praise_count:kt,praisePlus:pn,onCreateDiscuss:Pr})),l.a.createElement(de.a,null,l.a.createElement(O.a,{className:"task-drawer",width:420,title:null,placement:"left",closable:!1,visible:Vi,onClose:to,getContainer:function(){return document.getElementById("task-left-panel")}},ri.subject_id&&l.a.createElement(et,Object(o.a)({taskList:Object(I.a)(Ra),challenge:St,shixun:_n},ri,{identity:it.identity,onSaveTaskStar:fa})),!ri.subject_id&&l.a.createElement(me,{taskList:Object(I.a)(Ra),challenge:St,shixun:_n,identity:it.identity,onSaveTaskStar:fa})),l.a.createElement(d.a,{centered:!0,title:"\u63D0\u793A",visible:uo,onOk:Ui,onCancel:Hr,confirmLoading:Un,className:"answer-tip"},Pt?l.a.createElement("p",null,"\u5DF2\u7ECF\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7684\u6559\u5E08\u53EF\u4EE5\u514D\u91D1\u5E01\u67E5\u770B\u7B54\u6848\u54DF~"):l.a.createElement("p",null,"\u5148\u67E5\u770B\u53C2\u8003\u7B54\u6848\uFF0C\u518D\u901A\u8FC7\u8BC4\u6D4B\u7684\u5B66\u751F\uFF0C\u5B9E\u8BAD\u4F5C\u4E1A\u6709\u53EF\u80FD\u662F\u96F6\u5206\u54E6~"),Da?l.a.createElement(ft,{selected_index:za,selected_unlocked_answer_id:mi,onSelect:Va,data:kr}):l.a.createElement("p",null,"\u5C06\u6263\u9664".concat(Li,"\u70B9\u91D1\u5E01\uFF0C\u662F\u5426\u786E\u8BA4\u67E5\u770B\u7B54\u6848")),Pt?l.a.createElement("a",{href:"/account/certification",class:"to-certification-link",target:"_blank"},"\u7ACB\u5373\u8BA4\u8BC1"):null),l.a.createElement(pt.a,null)))},Dt=x("+L6B"),Mt=x("2/Rp"),Wt=x("aHsQ"),Yt=x("sGsY"),mn=x("55Ip"),Qt=x("6/vW"),$t=x("8Enf"),Kn=x("P2fV"),hn=x("NJEC"),Rn=x("5Dmo"),wn=x("3S7+"),Pn=x("fxth"),Yn=x.n(Pn),or=x("RCxd"),Xt=x("S+dL"),xn=x.n(Xt),Er=x("dViP"),nr=x("Bwpq"),Ir=x("H4Hw"),qn=x("Scqh"),ue=x("P5Jw"),V=x("LvDl");function Q(xe){var Ze=xe.onShowNotice,rt=xe.className,At=rt===void 0?"":rt;return l.a.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:Ze,className:At},l.a.createElement("img",{src:xn.a,alt:"notice"}))}var ee=function(xe){var Ze,rt=xe.loading,At=xe.lastedUpdateTime,Pt=xe.moveY,vt=xe.code_hidden,it=xe.hide_code,It=xe.gameStatus,Ct=xe.isEditPath,_t=xe.isNotice,St=xe.git_url,Vt=xe.taskData,jt=xe.onUpdateCode,kt=xe.onResetCode,zt=xe.onResetGitCode,qt=xe.onShowCodeSetting,sn=xe.onResetPassedCode,pn=xe.onShowDir,Sn=xe.onResizeCodeArea,Wn=xe.onShowNotice,_n=xe.onRightFullHandler,gn=xe.isResizeLarge,nn=Object(E.i)(),Nn=Object(E.h)(),gt=Object(m.useState)(!1),rn=Object(t.a)(gt,2),fn=rn[0],bn=rn[1];Object(m.useEffect)(function(){var ln=Ee.a.subscribe("runCodeFinish",function(){bn(!1)});return function(){ln()}},[]);var Un=function(){d.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:l.a.createElement(or.a,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:kt})},zn=function(){d.a.confirm({title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",icon:l.a.createElement(or.a,null),content:"\u60A8\u7684\u6240\u6709\u4EE3\u7801\u5C06\u88AB\u8FD8\u539F\u81F3\u521D\u59CB\u72B6\u6001\uFF0C\u4E0D\u5F71\u54CD\u901A\u5173\u72B6\u6001\u4E0E\u4F5C\u4E1A\u6210\u7EE9\u3002\u786E\u8BA4\u91CD\u7F6E\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:zt})},Bn=function(){var ln=Object(s.a)(f.a.mark(function yn(){return f.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(!fn){ar.next=2;break}return ar.abrupt("return");case 2:jt(),Object(he.v)(nn.taskId),bn(!0),Ee.a.publish("show-case-result",!0),setTimeout(function(){Ee.a.publish("runCode",{type:"start"})},100);case 7:case"end":return ar.stop()}},yn)}));return function(){return ln.apply(this,arguments)}}(),un=function(){var ln=Object(s.a)(f.a.mark(function yn(){return f.a.wrap(function(ar){for(;;)switch(ar.prev=ar.next){case 0:if(fn){ar.next=2;break}return ar.abrupt("return");case 2:Object(he.J)(nn.taskId),bn(!1),Ee.a.publish("runCode",{type:"stop"});case 5:case"end":return ar.stop()}},yn)}));return function(){return ln.apply(this,arguments)}}();return l.a.createElement(m.Fragment,null,l.a.createElement("span",{className:"".concat(Yn.a["edit-status"]," ml15")},rt?"\u4FDD\u5B58\u4E2D...":At===0?"\u5DF2\u4FDD\u5B58":"\u5DF2\u4FEE\u6539"),l.a.createElement("div",{className:Yn.a["action-bar"]},_t?l.a.createElement(wn.a,{visible:!0,title:l.a.createElement("span",{style:{color:"#000"}},"\u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u6709\u66F4\u65B0\u5566\uFF5E"),color:"#fff"},l.a.createElement(Q,{onShowNotice:Wn})):null,it!==2&&l.a.createElement(l.a.Fragment,null,vt?null:l.a.createElement("a",{title:"\u663E\u793A\u76EE\u5F55",onClick:pn},l.a.createElement("i",{className:"iconfont icon-wenjian "})),St?l.a.createElement(ue.CopyToClipboard,{text:St,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},l.a.createElement("a",{title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740"},l.a.createElement("i",{className:"iconfont icon-fuzhi2"}))):null,It===2&&Ct?l.a.createElement(hn.a,{placement:"bottomRight",title:"\u4F60\u5728\u672C\u5173\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u4E0A\u6B21\u901A\u8FC7\u7684\u4EE3\u7801?",onConfirm:sn},l.a.createElement("a",{title:"\u52A0\u8F7D\u4E0A\u6B21\u901A\u8FC7\u7684\u4EE3\u7801"},l.a.createElement("i",{className:"iconfont icon-fanhuishangcidaima font-20 "}))):null,Ct?l.a.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Un},l.a.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})):null,Ct&&l.a.createElement("a",{title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93",onClick:zn},l.a.createElement("i",{className:"iconfont icon-zhongzhidaimacangku font12 "})),l.a.createElement("a",{onClick:qt,title:"\u8BBE\u7F6E"},l.a.createElement("i",{className:"iconfont icon-shezhi"}))),!((Nn==null||((Ze=Nn.query)===null||Ze===void 0)?void 0:Ze.isFullScreen)==="true")&&l.a.createElement("a",{onClick:_n,title:gn?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},l.a.createElement("i",{className:gn?"iconfont icon-shousuo":"iconfont icon-zhankai"}))))},Se=x("14J3"),le=x("BMrR"),nt=x("jCWc"),Nt=x("kPKH"),Jt=x("UlFV"),an=x("hjEz"),Gt=x("9VGf"),Dn=x("Mm8t"),Xn=x.n(Dn),sr=x("9kvl"),Tr=function(xe){var Ze,rt=xe.isNotice,At=xe.moveY,Pt=xe.isActive,vt=xe.tabIndex,it=xe.webssh,It=xe.socketKeys,Ct=xe.onCloseSocket,_t=xe.onReCreateSocket,St=xe.onShowNotice,Vt=xe.sshConfigData,jt=xe.onResizeCodeArea,kt=xe.shixun,zt=xe.onRightFullHandler,qt=xe.isResizeLarge;console.log("sshConfigData:",Vt);var sn=Object(E.h)();return l.a.createElement("div",{className:"action-bar"},rt?l.a.createElement(Q,{onShowNotice:St}):null,it===3?l.a.createElement(rr,{sshConfigData:Vt,tabIndex:vt,isActive:Pt,socketKeys:It,onReCreateSocket:_t,onCloseSocket:Ct,shixun:kt}):Vt!=null&&Vt.remaining_time?l.a.createElement(rr,{sshConfigData:Vt,tabIndex:vt,isActive:Pt,socketKeys:It,onReCreateSocket:_t,onCloseSocket:Ct,shixun:kt}):null,!((sn==null||((Ze=sn.query)===null||Ze===void 0)?void 0:Ze.isFullScreen)==="true")&&l.a.createElement("a",{onClick:zt,title:qt?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F"},l.a.createElement("i",{className:qt?"iconfont icon-shousuo":"iconfont icon-zhankai"})))},gr=300;function rr(xe){var Ze=xe.isActive,rt=xe.socketKeys,At=xe.webssh,Pt=xe.onCloseSocket,vt=xe.onReCreateSocket,it=xe.sshConfigData,It=xe.tabIndex,Ct=xe.shixun,_t=(it==null?void 0:it.remaining_time)/1e3,St=Object(m.useState)(At===3?1800:_t),Vt=Object(t.a)(St,2),jt=Vt[0],kt=Vt[1],zt=Object(m.useState)(!1),qt=Object(t.a)(zt,2),sn=qt[0],pn=qt[1],Sn=Ct.identifier;Object(Gt.a)(function(){kt(jt-1)},Ze&&jt>0?1e3:null),Object(m.useEffect)(function(){var Bn=Ee.a.subscribe("on-operating-ssh",function(){(Ct==null?void 0:Ct.webssh)!=3&&kt(_t)}),un=Ee.a.subscribe("update-windows-time",function(yn){kt(parseInt(yn.remaining_time/1e3))}),ln=Ee.a.subscribe("on-recreate-socket",function(){vt()});return function(){un(),Bn(),ln()}},[]);function Wn(){sr.d.replace("/shixuns/".concat(Sn,"/challenges"))}function _n(){d.a.confirm({title:"\u547D\u4EE4\u884C\u91CD\u8FDE\u63D0\u9192",icon:l.a.createElement(or.a,null),content:"\u7531\u4E8E\u957F\u65F6\u95F4\u6CA1\u6709\u4F7F\u7528\uFF0C\u8D44\u6E90\u5DF2\u7ECF\u88AB\u56DE\u6536\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u91CD\u8FDE\u547D\u4EE4\u884C\u3002",centered:!0,okText:"\u91CD\u8FDE",cancelText:"\u9000\u51FA",onOk:rn,onCancel:Wn})}var gn=function(){d.a.confirm({title:"\u91CD\u7F6E\u547D\u4EE4\u884C",icon:l.a.createElement(or.a,null),content:"\u5B9E\u9A8C\u73AF\u5883\u5C06\u6062\u590D\u5230\u521D\u59CB\u72B6\u6001\uFF0C\u662F\u5426\u786E\u8BA4\u91CD\u7F6E\u5B9E\u9A8C\u73AF\u5883?",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:fn})};Object(m.useEffect)(function(){jt===0&&(Ct.webssh!=3&&_n(),rt.forEach(function(Bn){Ee.a.publish("close-socket",Bn)})),jt===gr&&Ct.webssh!=3&&pn(!0)},[jt]);function nn(){pn(!1)}function Nn(){Ct.webssh!=3&&pn(!0)}function gt(){kt(_t),Ee.a.publish("ssh-add-connect-time"),pn(!1)}function rn(){kt(_t),Ee.a.publish("create-socket",It)}function fn(){return bn.apply(this,arguments)}function bn(){return bn=Object(s.a)(f.a.mark(function Bn(){return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return rt.forEach(function(yn){Ee.a.publish("close-socket",yn)}),ln.next=3,Pt();case 3:kt(_t),vt();case 5:case"end":return ln.stop()}},Bn)})),bn.apply(this,arguments)}var Un=function(){d.a.confirm({title:"\u670D\u52A1\u9884\u89C8",content:"\u201C\u670D\u52A1\u9884\u89C8\u201D\u4F1A\u8BBF\u95EE\u547D\u540D\u884C\u5BB9\u5668\u76848081\u7AEF\u53E3\uFF0C\u5982\u679C\u7AEF\u53E3\u672A\u542F\u52A8\u4F1A\u5BFC\u81F4\u9884\u89C8\u5931\u8D25",okText:"\u7EE7\u7EED\u524D\u5F80",cancelText:"\u53D6\u6D88",onOk:function(){Object(we.S)(it==null?void 0:it.mapping_service_url)}})},zn=function(){d.a.info({title:"SSH\u76F4\u8FDE",width:600,centered:!0,content:l.a.createElement(l.a.Fragment,null,l.a.createElement(le.a,null,l.a.createElement(Nt.a,{flex:"50px"},"\u8D26\u53F7"),l.a.createElement(Nt.a,null,it==null?void 0:it.username)),l.a.createElement(le.a,null,l.a.createElement(Nt.a,{flex:"50px"},"\u5730\u5740"),l.a.createElement(Nt.a,null,it==null?void 0:it.ssh_address)),l.a.createElement(le.a,null,l.a.createElement(Nt.a,{flex:"50px"},"\u7AEF\u53E3"),l.a.createElement(Nt.a,null,it==null?void 0:it.port)),l.a.createElement(le.a,null,l.a.createElement(Nt.a,{flex:"50px"},"\u5BC6\u7801"),l.a.createElement(Nt.a,null,it==null?void 0:it.password)))})};return l.a.createElement(m.Fragment,null,jt>0&&jt<=gr&&Ct.webssh!=3?l.a.createElement(xr,{title:"\u8D44\u6E90\u56DE\u6536\u5012\u8BA1\u65F6\uFF0C\u70B9\u51FB\u53EF\u5EF6\u957F\uFF08\u6216\u8005\u64CD\u4F5C\u547D\u4EE4\u884C\u81EA\u52A8\u5EF6\u957F\uFF09",className:"c-red",time:jt,style:{display:"inline-block",margin:"0 10px 1px 0"},callback:Nn}):null,(it==null?void 0:it.mapping_service_url)&&l.a.createElement("a",{target:"_blank",onClick:function(un){un.preventDefault(),Un()},href:it==null?void 0:it.mapping_service_url},l.a.createElement(an.a,{className:"font14 c-blue"}),l.a.createElement("span",{className:"c-blue"}," \u670D\u52A1\u9884\u89C8")),l.a.createElement("a",{onClick:gn},l.a.createElement("i",{className:"iconfont icon-zhongzhi2 font-16 "}),l.a.createElement("span",null," \u91CD\u7F6E\u547D\u4EE4\u884C")),l.a.createElement("a",{onClick:zn},l.a.createElement("span",null,l.a.createElement("i",{className:"iconfont icon-congshulianjie font-16 "}),"SSH\u76F4\u8FDE")),l.a.createElement(de.a,null,l.a.createElement(d.a,{centered:!0,title:[l.a.createElement(or.a,{className:"modalIconYellow"}),"\u547D\u4EE4\u884C\u8FDE\u63A5\u65F6\u957F\u63D0\u9192"],wrapClassName:"customModalStyle",closable:!1,visible:sn&&jt>0,onOk:gt,onCancel:nn,okText:"\u7ACB\u5373\u5EF6\u957F",cancelText:"\u4E0D\u9700\u8981"},"\u547D\u4EE4\u884C\u5C06\u4E8E ",Math.round(jt/60)," \u5206\u949F\u540E\u4E2D\u65AD\uFF0C\u9700\u8981\u5EF6\u957F\u4F7F\u7528\u65F6\u95F4\u5417\uFF1F")))}function xr(xe){var Ze=xe.title,rt=xe.time,At=xe.className,Pt=At===void 0?"":At,vt=xe.callback,it=xe.desc,It=it===void 0?"":it,Ct=xe.style,_t=Ct===void 0?{}:Ct;function St(){vt&&vt()}return l.a.createElement("a",{onClick:St,title:Ze,className:Pt},l.a.createElement("img",{src:Xn.a,alt:"time",width:16,style:_t}),l.a.createElement("span",null,It?"".concat(It,"\uFF1A"):"",Object(Qt.b)(rt)))}var qi=x("5NDa"),Gr=x("5rEg"),ai=x("lOMy"),da=x("GIiI"),Fi=x("vS10"),ia=x("500L"),Ca=x("m3rI"),po=Object(m.forwardRef)(function(xe,Ze){var rt=xe.time;console.log("ScreenRecord:",Ze);var At=Object(m.useRef)(),Pt=Object(m.useState)(),vt=Object(t.a)(Pt,2),it=vt[0],It=vt[1],Ct=Object(m.useRef)(),_t=2e3,St=[];Object(m.useImperativeHandle)(Ze,function(){return{startScreenRecord:zt,downloadFile:kt}});function Vt(qt,sn){return jt.apply(this,arguments)}function jt(){return jt=Object(s.a)(f.a.mark(function qt(sn,pn){var Sn,Wn;return f.a.wrap(function(gn){for(;;)switch(gn.prev=gn.next){case 0:return Sn=[],gn.next=3,new MediaRecorder(sn);case 3:Wn=gn.sent,Wn.ondataavailable=function(nn){Sn.push(nn.data)},Wn.start(),Ct.current=Wn,window.recorderRefs=Wn,Wn.addEventListener("stop",function(nn){var Nn=URL.createObjectURL(Sn[0],{type:"video/mp4"});Object(we.x)("xxx.webm",Nn)});case 9:case"end":return gn.stop()}},qt)})),jt.apply(this,arguments)}function kt(){if(!window.recorderRefs){n.b.warn("\u60A8\u8FD8\u6CA1\u6709\u5F00\u542F\u89C6\u9891\u5F55\u5236\uFF0C\u8BF7\u5148\u53BB\u5F55\u5236\u89C6\u9891\u5427\uFF01");return}var qt=At.current.srcObject.getTracks();qt.forEach(function(sn){sn.stop()}),window.recorderRefs.addEventListener("dataavailable",function(sn){var pn=URL.createObjectURL(sn.data,{type:"video/mp4"});Object(we.x)("\u5C4F\u5E55\u5F55\u5236\u89C6\u9891.webm",pn)})}function zt(){navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}).then(function(qt){return At.current.srcObject=qt,St.push(qt),At.current.captureStream=At.current.captureStream||At.current.mozCaptureStream,new Promise(function(sn){return At.current.onplaying=sn})}).then(function(){return Vt(At.current.captureStream(),_t)}).then(function(qt){}).catch(function(qt){qt.name==="NotFoundError"?n.b.warn("\u627E\u4E0D\u5230\u6444\u50CF\u5934\u6216\u9EA6\u514B\u98CE\u3002\u65E0\u6CD5\u5F55\u5236."):n.b.warn(qt.name)})}return l.a.createElement("div",{style:{position:"absolute",top:"0",zIndex:-1}},l.a.createElement("video",{onPause:function(){},width:"60",height:"120",autoPlay:!0,muted:!0,ref:At}))}),so=po,xo={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},ka=function(xe){var Ze=xe.className,rt=xe.mirror_description,At=xe.git_url,Pt=xe.difficulty,vt=xe.task_pass,it=xe.test_set_permission,It=xe.onVncAction,Ct=xe.shixun,_t=xe.window_vnc_url,St=xe.linux_vnc,Vt=xe.vnc_url,jt=xe.position,kt=xe.unity_3d_routes,zt=Object(E.i)(),qt=Object(m.useState)("8082"),sn=Object(t.a)(qt,2),pn=sn[0],Sn=sn[1],Wn=Object(m.useState)(!1),_n=Object(t.a)(Wn,2),gn=_n[0],nn=_n[1],Nn=Object(m.useRef)(),gt=_t?"C:/Windows/AppReadiness/userfiles":"/data/workspace/userfiles",rn=_t?"C:/Windows/AppReadiness/downloadfiles":"/data/workspace/downloadfiles",fn=function(){d.a.confirm({title:"\u91CD\u542F\u4E91\u4E3B\u673A",icon:l.a.createElement(or.a,null),content:"\u60A8\u786E\u5B9A\u8981\u91CD\u542F\u4E91\u4E3B\u673A\u5417\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:function(){var ln=Object(s.a)(f.a.mark(function kn(){var ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(Fi.f)({identifier:zt.taskId});case 2:return ar=Cn.sent,(ar==null?void 0:ar.status)===0&&n.b.info("\u91CD\u542F\u6210\u529F"),Cn.abrupt("return","");case 5:case"end":return Cn.stop()}},kn)}));function yn(){return ln.apply(this,arguments)}return yn}()})},bn=function(){d.a.info({title:"\u6587\u4EF6\u4E0A\u4F20",icon:null,okText:"\u5173\u95ED",width:600,centered:!0,content:l.a.createElement("div",{className:"pt10"},l.a.createElement(ia.b,{isDragger:!0,maxSize:20,additionalText:'\u9ED8\u8BA4\u5B58\u653E\u76EE\u5F55\u8DEF\u5F84\u4E3A"'.concat(gt,'"'),action:"".concat(Ca.a.API_SERVER,"/api/tasks/").concat(zt.taskId,"/upload_file?debug=admin"),onChange:function(yn){yn.some(function(kn){var ar;return((ar=kn.response)===null||ar===void 0?void 0:ar.status)===0})&&(d.a.destroyAll(),n.b.info("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F")),console.log("fileList:",yn)}}))})},Un=function(){d.a.confirm({title:"\u4E0B\u8F7D\u4EE3\u7801",centered:!0,width:600,content:"\u4EE3\u7801\u4E0B\u8F7D\u529F\u80FD\uFF1A\u5C06\u201C".concat(rn,"\u201D\u76EE\u5F55\u8FDB\u884C\u6253\u5305\u5E76\u4E0B\u8F7D"),onOk:function(){var ln=Object(s.a)(f.a.mark(function kn(){return f.a.wrap(function(Br){for(;;)switch(Br.prev=Br.next){case 0:return Br.next=2,Object(st.a)("/api/tasks/".concat(zt.taskId,"/download_file?debug=admin"),{method:"post",body:{autoDownload:!0},headers:{responseType:"arraybuffer",Accept:"application/vnd.ms-excel;charset=utf-8"}});case 2:return Br.abrupt("return",!0);case 3:case"end":return Br.stop()}},kn)}));function yn(){return ln.apply(this,arguments)}return yn}()})},zn=function(){var ln,yn;(ln=Nn.current)===null||ln===void 0||((yn=ln.startScreenRecord)===null||yn===void 0)||yn.call(ln)},Bn=function(){var un=Object(s.a)(f.a.mark(function ln(){var yn,kn,ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return nn(!0),Cn.next=3,Object(st.a)("/api/tasks/".concat(zt.taskId,"/port_proxy"),{method:"post",body:{port:pn,position:jt}});case 3:kn=Cn.sent,kn!=null&&(yn=kn.data)!==null&&yn!==void 0&&yn.url&&Object(we.S)(kn==null||((ar=kn.data)===null||ar===void 0)?void 0:ar.url),nn(!1);case 6:case"end":return Cn.stop()}},ln)}));return function(){return un.apply(this,arguments)}}();return l.a.createElement("div",{className:"tpi-code-setting ".concat(Ze)},l.a.createElement("h3",null,"\u529F\u80FD"),l.a.createElement("section",null,l.a.createElement("a",{id:"full-screen",title:"\u5168\u5C4F",className:"file-item action",onClick:function(){It("full-screen")}}," ",l.a.createElement("i",{className:"iconfont icon-quanping"}),"\u5F00\u542F / \u9000\u51FA\u5168\u5C4F "),l.a.createElement("a",{id:"reset-task",onClick:function(){return It("reset-task")},className:"file-item action",title:"\u91CD\u7F6E\u5B9E\u8BAD"}," ",l.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u5B9E\u8BAD "),l.a.createElement("a",{id:"reset-code",onClick:function(){return It("reset-code")},className:"file-item action",title:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"}," ",l.a.createElement("i",{className:"iconfont icon-zhongzhishixun"}),"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93 "),!kt&&l.a.createElement(l.a.Fragment,null," ",(_t||St||Vt||(Ct==null?void 0:Ct.hide_code)===2||(Ct==null?void 0:Ct.webssh)===3)&&l.a.createElement(l.a.Fragment,null,l.a.createElement("a",{onClick:function(){return bn()},className:"file-item action",title:"\u4E0A\u4F20\u6587\u4EF6"}," ",l.a.createElement("i",{className:"iconfont icon-shangchuanshipin1"}),"\u4E0A\u4F20\u6587\u4EF6"),l.a.createElement("a",{onClick:function(){return Un()},className:"file-item action",title:"\u4E0B\u8F7D\u6587\u4EF6"}," ",l.a.createElement("i",{className:"iconfont icon-xiazai3"}),"\u4E0B\u8F7D\u6587\u4EF6"),l.a.createElement("a",{className:"file-item action w100",title:"\u670D\u52A1\u9884\u89C8"}," ",l.a.createElement("i",{className:"iconfont icon-suanfasheji"}),l.a.createElement(le.a,{align:"middle",className:"w100"},l.a.createElement(Nt.a,{flex:"1",onClick:Bn},l.a.createElement(Mt.a,{type:"text",loading:gn},l.a.createElement("span",{style:{color:"#ddd",marginLeft:-11}},"\u670D\u52A1\u9884\u89C8"))),l.a.createElement(Nt.a,null,l.a.createElement("a",{href:"javascript:;",onClick:Bn,className:"c-blue"},"\u7AEF\u53E3\u53F7")," ",l.a.createElement(Gr.a,{onChange:function(ln){return Sn(ln.target.value)},style:{width:50},value:pn}))))),_t&&l.a.createElement("a",{id:"reset-task",onClick:fn,className:"file-item action",title:"\u91CD\u542F\u4E91\u4E3B\u673A"}," ",l.a.createElement(da.a,{style:{marginRight:21,color:"#FFF"},className:"c-white font16"}),"\u91CD\u542F\u4E91\u4E3B\u673A "),(Ct==null?void 0:Ct.hide_code)!==2&&l.a.createElement("a",{id:"reset-task",onClick:function(){return It("reset-code")},className:"file-item action",title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"}," ",l.a.createElement("i",{className:"iconfont icon-zhongzhi font20",style:{marginRight:19}}),"\u6062\u590D\u521D\u59CB\u4EE3\u7801 "),At?l.a.createElement(ue.CopyToClipboard,{text:At,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},l.a.createElement("a",{id:"copy-git",title:"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740",className:"file-item action"}," ",l.a.createElement("i",{className:"iconfont icon-fuzhibanbenkudizhi1"}),"\u590D\u5236\u7248\u672C\u5E93\u5730\u5740 ")):null,!_t&&!St&&l.a.createElement("a",{id:"copy-cliboard",className:"file-item action",onClick:function(){It("show-clipboard-box")}}," ",l.a.createElement("i",{className:"iconfont icon-fuzhiniantie"}),"\u590D\u5236\u7C98\u8D34 "))),l.a.createElement("h3",null,"\u5173\u5361\u914D\u7F6E\u4FE1\u606F"),l.a.createElement("section",null,l.a.createElement("a",{className:"file-item",title:vt?"\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218":"\u4E0D\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218"},l.a.createElement("b",null,"\u8DF3\u5173"),l.a.createElement("span",null,vt?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),l.a.createElement("a",{className:"file-item",title:it?"\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9":"\u4E0D\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9"},l.a.createElement("b",null,"\u6D4B\u8BD5\u96C6\u89E3\u9501"),l.a.createElement("span",null,it?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8"))),l.a.createElement("h3",null,"\u5B9E\u8BAD\u57FA\u672C\u4FE1\u606F"),l.a.createElement("section",null,l.a.createElement("div",{className:"file-item"},l.a.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),l.a.createElement("span",null,xo[Pt])),l.a.createElement("div",{className:"file-item",style:{alignItems:"flex-start"}},l.a.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),l.a.createElement("span",{className:"vnc-desc",title:rt==null?void 0:rt.join(" ")},rt==null?void 0:rt.join(" ")))),l.a.createElement(so,{ref:Nn}))},Yi=x("l9Ud"),Nr=x.n(Yi),Qr;(function(xe){xe.Classrooms="classrooms",xe.Shixuns="shixuns",xe.Paths="paths",xe.Projects="projects",xe.Videos="videos",xe.Topics="topics",xe.Teach="teach-group"})(Qr||(Qr={}));var yi=function(Ze){var rt=Ze.userDetail,At=Ze.user,Pt=Ze.globalSetting,vt=Ze.loading,it=Ze.dispatch,It=Ze.onClose,Ct=Ze.shixun,_t=Object(i.a)(Ze,["userDetail","user","globalSetting","loading","dispatch","onClose","shixun"]),St=Object(E.i)(),Vt=Object(m.useState)([]),jt=Object(t.a)(Vt,2),kt=jt[0],zt=jt[1],qt=Object(m.useState)({}),sn=Object(t.a)(qt,2),pn=sn[0],Sn=sn[1],Wn=Object(m.useState)(0),_n=Object(t.a)(Wn,2),gn=_n[0],nn=_n[1],Nn=Object(m.useState)(Object(e.a)({page:1,limit:20,id:Ct.identifier},St)),gt=Object(t.a)(Nn,2),rn=gt[0],fn=gt[1],bn=Object(m.useCallback)(function(){return _t.visible},[_t.visible]);Object(m.useEffect)(function(){rn.page=1,Un()},[_t.visible]);var Un=function(){var zn=Object(s.a)(f.a.mark(function Bn(){var un;return f.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return yn.next=2,it({type:"shixunsDetail/getSetData",payload:rn});case 2:un=yn.sent,un&&(zt(Object(I.a)(un.data_sets)),nn(un.data_sets_count),Sn(un.folder_name));case 4:case"end":return yn.stop()}},Bn)}));return function(){return zn.apply(this,arguments)}}();return l.a.createElement(l.a.Fragment,null,!!kt.length&&_t.children,l.a.createElement(O.a,{title:"\u6570\u636E\u96C6",placement:"right",className:Nr.a.wrap,width:300,closable:!1,onClose:It,visible:bn()},l.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6570\u636E\u96C6\u8DEF\u5F84"),l.a.createElement("dl",{className:Nr.a.list},l.a.createElement(wn.a,{title:pn},l.a.createElement("dt",null,pn)),l.a.createElement("dd",null,l.a.createElement(ue.CopyToClipboard,{text:pn,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},l.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236")))),l.a.createElement("div",{className:"c-grey-999 font14 ml5 mb5"},"\u6587\u4EF6\u8DEF\u5F84"),kt==null?void 0:kt.map(function(zn,Bn){return l.a.createElement("dl",{className:Nr.a.list},l.a.createElement(wn.a,{title:zn.title},l.a.createElement("dt",null,l.a.createElement("span",{className:"icon-wenjian4 mr5"}),zn.title)),l.a.createElement("dd",null,l.a.createElement(ue.CopyToClipboard,{text:zn.file_path,onCopy:function(){return n.b.success("\u590D\u5236\u6210\u529F")}},l.a.createElement("span",{className:"".concat(Nr.a.copy," current")},"\u70B9\u51FB\u590D\u5236"))))}),l.a.createElement("div",{className:"tc"},l.a.createElement(k.a,{onChange:function(Bn){rn.page=Bn,Un()},className:Nr.a.page,size:"small",total:gn,pageSize:rn.limit,hideOnSinglePage:!0}))))},Fr=Object(sr.a)(function(xe){var Ze=xe.user,rt=xe.userDetail,At=xe.loading,Pt=xe.shixunsDetail,vt=xe.globalSetting;return{user:Ze,userDetail:rt,shixunsDetail:Pt,globalSetting:vt,loading:At.models.index}})(yi),wr=x("tUsH"),ei=x.n(wr),vr=x("1Zrr"),oi=x.n(vr),ir=x("Icgb"),Wi=x("bPs0"),Mi=Yt.a.Countdown;function $i(){return l.a.createElement("p",null,"\u684C\u9762\u7CFB\u7EDF\u5C06\u6062\u590D\u5230\u521D\u59CB\u72B6\u6001\uFF0C\u60A8\u5728\u7CFB\u7EDF\u4E2D\u521B\u5EFA\u7684\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931\u3002\u8BF7\u786E\u4FDD\u60A8\u7684\u6570\u636E\u5DF2\u4FDD\u5B58\uFF08\u5982\uFF1A\u7248\u672C\u5E93\u4EE3\u7801\u5DF2\u63A8\u9001\u5230\u670D\u52A1\u5668\uFF09\u3002\u662F\u5426\u786E\u8BA4\u91CD\u7F6E\uFF1F")}var mo=function(xe){var Ze,rt=xe.mirror_description,At=xe.difficulty,Pt=xe.git_url,vt=xe.vnc_url,it=xe.window_vnc_url,It=xe.linux_vnc,Ct=xe.isNotice,_t=xe.user,St=xe.game,Vt=xe.shixun,jt=Vt===void 0?{}:Vt,kt=xe.taskData,zt=kt===void 0?{}:kt,qt=xe.resetVncLoading,sn=xe.onUpdateCostTime,pn=xe.lastedGetTaskInfoTime,Sn=xe.onShowNotice,Wn=xe.onResetGitCode,_n=xe.onResetVnc,gn=xe.onBack,nn=xe.history,Nn=xe.onAddVncTime,gt=xe.onUpdateCode,rn=xe.unity_3d_routes,fn=xe.st,bn=jt.name,Un=jt.identifier,zn=jt.task_pass,Bn=jt.test_set_permission,un=St.cost_time,ln=St.status,yn=_t.user_url,kn=_t.image_url,ar=_t.grade,Br=ar===void 0?0:ar,Cn=Object(m.useState)(!1),ri=Object(t.a)(Cn,2),Ra=ri[0],Vi=ri[1],qr=Object(m.useState)({}),li=Object(t.a)(qr,2),Gn=li[0],kr=li[1],Li=Object(m.useState)("#FFF"),Ri=Object(t.a)(Li,2),uo=Ri[0],Da=Ri[1],mi=Object(m.useState)(null),za=Object(t.a)(mi,2),na=za[0],la=za[1],zo=Object(m.useState)(),co=Object(t.a)(zo,2),ya=co[0],eo=co[1],ho=Object(m.useState)(!1),_o=Object(t.a)(ho,2),Pa=_o[0],Ga=_o[1],Hr=Object(E.h)().query,yr=Object(m.useRef)(),Ui=Object(m.useRef)(),Po=Object(m.useRef)((jt==null?void 0:jt.webssh)===3?1:void 0);Object(m.useEffect)(function(){var ci=Ee.a.subscribe("taskTabIndex",function(Pr){(jt==null?void 0:jt.webssh)===3&&(Po.current=Pr)});return ci},[]),Object(m.useEffect)(function(){var ci;if(clearTimeout(yr.current),clearTimeout(Ui.current),Gn!=null&&(ci=Gn.exercise)!==null&&ci!==void 0&&ci.left_time){var Pr,Sr;if((Gn==null||((Pr=Gn.exercise)===null||Pr===void 0)?void 0:Pr.left_time)>1800){var Bi;Ui.current=setTimeout(function(){d.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670930\u5206\u949F",icon:l.a.createElement(ir.a,null),okText:"\u77E5\u9053\u4E86"})},((Gn==null||((Bi=Gn.exercise)===null||Bi===void 0)?void 0:Bi.left_time)-1800)*1e3)}if((Gn==null||((Sr=Gn.exercise)===null||Sr===void 0)?void 0:Sr.left_time)>900){var Hi;yr.current=setTimeout(function(){d.a.info({content:"\u5F53\u524D\u8DDD\u79BB\u8003\u8BD5\u7ED3\u675F\u8FD8\u670915\u5206\u949F",icon:l.a.createElement(ir.a,null),okText:"\u77E5\u9053\u4E86"})},((Gn==null||((Hi=Gn.exercise)===null||Hi===void 0)?void 0:Hi.left_time)-900)*1e3)}}},[Gn]),Object(m.useEffect)(function(){function ci(){return Pr.apply(this,arguments)}function Pr(){return Pr=Object(s.a)(f.a.mark(function Sr(){var Bi,Hi,ur,Or,Rr,Ei,br,Ti,$o,Qa;return f.a.wrap(function(ro){for(;;)switch(ro.prev=ro.next){case 0:if(!(Hr.type==="exercises")){ro.next=12;break}if(!(Hr.coursesId==="coursesId")){ro.next=7;break}return ro.next=4,Object(Ve.Y)({categoryId:Hr.exercisesId,login:Hr.login});case 4:Or=ro.sent,ro.next=10;break;case 7:return ro.next=9,Object(Ve.z)({categoryId:Hr.exercisesId,login:Hr.login});case 9:Or=ro.sent;case 10:kr(Object(e.a)({},Or)),(Bi=Or)!==null&&Bi!==void 0&&Bi.left_banner_id&&(Hi=Or)!==null&&Hi!==void 0&&(ur=Hi.exercise)!==null&&ur!==void 0&&ur.left_time&&(la(Date.now()+((Rr=Or)===null||Rr===void 0||((Ei=Rr.exercise)===null||Ei===void 0)?void 0:Ei.left_time)*1e3),setTimeout(function(){Da("red")},(((br=Or)===null||br===void 0||((Ti=br.exercise)===null||Ti===void 0)?void 0:Ti.left_time)-300>0?(($o=Or)===null||$o===void 0||((Qa=$o.exercise)===null||Qa===void 0)?void 0:Qa.left_time)-300:0)*1e3));case 12:case"end":return ro.stop()}},Sr)})),Pr.apply(this,arguments)}ci(),Ee.a.subscribe("update-windows-time",function(Sr){eo(parseInt(Sr.remaining_time/1e3))}),vt&&eo(1800)},[]),Object(m.useEffect)(function(){var ci;return Hr.type==="exercises"&&Gn!==null&&Gn!==void 0&&(ci=Gn.exercise)!==null&&ci!==void 0&&ci.screen_open&&(Wi.b.forEach(function(Pr,Sr){window.addEventListener(Pr,ui,!1),window.addEventListener("blur",ui,!1)}),window.focus()),function(){Wi.b.forEach(function(Pr,Sr){window.removeEventListener(Pr,ui,!1)}),window.removeEventListener("blur",ui,!1)}},[Gn]);var Va=function(){Ga(!Pa)},ui=function(Pr){window.parent.postMessage("backExercise","*"),Pr!=="back"&&Object(S.b)()};function Ci(){Vi(!Ra)}function fa(){Vi(!1)}function ua(){gn(),nn.replace("/shixuns/".concat(Un,"/challenges"))}function Ya(){if(qt)return;_n()}function to(){d.a.confirm({title:"\u9000\u51FA\u5B9E\u8BAD",icon:l.a.createElement(or.a,null),content:"\u60A8\u786E\u5B9A\u8981\u9000\u51FA\u5B9E\u8BAD\u5417\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:ua})}function wa(ci){if(fa(),ci==="reset-task"&&(qt||d.a.confirm({title:"\u91CD\u7F6E\u5B9E\u8BAD",icon:l.a.createElement(or.a,null),content:l.a.createElement($i,null),centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Ya})),ci==="reset-code"&&(qt||d.a.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:l.a.createElement(or.a,null),content:"\u60A8\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Wn})),ci==="full-screen")if(Object(S.a)())Object(S.b)();else{var Pr,Sr;Object(S.d)((Pr=document)===null||Pr===void 0||((Sr=Pr.getElementById)===null||Sr===void 0)?void 0:Sr.call(Pr,"task-right-panel"))}ci==="show-clipboard-box"&&Ee.a.publish("show-clipboard-box")}var Na={task_pass:zn,test_set_permission:Bn,mirror_description:rt,difficulty:At,resetVncLoading:qt,git_url:Pt,onVncAction:wa,window_vnc_url:it,linux_vnc:It,vnc_url:vt,shixun:jt,unity_3d_routes:rn,position:Po.current},no=Object(m.useCallback)(function(){return ya?(console.log("VncTimer:",ya),l.a.createElement(Ha,{defaultTime:ya,onAddVncTime:Nn,onReset:Ya,toShixun:ua,title:vt?"\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6":""})):null},[ya]);return l.a.createElement("div",{className:"task-header-container"},Hr.type!=="exercises"&&l.a.createElement(l.a.Fragment,null,l.a.createElement("a",{className:"task-user-info",href:yn,target:"_blank"},kn?l.a.createElement("img",{width:"35",height:"35",src:"".concat(Ca.a.IMG_SERVER,"/images/").concat(kn)}):null,l.a.createElement("span",null,_t.name)),l.a.createElement("div",{className:"grade-info"},l.a.createElement("img",{src:ei.a,alt:"gold",width:20}),Br)),l.a.createElement("h2",{className:"shixun-info"},bn,(Hr==null?void 0:Hr.type)!=="exercises"&&jt.hide_code!==2&&l.a.createElement(Qt.a,{lastedGetTaskInfoTime:pn,status:ln,defaultTime:un,onUpdateCostTime:sn,title:vt?"\u5B9E\u9A8C\u603B\u7528\u65F6":""})),l.a.createElement(l.a.Fragment,null,(vt||it||It||(zt==null?void 0:zt.virtual_machine)||(jt==null?void 0:jt.webssh)===3||jt.hide_code===2||rn)&&l.a.createElement("div",{className:"flex-container"},(Hr==null?void 0:Hr.type)!=="exercises"&&l.a.createElement(l.a.Fragment,null,it&&l.a.createElement(mn.a,{onClick:function(Pr){Pr.preventDefault(),Ee.a.publish("send-ctrl-alt-delete")},className:"c-grey-c mr20"},"\u53D1\u9001CTRL+ALT+DELETE"),Ct?l.a.createElement(Q,{className:"btn-notice",onShowNotice:Sn}):null,no()),l.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:Ci},l.a.createElement("img",{alt:"tool",src:oi.a,width:16}),"\u5DE5\u5177\u680F")),!it&&l.a.createElement(Fr,{visible:Pa,onClose:Va,shixun:jt},l.a.createElement("a",{className:"btn-vnc",title:"\u5DE5\u5177\u680F",onClick:Va},l.a.createElement("span",{className:"iconfont font14 mr5 icon-shujuji2 current"}),"\u6570\u636E\u96C6"))),Hr.type!=="exercises"&&l.a.createElement(l.a.Fragment,null,vt||it?l.a.createElement("a",{className:"btn-task-out",onClick:to,title:"\u9000\u51FA\u5B9E\u8BAD"},"\u9000\u51FA\u5B9E\u8BAD"):l.a.createElement("a",{className:"btn-out",onClick:to,title:"\u9000\u51FA\u5B9E\u8BAD"},l.a.createElement("i",{className:"iconfont icon-kaiguan"}))),(Gn==null||((Ze=Gn.exercise)===null||Ze===void 0)?void 0:Ze.left_time)&&l.a.createElement(l.a.Fragment,null,l.a.createElement("span",{style:{color:uo},className:"iconfont icon-kaoshishichang mr5"}),l.a.createElement("span",{className:"c-white mr20"},l.a.createElement(Mi,{className:"flex-wrp ",valueStyle:{color:uo,fontSize:12,fontWeight:"normal"},title:l.a.createElement("span",{style:{color:uo,fontSize:12}},"\u5269\u4F59\u65F6\u95F4\uFF1A"),value:na,onFinish:Object(s.a)(f.a.mark(function ci(){var Pr,Sr;return f.a.wrap(function(Hi){for(;;)switch(Hi.prev=Hi.next){case 0:return Hi.next=2,Object(Ve.Z)({categoryId:Hr.exercisesId,commit_method:2});case 2:Pr=Hi.sent,(Pr==null?void 0:Pr.status)===0&&(fn===0&>(1),d.a.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:l.a.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",l.a.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:function(){var ur=Object(s.a)(f.a.mark(function Rr(){return f.a.wrap(function(br){for(;;)switch(br.prev=br.next){case 0:window.parent.location.href="/classrooms/".concat(Hr.coursesId,"/exercise/").concat(Hr.exercisesId,"/detail");case 1:case"end":return br.stop()}},Rr)}));function Or(){return ur.apply(this,arguments)}return Or}()})),(Pr==null?void 0:Pr.status)===-3&&(Sr=parseInt(Pr==null?void 0:Pr.message),la(Date.now()+Sr*1e3));case 5:case"end":return Hi.stop()}},ci)}))}))),(Hr==null?void 0:Hr.type)==="exercises"&&l.a.createElement(Mt.a,{type:"primary",onClick:function(){fn===0&>(1),d.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc"},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u5DF2\u7ECF\u63D0\u4EA4\uFF1F"),onOk:function(){ui("back")}})}},l.a.createElement("span",{className:"iconfont icon-yiguanbi mr5 font14"})," \u8FD4\u56DE\u8BD5\u5377"),l.a.createElement(de.a,null,l.a.createElement(O.a,{width:280,className:"setting-drawer",title:null,placement:"right",closable:!1,visible:Ra,onClose:fa},l.a.createElement(ka,Na))))},Qi=300;function Ha(xe){var Ze=xe.onAddVncTime,rt=xe.onReset,At=xe.toShixun,Pt=xe.title,vt=Pt===void 0?"":Pt,it=xe.defaultTime,It=Object(m.useState)(it),Ct=Object(t.a)(It,2),_t=Ct[0],St=Ct[1],Vt=Object(m.useState)(!1),jt=Object(t.a)(Vt,2),kt=jt[0],zt=jt[1];Object(Gt.a)(function(){St(_t-1)},_t>0?1e3:null),Object(m.useEffect)(function(){_t===Qi&&zt(!0)},[_t]),Object(m.useEffect)(function(){it<Qi&&zt(!0),St(it)},[it]);function qt(){_t!==0?zt(!1):At()}function sn(){return pn.apply(this,arguments)}function pn(){return pn=Object(s.a)(f.a.mark(function Wn(){var _n;return f.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(zt(!1),!(_t>0)){nn.next=8;break}return nn.next=4,Ze();case 4:_n=nn.sent,St((_n==null?void 0:_n.remaining_time)/1e3),nn.next=10;break;case 8:St(it),rt();case 10:case"end":return nn.stop()}},Wn)})),pn.apply(this,arguments)}function Sn(){_t<Qi&&zt(!0)}return l.a.createElement(m.Fragment,null,l.a.createElement(xr,{callback:Sn,title:"\u5B9E\u9A8C\u73AF\u5883\u5012\u8BA1\u65F6",className:"btn-vnc ".concat(_t<Qi?"color-red":""," "),time:_t,desc:vt}),l.a.createElement(de.a,null,l.a.createElement(d.a,{title:[l.a.createElement(or.a,{className:"modalIconYellow"}),_t!==0?"\u5B9E\u9A8C\u73AF\u5883\u5EF6\u65F6\u63D0\u9192":"\u5B9E\u9A8C\u73AF\u5883\u91CD\u7F6E\u63D0\u9192"],closable:!1,centered:!0,wrapClassName:"customModalStyle",visible:kt,onOk:sn,onCancel:qt,okText:_t!==0?"\u7ACB\u5373\u5EF6\u957F":"\u91CD\u7F6E",cancelText:_t!==0?"\u4E0D\u9700\u8981":"\u9000\u51FA"},_t!==0?"\u5F53\u524D\u5B9E\u9A8C\u73AF\u5883\u5C06\u4E8E ".concat(Math.round(_t/60)," \u5206\u949F\u540E\u5173\u95ED\uFF0C\u9700\u8981\u5EF6\u957F\u4F7F\u7528\u65F6\u95F4\u5417\uFF1F"):"\u7531\u4E8E\u957F\u65F6\u95F4\u6CA1\u6709\u4F7F\u7528\uFF0C\u8D44\u6E90\u5DF2\u7ECF\u88AB\u56DE\u6536\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u91CD\u7F6E\u5B9E\u9A8C\u73AF\u5883\u3002")))}var La=x("zJix"),ti=x.n(La),Bo=x("KJ0q"),Ka=x("7Kak"),go=x("9yH6"),So={0:"A",1:"B",2:"C",3:"D",4:"E",5:"F",6:"G",7:"H",8:"I",9:"J",10:"K",11:"L",12:"M",13:"N"},Wa=function(xe){var Ze=xe.category,rt=xe.answer,At=rt===void 0?"":rt,Pt=xe.index,vt=xe.option_name,it=xe.callback,It=So[Pt];function Ct(){if(Ze===1)it(It);else{var _t=(At==null?void 0:At.split(""))||[],St=_t.indexOf(It);St>=0?_t.splice(St,1):_t.push(It),it(_t.join(""))}}return l.a.createElement("a",{className:"flex-container",onClick:Ct},l.a.createElement("span",{style:{position:"relative",top:4},className:"".concat(Ze===1?"radio":"checkbox"," ").concat(At&&At.indexOf(It)>=0?"active":"")}),l.a.createElement("div",{className:"flex-wrp"},l.a.createElement("span",{style:{lineHeight:1.7,fontSize:16,whiteSpace:"nowrap"}},It,"\u3001"),l.a.createElement(ie.a,{className:"subject-body",value:vt})))},Ho=function(xe){var Ze=xe.callback,rt=xe.multi_count,At=xe.answer,Pt=Object(m.useState)([]),vt=Object(t.a)(Pt,2),it=vt[0],It=vt[1];return Object(m.useEffect)(function(){if(rt){if(At!=null&&At.length){It(At);return}var Ct=Array.from({length:rt}).fill("");It(Ct)}},[rt,At]),console.log(it,At,"multi_count"),l.a.createElement("div",{className:"option"},it==null?void 0:it.map(function(Ct,_t){return l.a.createElement(le.a,{align:"middle",className:"mb10 text"},l.a.createElement("span",{className:"mb5"},"\u586B\u7A7A",_t+1,"\u7B54\u6848\uFF1A"),l.a.createElement(Gr.a.TextArea,{key:_t,value:Ct,onChange:function(Vt){it[_t]=Vt.target.value,Ze(it)}}))}))},Qn=function(xe){var Ze=xe.id,rt=xe.answer,At=xe.challenge_question,Pt=xe.category,vt=xe.subject,it=xe.onSetAnswers,It=xe.question_name,Ct=xe.multi_count;function _t(St){it(Ze,St)}return l.a.createElement("li",null,l.a.createElement(le.a,{className:"subject c-grey-999",align:"stretch"},l.a.createElement(Nt.a,{flex:"40px"},l.a.createElement("p",{className:"mt3"},Ze+1,"\u3001")),l.a.createElement(Nt.a,{flex:"1"},l.a.createElement(ie.a,{value:"".concat(vt),className:"subject-body"}))),It==="\u5355\u9009\u9898/\u591A\u9009\u9898"&&l.a.createElement("div",{className:"option"},At==null?void 0:At.map(function(St,Vt){var jt=St.option_name;return l.a.createElement(Wa,{index:Vt,key:jt,option_name:jt,answer:rt,category:Pt,callback:_t})})),It==="\u5224\u65AD\u9898"&&l.a.createElement("div",{className:"option"},l.a.createElement(go.a.Group,{className:"mb10",value:rt||void 0,onChange:function(Vt){return _t(Vt.target.value)}},l.a.createElement(go.a,{value:"true",className:"mr40"},"\u6B63\u786E"),l.a.createElement(go.a,{value:"false"},"\u9519\u8BEF"))),It==="\u586B\u7A7A\u9898"&&l.a.createElement(Ho,{multi_count:Ct,callback:_t,answer:rt}))},mr=function(xe){var Ze=xe.chooses,rt=xe.answers,At=xe.onSetAnswers;return l.a.createElement("ul",{className:"choose-container"},Ze.map(function(Pt,vt){var it=Pt.subject,It=Pt.challenge_question,Ct=Pt.category,_t=Pt.question_name,St=Pt.multi_count;return l.a.createElement(Qn,{key:vt,id:vt,subject:it,challenge_question:It,category:Ct,answer:rt[vt],onSetAnswers:At,question_name:_t,multi_count:St})}))},Jn=x("yqJW"),Lr=x("cf+g"),Kr=x.n(Lr),gi=x("UbZX"),cr=x.n(gi),Xi=x("LYID"),ga=x.n(Xi),jr=function(Ze){var rt=Ze.id,At=Ze.isActive,Pt=Ze.title,vt=Ze.onActive,it=Ze.had_submmit,It=Ze.result,Ct=Ze.actual_output,_t=Ze.standard_answer,St=Ze.question_name;function Vt(){vt(rt)}var jt="test-case-item";return At&&(jt+=" active"),it&&(jt+=" has-result"),l.a.createElement("li",{className:jt},l.a.createElement("a",{className:"case-header",onClick:Vt},l.a.createElement("h2",null,l.a.createElement("div",{className:At?"arrow-down":"arrow-right"}),l.a.createElement("span",{className:"test-title"},Pt)),it>0?l.a.createElement("img",{width:16,src:It?cr.a:ga.a}):l.a.createElement("i",{className:"iconfont icon-suo1"})),l.a.createElement("div",{className:"item-desc ".concat(At?"show":"hide"," choose-game-item")},it?It?St==="\u586B\u7A7A\u9898"?l.a.createElement(m.Fragment,null,l.a.createElement("p",null,l.a.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),l.a.createElement("b",null,_t==null?void 0:_t.map(function(kt,zt){var qt;return l.a.createElement("p",null,"\u586B\u7A7A",zt+1,"\uFF1A",kt==null||((qt=kt.text)===null||qt===void 0)?void 0:qt.join("\u3001"))}))),l.a.createElement("p",null,l.a.createElement("div",null,"\u4F60\u7684\u7B54\u6848\uFF1A"),l.a.createElement("b",{className:"c-red"},Ct==null?void 0:Ct.map(function(kt,zt){return l.a.createElement("p",null,"\u586B\u7A7A",zt+1,"\uFF1A",kt)})))):l.a.createElement(m.Fragment,null,l.a.createElement("p",null,"\u6B63\u786E\u9009\u9879\uFF1A",l.a.createElement("b",null,_t)),l.a.createElement("p",null,"\u4F60\u7684\u9009\u9879\uFF1A",l.a.createElement("b",{className:"c-red"},Ct))):l.a.createElement("p",null,"\u9519\u8BEF\uFF0C\u4E0D\u652F\u6301\u67E5\u770B"):l.a.createElement("p",null,"\u5C1A\u672A\u63D0\u4EA4\uFF0C\u6682\u4E0D\u652F\u6301\u67E5\u770B")))},qa=function(xe){var Ze=xe.onResizeSetContainer,rt=xe.moveY,At=xe.had_submmit,Pt=xe.test_sets,vt=Pt===void 0?[]:Pt,it=xe.challenge_chooses_count,It=xe.choose_correct_num,Ct=Object(m.useState)(-1),_t=Object(t.a)(Ct,2),St=_t[0],Vt=_t[1];function jt(qt){Vt(qt===St?-1:qt)}var kt=It===it;function zt(){Ze(rt)}return l.a.createElement(m.Fragment,null,l.a.createElement("div",{className:"test-header"},l.a.createElement("span",{className:"active"},"\u6D4B\u8BD5\u7ED3\u679C"),l.a.createElement("a",{onClick:zt},l.a.createElement("i",{className:"iconfont ".concat(rt===.01?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),At?l.a.createElement("p",{className:"test-result ".concat(kt?"success":"failer")},l.a.createElement("span",{className:"count"},l.a.createElement("img",{width:16,src:kt?cr.a:Kr.a}),It," / ",it," \u5171\u6709",it,"\u9898\uFF0C"),l.a.createElement("span",null,kt?"\u5168\u90E8\u901A\u8FC7":"\u5176\u4E2D".concat(it-It,"\u9898\u76EE\u7ED3\u679C\u4E0D\u5339\u914D\u3002\u8BE6\u60C5\u5982\u4E0B\uFF1A"))):null,l.a.createElement("ul",{className:"test-case-list"},vt.map(function(qt,sn){return l.a.createElement(jr,Object(o.a)({key:"item"+sn,had_submmit:At,title:"\u9898\u76EE".concat(sn+1)},qt,{isActive:St===sn,id:sn,onActive:jt}))})))},di=x("9odi"),Ai=x.n(di),va=x("VjRW"),Ma=x.n(va),Ko=function(xe){var Ze,rt=xe.st,At=xe.prev_game,Pt=xe.next_game,vt=xe.time_limit,it=xe.record_consume_time,It=xe.loading,Ct=xe.vnc_url,_t=xe.linux_vnc,St=xe.windows_vnc,Vt=xe.shixun,jt=xe.game,kt=xe.onRun,zt=xe.dispatch,qt=xe.onShowTestCaseList,sn=xe.chooses,pn=xe.unity_3d_routes,Sn=xe.user,Wn=xe.is_last_game,_n=xe.onUpdateCode,gn=xe.test_sets,nn=xe.challenge,Nn=xe.isU3d,gt=xe.game_report_id,rn=Object(E.i)(),fn=!Wn&&!It&&(Vt.status>0||(Sn==null?void 0:Sn.identity)<5),bn=rt===1&&jt.status===2,Un=["\u81EA\u6D4B\u8FD0\u884C","\u6B63\u5728\u542F\u52A8","\u505C\u6B62\u8FD0\u884C","\u6B63\u5728\u505C\u6B62"],zn=Object(m.useState)(0),Bn=Object(t.a)(zn,2),un=Bn[0],ln=Bn[1],yn=Object(m.useState)(0),kn=Object(t.a)(yn,2),ar=kn[0],Br=kn[1],Cn=Object(m.useState)(!1),ri=Object(t.a)(Cn,2),Ra=ri[0],Vi=ri[1],qr=Object(m.useState)(!1),li=Object(t.a)(qr,2),Gn=li[0],kr=li[1],Li=Object(m.useState)(gn==null||((Ze=gn[0])===null||Ze===void 0)?void 0:Ze.input),Ri=Object(t.a)(Li,2),uo=Ri[0],Da=Ri[1],mi=Object(m.useState)(!1),za=Object(t.a)(mi,2),na=za[0],la=za[1],zo=Object(m.useState)(Un[0]),co=Object(t.a)(zo,2),ya=co[0],eo=co[1],ho=Object(m.useRef)(!1),_o=Object(m.useState)(0),Pa=Object(t.a)(_o,2),Ga=Pa[0],Hr=Pa[1],yr=Object(E.h)();Object(m.useEffect)(function(){un>0&&setTimeout(function(){ln(un-1)},1e3)},[un]),Object(m.useEffect)(function(){Ga>0&&setTimeout(function(){Hr(Ga-1)},1e3)},[Ga]),Object(m.useEffect)(function(){ar>0&&setTimeout(function(){Br(ar-1)},1e3)},[ar]),Object(m.useEffect)(function(){var ui=Ee.a.subscribe("showRunCode",function(Ya){kr(Ya)}),Ci=Ee.a.subscribe("caseInputValue",function(Ya){Da(Ya)}),fa=Ee.a.subscribe("runCodeFinish",function(){ho.current=!1,la(!1),eo(Un[0]),Ga>0||Hr(5)}),ua=Ee.a.subscribe("eval-code-finish",function(){pn&&Vi(!0),rt===1||ln(10)});return function(){ua(),ui(),Ci(),fa()}},[]);var Ui=function(){ho.current=!1,eo(Un[3]),Ee.a.publish("runCode",{type:"stop"}),Object(he.J)(rn.taskId),setTimeout(function(){Ga>0||Hr(5),eo(Un[0]),la(!1),Hr(5)},2500)},Po=function(){var ui=Object(s.a)(f.a.mark(function Ci(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:return ho.current=!0,ua.next=3,_n();case 3:eo(Un[1]),Ee.a.publish("show-case-result",!0),setTimeout(Object(s.a)(f.a.mark(function Ya(){var to,wa,Na,no,ci;return f.a.wrap(function(Sr){for(;;)switch(Sr.prev=Sr.next){case 0:return Sr.next=2,Object(he.v)(rn.taskId,{test_case_content:uo});case 2:if(Na=Sr.sent,!(Na!=null&&(to=Na.data)!==null&&to!==void 0&&(wa=to.data_list)!==null&&wa!==void 0&&wa.length)){Sr.next=6;break}return Ee.a.publish("pod-restrict-data",{identifier:Na==null||((no=Na.data)===null||no===void 0)?void 0:no.identifier,data_list:Na==null||((ci=Na.data)===null||ci===void 0)?void 0:ci.data_list}),Sr.abrupt("return");case 6:Ee.a.publish("showRunCodeTab",!0),Ee.a.publish("runCode",{type:"start"});case 8:case"end":return Sr.stop()}},Ya)})),100),setTimeout(function(){ho.current&&(eo(Un[2]),la(!1))},1e3);case 7:case"end":return ua.stop()}},Ci)}));return function(){return ui.apply(this,arguments)}}(),Va=function(){var ui=Object(s.a)(f.a.mark(function Ci(){return f.a.wrap(function(ua){for(;;)switch(ua.prev=ua.next){case 0:la(!0),ya===Un[2]?Ui():Po();case 2:case"end":return ua.stop()}},Ci)}));return function(){return ui.apply(this,arguments)}}();return l.a.createElement("div",{className:Ai.a["action-container"]},l.a.createElement("div",{className:"flex-container ".concat(Ai.a["eval-desc"])},vt&&nn!==null&&nn!==void 0&&nn.with_code_file?l.a.createElement("span",null,"\u672C\u5173\u6700\u5927\u6267\u884C\u65F6\u95F4\uFF1A".concat(vt,"\u79D2")):null,it&&nn!==null&&nn!==void 0&&nn.with_code_file?l.a.createElement("span",null,"\u672C\u6B21\u8BC4\u6D4B\u8017\u65F6(\u7F16\u8BD1\u3001\u8FD0\u884C\u603B\u65F6\u95F4)\uFF1A",it," \u79D2"):null,gt?l.a.createElement("a",{target:"_blank",className:Ai.a.link,href:"/report/".concat(rn.taskId,"/").concat(gt)},"\u4EE3\u7801\u6027\u80FD\u68C0\u6D4B"):null,(Ct||St||_t||Nn)&&(nn==null?void 0:nn.with_code_file)&&l.a.createElement("a",{title:"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C",onClick:function(){Ee.a.publish("show-case-result")}},"\u663E\u793A/\u9690\u85CF\u6D4B\u8BD5\u7ED3\u679C")),l.a.createElement("div",{className:"flex-container ".concat(Ai.a["eval-btn-group"])},At&&!It?l.a.createElement("a",{href:"/tasks/".concat(At).concat(yr.search),onClick:function(Ci){Ci.preventDefault(),setTimeout(function(){return window.location.href="/tasks/".concat(At).concat(yr.search)},300)},className:Ai.a["ghost-link"]},"\u4E0A\u4E00\u5173"):null,fn?l.a.createElement("a",{href:"/tasks/".concat(Pt).concat(yr.search),onClick:function(Ci){if(Ci.preventDefault(),Vt.task_pass||jt.status===2||(Sn==null?void 0:Sn.identity)<5){setTimeout(function(){return window.location.href="/tasks/".concat(Pt).concat(yr.search)},300);return}d.a.warning({centered:!0,width:530,title:"\u63D0\u793A",okText:"\u6211\u77E5\u9053\u4E86",content:l.a.createElement("p",null,"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u8BBE\u7F6E\u4E86\u4E0D\u5141\u8BB8\u8DF3\u5173\u3002\u901A\u8FC7\u5F53\u524D\u5173\u5361\u540E\uFF0C\u624D\u80FD\u8FDB\u5165\u4E0B\u4E00\u5173\u3002")})},className:Ai.a["ghost-link"]},"\u4E0B\u4E00\u5173"):null,Ra&&(nn==null?void 0:nn.show_type)===1&&l.a.createElement("button",{onClick:function(){zt({type:"SHOW_PICTURE_VIEW"})},style:{minWidth:"72px",marginRight:10},className:"btn-run",title:"\u67E5\u770B\u6548\u679C"},"\u67E5\u770B\u6548\u679C"),!!Gn&&Vt.hide_code!==2&&!Nn&&l.a.createElement(Mt.a,{onClick:Object(V.throttle)(Va,2e3),loading:na,danger:!0,disabled:Ga>0,className:"".concat(Ai.a["btn-run-self"]," mr10")},Ga>0?"".concat(Ga,"S"):ya),(nn==null?void 0:nn.with_code_file)&&l.a.createElement("button",{onClick:Object(s.a)(f.a.mark(function ui(){return f.a.wrap(function(fa){for(;;)switch(fa.prev=fa.next){case 0:if(!(rt===1)){fa.next=4;break}if(!((sn==null?void 0:sn.length)<=0)){fa.next=4;break}return d.a.confirm({centered:!0,title:"\u63D0\u793A",content:l.a.createElement("div",{className:"tc"},l.a.createElement("p",null,"\u60A8\u8FD8\u672A\u6DFB\u52A0\u9898\u76EE\uFF0C\u8BF7\u6DFB\u52A0\u540E\u8BC4\u6D4B\uFF01")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88"}),fa.abrupt("return");case 4:return Vi(!1),fa.next=7,kt();case 7:case"end":return fa.stop()}},ui)})),style:{minWidth:"72px"},disabled:It||un>0,className:Ai.a["btn-run"],title:"\u8FD0\u884C\u8BC4\u6D4B"},un>0?"".concat(un,"S"):l.a.createElement(m.Fragment,null," ",l.a.createElement("img",{src:Ma.a,alt:"run",width:18})," ",l.a.createElement("b",null,"\u8BC4\u6D4B")," "))))};function hi(xe,Ze){switch(Ze.type){case be.f:return Object(e.a)(Object(e.a)({},xe),{},{loading:!0});case be.e:return Object(e.a)(Object(e.a)({},xe),{},{loading:!1});case be.B:return Object(e.a)(Object(e.a)({},xe),Ze.payload);default:throw new Error}}var Tn=function(xe){var Ze=xe.taskData,rt=xe.moveY,At=xe.onResizeYStart,Pt=xe.onResizeSetContainer,vt=xe.onEval,it=xe.lastedGetTaskInfoTime,It=xe.onUpdateCode,Ct=xe._dispatch,_t=Object(E.h)(),St=Ze.chooses,Vt=Ze.choose_test_cases,jt=Ze.game,kt=Vt.test_sets,zt=Vt.challenge_chooses_count,qt=Vt.choose_correct_num,sn=Vt.had_submmit,pn=Object(m.useCallback)(function(){var Bn=[];return Bn.length=zt,sn&&(Bn=kt.map(function(un){return un.question_name==="\u5224\u65AD\u9898"?un.actual_output==="\u6B63\u786E"?"true":un.actual_output==="\u9519\u8BEF"?"false":void 0:un.actual_output})),Bn},[it]),Sn=Object(m.useReducer)(hi,{loading:!1,answers:pn()}),Wn=Object(t.a)(Sn,2),_n=Wn[0],gn=Wn[1];Object(m.useEffect)(function(){gn({type:be.B,payload:{answers:pn()}})},[it]);var nn=_n.answers,Nn=_n.loading;function gt(Bn,un){nn[Bn]=un,gn({type:be.B,payload:{answers:nn}})}function rn(){for(var Bn=!0,un=0;un<zt;un++){var ln,yn;if(!nn[un]||Array.isArray(nn[un])&&!((ln=nn[un])!==null&&ln!==void 0&&(yn=ln.filter(function(kn){return!!kn}))!==null&&yn!==void 0&&yn.length)){n.b.info("\u8BF7\u5148\u7ED9\u7B2C".concat(un+1,"\u9898\u9009\u62E9\u7B54\u6848\uFF01")),Bn=!1;break}}return Bn}function fn(){return bn.apply(this,arguments)}function bn(){return bn=Object(s.a)(f.a.mark(function Bn(){var un,ln;return f.a.wrap(function(kn){for(;;)switch(kn.prev=kn.next){case 0:if(!rn()){kn.next=7;break}return gn({type:be.f}),kn.next=4,Object(he.i)(jt.identifier,{answer:nn,challenge_id:Ze==null||((un=Ze.challenge)===null||un===void 0)?void 0:un.id,subject_id:_t.query.subject_id||"",question_id:_t.query.questionId,exercise_id:_t.query.exercisesId});case 4:ln=kn.sent,vt(ln),gn({type:be.e});case 7:case"end":return kn.stop()}},Bn)})),bn.apply(this,arguments)}var Un=rt?"".concat(rt-54,"px"):"70%",zn="calc(100% - 3px - 51px - ".concat(Un,")");return l.a.createElement(m.Fragment,null,l.a.createElement("div",{className:ti.a["code-area-container"],style:{height:Un}},l.a.createElement(mr,{chooses:St,answers:nn,onSetAnswers:gt})),l.a.createElement("div",{className:ti.a["resize-y-bar"],onMouseDown:At,draggable:!1},l.a.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),l.a.createElement("div",{className:ti.a["test-set-container"],style:{height:zn}},l.a.createElement(qa,{had_submmit:sn,moveY:rt,onResizeSetContainer:Pt,test_sets:kt,challenge_chooses_count:zt,choose_correct_num:qt})),l.a.createElement("div",{className:ti.a["action-container"]},l.a.createElement(Ko,Object(o.a)({onUpdateCode:It},Ze,{loading:Nn,onRun:fn,dispatch:Ct}))))},tn=x("4K8j"),In=x("popq"),vn=x("362i"),er=x.n(vn),Ar=x("VPUa"),fi=x.n(Ar),bi=x("0i5U"),Ji=x.n(bi),Pi=function(xe){var Ze,rt=xe.star,At=xe.gold,Pt=xe.experience,vt=xe.next_game,it=xe.next_shixun,It=xe.subject_done,Ct=xe.onCloseResult,_t=xe.isPictureView,St=xe.webDisplayUrl,Vt=xe.onShowPictureView,jt=xe.history,kt=xe.onStarChange;function zt(){Ct(),console.log("`/tasks/${next_game}${location.search}`","/tasks/".concat(vt).concat(qt.search)),setTimeout(function(){window.location.href="/tasks/".concat(vt).concat(qt.search)},300)}var qt=Object(E.h)();return l.a.createElement("div",{className:"evaluate-result-container"},l.a.createElement("div",{className:"evaluate-result-body"},l.a.createElement("a",{className:"close-line",onClick:Ct},l.a.createElement("i",{className:"iconfont icon-roundclose",style:{fontSize:"32px"}})),!qt.query.subject_id&&l.a.createElement("img",{width:652,src:vt||!It?er.a:fi.a,alt:"\u901A\u5173"}),qt.query.subject_id&&l.a.createElement("img",{width:652,src:It?fi.a:er.a,alt:"\u901A\u5173"}),l.a.createElement("div",{className:"gold-and-experience"},l.a.createElement("p",{className:"flex-container"},l.a.createElement("span",{className:"gold-circle"})," +",At),l.a.createElement("p",{className:"flex-container"},l.a.createElement("img",{src:Ji.a})," +",Pt)),l.a.createElement("footer",null,rt?null:l.a.createElement(m.Fragment,null,l.a.createElement("p",{className:"star-tip"},"\u60A8\u7684\u8BC4\u4EF7\u51B3\u5B9A\u8001\u5E08\u7684\u6C5F\u6E56\u5730\u4F4D~"),l.a.createElement(ve.a,{defaultValue:0,allowClear:!1,onChange:kt})),l.a.createElement("div",{className:"tc"},vt?l.a.createElement("a",{onClick:zt},"\u4E0B\u4E00\u5173"):l.a.createElement("a",{onClick:Ct},"\u5B8C\u6210"),!!it&&l.a.createElement("a",{onClick:function(){Le(it,null,!1,qt.query.subject_id)}},"\u8FDB\u5165\u4E0B\u4E00\u4E2A\u5B9E\u8BAD"),_t?l.a.createElement("a",{onClick:function(){Vt(),Ct()}},"\u67E5\u770B\u6548\u679C"):null,St?l.a.createElement("a",{target:"_blank",href:St},"\u67E5\u770B\u6548\u679C"):null),(qt==null||((Ze=qt.query)===null||Ze===void 0)?void 0:Ze.subject_id)&&l.a.createElement("div",{className:"tc mt15"},it&&!vt&&"\u5DF2\u901A\u8FC7\u672C\u5B9E\u8BAD\u7684\u6700\u540E\u4E00\u4E2A\u5173\u5361\uFF0C\u53EF\u4EE5\u8FDB\u5165\u4E0B\u4E00\u4E2A\u5B9E\u8BAD\u4E2D\u8FDB\u884C\u5B9E\u6218",It&&"\u606D\u559C\u60A8\uFF0C\u672C\u5B9E\u8DF5\u8BFE\u7A0B\u7684\u6700\u540E\u4E00\u4E2A\u5B9E\u8BAD\u5DF2\u901A\u5173"))))},zi=x("bCnd"),Co=x("ZW9T"),Ea=x("p5ED"),Is=x("RTVd"),el=x.n(Is),xa=x("Tl6Z"),Wo=x.n(xa),tl=function(xe){var Ze=xe.content,rt=xe.language,At=xe.theme,Pt=xe.onCodeChange,vt=xe.onSave,it=xe.monacoOptions,It=xe.isEditPath,Ct=xe.hide_code,_t=xe.code_edit_permission,St=xe.onUpdateCode,Vt=xe.forbidCopy,jt=xe.filename,kt=xe.file_type,zt=xe.taskData,qt=Object(E.i)(),sn=Object(m.useRef)(),pn=Object(m.useState)(!0),Sn=Object(t.a)(pn,2),Wn=Sn[0],_n=Sn[1],gn=Object(m.useState)({}),nn=Object(t.a)(gn,2),Nn=nn[0],gt=nn[1];console.log("content:",{value:Ze,language:rt,theme:At,onChange:Pt,onSave:vt,forbidCopy:Vt,options:it,filename:jt,file_type:kt}),Object(m.useEffect)(function(){sn.current=setInterval(function(){St()},5*60*1e3),window.addEventListener("message",bn);var zn=Ee.a.subscribe("vnc-reseting",rn),Bn=Ee.a.subscribe("vnc-reseting-done",fn);return function(){zn(),Bn(),clearInterval(sn.current),window.removeEventListener("message",bn)}},[]);var rn=function(){gt({}),_n(!0)},fn=function(Bn){gt(Bn==null?void 0:Bn.data),setTimeout(function(){_n(!1)},1e3)},bn=function(Bn){switch(Bn.data){case"updatecode":St(1);break;case"vsLoadingDone":_n(!1);break}console.log("data:",Bn)},Un=function(){var zn=Object(s.a)(f.a.mark(function Bn(){var un,ln,yn,kn,ar,Br;return f.a.wrap(function(ri){for(;;)switch(ri.prev=ri.next){case 0:return ri.next=2,Object(st.a)("/api/myshixuns/".concat((un=zt.myshixun)===null||un===void 0?void 0:un.identifier,"/start.json"),{method:"get",params:Object(e.a)({},qt)});case 2:if(kn=ri.sent,!(kn!=null&&(ln=kn.data)!==null&&ln!==void 0&&(yn=ln.data_list)!==null&&yn!==void 0&&yn.length)){ri.next=6;break}return Ee.a.publish("pod-restrict-data",{identifier:kn==null||((ar=kn.data)===null||ar===void 0)?void 0:ar.identifier,data_list:kn==null||((Br=kn.data)===null||Br===void 0)?void 0:Br.data_list}),ri.abrupt("return");case 6:if(!((kn==null?void 0:kn.status)===-3)){ri.next=8;break}return ri.abrupt("return",new Promise(function(){var Ra=Object(s.a)(f.a.mark(function Vi(qr,li){return f.a.wrap(function(kr){for(;;)switch(kr.prev=kr.next){case 0:d.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var Li=Object(s.a)(f.a.mark(function uo(){return f.a.wrap(function(mi){for(;;)switch(mi.prev=mi.next){case 0:return clearTimeout(timeout.current),setPercent(0),mi.next=4,closeWindowsVnc(qt.taskId,kn==null?void 0:kn.message);case 4:return setLinkNum(linkNum+1),mi.abrupt("return");case 6:case"end":return mi.stop()}},uo)}));function Ri(){return Li.apply(this,arguments)}return Ri}()});case 1:case"end":return kr.stop()}},Vi)}));return function(Vi,qr){return Ra.apply(this,arguments)}}()));case 8:if(!((kn==null?void 0:kn.status)===-1)){ri.next=10;break}throw new String(kn==null?void 0:kn.message);case 10:return gt(kn==null?void 0:kn.data),Ee.a.publish("update-windows-time",kn==null?void 0:kn.data),ri.abrupt("return",kn);case 13:case"end":return ri.stop()}},Bn)}));return function(){return zn.apply(this,arguments)}}();return Object(m.useEffect)(function(){Ct===2&&Un()},[Ct]),l.a.createElement(m.Fragment,null,l.a.createElement("div",{className:"monaco-editor-container h100"},Ct!==2&&l.a.createElement(l.a.Fragment,null,It||_t?null:l.a.createElement("img",{className:el.a["only-view"],src:Wo.a,alt:"only-view"}),l.a.createElement(Ea.a,{filename:jt,type:kt==="office"?"download":kt,data:Ze,style:{top:40,position:"absolute",zIndex:1},monacoEditor:{value:Ze,language:rt,theme:At,onChange:Pt,onSave:vt,forbidCopy:Vt,options:it,insertSpaces:it.insertSpaces}})),Ct===2&&l.a.createElement(v.a,{spinning:Wn,wrapperClassName:el.a.frame},l.a.createElement("iframe",{src:Nn==null?void 0:Nn.link_url}))))},ot=x("b1fT"),xt=x.n(ot),Rt=x("je13"),ct=/<link(?:.*?)href=[\"\'](.+?)[\"\'](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/link>)*/im,Ue=/<script(?:.*?)src=[\"\'](.+?)[\"\'](?!<)(?:.*)\>(?:[\n\r\s]*?)(?:<\/script>)*/im,$e=["http","com","net","org","cdn"];function We(xe){for(var Ze=!1,rt=0;rt<$e.length;rt++)if(xe.indexOf($e[rt])!==-1){Ze=!0;break}return Ze}var dt=3e3,mt=function(xe){var Ze=xe.code,rt=Ze===void 0?"":Ze,At=xe.isActive,Pt=xe.myshixunIdentifier,vt=xe.lastedUpdateTime,it=xe.onFinishDisplayHtml,It=Object(m.useState)(0),Ct=Object(t.a)(It,2),_t=Ct[0],St=Ct[1],Vt=Object(E.i)(),jt=Object(m.useRef)(),kt=Object(m.useRef)(),zt="".concat(yt.a,"/api/myshixuns/").concat(Pt,"/html_content.html"),qt=Object(m.useMemo)(function(){var sn=[],pn=[],Sn=[],Wn=[],_n=document.createElement("iframe");_n.style.width="100%",_n.style.height="100%",_n.style.border="0";try{jt.current.innerHTML="",jt.current.appendChild(_n)}catch(un){}var gn=rt,nn=document.createElement("div");nn.innerHTML=rt,rt.replace(/<link [^>]*href=['"]([^'"]+)[^>]*>/gi,function(un,ln){pn.push(ln.indexOf("http")>-1?ln:"https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier="+Vt.taskId+"&path="+ln);var yn=ln.indexOf("http")>-1?ln:'<link href="https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier='+Vt.taskId+"&path="+ln+'" alt="" />';return yn}),rt.replace(/<script [^>]*src=['"]([^'"]+)[^>]*>/gi,function(un,ln){sn.push(ln.indexOf("http")>-1?ln:"https://data.educoder.net/api/sources/get_html_content.html?content_type=application/javascript&identifier="+Vt.taskId+"&path="+ln);var yn=ln.indexOf("http")>-1?ln:'<link href="https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier='+Vt.taskId+"&path="+ln+'" alt="" />';return yn}),rt=rt.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi,function(un,ln){var yn=ln.indexOf("http")>-1?un:un.replace(ln,"https://data.educoder.net/api/sources/get_html_content?content_type=application/octet-stream&identifier="+Vt.taskId+"&path="+ln);return yn}),rt=rt.replace(/<video [^>]*src=['"]([^'"]+)[^>]*>/gi,function(un,ln){var yn=ln.indexOf("http")>-1?un:'<video src="https://data.educoder.net/api/sources/get_html_content?content_type=application/octet-stream&identifier='+Vt.taskId+"&path="+ln+'" alt="" />';return yn}),rt.replace(/<script.*?>([\s\S]+?)<\/script>/gim,function(un,ln){Sn.push(ln)}),rt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(un,ln){Wn.push(ln)});for(var Nn=[],gt=[],rn=ct.exec(gn),fn=Ue.exec(gn);rn;){var bn=rn[0],Un=rn[1];We(Un)?gn=gn.replace(bn,bn.replace(/link/,"edulink")):(Nn.push(Un),gn=gn.replace(ct,"EDUCODERCSS")),rn=ct.exec(gn)}for(;fn;){var zn=fn[0],Bn=fn[1];We(Bn)?gn=gn.replace(zn,zn.replace(/script/g,"w3scrw3ipttag")):(gt.push(Bn),gn=gn.replace(Ue,"EDUCODERJS")),fn=Ue.exec(gn)}try{_n.contentWindow.document.write(nn.innerHTML),pn.map(function(un){var ln=document.createElement("link");ln.setAttribute("rel","stylesheet"),ln.href=un,_n.contentWindow.document.body.appendChild(ln)}),Wn.map(function(un){var ln=document.createElement("style");ln.innerHTML=un,_n.contentWindow.document.body.appendChild(ln)}),setTimeout(function(){},6e3)}catch(un){rt!=""&&!!rt&&setTimeout(function(){St(new Date().getTime())},1e3)}return{content:gn,css:Nn,script:gt}},[rt,_t]);return Object(m.useEffect)(function(){rt!=""&&!!rt&&St(_t+1)},[At]),Object(Gt.a)(function(){var sn=new Date().getTime();At&&kt.current&&vt&&sn>vt+dt},dt),Object(m.useEffect)(function(){kt.current&&qt&&qt.content},[kt.current,qt,zt]),l.a.createElement("div",{className:"html-code-view",style:{display:At?"block":"none",width:"100%",height:"100%"}},l.a.createElement("form",{ref:kt,method:"post",target:"my-frame"},l.a.createElement("input",{type:"hidden",name:"contents",value:qt.content}),l.a.createElement("input",{type:"hidden",name:"educodercss",value:qt.css}),l.a.createElement("input",{type:"hidden",name:"educoderscript",value:qt.script})),l.a.createElement("div",{id:"iframe",ref:jt,style:{background:"#fff",height:"100%",width:"100%"}}))},Ot=x("ZBwS"),Tt=x.n(Ot),Ut=x("Vbye"),Zt=x.n(Ut),cn=new Tt.a;cn.Diff_EditCost=8;var dn={oldStr:"",newStr:""};function An(xe,Ze){switch(Ze.type){case"init":return Object(e.a)(Object(e.a)({},xe),Ze.payload);default:throw new Error}}function _r(xe,Ze){var rt=/&/g,At=/</g,Pt=/>/g,vt=xe[0],it=xe[1]||"",It=it.replace(rt,"&").replace(At,"<").replace(Pt,">"),Ct=!It.trim();It=It=="\r"?"\u21B5":It;var _t=It=="\u21B5"?" ":It,St="".concat(Ct?Zt.a.empty:""," ").concat(It==="\u21B5"?Zt.a.enter:""),Vt="".concat(It==="\u21B5"?Zt.a.enter:"");if(Ze==="oldStr"){console.log("type:",Ze,Ot.DIFF_DELETE,Ot.DIFF_EQUAL,vt,It);switch(vt){case Ot.DIFF_DELETE:return'<span class="'.concat(Zt.a.block,'"><ins class="').concat(St,'">')+_t+"</ins></span>";case Ot.DIFF_EQUAL:return'<span class="'.concat(Vt,'">')+_t+"</span>"}}else switch(vt){case Ot.DIFF_INSERT:return'<span class="'.concat(Zt.a.block,'"><del class="').concat(St,'">')+_t+"</del></span>";case Ot.DIFF_EQUAL:return'<span class="'.concat(Vt,'">')+_t+"</span>"}}var Vr=function(xe){var Ze,rt,At=xe.output,Pt=xe.actual_output,vt=Object(m.useReducer)(An,dn),it=Object(t.a)(vt,2),It=it[0],Ct=it[1];return At=(Ze=At)===null||Ze===void 0?void 0:Ze.replace(/\n/g,"\r").replace(/\u0020/g," ").replace(/\u0000/g,"\\u0000"),Pt=(rt=Pt)===null||rt===void 0?void 0:rt.replace(/\n/g,"\r").replace(/\u0020/g," ").replace(/\u0000/g,"\\u0000"),Object(m.useEffect)(function(){var _t=cn.diff_main(At||"",Pt||"");cn.diff_cleanupEfficiency(_t);var St=_t.map(function(jt){return _r(jt,"oldStr")}).join(""),Vt=_t.map(function(jt){return _r(jt,"newStr")}).join("");Ct({type:"init",payload:{oldStr:St,newStr:Vt}})},[At,Pt]),l.a.createElement("div",{className:Zt.a["diff-panel-container"]},l.a.createElement("div",{dangerouslySetInnerHTML:{__html:It.oldStr}}),l.a.createElement("div",{dangerouslySetInnerHTML:{__html:It.newStr}}))},Mr=new Tt.a;Mr.Diff_EditCost=8;var Wr={oldStr:"",newStr:""};function Yr(xe,Ze){switch(Ze.type){case"init":return Object(e.a)(Object(e.a)({},xe),Ze.payload);default:throw new Error}}function Xr(xe,Ze){var rt=/&/g,At=/</g,Pt=/>/g,vt=xe[0],it=xe[1]||"",It=it.replace(rt,"&").replace(At,"<").replace(Pt,">"),Ct=!It.trim();if(Ze==="oldStr")switch(vt){case Ot.DIFF_DELETE:return"<ins class=".concat(Ct?"empty":"",">")+It+"</ins>";case Ot.DIFF_EQUAL:return"<span>"+It+"</span>"}else switch(vt){case Ot.DIFF_INSERT:return"<del class=".concat(Ct?"empty":"",">")+It+"</del>";case Ot.DIFF_EQUAL:return"<span>"+It+"</span>"}}var zr=function(xe){var Ze,rt,At=xe.output,Pt=xe.actual_output,vt=xe.onClick,it=Object(m.useReducer)(Yr,Wr),It=Object(t.a)(it,2),Ct=It[0],_t=It[1];return At=(Ze=At)===null||Ze===void 0?void 0:Ze.replace(/\n/g,"\r"),Pt=(rt=Pt)===null||rt===void 0?void 0:rt.replace(/\n/g,"\r"),Object(m.useEffect)(function(){var St=Mr.diff_main(At||"",Pt||"");Mr.diff_cleanupEfficiency(St);var Vt=St.map(function(kt){return Xr(kt,"oldStr")}).join(""),jt=St.map(function(kt){return Xr(kt,"newStr")}).join("");_t({type:"init",payload:{oldStr:Vt,newStr:jt}})},[At,Pt]),l.a.createElement("div",{className:"c-white ".concat(Zt.a["diff-panel-container"]," ").concat(Zt.a["diff-panel-container-2"]," ").concat(vt?"current":""," "),onClick:function(){return vt==null?void 0:vt()}},l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ct.oldStr}}))},si=x("J66h"),Jr=function(xe){var Ze=xe.sshConfigData,rt=xe.tpId,At=Object(m.useState)([]),Pt=Object(t.a)(At,2),vt=Pt[0],it=Pt[1],It=Ze.link_url,Ct=Ze.port,_t=Object(m.useRef)(),St=Object(m.useRef)(),Vt=Object(m.useRef)(),jt=Object(m.useRef)(),kt=Object(m.useRef)(!1),zt=function(Wn){console.log("insertData:",Wn),vt.push(Wn),it(Object(I.a)(vt))};function qt(){Vt.current=new WebSocket(It),_t.current=Vt.current,Vt.current.onopen=function(){Vt.current.send(JSON.stringify({tp:"log",data:rt}))},Vt.current.onerror=function(Sn){console.log("------in socket error----",Sn,Vt.current,It)},Vt.current.onmessage=function(Sn){!kt.current,kt.current=!0;var Wn=si.Base64.decode(Sn.data.toString());Wn==="ProcessFinished"?(sn(),setTimeout(function(){Ee.a.publish("runCodeFinish")},1e3)):St.current||zt(Wn)},Vt.current.onclose=function(Sn){console.log("socket\u5173\u95ED\u94FE\u63A5",Sn)},Vt.current.ondisconnect=function(Sn){console.log("socket-disconnect:",Sn)}}var sn=function(){St.current=!0,it(Object(I.a)(vt))};Object(m.useEffect)(function(){var Sn=Ee.a.subscribe("runCode",function(Wn){Vt.current=void 0,console.log("lastedUpdateTime-runCode",Ee.a,Ee.a.channels),Wn.type==="start"?(St.current=!1,vt=[],it([]),qt()):sn()});return function(){Sn(),_t.current&&(_t.current.close(),console.log("socket\u94FE\u63A5\u4E3B\u52A8\u5173\u95ED"),kt.current=!1)}},[]),Object(m.useEffect)(function(){jt.current.scrollIntoView({behavior:"smooth",block:"end"})},[vt]);var pn=Object(m.useCallback)(function(){var Sn;return l.a.createElement("pre",{className:"font14 ml20 mr20"},(Sn=vt)===null||Sn===void 0?void 0:Sn.join(`
|
|
|
`))},[vt]);return l.a.createElement("div",{className:"xterm-panel pb10",ref:jt,style:{fontFamily:"monospace"}},vt==""&&!St.current&&l.a.createElement(je.a,null),pn())};function Zi(xe){var Ze,rt,At=xe.last_compile_output,Pt=xe.language,vt=xe.ts_mem,it=xe.ts_time,It=xe.input,Ct=xe.output,_t=xe.is_invisible,St=xe.actual_output,Vt=xe.is_file,jt=xe.input_file_url,kt=xe.output_file_url,zt=xe.is_public,qt=xe.result,sn=xe.compile_success,pn=xe.title,Sn=xe.isActive,Wn=xe.id,_n=xe.onActive,gn=xe.test_sets_view,nn=xe.allowed_unlock,Nn=xe.identity,gt=xe.taskData,rn=xe.setData,fn=xe.setMonacoValue,bn=Object(m.useState)(!1),Un=Object(t.a)(bn,2),zn=Un[0],Bn=Un[1],un=Ct;Vt&&(gt==null||((Ze=gt.user)===null||Ze===void 0)?void 0:Ze.identity)<5&&(_t=!1),_t&&(gt==null||((rt=gt.user)===null||rt===void 0)?void 0:rt.identity)>=5&&(Ct="\u8BE5\u9884\u671F\u8F93\u51FA\u4E0D\u53EF\u67E5\u770B");function ln(){zt||gn||Nn<=5?_n(Wn):nn?Ee.a.publish("unlock-test-case",Wn):n.b.info("\u672C\u6D4B\u8BD5\u96C6\u4E0D\u53EF\u89E3\u9501")}var yn=xt.a["test-case-item"];return Sn&&(yn+=" active"),At&&(yn+=" ".concat(xt.a["has-result"])),l.a.createElement("li",{className:yn},l.a.createElement("a",{className:xt.a["case-header"],onClick:ln},l.a.createElement("h2",null,l.a.createElement("div",{className:Sn?xt.a["arrow-down"]:xt.a["arrow-right"]}),l.a.createElement("span",{className:xt.a["test-title"]},pn)),l.a.createElement("div",{className:xt.a["case-info"]},vt?l.a.createElement("span",{className:xt.a.description},"\u6D88\u8017\u5185\u5B58",vt,"MB"):null,it?l.a.createElement("span",{className:xt.a.description}," ","\u4EE3\u7801\u6267\u884C\u65F6\u957F\uFF1A",it,"\u79D2"," "):null,zt?null:gn||Nn<=5?l.a.createElement("i",{className:"iconfont icon-jiesuo"}):l.a.createElement("i",{className:"iconfont icon-suo1"}),sn>0?l.a.createElement("img",{width:16,src:qt?cr.a:ga.a}):null)),l.a.createElement("div",{className:"".concat(xt.a["item-desc"]," ").concat(Sn?"show":"hide"," ").concat(xt.a["choose-game-item"])},It?l.a.createElement(le.a,null,l.a.createElement(Nt.a,{flex:"80px"},"\u6D4B\u8BD5\u8F93\u5165\uFF1A"),l.a.createElement(Nt.a,{flex:"1",style:{color:"#fff"}},l.a.createElement(zr,{onClick:Object(s.a)(f.a.mark(function kn(){var ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!Vt){Cn.next=12;break}return Cn.next=3,fetch(jt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 3:if(ar=Cn.sent,!(ar.status===-1)){Cn.next=6;break}return Cn.abrupt("return");case 6:return Cn.t0=fn,Cn.next=9,ar.text();case 9:Cn.t1=Cn.sent,(0,Cn.t0)(Cn.t1),setTimeout(function(){rn(jt)},200);case 12:case"end":return Cn.stop()}},kn)})),output:It}))):null,l.a.createElement("p",{className:xt.a["output-title-container"]},l.a.createElement("span",null,"\u2014\u2014 \u9884\u671F\u8F93\u51FA \u2014\u2014"),l.a.createElement("span",{className:xt.a["output-title"]},l.a.createElement("span",null,"\u2014\u2014 \u5B9E\u9645\u8F93\u51FA \u2014\u2014"),!Vt&&l.a.createElement("span",{className:"c-blue current",onClick:function(){return Bn(!zn)}},zn?"\u5C55\u793A\u683C\u5F0F\u5316\u8F93\u51FA":"\u5C55\u793A\u539F\u59CB\u8F93\u51FA"))),Vt&&l.a.createElement("div",{class:xt.a["diff-panel-container"]},l.a.createElement("div",{className:"tc"},_t?l.a.createElement("span",{style:{color:"#2ea44f"}},Ct):l.a.createElement("a",{class:"underline",onClick:Object(s.a)(f.a.mark(function kn(){var ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,fetch(kt,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:if(ar=Cn.sent,!(ar.status===-1)){Cn.next=5;break}return Cn.abrupt("return");case 5:return Cn.t0=fn,Cn.next=8,ar.text();case 8:Cn.t1=Cn.sent,(0,Cn.t0)(Cn.t1),setTimeout(function(){rn(kt)},200);case 11:case"end":return Cn.stop()}},kn)}))},Ct)),l.a.createElement("div",{className:"tc"},sn?l.a.createElement("a",{class:"underline",onClick:Object(s.a)(f.a.mark(function kn(){var ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return Cn.next=2,Object(st.a)(St,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:if(ar=Cn.sent,!(ar.status===-1)){Cn.next=5;break}return Cn.abrupt("return");case 5:fn(ar),setTimeout(function(){rn(St)},200);case 7:case"end":return Cn.stop()}},kn)}))},un):St)),!Vt&&!zn&&l.a.createElement(Vr,{output:Ct,actual_output:St}),!Vt&&zn&&l.a.createElement("div",{class:xt.a["diff-panel-container"]},l.a.createElement("div",{className:""},Ct),l.a.createElement("div",{className:""},St))))}var Zr=function(xe){var Ze,rt,At=xe.onResizeSetContainer,Pt=xe.moveY,vt=xe.taskData,it=xe.isHtml,It=xe.lastedUpdateTime,Ct=xe.content,_t=xe.myshixunIdentifier,St=xe.test_sets_view,Vt=xe.identity,jt=xe.language,kt=xe.allowed_unlock,zt=xe.test_sets,qt=zt===void 0?[]:zt,sn=xe.test_sets_count,pn=xe.sets_error_count,Sn=xe.last_compile_output,Wn=xe.onFinishDisplayHtml,_n=Object(m.useState)(-1),gn=Object(t.a)(_n,2),nn=gn[0],Nn=gn[1],gt=Object(m.useState)(""),rn=Object(t.a)(gt,2),fn=rn[0],bn=rn[1],Un=Object(m.useState)(""),zn=Object(t.a)(Un,2),Bn=zn[0],un=zn[1],ln=Object(m.useState)(it?0:1),yn=Object(t.a)(ln,2),kn=yn[0],ar=yn[1],Br=Object(m.useState)(!1),Cn=Object(t.a)(Br,2),ri=Cn[0],Ra=Cn[1];Object(m.useEffect)(function(){var kr,Li=Ee.a.subscribe("showRunCodeTab",function(uo){Ra(uo)}),Ri=Ee.a.subscribe("runCode",function(){ar(2)});return Ee.a.publish("caseInputValue",qt==null||((kr=qt[0])===null||kr===void 0)?void 0:kr.input),function(){Li(),Ri()}},[]);function Vi(kr){Nn(kr===nn?-1:kr)}function qr(){At(Pt)}function li(kr){ar(parseInt(kr.target.id,10))}var Gn={code:Ct,isActive:kn===0&&it,myshixunIdentifier:_t,onFinishDisplayHtml:Wn,lastedUpdateTime:It};return l.a.createElement(m.Fragment,null,l.a.createElement(Ea.a,{close:!0,data:fn,type:fn.length?"txt":"",onClose:function(){return bn("")},monacoEditor:{value:Bn,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}}}),l.a.createElement("div",{className:"test-header"},l.a.createElement("div",{className:"flex-container"},it?l.a.createElement("span",{id:0,onClick:li,className:kn===0?"active":""},"\u6548\u679C\u663E\u793A"):null,l.a.createElement("span",{id:1,onClick:li,className:kn===1?"active":""},"\u6D4B\u8BD5\u7ED3\u679C"),!!ri&&l.a.createElement("span",{id:2,onClick:li,className:kn===2?"active":""},"\u81EA\u6D4B\u8FD0\u884C\u7ED3\u679C")),l.a.createElement("a",{onClick:qr},l.a.createElement("i",{className:"iconfont ".concat(Pt===.01?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),l.a.createElement("section",{className:"test-case-run-wrp",style:{display:kn===2?"flex":"none",flex:1,flexDirection:"column",overflow:"auto",paddingLeft:20}},l.a.createElement(le.a,{className:"test-case-run-header"},l.a.createElement(Nt.a,{flex:"200px"},"- \u81EA\u6D4B\u8F93\u5165 -"),l.a.createElement(Nt.a,{flex:"1"},l.a.createElement("span",{className:"ml12"},"- \u8FD0\u884C\u7ED3\u679C -"))),l.a.createElement(le.a,{className:"h100 mr10 mb10"},l.a.createElement(Nt.a,{flex:"200px"},l.a.createElement(Gr.a.TextArea,{defaultValue:qt==null||((Ze=qt[0])===null||Ze===void 0)?void 0:Ze.input,style:{height:"calc(100% - 15px)"},onChange:function(Li){Ee.a.publish("caseInputValue",Li.target.value)}})),l.a.createElement(Nt.a,{flex:"1"},l.a.createElement("div",{style:{flex:1,position:"absolute",width:"100%",height:"100%",overflow:"auto"}},l.a.createElement(Jr,{sshConfigData:{link_url:"".concat(vt==null?void 0:vt.wss_url,"/log")},tpId:vt==null||((rt=vt.myshixun)===null||rt===void 0)?void 0:rt.id,sid:1}))))),l.a.createElement("section",{style:{display:kn===1?"block":"none",flex:1}},Sn?l.a.createElement("p",{className:"test-result ".concat(pn===0?"success":"failer")},l.a.createElement("span",{className:"count"},l.a.createElement("img",{width:16,src:pn===0?cr.a:Kr.a}),sn-pn,"/",sn),pn==0?l.a.createElement("span",{className:"count"},"\u5168\u90E8\u901A\u8FC7"):l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Sn}})):null,l.a.createElement("ul",{className:"test-case-list"},qt.map(function(kr,Li){return l.a.createElement(Zi,Object(o.a)({setData:bn,setMonacoValue:un,allowed_unlock:kt,identity:Vt,key:"item"+Li,test_sets_view:St,language:jt,last_compile_output:Sn,title:"\u6D4B\u8BD5\u96C6".concat(Li+1)},kr,{isActive:nn===Li,id:Li,taskData:vt,onActive:Vi}))}))),it?l.a.createElement(mt,Gn):null)};function dr(xe){var Ze=xe.isLarge,rt=xe.language,At=xe.test_sets,Pt=At===void 0?[]:At,vt=xe.test_sets_count,it=xe.allowed_unlock,It=xe.sets_error_count,Ct=xe.last_compile_output,_t=xe.test_sets_view,St=xe.identity,Vt=xe.onResizeSet,jt=Object(m.useState)(-1),kt=Object(t.a)(jt,2),zt=kt[0],qt=kt[1];function sn(pn){qt(pn===zt?-1:pn)}return l.a.createElement(m.Fragment,null,l.a.createElement("div",{className:"test-header"},l.a.createElement("span",{className:"active"},"\u6D4B\u8BD5\u7ED3\u679C"),l.a.createElement("a",{onClick:Vt},l.a.createElement("i",{className:"iconfont ".concat(Ze?"icon-shousuo":"icon-zhankai"," icon-zhankai")}))),Ct?l.a.createElement("p",{className:"test-result ".concat(It===0?"success":"failer")},l.a.createElement("span",{className:"count"},l.a.createElement("img",{width:16,src:It===0?cr.a:Kr.a}),vt-It,"/",vt),It==0?l.a.createElement("span",null,"\u5168\u90E8\u901A\u8FC7"):l.a.createElement("div",{dangerouslySetInnerHTML:{__html:Ct}})):null,l.a.createElement("ul",{className:"test-case-list"},Pt.map(function(pn,Sn){return l.a.createElement(Zi,Object(o.a)({allowed_unlock:it,identity:St,test_sets_view:_t,key:"item"+Sn,language:rt,last_compile_output:Ct,title:"\u6D4B\u8BD5\u96C6".concat(Sn+1)},pn,{isActive:zt===Sn,id:Sn,onActive:sn}))})))}var lr=x("Lmeb"),ni=x("qZJd"),pi=function(xe){var Ze=xe.taskData,rt=xe.evaluateLoading,At=xe.evaluateMessage,Pt=xe.language,vt=xe.onEval,it=Ze.vnc_url,It=Ze.shixun,Ct=Ze.test_sets,_t=Ze.test_sets_count,St=Ze.sets_error_count,Vt=Ze.last_compile_output,jt=Ze.game,kt=Ze.allowed_unlock,zt=Ze.user,qt=Object(m.useState)(!1),sn=Object(t.a)(qt,2),pn=sn[0],Sn=sn[1],Wn=Object(m.useState)(!1),_n=Object(t.a)(Wn,2),gn=_n[0],nn=_n[1];function Nn(){Sn(!pn)}function gt(){nn(!gn)}var rn={isLarge:pn,language:Pt,test_sets:Ct,test_sets_count:_t,sets_error_count:St,last_compile_output:Vt,allowed_unlock:kt,test_sets_view:jt.test_sets_view,identity:zt.identity,onResizeSet:Nn};function fn(){nn(!0),vt()}function bn(){nn(!gn)}return l.a.createElement(m.Fragment,null,l.a.createElement(ni.a,{vnc_url:it,window_vnc_url:Ze.windows_vnc,virtual_machine:Ze==null?void 0:Ze.virtual_machine,linux_vnc:Ze.linux_vnc,taskData:Ze}),gn?l.a.createElement("div",{className:"vnc-mask"}):null,l.a.createElement("div",{className:"vnc-test-list ".concat(pn?"large":gn?"pop":"")},l.a.createElement("div",{className:"vnc-test-list-body"},pn?null:l.a.createElement("span",{className:"arrow-container",onClick:gt},l.a.createElement("i",{className:"iconfont ".concat(gn?"icon-xiajiantou":"icon-shangjiantou"," ")})),rt?l.a.createElement(je.a,{message:At,style:{color:"#0152d9"}}):l.a.createElement(dr,rn))))},$n=x("DZo9"),vi=x("8z0m"),ea=x("z7Xi"),xi=x("NFKh"),Si=x.n(xi),Ii=x("7Cbv"),ha=x("mxV5"),Ta=x.n(ha),aa=x("taB1"),$a=x.n(aa),To=function(Ze){var rt="bf3c199c2470cb477d907b1e0917c17b",At="5183666c72eec9e4",Pt=Si.a.enc.Utf8.parse(rt),vt=Si.a.enc.Utf8.parse(At),it=Si.a.AES.decrypt(Ze,Pt,{iv:vt,mode:Si.a.mode.CBC});return it.toString(Si.a.enc.Utf8)},vo,Aa=function(Ze){var rt=Ze.user,At=Ze.cancelUpload,Pt=Ze.defaultFilelist,vt=Ze.getData,it=Object(i.a)(Ze,["user","cancelUpload","defaultFilelist","getData"]),It=Object(m.useState)([]),Ct=Object(t.a)(It,2),_t=Ct[0],St=Ct[1],Vt=Object(m.useState)(""),jt=Object(t.a)(Vt,2),kt=jt[0],zt=jt[1],qt=Object(m.useState)(),sn=Object(t.a)(qt,2),pn=sn[0],Sn=sn[1];Object(m.useEffect)(function(){Pt&&St(Object(I.a)(Pt))},[Pt]);var Wn={onPreview:function(Nn){zt(Nn.download_url)},onRemove:function(){var nn=Object(s.a)(f.a.mark(function gt(rn){var fn;return f.a.wrap(function(Un){for(;;)switch(Un.prev=Un.next){case 0:return Un.next=2,Object(st.a)("/api/tasks/".concat(it.identifier,"/destroy_attachment"),{method:"delete",body:{id:rn.id}});case 2:fn=Un.sent,vt(),St(Object(I.a)(_t.filter(function(zn){return zn.name!==rn.name}))),it.onChange(_t.filter(function(zn){return zn.name!==rn.name}));case 6:case"end":return Un.stop()}},gt)}));function Nn(gt){return nn.apply(this,arguments)}return Nn}(),disabled:it.disabled,multiple:!0,fileList:_t,customRequest:function(){var nn=Object(s.a)(f.a.mark(function gt(rn){var fn,bn,Un,zn;return f.a.wrap(function(un){for(;;)switch(un.prev=un.next){case 0:return un.next=2,_n(rn.file,{login:rt==null||((fn=rt.userInfo)===null||fn===void 0)?void 0:fn.login,container_type:it.container_type,container_id:it.identifier,description:it.description,realFileName:it.realFileName});case 2:zn=un.sent,rn.onSuccess({file:rn.file,uid:zn==null||((bn=zn.data)===null||bn===void 0)?void 0:bn.attachment_id,id:zn==null||((Un=zn.data)===null||Un===void 0)?void 0:Un.attachment_id});case 4:case"end":return un.stop()}},gt)}));function Nn(gt){return nn.apply(this,arguments)}return Nn}(),beforeUpload:function(){var nn=Object(s.a)(f.a.mark(function gt(rn){return f.a.wrap(function(bn){for(;;)switch(bn.prev=bn.next){case 0:case"end":return bn.stop()}},gt)}));function Nn(gt){return nn.apply(this,arguments)}return Nn}()},_n=function(){var nn=Object(s.a)(f.a.mark(function Nn(gt,rn){var fn,bn,Un,zn,Bn,un,ln,yn,kn,ar;return f.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:return rn.file_name=gt.name,ln=gt.name,Cn.next=4,Object(st.a)("/api/buckets/get_upload_token_for_file.json",{method:"get"});case 4:if(yn=Cn.sent,yn.data=JSON.parse(To(yn.data)),!((yn==null?void 0:yn.status)!==0)){Cn.next=12;break}return _t[_t.findIndex(function(ri){return ri.name===ln})].status="error",_t[_t.findIndex(function(ri){return ri.name===ln})].file.status="error",it.onChange(_t),n.b.warn("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5"),Cn.abrupt("return");case 12:return pn=new Ta.a({endpoint:yn==null||((fn=yn.data)===null||fn===void 0)?void 0:fn.end_point,region:yn==null||((bn=yn.data)===null||bn===void 0)?void 0:bn.region,accessKeyId:yn==null||((Un=yn.data)===null||Un===void 0)?void 0:Un.access_key_id,accessKeySecret:yn==null||((zn=yn.data)===null||zn===void 0)?void 0:zn.access_key_secret,bucket:yn==null||((Bn=yn.data)===null||Bn===void 0)?void 0:Bn.bucket,stsToken:yn==null||((un=yn.data)===null||un===void 0)?void 0:un.security_token}),console.log("files:",gt,yn),Sn(pn),kn=gt.name.split("."),kn.pop(),ar=rn.realFileName?kn:Object(Ii.a)(),console.log("obj1111:",rn),Cn.abrupt("return",new Promise(function(ri,Ra){var Vi;pn.multipartUpload("".concat(it.identifier,"/").concat(ar.join("")).concat(ln.indexOf(".")>-1?"."+ln.split(".").pop():""),new Blob([gt],{type:gt.type}),{timeout:3600*1e3,partSize:1002400,progress:function(li,Gn,kr){try{console.log("\u8FDB\u5EA6",li,Gn,kr);var Li=_t.findIndex(function(Ri){return Ri.name===ln});_t[Li].file.percent=li*100,li===1&&(_t[Li].status="done",_t[Li].file.status="done",it.onChange(_t)),_t[Li].tempCheckpoint=Gn,St(Object(I.a)(_t))}catch(Ri){}},callback:{customValue:{id:ln+""},url:yn==null||((Vi=yn.data)===null||Vi===void 0)?void 0:Vi.callback_url,host:yn==null?void 0:yn.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+Object(st.e)(rn)}}).then(function(qr){var li,Gn="done";if(((li=qr.data)===null||li===void 0?void 0:li.status)===0)vt();else{var kr;n.b.warn((kr=qr.data)===null||kr===void 0?void 0:kr.message),Gn="error"}it.onChange(_t),ri(qr==null?void 0:qr.data)}).catch(function(qr){Ra(qr),console.log("err:",qr)})}));case 20:case"end":return Cn.stop()}},Nn)}));return function(gt,rn){return nn.apply(this,arguments)}}();Object(m.useEffect)(function(){_t.every(function(nn){return nn==="done"||nn==="error"})&&it.onComplete(_t),console.log("fileList:",_t)},[_t]),Object(m.useEffect)(function(){if(At){var nn;(nn=pn)===null||nn===void 0||nn.cancel()}},[At]);var gn=function(){var nn=Object(s.a)(f.a.mark(function Nn(){return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:_t.map(function(){var fn=Object(s.a)(f.a.mark(function bn(Un){var zn,Bn;return f.a.wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:if(!((!Un.status||Un.status==="error")&&!At)){ln.next=6;break}return Un.status="uploading",Un.file.status="uploading",ln.next=5,_n(Un,{login:rt==null||((zn=rt.userInfo)===null||zn===void 0)?void 0:zn.login,container_type:it.container_type,container_id:it.identifier,description:it.description,realFileName:it.realFileName});case 5:Bn=ln.sent;case 6:case"end":return ln.stop()}},bn)}));return function(bn){return fn.apply(this,arguments)}}());case 1:case"end":return rn.stop()}},Nn)}));return function(){return nn.apply(this,arguments)}}();return l.a.createElement("div",{className:$a.a.files},l.a.createElement(Ea.a,{close:!0,data:encodeURIComponent(kt),type:kt!=null&&kt.length?"office":"",onClose:function(){return zt("")}}),l.a.createElement(vi.a,Wn,l.a.createElement(Mt.a,{icon:l.a.createElement(ea.a,null),type:"primary"},"\u4E0A\u4F20\u6587\u4EF6")))},Gi=Object(sr.a)(function(xe){var Ze=xe.loading,rt=xe.globalSetting,At=xe.user;return{globalSetting:rt,loading:Ze.models.competitions,user:At}})(Aa),ji=at.a.Group,oa=function(Ze){var rt,At=Ze.classroomList,Pt=Ze.loading,vt=Ze.user,it=Ze.exercise_id,It=it===void 0?null:it,Ct=Ze.homework_common_id,_t=Ct===void 0?null:Ct,St=Ze.setitem,Vt=Ze.taskData,jt=Ze.type,kt=Ze.dispatch,zt=Object(m.useState)(),qt=Object(t.a)(zt,2),sn=qt[0],pn=qt[1],Sn=Object(m.useState)(!1),Wn=Object(t.a)(Sn,2),_n=Wn[0],gn=Wn[1];Object(m.useEffect)(function(){nn()},[]);var nn=function(){var gt=Object(s.a)(f.a.mark(function rn(){var fn,bn,Un;return f.a.wrap(function(Bn){for(;;)switch(Bn.prev=Bn.next){case 0:return Bn.next=2,Object(st.a)("/api/tasks/".concat(Vt==null||((fn=Vt.game)===null||fn===void 0)?void 0:fn.identifier,"/get_user_attachments"),{method:"get"});case 2:Un=Bn.sent,Un==null||((bn=Un.attachments)===null||bn===void 0)||bn.map(function(un){return un.status="done",un.uid=un.id,un.name=un.title,un}),pn(Un);case 5:case"end":return Bn.stop()}},rn)}));return function(){return gt.apply(this,arguments)}}(),Nn=function(rn){console.log(rn,444)};return l.a.createElement("div",null,l.a.createElement(Gi,{identifier:Vt==null||((rt=Vt.game)===null||rt===void 0)?void 0:rt.identifier,defaultFilelist:sn==null?void 0:sn.attachments,container_type:"Game",uploading:_n,onChange:function(){_n=!1,gn(!0)},height:300,maxSize:100*1024*1024*1024,description:"",getData:nn,onComplete:Nn,realFileName:!0,onRemove:function(){}}))},ta=Object(sr.a)(function(xe){var Ze=xe.classroomList,rt=xe.loading,At=xe.globalSetting,Pt=xe.user;return{classroomList:Ze,globalSetting:At,loading:rt.effects,user:Pt}})(oa),Ao=x("5bA4"),Vo=x("UESt"),Yo=x("ZD9Y"),ki=function(xe){var Ze=xe.onFontSizeChange,rt=xe.cmFontSize,At=xe.cmCodeMode,Pt=xe.onCodeModeChange,vt=xe.tabToSpace,it=xe.onTabToSpace,It=xe.shixun,Ct=It.task_pass,_t=It.forbid_copy,St=It.test_set_permission,Vt={onFontSizeChange:Ze,cmFontSize:rt,cmCodeMode:At,onCodeModeChange:Pt,tabToSpace:vt,onTabToSpace:it};return l.a.createElement(Yo.a,Vt,l.a.createElement("h3",null,"\u5173\u5361\u914D\u7F6E\u4FE1\u606F"),l.a.createElement("section",null,l.a.createElement("a",{className:"file-item",title:Ct?"\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218":"\u4E0D\u5141\u8BB8\u5B66\u5458\u8DF3\u5173\u6311\u6218"},l.a.createElement("b",null,"\u8DF3\u5173"),l.a.createElement("span",null,Ct?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),l.a.createElement("a",{className:"file-item",title:St?"\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9":"\u4E0D\u5141\u8BB8\u5B66\u5458\u901A\u8FC7\u91D1\u5E01\u89E3\u9501\u67E5\u770B\u6D4B\u8BD5\u96C6\u5185\u5BB9"},l.a.createElement("b",null,"\u6D4B\u8BD5\u96C6\u89E3\u9501"),l.a.createElement("span",null,St?"\u5141\u8BB8":"\u4E0D\u5141\u8BB8")),l.a.createElement("a",{className:"file-item",title:_t?"\u4E0D\u5141\u8BB8\u5B66\u5458\u7C98\u8D34\u4EE3\u7801":"\u5141\u8BB8\u5B66\u5458\u7C98\u8D34\u4EE3\u7801"},l.a.createElement("b",null,"\u4EE3\u7801\u7C98\u8D34"),l.a.createElement("span",null,_t?"\u4E0D\u5141\u8BB8":"\u5141\u8BB8"))))},Xo=x("X9zl"),Qo=x("l/DK"),Ni=x.n(Qo);function Oi(xe){var Ze=xe.callback,rt=xe.file,At=xe.onHidePathList;function Pt(){At(),Ze(rt)}return l.a.createElement("a",{onClick:Pt},rt)}var Oa=function(xe){var Ze=xe.paths,rt=xe.onChangePath,At=xe.activePath,Pt=xe.isVisible,vt=xe.onHidePathList;return l.a.createElement("ul",{className:Ni.a["path-container"],onMouseLeave:vt,style:{display:Pt?"block":"none"}},Ze.filter(function(it){return!!it}).map(function(it){return l.a.createElement("li",{className:At===it?Ni.a.active:"",key:it},l.a.createElement(Oi,{callback:rt,file:it,onHidePathList:vt}))}))},ks=x("Dqnf"),nl={theme:Object(zi.a)("cmCodeMode","vs-dark"),fontSize:Object(zi.a)("cmFontSize",16),tabToSpace:Object(zi.a)("cmTabToSpace",!0),showEditorSetting:!1,showPathList:!1,tabIndex:0,sshConfigData:null,sshConfigDataArr:[],sshTabs:[]};function Jo(xe,Ze){switch(Ze.type){case be.D:return Object(e.a)(Object(e.a)({},xe),{},{showEditorSetting:Ze.payload});case be.E:return Object(e.a)(Object(e.a)({},xe),{},{theme:Ze.payload});case be.C:return Object(e.a)(Object(e.a)({},xe),{},{fontSize:Ze.payload});case be.M:return Object(e.a)(Object(e.a)({},xe),{},{tabIndex:Ze.payload});case be.J:return Object(e.a)(Object(e.a)({},xe),{},{sshConfigData:Ze.payload});case be.K:return Object(e.a)(Object(e.a)({},xe),{},{sshConfigDataArr:Ze.payload});case be.L:return Object(e.a)(Object(e.a)({},xe),{},{sshTabs:Object(I.a)(Ze.payload)});case be.U:return Object(e.a)(Object(e.a)({},xe),{},{showPathList:!0});case be.q:return Object(e.a)(Object(e.a)({},xe),{},{showPathList:!1});case be.w:return Object(e.a)(Object(e.a)({},xe),{},{tabToSpace:Ze.payload});default:throw new Error}}var is=3e4,Ls=function(xe){var Ze,rt,At,Pt,vt,it=xe.taskData,It=xe.moveY,Ct=xe.isHtml,_t=xe.isNotice,St=xe.onResizeYStart,Vt=xe._dispatch,jt=xe.codeRepData,kt=xe.isEditPath,zt=xe.onEditRepCode,qt=xe.onUpdateCode,sn=xe.onResizeSetContainer,pn=xe.onEval,Sn=xe.evaluateLoading,Wn=xe.evaluateMessage,_n=xe.onResizeCodeArea,gn=xe.onShowDir,nn=xe.onChangePath,Nn=xe.onShowNotice,gt=xe.onResetCode,rn=xe.onResetGitCode,fn=xe.onResetPassedCode,bn=xe.onFinishDisplayHtml,Un=xe.onGetUnity3dMessage,zn=xe.unity_3d_routes,Bn=xe.with_code_file,un=Object(i.a)(xe,["taskData","moveY","isHtml","isNotice","onResizeYStart","_dispatch","codeRepData","isEditPath","onEditRepCode","onUpdateCode","onResizeSetContainer","onEval","evaluateLoading","evaluateMessage","onResizeCodeArea","onShowDir","onChangePath","onShowNotice","onResetCode","onResetGitCode","onResetPassedCode","onFinishDisplayHtml","onGetUnity3dMessage","unity_3d_routes","with_code_file"]),ln=Object(E.i)(),yn=Object(m.useRef)(),kn=Object(m.useReducer)(Jo,nl),ar=Object(t.a)(kn,2),Br=ar[0],Cn=ar[1],ri=Object(m.useState)(!1),Ra=Object(t.a)(ri,2),Vi=Ra[0],qr=Ra[1],li=Object(m.useState)(),Gn=Object(t.a)(li,2),kr=Gn[0],Li=Gn[1],Ri=Object(m.useState)(!1),uo=Object(t.a)(Ri,2),Da=uo[0],mi=uo[1],za=jt.loading,na=jt.content,la=jt.language,zo=jt.filename,co=jt.file_type,ya=jt.lastedUpdateTime,eo=jt.paths,ho=jt.currentPath,_o=Br.fontSize,Pa=Br.theme,Ga=Br.showEditorSetting,Hr=Br.showPathList,yr=Br.tabIndex,Ui=Br.sshTabs,Po=Br.tabToSpace,Va=Br.sshConfigData,ui=Br.sshConfigDataArr,Ci=it.shixun,fa=it.test_sets,ua=it.test_sets_count,Ya=it.sets_error_count,to=it.last_compile_output,wa=it.game,Na=it.git_url,no=it.myshixun,ci=it.user,Pr=it.allowed_unlock,Sr=Ci.webssh,Bi=Ci.multi_webssh,Hi=Ci.hide_code,ur=it.terminal_count,Or={onFinishDisplayHtml:bn,allowed_unlock:Pr,onResizeSetContainer:sn,moveY:It,language:la,content:na,isHtml:Ct,myshixunIdentifier:no.identifier,test_sets_view:wa.test_sets_view,identity:ci.identity,lastedUpdateTime:ya,test_sets:fa,test_sets_count:ua,sets_error_count:Ya,last_compile_output:to},Rr=zn&&!Bn||(it==null||((Ze=it.challenge)===null||Ze===void 0)?void 0:Ze.thiry_party);Object(m.useEffect)(function(){Ee.a.subscribe("update-windows-time",function(_i){Li(_i)});var Ur=Ee.a.subscribe("show-case-result",function(_i){_n(1),_i?qr(_i):(Vi=!Vi,qr(Vi))});return Ur},[]),Object(m.useEffect)(function(){Ee.a.publish("showRunCode",!yr),Ee.a.publish("showRunCodeTab",!yr),Ee.a.publish("taskTabIndex",yr)},[yr]),Object(m.useEffect)(function(){it!=null&&it.vnc_url||it!=null&&it.windows_vnc||it!=null&&it.linux_vnc||it!=null&&it.virtual_machine?(qr(!1),Br.tabIndex=-1,setTimeout(function(){Cn({type:be.M,payload:-1})},400)):Rr||qr(!0)},[it]),Object(Gt.a)(function(){var Ur=new Date().getTime();kt&&ya&&Hi!==1&&Ur>ya+is&&(localStorage.setItem("stat","newest"),qt())},is);function Ei(Ur){zt(Ur)}function br(){Cn({type:be.D,payload:!0})}function Ti(){Cn({type:be.D,payload:!1})}function $o(Ur){Cn({type:be.C,payload:Ur}),Object(zi.b)("cmFontSize",Ur)}function Qa(Ur){Cn({type:be.E,payload:Ur}),Object(zi.b)("cmCodeMode",Ur)}function ds(Ur){Cn({type:be.w,payload:Ur}),Object(zi.b)("cmTabToSpace",Ur)}function ro(){Cn({type:be.U})}function Bs(){Cn({type:be.q})}function Go(Ur){return Os.apply(this,arguments)}function Os(){return Os=Object(s.a)(f.a.mark(function Ur(_i){var Ua;return f.a.wrap(function(io){for(;;)switch(io.prev=io.next){case 0:if(Ua=/\d/g.test(_i)?_i:_i.target.id,!(yr==0)){io.next=5;break}if(!(kt&&ya&&Hi!==1)){io.next=5;break}return io.next=5,qt();case 5:Cn({type:be.M,payload:parseInt(Ua,10)}),Ua==0&&Vt({type:be.fb,payload:Date.now()}),Object(he.A)(wa.identifier),Sr===3&&setTimeout(function(){if(Ua<=0&&Hi!==1||!ui.length)return;ts(Ua)},500);case 9:case"end":return io.stop()}},Ur)})),Os.apply(this,arguments)}function Wl(){var Ur=Ui.length;Ui[0]===3?Ui.push(2):Ui.push(Ur+2),console.log("sshTabs:",Ui),Cn({type:be.L,payload:Ui})}function ul(Ur){Ur.stopPropagation(),Ur.preventDefault();var _i=parseInt(Ur.target.id,10);Ui.splice(_i,1),Cn({type:be.L,payload:Ui});var Ua=1;Ui.length>0&&(Ua=Ui[0]),Cn({type:be.M,payload:Ua})}function es(){return Sr===3?Object(he.C)({myshixunId:no.identifier,position:yr,game_id:wa.id}):Object(he.e)(no.identifier)}function hs(Ur){Cn({type:be.M,payload:0}),nn(Ur)}function Hs(){Cn({type:be.J,payload:null}),ts(yr)}Object(m.useEffect)(function(){Hi===1&&Sr>0&&Cn({type:be.M,payload:1})},[Hi]),Object(m.useEffect)(function(){yr>0&&ts(Br.tabIndex||1)},[yr]),Object(m.useEffect)(function(){Va&&yr>=1&&setTimeout(function(){Ee.a.publish("create-socket",yr)},100)},[Va]),Object(m.useEffect)(function(){return function(){Ui.splice(0,8),Cn({type:be.L,payload:Ui})}},[un.location.pathname]);function ts(Ur){return yo.apply(this,arguments)}function yo(){return yo=Object(s.a)(f.a.mark(function Ur(_i){var Ua,No,io,Do,Io,pl,fs,Xs,Es,zs,ps;return f.a.wrap(function(bo){for(;;)switch(bo.prev=bo.next){case 0:if(!(Sr===3)){bo.next=7;break}return bo.next=3,Object(he.y)(no.identifier,{position:_i});case 3:Io=bo.sent,((pl=Io)===null||pl===void 0?void 0:pl.status)!==-3&&Ee.a.publish("update-windows-time",{remaining_time:(fs=Io)===null||fs===void 0?void 0:fs.remainingTime}),bo.next=10;break;case 7:return bo.next=9,Object(he.x)(no.identifier,{game_id:wa.id});case 9:Io=bo.sent;case 10:if(!((Ua=Io)!==null&&Ua!==void 0&&(No=Ua.data)!==null&&No!==void 0&&(io=No.data_list)!==null&&io!==void 0&&io.length)){bo.next=13;break}return Ee.a.publish("pod-restrict-data",{identifier:(Xs=Io)===null||Xs===void 0||((Es=Xs.data)===null||Es===void 0)?void 0:Es.identifier,data_list:(zs=Io)===null||zs===void 0||((ps=zs.data)===null||ps===void 0)?void 0:ps.data_list}),bo.abrupt("return");case 13:if(!(((Do=Io)===null||Do===void 0?void 0:Do.status)===-3)){bo.next=15;break}return bo.abrupt("return",new Promise(function(){var Gs=Object(s.a)(f.a.mark(function Vs(zl,Rl){return f.a.wrap(function(ms){for(;;)switch(ms.prev=ms.next){case 0:d.a.confirm({content:"\u68C0\u6D4B\u5230\u60A8\u5DF2\u7ECF\u5F00\u542F\u4E86\u5176\u4ED6\u5B9E\u9A8C\u73AF\u5883\uFF0C\u8BF7\u5148\u5173\u95ED\u73AF\u5883\u540E\uFF0C\u518D\u8FDE\u63A5",okText:"\u7ACB\u5373\u5173\u95ED",cancelText:"\u7A0D\u540E\u5173\u95ED",onOk:function(){var Dl=Object(s.a)(f.a.mark(function jn(){var Hn;return f.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(he.f)(ln.taskId,(Hn=Io)===null||Hn===void 0?void 0:Hn.message);case 2:return ts(),On.abrupt("return");case 4:case"end":return On.stop()}},jn)}));function Fn(){return Dl.apply(this,arguments)}return Fn}()});case 1:case"end":return ms.stop()}},Vs)}));return function(Vs,zl){return Gs.apply(this,arguments)}}()));case 15:Sr===3?(ui[_i-1]=Object(e.a)({},Io.data),Cn({type:be.K,payload:Object(I.a)(ui)}),setTimeout(function(){return Ee.a.publish("create-socket",_i)},300)):Cn({type:be.J,payload:Io.data});case 16:case"end":return bo.stop()}},Ur)})),yo.apply(this,arguments)}var Al=It?It!=="100%"?"".concat(It-54,"px"):It:Vi?"70%":"100%",cl=It==="100%"?0:"calc(100% - 3px - 51px - ".concat(Al,")"),ns=[];Sr&&ns.push(1),Bi&&ns.concat(Ui);function bs(){mi(!Da),Object(S.a)()?Object(S.b)():Object(S.d)(document.body)}var dl=function(_i){var Ua,No;if(_i.target.localName!=="body"||(un==null||((Ua=un.location)===null||Ua===void 0||((No=Ua.query)===null||No===void 0))?void 0:No.isFullScreen)==="true")return;var io=document.getElementById("task-left-panel"),Do=io.nextElementSibling;Object(S.a)()?(io.classList.add("hide"),Do.classList.add("hide"),mi(!0)):(mi(!1),io.classList.remove("hide"),Do.classList.remove("hide"))};Object(m.useEffect)(function(){return document.addEventListener(Object(S.c)(),dl),function(){document.removeEventListener(Object(S.c)(),dl)}},[]);var Ol={content:na,language:la,filename:zo,file_type:co,onCodeChange:Ei,theme:Pa,taskData:it,onSave:qt,forbidCopy:Ci.forbid_copy,isEditPath:kt,hide_code:Hi,code_edit_permission:Ci.code_edit_permission,monacoOptions:{fontSize:_o,insertSpaces:Po,readOnly:!kt&&!Ci.code_edit_permission}},Ks={loading:za,lastedUpdateTime:ya,moveY:It,code_hidden:!Ci.show_code_dir,hide_code:Ci.hide_code,gameStatus:wa.status,isEditPath:kt,isNotice:_t,git_url:Na,taskData:it,onResetCode:gt,onResetGitCode:rn,onShowCodeSetting:br,onResetPassedCode:fn,onShowNotice:Nn,onShowDir:gn,onResizeCodeArea:_n,onRightFullHandler:bs,isResizeLarge:Da},rs={isNotice:_t,moveY:It,tabIndex:yr,onShowNotice:Nn,onResizeCodeArea:_n,webssh:Sr,socketKeys:ns,sshConfigData:Br.sshConfigData,onCloseSocket:es,isActive:yr>=1,onReCreateSocket:Hs,shixun:Ci,onRightFullHandler:bs,isResizeLarge:Da},Ws={onFontSizeChange:$o,cmFontSize:_o,tabToSpace:Po,cmCodeMode:Pa,onCodeModeChange:Qa,onTabToSpace:ds,shixun:Ci},hl=Object(m.useMemo)(function(){var Ur={width:ur*102};return yr>2&&ur>3&&(Ur.left=-(yr-2)*102),Ur},[yr]);console.log("sshConfigDataArr:",ui);var fl=function(){return l.a.createElement("div",{className:"unity-3d-container"},l.a.createElement(ze,{taskData:it,unity_3d_routes:zn,onGetUnity3dMessage:Un}))};return l.a.createElement(m.Fragment,null,Rr?fl():l.a.createElement("div",{className:ti.a["code-area-container"],ref:yn,style:{height:Al}},l.a.createElement(l.a.Fragment,null,l.a.createElement("div",{className:ti.a.navs},l.a.createElement("ul",null,((it==null?void 0:it.vnc_url)||(it==null?void 0:it.windows_vnc)||(it==null?void 0:it.linux_vnc)||(it==null?void 0:it.virtual_machine))&&l.a.createElement("li",null,l.a.createElement("a",{id:-1,className:yr===-1?"".concat(ti.a.active," first"):"first",onClick:Go},"\u56FE\u5F62\u5316\u7A97\u53E3")),Hi!==1?l.a.createElement("li",{className:"flex-container",style:{position:"relative"}},l.a.createElement("a",{id:0,className:yr===0?"".concat(ti.a.active," first"):"first",onClick:Go},((rt=it.challenge)===null||rt===void 0?void 0:rt.show_type)===8?"\u6587\u4EF6\u76EE\u5F55":"\u4EE3\u7801\u6587\u4EF6"),eo.length>=1?l.a.createElement("span",{onMouseOver:ro,className:Hr?ti.a["arrow-down"]:ti.a["arrow-right"]}):null,l.a.createElement(Oa,{isVisible:Hr,onHidePathList:Bs,paths:eo,activePath:ho,onChangePath:hs})):null,!Sr||Sr===3?l.a.createElement("li",null):l.a.createElement("li",null,l.a.createElement("a",{className:yr===1?ti.a.active:"",onClick:Go,id:1},"\u547D\u4EE4\u884C")),Sr===3&&l.a.createElement("div",{className:ti.a["tasks-page-wrp"]},ur>3&&l.a.createElement(Mt.a,{disabled:yr<=1,className:ti.a["tasks-prev-xterm"],onClick:function(){return Go(yr-1)}},l.a.createElement(Ao.a,null)),l.a.createElement("ul",{style:hl},new Array(ur).fill("").map(function(Ur,_i){return l.a.createElement("li",null,l.a.createElement("a",{className:yr===_i+1?ti.a.active:"",onClick:Go,id:_i+1},"\u547D\u4EE4\u884C ",_i+1))})),ur>3&&l.a.createElement(Mt.a,{disabled:yr>=ur,className:ti.a["tasks-next-xterm"],onClick:function(){return Go(yr+1)}},l.a.createElement(Vo.a,null))),!!Sr&&Bi?Ui.map(function(Ur,_i){return l.a.createElement("li",{key:Ur},l.a.createElement("a",{id:Ur,className:yr===Ur?ti.a.active:"",onClick:Go},"\u547D\u4EE4\u884C",_i+1,l.a.createElement("i",{title:"\u5173\u95ED\u547D\u4EE4\u884C\u7A97\u53E3",id:_i,className:"iconfont icon-shanchu_moren",onClick:ul})))}):null,!!Sr&&Bi&&Ui.length<2?l.a.createElement("li",null,l.a.createElement("a",{onClick:Wl,title:"\u65B0\u5F00\u547D\u4EE4\u884C\u7A97\u53E3"},"\uFF0B")):null),l.a.createElement("div",{className:ti.a["action-bar-container"],style:{display:yr===0?"flex":"none"}},l.a.createElement(ee,Object(o.a)({},Ks,{onUpdateCode:qt}))),l.a.createElement("div",{className:ti.a["action-bar-container"],style:{display:yr>=1?"flex":"none"}},l.a.createElement(Tr,rs)),l.a.createElement("div",{className:"tr",style:{marginLeft:"auto",marginRight:20}},((it==null?void 0:it.vnc_url)||(it==null?void 0:it.windows_vnc)||(it==null?void 0:it.virtual_machine)||(it==null?void 0:it.linux_vnc))&&l.a.createElement("span",{className:"c-white current ",onClick:bs,style:{display:yr===0?"none":"inline"}},l.a.createElement("span",{className:"iconfont icon-quanping mr5 font12"}),"\u5168\u5C4F / \u9000\u51FA\u5168\u5C4F"))),l.a.createElement("div",{style:{display:yr===-1?"flex":"none"}},l.a.createElement(pi,{taskData:it,evaluateMessage:Wn,language:la,evaluateLoading:Sn,onEval:un.onEvalCode})),l.a.createElement("section",{style:{display:yr===0?"block":"none",height:"calc(100% - 40px)"}},((At=it.challenge)===null||At===void 0?void 0:At.show_type)===8&&l.a.createElement(ta,{taskData:it}),((Pt=it.challenge)===null||Pt===void 0?void 0:Pt.show_type)!==8&&l.a.createElement(tl,Object(o.a)({},Ol,{onUpdateCode:qt}))),!Sr||Sr===3?null:l.a.createElement("section",{style:{display:yr===1?"block":"none",height:"calc(100% - 40px)"}},l.a.createElement(ks.a,{sshConfigData:Va||{},sid:1})),Bi?Ui.map(function(Ur,_i){return l.a.createElement("section",{key:"ssh".concat(Ur),style:{display:yr===Ur?"block":"none",height:"calc(100% - 40px)"}},l.a.createElement(ks.a,{sshConfigData:Va||{},sid:Ur}))}):null,Sr===3?new Array(ur).fill("").map(function(Ur,_i){return l.a.createElement("section",{id:_i,key:"ssh".concat(_i+1),style:{display:yr===_i+1?"block":"none",height:"calc(100% - 40px)"}},l.a.createElement(ks.a,{sshConfigData:ui[_i]||{},sid:_i+1}))}):null)),l.a.createElement("section",null),Vi&&l.a.createElement("div",{className:ti.a["resize-y-bar"],onMouseDown:St,draggable:!1},l.a.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),Vi&&l.a.createElement("div",{className:ti.a["test-set-container"],style:{height:cl}},Sn?l.a.createElement(je.a,{message:Wn,style:{color:"#0152d9"}}):l.a.createElement(Zr,Object(o.a)({},Or,{taskData:it}))),l.a.createElement("div",{className:ti.a["action-container"]},l.a.createElement(Ko,Object(o.a)({onUpdateCode:qt},it,{dispatch:Vt,loading:Sn,isU3d:zn&&!Bn||(it==null||((vt=it.challenge)===null||vt===void 0)?void 0:vt.thiry_party),onRun:function(){pn(),qr(!0)}}))),l.a.createElement(de.a,null,l.a.createElement(O.a,{className:ti.a["setting-drawer"],title:null,placement:"right",closable:!1,visible:Ga,onClose:Ti},l.a.createElement(ki,Ws))))},bl=x("zkdm"),Ms=x("Sa5k"),El=x.n(Ms),Nl=x("fWQN"),xl=x("mtLc"),rl=0,il=1,vs=3,as=9,Ul=10,Cs=11,Ts=0,os=2,_s=3,Oo=4,ss=48,Zo=function(){function xe(){Object(Nl.a)(this,xe)}return Object(xl.a)(xe,[{key:"_checkHeader",value:function(){var rt=this.header;if(rt.imageType===rl)throw Error("No data");if(rt.hasColorMap){if(rt.colorMapLength>256||rt.colorMapDepth!==24||rt.colorMapType!==1)throw Error("Invalid colormap for indexed type")}else if(rt.colorMapType)throw Error("Why does the image contain a palette ?");if(!rt.width||!rt.height)throw Error("Invalid image size");if(rt.pixelDepth!==8&&rt.pixelDepth!==16&&rt.pixelDepth!==24&&rt.pixelDepth!==32)throw Error('Invalid pixel size "'+rt.pixelDepth+'"')}},{key:"_decodeRLE",value:function(rt,At,Pt,vt){for(var it=new Uint8Array(vt),It=new Uint8Array(Pt),Ct=0;Ct<vt;){var _t=rt[At++],St=1+(127&_t);if(128&_t){for(var Vt=0;Vt<Pt;++Vt)It[Vt]=rt[At+Vt];At+=Pt;for(var jt=0;jt<St;++jt)it.set(It,Ct),Ct+=Pt}else{St*=Pt;for(var kt=0;kt<St;++kt)it[Ct+kt]=rt[At+kt];Ct+=St,At+=St}}return it}},{key:"_getImageData8bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt++){var qt=At[jt];rt[4*(zt+vt*kt)+3]=255,rt[4*(zt+vt*kt)+2]=Pt[3*qt+0],rt[4*(zt+vt*kt)+1]=Pt[3*qt+1],rt[4*(zt+vt*kt)+0]=Pt[3*qt+2]}return rt}},{key:"_getImageData16bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt+=2){var qt=At[jt+0]|At[jt+1]<<8;rt[4*(zt+vt*kt)+0]=(31744&qt)>>7,rt[4*(zt+vt*kt)+1]=(992&qt)>>2,rt[4*(zt+vt*kt)+2]=(31&qt)>>3,rt[4*(zt+vt*kt)+3]=32768&qt?0:255}return rt}},{key:"_getImageData24bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt+=3)rt[4*(zt+vt*kt)+3]=255,rt[4*(zt+vt*kt)+2]=At[jt+0],rt[4*(zt+vt*kt)+1]=At[jt+1],rt[4*(zt+vt*kt)+0]=At[jt+2];return rt}},{key:"_getImageData32bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt+=4)rt[4*(zt+vt*kt)+2]=At[jt+0],rt[4*(zt+vt*kt)+1]=At[jt+1],rt[4*(zt+vt*kt)+0]=At[jt+2],rt[4*(zt+vt*kt)+3]=At[jt+3];return rt}},{key:"_getImageDataGrey8bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt++){var qt=At[jt];rt[4*(zt+vt*kt)+0]=qt,rt[4*(zt+vt*kt)+1]=qt,rt[4*(zt+vt*kt)+2]=qt,rt[4*(zt+vt*kt)+3]=255}return rt}},{key:"_getImageDataGrey16bits",value:function(rt,At,Pt,vt,it,It,Ct,_t,St,Vt){for(var jt=0,kt=it;kt!==Ct;kt+=It)for(var zt=_t;zt!==Vt;zt+=St,jt+=2)rt[4*(zt+vt*kt)+0]=At[jt+0],rt[4*(zt+vt*kt)+1]=At[jt+0],rt[4*(zt+vt*kt)+2]=At[jt+0],rt[4*(zt+vt*kt)+3]=At[jt+1];return rt}},{key:"open",value:function(rt,At){var Pt=this,vt=new XMLHttpRequest;return new Promise(function(it,It){vt.responseType="arraybuffer",vt.open("GET",rt,!0),vt.onload=function(){vt.status===200&&Pt.load(new Uint8Array(vt.response),it),Pt.imageSourceData=vt.response,At&&At()},vt.send(null)})}},{key:"load",value:function(rt,At){var Pt=0;if(rt.length<18)throw Error("Not enough data to contain header");var vt={idLength:rt[Pt++],colorMapType:rt[Pt++],imageType:rt[Pt++],colorMapIndex:rt[Pt++]|rt[Pt++]<<8,colorMapLength:rt[Pt++]|rt[Pt++]<<8,colorMapDepth:rt[Pt++],offsetX:rt[Pt++]|rt[Pt++]<<8,offsetY:rt[Pt++]|rt[Pt++]<<8,width:rt[Pt++]|rt[Pt++]<<8,height:rt[Pt++]|rt[Pt++]<<8,pixelDepth:rt[Pt++],flags:rt[Pt++]};if(vt.hasEncoding=vt.imageType===as||vt.imageType===Ul||vt.imageType===Cs,vt.hasColorMap=vt.imageType===as||vt.imageType===il,vt.isGreyColor=vt.imageType===Cs||vt.imageType===vs,this.header=vt,this._checkHeader(),(Pt+=vt.idLength)>=rt.length)throw Error("No data");if(vt.hasColorMap){var it=vt.colorMapLength*(vt.colorMapDepth>>3);this.palette=rt.subarray(Pt,Pt+it),Pt+=it}var It=vt.pixelDepth>>3,Ct=vt.width*vt.height,_t=Ct*It;vt.hasEncoding?this.imageData=this._decodeRLE(rt,Pt,It,_t):this.imageData=rt.subarray(Pt,Pt+(vt.hasColorMap?Ct:_t)),At(this)}},{key:"getImageData",value:function(rt){var At=this.header,Pt=At.width,vt=At.height,it=At.flags,It=At.pixelDepth,Ct=At.isGreyColor,_t=(it&ss)>>Oo,St,Vt,jt,kt,zt,qt,sn;switch(rt||(rt=document?document.createElement("canvas").getContext("2d").createImageData(Pt,vt):{width:Pt,height:vt,data:new Uint8ClampedArray(Pt*vt*4)}),_t===os||_t===_s?(kt=0,zt=1,qt=vt):(kt=vt-1,zt=-1,qt=-1),_t===os||_t===Ts?(St=0,Vt=1,jt=Pt):(St=Pt-1,Vt=-1,jt=-1),It){case 8:sn=Ct?this._getImageDataGrey8bits:this._getImageData8bits;break;case 16:sn=Ct?this._getImageDataGrey16bits:this._getImageData16bits;break;case 24:sn=this._getImageData24bits;break;case 32:sn=this._getImageData32bits}return sn.call(this,rt.data,this.imageData,this.palette,Pt,kt,zt,qt,St,Vt,jt),rt}},{key:"getCanvas",value:function(){var rt=this.header,At=rt.width,Pt=rt.height,vt=document.createElement("canvas"),it=vt.getContext("2d"),It=it.createImageData(At,Pt);return vt.width=At,vt.height=Pt,it.putImageData(this.getImageData(It),0,0),vt}},{key:"getDataURL",value:function(rt){return this.getCanvas().toDataURL(rt||"image/png")}}]),xe}(),ls=function(xe){var Ze=xe.list,rt=xe.title,At=xe.direction,Pt=Ze.length,vt=Object(m.useState)([]),it=Object(t.a)(vt,2),It=it[0],Ct=it[1],_t=function(){var St=Object(s.a)(f.a.mark(function Vt(){var jt,kt,zt,qt;return f.a.wrap(function(pn){for(;;)switch(pn.prev=pn.next){case 0:jt=[],kt=0;case 2:if(!(kt<Ze.length)){pn.next=13;break}if(zt=Ze[kt],!(zt.pic_url.indexOf(".tga")>-1)){pn.next=9;break}return qt=new Zo,pn.next=8,qt.open(zt.pic_url);case 8:zt.pic_url=qt.getDataURL();case 9:jt.push(zt);case 10:kt++,pn.next=2;break;case 13:Ct([].concat(jt));case 14:case"end":return pn.stop()}},Vt)}));return function(){return St.apply(this,arguments)}}();return Object(m.useEffect)(function(){_t()},[Ze]),l.a.createElement("div",{className:"img-list ".concat(At?"":"direction")},l.a.createElement("h4",null,rt),l.a.createElement("div",{className:"list-body",style:{padding:"40px 0px"}},Pt>0?It.map(function(St,Vt){return l.a.createElement("img",{onClick:function(){Ee.a.publish("preview-image","".concat(yt.a).concat(St.pic_url))},className:Pt===1?"singal":"",src:"".concat(St.pic_url.indexOf("data:image/png;base64")>-1?St.pic_url:yt.a+St.pic_url),key:St.pic_url,alt:rt})}):l.a.createElement(m.Fragment,null,l.a.createElement("img",{alt:"\u7A7A",className:"nothing",src:El.a}),l.a.createElement("img",{alt:"\u7A7A",className:"nothing",src:El.a}))))},ys=x("1A8V"),Ps=function(xe){var Ze=xe.url,rt=xe.poster;return l.a.createElement("div",{className:"video-container"},l.a.createElement("video",{controls:!0,autoPlay:!0,src:Ze,preload:"auto",poster:rt||""},l.a.createElement("source",{type:"video/webm",src:Ze}),l.a.createElement("source",{type:"video/mp4",src:Ze})))},wl=x("XZCF"),Ns=function(xe){var Ze=xe.url;return l.a.createElement("div",{className:"video-container"},l.a.createElement("audio",{style:{width:"100%"},controls:!0,src:Ze}," Your browser does not support the ",l.a.createElement("code",null,"audio")," element. "))},al=function(xe){var Ze=xe.files,rt=xe.type;return l.a.createElement("ul",{className:"video-list"},Ze.map(function(At,Pt){return l.a.createElement("li",{key:Pt},rt==="mp4"?l.a.createElement(Ps,{url:At.file_url}):l.a.createElement(Ns,{url:At.file_url}))}))},qo=function(xe){var Ze=xe.value;return l.a.createElement("img",{src:"data:image/png;base64,".concat(Ze),alt:"qrcode"})};function us(xe){var Ze=xe.documentElement,rt=xe.body,At=Math.max(Ze.clientHeight,Ze.scrollHeight,Ze.offsetHeight,rt?rt.clientHeight:0,rt?rt.scrollHeight:0,500);return At}function Sl(xe){var Ze=xe.contentDocument?xe.contentDocument:xe.contentWindow.document;xe.style.visibility="hidden",xe.style.height="10px",xe.style.height=us(Ze)+4+"px",xe.style.visibility="visible"}var Fl=function(xe){var Ze=xe.taskId,rt=xe.onHidePictureView,At=Object(m.useState)({}),Pt=Object(t.a)(At,2),vt=Pt[0],it=Pt[1],It=Object(m.useRef)(),Ct=Object(m.useState)(!0),_t=Object(t.a)(Ct,2),St=_t[0],Vt=_t[1];Object(m.useEffect)(function(){var _n=vt.type,gn=vt.iframe_src;_n==="html"&&gn&&It.current&&(It.current.contentWindow.document.write(gn),It.current.contentWindow.document.close(),setTimeout(function(){Sl(It.current)},100))},[vt,It.current]),Object(m.useEffect)(function(){function _n(){return gn.apply(this,arguments)}function gn(){return gn=Object(s.a)(f.a.mark(function nn(){var Nn;return f.a.wrap(function(rn){for(;;)switch(rn.prev=rn.next){case 0:return rn.prev=0,rn.next=3,Object(he.l)(Ze);case 3:Nn=rn.sent,it(Nn),rn.next=10;break;case 7:rn.prev=7,rn.t0=rn.catch(0),console.log(rn.t0);case 10:case"end":return rn.stop()}},nn,null,[[0,7]])})),gn.apply(this,arguments)}_n()},[Ze]);var jt=vt.type,kt=vt.orignal_picture,zt=vt.user_picture,qt=vt.answer_picture,sn=vt.contents,pn=vt.user_file,Sn=vt.message,Wn=vt.qrcode_str;return l.a.createElement(m.Fragment,null,jt?null:l.a.createElement(je.a,{message:Sn||"\u52A0\u8F7D\u4E2D..."}),l.a.createElement("div",{className:"eval-picture-panel"},l.a.createElement("div",{className:"picture-body"},l.a.createElement("h3",null,l.a.createElement("div",null,l.a.createElement("div",null,"\u67E5\u770B\u6548\u679C"),jt==="image"&&l.a.createElement("div",{onClick:function(){return Vt(!St)},className:"direction"},l.a.createElement("span",{style:{marginRight:8,display:"inline-block"}},l.a.createElement("i",{className:"iconfont ".concat(St?"icon-zongxiang":"icon-hengxiang")})),l.a.createElement("span",null,"\u5207\u6362\u4E3A",St?"\u7EB5":"\u6A2A","\u5411\u5BF9\u6BD4"))),l.a.createElement("div",null,l.a.createElement("a",{onClick:rt},l.a.createElement("i",{className:"iconfont icon-shanchu2"})))),jt==="image"?l.a.createElement("div",{className:"flex-container",style:{flexDirection:St?"unset":"column"}},kt.length>0?l.a.createElement(ls,{list:kt,title:"\u539F\u59CB\u56FE\u7247",direction:St}):null,qt.length>0?l.a.createElement(ls,{list:qt,title:"\u9884\u671F\u8F93\u51FA",direction:St}):null,zt.length>0?l.a.createElement(ls,{list:zt,title:"\u5B9E\u9645\u8F93\u51FA",direction:St}):null):l.a.createElement(m.Fragment,null,l.a.createElement("h2",null,"\u5B9E\u9645\u8F93\u51FA"),l.a.createElement("div",{className:"output-txt ".concat(jt==="html"?"html":"")},jt==="html"?l.a.createElement("iframe",{ref:It,style:{width:"100%",height:"100%",border:"1px solid #ccc"}}):jt=="mp4"||jt=="mp3"?l.a.createElement(al,{files:pn,type:jt}):jt==="qrcode"?l.a.createElement(qo,{value:Wn}):l.a.createElement("div",{style:{overflow:"auto",height:"100%"}},l.a.createElement(ie.a,{value:sn})))))))},ol,sl,ll=(ol=Object(we.I)())!==null&&ol!==void 0&&ol.homework_common_id?{homework_common_id:(sl=Object(we.I)())===null||sl===void 0?void 0:sl.homework_common_id}:{};function jl(xe,Ze){return Object(st.c)("/tasks/".concat(xe,"/system_update.json?myshixun_id=").concat(Ze))}function lo(xe){return Object(st.c)("/tasks/".concat(xe,"/sync_codes.json"),ll)}function sa(xe){return Object(st.c)("/tasks/".concat(xe,"/sync_modify_time"))}var Xa=function(xe){var Ze=xe.showNotice,rt=xe.tpm_cases_modified,At=xe.tpm_modified,Pt=xe.tpm_script_modified,vt=xe.st,it=xe.taskId,It=xe.myshixunId,Ct=xe.onNextCallback,_t=xe.onUpdateCallback,St=xe.onUpdateFailure,Vt=(At||Pt)&&vt===0,jt=Object(m.useState)(!1),kt=Object(t.a)(jt,2),zt=kt[0],qt=kt[1];function sn(){return pn.apply(this,arguments)}function pn(){return pn=Object(s.a)(f.a.mark(function _n(){var gn,nn,Nn,gt;return f.a.wrap(function(fn){for(;;)switch(fn.prev=fn.next){case 0:if(!zt){fn.next=2;break}return fn.abrupt("return");case 2:if(qt(!0),!Vt){fn.next=21;break}return fn.next=6,lo(it);case 6:if(gn=fn.sent,nn=gn.path,Nn=gn.status,gt=gn.message,!(Nn===-1)){fn.next=14;break}n.b.info(gt||"\u66F4\u65B0\u5931\u8D25\uFF0C\u670D\u52A1\u7AEF\u9519\u8BEF"),St(),fn.next=19;break;case 14:if(n.b.info("\u66F4\u65B0\u6210\u529F\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u65B0\u52A0\u8F7D\u4EE3\u7801..."),!rt){fn.next=18;break}return fn.next=18,sa(it);case 18:_t(nn,new Date().getTime());case 19:fn.next=25;break;case 21:return fn.next=23,sa(it);case 23:n.b.info("\u66F4\u65B0\u72B6\u6001\u5DF2\u540C\u6B65\u3002"),Ct();case 25:qt(!1);case 26:case"end":return fn.stop()}},_n)})),pn.apply(this,arguments)}function Sn(){return Wn.apply(this,arguments)}function Wn(){return Wn=Object(s.a)(f.a.mark(function _n(){return f.a.wrap(function(nn){for(;;)switch(nn.prev=nn.next){case 0:if(!zt){nn.next=2;break}return nn.abrupt("return");case 2:if(qt(!0),!Vt){nn.next=11;break}return nn.next=6,jl(it,It);case 6:if(!rt){nn.next=9;break}return nn.next=9,sa(it);case 9:nn.next=13;break;case 11:return nn.next=13,sa(it);case 13:qt(!1),Ct();case 15:case"end":return nn.stop()}},_n)})),Wn.apply(this,arguments)}return l.a.createElement(d.a,{centered:!0,title:"\u66F4\u65B0\u901A\u77E5",closable:!1,confirmLoading:zt,visible:Ze,onOk:sn,onCancel:Sn,okText:Vt?"\u7ACB\u5373\u66F4\u65B0":"\u77E5\u9053\u4E86",cancelText:"\u7A0D\u540E\u518D\u8BF4"},rt&&Vt?l.a.createElement(m.Fragment,null,l.a.createElement("p",null," \u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u548C\u6D4B\u8BD5\u96C6\u6709\u66F4\u65B0\u5566~"),l.a.createElement("p",null,"\u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9\u3002"),l.a.createElement("p",null,"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01")):rt?l.a.createElement(m.Fragment,null,l.a.createElement("p",null,"\u672C\u5173",vt===0?"\u6D4B\u8BD5\u96C6":"\u7B54\u6848","\u5DF2\u66F4\u65B0\uFF0C\u60A8\u53EF\u4EE5\u91CD\u65B0\u8BC4\u6D4B\u3002"),l.a.createElement("p",null,"\u672C\u6B21\u66F4\u65B0\u4E0D\u5F71\u54CD\u5DF2\u83B7\u5F97\u7684\u7ECF\u9A8C\u503C\u3002")):l.a.createElement("p",null,"\u5173\u5361\u4EFB\u52A1\u7684\u4EE3\u7801\u6587\u4EF6\u6709\u66F4\u65B0\u5566~",l.a.createElement("br",null)," \u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9\u3002",l.a.createElement("br",null),"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01"))},_a=x("IWh4"),As=x.n(_a),Bl=x("iNZB"),Ro=x.n(Bl),Hl=function(xe){var Ze=xe.prev_game,rt=xe.next_game,At=xe.shixun,Pt=xe.game,vt=rt&&(Pt.status===2||At.status<2||At.task_pass),it=Object(E.h)();return l.a.createElement("div",{className:"unity-3d-nav"},Ze?l.a.createElement("a",{href:"/tasks/".concat(Ze).concat(it.search),className:"ghost-link"},"\u4E0A\u4E00\u5173"):null,vt?l.a.createElement("a",{href:"/tasks/".concat(rt).concat(it.search),className:"ghost-link"},"\u4E0B\u4E00\u5173"):null,l.a.createElement(Ko,{next_game:rt,prev_game:Ze,shixun:At,game:Pt}))},Cl=c.a.DirectoryTree,Kl=["jpg","png","gif","jpeg","jar","doc","pdf","xsl","ppt","mp3","mp4"],cs={moveX:"40%",moveY:0,loading:!0,isError:!1,taskData:{game:{}},evalData:null,lastedGetTaskInfoTime:0,codeRepData:{content:"",language:"c",currentPath:"",paths:[],lastedUpdateTime:0,loading:!1},showEvalResult:!1,showPictureView:!1,isPictureView:!1,showDragMask:!1,webDisplayUrl:"",evaluateLoading:!1,resetVncLoading:!1,evaluateMessage:"",showNotice:!1,timestamp:"",showDocuments:!1,repos:null};function Us(xe,Ze){switch(Ze.type){case be.u:return Object(e.a)(Object(e.a)({},xe),{},{moveX:Ze.payload});case be.v:return Object(e.a)(Object(e.a)({},xe),{},{moveY:Ze.payload});case be.W:return Object(e.a)(Object(e.a)({},xe),{},{codeRepData:Ze.payload});case be.h:return Object(e.a)(Object(e.a)({},xe),{},{codeRepData:Ze.payload});case be.d:return Object(e.a)(Object(e.a)({},xe),{},{codeRepData:Object(e.a)(Object(e.a)({},xe.codeRepData),Ze.payload)});case be.S:return Object(e.a)(Object(e.a)({},xe),{},{evaluateLoading:!1,showEvalResult:!0});case be.fb:return Object(e.a)(Object(e.a)({},xe),{},{timestamp:Ze.payload});case be.o:return Object(e.a)(Object(e.a)({},xe),{},{showEvalResult:!1});case be.j:return Object(e.a)(Object(e.a)({},xe),{},{loading:!0});case be.eb:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case be.cb:return Object(e.a)(Object(e.a)({},xe),{},{showDragMask:Ze.payload});case be.i:return Object(e.a)(Object(e.a)({},xe),{},{loading:!1,isError:!0});case be.k:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case be.R:return Object(e.a)(Object(e.a)({},xe),{},{evaluateLoading:!0});case be.n:return Object(e.a)(Object(e.a)({},xe),{},{evaluateLoading:!1});case be.F:return Object(e.a)(Object(e.a)({},xe),{},{evaluateMessage:Ze.payload});case be.I:return Object(e.a)(Object(e.a)({},xe),{},{showDocuments:Ze.payload});case be.G:return Object(e.a)(Object(e.a)({},xe),Ze.payload);case be.T:return Object(e.a)(Object(e.a)({},xe),{},{showNotice:!0});case be.p:return Object(e.a)(Object(e.a)({},xe),{},{showNotice:!1});case be.r:return Object(e.a)(Object(e.a)({},xe),{},{showPictureView:!1});case be.V:return Object(e.a)(Object(e.a)({},xe),{},{showPictureView:!0});case be.O:return Object(e.a)(Object(e.a)({},xe),{},{resetVncLoading:Ze.payload});default:throw new Error}}var Fs=X.default=function(xe){var Ze,rt=xe.match,At=xe.history,Pt=Object(i.a)(xe,["match","history"]);console.log("props:",Pt);var vt=Object(E.i)(),it=Object(E.h)().query,It=Object(m.useReducer)(Us,cs),Ct=Object(t.a)(It,2),_t=Ct[0],St=Ct[1],Vt=Object(m.useState)(vt.taskId),jt=Object(t.a)(Vt,2),kt=jt[0],zt=jt[1],qt=Object(m.useRef)(),sn=Object(m.useRef)(),pn=Object(m.useRef)(),Sn=Object(m.useState)(!1),Wn=Object(t.a)(Sn,2),_n=Wn[0],gn=Wn[1],nn=At.location;Object(m.useEffect)(function(){console.log("_params:",vt),zt(vt.taskId)},[vt]);var Nn=_t.moveX,gt=_t.taskData,rn=_t.moveY,fn=_t.evalData,bn=_t.showEvalResult,Un=_t.codeRepData,zn=_t.loading,Bn=_t.evaluateLoading,un=_t.evaluateMessage,ln=_t.showDocuments,yn=_t.repos,kn=_t.showPictureView,ar=_t.showNotice,Br=_t.webDisplayUrl,Cn=_t.isPictureView,ri=_t.resetVncLoading,Ra=_t.timestamp,Vi=_t.lastedGetTaskInfoTime,qr=_t.showDragMask,li=gt.st,Gn=gt.challenge,kr=gt.shixun,Li=gt.is_teacher,Ri=gt.game,uo=gt.has_answer,Da=gt.vnc_url,mi=gt.git_url,za=gt.user,na=gt.myshixun,la=gt.discusses_count,zo=gt.user_praise,co=gt.praise_count,ya=gt.tpm_cases_modified,eo=gt.tpm_modified,ho=gt.tpm_script_modified,_o=gt.mirror_name,Pa=gt.mirror_description,Ga=gt.tomcat_url,Hr=gt.unity_3d_routes,yr=gt.with_code_file,Ui=gt.unity_3d_result,Po=gt.next_game,Va=gt.prev_game,ui=Un.currentPath,Ci=Un.paths,fa=Un.content,ua=Un.language,Ya=Un.lastedUpdateTime,to=(eo||ho)&&li===0,wa=(ya||to)&&na.system_tip===!0,Na=(_o||[]).indexOf("Html")!==-1,no=Object(m.useMemo)(function(){return ui&&Ci?Ci.indexOf(ui)>=0:!1},[ui,Ci]),ci=Object(m.useMemo)(function(){return Hr&&!yr||(Gn==null?void 0:Gn.thiry_party)||Da},[Da,yr,Hr]);Object(m.useEffect)(function(){if(Hr&&yr){St({type:be.R});var Fn=Ee.a.subscribe("unity3d-load-end",function(){St({type:be.n})});return Fn}},[kt,Hr,Gn==null?void 0:Gn.thiry_party,yr,St]);function Pr(Fn){return Sr.apply(this,arguments)}function Sr(){return Sr=Object(s.a)(f.a.mark(function Fn(jn){var Hn,tr,On,hr,$r,Dr;return f.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:return fr.prev=0,fr.next=3,Object(he.n)(kt);case 3:if(Hn=fr.sent,tr=Hn.status,!(tr===401)){fr.next=9;break}return fr.abrupt("return");case 9:if(!(tr===-3)){fr.next=13;break}Object(we.q)({onCancel:function(){window.location.href="/"}}),fr.next=26;break;case 13:if(!(tr===403)){fr.next=17;break}At.replace("/403"),fr.next=26;break;case 17:if(!(tr===404)){fr.next=22;break}return At.replace("/404"),fr.abrupt("return");case 22:On=Hn.st,hr=Hn.challenge.path,$r={loading:!1,isError:!1,taskData:Hn,lastedGetTaskInfoTime:new Date().getTime(),codeRepData:Un},On===0&&hr&&(Dr=hr.split("\uFF1B").filter(function(wi){return!!wi}),$r.codeRepData.currentPath=Dr[0],$r.codeRepData.paths=Dr,$r.codeRepData.lastedUpdateTime=0),jn||St({type:be.k,payload:$r});case 26:fr.next=32;break;case 28:fr.prev=28,fr.t0=fr.catch(0),console.log(fr.t0),jn||St({type:be.i});case 32:case"end":return fr.stop()}},Fn,null,[[0,28]])})),Sr.apply(this,arguments)}Object(m.useEffect)(function(){var Fn=!1;return Pr(Fn),function(){Fn=!0}},[St,kt]),Object(m.useEffect)(function(){var Fn=!1;function jn(){return Hn.apply(this,arguments)}function Hn(){return Hn=Object(s.a)(f.a.mark(function tr(){var On,hr,$r,Dr,Ki,fr;return f.a.wrap(function(Ja){for(;;)switch(Ja.prev=Ja.next){case 0:if(St({type:be.W,payload:Object(e.a)(Object(e.a)({},Un),{},{loading:!0})}),!(Hr&&!yr||Gn!=null&&Gn.thiry_party)){Ja.next=3;break}return Ja.abrupt("return");case 3:return Ja.next=5,Object(he.j)(kt,{path:ui});case 5:if(On=Ja.sent,!Fn)if(On.status===0)n.b.info(On.message),St({type:be.h,payload:Object(e.a)(Object(e.a)({},Un),{},{loading:!1})});else{try{(On==null?void 0:On.file_type)==="txt"?hr=(($r=hr)===null||$r===void 0?void 0:$r.length)===0?hr:window.decodeURIComponent(escape(window.atob(On==null||((Dr=On.content)===null||Dr===void 0)?void 0:Dr.content))):hr=On==null||((Ki=On.content)===null||Ki===void 0)?void 0:Ki.content}catch(gs){hr=window.atob(On==null||((fr=On.content)===null||fr===void 0)?void 0:fr.content),n.b.warn("\u8BF7\u786E\u8BA4\u6587\u4EF6\u5B57\u7B26\u96C6\u7F16\u7801\u662F\u5426\u4E3AUTF-8"),console.log("err:",gs)}St({type:be.h,payload:Object(e.a)(Object(e.a)({},Un),{},{content:hr,language:On.language,file_type:On.file_type,filename:On.filename,lastedUpdateTime:0,loading:!1})})}case 7:case"end":return Ja.stop()}},tr)})),Hn.apply(this,arguments)}if(li===0&&ui&&kr.hide_code!==1)return jn(),function(){Fn=!0}},[li,ui,Vi,Ra]);var Bi=function(){var Fn=Object(s.a)(f.a.mark(function jn(){var Hn,tr,On,hr=arguments;return f.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:if(Hn=hr.length>0&&hr[0]!==void 0?hr[0]:0,console.log("lastedUpdateTime:",no,Hn),!(li===0&&Ya>0&&no||Hn)){Dr.next=10;break}return tr=localStorage.getItem("stat")?{stat:"newest"}:{},localStorage.removeItem("stat"),Dr.next=7,Object(he.L)(na.identifier,Object(e.a)({path:ui,evaluate:Hn,content:fa,game_id:Ri.id},tr));case 7:return On=Dr.sent,St({type:be.d,payload:{lastedUpdateTime:0}}),Dr.abrupt("return",On);case 10:return Dr.abrupt("return",!0);case 11:case"end":return Dr.stop()}},jn)}));return function(){return Fn.apply(this,arguments)}}(),Hi=Object(m.useCallback)(function(){Ri&&(Ri.status!==2&&Ee.a.publish("update-cost-time"));try{if(na!=null&&na.identifier){var Fn={path:ui,evaluate:0,content:fa,game_id:Ri.id,stat:"newest"},jn={type:"application/json"},Hn=new Blob([JSON.stringify(Fn)],jn);window.navigator.sendBeacon("".concat(Ca.a.API_SERVER,"/api/myshixuns/").concat(na==null?void 0:na.identifier,"/update_file.json"),Hn)}}catch(tr){}Bi()},[Ri.status,Bi]);Object(m.useEffect)(function(){Hi()},[nn]);function ur(){Hi()}Object(m.useEffect)(function(){var Fn=Ee.a.subscribe("unlock-test-case",function(){var jn;d.a.confirm((jn={centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:l.a.createElement(Tl,{score:Gn.score,is_teacher:Li})},Object(g.a)(jn,"centered",!0),Object(g.a)(jn,"onOk",Or),jn))});return Fn},[Or,Gn,Li]);var Or=Object(m.useCallback)(Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr,On,hr;return f.a.wrap(function(Dr){for(;;)switch(Dr.prev=Dr.next){case 0:return Dr.next=2,Object(he.K)(Ri.identifier);case 2:if(jn=Dr.sent,Hn=jn.test_sets,tr=jn.message,On=jn.status,!(On===-1)){Dr.next=7;break}return n.b.info(tr),Dr.abrupt("return");case 7:hr=gt.user.grade,gt.user.grade=hr-Gn.score*2,gt.test_sets=Hn,gt.game.test_sets_view=!0,St({type:be.eb,payload:{taskData:gt}});case 12:case"end":return Dr.stop()}},Fn)})),[Ri,Gn,St]);function Rr(Fn){for(var jn=document.getElementsByTagName("iframe"),Hn=0;Hn<jn.length;Hn++)jn[Hn].style["pointer-events"]=Fn}Object(m.useEffect)(function(){if(!ci||Da){function Fn(Hn){qt.current&&St({type:be.u,payload:Hn.pageX}),sn.current&&(Rr("none"),St({type:be.v,payload:Hn.pageY}))}function jn(){Rr("auto"),qt.current=!1,sn.current=!1,St({type:be.cb,payload:!1}),document.onselectstart=null}return document.addEventListener("mousemove",Fn),document.addEventListener("mouseup",jn),function(){document.removeEventListener("mousemove",Fn),document.removeEventListener("mouseup",jn)}}},[sn.current,qt.current,ci,St]);function Ei(Fn){var jn=gt.user.grade;gt.user.grade=jn-Fn,St({type:be.eb,payload:{taskData:gt}})}pn.current=function(){_t.moveX=_t.moveX!==.01?.01:"40%",St({type:be.u,payload:_t.moveX})};function br(){ci?pn.current():(document.onselectstart=function(){return!1},qt.current=!0,St({type:be.cb,payload:!0}))}function Ti(){document.onselectstart=function(){return!1},sn.current=!0,(gt!=null&>.vnc_url||gt!=null&>.windows_vnc||gt!=null&>.linux_vnc||gt!=null&>.virtual_machine||(kr==null?void 0:kr.hide_code)===2)&&St({type:be.cb,payload:!0})}function $o(Fn){Fn===.01?St({type:be.v,payload:0}):St({type:be.v,payload:.01})}function Qa(Fn){Fn===0?St({type:be.v,payload:"100%"}):St({type:be.v,payload:0})}Object(m.useEffect)(function(){return window.addEventListener("beforeunload",Hi),function(){window.removeEventListener("beforeunload",Hi)}},[Hi]),Object(m.useEffect)(function(){var Fn=Ee.a.subscribe("vnc-enlarge",function(){pn.current()});return Fn},[]);function ds(){Bi()}function ro(){return Bs.apply(this,arguments)}function Bs(){return Bs=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr;return f.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(he.G)(kt,{path:ui});case 2:jn=hr.sent,Hn=jn.content,tr=jn.language,St({type:be.h,payload:Object(e.a)(Object(e.a)({},Un),{},{content:Hn,language:tr,lastedUpdateTime:0,loading:!1})});case 5:case"end":return hr.stop()}},Fn)})),Bs.apply(this,arguments)}function Go(){return Os.apply(this,arguments)}function Os(){return Os=Object(s.a)(f.a.mark(function Fn(){var jn,Hn;return f.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Object(he.B)(gt==null||((jn=gt.myshixun)===null||jn===void 0)?void 0:jn.identifier,{});case 2:return Hn=On.sent,Pr(),On.abrupt("return",Hn);case 5:case"end":return On.stop()}},Fn)})),Os.apply(this,arguments)}function Wl(){return ul.apply(this,arguments)}function ul(){return ul=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr;return f.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(he.D)(kt,{path:ui});case 2:jn=hr.sent,Hn=jn.content,tr=jn.language,St({type:be.h,payload:Object(e.a)(Object(e.a)({},Un),{},{content:Hn,language:tr,lastedUpdateTime:0,loading:!1})});case 5:case"end":return hr.stop()}},Fn)})),ul.apply(this,arguments)}Object(m.useEffect)(function(){if(li===0&&Gn&&Gn.path){var Fn=Gn.path.split("\uFF1B").filter(function(jn){return!!jn});St({type:be.d,payload:{currentPath:Fn[0],paths:Fn}})}},[Gn,li]),Object(m.useEffect)(function(){kr&&Object(we.X)(kr.name||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199")},[kr]);function es(){return hs.apply(this,arguments)}function hs(){return hs=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr;return f.a.wrap(function(hr){for(;;)switch(hr.prev=hr.next){case 0:return hr.next=2,Object(he.z)(kt);case 2:jn=hr.sent,Hn=jn.praise_count,tr=jn.praise,gt.praise_count=Hn,gt.user_praise=tr,St({type:be.eb,payload:{taskData:gt}});case 7:case"end":return hr.stop()}},Fn)})),hs.apply(this,arguments)}var Hs=Object(m.useCallback)(function(Fn){function jn(tr){return Hn.apply(this,arguments)}function Hn(){return Hn=Object(s.a)(f.a.mark(function tr(On){return f.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:try{window.navigator.sendBeacon("".concat(Ca.a.API_SERVER,"/api/tasks/").concat(kt,"/cost_time.json?time=").concat(On),{})}catch(Dr){}case 1:case"end":return $r.stop()}},tr)})),Hn.apply(this,arguments)}jn(Fn)},[kt]);function ts(Fn){return yo.apply(this,arguments)}function yo(){return yo=Object(s.a)(f.a.mark(function Fn(jn){return f.a.wrap(function(tr){for(;;)switch(tr.prev=tr.next){case 0:return tr.next=2,Object(he.H)(kt,kr.id,jn);case 2:gt.game.star=jn,St({type:be.eb,payload:{taskData:gt}});case 4:case"end":return tr.stop()}},Fn)})),yo.apply(this,arguments)}function Al(){return cl.apply(this,arguments)}function cl(){return cl=Object(s.a)(f.a.mark(function Fn(){var jn,Hn;return f.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:if(yn){On.next=8;break}return On.next=3,Object(he.m)(na.identifier);case 3:jn=On.sent,Hn=jn.trees,St({type:be.G,payload:{showDocuments:!0,repos:Object(yt.c)(Hn)}}),On.next=9;break;case 8:St({type:be.I,payload:!0});case 9:case"end":return On.stop()}},Fn)})),cl.apply(this,arguments)}function ns(Fn){return bs.apply(this,arguments)}function bs(){return bs=Object(s.a)(f.a.mark(function Fn(jn){var Hn,tr,On;return f.a.wrap(function($r){for(;;)switch($r.prev=$r.next){case 0:return Hn=jn.props,tr=Hn.children,On=Hn.eventKey,$r.abrupt("return",new Promise(function(){var Dr=Object(s.a)(f.a.mark(function Ki(fr){var wi,Ja,gs;return f.a.wrap(function(Uo){for(;;)switch(Uo.prev=Uo.next){case 0:return tr&&tr.length>0&&fr(),Uo.next=3,Object(he.m)(na.identifier,{path:On});case 3:wi=Uo.sent,Ja=wi.trees,gs=Object(yt.e)(yn,On,Object(yt.c)(Ja,On)),St({type:be.G,payload:{repos:Object(I.a)(gs)}}),fr();case 8:case"end":return Uo.stop()}},Ki)}));return function(Ki){return Dr.apply(this,arguments)}}()));case 2:case"end":return $r.stop()}},Fn)})),bs.apply(this,arguments)}function dl(){St({type:be.I,payload:!1})}function Ol(Fn){var jn=Fn.gold,Hn=Fn.experience,tr=Fn.next_game,On=Fn.next_shixun,hr=Fn.subject_done,$r=Object(i.a)(Fn,["gold","experience","next_game","next_shixun","subject_done"]),Dr=$r.challenge_chooses_count===$r.choose_correct_num,Ki={had_submmit:!0,test_sets:$r.test_sets,challenge_chooses_count:$r.challenge_chooses_count,choose_correct_num:$r.choose_correct_num};gt.choose_test_cases=Ki,Dr&&(gt.game.status=2,gt.next_game=tr,gt.user.grade+=jn),Dr&&Ri.status!==2&&Ee.a.publish("update-cost-time"),St({type:be.eb,payload:{taskData:gt,evalData:{gold:jn,experience:Hn,next_game:tr,next_shixun:On,subject_done:hr},showEvalResult:Dr}}),Ee.a.publish("eval-code-finish")}function Ks(){return rs.apply(this,arguments)}function rs(){return rs=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr,On,hr,$r,Dr,Ki,fr,wi,Ja,gs,pa,Uo,Qs,Il;return f.a.wrap(function(Fa){for(;;)switch(Fa.prev=Fa.next){case 0:return Fa.prev=0,St({type:be.R}),Fa.next=4,Bi(1);case 4:if(tr=Fa.sent,On=tr.resubmit,hr=tr.sec_key,$r=tr.content_modified,!(tr.status&&tr.status<0)){Fa.next=10;break}return Ee.a.publish("eval-code-finish"),St({type:be.eb,payload:{evaluateLoading:!1}}),Fa.abrupt("return");case 10:return Dr={sec_key:hr,resubmit:On,first:1,content_modified:$r},it.type==="exercises"&&(Dr.extras={exercise_id:it.exercisesId,question_id:it.questionId,challenge_id:(Ki=gt.challenge)===null||Ki===void 0?void 0:Ki.id,subject_id:it.subject_id||""}),Fa.next=14,Object(he.g)(kt,Dr);case 14:if(fr=Fa.sent,!(fr!=null&&(jn=fr.data)!==null&&jn!==void 0&&(Hn=jn.data_list)!==null&&Hn!==void 0&&Hn.length)){Fa.next=18;break}return Ee.a.publish("pod-restrict-data",{identifier:fr==null||((wi=fr.data)===null||wi===void 0)?void 0:wi.identifier,data_list:fr==null||((Ja=fr.data)===null||Ja===void 0)?void 0:Ja.data_list}),Fa.abrupt("return");case 18:if(!(fr.status===-1&&it.type==="exercises")){Fa.next=21;break}return window.parent.location.href="/classrooms/".concat(nn.query.coursesId,"/exercise/").concat(nn.query.exercisesId,"/detail"),Fa.abrupt("return");case 21:return fr.status===1&&(Il=function(){return Il=Object(s.a)(f.a.mark(function Zl(Js,Rs,Fo){var Zs,ml,Gl,ma,gl,Vl,kl,Yl,vl,Ql,Di,Ll,Jl,xs;return f.a.wrap(function(ws){for(;;)switch(ws.prev=ws.next){case 0:return ml=Fo++*Js,ml/1e3>Rs&&(Uo=!0),ws.next=4,Object(he.s)(kt,{resubmit:On,time_out:Uo,port:fr.port,sec_key:hr,challenge_id:gt==null||((Zs=gt.challenge)===null||Zs===void 0)?void 0:Zs.id,subject_id:it.subject_id||""});case 4:Gl=ws.sent,ma=Gl,gl=ma.status,Vl=ma.running_code_message,kl=ma.port,Yl=ma.web_route,St({type:be.F,payload:Vl}),+gl>-1||ml/1e3>Rs?(Ri.status!==2&&gl===2&&(gt.game.status=2,gt.user.grade+=ma.gold,Ee.a.publish("update-cost-time")),gt.test_sets=ma.test_sets||[],gt.last_compile_output=ma.last_compile_output,gt.test_sets_count=ma.test_sets_count,gt.sets_error_count=ma.sets_error_count,gt.record_consume_time=ma.record_consume_time,gt.next_game=ma.next_game,gt.prev_game=ma.prev_game,gt.game_report_id=ma.game_report_id,vl="",Ql=_o.indexOf("Web")!==-1||_o.indexOf("JFinal")!==-1,Ql&&kl!=-1&&Yl&&(vl="".concat(Ga,":").concat(kl,"/").concat(Yl)),Di=Object(yt.d)(ma.test_sets),Ll=ma.picture>0&&Di,Jl=gl===2&&!Uo,Uo?n.b.info("\u672C\u6B21\u8BC4\u6D4B\u8D85\u65F6"):Jl||n.b.info("\u8BC4\u6D4B\u672A\u901A\u8FC7\uFF0C\u8BE6\u60C5\u53C2\u89C1\u201C\u6D4B\u8BD5\u7ED3\u679C\u201D"),xs={taskData:gt,evalData:{gold:ma.gold,experience:ma.experience,next_game:ma.next_game,next_shixun:ma.next_shixun},evaluateLoading:!1,evaluateMessage:"",webDisplayUrl:vl,showPictureView:Hr||Gn!=null&&Gn.thiry_party?!1:Ll,isPictureView:Ll},Hr&&yr||Gn!=null&&Gn.thiry_party?(Ee.a.publish("evaluate-unity3d-result",{state:"user",data:{user:za}}),Ee.a.publish("evaluate-unity3d-finish"),(Ui||Di)&&Ee.a.publish("evaluate-unity3d-result",ma.unity_3d_result)):xs.showEvalResult=Jl,St({type:be.eb,payload:xs}),Ee.a.publish("eval-code-finish")):setTimeout(function(){Qs(Js,Gn.exec_time+11,Fo++)},Js);case 9:case"end":return ws.stop()}},Zl)})),Il.apply(this,arguments)},Qs=function(Zl,Js,Rs){return Il.apply(this,arguments)},gs=1,pa=1e3,Uo=!1,Qs(pa,Gn.exec_time+11,gs++)),Fa.abrupt("return",res);case 25:Fa.prev=25,Fa.t0=Fa.catch(0),console.log("-------eval code",Fa.t0);case 28:case"end":return Fa.stop()}},Fn,null,[[0,25]])})),rs.apply(this,arguments)}function Ws(Fn){St({type:be.d,payload:{content:Fn,lastedUpdateTime:new Date().getTime()}})}function hl(){St({type:be.o})}function fl(){St({type:be.r})}function Ur(){St({type:be.V})}function _i(){St({type:be.T})}function Ua(Fn,jn){return No.apply(this,arguments)}function No(){return No=Object(s.a)(f.a.mark(function Fn(jn,Hn){var tr,On,hr,$r;return f.a.wrap(function(Ki){for(;;)switch(Ki.prev=Ki.next){case 0:if(tr=Hn.node,gn(!0),!tr.isLeaf){Ki.next=9;break}return On=jn[0],hr=On.split(".").pop().toLowerCase(),Ki.next=7,Bi();case 7:$r=Ki.sent,St({type:be.d,payload:{currentPath:On}});case 9:setTimeout(function(){gn(!1)},500);case 10:case"end":return Ki.stop()}},Fn)})),No.apply(this,arguments)}function io(Fn){return Do.apply(this,arguments)}function Do(){return Do=Object(s.a)(f.a.mark(function Fn(jn){var Hn;return f.a.wrap(function(On){for(;;)switch(On.prev=On.next){case 0:return On.next=2,Bi();case 2:Hn=On.sent,console.log("resres:",Hn),St({type:be.d,payload:{currentPath:jn}});case 5:case"end":return On.stop()}},Fn)})),Do.apply(this,arguments)}function Io(){gt.myshixun.system_tip=!0,St({type:be.eb,payload:{taskData:gt,showNotice:!1}})}function pl(Fn,jn){gt.challenge.path=Fn,gt.myshixun.system_tip=!1,St({type:be.eb,payload:{taskData:Object(e.a)(Object(e.a)({},gt),{},{tpm_cases_modified:!1,tpm_modified:!1,tpm_script_modified:!1}),showNotice:!1,timestamp:jn}})}function fs(){St({type:be.p})}function Xs(){return Es.apply(this,arguments)}function Es(){return Es=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr,On,hr,$r,Dr,Ki;return f.a.wrap(function(wi){for(;;)switch(wi.prev=wi.next){case 0:if(wi.prev=0,St({type:be.O,payload:!0}),Ee.a.publish("vnc-reseting"),!(gt!=null&>.windows_vnc||gt!=null&>.virtual_machine)){wi.next=13;break}return Ee.a.publish("reset-linux-windows-loading"),wi.next=7,Object(he.F)({myshixunId:gt==null||((tr=gt.myshixun)===null||tr===void 0)?void 0:tr.identifier,game_id:gt==null?void 0:gt.game.id});case 7:Hn=wi.sent,On=Hn.data.link_url,gt.shixun.windows_vnc=On+"×tamp="+new Date().getTime(),gt.windows_vnc++,wi.next=28;break;case 13:if(!(gt!=null&>.linux_vnc)){wi.next=23;break}return Ee.a.publish("reset-linux-windows-loading"),wi.next=17,Object(he.C)({myshixunId:gt==null||((hr=gt.myshixun)===null||hr===void 0)?void 0:hr.identifier,game_id:gt==null?void 0:gt.game.id});case 17:Hn=wi.sent,$r=Hn.data.link_url,gt.shixun.windows_vnc=$r+"×tamp="+new Date().getTime(),gt.linux_vnc++,wi.next=28;break;case 23:return wi.next=25,Object(he.E)({myshixunId:gt==null||((Dr=gt.myshixun)===null||Dr===void 0)?void 0:Dr.identifier,game_id:gt==null?void 0:gt.game.id});case 25:Hn=wi.sent,Ki=Hn.data.link_url,gt.vnc_url=Ki+"×tamp="+new Date().getTime();case 28:Ee.a.publish("vnc-reseting-done",Hn),gt!=null&&(jn=gt.challenge)!==null&&jn!==void 0&&jn.thiry_party&&Ee.a.publish("reset-linux-windos-vnc"),St({type:be.eb,payload:{taskData:gt,resetVncLoading:!1}}),wi.next=36;break;case 33:wi.prev=33,wi.t0=wi.catch(0),console.log(wi.t0);case 36:case"end":return wi.stop()}},Fn,null,[[0,33]])})),Es.apply(this,arguments)}function zs(Fn){return ps.apply(this,arguments)}function ps(){return ps=Object(s.a)(f.a.mark(function Fn(jn){var Hn,tr,On,hr,$r,Dr;return f.a.wrap(function(fr){for(;;)switch(fr.prev=fr.next){case 0:if(Hn=jn.GameState,tr=jn.Data,On=jn.challenge,!(On==="info")){fr.next=5;break}Ee.a.publish("evaluate-unity3d-result",{state:"3d_callback",data:{challenge_info:Object(e.a)({},gt.challenge)}}),fr.next=15;break;case 5:if(!(Hn==="Success")){fr.next=15;break}if(!(Ui||!yr)){fr.next=14;break}return fr.next=9,Object(he.I)(kt,si.Base64.encode(kt+new Date().getTime()),tr);case 9:hr=fr.sent,$r=hr.status,Dr=hr.data,$r==0&&(Ri.status!==2&&(gt.game.status=2,gt.user.grade+=Dr.gold,Ee.a.publish("update-cost-time")),Ee.a.publish("evaluate-unity3d-result",{state:"userAndtime",data:{user:za,open_time:Dr.open_time,end_time:Dr.end_time}}),St({type:be.eb,payload:{taskData:gt,evalData:{gold:Dr.gold,experience:Dr.experience,next_game:Dr.next_game},evaluateLoading:!1,showEvalResult:!0}})),fr.next=15;break;case 14:St({type:be.S});case 15:case"end":return fr.stop()}},Fn)})),ps.apply(this,arguments)}function Xl(){}function bo(){return Gs.apply(this,arguments)}function Gs(){return Gs=Object(s.a)(f.a.mark(function Fn(){var jn,Hn,tr,On,hr,$r,Dr,Ki,fr,wi,Ja;return f.a.wrap(function(pa){for(;;)switch(pa.prev=pa.next){case 0:if(!(gt!=null&>.windows_vnc||gt!=null&>.virtual_machine)){pa.next=6;break}return pa.next=3,Object(he.d)(gt==null||((hr=gt.myshixun)===null||hr===void 0)?void 0:hr.identifier,gt==null||(($r=gt.game)===null||$r===void 0)?void 0:$r.id);case 3:On=pa.sent,pa.next=15;break;case 6:if(!(gt!=null&>.linux_vnc||(kr==null?void 0:kr.webssh)===3)){pa.next=12;break}return pa.next=9,Object(he.a)(gt==null||((Dr=gt.myshixun)===null||Dr===void 0)?void 0:Dr.identifier,gt==null||((Ki=gt.game)===null||Ki===void 0)?void 0:Ki.id);case 9:On=pa.sent,pa.next=15;break;case 12:return pa.next=14,Object(he.c)(gt==null||((fr=gt.myshixun)===null||fr===void 0)?void 0:fr.identifier,gt==null||((wi=gt.game)===null||wi===void 0)?void 0:wi.id);case 14:On=pa.sent;case 15:return(jn=On)!==null&&jn!==void 0&&(Hn=jn.data)!==null&&Hn!==void 0&&Hn.remaining_time&&Ee.a.publish("update-windows-time",(Ja=On)===null||Ja===void 0?void 0:Ja.data),pa.abrupt("return",(tr=On)===null||tr===void 0?void 0:tr.data);case 17:case"end":return pa.stop()}},Fn)})),Gs.apply(this,arguments)}var Vs=typeof Nn=="number"&&Nn!==.01?"".concat(Nn,"px"):"40%",zl="calc(100% - 4px - ".concat(Vs,")"),Rl=(Ze={game:Ri,taskId:kt,user_praise:zo,praise_count:co,st:li,challenge:Gn,rank_name:gt.rank_name,shixun:kr,is_teacher:Li,has_answer:uo,unity_3d_routes:Hr,with_code_file:yr,onEvaluateCallback:Xl,onGetUnity3dMessage:zs},Object(g.a)(Ze,"taskId",kt),Object(g.a)(Ze,"myshixun",na),Object(g.a)(Ze,"user",za),Object(g.a)(Ze,"discusses_count",la),Object(g.a)(Ze,"onPlusOrCancelPraise",es),Object(g.a)(Ze,"minuxUserGrade",Ei),Object(g.a)(Ze,"taskData",gt),Ze),Ys={showNotice:ar||(ya||to)&&na.system_tip===!1,tpm_cases_modified:ya,tpm_modified:eo,tpm_script_modified:ho,st:li,taskId:kt,myshixunId:(na||{}).id,onNextCallback:Io,onUpdateCallback:pl,onUpdateFailure:fs},ms=Object(e.a)(Object(e.a)({},fn),{},{isPictureView:Cn,history:At,webDisplayUrl:Br,onShowPictureView:Ur,star:Ri&&Ri.star,onStarChange:ts,onCloseResult:hl}),Dl={lastedGetTaskInfoTime:Vi,isEditPath:no,taskData:gt,codeRepData:Un,moveY:rn,evaluateMessage:un,evaluateLoading:Bn,isNotice:wa,isHtml:Na,onChangePath:io,onResizeSetContainer:$o,onEditRepCode:Ws,onUpdateCode:Bi,onResizeYStart:Ti,onShowDir:Al,onResetCode:ro,onResetGitCode:Go,onResizeCodeArea:Qa,onResetPassedCode:Wl,onFinishDisplayHtml:ds,onShowNotice:_i};return l.a.createElement(m.Fragment,null,zn?l.a.createElement(je.a,{message:"\u52AA\u529B\u8BF7\u6C42\u6570\u636E\u4E2D..",className:"tpi-spin"}):l.a.createElement(m.Fragment,null,l.a.createElement("div",{className:"task-wrapper"},qr&&l.a.createElement("div",{className:"draging-mask"}),l.a.createElement(mo,{difficulty:Gn==null?void 0:Gn.difficulty,mirror_description:Pa,history:At,git_url:mi,shixun:kr,taskData:gt,lastedGetTaskInfoTime:Vi,onAddVncTime:bo,taskId:kt,onBack:ur,isNotice:wa,resetVncLoading:ri,onResetVnc:Xs,onResetGitCode:Go,vnc_url:Da,linux_vnc:gt==null?void 0:gt.linux_vnc,window_vnc_url:(gt==null?void 0:gt.windows_vnc)||(gt==null?void 0:gt.virtual_machine),onShowNotice:_i,game:Ri,user:za,st:li,onUpdateCode:Bi,onUpdateCostTime:Hs,unity_3d_routes:Hr&&!yr||(Gn==null?void 0:Gn.thiry_party)}),l.a.createElement("div",{className:"tasks-body"},l.a.createElement("section",{id:"task-left-panel",className:"left-panel ".concat(Hr&&yr?"has-unity-3d":""),style:{width:Vs,display:Nn===.01?"none":""}},l.a.createElement(Lt,Rl)),l.a.createElement("section",{className:"resize-x-bar ".concat(ci?"has-unity-3d":""),onClick:function(){ci&&br()},onMouseDown:function(){!ci&&br()}},l.a.createElement(js,{noDragging:ci,vnc_url:Da,moveX:Nn})),l.a.createElement("section",{id:"task-right-panel",className:"right-panel ".concat(Da||gt!=null&>.windows_vnc||gt!=null&>.linux_vnc||gt!=null&>.virtual_machine?"vnc":""),style:{width:zl,minWidth:"500px"}},(Gn==null?void 0:Gn.show_type)===7?l.a.createElement(tn.default,{taskId:kt,taskData:gt,onEditRepCode:Ws}):l.a.createElement(m.Fragment,null,l.a.createElement(m.Fragment,null,li!==1&&l.a.createElement(Ls,Object(o.a)({},Pt,Dl,{_dispatch:St,taskData:gt,unity_3d_routes:Hr,onGetUnity3dMessage:zs,onUpdateCode:Bi,evaluateMessage:un,language:ua,evaluateLoading:Bn,with_code_file:yr,onEval:Ks})),Da||gt!=null&>.windows_vnc||gt!=null&>.virtual_machine||gt!=null&>.linux_vnc?null:li===1?l.a.createElement(Tn,Object(o.a)({_dispatch:St,onEval:Ol},Dl)):null))))),l.a.createElement(de.a,null,bn?l.a.createElement(Pi,ms):null,l.a.createElement(O.a,{className:"setting-drawer",title:null,placement:"right",width:400,closable:!1,visible:ln,onClose:dl},l.a.createElement(v.a,{spinning:_n},l.a.createElement(Cl,{className:"dir-tree",selectedKeys:["".concat(ui)],treeData:yn,onSelect:Object(V.throttle)(Ua,2e3),loadData:ns}))),kn?l.a.createElement(Fl,{taskId:kt,onHidePictureView:fl}):null,l.a.createElement(Xa,Ys))))};function Tl(xe){var Ze=xe.is_teacher,rt=xe.score;return l.a.createElement(m.Fragment,null,Ze?l.a.createElement(m.Fragment,null,l.a.createElement("div",null,"\u5DF2\u7ECF\u8FC7\u804C\u4E1A\u8BA4\u8BC1\u7684\u6559\u5E08\u53EF\u4EE5\u514D\u91D1\u5E01\u67E5\u770B\u9690\u85CF\u6D4B\u8BD5\u96C6\u3002"),l.a.createElement("div",null,"\u89E3\u9501\u672C\u5173\u6240\u6709\u6D4B\u8BD5\u96C6\u9700\u8981\u6263\u9664".concat(rt*2,"\u91D1\u5E01\uFF0C\u786E\u5B9A\u8981\u89E3\u9501\u5417\uFF1F")),l.a.createElement("a",{href:"/account/certification",class:"to-certification-link",target:"_blank"},"\u7ACB\u5373\u8BA4\u8BC1")):l.a.createElement("div",null,"\u89E3\u9501\u672C\u5173\u6240\u6709\u6D4B\u8BD5\u96C6\u9700\u8981\u6263\u9664".concat(rt*2,"\u91D1\u5E01\uFF0C\u786E\u5B9A\u8981\u89E3\u9501\u5417\uFF1F")))}function js(xe){var Ze=xe.noDragging,rt=xe.moveX,At=xe.vnc_url;return l.a.createElement(m.Fragment,null,Ze?l.a.createElement("a",{className:"trapezoid ".concat(rt===.01?"enlarge":"")},l.a.createElement("img",{src:rt===.01?As.a:Ro.a,alt:"resize-icon",width:20})):l.a.createElement("a",{className:"btn-resize",draggable:!1},l.a.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13",draggable:!1},l.a.createElement("path",{draggable:!1,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"}))))}},ynwM:function(U,X,x){var I=x("MFOe"),_=I.Global;U.exports={name:"oldFF-globalStorage",read:y,write:v,each:o,remove:g,clearAll:p};var O=_.globalStorage;function y(d){return O[d]}function v(d,a){O[d]=a}function o(d){for(var a=O.length-1;a>=0;a--){var n=O.key(a);d(O[n],n)}}function g(d){return O.removeItem(d)}function p(){o(function(d,a){delete O[d]})}},yqJW:function(U,X,x){},yslc:function(U,X){U.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAAOHklEQVR4Xu1dCXQURRr+emZyTO6D3BCEgKCInCKeK3IoiyIqlxLyQBRBV8DNhCCrS3Z9Cq66KOoi68ECKocCcutTLhUERM1MEpBLEuQmQMKEnDNd+6onEzKTuXqmJ5l0V/EeL+mp+qu+r77UVP1V9TcHffZbIJgOlhgDMmaAA8lTwVDxJQh5UMY4GTSFM8AJ+PW6cIDsBEEfhfPB4MuUAYvQaTowOwV1NXtB0E6mWBksBTNwTeiUBENud/CmHwBEKZgTBl2GDNgKnQIsyBkCM9kEEI0M8TJICmWgqdCFkT17MngsUignDLYMGXAsdAo0XzcPILkyxMwgKZAB50InhIMhZxUIGalAXhhkmTHgXOgU6PG8UFwxbgdBf5nhZnAUxoBroVMyjryQgMraPSDoqDBuGFwZMeBe6MLi9IWuIHW7QUisjLAzKApiwDOhC25H3T3g8TUICVYQPwyqTBjwXOgUsD4nC4RfIhPsDIaCGBAndEHsujwQMkdBHDGoMmBAvNAtPvZlAMmUAX4GQSEMeCf0wrxgmCu+ASF3K4QnBrOVM+Cd0Cnoorw4mIw/guD6Vs4Ba74CGPBe6IInJicDZn4PgDYK4IpBbMUM+CZ0Qey5t4M3bwUhoa2YB4dNT1CHIzkoEkZzDYrrLtvkCeU0aBsULTw7WntRbtARoQrGbWHtBVw/Vpaggq9t1Rh9F7qwOM0ZA45fDgJp7PmJ0i4hCegU3AabjAc9qmF24r14JeXP+MZ4GEN+/69NmVvD0rGn8zThWYghF7XE7JFN+0wL0x5BQfVZLL60D1XE5JUNfxTqEZqC/C7Zgumeh96EvvqMP6ppNpvSCTM/ZxbAz222lousqGtIAnZkPIMETThmndmM1y/scGvB30KfFNcPH7YbLbRjwokVWHJ5v/CzltMgWq112z5HGXgQnDdVeFW2cSEmdFcU6nUfgpBJPrPsBwPhqmCsSM/EA9E3CtaXXPoJk09+4XIk9qfQrwuKhaFLNiLVodh7tQS3HX0HpB735Lj+WNTOu0Ojl0yViC/6u88MMqG7opDkaWCo2AJCBvnMtB8MqMFhQdoIPNPmDsH6+vIijCxegjrwDmvzl9BV4LAtYwr+FJEBEzHj1iML8EvVqYY2MKFL3/nSTV2sbTuWGw2jaReAbtI3VxqLuQkDMC91mGBsXXkhRhUvFcQeBBViNWENlcxocxdeSBqInRXHMLpkmU3lfbRtsbnjk8KzdgdetvlmKDVdBZ1COEuvJA/F7KSBwsfPnVyLdy9Suq6lOLUWafULXbGITYTHwZrzYos1yc9GdE8oPJDdHnXcHhCS7En2lsgzJ2kw8pLvA094YaG5teIoBoRnYFunqT43J6koz+E8mX6jLGz7KJ6KtxzvpwvQJ/5Y5XN9nhp4NLo7empTPcqepIlsaOcHF/fgnMnoUbmi6nNYUZbvUd7mzCT9iG5tfcHMvjDzOwFybYhsTmQe1PVGygPClOGzsl+F3P4UOl0jrGyfiWFRljXCBjptKlnqtbfGA3hNsixLfwyZsf4N3bO6zCDgCrTkP6FTpAbdQyBYA0JUgQbcUXvoiEsFaU26hHvwUvJgbK84ihHHF9sU6RvWDlszpgjPEgr/biNYI19jM3FJ0kRgY4dJoGVo+rxMj3ElnzasDai/flBkZ3xeZoDJyXpBCv6sQj9XZ4TBjbswUhWC/uEWP/qeqyWgmFylm0KTkRIUBWUKnTKj180AIfOl6KjmtiHVYnRB6gg8l3Cn0Pz/lO7CtFNfwtzoT2HtdRMwIvom6KtOo8/h+TafSYnZKnT6h2a/5rCvR+wcfUm7sciK66tgoVMG87PfBfCslJ3WHLZeTByEl1Pux8byA3iw+GObKsVsGD0U1Q2fpj8uuDOt0ySrsYmxt+Dj9DHCrxNPrMD/6n3p/sDHhO4PVhvbJKvU0O9bBxCLq6MFUhgX5LBWOlVwtqv5r5RhyEkcgE8v/4LME595LXQ6HUoPimniDWnsS6dz9uHFi4V1gtWb4wtNtL2rywtsTDCh+8Kop2UL8yJgNn4Hgl6eFpEqHz23Yez+qkNzruaUH7QdhSfjbxWmG8+eWuu10B1VTH3p2zOm4O6IDFw0XUW3Q6/jnKkCAyM64dv6ub8v+McUL8Oqcj0Tej0D/l2M2vfUbzNTUcPvBSFtfelEsWW9FfoX7bPwaMzNmHtuK2af3SKp0F9NHir46GkaXbwUn5cbhJ/bqMNwW/h1biF2CI7D22kjhHxTT67GqbpymzI/V57EadMVJvQWETqttDC3B8zm70FIpNvelDAD3YRpnGa0uVvwqFhHdDrnzoztbZNneFQ3pAfHClv0P1X9YfMZ9TOPiukhPFtYuhtmO2/JS2e+Qhlf3QSBBirBl06/KWj61ngYg+0OjHkCu/Fisctv83C4ptRtMTZ1cUuRxBn0ugdByHqJrYoyNytxAOamDGsQ+oTYvlicPlaUDVeZ6W7pSbtRlrrsVrUfj/ujujYU/eTyzxh/YrnoehsLvetvr+FQzQW3NpjQ3VIkcYb8nH8D/PMSWxVlzl7o9Oz1hLhbGmwkayIxPLobCCH4+NK+Ji6/RE2E4BKk6aOLe5t8PuvMJlw2VzXYS9VEYVPHSeipTROemQkPNacCE7qobvM6c/PO0WkzC3SZMBPbgyNeN9/7gvZCt7f0z6T7hKkNPedyz7GFTSoS4168MSQJX3V8Cu2CYwQ7b5zfgdSgKDwe21sSoYudurANI+9141lJQ3YfEO6HQLiN5ErodIe05MYXhYNVT5xYicWXf/JJ6COiumFth4m4aq7BpJOrsLJMD+sGixQjulihe9ZZ3uVS7s6olS+9LhEg+wPl1TGuhP5A1A3Y0GESKvla0ANajq6RiRnRqddnb+dpGFvyiXCbiKaWFPrB6nNYXe/lcSZnsYe6Hoq6Cd21KQrfGSWLgmA4Qu+V3uXdOCF9KWdCp/7tbzOexoCITlh2aT+y/ljhsHIxQqcGgjm1zcZUSwqdHQGQXk8Wi/qchSC85QRUgCRnQl/UdiQmx/cXFqF3HX0PuyqLJRG6vZGWEPro6B7opU2Dofo0lrs5Siv2rMuo6JvRW9sWBdVnmhxzCIQu9/9i1KB7CjyxvVkcAMgdCb3xhYi/nlqP+aXfOW2p2BE9EIQuhnaxQhdjuyXy+lfollAY2wMxAq/14oV18RSvDsPxG2YLdzgXXPge00+vc9kfTOgtIVfv6/Sf0C3b/T8H4i2jJ+P64d20RxCi0qCGN2FMyTKsu1KEx2J6CrudI4uXurwKR+lmQvdedC1R0j9CP7IgBFdL6Pd+v5YA5arO+anDMSPBEjKyzFyFGLVWuE73t7NbMO/8dtAtek8uP3QLScJH9aEq7jz6nkdlGrerJeboYvqCTV08YSs/m17HmeBJ1ubMMy6mFz5pP06ocvaZzZh3fhueib8d76Q9DI7jsPzyr5hz9mscqXV/bsTXdvsqdHo5e//1M4RmeOpHF9NmJnR3bOl100DI2+6yNffnnYPb4Jfrn0eEOgTvl+7G1FNrGppA/wDoOZcgTi08O1pTiiM1F3DWZASNk0JHeHq7nm7b09v99H4//Z+O/nQbX8OpoIZKKB/CqaFVBWFdeRHWXil0CtNTodPIBF1DE1HF16GSr0MVqQM9M5OXPAQT4/oJ4TKSi/6Bi+ZKSSllQndFJ339ixnfBOJbp3dkTBXiqNDNkt6H56PaLvxbL20q5iQNAT2xSEd3X9PQ3z/AV8ZDkgj9SvdXEKpyfHHEemHD1/bal2dCd8YoDXFRCxpTLSAj6/YMTRVu7tAYLs584xRatCoUPbSp6BqSiFi1FtHqUISpgqHmOGHUpiM4PSKg4jjQf87S9FNf4oqLC8WejujU/u5Of2lyRp1e1th85SDevLDTL3ERmdAd9ezpvDCcr9gFkJ5SjyxS2qMiLndwRlzKOjy1Ra/RxWvChdtF9pF67W3QIwR0Z7VxKjdX++0SNa2HXgAZG2O5DLai7FeUSjw18pQnqfL5/h1NW6LXLQch0h3mlgods8MYqGfAd6EbcmaC519jjDIGApkB34Sen3sfOPPm1hKgKJA7grXNvwx4L/SiWZ1gMu1jb5P2bwcx69Iw4J3QaegKk5G+uyhgI+ZKQw+zIhcGxAudEA56Hd1tscRaYIkx0AoYEC90vW4OCMlrBdhYExkDDQyIE7oQHZesDfSXcrH+ZQzYM+C50Atm3gBeiLLVrIGHWJcxBqRgwDOhH8+LQXnFPoB0lqJSZoMx0NwMuBc6yVPBULERhAxt7sax+hgDUjHgXuiG7LngMUuqCpkdxkBLMOBa6AW60TCTlS3RMFYnY0BKBpwLnUa9NZl3B/LLtqQkgtmSNwOOhX7whXjU1NKz5e4DdcubH4ZOJgw0Fbrl7c9fg5B7ZYKRwWAMOLgio89+CwTTGTeMATkxYDui63OyQPglcgLIsDAGKAPXhF6YfQvM3HeBENKZdQ1jQGoGLEIvmJ0EvnZ/c79ES2owzB5jwBkDHGhIZ/2R7QC5g9HEGJArAxzyde8D5Gm5AmS4GAO2c3TGB2OgFTLALR1KA6e5SByvUpEp7s+6tELwrMnKYcCl0DmYVOCyzOM3L2dCV44mZInUhdBrVFCPMmdt3MCmLrLsemWBcih0DlfVBMNNWVu2WdlgI7qydCE7tE2FzpVpVOqhdZkbaJSKhsSELruuVxYgG6FzOK+Bekjd+I16exaY0JWlC9mhbRA6h5PBCBpUM369w1jdTOiy63plAaoX+rEQNTewetzmEmfomdCVpQvZoeWWDi3UctrBlePXnHHpTZcdcgZIUQxErnk43vjI2ovuQP8faDGikjbF4FsAAAAASUVORK5CYII="},zJix:function(U,X,x){U.exports={"test-set-container":"test-set-container___1ntSt","resize-y-bar":"resize-y-bar___1H5tU","code-area-container":"code-area-container___3jW3-","xterm-panel":"xterm-panel___34hmU","xterm-rows":"xterm-rows___1CWkx",xterm:"xterm___3izNA","xterm-screen":"xterm-screen___1ZnA6",navs:"navs___zbATm","arrow-right":"arrow-right___135_M","arrow-down":"arrow-down___8TNRj","flex-container":"flex-container___3V3ix",iconfont:"iconfont___3rTTR",active:"active___1saNv","action-bar-container":"action-bar-container___399DC","action-bar":"action-bar___1-saI","right-panel":"right-panel___3orFe","action-container":"action-container___1opPs","setting-drawer":"setting-drawer___1NgWi",oj:"oj___23iIP"}},zkdm:function(U,X,x){}}]);
|